@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Sora:wght@500;600;700&display=swap');
@import url('./icons/bootstrap-icons.min.css');

:root {
    --ink: #1e3437;
    --muted: #5a6f69;
    --forest: #145e59;
    --forest-dark: #0f3d3a;
    --forest-deep: #0b2b28;
    --coral: #b85a43;
    --terracotta: #a9543d;
    --gold: #f0d99a;
    --gold-deep: #d8a72a;
    --surface: #fffdf8;
    --surface-soft: #f8f3e8;
    --surface-warm: #f3eadc;
    --line: #e7ddca;
    --line-strong: #d8c8ab;
    --canvas: #f8f3e8;
    --radius-sm: 9px;
    --radius: 16px;
    --radius-lg: 22px;
    --shadow-sm: 0 8px 24px rgba(76, 56, 31, .06);
    --shadow-md: 0 18px 42px rgba(15, 61, 58, .10);
    --ease: cubic-bezier(.2, .7, .3, 1);
    --bs-primary: #145e59;
    --bs-primary-rgb: 20, 94, 89;
    --bs-secondary: #5c6f9c;
    --bs-secondary-rgb: 92, 111, 156;
    --bs-success: #2f7a5a;
    --bs-success-rgb: 47, 122, 90;
    --bs-info: #145e59;
    --bs-info-rgb: 20, 94, 89;
    --bs-warning: #d8a72a;
    --bs-warning-rgb: 216, 167, 42;
    --bs-danger: #b85a43;
    --bs-danger-rgb: 184, 90, 67;
    --bs-light: #f8f3e8;
    --bs-light-rgb: 248, 243, 232;
    --bs-dark: #0f3d3a;
    --bs-dark-rgb: 15, 61, 58;
    --bs-body-bg: #f8f3e8;
    --bs-body-color: #1e3437;
    --bs-border-color: #e7ddca;
    --bs-link-color: #145e59;
    --bs-link-hover-color: #0f3d3a;
}

body {
    -webkit-font-smoothing: antialiased;
    background: var(--canvas);
    color: var(--ink);
    font-family: 'DM Sans', 'Trebuchet MS', sans-serif;
    line-height: 1.55;
    text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6, .sidebar-brand, .brand {
    color: #123c38;
    font-family: 'Sora', 'Trebuchet MS', sans-serif;
    letter-spacing: -.02em;
    line-height: 1.18;
}

::selection { background: var(--gold); color: var(--forest-dark); }
a { color: var(--forest); text-underline-offset: .18em; }
a:hover { color: var(--forest-dark); }

body .text-muted { color: var(--muted) !important; }
body .text-primary { color: var(--forest) !important; }
body .btn-primary, body .btn-primary:hover, body .btn-primary:focus {
    background: var(--forest-dark);
    border-color: var(--forest-dark);
    color: #fff;
}
body .btn-primary:hover, body .btn-primary:focus { background: var(--forest-deep); border-color: var(--forest-deep); }
body .btn-outline-primary { border-color: var(--forest); color: var(--forest); }
body .btn-outline-primary:hover, body .btn-outline-primary:focus { background: var(--forest); border-color: var(--forest); color: #fff; }
body .btn-success { background: var(--forest); border-color: var(--forest); }
body .btn-success:hover, body .btn-success:focus { background: var(--forest-dark); border-color: var(--forest-dark); }
body .btn-outline-success { border-color: var(--forest); color: var(--forest); }
body .btn-outline-success:hover, body .btn-outline-success:focus { background: var(--forest); border-color: var(--forest); color: #fff; }
body .btn-warning { background: var(--gold); border-color: var(--gold-deep); color: #3d2c05; }
body .btn-warning:hover, body .btn-warning:focus { background: #e8cb7a; border-color: #c99a1d; color: #3d2c05; }
body .btn-outline-warning { border-color: var(--gold-deep); color: #7a5600; }
body .btn-outline-warning:hover, body .btn-outline-warning:focus { background: var(--gold); border-color: var(--gold-deep); color: #3d2c05; }
body .btn-danger { background: var(--terracotta); border-color: var(--terracotta); }
body .btn-danger:hover, body .btn-danger:focus { background: #8d4433; border-color: #8d4433; }
body .btn-outline-danger { border-color: var(--terracotta); color: var(--terracotta); }
body .btn-outline-danger:hover, body .btn-outline-danger:focus { background: var(--terracotta); border-color: var(--terracotta); color: #fff; }
body .btn-outline-primary.disabled, body .btn-outline-primary:disabled,
body .btn-outline-success.disabled, body .btn-outline-success:disabled,
body .btn-outline-warning.disabled, body .btn-outline-warning:disabled,
body .btn-outline-danger.disabled, body .btn-outline-danger:disabled,
body .btn-outline-secondary.disabled, body .btn-outline-secondary:disabled {
    background: transparent;
    border-color: var(--line-strong);
    color: #a99b83;
}
body .form-control::file-selector-button {
    background: var(--surface-warm);
    border: 0;
    border-inline-end: 1px solid var(--line);
    color: var(--forest-dark);
    font-weight: 600;
    margin: -.375rem .75rem -.375rem -.75rem;
    padding: .375rem .75rem;
    transition: background-color .18s var(--ease);
}
body .form-control:hover::file-selector-button { background: #ecdfc9; }
body .btn { border-radius: var(--radius-sm); font-weight: 700; letter-spacing: .005em; transition: background-color .18s var(--ease), border-color .18s var(--ease), color .18s var(--ease), box-shadow .2s var(--ease), transform .2s var(--ease); }
body .btn:not(.btn-link):not(:disabled):hover { box-shadow: 0 8px 18px rgba(15, 61, 58, .13); transform: translateY(-1px); }
body .btn:not(.btn-link):not(:disabled):active { box-shadow: none; transform: translateY(0); }
body .btn:focus-visible, body a:focus-visible, body summary:focus-visible {
    outline: 3px solid var(--coral);
    outline-offset: 2px;
}
body .form-label { color: #334e42; font-size: .86rem; font-weight: 700; }
body .form-control, body .form-select {
    background-color: var(--surface);
    border-color: var(--line-strong);
    border-radius: var(--radius-sm);
    color: var(--ink);
    min-height: 46px;
    transition: background-color .18s var(--ease), border-color .18s var(--ease), box-shadow .18s var(--ease);
}
body .form-control::placeholder { color: #9b8f7a; }
body .form-control:focus, body .form-select:focus {
    background-color: #fff;
    border-color: var(--forest);
    box-shadow: 0 0 0 .22rem rgba(20, 94, 89, .14);
}
body .form-check-input { border-color: var(--line-strong); }
body .form-check-input:checked { background-color: var(--forest); border-color: var(--forest); }
body .form-check-input:focus { border-color: var(--forest); box-shadow: 0 0 0 .2rem rgba(20, 94, 89, .13); }
body .table {
    --bs-table-bg: transparent;
    --bs-table-hover-bg: #fbf6e9;
    --bs-table-hover-color: var(--ink);
    color: var(--ink);
    vertical-align: middle;
}
body .table thead th {
    background: var(--surface-soft);
    border-bottom-color: var(--line);
    color: #123c38;
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .045em;
    text-transform: uppercase;
}
body .table th { border-bottom-color: var(--line); font-weight: 700; }
body .table td { border-bottom-color: #eee3d0; }
body .table tbody tr { transition: background-color .16s var(--ease); }
body .table .edu-sn { text-align: center; white-space: nowrap; width: 3.25rem; }
body .alert { border-radius: var(--radius-sm); border-width: 1px; }
body .alert-success { background: #eaf3ec; border-color: #c8ddcb; color: #24523f; }
body .alert-danger { background: #faeae5; border-color: #edc9be; color: #7b3828; }
body .alert-warning { background: #fdf3da; border-color: #ebd7a1; color: #6b500e; }
body .alert-info { background: #e9f2ef; border-color: #c8ded7; color: #234f47; }
body .badge { border-radius: 999px; font-weight: 700; letter-spacing: .02em; }
body .site-credit { border-top: 1px solid var(--line); color: var(--muted); font-size: .82rem; padding: 1rem; text-align: center; }
body.admin-login-page { display: flex; flex-direction: column; min-height: 100vh; }
body.admin-login-page .login-page { flex: 1; min-height: 0; }
body.auth-page { display: flex; flex-direction: column; }
body.auth-page .auth-shell { flex: 1; width: 100%; }
body .pagination .page-link { color: var(--forest); }
body .pagination .active .page-link { background: var(--forest); border-color: var(--forest); color: #fff; }
body .card, body .module-card, body .teacher-card, body .roster-card, body .guardian-panel,
body .inbox-item, body .application-panel, body .result-card, body .assessment-card,
body .form-panel, body .question, body .result, body .login-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    color: var(--ink);
}
body .card-header { background: var(--surface-soft); border-bottom-color: var(--line); color: #123c38; }
body .card-footer { background: var(--surface-soft); border-top-color: var(--line); }
body .list-group-item { background: var(--surface); border-color: var(--line); color: var(--ink); }
body .dropdown-menu { background: var(--surface); border-color: var(--line); border-radius: var(--radius-sm); box-shadow: var(--shadow-md); }
body .dropdown-item { color: var(--ink); }
body .dropdown-item:hover, body .dropdown-item:focus { background: var(--surface-soft); color: var(--forest-dark); }
body .modal-content { background: var(--surface); border-color: var(--line); border-radius: var(--radius); }
body .nav-tabs { border-bottom-color: var(--line); }
body .nav-tabs .nav-link { color: var(--muted); }
body .nav-tabs .nav-link.active { background: transparent; border-color: transparent transparent var(--forest); color: var(--forest-dark); }
body .admin-sidebar, body .teacher-sidebar, body .student-sidebar, body .guardian-sidebar {
    background: linear-gradient(180deg, #0f3d3a 0%, #0b2b28 100%);
    border-right: 1px solid rgba(240, 217, 154, .16);
    box-shadow: 10px 0 34px rgba(3, 25, 22, .10);
    scrollbar-color: rgba(240, 217, 154, .55) rgba(4, 25, 22, .4);
    scrollbar-width: thin;
}
body .admin-sidebar::-webkit-scrollbar, body .teacher-sidebar::-webkit-scrollbar,
body .student-sidebar::-webkit-scrollbar, body .guardian-sidebar::-webkit-scrollbar {
    width: 9px;
}
body .admin-sidebar::-webkit-scrollbar-track, body .teacher-sidebar::-webkit-scrollbar-track,
body .student-sidebar::-webkit-scrollbar-track, body .guardian-sidebar::-webkit-scrollbar-track {
    background: rgba(4, 25, 22, .4);
    border-radius: 999px;
    margin: .5rem 0;
}
body .admin-sidebar::-webkit-scrollbar-thumb, body .teacher-sidebar::-webkit-scrollbar-thumb,
body .student-sidebar::-webkit-scrollbar-thumb, body .guardian-sidebar::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(240, 217, 154, .85), rgba(240, 217, 154, .42));
    background-clip: padding-box;
    border: 2px solid transparent;
    border-radius: 999px;
}
body .admin-sidebar::-webkit-scrollbar-thumb:hover, body .teacher-sidebar::-webkit-scrollbar-thumb:hover,
body .student-sidebar::-webkit-scrollbar-thumb:hover, body .guardian-sidebar::-webkit-scrollbar-thumb:hover {
    background: var(--gold);
    background-clip: padding-box;
}
body .admin-page { background: var(--canvas); }
body .topbar {
    background: linear-gradient(100deg, #0f3d3a 0%, #134c47 100%);
    border-bottom: 1px solid rgba(240, 217, 154, .2);
    color: #fff;
}
body .admin-page > .topbar, body .guardian-top { position: sticky; top: 0; z-index: 1025; }
body .admin-sidebar .menu-group { border-bottom: 1px solid rgba(240, 217, 154, .14); padding-bottom: .25rem; }
body .teacher-sidebar-nav > a, body .teacher-sidebar-nav > details,
body .student-nav > a, body .guardian-nav > a { border-bottom: 0; border-radius: var(--radius-sm); }
body .main-content { max-width: none; width: 100%; }
body .topbar > div { min-width: 0; }
body .site-navbar { background: var(--forest-dark); }
.public-nav-links { align-items: center; display: flex; gap: .4rem; }
.portal-link { border-radius: 5px; color: #e3f4ee; font-size: .86rem; font-weight: 600; padding: .45rem .6rem; text-decoration: none; }
.portal-link:hover, .portal-link:focus { background: rgba(255, 255, 255, .13); color: #fff; }
body .admission-hero { min-height: min(64vh, 600px); }
body .application-intro, body .module-hero, body .result-hero, body .cbt-header {
    background: linear-gradient(115deg, var(--forest-dark), var(--forest));
    border-radius: 6px;
}
body .application-intro:after, body .module-hero:after { display: none; }
body .application-progress span { border-radius: 6px; }
body .site-navbar .brand-logo, body .sidebar-logo { object-fit: contain; }

.responsive-menu-toggle, .responsive-menu-backdrop { display: none; }

.auth-page {
    min-height: 100vh;
    background: linear-gradient(125deg, #e8f2ed, #f8f8f5 65%, #eaf3f2);
}
.auth-shell { max-width: 490px; margin: auto; padding: min(11vh, 100px) 1rem 3rem; }
.auth-panel { background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: clamp(1.5rem, 4vw, 2.5rem); box-shadow: 0 20px 55px rgba(17, 63, 64, .09); }
.auth-panel h1 { font-size: 1.65rem; font-weight: 700; }
.auth-mark, .brand-square { align-items: center; background: var(--forest); color: white; display: inline-flex; font-family: 'Sora', sans-serif; font-weight: 700; justify-content: center; }
.auth-mark { border-radius: 6px; margin-bottom: 1.5rem; padding: .4rem .75rem; }
.auth-mark span { color: #bde7d7; }
.brand-square { border-radius: 5px; height: 40px; width: 40px; }
body .brand-square { background: transparent url('../img/newlogo4.png') center / contain no-repeat; color: transparent; font-size: 0; }

body .portal-top, body .portal-header { background: var(--forest-dark); color: #fff; }
.portal-top-inner, .portal-header .container { align-items: center; display: flex; justify-content: space-between; gap: 1rem; min-height: 75px; }
.portal-brand { align-items: center; display: flex; gap: .8rem; }
.portal-brand strong, .portal-brand small { display: block; }
.portal-brand small { color: #c5e5df; font-size: .78rem; }
.portal-content { max-width: 1320px; padding: 2.5rem 1rem 5rem; }
.page-intro { border-bottom: 1px solid var(--line); margin-bottom: 1.75rem; padding-bottom: 1.5rem; }
.page-intro h1 { font-size: clamp(1.65rem, 3vw, 2.3rem); font-weight: 700; }
.page-intro p:last-child { color: var(--muted); margin-bottom: 0; }
.eyebrow { color: var(--forest); font-size: .69rem; font-weight: 700; margin: 0 0 .4rem; text-transform: uppercase; }
.empty-state { background: #fff; border: 1px dashed var(--line); padding: 2rem; text-align: center; }
.portal-section { border-bottom: 1px solid var(--line); padding: 1.5rem 0; }
.portal-section h2 { font-size: 1.15rem; font-weight: 700; }
.payment-card { background: #fff; border: 1px solid #e7ddca; border-radius: 8px; margin-bottom: 1rem; padding: 1.25rem; }
.payment-card h2 { font-size: 1rem; font-weight: 800; }
.portal-section .table { background: #fff; border: 1px solid var(--line); border-radius: 6px; margin-bottom: 0; }
.portal-section .table th, .portal-section .table td { padding: .75rem; }
.message-item { background: #fff; border: 1px solid var(--line); border-radius: 6px; margin-bottom: .65rem; overflow-wrap: anywhere; padding: 1rem; }
.conversation { background: #fff; border: 1px solid var(--line); border-radius: 6px; margin-bottom: 1rem; padding: clamp(1rem, 3vw, 1.5rem); }
.conversation-heading { align-items: flex-start; border-bottom: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; padding-bottom: .8rem; }
.conversation-heading h2 { font-size: 1.05rem; font-weight: 700; margin: 0; }
.conversation-heading p:last-child { color: var(--muted); margin: .2rem 0 0; }
.status-pill { border-radius: 4px; font-size: .74rem; font-weight: 700; padding: .2rem .5rem; }
.status-open { background: #dff3e8; color: #225e48; }
.status-blocked { background: #fae8e2; color: #884c3a; }
.chat-history { display: grid; gap: .65rem; padding: 1.25rem 0; }
.chat-row { display: flex; }
.chat-out { justify-content: flex-end; }
.chat-bubble { background: #eff4f1; border-radius: 6px; max-width: min(80%, 620px); overflow-wrap: anywhere; padding: .7rem .9rem; }
.chat-out .chat-bubble { background: #e0f1eb; }
.chat-bubble small { color: var(--muted); display: block; font-size: .72rem; margin-bottom: .3rem; }
.chat-bubble p { margin: 0; }
.chat-compose { align-items: end; display: flex; gap: .5rem; }
.chat-compose textarea { min-width: 0; resize: vertical; }
.chat-compose button { min-height: 44px; width: 48px; }
.block-notice { align-items: start; background: #fff2ed; border-left: 3px solid var(--coral); color: #633e35; display: flex; overflow-wrap: anywhere; padding: .75rem 1rem; }
.block-notice p { margin: .15rem 0 0; }
.block-controls { margin-top: .9rem; }
.block-controls summary { color: #8d493d; cursor: pointer; font-size: .86rem; font-weight: 600; }

/* Shared front/back ID card presentation. */
.id-card-spread {
    align-items: flex-start;
    background: #e7f4ea;
    border: 1px solid #c5e3cf;
    border-radius: 14px;
    display: flex;
    flex-wrap: wrap;
    gap: 1.35rem;
    justify-content: center;
    padding: 1.25rem;
}
.staff-id-card, .student-id-card {
    background: #fff;
    border: 2px solid #087b55;
    border-radius: 8px;
    box-sizing: border-box;
    height: 2.125in;
    overflow: hidden;
    padding: .12in;
    width: 3.375in;
}
.staff-id-card .id-card-header, .student-id-card .id-card-header {
    align-items: center;
    border-bottom: 1px solid #dbe8df;
    display: flex;
    gap: .12in;
    padding-bottom: .07in;
}
.staff-id-card .id-card-header img, .student-id-card .id-card-header img {
    height: .28in;
    object-fit: contain;
    width: .28in;
}
.staff-id-card .id-card-header strong, .student-id-card .id-card-header strong {
    display: block;
    font-size: .7rem;
    line-height: 1.1;
}
.staff-id-card .id-card-header small, .student-id-card .id-card-header small {
    color: #5d7469;
    display: block;
    font-size: .46rem;
}
.staff-id-card .id-card-body, .student-id-card .id-card-body {
    display: flex;
    gap: .14in;
    padding-top: .12in;
}
.staff-id-card .id-card-photo, .student-id-card .id-card-photo {
    border-radius: 4px;
    height: 1in;
    object-fit: cover;
    width: .82in;
}
.staff-id-card .id-card-initial, .student-id-card .id-card-initial {
    align-items: center;
    background: #145e59;
    color: #fff;
    display: flex;
    font-size: 1.5rem;
    justify-content: center;
}
.staff-id-card .id-card-details, .student-id-card .id-card-details {
    font-size: .52rem;
    margin: 0;
    width: 100%;
}
.staff-id-card .id-card-details dt, .student-id-card .id-card-details dt {
    border-bottom: 1px solid #e2ece5;
    color: #567064;
    float: left;
    font-weight: 700;
    padding: .045in 0;
    width: 43%;
}
.staff-id-card .id-card-details dd, .student-id-card .id-card-details dd {
    border-bottom: 1px solid #e2ece5;
    margin: 0;
    overflow: hidden;
    padding: .045in 0;
    text-align: right;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.staff-id-card .id-card-footer, .student-id-card .id-card-footer {
    border-top: 1px solid #dbe8df;
    color: #5d7469;
    font-size: .48rem;
    margin-top: .08in;
    padding-top: .05in;
}
.staff-id-card.id-card-back, .student-id-card.id-card-back { text-align: center; }
.staff-id-card .id-card-qr, .student-id-card .id-card-qr {
    align-items: center;
    display: flex;
    flex-direction: column;
    gap: .06in;
    padding-top: .08in;
}
.staff-id-card .id-card-qr svg, .student-id-card .id-card-qr svg {
    height: .9in;
    width: .9in;
}
.staff-id-card .id-card-qr small, .student-id-card .id-card-qr small {
    color: #5d7469;
    font-size: .48rem;
}

@media print {
    body { background: #fff; }
    body:has(.id-card-spread) .portal-section, body:has(.id-card-spread) .page-intro, body:has(.id-card-spread) nav,
    body:has(.id-card-spread) .teacher-page > .portal-top, body:has(.id-card-spread) .student-page > .portal-top { display: none !important; }
    .id-card-spread { background: #fff; border: 0; padding: 0; }
    .id-card-spread .btn, .id-card-spread .w-100 { display: none; }
}

@media (max-width: 700px) {
    .portal-content { padding-top: 1.5rem; }
    .portal-top-inner { flex-wrap: wrap; padding: .75rem 0; }
    .portal-top-inner > nav { flex-wrap: wrap; width: 100%; }
    .portal-top-inner > nav .btn { font-size: .8rem; }
    .portal-top-inner > nav form { margin: 0; }
    .chat-bubble { max-width: 92%; }
    body .admission-hero { min-height: 60vh; }
    body .sidebar-brand { font-size: 1.1rem; }
    .portal-link { font-size: .74rem; padding: .3rem; }
    .public-nav-links { gap: .1rem; }
}

@media (max-width: 1199.98px) {
    .admin-sidebar, .teacher-sidebar, .student-sidebar, .guardian-sidebar {
        height: 100vh;
        height: 100dvh;
        left: 0;
        max-width: min(84vw, 320px);
        overflow-x: hidden;
        position: fixed;
        top: 0;
        transform: translateX(-105%);
        transition: transform .22s ease;
        z-index: 1050;
    }
    .admin-sidebar.open, .teacher-sidebar.open, .student-sidebar.open, .guardian-sidebar.open {
        transform: translateX(0);
    }
    .admin-page, .teacher-page, .student-page, .guardian-page { margin-left: 0 !important; }
    .responsive-menu-toggle {
        align-items: center;
        background: var(--forest-dark);
        border: 1px solid rgba(255,255,255,.24);
        border-radius: 0 0 8px 0;
        box-shadow: 0 3px 12px rgba(17,63,64,.2);
        color: #fff;
        display: inline-flex;
        font-size: 1.2rem;
        height: 46px;
        justify-content: center;
        left: 0;
        padding: 0;
        position: fixed;
        top: 0;
        width: 48px;
        z-index: 1030;
    }
    .responsive-menu-toggle:hover, .responsive-menu-toggle:focus { background: var(--forest); color: #fff; }
    .admin-page .mobile-menu { display: inline-flex; }
    .responsive-menu-backdrop.visible {
        background: rgba(9, 31, 32, .48);
        border: 0;
        display: block;
        inset: 0;
        padding: 0;
        position: fixed;
        z-index: 1035;
    }
    body.navigation-open { overflow: hidden; }
    .teacher-page > .portal-top, .student-page > .portal-top { padding-left: 3rem; }
}

.table-responsive { position: relative; }

@media (max-width: 575.98px) {
    .main-content { padding: .75rem !important; }
    .portal-content { padding: 1rem .75rem 3rem; }
    .page-intro { margin-bottom: 1.15rem; padding-bottom: 1rem; }
    .page-intro h1 { font-size: clamp(1.4rem, 7vw, 1.9rem); overflow-wrap: anywhere; }
    .portal-section { padding: 1rem 0; }
    .conversation, .portal-section .conversation { padding: .85rem; }
    .table-responsive { -webkit-overflow-scrolling: touch; }
    .table-responsive > .table:has(thead th:nth-child(6)) { min-width: 620px; }
    .table-responsive > .table:has(thead th:nth-child(9)) { min-width: 820px; }
    .topbar { column-gap: .5rem; flex-wrap: wrap; padding: .6rem 1rem; row-gap: .45rem; }
    .topbar h1 { overflow-wrap: anywhere; }
    .guardian-top-title { min-width: 0; overflow-wrap: anywhere; }
    .row.g-3 { --bs-gutter-y: .85rem; }
    .btn { white-space: normal; }
    .responsive-menu-toggle { height: 44px; width: 46px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *:before, *:after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

.staff-id-card .id-card-header { justify-content: center; text-align: center; }
.staff-id-card .id-card-header > div { text-align: center; }
.staff-id-card .id-card-body > div:first-child { flex: 0 0 .82in; text-align: center; }
.staff-id-card .id-card-body > div:first-child > strong { line-height: 1.15; margin-top: .06in; overflow-wrap: anywhere; text-align: center; }
.staff-id-card .id-card-details dt:first-child { text-align: center; }
/* Portal sign-in */
body.login-body .pwa-install-button,
body.tenant-home .pwa-install-button,
body.admissions-page .pwa-install-button { display: none; }
body.login-body { background: #fff; margin: 0; }
.login-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); min-height: 100vh; }
.login-panel { background: #f8fafc; display: flex; min-height: 100vh; }
.login-panel-inner { display: flex; flex-direction: column; margin: 0 auto; max-width: 620px; min-height: 100vh; padding: clamp(1.5rem, 4vh, 2.75rem) clamp(1.25rem, 5vw, 3.5rem) 2rem; width: 100%; }
.login-brand { align-items: flex-start; display: flex; flex-direction: column; gap: .55rem; margin: 0 auto; max-width: 380px; width: 100%; }
.login-brand-logo { display: block; height: 106px; max-width: 100%; object-fit: contain; object-position: left center; width: 197px; }
.login-brand-caption { color: #0f766e; font-size: .82rem; font-weight: 600; letter-spacing: .01em; overflow-wrap: anywhere; padding-left: .15rem; }
.login-form-wrap { margin: auto; max-width: 380px; padding: 1.75rem 0 .5rem; width: 100%; }
.login-title { color: #102a43; font-size: clamp(1.9rem, 3.6vw, 2.45rem); font-weight: 700; letter-spacing: -.02em; line-height: 1.1; margin: 0 0 .55rem; text-align: center; }
.login-subtitle { color: #64748b; font-size: .98rem; margin: 0 0 1.6rem; text-align: center; }
.login-role-teacher { --login-role: #5c6f9c; }
.login-role-student { --login-role: #8a4a20; }
.login-role-guardian { --login-role: #0f7a72; }
.login-role-admin { --login-role: #2f3a3d; }
.login-role-tabs { background: #eef2f7; border-radius: 9px; display: grid; gap: .3rem; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: .8rem; padding: .3rem; }
.login-role-tab { align-items: center; border-radius: 7px; color: #64748b; display: flex; flex-direction: column; font-size: .76rem; font-weight: 600; gap: .22rem; justify-content: center; line-height: 1.15; min-height: 62px; padding: .5rem .25rem; text-align: center; text-decoration: none; }
.login-role-tab i { font-size: 1.08rem; }
.login-role-tab:hover, .login-role-tab:focus-visible { background: rgba(255, 255, 255, .62); color: #0f5f5a; }
.login-role-tab.active { background: #fff; box-shadow: 0 2px 8px rgba(16, 42, 67, .1); color: #102a43; }
.login-role-tab.active i { color: var(--login-role, #0f7a72); }
.login-role-note { color: #64748b; font-size: .76rem; line-height: 1.45; margin: 0 0 1.4rem; text-align: center; }
.login-role-note i { color: #8aa0b4; margin-right: .12rem; }
.login-role-note a { color: #0f6f69; font-weight: 600; text-decoration: none; }
.login-role-note a:hover { text-decoration: underline; }
.login-admin-context { align-items: center; background: #eef2f7; border-radius: 9px; color: #334e68; display: flex; font-size: .84rem; font-weight: 600; gap: .5rem; justify-content: center; margin-bottom: .8rem; min-height: 50px; padding: .5rem 1rem; }
.login-admin-context i { color: var(--login-role, #2f3a3d); font-size: 1.1rem; }
.login-site-link { font-size: .82rem; margin: 1.6rem 0 0; text-align: center; }
.login-site-link a { color: #64748b; font-weight: 600; text-decoration: none; }
.login-site-link a:hover { color: #0f6f69; text-decoration: underline; }
.login-site-link i { margin-right: .25rem; }
.login-form-wrap .alert { font-size: .9rem; margin-bottom: 1.25rem; }
.login-field { margin-bottom: 1.15rem; }
.login-field .form-label { color: #334e68; font-size: .85rem; font-weight: 600; margin-bottom: .4rem; }
.login-input { position: relative; }
.login-input > i { color: #8aa0b4; font-size: 1rem; left: 1rem; pointer-events: none; position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; }
.login-input .form-control { background: #fff; border: 1px solid #d9e2ec; border-radius: 9px; color: #102a43; font-size: .95rem; min-height: 52px; padding: .7rem 1rem .7rem 2.75rem; }
.login-input .form-control::placeholder { color: #9fb3c8; }
.login-input .form-control:focus { border-color: #0f7a72; box-shadow: 0 0 0 .22rem rgba(15, 122, 114, .13); }
.login-helper { display: flex; justify-content: flex-end; margin: -.35rem 0 1.15rem; }
.login-helper a { color: #0f6f69; font-size: .85rem; font-weight: 600; text-decoration: none; }
.login-helper a:hover { text-decoration: underline; }
.login-submit { background: linear-gradient(95deg, #0c4f4b 0%, #0f7a72 55%, #0f9488 100%); border: 0; border-radius: 9px; box-shadow: 0 12px 24px rgba(12, 79, 75, .18); color: #fff; font-family: 'Sora', sans-serif; font-size: .98rem; font-weight: 600; min-height: 52px; padding: .75rem 1.5rem; text-align: left; transition: transform .18s ease, box-shadow .18s ease, filter .18s ease; width: 100%; }
.login-submit:hover { box-shadow: 0 16px 30px rgba(12, 79, 75, .24); filter: brightness(1.05); transform: translateY(-1px); }
.login-submit:active { transform: translateY(0); }
.login-submit:focus-visible { outline: 3px solid rgba(190, 98, 80, .65); outline-offset: 2px; }
.login-register { color: #64748b; font-size: .9rem; margin: 1.5rem 0 0; text-align: center; }
.login-register a, .login-register strong { color: #0f6f69; font-weight: 600; text-decoration: none; }
.login-register a:hover { text-decoration: underline; }
.login-hero { background: radial-gradient(circle at 82% 18%, rgba(255, 255, 255, .12), transparent 32%), linear-gradient(150deg, #0a3f3c 0%, #0e625c 48%, #109181 100%); color: #fff; display: flex; min-height: 100vh; overflow: hidden; position: relative; }
.login-hero:before { border: 1px solid rgba(255, 255, 255, .1); border-radius: 50%; content: ""; height: min(56vw, 720px); left: 50%; position: absolute; top: 50%; transform: translate(-50%, -50%); width: min(56vw, 720px); }
.login-hero-shape { background: rgba(255, 255, 255, .09); border-radius: 18px; position: absolute; }
.login-shape-a { height: clamp(64px, 8vw, 100px); right: 9%; top: 12%; width: clamp(64px, 8vw, 100px); }
.login-shape-b { border-radius: 12px; bottom: 14%; height: clamp(36px, 5vw, 56px); left: 8%; opacity: .6; width: clamp(36px, 5vw, 56px); }
.login-shape-c { background: transparent; border: 1px solid rgba(255, 255, 255, .1); border-radius: 50%; bottom: 7%; height: clamp(90px, 11vw, 150px); right: 7%; width: clamp(90px, 11vw, 150px); }
.login-hero-inner { margin: auto; max-width: 524px; padding: clamp(2rem, 6vw, 5rem); position: relative; width: 100%; z-index: 1; }
.login-hero-icon { align-items: center; background: rgba(255, 255, 255, .13); border: 1px solid rgba(255, 255, 255, .16); border-radius: 22px; box-shadow: 0 18px 40px rgba(3, 31, 30, .12); display: flex; font-size: 2.3rem; height: 84px; justify-content: center; margin: 0 auto 2.4rem; width: 84px; }
.login-hero h2 { font-size: clamp(1.7rem, 2.4vw, 2rem); font-weight: 700; letter-spacing: -.02em; margin: 0 0 .9rem; text-align: left; }
.login-hero-inner > p { color: rgba(255, 255, 255, .82); font-size: .98rem; line-height: 1.6; margin: 0 0 2rem; text-align: left; }
.login-hero-points { display: grid; gap: .8rem; list-style: none; margin: 0; padding: 0; }
.login-hero-points li { align-items: flex-start; background: rgba(255, 255, 255, .11); border: 1px solid rgba(255, 255, 255, .13); border-radius: 10px; box-shadow: 0 10px 24px rgba(3, 31, 30, .06); display: flex; font-size: .93rem; gap: .75rem; line-height: 1.45; padding: .95rem 1.1rem; }
.login-hero-points li:before { background: #fff; border-radius: 50%; content: ""; flex: none; height: 7px; margin-top: .42rem; width: 7px; }
@media (max-width: 991.98px) {
    .login-split { display: block; }
    .login-panel { min-height: 100vh; }
    .login-panel-inner { max-width: 480px; }
    .login-hero { display: none; }
}
@media (max-width: 575.98px) {
    .login-panel-inner { padding: 1.25rem 1.15rem 2rem; }
    .login-form-wrap { padding-top: 1.25rem; }
    .login-brand-caption { font-size: .7rem; }
    .login-title { font-size: 1.85rem; }
}

/* ============ Home theme layer ============ */
@keyframes edu-rise {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes edu-fade {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes edu-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-9px); }
}

/* Sidebar navigation */
body .sidebar-brand span,
body .teacher-sidebar-brand small,
body .student-brand small,
body .guardian-brand small { color: var(--gold); letter-spacing: .12em; }
body .sidebar-logo,
body .teacher-sidebar-brand img,
body .student-brand img,
body .guardian-brand img { filter: drop-shadow(0 4px 9px rgba(0, 0, 0, .24)); }
body .menu-label,
body .student-nav-section-title { color: rgba(240, 217, 154, .8); letter-spacing: .12em; }
body .admin-menu a,
body .menu-toggle,
body .teacher-sidebar-nav a,
body .teacher-sidebar-nav .teacher-menu-group summary,
body .teacher-sidebar-footer button,
body .student-nav a,
body .student-footer button,
body .guardian-nav a,
body .guardian-signout button {
    border-radius: var(--radius-sm);
    color: #e7f1eb;
    transition: background-color .18s var(--ease), color .18s var(--ease), box-shadow .18s var(--ease), transform .18s var(--ease);
}
body .admin-menu a:hover,
body .menu-toggle:hover,
body .teacher-sidebar-nav a:hover,
body .teacher-sidebar-nav .teacher-menu-group summary:hover,
body .teacher-sidebar-footer button:hover,
body .student-nav a:hover,
body .student-footer button:hover,
body .guardian-nav a:hover,
body .guardian-signout button:hover {
    background: rgba(255, 255, 255, .08);
    color: #fff;
    transform: translateX(2px);
}
body .admin-menu a.active,
body .teacher-sidebar-nav a.active,
body .student-nav a.active,
body .guardian-nav a.active {
    background: rgba(240, 217, 154, .14);
    box-shadow: inset 3px 0 0 var(--gold);
    color: #fff;
}
body .admin-menu a.active i,
body .teacher-sidebar-nav a.active i,
body .student-nav a.active i,
body .guardian-nav a.active i { color: var(--gold); }
body .admin-sidebar .menu-group ul a { color: #dcebe4; }
body .admin-sidebar .menu-group ul a:hover { background: rgba(255, 255, 255, .07); color: #fff; }
body .admin-sidebar .menu-group ul a.active {
    background: rgba(240, 217, 154, .14);
    box-shadow: inset 3px 0 0 var(--gold);
    color: #fff;
}
body .admin-sidebar .menu-group ul a.active:before { background: var(--gold); box-shadow: 0 0 0 3px rgba(240, 217, 154, .16); }
body .admin-sidebar .menu-group[open] summary { background: rgba(255, 255, 255, .07); color: #fff; }
body .sign-out { color: #f3c9b8 !important; }

/* Admin top bar */
body .topbar h1 { color: #fff; font-size: 1.18rem; }
body .topbar .text-muted { color: #cfe5de !important; }
body .topbar .profile-name { color: #fff; }
body .topbar .profile-role { color: #cfe5de; }
body .topbar .profile-avatar {
    background: var(--gold);
    border-color: rgba(240, 217, 154, .55);
    color: var(--forest-dark);
}
body .topbar .btn-outline-secondary {
    border-color: rgba(240, 217, 154, .42);
    color: var(--gold);
}
body .topbar .btn-outline-secondary:hover,
body .topbar .btn-outline-secondary:focus {
    background: rgba(240, 217, 154, .16);
    border-color: var(--gold);
    color: #fff;
}

/* Portal headers */
body .portal-top,
body .portal-header,
body .guardian-top {
    background: linear-gradient(100deg, #0f3d3a 0%, #134c47 100%);
    border-bottom: 1px solid rgba(240, 217, 154, .16);
    color: #fff;
}
body .portal-brand small,
body .guardian-top-title small,
body .guardian-account span small { color: #cfe5de; }
body .guardian-avatar { background: var(--gold); color: var(--forest-dark); }
body .teacher-profile-dropdown,
body .student-profile-dropdown {
    animation: edu-fade .18s var(--ease) both;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: var(--shadow-md);
    overflow: hidden;
}
body .teacher-profile-dropdown a,
body .teacher-profile-dropdown form button,
body .student-profile-dropdown a,
body .student-profile-dropdown form button { color: var(--ink); }
body .teacher-profile-dropdown a:hover,
body .teacher-profile-dropdown form button:hover,
body .student-profile-dropdown a:hover,
body .student-profile-dropdown form button:hover { background: var(--surface-soft); color: var(--forest); }

/* Page structure */
body .page-intro { border-bottom-color: var(--line); }
body .page-intro h1 { color: #123c38; }
body .eyebrow { color: var(--terracotta); letter-spacing: .13em; }
body .module-hero,
body .result-hero {
    color: #fff;
    overflow: hidden;
    padding: clamp(1.3rem, 3vw, 2rem);
    position: relative;
}
body .module-hero h2,
body .module-hero .h3,
body .result-hero h2,
body .result-hero .h3 { color: #fff; font-weight: 800; }
body .module-hero p,
body .result-hero p { color: rgba(255, 255, 255, .84); }
body .module-hero .text-uppercase { color: var(--gold); letter-spacing: .12em; }
body .module-icon {
    align-items: center;
    background: rgba(255, 255, 255, .14);
    border: 1px solid rgba(255, 255, 255, .22);
    border-radius: 10px;
    color: #fff;
    display: inline-flex;
    font-size: 1.35rem;
    height: 48px;
    justify-content: center;
    margin-bottom: 1rem;
    width: 48px;
}
body .module-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    margin: 1rem 0 0;
    padding: clamp(1rem, 2.5vw, 1.5rem);
}
body .module-card h3 { color: var(--forest-dark); font-size: 1.1rem; font-weight: 800; }
body .module-card .table { margin-bottom: 0; }
body .portal-section {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-sm);
    margin: 0 0 1.25rem;
    padding: clamp(1.05rem, 2.4vw, 1.55rem);
}
body .portal-section:last-child { margin-bottom: 0; }
body .portal-section .table { background: transparent; border-color: var(--line); border-radius: var(--radius-sm); }
body .empty-state { background: var(--surface); border-color: var(--line-strong); border-radius: var(--radius); }
body .message-item,
body .conversation {
    background: var(--surface);
    border-color: var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}
body .chat-bubble { background: var(--surface-warm); border-radius: 12px; }
body .chat-out .chat-bubble { background: #e3efe9; }
body .block-notice { background: #fdf0ea; border-left-color: var(--coral); color: #633e35; }
body .guardian-profile-view .portal-section {
    background: var(--surface);
    border-color: var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}
body .guardian-profile-view .portal-section:first-of-type { background: linear-gradient(120deg, #f8f3e8, #fffdf8 60%); }

/* Dashboard cards shared by all roles */
body .dashboard-hero {
    background: linear-gradient(120deg, #0f3d3a 0%, #145e59 100%);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}
body .dashboard-hero:after { border-color: rgba(240, 217, 154, .16); }
body .dashboard-hero p { color: rgba(255, 255, 255, .82); }
body .dashboard-header {
    background: linear-gradient(120deg, #0f3d3a 0%, #145e59 100%);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}
body .metric-card,
body .report-card,
body .stat-card,
body .section-card,
body .chart-container,
body .activity-item {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    color: var(--ink);
    transition: box-shadow .22s var(--ease), translate .22s var(--ease), border-color .22s var(--ease);
}
body .metric-card:hover,
body .report-card:hover,
body .stat-card:hover,
body .section-card:hover,
body .activity-item:hover {
    border-color: var(--line-strong);
    box-shadow: var(--shadow-md);
    transform: none;
    translate: 0 -3px;
}
body .stat-card { border-top: 4px solid var(--forest); }
body .stat-card.green,
body .stat-card.orange,
body .stat-card.blue {
    background: var(--surface);
    color: var(--ink);
}
body .stat-card.green { border-top-color: #2f7a5a; }
body .stat-card.orange { border-top-color: var(--gold-deep); }
body .stat-card.blue { border-top-color: #5c6f9c; }
body .stat-card h3 { color: var(--forest-dark); }
body .stat-card.green h3 { color: #2f7a5a; }
body .stat-card.orange h3 { color: #8a6500; }
body .stat-card.blue h3 { color: #4c6185; }
body .stat-card p { color: var(--muted); }
body .stat-card::before { display: none; }
body .metric-value { color: var(--forest-dark); }
body .metric-icon { border-radius: 12px; }
body .metric-icon.teal { background: #e3efe9; color: var(--forest); }
body .metric-icon.amber { background: #f8ecc9; color: #8a6500; }
body .metric-icon.blue { background: #e9eef5; color: #4c6185; }
body .metric-icon.green { background: #e4efe4; color: #2f6b45; }
body .section-title { color: var(--forest-dark); border-bottom-color: var(--gold-deep); }
body .info-item { background: var(--surface-soft); border-left-color: var(--forest); }
body .info-value { color: var(--forest-dark); }
body .stat-number { color: var(--forest); }
body .stat-icon { color: var(--forest); }
body .activity-item { border-left: 3px solid var(--forest); padding: 1.15rem; }
body .activity-item.exam { border-left-color: var(--gold-deep); }
body .activity-item.conversation { border-left-color: var(--forest); }
body .exam-card,
body .material-card,
body .book-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-left: 3px solid var(--forest);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    transition: box-shadow .22s var(--ease), translate .22s var(--ease);
}
body .exam-card:hover,
body .material-card:hover,
body .book-card:hover {
    box-shadow: var(--shadow-md);
    transform: none;
    translate: 0 -3px;
}
body .exam-card.active { border-left-color: var(--forest); }
body .material-card { border-left-color: var(--gold-deep); }
body .book-card { border-left-color: var(--terracotta); }

/* Auth screens */
body.auth-page {
    background:
        radial-gradient(circle at 88% 4%, rgba(216, 167, 42, .16), transparent 25rem),
        radial-gradient(circle at 4% 96%, rgba(20, 94, 89, .1), transparent 26rem),
        var(--canvas);
}
body .auth-panel { background: var(--surface); border-color: var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-md); }
body .auth-panel h1 { color: #123c38; }
body .auth-mark { background: var(--forest-dark); border-radius: var(--radius-sm); }

/* Login split screen */
body.login-body { background: var(--canvas); }
body.login-body .login-panel {
    background:
        radial-gradient(circle at 90% 2%, rgba(216, 167, 42, .16), transparent 24rem),
        radial-gradient(circle at 2% 98%, rgba(20, 94, 89, .1), transparent 26rem),
        var(--surface);
}
body.login-body .login-brand-caption { color: var(--forest); }
body.login-body .login-title { color: #123c38; font-family: 'Sora', 'Trebuchet MS', sans-serif; letter-spacing: -.03em; }
body.login-body .login-subtitle { color: var(--muted); }
body.login-body .login-role-tabs { background: var(--surface-warm); border-radius: 12px; }
body.login-body .login-role-tab { border-radius: 9px; color: var(--muted); transition: background-color .18s var(--ease), color .18s var(--ease), box-shadow .18s var(--ease); }
body.login-body .login-role-tab:hover,
body.login-body .login-role-tab:focus-visible { background: rgba(255, 253, 248, .7); color: var(--forest); }
body.login-body .login-role-tab.active { background: var(--surface); box-shadow: 0 4px 14px rgba(76, 56, 31, .12); color: var(--forest-dark); }
body.login-body .login-role-tab.active i { color: var(--login-role, var(--forest)); }
body.login-body .login-role-note { color: var(--muted); }
body.login-body .login-role-note i { color: var(--gold-deep); }
body.login-body .login-role-note a,
body.login-body .login-helper a,
body.login-body .login-register a,
body.login-body .login-register strong { color: var(--forest); }
body.login-body .login-admin-context { background: var(--surface-warm); color: var(--forest-dark); }
body.login-body .login-admin-context i { color: var(--forest); }
body.login-body .login-site-link a { color: var(--muted); }
body.login-body .login-site-link a:hover { color: var(--forest); }
body.login-body .login-field .form-label { color: #334e42; }
body.login-body .login-input > i { color: #9b8f7a; }
body.login-body .login-input .form-control {
    background: var(--surface);
    border-color: var(--line-strong);
    border-radius: 10px;
    color: var(--ink);
}
body.login-body .login-input .form-control::placeholder { color: #a99b83; }
body.login-body .login-input .form-control:focus {
    background: #fff;
    border-color: var(--forest);
    box-shadow: 0 0 0 .22rem rgba(20, 94, 89, .14);
}
body.login-body .login-submit {
    background: linear-gradient(100deg, #0f3d3a 0%, #145e59 100%);
    border-radius: 10px;
    box-shadow: 0 12px 24px rgba(15, 61, 58, .2);
    font-family: 'Sora', 'Trebuchet MS', sans-serif;
}
body.login-body .login-submit:hover {
    box-shadow: 0 18px 32px rgba(15, 61, 58, .26);
    filter: brightness(1.04);
}
body.login-body .login-hero {
    background:
        linear-gradient(145deg, rgba(9, 45, 42, .95) 0%, rgba(15, 61, 58, .82) 48%, rgba(20, 94, 89, .58) 100%),
        url('../img/home/campus-students-v2.webp') center / cover no-repeat;
}
body.login-body .login-hero:before { border-color: rgba(240, 217, 154, .14); }
body.login-body .login-hero-shape { background: rgba(240, 217, 154, .14); }
body.login-body .login-shape-c { background: transparent; border-color: rgba(240, 217, 154, .18); }
body.login-body .login-hero-icon {
    background: rgba(240, 217, 154, .16);
    border-color: rgba(240, 217, 154, .24);
    color: var(--gold);
}
body.login-body .login-hero-points li {
    background: rgba(255, 253, 248, .09);
    border-color: rgba(255, 253, 248, .14);
    border-radius: 12px;
    transition: background-color .18s var(--ease), border-color .18s var(--ease);
}
body.login-body .login-hero-points li:hover { background: rgba(255, 253, 248, .14); border-color: rgba(240, 217, 154, .26); }
body.login-body .login-hero-points li:before { background: var(--gold); }

/* Home, tenant and admissions share the same motion language */
@media (prefers-reduced-motion: no-preference) {
    body .portal-content,
    body .guardian-content,
    body .main-content,
    body .auth-panel,
    body .login-panel-inner { animation: edu-rise .5s var(--ease) both; }
    body .login-hero-inner { animation: edu-fade .65s .06s var(--ease) both; }
    body .login-hero-shape { animation: edu-float 10s ease-in-out infinite; }
    body .login-shape-b { animation-delay: 1.6s; }
    body .login-shape-c { animation-delay: 3s; }
    body .tenant-hero,
    body .tenant-panel,
    body .admissions-hero,
    body .admissions-form .form-panel,
    body .admissions-result { animation: edu-rise .55s var(--ease) both; }
    body .tenant-panel:nth-child(2) { animation-delay: .08s; }
    body .admissions-form .form-panel:nth-child(2) { animation-delay: .06s; }
    body .admissions-form .form-panel:nth-child(3) { animation-delay: .12s; }
}

/* A filled rise animation leaves a transform that would trap fixed dialogs under their backdrop. */
body.modal-open .portal-content,
body.modal-open .guardian-content,
body.modal-open .main-content { animation: none !important; }

@media (prefers-reduced-motion: reduce) {
    body .login-hero-shape { animation: none; }    body .metric-card,
    body .report-card,
    body .stat-card,
    body .section-card,
    body .chart-container,
    body .activity-item,
    body .exam-card,
    body .material-card,
    body .book-card { translate: none; }
}

/* CBT question authoring */
.qb-add-header {
    align-items: center;
    border-top: 1px solid var(--line);
    display: flex;
    flex-wrap: wrap;
    gap: .75rem 1rem;
    justify-content: space-between;
    margin: 1.5rem 0 1.25rem;
    padding-top: 1.25rem;
}
.qb-add-header h3 { letter-spacing: .01em; }
.qb-question-form .question-entry {
    background: #fffdf8;
    border: 1px solid var(--line);
    border-radius: 16px;
    margin-bottom: 1.5rem;
    padding: 1.5rem;
}
.qb-entry-head {
    align-items: center;
    border-bottom: 1px solid var(--line);
    display: flex;
    gap: .75rem;
    justify-content: space-between;
    margin-bottom: 1.35rem;
    padding-bottom: .9rem;
}
.qb-entry-head .entry-number {
    background: var(--surface-soft);
    border: 1px solid var(--line);
    border-radius: 999px;
    color: #123c38;
    font-size: .8rem;
    font-weight: 800;
    letter-spacing: .03em;
    padding: .35rem .85rem;
}
.qb-field-group + .qb-field-group {
    border-top: 1px solid var(--line);
    margin-top: 1.4rem;
    padding-top: 1.4rem;
}
.qb-question-form .form-label { font-weight: 600; margin-bottom: .45rem; }
.qb-question-form .form-control,
.qb-question-form .form-select { min-height: 48px; }
.qb-question-form textarea.form-control { min-height: 96px; }
.qb-question-form .qb-question-text { min-height: 120px; }
.qb-question-form .form-text { margin-top: .45rem; }
.qb-form-note { color: #6b7c73; font-size: .82rem; line-height: 1.55; }
.qb-form-note code { background: #f3ecdd; border-radius: 4px; color: #123c38; font-size: .8rem; padding: .1rem .3rem; }
.qb-type-fields { border-top: 0; margin-top: 0; padding-top: 0; }
.qb-type-fields[hidden],
.qb-correct-single[hidden],
.qb-correct-multiple[hidden] { display: none !important; }
.qb-correct-row { border-top: 1px dashed var(--line); margin-top: .35rem; padding-top: 1.1rem; }
.qb-check-group { align-items: center; }
.qb-inline-note { background: #f2f7f5; border-left: 3px solid var(--forest); border-radius: 8px; color: #334e42; font-size: .88rem; padding: .75rem 1rem; }
.qb-pair-head { color: #6b7c73; font-size: .78rem; font-weight: 700; letter-spacing: .03em; padding-left: .15rem; text-transform: uppercase; }
.qb-pair-row input { min-width: 0; }
.qb-form-actions { border-top: 1px solid var(--line); margin-top: 1.6rem !important; padding-top: 1.35rem; }
.qb-bulk-block { background: #fbf7ee; border: 1px solid var(--line); border-radius: 16px; margin-top: 1.75rem; padding: 1.5rem; }
.qb-bulk-block .form-label { font-weight: 600; }
.qb-bulk-block .form-text { margin-bottom: 0; }
.qb-question-card .conversation-heading { row-gap: .5rem; }
.qb-question-card .status-pill { white-space: nowrap; }
.qb-question-card ol { padding-left: 1.4rem; }
.qb-question-card .table td:first-child { width: 45%; }

/* Printable question paper */
.qb-print-page { background: #fff; border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 18px 50px rgba(18, 60, 56, .1); margin: 2rem auto; max-width: 920px; padding: 2.5rem; }
.qb-print-toolbar { align-items: center; display: flex; flex-wrap: wrap; gap: .85rem; justify-content: space-between; margin-bottom: 1.75rem; }
.qb-print-actions { align-items: center; display: flex; flex-wrap: wrap; gap: 1rem; }
.qb-print-title { color: #123c38; font-size: 1.5rem; font-weight: 800; margin: 0 0 .25rem; }
.qb-print-subtitle { color: #6b7c73; margin: 0; }
.qb-print-question { border-top: 1px solid var(--line); padding: 1.4rem 0; }
.qb-print-question:first-of-type { border-top: 0; padding-top: 0; }
.qb-print-meta { align-items: center; color: #6b7c73; display: flex; flex-wrap: wrap; font-size: .8rem; gap: .5rem; margin-bottom: .55rem; }
.qb-print-meta .status-pill { white-space: nowrap; }
.qb-print-question h3 { color: #123c38; font-size: 1rem; font-weight: 600; line-height: 1.55; margin: 0 0 .6rem; }
.qb-print-options { margin: .5rem 0 .75rem; padding-left: 1.6rem; }
.qb-print-options li { margin-bottom: .35rem; }
.qb-print-pairs { border-collapse: collapse; margin: .5rem 0 .75rem; width: 100%; }
.qb-print-pairs td { border-bottom: 1px dashed var(--line); padding: .35rem .5rem; vertical-align: top; }
.qb-print-writing { background-image: repeating-linear-gradient(to bottom, transparent 0, transparent 8mm, #d8cfbc 8mm, #d8cfbc calc(8mm + 1px)); height: calc(var(--qb-lines, 4) * 8mm); margin-top: .75rem; }
.qb-print-answer { background: #fbf7ee; border-left: 3px solid var(--forest); border-radius: 0 6px 6px 0; color: #334e42; font-size: .86rem; margin-top: .85rem; padding: .55rem .8rem; }
.qb-print-answer[hidden] { display: none !important; }

/* CBT scheduling and admin authoring spacing */
.cbt-schedule-form fieldset { border-top: 1px solid var(--line); margin-top: 1.5rem; padding-top: 1.25rem; }
.cbt-schedule-form legend { color: #123c38; font-size: .95rem; font-weight: 700; }
.cbt-select-card { background: #fffdf8; transition: background-color .18s var(--ease), border-color .18s var(--ease); }
.cbt-select-card:hover { background: #fbf7ee; border-color: var(--forest) !important; }
#assessmentForm .question-card { background: #fffdf8; border: 1px solid var(--line) !important; border-radius: 14px; margin-bottom: 1rem; padding: 1.25rem; }
#assessmentForm .question-card + .question-card { margin-top: 1.25rem; }
#assessmentForm .question-card .form-label { font-weight: 600; }
@media (max-width: 767.98px) {
    .qb-add-header { align-items: flex-start; }
    .qb-question-card .conversation-heading { align-items: flex-start; }
    .qb-print-page { margin: 1rem; padding: 1.25rem; }
}
