:root {
    color-scheme: light;
    font-family: "Segoe UI", Arial, sans-serif;
    color: #18344f;
    background: #f3f6fa;
    font-synthesis: none;
}

* { box-sizing: border-box; }
body { min-width: 320px; min-height: 100vh; margin: 0; background: #f3f6fa; }
a { color: inherit; }
.topbar {
    min-height: 68px; padding: 10px clamp(18px, 5vw, 64px); display: flex;
    align-items: center; justify-content: space-between; gap: 20px; background: #fff;
    border-bottom: 1px solid #e4ebf2; box-shadow: 0 2px 12px rgba(20, 48, 76, .04);
}
.brand { display: flex; align-items: center; gap: 12px; color: #073866; font-weight: 750; text-decoration: none; }
.brand-logo { width: 42px; height: 42px; object-fit: contain; border-radius: 8px; background: #f3f6fa; }
.topbar-actions { display: flex; align-items: center; gap: 8px; }
.topbar-actions form { margin: 0; }
.nav-link, .nav-logout {
    border: 0; border-radius: 9px; padding: 10px 13px; background: transparent;
    color: #546b80; font: inherit; text-decoration: none; cursor: pointer;
}
.nav-link:hover, .nav-link.active { color: #084a82; background: #edf5fc; }
.nav-logout:hover { color: #a32e3c; background: #fff0f1; }
.page { width: min(1680px, calc(100% - 40px)); margin: 34px auto 60px; }
.welcome {
    display: flex; justify-content: space-between; align-items: center; gap: 24px;
    margin-bottom: 26px; padding: 30px 34px; border-radius: 18px; color: #fff;
    background: linear-gradient(120deg, #073866, #1f5b8a 68%, #347aa7);
    box-shadow: 0 12px 32px rgba(9, 57, 96, .16);
}
.welcome h1, .page-heading h1 { margin: 5px 0 8px; font-size: clamp(25px, 4vw, 34px); }
.welcome p { margin: 0; color: #d3e5f3; }
.eyebrow { margin: 0; font-size: 11px; font-weight: 750; letter-spacing: 1.3px; opacity: .75; }
.session-chip {
    display: grid; grid-template-columns: 10px auto; align-items: center; gap: 4px 9px;
    min-width: 175px; padding: 14px 16px; border: 1px solid rgba(255,255,255,.2);
    border-radius: 12px; background: rgba(255,255,255,.1); font-size: 12px;
}
.session-chip strong { grid-column: 2; font-size: 15px; }
.session-dot { width: 9px; height: 9px; border-radius: 50%; background: #63df9a; }
.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.stat-card {
    position: relative; min-height: 150px; padding: 20px; display: flex; flex-direction: column;
    align-items: flex-start; justify-content: center; gap: 7px; overflow: hidden;
    border: 1px solid #e6edf4; border-radius: 15px; background: #fff;
    box-shadow: 0 4px 16px rgba(22, 48, 72, .045);
}
.stat-card::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--accent); }
.stat-card strong { color: #173c5d; font-size: 32px; line-height: 1.1; }
.stat-card > span:last-child { color: #6e8192; font-size: 13px; }
.stat-icon { color: var(--accent); font-size: 18px; }
.blue { --accent: #3278bc; }.green { --accent: #26a269; }.purple { --accent: #7952b3; }
.cyan { --accent: #148c9e; }.orange { --accent: #d78224; }.pink { --accent: #ca5682; }
.gold { --accent: #b28a17; }.red { --accent: #c54b55; }
.dashboard-panel {
    margin-top: 24px; padding: 25px 28px; display: flex; justify-content: space-between;
    align-items: center; gap: 24px; border: 1px solid #e6edf4; border-radius: 15px; background: #fff;
}
.dashboard-panel h2 { margin: 6px 0; color: #173c5d; }
.dashboard-panel p:not(.eyebrow) { margin: 0; color: #6e8192; }
.primary-link, .secondary-link {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 43px; padding: 10px 17px; border: 0; border-radius: 9px;
    background: #0d568d; color: #fff; font: inherit; font-weight: 650; text-decoration: none;
    cursor: pointer; white-space: nowrap;
}
.primary-link:hover { background: #073866; }
.secondary-link { border: 1px solid #cbd8e4; background: #fff; color: #31516d; }
.secondary-link:hover { background: #f1f6fa; }
.coming-soon { margin: 17px 2px; color: #8393a1; font-size: 13px; }
.page-heading { margin: 0 0 22px; }
.page-heading .eyebrow { color: #1f5b8a; }
.page-heading h1 { color: #173c5d; }
.page-heading > p:last-child { color: #6e8192; }
.settings-page { max-width: 880px; margin-top: 24px; }
.info-box, .alert { margin: 0 0 18px; padding: 14px 17px; border-radius: 10px; }
.info-box { display: flex; gap: 12px; color: #37566e; background: #eaf4fc; border-left: 4px solid #1f5b8a; }
.alert-info { color: #24506f; background: #eaf4fc; border: 1px solid #c8dfef; }
.alert-success { color: #1d6137; background: #e8f6ec; border: 1px solid #c5e7cf; }
.alert-danger { color: #862e37; background: #fff0f1; border: 1px solid #f0c9cd; }
.form-panel {
    margin-bottom: 18px; padding: 24px; border: 1px solid #e5ecf3; border-radius: 14px;
    background: #fff; box-shadow: 0 3px 14px rgba(22, 48, 72, .035);
}
.form-panel h2 { margin: 0 0 20px; color: #0e4775; font-size: 18px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px 18px; }
.form-group { min-width: 0; margin-bottom: 17px; }
.form-group label { display: block; margin-bottom: 7px; color: #34526a; font-size: 13px; font-weight: 650; }
.required { color: #c53543; }
.form-group input:not([type="file"]), .form-group textarea {
    width: 100%; min-height: 42px; padding: 10px 12px; border: 1px solid #d5e0e9;
    border-radius: 8px; color: #18344f; background: #fff; font: inherit; font-size: 14px;
}
.form-group textarea { min-height: 88px; resize: vertical; }
.form-group input:focus, .form-group textarea:focus { outline: 3px solid rgba(31, 91, 138, .12); border-color: #1f5b8a; }
.form-group input[type="file"] { display: block; width: 100%; color: #4c6478; font: inherit; font-size: 13px; }
.form-group small { display: block; margin-top: 7px; color: #748697; font-size: 12px; line-height: 1.45; }
.full-width { grid-column: 1 / -1; }
.settings-preview { display: block; max-width: 200px; max-height: 120px; margin-top: 12px; object-fit: contain; border: 1px solid #e1e8ef; border-radius: 8px; padding: 5px; background: #f8fafc; }
.form-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.settings-page .page-heading { margin-bottom: 16px; }
.settings-page .page-heading h1 { margin-bottom: 4px; }
.settings-page .page-heading > p:last-child { margin: 0; }
.settings-page .info-box,
.settings-page .alert { margin-bottom: 12px; padding: 10px 13px; font-size: 13px; }
.settings-page .form-panel { margin-bottom: 12px; padding: 17px 20px 5px; border-radius: 11px; }
.settings-page .form-panel h2 { margin-bottom: 12px; font-size: 16px; }
.settings-page .form-grid { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 10px; row-gap: 0; }
.settings-page .field-school-name { grid-column: span 6; }
.settings-page .field-dise-code { grid-column: span 3; }
.settings-page .field-established-year { grid-column: span 3; }
.settings-page .field-address { grid-column: 1 / -1; }
.settings-page .field-phone { grid-column: span 4; }
.settings-page .field-email { grid-column: span 8; }
.settings-page .field-school-code,
.settings-page .field-hs-code,
.settings-page .field-vocational-code { grid-column: span 4; }
.settings-page .field-hoi-name { grid-column: span 6; }
.settings-page .field-student-prefix { grid-column: span 4; }
.settings-page .field-site-url { grid-column: span 8; }
.settings-page .field-logo,
.settings-page .field-signature { grid-column: span 6; }
.settings-page .field-dise-code input,
.settings-page .field-established-year input,
.settings-page .field-phone input,
.settings-page .field-student-prefix input { max-width: 220px; }
.settings-page .field-site-url input { max-width: 520px; }
.settings-page .form-group input[type="file"] { width: 100%; max-width: 100%; min-width: 0; }
.settings-page .form-group { margin-bottom: 11px; }
.settings-page .form-group label { margin-bottom: 4px; font-size: 12px; }
.settings-page .form-group input:not([type="file"]),
.settings-page .form-group textarea { min-height: 36px; padding: 7px 10px; font-size: 13px; }
.settings-page .form-group textarea { min-height: 62px; }
.settings-page .form-group small { margin-top: 4px; font-size: 11px; }
.settings-page .form-group input[type="file"] { font-size: 12px; }
.settings-page .settings-preview { max-width: 150px; max-height: 76px; margin-top: 7px; }
.settings-page .form-actions { margin-top: 15px; }
.sessions-heading { display: flex; justify-content: space-between; align-items: center; gap: 18px; }
.sessions-heading h1 { margin: 5px 0 8px; color: #173c5d; font-size: clamp(25px, 4vw, 34px); }
.sessions-heading p { margin: 0; color: #6e8192; }
.session-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; margin: 22px 0; }
.session-stat {
    min-height: 105px; padding: 18px 21px; display: flex; flex-direction: column;
    justify-content: center; gap: 6px; border: 1px solid #e5ecf3; border-radius: 13px;
    background: #fff; box-shadow: 0 3px 14px rgba(22, 48, 72, .035);
}
.session-stat strong { color: #173c5d; font-size: 28px; }
.session-stat span { color: #6e8192; font-size: 13px; }
.active-stat strong { color: #23834d; }.inactive-stat strong { color: #b0444d; }
.table-panel, .session-form, .empty-state {
    padding: 23px; border: 1px solid #e5ecf3; border-radius: 14px;
    background: #fff; box-shadow: 0 3px 14px rgba(22, 48, 72, .035);
}
.table-scroll { overflow-x: auto; }
.session-table { width: 100%; border-collapse: collapse; text-align: left; }
.session-table th { padding: 13px 14px; color: #64798b; background: #f6f9fc; font-size: 12px; text-transform: uppercase; letter-spacing: .5px; }
.session-table td { padding: 14px; border-bottom: 1px solid #edf1f5; color: #3c566d; font-size: 14px; }
.session-table tbody tr:last-child td { border-bottom: 0; }
.session-table td strong { color: #173c5d; font-size: 15px; }
.status-badge { display: inline-block; padding: 5px 9px; border-radius: 20px; font-size: 10px; font-weight: 750; letter-spacing: .5px; }
.status-active { color: #1e7543; background: #e4f5e9; }
.status-inactive { color: #a13e47; background: #fff0f1; }
.session-actions { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.session-actions form { margin: 0; }
.small-action { min-height: 33px; padding: 7px 11px; font-size: 12px; }
.activate-action { border: 0; border-radius: 8px; color: #74520a; background: #fff1c7; font: inherit; font-size: 12px; font-weight: 650; cursor: pointer; }
.activate-action:hover { background: #ffe59a; }
.current-label { color: #23834d; font-size: 12px; font-weight: 650; }
.session-note { margin: 17px 0 0; color: #748697; font-size: 12px; line-height: 1.5; }
.empty-state { padding: 48px 20px; text-align: center; }
.empty-state > span { color: #5380a2; font-size: 38px; }
.empty-state h2 { color: #173c5d; }
.empty-state p { margin-bottom: 20px; color: #6e8192; }
.session-form-page { max-width: 760px; }
.session-form .form-group { max-width: 470px; }
.form-group select {
    width: 100%; min-height: 42px; padding: 10px 12px; border: 1px solid #d5e0e9;
    border-radius: 8px; color: #18344f; background: #fff; font: inherit; font-size: 14px;
}
.form-group select:focus { outline: 3px solid rgba(31, 91, 138, .12); border-color: #1f5b8a; }
.session-form .form-group input:not([type="checkbox"]) { width: 100%; }
.session-form .form-actions { margin-top: 10px; }
.count-label { color: #6e8192; font-size: 17px; font-weight: 500; }
.action-row, .quick-add { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; }
.action-row form, .session-actions form { margin: 0; }
.filter-panel {
    margin: 20px 0; padding: 17px 20px; display: flex; flex-wrap: wrap; align-items: end;
    gap: 12px 18px; border: 1px solid #e5ecf3; border-radius: 12px; background: #fff;
}
/* Filters share one row: each box grows to fill the line but is capped, so five of them fit
   a desktop row and a short one (Section, Class, Session) is not stretched like a long one
   (Subject, Exam). Below 760px they stack at full width, as before. */
.filter-panel .form-group { flex: 1 1 150px; width: auto; max-width: 230px; min-width: 0; margin: 0; }
.filter-panel .form-group.sm { flex: 0 1 135px; }
.filter-panel .form-group select, .filter-panel .form-group input { width: 100%; text-overflow: ellipsis; }
.filter-panel .form-group select { min-height: 38px; padding: 8px 10px; }
.filter-panel .form-group input:not([type="file"]):not([type="checkbox"]) { min-height: 38px; padding: 8px 10px; }
.filter-panel .form-group button { min-height: 38px; padding: 8px 14px; white-space: nowrap; }
/* Quick-fill marks boxes: narrow, same height as the dropdowns */
.filter-panel .form-group.qf { flex: 0 0 auto; width: 92px; max-width: 92px; }
.filter-panel .form-group.qf input { width: 100%; }
.filter-panel .form-group.qf-btn { flex: 0 0 auto; width: auto; max-width: none; }
.filter-panel > button { margin-bottom: 1px; }
.stage-badge {
    display: inline-block; margin: 2px 4px 2px 0; padding: 5px 9px;
    border-radius: 18px; background: #edf4f8; font-size: 11px; font-weight: 700;
}
.stage-primary { color: #7a4a00; }.stage-upper_primary { color: #0b5f3a; }
.stage-secondary { color: #1a3d7a; }.stage-higher_secondary { color: #0f4c5c; }
.status-locked { color: #8b3c31; background: #fff0e8; }
.usage-indicator {
    display: inline-flex; align-items: center; min-height: 30px; padding: 5px 9px;
    border: 1px solid #f1d4bd; border-radius: 8px; color: #8b4b20;
    background: #fff8f1; font-size: 11px; font-weight: 650;
}
.usage-detail { display: block; max-width: 330px; margin-top: 5px; color: #77899a; font-size: 11px; line-height: 1.5; }
.delete-action {
    border: 1px solid #f0c9cd; border-radius: 8px; color: #9c3440; background: #fff;
    font: inherit; font-weight: 600; cursor: pointer;
}
.delete-action:hover { background: #fff0f1; }
.checkbox-group > label { display: flex; align-items: center; gap: 9px; }
.checkbox-group input[type="checkbox"] { width: 17px; height: 17px; min-height: 0; padding: 0; flex: none; }
.quick-add { max-width: 520px; margin: -4px 0 18px; }
.quick-add > span { color: #6e8192; font-size: 13px; }
.quick-add .small-action { min-height: 30px; padding: 5px 10px; }
.academic-filter {
    margin: 18px 0; padding: 16px 18px; display: flex; flex-wrap: wrap;
    align-items: end; gap: 12px 18px; border: 1px solid #e5ecf3;
    border-radius: 12px; background: #fff;
}
.academic-filter label { display: grid; gap: 6px; color: #34526a; font-size: 12px; font-weight: 650; }
.academic-filter select, .session-form select, .session-table select {
    min-height: 38px; padding: 7px 10px; border: 1px solid #d5e0e9;
    border-radius: 8px; color: #18344f; background: #fff; font: inherit;
}
.academic-filter input { min-height: 38px; padding: 7px 10px; border: 1px solid #d5e0e9; border-radius: 8px; color: #18344f; font: inherit; }
.session-table input[type="checkbox"] { width: 17px; height: 17px; accent-color: #0d568d; }
.session-table td small { display: block; }
.session-table td > select { min-width: 145px; max-width: 210px; font-size: 12px; }
.combination-table { min-width: 1060px; }
.combination-table td:first-child, .combination-table th:first-child { text-align: center; }
.small-note { margin: 14px 0 0; color: #6e8192; font-size: 12px; line-height: 1.5; }
.session-table button:disabled { opacity: .45; cursor: not-allowed; }
.form-panel > .table-scroll { margin: 0 -4px; }
.pagination { margin: 16px 0; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 14px; color: #6e8192; font-size: 13px; }
@media (max-width: 760px) {
    .topbar { align-items: flex-start; flex-direction: column; }
    .topbar-actions { width: 100%; flex-wrap: wrap; }
    .page { margin-top: 22px; }
    .welcome, .dashboard-panel { align-items: flex-start; flex-direction: column; padding: 24px; }
    .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
    .stat-card { min-height: 130px; padding: 16px; }
    .sessions-heading { align-items: flex-start; flex-direction: column; }
    .filter-panel { align-items: stretch; flex-direction: column; }
    .filter-panel .form-group, .filter-panel .form-group.sm { flex: none; width: 100%; max-width: none; }
    .action-row { width: 100%; }
}
@media (max-width: 480px) {
    .form-grid { grid-template-columns: 1fr; }
    .full-width { grid-column: auto; }
    .settings-page .form-grid { grid-template-columns: 1fr; }
    .settings-page .form-grid .form-group { grid-column: 1; }
    .settings-page .form-grid .form-group input:not([type="file"]),
    .settings-page .form-grid .form-group textarea { max-width: none; }
    .form-panel { padding: 18px; }
    .session-chip { align-self: stretch; }
    .session-stats { gap: 8px; }
    .session-stat { min-height: 88px; padding: 13px; }
    .session-stat strong { font-size: 23px; }
    .table-panel, .session-form { padding: 15px; }
}

/* Match the original SchoolTest admin pages on the new subject workflows. */
.academic-page {
    min-width: 320px;
    padding: 15px 20px;
    color: #343a40;
    background: #f0f4f9;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    font-size: 14px;
}
.academic-page .schooltest-nav {
    width: min(1680px, calc(100% - 40px));
    margin: 0 auto 22px;
    position: relative;
    z-index: 40;
    border-radius: 12px;
    box-shadow: 0 8px 26px rgba(9, 30, 56, .28);
}
.academic-page .schooltest-nav-main { border-radius: 12px 12px 0 0; }
.academic-page .schooltest-nav-links { border-radius: 0 0 12px 12px; }
.academic-page .schooltest-nav-main {
    min-height: 58px;
    padding: 8px 18px;
    display: flex;
    align-items: center;
    gap: 16px;
    color: #c5d8eb;
    background: linear-gradient(135deg, #0a1526 0%, #16294a 60%, #1c3a66 100%);
}
.academic-page .schooltest-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    flex: 0 1 auto;
    max-width: 280px;
    padding-right: 14px;
    margin-right: 2px;
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: .2px;
    text-decoration: none;
    white-space: nowrap;
    border-right: 1px solid rgba(255, 255, 255, .12);
}
/* the whole name, on two lines when it is long, never cut to "Sunrise Model High S…" */
.academic-page .schooltest-brand span {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    white-space: normal;
    line-height: 1.2;
}
.academic-page .schooltest-brand .brand-logo { flex: 0 0 auto; }
.academic-page .schooltest-brand .brand-logo {
    width: 32px;
    height: 32px;
    padding: 2px;
    border-radius: 7px;
    background: rgba(255, 255, 255, .95);
    box-shadow: 0 1px 4px rgba(0, 0, 0, .2);
}
.academic-page .schooltest-nav-categories {
    display: flex;
    align-items: center;
    gap: 2px;
    flex-wrap: nowrap;
    min-width: 0;
    flex: 1 1 auto;
    overflow-x: auto;
    scrollbar-width: none;           /* Firefox: hide the scrollbar, keep scrolling */
}
.academic-page .schooltest-nav-categories::-webkit-scrollbar { display: none; }
.academic-page .schooltest-nav-categories .nav-category,
.academic-page .schooltest-logout {
    position: relative;
    padding: 8px 12px;
    border: 0;
    border-radius: 8px;
    color: #bcd0e6;
    background: transparent;
    font: inherit;
    font-size: 13.5px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: color .15s ease, background .15s ease;
}
.academic-page .schooltest-nav-categories .nav-category { flex: 0 0 auto; }
/* spread the sections across the bar; when they do not fit they line up from the left and scroll */
.academic-page .schooltest-nav-categories { justify-content: space-between; padding: 0 6px; }
.academic-page .schooltest-nav-categories .nav-category { padding: 8px 10px; }
.academic-page .schooltest-nav-categories .nav-category:hover,
.academic-page .schooltest-logout:hover {
    color: #fff;
    background: rgba(255, 255, 255, .09);
}
.academic-page .schooltest-nav-categories .nav-category.current {
    color: #0f3454;
    background: #f4f7fa;
    font-weight: 700;
}
.academic-page .schooltest-logout {
    color: #ffd9dd; background: rgba(214, 52, 69, .18);
}
.academic-page .schooltest-logout:hover { color: #fff; background: #d63445; }

/* "Web" link — opens the public website, sits just before Logout. */
.academic-page .schooltest-web {
    flex: 0 0 auto;
    display: inline-flex; align-items: center; gap: 6px;
    margin-left: 6px; padding: 8px 14px;
    border-radius: 8px;
    color: #bfe3cf; background: rgba(63, 191, 120, .16);
    font-size: 13.5px; font-weight: 600; text-decoration: none; white-space: nowrap;
    transition: color .15s ease, background .15s ease;
}
.academic-page .schooltest-web::before { content: "🌐"; font-size: 13px; }
.academic-page .schooltest-web:hover { color: #fff; background: #2f9e5e; }

.academic-page .schooltest-nav-main form { margin: 0 0 0 6px; flex: 0 0 auto; }
/* The phone menu's wrappers take no box on a wide screen: their children sit in the bar
   as if the wrappers were not there. admin-mobile.css turns them into the drawer. */
.nav-drawer, .nav-drawer-foot { display: contents; }
.nav-drawer-head, .nav-backdrop { display: none; }
.academic-page .schooltest-nav-links {
    min-height: 40px;
    border-top: 1px solid #e3e9f1;
    background: #f4f7fa;
}

/* Hamburger button — hidden on desktop, shown on mobile via the media query below. */
.schooltest-nav-toggle {
    display: none;
    width: 42px; height: 38px; padding: 0;
    border: 1px solid rgba(255, 255, 255, .25); border-radius: 8px;
    background: rgba(255, 255, 255, .08); cursor: pointer;
    flex-direction: column; align-items: center; justify-content: center; gap: 4px;
}
.schooltest-nav-toggle span {
    display: block; width: 20px; height: 2px; background: #c5d8eb; border-radius: 2px;
    transition: transform .2s, opacity .2s;
}
.schooltest-nav[data-nav-root].nav-open .schooltest-nav-toggle span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.schooltest-nav[data-nav-root].nav-open .schooltest-nav-toggle span:nth-child(2) { opacity: 0; }
.schooltest-nav[data-nav-root].nav-open .schooltest-nav-toggle span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
.academic-page .schooltest-nav-panel {
    min-height: 40px;
    padding: 6px 12px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
}
.academic-page .schooltest-nav-panel[hidden] { display: none; }
.academic-page .schooltest-nav-panel a {
    padding: 7px 13px;
    border-radius: 7px;
    color: #335270;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: color .13s ease, background .13s ease, box-shadow .13s ease;
}
.academic-page .schooltest-nav-panel a:hover {
    color: #0f4d82;
    background: #e5eff9;
}
.academic-page .schooltest-nav-panel a.current {
    color: #fff;
    background: linear-gradient(135deg, #0f4d82, #1c6fae);
    box-shadow: 0 2px 8px rgba(15, 77, 130, .3);
}
.academic-page .academic-management-page {
    width: min(1680px, calc(100% - 40px));
    margin: 20px auto 40px;
    padding: 25px;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 2px 15px rgba(0, 0, 0, .08);
}
.academic-page .page-heading {
    margin: 0 0 20px;
    padding: 0 0 15px;
    border-bottom: 2px solid #e4edf6;
}
.academic-page .page-heading .eyebrow { display: none; }
.academic-page .page-heading h1,
.academic-page .sessions-heading h1 {
    margin: 0;
    color: #003366;
    font-size: 26px;
    font-weight: 700;
    line-height: 1.3;
}
.academic-page .page-heading > p,
.academic-page .page-heading .head-row p,
.academic-page .sessions-heading p {
    margin: 5px 0 0;
    color: #6c7a8a;
    font-size: 13px;
    line-height: 1.5;
}

/* A page heading with its actions -- Print, Excel, Add -- in the top-right corner,
   so they never take a row of the page to themselves. */
.head-row { display: flex; gap: 12px 20px; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; }
.head-row > div:first-child { flex: 1 1 320px; min-width: 0; }
.head-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; padding-top: 2px; }
.head-actions a, .head-actions button {
    border: 1px solid #cbd8e4; background: #fff; color: #0e4775; border-radius: 10px;
    padding: 8px 14px; font-family: inherit; font-size: 13px; font-weight: 650; line-height: 1.2; text-decoration: none; cursor: pointer; white-space: nowrap;
}
.head-actions a:hover, .head-actions button:hover { border-color: #0d568d; }
.head-actions .solid { background: #0d568d; color: #fff; border-color: #0d568d; }
.head-actions .danger { color: #a13e47; border-color: #f0b4ba; }
@media print { .head-actions { display: none !important; } }

/* One slim row for a page's pickers: a small inline select (the session, usually)
   beside tabs or other choices -- instead of a full panel for a single dropdown. */
.pick-row { display: flex; gap: 10px 18px; align-items: center; flex-wrap: wrap; margin: 0 0 14px; }
.pick-row > * { margin: 0 !important; }
.pick-inline { display: inline-flex; align-items: center; gap: 8px; margin: 0; }
.pick-inline label { font-size: 12px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase; color: #5b7287; }
.pick-inline select {
    height: 36px; padding: 0 30px 0 11px; border: 1px solid #cbd8e4; border-radius: 9px;
    background-color: #fff; color: #173c5d; font-family: inherit; font-size: 13.5px; font-weight: 600; line-height: 1;
}
@media print { .pick-row { display: none !important; } }
.academic-page .count-label { color: #6c7a8a; font-size: 14px; font-weight: 500; }
.academic-page .academic-filter {
    margin: 0 0 20px;
    padding: 15px 20px;
    align-items: flex-end;
    gap: 12px;
    border: 1px solid #e4edf6;
    border-radius: 10px;
    background: #f8f9fa;
}
.academic-page .academic-filter label {
    flex: 1 1 150px;
    min-width: 0;
    max-width: 230px;
    color: #343a40;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .3px;
}
.academic-page .academic-filter select,
.academic-page .academic-filter input,
.academic-page .session-form select,
.academic-page .session-table select {
    min-width: 0;
    min-height: 36px;
    padding: 8px 12px;
    border: 2px solid #e4edf6;
    border-radius: 8px;
    color: #343a40;
    background: #fff;
    font: inherit;
    font-size: 14px;
}
.academic-page .academic-filter select:focus,
.academic-page .academic-filter input:focus,
.academic-page .session-form select:focus,
.academic-page .session-form input:focus,
.academic-page .session-table select:focus {
    outline: none;
    border-color: #1f5b8a;
    box-shadow: 0 0 0 3px rgba(31, 91, 138, .1);
}
.academic-page .table-panel,
.academic-page .form-panel,
.academic-page .session-form {
    margin: 0 0 20px;
    padding: 20px 25px;
    border: 1px solid #e4edf6;
    border-radius: 10px;
    background: #f8f9fa;
}
.academic-page .table-scroll {
    margin: 0;
    border-radius: 7px;
}
.academic-page .session-table {
    width: 100%;
    border-collapse: collapse;
    color: #343a40;
    font-size: 13px;
    border: 1px solid #c7d4e0;
}
.academic-page .session-table thead {
    color: #fff;
    background: #003366;
}
.academic-page .session-table th {
    padding: 10px 12px;
    border: 1px solid #0a4070;
    color: #fff;
    background: #003366;
    font-size: 13px;
    font-weight: 600;
    text-align: left;
    text-transform: none;
}
.academic-page .session-table td {
    padding: 8px 12px;
    border: 1px solid #d8e2ec;
    background: #fff;
    color: #343a40;
    font-size: 13px;
    vertical-align: middle;
}
.academic-page .session-table tbody tr:hover td { background: #f0f7ff; }
.academic-page .session-table td strong { color: #1a3b55; font-weight: 650; }
.academic-page .session-table td .usage-detail { color: #6c7a8a; font-size: 11px; }
.academic-page .session-table td:nth-child(3) input[type="checkbox"],
.academic-page .session-table td:nth-child(4) input[type="checkbox"],
.academic-page .session-table td:nth-child(5) input[type="checkbox"] {
    width: 17px;
    height: 17px;
    accent-color: #003366;
    vertical-align: middle;
}
.academic-page .session-table td > select {
    min-width: 150px;
    max-width: 220px;
    font-size: 13px;
}
.academic-page .session-form { max-width: 760px; }
.academic-page .session-form .form-group { margin-bottom: 15px; }
.academic-page .session-form .form-group label {
    margin-bottom: 5px;
    color: #343a40;
    font-size: 13px;
    font-weight: 600;
}
.academic-page .session-form .form-group input:not([type="file"]):not([type="checkbox"]) {
    width: 100%;
    max-width: 520px;
    min-height: 40px;
    padding: 10px 14px;
    border: 2px solid #e4edf6;
    border-radius: 8px;
    color: #343a40;
    background: #fff;
    font: inherit;
    font-size: 14px;
}
.academic-page .session-form .form-group small { color: #6c7a8a; font-size: 12px; }
.academic-page .primary-link,
.academic-page .secondary-link,
.academic-page .session-form button {
    min-height: 36px;
    padding: 8px 18px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
}
.academic-page .primary-link { background: #003366; }
.academic-page .primary-link:hover { background: #1f5b8a; }
.academic-page .secondary-link { border-color: #dde4ec; color: #1a2b3c; background: #fff; }
.academic-page .alert { padding: 12px 18px; border-radius: 10px; font-size: 13px; }
.academic-page .info-box { border-radius: 8px; font-size: 13px; }
.academic-page .small-note { color: #6c7a8a; font-size: 12.5px; }
.academic-page .status-badge { padding: 4px 12px; border-radius: 20px; font-size: 11px; }
/* beside a name in an earlier session's list: how the student stands today */
.academic-page .status-badge.now-status { margin-left: 6px; padding: 1px 7px; background: #fdf0e6; color: #9a4b10; font-size: 10px; vertical-align: middle; }

@media (max-width: 768px) {
    .academic-page { padding: 10px; }
    .academic-page .schooltest-nav-main { align-items: center; gap: 10px; padding: 8px 12px; }
    .academic-page .academic-management-page { margin-top: 12px; padding: 15px; }
    .academic-page .page-heading h1,
    .academic-page .sessions-heading h1 { font-size: 23px; }
    .academic-page .academic-filter { align-items: stretch; flex-direction: column; }
    .academic-page .academic-filter label { width: 100%; flex: none; max-width: none; }
    .academic-page .form-panel,
    .academic-page .table-panel,
    .academic-page .session-form { padding: 15px; }
}

/* Phones and small tablets (<= 900px): the menu becomes a slide-in drawer -- admin-mobile.css. */

.academic-page .academic-management-page.settings-page {
    width: min(1050px, 100%);
}
.academic-page .dashboard-management-page {
    width: min(1680px, calc(100% - 40px));
}
.academic-page .dashboard-management-page .welcome {
    border-radius: 10px;
    background: linear-gradient(135deg, #003366, #1f5b8a);
    box-shadow: 0 2px 12px rgba(0, 51, 102, .14);
}
.academic-page .dashboard-management-page .welcome h1 {
    font-size: 26px;
    line-height: 1.3;
}
.academic-page .dashboard-management-page .stat-card,
.academic-page .dashboard-management-page .dashboard-panel {
    border-color: #e4edf6;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .05);
}
.academic-page .dashboard-management-page .stat-card strong,
.academic-page .dashboard-management-page .dashboard-panel h2 {
    color: #003366;
}
.academic-page .dashboard-management-page .stat-card > span:last-child,
.academic-page .dashboard-management-page .dashboard-panel p:not(.eyebrow),
.academic-page .coming-soon {
    color: #6c7a8a;
}
.academic-page .dashboard-management-page .stat-card::before {
    background: #1f5b8a;
}
.academic-page .dashboard-management-page .stat-icon {
    color: #1f5b8a;
}
.academic-page .dashboard-management-page .dashboard-panel {
    padding: 20px 24px;
}
.academic-page .form-panel h2,
.academic-page .table-panel h2,
.academic-page .session-form h2 {
    color: #003366;
}
.academic-page .form-group label {
    color: #343a40;
    font-size: 13px;
    font-weight: 600;
}
.academic-page .form-group input:not([type="file"]),
.academic-page .form-group textarea,
.academic-page .form-group select,
.academic-page .session-form select {
    border-color: #d8e1eb;
    border-radius: 6px;
    color: #343a40;
}
.academic-page .form-group input:focus,
.academic-page .form-group textarea:focus,
.academic-page .form-group select:focus {
    outline: none;
    border-color: #1f5b8a;
    box-shadow: 0 0 0 3px rgba(31, 91, 138, .1);
}
.academic-page .session-form-page > .page-heading,
.academic-page .sessions-page > .page-heading {
    margin-bottom: 20px;
}
.academic-page .primary-link,
.academic-page .session-form button[type="submit"] {
    background: #003366;
}
.academic-page .primary-link:hover,
.academic-page .session-form button[type="submit"]:hover {
    background: #1f5b8a;
}

@media (max-width: 768px) {
    .academic-page .dashboard-management-page .welcome {
        align-items: stretch;
        flex-direction: column;
        padding: 20px;
    }
    .academic-page .dashboard-management-page .stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }
    .academic-page .dashboard-management-page .stat-card {
        min-height: 120px;
        padding: 15px;
    }
    .academic-page .dashboard-management-page .dashboard-panel {
        align-items: flex-start;
        flex-direction: column;
        padding: 17px;
    }
    .academic-page .dashboard-management-page .dashboard-panel .primary-link,
    .academic-page .dashboard-management-page .dashboard-panel .secondary-link {
        white-space: normal;
    }
}

.academic-page .student-filter {
    margin: 0 0 14px;
    padding: 14px;
    display: grid;
    grid-template-columns: repeat(6, minmax(120px, 1fr)) minmax(220px, 2fr) auto;
    align-items: end;
    gap: 10px;
    border: 1px solid #e4edf6;
    border-radius: 9px;
    background: #f8f9fa;
}
.academic-page .student-filter label,
.academic-page .student-list-toolbar label {
    display: grid;
    gap: 5px;
    color: #343a40;
    font-size: 12px;
    font-weight: 600;
}
.academic-page .student-filter select,
.academic-page .student-filter input,
.academic-page .student-list-toolbar select {
    width: 100%;
    min-width: 0;
    min-height: 36px;
    padding: 7px 9px;
    border: 1px solid #d8e1eb;
    border-radius: 6px;
    color: #343a40;
    background: #fff;
    font: inherit;
    font-size: 13px;
}
.academic-page .student-filter-actions {
    display: flex;
    align-items: center;
    gap: 7px;
}
.academic-page .student-filter-actions .primary-link,
.academic-page .student-filter-actions .secondary-link {
    min-height: 36px;
    padding: 7px 11px;
    font-size: 13px;
}
.academic-page .student-filter select:disabled {
    color: #748697;
    background: #edf1f5;
    cursor: wait;
}
.academic-page .student-filter-message {
    min-height: 0;
    margin: -8px 0 10px;
    color: #6c7a8a;
    font-size: 12px;
}
.academic-page .student-filter-message:empty { display: none; }

/* "New Admission" checkbox filter: keep the box + hint inline, aligned with other fields. */
.academic-page .student-newadm-box {
    display: flex; align-items: center; gap: 7px; min-height: 34px;
}
.academic-page .student-newadm-box input[type="checkbox"] {
    width: 17px; height: 17px; accent-color: #0f4d82; margin: 0; cursor: pointer;
}
.academic-page .student-newadm-box small { color: #6c7a8a; font-size: 11.5px; line-height: 1.2; }
.academic-page .student-newadm-box input:disabled { cursor: not-allowed; }
.academic-page .student-newadm-box input:disabled + small { color: #9fb0c0; }
.academic-page .student-list-toolbar {
    margin: 0 0 8px;
    display: flex;
    align-items: end;
    justify-content: flex-end;
    gap: 12px;
    color: #6c7a8a;
    font-size: 13px;
}
.academic-page .student-list-toolbar p {
    margin: 0 auto 2px 0;
}
.academic-page .student-list-toolbar p strong { color: #003366; }
.academic-page .student-list-toolbar label { display: flex; align-items: center; gap: 6px; }
.academic-page .student-list-toolbar select { width: auto; min-width: 95px; }
.academic-page .student-table { min-width: 850px; }
.academic-page .student-table td { vertical-align: middle; }
.academic-page .student-identity {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 175px;
}
.academic-page .student-avatar {
    width: 46px;
    height: 56px;
    flex: 0 0 46px;
    display: inline-grid;
    place-items: center;
    border-radius: 8px;
    color: #1f5b8a;
    background: #e5eff8;
    font-weight: 700;
    object-fit: cover;
    border: 1px solid #d5e0e9;
    overflow: hidden;
}
.academic-page img.student-avatar { object-position: top center; }
.academic-page .student-identity small,
.academic-page .student-detail {
    display: block;
    margin-top: 2px;
    color: #6c7a8a;
    font-size: 11px;
}
.academic-page .student-identifiers {
    min-width: 145px;
    display: grid;
    gap: 5px;
    color: #343a40;
    font-size: 12px;
}
.academic-page .student-identifiers .id-tag {
    display: inline-block;
    min-width: 30px;
    margin-right: 4px;
    padding: 1px 6px;
    border-radius: 4px;
    background: #eaf2fb;
    color: #1f5b8a;
    font-size: 10px;
    font-weight: 700;
    text-align: center;
    letter-spacing: .3px;
}
.academic-page .student-placement {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
}
.academic-page .student-placement span {
    padding: 2px 7px;
    border-radius: 5px;
    color: #1f5b8a;
    background: #eaf2fb;
    font-size: 12px;
    font-weight: 650;
}
.academic-page .student-placement .student-roll {
    color: #fff;
    background: #1f5b8a;
}
.academic-page .student-sibling-count {
    text-align: center;
    font-weight: 650;
}
/* the 👥 number and its pop-up (student-filters.js) */
.academic-page .sib-chip {
    display: inline-block; min-width: 34px; padding: 2px 9px; border: 0; border-radius: 999px;
    background: #f3f0fb; color: #5b3fa0; font: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer;
}
.academic-page .sib-chip:hover, .academic-page .sib-chip:focus-visible { background: #e6defa; outline: 2px solid #c9b8f0; }
.academic-page .sib-none { color: #b0bec9; }
.sib-dialog {
    width: min(560px, calc(100vw - 32px)); max-height: min(80vh, 640px); padding: 0; border: 0;
    border-radius: 14px; box-shadow: 0 24px 60px rgba(15, 37, 58, .28); color: #10253a;
}
.sib-dialog::backdrop { background: rgba(15, 37, 58, .45); }
.sib-dialog header {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    padding: 14px 18px; border-bottom: 1px solid #e6edf3; position: sticky; top: 0; background: #fff;
}
.sib-dialog h3 { margin: 0; font-size: 16px; color: #173c5d; }
.sib-close { border: 0; background: none; font-size: 24px; line-height: 1; color: #6b7d90; cursor: pointer; padding: 0 4px; }
.sib-body { padding: 12px 18px; font-size: 13.5px; }
.sib-note { margin: 0; padding: 10px 18px 14px; font-size: 12px; color: #6b7d90; border-top: 1px solid #eef2f6; }
.sib-empty { margin: 8px 0; color: #6b7d90; }
.sib-fam {
    display: flex; flex-wrap: wrap; gap: 6px 18px; margin-bottom: 10px; padding: 8px 12px;
    background: #f6f9fc; border: 1px solid #e1eaf2; border-radius: 10px; font-size: 13px;
}
.sib-fam small { display: block; color: #6b7d90; font-size: 10.5px; text-transform: uppercase; letter-spacing: .4px; }
.sib-card { display: flex; align-items: center; gap: 10px; padding: 8px 2px; border-bottom: 1px solid #eef2f6; }
.sib-card:last-child { border-bottom: 0; }
.sib-card img, .sib-card .noimg {
    flex: 0 0 44px; width: 44px; height: 44px; border-radius: 50%; object-fit: cover; border: 1px solid #d5dee7;
    background: #edf2f7; display: flex; align-items: center; justify-content: center; font-size: 10px; color: #8a9aab;
}
.sib-card .who { flex: 1; min-width: 0; }
.sib-card .who a { color: #10253a; text-decoration: none; }
.sib-card .who a:hover { color: #145da0; }
.sib-card .who small { display: block; color: #6b7d90; font-size: 12px; }
.sib-uid { font-size: 11.5px; color: #5b6f82; background: #eef3f8; border-radius: 4px; padding: 0 5px; }

/* a student's documents as tiles (profile page and the list's 📎 pop-up) */
.doc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 12px; }
.doc-tile {
    display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 8px;
    border: 1px solid #dfe8f0; border-radius: 12px; background: #fff; color: #10253a; text-decoration: none;
    transition: border-color .15s, box-shadow .15s;
}
a.doc-tile:hover, a.doc-tile:focus-visible { border-color: #8db3d6; box-shadow: 0 4px 14px rgba(15, 37, 58, .1); }
.doc-thumb {
    width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; background: #f3f6f9;
    display: flex; align-items: center; justify-content: center; color: #8a9aab; font-weight: 700;
}
.doc-pdf { color: #b42318; background: #fdf0ef; letter-spacing: .5px; }
.doc-label { font-size: 13px; font-weight: 650; text-align: center; }
.doc-tile small { color: #6b7d90; font-size: 11.5px; margin-top: -4px; }
.doc-missing { border-style: dashed; background: #fafcfe; color: #6b7d90; }
.doc-missing small { color: #b26a00; }
.doc-note { margin: 12px 0 0; font-size: 12.5px; color: #6b7d90; }
.academic-page .student-pagination {
    margin: 14px 0 0;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
}
.academic-page .student-pagination a,
.academic-page .student-pagination span {
    min-height: 32px;
    padding: 6px 10px;
    border: 1px solid #c9d6e2;
    border-radius: 6px;
    color: #1f5b8a;
    background: #fff;
    font-size: 12px;
    text-decoration: none;
}
.academic-page .student-pagination a[aria-current="page"] {
    border-color: #003366;
    color: #fff;
    background: #003366;
}
.academic-page .student-pagination span {
    border-color: transparent;
    color: #6c7a8a;
    background: transparent;
}
@media (max-width: 1080px) {
    .academic-page .student-filter {
        grid-template-columns: repeat(3, minmax(130px, 1fr));
    }
    .academic-page .student-filter-actions { grid-column: 1 / -1; }
}
@media (max-width: 768px) {
    .academic-page .student-filter {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .academic-page .student-filter .student-search,
    .academic-page .student-filter-actions { grid-column: 1 / -1; }
    .academic-page .student-list-toolbar { align-items: stretch; flex-wrap: wrap; }
    .academic-page .student-list-toolbar p { width: 100%; }
}

.academic-page .student-row-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.academic-page .student-row-actions a {
    display: inline-flex;
    min-height: 30px;
    align-items: center;
    padding: 5px 9px;
    border: 1px solid #cbd8e4;
    border-radius: 6px;
    color: #1f5b8a;
    background: #fff;
    font-size: 12px;
    font-weight: 650;
    text-decoration: none;
}
.academic-page .student-row-actions a:hover { background: #edf5fc; }
/* All Students heading: Delete Student is a danger, so deep red */
.academic-page .student-row-actions a.danger-link { color: #fff; border-color: #8b0000; background: #a50e0e; }
.academic-page .student-row-actions a.danger-link:hover { border-color: #6e0000; background: #8b0000; }
/* All Students: the Certificate menu in Actions (placed by student-filters.js) */
.academic-page .cert-drop-btn {
    display: inline-flex; min-height: 30px; align-items: center; gap: 4px; padding: 5px 9px;
    border: 1px solid #e7c98f; border-radius: 6px; color: #8a5300; background: #fff8eb;
    font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; white-space: nowrap;
}
/* In the table the word sits on two lines ("Certi- / ficate"): a taller, narrower button keeps
   View, Edit and Certificate on one row instead of dropping Certificate below them */
.academic-page .student-table .student-row-actions { flex-wrap: nowrap; align-items: center; }
.academic-page .student-table .cert-drop-btn {
    min-height: 38px; padding: 4px 7px; font-size: 12px; line-height: 1.15; white-space: normal; text-align: center;
}
.academic-page .cert-drop-btn:hover, .academic-page .cert-drop-btn[aria-expanded="true"] { background: #ffefd2; }
.academic-page .cert-menu {
    position: fixed; z-index: 80; display: flex; flex-direction: column; gap: 2px; min-width: 210px; padding: 6px;
    border: 1px solid #d5e0ea; border-radius: 10px; background: #fff; box-shadow: 0 10px 28px rgba(18, 54, 90, .18);
}
.academic-page .cert-menu[hidden] { display: none; }
.academic-page .student-row-actions .cert-menu a {
    display: block; min-height: 0; padding: 9px 12px; border: 0; border-radius: 7px;
    color: #1f3550; font-size: 13.5px; font-weight: 600; white-space: nowrap;
}
.academic-page .student-row-actions .cert-menu a:hover { background: #edf5fc; }
.academic-page .student-row-actions .cert-menu a.cert-tc { color: #a12c2c; }
.academic-page .student-row-actions .cert-menu a.cert-tc:hover { background: #fdecec; }
.academic-page .student-profile-summary {
    margin: 0 0 18px;
    padding: 19px 23px;
    border: 1px solid #d9e7f2;
    border-left: 5px solid #1f5b8a;
    border-radius: 12px;
    background: #fff;
}
.academic-page .student-profile-summary > div {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}
.academic-page .student-profile-name { color: #173c5d; font-size: 20px; font-weight: 750; }
.academic-page .student-profile-summary p { margin: 8px 0 0; color: #60778a; }
.academic-page .student-profile-section h2 { margin-bottom: 16px; }
.academic-page .student-detail-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 13px 19px;
    margin: 0;
}
.academic-page .student-detail-grid > div { min-width: 0; }
.academic-page .student-detail-grid dt {
    margin-bottom: 4px;
    color: #748697;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .35px;
    text-transform: uppercase;
}
.academic-page .student-detail-grid dd {
    margin: 0;
    color: #27465f;
    font-size: 14px;
    overflow-wrap: anywhere;
}
.academic-page .student-detail-grid .student-detail-wide { grid-column: 1 / -1; }
.academic-page .student-edit-page { max-width: 1180px; }
.academic-page .student-shared-guardian-note { font-size: 13px; }
.academic-page .student-edit-section { padding: 20px 23px 7px; }
.academic-page .student-edit-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0 16px;
}
.academic-page .student-edit-grid > label { min-width: 0; margin-bottom: 14px; }
.academic-page .student-edit-grid > label > span {
    display: block;
    margin-bottom: 6px;
    color: #34526a;
    font-size: 12px;
    font-weight: 650;
}
.academic-page .student-edit-grid input,
.academic-page .student-edit-grid select,
.academic-page .student-edit-grid textarea {
    width: 100%;
    min-height: 39px;
    padding: 8px 10px;
    border: 1px solid #d5e0e9;
    border-radius: 7px;
    color: #18344f;
    background: #fff;
    font: inherit;
    font-size: 13px;
}
.academic-page .student-edit-grid textarea { min-height: 78px; resize: vertical; }
.academic-page .student-edit-grid input:focus,
.academic-page .student-edit-grid select:focus,
.academic-page .student-edit-grid textarea:focus {
    outline: 3px solid rgba(31, 91, 138, .12);
    border-color: #1f5b8a;
}
.academic-page .student-edit-grid input:disabled { color: #738596; background: #f2f5f8; }
.academic-page .student-edit-wide { grid-column: 1 / -1; }
.academic-page .student-edit-filter-message { grid-column: 1 / -1; min-height: 0; margin: 0 0 12px; }
.academic-page .student-profile-section .table-scroll { margin-top: 14px; }
@media (max-width: 900px) {
    .academic-page .student-detail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .academic-page .student-edit-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
    .academic-page .student-detail-grid,
    .academic-page .student-edit-grid { grid-template-columns: minmax(0, 1fr); }
    .academic-page .student-detail-grid .student-detail-wide,
    .academic-page .student-edit-wide { grid-column: auto; }
    .academic-page .student-edit-section { padding: 17px 15px 4px; }
}
.academic-page .student-print-header { display: none; }
.academic-page .student-print-footer { display: none; }
/* Every printout: A4 with a margin the printer can actually reach. A page with a
   layout of its own (tabulation sheets, report cards) sets its own @page after this. */
@page {
    size: A4;
    margin: 10mm;
}
/* The student profile is a single designed sheet, edge to edge. Its sizing used to be
   written for html and body in general, which cut every other printout off after the
   first page; it now applies only where the profile is. */
@page student-profile {
    size: A4 portrait;
    margin: 0;
}
@media print {
    html.one-page-print, html.one-page-print body {
        width: 210mm !important;
        height: 297mm !important;
        min-width: 0 !important;
        min-height: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: hidden !important;
        background: #fff !important;
    }
    body.academic-page > .schooltest-nav,
    .student-profile-page > .page-heading,
    .student-profile-page > .alert,
    .student-profile-page .student-print-skip {  /* the documents and the photo stay on screen */
        display: none !important;
    }
    /* the sheet sits 6mm in from the paper's edge (where a printer can still print), in a
       navy double-line frame with a thin inner rule, like a certificate */
    .academic-page .student-profile-page {
        page: student-profile;
        display: flex !important;
        flex-direction: column !important;
        box-sizing: border-box !important;
        width: 198mm !important;
        height: 285mm !important;
        max-width: none !important;
        margin: 6mm !important;
        padding: 6mm 7mm 5mm !important;
        border: 3pt double #1f5b8a !important;
        border-radius: 2mm !important;
        outline: .6pt solid #9db8d0 !important;
        outline-offset: -2.2mm;
        overflow: hidden !important;
        background: #fff !important;
        box-shadow: none !important;
        color: #18344f !important;
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
    }
    .academic-page .student-print-header {
        display: flex !important;
        flex: 0 0 auto;
        align-items: center;
        justify-content: space-between;
        position: relative;
        min-height: 25mm;
        margin: 0 0 2.5mm;
        padding: 1mm 1mm 2mm;
        border-bottom: 2pt double #1f5b8a;
        text-align: center;
    }
    .academic-page .student-print-logo {
        flex: 0 0 19mm;
        width: 19mm;
        height: 19mm;
        object-fit: contain;
    }
    .academic-page .student-print-school {
        flex: 1 1 auto;
        min-width: 0;
        padding: 0 2mm;
        text-align: center;
    }
    .academic-page .student-print-school h1 {
        margin: 0 0 .8mm;
        color: #073866;
        font-size: 17pt;
        font-weight: 800;
        line-height: 1.1;
        text-transform: uppercase;
    }
    .academic-page .student-print-school p {
        margin: 0;
        color: #40596f;
        font-size: 7pt;
        line-height: 1.25;
    }
    .academic-page .student-print-school .student-print-address {
        margin-bottom: .7mm;
        font-size: 7.5pt;
        font-weight: 600;
        white-space: pre-line;
    }
    .academic-page .student-print-school .student-print-contact {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 0 1.5mm;
    }
    .academic-page .student-print-contact span:not(:last-child)::after {
        content: "|";
        margin-left: 1.5mm;
        color: #9aa8b5;
    }
    .academic-page .student-print-document-title {
        flex: 0 0 25mm;
        display: flex;
        flex-direction: column;
        align-items: flex-end;
        gap: 1mm;
        color: #284b68;
        font-size: 6.5pt;
        text-align: right;
    }
    .academic-page .student-print-document-title span {
        padding: 1mm 1.5mm;
        border: .7pt solid #1f5b8a;
        border-radius: 1mm;
        color: #124d7c;
        font-size: 7pt;
        font-weight: 800;
        letter-spacing: .5pt;
    }
    .academic-page .student-print-document-title strong { font-size: 6.5pt; }
    .academic-page .student-print-footer { align-items: flex-end; }
    .academic-page .student-print-authority { position: relative; }
    .academic-page .student-print-authority .student-print-signature {
        position: absolute;
        left: 50%;
        bottom: 8mm;
        max-width: 25mm;
        max-height: 8mm;
        object-fit: contain;
        transform: translateX(-50%);
    }
    .academic-page .student-print-authority small {
        display: block;
        margin-top: .5mm;
        color: #667d90;
        font-size: 6pt;
    }
    .academic-page .student-print-body {
        --student-print-font: 8pt;
        display: block !important;
        flex: 1 1 auto;
        min-height: 0;
        overflow: hidden !important;
        font-size: var(--student-print-font);
        line-height: 1.15;
        transform-origin: top left;
    }
    .academic-page .student-profile-summary,
    .academic-page .student-profile-section {
        break-inside: avoid !important;
        page-break-inside: avoid !important;
        margin: 0 0 2mm !important;
        padding: 1.8mm 2.6mm !important;
        border: 0.5pt solid #d8e2ec !important;
        border-radius: 1.2mm !important;
        background: #fff !important;
        box-shadow: none !important;
    }
    .academic-page .student-profile-summary {
        border-left: 2.5pt solid #1f5b8a !important;
        background: #f3f7fb !important;
    }
    .academic-page .student-profile-name { color: #173c5d !important; font-size: 1.35em !important; }
    .academic-page .student-profile-summary p { margin: .6mm 0 0 !important; color: #455e74 !important; font-size: .9em !important; }
    .academic-page .student-profile-section h2 {
        margin: 0 0 1.4mm !important;
        padding: .8mm 1.4mm !important;
        border-radius: .7mm;
        background: #eaf2fb !important;
        color: #124d7c !important;
        font-size: .95em !important;
        letter-spacing: .15pt;
        text-transform: uppercase;
    }
    /* two columns of "label  value" lines, a dotted rule under each: one line per item
       instead of two, so the type can be large and still fill a single page */
    .academic-page .student-detail-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 0 5mm !important;
    }
    .academic-page .student-detail-grid > div {
        display: grid !important;
        grid-template-columns: 42% minmax(0, 1fr);
        align-items: baseline;
        gap: 2mm;
        padding: .7mm 0 !important;
        border-bottom: .4pt dotted #c4d1dd;
    }
    .academic-page .student-detail-grid dt {
        margin: 0 !important;
        color: #5f7689 !important;
        font-size: .8em !important;
        letter-spacing: 0;
    }
    .academic-page .student-detail-grid dd { margin: 0 !important; color: #183a56 !important; font-size: 1em !important; font-weight: 600; line-height: 1.2 !important; }
    .academic-page .student-detail-grid .student-detail-wide {
        grid-column: 1 / -1 !important;
        grid-template-columns: calc(21% - 1.05mm) minmax(0, 1fr);  /* values line up with the left column's */
    }
    .academic-page .student-profile-section > p { margin: 0 !important; font-size: .9em !important; }
    .academic-page .student-profile-section .table-scroll { margin: 0 !important; overflow: visible !important; }
    .academic-page .student-profile-section .session-table {
        width: 100% !important;
        min-width: 0 !important;
        border-collapse: collapse !important;
        font-size: .88em !important;
    }
    .academic-page .student-profile-section .session-table th,
    .academic-page .student-profile-section .session-table td {
        padding: .8mm 1.4mm !important;
        border: .4pt solid #d6e0e9 !important;
        line-height: 1.15 !important;
    }
    .academic-page .student-profile-section .session-table th { background: #edf3f8 !important; color: #284b68 !important; }
    .academic-page .student-profile-section .small-action { display: none !important; }
    .academic-page .student-print-footer {
        display: flex !important;
        flex: 0 0 auto;
        justify-content: space-between;
        gap: 12mm;
        margin-top: 1mm;
        padding-top: 1mm;
    }
    .academic-page .student-print-footer > div {
        flex: 1;
        padding-top: 6mm;
        border-bottom: .5pt solid transparent;
        text-align: center;
    }
    .academic-page .student-print-footer span {
        display: block;
        padding-top: 1mm;
        border-top: .6pt solid #526b80;
        color: #455e74;
        font-size: 7pt;
    }
}

.student-bulk-page { max-width: 1600px !important; }
.student-bulk-page .sessions-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
.bulk-filter {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 12px;
    margin: 0 0 18px;
    padding: 16px;
    border: 1px solid #e1e9f1;
    border-radius: 10px;
    background: #f8fafc;
}
.bulk-filter label { display: grid; gap: 6px; min-width: 150px; }
.bulk-filter label > span { color: #34526a; font-size: 12px; font-weight: 700; }
.bulk-filter input, .bulk-filter select {
    min-height: 40px;
    padding: 8px 10px;
    border: 1px solid #cbd8e4;
    border-radius: 7px;
    color: #18344f;
    background: #fff;
    font: inherit;
}
.bulk-filter .bulk-search { flex: 1 1 200px; }
.bulk-filter-error { margin-top: -8px; }
.bulk-empty { margin: 20px 0; padding: 35px 20px; }
.bulk-empty h2 { margin: 0 0 8px; color: #173c5d; font-size: 19px; }
.bulk-empty p { margin: 0; color: #6e8192; }
.bulk-shared-note { margin-bottom: 14px; font-size: 12px; }
.bulk-picker {
    display: grid;
    gap: 10px;
    margin: 0 0 14px;
    padding: 12px 14px;
    border: 1px solid #e1e9f1;
    border-radius: 9px;
    background: #f9fbfd;
}
.bulk-picker-title { color: #234968; font-size: 13px; }
.bulk-picker-group { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.bulk-picker-group > b { min-width: 74px; color: #597185; font-size: 11px; }
.bulk-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-height: 27px;
    padding: 4px 8px;
    border: 1px solid #dce5ed;
    border-radius: 20px;
    background: #fff;
    color: #37546c;
    font-size: 11px;
    cursor: pointer;
}
.bulk-chip input { margin: 0; accent-color: #0d568d; }
.bulk-clear { justify-self: start; min-height: 32px; padding: 5px 10px; font-size: 11px; }
.bulk-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 9px;
    margin: 0 0 10px;
}
.bulk-hint { margin: 0; color: #6a7e8f; font-size: 11px; }
.bulk-hint strong { color: #37546c; }
.bulk-spacer { flex: 1; }
.bulk-dirty-count { color: #9a5b13; font-size: 12px; font-weight: 700; }
.bulk-toolbar .primary-link, .bulk-toolbar .secondary-link { min-height: 35px; padding: 7px 12px; font-size: 12px; }
.bulk-toolbar button:disabled { opacity: .5; cursor: not-allowed; }
.bulk-grid-scroll {
    max-height: min(68vh, 760px);
    overflow: auto;
    border: 1px solid #dce5ed;
    border-radius: 8px;
}
.bulk-grid { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 12px; }
.bulk-grid th, .bulk-grid td {
    min-width: 150px;
    padding: 0;
    border-right: 1px solid #e2e9ef;
    border-bottom: 1px solid #e2e9ef;
    background: #fff;
}
.bulk-grid th {
    position: sticky;
    z-index: 2;
    top: 0;
    padding: 9px 10px;
    color: #31516d;
    background: #edf3f8;
    text-align: left;
    white-space: nowrap;
}
.bulk-grid th:first-child, .bulk-grid td:first-child { min-width: 44px; width: 44px; }
.bulk-grid th[data-field="roll_no"], .bulk-grid td[data-field="roll_no"] { min-width: 72px; width: 72px; }
.bulk-grid th[data-field="student_name"], .bulk-grid td[data-field="student_name"] { min-width: 190px; }
.bulk-grid td.bulk-row-number { padding: 8px; color: #748697; background: #f7f9fb; text-align: center; }
.bulk-cell-input {
    display: block;
    width: 100%;
    min-height: 36px;
    padding: 7px 9px;
    border: 0;
    border-radius: 0;
    outline: none;
    color: #18344f;
    background: transparent;
    font: inherit;
}
.bulk-cell-input:focus { box-shadow: inset 0 0 0 2px #2474aa; background: #f5fbff; }
.bulk-grid td.is-dirty { background: #fff8e7; }
.bulk-grid td.is-dirty .bulk-cell-input { background: transparent; }
.bulk-grid td.has-error { background: #fff0f1; box-shadow: inset 0 0 0 1px #c53543; }
.bulk-grid td[data-field="photo"],
.bulk-grid td[data-field="signature"],
.bulk-grid td[data-field="birth_certificate"],
.bulk-grid td[data-field="student_aadhaar_image"] { min-width: 210px; }
.bulk-grid .fcell { display: flex; align-items: center; gap: 6px; min-width: 190px; padding: 4px 6px; }
.bulk-grid .fcell img { display: block; width: 34px; height: 42px; object-fit: cover; border: 1px solid #c9d6e2; border-radius: 4px; background: #f1f5f9; }
.bulk-grid .fcell .none { width: 34px; height: 42px; border: 1px dashed #c9d6e2; border-radius: 4px; display: flex; align-items: center; justify-content: center; color: #b0bec9; font-size: 10px; }
.bulk-grid .fcell button,
.bulk-grid .fcell .file-open-link { border: 1px solid #c9d6e2; background: #fff; border-radius: 6px; padding: 5px 8px; cursor: pointer; color: #1f4e79; font: inherit; font-size: 11px; text-decoration: none; }
.bulk-grid .fcell button:hover,
.bulk-grid .fcell .file-open-link:hover { background: #eaf2fb; }
.bulk-grid .fcell .busy { color: #6b7d90; font-size: 10px; }
.bulk-toast { margin-top: 10px; color: #285775; font-size: 12px; }
@media (max-width: 760px) {
    .student-bulk-page .sessions-heading { align-items: flex-start; flex-direction: column; }
    .bulk-filter label { flex: 1 1 145px; }
    .bulk-filter > button { width: 100%; }
    .bulk-hint { flex-basis: 100%; line-height: 1.6; }
    .bulk-spacer { display: none; }
}

.student-export-page { max-width: 1320px; }
.student-export-page #studentExportForm { display: grid; gap: 16px; }
.student-export-page .form-panel { margin: 0; }
.export-section-heading,
.export-column-toolbar,
.export-download-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
.export-section-heading { margin-bottom: 18px; }
.export-section-heading .eyebrow { display: block; margin-bottom: 4px; }
.export-section-heading h2 { margin: 0; }
.export-live-count,
.export-selected-count,
.export-preview-status {
    color: #536b80;
    font-size: 13px;
    font-weight: 650;
}
.export-live-count {
    padding: 9px 13px;
    border: 1px solid #c8e0f0;
    border-radius: 99px;
    color: #0d568d;
    background: #eef7fd;
    white-space: nowrap;
}
/* the six filters on one row: the short pickers narrow, the search box takes the rest */
.export-filter-grid {
    display: grid;
    grid-template-columns: minmax(120px, 1fr) minmax(80px, .7fr) minmax(90px, .8fr)
                           minmax(110px, 1fr) minmax(80px, .7fr) minmax(180px, 2.2fr);
    gap: 10px;
}
.export-filter-grid label,
.export-preset-control {
    display: grid;
    gap: 6px;
    color: #344e64;
    font-size: 12px;
    font-weight: 650;
}
.export-filter-grid input,
.export-filter-grid select,
.export-preset-control select {
    width: 100%;
    min-width: 0;
    min-height: 36px;
    padding: 6px 9px;
    border: 1px solid #d5e0e9;
    border-radius: 7px;
    color: #18344f;
    background: #fff;
    font: inherit;
    font-size: 13px;
}
.export-filter-grid input:focus,
.export-filter-grid select:focus,
.export-preset-control select:focus {
    outline: 3px solid rgba(31, 91, 138, .12);
    border-color: #1f5b8a;
}
.export-filter-grid select:disabled { color: #8091a0; background: #f3f6f8; }
.export-filter-note {
    margin: 14px 0 0;
    color: #697d8e;
    font-size: 12px;
    line-height: 1.55;
}
.export-column-toolbar {
    justify-content: flex-start;
    flex-wrap: wrap;
    padding: 13px;
    border: 1px solid #e4edf6;
    border-radius: 8px;
    background: #f7fafd;
}
.export-preset-control { min-width: min(280px, 100%); }
.export-column-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-left: auto; }
.export-column-actions .secondary-link { min-height: 38px; padding: 8px 12px; font-size: 12px; }
/* the column groups as compact lines in one box: the group's name on the left, its tick
   boxes running on beside it, each only as wide as its own label */
.export-groups {
    display: grid;
    margin-top: 12px;
    border: 1px solid #e1e9f0;
    border-radius: 8px;
}
.export-group {
    min-width: 0;
    margin: 0;
    padding: 7px 12px;
    border: 0;
    border-top: 1px solid #edf2f6;
}
.export-group:first-child { border-top: 0; }
.export-group legend {
    float: left;  /* a floated legend sits in the line like any element */
    width: 84px;
    padding: 0;
    color: #194b73;
    font-size: 12px;
    font-weight: 750;
    line-height: 1.6;
}
.export-field-grid { display: flex; flex-wrap: wrap; gap: 4px 18px; overflow: hidden; }
@media (max-width: 480px) {
    .export-group legend { float: none; width: auto; margin-bottom: 4px; }
}
.export-field {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    color: #344e64;
    font-size: 12px;
    line-height: 1.6;
    white-space: nowrap;
}
.export-field input { flex: 0 0 auto; margin: 2px 0 0; accent-color: #0d568d; }
.export-preview-table { margin: 0; padding: 0; border: 1px solid #e1e9f0; box-shadow: none; }
.export-preview-table .table-scroll { max-height: 430px; }
.export-preview-table .session-table { min-width: 720px; }
.export-preview-table .session-table th { position: sticky; top: 0; z-index: 1; }
.export-preview-table .session-table td { max-width: 280px; overflow-wrap: anywhere; }
.export-empty-cell { padding: 28px !important; color: #697d8e; text-align: center; }
.export-error {
    margin: 0 0 12px;
    padding: 11px 13px;
    border: 1px solid #f0c9cd;
    border-radius: 7px;
    color: #862e37;
    background: #fff0f1;
    font-size: 13px;
}
.export-download-bar {
    margin-top: 14px;
    padding-top: 15px;
    border-top: 1px solid #e6edf4;
}
.export-download-bar p { margin: 0; color: #697d8e; font-size: 12px; line-height: 1.5; }
.export-download-bar button:disabled { cursor: not-allowed; opacity: .55; }
@media (max-width: 1100px) {
    .export-filter-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
    .export-filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .export-groups { grid-template-columns: 1fr; }
    .export-section-heading { align-items: flex-start; flex-direction: column; }
    .export-download-bar { align-items: stretch; flex-direction: column; }
    .export-download-bar button { width: 100%; }
}
@media (max-width: 480px) {
    .export-filter-grid,
    .export-field-grid { grid-template-columns: 1fr; }
    .export-column-toolbar { align-items: stretch; flex-direction: column; }
    .export-column-actions { margin-left: 0; }
    .export-column-actions button { flex: 1; }
}


/* A small caption that groups the links of a nav panel (Setup / Marks / Result / HPRC). */
.schooltest-nav-panel .nav-group-label {
    align-self: center; font-size: 10.5px; font-weight: 800; letter-spacing: .8px;
    text-transform: uppercase; color: #8aa0b4; padding: 0 2px 0 10px; border-left: 2px solid #dbe4ec;
}
.schooltest-nav-panel .nav-group-label:first-child { border-left: 0; padding-left: 0; }


/* Exams: area -> group -> pages, one row each */
.academic-page .schooltest-nav-panel.nav-levels { flex-direction: column; align-items: stretch; flex-wrap: nowrap; gap: 0; padding: 0; }
.nav-levels .nav-row { display: flex; flex-wrap: wrap; align-items: center; gap: 3px; padding: 5px 10px; }
.nav-levels .nav-row + .nav-row { border-top: 1px solid #e2e8f0; }
.nav-levels .nav-area a { font-weight: 700; }
.nav-levels .nav-group { background: #eaf0f6; }
.nav-levels .nav-group a { font-weight: 600; }
.nav-levels .nav-pages { background: #fff; }
.nav-levels .nav-pages a { font-size: 12.5px; }

/* On a wide screen the area and its drop-downs share one row, so Exams is one bar below the
   main bar, not two: a three-way area switch, a divider, then the group drop-downs.
   (The phone drawer keeps its own layout in admin-mobile.css.) */
@media screen and (min-width: 901px) {
    .academic-page .schooltest-nav-panel.nav-levels { flex-direction: row; align-items: center; flex-wrap: wrap; padding: 5px 12px; row-gap: 5px; }
    .nav-levels .nav-row { padding: 0; }
    .nav-levels .nav-row + .nav-row { margin-left: 10px; padding-left: 10px; border-top: 0; border-left: 1px solid #d5e0ea; }
    .nav-levels .nav-group { background: none; }
    .nav-levels .nav-area { gap: 2px; padding: 3px; border: 1px solid #d5e0ea; border-radius: 9px; background: #fff; }
    .academic-page .nav-levels .nav-area a { padding: 5px 11px; font-size: 12.5px; }
}

/* Board exams, each in its own colour: Class X Madhyamik orange, Class XII Council purple */
.academic-page .schooltest-nav-panel a.nav-board { border: 1px solid; font-weight: 700; }
.academic-page .schooltest-nav-panel a.nav-board-x { color: #9a3412; background: #fff1e6; border-color: #fdba74; }
.academic-page .schooltest-nav-panel a.nav-board-xii { color: #6b21a8; background: #f5ecff; border-color: #d8b4fe; }
.academic-page .schooltest-nav-panel a.nav-board-x:hover { background: #ffe2c7; }
.academic-page .schooltest-nav-panel a.nav-board-xii:hover { background: #ecdcff; }
.academic-page .schooltest-nav-panel a.nav-board-x.current {
    color: #fff; border-color: #c2410c; background: linear-gradient(135deg, #c2410c, #ea580c);
    box-shadow: 0 2px 8px rgba(194, 65, 12, .3);
}
.academic-page .schooltest-nav-panel a.nav-board-xii.current {
    color: #fff; border-color: #7e22ce; background: linear-gradient(135deg, #7e22ce, #9333ea);
    box-shadow: 0 2px 8px rgba(126, 34, 206, .3);
}


/* Exams: the pages of a group open from a drop-down */
.nav-levels .nav-pages { display: none; }
.nav-drop { position: relative; }
.nav-drop-btn {
    padding: 6px 11px; border: 0; border-radius: 6px; background: transparent; color: #1a2d4a;
    font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap;
}
.nav-drop-btn .caret { font-size: 10px; opacity: .6; margin-left: 2px; }
.nav-drop:hover > .nav-drop-btn, .nav-drop.open > .nav-drop-btn, .nav-drop.current > .nav-drop-btn { color: #0056b3; background: #dbeafe; }
.nav-menu {
    display: none; position: absolute; top: 100%; left: 0; z-index: 60; min-width: 200px; padding: 6px;
    flex-direction: column; gap: 2px; border: 1px solid #d5e0ea; border-radius: 10px; background: #fff;
    box-shadow: 0 10px 28px rgba(18, 54, 90, .18);
}
.nav-drop.open > .nav-menu { display: flex; }
@media (hover: hover) { .nav-drop:hover > .nav-menu { display: flex; } }
.academic-page .nav-menu a { display: block; padding: 8px 12px; font-size: 13px; }

/* ── XI–XII Subjects: compact pickers, registration column, view/update toggle ── */

.academic-page .combination-table select.hs-edit {
    min-width: 74px; max-width: 92px; padding: 5px 6px; font-size: 12.5px;
}
.academic-page .hs-view {
    font-weight: 700; letter-spacing: .3px; color: #173c5d;
}
.academic-page tr.hs-row[data-editing="0"] .hs-edit { display: none; }
.academic-page tr.hs-row[data-editing="1"] .hs-view,
.academic-page tr.hs-row[data-editing="1"] .hs-update-btn { display: none; }
.academic-page .hs-update-btn { min-height: 0; padding: 5px 11px; font-size: 12px; }
/* the row being edited saves on its own: Save (green) and Cancel */
.academic-page .hs-actions { white-space: nowrap; }
.academic-page .hs-save-btn, .academic-page .hs-cancel-btn {
    min-height: 0; padding: 5px 11px; border-radius: 6px; font: inherit; font-size: 12px; font-weight: 700; cursor: pointer;
}
.academic-page .hs-save-btn { border: 1px solid #1d7a46; color: #fff; background: #1d7a46; }
.academic-page .hs-save-btn:hover { background: #166238; }
.academic-page .hs-cancel-btn { margin-left: 4px; border: 1px solid #cbd8e4; color: #335270; background: #fff; }
.academic-page .hs-cancel-btn:hover { background: #edf5fc; }
.academic-page .hs-new-label + .hs-save-btn { margin-left: 6px; }
.academic-page tr.hs-row[data-editing="0"] .hs-save-btn,
.academic-page tr.hs-row[data-editing="0"] .hs-cancel-btn { display: none; }
.academic-page tr.hs-row.hs-just-saved td { background: #eefaf2; }
.academic-page .hs-new-label { color: #8a9aab; font-size: 12px; font-style: italic; }
.academic-page .hs-reg-missing { color: #8a9aab; }
/* XI–XII heading: title on the left, Export-to-Excel control pinned to the right. */
.academic-page .page-heading.hs-heading {
    display: flex; align-items: flex-start; justify-content: space-between; gap: 16px;
}
.academic-page .hs-heading .hs-heading-text { min-width: 0; }
.academic-page .hs-heading .hs-heading-text > p:last-child { margin-bottom: 0; }

/* Export control is a small dropdown anchored to its button, so it takes no vertical room. */
.academic-page details.hs-export-menu { position: relative; flex: none; }
.academic-page details.hs-export-menu > summary {
    list-style: none; cursor: pointer; white-space: nowrap;
}
.academic-page details.hs-export-menu > summary::-webkit-details-marker { display: none; }
.academic-page details.hs-export-menu .hs-export-pop {
    position: absolute; right: 0; top: calc(100% + 8px); z-index: 20; width: 320px; max-width: 86vw;
    background: #fff; border: 1px solid #d9e4ef; border-radius: 10px; padding: 16px 18px;
    box-shadow: 0 12px 30px rgba(9, 57, 96, .18);
}
/* XI-XII Subjects: the whole selection's size, above the (possibly paged) table */
.academic-page .hs-total { margin: 4px 0 14px; padding: 9px 14px; border: 1px solid #c8e0f0; border-radius: 9px;
    background: #eef7fd; color: #0d568d; font-size: 14px; }
.academic-page .hs-total span { color: #536b80; }
.academic-page .hs-export-fields { display: flex; flex-direction: column; gap: 9px; margin: 10px 0 14px; }
.academic-page .hs-export-fields label {
    display: flex; align-items: center; gap: 7px; font-size: 13.5px; color: #31516d; font-weight: 500;
}
.academic-page .hs-export-fields input[type="checkbox"] { width: 16px; height: 16px; accent-color: #0d568d; margin: 0; }
.academic-page .hs-export-menu .form-actions { margin-top: 0; }

@media (max-width: 640px) {
    .academic-page .page-heading.hs-heading { flex-direction: column; }
    .academic-page details.hs-export-menu { align-self: flex-start; }
    .academic-page details.hs-export-menu .hs-export-pop { right: auto; left: 0; }
}

/* ============================================================================
   Redesigned admin dashboard (scoped to .dashboard-management-page)
   ============================================================================ */
.academic-page .dashboard-management-page { width: min(1680px, calc(100% - 40px)); }

/* Hero / greeting banner */
.academic-page .dash-hero {
    display: flex; justify-content: space-between; align-items: center; gap: 24px;
    margin-bottom: 24px; padding: 28px 32px; border-radius: 16px; color: #fff;
    background: linear-gradient(130deg, #002347 0%, #0f4d82 55%, #1f6fae 100%);
    box-shadow: 0 14px 34px rgba(0, 51, 102, .22); position: relative; overflow: hidden;
}
.academic-page .dash-hero::after {
    content: ""; position: absolute; right: -60px; top: -60px; width: 220px; height: 220px;
    border-radius: 50%; background: rgba(255, 255, 255, .06);
}
.academic-page .dash-hero-text { position: relative; z-index: 1; }
.academic-page .dash-hero .eyebrow { color: #bcd7ef; opacity: 1; text-transform: uppercase; }
.academic-page .dash-hero h1 { margin: 6px 0 6px; font-size: clamp(24px, 3.4vw, 32px); color: #fff; }
.academic-page .dash-hero p:not(.eyebrow) { margin: 0; color: #d4e6f6; font-size: 14.5px; }
.academic-page .dash-session {
    position: relative; z-index: 1; display: grid; grid-template-columns: 10px auto;
    align-items: center; gap: 3px 10px; min-width: 180px; padding: 15px 18px;
    border: 1px solid rgba(255, 255, 255, .22); border-radius: 13px; background: rgba(255, 255, 255, .1);
    font-size: 12px; backdrop-filter: blur(2px);
}
.academic-page .dash-session-dot {
    width: 10px; height: 10px; border-radius: 50%; background: #5fe0a0;
    box-shadow: 0 0 0 4px rgba(95, 224, 160, .25);
}
.academic-page .dash-session-label { color: #cfe3f5; letter-spacing: .3px; }
.academic-page .dash-session strong { grid-column: 2; font-size: 15px; color: #fff; }
.academic-page .dash-side { position: relative; z-index: 1; display: flex; gap: 12px; align-items: stretch; }
.academic-page .dash-backup-form { display: flex; margin: 0; }
.academic-page .dash-backup-form > .dash-backup { flex: 1; }
.academic-page .dash-backup {
    display: grid; cursor: pointer; font: inherit; text-align: left; grid-template-columns: 14px auto; align-items: center; gap: 3px 10px;
    padding: 15px 18px; border: 1px solid rgba(255, 255, 255, .22); border-radius: 13px;
    background: rgba(255, 255, 255, .1); color: #fff; font-size: 12px; text-decoration: none;
    backdrop-filter: blur(2px); transition: background .15s, border-color .15s;
}
.academic-page .dash-backup:hover, .academic-page .dash-backup:focus-visible {
    background: rgba(255, 255, 255, .2); border-color: rgba(255, 255, 255, .45);
}
.academic-page .dash-backup-icon { font-size: 17px; font-weight: 800; line-height: 1; color: #9fd8ff; }
.academic-page .dash-backup strong { grid-column: 2; font-size: 15px; color: #fff; white-space: nowrap; }

/* Actionable stat cards */
.academic-page .dash-stats {
    display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 30px;
}
.academic-page .dash-stat {
    display: flex; align-items: center; gap: 15px; padding: 18px 20px; text-decoration: none;
    background: #fff; border: 1px solid #e4edf6; border-radius: 13px;
    box-shadow: 0 2px 10px rgba(0, 51, 102, .05);
    transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease;
}
.academic-page .dash-stat:hover {
    transform: translateY(-3px); box-shadow: 0 12px 26px rgba(0, 51, 102, .13); border-color: #c7dcef;
}
.academic-page .dash-stat-icon {
    display: inline-flex; align-items: center; justify-content: center; flex: none;
    width: 50px; height: 50px; border-radius: 13px; font-size: 24px;
    background: var(--tint, #eaf2fb);
}
.academic-page .dash-stat-body { display: flex; flex-direction: column; min-width: 0; }
.academic-page .dash-stat-body strong { font-size: 28px; line-height: 1.1; color: #10263d; }
.academic-page .dash-stat-body span { color: #6e8192; font-size: 12.5px; margin-top: 2px; }

.academic-page .dash-stat.accent-blue   { --tint: #e7f0fb; }
.academic-page .dash-stat.accent-green  { --tint: #e4f6ec; }
.academic-page .dash-stat.accent-purple { --tint: #efeafb; }
.academic-page .dash-stat.accent-cyan   { --tint: #e2f4f6; }
.academic-page .dash-stat.accent-orange { --tint: #fdeedd; }
.academic-page .dash-stat.accent-pink   { --tint: #fce8f0; }
.academic-page .dash-stat.accent-gold   { --tint: #f7f0d8; }
.academic-page .dash-stat.accent-red    { --tint: #fce6e8; }

/* Quick-action tiles */
.academic-page .dash-section-title {
    margin: 0 0 15px; font-size: 16px; font-weight: 700; color: #0f3454;
    display: flex; align-items: center; gap: 10px;
}
.academic-page .dash-section-title::after {
    content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, #dbe6f1, transparent);
}
.academic-page .dash-quick {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px;
}
.academic-page .dash-tile {
    display: flex; flex-direction: column; gap: 5px; padding: 20px; text-decoration: none;
    background: #fff; border: 1px solid #e4edf6; border-radius: 13px; color: #16304a;
    box-shadow: 0 2px 8px rgba(0, 51, 102, .045);
    transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease;
}
.academic-page .dash-tile:hover {
    transform: translateY(-3px); box-shadow: 0 12px 24px rgba(0, 51, 102, .12); border-color: #c7dcef;
}
.academic-page .dash-tile-icon {
    display: inline-flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; border-radius: 11px; font-size: 22px; background: #eef4fb; margin-bottom: 4px;
}
.academic-page .dash-tile strong { font-size: 15px; color: #0f3454; }
.academic-page .dash-tile small { color: #6e8192; font-size: 12.5px; line-height: 1.45; }

@media (max-width: 1024px) {
    .academic-page .dash-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 768px) {
    .academic-page .dash-hero { flex-direction: column; align-items: stretch; padding: 22px; }
    .academic-page .dash-session { align-self: stretch; }
    .academic-page .dash-side { align-self: stretch; flex-direction: column; }
    .academic-page .dash-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
    .academic-page .dash-stat { padding: 14px; gap: 12px; }
    .academic-page .dash-stat-icon { width: 44px; height: 44px; font-size: 21px; }
    .academic-page .dash-stat-body strong { font-size: 24px; }
    .academic-page .dash-quick { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
}
@media (max-width: 480px) {
    .academic-page .dash-stats, .academic-page .dash-quick { grid-template-columns: 1fr; }
}

/* ============================================================================
   Contact Messages (admin inbox for the website "Write to us" form)
   ============================================================================ */
/* Navbar "New" badge on the Contact Messages link. */
.schooltest-nav-panel .nav-badge {
    display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px;
    margin-left: 2px; padding: 0 5px; border-radius: 9px; font-size: 11px; font-weight: 800;
    color: #fff; background: #d63445;
}

.academic-page .cm-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; }
.academic-page .cm-tab {
    display: inline-flex; align-items: center; gap: 7px; padding: 8px 15px;
    border: 1px solid #e0e8f1; border-radius: 9px; background: #fff;
    color: #44627f; font-size: 13.5px; font-weight: 600; text-decoration: none;
    transition: background .13s ease, color .13s ease, border-color .13s ease;
}
.academic-page .cm-tab:hover { background: #eef4fb; border-color: #c7dcef; }
.academic-page .cm-tab.on { background: #0f4d82; border-color: #0f4d82; color: #fff; }
.academic-page .cm-tab-count {
    display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 18px;
    padding: 0 6px; border-radius: 9px; font-size: 11px; font-weight: 700;
    background: #eaf1f9; color: #335270;
}
.academic-page .cm-tab.on .cm-tab-count { background: rgba(255,255,255,.22); color: #fff; }

/* Status chips */
.academic-page .cm-status {
    display: inline-block; padding: 3px 11px; border-radius: 20px; font-size: 11.5px; font-weight: 700;
}
.academic-page .cm-status-new { background: #fde7ea; color: #b02a39; }
.academic-page .cm-status-read { background: #e7eef7; color: #3c5a78; }
.academic-page .cm-status-replied { background: #e1f4e9; color: #1f7a48; }

.academic-page .cm-row-new td { background: #fbfdff; }
.academic-page .cm-row-new td strong { color: #0f3454; }

.academic-page .cm-actions { display: flex; align-items: center; gap: 7px; }
.academic-page .cm-actions form { margin: 0; }
.academic-page .small-action { min-height: 30px; padding: 5px 12px; font-size: 12.5px; }
.academic-page .cm-del { color: #b02a39; border-color: #f0ccd1; }
.academic-page .cm-del:hover { background: #fbe9ec; }

/* Opened-message detail panel */
.academic-page .cm-detail {
    margin: 0 0 20px; padding: 20px 24px; border: 1px solid #d7e3ef; border-left: 4px solid #0f4d82;
    border-radius: 11px; background: #fff; box-shadow: 0 4px 16px rgba(0,51,102,.07);
}
.academic-page .cm-detail-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.academic-page .cm-detail-head h2 { margin: 0 0 4px; color: #0f3454; font-size: 18px; }
.academic-page .cm-detail-meta { margin: 0; color: #6c7a8a; font-size: 13px; }
.academic-page .cm-detail-meta a { color: #0f4d82; }
.academic-page .cm-detail-body {
    margin: 14px 0 16px; padding: 14px 16px; border-radius: 9px; background: #f6f9fc;
    color: #2b3f54; font-size: 14px; line-height: 1.6; white-space: pre-wrap; word-break: break-word;
}
.academic-page .cm-detail-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.academic-page .cm-detail-actions form { margin: 0; }

@media (max-width: 640px) {
    .academic-page .cm-detail-head { flex-direction: column; }
    .academic-page .cm-actions { flex-direction: column; align-items: stretch; }
}

/* ============================================================================
   Website Settings page
   ============================================================================ */
.academic-page .ws-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px 18px;
}
.academic-page .settings-page .form-panel h2 {
    margin: 0 0 14px; font-size: 16px; color: #0f3454;
    padding-bottom: 10px; border-bottom: 1px solid #e9eff6;
}
.academic-page .settings-page textarea {
    width: 100%; min-height: 70px; padding: 10px 13px; border: 2px solid #e4edf6;
    border-radius: 8px; color: #343a40; background: #fff; font: inherit; font-size: 14px;
    resize: vertical;
}
.academic-page .settings-page textarea:focus,
.academic-page .settings-page input[type="text"]:focus,
.academic-page .settings-page input[type="email"]:focus {
    outline: none; border-color: #1f5b8a; box-shadow: 0 0 0 3px rgba(31, 91, 138, .1);
}
.academic-page .settings-page input[type="text"],
.academic-page .settings-page input[type="email"] {
    width: 100%; min-height: 40px; padding: 9px 13px; border: 2px solid #e4edf6;
    border-radius: 8px; color: #343a40; background: #fff; font: inherit; font-size: 14px;
}
.academic-page .ws-image-field {
    display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start;
    margin-top: 14px; padding-top: 14px; border-top: 1px dashed #e4edf6;
}
.academic-page .ws-image-field .form-group { flex: 1 1 260px; margin: 0; }
.academic-page .ws-image-current { flex: 0 0 auto; text-align: center; }
.academic-page .ws-image-current img {
    display: block; max-width: 200px; max-height: 120px; object-fit: contain;
    border: 1px solid #e1e8ef; border-radius: 8px; padding: 5px; background: #f8fafc;
}
.academic-page .ws-remove {
    display: inline-flex; align-items: center; gap: 6px; margin-top: 8px;
    color: #b02a39; font-size: 12.5px; font-weight: 600; cursor: pointer;
}
.academic-page .ws-remove input { width: 15px; height: 15px; accent-color: #b02a39; margin: 0; }

/* ── Issue Transfer Certificate (tc_form.html): the student, a warning, the details ── */
.academic-page .tcf-page { max-width: 920px; }
.academic-page .tcf-heading { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 10px; }
.academic-page .tcf-heading .crumb { flex-basis: 100%; }
.academic-page .tcf-heading p { margin: 5px 0 0; color: #6c7a8a; font-size: 13px; }
.academic-page .tcf-back {
    padding: 7px 13px; border: 1px solid #cbd8e4; border-radius: 8px;
    color: #1f5b8a; background: #fff; font-size: 13px; font-weight: 600; text-decoration: none;
}
.academic-page .tcf-back:hover { background: #edf5fc; }

.academic-page .tcf-student {
    display: flex; align-items: center; gap: 18px; margin: 0 0 14px; padding: 18px 20px;
    border: 1px solid #d9e4ef; border-left: 5px solid #003366; border-radius: 12px;
    background: linear-gradient(135deg, #f5f9fd, #fff);
}
.academic-page .tcf-photo {
    flex: none; width: 84px; height: 96px; border: 2px solid #fff; border-radius: 10px;
    object-fit: cover; box-shadow: 0 2px 10px rgba(0, 51, 102, .22);
}
.academic-page .tcf-initial {
    display: flex; align-items: center; justify-content: center;
    color: #fff; background: linear-gradient(135deg, #0f4d82, #1c6fae); font-size: 34px; font-weight: 700;
}
.academic-page .tcf-who { min-width: 0; }
.academic-page .tcf-who h2 { margin: 0; color: #003366; font-size: 21px; line-height: 1.25; }
.academic-page .tcf-who p { margin: 3px 0 8px; color: #55687c; font-size: 13.5px; }
.academic-page .tcf-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.academic-page .tcf-chip {
    padding: 3px 10px; border: 1px solid #dbe5ef; border-radius: 999px;
    color: #1f3550; background: #fff; font-size: 12.5px; font-weight: 600;
}
.academic-page .tcf-chip b { margin-right: 3px; color: #7a8ea2; font-size: 10.5px; letter-spacing: .5px; text-transform: uppercase; }
.academic-page .tcf-chip.tcf-active { color: #1d7a46; border-color: #b9e2c8; background: #eefaf2; }

.academic-page .tcf-warning {
    display: flex; align-items: flex-start; gap: 12px; margin: 0 0 16px; padding: 12px 16px;
    border: 1px solid #f3d08a; border-radius: 10px; background: #fff8e8;
}
.academic-page .tcf-warning-icon {
    flex: none; display: flex; align-items: center; justify-content: center; width: 28px; height: 28px;
    border-radius: 50%; color: #8a5300; background: #ffe7b3; font-size: 15px;
}
.academic-page .tcf-warning p { margin: 3px 0 0; color: #6b4a00; font-size: 13.5px; line-height: 1.5; }

.academic-page .tcf-form {
    padding: 20px 22px; border: 1px solid #d9e4ef; border-radius: 12px; background: #fff;
    box-shadow: 0 2px 10px rgba(18, 54, 90, .05);
}
.academic-page .tcf-section {
    margin: 0 0 14px; padding: 0 0 8px; border-bottom: 1px solid #e8eef5;
    color: #7a8ea2; font-size: 11.5px; font-weight: 800; letter-spacing: .9px; text-transform: uppercase;
}
.academic-page .tcf-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 20px; }
.academic-page .tcf-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.academic-page .tcf-wide { grid-column: 1 / -1; }
.academic-page .tcf-field > label, .academic-page .tcf-label { color: #1f3550; font-size: 13px; font-weight: 700; }
.academic-page .tcf-field .req { color: #c0392b; }
.academic-page .tcf-field input[type="text"], .academic-page .tcf-field input[type="date"], .academic-page .tcf-field textarea {
    width: 100%; box-sizing: border-box; padding: 10px 12px; border: 1px solid #cbd8e4; border-radius: 8px;
    color: #10253a; background: #fbfdff; font: inherit; font-size: 14px;
}
.academic-page .tcf-field textarea { resize: vertical; min-height: 84px; }
.academic-page .tcf-field input:focus, .academic-page .tcf-field textarea:focus {
    outline: none; border-color: #1c6fae; background: #fff; box-shadow: 0 0 0 3px rgba(28, 111, 174, .15);
}
.academic-page .tcf-field small { color: #7a8ea2; font-size: 12px; }
.academic-page .tcf-check {
    display: flex; align-items: center; gap: 12px; min-height: 42px; padding: 8px 12px;
    border: 1px solid #cbd8e4; border-radius: 8px; background: #fbfdff; cursor: pointer;
}
.academic-page .tcf-check:has(input:checked) { border-color: #9fd3b4; background: #eefaf2; }
.academic-page .tcf-check input { flex: none; width: 20px; height: 20px; margin: 0; accent-color: #1d7a46; }
.academic-page .tcf-check span { display: flex; flex-direction: column; }
.academic-page .tcf-check strong { color: #1f3550; font-size: 13.5px; }
.academic-page .tcf-check small { color: #7a8ea2; font-size: 12px; }

.academic-page .tcf-actions {
    display: flex; justify-content: flex-end; align-items: center; gap: 10px;
    margin: 20px -22px -20px; padding: 14px 22px; border-top: 1px solid #e8eef5;
    border-radius: 0 0 12px 12px; background: #f7f9fc;
}
.academic-page .tcf-cancel {
    padding: 10px 18px; border: 1px solid #cbd8e4; border-radius: 8px;
    color: #335270; background: #fff; font-size: 14px; font-weight: 600; text-decoration: none;
}
.academic-page .tcf-cancel:hover { background: #edf5fc; }
.academic-page .tcf-issue {
    padding: 10px 22px; border: 0; border-radius: 8px; color: #fff;
    background: linear-gradient(135deg, #8b0000, #b31b1b); box-shadow: 0 3px 10px rgba(139, 0, 0, .28);
    font: inherit; font-size: 14px; font-weight: 700; cursor: pointer;
}
.academic-page .tcf-issue:hover { background: linear-gradient(135deg, #6e0000, #9a1414); }

@media screen and (max-width: 640px) {
    .academic-page .tcf-student { flex-direction: column; text-align: center; padding: 16px; }
    .academic-page .tcf-chips { justify-content: center; }
    .academic-page .tcf-grid { grid-template-columns: 1fr; }
    .academic-page .tcf-form { padding: 16px; }
    .academic-page .tcf-actions { margin: 18px -16px -16px; padding: 12px 16px; flex-direction: column-reverse; align-items: stretch; }
    .academic-page .tcf-cancel, .academic-page .tcf-issue { min-height: 46px; text-align: center; }
}
