/* =============================================
   GESTIONPLUS - Feuille de styles principale
   ============================================= */

:root {
    --primary: #2563eb;
    --primary-d: #1d4ed8;
    --primary-l: #eff6ff;
    --sidebar-bg: #1e40af;
    --sidebar-hover: rgba(255,255,255,.10);
    --sidebar-active: #166534;
    --sidebar-text: #bfdbfe;
    --sidebar-text-active: #ffffff;
    --header-bg: #ffffff;
    --bg: #f1f5f9;
    --card-bg: #ffffff;
    --text: #0f172a;
    --text-2: #64748b;
    --border: #e2e8f0;
    --success: #059669;
    --success-l: #ecfdf5;
    --warning: #d97706;
    --warning-l: #fffbeb;
    --danger: #dc2626;
    --danger-l: #fef2f2;
    --info: #0284c7;
    --info-l: #f0f9ff;
    --shadow: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
    --shadow-md: 0 4px 6px rgba(0,0,0,.07), 0 2px 4px rgba(0,0,0,.06);
    --shadow-lg: 0 10px 15px rgba(0,0,0,.1), 0 4px 6px rgba(0,0,0,.05);
    --radius: 10px;
    --radius-sm: 6px;
    --sidebar-w: 260px;
    --header-h: 64px;
    --transition: .2s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 14px; }
body { font-family: 'Inter', sans-serif; background: var(--bg); color: var(--text); line-height: 1.5; overflow-x: hidden; }
a { text-decoration: none; color: inherit; cursor: pointer; }
ul { list-style: none; }
input, select, button, textarea { font-family: inherit; font-size: inherit; }
.hidden { display: none !important; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }

/* ---- Scrollbar ---- */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 10px; }

/* ===================== LOGIN ===================== */
.login-screen {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1e3a6e 0%, #0f172a 100%);
    position: relative;
    overflow: hidden;
}
.login-bg .shape {
    position: absolute; border-radius: 50%;
    background: rgba(255,255,255,.04);
}
.shape.s1 { width: 400px; height: 400px; top: -100px; right: -100px; }
.shape.s2 { width: 300px; height: 300px; bottom: -80px; left: -80px; }
.shape.s3 { width: 200px; height: 200px; top: 50%; left: 30%; }
.login-card {
    background: white;
    border-radius: 20px;
    padding: 48px 40px;
    width: 420px;
    max-width: 95vw;
    box-shadow: 0 25px 50px rgba(0,0,0,.25);
    position: relative;
    z-index: 1;
}
.login-logo { text-align: center; margin-bottom: 36px; }
.login-logo-icon {
    width: 72px; height: 72px; background: linear-gradient(135deg, var(--primary), var(--primary-d));
    border-radius: 18px; display: flex; align-items: center; justify-content: center;
    font-size: 28px; color: white; margin: 0 auto 16px;
    box-shadow: 0 8px 20px rgba(37,99,235,.35);
}
.login-logo h1 { font-size: 26px; font-weight: 800; color: var(--text); letter-spacing: -0.5px; }
.login-logo h1 span { color: var(--primary); }
.login-logo p { color: var(--text-2); font-size: 13px; margin-top: 4px; }
.login-form .form-group { margin-bottom: 18px; }
.login-form label { display: block; font-weight: 500; font-size: 13px; color: var(--text); margin-bottom: 6px; }
.input-wrap { position: relative; display: flex; align-items: center; }
.input-wrap > i { position: absolute; left: 14px; color: var(--text-2); font-size: 14px; }
.input-wrap input {
    width: 100%; padding: 11px 14px 11px 40px;
    border: 1.5px solid var(--border); border-radius: var(--radius-sm);
    background: #f8fafc; color: var(--text); font-size: 14px;
    transition: var(--transition);
}
.input-wrap input:focus { outline: none; border-color: var(--primary); background: white; box-shadow: 0 0 0 3px rgba(37,99,235,.1); }
.eye-btn { position: absolute; right: 12px; background: none; border: none; color: var(--text-2); cursor: pointer; padding: 4px; }
.login-err { color: var(--danger); font-size: 13px; padding: 10px 14px; background: var(--danger-l); border-radius: var(--radius-sm); margin-bottom: 14px; }
.btn-login {
    width: 100%; padding: 12px; background: linear-gradient(135deg, var(--primary), var(--primary-d));
    color: white; border: none; border-radius: var(--radius-sm); font-size: 15px;
    font-weight: 600; cursor: pointer; transition: var(--transition);
    box-shadow: 0 4px 12px rgba(37,99,235,.3);
}
.btn-login:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(37,99,235,.4); }
.login-hint { text-align: center; color: var(--text-2); font-size: 12px; margin-top: 20px; }

/* ===================== APP LAYOUT ===================== */
.app-container { display: flex; min-height: 100vh; }

/* ---- SIDEBAR ---- */
.sidebar {
    width: var(--sidebar-w);
    background: var(--sidebar-bg);
    display: flex; flex-direction: column;
    position: fixed; left: 0; top: 0; bottom: 0;
    z-index: 100; transition: var(--transition);
    overflow-y: auto; overflow-x: hidden;
}
.sidebar-head { padding: 18px 16px; border-bottom: 1px solid rgba(255,255,255,.12); background: rgba(0,0,0,.18); }
.sidebar-logo { display: flex; align-items: center; gap: 10px; }
.s-logo-icon {
    width: 40px; height: 40px; background: rgba(255,255,255,.2);
    border-radius: 10px; display: flex; align-items: center; justify-content: center;
    color: white; font-size: 16px; flex-shrink: 0; border: 1px solid rgba(255,255,255,.25);
}
.s-logo-txt h2 { color: white; font-size: 16px; font-weight: 800; letter-spacing: -0.3px; }
.s-logo-txt h2 span { color: #86efac; }
.s-logo-txt small { color: var(--sidebar-text); font-size: 10px; }
.sidebar-nav { flex: 1; padding: 10px 8px; }
.nav-label {
    color: #93c5fd; font-size: 10px; font-weight: 700; letter-spacing: 1.2px;
    text-transform: uppercase; padding: 14px 8px 5px;
    border-top: 1px solid rgba(255,255,255,.07); margin-top: 4px;
}
.nav-label:first-child { border-top: none; margin-top: 0; }
.nav-item {
    display: flex; align-items: center; gap: 10px;
    padding: 9px 12px; border-radius: var(--radius-sm);
    color: var(--sidebar-text); font-size: 13px; font-weight: 500;
    transition: var(--transition); cursor: pointer; margin-bottom: 2px;
}
.nav-item:hover { background: var(--sidebar-hover); color: white; }
.nav-item.active {
    background: var(--sidebar-active); color: white;
    box-shadow: 0 2px 10px rgba(22,101,52,.5);
}
.nav-item i { width: 18px; text-align: center; font-size: 14px; flex-shrink: 0; }
.nav-item span:first-of-type { flex: 1; }
.nb { background: rgba(255,255,255,.18); color: white; padding: 1px 7px; border-radius: 20px; font-size: 11px; font-weight: 700; }
.nav-item.active .nb { background: rgba(255,255,255,.3); }
.sidebar-foot { padding: 14px 16px; border-top: 1px solid rgba(255,255,255,.1); display: flex; align-items: center; gap: 10px; background: rgba(0,0,0,.15); }
.sb-avatar { width: 36px; height: 36px; background: #16a34a; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: white; font-weight: 700; font-size: 14px; flex-shrink: 0; }
.sb-info { flex: 1; overflow: hidden; }
.sb-info span { display: block; color: white; font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-info small { color: var(--sidebar-text); font-size: 11px; }
.logout-btn { background: none; border: none; color: var(--sidebar-text); cursor: pointer; padding: 6px; border-radius: var(--radius-sm); transition: var(--transition); font-size: 16px; }
.logout-btn:hover { color: #fca5a5; background: rgba(220,38,38,.15); }

/* ---- NAV GROUPS (collapsible) ---- */
.nav-group-head {
    display: flex; align-items: center; gap: 10px;
    padding: 9px 12px; border-radius: var(--radius-sm);
    color: var(--sidebar-text); font-size: 13px; font-weight: 600;
    cursor: pointer; transition: var(--transition); user-select: none;
    margin-bottom: 2px;
}
.nav-group-head:hover { background: var(--sidebar-hover); color: white; }
.nav-group-head.open { color: white; background: rgba(255,255,255,.08); }
.nav-group-head i:not(.ng-chevron) { width: 18px; text-align: center; font-size: 14px; flex-shrink: 0; }
.nav-group-head span:first-of-type { flex: 1; }
.ng-chevron { font-size: 10px; color: rgba(255,255,255,.4); transition: transform .2s ease, color .2s; margin-left: auto; }
.nav-group-head.open .ng-chevron { transform: rotate(90deg); color: rgba(255,255,255,.75); }
.nav-group-body { display: none; overflow: hidden; }
.nav-group-body.open { display: block; }
.nav-group-body .nav-item { font-size: 12.5px; padding: 7px 12px 7px 26px; }
.nav-sub-label {
    font-size: 9px; font-weight: 800; color: #94a3b8; text-transform: uppercase;
    letter-spacing: 0.08em; padding: 10px 16px 3px; margin-top: 4px;
    border-top: 1px solid rgba(255,255,255,.06);
}
.nav-sub-label:first-child { border-top: none; margin-top: 0; }

/* ---- MAIN AREA ---- */
.main-area { margin-left: var(--sidebar-w); flex: 1; display: flex; flex-direction: column; min-height: 100vh; }

/* ---- HEADER ---- */
.top-header {
    height: var(--header-h); background: var(--header-bg);
    border-bottom: 1px solid var(--border);
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 24px; position: sticky; top: 0; z-index: 50;
    box-shadow: var(--shadow);
}
.hd-left { display: flex; align-items: center; gap: 16px; }
.menu-btn { background: none; border: none; color: var(--text-2); cursor: pointer; font-size: 18px; padding: 6px; border-radius: var(--radius-sm); }
.menu-btn:hover { background: var(--bg); }
.page-title h1 { font-size: 18px; font-weight: 700; color: var(--text); }
.breadcrumb { font-size: 12px; color: var(--text-2); display: flex; align-items: center; gap: 5px; margin-top: 1px; }
.breadcrumb i { font-size: 10px; }
.hd-right { display: flex; align-items: center; gap: 12px; }
.yr-badge { display: flex; align-items: center; gap: 6px; padding: 6px 12px; background: var(--primary-l); color: var(--primary); border-radius: 20px; font-size: 12px; font-weight: 600; }
.hd-notif { position: relative; cursor: pointer; padding: 8px; border-radius: var(--radius-sm); color: var(--text-2); font-size: 18px; transition: var(--transition); }
.hd-notif:hover { background: var(--bg); }
.notif-dot { position: absolute; top: 6px; right: 6px; width: 8px; height: 8px; background: var(--danger); border-radius: 50%; border: 2px solid white; }
.hd-user { display: flex; align-items: center; gap: 8px; cursor: pointer; padding: 6px 10px; border-radius: var(--radius-sm); position: relative; transition: var(--transition); }
.hd-user:hover { background: var(--bg); }
.hd-avatar { width: 32px; height: 32px; background: var(--primary); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: white; font-weight: 700; font-size: 12px; }
.hd-user span { font-size: 13px; font-weight: 600; }
.hd-user > i { font-size: 11px; color: var(--text-2); }
.user-dropdown {
    position: absolute; top: calc(100% + 8px); right: 0; min-width: 160px;
    background: white; border: 1px solid var(--border); border-radius: var(--radius);
    box-shadow: var(--shadow-lg); overflow: hidden;
}
.user-dropdown a { display: flex; align-items: center; gap: 10px; padding: 11px 16px; color: var(--text); font-size: 13px; transition: var(--transition); }
.user-dropdown a:hover { background: var(--bg); }

/* ---- NOTIFICATIONS ---- */
.notif-panel {
    position: fixed; top: var(--header-h); right: 16px; width: 340px;
    background: white; border: 1px solid var(--border); border-radius: var(--radius);
    box-shadow: var(--shadow-lg); z-index: 200;
}
.np-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.np-head h3 { font-size: 14px; font-weight: 700; }
.np-head button { background: none; border: none; color: var(--primary); cursor: pointer; font-size: 12px; }
.np-list { max-height: 300px; overflow-y: auto; }
.notif-item { display: flex; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--border); align-items: flex-start; }
.notif-item:last-child { border-bottom: none; }
.notif-icon { width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 13px; flex-shrink: 0; }
.notif-text p { font-size: 13px; color: var(--text); }
.notif-text small { color: var(--text-2); font-size: 11px; }

/* ---- CONTENT AREA ---- */
.content-area { flex: 1; padding: 24px; overflow-y: auto; }
.page { display: none; }
.page.active { display: block; animation: fadeIn .2s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* ===================== STATS CARDS ===================== */
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px; }
.stat-card {
    background: var(--card-bg); border-radius: var(--radius);
    padding: 14px 16px; display: flex; align-items: center; gap: 12px;
    box-shadow: var(--shadow); position: relative; overflow: hidden;
    border-left: 4px solid;
}
.stat-card.c-blue { border-color: var(--primary); }
.stat-card.c-green { border-color: var(--success); }
.stat-card.c-orange { border-color: var(--warning); }
.stat-card.c-purple { border-color: #7c3aed; }
.sc-icon { width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 17px; flex-shrink: 0; }
.c-blue .sc-icon { background: var(--primary-l); color: var(--primary); }
.c-green .sc-icon { background: var(--success-l); color: var(--success); }
.c-orange .sc-icon { background: var(--warning-l); color: var(--warning); }
.c-purple .sc-icon { background: #f5f3ff; color: #7c3aed; }
.sc-body { flex: 1; }
.sc-val { font-size: 22px; font-weight: 800; color: var(--text); line-height: 1; }
.sc-lbl { font-size: 12px; color: var(--text-2); margin-top: 4px; font-weight: 500; }
.sc-wave { position: absolute; right: -10px; bottom: -10px; width: 70px; height: 70px; border-radius: 50%; opacity: .08; }
.c-blue .sc-wave { background: var(--primary); }
.c-green .sc-wave { background: var(--success); }
.c-orange .sc-wave { background: var(--warning); }
.c-purple .sc-wave { background: #7c3aed; }

/* ===================== DASHBOARD GRID ===================== */
.dash-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; margin-bottom: 24px; }
.chart-card, .dash-card {
    background: var(--card-bg); border-radius: var(--radius);
    padding: 20px; box-shadow: var(--shadow);
}
.chart-card.span-2 { grid-column: span 2; }
.card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.card-head h3 { font-size: 14px; font-weight: 700; color: var(--text); display: flex; align-items: center; gap: 8px; }
.card-head h3 i { color: var(--primary); }
.card-head a { color: var(--primary); font-size: 12px; font-weight: 600; }
.card-head select { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 4px 8px; font-size: 12px; color: var(--text-2); }
.act-list .act-item { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.act-item:last-child { border-bottom: none; }
.act-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.act-dot.blue { background: var(--primary); }
.act-dot.green { background: var(--success); }
.act-dot.orange { background: var(--warning); }
.act-text { flex: 1; font-size: 12px; color: var(--text); }
.act-time { font-size: 11px; color: var(--text-2); }
.fee-stat-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.fee-stat-item { display: flex; align-items: center; justify-content: space-between; font-size: 13px; }
.fee-stat-bar { flex: 1; height: 6px; background: var(--border); border-radius: 3px; margin: 0 10px; }
.fee-stat-fill { height: 100%; border-radius: 3px; }
.fee-chart-canvas { max-height: 140px; }

/* ---- QUICK ACTIONS ---- */
.qa-section { background: var(--card-bg); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.section-title { font-size: 14px; font-weight: 700; margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }
.section-title i { color: var(--primary); }
.qa-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; }
.qa-btn {
    display: flex; flex-direction: column; align-items: center; gap: 8px;
    padding: 16px 8px; background: var(--bg); border: 2px solid var(--border);
    border-radius: var(--radius); cursor: pointer; transition: var(--transition);
    color: var(--text);
}
.qa-btn:hover { border-color: var(--primary); background: var(--primary-l); color: var(--primary); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.qa-btn i { font-size: 22px; }
.qa-btn span { font-size: 11px; font-weight: 600; text-align: center; }

/* ===================== TOOLBAR ===================== */
.toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.tb-search { display: flex; align-items: center; gap: 8px; background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 8px 12px; flex: 1; min-width: 200px; }
.tb-search i { color: var(--text-2); }
.tb-search input { border: none; outline: none; flex: 1; background: transparent; color: var(--text); font-size: 13px; }
.tb-filters { display: flex; gap: 8px; }
.tb-filters select { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 8px 12px; font-size: 13px; color: var(--text); background: var(--card-bg); outline: none; cursor: pointer; }
.tb-actions { display: flex; gap: 8px; margin-left: auto; }

/* ===================== BUTTONS ===================== */
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; border-radius: var(--radius-sm); font-size: 13px; font-weight: 600; cursor: pointer; border: none; transition: var(--transition); }
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-d); box-shadow: 0 4px 10px rgba(37,99,235,.3); }
.btn-success { background: var(--success); color: white; }
.btn-success:hover { background: #047857; }
.btn-danger { background: var(--danger); color: white; }
.btn-danger:hover { background: #b91c1c; }
.btn-warning { background: var(--warning); color: white; }
.btn-warning:hover { background: #b45309; }
.btn-outline { background: transparent; color: var(--text); border: 1.5px solid var(--border); }
.btn-outline:hover { background: var(--bg); border-color: #94a3b8; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* ===================== TABLE ===================== */
.table-card { background: var(--card-bg); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.table-info { padding: 12px 16px; color: var(--text-2); font-size: 13px; border-bottom: 1px solid var(--border); }
.tbl-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th { padding: 12px 16px; text-align: left; font-size: 12px; font-weight: 600; color: var(--text-2); background: #f8fafc; border-bottom: 1px solid var(--border); white-space: nowrap; text-transform: uppercase; letter-spacing: .5px; }
.data-table td { padding: 13px 16px; border-bottom: 1px solid var(--border); font-size: 13px; color: var(--text); }
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover { background: #f8fafc; }
.avatar-cell { display: flex; align-items: center; gap: 10px; }
.row-avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--primary-l); color: var(--primary); display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; flex-shrink: 0; }
.row-name { font-weight: 600; }
.row-sub { font-size: 11px; color: var(--text-2); }

/* ===================== BADGES ===================== */
.badge { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 600; }
.badge-actif, .badge-present { background: var(--success-l); color: var(--success); }
.badge-inactif, .badge-absent { background: var(--danger-l); color: var(--danger); }
.badge-transfere, .badge-excuse { background: var(--warning-l); color: var(--warning); }
.badge-exclu, .badge-retard { background: #fdf4ff; color: #9333ea; }
.badge-paye { background: var(--success-l); color: var(--success); }
.badge-partiel { background: var(--warning-l); color: var(--warning); }
.badge-impaye { background: var(--danger-l); color: var(--danger); }

/* ---- Action Buttons ---- */
.action-btns { display: flex; gap: 4px; }
.action-btn-sm { width: 30px; height: 30px; display: flex; align-items: center; justify-content: center; border: none; border-radius: var(--radius-sm); cursor: pointer; font-size: 13px; transition: var(--transition); }
.btn-view { background: var(--info-l); color: var(--info); }
.btn-edit { background: var(--warning-l); color: var(--warning); }
.btn-del { background: var(--danger-l); color: var(--danger); }
.btn-pay { background: var(--success-l); color: var(--success); }
.action-btn-sm:hover { filter: brightness(.9); transform: scale(1.1); }

/* ===================== CLASSES GRID ===================== */
.classes-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.cls-card {
    background: var(--card-bg); border-radius: var(--radius); padding: 20px;
    box-shadow: var(--shadow); border-top: 4px solid var(--primary);
    transition: var(--transition);
}
.cls-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.cls-card-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 12px; }
.cls-name { font-size: 18px; font-weight: 800; color: var(--text); }
.cls-level { font-size: 11px; color: var(--text-2); background: var(--bg); padding: 3px 8px; border-radius: 20px; font-weight: 600; }
.cls-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.cls-stat-item { background: var(--bg); border-radius: var(--radius-sm); padding: 10px; text-align: center; }
.cls-stat-val { font-size: 20px; font-weight: 800; color: var(--primary); }
.cls-stat-lbl { font-size: 10px; color: var(--text-2); font-weight: 500; }
.cls-info { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.cls-info-item { display: flex; align-items: center; gap: 4px; font-size: 12px; color: var(--text-2); }
.cls-info-item i { color: var(--primary); font-size: 11px; }
.cls-actions { display: flex; gap: 8px; }

/* ===================== GRADES ===================== */
.grade-input { width: 70px; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 6px 8px; text-align: center; font-size: 13px; transition: var(--transition); }
.grade-input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,.1); }
.grade-input.modified { background: var(--primary-l); }
.comment-input { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 6px 8px; font-size: 12px; width: 160px; }
.comment-input:focus { outline: none; border-color: var(--primary); }

/* ===================== ATTENDANCE ===================== */
.att-summary { display: flex; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.att-sum-item { display: flex; align-items: center; gap: 8px; background: var(--card-bg); padding: 10px 16px; border-radius: var(--radius-sm); box-shadow: var(--shadow); font-size: 13px; }
.att-sum-num { font-weight: 700; font-size: 16px; }
.att-sum-item.present .att-sum-num { color: var(--success); }
.att-sum-item.absent .att-sum-num { color: var(--danger); }
.att-sum-item.retard .att-sum-num { color: var(--warning); }
.att-sum-item.excuse .att-sum-num { color: #9333ea; }
.att-radio { display: flex; gap: 4px; }
.att-radio input[type="radio"] { display: none; }
.att-radio label {
    display: inline-flex; align-items: center; justify-content: center;
    width: 28px; height: 28px; border-radius: 50%; cursor: pointer;
    font-size: 12px; border: 2px solid var(--border); transition: var(--transition);
}
.att-radio input[value="present"] + label:hover,
.att-radio input[value="present"]:checked + label { background: var(--success); border-color: var(--success); color: white; }
.att-radio input[value="absent"] + label:hover,
.att-radio input[value="absent"]:checked + label { background: var(--danger); border-color: var(--danger); color: white; }
.att-radio input[value="retard"] + label:hover,
.att-radio input[value="retard"]:checked + label { background: var(--warning); border-color: var(--warning); color: white; }
.att-radio input[value="excuse"] + label:hover,
.att-radio input[value="excuse"]:checked + label { background: #9333ea; border-color: #9333ea; color: white; }
.att-lbl { padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 600; }
.att-lbl.present { background: var(--success-l); color: var(--success); }
.att-lbl.absent { background: var(--danger-l); color: var(--danger); }
.att-lbl.retard { background: var(--warning-l); color: var(--warning); }
.att-lbl.excuse { background: #fdf4ff; color: #9333ea; }
.motif-input { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 5px 8px; font-size: 12px; width: 140px; }

/* ===================== BULLETINS ===================== */
.bul-container { display: flex; flex-direction: column; gap: 16px; }
.bul-student-item { background: var(--card-bg); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.bul-student-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 20px; background: linear-gradient(135deg, var(--primary), var(--primary-d)); color: white; cursor: pointer;
}
.bul-student-head h4 { font-size: 15px; font-weight: 700; }
.bul-student-head span { font-size: 12px; opacity: .8; }
.bul-body { display: none; padding: 16px 20px; }
.bul-body.open { display: block; }
.bul-table { width: 100%; border-collapse: collapse; margin-bottom: 16px; }
.bul-table th, .bul-table td { padding: 9px 12px; border: 1px solid var(--border); font-size: 13px; }
.bul-table th { background: #f8fafc; font-weight: 600; color: var(--text-2); }
.bul-footer { display: flex; align-items: center; justify-content: space-between; border-top: 1px solid var(--border); padding-top: 12px; }
.bul-moy { font-size: 20px; font-weight: 800; }
.bul-moy.moy-good { color: var(--success); }
.bul-moy.moy-avg { color: var(--warning); }
.bul-moy.moy-bad { color: var(--danger); }
.bul-rank { color: var(--text-2); font-size: 13px; }
.bul-print-btn { padding: 6px 14px; background: var(--primary); color: white; border: none; border-radius: var(--radius-sm); cursor: pointer; font-size: 12px; display: flex; align-items: center; gap: 6px; }
.empty-state { text-align: center; padding: 60px 20px; color: var(--text-2); }
.empty-state i { font-size: 48px; opacity: .3; margin-bottom: 12px; display: block; }
.empty-state p { font-size: 14px; }

/* ===================== FEES ===================== */
.fee-top-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }
.fee-top-card { background: var(--card-bg); border-radius: var(--radius); padding: 16px 20px; box-shadow: var(--shadow); }
.fee-top-card .ftc-val { font-size: 22px; font-weight: 800; }
.fee-top-card .ftc-lbl { font-size: 12px; color: var(--text-2); margin-top: 3px; }
.fee-top-card.paye .ftc-val { color: var(--success); }
.fee-top-card.partiel .ftc-val { color: var(--warning); }
.fee-top-card.impaye .ftc-val { color: var(--danger); }

/* ===================== REPORTS ===================== */
.reports-menu { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 24px; }
.rpt-card { background: var(--card-bg); border-radius: var(--radius); padding: 16px 20px; box-shadow: var(--shadow); display: flex; align-items: center; gap: 14px; cursor: pointer; transition: var(--transition); }
.rpt-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); border-left: 3px solid var(--primary); }
.rpt-ico { width: 44px; height: 44px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 18px; flex-shrink: 0; }
.rpt-ico.c-blue { background: var(--primary-l); color: var(--primary); }
.rpt-ico.c-green { background: var(--success-l); color: var(--success); }
.rpt-ico.c-orange { background: var(--warning-l); color: var(--warning); }
.rpt-ico.c-purple { background: #f5f3ff; color: #7c3aed; }
.rpt-card > div:nth-child(2) { flex: 1; }
.rpt-card h4 { font-size: 14px; font-weight: 700; }
.rpt-card p { font-size: 12px; color: var(--text-2); margin-top: 2px; }
.rpt-card > i { color: var(--text-2); }
.rpt-output { background: var(--card-bg); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.rpt-section { margin-bottom: 24px; }
.rpt-section h4 { font-size: 15px; font-weight: 700; margin-bottom: 12px; color: var(--text); border-bottom: 2px solid var(--primary); padding-bottom: 6px; }
.rpt-row { display: flex; justify-content: space-between; padding: 9px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.rpt-row:last-child { border-bottom: none; }
.rpt-key { color: var(--text-2); font-weight: 500; }
.rpt-val { font-weight: 700; }

/* ===================== SETTINGS ===================== */
.settings-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.set-card { background: var(--card-bg); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.set-card h3 { font-size: 15px; font-weight: 700; margin-bottom: 20px; display: flex; align-items: center; gap: 8px; color: var(--text); }
.set-card h3 i { color: var(--primary); }
.set-btns { display: flex; flex-direction: column; gap: 10px; }
.set-btns .btn { justify-content: center; }
.fee-type-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.ft-item { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; background: var(--bg); border-radius: var(--radius-sm); }
.ft-name { font-weight: 600; font-size: 13px; }
.ft-amount { color: var(--text-2); font-size: 13px; }
.ft-del { background: none; border: none; color: var(--danger); cursor: pointer; font-size: 14px; }

/* ===================== FORMS ===================== */
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 12px; font-weight: 600; color: var(--text-2); margin-bottom: 5px; text-transform: uppercase; letter-spacing: .4px; }
.form-control {
    width: 100%; padding: 9px 12px; border: 1.5px solid var(--border);
    border-radius: var(--radius-sm); font-size: 13px; color: var(--text);
    background: white; transition: var(--transition); outline: none;
}
.form-control:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,.08); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-row .form-group.full { grid-column: span 2; }
.form-section { font-size: 12px; font-weight: 700; color: var(--text-2); text-transform: uppercase; letter-spacing: .8px; margin: 16px 0 10px; display: flex; align-items: center; gap: 6px; padding-bottom: 8px; border-bottom: 1px solid var(--border); }
.form-section i { color: var(--primary); }

/* ===================== MODAL ===================== */
.modal-overlay {
    position: fixed; inset: 0; background: rgba(15,23,42,.5);
    display: flex; align-items: center; justify-content: center;
    z-index: 300; backdrop-filter: blur(3px); padding: 20px;
}
.modal {
    background: white; border-radius: 14px; width: 520px; max-width: 100%;
    max-height: 90vh; overflow-y: auto; box-shadow: 0 25px 50px rgba(0,0,0,.25);
    animation: modalIn .2s ease;
}
.modal.modal-lg { width: 780px; }
.modal.modal-sm { width: 400px; }
@keyframes modalIn { from { transform: scale(.95); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.modal-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 18px 24px; border-bottom: 1px solid var(--border); position: sticky; top: 0; background: white; z-index: 1;
}
.modal-head h3 { font-size: 16px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.modal-head h3 i { color: var(--primary); }
.modal-head.danger h3 i { color: var(--danger); }
.modal-head > button { background: none; border: none; cursor: pointer; color: var(--text-2); font-size: 18px; padding: 4px; border-radius: var(--radius-sm); transition: var(--transition); }
.modal-head > button:hover { background: var(--bg); color: var(--text); }
.modal-body { padding: 20px 24px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--border); }
.confirm-msg { font-size: 14px; color: var(--text); padding: 8px 0; }

/* ===================== PAGINATION ===================== */
.pagination { display: flex; align-items: center; justify-content: flex-end; gap: 4px; padding: 12px 16px; border-top: 1px solid var(--border); }
.pg-btn { width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; border: 1.5px solid var(--border); border-radius: var(--radius-sm); cursor: pointer; font-size: 13px; color: var(--text); background: white; transition: var(--transition); }
.pg-btn:hover { border-color: var(--primary); color: var(--primary); }
.pg-btn.active { background: var(--primary); border-color: var(--primary); color: white; }
.pg-btn:disabled { opacity: .4; cursor: not-allowed; }
.pager { display: flex; align-items: center; justify-content: flex-end; gap: 4px; padding: 12px 16px; border-top: 1px solid var(--border); }
.table-input { border: 1px solid var(--border); border-radius: 5px; padding: 4px 8px; font-size: 12px; width: 100%; max-width: 110px; text-align: right; }
.table-input:focus { outline: none; border-color: var(--primary); }

/* ===================== TOAST ===================== */
.toast-wrap { position: fixed; bottom: 24px; right: 24px; display: flex; flex-direction: column; gap: 8px; z-index: 500; }
.toast {
    display: flex; align-items: center; gap: 12px;
    background: white; border-radius: var(--radius); padding: 12px 16px;
    box-shadow: var(--shadow-lg); border-left: 4px solid; min-width: 280px;
    animation: toastIn .3s ease; font-size: 13px;
}
.toast.success { border-color: var(--success); }
.toast.error { border-color: var(--danger); }
.toast.warning { border-color: var(--warning); }
.toast.info { border-color: var(--primary); }
.toast-ico { font-size: 16px; }
.toast.success .toast-ico { color: var(--success); }
.toast.error .toast-ico { color: var(--danger); }
.toast.warning .toast-ico { color: var(--warning); }
.toast.info .toast-ico { color: var(--primary); }
.toast-txt { flex: 1; color: var(--text); font-weight: 500; }
.toast-x { background: none; border: none; color: var(--text-2); cursor: pointer; font-size: 14px; }
@keyframes toastIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
.toast.out { animation: toastOut .3s ease forwards; }
@keyframes toastOut { to { transform: translateX(100%); opacity: 0; } }

/* ===================== DASHBOARD BANNER ===================== */
.dash-school-banner {
    background: linear-gradient(135deg, #1e40af 0%, #1d4ed8 60%, #166534 100%);
    border-radius: var(--radius); padding: 20px 24px; margin-bottom: 20px;
    display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px;
    color: white; box-shadow: 0 4px 15px rgba(30,64,175,.25);
}
.dsb-content { display: flex; align-items: center; gap: 16px; }
.dsb-logo { width: 60px; height: 60px; border-radius: 10px; object-fit: contain; border: 2px solid rgba(255,255,255,.3); background: white; padding: 4px; }
.dsb-content h2 { font-size: 20px; font-weight: 800; letter-spacing: -.3px; margin-bottom: 2px; }
.dsb-devise { font-size: 12px; color: #86efac; font-style: italic; margin-bottom: 2px; }
.dsb-slogan { font-size: 11px; color: #bfdbfe; }
.dsb-year { background: rgba(255,255,255,.18); padding: 8px 16px; border-radius: 20px; font-size: 13px; font-weight: 600; white-space: nowrap; }

/* Smaller charts */
.chart-card canvas { max-height: 160px; }

/* ===================== FEE CONFIG PAGE ===================== */
.fee-config-table { width: 100%; border-collapse: collapse; }
.fee-config-table th { background: #1e40af; color: white; padding: 10px 14px; font-size: 12px; font-weight: 600; text-align: left; }
.fee-config-table td { padding: 10px 14px; border-bottom: 1px solid var(--border); font-size: 13px; vertical-align: middle; }
.fee-config-table tr:hover td { background: #f8fafc; }
.ech-badge { display: inline-block; padding: 3px 8px; border-radius: 20px; background: var(--primary-l); color: var(--primary); font-size: 11px; font-weight: 600; margin: 2px; }
.ech-list { display: flex; flex-wrap: wrap; gap: 4px; }
.fc-level-select { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.fc-level-btn { padding: 6px 14px; border-radius: 20px; border: 1.5px solid var(--border); background: white; font-size: 12px; font-weight: 600; cursor: pointer; transition: var(--transition); color: var(--text); }
.fc-level-btn.active, .fc-level-btn:hover { background: #1e40af; color: white; border-color: #1e40af; }
.echeance-row { display: grid; grid-template-columns: 1fr 1fr 1fr 32px; gap: 8px; align-items: end; margin-bottom: 8px; }
.echeance-row input { padding: 7px 10px; border: 1.5px solid var(--border); border-radius: var(--radius-sm); font-size: 13px; width: 100%; }
.echeance-row input:focus { outline: none; border-color: var(--primary); }
.del-ech-btn { width: 30px; height: 30px; background: var(--danger-l); color: var(--danger); border: none; border-radius: var(--radius-sm); cursor: pointer; font-size: 14px; display: flex; align-items: center; justify-content: center; }

/* ===================== BILAN PAGE ===================== */
.bilan-tabs { display: flex; border-bottom: 2px solid var(--border); margin-bottom: 20px; gap: 0; }
.bilan-tab { padding: 10px 20px; font-size: 13px; font-weight: 600; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -2px; transition: var(--transition); color: var(--text-2); }
.bilan-tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.bilan-tab:hover { color: var(--primary); }
.bilan-panel { display: none; }
.bilan-panel.active { display: block; }
.bilan-summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 20px; }
.bilan-sum-card { background: white; border-radius: var(--radius); padding: 16px; border-left: 4px solid; box-shadow: var(--shadow); text-align: center; }
.bilan-sum-card.c1 { border-color: var(--primary); }
.bilan-sum-card.c2 { border-color: var(--success); }
.bilan-sum-card.c3 { border-color: var(--danger); }
.bilan-sum-card.c4 { border-color: var(--warning); }
.bilan-sum-val { font-size: 18px; font-weight: 800; margin-bottom: 4px; }
.bilan-sum-lbl { font-size: 11px; color: var(--text-2); font-weight: 600; text-transform: uppercase; }
.bilan-filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 16px; padding: 14px; background: white; border-radius: var(--radius); border: 1px solid var(--border); }
.bilan-filters label { font-size: 12px; font-weight: 600; color: var(--text-2); display: block; margin-bottom: 4px; }
.bilan-filters input, .bilan-filters select { padding: 7px 10px; border: 1.5px solid var(--border); border-radius: var(--radius-sm); font-size: 13px; background: #f8fafc; }
.bilan-table-card { background: white; border-radius: var(--radius); border: 1px solid var(--border); overflow: hidden; margin-bottom: 16px; }
.bilan-table-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.bilan-table-head h4 { font-size: 14px; font-weight: 700; }
.bilan-tbl { width: 100%; border-collapse: collapse; }
.bilan-tbl th { background: #f8fafc; padding: 9px 14px; font-size: 12px; font-weight: 600; text-align: left; color: var(--text-2); border-bottom: 1px solid var(--border); }
.bilan-tbl td { padding: 9px 14px; font-size: 13px; border-bottom: 1px solid var(--border); }
.bilan-tbl tr:last-child td { border-bottom: none; }
.bilan-tbl tr:hover td { background: #f8fafc; }
.print-bilan-btn { display: flex; align-items: center; gap: 6px; padding: 7px 14px; background: #1e40af; color: white; border: none; border-radius: var(--radius-sm); font-size: 12px; font-weight: 600; cursor: pointer; transition: var(--transition); }
.print-bilan-btn:hover { background: #1d4ed8; }
.btc-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid var(--border); font-size: 14px; font-weight: 700; }
.bsc-val { font-size: 18px; font-weight: 800; margin-bottom: 4px; }
.bsc-lbl { font-size: 11px; color: var(--text-2); font-weight: 600; text-transform: uppercase; }
.bilan-tbl td.num { text-align: right; }
.bilan-tbl th.num { text-align: right; }
.bilan-tbl .ok { color: #059669; font-weight: 700; }
.bilan-tbl .ko { color: #dc2626; font-weight: 700; }
.bilan-tbl tfoot td { background: #f8fafc; font-weight: 700; border-top: 2px solid var(--border); }

/* ===================== PHOTO UPLOAD ===================== */
.photo-upload-wrap { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.photo-preview { width: 90px; height: 90px; border-radius: 10px; border: 2px dashed var(--border); background: #f8fafc; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.photo-ph-icon { font-size: 40px; color: #cbd5e1; }
.photo-upload-btns { display: flex; gap: 6px; }
.btn-xs { padding: 5px 8px !important; font-size: 11px !important; }

/* ===================== GRADE PILLS ===================== */
.grade-pills-wrap { display: flex; flex-wrap: wrap; gap: 4px; }
.grade-pill { display: inline-block; padding: 2px 7px; background: #eff6ff; color: #2563eb; border-radius: 20px; font-size: 11px; font-weight: 700; cursor: default; }

/* ===================== ATTENDANCE FILTER BAR ===================== */
.att-filter-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 14px; background: white; border-radius: var(--radius); border: 1px solid var(--border); margin-bottom: 12px; }
.att-flt-btn { padding: 6px 14px; font-size: 12px; font-weight: 600; border: 1.5px solid var(--border); border-radius: 20px; background: #f8fafc; color: var(--text-2); cursor: pointer; transition: var(--transition); }
.att-flt-btn:hover { border-color: var(--primary); color: var(--primary); }
.att-flt-btn.active { background: var(--primary); color: white; border-color: var(--primary); }

/* Receipt print button */
.btn-receipt { background: #ecfdf5; color: #059669; border: 1px solid #bbf7d0; }
.btn-receipt:hover { background: #059669; color: white; }

/* ===================== LOGIN ENHANCEMENTS ===================== */
.input-wrap select {
    width: 100%; padding: 11px 14px 11px 40px;
    border: 1.5px solid var(--border); border-radius: var(--radius-sm);
    background: #f8fafc; color: var(--text); font-size: 14px;
    transition: var(--transition); appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 12px center;
}
.input-wrap select:focus { outline: none; border-color: var(--primary); background-color: white; box-shadow: 0 0 0 3px rgba(37,99,235,.1); }
.no-school-notice { color: var(--info); background: var(--info-l); border-radius: var(--radius-sm); padding: 10px 14px; font-size: 13px; margin-bottom: 14px; }
.login-footer { display: flex; align-items: center; justify-content: space-between; margin-top: 16px; flex-wrap: wrap; gap: 8px; }
.login-hint { color: var(--text-2); font-size: 12px; }
.create-school-btn {
    background: none; border: 1.5px solid var(--primary); color: var(--primary);
    padding: 7px 14px; border-radius: var(--radius-sm); font-size: 12px; font-weight: 600;
    cursor: pointer; transition: var(--transition); display: flex; align-items: center; gap: 6px;
}
.create-school-btn:hover { background: var(--primary); color: white; }

/* ===================== SIDEBAR LOGO ===================== */
.s-logo-wrap { position: relative; flex-shrink: 0; }
.s-logo-img {
    width: 40px; height: 40px; border-radius: 10px;
    object-fit: cover; border: 2px solid rgba(255,255,255,.2);
}
.s-devise { display: block; color: #60a5fa; font-size: 9px; font-style: italic; margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 160px; }

/* ===================== SETTINGS — LOGO UPLOAD ===================== */
.set-card-wide { grid-column: 1 / -1; }
.logo-upload-section {
    display: flex; align-items: flex-start; gap: 20px;
    padding: 16px; background: var(--bg); border-radius: var(--radius);
    border: 1px solid var(--border); margin-bottom: 20px;
}
.logo-upload-preview {
    width: 110px; height: 110px; border-radius: var(--radius);
    border: 2px dashed var(--border); overflow: hidden;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    background: white; flex-shrink: 0; transition: var(--transition);
}
.logo-upload-preview:hover { border-color: var(--primary); }
.logo-preview-img { width: 100%; height: 100%; object-fit: contain; }
.logo-placeholder-box {
    display: flex; flex-direction: column; align-items: center; gap: 6px;
    color: var(--text-2); font-size: 12px; text-align: center; padding: 8px;
}
.logo-placeholder-box i { font-size: 24px; opacity: .5; }
.logo-upload-actions { display: flex; flex-direction: column; gap: 8px; justify-content: center; }
.btn-sm { padding: 6px 12px !important; font-size: 12px !important; }

/* ===================== PRINT ===================== */
@media print {
    .sidebar, .top-header, .toolbar, .bul-print-btn, .modal-overlay,
    .toast-wrap, .action-btns { display: none !important; }
    .main-area { margin-left: 0 !important; }
    .content-area { padding: 0 !important; }
    body { background: white; }
    .print-bulletin { page-break-after: always; }
}

/* ===================== RESPONSIVE ===================== */
@media (max-width: 1200px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .dash-grid { grid-template-columns: 1fr; }
    .chart-card.span-2 { grid-column: span 1; }
    .qa-grid { grid-template-columns: repeat(3, 1fr); }
    .settings-grid { grid-template-columns: 1fr; }
    .fee-top-stats { grid-template-columns: repeat(2, 1fr); }
    .reports-menu { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
    :root { --sidebar-w: 0px; }
    .sidebar { transform: translateX(-260px); }
    .sidebar.open { transform: translateX(0); width: 260px; }
    .main-area { margin-left: 0; }
    .stats-grid { grid-template-columns: 1fr 1fr; }
    .qa-grid { grid-template-columns: repeat(2, 1fr); }
    .toolbar { flex-wrap: wrap; }
    .tb-search { order: 1; width: 100%; }
    .form-row { grid-template-columns: 1fr; }
    .form-row .form-group.full { grid-column: 1; }
}
