/* ============================================
   ОЦК АДМИН-ПАНЕЛЬ
   ============================================ */
:root {
    --primary: #2E4C5F;
    --primary-dark: #1f3a48;
    --primary-light: #4a6f85;
    --accent: #e8762e;
    --accent-dark: #d4621a;
    --accent-light: #f0955c;
    --bg-body: #f8f6f2;
    --bg-sidebar: #2E4C5F;
    --bg-card: #ffffff;
    --bg-hover: #f5f0ea;
    --text-primary: #2c3e50;
    --text-secondary: #6c757d;
    --text-light: #ffffff;
    --text-muted: #9ca3af;
    --border: #e8e2d8;
    --success: #28a745;
    --danger: #dc3545;
    --warning: #ffc107;
    --info: #17a2b8;
    --shadow-sm: 0 1px 2px 0 rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1);
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --transition: all 0.2s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-body);
    color: var(--text-primary);
    line-height: 1.5;
    font-size: 14px;
}

/* Лейаут */
.admin-layout {
    display: flex;
    min-height: 100vh;
}

/* Сайдбар */
.sidebar {
    width: 280px;
    background: var(--bg-sidebar);
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    overflow-y: auto;
    transition: var(--transition);
    z-index: 100;
}

.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    margin-bottom: 1rem;
}

.sidebar-header h3 {
    color: var(--text-light);
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0 0 4px 0;
}

.sidebar-header small {
    color: rgba(255,255,255,0.5);
    font-size: 0.7rem;
}

.sidebar-nav {
    padding: 0 0 1rem 0;
}

.nav-group {
    margin-bottom: 1rem;
}

.nav-group-title {
    padding: 0.5rem 1.5rem;
    color: rgba(255,255,255,0.4);
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.nav-item {
    margin-bottom: 2px;
}

.nav-item a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    transition: var(--transition);
    border-left: 3px solid transparent;
}

.nav-item a:hover {
    background: rgba(255,255,255,0.05);
    color: white;
}

.nav-item.active a {
    background: rgba(232,118,46,0.15);
    border-left-color: var(--accent);
    color: white;
}

.nav-icon {
    width: 22px;
    font-size: 1.1rem;
}

.nav-text {
    flex: 1;
}

/* Основной контент */
.main-content {
    flex: 1;
    margin-left: 280px;
    padding: 1.5rem;
}

/* Топ бар */
.top-bar {
    background: var(--bg-card);
    padding: 1rem 1.5rem;
    border-radius: var(--radius-lg);
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
}

.page-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
    color: var(--text-primary);
}

.page-title small {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: normal;
    margin-left: 0.5rem;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-name {
    color: var(--text-secondary);
}

.user-avatar {
    width: 40px;
    height: 40px;
    background: var(--accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 1rem;
}

/* Карточки */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.card-header {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border);
    background: var(--bg-card);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-header h2, .card-header h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.card-body {
    padding: 1.5rem;
}

.card-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border);
    background: var(--bg-hover);
}

/* Кнопки */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
    font-weight: 500;
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    line-height: 1.5;
}

.btn-sm {
    padding: 0.25rem 0.75rem;
    font-size: 0.7rem;
}

.btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
}

.btn-primary {
    background: var(--primary);
    color: white;
}
.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-accent {
    background: var(--accent);
    color: white;
}
.btn-accent:hover {
    background: var(--accent-dark);
    transform: translateY(-1px);
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-outline {
    background: transparent;
    border-color: var(--border);
    color: var(--text-secondary);
}
.btn-outline:hover {
    background: var(--bg-hover);
    border-color: var(--accent);
    color: var(--accent);
}

/* Таблицы */
.table-container {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table thead th {
    background: var(--bg-hover);
    padding: 0.75rem 1rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border);
}

.table tbody td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border);
    font-size: 0.8rem;
}

.table tbody tr:hover {
    background: var(--bg-hover);
}

/* Бейджи */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 10px;
    font-size: 0.65rem;
    font-weight: 600;
    border-radius: 20px;
    gap: 0.25rem;
}

.badge-success {
    background: #d4edda;
    color: #155724;
}

.badge-danger {
    background: #f8d7da;
    color: #721c24;
}

.badge-warning {
    background: #fff3cd;
    color: #856404;
}

.badge-info {
    background: #d1ecf1;
    color: #0c5460;
}

/* Формы */
.form-group {
    margin-bottom: 1rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.8rem;
}

.form-label.required::after {
    content: '*';
    color: var(--danger);
    margin-left: 0.25rem;
}

.form-control, .form-select, textarea, select {
    width: 100%;
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    transition: var(--transition);
    background: var(--bg-card);
    font-family: inherit;
}

.form-control:focus, .form-select:focus, textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(232,118,46,0.1);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

/* Статистика */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    border: 1px solid var(--border);
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.stat-icon {
    width: 48px;
    height: 48px;
    background: rgba(46,76,95,0.1);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    color: var(--text-primary);
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.75rem;
}

/* Алерты */
.alert {
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
    border-left: 4px solid;
    font-size: 0.8rem;
}

.alert-success {
    background: #d4edda;
    border-left-color: var(--success);
    color: #155724;
}

.alert-danger {
    background: #f8d7da;
    border-left-color: var(--danger);
    color: #721c24;
}

.alert-warning {
    background: #fff3cd;
    border-left-color: var(--warning);
    color: #856404;
}

.alert-info {
    background: #d1ecf1;
    border-left-color: var(--info);
    color: #0c5460;
}

/* Адаптивность */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.mobile-open {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
        padding: 1rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
}

/* Утилиты */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--text-muted); }

.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }

.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }

.p-3 { padding: 0.75rem; }
.p-4 { padding: 1rem; }

/* ========== ЕДИНЫЙ СТИЛЬ ИКОНОК ДЛЯ АДМИНКИ ========== */
/* Иконки в сайдбаре */
.sidebar .nav-icon {
    color: #9ca3af !important;
    background: transparent !important;
    filter: none !important;
}

.sidebar .nav-item:hover .nav-icon,
.sidebar .nav-item.active .nav-icon {
    color: var(--accent) !important;
}

/* Иконки в статистике */
.stat-icon {
    color: #9ca3af !important;
    background: transparent !important;
    box-shadow: none !important;
}

/* Иконки в карточках */
.card .card-header i,
.card-header .icon {
    color: #9ca3af !important;
}

/* Иконки в кнопках */
.btn i,
.btn .icon {
    color: inherit !important;
}

.btn-outline i {
    color: #9ca3af !important;
}

.btn-outline:hover i {
    color: var(--accent) !important;
}

/* Иконки действий в таблицах */
.actions i,
.action-buttons i {
    color: #9ca3af !important;
}

.actions a:hover i,
.action-buttons a:hover i {
    color: var(--accent) !important;
}

/* Убираем градиенты у иконок */
[class*="gradient"],
.icon-gradient {
    background: transparent !important;
}

/* ========== ИКОНКИ В САЙДБАРЕ (светлые на тёмном фоне) ========== */
.sidebar .nav-icon {
    color: rgba(255, 255, 255, 0.6) !important;
    background: transparent !important;
    filter: none !important;
}

.sidebar .nav-item:hover .nav-icon,
.sidebar .nav-item.active .nav-icon {
    color: var(--accent) !important;
}

/* Иконки в заголовке сайдбара */
.sidebar-header i,
.sidebar-header .nav-icon {
    color: rgba(255, 255, 255, 0.8) !important;
}

/* Иконки в группах навигации */
.nav-group-title i {
    color: rgba(255, 255, 255, 0.4) !important;
}

/* Иконки в статистике админки */
.stat-icon {
    color: var(--primary) !important;
    background: rgba(46, 76, 95, 0.1) !important;
    border-radius: var(--radius-md);
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.stat-icon i {
    font-size: 1.5rem;
    color: var(--primary) !important;
}

/* Иконки в карточках админки */
.card-header i {
    color: var(--accent) !important;
    margin-right: 0.5rem;
}

/* Иконки в таблицах (действия) */
.table .btn-outline i {
    color: var(--text-secondary) !important;
}

.table .btn-outline:hover i {
    color: var(--accent) !important;
}

/* Иконки в кнопках админки */
.btn i {
    color: inherit !important;
}

.btn-primary i,
.btn-accent i {
    color: white !important;
}

.btn-outline i {
    color: var(--text-secondary) !important;
}

.btn-outline:hover i {
    color: var(--accent) !important;
}

/* Топ-бар иконки */
.top-bar i {
    color: var(--text-secondary);
    margin-right: 0.5rem;
}
