/* ============================================================
   style.css — e-Rapor SMPN 1 Kuripan
   Tema: Dominan ungu pastel hangat, orange hanya aksen/garis
   ============================================================ */

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

:root {
    /* Ungu sebagai primary */
    --primary:        #7C5CBF;
    --primary-dark:   #6245A8;
    --primary-light:  #DDD4F5;
    --primary-bg:     #F5F2FC;

    /* Orange hanya untuk aksen / garis / highlight */
    --accent:         #FF8C69;
    --accent-light:   #FFD4C8;
    --accent-bg:      #FFF2EE;

    /* Aksen lain */
    --mint:           #98D8C8;
    --sky:            #87CEEB;
    --lavender:       #C9B8E8;
    --yellow:         #FFD966;
    --rose:           #F4A0B0;
    --peach:          #FFB347;

    /* Neutral */
    --bg:             #F8F6FC;
    --card:           #FFFFFF;
    --border:         #E8E0F0;
    --text:           #3D2D6B;
    --text-muted:     #8878AA;
    --text-light:     #B8A8D8;

    /* Status */
    --success:        #5CB85C;
    --success-bg:     #EAF7EA;
    --danger:         #E05555;
    --danger-bg:      #FDEAEA;
    --info:           #5AABD6;
    --info-bg:        #E8F4FD;
    --warning:        #E6A800;
    --warning-bg:     #FFF8E1;

    /* KKM */
    --kkm-merah-bg:   #FFB3B3;
    --kkm-merah-text: #CC0000;
    --kkm-biru-bg:    #B3D4FF;
    --kkm-biru-text:  #0044CC;

    /* Sidebar — ungu */
    --sidebar-w:      240px;
    --sidebar-bg:     #6245A8;
    --sidebar-text:   #FFFFFF;
    --sidebar-hover:  rgba(255,255,255,0.15);
    --sidebar-active: rgba(255,255,255,0.25);

    /* Shadow */
    --shadow-sm:  0 1px 4px rgba(100,60,160,0.10);
    --shadow:     0 2px 12px rgba(100,60,160,0.13);
    --shadow-md:  0 4px 20px rgba(100,60,160,0.16);

    /* Radius */
    --radius:    12px;
    --radius-sm: 8px;
    --radius-lg: 16px;

    --font: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
}

html { font-size: 15px; }
body { font-family: var(--font); background: var(--bg); color: var(--text); line-height: 1.6; min-height: 100vh; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── LAYOUT ───────────────────────────────────────────────── */
.app-wrapper { display: flex; min-height: 100vh; }

/* ── SIDEBAR ──────────────────────────────────────────────── */
.sidebar {
    width: var(--sidebar-w);
    background: linear-gradient(160deg, #7C5CBF 0%, #5A3A9A 100%);
    color: var(--sidebar-text);
    display: flex; flex-direction: column;
    position: fixed; top: 0; left: 0; bottom: 0;
    z-index: 100; overflow-y: auto;
    transition: transform 0.28s ease;
    box-shadow: 3px 0 16px rgba(80,40,140,0.18);
}
.sidebar-brand { padding: 1.5rem 1.2rem 1rem; border-bottom: 1px solid rgba(255,255,255,0.15); text-align: center; }
.brand-icon { font-size: 2rem; margin-bottom: 0.3rem; }
.sidebar-brand h1 { font-size: 1.1rem; font-weight: 700; }
.sidebar-brand p  { font-size: 0.7rem; opacity: 0.8; margin-top: 0.1rem; }

.ta-badge {
    margin: 0.7rem 0.9rem 0;
    background: rgba(255,255,255,0.18);
    border-radius: 20px; padding: 0.3rem 0.8rem;
    font-size: 0.68rem; font-weight: 700; text-align: center;
}

.sidebar-nav { padding: 0.8rem 0; flex: 1; }
.nav-group-label {
    font-size: 0.62rem; font-weight: 800; text-transform: uppercase;
    letter-spacing: 0.8px; opacity: 0.55; padding: 0.9rem 1.1rem 0.3rem;
}
.nav-item {
    display: flex; align-items: center; gap: 0.6rem;
    padding: 0.55rem 1.1rem; font-size: 0.82rem; font-weight: 500;
    color: var(--sidebar-text); transition: background 0.15s;
    cursor: pointer; text-decoration: none;
}
.nav-item:hover { background: var(--sidebar-hover); text-decoration: none; }
.nav-item.active {
    background: var(--sidebar-active); font-weight: 700;
    border-right: 3px solid var(--accent);   /* orange accent on active */
}
.nav-icon { width: 1.3rem; text-align: center; font-size: 0.85rem; opacity: 0.9; flex-shrink: 0; }

.sidebar-footer { padding: 0.8rem; border-top: 1px solid rgba(255,255,255,0.15); }
.user-card {
    display: flex; align-items: center; gap: 0.6rem;
    background: rgba(255,255,255,0.15); border-radius: var(--radius-sm); padding: 0.6rem 0.7rem;
}
.user-avatar {
    width: 32px; height: 32px; background: rgba(255,255,255,0.3);
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 0.85rem; flex-shrink: 0;
}
.user-info { flex: 1; min-width: 0; }
.user-name { font-size: 0.75rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-role { font-size: 0.62rem; opacity: 0.8; }
.logout-btn { color: rgba(255,255,255,0.75); font-size: 0.9rem; padding: 0.2rem; transition: color 0.15s; text-decoration: none; }
.logout-btn:hover { color: #fff; text-decoration: none; }
.sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.35); z-index: 99; }

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

/* ── TOPBAR ───────────────────────────────────────────────── */
.topbar {
    background: var(--card); border-bottom: 2px solid var(--accent); /* orange border bawah topbar */
    padding: 0.8rem 1.5rem; display: flex; align-items: center;
    justify-content: space-between; gap: 1rem;
    position: sticky; top: 0; z-index: 50; box-shadow: var(--shadow-sm);
}
.topbar-title h2 { font-size: 1rem; font-weight: 700; color: var(--text); line-height: 1.3; }
.topbar-title p  { font-size: 0.72rem; color: var(--text-muted); }
.topbar-right { display: flex; align-items: center; gap: 1rem; }
.topbar-date { font-size: 0.72rem; color: var(--text-muted); display: flex; align-items: center; gap: 0.4rem; }
.hamburger { display: none; background: none; border: none; font-size: 1.1rem; color: var(--text); cursor: pointer; padding: 0.2rem; }

/* ── CONTENT ──────────────────────────────────────────────── */
.content { padding: 1.4rem 1.5rem; flex: 1; }

/* ── CARD ─────────────────────────────────────────────────── */
.card {
    background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
    padding: 1.2rem 1.3rem; margin-bottom: 1.2rem;
    border: 1px solid var(--border);
    border-top: 3px solid var(--accent); /* orange garis atas setiap card */
}
.card-title {
    display: flex; align-items: center; gap: 0.5rem;
    font-size: 0.88rem; font-weight: 700; color: var(--text);
    margin-bottom: 1rem; padding-bottom: 0.7rem; border-bottom: 1px solid var(--border);
}

/* ── STAT CARDS ───────────────────────────────────────────── */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px,1fr)); gap: 1rem; margin-bottom: 1.2rem; }
.stat-card {
    background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
    padding: 1rem 1.1rem; display: flex; align-items: center; gap: 0.9rem;
    border: 1px solid var(--border); border-left: 4px solid var(--accent); /* orange kiri */
}
.stat-icon {
    width: 44px; height: 44px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.25rem; flex-shrink: 0;
}
.stat-icon.coral    { background: var(--accent-light); }
.stat-icon.purple   { background: var(--primary-light); }
.stat-icon.mint     { background: #C8F0E8; }
.stat-icon.sky      { background: #D0ECFA; }
.stat-icon.lavender { background: var(--primary-light); }
.stat-icon.yellow   { background: #FFF3CC; }
.stat-icon.rose     { background: #FADCE4; }
.stat-icon.peach    { background: #FFE8C0; }

.stat-val   { font-size: 1.3rem; font-weight: 800; color: var(--text); }
.stat-label { font-size: 0.7rem; color: var(--text-muted); margin-top: 0.1rem; }

/* ── FORM ─────────────────────────────────────────────────── */
.form-group { margin-bottom: 1rem; }
.form-label { display: block; font-size: 0.78rem; font-weight: 600; color: var(--text); margin-bottom: 0.35rem; }
.form-control {
    width: 100%; padding: 0.55rem 0.85rem;
    border: 1.5px solid var(--border); border-radius: var(--radius-sm);
    font-size: 0.85rem; color: var(--text); background: #FDFBFF;
    transition: border-color 0.18s, box-shadow 0.18s;
    font-family: var(--font); outline: none;
}
.form-control:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-light); background: #fff; }
.form-control::placeholder { color: var(--text-light); }
select.form-control { cursor: pointer; }
textarea.form-control { resize: vertical; min-height: 80px; }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px,1fr)); gap: 0.8rem; }
.form-hint { font-size: 0.68rem; color: var(--text-muted); margin-top: 0.25rem; }

/* ── BUTTONS ──────────────────────────────────────────────── */
.btn {
    display: inline-flex; align-items: center; gap: 0.4rem;
    padding: 0.5rem 1rem; border-radius: var(--radius-sm);
    font-size: 0.82rem; font-weight: 600; cursor: pointer;
    border: 1.5px solid transparent; transition: all 0.16s;
    text-decoration: none; white-space: nowrap; font-family: var(--font);
}
.btn:hover { text-decoration: none; filter: brightness(0.92); }
.btn:active { transform: scale(0.97); }

.btn-primary  { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn-accent   { background: var(--accent);  color: #fff; border-color: var(--accent);  }
.btn-peach    { background: var(--peach);   color: #fff; border-color: var(--peach);   }
.btn-mint     { background: var(--mint);    color: var(--text); border-color: var(--mint); }
.btn-success  { background: var(--success); color: #fff; border-color: var(--success); }
.btn-danger   { background: var(--danger);  color: #fff; border-color: var(--danger);  }
.btn-info     { background: var(--info);    color: #fff; border-color: var(--info);    }
.btn-outline  { background: transparent; color: var(--primary); border-color: var(--primary); }
.btn-outline:hover { background: var(--primary-bg); }
.btn-outline-danger { background: transparent; color: var(--danger); border-color: var(--danger); }
.btn-outline-danger:hover { background: var(--danger-bg); }
.btn-sm   { padding: 0.3rem 0.65rem; font-size: 0.75rem; }
.btn-lg   { padding: 0.7rem 1.4rem; font-size: 0.92rem; }
.btn-block { width: 100%; justify-content: center; }
.btn.disabled { opacity: 0.5; cursor: not-allowed; pointer-events: none; }

/* ── BADGE ────────────────────────────────────────────────── */
.badge {
    display: inline-flex; align-items: center; gap: 0.25rem;
    padding: 0.2rem 0.6rem; border-radius: 20px; font-size: 0.68rem; font-weight: 700;
}
.badge-aktif    { background: var(--success-bg); color: var(--success); }
.badge-nonaktif { background: #F0F0F0; color: #999; }
.badge-admin    { background: var(--primary-light); color: var(--primary-dark); }
.badge-guru     { background: #D0ECFA; color: #2278A8; }
.badge-wakel    { background: var(--primary-light); color: var(--primary-dark); }
.badge-islam    { background: #EAF7EA; color: #2E7D32; }
.badge-hindu    { background: #FFF3CC; color: #B07A00; }
.badge-coral    { background: var(--accent-light); color: #C05030; }
.badge-purple   { background: var(--primary-light); color: var(--primary-dark); }
.badge-mint     { background: #C8F0E8; color: #1A6B5A; }
.badge-peach    { background: #FFE8C0; color: #B05C00; }
.badge-info     { background: var(--info-bg); color: #1A4E6B; }
.badge-terkunci { background: #FDEAEA; color: var(--danger); }
.badge-terbuka  { background: var(--success-bg); color: var(--success); }

/* ── ALERT ────────────────────────────────────────────────── */
.alert {
    padding: 0.7rem 1rem; border-radius: var(--radius-sm); font-size: 0.82rem;
    display: flex; align-items: flex-start; gap: 0.5rem; margin-bottom: 1rem;
    border-left: 4px solid transparent;
}
.alert-success { background: var(--success-bg); color: #2E6B2E; border-color: var(--success); }
.alert-danger  { background: var(--danger-bg);  color: #8B1A1A; border-color: var(--danger);  }
.alert-info    { background: var(--info-bg);    color: #1A4E6B; border-color: var(--info);    }
.alert-warning { background: var(--warning-bg); color: #6B4A00; border-color: var(--warning); }

/* ── TABLE ────────────────────────────────────────────────── */
.data-table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 0.82rem; }
.data-table th {
    background: var(--primary-bg); color: var(--text); font-weight: 700; font-size: 0.75rem;
    padding: 0.6rem 0.8rem; text-align: left; border-bottom: 2px solid var(--accent); white-space: nowrap;
}
.data-table td { padding: 0.55rem 0.8rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
.data-table tbody tr:hover { background: var(--primary-bg); }
.data-table tbody tr:last-child td { border-bottom: none; }

/* ── NILAI TABLE ──────────────────────────────────────────── */
.nilai-table { width: 100%; border-collapse: collapse; font-size: 0.82rem; }
.nilai-table th {
    background: var(--primary-bg); color: var(--text); font-weight: 700; font-size: 0.73rem;
    padding: 0.55rem 0.6rem; text-align: center; border: 1px solid var(--border); white-space: nowrap;
}
.nilai-table th.th-nama { text-align: left; }
.nilai-table td { padding: 0.35rem 0.5rem; border: 1px solid var(--border); vertical-align: middle; }
.nilai-table tr:hover td { background: var(--primary-bg); }

.input-nilai {
    width: 62px; padding: 0.3rem 0.4rem;
    border: 1.5px solid var(--border); border-radius: 6px;
    font-size: 0.82rem; font-weight: 700; text-align: center; color: var(--text);
    background: #FDFBFF; transition: border-color 0.15s, background 0.15s; outline: none;
}
.input-nilai:focus { border-color: var(--primary); background: #fff; }

.kkm-merah { background: var(--kkm-merah-bg) !important; color: var(--kkm-merah-text) !important; font-weight: 700 !important; }
.kkm-biru  { background: var(--kkm-biru-bg)  !important; color: var(--kkm-biru-text)  !important; font-weight: 700 !important; }

/* ── LEGER TABLE ──────────────────────────────────────────── */
.leger-table { font-size: 0.75rem; border-collapse: collapse; width: 100%; }
.leger-table th {
    background: var(--primary-bg); font-weight: 700; font-size: 0.68rem;
    padding: 0.45rem 0.5rem; border: 1px solid var(--border); text-align: center; white-space: nowrap;
}
.leger-table th.th-nama { text-align: left; min-width: 140px; }
.leger-table td { padding: 0.35rem 0.5rem; border: 1px solid var(--border); text-align: center; vertical-align: middle; }
.leger-table td.td-nama { text-align: left; font-weight: 600; }
.leger-table tr:hover td { background: var(--primary-bg); }
.leger-table td.td-total { font-weight: 800; background: var(--primary-bg); }
.leger-table td.td-rank  { font-weight: 800; color: var(--primary); }

/* ── RANKING ──────────────────────────────────────────────── */
.rank-1 td { background: #FFF8DC !important; }
.rank-2 td { background: #F5F5F5 !important; }
.rank-3 td { background: var(--accent-bg) !important; }

/* ── EMPTY STATE ──────────────────────────────────────────── */
.empty-state { text-align: center; padding: 2.5rem 1rem; color: var(--text-muted); }
.empty-icon { font-size: 2.5rem; margin-bottom: 0.5rem; }
.empty-state p { font-size: 0.83rem; }

/* ── PAGINATION ───────────────────────────────────────────── */
.pagination { display: flex; gap: 0.3rem; flex-wrap: wrap; justify-content: center; padding: 0.8rem 0; }
.page-btn {
    min-width: 34px; height: 34px; display: flex; align-items: center; justify-content: center;
    border: 1.5px solid var(--border); border-radius: var(--radius-sm); font-size: 0.8rem;
    font-weight: 600; color: var(--text); background: var(--card); cursor: pointer;
    text-decoration: none; transition: all 0.15s; padding: 0 0.4rem;
}
.page-btn:hover { background: var(--primary-bg); border-color: var(--primary); color: var(--primary); text-decoration: none; }
.page-btn.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.page-btn.disabled { opacity: 0.4; cursor: not-allowed; pointer-events: none; }

/* ── FILTER BAR ───────────────────────────────────────────── */
.filter-bar { display: flex; gap: 0.7rem; flex-wrap: wrap; align-items: flex-end; margin-bottom: 1rem; }
.filter-bar .form-group { margin-bottom: 0; min-width: 160px; }

/* ── SORTABLE (urutan mapel) ──────────────────────────────── */
.sortable-list { list-style: none; }
.sortable-item {
    display: flex; align-items: center; gap: 0.7rem;
    background: var(--card); border: 1.5px solid var(--border);
    border-radius: var(--radius-sm); padding: 0.6rem 0.9rem; margin-bottom: 0.5rem;
    cursor: grab; transition: box-shadow 0.15s, border-color 0.15s;
    font-size: 0.85rem; font-weight: 500;
}
.sortable-item:hover { border-color: var(--accent); box-shadow: var(--shadow-sm); }
.sortable-item.dragging { box-shadow: var(--shadow-md); border-color: var(--primary); opacity: 0.85; cursor: grabbing; }
.drag-handle { color: var(--text-light); font-size: 0.9rem; cursor: grab; }
.sort-no {
    width: 26px; height: 26px; background: var(--primary-bg); border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.72rem; font-weight: 800; color: var(--primary); flex-shrink: 0;
}

/* ── LOGIN PAGE ───────────────────────────────────────────── */
.login-body { background: linear-gradient(135deg, #EDE8F8 0%, #F8F6FC 50%, #E8F0FC 100%); }
.login-page {
    min-height: 100vh; display: flex; align-items: center; justify-content: center;
    padding: 2rem 1rem; position: relative; overflow: hidden;
}
.login-deco { position: absolute; border-radius: 50%; pointer-events: none; opacity: 0.5; }
.deco-1 { width: 320px; height: 320px; background: radial-gradient(circle, var(--primary-light), transparent 70%); top: -80px; left: -80px; }
.deco-2 { width: 280px; height: 280px; background: radial-gradient(circle, var(--accent-light), transparent 70%); bottom: -60px; right: -60px; }
.deco-3 { width: 180px; height: 180px; background: radial-gradient(circle, #D0ECFA, transparent 70%); top: 40%; left: 60%; }
.login-card {
    background: var(--card); border-radius: var(--radius-lg); box-shadow: var(--shadow-md);
    padding: 2.2rem 2rem; width: 100%; max-width: 380px;
    position: relative; z-index: 1; border-top: 4px solid var(--accent); /* orange top */
}
.login-logo { text-align: center; margin-bottom: 1.6rem; }
.logo-icon { font-size: 2.8rem; margin-bottom: 0.4rem; }
.login-logo h1 { font-size: 1.4rem; font-weight: 800; color: var(--primary); }
.login-logo p  { font-size: 0.78rem; color: var(--text-muted); margin-top: 0.2rem; }
.login-footer-link { text-align: center; margin-top: 1rem; font-size: 0.72rem; }
.login-copy { text-align: center; font-size: 0.65rem; color: var(--text-light); margin-top: 1rem; }

/* ── SECTION HEADER ───────────────────────────────────────── */
.section-header {
    display: flex; align-items: center; justify-content: space-between;
    gap: 1rem; margin-bottom: 1rem; flex-wrap: wrap;
}
.section-title { font-size: 0.88rem; font-weight: 700; color: var(--text); display: flex; align-items: center; gap: 0.4rem; }

/* ── MODAL ────────────────────────────────────────────────── */
.modal-overlay {
    display: none; position: fixed; inset: 0; background: rgba(40,20,80,0.4);
    z-index: 200; align-items: center; justify-content: center; padding: 1rem;
}
.modal-overlay.open { display: flex; }
.modal {
    background: var(--card); border-radius: var(--radius-lg); box-shadow: var(--shadow-md);
    width: 100%; max-width: 480px; max-height: 90vh; overflow-y: auto;
    animation: modalIn 0.2s ease; border-top: 3px solid var(--accent);
}
@keyframes modalIn { from { transform: scale(0.93); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.modal-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 1rem 1.3rem 0.8rem; border-bottom: 1px solid var(--border);
    font-size: 0.9rem; font-weight: 700; color: var(--text);
}
.modal-close { background: none; border: none; font-size: 1.1rem; cursor: pointer; color: var(--text-muted); transition: color 0.15s; padding: 0.1rem; }
.modal-close:hover { color: var(--danger); }
.modal-body   { padding: 1.1rem 1.3rem; }
.modal-footer { padding: 0.8rem 1.3rem 1rem; border-top: 1px solid var(--border); display: flex; gap: 0.5rem; justify-content: flex-end; }

/* ── KKM LEGEND ───────────────────────────────────────────── */
.kkm-legend { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; font-size: 0.72rem; font-weight: 600; }
.kkm-legend-item { display: flex; align-items: center; gap: 0.3rem; }
.kkm-dot { width: 14px; height: 14px; border-radius: 4px; }
.kkm-dot-merah { background: var(--kkm-merah-bg); border: 1px solid var(--kkm-merah-text); }
.kkm-dot-biru  { background: var(--kkm-biru-bg);  border: 1px solid var(--kkm-biru-text);  }

/* ── KUNCI NILAI banner ───────────────────────────────────── */
.kunci-banner {
    display: flex; align-items: center; gap: 0.7rem;
    padding: 0.7rem 1rem; border-radius: var(--radius-sm);
    font-size: 0.82rem; font-weight: 600; margin-bottom: 1rem;
    border: 1.5px solid;
}
.kunci-banner.terkunci { background: #FDEAEA; border-color: var(--danger); color: #8B1A1A; }
.kunci-banner.terbuka  { background: var(--success-bg); border-color: var(--success); color: #2E6B2E; }

/* ── MINI BAR (dashboard) ─────────────────────────────────── */
.mini-bar-item { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.5rem; font-size: 0.75rem; }
.mini-bar-label { width: 90px; flex-shrink: 0; color: var(--text-muted); font-size: 0.72rem; }
.mini-bar-track { flex: 1; height: 10px; background: var(--border); border-radius: 20px; overflow: hidden; }
.mini-bar-fill  { height: 100%; border-radius: 20px; background: var(--primary); transition: width 0.5s ease; }
.mini-bar-val   { width: 30px; text-align: right; font-weight: 700; color: var(--text); font-size: 0.72rem; }

/* ── RESPONSIVE ───────────────────────────────────────────── */
@media (max-width: 768px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0); }
    .sidebar-overlay.open { display: block; }
    .main { margin-left: 0; }
    .hamburger { display: block; }
    .topbar-date { display: none; }
    .content { padding: 1rem; }
    .stat-grid { grid-template-columns: 1fr 1fr; }
    .form-row { grid-template-columns: 1fr; }
    .filter-bar { flex-direction: column; }
    .filter-bar .form-group { width: 100%; }
    .section-header { flex-direction: column; align-items: flex-start; }
    .modal { max-width: 100%; }
}
@media (max-width: 480px) {
    .stat-grid { grid-template-columns: 1fr; }
    .login-card { padding: 1.5rem 1.2rem; }
}

/* ── UTILITY ──────────────────────────────────────────────── */
.text-center  { text-align: center; }
.text-right   { text-align: right; }
.text-muted   { color: var(--text-muted); }
.text-small   { font-size: 0.75rem; }
.text-primary { color: var(--primary); }
.text-danger  { color: var(--danger); }
.text-success { color: var(--success); }
.fw-bold      { font-weight: 700; }
.d-flex       { display: flex; }
.align-center { align-items: center; }
.gap-sm       { gap: 0.4rem; }
.gap-md       { gap: 0.7rem; }
.mt-1         { margin-top: 0.5rem; }
.mt-2         { margin-top: 1rem; }
.mb-1         { margin-bottom: 0.5rem; }
.mb-2         { margin-bottom: 1rem; }
.divider      { border: none; border-top: 1px solid var(--border); margin: 1rem 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; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
