:root {
    /* MIASMS ownership marker: Nelson Chiumia (NC) · MIASMS-NC-2026. */
    --bg: #f5f7f8;
    --panel: #ffffff;
    --ink: #17201c;
    --muted: #66736e;
    --line: #d9e1de;
    --brown: #8d4620;
    --orange: #e68925;
    --teal: #1ba3a4;
    --green: #1ba3a4;
    --green-dark: #8d4620;
    --gold: #e68925;
    --blue: #e8f1f5;
    --shadow: 0 18px 45px rgba(141, 70, 32, .08);
}

.app-ownership-marker {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 24px 0 4px;
    color: var(--muted);
    font-size: 9px;
}
.app-ownership-marker span:first-child { color: var(--brown); font-weight: 900; }
.app-ownership-marker code { padding: 2px 5px; font-size: 8px; }
@media (max-width: 600px) {
    .app-ownership-marker { flex-wrap: wrap; }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    color: var(--ink);
    background: var(--bg);
}
a { color: var(--green); text-decoration: none; font-weight: 700; }
code { background: #eef3f1; padding: 2px 5px; border-radius: 4px; }
.app-shell { display: grid; grid-template-columns: 260px 1fr; min-height: 100vh; }
.sidebar {
    background: #2b1b14;
    color: #fff;
    padding: 24px 18px;
}
.brand { display: flex; gap: 12px; align-items: center; margin-bottom: 32px; }
.brand-logo {
    width: 54px;
    height: 54px;
    object-fit: contain;
    background: #fff;
    border-radius: 50%;
    padding: 3px;
    box-shadow: 0 8px 18px rgba(0,0,0,.18);
}
.brand span { display: block; color: #a9b9b3; font-size: 12px; margin-top: 4px; }
.academic-year-switcher {
    display: grid;
    gap: 7px;
    margin: -12px 0 22px;
    padding: 12px;
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 8px;
    background: rgba(255,255,255,.055);
}
.academic-year-switcher > span {
    color: #d8c5b8;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .06em;
    text-transform: uppercase;
}
.academic-year-switcher > div {
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr) 30px;
    align-items: center;
    gap: 6px;
}
.academic-year-switcher form,
.academic-year-switcher label { min-width: 0; }
.academic-year-switcher select {
    width: 100%;
    min-height: 34px;
    padding: 6px 8px;
    border-color: rgba(255,255,255,.2);
    background: #fff;
    color: #2b1b14;
    font-size: 11px;
    font-weight: 800;
}
.academic-year-switcher a,
.academic-year-switcher .disabled {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255,255,255,.2);
    border-radius: 7px;
    color: #fff;
}
.academic-year-switcher a:hover { border-color: var(--orange); color: #ffb05a; }
.academic-year-switcher .disabled { opacity: .35; }
.academic-year-switcher svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
nav { display: grid; gap: 6px; }
.sidebar nav { gap: 0; }
.nav-group {
    display: grid;
    gap: 2px;
    padding: 10px 0;
    border-top: 1px solid rgba(255,255,255,.1);
}
.nav-group:first-child { padding-top: 0; border-top: 0; }
.nav-group-title {
    display: block;
    padding: 0 10px 5px;
    color: #bfa899;
    font-size: 9px;
    font-weight: 900;
    letter-spacing: .11em;
    line-height: 1.2;
    text-transform: uppercase;
}
.nav-group:has(a.active) .nav-group-title { color: #ffb05a; }
nav a {
    color: #f0d9c5;
    padding: 8px 10px;
    border-radius: 8px;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 12px;
}
nav a.active, nav a:hover { background: rgba(230,137,37,.22); color: #fff; }
.nav-icon {
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #e68925;
    flex: 0 0 22px;
}
.nav-icon svg {
    width: 22px;
    height: 22px;
    display: block;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
}
nav a.active .nav-icon,
nav a:hover .nav-icon {
    color: #ffb05a;
}
.user-box {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid rgba(255,255,255,.16);
    display: grid;
    gap: 5px;
    font-size: 12px;
    color: #f0d9c5;
}
.user-box strong { color: #fff; }
.user-box a { color: #fff; }
.main { padding: 30px; max-width: 1420px; width: 100%; min-width: 0; }
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 22px;
}
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: 30px; line-height: 1.15; margin-bottom: 7px; }
h2 { font-size: 18px; margin-bottom: 12px; }
.page-header p, .muted { color: var(--muted); }
.button {
    border: 1px solid var(--line);
    background: #fff;
    color: var(--ink);
    border-radius: 8px;
    padding: 10px 14px;
    font-weight: 800;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    min-height: 40px;
}
.button-row { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.button.primary { background: var(--brown); color: #fff; border-color: var(--brown); }
.button.small { min-height: 32px; padding: 6px 10px; font-size: 12px; }
.button.danger { color: #842029; border-color: #e8b7b7; background: #fff7f7; }
.button:hover { filter: brightness(.98); }
.button:disabled, input:disabled, select:disabled {
    opacity: .58;
    cursor: not-allowed;
}
.panel {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
    padding: 18px;
    margin-bottom: 18px;
}
.panel-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 8px; }
.grid.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.grid.three { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.grid.two > .panel:only-child { grid-column: 1 / -1; }
.mini-form { display: grid; gap: 12px; align-content: start; }
.login-page {
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(230, 137, 37, .18), transparent 34%),
        linear-gradient(145deg, #f8faf9 0%, #edf2f0 100%);
}
.login-main {
    min-height: 100vh;
    display: grid;
    align-content: center;
    justify-items: center;
    padding: 28px;
}
.login-main > .alert {
    width: min(100%, 470px);
}
.login-card {
    width: min(100%, 470px);
    display: grid;
    gap: 24px;
    padding: 30px;
    border-top: 5px solid var(--brown);
}
.login-brand {
    display: flex;
    align-items: center;
    gap: 18px;
}
.login-brand img {
    width: 82px;
    height: 82px;
    object-fit: contain;
    flex: 0 0 82px;
}
.login-brand span {
    display: block;
    margin-bottom: 5px;
    color: var(--brown);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .04em;
    text-transform: uppercase;
}
.login-brand h1 {
    margin-bottom: 6px;
    font-size: 25px;
}
.login-brand p {
    margin: 0;
    color: var(--muted);
}
.login-form {
    display: grid;
    gap: 16px;
}
.login-form .button {
    justify-content: center;
    width: 100%;
}
.login-secondary-link {
    display: block;
    margin-top: -8px;
    text-align: center;
}
.login-wide-action {
    justify-content: center;
    width: 100%;
}
.reset-sent-message {
    padding: 14px;
    border: 1px solid #a9d6c0;
    border-radius: 8px;
    background: #eef9f3;
    color: #185d3d;
    line-height: 1.5;
}
.login-help {
    margin: -4px 0 0;
    color: var(--muted);
    font-size: 12px;
    text-align: center;
}
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.stats div {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 18px;
    box-shadow: var(--shadow);
}
.stats strong { display: block; color: var(--brown); font-size: 30px; margin-bottom: 4px; }
.stats span { color: var(--muted); font-size: 13px; font-weight: 700; }
.dashboard-secondary-stats strong {
    color: var(--teal);
    font-size: 25px;
}
.dashboard-overview-grid {
    align-items: stretch;
    margin-bottom: 18px;
}
.dashboard-overview-grid .panel {
    margin-bottom: 0;
}
.dashboard-today {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}
.dashboard-today div {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8faf9;
    padding: 14px;
    min-height: 112px;
}
.dashboard-today span,
.dashboard-event-list span {
    display: block;
    color: var(--muted);
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
}
.dashboard-today strong {
    display: block;
    margin: 7px 0 5px;
    color: var(--brown);
    font-size: 20px;
}
.dashboard-today small,
.dashboard-event-list em {
    color: var(--muted);
    font-style: normal;
    font-size: 12px;
    line-height: 1.35;
}
.dashboard-status-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}
.dashboard-status-list div {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 11px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    background: #fbfcfc;
}
.dashboard-status-list strong {
    color: var(--brown);
    font-size: 20px;
}
.dashboard-event-list {
    display: grid;
    gap: 10px;
}
.dashboard-notice-panel .panel-heading {
    align-items: flex-start;
}
.dashboard-notice-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}
.dashboard-notice-item {
    display: grid;
    gap: 5px;
    min-height: 116px;
    padding: 12px;
    border: 1px solid var(--line);
    border-left: 5px solid var(--teal);
    border-radius: 8px;
    background: #fbfcfc;
    color: var(--ink);
}
.dashboard-notice-item:hover {
    border-color: var(--teal);
}
.dashboard-notice-item span {
    color: var(--muted);
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
}
.dashboard-notice-item strong {
    color: var(--brown);
    font-size: 16px;
}
.dashboard-notice-title { color: inherit; }
.dashboard-notice-title:hover strong { color: var(--teal); }
.dashboard-notice-item em {
    color: var(--muted);
    font-size: 12px;
    font-style: normal;
    font-weight: 600;
    line-height: 1.35;
}
.dashboard-notice-item small,
.dashboard-notice-downloads a {
    color: #116b6c;
    font-size: 11px;
    font-weight: 800;
}
.dashboard-notice-downloads { display: grid; gap: 4px; }
.dashboard-notice-downloads a:hover { text-decoration: underline; }
.dashboard-event-list a {
    display: grid;
    gap: 4px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 11px 12px;
    background: #fbfcfc;
    color: var(--ink);
}
.dashboard-event-list a:hover {
    border-color: var(--teal);
}
.dashboard-event-list strong {
    font-size: 14px;
}
.dashboard-calendar-panel .calendar-day {
    min-height: 78px;
}
.dashboard-calendar {
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
}
.dashboard-calendar .calendar-day {
    padding: 6px;
}
.dashboard-calendar .calendar-day strong {
    width: 24px;
    height: 24px;
}
.dashboard-calendar .calendar-day em {
    font-size: 10px;
}
.student-profile-stats {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    margin-bottom: 0;
}
.alert { border-radius: 8px; padding: 12px 14px; margin-bottom: 14px; font-weight: 700; }
.alert.success { background: #e7f5ee; color: #0f5132; border: 1px solid #badbcc; }
.alert.error { background: #fdecec; color: #842029; border: 1px solid #f5c2c7; }
.alert.info { background: #e8f1fb; color: #174a7c; border: 1px solid #b9d3ee; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table-scroll { max-width: 100%; overflow-x: auto; }
.editable-table { min-width: 1120px; }
th, td { padding: 11px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { color: #53615c; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; background: #f8faf9; }
tr:last-child td { border-bottom: 0; }
.position-summary {
    font-weight: 800;
    color: var(--brown);
    max-width: 260px;
}
.position-editor {
    margin-top: 8px;
}
.position-editor summary {
    color: var(--teal);
    cursor: pointer;
    font-weight: 800;
    font-size: 12px;
}
.position-editor select {
    margin-top: 8px;
}
.status { display: inline-block; padding: 4px 8px; border-radius: 999px; background: #e9f7f7; color: #116b6c; font-size: 12px; font-weight: 800; }
.subject-workflow {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 6px;
}
.subject-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 6px;
    min-width: 210px;
}
.subject-summary span {
    display: inline-block;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 3px 7px;
    background: #fbfcfc;
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
}
.report-progress-panel .panel-heading {
    align-items: flex-start;
}
.report-progress-panel h2 {
    margin-bottom: 3px;
}
.report-progress-panel .panel-heading strong {
    color: var(--brown);
    font-size: 24px;
}
.progress-bar {
    display: block;
    width: 100%;
    height: 12px;
    border-radius: 999px;
    background: #eef3f1;
    border: 1px solid var(--line);
    overflow: hidden;
}
.progress-bar span {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, var(--teal), var(--orange));
}
.progress-bar.small {
    height: 8px;
    min-width: 120px;
}
.missing-fields {
    margin-top: 12px;
    color: var(--muted);
    font-size: 13px;
}
.missing-fields summary {
    cursor: pointer;
    font-weight: 800;
    color: var(--brown);
}
.missing-fields ul {
    columns: 2;
    margin: 10px 0 0;
    padding-left: 20px;
    line-height: 1.6;
}
.progress-cell {
    display: grid;
    gap: 5px;
    min-width: 150px;
}
.progress-cell strong {
    color: var(--brown);
}
.progress-cell em {
    color: var(--muted);
    font-size: 11px;
    font-style: normal;
    font-weight: 800;
}
.row-actions { white-space: nowrap; }
.row-actions form { margin: 0; }
.row-actions a + a { margin-left: 12px; }
.email-recipient { min-width: 220px; }
.bulk-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.delivery-failed { color: #842029; }
.delivery-sent { color: #0f6b48; }
.communications-layout {
    align-items: start;
}
.notice-list {
    display: grid;
    gap: 12px;
}
.notice-card {
    border: 1px solid var(--line);
    border-left: 5px solid var(--teal);
    border-radius: 8px;
    padding: 14px;
    background: #fbfcfc;
}
.notice-card-head {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: flex-start;
    margin-bottom: 9px;
}
.notice-card h3 {
    margin: 0 0 4px;
    color: var(--brown);
    font-size: 17px;
}
.notice-card span,
.notice-card small {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}
.notice-card strong {
    flex: 0 0 auto;
    color: var(--muted);
    font-size: 12px;
}
.notice-card p {
    margin-bottom: 10px;
    line-height: 1.55;
}
.notice-attachments {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin: 0 0 10px;
}
.notice-attachment-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 8px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: var(--ink);
    font-size: 12px;
    font-weight: 800;
}
.notice-attachment-link:hover { border-color: var(--teal); color: var(--teal); }
.notice-attachment-link > span:first-child { font-size: 18px; line-height: 1; }
.notice-attachment-link > span:last-child { display: grid; gap: 1px; }
.notice-attachment-link strong { color: inherit; font-size: 12px; }
.notice-attachment-link small { color: var(--muted); font-size: 10px; }
.communications-audience-grid {
    align-items: end;
}
.communications-header .eyebrow,
.parent-messenger-panel .eyebrow,
.parent-message-history .eyebrow,
.communications-section-heading .eyebrow { display: block; margin-bottom: 6px; color: var(--teal); font-size: 10px; font-weight: 900; letter-spacing: .11em; text-transform: uppercase; }
.communication-provider-status { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.communication-channel-state { display: inline-flex; align-items: center; padding: 7px 10px; border-radius: 999px; font-size: 10px; font-weight: 900; }
.communication-channel-state::before { width: 6px; height: 6px; margin-right: 6px; border-radius: 50%; background: currentColor; content: ''; }
.communication-channel-state.ready { background: #dff3eb; color: #126d4d; }
.communication-channel-state.missing { background: #f2f4f3; color: #6b7772; }
.communication-setup-alert { margin-bottom: 17px; }
.communication-setup-links { display: inline-flex; flex-wrap: wrap; gap: 7px; margin-left: 6px; }
.communication-readiness { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 12px; margin-bottom: 18px; }
.communication-readiness article { min-width: 0; padding: 16px; border: 1px solid var(--line); border-top: 4px solid var(--teal); border-radius: 8px; background: #fff; box-shadow: var(--shadow); }
.communication-readiness span,
.communication-readiness strong,
.communication-readiness small { display: block; }
.communication-readiness span { color: var(--muted); font-size: 9px; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; }
.communication-readiness strong { margin: 6px 0 3px; color: var(--brown); font-size: 27px; }
.communication-readiness small { color: var(--muted); font-size: 10px; font-weight: 650; }
.parent-messenger-panel { display: grid; grid-template-columns: minmax(240px,.7fr) minmax(0,1.45fr); gap: 28px; padding: 0; border-top: 5px solid var(--teal); overflow: hidden; }
.parent-messenger-intro { padding: 27px; background: linear-gradient(150deg,#f1faf8,#fff); }
.parent-messenger-intro h2 { margin: 0 0 9px; color: #2b1b14; font-size: 28px; }
.parent-messenger-intro > p { color: #53615c; font-size: 12px; line-height: 1.6; }
.messenger-privacy-note { display: grid; gap: 4px; margin: 20px 0; padding: 13px; border-left: 4px solid var(--orange); border-radius: 6px; background: #fff8ef; }
.messenger-privacy-note strong { color: #8f4c11; font-size: 11px; }
.messenger-privacy-note span { color: #765f4b; font-size: 10px; line-height: 1.45; }
.messenger-channel-guide { display: grid; gap: 10px; }
.messenger-channel-guide > span { display: grid; grid-template-columns: 36px minmax(0,1fr); align-items: center; gap: 9px; color: var(--muted); font-size: 10px; line-height: 1.45; }
.messenger-channel-guide b { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 9px; background: #daf0eb; color: var(--teal); font-size: 9px; }
.messenger-channel-guide b.wa { background: #dff6e8; color: #147a46; }
.parent-message-form { display: grid; align-content: start; gap: 13px; padding: 27px 27px 27px 0; }
.parent-message-step { display: flex; align-items: center; gap: 10px; margin-top: 4px; }
.parent-message-step > span { display: grid; flex: 0 0 28px; width: 28px; height: 28px; place-items: center; border-radius: 50%; background: var(--brown); color: #fff; font-size: 10px; font-weight: 900; }
.parent-message-step > div { display: grid; gap: 2px; }
.parent-message-step strong { color: #2b1b14; font-size: 12px; }
.parent-message-step small { color: var(--muted); font-size: 9px; }
.parent-audience-grid { grid-template-columns: repeat(2,minmax(0,1fr)); margin-bottom: 4px; }
.parent-channel-choices { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; }
.parent-channel-choice { display: grid; grid-template-columns: auto auto minmax(0,1fr); align-items: center; gap: 9px; padding: 12px; border: 1px solid #bddbd5; border-radius: 8px; background: #f5fbf9; cursor: pointer; }
.parent-channel-choice.disabled { border-color: var(--line); background: #f5f6f6; cursor: not-allowed; opacity: .65; }
.parent-channel-choice > input { width: 16px; height: 16px; }
.parent-channel-choice > span:last-child { display: grid; gap: 3px; }
.parent-channel-choice strong { color: #2b1b14; font-size: 11px; }
.parent-channel-choice small { color: var(--muted); font-size: 9px; }
.channel-symbol { display: grid; width: 32px; height: 32px; place-items: center; border-radius: 9px; background: #d9efeb; color: var(--teal); font-size: 16px; font-weight: 900; }
.channel-symbol.sms { font-size: 8px; letter-spacing: .03em; }
.channel-symbol.whatsapp { background: #dff6e8; color: #147a46; font-size: 9px; letter-spacing: .03em; }
.parent-channel-choice.whatsapp:not(.disabled) { border-color: #b8dcc7; background: #f4fbf6; }
.parent-message-review { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px; background: #fafcfb; }
.parent-message-review > div { display: grid; gap: 3px; }
.parent-message-review strong { color: #2b1b14; font-size: 10px; }
.parent-message-review span { color: var(--muted); font-size: 9px; }
.parent-message-review .channel-lengths { flex: 0 0 auto; gap: 8px; text-align: right; }
.parent-message-review .channel-lengths > div { display: grid; gap: 3px; }
.sms-length strong { color: var(--teal); }
.whatsapp-length strong { color: #147a46; }
.sms-length strong.over,
.whatsapp-length strong.over { color: #a9323c; }
.parent-message-attachments { display: grid; gap: 7px; padding: 13px 14px; border: 1px dashed #b9d6d1; border-radius: 8px; background: #f7fbfa; }
.parent-message-attachments input[type="file"] { padding: 10px; border-style: solid; background: #fff; }
.parent-attachment-selection { color: #477069; font-size: 10px; font-weight: 800; }
.parent-attachment-selection.needs-email { color: #a64632; }
.parent-send-button { width: 100%; justify-content: center; }
.parent-messenger-empty { align-content: center; justify-items: start; padding: 32px 32px 32px 0; text-align: left; }
.parent-messenger-empty strong,
.parent-messenger-empty span { display: block; }
.parent-messenger-empty strong { margin-bottom: 6px; color: #2b1b14; }
.parent-message-history { margin-top: 18px; }
.parent-channel-badges { display: flex; flex-wrap: wrap; gap: 4px; }
.parent-channel-badges b { padding: 4px 6px; border-radius: 5px; background: #e9f4f2; color: #286d63; font-size: 9px; }
.parent-history-attachment-register { display: grid; gap: 9px; margin-top: 14px; padding: 13px 15px; border-top: 1px solid var(--line); }
.access-student-search { margin-bottom: 7px; }
.human-check-field { padding: 12px; border: 1px solid #b9d9d5; border-radius: 8px; background: #f5fbfa; }
.human-check-question { display: block; margin: 4px 0 8px; color: var(--teal); font-size: 13px; font-weight: 900; text-transform: none; }
.survey-layout { align-items: start; }
.survey-question-row { display: grid; grid-template-columns: 1fr 180px; gap: 10px; margin-bottom: 10px; }
.survey-list { display: grid; gap: 8px; }
.survey-list > a,.survey-portal-item { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 13px; border: 1px solid var(--line); border-radius: 9px; color: inherit; }
.survey-list > a.selected,.survey-list > a:hover,.survey-portal-item:hover { border-color: var(--teal); background: #f5fbfa; }
.survey-list span,.survey-portal-item span { display: grid; gap: 3px; }
.survey-list small,.survey-portal-item small,.survey-response small { color: var(--muted); }
.survey-question-summary { display: grid; gap: 7px; margin: 14px 0 20px; }
.survey-question-summary > div { display: flex; justify-content: space-between; gap: 12px; padding: 10px 12px; background: var(--surface-soft); border-radius: 7px; }
.survey-response { margin-top: 12px; padding: 15px; border: 1px solid var(--line); border-radius: 9px; }
.survey-response > div { display: flex; justify-content: space-between; }
.survey-response dl { display: grid; gap: 10px; margin-bottom: 0; }
.survey-response dt { color: var(--muted); font-size: 10px; font-weight: 800; text-transform: uppercase; }
.survey-take-form { max-width: 850px; margin: 0 auto; }
.survey-take-form fieldset { margin: 0 0 16px; padding: 16px; border: 1px solid var(--line); border-radius: 9px; }
.survey-take-form legend { padding: 0 6px; font-weight: 800; }
.survey-choice-row { display: flex; flex-wrap: wrap; gap: 9px; }
.survey-choice-row label { display: flex; align-items: center; gap: 7px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; }
.survey-portal-item.completed { opacity: .75; }
.online-virtual-labs { margin-top: 20px; }
.online-virtual-lab-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.online-virtual-lab-grid > a { position: relative; display: grid; gap: 6px; min-height: 170px; padding: 18px; border: 1px solid var(--line); border-radius: 10px; background: linear-gradient(145deg,#fff,#f6fbfa); color: var(--ink); transition: transform .18s ease,border-color .18s ease,box-shadow .18s ease; }
.online-virtual-lab-grid > a:hover { transform: translateY(-2px); border-color: var(--teal); box-shadow: 0 10px 24px rgba(21,94,87,.1); }
.online-virtual-lab-grid strong { padding-right: 28px; font-size: 15px; }
.online-virtual-lab-grid small { color: var(--teal); font-size: 9px; font-weight: 900; text-transform: uppercase; }
.online-virtual-lab-grid p { margin: 4px 0; color: var(--muted); font-size: 11px; line-height: 1.55; }
.online-virtual-lab-grid b { align-self: end; color: var(--teal); font-size: 10px; }
.online-lab-arrow { position: absolute; top: 15px; right: 16px; display: grid; width: 27px; height: 27px; place-items: center; border-radius: 50%; background: #e7f5f3; color: var(--teal); font-weight: 900; }
@media (max-width: 700px) { .survey-question-row { grid-template-columns: 1fr; } }
@media (max-width: 700px) { .online-virtual-lab-grid { grid-template-columns: 1fr; } }
.parent-history-attachment-register > strong { color: #2b1b14; font-size: 11px; }
.parent-history-attachment-register > div { display: flex; flex-wrap: wrap; gap: 8px; }
.parent-history-attachment-register a { display: inline-flex; align-items: center; gap: 7px; max-width: 330px; padding: 8px 10px; border: 1px solid #c6ded9; border-radius: 7px; background: #f7fbfa; color: #175f58; font-size: 10px; font-weight: 900; }
.parent-history-attachment-register a > span:last-child { display: grid; gap: 2px; min-width: 0; overflow-wrap: anywhere; }
.parent-history-attachment-register a small { color: var(--muted); font-size: 8px; font-weight: 700; }
.parent-history-attachment-register a:hover { border-color: var(--teal); }
.parent-delivery-details { margin-top: 16px; padding-top: 13px; border-top: 1px solid var(--line); }
.parent-delivery-details summary { color: var(--teal); cursor: pointer; font-size: 11px; font-weight: 900; }
.parent-delivery-details[open] summary { margin-bottom: 12px; }
.communications-section-heading { margin: 30px 0 14px; }
.communications-section-heading h2 { margin: 0 0 5px; color: #2b1b14; font-size: 23px; }
.communications-section-heading p { margin: 0; color: var(--muted); font-size: 12px; }
.sms-settings-layout { align-items: start; }
.sms-settings-layout .mini-fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.sms-settings-layout .mini-fields label { width: auto; min-width: 0; }
.sms-settings-layout fieldset { display: grid; gap: 12px; margin: 4px 0; padding: 15px; border: 1px solid var(--line); border-radius: 8px; background: #fafcfb; }
.sms-settings-layout legend { padding: 0 7px; color: var(--teal); font-size: 11px; font-weight: 900; }
.settings-notes { padding-left: 18px; color: var(--muted); font-size: 11px; line-height: 1.7; }
.whatsapp-template-guide blockquote { margin: 14px 0; padding: 14px; border-left: 4px solid #21a366; border-radius: 6px; background: #f3faf5; color: #355c45; font-size: 12px; line-height: 1.6; }
.whatsapp-consent-field { display: grid; align-content: start; gap: 7px; }
.whatsapp-consent-field > span:first-child { font-weight: 800; }
.whatsapp-consent-field .inline-check { justify-content: flex-start; }
.whatsapp-consent-field small { color: var(--muted); }

/* Secretary WhatsApp Web desk */
.secretary-whatsapp-header { align-items: flex-end; }
.whatsapp-desk-kicker { display: block; margin-bottom: 5px; color: #158455; font-size: 9px; font-weight: 900; letter-spacing: .11em; text-transform: uppercase; }
.whatsapp-desk-statuses { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.whatsapp-desk-status { display: inline-flex; align-items: center; gap: 6px; padding: 7px 10px; border-radius: 999px; background: #edf1f0; color: #68736f; font-size: 9px; font-weight: 900; }
.whatsapp-desk-status::before { width: 6px; height: 6px; border-radius: 50%; background: currentColor; content: ''; }
.whatsapp-desk-status.ready { background: #dff6e8; color: #147a46; }
.whatsapp-embed-notice { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 14px; margin-bottom: 16px; padding: 13px 15px; border: 1px solid #bfe0ca; border-radius: 9px; background: #f3faf5; }
.whatsapp-notice-icon { display: grid; width: 39px; height: 39px; place-items: center; border-radius: 11px; background: #25d366; color: #fff; font-size: 10px; font-weight: 900; }
.whatsapp-embed-notice strong { color: #22543a; font-size: 11px; }
.whatsapp-embed-notice p { margin: 3px 0 0; color: #53705f; font-size: 10px; line-height: 1.45; }
.whatsapp-embed-notice a { color: #147a46; font-size: 10px; font-weight: 900; white-space: nowrap; }
.whatsapp-desk-summary { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; margin-bottom: 17px; }
.whatsapp-desk-summary article { padding: 15px 17px; border: 1px solid var(--line); border-top: 4px solid #25a661; border-radius: 8px; background: #fff; box-shadow: var(--shadow); }
.whatsapp-desk-summary span,.whatsapp-desk-summary strong,.whatsapp-desk-summary small { display: block; }
.whatsapp-desk-summary span { color: var(--muted); font-size: 9px; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; }
.whatsapp-desk-summary strong { margin: 5px 0 2px; color: #24573b; font-size: 27px; }
.whatsapp-desk-summary small { color: var(--muted); font-size: 9px; }
.secretary-whatsapp-desk { display: grid; grid-template-columns: minmax(310px,.72fr) minmax(0,1.28fr); min-height: 660px; padding: 0; overflow: hidden; border-top: 5px solid #25a661; }
.whatsapp-contact-pane { min-width: 0; border-right: 1px solid var(--line); background: #f7faf8; }
.whatsapp-pane-heading { display: flex; justify-content: space-between; gap: 12px; padding: 16px 17px 11px; }
.whatsapp-pane-heading span { color: #254a35; font-size: 12px; font-weight: 900; }
.whatsapp-pane-heading strong { color: var(--muted); font-size: 9px; }
.whatsapp-contact-filters { display: grid; gap: 8px; padding: 0 15px 14px; border-bottom: 1px solid var(--line); }
.whatsapp-contact-filters > div { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.whatsapp-contact-filters label { font-size: 9px; }
.whatsapp-contact-filters input,.whatsapp-contact-filters select { padding: 9px 10px; font-size: 10px; }
.whatsapp-contact-filters .button { justify-content: center; }
.whatsapp-contact-list { max-height: 590px; overflow-y: auto; }
.whatsapp-contact-card { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid #e1e8e5; color: var(--ink); }
.whatsapp-contact-card:hover,.whatsapp-contact-card.active { background: #e9f7ef; }
.whatsapp-contact-card.active { box-shadow: inset 4px 0 #25a661; }
.whatsapp-contact-avatar { display: grid; flex: 0 0 37px; width: 37px; height: 37px; place-items: center; border-radius: 50%; background: #d8efe1; color: #176c44; font-size: 10px; font-weight: 900; }
.whatsapp-contact-avatar.large { width: 48px; height: 48px; font-size: 13px; }
.whatsapp-contact-card > span:nth-child(2) { display: grid; gap: 2px; min-width: 0; }
.whatsapp-contact-card strong { overflow: hidden; color: #263b31; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.whatsapp-contact-card small { overflow: hidden; color: var(--muted); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.whatsapp-contact-state { padding: 4px 6px; border-radius: 999px; background: #f1e9e5; color: #8a5d49; font-size: 7px; font-weight: 900; text-transform: uppercase; }
.whatsapp-contact-state.ready { background: #dff6e8; color: #147a46; }
.whatsapp-contact-state.invalid_number { background: #fff0dc; color: #99570e; }
.whatsapp-empty-directory { display: grid; gap: 5px; padding: 24px 17px; text-align: center; }
.whatsapp-empty-directory strong { color: #2b1b14; font-size: 11px; }
.whatsapp-empty-directory span { color: var(--muted); font-size: 9px; line-height: 1.5; }
.whatsapp-compose-pane { min-width: 0; padding: 25px; background: linear-gradient(145deg,#fff,#fbfdfc); }
.whatsapp-selected-contact { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 12px; padding-bottom: 17px; border-bottom: 1px solid var(--line); }
.whatsapp-selected-contact > div:nth-child(2) { min-width: 0; }
.whatsapp-selected-contact span:not(.whatsapp-selected-state) { color: #608070; font-size: 8px; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; }
.whatsapp-selected-contact h2 { margin: 3px 0; color: #1f382b; font-size: 22px; }
.whatsapp-selected-contact p { margin: 0; color: var(--muted); font-size: 10px; }
.whatsapp-selected-state { padding: 6px 8px; border-radius: 999px; font-size: 8px; font-weight: 900; }
.whatsapp-selected-state.ready { background: #dff6e8; color: #147a46; }
.whatsapp-selected-state.blocked { background: #fff0dc; color: #99570e; }
.whatsapp-contact-facts { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)) auto; align-items: end; gap: 10px; padding: 15px 0; }
.whatsapp-contact-facts > div { min-width: 0; padding: 10px 11px; border: 1px solid #dce6e2; border-radius: 7px; background: #fafcfb; }
.whatsapp-contact-facts span,.whatsapp-contact-facts strong { display: block; }
.whatsapp-contact-facts span { margin-bottom: 3px; color: var(--muted); font-size: 8px; font-weight: 900; text-transform: uppercase; }
.whatsapp-contact-facts strong { overflow-wrap: anywhere; color: #2b4437; font-size: 10px; }
.whatsapp-contact-facts > a { padding: 9px; color: var(--teal); font-size: 9px; font-weight: 900; white-space: nowrap; }
.whatsapp-web-compose { display: grid; gap: 13px; }
.whatsapp-web-compose label { font-size: 10px; }
.whatsapp-message-meter { display: block; margin-top: 5px; color: var(--muted); font-size: 8px; font-weight: 700; text-align: right; }
.whatsapp-message-meter b { color: #147a46; }
.whatsapp-message-meter b.over { color: #a9323c; }
.whatsapp-web-preview { display: flex; align-items: center; gap: 10px; padding: 11px 12px; border: 1px solid #bfe0ca; border-radius: 8px; background: #f3faf5; }
.whatsapp-web-preview > span { display: grid; width: 26px; height: 26px; place-items: center; border-radius: 50%; background: #25a661; color: #fff; font-weight: 900; }
.whatsapp-web-preview strong { color: #22543a; font-size: 10px; }
.whatsapp-web-preview p { margin: 2px 0 0; color: #53705f; font-size: 8px; }
.whatsapp-web-open { justify-content: center; width: 100%; background: #188a50; color: #fff; }
.whatsapp-web-open:hover { background: #126e40; }
.whatsapp-handoff-help { margin: -4px 0 0; color: var(--muted); font-size: 8px; line-height: 1.45; text-align: center; }
.whatsapp-chat-blocked { display: grid; justify-items: start; gap: 9px; margin-top: 22px; padding: 20px; border: 1px solid #ead6c4; border-radius: 9px; background: #fff8ef; }
.whatsapp-chat-blocked strong { color: #7c4618; }
.whatsapp-chat-blocked p { margin: 0; color: #765f4b; font-size: 10px; line-height: 1.5; }
.whatsapp-handoff-history { margin-top: 18px; }
.whatsapp-business-history { margin-top: 15px; padding-top: 13px; border-top: 1px solid var(--line); }
.whatsapp-business-history summary { color: #147a46; cursor: pointer; font-size: 10px; font-weight: 900; }

@media (max-width: 760px) {
    .secretary-whatsapp-header { align-items: flex-start; flex-direction: column; }
    .whatsapp-desk-statuses { justify-content: flex-start; }
    .whatsapp-embed-notice { grid-template-columns: auto minmax(0,1fr); }
    .whatsapp-embed-notice > a { grid-column: 2; }
    .whatsapp-desk-summary { grid-template-columns: 1fr; }
    .secretary-whatsapp-desk { grid-template-columns: 1fr; }
    .whatsapp-contact-pane { border-right: 0; border-bottom: 1px solid var(--line); }
    .whatsapp-contact-list { max-height: 430px; }
    .whatsapp-compose-pane { padding: 20px; }
    .whatsapp-selected-contact { grid-template-columns: auto minmax(0,1fr); }
    .whatsapp-selected-state { grid-column: 2; justify-self: start; }
    .whatsapp-contact-facts { grid-template-columns: 1fr; }
    .whatsapp-contact-facts > a { padding-left: 0; }
}
.empty { color: var(--muted); text-align: center; padding: 28px; }
.filters { display: flex; gap: 10px; margin-bottom: 16px; }
.teacher-search { display: flex; gap: 8px; align-items: end; min-width: min(100%, 440px); }
.teacher-search label { flex: 1; }
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
input, select, textarea {
    width: 100%;
    border: 1px solid #cad5d1;
    border-radius: 8px;
    padding: 10px 11px;
    font: inherit;
    background: #fff;
    color: var(--ink);
}
select[multiple] { min-height: 118px; }
input:focus, select:focus, textarea:focus {
    outline: 2px solid rgba(27, 163, 164, .22);
    border-color: var(--teal);
}
textarea { resize: vertical; line-height: 1.45; }
label { display: grid; gap: 6px; color: #495853; font-size: 13px; font-weight: 800; }
.field-missing {
    border-left: 4px solid #c83e4d;
    border-radius: 8px;
    padding-left: 10px;
    color: #842029;
}
.field-missing input,
.field-missing select,
.field-missing textarea,
input.field-missing,
select.field-missing,
textarea.field-missing {
    border-color: #d96a75;
    background: #fff8f8;
    box-shadow: 0 0 0 3px rgba(200, 62, 77, .08);
}
.emoji-picker.field-missing {
    padding: 10px;
    border: 1px solid #d96a75;
    border-left-width: 4px;
    background: #fff8f8;
}
.inline-check { display: flex; flex-direction: row; align-items: center; gap: 8px; }
.inline-check input { width: auto; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.form-grid.compact { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.span-2 { grid-column: span 2; }
.form-actions { grid-column: 1 / -1; display: flex; gap: 10px; margin-top: 4px; }
.file-list { color: var(--muted); padding-left: 18px; line-height: 1.7; }
.report-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; }
.student-report-profile {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8faf9;
}
.student-report-profile div {
    display: grid;
    gap: 4px;
}
.student-report-profile span {
    color: var(--muted);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
}
.student-report-profile strong {
    color: var(--ink);
    font-size: 13px;
}
.subject-list { display: grid; gap: 12px; }
.subject-card {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 14px;
    background: #fbfcfc;
}
.subject-card-missing {
    border-color: #d96a75;
    box-shadow: inset 4px 0 0 #c83e4d, 0 10px 26px rgba(132, 32, 41, .08);
}
.subject-head { display: flex; justify-content: space-between; gap: 14px; align-items: start; margin-bottom: 10px; }
.subject-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 12px;
}
.mini-fields { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.mini-fields label { width: 92px; font-size: 11px; }
.mini-fields input { padding: 7px 8px; }
.emoji-picker { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.emoji-option {
    width: 92px;
    display: grid;
    justify-items: center;
    gap: 4px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 8px;
    background: #fff;
    cursor: pointer;
    text-align: center;
}
.emoji-option input { width: auto; margin: 0; }
.emoji-option img { width: 42px; height: 42px; object-fit: contain; }
.emoji-option span { font-size: 10px; color: var(--ink); }
.emoji-option:has(input:checked) { border-color: var(--teal); box-shadow: 0 0 0 2px rgba(27, 163, 164, .16); }
.checks { border: 1px solid var(--line); border-radius: 8px; padding: 12px; display: flex; gap: 20px; }
.checks label { display: flex; align-items: center; gap: 8px; }
.checks input { width: auto; }
.selection-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px;
    margin: 14px 0;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8faf9;
}
.selection-toolbar label {
    display: flex;
    align-items: center;
    gap: 8px;
}
.selection-toolbar input,
.checkbox-column,
td > .student-promotion-check {
    width: auto;
}
.assignment-table { min-width: 980px; }
.assignment-table td:first-child { width: 220px; }
.assignment-table td:last-child { width: 360px; }
.transcript-edit-table { min-width: 1180px; }
.transcript-edit-table th:first-child,
.transcript-edit-table td:first-child { min-width: 210px; }
.transcript-edit-table th:nth-child(7),
.transcript-edit-table td:nth-child(7) { min-width: 260px; }
.table-note { display: block; color: var(--muted); font-size: 12px; margin-top: 4px; }
.field-note { color: var(--muted); font-size: 11px; font-weight: 600; line-height: 1.35; }
.assignment-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.assignment-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px 6px 10px;
    border-radius: 8px;
    background: #e9f7f7;
    color: #116b6c;
    font-size: 12px;
    font-weight: 800;
}
.assignment-chip span { display: grid; gap: 2px; }
.assignment-chip small { color: #55716d; font-weight: 600; }
.assignment-chip button {
    width: 24px;
    height: 24px;
    border: 0;
    border-radius: 50%;
    background: rgba(17, 107, 108, .12);
    color: #116b6c;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
}
.inline-assignment-form { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; }

.print-body { background: #dfe6e3; padding: 28px; }
.print-actions { max-width: 900px; margin: 0 auto 16px; display: flex; gap: 10px; }
.report-page {
    width: 210mm;
    min-height: 297mm;
    margin: 0 auto;
    background: #fff;
    padding: 18mm;
    box-shadow: 0 20px 60px rgba(0,0,0,.18);
    color: #111;
}
.referral-page {
    width: 210mm;
    min-height: 297mm;
    margin: 0 auto;
    padding: 20mm;
    background: #fff;
    box-shadow: 0 20px 60px rgba(0,0,0,.18);
    color: #111;
    line-height: 1.6;
}
.referral-letterhead {
    display: flex;
    align-items: center;
    gap: 18px;
    padding-bottom: 14px;
    margin-bottom: 24px;
    border-bottom: 3px solid var(--brown);
}
.referral-letterhead img {
    width: 82px;
    height: 82px;
    object-fit: contain;
}
.referral-letterhead h1 {
    margin-bottom: 3px;
    color: var(--brown);
    font-size: 24px;
}
.referral-letterhead p {
    margin: 0;
    color: var(--muted);
    font-weight: 800;
}
.referral-date {
    margin-bottom: 20px;
    text-align: right;
}
.referral-details {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: 22px 0;
    border: 1px solid #b9c2bf;
}
.referral-details div {
    display: grid;
    grid-template-columns: 42% 58%;
    border-bottom: 1px solid #d9e1de;
}
.referral-details div:nth-child(odd) {
    border-right: 1px solid #d9e1de;
}
.referral-details dt,
.referral-details dd {
    margin: 0;
    padding: 8px 10px;
}
.referral-details dt {
    background: #f5f7f8;
    font-weight: 800;
}
.referral-reason {
    min-height: 90px;
    margin: 18px 0;
    padding: 14px;
    border: 1px solid #b9c2bf;
}
.referral-reason h2 {
    margin-bottom: 8px;
    color: var(--brown);
    font-size: 15px;
}
.referral-signatures {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 60px;
    margin-top: 70px;
}
.referral-signatures div {
    text-align: center;
}
.referral-signatures span {
    display: block;
    border-top: 1px solid #222;
    margin-bottom: 8px;
}
.report-header { text-align: center; border-bottom: 2px solid var(--brown); padding-bottom: 10px; margin-bottom: 14px; }
.report-logo {
    width: 82px;
    height: 82px;
    object-fit: contain;
    display: block;
    margin: 0 auto 8px;
}
.report-header p { font-weight: 700; margin-bottom: 4px; }
.report-header h1 { font-size: 22px; margin: 0 0 4px; }
.report-header h2 { font-size: 17px; margin: 0; }
.report-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 22px;
    border-bottom: 1px solid #999;
    padding-bottom: 12px;
    margin-bottom: 12px;
}
.report-meta span { display: block; font-size: 11px; color: #555; text-transform: uppercase; }
.report-meta strong { font-size: 14px; }
.grade-key { font-size: 12px; line-height: 1.45; background: #fef7ef; padding: 10px; border: 1px solid #f1c898; }
.report-subject { break-inside: avoid; margin-top: 13px; }
.report-subject-head {
    display: flex; justify-content: space-between; align-items: center;
    border-bottom: 1px solid var(--teal); margin-bottom: 6px;
}
.report-subject h3 { font-size: 15px; margin: 0 0 5px; }
.report-subject-head span { font-weight: 800; white-space: pre; }
.print-emoji { display: inline-flex; align-items: center; gap: 6px; white-space: normal; color: var(--brown); }
.print-emoji img { width: 34px; height: 34px; object-fit: contain; }
.report-subject p {
    font-size: 12.5px;
    line-height: 1.48;
    margin-bottom: 0;
    text-align: justify;
    text-justify: inter-word;
}
.report-table th, .report-table td { border: 1px solid #333; padding: 7px; font-size: 12px; }
.report-table tbody tr:last-child td { border-bottom: 1px solid #333; }
.report-table th { background: #fef7ef; color: #111; letter-spacing: 0; text-transform: none; }
.monthly-report-table th:first-child,
.monthly-report-table td:first-child { width: 24%; }
.monthly-report-table th:nth-child(2),
.monthly-report-table td:nth-child(2) { width: 12%; text-align: center; }
.monthly-report-table th:nth-child(3),
.monthly-report-table td:nth-child(3) {
    width: 64%;
    line-height: 1.45;
    text-align: justify;
    text-justify: inter-word;
}
.term-two-report { padding-top: 12mm; }
.term-two-report .report-header { margin-bottom: 10px; }
.term-two-report .report-header h1 { margin: 6px 0 4px; }
.term-two-report .report-header p { margin-bottom: 0; }
.term-two-report .report-meta { grid-template-columns: 2fr 1fr 1.4fr; }
.term-two-scale {
    font-size: 11px;
    line-height: 1.55;
    margin: 10px 0;
    padding: 8px 10px;
    background: #f8faf9;
    border-left: 3px solid var(--brown);
}
.term-two-table th,
.term-two-table td { text-align: center; vertical-align: middle; }
.term-two-table th:first-child,
.term-two-table td:first-child { width: 30%; text-align: left; }
.term-two-table th:nth-child(2),
.term-two-table td:nth-child(2) { width: 25%; }
.term-two-communication {
    margin: 24px 0 0;
    text-align: center;
    font-size: 10px;
    color: #555;
}
.signatures { display: flex; justify-content: space-between; gap: 20px; margin-top: 28px; font-size: 12px; }
.signatures span { display: grid; gap: 4px; min-width: 240px; }
.signatures img { max-width: 190px; max-height: 58px; object-fit: contain; }
.workflow-note { margin-top: 14px; font-size: 10.5px; color: #555; text-align: center; }
.transcript-page .report-header h1 { font-size: 24px; text-transform: uppercase; }
.transcript-meta { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.transcript-table th,
.transcript-table td { font-size: 11.5px; vertical-align: top; }
.transcript-table th:first-child,
.transcript-table td:first-child { width: 22%; }
.transcript-table th:nth-child(2),
.transcript-table td:nth-child(2) { width: 14%; }
.transcript-table th:nth-child(4),
.transcript-table td:nth-child(4),
.transcript-table th:nth-child(5),
.transcript-table td:nth-child(5) { width: 8%; text-align: center; }
.transcript-signatures strong { display: block; margin-top: 10px; }
.signature-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.signature-box { display: grid; gap: 10px; }
.signature-pad {
    width: 100%;
    height: 150px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    touch-action: none;
}
.saved-signature {
    max-width: 260px;
    max-height: 72px;
    object-fit: contain;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 6px;
    background: #fff;
}
.table-signature {
    max-width: 130px;
    max-height: 44px;
    object-fit: contain;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 4px;
    background: #fff;
}
.table-avatar {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    object-fit: cover;
    display: inline-grid;
    place-items: center;
    background: #fef7ef;
    border: 1px solid var(--line);
    color: var(--brown);
    font-weight: 900;
}
.profile-layout {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 18px;
    align-items: start;
}
.profile-selector {
    max-width: 560px;
}
.profile-card {
    text-align: center;
}
.profile-photo {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    object-fit: cover;
    display: inline-grid;
    place-items: center;
    background: #fef7ef;
    border: 1px solid var(--line);
    color: var(--brown);
    font-size: 48px;
    font-weight: 900;
    margin-bottom: 14px;
}
.profile-meta {
    display: grid;
    gap: 10px;
    text-align: left;
    margin: 18px 0 0;
}
.profile-meta div {
    border-top: 1px solid var(--line);
    padding-top: 10px;
}
.profile-meta dt {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}
.profile-meta dd {
    margin: 4px 0 0;
    font-weight: 700;
}
.attendance-filters {
    align-items: end;
}
.attendance-filters label {
    min-width: 220px;
}
.attendance-class-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}
.attendance-class-summary div {
    display: grid;
    gap: 5px;
}
.attendance-class-summary span {
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
}
.attendance-totals {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}
.attendance-total {
    padding: 15px 17px;
    border: 1px solid var(--line);
    border-left-width: 5px;
    border-radius: 8px;
    background: #fff;
}
.attendance-total strong {
    display: block;
    font-size: 25px;
}
.attendance-total span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}
.attendance-total.present { border-left-color: #1f8b5b; }
.attendance-total.absent { border-left-color: #c83e4d; }
.attendance-total.late { border-left-color: #e68925; }
.attendance-total.excused { border-left-color: #5279b8; }
.attendance-heading {
    align-items: flex-start;
}
.attendance-heading h2 {
    margin-bottom: 3px;
}
.attendance-table {
    min-width: 900px;
}
.attendance-table td:first-child {
    min-width: 210px;
}
.attendance-table td:nth-child(3) {
    width: 150px;
}
.attendance-table td:nth-child(4) {
    min-width: 260px;
}
.attendance-table tr:target td {
    background: #fff8d8;
}
.attendance-table tr:target td:first-child {
    box-shadow: inset 4px 0 0 var(--gold);
}
.attendance-status {
    border-left-width: 5px;
    font-weight: 800;
}
.attendance-status.present { border-left-color: #1f8b5b; }
.attendance-status.absent { border-left-color: #c83e4d; }
.attendance-status.late { border-left-color: #e68925; }
.attendance-status.excused { border-left-color: #5279b8; }
.attendance-save {
    justify-content: flex-end;
    margin-top: 16px;
}
.calendar-filters {
    align-items: end;
}
.calendar-filters label {
    min-width: 240px;
}
.calendar-term-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}
.calendar-term-card {
    border-top: 5px solid var(--teal);
}
.calendar-term-card > span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}
.calendar-term-card h2 {
    margin: 7px 0;
    color: var(--brown);
    font-size: 23px;
}
.calendar-term-card > strong {
    display: block;
    margin-bottom: 10px;
}
.calendar-term-card p {
    margin: 0;
    color: var(--muted);
}
.calendar-events-table {
    min-width: 980px;
}
.calendar-graphic-heading {
    align-items: flex-start;
}
.calendar-graphic-heading h2 {
    margin-bottom: 3px;
}
.calendar-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    justify-content: flex-end;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}
.calendar-legend span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.calendar-key {
    width: 13px;
    height: 13px;
    border-radius: 4px;
    border: 1px solid var(--line);
    background: #eef3f1;
}
.calendar-key.term { background: #e9f7f7; border-color: #9bd8d8; }
.calendar-key.today { background: #17201c; border-color: #17201c; }
.calendar-key.event-school-event { background: #dff3ff; border-color: #8ec9e8; }
.calendar-key.event-school-holiday { background: #fdecec; border-color: #efaaaa; }
.calendar-key.event-public-holiday { background: #fff1d6; border-color: #e8b96b; }
.calendar-key.event-observance { background: #edf0ff; border-color: #b9c1f0; }
.calendar-key.event-staff-event { background: #f0e7fa; border-color: #c8a9e3; }
.calendar-month-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}
.calendar-month-grid.single-month {
    grid-template-columns: minmax(0, 1fr);
}
.calendar-month-nav {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    margin: 12px 0 16px;
}
.calendar-month-nav strong {
    text-align: center;
    color: var(--brown);
    font-size: 22px;
}
.calendar-toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin: 10px 0 14px;
}
.calendar-event-editor {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8faf9;
    padding: 14px;
    margin: 12px 0 16px;
}
.button.disabled {
    opacity: .52;
    cursor: not-allowed;
}
.calendar-month {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    overflow: hidden;
}
.calendar-month h3 {
    margin: 0;
    padding: 12px 14px;
    color: var(--brown);
    background: #f8faf9;
    border-bottom: 1px solid var(--line);
    font-size: 16px;
}
.calendar-weekdays,
.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
}
.calendar-weekdays span {
    padding: 8px 4px;
    background: #fbfcfc;
    border-bottom: 1px solid var(--line);
    color: var(--muted);
    font-size: 10px;
    font-weight: 900;
    text-align: center;
    text-transform: uppercase;
}
.calendar-day {
    min-height: 82px;
    padding: 6px;
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    background: #fff;
    display: grid;
    align-content: start;
    gap: 4px;
    font-size: 10.5px;
}
.single-month .calendar-day {
    min-height: 118px;
    font-size: 12px;
}
.single-month .calendar-day strong {
    width: 30px;
    height: 30px;
    font-size: 14px;
}
.calendar-day:nth-child(7n),
.calendar-weekdays span:nth-child(7n) {
    border-right: 0;
}
.calendar-day.empty {
    background: #f8faf9;
}
.calendar-day strong {
    width: 24px;
    height: 24px;
    display: inline-grid;
    place-items: center;
    border-radius: 50%;
    font-size: 12px;
}
.calendar-day-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
}
.calendar-day-head a {
    width: 24px;
    height: 24px;
    display: inline-grid;
    place-items: center;
    border-radius: 50%;
    background: #fff;
    border: 1px solid var(--line);
    color: var(--brown);
    font-size: 16px;
    line-height: 1;
}
.calendar-day span,
.calendar-day em,
.calendar-event-pill {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #24342f;
    font-style: normal;
    font-weight: 800;
    line-height: 1.2;
}
.calendar-event-pill {
    padding: 3px 5px;
    border-radius: 6px;
    background: rgba(255,255,255,.7);
    border: 1px solid rgba(217,225,222,.82);
}
.calendar-event-pill:hover {
    border-color: var(--teal);
    color: #116b6c;
}
.calendar-day.in-term {
    background: #f4fbfb;
}
.calendar-day.today strong {
    background: #17201c;
    color: #fff;
}
.calendar-day.event-school-event { box-shadow: inset 0 4px 0 #4daedb; }
.calendar-day.event-school-holiday { box-shadow: inset 0 4px 0 #d95b5b; background: #fff8f8; }
.calendar-day.event-public-holiday { box-shadow: inset 0 4px 0 #e6a23b; background: #fffbf2; }
.calendar-day.event-observance { box-shadow: inset 0 4px 0 #7d8be6; }
.calendar-day.event-staff-event { box-shadow: inset 0 4px 0 #a672c8; }
.calendar-tentative {
    display: inline-block;
    margin-left: 7px;
    padding: 3px 7px;
    border-radius: 999px;
    background: #fff3cd;
    color: #7a5a00;
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
}
@media (max-width: 900px) {
    .app-shell { grid-template-columns: 1fr; }
    .sidebar { position: static; }
    .main { padding: 18px; }
    .page-header, .subject-head { flex-direction: column; align-items: stretch; }
    .grid.two, .grid.three, .stats, .dashboard-today, .dashboard-status-list, .dashboard-notice-list, .form-grid, .form-grid.compact, .signature-grid, .profile-layout, .attendance-class-summary, .attendance-totals, .calendar-term-grid, .calendar-month-grid, .student-report-profile, .transcript-meta { grid-template-columns: 1fr; }
    .span-2 { grid-column: span 1; }
    .filters { flex-direction: column; }
    .attendance-heading { align-items: stretch; }
    .attendance-heading .button-row { justify-content: flex-start; }
    .calendar-legend { justify-content: flex-start; }
    .calendar-toolbar { align-items: stretch; }
    .calendar-month-nav { grid-template-columns: 1fr; }
    .calendar-month-nav strong { order: -1; text-align: left; }
    .calendar-day { min-height: 74px; }
    .single-month .calendar-day { min-height: 88px; font-size: 10.5px; }
    .dashboard-calendar-panel .calendar-day { min-height: 64px; }
    .teacher-search { width: 100%; min-width: 0; align-items: stretch; }
    .mini-fields { justify-content: flex-start; }
    .referral-page { width: auto; min-height: 0; padding: 24px; }
    .referral-details, .referral-signatures { grid-template-columns: 1fr; }
    .referral-details div:nth-child(odd) { border-right: 0; }
}

/* QuickBooks accounts integration */
.quickbooks-page-header .eyebrow,
.quickbooks-provider-heading .eyebrow,
.quickbooks-mapping-panel .eyebrow,
.panel-heading .eyebrow { display: block; margin-bottom: 5px; color: var(--teal); font-size: 10px; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.quickbooks-guardrail {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 14px;
    margin-bottom: 18px;
    padding: 13px 16px;
    border: 1px solid #b9ddd5;
    border-left: 5px solid var(--teal);
    border-radius: 8px;
    background: #f2faf8;
    color: #315f58;
    font-size: 12px;
    line-height: 1.5;
}
.quickbooks-guardrail strong { color: #1d6f64; white-space: nowrap; }
.quickbooks-connection-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.quickbooks-provider-card { min-width: 0; border-top: 5px solid var(--teal); }
.quickbooks-provider-heading { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; margin-bottom: 10px; }
.quickbooks-provider-heading h2 { margin: 0; font-size: 20px; }
.quickbooks-provider-mark { display: grid; width: 48px; height: 48px; place-items: center; border-radius: 12px; color: #fff; font-size: 12px; font-weight: 950; letter-spacing: -.02em; box-shadow: 0 8px 20px rgba(18, 68, 61, .14); }
.quickbooks-provider-mark.online { background: linear-gradient(145deg, #2ca01c, #16790c); }
.quickbooks-provider-mark.desktop { background: linear-gradient(145deg, #3a768f, #24536e); }
.quickbooks-state { display: inline-flex; align-items: center; width: fit-content; padding: 6px 9px; border-radius: 999px; background: #eef2f1; color: #66736e; font-size: 10px; font-weight: 900; white-space: nowrap; }
.quickbooks-state::before { width: 6px; height: 6px; margin-right: 6px; border-radius: 50%; background: currentColor; content: ''; }
.quickbooks-state.state-connected,
.quickbooks-state.state-completed { background: #e0f4ef; color: #157466; }
.quickbooks-state.state-error,
.quickbooks-state.state-failed { background: #fde9eb; color: #a9323c; }
.quickbooks-state.state-running,
.quickbooks-state.state-partial { background: #fff0dc; color: #9a570f; }
.quickbooks-metadata { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 16px 0; border: 1px solid var(--line); border-radius: 8px; background: #fafcfb; overflow: hidden; }
.quickbooks-metadata > div { min-width: 0; padding: 12px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.quickbooks-metadata > div:nth-child(even) { border-right: 0; }
.quickbooks-metadata > div:nth-last-child(-n+2) { border-bottom: 0; }
.quickbooks-metadata dt { margin-bottom: 4px; color: var(--muted); font-size: 9px; font-weight: 900; letter-spacing: .07em; text-transform: uppercase; }
.quickbooks-metadata dd { margin: 0; color: #2b1b14; font-size: 12px; font-weight: 800; overflow-wrap: anywhere; }
.quickbooks-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 15px 0; }
.quickbooks-actions form { margin: 0; }
.quickbooks-error-note { margin: 12px 0; padding: 10px 12px; border-radius: 7px; background: #fff2f2; color: #95343d; font-size: 11px; line-height: 1.5; overflow-wrap: anywhere; }
.quickbooks-settings { margin-top: 17px; padding-top: 14px; border-top: 1px solid var(--line); }
.quickbooks-settings summary { color: var(--teal); cursor: pointer; font-size: 12px; font-weight: 900; }
.quickbooks-settings[open] summary { margin-bottom: 14px; }
.quickbooks-settings .mini-form { padding: 15px; border: 1px solid var(--line); border-radius: 8px; background: #fafcfb; }
.quickbooks-settings .mini-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.quickbooks-settings .mini-fields label { width: auto; min-width: 0; }
.quickbooks-settings .check-option { display: flex; align-items: center; flex-direction: row; gap: 8px; padding: 9px; border-radius: 7px; background: #eef8f6; }
.quickbooks-settings .check-option input { width: auto; }
.quickbooks-settings .button.primary { width: 100%; justify-content: center; }
.quickbooks-desktop-steps { display: grid; gap: 7px; margin: 15px 0; }
.quickbooks-desktop-steps span { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 11px; font-weight: 700; }
.quickbooks-desktop-steps b { display: grid; width: 21px; height: 21px; place-items: center; border-radius: 50%; background: #e7f5f2; color: var(--teal); font-size: 10px; }
.quickbooks-provider-card code { display: block; margin-top: 4px; padding: 7px; border-radius: 5px; background: #eef2f1; color: #41504b; overflow-wrap: anywhere; }
.quickbooks-mapping-panel { margin-top: 18px; }
.quickbooks-mapping-panel .panel-heading { align-items: flex-end; }
.quickbooks-connection-tabs { display: flex; gap: 6px; }
.quickbooks-mapping-summary { display: flex; align-items: baseline; gap: 9px; margin: 15px 0; padding: 12px 14px; border-radius: 8px; background: #f2faf8; }
.quickbooks-mapping-summary strong { color: var(--teal); font-size: 22px; }
.quickbooks-mapping-summary span { color: var(--muted); font-size: 11px; font-weight: 700; }
.quickbooks-mapping-form { display: flex; min-width: 330px; gap: 7px; }
.quickbooks-mapping-form select { min-width: 0; }
.quickbooks-match { display: inline-flex; padding: 5px 8px; border-radius: 999px; background: #e0f4ef; color: #157466; font-size: 10px; font-weight: 900; }
.quickbooks-match.automatic { background: #eaf0f7; color: #496c91; }

@media (max-width: 1000px) {
    .quickbooks-connection-grid { grid-template-columns: 1fr; }
}

@media (max-width: 650px) {
    .quickbooks-guardrail { grid-template-columns: 1fr; gap: 3px; }
    .quickbooks-provider-heading { grid-template-columns: auto minmax(0, 1fr); }
    .quickbooks-provider-heading .quickbooks-state { grid-column: 2; }
    .quickbooks-metadata { grid-template-columns: 1fr; }
    .quickbooks-metadata > div { border-right: 0; }
    .quickbooks-metadata > div:nth-last-child(-n+2) { border-bottom: 1px solid var(--line); }
    .quickbooks-metadata > div:last-child { border-bottom: 0; }
    .quickbooks-settings .mini-fields { grid-template-columns: 1fr; }
    .quickbooks-mapping-panel .panel-heading { align-items: stretch; flex-direction: column; }
    .quickbooks-mapping-form { min-width: 260px; }
}

/* Learning Hub and student birthdays */
.learning-hub-header .eyebrow,
.birthday-page-header .eyebrow { display: block; margin-bottom: 7px; }
.learning-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}
.learning-summary-card {
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 5px 12px;
    padding: 18px 19px;
    border: 1px solid var(--line);
    border-top: 4px solid #708b83;
    border-radius: 9px;
    background: #fff;
    color: var(--ink);
    box-shadow: 0 10px 24px rgba(43, 27, 20, .04);
}
.learning-summary-card:hover,
.learning-summary-card.active { border-color: var(--teal); box-shadow: inset 0 0 0 1px var(--teal), 0 10px 24px rgba(43, 27, 20, .05); }
.learning-summary-card span { font-size: 12px; font-weight: 900; }
.learning-summary-card strong { grid-row: span 2; color: #2b1b14; font-size: 31px; line-height: 1; }
.learning-summary-card small { color: var(--muted); font-size: 10px; }
.learning-summary-card.learning-type-study_material { border-top-color: var(--teal); }
.learning-summary-card.learning-type-homework { border-top-color: var(--orange); }
.learning-summary-card.learning-type-learning_media { border-top-color: #7057a3; }
.learning-summary-card.learning-type-e_learning { border-top-color: #2869a7; }
.learning-workspace { display: grid; grid-template-columns: minmax(300px, .68fr) minmax(0, 1.32fr); align-items: start; gap: 18px; }
.learning-publisher,
.learning-library { min-width: 0; }
.learning-publisher { position: sticky; top: 18px; border-top: 4px solid var(--teal); }
.learning-publish-form { display: grid; gap: 14px; }
.learning-publish-form .form-grid.compact { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.learning-publish-form .optional { float: right; color: var(--muted); font-size: 9px; font-weight: 700; text-transform: none; }
.learning-publish-form [hidden] { display: none !important; }
.learning-publish-form .button { justify-content: center; }
.learning-filters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)) auto; align-items: end; gap: 10px; margin-bottom: 15px; padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: #f8faf9; }
.learning-resource-list { display: grid; gap: 11px; }
.learning-library .module-empty strong,
.learning-library .module-empty span,
.learning-publisher .module-empty strong,
.learning-publisher .module-empty span { display: block; }
.learning-library .module-empty span,
.learning-publisher .module-empty span { margin-top: 4px; }
.learning-resource-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: start;
    gap: 13px;
    padding: 16px;
    border: 1px solid var(--line);
    border-left: 4px solid var(--teal);
    border-radius: 8px;
    background: #fff;
}
.learning-resource-card.learning-type-homework { border-left-color: var(--orange); }
.learning-resource-card.learning-type-learning_media { border-left-color: #7057a3; }
.learning-resource-card.learning-type-e_learning { border-left-color: #2869a7; }
.learning-resource-card.unpublished { background: #f4f6f5; opacity: .78; }
.learning-resource-mark,
.portal-learning-icon {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: #e1f2ef;
    color: #176f64;
    font-size: 10px;
    font-weight: 950;
}
.learning-type-homework .learning-resource-mark,
.portal-learning-homework .portal-learning-icon { background: #fff0dd; color: #9a570e; }
.learning-type-learning_media .learning-resource-mark,
.portal-learning-learning_media .portal-learning-icon { background: #eee9f8; color: #6b4b9d; font-size: 16px; }
.learning-type-e_learning .learning-resource-mark,
.portal-learning-e_learning .portal-learning-icon { background: #e6f0fa; color: #2869a7; }
.learning-resource-copy { min-width: 0; }
.learning-resource-meta { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 7px; }
.learning-resource-meta span,
.learning-resource-meta b,
.learning-resource-meta em { padding: 4px 6px; border-radius: 5px; background: #edf6f4; color: #286d63; font-size: 8px; font-style: normal; font-weight: 900; text-transform: uppercase; }
.learning-resource-meta b { background: #f2f3f2; color: #56635e; }
.learning-resource-meta em { background: #f7e9e9; color: #9d4242; }
.learning-resource-copy h3 { margin: 0 0 6px; color: #2b1b14; font-size: 16px; }
.learning-resource-copy > p { margin: 0 0 9px; color: #495650; font-size: 12px; line-height: 1.55; }
.learning-resource-copy > small { display: block; margin-top: 9px; color: var(--muted); font-size: 9px; }
.learning-due { display: inline-flex; flex-wrap: wrap; gap: 5px 10px; padding: 7px 9px; border-radius: 6px; background: #fff4e4; color: #8d520e; font-size: 10px; }
.learning-due.past { background: #f9e8e9; color: #9a343d; }
.learning-resource-actions { min-width: 112px; display: grid; justify-items: stretch; gap: 7px; }
.learning-resource-actions .button { justify-content: center; }
.learning-resource-actions form { text-align: center; }
.link-button { padding: 3px; border: 0; background: transparent; color: var(--teal); font: inherit; font-size: 10px; font-weight: 800; cursor: pointer; }

.dashboard-birthday-panel { border-top: 4px solid var(--orange); }
.dashboard-birthday-list,
.birthday-upcoming-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.dashboard-birthday-list article,
.birthday-card { min-width: 0; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: #fffaf3; }
.dashboard-birthday-list article.today,
.birthday-card.today { border-color: var(--orange); background: #fff1df; box-shadow: inset 0 0 0 1px var(--orange); }
.dashboard-birthday-list time,
.birthday-card time { width: 43px; overflow: hidden; border: 1px solid #edc998; border-radius: 7px; background: #fff; text-align: center; }
.dashboard-birthday-list time strong,
.birthday-card time strong { display: block; padding: 4px; color: var(--brown); font-size: 16px; }
.dashboard-birthday-list time span,
.birthday-card time span { display: block; padding: 3px; background: var(--orange); color: #fff; font-size: 8px; font-weight: 900; }
.dashboard-birthday-list div > strong,
.dashboard-birthday-list div > span,
.dashboard-birthday-list div > small { display: block; }
.dashboard-birthday-list div > strong { color: #2b1b14; font-size: 11px; }
.dashboard-birthday-list div > span { margin-top: 3px; color: var(--muted); font-size: 9px; }
.dashboard-birthday-list div > small { margin-top: 5px; color: #aa6417; font-size: 8px; font-weight: 900; }
.birthday-upcoming-panel { border-top: 4px solid var(--orange); }
.birthday-card > div > span { color: #a46116; font-size: 9px; font-weight: 900; text-transform: uppercase; }
.birthday-card h3 { margin: 4px 0; color: #2b1b14; font-size: 13px; }
.birthday-card p { margin: 0; color: var(--muted); font-size: 10px; }
.birthday-month-panel { border-top: 4px solid var(--teal); }
.birthday-month-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 16px; }
.birthday-month-heading h2 { margin: 3px 0 4px; }
.birthday-month-heading p { margin: 0; }
.birthday-month-heading form { min-width: 190px; }
.birthday-table { min-width: 670px; }

.portal-profile-strip { grid-template-columns: auto minmax(170px, .65fr) minmax(520px, 1.6fr); }
.portal-profile-strip dl { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.portal-birthday-banner { display: flex; align-items: center; gap: 12px; padding: 12px 16px; margin: -3px 0 18px; border: 1px solid #edc998; border-radius: 8px; background: #fff8ec; }
.portal-birthday-banner > span { font-size: 27px; }
.portal-birthday-banner strong,
.portal-birthday-banner small { display: block; }
.portal-birthday-banner strong { color: var(--brown); font-size: 13px; }
.portal-birthday-banner small { margin-top: 3px; color: #9a621e; font-size: 10px; }
.portal-birthday-banner.today { border-color: var(--orange); background: #fff0dd; }
.portal-dashboard-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.portal-learning-preview { border-top: 3px solid #7057a3; }
.portal-learning-counts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.portal-learning-counts span { display: grid; justify-items: center; gap: 3px; padding: 9px 4px; border-radius: 6px; background: #f4f2f8; color: var(--muted); font-size: 8px; font-weight: 800; }
.portal-learning-counts strong { color: #604990; font-size: 18px; }
.portal-learning-preview > p { margin: 11px 0 0; color: #55625d; font-size: 10px; line-height: 1.45; }
.portal-learning-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 17px; }
.portal-learning-summary article { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; padding: 16px; border: 1px solid var(--line); border-top: 3px solid var(--teal); border-radius: 8px; background: #fff; }
.portal-learning-summary article:nth-child(2) { border-top-color: var(--orange); }
.portal-learning-summary article:nth-child(3) { border-top-color: #7057a3; }
.portal-learning-summary article:nth-child(4) { border-top-color: #2869a7; }
.portal-learning-summary span { color: #2b1b14; font-size: 11px; font-weight: 900; }
.portal-learning-summary strong { grid-row: span 2; color: var(--teal); font-size: 27px; line-height: 1; }
.portal-learning-summary small { color: var(--muted); font-size: 9px; }
.portal-learning-group { margin-bottom: 15px; }
.portal-learning-total { min-width: 29px; height: 29px; display: grid; place-items: center; border-radius: 50%; background: #edf3f1; color: var(--teal); font-size: 11px; font-weight: 900; }
.portal-learning-list { display: grid; gap: 9px; }
.portal-learning-card { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: start; gap: 13px; padding: 15px; border: 1px solid var(--line); border-radius: 8px; background: #fafcfb; }
.portal-learning-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 5px; }
.portal-learning-meta b,
.portal-learning-meta span { font-size: 9px; }
.portal-learning-meta b { color: var(--teal); }
.portal-learning-meta span { color: var(--muted); }
.portal-learning-card h3 { margin: 0 0 6px; color: #2b1b14; font-size: 15px; }
.portal-learning-card p { margin: 0; color: #4c5954; font-size: 11px; line-height: 1.55; }
.portal-homework-due { display: inline-flex; flex-wrap: wrap; gap: 7px; margin-top: 9px; padding: 6px 8px; border-radius: 5px; background: #fff0dc; color: #97560f; font-size: 9px; }
.portal-homework-due.past { background: #f9e7e9; color: #9d3740; }
.portal-learning-actions { min-width: 105px; display: grid; gap: 7px; }
.portal-learning-actions .button { justify-content: center; }
.portal-elearning-hero { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 23px 25px; margin-bottom: 17px; border-radius: 10px; background: linear-gradient(120deg, #173f67, #2869a7); color: #fff; box-shadow: 0 14px 30px rgba(31, 79, 126, .18); }
.portal-elearning-hero h3 { margin: 4px 0 6px; color: #fff; font-size: 24px; }
.portal-elearning-hero p { max-width: 690px; margin: 0; color: #d9ebfb; font-size: 12px; line-height: 1.55; }
.portal-elearning-hero > strong { min-width: 110px; color: #fff; font-size: 39px; line-height: 1; text-align: center; }
.portal-elearning-hero > strong small { display: block; margin-top: 6px; color: #d9ebfb; font-size: 9px; line-height: 1.3; text-transform: uppercase; }
.portal-elearning-group { border-top: 4px solid #2869a7; }

/* Events directory */
.events-page-header .eyebrow { display: block; margin-bottom: 7px; }
.events-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.events-summary article { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; padding: 17px; border: 1px solid var(--line); border-top: 3px solid var(--teal); border-radius: 8px; background: #fff; }
.events-summary article:nth-child(2) { border-top-color: var(--orange); }
.events-summary article:nth-child(3) { border-top-color: #7057a3; }
.events-summary article:nth-child(4) { border-top-color: #b77624; }
.events-summary span { color: #2b1b14; font-size: 11px; font-weight: 900; }
.events-summary strong { grid-row: span 2; color: var(--teal); font-size: 29px; line-height: 1; }
.events-summary small { color: var(--muted); font-size: 9px; }
.events-directory { border-top: 4px solid var(--teal); }
.events-filters { display: grid; grid-template-columns: repeat(3, minmax(150px, .75fr)) minmax(210px, 1fr); align-items: end; gap: 11px; margin-bottom: 17px; padding: 13px; border: 1px solid var(--line); border-radius: 8px; background: #f8faf9; }
.events-filters .button-row { justify-content: flex-end; }
.events-card-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
.event-directory-card { min-width: 0; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 13px; padding: 15px; border: 1px solid var(--line); border-left: 4px solid var(--teal); border-radius: 8px; background: #fff; }
.event-directory-school-holiday,
.event-directory-public-holiday { border-left-color: #ba5b4d; }
.event-directory-staff-event { border-left-color: #7057a3; }
.event-directory-observance { border-left-color: #b77624; }
.event-directory-card time { width: 52px; overflow: hidden; border: 1px solid #afd8d3; border-radius: 7px; background: #f4fbfa; text-align: center; }
.event-directory-card time strong { display: block; padding: 5px 4px 2px; color: #205e55; font-size: 19px; }
.event-directory-card time span { display: block; padding: 3px; background: var(--teal); color: #fff; font-size: 8px; font-weight: 900; }
.event-directory-card time small { display: block; padding: 3px; color: var(--muted); font-size: 8px; }
.event-directory-copy { min-width: 0; }
.event-directory-copy > div { display: flex; flex-wrap: wrap; gap: 5px; }
.event-directory-copy > div span,
.event-directory-copy > div b { padding: 4px 6px; border-radius: 5px; background: #edf6f4; color: #286d63; font-size: 8px; font-weight: 900; text-transform: uppercase; }
.event-directory-copy > div b { background: #fff0dc; color: #99570e; }
.event-directory-copy h3 { margin: 6px 0 4px; color: #2b1b14; font-size: 15px; }
.event-directory-copy p { margin: 0; color: #54615c; font-size: 10px; }
.event-directory-copy > small { display: block; margin-top: 6px; color: var(--muted); font-size: 9px; line-height: 1.4; }
.event-directory-actions { min-width: 76px; display: grid; gap: 6px; text-align: right; }
.event-directory-actions a { font-size: 9px; font-weight: 900; }
.events-directory .module-empty strong,
.events-directory .module-empty span { display: block; }
.events-directory .module-empty span { margin-top: 4px; }

@media (max-width: 1180px) {
    .learning-summary,
    .events-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .learning-workspace { grid-template-columns: minmax(280px, .8fr) minmax(0, 1.2fr); }
    .dashboard-birthday-list,
    .birthday-upcoming-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .portal-dashboard-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .portal-dashboard-grid > :last-child { grid-column: auto; }
    .portal-profile-strip { grid-template-columns: auto minmax(0, 1fr); }
    .portal-profile-strip dl { grid-column: 1 / -1; }
}

@media (max-width: 860px) {
    .learning-workspace { grid-template-columns: 1fr; }
    .learning-publisher { position: static; }
    .learning-resource-card { grid-template-columns: auto minmax(0, 1fr); }
    .learning-resource-actions { grid-column: 2; display: flex; flex-wrap: wrap; }
    .portal-dashboard-grid { grid-template-columns: 1fr; }
    .events-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .events-card-grid { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
    .learning-summary,
    .portal-learning-summary,
    .events-summary,
    .dashboard-birthday-list,
    .birthday-upcoming-grid { grid-template-columns: 1fr; }
    .learning-filters { grid-template-columns: 1fr; }
    .learning-publish-form .form-grid.compact { grid-template-columns: 1fr; }
    .learning-resource-card,
    .portal-learning-card { grid-template-columns: auto minmax(0, 1fr); }
    .learning-resource-actions,
    .portal-learning-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; }
    .learning-resource-actions .button,
    .portal-learning-actions .button { flex: 1 1 120px; }
    .birthday-month-heading { align-items: stretch; flex-direction: column; }
    .birthday-month-heading form { min-width: 0; }
    .portal-profile-strip dl { grid-template-columns: 1fr; }
    .portal-elearning-hero { align-items: flex-start; flex-direction: column; }
    .portal-elearning-hero > strong { min-width: 0; text-align: left; }
    .events-filters { grid-template-columns: 1fr; }
    .events-filters .button-row { justify-content: stretch; }
    .events-filters .button { flex: 1 1 0; justify-content: center; }
    .event-directory-card { grid-template-columns: auto minmax(0, 1fr); }
    .event-directory-actions { grid-column: 2; display: flex; text-align: left; }
}

/* Quiz management */
.quiz-page-header { margin-bottom: 18px; }
.quiz-summary {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}
.quiz-metric {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    min-height: 98px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: #fff;
    box-shadow: 0 8px 22px rgba(43,27,20,.035);
}
.quiz-metric > span {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: #e8f7f5;
    color: #087b79;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .04em;
}
.quiz-metric.metric-published > span { background: #fff2de; color: #a84f14; }
.quiz-metric.metric-attempts > span { background: #f0ecff; color: #6251a5; }
.quiz-metric.metric-average > span { background: #eaf2fc; color: #356aa0; font-size: 16px; }
.quiz-metric.metric-needs_marking > span { background: #edf7e8; color: #407b31; }
.quiz-metric small,.quiz-metric em { display: block; color: var(--muted); font-style: normal; }
.quiz-metric small { margin-bottom: 3px; font-size: 10px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.quiz-metric strong { display: block; font-size: 23px; line-height: 1.05; }
.quiz-metric em { margin-top: 4px; font-size: 10px; }
.quiz-dashboard-layout { display: grid; grid-template-columns: minmax(0, 2fr) minmax(350px, .72fr); gap: 18px; align-items: start; }
.quiz-list-panel,.quiz-create-panel { padding: 0; overflow: hidden; }
.quiz-list-panel > .panel-heading,.quiz-create-panel > .panel-heading,.quiz-attempts-panel > .panel-heading,.quiz-performance-panel > .panel-heading,.quiz-results-panel > .panel-heading { padding: 18px 20px 10px; }
.quiz-count-badge { min-width: 29px; height: 29px; display: grid; place-items: center; padding: 0 8px; border-radius: 15px; background: #f4ece7; color: var(--brown); font-size: 12px; font-weight: 900; }
.quiz-filters { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)) auto; align-items: end; gap: 10px; padding: 10px 20px 16px; border-bottom: 1px solid var(--line); background: #fbfcfc; }
.quiz-filters label,.quiz-settings-form label,.quiz-question-form > label,.quiz-question-toolbar label { display: grid; gap: 5px; color: #4e5c57; font-size: 10px; font-weight: 900; text-transform: uppercase; letter-spacing: .045em; }
.quiz-table,.quiz-attempt-table,.quiz-results-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.quiz-table th,.quiz-table td,.quiz-attempt-table th,.quiz-attempt-table td,.quiz-results-table th,.quiz-results-table td { padding: 12px 13px; border-bottom: 1px solid #e8edeb; text-align: left; vertical-align: middle; }
.quiz-table th,.quiz-attempt-table th,.quiz-results-table th { color: #6f7b76; background: #fafbfb; font-size: 9px; letter-spacing: .06em; text-transform: uppercase; }
.quiz-table tr:last-child td,.quiz-attempt-table tr:last-child td,.quiz-results-table tr:last-child td { border-bottom: 0; }
.quiz-status,.quiz-result { display: inline-flex; align-items: center; min-height: 22px; padding: 4px 8px; border-radius: 12px; font-size: 9px; font-weight: 900; letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; }
.quiz-status.status-published { background: #e0f5ed; color: #167153; }
.quiz-status.status-draft { background: #f2ece8; color: #725a4b; }
.quiz-status.status-closed { background: #e9edf0; color: #59656a; }
.quiz-result.passed { background: #e0f5ed; color: #167153; }
.quiz-result.failed { background: #fbe9e4; color: #9b3b27; }
.quiz-create-panel .mini-form { padding: 12px 20px 20px; }
.quiz-paired-fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.quiz-paired-fields label { min-width: 0; }
.quiz-paired-fields input,.quiz-paired-fields select { width: 100%; min-width: 0; padding-right: 7px; padding-left: 7px; font-size: 10px; }
.quiz-create-panel textarea { resize: vertical; }
.quiz-empty { display: grid; place-items: center; gap: 5px; min-height: 155px; padding: 30px; color: var(--muted); text-align: center; }
.quiz-empty strong { color: var(--ink); font-size: 15px; }
.quiz-empty span { font-size: 12px; }
.quiz-insights-grid { display: grid; grid-template-columns: minmax(0,1.55fr) minmax(300px,.8fr); gap: 18px; margin-top: 18px; }
.quiz-attempts-panel,.quiz-performance-panel { padding: 0; overflow: hidden; }
.quiz-performance-list { display: grid; gap: 15px; padding: 13px 20px 20px; }
.quiz-performance-list header { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 7px; font-size: 11px; }
.quiz-performance-list > div > span { height: 7px; display: block; overflow: hidden; border-radius: 4px; background: #edf1ef; }
.quiz-performance-list i { height: 100%; display: block; border-radius: inherit; background: linear-gradient(90deg,var(--teal),#65c7b4); }
.quiz-performance-list small { display: block; margin-top: 5px; color: var(--muted); font-size: 9px; }

/* Quiz editor */
.quiz-back-link { display: inline-block; margin-bottom: 8px; color: #7a6255; font-size: 11px; }
.quiz-editor-header .button-row form { display: inline-flex; }
.quiz-editor-header p { display: flex; align-items: center; gap: 6px; }
.quiz-setup-strip { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); margin-bottom: 14px; border: 1px solid var(--line); border-radius: 10px; background: #fff; box-shadow: 0 8px 25px rgba(43,27,20,.035); }
.quiz-setup-strip article { min-width: 0; padding: 14px 16px; border-left: 1px solid var(--line); }
.quiz-setup-strip article:first-child { border-left: 0; }
.quiz-setup-strip span,.quiz-results-summary span,.portal-quiz-summary span { display: block; margin-bottom: 5px; color: var(--muted); font-size: 9px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.quiz-setup-strip strong { display: block; overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.quiz-settings-panel { padding: 0; overflow: hidden; }
.quiz-settings-panel summary { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 15px 19px; cursor: pointer; list-style: none; }
.quiz-settings-panel summary::-webkit-details-marker { display: none; }
.quiz-settings-panel summary span:first-child { display: grid; gap: 3px; }
.quiz-settings-panel summary small { color: var(--muted); font-size: 10px; font-weight: 400; }
.quiz-settings-panel summary > span:last-child { color: var(--brown); font-size: 11px; font-weight: 900; }
.quiz-settings-form { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; padding: 18px; border-top: 1px solid var(--line); background: #fafcfb; }
.quiz-settings-form .wide { grid-column: span 2; }
.quiz-settings-form button { align-self: end; justify-self: start; }
.quiz-builder-layout { display: grid; grid-template-columns: minmax(0,2.1fr) minmax(250px,.72fr); gap: 18px; align-items: start; margin-top: 18px; }
.quiz-question-list { min-width: 0; }
.quiz-builder-heading { display: flex; justify-content: space-between; align-items: center; gap: 15px; margin-bottom: 12px; }
.quiz-builder-heading h2 { margin-bottom: 0; }
.quiz-question-card { padding: 0; overflow: hidden; scroll-margin-top: 18px; }
.quiz-question-card > header { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 12px 16px; border-bottom: 1px solid var(--line); background: #fbfcfb; }
.quiz-question-card > header > div { display: flex; align-items: center; gap: 8px; }
.quiz-question-card > header form { display: inline-flex; }
.quiz-question-card > header strong { color: #53615c; font-size: 11px; }
.quiz-question-number { width: 27px; height: 27px; display: grid; place-items: center; border-radius: 7px; background: var(--brown); color: #fff; font-size: 11px; font-weight: 900; }
.quiz-type-badge { padding: 5px 8px; border-radius: 12px; background: #e6f5f3; color: #147775; font-size: 9px; font-weight: 900; text-transform: uppercase; }
.quiz-icon-button { padding: 4px 6px; border: 0; background: transparent; color: #6c7773; cursor: pointer; font-size: 9px; font-weight: 900; text-transform: uppercase; }
.quiz-icon-button.danger { color: #a33f2e; }
.quiz-question-form { display: grid; gap: 14px; padding: 17px; }
.quiz-question-toolbar { display: grid; grid-template-columns: minmax(0,1fr) 100px; gap: 12px; }
.quiz-question-form textarea { resize: vertical; }
.quiz-answer-group { margin: 0; padding: 13px; border: 1px solid #dfe6e3; border-radius: 8px; background: #fafcfc; }
.quiz-answer-group legend { padding: 0 5px; color: #53615c; font-size: 10px; font-weight: 900; text-transform: uppercase; letter-spacing: .045em; }
.quiz-answer-group legend small { color: var(--muted); font-weight: 400; text-transform: none; }
.quiz-option-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
.quiz-option-row { display: grid; grid-template-columns: auto 25px minmax(0,1fr); align-items: center; gap: 8px; min-width: 0; }
.quiz-option-row > span { width: 25px; height: 25px; display: grid; place-items: center; border-radius: 6px; background: #eee7e3; color: var(--brown); font-size: 10px; font-weight: 900; }
.quiz-option-row > input:last-child { min-width: 0; }
.quiz-choice-row { display: flex; gap: 9px; }
.quiz-choice-row label { display: flex; align-items: center; gap: 6px; min-width: 130px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 7px; background: #fff; font-size: 12px; font-weight: 800; }
.quiz-checkbox { display: flex !important; grid-template-columns: auto 1fr; align-items: center; gap: 7px !important; margin-top: 9px; font-size: 11px !important; text-transform: none !important; }
.quiz-form-actions { display: flex; justify-content: flex-end; }
.quiz-add-card { border: 1px dashed #b7c7c1; box-shadow: none; }
.quiz-builder-sidebar { position: sticky; top: 18px; display: grid; gap: 14px; }
.quiz-outline-panel,.quiz-checklist-panel { padding: 17px; }
.quiz-outline-panel ol { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; }
.quiz-outline-panel li a { display: grid; grid-template-columns: 24px minmax(0,1fr); align-items: start; gap: 9px; padding: 8px; border-radius: 7px; color: var(--ink); }
.quiz-outline-panel li a:hover { background: #f5f8f7; }
.quiz-outline-panel li a > span { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; background: #eee7e3; color: var(--brown); font-size: 9px; }
.quiz-outline-panel strong,.quiz-outline-panel small { display: block; }
.quiz-outline-panel strong { overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.quiz-outline-panel small { margin-top: 3px; color: var(--muted); font-size: 8px; }
.quiz-outline-panel p,.quiz-checklist-panel p { margin: 8px 0 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
.quiz-checklist-panel ul { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.quiz-checklist-panel li { position: relative; padding-left: 22px; color: #7a8580; font-size: 11px; }
.quiz-checklist-panel li::before { content: ''; position: absolute; left: 0; top: -1px; width: 15px; height: 15px; border: 1px solid #bdc7c3; border-radius: 50%; }
.quiz-checklist-panel li.complete { color: #276b55; }
.quiz-checklist-panel li.complete::before { content: '\2713'; display: grid; place-items: center; border-color: #28926f; background: #28926f; color: #fff; font-size: 9px; }
.quiz-results-link { justify-content: center; }

/* Student quiz and results */
.quiz-preview-label { padding: 8px 11px; border-radius: 7px; background: #fff1dc; color: #98470f; font-size: 10px; font-weight: 900; text-transform: uppercase; }
.quiz-take-hero { padding: 25px; background: linear-gradient(135deg,#fff 0%,#f4fbfa 100%); }
.quiz-take-hero h2 { margin: 5px 0 7px; font-size: 25px; }
.quiz-take-hero > p { max-width: 750px; color: var(--muted); }
.quiz-take-meta { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 0; }
.quiz-take-meta span { min-width: 120px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--muted); font-size: 10px; }
.quiz-take-meta strong { display: block; color: var(--ink); font-size: 14px; }
.quiz-instructions { margin-top: 16px; padding: 13px 15px; border-left: 3px solid var(--teal); border-radius: 5px; background: #edf8f7; }
.quiz-instructions p { margin: 4px 0 0; color: #50645e; font-size: 12px; line-height: 1.55; }
.quiz-student-questions { display: grid; gap: 15px; max-width: 920px; margin: 18px auto; }
.quiz-student-question { padding: 0; overflow: hidden; }
.quiz-student-question > header,.quiz-answer-review article > header { display: flex; justify-content: space-between; gap: 12px; padding: 12px 17px; border-bottom: 1px solid var(--line); background: #fafcfc; color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .05em; }
.quiz-student-question h2,.quiz-student-question h3 { margin: 0; padding: 19px 20px; font-size: 16px; line-height: 1.45; }
.quiz-student-options { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; padding: 0 20px 20px; }
.quiz-student-options label { display: grid; grid-template-columns: auto 28px minmax(0,1fr); align-items: center; gap: 8px; min-height: 50px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; cursor: pointer; font-size: 12px; font-weight: 700; }
.quiz-student-options label:has(input:checked) { border-color: var(--teal); background: #eff9f8; box-shadow: 0 0 0 1px var(--teal); }
.quiz-student-options label > span { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 7px; background: #eee7e3; color: var(--brown); font-size: 10px; font-weight: 900; }
.quiz-student-options.compact { grid-template-columns: repeat(2,minmax(0,220px)); }
.quiz-short-response { display: grid; gap: 6px; padding: 0 20px 20px; color: var(--muted); font-size: 10px; font-weight: 900; text-transform: uppercase; }
.quiz-take-header { align-items: flex-end; }
.quiz-timer { min-width: 150px; padding: 10px 14px; border: 1px solid #badfd9; border-radius: 9px; background: #eef9f7; text-align: center; }
.quiz-timer span,.quiz-timer strong { display: block; }
.quiz-timer span { color: #4c6760; font-size: 9px; font-weight: 900; text-transform: uppercase; }
.quiz-timer strong { margin-top: 3px; color: #126f68; font-size: 23px; font-variant-numeric: tabular-nums; }
.quiz-timer.warning { border-color: #ecb286; background: #fff2e7; }
.quiz-timer.warning strong { color: #a6491d; }
.quiz-submit-bar { position: sticky; bottom: 0; z-index: 4; display: flex; justify-content: space-between; align-items: center; gap: 20px; max-width: 920px; margin: 15px auto 0; padding: 14px 17px; border: 1px solid var(--line); border-radius: 9px; background: rgba(255,255,255,.97); box-shadow: 0 -8px 25px rgba(43,27,20,.08); }
.quiz-submit-bar strong,.quiz-submit-bar span { display: block; }
.quiz-submit-bar span { margin-top: 3px; color: var(--muted); font-size: 10px; }
.quiz-results-summary,.portal-quiz-summary { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; margin-bottom: 18px; }
.quiz-results-summary article,.portal-quiz-summary article { padding: 17px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.quiz-results-summary strong,.portal-quiz-summary strong { display: block; font-size: 23px; }
.quiz-results-summary small,.portal-quiz-summary small { display: block; margin-top: 5px; color: var(--muted); font-size: 10px; }
.quiz-results-panel { padding: 0; overflow: hidden; }
.quiz-result-hero { display: grid; grid-template-columns: 160px minmax(0,1fr); align-items: center; gap: 25px; padding: 24px; border-left: 5px solid #aa4a32; }
.quiz-result-hero.passed { border-left-color: #27906f; }
.quiz-result-score { width: 135px; height: 135px; display: grid; place-content: center; border: 10px solid #f3d9d3; border-radius: 50%; text-align: center; }
.quiz-result-hero.passed .quiz-result-score { border-color: #d9efe7; }
.quiz-result-score strong { font-size: 29px; }
.quiz-result-score span { color: #9f3f2b; font-size: 10px; font-weight: 900; text-transform: uppercase; }
.quiz-result-hero.passed .quiz-result-score span { color: #167153; }
.quiz-result-hero h2 { margin: 5px 0 6px; font-size: 23px; }
.quiz-result-hero p { color: var(--muted); }
.quiz-result-hero small { color: #8a5c3d; font-weight: 700; }
.quiz-answer-review { display: grid; gap: 13px; max-width: 920px; margin: 18px auto; }
.quiz-answer-review article { padding: 0; overflow: hidden; border-left: 4px solid #ac4833; }
.quiz-answer-review article.correct { border-left-color: #27906f; }
.quiz-answer-review h3 { padding: 16px 18px; margin: 0; font-size: 14px; }
.quiz-answer-review dl { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; padding: 0 18px 16px; margin: 0; }
.quiz-answer-review dl div { padding: 11px; border-radius: 7px; background: #f6f8f7; }
.quiz-answer-review dt { margin-bottom: 4px; color: var(--muted); font-size: 9px; font-weight: 900; text-transform: uppercase; }
.quiz-answer-review dd { margin: 0; font-size: 12px; font-weight: 700; }
.quiz-answer-explanation { margin: 0; padding: 12px 18px; border-top: 1px solid var(--line); background: #fbfcfc; color: var(--muted); font-size: 11px; }
.quiz-answer-explanation strong { display: block; margin-bottom: 4px; color: var(--ink); }

/* Portal quizzes */
.portal-quiz-preview { grid-column: span 1; }
.portal-quiz-panel { padding: 19px; }
.portal-quiz-list { display: grid; gap: 10px; }
.portal-quiz-list > article { display: grid; grid-template-columns: 46px minmax(0,1fr) auto; align-items: center; gap: 14px; padding: 15px; border: 1px solid var(--line); border-radius: 9px; background: #fcfdfd; }
.portal-quiz-icon { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 10px; background: #e4f5f2; color: #117975; font-size: 11px; font-weight: 900; }
.portal-quiz-main h3 { margin: 5px 0; font-size: 14px; }
.portal-quiz-main > p { margin-bottom: 7px; color: var(--muted); font-size: 11px; }
.portal-quiz-meta { display: flex; flex-wrap: wrap; gap: 5px 12px; color: var(--muted); font-size: 9px; }
.portal-quiz-actions { min-width: 120px; display: grid; justify-items: end; gap: 7px; text-align: right; }
.portal-quiz-actions strong { color: #24735b; font-size: 11px; }
.portal-quiz-actions small { max-width: 150px; color: var(--muted); font-size: 9px; }

@media (max-width: 1180px) {
    .quiz-summary { grid-template-columns: repeat(3,minmax(0,1fr)); }
    .quiz-dashboard-layout,.quiz-builder-layout { grid-template-columns: 1fr; }
    .quiz-builder-sidebar { position: static; grid-template-columns: repeat(2,minmax(0,1fr)); }
    .quiz-results-link { grid-column: 1 / -1; }
    .quiz-settings-form { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media (max-width: 760px) {
    .quiz-summary { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .quiz-metric { grid-template-columns: 34px minmax(0,1fr); gap: 8px; padding: 12px 10px; }
    .quiz-metric > span { width: 34px; height: 34px; }
    .quiz-metric strong { font-size: 19px; }
    .quiz-filters,.quiz-insights-grid,.quiz-settings-form,.quiz-option-grid,.quiz-student-options,.quiz-results-summary,.portal-quiz-summary { grid-template-columns: 1fr; }
    .quiz-paired-fields,.quiz-question-toolbar { grid-template-columns: 1fr; }
    .quiz-setup-strip { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .quiz-setup-strip article { border-top: 1px solid var(--line); }
    .quiz-setup-strip article:nth-child(odd) { border-left: 0; }
    .quiz-setup-strip article:first-child,.quiz-setup-strip article:nth-child(2) { border-top: 0; }
    .quiz-settings-form .wide { grid-column: auto; }
    .quiz-builder-sidebar { grid-template-columns: 1fr; }
    .quiz-builder-heading { align-items: stretch; flex-direction: column; }
    .quiz-question-card > header { align-items: flex-start; }
    .quiz-question-card > header > div:last-child { flex-wrap: wrap; justify-content: flex-end; }
    .quiz-student-options.compact { grid-template-columns: 1fr; }
    .quiz-take-header { align-items: stretch; }
    .quiz-timer { width: 100%; }
    .quiz-submit-bar { align-items: stretch; flex-direction: column; }
    .quiz-submit-bar .button { justify-content: center; }
    .quiz-result-hero { grid-template-columns: 1fr; justify-items: center; text-align: center; }
    .quiz-answer-review dl { grid-template-columns: 1fr; }
    .portal-quiz-list > article { grid-template-columns: 38px minmax(0,1fr); align-items: start; }
    .portal-quiz-icon { width: 38px; height: 38px; }
    .portal-quiz-actions { grid-column: 2; justify-items: start; text-align: left; }
}

/* Student ID cards and library barcodes */
.student-form-photo { width: 82px; height: 82px; margin-top: 4px; border: 1px solid var(--line); border-radius: 8px; object-fit: cover; }
.student-id-page-header h1 { color: #2b1b14; }
.student-id-page-header p { margin: 0; }
.student-id-summary {
    display: grid;
    grid-template-columns: repeat(3,minmax(0,1fr));
    margin-bottom: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: var(--shadow);
}
.student-id-summary > div { display: grid; grid-template-columns: auto auto minmax(0,1fr); align-items: center; gap: 12px; padding: 16px 22px; border-left: 1px solid var(--line); }
.student-id-summary > div:first-child { border-left: 0; }
.student-id-summary-icon { display: grid; min-width: 38px; height: 38px; place-items: center; color: var(--teal); font-size: 11px; font-weight: 900; letter-spacing: 0; }
.student-id-summary-icon.ready,.student-id-summary-icon.missing { width: 30px; min-width: 30px; height: 30px; border-radius: 50%; color: #fff; font-size: 17px; letter-spacing: 0; }
.student-id-summary-icon.ready { background: var(--teal); }
.student-id-summary-icon.missing { background: var(--orange); }
.student-id-summary strong { color: var(--teal); font-size: 26px; }
.student-id-summary > div:last-child strong { color: var(--orange); }
.student-id-summary small { color: #495853; font-size: 12px; }
.student-id-workspace { display: grid; grid-template-columns: minmax(0,1.65fr) minmax(360px,1fr); gap: 18px; align-items: start; }
.student-id-workspace > .panel { min-width: 0; margin: 0; }
.student-id-student-panel > .panel-heading h2,.student-id-preview-panel > .panel-heading h2 { margin-bottom: 4px; color: #2b1b14; font-size: 20px; }
.student-id-student-panel > .panel-heading p,.student-id-preview-panel > .panel-heading p { margin: 0; font-size: 11px; }
.student-id-filters { display: grid; grid-template-columns: minmax(190px,1.3fr) minmax(130px,.7fr) minmax(150px,.75fr) auto; gap: 8px; margin: 14px 0; }
.student-id-filters label { min-width: 0; }
.student-id-filters input,.student-id-filters select,.student-id-filters .button { min-height: 38px; padding-top: 8px; padding-bottom: 8px; font-size: 12px; }
.student-id-table table { width: 100%; min-width: 660px; table-layout: fixed; font-size: 11px; }
.student-id-table th:nth-child(1) { width: 36px; }
.student-id-table th:nth-child(2) { width: 22%; }
.student-id-table th:nth-child(3) { width: 16%; }
.student-id-table th:nth-child(4) { width: 20%; }
.student-id-table th:nth-child(5) { width: 18%; }
.student-id-table th:nth-child(6) { width: 48px; }
.student-id-table th:nth-child(7) { width: 68px; }
.student-id-table th { padding: 9px 8px; color: var(--muted); font-size: 9px; letter-spacing: .055em; text-transform: uppercase; }
.student-id-table td { padding: 9px 8px; border-top: 1px solid #e2e8e5; overflow-wrap: anywhere; vertical-align: middle; }
.student-id-table tr.is-preview { background: #eff9f8; box-shadow: inset 3px 0 0 var(--teal); }
.student-id-table input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--teal); }
.student-id-person { display: grid; grid-template-columns: 34px minmax(0,1fr); align-items: center; gap: 9px; min-width: 0; }
.student-id-person img,.student-id-person span { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 6px; object-fit: cover; }
.student-id-person span { background: #f7e8dc; color: var(--brown); font-weight: 900; }
.student-id-person strong { font-size: 11px; }
.student-id-readiness { display: inline-flex; align-items: center; gap: 5px; color: var(--teal); font-weight: 900; }
.student-id-readiness i { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.student-id-readiness.suspended,.student-id-readiness.expired,.student-id-readiness.missing { color: #b76912; }
.student-id-table td > small { display: block; margin-top: 3px; color: var(--muted); font-size: 8px; }
.student-id-photo-state { display: grid; width: 22px; height: 22px; place-items: center; border-radius: 50%; color: #fff; font-size: 11px; font-weight: 900; }
.student-id-photo-state.ready { background: var(--teal); }
.student-id-photo-state.missing { background: var(--orange); }
.student-id-selection-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 14px; color: var(--muted); font-size: 11px; }
.student-id-selection-footer strong { color: #2b1b14; }
.student-id-preview-panel { border-top: 4px solid var(--orange); }
.student-id-preview-frame { margin-bottom: 13px; }
.student-id-library-note { display: grid; grid-template-columns: 23px minmax(0,1fr); align-items: start; gap: 9px; margin-bottom: 12px; padding: 10px 11px; border: 1px solid #8fcfca; border-radius: 7px; background: #f2faf9; color: #315f58; }
.student-id-library-note > span { display: grid; width: 20px; height: 20px; place-items: center; border-radius: 50%; background: var(--teal); color: #fff; font-size: 11px; font-weight: 900; }
.student-id-library-note p,.student-id-print-note p { margin: 0; font-size: 10px; line-height: 1.5; }
.student-id-photo-upload { margin-bottom: 9px; }
.student-id-photo-upload .button { width: 100%; justify-content: center; }
.student-id-photo-upload input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.student-id-generate-one { width: 100%; justify-content: center; }
.student-id-print-note { display: grid; grid-template-columns: 27px minmax(0,1fr); align-items: start; gap: 9px; margin-top: 13px; color: var(--muted); }
.student-id-print-note > span { color: #40534c; font-size: 23px; line-height: 1; }
.student-id-empty-preview { padding: 30px 10px; text-align: center; }
.student-id-empty-preview p { color: var(--muted); }

.student-id-card {
    container-type: inline-size;
    position: relative;
    display: grid;
    grid-template-rows: 31% 39% 19% 11%;
    width: 100%;
    aspect-ratio: 85.6 / 54;
    border: 1px solid #aeb8b4;
    border-radius: 2.5cqw;
    background: #fff;
    color: #101412;
    font-family: Arial,Helvetica,sans-serif;
    overflow: hidden;
}
.student-id-card > header { display: grid; grid-template-columns: 15cqw minmax(0,1fr); align-items: center; gap: 2cqw; padding: 1.4cqw 4cqw; border-bottom: 1.15cqw solid var(--orange); background: #2b1b14; color: #fff; }
.student-id-card > header > img { width: 14cqw; height: 14cqw; object-fit: contain; }
.student-id-card > header strong,.student-id-card > header span { display: block; white-space: nowrap; }
.student-id-card > header strong { font-size: 3.4cqw; line-height: 1.1; }
.student-id-card > header span { margin-top: .8cqw; color: #25b6b3; font-size: 3.8cqw; font-weight: 900; letter-spacing: .04em; }
.student-id-card-body { display: grid; grid-template-columns: 20cqw minmax(0,1fr); gap: 3.5cqw; padding: 2.3cqw 5cqw .5cqw; min-height: 0; }
.student-id-photo { width: 20cqw; height: 20cqw; overflow: hidden; border: 1px solid #c8d3cf; border-radius: 1.4cqw; background: #f7faf9; }
.student-id-photo img,.student-id-photo > span { display: grid; width: 100%; height: 100%; place-items: center; object-fit: cover; }
.student-id-photo > span { color: var(--teal); font-size: 7cqw; font-weight: 900; }
.student-id-details { min-width: 0; }
.student-id-details h2 { margin: 0 0 1.3cqw; overflow: hidden; color: #101412; font-size: 4.6cqw; line-height: 1.05; text-overflow: ellipsis; white-space: nowrap; }
.student-id-details dl { display: grid; gap: .45cqw; margin: 0; }
.student-id-details dl > div { display: grid; grid-template-columns: 25cqw minmax(0,1fr); gap: 1.5cqw; }
.student-id-details dt,.student-id-details dd { margin: 0; font-size: 2.5cqw; line-height: 1.15; }
.student-id-details dd { overflow: hidden; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.student-id-barcode { display: grid; grid-template-rows: minmax(0,1fr) auto; align-items: end; padding: 0 6cqw; }
.code128-barcode { display: block; width: 100%; height: 7.8cqw; fill: #050505; }
.student-id-barcode > strong { display: block; margin-top: .15cqw; font-size: 2.55cqw; line-height: 1; letter-spacing: .025em; text-align: center; }
.student-id-card > footer { display: flex; align-items: center; justify-content: space-between; gap: 3cqw; padding: .3cqw 5cqw 1cqw; }
.student-id-card > footer strong { color: #088a88; font-size: 2.7cqw; }
.student-id-card > footer span { font-size: 2.45cqw; white-space: nowrap; }

.student-id-print-body { margin: 0; background: #e9edf0; }
.student-id-print-toolbar { position: sticky; z-index: 5; top: 0; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 15px; padding: 14px 22px; border-bottom: 1px solid #d5ddda; background: rgba(255,255,255,.96); box-shadow: 0 6px 18px rgba(38,49,45,.08); }
.student-id-print-toolbar > span { color: #3f4c48; font-size: 13px; font-weight: 800; text-align: center; }
.student-id-print-toolbar .button:first-child { justify-self: start; }
.student-id-print-toolbar .button:last-child { justify-self: end; }
.student-id-print-pages { display: grid; justify-content: center; gap: 20px; padding: 26px; }
.student-id-sheet { display: grid; grid-template-columns: repeat(2,85.6mm); grid-auto-rows: 54mm; gap: 5mm 8mm; align-content: center; justify-content: center; width: 210mm; min-height: 297mm; padding: 12mm 14mm; background: #fff; box-shadow: 0 10px 32px rgba(29,40,36,.18); page-break-after: always; }
.student-id-sheet:last-child { page-break-after: auto; }
.student-id-cut-area { position: relative; width: 85.6mm; height: 54mm; }
.student-id-cut-area::before { content: ''; position: absolute; z-index: 2; inset: -1.5mm; border: .18mm dashed #b7bfbc; pointer-events: none; }
.student-id-cut-area .student-id-card { width: 85.6mm; height: 54mm; }

@media (max-width: 1150px) {
    .student-id-workspace { grid-template-columns: 1fr; }
    .student-id-preview-panel { border-top-width: 1px; border-left: 4px solid var(--orange); }
    .student-id-preview-frame { max-width: 580px; }
}
@media (max-width: 720px) {
    .student-id-summary { grid-template-columns: 1fr; }
    .student-id-summary > div { border-top: 1px solid var(--line); border-left: 0; }
    .student-id-summary > div:first-child { border-top: 0; }
    .student-id-filters { grid-template-columns: 1fr; }
    .student-id-selection-footer { align-items: stretch; flex-direction: column; }
    .student-id-selection-footer .button { justify-content: center; }
    .student-id-print-toolbar { grid-template-columns: 1fr 1fr; }
    .student-id-print-toolbar > span { grid-column: 1 / -1; grid-row: 2; }
    .student-id-print-pages { justify-content: start; overflow-x: auto; }
}
/* Invitation-only account signup */
.invitation-page-header { align-items: flex-end; }
.invitation-page-header .page-kicker { display: block; margin-bottom: 5px; color: var(--orange); font-size: 10px; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
.invitation-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.invitation-summary > article { min-width: 0; padding: 18px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); box-shadow: var(--shadow); }
.invitation-summary strong { display: block; overflow-wrap: anywhere; margin: 4px 0; color: var(--brown); font-size: clamp(20px, 2.1vw, 29px); }
.invitation-summary small { color: var(--muted); font-size: 10px; }
.invitation-compose-panel { overflow: hidden; padding: 0; border-top: 5px solid var(--orange); }
.invitation-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.invitation-section-heading h2 { margin: 0 0 4px; color: #2b1b14; }
.invitation-section-heading p { margin: 0; color: var(--muted); font-size: 11px; }
.invitation-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; padding: 20px; }
.invitation-form label { min-width: 0; }
.invitation-form label:nth-of-type(4) { grid-column: span 2; }
.optional-label { color: var(--muted); font-size: 9px; font-weight: 700; text-transform: uppercase; }
.invitation-submit { grid-column: span 2; display: flex; align-items: center; gap: 15px; padding-top: 4px; }
.invitation-submit > span { max-width: 580px; color: var(--muted); font-size: 10px; line-height: 1.5; }
.button[disabled] { cursor: not-allowed; opacity: .55; }
.invitation-register { padding: 0; overflow: hidden; }
.invitation-register .table-scroll { border: 0; border-radius: 0; }
.invitation-status-pending { background: #fff0dc; color: #99570e; }
.invitation-status-accepted { background: #def4eb; color: #146b52; }
.invitation-status-expired,.invitation-status-revoked { background: #e9edf0; color: #59656a; }
.invitation-signup-card { width: min(100%, 570px); }
.invitation-locked-details { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); overflow: hidden; border: 1px solid #cbe2de; border-radius: 9px; background: #f4faf9; }
.invitation-locked-details > div { min-width: 0; padding: 12px 14px; }
.invitation-locked-details > div + div { border-left: 1px solid #cbe2de; }
.invitation-locked-details > div:nth-child(3) { grid-column: span 2; border-top: 1px solid #cbe2de; border-left: 0; }
.invitation-locked-details span { display: block; margin-bottom: 3px; color: #59716b; font-size: 9px; font-weight: 900; letter-spacing: .07em; text-transform: uppercase; }
.invitation-locked-details strong { display: block; overflow-wrap: anywhere; color: #174d49; font-size: 12px; }
.invitation-signup-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.invitation-signup-form label:nth-of-type(-n+2),.invitation-signup-form .button { grid-column: span 2; }
.invitation-expiry-note,.invitation-help { margin: -8px 0 0; color: var(--muted); font-size: 10px; line-height: 1.5; text-align: center; }

@media (max-width: 760px) {
    .invitation-page-header { align-items: stretch; }
    .invitation-page-header .button { justify-content: center; }
    .invitation-summary,.invitation-form,.invitation-signup-form { grid-template-columns: 1fr; }
    .invitation-form label:nth-of-type(4),.invitation-submit,.invitation-signup-form label:nth-of-type(-n+2),.invitation-signup-form .button { grid-column: auto; }
    .invitation-submit,.invitation-section-heading { align-items: stretch; flex-direction: column; }
    .invitation-submit .button { justify-content: center; width: 100%; }
    .invitation-locked-details { grid-template-columns: 1fr; }
    .invitation-locked-details > div + div { border-top: 1px solid #cbe2de; border-left: 0; }
    .invitation-locked-details > div:nth-child(3) { grid-column: auto; }
}

@media print {
    .student-id-print-body { background: #fff; }
    .student-id-print-toolbar { display: none; }
    .student-id-print-pages { display: block; padding: 0; }
    .student-id-sheet { margin: 0; box-shadow: none; }
    .student-id-card { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
}

/* Virtual Labs */
.virtual-labs-header { margin-bottom: 18px; }
.virtual-labs-header p,.virtual-lab-run-header p { margin-bottom: 0; }
.virtual-lab-filter-panel { padding: 15px 18px; box-shadow: none; }
.virtual-lab-filter-panel form { display: grid; grid-template-columns: minmax(230px,1.4fr) minmax(160px,.8fr) minmax(150px,.7fr) auto; align-items: end; gap: 12px; }
.virtual-lab-filter-panel label,.virtual-lab-progress-filter label { color: var(--muted); font-size: 11px; font-weight: 800; }
.virtual-lab-filter-panel input,.virtual-lab-filter-panel select,.virtual-lab-progress-filter select { min-height: 40px; margin-top: 5px; }
.virtual-lab-catalogue-layout { display: grid; grid-template-columns: minmax(0,1.55fr) minmax(360px,.95fr); gap: 20px; align-items: start; }
.virtual-lab-section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.virtual-lab-section-heading h2 { margin-bottom: 10px; color: #2b1b14; font-size: 21px; }
.virtual-lab-section-heading span { color: var(--muted); font-size: 12px; }
.virtual-lab-list { overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); }
.virtual-lab-list article { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 12px; min-height: 95px; padding: 9px 12px 9px 14px; border-top: 1px solid var(--line); }
.virtual-lab-list article:first-child { border-top: 0; }
.virtual-lab-list article.selected { box-shadow: inset 4px 0 0 var(--teal); background: #eff9f8; }
.virtual-lab-list-main { display: grid; grid-template-columns: 96px minmax(0,1fr); align-items: center; gap: 15px; color: var(--ink); font-weight: 400; }
.virtual-lab-list-main > span:last-child { min-width: 0; }
.virtual-lab-list-main strong,.virtual-lab-list-main b,.virtual-lab-list-main small,.virtual-lab-list-main em { display: block; }
.virtual-lab-list-main strong { margin-bottom: 4px; color: #2b1b14; font-size: 15px; }
.virtual-lab-list-main b { margin-bottom: 5px; color: var(--teal); font-size: 11px; }
.virtual-lab-list-main small { overflow: hidden; color: #41504b; font-size: 11px; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
.virtual-lab-list-main em { margin-top: 4px; color: var(--teal); font-size: 10px; font-style: normal; font-weight: 800; }
.virtual-lab-thumb { display: grid; width: 96px; height: 72px; place-items: center; overflow: hidden; border: 1px solid #e1e7e4; border-radius: 6px; background: #f8faf9; }
.virtual-lab-thumb svg { width: 88px; height: 66px; fill: none; stroke: #35443f; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.virtual-lab-thumb svg .accent,.virtual-lab-feature-visual svg .accent { stroke: var(--teal); stroke-width: 2.5; }
.virtual-lab-thumb svg .fill-one,.virtual-lab-feature-visual svg .fill-one { fill: rgba(230,137,37,.38); stroke: var(--orange); }
.virtual-lab-thumb svg .fill-two,.virtual-lab-feature-visual svg .fill-two { fill: rgba(27,163,164,.3); stroke: var(--teal); }
.virtual-lab-thumb svg .fill-soft,.virtual-lab-feature-visual svg .fill-soft { fill: #dff3ef; stroke: var(--teal); }
.virtual-lab-feature { margin: 34px 0 0; border-top: 4px solid var(--orange); box-shadow: none; }
.virtual-lab-feature-heading { margin-bottom: 10px; }
.virtual-lab-feature-heading h2 { margin-bottom: 4px; color: #2b1b14; font-size: 24px; }
.virtual-lab-feature-heading span { color: var(--teal); font-size: 12px; font-weight: 900; }
.virtual-lab-feature-visual { display: grid; min-height: 250px; place-items: center; margin-bottom: 13px; overflow: hidden; border: 1px solid var(--line); border-radius: 7px; background: #f8faf9; }
.virtual-lab-feature-visual svg { width: min(90%,360px); height: 230px; fill: none; stroke: #35443f; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.virtual-lab-feature dl { margin: 0 0 13px; border: 1px solid var(--line); border-radius: 7px; }
.virtual-lab-feature dl > div { display: grid; grid-template-columns: 125px minmax(0,1fr); gap: 12px; padding: 10px 12px; border-top: 1px solid var(--line); }
.virtual-lab-feature dl > div:first-child { border-top: 0; }
.virtual-lab-feature dt,.virtual-lab-feature dd { margin: 0; font-size: 11px; }
.virtual-lab-feature dt { font-weight: 900; }
.virtual-lab-feature dd { color: var(--muted); }
.virtual-lab-feature > .button { justify-content: center; width: 100%; }
.virtual-lab-child-switcher { display: flex; gap: 10px; margin: -4px 0 18px; overflow-x: auto; }
.virtual-lab-child-switcher a { display: grid; min-width: 180px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 7px; background: #fff; color: var(--ink); }
.virtual-lab-child-switcher a.active { border-color: var(--teal); background: #eff9f8; }
.virtual-lab-child-switcher strong { font-size: 12px; }
.virtual-lab-child-switcher span { color: var(--muted); font-size: 10px; font-weight: 400; }
.virtual-lab-progress-filter { display: flex; align-items: end; gap: 10px; margin: 14px 0; }
.virtual-lab-progress-filter label { width: min(100%,300px); }
.virtual-lab-progress-panel td small { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; }
.virtual-lab-progress-grid { border-top: 1px solid var(--line); }
.virtual-lab-progress-grid article { display: grid; grid-template-columns: 34px minmax(0,1fr) auto; align-items: center; gap: 12px; padding: 13px 2px; border-bottom: 1px solid var(--line); }
.virtual-lab-progress-grid article > div > strong,.virtual-lab-progress-grid article > div > span,.virtual-lab-progress-grid article > div > small { display: block; }
.virtual-lab-progress-grid article > div > strong { font-size: 13px; }
.virtual-lab-progress-grid article > div > span,.virtual-lab-progress-grid article > div > small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.virtual-lab-progress-mark { display: grid; width: 30px; height: 30px; place-items: center; border: 1px solid var(--line); border-radius: 50%; color: var(--muted); }
.virtual-lab-progress-mark.complete { border-color: var(--teal); background: var(--teal); color: #fff; }

.virtual-lab-back { display: inline-flex; margin-bottom: 12px; color: var(--teal); font-size: 12px; }
.virtual-lab-run-header { align-items: flex-end; margin-bottom: 16px; }
.virtual-lab-run-grid { display: grid; grid-template-columns: minmax(0,1.35fr) minmax(350px,.95fr); gap: 18px; align-items: start; }
.virtual-lab-run-main,.virtual-lab-run-side { min-width: 0; }
.virtual-lab-apparatus-panel,.virtual-lab-data-panel,.virtual-lab-control-panel,.virtual-lab-observation-panel { box-shadow: none; }
.virtual-lab-apparatus-panel h2,.virtual-lab-data-panel h2,.virtual-lab-observation-panel h2 { color: #2b1b14; }
.virtual-lab-canvas { width: 100%; aspect-ratio: 720/420; overflow: hidden; border: 1px solid #e2e8e5; border-radius: 6px; background: #fbfcfc; }
.virtual-lab-canvas svg { display: block; width: 100%; height: 100%; }
.virtual-lab-measurements { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.virtual-lab-measurements > div { padding: 0 12px; border-left: 1px solid var(--line); }
.virtual-lab-measurements > div:first-child { padding-left: 0; border-left: 0; }
.virtual-lab-measurements span { display: block; color: #3f4d48; font-size: 10px; }
.virtual-lab-measurements strong { display: inline-block; margin-top: 5px; color: var(--teal); font-size: 24px; line-height: 1; }
.virtual-lab-measurements small { margin-left: 4px; color: #2b1b14; font-size: 11px; font-weight: 800; }
.virtual-lab-plot-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; }
.virtual-lab-plot-heading h2 { margin-bottom: 0; font-size: 15px; }
.virtual-lab-plot-heading span { color: var(--teal); font-size: 10px; font-weight: 900; }
.virtual-lab-plot { display: block; width: 100%; min-height: 180px; margin-top: 7px; }
.virtual-lab-run-side { position: sticky; top: 15px; }
.virtual-lab-control-panel { display: grid; gap: 0; padding-top: 4px; }
.virtual-lab-control { display: grid; gap: 8px; padding: 14px 0; border-top: 1px solid var(--line); }
.virtual-lab-control:first-child { border-top: 0; }
.virtual-lab-control > span { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.virtual-lab-control strong { color: #2b1b14; font-size: 14px; }
.virtual-lab-control output { color: var(--teal); font-size: 17px; font-weight: 900; text-align: right; }
.virtual-lab-control > small { display: flex; justify-content: space-between; color: var(--muted); font-size: 9px; }
.virtual-lab-control input[type=range] { width: 100%; accent-color: var(--teal); }
.virtual-lab-control select { min-height: 40px; }
.virtual-lab-observation-panel form { display: grid; gap: 12px; }
.virtual-lab-observation-panel textarea { resize: vertical; }
.virtual-lab-observation-panel .button { justify-content: center; }
.virtual-lab-observation-panel p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
.virtual-lab-objective { display: grid; grid-template-columns: 24px minmax(0,1fr); align-items: center; gap: 10px; padding: 12px 14px; border: 1px solid #8fcfca; border-radius: 7px; background: #f2faf9; }
.virtual-lab-objective > span { display: grid; width: 22px; height: 22px; place-items: center; border-radius: 50%; background: var(--teal); color: #fff; font-weight: 900; }
.virtual-lab-objective p { margin: 0; font-size: 12px; }

#virtual-lab-visual text,#virtual-lab-plot text { font-family: Arial,Helvetica,sans-serif; fill: var(--ink); }
#virtual-lab-visual .lab-grid line,#virtual-lab-plot .lab-grid line { stroke: #edf1ef; stroke-width: 1; }
.lab-axis { stroke: #6f7c77; stroke-width: 1.4; }
.lab-zero { stroke: #9ca8a3; stroke-width: 1; stroke-dasharray: 5 5; }
.lab-data-line { fill: none; stroke: var(--teal); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.lab-data-line.graph-main { stroke-width: 4; }
.lab-data-point { fill: var(--orange); stroke: #fff; stroke-width: 2; }
.lab-bench { fill: #ba8b66; stroke: #7f5436; stroke-width: 2; }
.lab-metal { fill: #c7cdca; stroke: #65716d; stroke-width: 2; }
.lab-metal-dark { fill: #49534f; stroke: #212724; stroke-width: 2; }
.lab-guide { stroke: #9ba6a2; stroke-width: 1.5; stroke-dasharray: 6 7; }
.lab-string { stroke: #171b19; stroke-width: 3; }
.lab-angle { fill: none; stroke: var(--teal); stroke-width: 3; }
.lab-bob { stroke: #254a46; stroke-width: 2; }
.lab-caption { font-size: 15px; font-weight: 700; fill: #55635e !important; }
.lab-label { font-size: 15px; font-weight: 800; }
.lab-label.accent { fill: var(--teal) !important; }
.lab-value { font-size: 24px; font-weight: 900; fill: var(--teal) !important; }
.lab-glass { fill: rgba(255,255,255,.35); stroke: #66746f; stroke-width: 3; }
.lab-scale-number { fill: #fff !important; font-size: 12px; font-weight: 900; }
.lab-marker { fill: var(--ink); }
.lab-plot-value { font-size: 16px; font-weight: 900; fill: var(--teal) !important; }
.lab-plot-label { font-size: 11px; fill: var(--muted) !important; }
.lab-scale-label { font-size: 11px; fill: var(--muted) !important; }
.lab-microscope-ring { fill: #f8faf9; stroke: #3d4c47; stroke-width: 12; }
.lab-cell-wall { fill: rgba(132,190,79,.34); stroke: #4b8738; stroke-width: 3; }
.lab-animal-cell { fill: rgba(230,137,37,.24); stroke: #a2591f; stroke-width: 3; }
.lab-cell-nucleus { fill: rgba(103,72,153,.65); stroke: #674899; stroke-width: 2; }
.lab-vacuole { fill: rgba(98,190,201,.28); stroke: #62aeb8; stroke-width: 2; }
.lab-organelle { fill: var(--orange); }
.lab-bar { fill: var(--teal); }
.lab-bar-track { fill: #edf1ef; }
.lab-bar-label { font-size: 12px; font-weight: 800; }
.lab-wire { stroke: #68746f; stroke-width: 8; stroke-linecap: round; }
.lab-wire.on { stroke: var(--teal); }
.lab-gate { fill: #f4f7f6; stroke: #35413d; stroke-width: 5; }
.lab-input,.lab-output { fill: #e8edeb; stroke: #68746f; stroke-width: 4; }
.lab-input.on,.lab-output.on { fill: var(--teal); stroke: #117b7c; }
.lab-node-text { fill: #fff !important; font-size: 21px; font-weight: 900; }
.lab-gate-label { font-size: 28px; font-weight: 900; fill: var(--brown) !important; }
.lab-table-head { font-size: 13px; font-weight: 900; }
.lab-table-cell { font-size: 13px; font-weight: 800; }
.lab-table-selected { fill: rgba(27,163,164,.14); }
.lab-table-line { stroke: var(--line); }
.lab-sun { fill: #f6c251; stroke: #e29b25; stroke-width: 3; }
.lab-mountain { fill: #98a8a1; stroke: #61726b; stroke-width: 2; }
.lab-vegetation { fill: #5d9d55; }
.lab-water { fill: #65b8c9; stroke: #368ea3; stroke-width: 2; }
.lab-cloud { fill: #fff; stroke: #76918b; stroke-width: 3; }
.lab-cycle-arrow { fill: none; stroke: var(--teal); stroke-width: 7; stroke-linecap: round; stroke-dasharray: 14 12; }
.lab-rain { stroke: #398bb9; stroke-width: 6; stroke-linecap: round; }

@media (max-width: 1120px) {
    .virtual-lab-catalogue-layout,.virtual-lab-run-grid { grid-template-columns: 1fr; }
    .virtual-lab-feature { margin-top: 0; }
    .virtual-lab-run-side { position: static; display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
}
@media (max-width: 760px) {
    .virtual-labs-header,.virtual-lab-run-header { align-items: stretch; flex-direction: column; }
    .virtual-labs-header .button-row,.virtual-lab-run-header .button-row { justify-content: stretch; }
    .virtual-labs-header .button,.virtual-lab-run-header .button { flex: 1; justify-content: center; }
    .virtual-lab-filter-panel form { grid-template-columns: 1fr; }
    .virtual-lab-list article { grid-template-columns: 1fr; }
    .virtual-lab-list article > .button { justify-content: center; }
    .virtual-lab-list-main { grid-template-columns: 74px minmax(0,1fr); }
    .virtual-lab-thumb { width: 74px; height: 62px; }
    .virtual-lab-thumb svg { width: 70px; height: 56px; }
    .virtual-lab-list-main small { white-space: normal; }
    .virtual-lab-run-side { grid-template-columns: 1fr; }
    .virtual-lab-measurements { grid-template-columns: repeat(2,minmax(0,1fr)); row-gap: 14px; }
    .virtual-lab-measurements > div:nth-child(3) { padding-left: 0; border-left: 0; }
    .virtual-lab-canvas { min-height: 260px; aspect-ratio: auto; }
    .virtual-lab-progress-grid article { grid-template-columns: 34px minmax(0,1fr); }
    .virtual-lab-progress-grid article .button { grid-column: 1 / -1; justify-content: center; }
}
@page { size: A4 portrait; margin: 0; }

/* Alumni management */
.alumni-page-header .eyebrow,.alumni-profile-header .eyebrow,.alumni-form-header .eyebrow,.alumni-graduate-header .eyebrow,
.alumni-add-panel > .eyebrow,.alumni-engagement-summary > .eyebrow,.alumni-quick-update > .eyebrow,
.alumni-record-engagement > .eyebrow,.alumni-graduation-filter .eyebrow {
    display: block;
    margin-bottom: 6px;
    color: var(--teal);
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .11em;
    text-transform: uppercase;
}
.alumni-page-header h1,.alumni-profile-header h1,.alumni-form-header h1,.alumni-graduate-header h1 { color: #2b1b14; }
.alumni-page-header p,.alumni-profile-header p,.alumni-form-header p,.alumni-graduate-header p { margin: 0; }
.alumni-summary-strip {
    display: grid;
    grid-template-columns: repeat(5,minmax(0,1fr));
    margin-bottom: 18px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: #fff;
    box-shadow: var(--shadow);
    overflow: hidden;
}
.alumni-summary-strip > div { min-width: 0; padding: 17px 18px; border-left: 1px solid var(--line); }
.alumni-summary-strip > div:first-child { border-left: 0; }
.alumni-summary-strip span,.alumni-summary-strip small { display: block; color: var(--muted); font-size: 10px; font-weight: 800; }
.alumni-summary-strip span { margin-bottom: 7px; letter-spacing: .045em; text-transform: uppercase; }
.alumni-summary-strip strong { display: block; margin-bottom: 4px; color: #2b1b14; font-size: 28px; line-height: 1; }
.alumni-summary-strip > div:nth-child(2) strong,.alumni-summary-strip > div:nth-child(4) strong { color: var(--orange); }
.alumni-dashboard-grid { display: grid; grid-template-columns: minmax(0,2.45fr) minmax(280px,.85fr); gap: 18px; margin-bottom: 18px; align-items: start; }
.alumni-dashboard-grid > .panel,.alumni-insights-grid > .panel,.alumni-profile-layout .panel { margin-bottom: 0; }
.alumni-section-heading { margin-bottom: 14px; }
.alumni-section-heading h2 { margin: 0; color: #2b1b14; font-size: 20px; }
.alumni-directory-filters { display: grid; grid-template-columns: minmax(210px,1.5fr) repeat(3,minmax(120px,.72fr)) auto; gap: 8px; margin-bottom: 15px; }
.alumni-directory-filters label { min-width: 0; }
.alumni-directory-filters input,.alumni-directory-filters select,.alumni-directory-filters .button { min-height: 38px; padding-top: 8px; padding-bottom: 8px; font-size: 12px; }
.alumni-directory-table table { min-width: 820px; font-size: 12px; }
.alumni-directory-table th { color: #66736e; font-size: 9px; letter-spacing: .06em; text-transform: uppercase; }
.alumni-directory-table th,.alumni-directory-table td { padding: 11px 9px; vertical-align: middle; }
.alumni-directory-table td { border-top: 1px solid #e6ecea; }
.alumni-person { display: grid; grid-template-columns: 34px minmax(0,1fr); align-items: center; gap: 9px; min-width: 165px; }
.alumni-person > span { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 50%; background: #f7e8dc; color: var(--brown); font-size: 10px; font-weight: 900; }
.alumni-person strong,.alumni-person small { display: block; }
.alumni-person small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.alumni-view-link { display: inline-flex; padding: 6px 9px; border: 1px solid #bddbd5; border-radius: 6px; color: #16766f; font-size: 11px; }
.alumni-status { white-space: nowrap; }
.alumni-status.status-mentor { background: #fff0dc; color: #99570e; }
.alumni-status.status-donor { background: #f2e9fa; color: #69408c; }
.alumni-status.status-connected { background: #def4eb; color: #146b52; }
.alumni-status.status-contactable { background: #e9f7f7; color: #116b6c; }
.alumni-status.status-not-contacted { background: #f2ece8; color: #725a4b; }
.alumni-status.status-inactive { background: #e9edf0; color: #59656a; }
.alumni-add-panel { border-top: 5px solid var(--orange); }
.alumni-add-panel h2 { margin-bottom: 7px; color: #2b1b14; font-size: 21px; }
.alumni-add-panel > p { margin-bottom: 16px; color: var(--muted); font-size: 12px; line-height: 1.55; }
.alumni-add-panel .mini-form { gap: 10px; }
.alumni-add-panel .mini-form label { font-size: 11px; }
.alumni-add-panel .mini-form input,.alumni-add-panel .mini-form select { min-height: 38px; padding: 8px 10px; font-size: 12px; }
.alumni-add-panel .button { width: 100%; justify-content: center; }
.alumni-add-panel small { color: var(--muted); font-size: 10px; line-height: 1.5; }
.alumni-mini-empty { display: grid; gap: 12px; }
.alumni-insights-grid { display: grid; grid-template-columns: minmax(0,1.35fr) minmax(330px,1fr); gap: 18px; }
.alumni-cohort-bars { display: grid; gap: 13px; }
.alumni-cohort-bars article { display: grid; grid-template-columns: 145px minmax(100px,1fr) 42px; align-items: center; gap: 12px; }
.alumni-cohort-bars article > div:first-child strong,.alumni-cohort-bars article > div:first-child span { display: block; }
.alumni-cohort-bars article > div:first-child strong { color: #2b1b14; font-size: 12px; }
.alumni-cohort-bars article > div:first-child span { margin-top: 2px; color: var(--muted); font-size: 9px; }
.alumni-reach-track { height: 8px; border-radius: 999px; background: #edf1ef; overflow: hidden; }
.alumni-reach-track i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg,var(--brown),var(--orange)); }
.alumni-cohort-bars b { color: var(--brown); font-size: 11px; text-align: right; }
.alumni-recent-list { display: grid; }
.alumni-recent-list article { display: grid; grid-template-columns: 9px minmax(0,1fr) auto; align-items: start; gap: 10px; padding: 10px 0; border-top: 1px solid #e6ecea; }
.alumni-recent-list article:first-child { padding-top: 0; border-top: 0; }
.alumni-activity-icon { width: 8px; height: 8px; margin-top: 5px; border-radius: 50%; background: var(--orange); box-shadow: 0 0 0 4px #fff0dc; }
.alumni-recent-list strong { font-size: 12px; }
.alumni-recent-list p { margin: 3px 0 0; color: var(--muted); font-size: 10px; }
.alumni-recent-list time { color: var(--muted); font-size: 9px; white-space: nowrap; }
.alumni-empty-state { display: grid; justify-items: center; gap: 7px; padding: 35px 20px; text-align: center; }
.alumni-empty-state p { margin: 0; color: var(--muted); }

.alumni-back-link { display: inline-flex; margin-bottom: 14px; color: var(--muted); font-size: 12px; }
.alumni-profile-header { margin-bottom: 16px; }
.alumni-identity-band { display: grid; grid-template-columns: auto minmax(170px,.75fr) minmax(0,2fr); align-items: center; gap: 18px; margin-bottom: 18px; padding: 18px 20px; border: 1px solid #d8c7bc; border-radius: 9px; background: linear-gradient(100deg,#fff8f1 0%,#fff 62%); box-shadow: var(--shadow); }
.alumni-profile-avatar { display: grid; width: 62px; height: 62px; place-items: center; border-radius: 50%; background: #2b1b14; color: #fff; font-size: 18px; font-weight: 900; }
.alumni-identity-band > div small,.alumni-identity-band > div strong,.alumni-identity-band > div span { display: block; }
.alumni-identity-band > div small { margin-bottom: 4px; color: var(--orange); font-size: 9px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.alumni-identity-band > div strong { color: #2b1b14; font-size: 19px; }
.alumni-identity-band > div span { margin-top: 4px; color: var(--muted); font-size: 11px; }
.alumni-identity-band > dl { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); margin: 0; }
.alumni-identity-band > dl > div { min-width: 0; padding: 4px 13px; border-left: 1px solid #e7ddd7; }
.alumni-identity-band dt,.alumni-detail-grid dt { margin-bottom: 5px; color: var(--muted); font-size: 9px; font-weight: 900; letter-spacing: .05em; text-transform: uppercase; }
.alumni-identity-band dd { margin: 0; overflow-wrap: anywhere; font-size: 11px; font-weight: 800; }
.alumni-profile-layout { display: grid; grid-template-columns: minmax(0,1.8fr) minmax(285px,.75fr); gap: 18px; align-items: start; }
.alumni-profile-layout > main,.alumni-profile-layout > aside { display: grid; gap: 18px; min-width: 0; }
.alumni-detail-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0; margin: 0; border: 1px solid #e2e8e5; border-radius: 8px; overflow: hidden; }
.alumni-detail-grid > div { min-width: 0; padding: 14px; border-top: 1px solid #e2e8e5; border-left: 1px solid #e2e8e5; }
.alumni-detail-grid > div:nth-child(-n+2) { border-top: 0; }
.alumni-detail-grid > div:nth-child(odd) { border-left: 0; }
.alumni-detail-grid dd { margin: 0; color: #2b1b14; font-size: 13px; font-weight: 800; overflow-wrap: anywhere; }
.alumni-engagement-metrics { display: grid; gap: 8px; }
.alumni-engagement-metrics > div { padding: 12px; border: 1px solid #e2e8e5; border-radius: 8px; background: #fafcfb; }
.alumni-engagement-metrics strong,.alumni-engagement-metrics span { display: block; }
.alumni-engagement-metrics strong { color: #2b1b14; font-size: 17px; }
.alumni-engagement-metrics span { margin-top: 3px; color: var(--muted); font-size: 9px; font-weight: 900; text-transform: uppercase; }
.alumni-quick-update .button,.alumni-record-engagement .button { width: 100%; justify-content: center; }
.alumni-mini-fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
.alumni-history-list { display: grid; }
.alumni-history-list article { display: grid; grid-template-columns: 15px minmax(0,1fr); gap: 11px; padding: 13px 0; border-top: 1px solid #e6ecea; }
.alumni-history-list article:first-child { padding-top: 0; border-top: 0; }
.alumni-history-marker { position: relative; width: 9px; height: 9px; margin-top: 5px; border: 2px solid var(--orange); border-radius: 50%; background: #fff; }
.alumni-history-list header { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.alumni-history-list p { margin: 6px 0; color: #4f5c57; font-size: 12px; line-height: 1.55; }
.alumni-history-list small { color: var(--muted); font-size: 10px; }
.alumni-activity-type { padding: 3px 7px; background: #fff0dc; color: #99570e; font-size: 9px; }

.alumni-form-note { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 13px; margin-bottom: 18px; padding: 13px 15px; border: 1px solid #b9ddd5; border-left: 5px solid var(--teal); border-radius: 8px; background: #f2faf8; font-size: 12px; }
.alumni-form-note strong { color: #1d6f64; }
.alumni-form-note span { color: #426760; }
.alumni-editor-form { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px; }
.alumni-editor-form > .panel { min-width: 0; margin: 0; }
.alumni-editor-form > .panel:first-of-type,.alumni-editor-form > .panel:last-of-type { grid-column: 1 / -1; }
.alumni-editor-checks { display: grid; gap: 9px; align-content: center; padding: 10px 0; }
.alumni-editor-actions { grid-column: 1 / -1; display: flex; justify-content: flex-end; gap: 10px; }

.alumni-graduation-steps { display: grid; grid-template-columns: auto minmax(20px,1fr) auto minmax(20px,1fr) auto; align-items: center; gap: 10px; margin-bottom: 18px; padding: 14px 18px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.alumni-graduation-steps > div { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 11px; font-weight: 900; }
.alumni-graduation-steps b { display: grid; width: 25px; height: 25px; place-items: center; border: 1px solid #cfd8d4; border-radius: 50%; background: #fff; }
.alumni-graduation-steps .active { color: #2b1b14; }
.alumni-graduation-steps .active b { border-color: var(--orange); background: var(--orange); color: #fff; }
.alumni-graduation-steps i { height: 1px; background: #dce3e0; }
.alumni-graduation-filter { display: grid; grid-template-columns: minmax(230px,1.3fr) repeat(3,minmax(140px,.65fr)) auto; align-items: end; gap: 14px; }
.alumni-graduation-filter h2 { margin-bottom: 4px; }
.alumni-graduation-filter p { margin: 0; font-size: 11px; }
.alumni-roster-count { padding: 7px 10px; border-radius: 999px; background: #fff0dc; color: #99570e; font-size: 11px; font-weight: 900; }
.alumni-graduation-roster table { min-width: 680px; }
.alumni-graduation-confirm { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 14px; padding: 15px; border-radius: 8px; background: #f7faf9; }
.alumni-graduation-confirm p { max-width: 760px; margin: 5px 0 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.alumni-graduation-confirm .button { flex: 0 0 auto; }

@media (max-width: 1180px) {
    .alumni-summary-strip { grid-template-columns: repeat(3,minmax(0,1fr)); }
    .alumni-summary-strip > div:nth-child(4) { border-left: 0; border-top: 1px solid var(--line); }
    .alumni-summary-strip > div:nth-child(5) { border-top: 1px solid var(--line); }
    .alumni-dashboard-grid,.alumni-profile-layout { grid-template-columns: 1fr; }
    .alumni-dashboard-grid > aside { border-top-width: 1px; border-left: 5px solid var(--orange); }
    .alumni-add-panel .mini-form { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .alumni-add-panel .button,.alumni-add-panel small { grid-column: 1 / -1; }
    .alumni-identity-band { grid-template-columns: auto minmax(0,1fr); }
    .alumni-identity-band > dl { grid-column: 1 / -1; }
    .alumni-identity-band > dl > div:first-child { border-left: 0; }
    .alumni-graduation-filter { grid-template-columns: repeat(3,minmax(0,1fr)); }
    .alumni-graduation-filter > div { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
    .alumni-summary-strip { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .alumni-summary-strip > div { border-top: 1px solid var(--line); }
    .alumni-summary-strip > div:nth-child(odd) { border-left: 0; }
    .alumni-summary-strip > div:nth-child(-n+2) { border-top: 0; }
    .alumni-summary-strip > div:last-child { grid-column: 1 / -1; }
    .alumni-directory-filters { grid-template-columns: 1fr; }
    .alumni-directory-filters .button { justify-content: center; }
    .alumni-add-panel .mini-form,.alumni-insights-grid,.alumni-editor-form,.alumni-graduation-filter { grid-template-columns: 1fr; }
    .alumni-add-panel .button,.alumni-add-panel small { grid-column: auto; }
    .alumni-cohort-bars article { grid-template-columns: 112px minmax(80px,1fr) 38px; gap: 8px; }
    .alumni-identity-band { grid-template-columns: auto minmax(0,1fr); padding: 15px; }
    .alumni-identity-band > dl { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .alumni-identity-band > dl > div { padding: 9px 6px; border-top: 1px solid #e7ddd7; }
    .alumni-identity-band > dl > div:nth-child(odd) { border-left: 0; }
    .alumni-detail-grid { grid-template-columns: 1fr; }
    .alumni-detail-grid > div,.alumni-detail-grid > div:nth-child(-n+2) { border-top: 1px solid #e2e8e5; border-left: 0; }
    .alumni-detail-grid > div:first-child { border-top: 0; }
    .alumni-mini-fields { grid-template-columns: 1fr; }
    .alumni-form-note { grid-template-columns: 1fr; }
    .alumni-editor-form > .panel,.alumni-editor-form > .panel:first-of-type,.alumni-editor-form > .panel:last-of-type { grid-column: auto; }
    .alumni-editor-actions { grid-column: auto; }
    .alumni-editor-actions .button { flex: 1 1 0; justify-content: center; }
    .alumni-graduation-steps span { display: none; }
    .alumni-graduation-filter > div { grid-column: auto; }
    .alumni-graduation-filter .button { justify-content: center; }
    .alumni-graduation-confirm { align-items: stretch; flex-direction: column; }
    .alumni-graduation-confirm .button { justify-content: center; }
}

@media print {
    body { background: #fff; padding: 0; }
    .print-actions { display: none; }
    .report-page {
        width: auto;
        min-height: auto;
        margin: 0;
        padding: 0;
        box-shadow: none;
    }
    .referral-page {
        width: auto;
        min-height: 0;
        margin: 0;
        padding: 0;
        box-shadow: none;
    }
    @page { size: A4; margin: 14mm; }
}
.end-year-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-top: 14px;
}

.end-year-fields label {
    display: grid;
    gap: 6px;
    font-weight: 700;
}

.end-year-report {
    max-width: 210mm;
    padding: 12mm 14mm;
    color: #17201c;
    font-family: Arial, sans-serif;
    font-size: 11.5px;
    line-height: 1.35;
}

.end-year-brand {
    display: grid;
    grid-template-columns: 70px minmax(0, 1fr);
    align-items: center;
    gap: 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid #173a70;
}

.end-year-brand img {
    width: 66px;
    height: 66px;
    object-fit: contain;
}

.end-year-brand p {
    margin: 0 0 2px;
    color: #52616f;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
}

.end-year-brand h1 {
    margin: 0;
    color: #173a70;
    font-size: 23px;
    line-height: 1.05;
    text-transform: uppercase;
}

.end-year-brand span {
    display: block;
    margin-top: 3px;
    color: #52616f;
    font-size: 11px;
    font-weight: 800;
}

.end-year-meta {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin: 12px 0;
    border: 1px solid #b9c2bf;
}

.end-year-meta div {
    border-right: 1px solid #d9e1de;
}

.end-year-meta div:last-child { border-right: 0; }
.end-year-meta dt, .end-year-meta dd { margin: 0; padding: 6px 8px; }
.end-year-meta dt {
    background: #f5f7f8;
    color: #52616f;
    font-size: 9px;
    font-weight: 900;
    text-transform: uppercase;
}
.end-year-meta dd { font-weight: 800; }
.grading-system {
    margin-bottom: 12px;
    padding: 9px 11px;
    border-left: 4px solid #173a70;
    background: #f7f9fb;
}
.grading-system h2 {
    margin: 0 0 4px;
    color: #173a70;
    font-size: 13px;
}
.grading-system h3 { display: none; }
.grading-system p { margin: 3px 0; }
.end-year-leaders {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 14px;
}
.end-year-leaders div {
    display: grid;
    grid-template-columns: minmax(120px, auto) 1fr;
    gap: 6px 10px;
    padding: 8px 10px;
    border: 1px solid #b9c2bf;
}
.end-year-leaders strong { color: #52616f; }
.end-year-leaders em {
    grid-column: 1 / -1;
    min-height: 34px;
    padding-top: 6px;
    border-top: 1px solid #d9e1de;
    color: #52616f;
    font-style: normal;
    font-weight: 800;
}
.end-year-leaders em img {
    display: block;
    max-width: 140px;
    max-height: 44px;
    margin: 2px auto 0;
    object-fit: contain;
}
.end-year-subjects {
    display: grid;
    gap: 9px;
}
.end-year-subject {
    break-inside: avoid;
    page-break-inside: avoid;
    overflow: hidden;
    border: 1px solid #b9c2bf;
}
.end-year-subject-title {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(120px, auto);
    align-items: center;
    gap: 12px;
    padding: 7px 9px;
    background: #173a70;
    color: #fff;
}
.end-year-subject-title h2 {
    margin: 0;
    font-size: 14px;
    line-height: 1.2;
}
.end-year-subject-title p {
    margin: 0;
    font-size: 10.5px;
    font-weight: 800;
    text-align: right;
}
.end-year-grade-strip {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    border-bottom: 1px solid #d9e1de;
}
.end-year-grade-strip div {
    min-width: 0;
    padding: 6px 7px;
    border-right: 1px solid #d9e1de;
}
.end-year-grade-strip div:last-child { border-right: 0; }
.end-year-grade-strip span {
    display: block;
    color: #52616f;
    font-size: 8.5px;
    font-weight: 900;
    text-transform: uppercase;
}
.end-year-grade-strip strong {
    display: block;
    margin-top: 2px;
    font-size: 12px;
}
.end-year-comment-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
.end-year-comment-block {
    min-width: 0;
    padding: 7px 9px 8px;
    border-right: 1px solid #e3e8e6;
    border-bottom: 1px solid #e3e8e6;
}
.end-year-comment-block:nth-child(even) { border-right: 0; }
.end-year-comment-block:nth-last-child(-n+2) { border-bottom: 0; }
.end-year-comment-block h3 {
    margin: 0 0 3px;
    color: #173a70;
    font-size: 10.5px;
}
.end-year-comment-block p {
    margin: 0;
    font-size: 10.2px;
    line-height: 1.32;
    text-align: justify;
    text-justify: inter-word;
}

/* Student and parent portals */
.portal-welcome {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 22px;
}
.portal-welcome h1 { margin-bottom: 5px; color: #2b1b14; font-size: 32px; }
.portal-welcome p { margin: 0; color: var(--muted); font-weight: 700; }
.portal-today { padding-top: 9px; color: var(--muted); font-size: 13px; font-weight: 800; }
.portal-child-switcher { margin-bottom: 18px; }
.portal-child-switcher h2 { margin-bottom: 10px; }
.portal-child-switcher > div { display: flex; flex-wrap: wrap; gap: 12px; }
.portal-child-choice {
    min-width: 245px;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: var(--ink);
    box-shadow: 0 10px 28px rgba(43, 27, 20, .04);
}
.portal-child-choice:hover,
.portal-child-choice.active { border-color: var(--teal); box-shadow: inset 0 0 0 1px var(--teal); }
.portal-child-choice strong,
.portal-child-choice small { display: block; }
.portal-child-choice small { margin-top: 4px; color: var(--muted); font-size: 12px; }
.portal-choice-check {
    width: 24px;
    height: 24px;
    display: inline-grid;
    place-items: center;
    border-radius: 50%;
    background: var(--teal);
    color: #fff;
    font-size: 13px;
}
.portal-profile-strip {
    display: grid;
    grid-template-columns: auto minmax(190px, .7fr) minmax(420px, 1.5fr);
    align-items: center;
    gap: 18px;
    padding: 18px 22px;
    margin-bottom: 18px;
    border: 1px solid #a8dada;
    border-radius: 8px;
    background: #f4fbfb;
}
.portal-avatar {
    width: 64px;
    height: 64px;
    display: inline-grid;
    place-items: center;
    border-radius: 50%;
    background: var(--teal);
    color: #fff;
    font-size: 22px;
    font-weight: 900;
    letter-spacing: .02em;
}
.portal-avatar.small { width: 42px; height: 42px; font-size: 15px; }
.portal-profile-name h2 { margin-bottom: 4px; color: #2b1b14; font-size: 22px; }
.portal-profile-name span { color: var(--muted); font-size: 12px; font-weight: 700; }
.portal-profile-strip dl {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
    margin: 0;
}
.portal-profile-strip dl div { padding: 2px 18px; border-left: 1px solid #c9e6e5; }
.portal-profile-strip dt { margin-bottom: 5px; color: var(--muted); font-size: 10px; font-weight: 900; letter-spacing: .04em; text-transform: uppercase; }
.portal-profile-strip dd { margin: 0; color: #2b1b14; font-size: 14px; font-weight: 800; }
.portal-section-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 14px;
}
.portal-section-heading h2 { margin: 0; color: #2b1b14; font-size: 19px; }
.portal-section-heading p { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
.portal-section-heading > a { padding-top: 2px; font-size: 12px; }
.portal-attendance-feature { padding: 22px 24px; }
.portal-attendance-layout {
    display: grid;
    grid-template-columns: 200px minmax(0, 1fr);
    align-items: center;
    gap: 34px;
}
.portal-rate {
    width: 156px;
    height: 156px;
    display: grid;
    place-items: center;
    margin: 0 auto;
    border-radius: 50%;
    background: conic-gradient(var(--teal) calc(var(--portal-rate) * 1%), #e8eeec 0);
    position: relative;
}
.portal-rate::before {
    content: '';
    position: absolute;
    inset: 13px;
    border-radius: 50%;
    background: #fff;
}
.portal-rate > div { position: relative; z-index: 1; text-align: center; }
.portal-rate strong { display: block; color: var(--teal); font-size: 38px; line-height: 1; }
.portal-rate span { display: block; margin-top: 7px; color: var(--muted); font-size: 11px; font-weight: 800; }
.portal-attendance-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.portal-attendance-metrics > div { min-height: 124px; display: grid; justify-items: center; align-content: center; gap: 6px; border-left: 1px solid var(--line); }
.portal-attendance-metrics strong { color: #2b1b14; font-size: 31px; line-height: 1; }
.portal-attendance-metrics small { color: var(--muted); font-size: 12px; font-weight: 900; }
.portal-attendance-metrics .present small { color: #168276; }
.portal-attendance-metrics .absent small { color: #be3d46; }
.portal-attendance-metrics .late small { color: #c87319; }
.portal-metric-icon { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: #edf3f1; color: #53615c; font-size: 20px; font-weight: 900; }
.portal-attendance-metrics .present .portal-metric-icon { background: #dff4ef; color: #168276; }
.portal-attendance-metrics .absent .portal-metric-icon { background: #fde9eb; color: #be3d46; }
.portal-attendance-metrics .late .portal-metric-icon { background: #fff1df; color: #c87319; }
.portal-data-note { margin: 16px 0 0; color: var(--muted); font-size: 12px; text-align: center; }
.portal-dashboard-grid { display: grid; grid-template-columns: 1.08fr 1fr 1fr; gap: 16px; }
.portal-dashboard-grid .panel { margin-bottom: 0; }
.portal-list-panel { min-width: 0; padding: 18px; }
.portal-report-list { display: grid; }
.portal-report-list > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 0;
    border-top: 1px solid var(--line);
}
.portal-report-list span strong,
.portal-report-list span small { display: block; }
.portal-report-list span strong { font-size: 13px; }
.portal-report-list span small { margin-top: 4px; color: var(--muted); font-size: 10px; }
.portal-report-list a { white-space: nowrap; font-size: 11px; }
.portal-event-list { display: grid; }
.portal-event-list > div {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 11px;
    padding: 9px 0;
    border-top: 1px solid var(--line);
}
.portal-event-list time,
.portal-calendar-list time {
    width: 44px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #fff;
    text-align: center;
}
.portal-event-list time strong,
.portal-calendar-list time strong { display: block; padding: 4px; color: #2b1b14; font-size: 15px; }
.portal-event-list time span,
.portal-calendar-list time span { display: block; padding: 3px; background: var(--teal); color: #fff; font-size: 8px; font-weight: 900; }
.portal-event-list > div > span strong,
.portal-event-list > div > span small { display: block; }
.portal-event-list > div > span strong { font-size: 12px; }
.portal-event-list > div > span small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.portal-notice-list { display: grid; }
.portal-notice-list article { padding: 16px 0; border-top: 1px solid var(--line); }
.portal-notice-list article:first-child { border-top: 0; }
.portal-notice-list strong { display: block; color: #2b1b14; font-size: 15px; }
.portal-notice-list span { display: block; margin-top: 4px; color: var(--teal); font-size: 10px; font-weight: 800; }
.portal-notice-list p { margin: 8px 0 0; color: #46534e; line-height: 1.55; }
.portal-notice-list.compact article { padding: 10px 0; }
.portal-notice-list.compact strong { font-size: 12px; }
.portal-notice-list.compact p { margin-top: 5px; font-size: 11px; line-height: 1.35; }
.portal-empty,
.portal-empty-copy { color: var(--muted); }
.portal-empty { max-width: 760px; padding: 28px; }
.portal-empty-copy { margin: 20px 0 6px; font-size: 13px; line-height: 1.5; }
.portal-table { min-width: 680px; }
.portal-table td { vertical-align: middle; }
.portal-status { display: inline-block; padding: 5px 9px; border-radius: 999px; background: #eef2f1; color: #53615c; font-size: 11px; font-weight: 900; text-transform: capitalize; }
.portal-status.present,
.portal-status.published { background: #e0f4ef; color: #157466; }
.portal-status.absent { background: #fde9eb; color: #a9323c; }
.portal-status.late { background: #fff0dc; color: #a75a10; }
.portal-status.excused { background: #eaf0f7; color: #496c91; }
.portal-content-header { margin: 3px 0 16px; }
.portal-content-header h2 { margin-bottom: 5px; color: #2b1b14; font-size: 24px; }
.portal-content-header p { margin: 0; color: var(--muted); }
.portal-term-strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.portal-term-strip article { padding: 16px; border-top: 4px solid var(--teal); border-radius: 8px; background: #fff; box-shadow: var(--shadow); }
.portal-term-strip span,
.portal-term-strip strong,
.portal-term-strip small { display: block; }
.portal-term-strip span { margin-bottom: 7px; color: var(--brown); font-size: 16px; font-weight: 900; }
.portal-term-strip strong { font-size: 13px; }
.portal-term-strip small { margin-top: 7px; color: var(--muted); }
.portal-calendar-list { display: grid; }
.portal-calendar-list article { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 16px; padding: 14px 0; border-top: 1px solid var(--line); }
.portal-calendar-list article:first-child { border-top: 0; }
.portal-calendar-list h3 { margin: 0 0 5px; font-size: 15px; }
.portal-calendar-list p { margin: 0; color: var(--muted); font-size: 12px; }
.portal-event-type { color: var(--muted); font-size: 11px; font-weight: 800; }
.portal-attachment-list { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px; }
.portal-attachment-list a { display: inline-flex; align-items: center; gap: 6px; padding: 6px 9px; border: 1px solid var(--line); border-radius: 6px; background: #f8faf9; color: var(--ink); font-weight: 800; }
.portal-attachment-list a:hover { border-color: var(--teal); color: var(--teal); }
.portal-attachment-list a small { color: var(--muted); font-size: 10px; text-transform: uppercase; }
.access-student-select { min-width: 230px; }
.field-help { display: block; margin-top: 6px; color: var(--muted); font-size: 11px; font-weight: 600; }

/* Transport and accounts modules */
.module-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}
.module-summary > div {
    min-width: 0;
    padding: 18px;
    border: 1px solid var(--line);
    border-top: 4px solid var(--teal);
    border-radius: 8px;
    background: var(--panel);
    box-shadow: var(--shadow);
}
.module-summary strong { display: block; overflow-wrap: anywhere; margin-bottom: 5px; color: var(--brown); font-size: clamp(20px, 2.1vw, 29px); }
.module-summary span { color: var(--muted); font-size: 12px; font-weight: 800; }
.module-form-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: start;
    gap: 16px;
}
.module-form-grid .panel { margin-bottom: 18px; }
.module-form-grid .mini-fields { justify-content: stretch; }
.module-form-grid .mini-fields label { width: auto; min-width: 0; flex: 1 1 130px; }
.module-form-grid .button.primary { justify-content: center; width: 100%; }
.module-empty { margin: 12px 0 4px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.module-status-maintenance,
.module-status-suspended { background: #fff0dc; color: #9a570f; }
.module-status-inactive,
.module-status-ended,
.module-status-waived,
.module-status-voided { background: #eef2f1; color: #66736e; }
.selected-row { background: #f1fafa; }
.account-balance { color: #a9323c; }
.account-balance.credit { color: #157466; }
.module-ledger-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin: 28px 0 14px;
}
.module-ledger-heading h2 { margin-bottom: 4px; font-size: 23px; }
.module-ledger-heading p { margin: 0; color: var(--muted); }
.account-summary-inline { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.account-summary-inline span { padding: 9px 11px; border: 1px solid var(--line); border-radius: 7px; background: #fff; color: var(--muted); font-size: 11px; font-weight: 800; }
.account-summary-inline strong { display: block; margin-top: 4px; color: var(--brown); font-size: 14px; }
.account-ledger-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.account-ledger-grid > .panel { min-width: 0; }

.portal-module-detail { display: grid; grid-template-columns: minmax(240px, .72fr) minmax(0, 1.6fr); gap: 18px; }
.portal-module-hero { align-content: center; padding: 26px; border-top: 5px solid var(--teal); background: linear-gradient(145deg, #fff 0%, #eef9f8 100%); }
.portal-module-kicker { display: block; margin-bottom: 10px; color: var(--teal); font-size: 10px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.portal-module-hero h3 { margin-bottom: 7px; color: #2b1b14; font-size: 27px; }
.portal-module-hero p { margin-bottom: 18px; color: var(--muted); line-height: 1.5; }
.portal-detail-list dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0; }
.portal-detail-list dl > div { min-width: 0; padding: 15px; border-bottom: 1px solid var(--line); }
.portal-detail-list dt { margin-bottom: 6px; color: var(--muted); font-size: 10px; font-weight: 900; letter-spacing: .04em; text-transform: uppercase; }
.portal-detail-list dd { margin: 0; color: #2b1b14; font-weight: 800; overflow-wrap: anywhere; }
.portal-detail-list dd small { display: block; margin-top: 4px; color: var(--muted); font-weight: 600; }
.portal-account-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.portal-account-summary article { padding: 19px; border: 1px solid var(--line); border-radius: 8px; background: #fff; box-shadow: var(--shadow); }
.portal-account-summary span { display: block; margin-bottom: 7px; color: var(--muted); font-size: 11px; font-weight: 900; text-transform: uppercase; }
.portal-account-summary strong { color: var(--brown); font-size: clamp(21px, 2.2vw, 30px); }
.portal-account-summary .balance { border-color: #edc0c4; background: #fff9f9; }
.portal-account-summary .balance strong { color: #a9323c; }
.portal-account-summary .credit { border-color: #b7ddd4; background: #f5fbf9; }
.portal-account-summary .credit strong { color: #157466; }
.portal-status.active,
.portal-status.posted,
.portal-status.open { background: #e0f4ef; color: #157466; }
.portal-status.suspended { background: #fff0dc; color: #a75a10; }
.portal-status.ended,
.portal-status.waived,
.portal-status.voided { background: #eef2f1; color: #66736e; }

/* Hostel and timetable modules */
.hostel-hero { background: linear-gradient(145deg, #fff 0%, #fff6eb 100%); border-top-color: var(--orange); }
.timetable-class-filter { min-width: 230px; }
.timetable-class-filter label { display: grid; grid-template-columns: auto minmax(150px, 1fr); align-items: center; gap: 10px; }
.timetable-class-filter select { min-height: 40px; }
.asc-import-panel { overflow: hidden; padding: 0; border-top: 4px solid var(--teal); }
.asc-import-panel > .panel-heading { margin: 0; padding: 19px 20px 16px; background: linear-gradient(135deg, #f3fbf9 0%, #fff 68%); }
.asc-import-kicker { display: block; margin-bottom: 4px; color: var(--teal); font-size: 10px; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
.asc-format-badge,
.asc-report-status { flex: 0 0 auto; padding: 7px 10px; border-radius: 999px; background: #dff3ef; color: #176f64; font-size: 10px; font-weight: 900; letter-spacing: .05em; text-transform: uppercase; }
.asc-import-form { display: grid; grid-template-columns: minmax(230px, 1.45fr) minmax(210px, 1fr) minmax(220px, 1fr) auto; align-items: end; gap: 15px; padding: 18px 20px 20px; }
.asc-import-form label { min-width: 0; }
.asc-import-form label > small { display: block; margin-top: 6px; color: var(--muted); font-size: 10px; font-weight: 600; line-height: 1.4; }
.asc-file-field input[type="file"] { min-height: 43px; padding: 8px; background: #fff; }
.asc-file-field input[type="file"]::file-selector-button { margin-right: 9px; padding: 6px 9px; border: 0; border-radius: 5px; background: #e4f3f0; color: #1a6d63; font-weight: 800; cursor: pointer; }
.asc-check-field { min-height: 43px; display: flex !important; align-items: flex-start; gap: 9px; padding: 10px 11px; border: 1px solid var(--line); border-radius: 7px; background: #fafcfb; }
.asc-check-field input { flex: 0 0 auto; width: 16px; height: 16px; margin-top: 1px; }
.asc-check-field span { display: grid; gap: 3px; }
.asc-check-field strong { color: #2b1b14; font-size: 11px; }
.asc-check-field small { color: var(--muted); font-size: 9px; font-weight: 600; line-height: 1.35; }
.asc-import-actions { display: flex; gap: 8px; }
.asc-import-actions .button { white-space: nowrap; }
.asc-import-report { border-top: 4px solid #7d8be6; }
.asc-import-report > .panel-heading { align-items: flex-start; }
.asc-report-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 17px; }
.asc-report-metrics > div { padding: 13px 14px; border: 1px solid var(--line); border-radius: 7px; background: #fafcfb; }
.asc-report-metrics strong { display: block; color: var(--brown); font-size: 21px; }
.asc-report-metrics span { color: var(--muted); font-size: 10px; font-weight: 800; }
.asc-report-layout { display: grid; grid-template-columns: minmax(0, 2fr) minmax(180px, .8fr); gap: 16px; align-items: stretch; }
.asc-mapping-table { min-width: 480px; }
.asc-source-summary { padding: 14px; border-radius: 7px; background: #f3f8f7; }
.asc-source-summary h3 { margin: 0 0 10px; color: var(--brown); font-size: 13px; }
.asc-source-summary dl { display: grid; gap: 7px; margin: 0; }
.asc-source-summary dl div { display: flex; justify-content: space-between; gap: 15px; padding-bottom: 6px; border-bottom: 1px solid #d9e8e5; }
.asc-source-summary dt { color: var(--muted); font-size: 10px; font-weight: 700; }
.asc-source-summary dd { margin: 0; color: var(--brown); font-size: 11px; font-weight: 900; }
.asc-warning-list { margin-top: 16px; padding: 12px 14px; border: 1px solid #efd6a7; border-radius: 7px; background: #fffaf0; }
.asc-warning-list summary { color: #95590e; font-size: 11px; font-weight: 900; cursor: pointer; }
.asc-warning-list ul { margin: 10px 0 0; padding-left: 20px; color: #79531f; font-size: 11px; line-height: 1.55; }
.asc-entry-preview { margin-top: 17px; }
.timetable-editor { padding: 20px; }
.timetable-editor-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); align-items: end; gap: 13px; }
.timetable-editor-grid label { min-width: 0; }
.timetable-editor-grid .timetable-notes { grid-column: span 4; }
.timetable-save .button { justify-content: center; width: 100%; }
.readonly-banner { margin: 0 0 18px; padding: 13px 15px; border: 1px solid #c8d8e8; border-radius: 8px; background: #f3f7fb; color: #496c91; font-size: 13px; font-weight: 700; }
.timetable-board-panel { min-width: 0; }
.timetable-week-scroll { width: 100%; overflow-x: auto; padding-bottom: 5px; }
.timetable-week-grid { min-width: 940px; display: grid; grid-template-columns: repeat(5, minmax(170px, 1fr)); gap: 12px; }
.timetable-day { min-width: 0; padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: #f8faf9; }
.timetable-day > h3 { margin: 0 0 11px; padding-bottom: 9px; border-bottom: 2px solid var(--teal); color: #2b1b14; font-size: 14px; }
.timetable-day > p { margin: 16px 0 7px; color: var(--muted); font-size: 11px; text-align: center; }
.timetable-slot { position: relative; display: grid; gap: 4px; margin-top: 9px; padding: 10px; border-left: 4px solid var(--teal); border-radius: 6px; background: #fff; box-shadow: 0 6px 18px rgba(43,27,20,.06); }
.timetable-slot time { color: var(--teal); font-size: 10px; font-weight: 900; }
.timetable-slot strong { color: #2b1b14; font-size: 12px; line-height: 1.25; }
.timetable-slot span,
.timetable-slot small { color: var(--muted); font-size: 10px; line-height: 1.3; }
.timetable-slot a { justify-self: start; margin-top: 3px; font-size: 10px; }
.timetable-slot.slot-break { border-left-color: var(--orange); background: #fff9f1; }
.timetable-slot.slot-break time { color: #a75a10; }
.timetable-slot.slot-assembly { border-left-color: #7d8be6; background: #f7f7ff; }
.timetable-slot.slot-study { border-left-color: #4daedb; background: #f4faff; }
.timetable-slot.slot-activity { border-left-color: #a672c8; background: #fbf7ff; }
.portal-timetable-panel { padding: 15px; }

/* Admissions inquiry pipeline */
.inquiry-summary .attention { border-color: #e7b46d; border-top-color: var(--orange); background: #fffaf2; }
.inquiry-kicker { display: block; margin-bottom: 5px; color: var(--teal); font-size: 10px; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.inquiry-form-panel { border-top: 4px solid var(--teal); }
.inquiry-form-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: end; gap: 14px; margin-top: 16px; }
.inquiry-form-grid label { min-width: 0; }
.inquiry-form-grid .inquiry-message,
.inquiry-form-grid .inquiry-notes { grid-column: span 2; }
.inquiry-save { grid-column: 4; }
.inquiry-save .button { width: 100%; justify-content: center; }
.inquiry-list-panel { min-width: 0; }
.inquiry-result-count { flex: 0 0 auto; padding: 6px 9px; border-radius: 999px; background: #edf5f3; color: #4f625c; font-size: 10px; font-weight: 900; }
.inquiry-filters { display: grid; grid-template-columns: minmax(220px, 1.5fr) repeat(3, minmax(140px, .7fr)) auto; align-items: end; gap: 10px; margin: 14px 0 17px; padding: 13px; border: 1px solid var(--line); border-radius: 8px; background: #f8faf9; }
.inquiry-filter-actions { display: flex; gap: 7px; }
.inquiry-filter-actions .button { white-space: nowrap; justify-content: center; }
.inquiry-table { min-width: 1120px; }
.inquiry-priority { display: block; width: max-content; margin-top: 5px; padding-left: 10px; position: relative; color: var(--muted); font-size: 10px; font-weight: 800; }
.inquiry-priority::before { content: ''; position: absolute; left: 0; top: 4px; width: 6px; height: 6px; border-radius: 50%; background: #8a9994; }
.inquiry-priority.priority-high::before { background: var(--orange); }
.inquiry-priority.priority-urgent::before { background: #c83e4d; box-shadow: 0 0 0 3px rgba(200,62,77,.12); }
.inquiry-follow-up { display: inline-block; white-space: nowrap; padding: 5px 8px; border-radius: 6px; background: #eef2f1; color: #5d6a66; font-size: 10px; font-weight: 900; }
.inquiry-follow-up.overdue { background: #fde9eb; color: #a9323c; }
.inquiry-follow-up.today { background: #fff0dc; color: #9a570f; }
.inquiry-follow-up.scheduled { background: #eaf4f7; color: #356c82; }
.inquiry-follow-up.complete { background: #e3f4ef; color: #157466; }
.inquiry-status-new { background: #e5f4f2; color: #147267; }
.inquiry-status-contacted { background: #eaf0f7; color: #496c91; }
.inquiry-status-visit_scheduled { background: #f1edfb; color: #7252a6; }
.inquiry-status-application_started { background: #fff0dc; color: #9a570f; }
.inquiry-status-waiting_list { background: #fff7d9; color: #826817; }
.inquiry-status-admitted { background: #def3e8; color: #15704f; }
.inquiry-status-declined,
.inquiry-status-closed { background: #eef2f1; color: #66736e; }
.inquiry-detail-grid { display: grid; grid-template-columns: minmax(280px, .75fr) minmax(0, 1.5fr); gap: 18px; }
.inquiry-profile-card { border-top: 4px solid var(--orange); }
.inquiry-profile-card h2 { margin: 0 0 4px; color: var(--brown); font-size: 25px; }
.inquiry-profile-card > p { margin: 0 0 15px; color: var(--muted); }
.inquiry-profile-card dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0 0 16px; }
.inquiry-profile-card dl div { min-width: 0; padding: 11px 8px 11px 0; border-top: 1px solid var(--line); }
.inquiry-profile-card dt { margin-bottom: 4px; color: var(--muted); font-size: 9px; font-weight: 900; letter-spacing: .04em; text-transform: uppercase; }
.inquiry-profile-card dd { margin: 0; color: #2b1b14; font-size: 11px; font-weight: 800; overflow-wrap: anywhere; }
.inquiry-activity-form { display: grid; grid-template-columns: minmax(140px, .55fr) minmax(160px, .65fr) minmax(0, 1.5fr) auto; align-items: end; gap: 12px; margin-top: 14px; }
.inquiry-activity-form .activity-details { min-width: 0; }
.inquiry-activity-form textarea { min-height: 72px; }
.inquiry-activity-form .button { margin-bottom: 1px; white-space: nowrap; }
.inquiry-timeline-panel { border-top: 4px solid #7d8be6; }
.inquiry-timeline { position: relative; display: grid; }
.inquiry-timeline::before { content: ''; position: absolute; left: 8px; top: 12px; bottom: 12px; width: 2px; background: #dce7e4; }
.inquiry-timeline article { position: relative; display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 13px; padding: 13px 0; }
.inquiry-activity-icon { z-index: 1; width: 18px; height: 18px; margin-top: 2px; border: 4px solid #dff1ee; border-radius: 50%; background: var(--teal); }
.inquiry-activity-icon.activity-call { background: #4daedb; }
.inquiry-activity-icon.activity-email { background: #7d8be6; }
.inquiry-activity-icon.activity-meeting { background: #a672c8; }
.inquiry-activity-icon.activity-status_change { background: var(--orange); }
.inquiry-activity-head { display: flex; justify-content: space-between; gap: 15px; }
.inquiry-activity-head strong { color: #2b1b14; font-size: 12px; }
.inquiry-activity-head time { color: var(--muted); font-size: 10px; font-weight: 700; }
.inquiry-timeline p { margin: 5px 0; color: #46534e; font-size: 12px; line-height: 1.5; }
.inquiry-timeline small { color: var(--muted); font-size: 10px; }

/* Public online registration and admissions review */
.registration-page .login-main { align-content: start; width: 100%; padding: 34px 24px 60px; }
.registration-page .login-main > .alert { width: min(100%, 1120px); }
.registration-public-shell { width: min(100%, 1120px); }
.registration-public-header { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.registration-school-brand { display: flex; align-items: center; gap: 13px; color: var(--ink); }
.registration-school-brand img { width: 58px; height: 58px; object-fit: contain; }
.registration-school-brand span { display: grid; gap: 2px; }
.registration-school-brand strong { color: var(--brown); font-size: 16px; }
.registration-school-brand small { color: var(--muted); font-size: 11px; font-weight: 700; }
.registration-signin-link { padding: 8px 11px; border-radius: 7px; background: rgba(255,255,255,.7); font-size: 12px; font-weight: 800; }
.registration-header-actions { display: flex; align-items: center; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.registration-intro { max-width: 820px; margin: 0 auto 26px; text-align: center; }
.registration-public-kicker { display: block; margin-bottom: 7px; color: var(--teal); font-size: 10px; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
.registration-intro h1 { margin: 0 0 10px; color: #2b1b14; font-size: clamp(34px,5vw,52px); letter-spacing: -.035em; }
.registration-intro > p { margin: 0 auto; max-width: 700px; color: var(--muted); font-size: 15px; line-height: 1.6; }
.registration-intro > div { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.registration-intro > div span { padding: 7px 10px; border: 1px solid #cde2dd; border-radius: 999px; background: #f7fbfa; color: #4b625b; font-size: 10px; font-weight: 800; }
.registration-public-form { display: grid; gap: 17px; }
.registration-honeypot { position: absolute !important; left: -10000px !important; width: 1px !important; height: 1px !important; overflow: hidden !important; }
.registration-form-section { padding: 24px; border-top: 4px solid var(--teal); }
.registration-section-heading { display: flex; align-items: flex-start; gap: 13px; margin-bottom: 20px; }
.registration-section-heading > span { display: grid; place-items: center; flex: 0 0 34px; width: 34px; height: 34px; border-radius: 10px; background: #e2f3ef; color: #176f64; font-size: 11px; font-weight: 900; }
.registration-section-heading h2 { margin: 0 0 4px; color: #2b1b14; font-size: 20px; }
.registration-section-heading p { margin: 0; color: var(--muted); font-size: 12px; }
.registration-field-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 15px; }
.registration-field-grid label { min-width: 0; }
.registration-field-grid .registration-wide { grid-column: span 2; }
.registration-textarea-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
.registration-service-choices { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; margin-top: 17px; }
.registration-service-choices label { display: flex; align-items: flex-start; gap: 10px; padding: 14px; border: 1px solid var(--line); border-radius: 8px; background: #fafcfb; cursor: pointer; }
.registration-service-choices input,
.registration-consent input { flex: 0 0 auto; width: 17px; height: 17px; margin-top: 2px; }
.registration-service-choices span { display: grid; gap: 4px; }
.registration-service-choices strong { color: #2b1b14; font-size: 12px; }
.registration-service-choices small { color: var(--muted); font-size: 10px; font-weight: 600; line-height: 1.4; }
.registration-field-help { margin: 12px 0 0; color: var(--muted); font-size: 10px; font-weight: 700; }
.registration-document-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 14px; }
.registration-document-grid label { padding: 14px; border: 1px dashed #b6ccc6; border-radius: 8px; background: #fafcfb; }
.registration-document-grid input { padding: 8px; background: #fff; }
.registration-document-grid small { color: var(--muted); font-size: 9px; font-weight: 600; }
.registration-submit-section { display: grid; gap: 17px; padding: 24px; border-top: 4px solid var(--brown); }
.registration-consent { display: flex; align-items: flex-start; gap: 11px; padding: 15px; border-radius: 8px; background: #f7f9f8; line-height: 1.5; }
.registration-submit-section > div { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.registration-submit-section > div p { margin: 0; max-width: 720px; color: var(--muted); font-size: 11px; line-height: 1.5; }
.registration-submit-section .button { min-width: 210px; justify-content: center; }
.registration-success-card { width: min(100%,720px); margin: 8vh auto 0; padding: 40px; border-top: 5px solid var(--teal); text-align: center; }
.registration-success-card > img { width: 84px; height: 84px; object-fit: contain; margin-bottom: 15px; }
.registration-success-card h1 { margin-bottom: 9px; color: #2b1b14; font-size: 34px; }
.registration-success-card > p { color: var(--muted); line-height: 1.55; }
.registration-reference { display: inline-block; margin: 12px 0 22px; padding: 12px 18px; border: 1px solid #afd7ce; border-radius: 9px; background: #f1faf8; color: #176f64; font-size: 22px; letter-spacing: .06em; }
.registration-next-steps { display: grid; gap: 10px; margin: 0 auto 18px; text-align: left; }
.registration-next-steps > div { display: flex; align-items: flex-start; gap: 12px; padding: 13px; border: 1px solid var(--line); border-radius: 8px; background: #fafcfb; }
.registration-next-steps b { display: grid; place-items: center; flex: 0 0 27px; width: 27px; height: 27px; border-radius: 50%; background: var(--brown); color: #fff; font-size: 11px; }
.registration-next-steps span { display: grid; gap: 3px; }
.registration-next-steps strong { color: #2b1b14; font-size: 12px; }
.registration-next-steps small { color: var(--muted); font-size: 10px; line-height: 1.4; }
.registration-document-count { font-size: 11px; }
.registration-success-actions { justify-content: center; }
.inquiry-public-shell { max-width: 980px; }
.inquiry-public-intro { max-width: 780px; }
.inquiry-public-form { max-width: 920px; margin: 0 auto; }
.inquiry-public-form .registration-form-section:first-of-type { border-top-color: var(--orange); }
.inquiry-success-card { border-top-color: var(--orange); }

/* Student welfare: discipline, withdrawals, and clinic records */
.care-eyebrow { display: block; margin-bottom: 5px; color: var(--teal); font-size: 9px; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
.student-care-header h1 { margin-bottom: 4px; }
.care-summary { grid-template-columns: repeat(4,minmax(0,1fr)); }
.care-form-panel { margin-bottom: 18px; border-top: 4px solid var(--teal); }
.discipline-panel { border-top-color: var(--orange); }
.withdrawal-panel { border-top-color: #7252a6; }
.care-form-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; }
.care-form-grid label { min-width: 0; }
.care-form-grid .care-wide,.care-form-grid > h3 { grid-column: 1/-1; }
.care-form-grid > h3 { margin: 5px 0 -2px; padding-top: 12px; border-top: 1px solid var(--line); color: #2b1b14; font-size: 13px; }
.care-check { display: flex !important; flex-direction: row !important; align-items: center; align-self: end; gap: 9px; min-height: 42px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 7px; background: #f8faf9; }
.care-check input { flex: 0 0 auto; width: 17px; height: 17px; }
.care-check span { color: #34443e; font-size: 10px; font-weight: 800; line-height: 1.35; }
.care-form-actions { grid-column: 1/-1; display: flex; justify-content: flex-end; padding-top: 4px; }
.care-form-actions .button { min-width: 190px; justify-content: center; }
.care-list-panel { margin-bottom: 18px; }
.care-filters { display: grid; grid-template-columns: minmax(240px,1.4fr) minmax(160px,.7fr) minmax(150px,.6fr) auto; align-items: end; gap: 10px; margin: 12px 0 15px; padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: #f8faf9; }
.withdrawal-filters { grid-template-columns: minmax(260px,1.4fr) minmax(190px,.7fr) auto; }
.care-table { min-width: 960px; }
.care-table td > strong { color: #2b1b14; }
.care-badge { display: inline-flex; align-items: center; padding: 5px 7px; border-radius: 6px; background: #edf2f1; color: #596862; font-size: 8px; font-weight: 900; text-transform: uppercase; white-space: nowrap; }
.care-badge.severity-low { background: #e6f4ef; color: #26725d; }
.care-badge.severity-moderate,.care-badge.status-requested,.care-badge.status-open { background: #fff0dc; color: #99570e; }
.care-badge.severity-high { background: #ffe4d5; color: #b6531d; }
.care-badge.severity-critical { background: #ffe3e0; color: #b7352d; }
.care-badge.status-under_review,.care-badge.status-clearance { background: #e9eef8; color: #526d9b; }
.care-badge.status-approved { background: #eee8fa; color: #7054a5; }
.care-badge.status-resolved,.care-badge.status-closed,.care-badge.status-completed { background: #def4eb; color: #146b52; }
.care-badge.status-cancelled { background: #edf0ef; color: #68736f; }
.clearance-meter { display: inline-flex; padding: 5px 8px; border-radius: 999px; background: #edf5f3; color: #287267; font-size: 9px; font-weight: 900; }
.care-detail-grid { display: grid; grid-template-columns: minmax(300px,.75fr) minmax(0,1.25fr); gap: 17px; margin-bottom: 18px; }
.care-detail-grid > .panel { margin: 0; }
.care-profile-card { border-top: 4px solid var(--orange); }
.care-profile-card h2 { margin: 0 0 4px; color: #2b1b14; font-size: 22px; }
.care-profile-card > p { color: var(--muted); font-size: 11px; line-height: 1.5; }
.care-profile-card dl { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); margin: 15px 0 0; }
.care-profile-card dl div { padding: 10px 8px 10px 0; border-top: 1px solid var(--line); }
.care-profile-card dt { color: var(--muted); font-size: 8px; font-weight: 900; text-transform: uppercase; }
.care-profile-card dd { margin: 3px 0 0; color: #2b1b14; font-size: 10px; font-weight: 800; }
.care-update-form { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.care-update-form .care-wide { grid-column: 1/-1; }
.care-update-form .button { grid-column: 2; justify-content: center; }
.care-timeline article { display: grid; grid-template-columns: 12px minmax(0,1fr); gap: 10px; padding: 12px 0; border-top: 1px solid var(--line); }
.care-timeline article:first-of-type { border-top: 0; }
.care-timeline-dot { width: 10px; height: 10px; margin-top: 3px; border: 3px solid #dff1ee; border-radius: 50%; background: var(--teal); }
.care-timeline header { display: flex; justify-content: space-between; gap: 14px; }
.care-timeline header strong { color: #2b1b14; font-size: 11px; }
.care-timeline time,.care-timeline small { color: var(--muted); font-size: 9px; }
.care-timeline p { margin: 6px 0; color: #4d5c57; font-size: 11px; line-height: 1.5; }
.status.withdrawn { background: #ffe7e4; color: #a53b33; }

.clinic-header .care-eyebrow { color: #a33b33; }
.clinic-privacy-banner { display: flex; align-items: center; gap: 13px; margin-bottom: 15px; padding: 12px 15px; border: 1px solid #ecc5c1; border-radius: 8px; background: #fff7f6; }
.clinic-privacy-banner strong { flex: 0 0 auto; color: #a43b33; font-size: 10px; }
.clinic-privacy-banner span { color: #6d5551; font-size: 9px; line-height: 1.45; }
.clinic-directory { margin-bottom: 18px; border-top: 4px solid #c24e47; }
.clinic-search { grid-template-columns: minmax(280px,1fr) auto auto; }
.clinic-directory-scroll { max-height: 410px; overflow: auto; }
.health-alerts { display: flex; flex-wrap: wrap; gap: 5px; }
.health-alert { display: inline-flex; padding: 4px 6px; border-radius: 5px; font-size: 8px; font-weight: 900; text-transform: uppercase; }
.health-alert.allergy { background: #ffe5e2; color: #ad3b33; }
.health-alert.condition { background: #fff0d8; color: #9b5a16; }
.clinic-student-banner { display: flex; align-items: center; gap: 13px; margin-bottom: 17px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 9px; background: linear-gradient(135deg,#fff7f6,#fff); }
.clinic-student-avatar { display: grid; place-items: center; flex: 0 0 48px; width: 48px; height: 48px; border-radius: 14px; background: #c24e47; color: #fff; font-size: 14px; font-weight: 900; }
.clinic-student-banner h2 { margin: 0 0 3px; color: #2b1b14; font-size: 20px; }
.clinic-student-banner p { margin: 0; color: var(--muted); font-size: 10px; }
.clinic-student-alerts { display: flex; flex-wrap: wrap; gap: 6px; margin-left: auto; }
.clinic-student-alerts span { padding: 6px 8px; border-radius: 6px; background: #ffe3e0; color: #a63730; font-size: 8px; font-weight: 900; text-transform: uppercase; }
.clinic-profile-panel { border-top-color: #c24e47; }
.clinic-workspace { display: grid; grid-template-columns: minmax(0,1.2fr) minmax(340px,.8fr); gap: 17px; }
.clinic-workspace > .panel { margin: 0; }
.clinic-visit-panel { border-top: 4px solid var(--teal); }
.clinic-visit-form { grid-template-columns: repeat(2,minmax(0,1fr)); }
.clinic-history-panel { border-top: 4px solid #7252a6; }
.clinic-visit-list { display: grid; gap: 10px; max-height: 950px; overflow: auto; }
.clinic-visit-list > article { padding: 13px; border: 1px solid var(--line); border-radius: 8px; background: #fafcfb; }
.clinic-visit-list header { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.clinic-visit-list header > div { display: grid; gap: 4px; }
.clinic-visit-type { color: #7252a6; font-size: 8px; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; }
.clinic-visit-list header strong { color: #2b1b14; font-size: 11px; }
.clinic-visit-list p { margin: 9px 0 0; color: #4c5a55; font-size: 10px; line-height: 1.5; }
.clinic-visit-list p strong { color: #293732; }
.clinic-vitals { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 9px; }
.clinic-vitals span { padding: 5px 7px; border-radius: 5px; background: #e8f4f2; color: #26736a; font-size: 8px; font-weight: 900; }
.clinic-visit-list small { display: block; margin-top: 9px; color: var(--muted); font-size: 8px; line-height: 1.45; }

@media (max-width: 900px) {
    .care-form-grid,.clinic-visit-form { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .care-detail-grid,.clinic-workspace { grid-template-columns: 1fr; }
    .clinic-history-panel { max-height: none; }
}
@media (max-width: 620px) {
    .care-summary { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .care-form-grid,.clinic-visit-form,.care-update-form { grid-template-columns: 1fr; }
    .care-form-grid .care-wide,.care-form-grid > h3,.care-update-form .care-wide,.care-update-form .button { grid-column: 1; }
    .care-filters,.withdrawal-filters,.clinic-search { grid-template-columns: 1fr; }
    .care-form-actions { justify-content: stretch; }
    .care-form-actions .button { width: 100%; }
    .clinic-privacy-banner,.clinic-student-banner { align-items: flex-start; flex-direction: column; }
    .clinic-student-alerts { margin-left: 0; }
}
.registration-summary > div:first-child { border-top-color: var(--orange); }
.registration-filters { display: grid; grid-template-columns: minmax(230px,1.4fr) minmax(170px,.8fr) minmax(160px,.7fr) auto; align-items: end; gap: 11px; margin: 14px 0 17px; padding: 13px; border: 1px solid var(--line); border-radius: 8px; background: #f8faf9; }
.registration-table { min-width: 1120px; }
.registration-service-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.registration-service-tags b { padding: 4px 6px; border-radius: 5px; background: #edf6f4; color: #286d63; font-size: 9px; }
.registration-status-submitted { background: #fff0dc; color: #99570e; }
.registration-status-under_review { background: #eaf0f7; color: #496c91; }
.registration-status-documents_requested { background: #fff7d9; color: #806713; }
.registration-status-interview_scheduled { background: #f1edfb; color: #7252a6; }
.registration-status-offered { background: #e1f4ed; color: #15705a; }
.registration-status-enrolled { background: #dff3e7; color: #146943; }
.registration-status-declined,
.registration-status-withdrawn { background: #eef2f1; color: #66736e; }
.registration-review-grid { display: grid; grid-template-columns: minmax(300px,.9fr) minmax(0,1.25fr); gap: 18px; }
.registration-applicant-card { border-top: 4px solid var(--orange); }
.registration-applicant-card h2 { margin: 0 0 4px; color: var(--brown); font-size: 26px; }
.registration-applicant-card > p { margin: 0 0 16px; color: var(--muted); }
.registration-applicant-card dl { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); margin: 0; }
.registration-applicant-card dl div { min-width: 0; padding: 11px 8px 11px 0; border-top: 1px solid var(--line); }
.registration-applicant-card dl .wide { grid-column: 1/-1; }
.registration-applicant-card dt { margin-bottom: 4px; color: var(--muted); font-size: 9px; font-weight: 900; text-transform: uppercase; }
.registration-applicant-card dd { margin: 0; color: #2b1b14; font-size: 11px; font-weight: 800; overflow-wrap: anywhere; }
.registration-applicant-card dd small { display: block; margin-top: 3px; color: var(--muted); font-weight: 600; }
.registration-linked-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.registration-review-card { border-top: 4px solid var(--teal); }
.registration-review-form { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); align-items: end; gap: 14px; margin-top: 16px; }
.registration-review-form .wide { grid-column: 1/-1; }
.registration-review-form .button { grid-column: 2; justify-content: center; }
.registration-support-grid { margin-top: 18px; }
.registration-document-list { display: grid; gap: 8px; }
.registration-document-list a { display: grid; gap: 3px; padding: 11px; border: 1px solid var(--line); border-radius: 7px; background: #fafcfb; }
.registration-document-list span { color: var(--teal); font-size: 9px; font-weight: 900; text-transform: uppercase; }
.registration-document-list strong { color: #2b1b14; font-size: 12px; overflow-wrap: anywhere; }
.registration-document-list small { color: var(--muted); font-size: 9px; }
.registration-history-list { display: grid; }
.registration-history-list article { display: grid; grid-template-columns: 12px minmax(0,1fr); gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); }
.registration-history-list article:first-child { border-top: 0; }
.registration-history-dot { width: 10px; height: 10px; margin-top: 3px; border: 3px solid #dff1ee; border-radius: 50%; background: var(--teal); }
.registration-history-list strong,
.registration-history-list small { display: block; }
.registration-history-list strong { color: #2b1b14; font-size: 11px; }
.registration-history-list small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.registration-history-list p { margin: 6px 0 0; color: #53615c; font-size: 11px; line-height: 1.45; }

/* Clubs and Societies */
.clubs-page-header .eyebrow,
.club-editor-panel .eyebrow,
.clubs-directory-panel .eyebrow,
.club-profile-banner .eyebrow,
.club-members-panel .eyebrow,
.club-activities-panel .eyebrow { display: block; margin-bottom: 5px; color: var(--teal); font-size: 9px; font-weight: 900; letter-spacing: .11em; text-transform: uppercase; }
.clubs-summary { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 13px; margin-bottom: 18px; }
.clubs-summary article { min-width: 0; padding: 17px; border: 1px solid var(--line); border-top: 4px solid var(--teal); border-radius: 8px; background: #fff; box-shadow: var(--shadow); }
.clubs-summary span,
.clubs-summary small { display: block; }
.clubs-summary span { color: #52605c; font-size: 10px; font-weight: 800; }
.clubs-summary strong { display: block; margin: 5px 0 3px; color: var(--brown); font-size: 25px; line-height: 1; }
.clubs-summary small { color: var(--muted); font-size: 9px; }
.clubs-management-grid { display: grid; grid-template-columns: minmax(330px,.82fr) minmax(480px,1.18fr); align-items: start; gap: 18px; }
.club-editor-panel { border-top: 4px solid var(--orange); }
.clubs-directory-panel { border-top: 4px solid var(--teal); }
.club-editor-form,
.club-activity-form { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 13px; margin-top: 15px; }
.club-editor-form .club-wide,
.club-activity-form .club-wide { grid-column: 1/-1; }
.club-form-actions { display: flex; grid-column: 1/-1; justify-content: flex-end; gap: 8px; }
.clubs-search-form { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 9px; margin: 13px 0; }
.clubs-search-form label { min-width: 0; }
.clubs-directory-list { display: grid; gap: 8px; }
.club-directory-card { display: grid; grid-template-columns: 42px minmax(0,1fr) auto; align-items: center; gap: 11px; padding: 11px; border: 1px solid var(--line); border-radius: 8px; background: #fbfcfc; color: inherit; transition: .15s ease; }
.club-directory-card:hover,
.club-directory-card.active { border-color: #88c5ba; background: #f0faf8; transform: translateY(-1px); }
.club-directory-mark,
.club-profile-symbol { display: grid; place-items: center; border-radius: 10px; background: linear-gradient(145deg,var(--brown),#bd672f); color: #fff; font-size: 12px; font-weight: 900; letter-spacing: .04em; }
.club-directory-mark { width: 42px; height: 42px; }
.club-directory-copy { display: grid; min-width: 0; gap: 3px; }
.club-directory-copy > span { display: flex; min-width: 0; max-width: 100%; align-items: center; justify-content: space-between; gap: 8px; }
.club-directory-copy b { min-width: 0; overflow: hidden; color: #291a14; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.club-directory-copy small,
.club-directory-copy em { display: block; min-width: 0; max-width: 100%; overflow: hidden; color: var(--muted); font-size: 9px; font-style: normal; text-overflow: ellipsis; white-space: nowrap; }
.club-status { flex: 0 0 auto; padding: 3px 6px; border-radius: 999px; background: #e5efec; color: #4c5f59; font-size: 8px; font-style: normal; font-weight: 900; text-transform: uppercase; }
.club-status-active { background: #dff3eb; color: #176b4d; }
.club-status-archived { background: #ece9e8; color: #6c625e; }
.club-member-count { display: grid; min-width: 50px; text-align: right; }
.club-member-count strong { color: var(--brown); font-size: 18px; }
.club-member-count small { color: var(--muted); font-size: 8px; }
.club-empty-state { display: grid; gap: 4px; padding: 22px; border: 1px dashed #b9cbc6; border-radius: 8px; color: var(--muted); text-align: center; }
.club-empty-state strong { color: #33423d; font-size: 12px; }
.club-empty-state span { font-size: 10px; }
.club-profile-banner { display: grid; grid-template-columns: 64px minmax(0,1fr) minmax(340px,.75fr); align-items: center; gap: 17px; margin-top: 18px; border-top: 4px solid var(--brown); }
.club-profile-symbol { width: 64px; height: 64px; font-size: 18px; }
.club-profile-banner h2 { margin-bottom: 3px; }
.club-profile-banner p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
.club-profile-banner dl { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); margin: 0; }
.club-profile-banner dl div { padding: 8px 11px; border-left: 1px solid var(--line); }
.club-profile-banner dt { color: var(--muted); font-size: 8px; font-weight: 900; text-transform: uppercase; }
.club-profile-banner dd { margin: 4px 0 0; color: #2d211c; font-size: 10px; font-weight: 800; }
.club-operations-grid { display: grid; grid-template-columns: minmax(0,1.18fr) minmax(360px,.82fr); align-items: start; gap: 18px; margin-top: 18px; }
.club-members-panel { border-top: 4px solid var(--teal); }
.club-activities-panel { border-top: 4px solid #7654a6; }
.club-roster-total { color: var(--muted); font-size: 10px; font-weight: 800; }
.club-member-add-form { display: grid; grid-template-columns: minmax(230px,1.7fr) minmax(130px,.8fr) minmax(125px,.7fr) auto; align-items: end; gap: 9px; margin: 14px 0; padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: #f8fbfa; }
.club-members-table select,
.club-members-table input { min-width: 100px; padding: 8px; font-size: 10px; }
.club-members-table strong { color: #2d211c; font-size: 11px; }
.club-members-table .button { padding: 8px 11px; }
.club-activity-list { display: grid; gap: 8px; margin-top: 16px; }
.club-activity-list article { display: grid; grid-template-columns: 45px minmax(0,1fr) auto; align-items: center; gap: 11px; padding: 10px; border: 1px solid var(--line); border-radius: 8px; background: #fbfcfc; }
.club-activity-list time { display: grid; place-items: center; width: 45px; min-height: 46px; border-radius: 8px; background: #f2ecf8; color: #684795; }
.club-activity-list time strong { font-size: 17px; line-height: 1; }
.club-activity-list time span { font-size: 8px; font-weight: 900; }
.club-activity-list article > div { min-width: 0; }
.club-activity-list article > div > span { color: var(--teal); font-size: 8px; font-weight: 900; text-transform: uppercase; }
.club-activity-list h3 { margin: 3px 0; overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.club-activity-list p { margin: 0; color: var(--muted); font-size: 9px; }
.club-activity-list article > a { color: var(--teal); font-size: 10px; font-weight: 900; }

/* Library Management */
.library-page-header .eyebrow,
.library-workspace .eyebrow,
.library-dashboard-grid .eyebrow,
.library-inventory-panel .eyebrow,
.library-catalog-panel .eyebrow,
.library-members-loans-grid .eyebrow,
.library-import-history .eyebrow { display: block; margin-bottom: 5px; color: var(--teal); font-size: 9px; font-weight: 900; letter-spacing: .11em; text-transform: uppercase; }
.library-summary { display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); gap: 12px; margin-bottom: 18px; }
.library-metric { display: grid; grid-template-columns: 38px minmax(0,1fr); align-items: center; gap: 10px; min-width: 0; padding: 17px 15px; border: 1px solid var(--line); border-radius: 9px; background: #fff; box-shadow: 0 9px 24px rgba(33,48,43,.035); }
.library-metric > span { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; background: #e7f6f3; color: #168a80; font-size: 9px; font-weight: 900; letter-spacing: .03em; }
.library-metric > div { min-width: 0; }
.library-metric small,.library-metric em { display: block; }
.library-metric small { color: #26352f; font-size: 10px; font-weight: 900; }
.library-metric strong { display: block; margin: 2px 0 3px; color: #21140e; font-size: 25px; line-height: 1; }
.library-metric em { color: var(--muted); font-size: 8px; font-style: normal; font-weight: 700; }
.library-metric.metric-on_loan > span { background: #fff2df; color: #b7630c; }
.library-metric.metric-overdue > span { background: #ffebe8; color: #bf3f35; }
.library-workspace { display: grid; grid-template-columns: minmax(0,1.35fr) minmax(350px,.75fr); gap: 16px; margin-bottom: 16px; }
.library-workspace > .panel,
.library-dashboard-grid > .panel,
.library-members-loans-grid > .panel { margin: 0; }
.library-circulation-panel { border-top: 4px solid var(--teal); }
.library-live-badge,.library-source-state,.library-count-badge { padding: 6px 8px; border-radius: 999px; background: #eef3f1; color: #56655f; font-size: 9px; font-weight: 900; }
.library-source-state.connected { background: #def4eb; color: #146b52; }
.library-count-badge { min-width: 27px; text-align: center; }
.library-count-badge.overdue { background: #ffebe8; color: #b73c33; }
.library-circulation-grid { display: grid; grid-template-columns: minmax(0,1.25fr) minmax(230px,.75fr); gap: 0; margin-top: 8px; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; }
.library-scan-form { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); align-content: start; gap: 12px; padding: 18px; background: #fbfcfc; }
.library-scan-form header { grid-column: 1/-1; display: flex; align-items: center; gap: 10px; padding-bottom: 11px; border-bottom: 1px solid var(--line); }
.library-scan-form header > span { display: grid; place-items: center; flex: 0 0 27px; width: 27px; height: 27px; border-radius: 8px; background: var(--teal); color: #fff; font-size: 11px; font-weight: 900; }
.library-scan-form header div { display: grid; gap: 2px; }
.library-scan-form header strong { color: #2b1b14; font-size: 13px; }
.library-scan-form header small,.library-scan-form > p { color: var(--muted); font-size: 9px; line-height: 1.45; }
.library-scan-form label { min-width: 0; }
.library-scan-form label:nth-of-type(1) { grid-column: 1/-1; }
.library-scan-form .button { justify-content: center; align-self: end; }
.library-return-form { grid-template-columns: 1fr; border-left: 1px solid var(--line); background: #fff; }
.library-return-form header,.library-return-form label { grid-column: auto; }
.library-return-form header > span { background: var(--orange); }
.library-return-form > p { margin: 0; }
.library-koha-card { border-top: 4px solid var(--orange); }
.library-koha-card > p { margin: -2px 0 14px; color: var(--muted); font-size: 11px; line-height: 1.5; }
.library-upload-form { display: grid; gap: 10px; }
.library-upload-form > label { display: grid; place-items: center; gap: 4px; padding: 20px 14px; border: 1px dashed #aebfba; border-radius: 9px; background: #fafcfb; text-align: center; cursor: pointer; }
.library-upload-form > label > span { color: var(--teal); font-size: 25px; line-height: 1; }
.library-upload-form > label strong { color: #2b1b14; font-size: 11px; }
.library-upload-form > label small { max-width: 330px; color: var(--muted); font-size: 9px; line-height: 1.4; }
.library-upload-form input[type=file] { width: 100%; margin-top: 7px; padding: 8px; background: #fff; font-size: 9px; }
.library-upload-form .button { justify-content: center; }
.library-api-actions { display: flex; align-items: flex-start; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.library-koha-settings { flex: 1 1 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: #fafcfb; }
.library-koha-settings summary,.library-catalog-editor summary { color: var(--brown); font-size: 10px; font-weight: 900; cursor: pointer; }
.library-koha-settings form { margin-top: 12px; }
.library-koha-settings .inline-check { align-content: center; padding-top: 20px; }
.library-dashboard-grid { display: grid; grid-template-columns: minmax(0,1.2fr) minmax(300px,.8fr); gap: 16px; margin-bottom: 16px; }
.library-overdue-panel { border-top: 4px solid #d9534f; }
.library-availability-panel { border-top: 4px solid var(--teal); }
.library-compact-table { min-width: 680px; }
.library-compact-table th,.library-compact-table td { padding: 10px 9px; font-size: 10px; }
.library-compact-table td strong { color: #2b1b14; }
.library-late-days { color: #c43c33 !important; }
.library-status,.library-source-tag { display: inline-flex; align-items: center; padding: 5px 7px; border-radius: 6px; background: #eef2f1; color: #5f6c67; font-size: 8px; font-weight: 900; text-transform: uppercase; white-space: nowrap; }
.library-status.status-issued,.library-status.status-running { background: #fff0dc; color: #99570e; }
.library-status.status-overdue,.library-status.status-failed,.library-status.status-lost { background: #ffebe8; color: #b63a31; }
.library-status.status-returned,.library-status.status-completed { background: #def4eb; color: #146b52; }
.library-category-list { display: grid; gap: 13px; }
.library-category-list > div { display: grid; gap: 7px; }
.library-category-list header { display: flex; justify-content: space-between; gap: 15px; }
.library-category-list strong { color: #2b1b14; font-size: 10px; }
.library-category-list header span { color: var(--muted); font-size: 9px; font-weight: 700; }
.library-category-bar { height: 7px; overflow: hidden; border-radius: 999px; background: #eef2f1; }
.library-category-bar i { display: block; height: 100%; border-radius: inherit; background: var(--teal); }
.library-empty-state { display: grid; place-items: center; gap: 5px; min-height: 100px; padding: 20px; color: var(--muted); text-align: center; }
.library-empty-state strong { color: #2b1b14; font-size: 12px; }
.library-empty-state span { max-width: 440px; font-size: 10px; line-height: 1.5; }
.library-catalog-panel { margin-bottom: 16px; border-top: 4px solid var(--brown); }
.library-catalog-panel .panel-heading p { margin: 3px 0 0; font-size: 10px; }
.library-catalog-filters { display: grid; grid-template-columns: minmax(260px,1.4fr) minmax(180px,.6fr) auto; align-items: end; gap: 10px; margin: 12px 0 14px; padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: #f8faf9; }
.library-catalog-editor { margin-bottom: 14px; padding: 12px; border: 1px solid #d7e2df; border-radius: 8px; background: #fbfcfc; }
.library-editor-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px; margin-top: 14px; }
.library-editor-grid > form { padding: 17px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.library-editor-grid h3 { margin: 0; color: #2b1b14; font-size: 14px; }
.library-editor-grid .mini-fields,.library-koha-settings .mini-fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); justify-content: stretch; gap: 10px; }
.library-editor-grid .mini-fields label,.library-koha-settings .mini-fields label { width: auto; min-width: 0; }
.library-catalog-table { min-width: 990px; }
.library-catalog-table td > strong { color: #2b1b14; }
.library-catalog-table .row-actions { min-width: 145px; }
.library-barcodes { max-width: 310px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.library-source-tag { background: #e8f4f2; color: #24756c; }
.library-members-loans-grid { display: grid; grid-template-columns: minmax(390px,.75fr) minmax(0,1.25fr); gap: 16px; margin-bottom: 16px; }
.library-members-panel { border-top: 4px solid #7b63b6; }
.library-loans-panel { border-top: 4px solid var(--orange); }
.library-member-form { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); align-items: end; gap: 10px; margin-bottom: 14px; padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: #fafcfb; }
.library-member-form .wide { grid-column: 1/-1; }
.library-member-form .button { justify-content: center; }
.library-member-list { display: grid; }
.library-member-list article { display: grid; grid-template-columns: 32px minmax(0,1fr) auto auto; align-items: center; gap: 9px; padding: 10px 0; border-top: 1px solid var(--line); }
.library-member-avatar { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; background: #eee9f7; color: #6f52a3; font-size: 9px; font-weight: 900; }
.library-member-list article > div { display: grid; gap: 2px; min-width: 0; }
.library-member-list strong { color: #2b1b14; font-size: 10px; }
.library-member-list small { overflow: hidden; color: var(--muted); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.library-member-list a { font-size: 9px; }
.library-loan-count { padding: 4px 6px; border-radius: 5px; background: #edf5f3; color: #277467; font-size: 8px; font-weight: 900; }
.library-loan-count.overdue { background: #ffebe8; color: #b63a31; }
.library-import-history { border-top: 4px solid #6a8090; }
.library-inventory-panel { margin-bottom: 16px; padding: 0; overflow: hidden; border-top: 4px solid #6f52a3; }
.library-inventory-heading { margin: 0; padding: 19px 20px 15px; background: linear-gradient(135deg,#f7f4fb 0%,#fff 65%); }
.library-inventory-heading h2 { margin-bottom: 4px; }
.library-inventory-heading p { margin: 0; font-size: 10px; }
.library-inventory-status { display: inline-flex; padding: 6px 9px; border-radius: 999px; background: #fff0dc; color: #99570e; font-size: 9px; font-weight: 900; letter-spacing: .05em; text-transform: uppercase; }
.library-inventory-status.status-completed { background: #def4eb; color: #146b52; }
.library-inventory-session-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; padding: 17px 20px 13px; border-top: 1px solid var(--line); }
.library-inventory-session-head > div:first-child > span { color: #7252a6; font-size: 9px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.library-inventory-session-head h3 { margin: 4px 0; color: #2b1b14; font-size: 20px; }
.library-inventory-session-head p,.library-inventory-session-head small { margin: 0; color: var(--muted); font-size: 9px; }
.library-inventory-session-head > div:last-child { display: grid; gap: 3px; text-align: right; }
.library-inventory-session-head > div:last-child > span { color: var(--muted); font-size: 8px; font-weight: 900; text-transform: uppercase; }
.library-inventory-session-head > div:last-child strong { font-size: 11px; }
.library-inventory-metrics { display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); gap: 8px; padding: 0 20px 14px; }
.library-inventory-metrics article { min-width: 0; padding: 11px 12px; border: 1px solid var(--line); border-radius: 8px; background: #fafcfb; }
.library-inventory-metrics span { display: block; overflow: hidden; color: var(--muted); font-size: 8px; font-weight: 900; letter-spacing: .04em; text-overflow: ellipsis; text-transform: uppercase; white-space: nowrap; }
.library-inventory-metrics strong { display: block; margin-top: 4px; color: #2b1b14; font-size: 20px; }
.library-inventory-metrics .metric-found { border-color: #b8dfd3; background: #f3fbf8; }
.library-inventory-metrics .metric-found strong { color: #15705a; }
.library-inventory-metrics .metric-pending { border-color: #ead4ac; background: #fffbf2; }
.library-inventory-metrics .metric-missing { border-color: #edc5c1; background: #fff8f7; }
.library-inventory-metrics .metric-missing strong { color: #b33c32; }
.library-inventory-metrics .metric-damaged { border-color: #ecd4b8; background: #fff9f2; }
.library-inventory-progress { padding: 0 20px 17px; }
.library-inventory-progress header { display: flex; justify-content: space-between; gap: 15px; margin-bottom: 6px; color: var(--muted); font-size: 9px; font-weight: 800; }
.library-inventory-progress header strong { color: #7252a6; }
.library-inventory-progress > span { display: block; height: 8px; overflow: hidden; border-radius: 999px; background: #ebeef0; }
.library-inventory-progress i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg,#7252a6,#1ba3a4); }
.library-inventory-workspace { display: grid; grid-template-columns: minmax(0,1.6fr) minmax(250px,.65fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.library-inventory-scan-form { display: grid; grid-template-columns: minmax(200px,1.2fr) minmax(170px,.7fr) auto; align-items: end; gap: 11px; padding: 19px 20px; background: #f9fbfb; }
.library-inventory-scan-form > div { grid-column: 1/-1; display: flex; align-items: center; gap: 10px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.library-scan-symbol { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 9px; background: #e7f5f3; color: #177c74; font-size: 9px; font-weight: 900; letter-spacing: -1px; }
.library-inventory-scan-form h3 { margin: 0; font-size: 15px; }
.library-inventory-scan-form label { min-width: 0; }
.library-inventory-scan-form .wide { grid-column: span 2; }
.library-inventory-scan-form .button { justify-content: center; }
.library-inventory-complete-card { padding: 20px; border-left: 1px solid var(--line); background: #fffaf3; }
.library-inventory-complete-card h3 { margin: 5px 0 7px; color: #2b1b14; font-size: 16px; }
.library-inventory-complete-card p { color: var(--muted); font-size: 10px; line-height: 1.5; }
.library-inventory-complete-card .button { width: 100%; justify-content: center; }
.library-inventory-complete-banner { display: flex; align-items: center; gap: 12px; margin: 0 20px 17px; padding: 13px 15px; border: 1px solid #b8dfd3; border-radius: 8px; background: #f3fbf8; }
.library-inventory-complete-banner > span { flex: 0 0 30px; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: #23916f; color: #fff; font-weight: 900; }
.library-inventory-complete-banner > div { min-width: 0; margin-right: auto; }
.library-inventory-complete-banner strong { font-size: 12px; }
.library-inventory-complete-banner p { margin: 3px 0 0; color: var(--muted); font-size: 9px; }
.library-inventory-register { padding: 18px 20px; }
.library-inventory-register-head { display: flex; justify-content: space-between; align-items: end; gap: 15px; margin-bottom: 11px; }
.library-inventory-register-head h3 { margin: 0; font-size: 15px; }
.library-inventory-register-head form { display: flex; align-items: end; gap: 7px; }
.library-inventory-register-head label { display: grid; gap: 4px; color: var(--muted); font-size: 8px; font-weight: 900; text-transform: uppercase; }
.library-inventory-register-head select { min-width: 145px; min-height: 35px; padding: 7px 9px; }
.library-inventory-table { min-width: 900px; }
.library-inventory-table th,.library-inventory-table td { padding: 10px 9px; font-size: 10px; }
.library-inventory-table td > strong { color: #2b1b14; }
.library-inventory-outcome { display: inline-flex; padding: 5px 7px; border-radius: 6px; background: #fff0dc; color: #99570e; font-size: 8px; font-weight: 900; text-transform: uppercase; white-space: nowrap; }
.library-inventory-outcome.outcome-found { background: #def4eb; color: #146b52; }
.library-inventory-outcome.outcome-missing { background: #ffebe8; color: #b63a31; }
.library-inventory-outcome.outcome-exempt { background: #e8f0f7; color: #496c91; }
.library-inventory-start { display: grid; grid-template-columns: minmax(0,1.25fr) minmax(300px,.75fr); gap: 25px; padding: 22px 20px; border-top: 1px solid var(--line); background: linear-gradient(135deg,#fbfafc,#fff); }
.library-inventory-start h3 { margin: 4px 0 7px; font-size: 19px; }
.library-inventory-start p { max-width: 700px; color: var(--muted); font-size: 10px; line-height: 1.55; }
.library-inventory-start ul { display: grid; gap: 5px; margin: 12px 0 0; padding-left: 18px; color: #4f5e58; font-size: 10px; }
.library-inventory-start form { padding: 16px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.library-inventory-start form .button { justify-content: center; }
.library-inventory-start form > small { color: #a44135; font-size: 9px; }
.library-inventory-history { padding: 0 20px 18px; border-top: 1px solid var(--line); }
.library-inventory-history > .panel-heading { margin: 0; padding-top: 17px; }
.library-inventory-history h3 { margin: 0; font-size: 14px; }
.library-inventory-history table { min-width: 720px; }
.library-inventory-history th,.library-inventory-history td { padding: 9px; font-size: 9px; }
.portal-library-summary { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 13px; margin-bottom: 16px; }
.portal-library-summary article { display: grid; gap: 4px; padding: 18px; border: 1px solid var(--line); border-top: 4px solid var(--teal); border-radius: 9px; background: #fff; }
.portal-library-summary article.attention { border-top-color: #d9534f; background: #fffafa; }
.portal-library-summary span { color: var(--muted); font-size: 9px; font-weight: 900; letter-spacing: .07em; text-transform: uppercase; }
.portal-library-summary strong { color: #2b1b14; font-size: 23px; }
.portal-library-summary small { color: var(--muted); font-size: 9px; font-weight: 700; }
.portal-library-panel { border-top: 4px solid var(--orange); }
.portal-library-table { min-width: 700px; }
.portal-library-table td > strong { color: #2b1b14; }

@media (max-width: 1180px) {
    .clubs-summary { grid-template-columns: repeat(3,minmax(0,1fr)); }
    .clubs-management-grid,
    .club-operations-grid { grid-template-columns: minmax(0,1fr); }
    .club-members-panel,
    .club-activities-panel { min-width: 0; }
    .library-summary { grid-template-columns: repeat(3,minmax(0,1fr)); }
    .library-workspace,.library-members-loans-grid { grid-template-columns: 1fr; }
    .library-inventory-metrics { grid-template-columns: repeat(3,minmax(0,1fr)); }
    .library-inventory-workspace { grid-template-columns: 1fr; }
    .library-inventory-complete-card { border-top: 1px solid var(--line); border-left: 0; }
}

@media (max-width: 1120px) {
    .portal-dashboard-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .portal-dashboard-grid > :last-child { grid-column: 1 / -1; }
    .portal-profile-strip { grid-template-columns: auto minmax(0, 1fr); }
    .portal-profile-strip dl { grid-column: 1 / -1; }
    .portal-profile-strip dl div:first-child { border-left: 0; padding-left: 0; }
    .module-form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .module-form-grid > :last-child { grid-column: 1 / -1; }
    .account-ledger-grid { grid-template-columns: 1fr; }
    .asc-import-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .asc-import-actions { justify-content: flex-end; }
    .inquiry-form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .inquiry-form-grid .inquiry-message,
    .inquiry-form-grid .inquiry-notes { grid-column: span 1; }
    .inquiry-save { grid-column: 2; }
    .inquiry-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .inquiry-filter-actions { justify-content: flex-end; }
    .inquiry-activity-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .inquiry-activity-form .activity-details { grid-column: 1 / -1; }
    .registration-field-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .registration-document-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .registration-filters { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .timetable-editor-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .timetable-editor-grid .timetable-notes { grid-column: span 2; }
    .parent-messenger-panel { grid-template-columns: minmax(220px,.6fr) minmax(0,1.4fr); gap: 20px; }
    .library-dashboard-grid { grid-template-columns: 1fr; }
    .library-editor-grid { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
    .clubs-summary { grid-template-columns: 1fr; }
    .clubs-management-grid { grid-template-columns: minmax(0,1fr); }
    .club-editor-form,
    .club-activity-form,
    .club-member-add-form,
    .clubs-search-form { grid-template-columns: 1fr; }
    .club-editor-form .club-wide,
    .club-activity-form .club-wide,
    .club-form-actions { grid-column: auto; }
    .club-profile-banner { grid-template-columns: 52px minmax(0,1fr); }
    .club-profile-symbol { width: 52px; height: 52px; }
    .club-profile-banner dl { grid-column: 1/-1; grid-template-columns: 1fr; }
    .club-profile-banner dl div { border-top: 1px solid var(--line); border-left: 0; }
    .club-directory-card { grid-template-columns: 38px minmax(0,1fr); }
    .club-directory-mark { width: 38px; height: 38px; }
    .club-member-count { grid-column: 2; grid-template-columns: auto 1fr; gap: 4px; text-align: left; }
    .club-activity-list article { grid-template-columns: 42px minmax(0,1fr); }
    .club-activity-list article > a { grid-column: 2; }
    .club-members-table { width: 100%; max-width: 100%; }
    .sidebar { padding: 14px 18px; }
    .sidebar .brand { margin-bottom: 12px; }
    .sidebar .brand-logo { width: 42px; height: 42px; }
    .sidebar .brand span { max-width: 250px; font-size: 10px; }
    .sidebar .academic-year-switcher { margin: 0 0 10px; padding: 9px; }
    .sidebar .academic-year-switcher > span { font-size: 9px; }
    .sidebar nav { grid-template-columns: 1fr; gap: 0; }
    .sidebar .nav-group { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; padding: 9px 0; }
    .sidebar .nav-group-title { grid-column: 1 / -1; padding: 0 9px 3px; font-size: 8px; }
    .sidebar nav a { min-width: 0; padding: 7px 9px; font-size: 11px; }
    .sidebar .nav-icon { width: 18px; height: 18px; flex-basis: 18px; }
    .sidebar .nav-icon svg { width: 18px; height: 18px; }
    .sidebar .user-box { display: flex; align-items: center; flex-wrap: wrap; gap: 5px 12px; margin-top: 11px; padding-top: 10px; }
    .sidebar .user-box span { margin-right: auto; }
    .portal-welcome { display: block; }
    .portal-today { margin-top: 4px; }
    .portal-welcome h1 { font-size: 27px; }
    .portal-child-switcher > div { display: grid; }
    .portal-child-choice { min-width: 0; }
    .portal-profile-strip { grid-template-columns: auto minmax(0, 1fr); padding: 16px; }
    .portal-profile-strip dl { grid-template-columns: 1fr; gap: 9px; }
    .portal-profile-strip dl div { padding: 9px 0 0; border-top: 1px solid #c9e6e5; border-left: 0; }
    .portal-attendance-feature { padding: 18px; }
    .portal-attendance-layout { grid-template-columns: 1fr; gap: 22px; }
    .portal-attendance-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .portal-attendance-metrics > div { border-top: 1px solid var(--line); }
    .portal-attendance-metrics > div:nth-child(odd) { border-left: 0; }
    .portal-dashboard-grid,
    .portal-term-strip { grid-template-columns: 1fr; }
    .portal-dashboard-grid > :last-child { grid-column: auto; }
    .portal-calendar-list article { grid-template-columns: auto minmax(0, 1fr); }
    .portal-event-type { grid-column: 2; }
    .module-summary,
    .module-form-grid,
    .portal-module-detail,
    .portal-account-summary { grid-template-columns: 1fr; }
    .module-form-grid > :last-child { grid-column: auto; }
    .module-ledger-heading { align-items: stretch; flex-direction: column; }
    .account-summary-inline { justify-content: flex-start; }
    .account-summary-inline span { flex: 1 1 120px; }
    .portal-detail-list dl { grid-template-columns: 1fr; }
    .timetable-class-filter { min-width: 0; }
    .asc-import-form,
    .asc-report-metrics,
    .asc-report-layout { grid-template-columns: 1fr; }
    .asc-import-actions { justify-content: stretch; }
    .asc-import-actions .button { flex: 1 1 0; justify-content: center; }
    .inquiry-form-grid,
    .inquiry-filters,
    .inquiry-detail-grid,
    .inquiry-activity-form { grid-template-columns: 1fr; }
    .inquiry-form-grid .inquiry-message,
    .inquiry-form-grid .inquiry-notes,
    .inquiry-save,
    .inquiry-activity-form .activity-details { grid-column: auto; }
    .inquiry-filter-actions { justify-content: stretch; }
    .inquiry-filter-actions .button { flex: 1 1 0; }
    .inquiry-profile-card dl { grid-template-columns: 1fr; }
    .inquiry-activity-head { align-items: flex-start; flex-direction: column; gap: 3px; }
    .registration-page .login-main { padding: 18px 12px 40px; }
    .registration-public-header { align-items: flex-start; flex-direction: column; margin-bottom: 22px; }
    .registration-school-brand img { width: 48px; height: 48px; }
    .registration-signin-link { align-self: stretch; text-align: center; }
    .registration-intro { text-align: left; }
    .registration-intro h1 { font-size: 35px; }
    .registration-intro > div { justify-content: flex-start; }
    .registration-form-section { padding: 18px; }
    .registration-field-grid,
    .registration-textarea-grid,
    .registration-service-choices,
    .registration-document-grid,
    .registration-filters,
    .registration-review-grid,
    .registration-review-form { grid-template-columns: 1fr; }
    .registration-field-grid .registration-wide,
    .registration-review-form .wide,
    .registration-review-form .button { grid-column: auto; }
    .registration-submit-section > div { align-items: stretch; flex-direction: column; }
    .registration-submit-section .button { width: 100%; }
    .registration-success-card { margin-top: 3vh; padding: 25px 18px; }
    .registration-success-card h1 { font-size: 28px; }
    .registration-success-actions { display: grid; }
    .registration-applicant-card dl { grid-template-columns: 1fr; }
    .registration-applicant-card dl .wide { grid-column: auto; }
    .timetable-editor-grid { grid-template-columns: 1fr; }
    .timetable-editor-grid .timetable-notes { grid-column: auto; }
    .communications-header { align-items: flex-start; flex-direction: column; }
    .communication-provider-status { justify-content: flex-start; }
    .communication-readiness { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .parent-messenger-panel { grid-template-columns: 1fr; gap: 0; }
    .parent-messenger-intro { padding: 21px; }
    .parent-message-form { padding: 21px; }
    .parent-audience-grid,
    .parent-channel-choices { grid-template-columns: 1fr; }
    .parent-message-review { align-items: flex-start; flex-direction: column; }
    .parent-message-review .channel-lengths { text-align: left; }
    .parent-messenger-empty { padding: 24px 21px; }
    .sms-settings-layout .mini-fields { display: grid; grid-template-columns: 1fr; }
    .library-summary { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .library-metric { padding: 13px 11px; }
    .library-metric strong { font-size: 21px; }
    .library-circulation-grid,.library-scan-form,.library-member-form,.library-catalog-filters { grid-template-columns: 1fr; }
    .library-scan-form label,.library-scan-form label:nth-of-type(1),.library-scan-form header,.library-member-form .wide { grid-column: auto; }
    .library-return-form { border-top: 1px solid var(--line); border-left: 0; }
    .library-catalog-filters .button { justify-content: center; }
    .library-page-header { align-items: flex-start; flex-direction: column; }
    .library-page-header .button-row { justify-content: flex-start; }
    .library-member-list article { grid-template-columns: 32px minmax(0,1fr) auto; }
    .library-member-list article > a { grid-column: 2; }
    .portal-library-summary { grid-template-columns: 1fr; }
    .library-editor-grid .mini-fields,.library-koha-settings .mini-fields { grid-template-columns: 1fr; }
    .library-inventory-heading,.library-inventory-session-head,.library-inventory-register-head,.library-inventory-complete-banner { align-items: stretch; flex-direction: column; }
    .library-inventory-session-head > div:last-child { text-align: left; }
    .library-inventory-metrics { grid-template-columns: repeat(2,minmax(0,1fr)); padding-right: 14px; padding-left: 14px; }
    .library-inventory-progress { padding-right: 14px; padding-left: 14px; }
    .library-inventory-scan-form,.library-inventory-start { grid-template-columns: 1fr; }
    .library-inventory-scan-form .wide,.library-inventory-scan-form > div { grid-column: auto; }
    .library-inventory-register { padding-right: 14px; padding-left: 14px; }
    .library-inventory-register-head form { align-items: stretch; flex-direction: column; }
    .library-inventory-complete-banner { margin-right: 14px; margin-left: 14px; }
    .library-inventory-history { padding-right: 14px; padding-left: 14px; }
}

@media print {
    .end-year-report { width: auto; max-width: none; min-height: 0; padding: 0; box-shadow: none; }
    .end-year-cover { break-after: avoid; page-break-after: avoid; }
}
