/* =====================================================
   schoolhub — shared stylesheet
   ===================================================== */:root {
    --royal-blue: #4F5FE8;
    --royal-blue-dark: #3D4BC7;
    --sky-blue: #38BDF8;
    --white: #FFFFFF;
    --light-gray: #F5F7FB;
    --border: #E7EAF3;
    --text-dark: #1E2436;
    --text-muted: #7C8598;
    --green: #16A34A;
    --green-bg: #DCFCE7;
    --orange: #EA8C0E;
    --orange-bg: #FEF3C7;
    --red: #E11D48;
    --red-bg: #FEE2E2;
    --purple: #8B5CF6;
    --purple-bg: #EDE9FE;
    --sky-bg: #E0F2FE;
    --radius: 16px;
    --shadow: 0 2px 10px rgba(30, 36, 54, 0.06);
}html[data-theme="dark"] {
    --white: #1A1C23;
    --light-gray: #0F1115;
    --border: #2A2E38;
    --text-dark: #F3F4F6;
    --text-muted: #9CA3AF;
    --sky-bg: #1E2436;
    --green-bg: #142B1F;
    --orange-bg: #2D261A;
    --red-bg: #2B1A1A;
    --purple-bg: #241A3D;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}* { box-sizing: border-box; }body {
    margin: 0;
    font-family: 'Segoe UI', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--light-gray);
    color: var(--text-dark);
}a { text-decoration: none; color: inherit; }ul { list-style: none; margin: 0; padding: 0; }/* ---------- App shell ---------- */.app { display: flex; min-height: 100vh; }.sidebar {
    width: 256px;
    background: var(--white);
    border-right: 1px solid var(--border);
    padding: 18px 14px;
    position: fixed;
    top: 0; bottom: 0; left: 0;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    transition: width .25s ease, transform .25s ease;
    z-index: 100;
    scrollbar-width: thin;
}.sidebar::-webkit-scrollbar { width: 6px; }.sidebar::-webkit-scrollbar-thumb { background: rgba(124,133,152,.35); border-radius: 10px; }.sidebar::-webkit-scrollbar-thumb:hover { background: rgba(124,133,152,.6); }.sidebar.dark {
    background: linear-gradient(180deg, var(--sb-main, #4F5FE8) 0%, var(--sb-mid, #3D4BC7) 52%, var(--sb-dark, #2E39A6) 100%);
    color: #fff; border-right: none;
}.sidebar-logo { display: flex; align-items: center; gap: 12px; padding: 6px 8px 16px; margin-bottom: 10px; border-bottom: 1px solid var(--border); }.sidebar.dark .sidebar-logo { border-bottom-color: rgba(255,255,255,.14); }.sidebar-logo .logo-icon {
    width: 42px; height: 42px; border-radius: 13px; flex-shrink: 0;
    background: linear-gradient(135deg, var(--sb-main, var(--royal-blue)), var(--sb-mid, #3D4BC7)); color: #fff;
    display: flex; align-items: center; justify-content: center; font-size: 20px;
    box-shadow: 0 8px 18px rgba(79,95,232,.35);
}.sidebar.dark .sidebar-logo .logo-icon { background: rgba(255,255,255,.16); box-shadow: none; }.sidebar-logo img { flex-shrink: 0; box-shadow: 0 6px 16px rgba(16,27,45,.2); }.sidebar-logo .brand { font-weight: 800; font-size: 16px; line-height: 1.15; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.sidebar-logo .brand small { display: block; font-weight: 500; font-size: 11px; color: var(--text-muted); margin-top: 2px; }.sidebar.dark .sidebar-logo .brand small { color: rgba(255,255,255,.72); }.nav-item {
    display: flex; align-items: center; gap: 12px;
    padding: 11px 14px; border-radius: 12px; margin-bottom: 3px;
    color: var(--text-muted); font-size: 14px; font-weight: 600;
    cursor: pointer; position: relative;
    transition: background .15s, color .15s, transform .12s;
}.sidebar.dark .nav-item { color: rgba(255,255,255,.78); }.nav-item:hover { background: var(--light-gray); color: var(--text-dark); transform: translateX(2px); }.sidebar.dark .nav-item:hover { background: rgba(255,255,255,.1); color: #fff; transform: none; }.nav-item.active { background: linear-gradient(135deg, var(--sb-main, var(--royal-blue)), var(--sb-mid, #3D4BC7)); color: #fff; box-shadow: 0 10px 20px rgba(79,95,232,.35); }.sidebar.dark .nav-item.active { background: rgba(255,255,255,.2); box-shadow: none; }.nav-item.active:before { content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%); width: 3px; height: 55%; border-radius: 0 4px 4px 0; background: #fff; }.nav-item i { width: 20px; text-align: center; font-size: 15px; }/* ---------- Sidebar category dropdowns ---------- */.nav-group { margin-bottom: 3px; }.nav-group-toggle {
    display: flex; align-items: center; gap: 12px; width: 100%;
    padding: 11px 14px; border: none; border-radius: 12px; margin-bottom: 3px;
    background: transparent; color: var(--text-muted); font-size: 14px;
    font-weight: 700; cursor: pointer; text-align: left; font-family: inherit;
    transition: background .15s, color .15s;
}.sidebar.dark .nav-group-toggle { color: rgba(255,255,255,.78); }.nav-group-toggle:hover { background: var(--light-gray); color: var(--text-dark); }.sidebar.dark .nav-group-toggle:hover { background: rgba(255,255,255,.1); color: #fff; }.nav-group-toggle i:first-child { width: 20px; text-align: center; font-size: 15px; }.nav-group-toggle .nav-chevron { margin-left: auto; font-size: 11px; transition: transform .2s ease; opacity: .7; }.nav-group.open .nav-group-toggle .nav-chevron { transform: rotate(180deg); }.nav-submenu {
    display: none;
    margin: 2px 0 4px 18px; padding-left: 12px; border-left: 1.5px solid var(--border);
}.sidebar.dark .nav-submenu { border-left-color: rgba(255,255,255,.16); }.nav-group.open .nav-submenu { display: block; animation: nav-submenu-in .18s ease; }@keyframes nav-submenu-in {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: none; }
}.nav-submenu .nav-item {
    padding: 9px 12px; margin-bottom: 2px; border-radius: 10px;
    font-size: 13px; font-weight: 500; color: var(--text-muted);
}.sidebar.dark .nav-submenu .nav-item { color: rgba(255,255,255,.68); }.nav-submenu .nav-item i { width: 17px; font-size: 12.5px; }.nav-submenu .nav-item:hover { background: var(--light-gray); color: var(--text-dark); }.sidebar.dark .nav-submenu .nav-item:hover { background: rgba(255,255,255,.08); color: #fff; }.nav-submenu .nav-item.active { background: rgba(79,95,232,.1); color: var(--sb-main, var(--royal-blue)); box-shadow: none; }.sidebar.dark .nav-submenu .nav-item.active { background: rgba(255,255,255,.18); color: #fff; }.nav-submenu .nav-item.active:before { display: none; }.sidebar-logout {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: auto;
    padding: 12px 14px;
    border-radius: 12px;
    color: var(--red);
    font-size: 14px;
    font-weight: 700;
    transition: background .15s;
}.sidebar-logout:hover { background: var(--red-bg); }.sidebar-logout i { width: 20px; text-align: center; font-size: 15px; }.sidebar.dark .sidebar-logout { color: #fff; background: rgba(255,255,255,.12); }.sidebar.dark .sidebar-logout:hover { background: rgba(225, 29, 72, .5); }/* ---------- Sidebar collapse (desktop rail) ---------- */.sidebar-toggle {
    display: flex; align-items: center; justify-content: center;
    flex: 0 0 auto; width: 40px; height: 40px; border-radius: 11px;
    border: 1px solid var(--border); background: var(--white);
    color: var(--text-muted); font-size: 15px; cursor: pointer;
    user-select: none; appearance: none; -webkit-appearance: none;
    transition: color .15s, border-color .15s, background .15s;
}.sidebar-toggle:hover { color: var(--sb-main, var(--royal-blue)); border-color: var(--sb-main, var(--royal-blue)); }.sidebar-backdrop {
    position: fixed; inset: 0; background: rgba(15,23,42,.45);
    opacity: 0; visibility: hidden; transition: opacity .25s ease, visibility .25s ease;
    z-index: 99;
}.sidebar-backdrop.show { opacity: 1; visibility: visible; }@media (min-width: 993px) {body.sidebar-collapsed .sidebar { width: 84px; padding-left: 12px; padding-right: 12px; }body.sidebar-collapsed .main { margin-left: 84px; }body.sidebar-collapsed .sidebar-logo { justify-content: center; padding-left: 0; padding-right: 0; }body.sidebar-collapsed .sidebar-logo .brand { display: none; }body.sidebar-collapsed .nav-item,
    body.sidebar-collapsed .nav-group-toggle { justify-content: center; gap: 0; padding: 13px 0; font-size: 0; }body.sidebar-collapsed .nav-item i,
    body.sidebar-collapsed .nav-group-toggle i:first-child { width: auto; font-size: 18px; }body.sidebar-collapsed .nav-group-toggle .nav-chevron { display: none; }body.sidebar-collapsed .nav-submenu { display: none !important; }body.sidebar-collapsed .nav-item.active:before { display: none; }body.sidebar-collapsed .sidebar-logout { justify-content: center; gap: 0; font-size: 0; padding: 13px 0; }body.sidebar-collapsed .sidebar-logout i { width: auto; font-size: 18px; }}@media (max-width: 992px) {.sidebar-toggle { display: none; }}.help-card {
    margin-top: 24px; padding: 16px; border-radius: var(--radius);
    background: var(--sky-bg);
}.help-card .btn { width: 100%; margin-top: 10px; }/* ---------- Login Page Specifics ---------- */.login-wrap {
    padding: 20px;}.login-card {
    max-width: 420px;
    text-align: center;}.login-card .logo-icon {
    background: var(--royal-blue);
    color: #fff;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;}.login-card h2 {
    margin: 0 0 8px;
    font-size: 24px;
    color: var(--text-dark);
}.login-card p {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 32px;
}.form-group {
    text-align: left;}.btn-primary {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s;}.alert-error {
    border: 1px solid var(--red);}.alert-success {
    border: 1px solid var(--green);}.login-footer {
    margin-top: 24px;
    font-size: 13px;
    color: var(--text-muted);
}.login-footer a {
    color: var(--royal-blue);
    font-weight: 600;
}/* ---------- Dashboard UI (Un-Bootstrap) ---------- */.main { margin-left: 256px; flex: 1; min-width: 0; transition: margin-left .25s ease; }.topbar-actions .topbar-theme-toggle {
    position: static;
    flex: 0 0 auto;
    width: 40px;
    height: 40px;
    margin-right: 6px;
    border: 1px solid var(--border);
    background: var(--white);
    color: var(--text-muted);
}.card {
    margin-bottom: 24px;
    overflow: hidden;}.card-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    background: #fff;
    font-weight: 600;
}.card-header h3 { color: var(--text-dark);}.card-body { padding: 20px; }.btn {
    transition: all .2s ease;}.btn-outline { border-color: var(--border);}.btn-outline:hover { background: var(--light-gray); border-color: var(--text-muted); }.form-row { margin-bottom: 20px;}.form-group label { color: var(--text-dark);}.form-control {
    transition: border-color .2s;}.form-control:focus { box-shadow: 0 0 0 3px rgba(79, 95, 232, 0.1);}.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    text-align: left;
}.data-table th {
    background: var(--light-gray);
    padding: 12px 16px;
    font-weight: 600;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
}.data-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    color: var(--text-dark);
}.data-table tr:hover { background: #fcfcfc; }.table-container {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 12px;
    margin-bottom: 24px;
    overflow: hidden;
    box-shadow: none; /* Removing shadow to reduce card-like feel */
}.table-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}.table-header h3 { margin: 0; font-size: 18px; color: var(--text-dark); }.alert {
    border-left: 4px solid transparent;}.alert-success { border-left-color: var(--green);}/* ---------- Dashboard KPIs ---------- */.kpi-card {
    padding: 20px;
    text-align: center;
    position: relative;
}.kpi-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin: 0 auto 12px;
}.kpi-label { font-size: 14px; font-weight: 500; color: var(--text-muted); margin-bottom: 4px; }.kpi-value { font-size: 28px; font-weight: 700; color: var(--text-dark); margin-bottom: 4px; }.kpi-sub { font-size: 12px; }.grid-2 {
    margin-bottom: 24px;}.alert-error { border-left-color: var(--red);}/* ---------- Responsive Tables (Stacked Card Layout) ----------
   IMPORTANT: this block must stay inside the @media query below.
   It was previously unwrapped, which made every .data-table render
   as stacked "cards" (hidden headers, one row per box) on ALL
   screen sizes, including desktop — not just mobile. */@media (max-width: 768px) {.table-wrap table.data-table {
        display: block;
        overflow-x: auto;
    }.table-wrap table.data-table thead {
        display: none; /* Hide headers on mobile */
    }.table-wrap table.data-table tr {
        display: block;
        margin-bottom: 16px;
        border: 1px solid var(--border);
        border-radius: var(--radius);
        background: var(--white);
        padding: 8px;
        box-shadow: var(--shadow);
    }.table-wrap table.data-table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 8px 12px;
        border-bottom: 1px solid var(--border);
        text-align: right;
    }.table-wrap table.data-table td:last-child {
        border-bottom: none;
    }.table-wrap table.data-table td::before {
        content: attr(data-label);
        font-weight: 600;
        text-align: left;
        color: var(--text-muted);
        margin-right: 12px;
    }}.topbar {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 28px; background: var(--white); border-bottom: 1px solid var(--border);
    position: sticky; top: 0; z-index: 50;
}.topbar .greeting h1 { font-size: 20px; margin: 0; }.topbar .greeting p { margin: 2px 0 0; color: var(--text-muted); font-size: 13.5px; }.topbar-actions { display: flex; align-items: center; gap: 18px; }.icon-btn { position: relative; font-size: 18px; color: var(--text-muted); cursor: pointer; }.icon-btn .badge {
    position: absolute; top: -6px; right: -8px; background: var(--red); color: #fff;
    font-size: 10px; font-weight: 700; border-radius: 50%; width: 17px; height: 17px;
    display: flex; align-items: center; justify-content: center;
}.profile { display: flex; align-items: center; gap: 10px; cursor: pointer; }.profile img { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; }.profile .name { font-weight: 600; font-size: 14px; }.profile .role { font-size: 12px; color: var(--text-muted); }.menu-toggle { display: none; font-size: 20px; cursor: pointer; background: none; border: none; flex: 0 0 auto; }.content { padding: 24px 28px 60px; }/* ---------- Cards / KPIs ---------- */.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 18px; margin-bottom: 20px; }.card {
    background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow);
    padding: 20px; border: 1px solid var(--border);
}.kpi-card .kpi-icon {
    width: 46px; height: 46px; border-radius: 12px; display: flex; align-items: center;
    justify-content: center; font-size: 20px; margin-bottom: 12px;
}.kpi-card .kpi-label { color: var(--text-muted); font-size: 13.5px; }.kpi-card .kpi-value { font-size: 26px; font-weight: 700; margin: 2px 0 6px; }.kpi-card .kpi-sub { font-size: 12.5px; }.bg-blue { background: #E9EBFC; color: var(--royal-blue); }.bg-green { background: var(--green-bg); color: var(--green); }.bg-orange { background: var(--orange-bg); color: var(--orange); }.bg-purple { background: var(--purple-bg); color: var(--purple); }.bg-sky { background: var(--sky-bg); color: #0284C7; }.bg-red { background: var(--red-bg); color: var(--red); }.text-green { color: var(--green); }.text-orange { color: var(--orange); }.text-red { color: var(--red); }.text-muted { color: var(--text-muted); }.grid-2 { display: grid; grid-template-columns: 2fr 1fr; gap: 18px; }.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }.grid-2 > *, .grid-3 > * { min-width: 0; }@media (max-width: 992px) {.grid-2, .grid-3 { grid-template-columns: 1fr; }}.card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }.card-header h3 { margin: 0; font-size: 16px; }.card-header a.view-all { font-size: 13px; color: var(--royal-blue); font-weight: 600; }/* ---------- Tables ---------- */.table-wrap { overflow-x: auto; }table.data-table { width: 100%; border-collapse: collapse; font-size: 14px; }table.data-table th {
    text-align: left; padding: 10px 12px; color: var(--text-muted); font-weight: 600;
    border-bottom: 1px solid var(--border); font-size: 12.5px; text-transform: uppercase;
}table.data-table td { padding: 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }table.data-table tr:last-child td { border-bottom: none; }.badge-pill {
    display: inline-block; padding: 4px 12px; border-radius: 999px; font-size: 12px; font-weight: 600;
}/* ---------- Buttons & forms ---------- */.btn {
    display: inline-flex; align-items: center; gap: 8px; justify-content: center;
    padding: 10px 18px; border-radius: 10px; font-size: 14px; font-weight: 600;
    border: none; cursor: pointer; text-decoration: none;
}.btn-primary { background: var(--royal-blue); color: #fff; }.btn-primary:hover { background: var(--royal-blue-dark); }.btn-outline { background: #fff; border: 1px solid var(--border); color: var(--text-dark); }.btn-danger { background: var(--red-bg); color: var(--red); }.btn-sm { padding: 6px 12px; font-size: 12.5px; }.form-group { margin-bottom: 16px; }.form-group label { display: block; font-size: 13.5px; font-weight: 600; margin-bottom: 6px; }.form-control {
    width: 100%; padding: 10px 14px; border-radius: 10px; border: 1px solid var(--border);
    font-size: 14px; font-family: inherit; background: #fff;
}.form-control:focus { outline: none; border-color: var(--royal-blue); }.form-row { grid-template-columns: 1fr 1fr;}@media (max-width: 768px) {.form-row { grid-template-columns: 1fr; }}.alert { padding: 12px 16px; border-radius: 10px; font-size: 14px; margin-bottom: 18px; }.alert-success { background: var(--green-bg); color: var(--green); }.alert-error { background: var(--red-bg); color: var(--red); }.search-bar { flex: 1; max-width: 420px; }.search-bar input {
    width: 100%; padding: 10px 16px; border-radius: 10px; border: 1px solid var(--border); background: var(--light-gray);
}/* ---------- Login page ---------- */.login-wrap {
    min-height: 100vh; display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--royal-blue), var(--sky-blue));
}.login-card {
    background: #fff; border-radius: 20px; padding: 40px; width: 380px; box-shadow: 0 10px 40px rgba(0,0,0,.15);
}.login-card .logo-icon { width: 52px; height: 52px; font-size: 24px; margin: 0 auto 14px; }/* ---------- Responsive ---------- */@media (max-width: 992px) {.sidebar { transform: translateX(-100%); }.sidebar.open { transform: translateX(0); }.main { margin-left: 0; }.menu-toggle { display: block; }}/* Phone-first refinements for all dashboards and forms. */@media (max-width: 600px) {html, body { overflow-x: hidden; }.topbar { padding: 11px 14px; gap: 10px; }.topbar .greeting h1 { font-size: 16px; }.topbar .greeting p, .profile > div { display: none; }.topbar-actions { gap: 12px; }.profile img { width: 32px; height: 32px; }.content { padding: 16px 14px 42px; }.card { margin-bottom: 16px; border-radius: 12px; }.card-header { padding: 13px 14px; }.card-header h3 { font-size: 16px; }.kpi-grid { grid-template-columns: 1fr !important; gap: 12px; }.form-row { gap: 0; margin-bottom: 0; }.form-control { min-height: 42px; font-size: 16px; }.btn { min-height: 42px; }.sidebar { width: min(86vw, 300px); padding: 16px 12px; }}/* =====================================================
   Branded Login Page (auth-shell) — classic split-screen,
   admin-configurable via school_settings, light/dark aware.
   Scoped under its own class names so it never touches the
   older .login-wrap / .login-card used by forgot-password,
   2FA, and the legacy login_backup page.
   ===================================================== */html[data-theme="dark"] {
    --auth-bg: #0F1115;
    --auth-panel-bg: #14161C;
    --auth-card-bg: rgba(24, 26, 33, 0.92);
    --auth-text: #F3F4F6;
    --auth-muted: #9CA3AF;
    --auth-border: #2A2E38;
    --auth-input-bg: #1B1E26;
}html[data-theme="light"] {
    --auth-bg: #F5F7FB;
    --auth-panel-bg: #FFFFFF;
    --auth-card-bg: rgba(255, 255, 255, 0.96);
    --auth-text: #1E2436;
    --auth-muted: #7C8598;
    --auth-border: #E7EAF3;
    --auth-input-bg: #FFFFFF;
}.auth-shell {
    min-height: 100vh;
    display: flex;
    background: var(--auth-bg);
    transition: background .25s ease;
}.theme-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 20;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid var(--auth-border);
    background: var(--auth-panel-bg);
    color: var(--auth-text);
    font-size: 17px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0,0,0,.12);
    transition: transform .15s ease;
}.theme-toggle:hover { transform: scale(1.07); }/* Left — full-bleed branding panel */.auth-brand {
    position: relative;
    flex: 1.1;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background-size: cover;
    background-position: center;
    overflow: hidden;
}.auth-brand-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(10,12,20,.45) 0%, rgba(10,12,20,.75) 100%);
}.auth-brand-content {
    position: relative;
    z-index: 2;
    max-width: 440px;
    padding: 40px;
    text-align: center;
    color: #fff;
}.auth-brand-logo {
    width: 88px;
    height: 88px;
    border-radius: 22px;
    background: rgba(255,255,255,.15);
    border: 1px solid rgba(255,255,255,.3);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    overflow: hidden;
    font-size: 40px;
}.auth-brand-logo img { width: 100%; height: 100%; object-fit: cover; }.auth-brand-content h1 {
    font-size: 28px;
    margin: 0 0 6px;
    font-weight: 700;
    text-shadow: 0 2px 12px rgba(0,0,0,.25);
}.auth-brand-content .auth-tagline {
    font-size: 14.5px;
    opacity: .85;
    margin: 0 0 20px;
    text-transform: uppercase;
    letter-spacing: .06em;
}.auth-brand-content .auth-welcome {
    font-size: 16px;
    line-height: 1.6;
    opacity: .92;
    margin: 0 0 30px;
}.auth-socials {
    display: flex;
    gap: 14px;
    justify-content: center;
    margin-bottom: 16px;
}.auth-socials a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,.15);
    border: 1px solid rgba(255,255,255,.3);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: background .15s ease;
}.auth-socials a:hover { background: rgba(255,255,255,.3); }.auth-contact {
    font-size: 13.5px;
    opacity: .8;
    display: flex;
    flex-direction: column;
    gap: 4px;
}.auth-contact a { color: #fff; text-decoration: none; }/* Right — sign-in panel */.auth-panel {
    flex: 0.85;
    min-width: 380px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--auth-panel-bg);
    padding: 40px 24px;
}.auth-form-wrap { width: 100%; max-width: 380px; }.auth-form-logo-mobile { display: none; text-align: center; margin-bottom: 24px; }.auth-form-logo-mobile img { width: 56px; height: 56px; border-radius: 14px; object-fit: cover; }.auth-form-logo-mobile .auth-fallback-icon {
    width: 56px; height: 56px; border-radius: 14px; margin: 0 auto;
    display: flex; align-items: center; justify-content: center; font-size: 26px; color: #fff;
    background: linear-gradient(135deg, var(--auth-primary, #4F5FE8), var(--auth-secondary, #38BDF8));
}.auth-form-wrap h2 { margin: 0 0 6px; font-size: 24px; color: var(--auth-text); }.auth-form-wrap > p.auth-subtitle { margin: 0 0 28px; color: var(--auth-muted); font-size: 14.5px; }.auth-form-wrap .form-group label { color: var(--auth-text); }.auth-form-wrap .form-control {
    background: var(--auth-input-bg);
    border-color: var(--auth-border);
    color: var(--auth-text);
}.auth-form-wrap .form-control::placeholder { color: var(--auth-muted); }.auth-btn-primary {
    width: 100%;
    padding: 13px;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 15px;
    color: #fff;
    cursor: pointer;
    background: linear-gradient(135deg, var(--auth-primary, #4F5FE8), var(--auth-secondary, #38BDF8));
    transition: filter .15s ease;
}.auth-btn-primary:hover { filter: brightness(1.06); }.auth-footer-links {
    margin-top: 22px;
    text-align: center;
    font-size: 13.5px;
    color: var(--auth-muted);
}.auth-footer-links a { color: var(--auth-primary, #4F5FE8); font-weight: 600; text-decoration: none; }@media (max-width: 860px) {.auth-brand { display: none; }.auth-panel { flex: 1; min-width: 0; }.auth-form-logo-mobile { display: block; }}/* ---------- Printable student fee invoice ---------- */.invoice-sheet {
    --inv-primary: #0b315f;
    --inv-secondary: #c9a227;
    --ink: #1a2332;
    --muted: #5c6b7a;
    --line: #e2e8f0;
    --soft: #f4f7fb;
    background: #fff; color: var(--ink);
    border: 1px solid rgba(15, 23, 42, 0.06); border-radius: 18px;
    padding: 0 32px 26px; max-width: 820px; margin: 0 auto;
    font-family: 'Plus Jakarta Sans', 'Segoe UI', system-ui, sans-serif;
    font-size: 13.5px; line-height: 1.5;
    position: relative; overflow: hidden;
    box-shadow: 0 18px 50px rgba(15, 23, 42, 0.12);
    -webkit-print-color-adjust: exact; print-color-adjust: exact;
}.invoice-sheet::before {
    content: ""; position: absolute; inset: 12px;
    border: 1px dashed rgba(15, 23, 42, 0.08); border-radius: 12px; pointer-events: none; z-index: 0;
}.invoice-sheet .inv-band { height: 8px; margin: 0 -32px; background: linear-gradient(90deg, var(--inv-primary), var(--inv-secondary)); }.invoice-sheet .inv-watermark {
    position: absolute; right: 40px; top: 130px; font-size: 64px; font-weight: 800;
    color: rgba(11, 49, 95, 0.045); transform: rotate(-18deg); pointer-events: none; z-index: 0;
    letter-spacing: 0.08em; text-transform: uppercase;
}.invoice-sheet .inv-head { position: relative; z-index: 1; padding: 28px 4px 16px; }.invoice-sheet .inv-brand { display: flex; gap: 16px; align-items: center; justify-content: center; text-align: center; flex-wrap: wrap; }.invoice-sheet .inv-logo { width: 74px; height: 74px; object-fit: contain; border-radius: 12px; background: var(--soft); padding: 6px; border: 1px solid var(--line); }.invoice-sheet .inv-brand h1 { margin: 0; font-size: 21px; text-transform: uppercase; letter-spacing: 0.02em; color: var(--inv-primary); line-height: 1.2; }.invoice-sheet .inv-brand p { margin: 3px 0 0; font-style: normal; font-size: 12px; color: var(--muted); }.invoice-sheet .inv-contact { font-style: normal !important; font-size: 11px !important; }.invoice-sheet .inv-titlebar {
    position: relative; z-index: 1; margin: 0 0 18px;
    background: var(--inv-primary); color: #fff; border-radius: 12px;
    padding: 13px 18px; display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap;
}.invoice-sheet .inv-titlebar h2 { margin: 0; font-size: 15px; letter-spacing: 0.12em; text-transform: uppercase; font-weight: 700; }.invoice-sheet .inv-titlebar .inv-no { font-size: 13px; opacity: 0.95; font-weight: 600; }.invoice-sheet .inv-meta {
    position: relative; z-index: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 10px 26px;
    background: var(--soft); border: 1px solid var(--line); border-radius: 12px; padding: 15px 18px; margin-bottom: 20px;
}.invoice-sheet .inv-meta .inv-item label { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin-bottom: 2px; font-weight: 600; }.invoice-sheet .inv-meta .inv-item span { font-size: 14px; font-weight: 600; color: var(--ink); }.invoice-sheet .inv-table { position: relative; z-index: 1; width: 100%; border-collapse: collapse; margin-bottom: 18px; }.invoice-sheet .inv-table thead th {
    background: #f1f5f9; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em;
    padding: 11px 12px; text-align: left; border-bottom: 2px solid var(--line);
}.invoice-sheet .inv-table tbody td { padding: 10px 12px; border-bottom: 1px solid var(--line); font-size: 13.5px; vertical-align: top; }.invoice-sheet .inv-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }.invoice-sheet .inv-table tr.inv-total td { background: var(--inv-primary); color: #fff; font-weight: 700; font-size: 13.5px; }.invoice-sheet .inv-note { color: var(--muted); font-size: 11.5px; }.invoice-sheet .inv-totals { position: relative; z-index: 1; display: grid; grid-template-columns: 1.2fr 1fr; gap: 16px; align-items: start; margin-top: 6px; }.invoice-sheet .inv-notes {
    font-size: 12px; color: var(--muted); line-height: 1.55;
    background: #fffbeb; border: 1px solid #fde68a; border-radius: 12px; padding: 12px 14px;
}.invoice-sheet .inv-notes strong { color: #92400e; }.invoice-sheet .inv-due {
    background: linear-gradient(145deg, var(--inv-primary), #1e4a7a); color: #fff;
    border-radius: 14px; padding: 15px 18px; box-shadow: 0 10px 24px rgba(11, 49, 95, 0.25);
}.invoice-sheet .inv-due .label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; opacity: 0.85; margin-bottom: 4px; }.invoice-sheet .inv-due .value { font-size: 24px; font-weight: 800; letter-spacing: -0.02em; }.invoice-sheet .inv-due .sub { display: flex; justify-content: space-between; font-size: 12px; opacity: 0.92; border-top: 1px solid rgba(255, 255, 255, 0.18); padding-top: 8px; margin-top: 8px; gap: 8px; }.invoice-sheet .inv-sign { position: relative; z-index: 1; display: flex; justify-content: space-between; gap: 24px; margin-top: 34px; }.invoice-sheet .inv-sign .inv-sign-item { text-align: center; width: 220px; color: var(--muted); font-size: 12px; }.invoice-sheet .inv-sign .inv-line { border-top: 1px solid #94a3b8; margin: 30px 10px 8px; }.invoice-sheet .inv-foot { position: relative; z-index: 1; margin-top: 22px; text-align: center; font-size: 11.5px; color: var(--muted); }.invoice-sheet .inv-credit { position: relative; z-index: 1; text-align: center; font-size: 11px; color: var(--muted); border-top: 1px solid var(--line); margin-top: 20px; padding-top: 10px; }/* One-page A4 student billing print: compact, readable and receipt-friendly. */@page { size: A4 portrait; margin: 9mm; }@media print {.invoice-sheet { width: 100%; max-width: none; min-height: 0; padding: 0 12px 10px; border: 0; border-radius: 0; box-shadow: none; font-size: 10px; line-height: 1.25; }.invoice-sheet::before, .invoice-sheet .inv-watermark { display: none; }.invoice-sheet .inv-band { height: 4px; margin: 0 -12px; }.invoice-sheet .inv-head { padding: 10px 2px 7px; }.invoice-sheet .inv-logo { width: 46px; height: 46px; padding: 3px; border-radius: 6px; }.invoice-sheet .inv-brand { gap: 8px; }.invoice-sheet .inv-brand h1 { font-size: 15px; }.invoice-sheet .inv-brand p { font-size: 8.5px; margin: 1px 0 0; }.invoice-sheet .inv-contact { font-size: 8px !important; }.invoice-sheet .inv-titlebar { margin-bottom: 7px; border-radius: 5px; padding: 6px 9px; }.invoice-sheet .inv-titlebar h2 { font-size: 10px; }.invoice-sheet .inv-titlebar .inv-no { font-size: 9px; }.invoice-sheet .inv-meta { gap: 4px 12px; padding: 7px 9px; margin-bottom: 8px; border-radius: 5px; }.invoice-sheet .inv-meta .inv-item label { font-size: 7.5px; margin-bottom: 1px; }.invoice-sheet .inv-meta .inv-item span { font-size: 9px; }.invoice-sheet .inv-table { margin-bottom: 7px; }.invoice-sheet .inv-table thead th { padding: 5px 6px; font-size: 7.5px; }.invoice-sheet .inv-table tbody td { padding: 4px 6px; font-size: 8.5px; }.invoice-sheet .inv-note { font-size: 7.5px; }.invoice-sheet .inv-totals { gap: 8px; margin-top: 3px; }.invoice-sheet .inv-notes { font-size: 8px; line-height: 1.3; padding: 7px 8px; border-radius: 5px; }.invoice-sheet .inv-due { border-radius: 6px; padding: 8px 10px; box-shadow: none; }.invoice-sheet .inv-due .label { font-size: 7px; margin-bottom: 2px; }.invoice-sheet .inv-due .value { font-size: 15px; }.invoice-sheet .inv-due .sub { font-size: 7.5px; padding-top: 4px; margin-top: 4px; }.invoice-sheet .inv-payments { margin-top: 6px; }.invoice-sheet .inv-section-title { font-size: 8px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 3px; }.invoice-sheet .inv-mini-table { width: 100%; border-collapse: collapse; }.invoice-sheet .inv-mini-table th, .invoice-sheet .inv-mini-table td { border-bottom: 1px solid var(--line); padding: 3px 5px; font-size: 7.5px; }.invoice-sheet .inv-mini-table th { text-transform: uppercase; color: var(--muted); font-size: 7px; text-align: left; }.invoice-sheet .inv-mini-table .num { text-align: right; white-space: nowrap; }.invoice-sheet .inv-sign { margin-top: 10px; gap: 14px; }.invoice-sheet .inv-sign .inv-sign-item { width: 160px; font-size: 8px; }.invoice-sheet .inv-sign .inv-line { margin: 12px 6px 4px; }.invoice-sheet .inv-foot { margin-top: 8px; font-size: 7px; }.invoice-sheet .inv-credit { margin-top: 7px; padding-top: 4px; font-size: 7px; }}/* =====================================================
   Printable payment receipt
   Reuses the .invoice-sheet / .inv-* design language so a receipt and an
   invoice printed from the same school look like one document family.
   ===================================================== */.receipt-sheet { max-width: 720px; }.receipt-sheet .inv-watermark { font-size: 52px; right: 30px; top: 150px; }.receipt-sheet .inv-words {
    position: relative; z-index: 1; margin: -8px 0 18px; padding: 9px 14px;
    background: var(--soft); border: 1px dashed var(--line); border-radius: 10px;
    font-size: 12px; color: var(--ink); font-style: italic;
}.receipt-sheet .inv-words b { font-style: normal; text-transform: uppercase; letter-spacing: .06em; font-size: 10px; color: var(--muted); display: block; margin-bottom: 2px; }.receipt-sheet .rc-status {
    display: inline-flex; align-items: center; gap: 6px; margin-top: 6px;
    padding: 3px 11px; border-radius: 999px; font-size: 10.5px; font-weight: 800;
    letter-spacing: .1em; text-transform: uppercase;
}.receipt-sheet .rc-status.valid { background: #dcfce7; color: #15803d; }.receipt-sheet .rc-status.reversed { background: #fee2e2; color: #b91c1c; }.receipt-sheet .inv-verify {
    position: relative; z-index: 1; display: flex; align-items: center; gap: 14px;
    border: 1px solid var(--line); border-radius: 12px; padding: 13px 16px; margin-bottom: 4px;
}.receipt-sheet .inv-verify .rc-qr {
    width: 78px; height: 78px; flex: 0 0 78px; display: flex; align-items: center; justify-content: center;
    background: #fff; border: 1px solid var(--line); border-radius: 8px; overflow: hidden;
}.receipt-sheet .inv-verify .rc-qr img, .receipt-sheet .inv-verify .rc-qr canvas { width: 100% !important; height: 100% !important; image-rendering: pixelated; }.receipt-sheet .inv-verify .rc-code { font-family: 'SFMono-Regular', Consolas, 'Courier New', monospace; font-size: 16px; font-weight: 700; letter-spacing: .12em; color: var(--inv-primary); }.receipt-sheet .inv-verify .rc-hint { font-size: 11px; color: var(--muted); margin-top: 3px; }.receipt-sheet .inv-verify a { color: var(--inv-primary); font-weight: 600; }.receipt-sheet .inv-stamp {
    position: absolute; right: 26px; top: 172px; z-index: 3; transform: rotate(-14deg);
    border: 3px double #b91c1c; color: #b91c1c; padding: 5px 16px; border-radius: 8px;
    font-size: 17px; font-weight: 900; letter-spacing: .16em; text-transform: uppercase;
    opacity: .72; pointer-events: none;
}.receipt-sheet .inv-reversed td, .receipt-sheet .inv-reversed th { text-decoration: line-through; opacity: .65; }.receipt-bar { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin: 16px 0 4px; }@media print {.receipt-bar { display: none !important; }.receipt-sheet .inv-watermark, .receipt-sheet .inv-stamp { display: none; }.receipt-sheet .inv-verify .rc-qr { width: 54px; height: 54px; flex-basis: 54px; }.receipt-sheet .inv-verify .rc-code { font-size: 11px; }.receipt-sheet .inv-words { margin: -4px 0 8px; padding: 5px 8px; font-size: 8px; }.receipt-sheet .rc-status { font-size: 7.5px; padding: 2px 7px; }.receipt-sheet .inv-stamp { display: block; font-size: 11px; padding: 3px 9px; }}@media (max-width: 640px) {.invoice-sheet .inv-meta { grid-template-columns: 1fr; }.invoice-sheet .inv-totals { grid-template-columns: 1fr; }.invoice-sheet .inv-sign { flex-direction: column; align-items: center; }.invoice-sheet .inv-titlebar { justify-content: center; text-align: center; }.receipt-sheet .inv-verify { flex-direction: column; text-align: center; }}/* =====================================================
   Login design variants � school_settings.login_design.
   Same secure form & logic on every variant (auth pages
   only change presentation via this body class).
   split    = current split-screen (default)
   centered = one card over the branding background
   glass    = glass card over an animated gradient
   ===================================================== */body.auth-design-split {}/* default � handled by .auth-shell rules above *//* ---------- Centered card over branding background ---------- */body.auth-design-centered .auth-shell {
    position: relative;
    align-items: center;
    justify-content: center;
}body.auth-design-centered .auth-brand {
    position: absolute;
    inset: 0;
    z-index: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}body.auth-design-centered .auth-brand .auth-brand-content,
body.auth-design-centered .auth-brand .auth-socials,
body.auth-design-centered .auth-brand .auth-contact { display: none; }body.auth-design-centered .auth-panel {
    position: relative;
    z-index: 1;
    flex: 1;
    min-width: 0;
    background: transparent;
    padding: 80px 20px;
}body.auth-design-centered .auth-form-wrap {
    margin: 0 auto;
    max-width: 400px;
    background: var(--auth-card-bg);
    border: 1px solid var(--auth-border);
    border-radius: 18px;
    padding: 36px 32px;
    box-shadow: 0 24px 60px rgba(0,0,0,.28);
    backdrop-filter: blur(10px);
}body.auth-design-centered .auth-form-logo-mobile { display: block; }@media (max-width: 860px) {body.auth-design-centered .auth-brand { display: none; }}/* ---------- Glass card over animated gradient ---------- */body.auth-design-glass .auth-shell {
    align-items: center;
    justify-content: center;
    padding: 40px 16px;
    background: linear-gradient(150deg, var(--auth-primary,#4F5FE8), var(--auth-secondary,#38BDF8) 55%, #0ea5e9);
    background-size: 240% 240%;
    animation: auth-glass-shift 14s ease infinite;
}@keyframes auth-glass-shift {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}body.auth-design-glass .auth-brand { display: none; }body.auth-design-glass .auth-panel { flex: 1; min-width: 0; background: transparent; padding: 80px 20px; }body.auth-design-glass .auth-form-wrap {
    margin: 0 auto;
    max-width: 400px;
    background: rgba(255,255,255,.13);
    border: 1px solid rgba(255,255,255,.3);
    border-radius: 20px;
    padding: 40px 34px;
    backdrop-filter: blur(18px) saturate(1.4);
    -webkit-backdrop-filter: blur(18px) saturate(1.4);
    box-shadow: 0 26px 70px rgba(0,0,0,.35);
}body.auth-design-glass .auth-form-logo-mobile { display: block; }body.auth-design-glass .auth-form-logo-mobile img { border: 2px solid rgba(255,255,255,.4); }body.auth-design-glass .auth-fallback-icon {
    background: rgba(255,255,255,.2); color: #fff;
    border: 1px solid rgba(255,255,255,.35);
}body.auth-design-glass .auth-form-wrap h2 { color: #fff; }body.auth-design-glass .auth-form-wrap p.auth-subtitle { color: rgba(255,255,255,.85); }body.auth-design-glass .auth-form-wrap .form-group label { color: #fff; }body.auth-design-glass .auth-form-wrap .form-control {
    background: rgba(255,255,255,.18);
    border-color: rgba(255,255,255,.32);
    color: #fff;
}body.auth-design-glass .auth-form-wrap .form-control::placeholder { color: rgba(255,255,255,.6); }body.auth-design-glass .auth-btn-primary { background: #fff; color: #1e293b; }body.auth-design-glass .auth-btn-primary:hover { filter: brightness(.97); }body.auth-design-glass .auth-footer-links { color: rgba(255,255,255,.85); }body.auth-design-glass .auth-footer-links a { color: #fff; text-decoration: underline; }body.auth-design-glass .auth-manage-note { color: rgba(255,255,255,.75) !important; }body.auth-design-glass .alert-error {
    background: rgba(185,28,28,.55);
    color: #fecaca;
    border-color: rgba(255,255,255,.25);
}@media (max-width: 860px) {body.auth-design-glass .auth-shell { padding: 24px 14px; }body.auth-design-glass .auth-panel { padding: 60px 0; }}/* =====================================================
   Password reveal toggle — shared by every page with a
   password field under auth/ (data-target = input id).
   ===================================================== */.pass-field { position: relative; }.pass-field .form-control { padding-right: 3rem; }.pass-toggle {
    position: absolute;
    top: 50%;
    right: 6px;
    transform: translateY(-50%);
    width: 38px;
    height: 38px;
    border: 0;
    background: transparent;
    color: var(--text-muted, #94a3b8);
    cursor: pointer;
    border-radius: 10px;
    display: grid;
    place-items: center;
    font-size: 15px;
    transition: color .15s, background .15s;
}.pass-toggle:hover { color: var(--auth-primary, #4F5FE8); background: rgba(79, 95, 232, .08); }body.auth-design-glass .pass-toggle { color: rgba(255, 255, 255, .7); }body.auth-design-glass .pass-toggle:hover { background: rgba(255, 255, 255, .18); color: #fff; }/* =====================================================
   Website + social links row inside the auth form panel.
   Shown on every login design so visitors always have a
   way back to the school website and its social pages.
   ===================================================== */.auth-connect {
    margin-top: 1.4rem;
    padding-top: 1.2rem;
    border-top: 1px solid var(--auth-border, #e5e9ef);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 10px 14px;
}.auth-connect-site {
    color: var(--auth-primary, #4F5FE8);
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 7px;
}.auth-connect-site:hover { text-decoration: underline; }.auth-connect-label { font-size: 11.5px; color: var(--text-muted, #8a97a6); text-transform: uppercase; letter-spacing: 1px; }.auth-connect-socials { display: inline-flex; gap: 8px; }.auth-connect-socials a {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid var(--auth-border, #e5e9ef);
    color: var(--auth-primary, #4F5FE8);
    display: grid;
    place-items: center;
    font-size: 14px;
    transition: .2s;
}.auth-connect-socials a:hover { background: var(--auth-primary, #4F5FE8); color: #fff; border-color: var(--auth-primary, #4F5FE8); }body.auth-design-glass .auth-connect { border-top-color: rgba(255, 255, 255, .25); }body.auth-design-glass .auth-connect-site { color: #fff; }body.auth-design-glass .auth-connect-label { color: rgba(255, 255, 255, .7); }body.auth-design-glass .auth-connect-socials a { background: rgba(255, 255, 255, .16); border-color: rgba(255, 255, 255, .35); color: #fff; }body.auth-design-glass .auth-connect-socials a:hover { background: #fff; color: #1e293b; border-color: #fff; }/* =====================================================
   Compact footer for auth pages — system (school) name,
   copyright, and the platform-configured company credit.
   ===================================================== */.auth-page-footer {
    position: relative;
    z-index: 5;
    display: flex;
    flex-wrap: wrap;
    gap: 6px 14px;
    justify-content: center;
    padding: 18px 16px 26px;
    font-size: 12px;
    color: var(--text-muted, #8a97a6);
    text-align: center;
}.auth-page-footer a { color: inherit; text-decoration: underline; }.auth-page-footer .auth-page-power { opacity: .85; }body.auth-design-glass .auth-page-footer { color: rgba(255, 255, 255, .7); }/* =====================================================
   Loading overlay for slow actions (forms class="js-loading")
   ===================================================== */.js-loading-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, .45);
    backdrop-filter: blur(2px);
}.js-loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    padding: 26px 40px;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 12px 40px rgba(15, 23, 42, .25);
}.js-loading-spinner .spinner {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 4px solid var(--border, #E7EAF3);
    border-top-color: var(--royal-blue, #4F5FE8);
    animation: js-spin .8s linear infinite;
}.js-loading-text { font-size: 14px; color: var(--text-dark, #1E2436); font-weight: 600; }@keyframes js-spin { to { transform: rotate(360deg); } }/* =====================================================
     Finance & receivables components
     -----------------------------------------------------
     The money screens needed four things the dashboard kit
     never had: a collection meter, an arrears-ageing
     distribution, severity chips for how late a family is,
     and a selection guardrail on a bulk send. They live in
     one place so the fee desk, the student ledger and the
     reminder page read as one product rather than three
     pages that happen to sit in the same menu.

     Also defined below are primitives that several pages
     already write in their markup but which had no rule
     anywhere in the project: .muted, .small, .table, .num,
     .field, .card-footer, .check-inline, .btn-secondary,
     .btn-xs, .alert-warning, .badge-warning. Those were
     rendering as unstyled divs - the reminder page's
     progress bars had no height or background, so the
     collection rate was invisible. Colours come only from
     the tokens above, so the dark theme keeps working.
     ===================================================== *//* ---------- page frame ---------- */.page-wrap { max-width: 1280px; margin: 0 auto; padding: 22px 20px 48px; }.page-header {
      display: flex; align-items: flex-start; justify-content: space-between;
      gap: 16px; flex-wrap: wrap; margin-bottom: 20px;
  }.page-header h1 { margin: 0 0 4px; font-size: 24px; letter-spacing: -0.2px; }.page-header p { margin: 0; max-width: 74ch; line-height: 1.55; }.page-header-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }/* Let the card's own header/body/footer own their padding. Without this the
     later .card rule's own padding double-insets every section. */.page-wrap .card { padding: 0; }.page-wrap .card > .card-header:first-child { border-radius: var(--radius) var(--radius) 0 0; }/* ---------- typography primitives ---------- */.muted { color: var(--text-muted); }.small { font-size: 12.5px; line-height: 1.45; }.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }.num strong { font-weight: 700; }/* Visible to a screen reader, invisible on screen. Used for the labels on the
     filter controls and the empty table headers, which are real labels that
     would otherwise be noise sitting in the layout. */.sr-only {
      position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
      overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
  }/* ---------- money stat tiles ---------- */.stat-grid {
      display: grid; gap: 14px;
      grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  }.stat-card {
      background: var(--light-gray); border: 1px solid var(--border);
      border-radius: 14px; padding: 16px 18px;
  }.stat-label {
      font-size: 11.5px; font-weight: 700; letter-spacing: 0.7px;
      text-transform: uppercase; color: var(--text-muted); margin-bottom: 6px;
  }.stat-value {
      font-size: 26px; font-weight: 700; letter-spacing: -0.5px;
      line-height: 1.15; font-variant-numeric: tabular-nums;
  }.stat-sub { font-size: 12.5px; color: var(--text-muted); margin-top: 4px; }/* ---------- collection meter ---------- */.progress {
      height: 8px; background: var(--border); border-radius: 999px;
      overflow: hidden; margin-top: 12px;
  }.progress-bar { height: 100%; border-radius: 999px; background: var(--royal-blue); }.progress-bar.tone-good { background: var(--green); }.progress-bar.tone-warn { background: var(--orange); }.progress-bar.tone-bad  { background: var(--red); }/* ---------- arrears ageing distribution ----------
     A receivables page is read for shape before it is read
     for totals. Seven numbers in a row hide the one thing
     that matters - whether the debt is fresh or rotting - so
     each row carries a bar whose segments are the buckets. */.aging-bar {
      display: flex; height: 10px; min-width: 180px;
      border-radius: 999px; overflow: hidden; background: var(--border);
  }.aging-seg { height: 100%; }.aging-seg.s-undue  { background: #A5B4FC; }.aging-seg.s-30     { background: #818CF8; }.aging-seg.s-60     { background: var(--sky-blue); }.aging-seg.s-90     { background: var(--orange); }.aging-seg.s-90plus { background: var(--red); }.aging-seg.s-undated { background: var(--text-muted); }.aging-legend {
      display: flex; gap: 14px; flex-wrap: wrap;
      font-size: 12px; color: var(--text-muted); margin-top: 10px;
  }.aging-legend span { display: inline-flex; align-items: center; gap: 6px; }.aging-legend i {
      width: 9px; height: 9px; border-radius: 3px; display: inline-block;
  }/* ---------- tables ----------
     .table-wrap table.data-table is the existing convention.
     .table is the same look under the other name, because the
     finance pages were written against it. */.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }.table { width: 100%; border-collapse: collapse; font-size: 14px; }.table th {
      text-align: left; padding: 11px 12px; color: var(--text-muted);
      font-weight: 700; font-size: 11.5px; letter-spacing: 0.6px;
      text-transform: uppercase; border-bottom: 1px solid var(--border);
      background: var(--white); position: sticky; top: 0; z-index: 1;
  }.table th.num { text-align: right; }.table td { padding: 11px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }.table tbody tr:last-child td { border-bottom: none; }.table tbody tr:hover td { background: var(--light-gray); }.table .check-col { width: 34px; padding-right: 0; }.table .check-col input { width: 16px; height: 16px; cursor: pointer; }/* Worst arrears at the top of the list, flagged in the row itself, so the eye
     lands on the money that is actually rotting rather than on the newest debt. */.table tr.sev-high td { background: color-mix(in srgb, var(--red-bg) 55%, transparent); }.table tr.sev-mid td  { background: color-mix(in srgb, var(--orange-bg) 40%, transparent); }.table tr.sev-high:hover td,
  .table tr.sev-mid:hover td { background: var(--light-gray); }.table td .stack { display: flex; flex-direction: column; gap: 3px; }.table td .row-act { text-align: right; white-space: nowrap; }/* ---------- severity chips ---------- */.badge-warning { background: var(--orange-bg); color: var(--orange); }.badge-danger  { background: var(--red-bg);    color: var(--red); }.badge-success { background: var(--green-bg);  color: var(--green); }.badge-secondary { background: var(--border);  color: var(--text-muted); }.badge-info     { background: var(--sky-bg);   color: var(--royal-blue-dark); }.nowrap { white-space: nowrap; }/* ---------- fee structure builder (admin/fees.php) ----------
     The instalment rows are a grid, and the amount column has to stay in a
     single column: when a date is long the row must not reflow under the
     operator's cursor mid-entry. */.inst-mode { flex: 0 0 116px; }.inst-value { flex: 0 0 130px; }.inst-calc { padding-bottom: 8px; font-size: 0.85em; }/* ---------- filter bar ---------- */.filter-bar {
      display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
      width: 100%;
  }.filter-bar input[type="search"],
  .filter-bar input[type="text"],
  .filter-bar select {
      min-height: 38px; padding: 7px 11px; font-size: 14px;
      border: 1px solid var(--border); border-radius: 10px;
      background: var(--white); color: var(--text-dark); font-family: inherit;
  }.filter-bar input[type="search"] { min-width: 230px; flex: 1 1 230px; }.filter-bar input:focus-visible,
  .filter-bar select:focus-visible,
  .field input:focus-visible,
  .field select:focus-visible,
  .field textarea:focus-visible {
      outline: 2px solid var(--royal-blue); outline-offset: 1px;
  }/* Says out loud how much of the list you can actually see. A capped list that
     does not say it is capped turns "select all shown" into a silent way to
     skip every family below the cut. */.result-line {
      display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
      font-size: 13px; color: var(--text-muted); margin-bottom: 12px;
  }.result-line strong { color: var(--text-dark); }.result-line .cap-note {
      background: var(--orange-bg); color: var(--orange);
      padding: 3px 9px; border-radius: 999px; font-weight: 600; font-size: 12px;
  }/* ---------- selection guardrail ----------
     A bulk send is the most expensive thing on this page, so the count of who
     is about to be messaged is always on screen, and the button is inert until
     something is actually ticked. */.bulk-bar {
      position: sticky; bottom: 0; z-index: 3;
      display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
      background: var(--white); border-top: 1px solid var(--border);
      padding: 12px 20px;
      box-shadow: 0 -2px 12px rgba(30, 36, 54, 0.07);
  }.bulk-bar .bulk-count { font-weight: 700; font-variant-numeric: tabular-nums; }.bulk-bar .spacer { flex: 1 1 auto; }.btn[disabled], .btn.is-disabled {
      opacity: 0.5; cursor: not-allowed; pointer-events: none;
  }/* ---------- forms ---------- */.field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 14px; }.field > span { font-size: 12.5px; font-weight: 600; color: var(--text-muted); }.field input, .field select, .field textarea {
      min-height: 38px; padding: 8px 11px; font-size: 14px; font-family: inherit;
      border: 1px solid var(--border); border-radius: 10px;
      background: var(--white); color: var(--text-dark); width: 100%;
  }.field textarea { min-height: 92px; resize: vertical; line-height: 1.5; }.check-inline {
      display: inline-flex; align-items: center; gap: 8px;
      font-size: 13.5px; margin: 0 14px 8px 0; cursor: pointer;
  }.check-inline input { width: 16px; height: 16px; cursor: pointer; }.form-row { display: flex; gap: 22px; flex-wrap: wrap; align-items: flex-start; }.form-row > fieldset {
      border: 1px solid var(--border); border-radius: 12px;
      padding: 14px 16px; margin: 0; flex: 1 1 240px; min-width: 0;
  }.form-row legend {
      font-size: 11.5px; font-weight: 700; letter-spacing: 0.7px;
      text-transform: uppercase; color: var(--text-muted); padding: 0 6px;
  }.form-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 6px; }.card-footer {
      display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
      padding: 14px 20px; border-top: 1px solid var(--border);
      background: var(--light-gray);
  }/* The live preview is the only way to sanity-check a template that mixes
     placeholders, so it sits next to the box rather than below the fold. */.preview-box {
      background: var(--light-gray); border: 1px dashed var(--border);
      border-radius: 12px; padding: 14px 16px; margin: 4px 0 16px;
  }.preview-box > strong {
      display: block; font-size: 11.5px; letter-spacing: 0.7px;
      text-transform: uppercase; color: var(--text-muted); margin-bottom: 7px;
  }.preview-box p { margin: 0; line-height: 1.6; white-space: pre-wrap; }/* ---------- buttons & alerts ---------- */.btn-secondary {
      background: var(--white); color: var(--text-dark);
      border: 1px solid var(--border); box-shadow: none;
  }.btn-secondary:hover { background: var(--light-gray); border-color: var(--text-muted); }.btn-xs { padding: 5px 11px; font-size: 12.5px; border-radius: 8px; }.alert-warning { background: var(--orange-bg); color: var(--orange); border-left-color: var(--orange); }.alert-info    { background: var(--sky-bg);    color: var(--royal-blue-dark); border-left-color: var(--sky-blue); }.alert a { text-decoration: underline; font-weight: 600; }/* ---------- narrow screens ----------
     Below the phone breakpoint a 7-column receivables table cannot be read by
     scrolling sideways, so each row becomes a labelled card instead. */@media (max-width: 720px) {.page-wrap { padding: 16px 12px 40px; }.page-header h1 { font-size: 21px; }.stat-value { font-size: 23px; }.aging-bar { min-width: 100%; }.filter-bar input[type="search"] { min-width: 100%; flex-basis: 100%; }.bulk-bar { padding: 10px 12px; }.table thead { display: none; }.table, .table tbody, .table tr, .table td { display: block; width: 100%; }.table tr {
          border: 1px solid var(--border); border-radius: 12px;
          margin-bottom: 12px; padding: 6px 4px; background: var(--white);
          /* The row must be the positioning context for the absolutely
             positioned checkbox below. Without this, `right: 10px` resolves
             against an ancestor that has nothing to do with this row, and every
             checkbox in the table lands stacked at the same spot - measured at
             the row's LEFT edge, sitting on top of the student's name. */
          position: relative;
      }/* Long values must wrap: a nowrap cell sets the row's min-content width,
         and the row then exceeds the phone viewport, so the "card" scrolls
         sideways inside .table-scroll even though the page itself does not. */.table tr > td { min-width: 0; overflow-wrap: anywhere; }.table td { border-bottom: 1px dashed var(--border); padding: 8px 12px; }.table td:last-child { border-bottom: none; }.table td.num { text-align: left; }.table td::before {
          content: attr(data-label); display: block;
          font-size: 10.5px; font-weight: 700; letter-spacing: 0.6px;
          text-transform: uppercase; color: var(--text-muted); margin-bottom: 2px;
      }.table td.check-col { position: absolute; right: 10px; top: 10px; width: auto; }.table td.check-col::before { content: none; }/* Reserve room for that checkbox so it cannot sit on the first value. */.table tr > td:not(.check-col):first-of-type { padding-right: 34px; }.table tr.sev-high { border-left: 4px solid var(--red); }.table tr.sev-mid  { border-left: 4px solid var(--orange); }.bulk-bar .btn { flex: 1 1 auto; }}/* =====================================================
     Fee Reminders page
     Everything here is scoped to .rem-* so the look of this
     one screen can be tuned without touching any other page.
     ===================================================== *//* ---------- page heading ---------- */.rem-head h1 { margin-bottom: 4px; }.rem-eyebrow {
      margin: 0 0 6px; font-size: 11px; font-weight: 700;
      letter-spacing: 1.1px; text-transform: uppercase;
      color: var(--royal-blue);
  }/* ---------- headline numbers ----------
     Four tiles that answer "how bad is it, and how urgent"
     before the reader reaches the table. Flat, bordered and
     quiet on purpose: this is a working screen, not a
     dashboard, so nothing here competes with the list. */.rem-stats {
      display: grid; gap: 12px; margin: 0 0 18px;
      grid-template-columns: repeat(4, minmax(0, 1fr));
  }.rem-stat {
      display: flex; flex-direction: column; gap: 2px;
      padding: 14px 16px; background: var(--white);
      border: 1px solid var(--border); border-radius: 12px;
      box-shadow: var(--shadow); min-width: 0;
  }.rem-stat-label {
      font-size: 11px; font-weight: 700; letter-spacing: 0.7px;
      text-transform: uppercase; color: var(--text-muted);
  }.rem-stat-value {
      font-size: 27px; font-weight: 700; line-height: 1.15;
      color: var(--text-dark); font-variant-numeric: tabular-nums;
  }.rem-stat-value small { font-size: 13px; font-weight: 600; color: var(--text-muted); }.rem-stat-hint { font-size: 11.5px; color: var(--text-muted); }/* Lateness is the only tile that earns colour; the others stay neutral so a
     red number on this screen always means "chase this". */.rem-stat-late { background: var(--red-bg); border-color: var(--red); }.rem-stat-late .rem-stat-value { color: var(--red); }.rem-stat-late .rem-stat-label { color: var(--red); }/* Zero late is good news. A red tile reading "0" would read as a warning, so
     the all-clear state is green and the label stops qualifying itself. */.rem-stat-clear { background: var(--green-bg); border-color: var(--green); }.rem-stat-clear .rem-stat-value { color: var(--green); }.rem-stat-clear .rem-stat-label { color: var(--green); }/* ---------- the chase panel ---------- */.rem-chase { border-color: var(--border); box-shadow: var(--shadow); }.rem-chase-head {
      display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
      background: var(--light-gray);
      border-bottom: 1px solid var(--border);
  }.rem-chase-title { margin: 0; }.rem-chip {
      display: inline-flex; align-items: center; justify-content: center;
      min-width: 30px; height: 24px; padding: 0 9px;
      border-radius: 999px; font-size: 13px; font-weight: 700;
      font-variant-numeric: tabular-nums;
      background: var(--white); color: var(--text-muted);
      border: 1px solid var(--border);
  }.rem-chip-live { background: var(--royal-blue); color: #fff; border-color: transparent; }/* ---------- filters ---------- */.rem-filters { gap: 10px; }.rem-filters input[type="search"],
  .rem-filters select {
      border-radius: 9px; border: 1px solid var(--border);
      background: var(--white); color: var(--text-dark);
      padding: 9px 12px; min-width: 0;
  }.rem-filters input[type="search"]:focus,
  .rem-filters select:focus {
      outline: none; border-color: var(--royal-blue);
      box-shadow: 0 0 0 3px var(--purple-bg);
  }/* ---------- result line + the rule the list runs on ---------- */.rem-result { margin: 0; }.rem-footnote {
      margin: 8px 0 0; font-size: 12px; line-height: 1.5;
      color: var(--text-muted);
      padding-left: 10px; border-left: 3px solid var(--border);
  }/* ---------- chase rows ---------- */.rem-name { font-weight: 600; }.rem-name a { text-decoration: none; }.rem-name a:hover { text-decoration: underline; }.rem-class { color: var(--text-muted); }.rem-items .stack { gap: 4px; }/* Money is the reason the row exists, so it is the loudest thing in it and
     set in tabular figures so the column can be scanned down. */.rem-amount {
      font-size: 15px; font-weight: 700; white-space: nowrap;
      color: var(--text-dark); font-variant-numeric: tabular-nums;
  }.rem-late { white-space: nowrap; }.rem-empty { padding: 26px 12px; text-align: center; }/* ---------- bulk action bar ---------- */.rem-bulk { border-top: 1px solid var(--border); }/* ---------- reporting panels ---------- */.rem-panel .card-header { background: var(--light-gray); border-bottom: 1px solid var(--border); }.rem-panel-title { margin: 0; font-size: 15px; }@media (max-width: 900px) {.rem-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }}@media (max-width: 720px) {.rem-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }.rem-stat { padding: 12px 13px; }.rem-stat-value { font-size: 22px; }/* Money must not be the one column that forces the stacked card wide. */.rem-amount { white-space: normal; }.rem-late { white-space: normal; }.rem-chase-head { padding: 12px 14px; }}@media (max-width: 380px) {.rem-stats { grid-template-columns: minmax(0, 1fr); }}