/* ACME Portal — Design System v3 */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

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

:root {
    --sidebar-w:    230px;
    --c-primary:    #C41E1E;
    --c-primary-d:  #a31a1a;
    --c-sidebar:    #1d3175;
    --c-primary-l:  #fff0f0;
    --c-primary-m:  #fecaca;
    --c-success:    #0a7a3e;
    --c-success-l:  #dcfce7;
    --c-danger:     #dc2626;
    --c-danger-l:   #fee2e2;
    --c-warning:    #b45309;
    --c-warning-l:  #fef3c7;
    --c-info:       #0369a1;
    --c-info-l:     #e0f2fe;
    --c-violet:     #6d28d9;
    --c-violet-l:   #ede9fe;
    --c-teal:       #0f766e;
    --c-teal-l:     #ccfbf1;
    --c-text:       #0f172a;
    --c-text-2:     #475569;
    --c-text-3:     #94a3b8;
    --c-border:     #e2e8f0;
    --c-border-2:   #cbd5e1;
    --c-border-light: #f1f5f9;
    --c-bg:         #f0f4f8;
    --c-white:      #ffffff;
    --radius:       12px;
    --radius-sm:    8px;
    --radius-lg:    16px;
    --shadow-xs:    0 1px 2px rgba(0,0,0,.05);
    --shadow-sm:    0 2px 6px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
    --shadow:       0 4px 16px rgba(0,0,0,.08), 0 2px 4px rgba(0,0,0,.04);
    --shadow-lg:    0 12px 40px rgba(0,0,0,.12), 0 4px 8px rgba(0,0,0,.05);
    --topbar-h:     54px;
    --transition:   0.15s ease;
}

html { font-size: 15px; }
body {
    font-family: 'Inter', system-ui, sans-serif;
    background: var(--c-bg);
    color: var(--c-text);
    line-height: 1.5;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}
a { color: var(--c-primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Sidebar ─────────────────────────────────────────────────── */
.sidebar {
    position: fixed;
    top: 0; left: 0;
    width: var(--sidebar-w);
    height: 100vh;
    background: linear-gradient(180deg, #1d3175 0%, #213585 40%, #192d6a 100%);
    display: flex;
    flex-direction: column;
    z-index: 200;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: none;
}
.sidebar::-webkit-scrollbar { display: none; }

/* Red accent strip at very top */
.sidebar::before {
    content: '';
    display: block;
    height: 3px;
    background: linear-gradient(90deg, #C41E1E 0%, #ef4444 50%, #f97316 100%);
    flex-shrink: 0;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 16px;
    background: #fff;
    border-bottom: 1px solid rgba(0,0,0,.07);
    text-decoration: none;
    flex-shrink: 0;
    min-height: 54px;
}
.sidebar-brand:hover { text-decoration: none; }
.sidebar-brand img {
    height: 30px;
    width: auto;
    max-width: 190px;
    display: block;
}

.sidebar-section {
    padding: 14px 10px 4px;
    flex-shrink: 0;
}
.sidebar-section-label {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    color: rgba(255,255,255,.72);
    padding: 0 12px;
    margin-bottom: 6px;
}
.sidebar-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 500;
    color: rgba(255,255,255,.78);
    text-decoration: none;
    transition: background var(--transition), color var(--transition);
    margin-bottom: 2px;
    position: relative;
}
.sidebar-link svg { width: 16px; height: 16px; flex-shrink: 0; }
.sidebar-link:hover {
    background: rgba(255,255,255,.10);
    color: rgba(255,255,255,.98);
    text-decoration: none;
}
.sidebar-link.active {
    background: linear-gradient(135deg, rgba(196,30,30,.80) 0%, rgba(239,68,68,.65) 100%);
    color: #fff;
    font-weight: 700;
    box-shadow: 0 4px 14px rgba(196,30,30,.30);
}
.sidebar-link.active::before {
    content: '';
    position: absolute;
    left: 0; top: 20%; bottom: 20%;
    width: 3px;
    background: rgba(255,255,255,.90);
    border-radius: 0 3px 3px 0;
}
.sidebar-link .badge-count {
    margin-left: auto;
    background: #ef4444;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 99px;
    min-width: 20px;
    text-align: center;
}

.sidebar-footer {
    margin-top: auto;
    padding: 12px 10px 16px;
    border-top: 1px solid rgba(255,255,255,.07);
    flex-shrink: 0;
}
.sidebar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(255,255,255,.05);
    margin-bottom: 8px;
}
.sidebar-user .avatar {
    width: 34px; height: 34px;
    background: linear-gradient(135deg, #C41E1E, #f97316);
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 13px; font-weight: 800;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(196,30,30,.30);
}
.sidebar-user .user-name { font-size: 12px; font-weight: 700; color: rgba(255,255,255,.88); }
.sidebar-user .user-role { font-size: 10px; color: rgba(255,255,255,.52); margin-top: 2px; text-transform: uppercase; letter-spacing: .4px; }
.sidebar-logout {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 500;
    color: rgba(255,255,255,.52);
    text-decoration: none;
    transition: background var(--transition), color var(--transition);
}
.sidebar-logout:hover { background: rgba(220,38,38,.18); color: #fca5a5; text-decoration: none; }
.sidebar-logout svg { width: 14px; height: 14px; }

/* ── Overlay ── */
.overlay {
    display: none;
    position: fixed; inset: 0;
    background: rgba(0,0,0,.45);
    z-index: 190;
}
.overlay.open, .overlay.show { display: block; }

/* ── Top bar (mobile only) ── */
.topbar {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0;
    height: var(--topbar-h);
    background: #0c1445;
    z-index: 300;
    align-items: center;
    padding: 0 16px;
    gap: 12px;
}
.topbar-toggle {
    background: none;
    border: none;
    color: rgba(255,255,255,.6);
    cursor: pointer;
    padding: 4px;
    display: flex;
}
.topbar-title { font-size: 15px; font-weight: 800; color: #fff; }

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

/* ── Page header ── */
.page-header {
    background: #fff;
    border-bottom: 1px solid var(--c-border);
    padding: 22px 28px;
}
.page-header-inner {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}
.page-header h1 {
    font-size: 22px;
    font-weight: 900;
    color: var(--c-text);
    letter-spacing: -.3px;
}
.page-header p  { font-size: 13px; color: var(--c-text-2); margin-top: 3px; }
.page-header .back-link { font-size: 12px; color: var(--c-text-3); display: block; margin-bottom: 5px; }
.page-header .back-link:hover { color: var(--c-primary); text-decoration: none; }
/* On coloured (gradient) headers the back-link must be light, not dark grey */
.page-header.primary .back-link, .page-header.blue .back-link, .page-header.indigo .back-link,
.page-header.success .back-link, .page-header.orange .back-link, .page-header.teal .back-link,
.page-header.violet .back-link, .page-header.navy .back-link { color: rgba(255,255,255,.78); }
.page-header.primary .back-link:hover, .page-header.blue .back-link:hover, .page-header.indigo .back-link:hover,
.page-header.success .back-link:hover, .page-header.orange .back-link:hover, .page-header.teal .back-link:hover,
.page-header.violet .back-link:hover, .page-header.navy .back-link:hover { color: #fff; }
.page-header-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* Coloured page-header variants */
.page-header.primary {
    background: linear-gradient(135deg, #9b1c1c 0%, #c41e1e 50%, #ef4444 100%);
    border-bottom: none;
    box-shadow: 0 4px 20px rgba(196,30,30,.28);
}
.page-header.primary h1, .page-header.primary p { color: #fff; }

.page-header.blue {
    background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 50%, #60a5fa 100%);
    border-bottom: none;
    box-shadow: 0 4px 20px rgba(37,99,235,.28);
}
.page-header.blue h1, .page-header.blue p { color: #fff; }

.page-header.indigo {
    background: linear-gradient(135deg, #312e81 0%, #4338ca 50%, #818cf8 100%);
    border-bottom: none;
    box-shadow: 0 4px 20px rgba(67,56,202,.26);
}
.page-header.indigo h1, .page-header.indigo p { color: #fff; }

.page-header.success {
    background: linear-gradient(135deg, #14532d 0%, #166534 50%, #22c55e 100%);
    border-bottom: none;
    box-shadow: 0 4px 20px rgba(22,101,52,.25);
}
.page-header.success h1, .page-header.success p { color: #fff; }

.page-header.orange {
    background: linear-gradient(135deg, #9a3412 0%, #c2410c 50%, #fb923c 100%);
    border-bottom: none;
    box-shadow: 0 4px 20px rgba(194,65,12,.26);
}
.page-header.orange h1, .page-header.orange p { color: #fff; }

.page-header.teal {
    background: linear-gradient(135deg, #134e4a 0%, #0f766e 50%, #2dd4bf 100%);
    border-bottom: none;
    box-shadow: 0 4px 20px rgba(15,118,110,.26);
}
.page-header.teal h1, .page-header.teal p { color: #fff; }

.page-header.violet {
    background: linear-gradient(135deg, #4c1d95 0%, #6d28d9 50%, #a78bfa 100%);
    border-bottom: none;
    box-shadow: 0 4px 20px rgba(109,40,217,.26);
}
.page-header.violet h1, .page-header.violet p { color: #fff; }

/* Navy — matches sidebar gradient exactly */
.page-header.navy {
    background: linear-gradient(135deg, #0f1a4a 0%, #1d3175 45%, #213585 100%);
    border-bottom: none;
    box-shadow: 0 4px 20px rgba(29,49,117,.38);
}
.page-header.navy h1, .page-header.navy p { color: #fff; }

/* ── Page content ── */
.page-content {
    padding: 24px 28px;
    flex: 1;
}
.page-content.narrow { max-width: 820px; }

/* ── Flash alerts ── */
.flash-wrap { padding: 16px 28px 0; }
.alert {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 500;
    border: 1.5px solid;
    margin-bottom: 12px;
}
.alert-success { background: #f0fdf4; border-color: #86efac; color: #166534; }
.alert-danger  { background: #fef2f2; border-color: #fca5a5; color: #991b1b; }
.alert-warning { background: #fffbeb; border-color: #fcd34d; color: #92400e; }
.alert-info    { background: #eff6ff; border-color: #93c5fd; color: #1e40af; }

/* ── Cards ── */
.card {
    background: var(--c-white);
    border: 1px solid #e4e9f0;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}
.card-header {
    padding: 14px 20px;
    border-bottom: 1px solid #f0f4f8;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #fafbfd;
}
.card-header h2, .card-header h3 { font-size: 14px; font-weight: 700; color: var(--c-text); }
.card-header .card-title { font-size: 14px; font-weight: 700; margin: 0; }
.card-header .card-meta { font-size: 12px; color: var(--c-text-3); }
.card-body { padding: 20px; }
.card-footer {
    padding: 12px 20px;
    border-top: 1px solid #f0f4f8;
    background: #fafbfd;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.status-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
}
.card-header .card-action { font-size: 12px; color: var(--c-primary); font-weight: 600; }
.card-header .card-action:hover { text-decoration: underline; }

/* ── Management list (settings: campuses, programs) ── */
.mgmt-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 20px;
    border-bottom: 1px solid var(--c-border);
}
.mgmt-item:last-child { border-bottom: none; }
.mgmt-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.mgmt-icon svg { width: 20px; height: 20px; }
.mgmt-name { font-size: 14px; font-weight: 600; color: var(--c-text); margin-bottom: 2px; }
.mgmt-sub  { font-size: 12px; color: var(--c-text-2); margin-top: 1px; }
.mgmt-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

/* ── Stat grid ── */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}
.stat-card {
    border-radius: var(--radius-lg);
    padding: 20px 22px;
    position: relative;
    overflow: hidden;
    border: none;
    color: #fff;
    transition: transform var(--transition), box-shadow var(--transition);
    cursor: default;
}
.stat-card:hover { transform: translateY(-2px); }

/* Decorative circles */
.stat-card::before {
    content: '';
    position: absolute;
    top: -24px; right: -24px;
    width: 100px; height: 100px;
    border-radius: 50%;
    background: rgba(255,255,255,.11);
    pointer-events: none;
}
.stat-card::after {
    content: '';
    position: absolute;
    bottom: -32px; left: -20px;
    width: 88px; height: 88px;
    border-radius: 50%;
    background: rgba(255,255,255,.07);
    pointer-events: none;
}

/* Stat card color variants */
.stat-card.primary {
    background: linear-gradient(135deg, #991b1b 0%, #c41e1e 55%, #ef4444 100%);
    box-shadow: 0 8px 28px rgba(196,30,30,.34), 0 2px 6px rgba(196,30,30,.18);
}
.stat-card.success {
    background: linear-gradient(135deg, #14532d 0%, #15803d 55%, #22c55e 100%);
    box-shadow: 0 8px 28px rgba(21,128,61,.30), 0 2px 6px rgba(21,128,61,.16);
}
.stat-card.danger {
    background: linear-gradient(135deg, #b91c1c 0%, #dc2626 55%, #f87171 100%);
    box-shadow: 0 8px 28px rgba(220,38,38,.32), 0 2px 6px rgba(220,38,38,.16);
}
.stat-card.blue {
    background: linear-gradient(135deg, #1e40af 0%, #2563eb 55%, #60a5fa 100%);
    box-shadow: 0 8px 28px rgba(37,99,235,.30), 0 2px 6px rgba(37,99,235,.16);
}
.stat-card.warning {
    background: linear-gradient(135deg, #92400e 0%, #b45309 55%, #f59e0b 100%);
    box-shadow: 0 8px 28px rgba(180,83,9,.30), 0 2px 6px rgba(180,83,9,.16);
}
.stat-card.violet {
    background: linear-gradient(135deg, #4c1d95 0%, #6d28d9 55%, #a78bfa 100%);
    box-shadow: 0 8px 28px rgba(109,40,217,.30), 0 2px 6px rgba(109,40,217,.16);
}
.stat-card.indigo {
    background: linear-gradient(135deg, #312e81 0%, #4338ca 55%, #818cf8 100%);
    box-shadow: 0 8px 28px rgba(67,56,202,.30), 0 2px 6px rgba(67,56,202,.16);
}
.stat-card.teal {
    background: linear-gradient(135deg, #134e4a 0%, #0f766e 55%, #2dd4bf 100%);
    box-shadow: 0 8px 28px rgba(15,118,110,.30), 0 2px 6px rgba(15,118,110,.16);
}
.stat-card.orange {
    background: linear-gradient(135deg, #9a3412 0%, #c2410c 55%, #fb923c 100%);
    box-shadow: 0 8px 28px rgba(194,65,12,.30), 0 2px 6px rgba(194,65,12,.16);
}

/* Inner layout */
.stat-card-inner { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.stat-card-icon {
    width: 52px; height: 52px; border-radius: 14px;
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
    background: rgba(255,255,255,.18);
    color: #fff;
}
.stat-card-icon svg { width: 24px; height: 24px; }

.stat-card .stat-label {
    font-size: 11px;
    font-weight: 700;
    color: rgba(255,255,255,.85);
    text-transform: uppercase;
    letter-spacing: .6px;
    margin-bottom: 8px;
}
.stat-card .stat-value {
    font-size: 32px;
    font-weight: 900;
    line-height: 1;
    color: #fff;
    letter-spacing: -.5px;
}
.stat-card .stat-sub {
    font-size: 11px;
    color: rgba(255,255,255,.68);
    margin-top: 8px;
    font-weight: 500;
}
.stat-card .stat-trend { font-size: 11px; font-weight: 700; color: rgba(255,255,255,.90); }
.stat-card .text-success,
.stat-card .text-danger { color: rgba(255,255,255,.92) !important; font-weight: 700; }

/* ── Grids ── */
.grid-2   { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-3   { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 20px; }
.grid-2-1 { display: grid; grid-template-columns: 2fr 1fr; gap: 20px; }
.grid-1-2 { display: grid; grid-template-columns: 1fr 2fr; gap: 20px; }
@media (max-width: 1024px) {
    .grid-2-1, .grid-1-2 { grid-template-columns: 1fr; }
    .grid-3 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

/* ── Page-level two-column layout: main content + side panel ── */
/* Used on view/detail pages that have a right panel (staff view, admissions, etc.) */
.layout-main-panel {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 20px;
    align-items: start;
}
/* Wider panel variant */
.layout-main-panel-lg {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 20px;
    align-items: start;
}
@media (max-width: 960px) {
    .layout-main-panel,
    .layout-main-panel-lg { grid-template-columns: 1fr; }
}

/* ── Inline form rows: 2-col and 3-col used inside cards ── */
/* Responsive: collapses to single column on phones */
.row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 16px;
}
.row-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 14px;
    margin-bottom: 16px;
}
@media (max-width: 600px) {
    .row-2, .row-3 { grid-template-columns: 1fr; }
}

/* ── Tables ── */
.table-wrap { overflow-x: auto; }
table.portal-table { width: 100%; border-collapse: collapse; font-size: 13px; }
table.portal-table thead tr {
    background: linear-gradient(90deg, #f8faff 0%, #f0f4f8 100%);
    border-bottom: 2px solid #e2e8f0;
}
table.portal-table thead th {
    padding: 11px 16px;
    text-align: left;
    font-size: 11px;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: .5px;
    white-space: nowrap;
}
table.portal-table tbody tr { border-bottom: 1px solid #f1f5f9; transition: background var(--transition); }
table.portal-table tbody tr:last-child { border-bottom: none; }
table.portal-table tbody tr:hover { background: #f8faff; }
table.portal-table tbody td { padding: 13px 16px; vertical-align: middle; font-size: 13px; }
table.portal-table .td-name { font-weight: 700; color: var(--c-text); }
table.portal-table .td-sub  { font-size: 11px; color: var(--c-text-3); margin-top: 3px; }

/* ── Progress bars ── */
.progress-bar { height: 7px; background: #e8edf2; border-radius: 99px; overflow: hidden; }
.progress-bar-fill { height: 100%; border-radius: 99px; transition: width .5s ease; }
.progress-bar-fill.primary { background: linear-gradient(90deg, #c41e1e, #ef4444); }
.progress-bar-fill.success { background: linear-gradient(90deg, #0a7a3e, #16a34a); }
.progress-bar-fill.danger  { background: linear-gradient(90deg, #b91c1c, #dc2626); }
.progress-bar-fill.warning { background: linear-gradient(90deg, #b45309, #d97706); }

/* ── Campus badge ── */
.campus-badge {
    display: inline-block;
    padding: 3px 9px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    background: linear-gradient(135deg, #0c1445, #1e3a8a);
    color: #fff;
    letter-spacing: .3px;
}

/* ── Forms ── */
.form-grid { display: grid; gap: 16px; }
.form-grid.cols-2 { grid-template-columns: 1fr 1fr; }
.form-grid.cols-3 { grid-template-columns: 1fr 1fr 1fr; }
.form-grid.cols-4 { grid-template-columns: 1fr 1fr 1fr 1fr; }
@media (max-width: 640px) { .form-grid.cols-2, .form-grid.cols-3, .form-grid.cols-4 { grid-template-columns: 1fr; } }
.form-group { display: flex; flex-direction: column; gap: 5px; }
.form-group.span-2 { grid-column: span 2; }
.form-group.span-full { grid-column: 1 / -1; }
.form-label { font-size: 12px; font-weight: 700; color: var(--c-text-2); }
.form-label .req { color: var(--c-danger); }
.form-input, .form-select, .form-textarea {
    padding: 9px 13px;
    border: 1.5px solid var(--c-border);
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-family: inherit;
    background: var(--c-white);
    color: var(--c-text);
    transition: border-color var(--transition), box-shadow var(--transition);
    width: 100%;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
    outline: none;
    border-color: var(--c-primary);
    box-shadow: 0 0 0 3px rgba(196,30,30,.10);
}
.form-textarea { resize: vertical; min-height: 80px; }
.form-hint { font-size: 11px; color: var(--c-text-3); margin-top: 2px; }
.form-section-title {
    font-size: 11px;
    font-weight: 800;
    color: var(--c-primary);
    text-transform: uppercase;
    letter-spacing: .6px;
    margin-bottom: 14px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--c-primary-l);
}

/* ── Buttons ── */
.btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 9px 18px;
    border-radius: var(--radius-sm);
    font-size: 13px; font-weight: 700; font-family: inherit;
    cursor: pointer; border: 1.5px solid transparent;
    transition: all var(--transition); text-decoration: none; white-space: nowrap;
    line-height: 1.4;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: scale(.97); }
.btn svg { width: 14px; height: 14px; }

.btn-primary {
    background: linear-gradient(135deg, #c41e1e, #ef4444);
    color: #fff;
    box-shadow: 0 4px 12px rgba(196,30,30,.28);
}
.btn-primary:hover {
    background: linear-gradient(135deg, #a31a1a, #dc2626);
    box-shadow: 0 6px 18px rgba(196,30,30,.36);
    color: #fff;
}
.btn-success {
    background: linear-gradient(135deg, #0a7a3e, #16a34a);
    color: #fff;
    box-shadow: 0 4px 12px rgba(10,122,62,.26);
}
.btn-success:hover { background: linear-gradient(135deg, #052e16, #0a7a3e); color: #fff; }

.btn-danger {
    background: linear-gradient(135deg, #b91c1c, #ef4444);
    color: #fff;
    box-shadow: 0 4px 12px rgba(185,28,28,.26);
}
.btn-danger:hover { background: linear-gradient(135deg, #991b1b, #dc2626); color: #fff; }

.btn-ghost {
    background: transparent;
    color: var(--c-text-2);
    border-color: var(--c-border);
}
.btn-ghost:hover { background: #f1f5f9; color: var(--c-text); border-color: var(--c-border-2); }

.btn-dark {
    background: linear-gradient(135deg, #0f172a, #1e293b);
    color: #fff;
    box-shadow: 0 4px 12px rgba(15,23,42,.24);
}
.btn-dark:hover { background: linear-gradient(135deg, #020617, #0f172a); color: #fff; }

.btn-sm { padding: 5px 12px; font-size: 12px; }
.btn-lg { padding: 12px 26px; font-size: 15px; }
.btn-block { width: 100%; justify-content: center; }

/* ── Login page ── */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(150deg, #1d3175 0%, #213585 55%, #192d6a 100%);
    padding: 24px 16px;
}
.login-box {
    width: 100%;
    max-width: 380px;
}
.login-brand {
    text-align: center;
    margin-bottom: 24px;
}
.login-brand h1 {
    font-size: 22px;
    font-weight: 800;
    color: #fff;
    margin: 0 0 4px;
}
.login-brand p {
    font-size: 13px;
    color: rgba(255,255,255,.58);
    margin: 0;
}
.login-card {
    background: #fff;
    border-radius: 16px;
    padding: 28px;
    box-shadow: 0 20px 60px rgba(0,0,0,.28), 0 4px 12px rgba(0,0,0,.12);
}
.login-footer {
    text-align: center;
    margin-top: 16px;
    font-size: 11px;
    color: rgba(255,255,255,.36);
}

/* ── Badges ── */
.badge {
    display: inline-block;
    padding: 3px 9px;
    border-radius: 99px;
    font-size: 10px;
    font-weight: 700;
    white-space: nowrap;
}
.badge-success { background: #dcfce7; color: #166534; }
.badge-danger  { background: #fee2e2; color: #991b1b; }
.badge-warning { background: #fef3c7; color: #92400e; }
.badge-info    { background: #e0f2fe; color: #0369a1; }
.badge-primary { background: #fff0f0; color: #c41e1e; }
.badge-violet  { background: #ede9fe; color: #6d28d9; }
.badge-slate   { background: #f1f5f9; color: #475569; }
.badge-teal    { background: #ccfbf1; color: #0f766e; }

/* ── Filters bar ── */
.filters-bar {
    background: var(--c-white);
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    padding: 12px 16px;
    margin-bottom: 20px;
    display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
    box-shadow: var(--shadow-xs);
}
.filters-bar .form-input,
.filters-bar .form-select { width: auto; }
/* Filter inputs go full-width once the bar wraps on a phone (was fixed-px). */
@media (max-width: 600px) {
    .filters-bar .form-input,
    .filters-bar .form-select { width: 100%; }
}

/* Disabled buttons (used by the global double-submit guard in footer.php). */
.btn:disabled, .btn[disabled] { opacity: .6; pointer-events: none; cursor: default; }

/* ── Quick action tiles ── */
.quick-actions { display: flex; flex-direction: column; gap: 8px; }
.quick-tile {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 14px; border-radius: var(--radius-sm);
    text-decoration: none; transition: all var(--transition);
    border: 1.5px solid transparent;
}
.quick-tile:hover { text-decoration: none; transform: translateX(3px); }
.quick-tile .tile-icon {
    width: 36px; height: 36px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.quick-tile .tile-icon svg { width: 17px; height: 17px; }
.quick-tile .tile-label { font-size: 13px; font-weight: 700; }
.quick-tile .tile-sub   { font-size: 11px; opacity: .65; margin-top: 1px; }

/* ── Pagination ── */
.pagination {
    display: flex; align-items: center; gap: 4px;
    padding: 14px 20px;
    border-top: 1px solid var(--c-border);
}
.pagination a, .pagination span {
    display: inline-flex; align-items: center; justify-content: center;
    width: 34px; height: 34px;
    border-radius: var(--radius-sm);
    font-size: 13px; font-weight: 600;
    color: var(--c-text-2);
    border: 1.5px solid var(--c-border);
    background: var(--c-white);
    transition: all var(--transition);
}
.pagination a:hover {
    background: var(--c-primary);
    color: #fff;
    border-color: var(--c-primary);
    text-decoration: none;
}
.pagination .current {
    background: var(--c-primary);
    color: #fff;
    border-color: var(--c-primary);
}

/* ── Empty state ── */
.empty-state {
    padding: 60px 24px;
    text-align: center;
    color: var(--c-text-3);
}
.empty-state h3 { font-size: 15px; font-weight: 700; color: var(--c-text-2); margin-bottom: 6px; }
.empty-state p  { font-size: 13px; color: var(--c-text-3); max-width: 280px; margin: 0 auto 16px; }

/* ── Mobile responsive ── */
@media (max-width: 768px) {
    .topbar { display: flex; }
    .sidebar { transform: translateX(-100%); transition: transform .25s ease; }
    .sidebar.open { transform: translateX(0); }
    .main-wrap { margin-left: 0; padding-top: var(--topbar-h); }
    .page-content { padding: 16px; }
    .page-header { padding: 16px; }
    .stat-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
    .stat-card .stat-value { font-size: 24px; }
}

/* ── Staff / student photo avatars ── */
.list-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
    object-position: top center;
    flex-shrink: 0;
    display: block;
}
.list-avatar-placeholder {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--c-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    color: var(--c-text-2);
    flex-shrink: 0;
    text-transform: uppercase;
}
.profile-avatar-lg {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
    object-position: top center;
    border: 3px solid rgba(255,255,255,.4);
    flex-shrink: 0;
    display: block;
}
.profile-avatar-lg-placeholder {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: rgba(255,255,255,.2);
    border: 3px solid rgba(255,255,255,.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 700;
    color: rgba(255,255,255,.8);
    flex-shrink: 0;
    text-transform: uppercase;
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* ── Utility ── */
.mb-12 { margin-bottom: 12px; }
.mb-20 { margin-bottom: 20px; }
.text-muted { font-size: 13px; color: var(--c-text-3); }

/* ── Dashboard: section label ── */
.section-label {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .8px;
    color: var(--c-text-2);
    margin-bottom: 10px;
}

/* ── Dashboard: Today strip ── */
.today-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
    margin-bottom: 24px;
}
.today-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px;
    border-radius: var(--radius);
    background: var(--c-white);
    border: 1.5px solid var(--c-border);
    border-left-width: 4px;
    text-decoration: none;
    box-shadow: var(--shadow-xs);
    transition: transform var(--transition), box-shadow var(--transition);
    cursor: default;
}
a.today-card { cursor: pointer; }
a.today-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); text-decoration: none; }
.today-card.red   { border-left-color: #dc2626; }
.today-card.amber { border-left-color: #f59e0b; }
.today-card.blue  { border-left-color: #1d3175; }
.today-card.green { border-left-color: #16a34a; }
.tc-count {
    font-size: 30px;
    font-weight: 900;
    line-height: 1;
    letter-spacing: -.5px;
    color: var(--c-text);
}
.today-card.red   .tc-count { color: #dc2626; }
.today-card.amber .tc-count { color: #b45309; }
.today-card.blue  .tc-count { color: #1d3175; }
.today-card.green .tc-count { color: #15803d; }
.tc-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--c-text-2);
    margin-top: 4px;
    line-height: 1.3;
}
.tc-arrow {
    font-size: 18px;
    color: var(--c-text-3);
    flex-shrink: 0;
    margin-left: 8px;
}

/* ── Dashboard: Campus snapshot grid ── */
.campus-snap-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}
.campus-snap {
    background: var(--c-white);
    border: 1px solid var(--c-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: transform var(--transition), box-shadow var(--transition);
}
.campus-snap:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.cs-header {
    padding: 14px 18px;
    color: #fff;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
}
.cs-body { padding: 0 18px; }
.cs-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 9px 0;
    border-bottom: 1px solid var(--c-border-light);
    font-size: 13px;
    color: var(--c-text-2);
}
.cs-row:last-child { border-bottom: none; }
.cs-row strong { font-weight: 700; color: var(--c-text); }
.cs-footer {
    padding: 10px 18px 12px;
    background: #fafbfd;
    border-top: 1px solid var(--c-border);
}

/* ── Dashboard: Admissions funnel ── */
.funnel-row {
    display: flex;
    align-items: stretch;
    gap: 8px;
    flex-wrap: wrap;
}
.funnel-stage {
    flex: 1;
    min-width: 90px;
    text-align: center;
    padding: 14px 10px;
    border-radius: var(--radius-sm);
    border: 1.5px solid transparent;
    text-decoration: none;
    transition: transform var(--transition), box-shadow var(--transition);
}
.funnel-stage:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); text-decoration: none; }
.funnel-sep {
    font-size: 22px;
    color: var(--c-text-3);
    display: flex;
    align-items: center;
    flex-shrink: 0;
    align-self: center;
}
.fs-count {
    font-size: 28px;
    font-weight: 900;
    line-height: 1;
    letter-spacing: -.5px;
}
.fs-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--c-text-2);
    margin-top: 5px;
    text-transform: uppercase;
    letter-spacing: .4px;
}

/* ── Dashboard: Quick actions 2-col grid ── */
.quick-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}
.quick-grid .quick-tile {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 14px 10px;
    gap: 8px;
}
.quick-grid .quick-tile .tile-icon { width: 40px; height: 40px; }

/* ── Pagination (page-btn variant) ── */
.page-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 34px; height: 34px;
    border-radius: var(--radius-sm);
    font-size: 13px; font-weight: 600;
    color: var(--c-text-2);
    border: 1.5px solid var(--c-border);
    background: var(--c-white);
    transition: all var(--transition);
    text-decoration: none;
}
.page-btn:hover {
    background: var(--c-primary);
    color: #fff;
    border-color: var(--c-primary);
    text-decoration: none;
}
.page-btn.active {
    background: var(--c-primary);
    color: #fff;
    border-color: var(--c-primary);
}

/* ── Quick tile colour variants ── */
.quick-tile.green  { background: #f0fdf4; border-color: #86efac; }
.quick-tile.green .tile-icon  { background: var(--c-success-l); color: var(--c-success); }
.quick-tile.green .tile-label { color: var(--c-success); }
.quick-tile.green:hover { background: var(--c-success-l); border-color: var(--c-success); }

.quick-tile.violet { background: #f5f3ff; border-color: #c4b5fd; }
.quick-tile.violet .tile-icon  { background: var(--c-violet-l); color: var(--c-violet); }
.quick-tile.violet .tile-label { color: var(--c-violet); }
.quick-tile.violet:hover { background: var(--c-violet-l); border-color: var(--c-violet); }

.quick-tile.blue   { background: #eff6ff; border-color: #93c5fd; }
.quick-tile.blue .tile-icon  { background: var(--c-info-l); color: var(--c-info); }
.quick-tile.blue .tile-label { color: var(--c-info); }
.quick-tile.blue:hover { background: var(--c-info-l); border-color: var(--c-info); }

.quick-tile.amber  { background: #fffbeb; border-color: #fcd34d; }
.quick-tile.amber .tile-icon  { background: var(--c-warning-l); color: var(--c-warning); }
.quick-tile.amber .tile-label { color: var(--c-warning); }
.quick-tile.amber:hover { background: var(--c-warning-l); border-color: var(--c-warning); }

.quick-tile.red    { background: #fff5f5; border-color: #fca5a5; }
.quick-tile.red .tile-icon  { background: var(--c-danger-l); color: var(--c-danger); }
.quick-tile.red .tile-label { color: var(--c-danger); }
.quick-tile.red:hover { background: var(--c-danger-l); border-color: var(--c-danger); }

/* ── Activity feed (dashboard) ── */
.activity-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 4px;
    border-bottom: 1px solid var(--c-border-light);
    font-size: 13px;
}
.activity-item:last-child { border-bottom: none; }
.activity-dot {
    width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
}
.activity-dot.primary { background: var(--c-primary); }
.activity-dot.success { background: var(--c-success); }
.activity-dot.danger  { background: var(--c-danger); }
.activity-dot.warning { background: var(--c-warning); }
.activity-dot.slate   { background: var(--c-text-3); }
.activity-text { flex: 1; color: var(--c-text-2); line-height: 1.4; }
.activity-text strong { color: var(--c-text); font-weight: 700; }
.activity-time { font-size: 11px; color: var(--c-text-3); white-space: nowrap; flex-shrink: 0; }

/* ── Defaulter rows (dashboard) ── */
.defaulter-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    border-bottom: 1px solid var(--c-border-light);
    transition: background var(--transition);
}
.defaulter-row:last-child { border-bottom: none; }
.defaulter-row:hover { background: #fef9f9; }
.defaulter-row a { text-decoration: none; }
.defaulter-row a:hover { text-decoration: none; }
.d-name { font-size: 13px; font-weight: 700; color: var(--c-text); }
.defaulter-row a .d-name:hover { color: var(--c-primary); }
.d-meta { font-size: 11px; color: var(--c-text-3); margin-top: 2px; }
.d-amount { font-size: 13px; font-weight: 700; color: #b91c1c; }
.d-days { font-size: 11px; color: #ef4444; margin-top: 2px; font-weight: 600; }

/* ── Print ── */
@media print {
    .sidebar, .topbar, .page-header-actions, .filters-bar,
    .btn, .sidebar-overlay, .overlay,
    .pagination, .flash-wrap, .dash-hero-wrap, .dash-hero { display: none !important; }
    .main-wrap { margin-left: 0 !important; }
    .page-content { padding: 0 !important; }
    .card { box-shadow: none !important; border: 1px solid #ccc !important; }
    body { background: #fff !important; }
    /* Gradient page headers print as white boxes; force readable black text
       (browsers strip backgrounds by default, so white-on-gradient became white-on-white). */
    .page-header { background: #fff !important; box-shadow: none !important; border-bottom: 1px solid #ccc; }
    .page-header h1, .page-header p { color: #000 !important; }
}

/* Visible keyboard focus for links and buttons (inputs already have a focus style). */
a:focus-visible, button:focus-visible, .btn:focus-visible, .sidebar-link:focus-visible {
    outline: 2px solid var(--c-primary); outline-offset: 2px;
}

/* Attendance marking rows (staff.php + mark.php) are a fixed-width flex (~550px) that
   clipped on phones inside the card. Let them wrap so the status tiles / time / note
   inputs flow onto a second line instead of being cut off. */
@media (max-width: 640px) {
    .att-row { flex-wrap: wrap; }
    .att-row .att-status-tiles { flex-wrap: wrap; }
}


/* ── Help page ── */
.help-pills { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.help-pill {
    padding: 7px 14px; border-radius: 20px; font-size: 12px; font-weight: 600;
    text-decoration: none; border: 1px solid transparent;
    transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.help-pill-c1 { background: var(--c-primary-l); color: var(--c-primary); border-color: var(--c-primary-m); }
.help-pill-c1:hover { background: var(--c-primary); color: #fff; border-color: var(--c-primary); }
.help-pill-c2 { background: #e0f2fe; color: #0369a1; border-color: #bae6fd; }
.help-pill-c2:hover { background: #0369a1; color: #fff; border-color: #0369a1; }
.help-pill-c3 { background: #dcfce7; color: #166534; border-color: #bbf7d0; }
.help-pill-c3:hover { background: #166534; color: #fff; border-color: #166534; }
.help-pill-c4 { background: #fef3c7; color: #92400e; border-color: #fde68a; }
.help-pill-c4:hover { background: #92400e; color: #fff; border-color: #92400e; }
.help-pill-c5 { background: #ede9fe; color: #6d28d9; border-color: #ddd6fe; }
.help-pill-c5:hover { background: #6d28d9; color: #fff; border-color: #6d28d9; }
.help-pill-c6 { background: #ccfbf1; color: #0f766e; border-color: #99f6e4; }
.help-pill-c6:hover { background: #0f766e; color: #fff; border-color: #0f766e; }
.help-pill-c7 { background: #fee2e2; color: #991b1b; border-color: #fecaca; }
.help-pill-c7:hover { background: #991b1b; color: #fff; border-color: #991b1b; }
.help-pill-c8 { background: #f1f5f9; color: #475569; border-color: #e2e8f0; }
.help-pill-c8:hover { background: #475569; color: #fff; border-color: #475569; }
.help-content { display: flex; flex-direction: column; gap: 16px; }
.help-section { scroll-margin-top: 16px; }
.help-body p { font-size: 13px; color: var(--c-text-2); line-height: 1.6; margin-bottom: 10px; }
.help-body p:last-child { margin-bottom: 0; }
.help-body h3 { font-size: 13px; font-weight: 700; color: var(--c-text); margin: 16px 0 6px; }
.help-body h3:first-child { margin-top: 0; }
.help-body ul, .help-body ol { padding-left: 20px; font-size: 13px; color: var(--c-text-2); margin: 0 0 10px; }
.help-body li { margin-bottom: 5px; line-height: 1.5; }
.help-body code { background: #f1f5f9; padding: 1px 6px; border-radius: 4px; font-size: 12px; color: #7c3aed; font-family: 'SF Mono','Fira Code',monospace; }
.help-steps { list-style: none; padding: 0; counter-reset: step; margin: 0 0 10px; }
.help-steps li { counter-increment: step; display: flex; gap: 12px; margin-bottom: 10px; align-items: flex-start; }
.help-steps li::before {
    content: counter(step); flex-shrink: 0; width: 22px; height: 22px; border-radius: 50%;
    background: var(--c-primary); color: #fff; font-size: 11px; font-weight: 700;
    display: flex; align-items: center; justify-content: center; margin-top: 1px;
}
.help-steps li > div { font-size: 13px; color: var(--c-text-2); line-height: 1.5; }
.help-steps li strong { color: var(--c-text); }

/* ============================================================================
   "Bold" portal theme.
   The general polish below — colour-mesh background, section accents, stronger
   card hover — now applies SITE-WIDE (plain selectors). The dashboard-only
   structures further down (hero, pipeline funnel, clickable stat/campus cards)
   stay scoped to body.dash, since that markup only exists on dashboard.php.
   ============================================================================ */

/* Alive, colour-mesh page background instead of flat grey — every page */
body {
    background:
      radial-gradient(900px 500px at 100% -5%, rgba(99,102,241,.13), transparent 60%),
      radial-gradient(800px 500px at -5% 110%, rgba(196,30,30,.10), transparent 55%),
      radial-gradient(700px 600px at 60% 50%, rgba(20,184,166,.06), transparent 60%),
      var(--c-bg);
    background-attachment: fixed;
}

/* Section labels get a small gradient accent bar */
.section-label { display: flex; align-items: center; gap: 9px; }
.section-label::before {
    content: ''; width: 4px; height: 15px; border-radius: 99px; flex-shrink: 0;
    background: linear-gradient(180deg, #c41e1e, #f97316);
}

/* KPI stat cards are now links — keep them looking like cards, add a clear
   clickable lift + stronger colour glow on hover. Site-wide: module index
   tiles (admissions, front desk, fees, staff, ...) link to filtered lists. */
a.stat-card { display: block; color: #fff; text-decoration: none; cursor: pointer; }
a.stat-card:hover { text-decoration: none; color: #fff; }

/* Plain-card KPI tiles that act as links (e.g. Insights) */
a.card.kpi-link { display: block; color: inherit; text-decoration: none; cursor: pointer; transition: transform .18s cubic-bezier(.4,0,.2,1), box-shadow .18s ease; }
a.card.kpi-link:hover { text-decoration: none; transform: translateY(-3px); box-shadow: var(--shadow); }
.stat-card { transition: transform .18s cubic-bezier(.4,0,.2,1), box-shadow .18s ease; }
.stat-card:hover { transform: translateY(-4px); }
.stat-card.primary:hover { box-shadow: 0 20px 42px rgba(196,30,30,.46); }
.stat-card.success:hover { box-shadow: 0 20px 42px rgba(21,128,61,.44); }
.stat-card.danger:hover  { box-shadow: 0 20px 42px rgba(220,38,38,.46); }
.stat-card.blue:hover    { box-shadow: 0 20px 42px rgba(37,99,235,.46); }
.stat-card.warning:hover { box-shadow: 0 20px 42px rgba(180,83,9,.44); }
.stat-card.violet:hover  { box-shadow: 0 20px 42px rgba(109,40,217,.44); }
.stat-card.indigo:hover  { box-shadow: 0 20px 42px rgba(67,56,202,.44); }
.stat-card.teal:hover    { box-shadow: 0 20px 42px rgba(15,118,110,.44); }
.stat-card.orange:hover  { box-shadow: 0 20px 42px rgba(194,65,12,.44); }

/* Campus snapshot cards are now links too */
body.dash a.campus-snap { display: block; color: inherit; text-decoration: none; cursor: pointer; }
body.dash a.campus-snap:hover { text-decoration: none; transform: translateY(-4px); box-shadow: var(--shadow); }

/* A touch more depth on the today-strip + cards within the dashboard */
body.dash .today-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }

/* ── Hero — dramatic gradient greeting banner with inline KPI tiles ── */
body.dash .dash-hero-wrap { padding: 24px 30px 0; }
body.dash .dash-hero {
    position: relative; overflow: hidden; border-radius: var(--radius-lg);
    background: linear-gradient(115deg, #141d4a 0%, #2c2a8f 45%, #6d28d9 100%);
    box-shadow: 0 24px 50px rgba(16,24,40,.18), 0 6px 14px rgba(16,24,40,.08);
    padding: 26px 30px; color: #fff;
}
body.dash .dash-hero::after {
    content: ''; position: absolute; top: -80px; right: -40px; width: 320px; height: 320px;
    border-radius: 50%; background: radial-gradient(circle, rgba(196,30,30,.5), transparent 60%); pointer-events: none;
}
body.dash .dash-hero::before {
    content: ''; position: absolute; bottom: -120px; right: 210px; width: 300px; height: 300px;
    border-radius: 50%; background: radial-gradient(circle, rgba(59,130,246,.45), transparent 62%); pointer-events: none;
}
body.dash .dash-hero-inner { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
body.dash .dash-hero-greet { display: flex; align-items: center; gap: 18px; }
body.dash .dash-hero-av {
    width: 60px; height: 60px; border-radius: 18px; flex-shrink: 0;
    object-fit: cover; object-position: top center;
    border: 2px solid rgba(255,255,255,.22); box-shadow: 0 10px 24px rgba(0,0,0,.28);
}
body.dash .dash-hero-av-ph {
    width: 60px; height: 60px; border-radius: 18px; flex-shrink: 0;
    background: linear-gradient(135deg, #c41e1e, #f97316);
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 26px; font-weight: 800;
    border: 2px solid rgba(255,255,255,.22); box-shadow: 0 10px 24px rgba(196,30,30,.45);
}
body.dash .dash-hero h1 { font-size: 25px; font-weight: 800; letter-spacing: -.5px; color: #fff; }
body.dash .dash-hero-date { font-size: 11px; font-weight: 700; letter-spacing: 1.4px; text-transform: uppercase; color: rgba(255,255,255,.8); margin-bottom: 6px; }
body.dash .dash-hero-badges { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
body.dash .dash-hero-badge { background: rgba(255,255,255,.14); color: rgba(255,255,255,.92); padding: 3px 11px; border-radius: 20px; font-size: 12px; font-weight: 600; border: 1px solid rgba(255,255,255,.18); }
body.dash .dash-hero-kpis { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
body.dash .dash-hero-kpi { background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.16); border-radius: 14px; padding: 11px 18px; text-align: center; min-width: 86px; }
body.dash .dash-hero-kpi .k-val { font-size: 20px; font-weight: 800; letter-spacing: -.5px; color: #fff; }
body.dash .dash-hero-kpi .k-lab { font-size: 10px; color: rgba(255,255,255,.68); margin-top: 2px; text-transform: uppercase; letter-spacing: .5px; }
body.dash .dash-hero-actions { position: relative; z-index: 1; display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
body.dash .dash-hero-btn {
    display: inline-flex; align-items: center; padding: 8px 16px; border-radius: 10px;
    background: rgba(255,255,255,.16); color: #fff; border: 1px solid rgba(255,255,255,.28);
    font-size: 13px; font-weight: 700; text-decoration: none; transition: background var(--transition);
}
body.dash .dash-hero-btn:hover { background: rgba(255,255,255,.28); text-decoration: none; color: #fff; }
@media (max-width: 820px) { body.dash .dash-hero-kpis { width: 100%; } }
@media (max-width: 768px) { body.dash .dash-hero-wrap { padding: 16px 16px 0; } }

/* ── Pipeline funnel — vibrant gradient tiles (overrides the pale base) ── */
body.dash .funnel-stage { color: #fff; border: none; box-shadow: var(--shadow-sm); }
body.dash .funnel-stage .fs-label { color: rgba(255,255,255,.94); }
body.dash .funnel-stage:hover { transform: translateY(-3px); }
body.dash .funnel-stage.f1 { background: linear-gradient(135deg, #475569, #64748b); box-shadow: 0 8px 20px rgba(71,85,105,.34); }
body.dash .funnel-stage.ft { background: linear-gradient(135deg, #0f766e, #14b8a6); box-shadow: 0 8px 20px rgba(15,118,110,.36); }
body.dash .funnel-stage.f2 { background: linear-gradient(135deg, #1e40af, #3b82f6); box-shadow: 0 8px 20px rgba(37,99,235,.36); }
body.dash .funnel-stage.f3 { background: linear-gradient(135deg, #5b21b6, #8b5cf6); box-shadow: 0 8px 20px rgba(109,40,217,.36); }
body.dash .funnel-stage.f4 { background: linear-gradient(135deg, #b45309, #f59e0b); box-shadow: 0 8px 20px rgba(180,83,9,.36); }
body.dash .funnel-stage.f5 { background: linear-gradient(135deg, #15803d, #22c55e); box-shadow: 0 8px 20px rgba(21,128,61,.4); }

/* ── Collapse utility ──────────────────────────────────────────────────────
   Six modules (admissions/view, staff/view, settings/users, class_groups,
   fee_structures, sessions) render an inline edit form with class="hidden" and
   toggle it from an Edit button. The class was never defined, so every one of
   those forms sat permanently expanded and Edit/Cancel did nothing visible
   (found 2026-07-29). One rule fixes all of them. */
.hidden { display: none; }

/* ── Button row utility ────────────────────────────────────────────────────
   Same failure mode as .hidden above, found in the 2026-07-31 cleanup pass.
   students/add.php:854 writes class="gap-actions" alongside inline
   align-items:center;flex-wrap:wrap — both of which do nothing without
   display:flex — and students/edit.php:403 writes it bare, so its Save/Cancel
   buttons stacked as blocks instead of sitting in a row. The class was never
   defined. Before copying a utility class in this codebase, grep this file and
   confirm it exists. */
.gap-actions { display: flex; gap: 10px; }
