/* ============================================================
   АИС «Запись в школу» — Дизайн-система
   Единый CSS для всех страниц портала
   ============================================================ */

/* === ПЕРЕМЕННЫЕ === */
:root {
    /* Фирменные цвета */
    --primary: #7c3aed;
    --primary-light: #a78bfa;
    --primary-lighter: #c4b5fd;
    --primary-dark: #6d28d9;
    --primary-darker: #5b21b6;
    --primary-bg: #f5f3ff;
    --primary-bg-hover: #ede9fe;

    /* Семантические */
    --success: #22c55e;
    --success-light: #4ade80;
    --success-bg: #f0fdf4;
    --success-border: #bbf7d0;
    --warning: #f59e0b;
    --warning-light: #fbbf24;
    --warning-bg: #fffbeb;
    --warning-border: #fde68a;
    --error: #ef4444;
    --error-light: #f87171;
    --error-bg: #fef2f2;
    --error-border: #fecaca;
    --info: #3b82f6;
    --info-bg: #eff6ff;
    --info-border: #bfdbfe;

    /* Нейтральные */
    --bg: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    --surface: #ffffff;
    --text: #1e293b;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --text-dim: #94a3b8;
    --text-inverse: #ffffff;
    --border: #e2e8f0;
    --border-light: #f1f5f9;
    --border-strong: #cbd5e1;

    /* Тени */
    --shadow-xs: 0 1px 2px rgba(0,0,0,0.04);
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -2px rgba(0,0,0,0.05);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -4px rgba(0,0,0,0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.06);
    --shadow-primary: 0 4px 14px rgba(124,58,237,0.25);
    --shadow-primary-lg: 0 8px 25px rgba(124,58,237,0.3);

    /* Скругления */
    --radius-xs: 6px;
    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-full: 9999px;

    /* Переходы */
    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s ease;

    /* Размеры */
    --header-h: 64px;
    --sidebar-w: 260px;
    --sidebar-w-collapsed: 72px;
    --container-max: 1200px;
    --content-max: 900px;
}

/* === СБРОС === */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-secondary);
    color: var(--text);
    line-height: 1.6;
    font-size: 15px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
img { max-width: 100%; display: block; }
a { color: var(--primary); text-decoration: none; transition: var(--transition-fast); }
a:hover { color: var(--primary-dark); }
button, input, select, textarea { font-family: inherit; font-size: inherit; }
ul, ol { list-style: none; }

/* === ТИПОГРАФИКА === */
h1, h2, h3, h4, h5, h6 { font-weight: 700; line-height: 1.3; color: var(--text); }
h1 { font-size: 32px; }
h2 { font-size: 26px; }
h3 { font-size: 20px; }
h4 { font-size: 17px; }
h5 { font-size: 15px; }
.text-muted { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.text-sm { font-size: 13px; }
.text-xs { font-size: 12px; }
.text-center { text-align: center; }
.text-success { color: var(--success); }
.text-error { color: var(--error); }
.text-warning { color: var(--warning); }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }

/* === LAYOUT === */
.container { max-width: var(--container-max); margin: 0 auto; padding: 0 24px; }
.content-wrap { max-width: var(--content-max); margin: 0 auto; padding: 0 24px; }

/* === ШАПКА (публичная) === */
.site-header {
    position: sticky; top: 0; z-index: 100;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    height: var(--header-h);
    display: flex; align-items: center;
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; width: 100%; }
.header-logo { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; color: var(--primary); }
.header-logo img { width: 36px; height: 36px; border-radius: 50%; }
.header-nav { display: flex; align-items: center; gap: 4px; }
.header-nav a {
    padding: 8px 16px; border-radius: var(--radius-sm);
    color: var(--text-secondary); font-weight: 500; font-size: 14px;
    transition: var(--transition-fast);
}
.header-nav a:hover { background: var(--primary-bg); color: var(--primary); }
.header-nav a.active { background: var(--primary-bg); color: var(--primary); font-weight: 600; }
.header-actions { display: flex; align-items: center; gap: 12px; }
.menu-toggle { display: none; background: none; border: none; cursor: pointer; padding: 8px; color: var(--text); }

@media (max-width: 900px) {
    .header-nav { display: none; position: absolute; top: var(--header-h); left: 0; right: 0;
        background: white; flex-direction: column; padding: 12px; border-bottom: 1px solid var(--border);
        box-shadow: var(--shadow-lg); gap: 2px; }
    .header-nav.open { display: flex; }
    .menu-toggle { display: block; }
}

/* === КНОПКИ === */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 12px 22px; border-radius: var(--radius-sm);
    font-weight: 600; font-size: 14px; cursor: pointer;
    border: none; transition: var(--transition); white-space: nowrap;
    text-decoration: none; line-height: 1;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white; box-shadow: var(--shadow-primary);
}
.btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-darker) 100%);
    transform: translateY(-1px); box-shadow: var(--shadow-primary-lg);
}
.btn-primary:active { transform: translateY(0); }
.btn-success { background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%); color: white; box-shadow: 0 4px 14px rgba(34,197,94,0.25); }
.btn-success:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 8px 25px rgba(34,197,94,0.3); }
.btn-danger { background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%); color: white; }
.btn-danger:hover:not(:disabled) { transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--text); border: 2px solid var(--border); }
.btn-ghost:hover { border-color: var(--primary-light); background: var(--primary-bg); color: var(--primary); }
.btn-soft { background: var(--primary-bg); color: var(--primary); }
.btn-soft:hover { background: var(--primary-bg-hover); }
.btn-sm { padding: 8px 16px; font-size: 13px; }
.btn-lg { padding: 16px 32px; font-size: 16px; }
.btn-icon { padding: 10px; width: 40px; height: 40px; }
.btn-block { width: 100%; }

/* === КАРТОЧКИ === */
.card {
    background: var(--surface); border-radius: var(--radius);
    border: 1px solid var(--border); box-shadow: var(--shadow-sm);
    transition: var(--transition);
}
.card-hover:hover { box-shadow: var(--shadow-lg); border-color: var(--primary-lighter); transform: translateY(-2px); }
.card-body { padding: 24px; }
.card-header { padding: 20px 24px; border-bottom: 1px solid var(--border-light); }
.card-header h3 { font-size: 17px; }
.card-footer { padding: 16px 24px; border-top: 1px solid var(--border-light); background: var(--bg-secondary); border-radius: 0 0 var(--radius) var(--radius); }

/* === ФОРМЫ === */
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-weight: 600; font-size: 13px; color: var(--text); margin-bottom: 6px; }
.form-group label .req { color: var(--error); }
.form-group .hint { font-size: 12px; color: var(--text-dim); margin-top: 4px; }
.form-group .error-msg { font-size: 12px; color: var(--error); margin-top: 4px; }
.form-control {
    width: 100%; padding: 12px 14px; border: 2px solid var(--border);
    border-radius: var(--radius-sm); font-size: 14px; background: #fafafa;
    transition: var(--transition-fast); color: var(--text);
}
.form-control:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px rgba(124,58,237,0.1); background: white; }
.form-control::placeholder { color: var(--text-dim); }
.form-control:disabled { background: var(--bg-tertiary); cursor: not-allowed; }
.form-control.is-error { border-color: var(--error); }
textarea.form-control { resize: vertical; min-height: 80px; }
select.form-control { cursor: pointer; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%2364748b' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px; }
.form-row { display: flex; gap: 16px; }
.form-row > * { flex: 1; }
@media (max-width: 600px) { .form-row { flex-direction: column; gap: 0; } }

/* checkbox/radio */
.form-check { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; }
.form-check input[type="checkbox"], .form-check input[type="radio"] { width: 20px; height: 20px; accent-color: var(--primary); margin-top: 1px; cursor: pointer; }
.form-check label { font-weight: 400; font-size: 14px; cursor: pointer; }

/* === АЛЕРТЫ === */
.alert { display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px; border-radius: var(--radius-sm); margin-bottom: 20px; font-size: 14px; }
.alert svg { flex-shrink: 0; margin-top: 1px; }
.alert-success { background: var(--success-bg); border: 1px solid var(--success-border); color: #15803d; }
.alert-error { background: var(--error-bg); border: 1px solid var(--error-border); color: #991b1b; }
.alert-warning { background: var(--warning-bg); border: 1px solid var(--warning-border); color: #b45309; }
.alert-info { background: var(--info-bg); border: 1px solid var(--info-border); color: #1e40af; }

/* === БЕЙДЖИ / СТАТУСЫ === */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 4px 12px; border-radius: var(--radius-full); font-size: 12px; font-weight: 600; }
.badge-success { background: var(--success-bg); color: #15803d; }
.badge-warning { background: var(--warning-bg); color: #b45309; }
.badge-error { background: var(--error-bg); color: #991b1b; }
.badge-info { background: var(--info-bg); color: #1e40af; }
.badge-primary { background: var(--primary-bg); color: var(--primary-dark); }
.badge-neutral { background: var(--bg-tertiary); color: var(--text-muted); }

/* === ТАБЛИЦЫ === */
.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--border); }
table.data-table { width: 100%; border-collapse: collapse; background: white; }
table.data-table thead { background: var(--bg-secondary); }
table.data-table th { padding: 14px 16px; text-align: left; font-size: 12px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; border-bottom: 1px solid var(--border); white-space: nowrap; }
table.data-table td { padding: 14px 16px; font-size: 14px; border-bottom: 1px solid var(--border-light); color: var(--text); }
table.data-table tbody tr { transition: var(--transition-fast); }
table.data-table tbody tr:hover { background: var(--primary-bg); }
table.data-table tbody tr:last-child td { border-bottom: none; }

/* === ПУСТЫЕ СОСТОЯНИЯ === */
.empty-state { text-align: center; padding: 60px 20px; }
.empty-state .empty-icon { width: 72px; height: 72px; margin: 0 auto 20px; background: var(--primary-bg); border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.empty-state .empty-icon svg { width: 36px; height: 36px; color: var(--primary-light); }
.empty-state h3 { font-size: 18px; margin-bottom: 8px; }
.empty-state p { color: var(--text-muted); font-size: 14px; max-width: 400px; margin: 0 auto 20px; }

/* === СКЕЛЕТОН === */
.skeleton { background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%); background-size: 200% 100%; animation: shimmer 1.5s infinite; border-radius: var(--radius-sm); }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* === СПИНЕР === */
.spinner { width: 20px; height: 20px; border: 2.5px solid var(--border); border-top-color: var(--primary); border-radius: 50%; animation: spin 0.7s linear infinite; }
.spinner-lg { width: 40px; height: 40px; border-width: 3.5px; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading-overlay { display: flex; align-items: center; justify-content: center; padding: 60px; }

/* === ХЛЕБНЫЕ КРОШКИ === */
.breadcrumbs { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-dim); margin-bottom: 20px; flex-wrap: wrap; }
.breadcrumbs a { color: var(--text-muted); }
.breadcrumbs a:hover { color: var(--primary); }
.breadcrumbs .separator { color: var(--text-dim); }
.breadcrumbs .current { color: var(--text); font-weight: 500; }

/* === ПАГИНАЦИЯ === */
.pagination { display: flex; align-items: center; justify-content: center; gap: 4px; margin-top: 24px; }
.pagination button, .pagination a {
    min-width: 36px; height: 36px; display: flex; align-items: center; justify-content: center;
    border: 1px solid var(--border); background: white; border-radius: var(--radius-sm);
    font-size: 14px; font-weight: 500; color: var(--text-secondary); cursor: pointer; transition: var(--transition-fast);
    padding: 0 10px; text-decoration: none;
}
.pagination button:hover, .pagination a:hover { border-color: var(--primary-light); color: var(--primary); background: var(--primary-bg); }
.pagination .active { background: var(--primary); color: white; border-color: var(--primary); }
.pagination .disabled { opacity: 0.4; cursor: not-allowed; }

/* === МОДАЛЬНЫЕ ОКНА === */
.modal-overlay { position: fixed; inset: 0; background: rgba(15,23,42,0.5); backdrop-filter: blur(4px); z-index: 200; display: flex; align-items: center; justify-content: center; padding: 20px; opacity: 0; pointer-events: none; transition: opacity 0.2s; }
.modal-overlay.open { opacity: 1; pointer-events: auto; }
.modal { background: white; border-radius: var(--radius-lg); max-width: 520px; width: 100%; max-height: 90vh; overflow-y: auto; box-shadow: var(--shadow-xl); transform: scale(0.95); transition: transform 0.2s; }
.modal-overlay.open .modal { transform: scale(1); }
.modal-header { padding: 20px 24px; border-bottom: 1px solid var(--border-light); display: flex; align-items: center; justify-content: space-between; }
.modal-header h3 { font-size: 18px; }
.modal-close { background: none; border: none; cursor: pointer; padding: 4px; color: var(--text-dim); }
.modal-close:hover { color: var(--text); }
.modal-body { padding: 24px; }
.modal-footer { padding: 16px 24px; border-top: 1px solid var(--border-light); display: flex; gap: 12px; justify-content: flex-end; }

/* === TOAST / УВЕДОМЛЕНИЯ === */
.toast-container { position: fixed; top: 20px; right: 20px; z-index: 300; display: flex; flex-direction: column; gap: 10px; }
.toast { background: white; border-radius: var(--radius); box-shadow: var(--shadow-xl); padding: 14px 18px; display: flex; align-items: flex-start; gap: 10px; min-width: 320px; max-width: 420px; border-left: 4px solid var(--primary); animation: slideIn 0.3s ease; }
.toast.success { border-left-color: var(--success); }
.toast.error { border-left-color: var(--error); }
.toast.warning { border-left-color: var(--warning); }
.toast .toast-icon { flex-shrink: 0; }
.toast .toast-body { flex: 1; }
.toast .toast-title { font-weight: 600; font-size: 14px; margin-bottom: 2px; }
.toast .toast-msg { font-size: 13px; color: var(--text-muted); }
@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* === ПРОГРЕСС-БАР (многошаговая форма) === */
.progress-steps { display: flex; align-items: center; gap: 0; margin-bottom: 32px; }
.progress-step { display: flex; align-items: center; gap: 10px; flex: 1; position: relative; }
.progress-step:not(:last-child)::after { content: ''; flex: 1; height: 2px; background: var(--border); margin: 0 12px; transition: var(--transition); }
.progress-step.completed:not(:last-child)::after { background: var(--primary); }
.progress-step .step-circle {
    width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-size: 14px; font-weight: 700; background: var(--bg-tertiary); color: var(--text-dim);
    border: 2px solid var(--border); transition: var(--transition); flex-shrink: 0;
}
.progress-step.active .step-circle { background: var(--primary); color: white; border-color: var(--primary); box-shadow: 0 0 0 4px rgba(124,58,237,0.15); }
.progress-step.completed .step-circle { background: var(--success); color: white; border-color: var(--success); }
.progress-step .step-label { font-size: 13px; font-weight: 500; color: var(--text-dim); white-space: nowrap; }
.progress-step.active .step-label { color: var(--primary); font-weight: 600; }
.progress-step.completed .step-label { color: var(--text); }
@media (max-width: 768px) {
    .progress-step .step-label { display: none; }
    .progress-step:not(:last-child)::after { margin: 0 6px; }
}

/* === СТАТИСТИЧЕСКИЕ КАРТОЧКИ === */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat-card { background: white; border-radius: var(--radius); padding: 20px; border: 1px solid var(--border); box-shadow: var(--shadow-sm); transition: var(--transition); }
.stat-card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.stat-card .stat-icon { width: 44px; height: 44px; border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; margin-bottom: 14px; }
.stat-card .stat-icon svg { width: 22px; height: 22px; }
.stat-card .stat-icon.purple { background: var(--primary-bg); color: var(--primary); }
.stat-card .stat-icon.green { background: var(--success-bg); color: var(--success); }
.stat-card .stat-icon.blue { background: var(--info-bg); color: var(--info); }
.stat-card .stat-icon.orange { background: var(--warning-bg); color: var(--warning); }
.stat-card .stat-icon.red { background: var(--error-bg); color: var(--error); }
.stat-card .stat-value { font-size: 28px; font-weight: 700; color: var(--text); line-height: 1.2; }
.stat-card .stat-label { font-size: 13px; color: var(--text-muted); margin-top: 4px; }
.stat-card .stat-trend { font-size: 12px; margin-top: 8px; display: inline-flex; align-items: center; gap: 4px; }
.stat-card .stat-trend.up { color: var(--success); }
.stat-card .stat-trend.down { color: var(--error); }

/* === АДМИН LAYOUT === */
.admin-layout { display: flex; min-height: 100vh; background: var(--bg-secondary); }
.admin-sidebar {
    width: var(--sidebar-w); background: white; border-right: 1px solid var(--border);
    display: flex; flex-direction: column; position: fixed; top: 0; bottom: 0; left: 0; z-index: 50;
    transition: transform 0.25s;
}
.admin-sidebar-header { padding: 16px 20px; border-bottom: 1px solid var(--border-light); display: flex; align-items: center; gap: 10px; }
.admin-sidebar-header .logo-img { width: 32px; height: 32px; border-radius: 50%; }
.admin-sidebar-header .logo-text { font-weight: 700; font-size: 16px; color: var(--primary); }
.admin-sidebar-header .logo-sub { font-size: 11px; color: var(--text-dim); }
.admin-nav { flex: 1; overflow-y: auto; padding: 12px; }
.admin-nav-section { margin-bottom: 20px; }
.admin-nav-section .nav-section-title { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-dim); padding: 0 12px; margin-bottom: 6px; }
.admin-nav a {
    display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--radius-sm);
    color: var(--text-secondary); font-size: 14px; font-weight: 500; transition: var(--transition-fast); margin-bottom: 2px;
}
.admin-nav a svg { width: 19px; height: 19px; flex-shrink: 0; }
.admin-nav a:hover { background: var(--primary-bg); color: var(--primary); }
.admin-nav a.active { background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%); color: white; box-shadow: var(--shadow-primary); }
.admin-sidebar-footer { padding: 14px 16px; border-top: 1px solid var(--border-light); }
.admin-user { display: flex; align-items: center; gap: 10px; }
.admin-user .avatar { width: 36px; height: 36px; border-radius: 50%; background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: white; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; }
.admin-user .info { flex: 1; min-width: 0; }
.admin-user .name { font-size: 13px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.admin-user .role { font-size: 11px; color: var(--text-dim); }

.admin-main { flex: 1; margin-left: var(--sidebar-w); display: flex; flex-direction: column; min-width: 0; }
.admin-topbar { height: var(--header-h); background: white; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; padding: 0 24px; position: sticky; top: 0; z-index: 40; }
.admin-topbar .topbar-left { display: flex; align-items: center; gap: 16px; }
.admin-topbar .search-box { position: relative; }
.admin-topbar .search-box input { width: 280px; padding: 9px 14px 9px 38px; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 13px; background: var(--bg-secondary); transition: var(--transition-fast); }
.admin-topbar .search-box input:focus { outline: none; border-color: var(--primary-light); background: white; box-shadow: 0 0 0 3px rgba(124,58,237,0.08); }
.admin-topbar .search-box svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text-dim); }
.admin-topbar .topbar-right { display: flex; align-items: center; gap: 8px; }
.admin-topbar .icon-btn { width: 40px; height: 40px; border-radius: var(--radius-sm); border: none; background: transparent; cursor: pointer; display: flex; align-items: center; justify-content: center; color: var(--text-muted); position: relative; transition: var(--transition-fast); }
.admin-topbar .icon-btn:hover { background: var(--bg-tertiary); color: var(--text); }
.admin-topbar .icon-btn .dot { position: absolute; top: 8px; right: 8px; width: 8px; height: 8px; background: var(--error); border-radius: 50%; border: 2px solid white; }
.admin-content { padding: 24px; flex: 1; }
.admin-page-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 24px; gap: 16px; flex-wrap: wrap; }
.admin-page-header h1 { font-size: 24px; }
.admin-page-header .actions { display: flex; gap: 10px; flex-shrink: 0; }

.sidebar-toggle { display: none; }

@media (max-width: 1024px) {
    .admin-sidebar { transform: translateX(-100%); z-index: 60; }
    .admin-sidebar.open { transform: translateX(0); }
    .admin-main { margin-left: 0; }
    .sidebar-toggle { display: flex; }
    .admin-topbar .search-box input { width: 180px; }
}
@media (max-width: 600px) {
    .admin-topbar .search-box { display: none; }
    .admin-content { padding: 16px; }
}

/* === ФИЛЬТРЫ === */
.filters-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.filters-bar select, .filters-bar input { padding: 9px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 13px; background: white; transition: var(--transition-fast); }
.filters-bar select:focus, .filters-bar input:focus { outline: none; border-color: var(--primary-light); box-shadow: 0 0 0 3px rgba(124,58,237,0.08); }
.filter-chip { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; background: var(--primary-bg); color: var(--primary); border-radius: var(--radius-full); font-size: 13px; font-weight: 500; cursor: pointer; transition: var(--transition-fast); border: 1px solid transparent; }
.filter-chip:hover { background: var(--primary-bg-hover); }
.filter-chip.active { background: var(--primary); color: white; }
.filter-chip .close { margin-left: 2px; opacity: 0.7; }

/* === TABS === */
.tabs { display: flex; gap: 4px; border-bottom: 2px solid var(--border); margin-bottom: 24px; overflow-x: auto; }
.tabs button { padding: 12px 20px; background: none; border: none; cursor: pointer; font-size: 14px; font-weight: 500; color: var(--text-muted); border-bottom: 2px solid transparent; margin-bottom: -2px; transition: var(--transition-fast); white-space: nowrap; }
.tabs button:hover { color: var(--primary); }
.tabs button.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }

/* === AVATAR === */
.avatar-circle { width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; color: white; flex-shrink: 0; }
.avatar-sm { width: 32px; height: 32px; font-size: 12px; }
.avatar-lg { width: 56px; height: 56px; font-size: 20px; }
.avatar-purple { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); }
.avatar-green { background: linear-gradient(135deg, #22c55e, #16a34a); }
.avatar-blue { background: linear-gradient(135deg, #3b82f6, #2563eb); }
.avatar-orange { background: linear-gradient(135deg, #f59e0b, #d97706); }

/* === ДРОПДАЙН ЗАГРУЗКИ === */
.upload-zone { border: 2px dashed var(--border-strong); border-radius: var(--radius); padding: 32px; text-align: center; transition: var(--transition); cursor: pointer; background: var(--bg-secondary); }
.upload-zone:hover, .upload-zone.dragover { border-color: var(--primary); background: var(--primary-bg); }
.upload-zone .upload-icon { width: 48px; height: 48px; margin: 0 auto 12px; color: var(--primary-light); }
.upload-zone p { color: var(--text-muted); font-size: 14px; }
.upload-zone strong { color: var(--primary); }

/* === FOOTER === */
.site-footer { background: white; border-top: 1px solid var(--border); padding: 40px 0 24px; margin-top: 60px; }
.site-footer .footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; max-width: var(--container-max); margin: 0 auto; padding: 0 24px; }
.site-footer .footer-brand { font-weight: 700; font-size: 18px; color: var(--primary); margin-bottom: 8px; }
.site-footer .footer-desc { font-size: 13px; color: var(--text-muted); max-width: 300px; }
.site-footer h5 { font-size: 14px; margin-bottom: 12px; color: var(--text); }
.site-footer .footer-links a { display: block; font-size: 13px; color: var(--text-muted); margin-bottom: 8px; }
.site-footer .footer-links a:hover { color: var(--primary); }
.site-footer .footer-bottom { max-width: var(--container-max); margin: 24px auto 0; padding: 20px 24px 0; border-top: 1px solid var(--border-light); display: flex; justify-content: space-between; font-size: 13px; color: var(--text-dim); }
@media (max-width: 768px) { .site-footer .footer-grid { grid-template-columns: 1fr 1fr; } .site-footer .footer-bottom { flex-direction: column; gap: 8px; } }

/* === HERO === */
.hero { background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 50%, #5b21b6 100%); color: white; padding: 60px 0; position: relative; overflow: hidden; }
.hero::before { content: ''; position: absolute; top: -50%; right: -10%; width: 500px; height: 500px; background: rgba(255,255,255,0.05); border-radius: 50%; }
.hero::after { content: ''; position: absolute; bottom: -30%; left: -5%; width: 300px; height: 300px; background: rgba(255,255,255,0.03); border-radius: 50%; }
.hero .container { position: relative; z-index: 1; }
.hero h1 { color: white; font-size: 38px; margin-bottom: 12px; }
.hero p { font-size: 18px; opacity: 0.9; max-width: 600px; margin-bottom: 28px; }
.hero .hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero .btn-primary { background: white; color: var(--primary); }
.hero .btn-primary:hover { background: var(--bg-secondary); }
.hero .btn-ghost { border-color: rgba(255,255,255,0.4); color: white; }
.hero .btn-ghost:hover { background: rgba(255,255,255,0.1); border-color: white; }
.hero-stats { display: flex; gap: 40px; margin-top: 40px; }
.hero-stat .num { font-size: 32px; font-weight: 800; }
.hero-stat .label { font-size: 14px; opacity: 0.8; }
@media (max-width: 600px) { .hero h1 { font-size: 28px; } .hero p { font-size: 16px; } .hero-stats { gap: 24px; } .hero-stat .num { font-size: 24px; } }

/* === SECTION === */
.section { padding: 48px 0; }
.section-header { text-align: center; margin-bottom: 36px; }
.section-header h2 { font-size: 28px; margin-bottom: 8px; }
.section-header p { color: var(--text-muted); font-size: 16px; }

/* === SCHOOL CARDS GRID === */
.schools-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 20px; }
.school-card-item { background: white; border-radius: var(--radius-lg); border: 1px solid var(--border); overflow: hidden; transition: var(--transition); cursor: pointer; }
.school-card-item:hover { box-shadow: var(--shadow-lg); border-color: var(--primary-lighter); transform: translateY(-3px); }
.school-card-item .school-banner { height: 8px; background: linear-gradient(135deg, var(--primary), var(--primary-dark)); }
.school-card-item .school-body { padding: 24px; }
.school-card-item .school-name { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.school-card-item .school-meta { display: flex; flex-wrap: wrap; gap: 8px; font-size: 13px; color: var(--text-muted); margin-bottom: 16px; }
.school-card-item .school-meta span { display: inline-flex; align-items: center; gap: 4px; }
.school-card-item .school-footer { display: flex; align-items: center; justify-content: space-between; padding-top: 16px; border-top: 1px solid var(--border-light); }

/* === CITY CARDS (выбор города) === */
.city-card { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border: 2px solid var(--border); border-radius: var(--radius); cursor: pointer; transition: var(--transition-fast); font-weight: 600; font-size: 14px; color: var(--text-muted); }
.city-card:hover { border-color: var(--primary-lighter); background: var(--primary-bg); color: var(--primary); }
.city-card.selected { border-color: var(--primary); background: var(--primary-bg); color: var(--primary-dark); }
.city-card svg { flex-shrink: 0; }

/* === FAQ === */
.faq-item { background: white; border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 12px; overflow: hidden; transition: var(--transition); }
.faq-item.open { border-color: var(--primary-light); box-shadow: var(--shadow-sm); }
.faq-question { padding: 18px 24px; display: flex; align-items: center; justify-content: space-between; cursor: pointer; font-weight: 600; font-size: 15px; }
.faq-question:hover { color: var(--primary); }
.faq-answer { max-height: 0; overflow: hidden; transition: max-height 0.3s ease; color: var(--text-muted); font-size: 14px; }
.faq-item.open .faq-answer { max-height: 300px; padding: 0 24px 18px; }
.faq-chevron { transition: transform 0.2s; }
.faq-item.open .faq-chevron { transform: rotate(180deg); }

/* === UTILITY === */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.mb-2 { margin-bottom: 8px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.w-full { width: 100%; }
.hidden { display: none; }
.relative { position: relative; }
