/* School of Occupational Medicine – Roadmap 2026 Color Scheme */

:root {
    /* Infographic palette */
    --plum-deep: #4d2c3d;
    --burgundy: #7c3e57;
    --mauve: #a5677e;
    --blush: #d9a7b5;
    --tan: #c5a082;
    --cream: #f7f2ec;
    --cream-warm: #ede6dc;

    /* Semantic tokens */
    --navy: var(--plum-deep);
    --navy-mid: var(--burgundy);
    --navy-light: var(--mauve);
    --gold: var(--tan);
    --gold-light: var(--blush);
    --gold-pale: #f5ebe8;
    --white: #ffffff;
    --bg: var(--cream);
    --bg-card: #ffffff;
    --border: #e0d4ce;
    --border-light: var(--cream-warm);
    --text: #3a3238;
    --text-muted: #7a6e74;
    --success: #4a7a5c;
    --error: #9e3a3a;
    --shadow: 0 1px 3px rgba(77, 44, 61, 0.08);
    --shadow-md: 0 4px 16px rgba(77, 44, 61, 0.12);
    --radius: 8px;
    --radius-lg: 12px;
    --font: 'Inter', system-ui, sans-serif;
    --font-serif: 'Merriweather', Georgia, serif;
    --sidebar-width: 260px;
}

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

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }

/* ── Top Bar ── */
.top-bar {
    background: var(--plum-deep);
    color: rgba(255,255,255,0.85);
    font-size: 0.78rem;
    padding: 0.45rem 0;
}

.top-bar-inner {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.top-bar-divider { opacity: 0.4; }
.top-bar-right { margin-left: auto; }
.top-bar-right strong { color: var(--gold-light); }

/* ── School Header ── */
.school-header {
    background: var(--white);
    border-bottom: 3px solid var(--tan);
    box-shadow: var(--shadow);
}

.school-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 1rem 0;
    flex-wrap: wrap;
}

.school-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
    color: inherit;
}

.school-crest {
    width: 56px;
    height: 56px;
    background: linear-gradient(145deg, var(--navy) 0%, var(--navy-mid) 100%);
    border: 3px solid var(--gold);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--gold-light);
    flex-shrink: 0;
    letter-spacing: 0.04em;
}

.school-crest.small {
    width: 40px;
    height: 40px;
    font-size: 0.65rem;
    border-width: 2px;
}

.school-brand-text { display: flex; flex-direction: column; line-height: 1.3; }
.school-brand-text strong {
    font-family: var(--font-serif);
    font-size: 1.15rem;
    color: var(--navy);
}
.school-brand-text small { font-size: 0.78rem; color: var(--text-muted); }

.school-nav {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    flex-wrap: wrap;
}

.school-nav a {
    color: var(--text);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 500;
    padding: 0.5rem 0.85rem;
    border-radius: var(--radius);
    transition: all 0.2s;
}

.school-nav a:hover { background: var(--bg); color: var(--navy); }
.school-nav a.active { color: var(--navy); font-weight: 700; border-bottom: 2px solid var(--gold); border-radius: 0; }

/* ── Admin Navigation ── */
.school-header-admin {
    border-bottom: none;
    box-shadow: none;
}

.school-header-admin .school-header-inner {
    padding-bottom: 0.75rem;
}

.admin-nav-bar {
    background: var(--cream-warm);
    border-top: 1px solid var(--border-light);
    border-bottom: 2px solid var(--tan);
    padding: 0.65rem 0 0.85rem;
}

.layout-admin .main-content {
    padding-top: 2.25rem;
}

.admin-nav {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex-wrap: nowrap;
    overflow-x: auto;
}

.admin-nav-link {
    color: var(--text);
    text-decoration: none;
    font-size: 0.82rem;
    font-weight: 500;
    padding: 0.4rem 0.7rem;
    border-radius: var(--radius);
    white-space: nowrap;
    transition: all 0.15s;
}

.admin-nav-link:hover {
    background: var(--white);
    color: var(--navy);
}

.admin-nav-link.active {
    background: var(--white);
    color: var(--plum-deep);
    font-weight: 700;
    box-shadow: var(--shadow);
}

.admin-nav-group {
    display: inline-flex;
    align-items: center;
    gap: 0.15rem;
    padding: 0.2rem 0.35rem 0.2rem 0.5rem;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 999px;
    flex-shrink: 0;
}

.admin-nav-label {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--burgundy);
    padding-right: 0.25rem;
    white-space: nowrap;
}

.admin-nav-logout {
    margin-left: auto;
    flex-shrink: 0;
}

.admin-action-groups {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}

.admin-action-group {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 0.75rem;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.admin-action-label {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--burgundy);
    padding-right: 0.35rem;
    border-right: 1px solid var(--border-light);
    margin-right: 0.15rem;
    white-space: nowrap;
}

.admin-table-toolbar {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
    padding: 1rem 1.15rem;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.admin-table-search {
    display: flex;
    align-items: flex-end;
    gap: 0.75rem;
    flex-wrap: wrap;
    flex: 1;
}

.admin-table-search .form-group {
    margin-bottom: 0;
    min-width: 180px;
}

.search-field-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.search-field-wrap input {
    width: 100%;
    padding-right: 2.5rem;
}

.search-icon-btn {
    position: absolute;
    right: 0.65rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: none;
    padding: 0;
    margin: 0;
    cursor: pointer;
    color: var(--text-muted);
    line-height: 0;
}

.search-icon-btn:hover {
    color: var(--plum-deep);
}

.search-icon {
    width: 1rem;
    height: 1rem;
}

.student-picker .search-icon-btn {
    pointer-events: none;
}

.student-picker-control {
    position: relative;
}

.student-picker-results {
    position: absolute;
    top: calc(100% + 0.35rem);
    left: 0;
    right: 0;
    z-index: 20;
    list-style: none;
    margin: 0;
    padding: 0.35rem 0;
    max-height: 260px;
    overflow-y: auto;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
}

.student-picker-option,
.student-picker-empty {
    padding: 0.7rem 0.9rem;
    cursor: pointer;
}

.student-picker-option {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    border-bottom: 1px solid var(--border-light);
}

.student-picker-option:last-child {
    border-bottom: none;
}

.student-picker-option strong {
    font-size: 0.88rem;
    color: var(--plum-deep);
}

.student-picker-option span {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.student-picker-option:hover,
.student-picker-option.is-active {
    background: var(--gold-pale);
}

.student-picker-empty {
    font-size: 0.86rem;
    color: var(--text-muted);
    cursor: default;
}

.admin-table-toolbar-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.admin-table-wrap {
    overflow-x: auto;
}

.admin-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.admin-pagination-info {
    font-size: 0.84rem;
    color: var(--text-muted);
}

body.modal-open {
    overflow: hidden;
}

.confirm-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.confirm-modal[hidden] {
    display: none;
}

.confirm-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(58, 50, 56, 0.55);
}

.confirm-modal-dialog {
    position: relative;
    width: min(100%, 420px);
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 1.5rem 1.6rem;
    box-shadow: var(--shadow-md);
    border-top: 4px solid var(--burgundy);
}

.confirm-modal-dialog h3 {
    font-family: var(--font-serif);
    font-size: 1.2rem;
    color: var(--plum-deep);
    margin-bottom: 0.65rem;
}

.confirm-modal-dialog p {
    font-size: 0.92rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 1.25rem;
}

.confirm-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.65rem;
}

.section-header-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.assignment-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.admin-assignment-grid {
    margin-top: 0.5rem;
}

.assignment-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.25rem 1.35rem;
    box-shadow: var(--shadow);
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    border-top: 4px solid var(--mauve);
    transition: box-shadow 0.2s, transform 0.2s;
}

a.assignment-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.assignment-card.assignment-due-soon {
    border-top-color: var(--tan);
}

.assignment-card.assignment-overdue {
    border-top-color: var(--error);
}

.assignment-card.assignment-submitted {
    border-top-color: var(--success);
}

.assignment-card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
}

.assignment-card-module {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--burgundy);
}

.assignment-card-points {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--plum-deep);
    background: var(--gold-pale);
    padding: 0.2rem 0.55rem;
    border-radius: 20px;
}

.assignment-card h3,
.assignment-card h4 {
    font-family: var(--font-serif);
    font-size: 1.05rem;
    color: var(--plum-deep);
    line-height: 1.35;
}

.assignment-card p {
    font-size: 0.86rem;
    color: var(--text-muted);
    line-height: 1.55;
    flex: 1;
}

.assignment-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.assignment-status-badge {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 0.25rem 0.55rem;
    border-radius: 20px;
    background: var(--bg);
    color: var(--text-muted);
    border: 1px solid var(--border);
}

.assignment-status-submitted {
    background: #edf7f0;
    color: var(--success);
    border-color: #b8e0c8;
}

.assignment-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-light);
}

.assignment-card-grade {
    font-size: 0.84rem;
    font-weight: 700;
    color: var(--plum-deep);
}

.assignment-detail-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    box-shadow: var(--shadow);
    margin-bottom: 1.5rem;
    border-top: 4px solid var(--mauve);
}

.assignment-detail-card h1 {
    font-size: 1.6rem;
    margin-bottom: 0.5rem;
}

.admin-form-layout {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 1.5rem;
    align-items: start;
}

.assignment-preview-panel {
    position: sticky;
    top: 1rem;
}

.assignment-preview-panel h3 {
    margin-bottom: 1rem;
    color: var(--plum-deep);
}

.submission-review-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 1.5rem;
    align-items: start;
}

.submission-content-box {
    background: var(--bg);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    padding: 1rem 1.15rem;
    margin-top: 1rem;
}

.submission-text {
    line-height: 1.7;
    font-size: 0.92rem;
}

.submission-file {
    margin-top: 1rem;
    font-size: 0.88rem;
}

@media (max-width: 900px) {
    .admin-form-layout,
    .submission-review-grid {
        grid-template-columns: 1fr;
    }

    .assignment-preview-panel {
        position: static;
    }
}

/* ── Portal Layout ── */
.portal-shell {
    display: flex;
    flex: 1;
    align-items: stretch;
}

.portal-sidebar {
    width: var(--sidebar-width);
    background: var(--navy);
    color: var(--white);
    padding: 1.5rem 0;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    align-self: stretch;
    min-height: 100%;
}

.sidebar-profile {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0 1.25rem 1.25rem;
    border-bottom: 1px solid rgba(255,255,255,0.12);
    margin-bottom: 0.5rem;
}

.profile-avatar {
    width: 42px;
    height: 42px;
    background: var(--gold);
    color: var(--navy);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.sidebar-profile strong { display: block; font-size: 0.9rem; }
.sidebar-profile span { font-size: 0.75rem; opacity: 0.7; }

.sidebar-label {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    opacity: 0.5;
    padding: 1rem 1.25rem 0.4rem;
    font-weight: 600;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.65rem 1.25rem;
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 500;
    transition: all 0.15s;
    border-left: 3px solid transparent;
}

.sidebar-nav a:hover {
    background: rgba(255,255,255,0.08);
    color: var(--white);
}

.sidebar-nav a.active {
    background: rgba(255,255,255,0.12);
    color: var(--gold-light);
    border-left-color: var(--gold);
    font-weight: 600;
}

.nav-icon { font-size: 1rem; width: 20px; text-align: center; }

.sidebar-exam {
    margin: auto 1rem 1rem;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(201, 162, 39, 0.4);
    border-radius: var(--radius);
    padding: 1rem;
    text-align: center;
}

.exam-days {
    display: block;
    font-family: var(--font-serif);
    font-size: 2rem;
    font-weight: 900;
    color: var(--gold-light);
    line-height: 1;
}

.sidebar-exam span { font-size: 0.78rem; opacity: 0.85; }
.sidebar-exam small { display: block; font-size: 0.72rem; opacity: 0.6; margin-top: 0.25rem; }

.sidebar-logout {
    display: block;
    margin: 0 1rem;
    padding: 0.6rem;
    text-align: center;
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    font-size: 0.85rem;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: var(--radius);
    transition: all 0.2s;
}

.sidebar-logout:hover { background: rgba(255,255,255,0.1); color: var(--white); }

.portal-main { flex: 1; min-width: 0; width: 100%; }
.portal-content {
    padding: 1.75rem 2.5rem;
    width: 100%;
    max-width: none;
}

.layout-portal .top-bar .container,
.layout-portal .school-header .container,
.layout-portal .school-footer .container {
    max-width: none;
    width: 100%;
}

.layout-portal .portal-shell {
    width: 100%;
}

.layout-portal .school-footer {
    margin-top: 0;
}

.main-content { flex: 1; padding: 0 0 2rem; }

/* ── Typography ── */
h1 {
    font-family: var(--font-serif);
    font-size: 1.75rem;
    color: var(--navy);
    margin-bottom: 0.35rem;
}

h2 {
    font-family: var(--font-serif);
    font-size: 1.25rem;
    color: var(--navy);
    margin-bottom: 0.75rem;
}

h3 { font-size: 1rem; color: var(--navy-mid); font-weight: 700; }
h4 { font-size: 0.9rem; color: var(--text-muted); font-weight: 600; margin: 1rem 0 0.5rem; }

.page-header { margin-bottom: 1.75rem; }
.page-header p { color: var(--text-muted); font-size: 0.92rem; }
.page-intro { color: var(--text-muted); margin-bottom: 1.5rem; }
.text-muted { color: var(--text-muted); font-size: 0.88rem; }

.section { margin-top: 2rem; }
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.link { color: var(--navy-light); font-weight: 600; text-decoration: none; font-size: 0.88rem; }
.link:hover { text-decoration: underline; }

.breadcrumb {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-light);
}

.breadcrumb a { color: var(--navy-light); text-decoration: none; font-weight: 500; }

/* ── Buttons ── */
.btn {
    display: inline-block;
    padding: 0.55rem 1.2rem;
    border-radius: var(--radius);
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: none;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.btn-primary { background: var(--navy); color: var(--white); }
.btn-primary:hover { background: var(--navy-mid); }

.btn-gold { background: var(--tan); color: var(--plum-deep); }
.btn-gold:hover { background: var(--blush); }

.btn-secondary { background: var(--white); color: var(--navy); border-color: var(--border); }
.btn-secondary:hover { border-color: var(--navy); }

.btn-outline-navy {
    background: transparent;
    color: var(--navy);
    border-color: var(--navy);
}
.btn-outline-navy:hover { background: var(--navy); color: var(--white); }

.btn-outline {
    background: transparent;
    color: var(--white);
    border-color: rgba(255,255,255,0.5);
}
.btn-outline:hover { background: rgba(255,255,255,0.15); }

.btn-sm { padding: 0.38rem 0.9rem; font-size: 0.82rem; }
.btn-lg { padding: 0.75rem 1.5rem; font-size: 0.95rem; }
.btn-block { display: block; width: 100%; text-align: center; }

/* ── Homepage Hero Banner ── */
.hero-banner {
    margin-bottom: 2.75rem;
    padding: 2.5rem 0 0;
    border-bottom: 1px solid var(--border);
}

.hero-banner-grid {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 2.5rem;
    align-items: start;
}

.hero-banner-top {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}

.hero-year {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--white);
    background: var(--burgundy);
    padding: 0.3rem 0.75rem;
    border-radius: 4px;
}

.hero-faculty {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.hero-banner-content h1 {
    font-family: var(--font-serif);
    font-size: clamp(2rem, 4.5vw, 2.75rem);
    color: var(--navy);
    line-height: 1.15;
    margin-bottom: 0.75rem;
    max-width: 640px;
}

.hero-motto {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--navy-mid);
    margin-bottom: 0.65rem;
    line-height: 1.5;
}

.hero-text {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.7;
    max-width: 560px;
    margin-bottom: 1.75rem;
}

.hero-buttons {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.hero-metrics {
    display: flex;
    gap: 0;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--white);
    box-shadow: var(--shadow);
    max-width: 480px;
}

.hero-metric {
    flex: 1;
    text-align: center;
    padding: 0.9rem 0.5rem;
    border-right: 1px solid var(--border-light);
}

.hero-metric:last-child { border-right: none; }

.hero-metric dt {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--navy);
    line-height: 1;
}

.hero-metric dd {
    font-size: 0.72rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-top: 0.25rem;
}

.hero-banner-side {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.countdown-panel {
    background: var(--plum-deep);
    color: var(--white);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    text-align: center;
    box-shadow: var(--shadow-md);
    border-top: 4px solid var(--tan);
}

.countdown-heading {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--blush);
    margin-bottom: 0.5rem;
}

.countdown-days {
    font-family: var(--font-serif);
    font-size: 4rem;
    font-weight: 900;
    line-height: 1;
    color: var(--white);
}

.countdown-label {
    font-size: 0.82rem;
    opacity: 0.85;
    margin-top: 0.15rem;
}

.countdown-date {
    font-size: 0.88rem;
    font-weight: 600;
    margin-top: 0.85rem;
    padding-top: 0.85rem;
    border-top: 1px solid rgba(255,255,255,0.15);
    color: rgba(255,255,255,0.9);
}

.hero-info-panel {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.15rem 1.25rem;
    box-shadow: var(--shadow);
}

.hero-info-title {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.hero-info-name {
    font-family: var(--font-serif);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 0.4rem;
}

.hero-info-detail {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.hero-scroll-link {
    font-size: 0.84rem;
    font-weight: 600;
    color: var(--navy-light);
    text-decoration: none;
    text-align: center;
    padding: 0.5rem;
    transition: color 0.2s;
}

.hero-scroll-link:hover {
    color: var(--navy);
    text-decoration: underline;
}

/* Course cards */
.course-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
}

.course-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: box-shadow 0.2s, transform 0.2s;
}

.course-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }

.course-card-header {
    background: var(--navy);
    color: var(--white);
    padding: 1rem 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.course-card-header.mod-1 { background: var(--burgundy); }
.course-card-header.mod-2 { background: var(--tan); color: var(--plum-deep); }
.course-card-header.mod-2 .course-code,
.course-card-header.mod-2 h3 { color: var(--plum-deep); opacity: 1; }
.course-card-header.mod-2 .course-credits { background: var(--plum-deep); color: var(--white); }
.course-card-header.mod-3 { background: var(--plum-deep); }
.course-card-header.mod-4 { background: var(--mauve); }

.course-code {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    opacity: 0.8;
    margin-bottom: 0.2rem;
}

.course-card-header h3 {
    font-family: var(--font-serif);
    font-size: 0.95rem;
    color: var(--white);
    line-height: 1.35;
}

.course-credits {
    background: var(--gold);
    color: var(--navy);
    padding: 0.2rem 0.55rem;
    border-radius: 4px;
    font-size: 0.72rem;
    font-weight: 700;
    white-space: nowrap;
}

.course-card-body { padding: 1.15rem 1.25rem; }
.course-card-body p { font-size: 0.86rem; color: var(--text-muted); margin-bottom: 0.85rem; }

.course-topics {
    list-style: none;
    font-size: 0.82rem;
}

.course-topics li {
    padding: 0.3rem 0;
    padding-left: 1rem;
    position: relative;
    border-bottom: 1px solid var(--border-light);
    color: var(--text);
}

.course-topics li:last-child { border-bottom: none; }
.course-topics li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: var(--gold);
    font-size: 0.7rem;
}

.course-card-footer {
    padding: 0.85rem 1.25rem;
    background: var(--bg);
    border-top: 1px solid var(--border-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* ── Programme Modules (Homepage) ── */
.programme-section {
    margin: 2.5rem 0 0;
    padding: 0 0 1rem;
}

.programme-wrap {
    width: 100%;
}

.programme-head {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 2rem;
    align-items: end;
    margin-bottom: 1.75rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid var(--burgundy);
}

.programme-eyebrow {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--burgundy);
    margin-bottom: 0.5rem;
}

.programme-head h2 {
    font-family: var(--font-serif);
    font-size: 2rem;
    color: var(--navy);
    margin-bottom: 0.35rem;
}

.programme-head p {
    color: var(--text-muted);
    font-size: 0.95rem;
    max-width: 540px;
    line-height: 1.65;
}

.programme-stats-bar {
    display: flex;
    gap: 0;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--white);
    box-shadow: var(--shadow);
}

.prog-stat {
    padding: 0.85rem 1.35rem;
    text-align: center;
    border-right: 1px solid var(--border-light);
    min-width: 88px;
}

.prog-stat:last-child { border-right: none; }

.prog-stat-val {
    display: block;
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--navy);
    line-height: 1.1;
}

.prog-stat-lbl {
    display: block;
    font-size: 0.72rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 0.15rem;
}

/* Catalogue rows */
.prog-catalog {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.prog-row {
    display: grid;
    grid-template-columns: 72px 1fr auto;
    gap: 0;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: box-shadow 0.2s, border-color 0.2s;
}

.prog-row:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--navy-light);
}

.prog-row-index {
    background: var(--burgundy);
    color: var(--white);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 1.25rem 0.5rem;
}

.prog-num {
    font-family: var(--font-serif);
    font-size: 1.6rem;
    font-weight: 900;
    line-height: 1;
    color: var(--tan);
}

.prog-icon { font-size: 1.1rem; opacity: 0.85; }

.prog-row-content {
    padding: 1.25rem 1.5rem;
    border-right: 1px solid var(--border-light);
}

.prog-row-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1.5rem;
    margin-bottom: 0.65rem;
}

.prog-code {
    display: block;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--navy-light);
    margin-bottom: 0.2rem;
}

.prog-row-content h3 {
    font-family: var(--font-serif);
    font-size: 1.05rem;
    color: var(--navy);
    line-height: 1.35;
}

.prog-weight-block {
    text-align: right;
    flex-shrink: 0;
    min-width: 90px;
}

.prog-weight-val {
    display: block;
    font-family: var(--font-serif);
    font-size: 1.25rem;
    font-weight: 900;
    color: var(--navy);
    line-height: 1;
}

.prog-weight-track {
    height: 6px;
    background: var(--border-light);
    border-radius: 3px;
    margin: 0.35rem 0 0.25rem;
    overflow: hidden;
}

.prog-weight-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--mauve), var(--tan));
    border-radius: 3px;
}

.prog-weight-lbl {
    font-size: 0.65rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.prog-desc {
    font-size: 0.86rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 0.85rem;
}

.prog-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.prog-tag {
    font-size: 0.75rem;
    padding: 0.28rem 0.65rem;
    background: var(--gold-pale);
    border: 1px solid var(--blush);
    border-radius: 20px;
    color: var(--burgundy);
    white-space: nowrap;
}

.prog-row-action {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1.25rem 1.35rem;
    background: var(--bg);
    min-width: 130px;
}

.prog-topic-count {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 600;
    text-align: center;
}

/* Calendar table */
.academic-calendar {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.calendar-row {
    display: grid;
    grid-template-columns: 160px 1fr;
    border-bottom: 1px solid var(--border-light);
}

.calendar-row:last-child { border-bottom: none; }
.calendar-row.highlight { background: var(--gold-pale); }

.cal-date {
    padding: 1rem 1.25rem;
    background: var(--bg);
    font-weight: 700;
    font-size: 0.82rem;
    color: var(--navy);
    border-right: 1px solid var(--border-light);
    display: flex;
    align-items: center;
}

.cal-event { padding: 1rem 1.25rem; font-size: 0.88rem; }
.cal-event strong { color: var(--navy); display: block; margin-bottom: 0.15rem; }
.cal-event span { color: var(--text-muted); font-size: 0.82rem; }

/* ── Portal Dashboard ── */
.portal-welcome {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem 1.75rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow);
    border-left: 4px solid var(--mauve);
}

.portal-welcome h1 { font-size: 1.4rem; margin-bottom: 0.25rem; }

.stat-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 1.75rem;
}

.stat-tile {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.15rem;
    text-align: center;
    box-shadow: var(--shadow);
}

.stat-tile .num {
    font-family: var(--font-serif);
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--navy);
    line-height: 1;
}

.stat-tile .lbl { font-size: 0.78rem; color: var(--text-muted); margin-top: 0.3rem; }

.notice-board {
    background: var(--gold-pale);
    border: 1px solid var(--blush);
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
    margin-bottom: 1.75rem;
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
}

.notice-board .notice-icon { font-size: 1.2rem; flex-shrink: 0; }
.notice-board strong { color: var(--navy); font-size: 0.88rem; }
.notice-board p { font-size: 0.85rem; color: var(--text); margin-top: 0.2rem; }

/* Materials */
.material-list { display: flex; flex-direction: column; gap: 0.5rem; }

.material-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    background: var(--white);
    border: 1px solid var(--border);
    padding: 0.9rem 1.15rem;
    border-radius: var(--radius);
    text-decoration: none;
    color: inherit;
    transition: border-color 0.15s;
}

.material-item:hover { border-color: var(--navy-light); }

.material-type {
    display: inline-block;
    padding: 0.2rem 0.55rem;
    border-radius: 4px;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    white-space: nowrap;
    flex-shrink: 0;
    background: var(--bg);
    color: var(--navy);
    border: 1px solid var(--border);
}

.type-past_paper { background: var(--gold-pale); color: var(--burgundy); border-color: var(--blush); }
.type-flashcards { background: #f0e8ec; color: var(--mauve); border-color: var(--blush); }
.type-notes { background: #f5f0eb; color: var(--plum-deep); border-color: var(--tan); }

.material-desc { font-size: 0.84rem; color: var(--text-muted); margin-top: 0.2rem; }

/* Quick access grid */
.quick-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 0.85rem;
}

.quick-tile {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.15rem;
    text-decoration: none;
    color: inherit;
    text-align: center;
    transition: all 0.2s;
    box-shadow: var(--shadow);
}

.quick-tile:hover { border-color: var(--gold); box-shadow: var(--shadow-md); }
.quick-tile .qt-icon { font-size: 1.6rem; margin-bottom: 0.4rem; }
.quick-tile strong { display: block; font-size: 0.88rem; color: var(--navy); }
.quick-tile span { font-size: 0.78rem; color: var(--text-muted); }

/* Module detail */
.module-detail-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    box-shadow: var(--shadow);
    margin-bottom: 1.5rem;
}

.topic-grid { display: flex; flex-wrap: wrap; gap: 0.5rem; }

.topic-chip {
    background: var(--bg);
    border: 1px solid var(--border);
    padding: 0.4rem 0.85rem;
    border-radius: 20px;
    font-size: 0.84rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.topic-num {
    background: var(--navy);
    color: var(--white);
    width: 20px; height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.68rem;
    font-weight: 700;
}

/* Material view */
.material-view {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow);
    margin-bottom: 1.5rem;
}

.material-content.prose { line-height: 1.75; }
.material-nav { display: flex; gap: 0.75rem; flex-wrap: wrap; margin-top: 1rem; }

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.flashcard-app {
    margin-top: 1.5rem;
}

.flashcard-fallback {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1.25rem;
}

.flashcard-fallback > p {
    color: var(--text-muted);
}

.flashcard-screen h2 {
    font-family: var(--font-serif);
    font-size: 1.45rem;
    color: var(--navy);
    margin: 0.35rem 0 0.75rem;
    line-height: 1.35;
}

.flashcard-kicker {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--mauve);
    margin-bottom: 0.2rem;
}

.flashcard-meta {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin: 0.75rem 0 1.25rem;
}

.flashcard-toolbar {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.84rem;
    font-weight: 600;
    color: var(--navy);
}

.flashcard-progress {
    flex: 1;
    height: 8px;
    background: var(--cream-warm);
    border-radius: 99px;
    overflow: hidden;
}

.flashcard-progress-fill {
    display: block;
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, var(--mauve), var(--tan));
    border-radius: 99px;
    transition: width 0.25s ease;
}

.flashcard-timer {
    background: var(--gold-pale);
    border: 1px solid var(--blush);
    border-radius: var(--radius);
    padding: 0.85rem 1rem;
    margin-bottom: 1rem;
}

.flashcard-timer-copy {
    display: flex;
    align-items: baseline;
    gap: 0.45rem;
    margin-bottom: 0.55rem;
}

.flashcard-timer-copy strong {
    font-family: var(--font-serif);
    font-size: 1.6rem;
    color: var(--navy);
    line-height: 1;
}

.flashcard-timer-copy span {
    font-size: 0.84rem;
    color: var(--text-muted);
}

.flashcard-timer-track {
    height: 8px;
    background: rgba(77, 44, 61, 0.08);
    border-radius: 99px;
    overflow: hidden;
}

.flashcard-timer-bar {
    display: block;
    height: 100%;
    width: 100%;
    background: var(--burgundy);
    border-radius: 99px;
    transition: width 1s linear, background 0.2s;
}

.flashcard-timer-bar.is-urgent {
    background: var(--error);
}

.flashcard-card {
    background: var(--cream);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.35rem 1.5rem;
}

.flashcard-card h2 {
    white-space: pre-wrap;
    font-size: 1.25rem;
}

.flashcard-attempt {
    margin-top: 1.15rem;
}

.flashcard-attempt label {
    display: block;
    font-size: 0.84rem;
    font-weight: 600;
    color: var(--navy);
    margin-bottom: 0.4rem;
}

.flashcard-attempt textarea {
    width: 100%;
    padding: 0.7rem 0.85rem;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    font: inherit;
    min-height: 110px;
    resize: vertical;
    background: var(--white);
}

.flashcard-attempt textarea:focus {
    outline: none;
    border-color: var(--navy-light);
    box-shadow: 0 0 0 3px rgba(165, 103, 126, 0.18);
}

.flashcard-answer-panel {
    margin-top: 1.15rem;
    padding-top: 1.1rem;
    border-top: 1px solid var(--border);
    animation: flashcard-reveal 0.35s ease;
}

@keyframes flashcard-reveal {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: none; }
}

.flashcard-attempt-review {
    margin-bottom: 1rem;
    padding: 0.85rem 1rem;
    background: var(--white);
    border-radius: var(--radius);
    border: 1px dashed var(--border);
}

.flashcard-attempt-review p {
    white-space: pre-wrap;
    margin: 0;
}

.flashcard-answer {
    white-space: pre-wrap;
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text);
}

.flashcard-controls {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 1.15rem;
}

.flashcard-controls .btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.flashcard-editor-header {
    margin-bottom: 0.85rem;
}

.flashcard-editor-header .text-muted {
    margin-top: 0.25rem;
}

.flashcard-editor-list {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    margin-bottom: 0.85rem;
}

.flashcard-editor-item {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem 1.1rem 0.35rem;
    background: var(--cream);
}

.flashcard-editor-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.flashcard-editor-item-header strong {
    color: var(--navy);
    font-size: 0.88rem;
}

.flashcard-app [hidden],
.flashcard-editor-item [hidden],
#flashcard-editor-group[hidden],
#content-editor-group[hidden] {
    display: none !important;
}

/* ── Auth pages (login / register) ── */
.auth-layout {
    display: grid;
    grid-template-columns: 380px 1fr;
    max-width: 980px;
    margin: 2rem auto 3rem;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    min-height: 580px;
}

.auth-layout-compact {
    min-height: 480px;
    grid-template-columns: 340px 1fr;
}

.auth-brand {
    background: linear-gradient(160deg, var(--plum-deep) 0%, var(--burgundy) 55%, var(--mauve) 100%);
    color: var(--white);
    padding: 2.5rem 2rem;
    display: flex;
    flex-direction: column;
}

.auth-brand-inner {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.auth-crest {
    width: 56px;
    height: 56px;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    border-color: var(--tan);
}

.auth-brand-eyebrow {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--blush);
    margin-bottom: 0.5rem;
}

.auth-brand h2 {
    font-family: var(--font-serif);
    font-size: 1.35rem;
    color: var(--white);
    line-height: 1.3;
    margin-bottom: 0.65rem;
}

.auth-brand-tagline {
    font-size: 0.88rem;
    color: rgba(255,255,255,0.8);
    line-height: 1.6;
    margin-bottom: 1.75rem;
}

.auth-benefits {
    list-style: none;
    margin-bottom: auto;
}

.auth-benefits li {
    font-size: 0.86rem;
    padding: 0.45rem 0 0.45rem 1.25rem;
    position: relative;
    color: rgba(255,255,255,0.9);
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.auth-benefits li:last-child { border-bottom: none; }

.auth-benefits li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.75rem;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--tan);
}

.auth-brand-exam {
    margin-top: 1.75rem;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(255,255,255,0.15);
}

.auth-exam-label {
    display: block;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--blush);
    margin-bottom: 0.25rem;
}

.auth-exam-date {
    display: block;
    font-family: var(--font-serif);
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--white);
}

.auth-exam-days {
    display: block;
    font-size: 0.8rem;
    color: rgba(255,255,255,0.75);
    margin-top: 0.2rem;
}

.auth-form-panel {
    background: var(--white);
    padding: 2.5rem 2.75rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.auth-form-header {
    margin-bottom: 1.75rem;
}

.auth-form-header h1 {
    font-family: var(--font-serif);
    font-size: 1.65rem;
    color: var(--plum-deep);
    margin-bottom: 0.4rem;
}

.auth-form-header p {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.55;
}

.auth-form {
    flex: 1;
}

.form-section {
    border: none;
    padding: 0;
    margin: 0 0 1.5rem;
}

.form-section legend {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--burgundy);
    margin-bottom: 0.85rem;
    padding: 0;
    width: 100%;
    border-bottom: 1px solid var(--border-light);
    padding-bottom: 0.5rem;
}

.field-hint {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.35rem;
    line-height: 1.4;
}

.auth-switch {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border-light);
    font-size: 0.88rem;
    color: var(--text-muted);
}

.auth-switch a {
    color: var(--burgundy);
    font-weight: 700;
    text-decoration: none;
}

.auth-switch a:hover { text-decoration: underline; }

/* ── School Homepage ── */
.main-content-home { padding: 0; }

.school-hero {
    position: relative;
    background: linear-gradient(135deg, var(--plum-deep) 0%, var(--burgundy) 50%, #6b3549 100%);
    color: var(--white);
    padding: 3rem 0 3.5rem;
    margin-bottom: 0;
    border-bottom: 4px solid var(--tan);
    overflow: hidden;
}

.school-hero-pattern {
    position: absolute;
    inset: 0;
    opacity: 0.06;
    background-image:
        repeating-linear-gradient(
            45deg,
            transparent,
            transparent 20px,
            rgba(255,255,255,0.15) 20px,
            rgba(255,255,255,0.15) 21px
        );
    pointer-events: none;
}

.school-hero-grid {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 3rem;
    align-items: start;
}

.school-hero-labels {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 1.25rem;
}

.school-year-badge {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    background: var(--tan);
    color: var(--plum-deep);
    padding: 0.35rem 0.85rem;
    border-radius: 4px;
}

.school-faculty-label {
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: rgba(255,255,255,0.75);
}

.school-hero-title {
    font-family: var(--font-serif);
    font-size: clamp(2rem, 4vw, 2.85rem);
    color: var(--white);
    line-height: 1.15;
    margin-bottom: 0.85rem;
    max-width: 620px;
}

.school-hero-motto {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--blush);
    margin-bottom: 0.75rem;
    line-height: 1.5;
    max-width: 560px;
}

.school-hero-desc {
    font-size: 0.95rem;
    color: rgba(255,255,255,0.82);
    line-height: 1.7;
    max-width: 580px;
    margin-bottom: 1.75rem;
}

.school-hero-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.school-hero-metrics {
    display: flex;
    gap: 0;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: var(--radius);
    overflow: hidden;
    background: rgba(255,255,255,0.08);
    max-width: 520px;
    backdrop-filter: blur(4px);
}

.school-metric {
    flex: 1;
    text-align: center;
    padding: 1rem 0.5rem;
    border-right: 1px solid rgba(255,255,255,0.12);
}

.school-metric:last-child { border-right: none; }

.school-metric dt {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--white);
    line-height: 1;
}

.school-metric dd {
    font-size: 0.68rem;
    color: rgba(255,255,255,0.7);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 0.3rem;
}

.school-hero-aside {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.school-crest-panel {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    text-align: center;
}

.school-crest-large {
    width: 80px;
    height: 80px;
    font-size: 1.1rem;
    margin: 0 auto 1rem;
    border-width: 3px;
}

.school-crest-panel strong {
    display: block;
    font-family: var(--font-serif);
    font-size: 1rem;
    color: var(--white);
    line-height: 1.35;
    margin-bottom: 0.25rem;
}

.school-crest-panel span {
    font-size: 0.78rem;
    color: rgba(255,255,255,0.7);
}

.school-countdown-card {
    background: var(--white);
    color: var(--plum-deep);
    border-radius: var(--radius-lg);
    padding: 1.35rem 1.5rem;
    text-align: center;
    box-shadow: var(--shadow-md);
    border-top: 4px solid var(--tan);
}

.school-countdown-label {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--burgundy);
    margin-bottom: 0.35rem;
}

.school-countdown-days {
    font-family: var(--font-serif);
    font-size: 3.25rem;
    font-weight: 900;
    line-height: 1;
    color: var(--plum-deep);
}

.school-countdown-sub {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-top: 0.15rem;
}

.school-countdown-date {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--navy-mid);
    margin-top: 0.85rem;
    padding-top: 0.85rem;
    border-top: 1px solid var(--border-light);
}

.school-director-card {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: var(--radius);
    padding: 1.15rem 1.25rem;
}

.school-director-label {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--blush);
    margin-bottom: 0.25rem;
}

.school-director-name {
    font-family: var(--font-serif);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 0.2rem;
}

.school-director-detail {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.75);
}

.school-notice {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    flex-wrap: wrap;
    background: var(--gold-pale);
    border: 1px solid var(--blush);
    border-left: 4px solid var(--tan);
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
    margin: 2rem auto;
    box-shadow: var(--shadow);
}

.school-notice-tag {
    flex-shrink: 0;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    background: var(--burgundy);
    color: var(--white);
    padding: 0.3rem 0.65rem;
    border-radius: 4px;
}

.school-notice p {
    flex: 1;
    font-size: 0.88rem;
    color: var(--text);
    line-height: 1.55;
    min-width: 200px;
}

.school-notice p strong { color: var(--plum-deep); }

.school-notice-link {
    flex-shrink: 0;
    font-size: 0.84rem;
    font-weight: 600;
    color: var(--burgundy);
    text-decoration: none;
    align-self: center;
}

.school-notice-link:hover { text-decoration: underline; }

.school-services {
    padding: 2.5rem 0;
    background: var(--white);
    border-bottom: 1px solid var(--border-light);
}

.school-section-head {
    margin-bottom: 1.5rem;
}

.school-section-head h2 {
    font-family: var(--font-serif);
    font-size: 1.75rem;
    color: var(--plum-deep);
    margin-bottom: 0.35rem;
}

.school-section-head p {
    font-size: 0.92rem;
    color: var(--text-muted);
    line-height: 1.6;
    max-width: 560px;
}

.school-section-eyebrow {
    display: block;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--burgundy);
    margin-bottom: 0.4rem;
}

.school-section-eyebrow-light { color: var(--blush); }

.school-services-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.school-service-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.35rem 1.25rem;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s;
    box-shadow: var(--shadow);
    border-top: 3px solid var(--tan);
}

.school-service-card:hover {
    border-color: var(--mauve);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.ssc-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: var(--plum-deep);
    color: var(--tan);
    font-family: var(--font-serif);
    font-size: 1rem;
    font-weight: 900;
    border-radius: 50%;
    margin-bottom: 0.75rem;
}

.school-service-card strong {
    display: block;
    font-size: 0.92rem;
    color: var(--plum-deep);
    margin-bottom: 0.25rem;
}

.school-service-card span:last-child {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.school-programme {
    padding: 2.75rem 0;
    background: var(--bg);
}

.school-calendar-section {
    padding: 2.75rem 0 3rem;
    background: var(--white);
}

.school-admissions {
    background: linear-gradient(135deg, var(--plum-deep) 0%, var(--burgundy) 100%);
    padding: 2.75rem 0;
    border-top: 4px solid var(--tan);
}

.school-admissions-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.school-admissions-text h2 {
    font-family: var(--font-serif);
    font-size: 1.65rem;
    color: var(--white);
    margin-bottom: 0.4rem;
}

.school-admissions-text p {
    font-size: 0.92rem;
    color: rgba(255,255,255,0.82);
    max-width: 520px;
    line-height: 1.6;
}

.school-admissions-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.prog-row-index.mod-1 { background: var(--burgundy); }
.prog-row-index.mod-2 { background: var(--tan); }
.prog-row-index.mod-2 .prog-num { color: var(--plum-deep); }
.prog-row-index.mod-3 { background: var(--plum-deep); }
.prog-row-index.mod-4 { background: var(--mauve); }

/* ── Legacy homepage (auth-style) ── */
.home-hero-layout {
    max-width: 1100px;
    margin: 2rem auto 2.5rem;
    grid-template-columns: 400px 1fr;
    min-height: 520px;
}

.home-hero-panel {
    justify-content: space-between;
}

.home-hero-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 1.75rem;
}

.home-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.home-stat {
    text-align: center;
    padding: 1rem 0.5rem;
    background: var(--bg);
    border-right: 1px solid var(--border-light);
}

.home-stat:last-child { border-right: none; }

.home-stat dt {
    font-family: var(--font-serif);
    font-size: 1.6rem;
    font-weight: 900;
    color: var(--plum-deep);
    line-height: 1;
}

.home-stat dd {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.home-quick-links {
    display: flex;
    gap: 1.25rem;
    flex-wrap: wrap;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border-light);
}

.home-quick-link {
    font-size: 0.86rem;
    font-weight: 600;
    color: var(--burgundy);
    text-decoration: none;
}

.home-quick-link:hover { text-decoration: underline; }

.home-panel {
    max-width: 1100px;
    margin: 0 auto 2rem;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2.25rem 2.5rem;
    box-shadow: var(--shadow);
}

.home-panel-header {
    margin-bottom: 1.75rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--border-light);
}

.home-panel-eyebrow {
    display: block;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--burgundy);
    margin-bottom: 0.4rem;
}

.home-panel-header h2 {
    font-family: var(--font-serif);
    font-size: 1.65rem;
    color: var(--plum-deep);
    margin-bottom: 0.35rem;
}

.home-panel-header p {
    font-size: 0.92rem;
    color: var(--text-muted);
    line-height: 1.6;
    max-width: 600px;
}

.home-module-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
}

.home-module-card {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.35rem 1.5rem;
    background: var(--bg);
    display: flex;
    flex-direction: column;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.home-module-card:hover {
    border-color: var(--mauve);
    box-shadow: var(--shadow);
}

.home-module-card.mod-1 { border-top: 3px solid var(--burgundy); }
.home-module-card.mod-2 { border-top: 3px solid var(--tan); }
.home-module-card.mod-3 { border-top: 3px solid var(--plum-deep); }
.home-module-card.mod-4 { border-top: 3px solid var(--mauve); }

.hmc-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.65rem;
}

.hmc-num {
    font-family: var(--font-serif);
    font-size: 1.25rem;
    font-weight: 900;
    color: var(--burgundy);
}

.hmc-weight {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--white);
    background: var(--burgundy);
    padding: 0.2rem 0.55rem;
    border-radius: 20px;
}

.home-module-card.mod-2 .hmc-weight { background: var(--tan); color: var(--plum-deep); }

.hmc-code {
    display: block;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-bottom: 0.2rem;
}

.home-module-card h3 {
    font-family: var(--font-serif);
    font-size: 1rem;
    color: var(--plum-deep);
    line-height: 1.35;
    margin-bottom: 0.5rem;
}

.home-module-card > p {
    font-size: 0.84rem;
    color: var(--text-muted);
    line-height: 1.55;
    margin-bottom: 0.85rem;
    flex: 1;
}

.hmc-topics {
    list-style: none;
    margin-bottom: 1rem;
}

.hmc-topics li {
    font-size: 0.8rem;
    padding: 0.28rem 0 0.28rem 0.9rem;
    position: relative;
    color: var(--text);
    border-bottom: 1px solid var(--border-light);
}

.hmc-topics li:last-child { border-bottom: none; }

.hmc-topics li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.62rem;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--tan);
}

.hmc-more {
    color: var(--burgundy) !important;
    font-weight: 600;
    font-style: italic;
}

.hmc-more::before { display: none !important; }

.hmc-footer {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: auto;
}

.hmc-bar {
    flex: 1;
    height: 5px;
    background: var(--border-light);
    border-radius: 3px;
    overflow: hidden;
}

.hmc-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--mauve), var(--tan));
    border-radius: 3px;
}

.home-timeline {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.home-timeline-item {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 1.5rem;
    padding: 1.15rem 0;
    border-bottom: 1px solid var(--border-light);
    align-items: start;
}

.home-timeline-item:last-child { border-bottom: none; }

.home-timeline-item.highlight {
    background: var(--gold-pale);
    margin: 0 -2.5rem;
    padding: 1.15rem 2.5rem;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    border-bottom: none;
}

.ht-date {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--burgundy);
    padding-top: 0.15rem;
}

.ht-body strong {
    display: block;
    font-size: 0.95rem;
    color: var(--plum-deep);
    margin-bottom: 0.2rem;
}

.ht-body p {
    font-size: 0.86rem;
    color: var(--text-muted);
    line-height: 1.55;
}

.home-cta {
    max-width: 1100px;
    margin: 0 auto 2.5rem;
    background: linear-gradient(135deg, var(--plum-deep) 0%, var(--burgundy) 100%);
    border-radius: var(--radius-lg);
    padding: 2rem 2.5rem;
    color: var(--white);
}

.home-cta-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.home-cta h2 {
    font-family: var(--font-serif);
    font-size: 1.4rem;
    color: var(--white);
    margin-bottom: 0.35rem;
}

.home-cta p {
    font-size: 0.9rem;
    opacity: 0.85;
}

/* Forms */
.form-group { margin-bottom: 1rem; }
.form-group label { display: block; font-size: 0.84rem; font-weight: 600; margin-bottom: 0.35rem; color: var(--navy); }

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.6rem 0.85rem;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-family: inherit;
    background: var(--white);
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--navy-light);
    box-shadow: 0 0 0 3px rgba(42, 100, 150, 0.15);
}

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

.wysiwyg + .tox-tinymce,
.form-group .tox-tinymce {
    border-color: var(--border) !important;
    border-radius: var(--radius) !important;
    box-shadow: none !important;
}

.rich-text {
    line-height: 1.7;
    font-size: 0.92rem;
}

.rich-text > :first-child {
    margin-top: 0;
}

.rich-text > :last-child {
    margin-bottom: 0;
}

.rich-text p,
.rich-text ul,
.rich-text ol {
    margin: 0 0 0.85rem;
}

.rich-text h2,
.rich-text h3,
.rich-text h4 {
    margin: 1rem 0 0.5rem;
    color: var(--plum-deep);
}

.rich-text blockquote {
    margin: 0 0 0.85rem;
    padding: 0.75rem 1rem;
    border-left: 3px solid var(--mauve);
    background: var(--gold-pale);
}

.rich-text table {
    width: 100%;
    border-collapse: collapse;
    margin: 0 0 0.85rem;
}

.rich-text th,
.rich-text td {
    border: 1px solid var(--border);
    padding: 0.5rem 0.65rem;
    text-align: left;
}

.rich-text a {
    color: var(--burgundy);
    font-weight: 600;
}
.form-actions { display: flex; gap: 0.75rem; margin-top: 1rem; }
.filter-bar { display: flex; gap: 1rem; margin-bottom: 1.25rem; flex-wrap: wrap; }
.filter-bar .form-group { margin-bottom: 0; min-width: 200px; }

.filter-panel {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow);
    border-left: 4px solid var(--mauve);
}

.filter-panel-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.15rem;
    flex-wrap: wrap;
}

.filter-panel-title {
    font-family: var(--font-serif);
    font-size: 1.05rem;
    color: var(--plum-deep);
    margin-bottom: 0.2rem;
}

.filter-panel-subtitle {
    font-size: 0.84rem;
    color: var(--text-muted);
}

.filter-panel-fields {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
}

.filter-field label {
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--burgundy);
    margin-bottom: 0.45rem;
}

.filter-select-wrap {
    position: relative;
}

.filter-select-wrap select {
    width: 100%;
    padding: 0.7rem 2.5rem 0.7rem 0.9rem;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-family: inherit;
    color: var(--text);
    background: var(--bg);
    appearance: none;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s, background-color 0.2s;
}

.filter-select-wrap::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 0.95rem;
    width: 0.45rem;
    height: 0.45rem;
    border-right: 2px solid var(--burgundy);
    border-bottom: 2px solid var(--burgundy);
    transform: translateY(-65%) rotate(45deg);
    pointer-events: none;
}

.filter-select-wrap select:hover {
    border-color: var(--mauve);
    background: var(--white);
}

.filter-select-wrap select:focus {
    outline: none;
    border-color: var(--burgundy);
    background: var(--white);
    box-shadow: 0 0 0 3px rgba(124, 62, 87, 0.12);
}

.filter-panel-active {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-light);
}

.filter-panel-active-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-muted);
}

.filter-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.28rem 0.65rem;
    border-radius: 999px;
    background: var(--gold-pale);
    border: 1px solid var(--blush);
    color: var(--plum-deep);
    font-size: 0.76rem;
    font-weight: 600;
}

/* Alerts */
.alert { padding: 0.85rem 1rem; border-radius: var(--radius); margin-bottom: 1.25rem; font-size: 0.88rem; }
.alert-success { background: #edf7f0; color: var(--success); border: 1px solid #b8e0c8; }
.alert-error { background: #fdf0f0; color: var(--error); border: 1px solid #f0c0c0; }
.alert p { margin: 0.2rem 0; }

/* Admin */
.data-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    font-size: 0.88rem;
}

.data-table th, .data-table td { padding: 0.75rem 1rem; text-align: left; border-bottom: 1px solid var(--border-light); }
.data-table th { background: var(--navy); color: var(--white); font-size: 0.8rem; font-weight: 600; }
.data-table tr:last-child td { border-bottom: none; }
.data-table a { color: var(--navy-light); font-weight: 600; }

.admin-form-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    margin-bottom: 1.5rem;
}

.admin-form-card-wide {
    width: 100%;
    max-width: none;
    padding: 1.75rem 2rem;
}

.admin-form-card-wide .form-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-form-card-wide textarea {
    min-height: 280px;
}

.admin-actions { display: flex; gap: 0.75rem; margin-top: 1.25rem; flex-wrap: wrap; }
.admin-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin: 1.25rem 0 1.75rem; }

.empty-state {
    text-align: center;
    padding: 2.5rem;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.result-count { font-size: 0.84rem; color: var(--text-muted); margin-bottom: 0.75rem; }

.admin-search-bar { align-items: flex-end; }
.admin-search-bar .form-group { flex: 1; min-width: 240px; margin-bottom: 0; }

.table-actions {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex-wrap: wrap;
}

.inline-delete-form { display: inline; margin: 0; }

.link-button {
    background: none;
    border: none;
    padding: 0;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
}

.link-button.link-danger { color: var(--error); }
.link-button.link-danger:hover { text-decoration: underline; }

.enrollment-checkboxes {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.enrollment-check {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    padding: 0.75rem 0.9rem;
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    background: var(--bg);
    cursor: pointer;
    transition: border-color 0.15s;
}

.enrollment-check:hover { border-color: var(--mauve); }

.enrollment-check input {
    margin-top: 0.2rem;
    flex-shrink: 0;
}

.enrollment-check span {
    font-size: 0.88rem;
    line-height: 1.45;
}

.enrollment-check strong {
    display: block;
    color: var(--plum-deep);
    margin-bottom: 0.1rem;
}

.admin-subnav {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-light);
}

.admin-subnav a {
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    font-size: 0.86rem;
    font-weight: 600;
    text-decoration: none;
    color: var(--text);
    border: 1px solid var(--border);
    background: var(--white);
    transition: all 0.15s;
}

.admin-subnav a:hover {
    border-color: var(--mauve);
    color: var(--plum-deep);
}

.admin-subnav a.active {
    background: var(--plum-deep);
    border-color: var(--plum-deep);
    color: var(--white);
}

/* Footer */
.school-footer {
    background: var(--navy);
    color: rgba(255,255,255,0.85);
    margin-top: auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 2rem;
    padding: 2.5rem 1.5rem;
}

.footer-col h4 {
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--gold-light);
    margin-bottom: 0.85rem;
}

.footer-col ul { list-style: none; }
.footer-col li { font-size: 0.84rem; margin-bottom: 0.4rem; opacity: 0.85; }
.footer-col a { color: rgba(255,255,255,0.85); text-decoration: none; }
.footer-col a:hover { color: var(--gold-light); }

.footer-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.85rem;
}

.footer-brand strong { display: block; font-family: var(--font-serif); font-size: 0.95rem; }
.footer-brand span { font-size: 0.78rem; opacity: 0.7; }

.footer-about { font-size: 0.84rem; opacity: 0.75; line-height: 1.6; }

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.12);
    padding: 0.85rem 0;
    font-size: 0.78rem;
    opacity: 0.65;
}

.footer-bottom .container {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* Responsive */
@media (max-width: 900px) {
    .school-hero-grid { grid-template-columns: 1fr; }
    .school-hero-aside {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
    }
    .school-crest-panel { grid-column: 1 / -1; }
    .school-services-grid { grid-template-columns: repeat(2, 1fr); }
    .school-admissions-inner { flex-direction: column; align-items: flex-start; }
    .programme-head { grid-template-columns: 1fr; }
    .programme-stats-bar { width: 100%; }
    .prog-stat { flex: 1; }
    .prog-row { grid-template-columns: 56px 1fr; }
    .prog-row-action {
        grid-column: 1 / -1;
        flex-direction: row;
        justify-content: space-between;
        border-top: 1px solid var(--border-light);
        padding: 0.85rem 1.25rem;
    }
    .prog-row-content { border-right: none; }
    .portal-shell { flex-direction: column; }
    .portal-sidebar {
        width: 100%;
        height: auto;
        position: static;
        flex-direction: row;
        flex-wrap: wrap;
        padding: 0.75rem;
        gap: 0.25rem;
    }
    .sidebar-profile, .sidebar-exam, .sidebar-logout { display: none; }
    .sidebar-nav { display: flex; flex-wrap: wrap; flex: 1; }
    .sidebar-label { display: none; }
    .sidebar-nav a { padding: 0.5rem 0.75rem; border-left: none; border-radius: var(--radius); }
    .portal-content { padding: 1.25rem; }
    .auth-layout,
    .auth-layout-compact,
    .home-hero-layout { grid-template-columns: 1fr; min-height: auto; }
    .auth-brand { padding: 2rem 1.5rem; }
    .auth-form-panel { padding: 2rem 1.5rem; }
    .home-module-grid { grid-template-columns: 1fr; }
    .home-panel { padding: 1.75rem 1.5rem; }
    .home-timeline-item { grid-template-columns: 1fr; gap: 0.35rem; }
    .home-timeline-item.highlight { margin: 0 -1.5rem; padding: 1.15rem 1.5rem; }
    .home-stats { grid-template-columns: repeat(2, 1fr); }
    .home-stat:nth-child(2) { border-right: none; }
    .home-stat:nth-child(1),
    .home-stat:nth-child(2) { border-bottom: 1px solid var(--border-light); }
    .hero-banner-grid { grid-template-columns: 1fr; }
    .hero-banner-side { max-width: 360px; }
    .hero-metrics { max-width: none; }
    .stat-row { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 600px) {
    .school-hero { padding: 2rem 0 2.5rem; }
    .school-hero-aside { grid-template-columns: 1fr; }
    .school-hero-metrics { flex-wrap: wrap; max-width: none; }
    .school-metric { min-width: 50%; border-bottom: 1px solid rgba(255,255,255,0.12); }
    .school-metric:nth-child(2) { border-right: none; }
    .school-metric:nth-child(3),
    .school-metric:nth-child(4) { border-bottom: none; }
    .school-services-grid { grid-template-columns: 1fr; }
    .school-notice { flex-direction: column; }
    .hero-banner-content h1 { font-size: 1.75rem; }
    .hero-metrics { flex-wrap: wrap; }
    .hero-metric { min-width: 50%; border-bottom: 1px solid var(--border-light); }
    .hero-metric:nth-child(2) { border-right: none; }
    .hero-metric:nth-child(3),
    .hero-metric:nth-child(4) { border-bottom: none; }
    .prog-row-top { flex-direction: column; gap: 0.75rem; }
    .prog-weight-block { text-align: left; }
    .form-row { grid-template-columns: 1fr; }
    .flashcard-controls { flex-direction: column; }
    .flashcard-controls .btn { width: 100%; text-align: center; }
    .calendar-row { grid-template-columns: 1fr; }
    .cal-date { border-right: none; border-bottom: 1px solid var(--border-light); }
    .footer-grid { grid-template-columns: 1fr; }
    .admin-stats { grid-template-columns: repeat(2, 1fr); }
    .portal-welcome { flex-direction: column; text-align: center; }
}
