:root {
  --ink: #24323d;
  --muted: #647886;
  --line: #dce4e8;
  --canvas: #f7f9fa;
  --panel: #ffffff;
  --navy: #0b2d49;
  --navy-mid: #123f63;
  --blue: #154b73;
  --blue-soft: #e9f1f6;
  --teal: #277a70;
  --teal-soft: #e8f6f2;
  --amber: #9a6817;
  --amber-soft: #fff5df;
  --red: #a64942;
  --red-soft: #fcebe9;
  --radius: 7px;
  --shadow: 0 4px 18px rgba(22, 57, 83, .06);
}

* { box-sizing: border-box; }
html { min-height: 100%; }
body { min-height: 100%; margin: 0; color: var(--ink); background: var(--canvas); font: 14px/1.5 Lato, Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4 { font-family: Georgia, "Times New Roman", serif; }

.app-shell { min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 20; display: flex; flex-direction: column; width: 248px; padding: 28px 18px 18px; overflow-y: auto; color: #d9e8eb; background: linear-gradient(180deg, var(--navy-mid), var(--navy)); box-shadow: 2px 0 12px rgba(17, 46, 70, .12); }
.brand { display: flex; align-items: center; gap: 13px; padding: 4px 10px 32px; color: #fff; }
.school-crest { display: grid; flex: 0 0 auto; width: 46px; height: 46px; place-items: center; overflow: hidden; padding: 2px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 2px #fff; }
.brand-logo { width: 100%; height: 100%; border-radius: 50%; object-fit: contain; background: #fff; }
.brand strong, .brand small { display: block; }
.brand strong { font-family: Georgia, serif; font-size: 18px; letter-spacing: -.035em; }
.brand small { margin-top: 2px; color: #d3e0e9; font-size: 10px; }
.sidebar nav { display: grid; gap: 3px; }
.nav-label { margin: 0 11px 7px; color: #a8c3d3; font-size: 9px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.nav-label--spaced { margin-top: 20px; }
.nav-link { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 4px; color: #d5e0e7; font-size: 13px; font-weight: 600; }
.nav-link > span { display: grid; width: 15px; place-items: center; color: #c7dae5; font-size: 14px; }
.nav-link:hover { color: #fff; background: rgba(255,255,255,.12); }
.nav-link.is-active { color: var(--blue); background: #fff; font-weight: 800; }
.nav-link.is-active > span { color: var(--blue); }
.sidebar-bottom { margin-top: auto; padding: 19px 10px 2px; border-top: 1px solid rgba(255,255,255,.2); color: #dce7ed; font-size: 11px; }
.sidebar-bottom span { display: inline-block; width: 7px; height: 7px; margin-right: 7px; border-radius: 50%; background: #d5f48e; }
.sidebar-signout { display: block; width: max-content; margin: 10px 0 0 14px; padding: 6px 8px; border: 1px solid rgba(255,255,255,.32); border-radius: 4px; color: #fff; font-size: 10px; font-weight: 800; }
.sidebar-signout:hover { background: rgba(255,255,255,.12); }

.app-frame { min-height: 100vh; margin-left: 248px; }
.top-header { display: flex; align-items: center; justify-content: flex-end; min-height: 70px; padding: 0 clamp(22px, 5vw, 76px); color: var(--ink); background: #fff; border-bottom: 1px solid #edf1f3; }
.top-header__right { display: flex; align-items: center; gap: 18px; }
.school-year { color: var(--muted); font-size: 11px; font-weight: 700; }
.icon-button, .menu-toggle { position: relative; display: grid; width: 32px; height: 32px; place-items: center; border: 1px solid var(--line); border-radius: 5px; color: var(--blue); background: #fff; }
.notification-button { position: relative; display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 6px 9px; border: 1px solid var(--line); border-radius: 5px; color: var(--blue); background: #fff; font-size: 10px; font-weight: 800; }
.notification-button:hover { border-color: #80a4bd; background: #f6fbff; }
.notification-count { display: grid; width: 15px; height: 15px; place-items: center; border-radius: 50%; color: #fff; background: var(--red); font-size: 8px; }
.staff-account { display: flex; align-items: center; gap: 9px; }
.staff-account strong, .staff-account small { display: block; }
.staff-account strong { font-size: 11px; }
.staff-account small { margin-top: 1px; color: var(--muted); font-size: 10px; }
.signout-button { padding: 7px 9px; border: 1px solid #cbd9e0; border-radius: 4px; color: var(--blue); background: #fff; font-size: 10px; font-weight: 800; }
.signout-button:hover { border-color: #80a4bd; background: #f6fbff; }
.avatar { display: inline-grid; width: 37px; height: 37px; place-items: center; border-radius: 50%; color: #fff; background: var(--blue); font-size: 11px; font-weight: 800; }
.avatar--small { width: 30px; height: 30px; font-size: 9px; }
.avatar--teal { background: var(--teal); }
.avatar--amber { background: var(--amber); }
.menu-toggle { display: none; }

.main-content { min-height: calc(100vh - 108px); padding: 39px clamp(22px, 5vw, 76px) 58px; background: linear-gradient(#fff 0, var(--canvas) 255px); }
footer { padding: 17px clamp(22px, 5vw, 76px); color: #718392; background: var(--canvas); border-top: 1px solid var(--line); font-size: 10px; }
.eyebrow { margin: 0 0 7px; color: #5e7585; font-size: 10px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.page-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 25px; }
.page-heading h1 { margin: 0; color: var(--blue); font-size: clamp(26px, 3vw, 35px); line-height: 1.1; letter-spacing: -.045em; }
.page-heading p:not(.eyebrow) { max-width: 680px; margin: 8px 0 0; color: var(--muted); font-size: 13px; }
.heading-actions { display: flex; gap: 9px; flex-wrap: wrap; justify-content: flex-end; }

.panel { margin-bottom: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); box-shadow: var(--shadow); }
.panel__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; padding: 19px 21px 15px; border-bottom: 1px solid #e8edef; }
.panel__head h2 { margin: 0; font-size: 18px; letter-spacing: -.025em; }
.panel__head p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.panel__body { padding: 20px 21px; }
.panel__body--flush { padding: 0; }
.panel__foot { display: flex; flex-wrap: wrap; gap: 9px; padding: 0 21px 20px; }
.panel-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(300px, .75fr); gap: 20px; }
.two-col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.three-col { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }

.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 22px; }
.stat-card { min-height: 122px; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); }
.stat-card--link { display: block; transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease; }
.stat-card--link:hover, .stat-card--link:focus-visible { border-color: #8db0c6; box-shadow: 0 7px 22px rgba(22, 57, 83, .12); outline: 0; transform: translateY(-1px); }
.stat-card__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.stat-card h2 { margin: 7px 0 0; font-family: Lato, sans-serif; font-size: 27px; line-height: 1; letter-spacing: -.06em; }
.stat-card p { margin: 3px 0 0; color: var(--muted); font-size: 11px; font-weight: 700; }
.stat-icon { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 7px; color: var(--blue); background: var(--blue-soft); font-size: 16px; }
.stat-icon--teal { color: var(--teal); background: var(--teal-soft); }
.stat-icon--amber { color: var(--amber); background: var(--amber-soft); }
.stat-icon--red { color: var(--red); background: var(--red-soft); }
.stat-foot { margin-top: 10px; color: var(--muted); font-size: 10px; }
.trend-good { color: var(--teal); font-weight: 800; }
.trend-warning { color: var(--amber); font-weight: 800; }

.button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 35px; padding: 8px 11px; border: 1px solid transparent; border-radius: 4px; color: #fff; background: var(--blue); font-size: 11px; font-weight: 800; }
.button:hover { background: #0d395b; }
.button--outline { border-color: #cbd9e0; color: var(--blue); background: #fff; }
.button--outline:hover { color: #0d395b; border-color: #80a4bd; background: #f6fbff; }
.button--soft { color: var(--teal); background: var(--teal-soft); }
.button--soft:hover { background: #d6efe8; }
.button--danger { background: var(--red); }
.button--danger:hover { background: #873b36; }
.button-row { display: flex; flex-wrap: wrap; gap: 9px; }
.table-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { padding: 11px 13px; color: #647886; background: #f7fafb; border-bottom: 1px solid #dfe8eb; font-size: 9px; letter-spacing: .095em; text-align: left; text-transform: uppercase; white-space: nowrap; }
td { padding: 12px 13px; border-bottom: 1px solid #edf1f2; vertical-align: middle; font-size: 12px; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #f9fbfc; }
.person { display: flex; align-items: center; gap: 9px; }
.person strong, .person small { display: block; }
.person strong { font-size: 12px; }
.person small { margin-top: 1px; color: var(--muted); font-size: 10px; }
.badge { display: inline-flex; align-items: center; min-height: 23px; padding: 4px 8px; border-radius: 999px; font-size: 10px; font-weight: 800; white-space: nowrap; }
.badge--good { color: #177161; background: #e1f4ee; }
.badge--warning { color: #8a5a0b; background: var(--amber-soft); }
.badge--danger { color: #963f38; background: var(--red-soft); }
.badge--neutral { color: #476678; background: var(--blue-soft); }
.tag-list { display: flex; flex-wrap: wrap; gap: 8px; }
.school-clock { align-items: flex-end; color: #647886; display: flex; flex-direction: column; font-size: 12px; line-height: 1.25; text-align: right; white-space: nowrap; }
.school-clock strong { color: #243746; font-size: 14px; }
.school-clock small { font-size: 11px; }
.progress { width: 100%; height: 7px; overflow: hidden; border-radius: 99px; background: #e7edf0; }
.progress > span { display: block; height: 100%; border-radius: inherit; background: var(--teal); }
.progress--warning > span { background: #d69525; }
.progress--danger > span { background: var(--red); }

.search-field { display: flex; align-items: center; gap: 9px; max-width: 310px; min-height: 35px; padding: 0 10px; border: 1px solid #d5e0e4; border-radius: 5px; background: #fff; }
.search-field span { color: #7d919e; }
.search-field input { width: 100%; min-width: 0; border: 0; outline: 0; color: var(--ink); background: transparent; font-size: 12px; }
.filter-bar { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 15px 20px; border-bottom: 1px solid #e8edef; }
.filter-links { display: flex; gap: 6px; flex-wrap: wrap; }
.filter-chip { padding: 5px 8px; border: 0; border-radius: 999px; color: var(--muted); background: transparent; font-size: 10px; font-weight: 800; }
.filter-chip.is-selected { color: var(--blue); background: var(--blue-soft); }

.agenda { display: grid; gap: 0; }
.agenda-item { display: grid; grid-template-columns: 48px 1fr auto; gap: 12px; align-items: center; padding: 14px 0; border-bottom: 1px solid #edf1f2; }
.agenda-item:last-child { border-bottom: 0; }
.agenda-time { color: var(--blue); font-size: 11px; font-weight: 800; }
.agenda-item strong, .agenda-item small { display: block; }
.agenda-item strong { font-size: 12px; }
.agenda-item small { margin-top: 2px; color: var(--muted); font-size: 10px; }
.notice { margin-bottom: 19px; padding: 11px 13px; border: 1px solid #b8dfd1; border-radius: 5px; color: #176052; background: #e9f7f1; font-size: 12px; font-weight: 700; }
.notice--warning { border-color: #f2d59b; color: #8a5b0b; background: #fff5df; }
.attention-list { display: grid; gap: 11px; }
.attention-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px; border-radius: 5px; background: #f8fafb; }
.attention-item p { margin: 0; color: var(--muted); font-size: 10px; }
.attention-item strong { font-size: 12px; }
.attention-item__icon { display: grid; flex: 0 0 auto; width: 29px; height: 29px; place-items: center; border-radius: 50%; color: var(--amber); background: var(--amber-soft); }

.metric-row { display: grid; grid-template-columns: 116px 1fr 44px; gap: 11px; align-items: center; padding: 10px 0; border-bottom: 1px solid #edf1f2; }
.metric-row:last-child { border-bottom: 0; }
.metric-row strong { font-size: 11px; }
.metric-row span:last-child { color: var(--muted); font-size: 10px; text-align: right; }
.bar-chart { display: flex; align-items: end; gap: 10px; height: 178px; padding: 17px 5px 0; border-bottom: 1px solid #dce5e8; }
.bar-chart__item { display: grid; flex: 1; height: 100%; grid-template-rows: 1fr auto; align-items: end; gap: 8px; min-width: 20px; text-align: center; }
.bar-chart__bar { width: 100%; min-height: 5px; border-radius: 3px 3px 0 0; background: var(--blue); }
.bar-chart__item small { color: var(--muted); font-size: 9px; }

.profile-hero { display: grid; grid-template-columns: auto 1fr auto; gap: 18px; align-items: center; padding: 22px; }
.profile-hero h1 { margin: 0; color: var(--blue); font-size: 28px; letter-spacing: -.045em; }
.profile-hero p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.profile-avatar { width: 65px; height: 65px; font-size: 19px; }
.profile-tabs { display: flex; gap: 1px; overflow-x: auto; padding: 0 20px; border-top: 1px solid #e8edef; }
.profile-tabs a { padding: 13px 12px 11px; border-bottom: 3px solid transparent; color: var(--muted); font-size: 11px; font-weight: 800; white-space: nowrap; }
.profile-tabs a.is-current { border-color: var(--blue); color: var(--blue); }
.alert-card { padding: 14px; border: 1px solid #f0c5bf; border-radius: 5px; color: #873b36; background: var(--red-soft); }
.alert-card strong, .alert-card small { display: block; }
.alert-card strong { font-size: 12px; }
.alert-card small { margin-top: 2px; font-size: 10px; }

.register-table select { min-width: 105px; padding: 6px 8px; border: 1px solid #cfdce1; border-radius: 4px; color: var(--ink); background: #fff; font-size: 11px; }
.register-table input[type="text"] { width: min(100%, 220px); min-height: 34px; padding: 7px 8px; border: 1px solid #cfdce1; border-radius: 4px; color: var(--ink); background: #fff; font-size: 11px; }
.lunch-choice { display: inline-flex; align-items: center; gap: 7px; color: #354955; font-size: 11px; font-weight: 800; white-space: nowrap; }
.lunch-choice input { width: 16px; height: 16px; accent-color: var(--teal); }
.check-row { display: inline-flex; align-items: center; gap: 7px; color: #354955; font-size: 11px; font-weight: 800; white-space: nowrap; }
.check-row input { width: 16px; height: 16px; accent-color: var(--teal); }
.register-note-hint { margin: 0; padding: 10px 20px; color: #647886; background: #f8fafb; border-bottom: 1px solid #e8edef; font-size: 11px; }
.register-help { display: flex; gap: 9px; flex-wrap: wrap; color: var(--muted); font-size: 10px; }
.register-help span { display: inline-flex; align-items: center; gap: 5px; }
.legend-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--teal); }
.legend-dot--amber { background: #d69525; }
.legend-dot--red { background: var(--red); }

.muted-copy { max-width: 760px; margin: 0; color: var(--muted); font-size: 12px; }
.form-panel { max-width: 900px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; padding: 21px; }
.form-grid label { display: grid; gap: 6px; color: #405561; font-size: 11px; font-weight: 800; }
.form-grid input, .form-grid select, .form-grid textarea, .assessment-entry-table input, .assessment-entry-table select { width: 100%; min-height: 37px; padding: 8px 9px; border: 1px solid #cfdce1; border-radius: 4px; color: var(--ink); background: #fff; font-size: 12px; font-weight: 400; }
.form-grid textarea { min-height: 150px; resize: vertical; line-height: 1.5; }
.form-field--full, .form-actions--full { grid-column: 1 / -1; }
.form-actions { display: flex; justify-content: flex-end; gap: 9px; padding: 16px 21px 20px; }
.form-grid .form-actions { padding: 0; }
.assessment-entry-table input[type="number"] { min-width: 86px; }
.assessment-entry-table input[type="text"] { min-width: 210px; }

.inline-time { display: grid; grid-template-columns: 1fr auto 1fr; gap: 7px; align-items: center; }
.inline-time > span { color: var(--muted); font-size: 10px; font-weight: 700; }
.check-fieldset { min-width: 0; margin: 0; padding: 14px; border: 1px solid #dce5e8; border-radius: 5px; }
.check-fieldset legend { padding: 0 5px; color: #405561; font-size: 11px; font-weight: 800; }
.check-grid { display: grid; grid-template-columns: repeat(5, minmax(118px, 1fr)); gap: 8px 11px; }
.check-grid--compact { grid-template-columns: repeat(3, minmax(155px, 1fr)); }
.check-grid--subjects { grid-template-columns: repeat(4, minmax(145px, 1fr)); }
.check-grid label { display: flex; align-items: center; gap: 7px; min-width: 0; color: #3b5260; font-size: 11px; font-weight: 700; }
.check-grid input { width: 15px !important; min-width: 15px; height: 15px; min-height: 15px !important; padding: 0 !important; accent-color: var(--teal); }
.curriculum-grid-wrap { overflow: auto; max-height: 680px; border-bottom: 1px solid #e3eaed; }
table.curriculum-grid { width: max-content; min-width: 100%; }
.curriculum-grid th { position: sticky; top: 0; z-index: 2; max-width: 94px; padding: 9px 8px; white-space: normal; text-align: center; }
.curriculum-grid th:first-child { position: sticky; left: 0; z-index: 3; min-width: 110px; text-align: left; }
.curriculum-grid td { padding: 5px; text-align: center; }
.curriculum-grid td input { width: 42px; min-height: 32px; padding: 5px; border: 1px solid #cfdce1; border-radius: 4px; color: var(--ink); text-align: center; }
.curriculum-grid tbody th { color: var(--blue); background: #f7fafb; font-size: 11px; letter-spacing: 0; text-transform: none; }
.curriculum-grid tbody tr:hover td { background: #f9fbfc; }

.timetable-grid { display: grid; grid-template-columns: 77px repeat(5, minmax(115px, 1fr)); min-width: 735px; border-top: 1px solid #dfe7ea; border-left: 1px solid #dfe7ea; }
.timetable-grid > div { min-height: 68px; padding: 8px; border-right: 1px solid #dfe7ea; border-bottom: 1px solid #dfe7ea; }
.timetable-grid .grid-head { min-height: auto; color: #647886; background: #f7fafb; font-size: 9px; font-weight: 800; letter-spacing: .08em; text-align: center; text-transform: uppercase; }
.period { color: var(--muted); background: #fbfcfc; font-size: 10px; font-weight: 800; }
.lesson { border-left: 3px solid var(--blue); background: #eff5f9; }
.lesson--teal { border-left-color: var(--teal); background: #ecf7f4; }
.lesson--amber { border-left-color: #d29527; background: #fff7e7; }
.lesson strong, .lesson small { display: block; }
.lesson strong { color: #25475f; font-size: 10px; }
.lesson small { margin-top: 3px; color: #668090; font-size: 9px; }

.pipeline { display: grid; grid-template-columns: repeat(5, minmax(150px, 1fr)); gap: 12px; overflow-x: auto; }
.pipeline-column { min-width: 150px; padding: 12px; border: 1px solid var(--line); border-radius: 5px; background: #f9fbfc; }
.pipeline-column h3 { display: flex; justify-content: space-between; margin: 0 0 11px; color: var(--blue); font-family: Lato, sans-serif; font-size: 11px; letter-spacing: .01em; }
.pipeline-column h3 span { color: var(--muted); font-size: 10px; }
.application-card { display: block; margin-top: 8px; padding: 10px; border: 1px solid #e1e9ec; border-radius: 4px; background: #fff; box-shadow: 0 2px 5px rgba(22, 57, 83, .03); color: inherit; }
.application-card:hover, .application-card:focus-visible { border-color: #8db0c6; box-shadow: 0 5px 14px rgba(22, 57, 83, .10); outline: 0; }
.application-card strong, .application-card small { display: block; }
.application-card strong { font-size: 11px; }
.application-card small { margin-top: 2px; color: var(--muted); font-size: 9px; }
.inline-form { display: flex; align-items: center; gap: 7px; min-width: 210px; }
.inline-form select, .inline-form input { min-width: 130px; min-height: 34px; padding: 6px 8px; border: 1px solid #cfdce1; border-radius: 4px; color: var(--ink); background: #fff; font-size: 11px; }
.inline-form label { color: var(--muted); font-size: 10px; font-weight: 800; }
.free-teachers-table th small { display: block; margin-top: 3px; font-size: 9px; font-weight: 700; letter-spacing: 0; text-transform: none; }
.free-teachers-table td { min-width: 112px; vertical-align: middle; }
.free-teachers-board { min-width: 980px; table-layout: fixed; }
.free-teachers-board th { min-width: 102px; }
.free-teachers-board td { min-width: 142px; vertical-align: top; }
.free-teachers-board tbody th { color: var(--blue); background: #f7fafb; }
.free-teacher-names { display: flex; flex-wrap: wrap; gap: 6px; align-content: flex-start; min-height: 34px; }
.free-teacher-names .badge { white-space: nowrap; }

.timetable-matrix-wrap { overflow: auto; }
.timetable-matrix { width: max-content; min-width: 100%; table-layout: fixed; border-collapse: separate; border-spacing: 0; }
.timetable-matrix th, .timetable-matrix td { min-width: 146px; padding: 10px; vertical-align: top; border-right: 1px solid #dfe7ea; border-bottom: 1px solid #dfe7ea; }
.timetable-matrix thead th { position: sticky; top: 0; z-index: 2; color: #617787; background: #f6f9fa; font-size: 10px; font-weight: 800; letter-spacing: .06em; text-align: center; text-transform: uppercase; }
.timetable-matrix thead th:first-child { left: 0; z-index: 3; min-width: 108px; text-align: left; }
.timetable-matrix thead small { display: block; margin-top: 3px; color: #7e919d; font-size: 9px; font-weight: 700; letter-spacing: 0; text-transform: none; }
.timetable-matrix tbody th { position: sticky; left: 0; z-index: 1; min-width: 108px; color: var(--blue); background: #f7fafb; font-size: 11px; text-align: left; }
.timetable-matrix td { min-height: 82px; background: #fff; }
.timetable-matrix__entry { display: grid; gap: 4px; min-height: 53px; padding: 8px; border-left: 3px solid var(--blue); border-radius: 3px; background: #eff5f9; }
.timetable-matrix__entry + .timetable-matrix__entry { margin-top: 6px; }
.timetable-matrix__entry--commitment { border-left-color: #c8912d; background: #fff7e7; }
.timetable-matrix__entry strong { color: #25475f; font-size: 10px; line-height: 1.25; }
.timetable-matrix__entry small, .timetable-matrix__empty { color: #6d8391; font-size: 9px; line-height: 1.3; }
.timetable-matrix__empty { display: block; padding: 13px 3px; color: #a9b6be; text-align: center; }
.timetable-export-item { break-inside: avoid; }

.report-entry-grid { min-width: 1180px; }
.report-entry-grid select, .report-entry-grid textarea { width: 100%; min-width: 135px; padding: 7px; border: 1px solid #cfdce1; border-radius: 4px; color: var(--ink); background: #fff; font: inherit; font-size: 11px; }
.report-entry-grid textarea { min-width: 190px; resize: vertical; }

.calendar-embed-panel .panel__body { display: flex; justify-content: center; padding: 24px; }
.calendar-embed { display: block; width: 75%; min-height: 760px; border: 0; border-radius: 4px; background: var(--surface-muted); box-shadow: 0 1px 4px rgba(18, 54, 78, .16); }
@media (max-width: 760px) { .calendar-embed-panel .panel__body { padding: 12px; } .calendar-embed { width: 100%; min-height: 620px; } }

.operation-card { position: relative; min-height: 156px; padding: 18px; border: 1px solid var(--line); border-radius: 6px; background: #fff; box-shadow: var(--shadow); }
.operation-card h3 { margin: 18px 0 5px; color: var(--blue); font-size: 17px; }
.operation-card p { margin: 0; color: var(--muted); font-size: 11px; }
.operation-card .stat-icon { position: absolute; top: 16px; right: 16px; }
.operation-card__foot { margin-top: 16px; color: var(--teal); font-size: 10px; font-weight: 800; }

.official-report { max-width: 1120px; margin: 0 auto 24px; overflow: hidden; border: 1px solid #cbd9e0; border-radius: 8px; background: #fff; box-shadow: 0 8px 28px rgba(22, 57, 83, .10); }
.official-report__header { display: flex; align-items: center; gap: 18px; padding: 28px 32px; color: #fff; background: linear-gradient(115deg, var(--navy), var(--blue)); }
.official-report__header img { width: 68px; height: 68px; padding: 4px; border-radius: 50%; background: #fff; object-fit: contain; }
.official-report__header p { margin: 0 0 3px; color: #d9e8eb; font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.official-report__header h2 { margin: 0; color: #fff; font-size: 28px; line-height: 1.1; letter-spacing: -.035em; }
.official-report__header small { display: block; margin-top: 6px; color: #d9e8eb; font-size: 11px; }
.official-report__identity { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-bottom: 1px solid #dfe8eb; background: #f7fafb; }
.official-report__identity > div { min-height: 78px; padding: 17px 22px; border-right: 1px solid #dfe8eb; }
.official-report__identity > div:last-child { border-right: 0; }
.official-report__identity span, .official-report__summary span { display: block; color: #647886; font-size: 9px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.official-report__identity strong { display: block; margin-top: 6px; color: var(--blue); font-size: 14px; }
.official-report__summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; padding: 22px 24px 4px; }
.official-report__summary > div { min-height: 94px; padding: 15px; border: 1px solid #dce6ea; border-top: 3px solid var(--teal); border-radius: 5px; background: #fbfdfd; }
.official-report__summary strong { display: block; margin-top: 5px; color: var(--blue); font-size: 23px; line-height: 1.1; }
.official-report__summary small { display: block; margin-top: 7px; color: var(--muted); font-size: 10px; }
.official-report__section { padding: 18px 24px 6px; }
.official-report__section h3 { margin: 0 0 11px; color: var(--blue); font-size: 19px; letter-spacing: -.02em; }
.official-report__empty { margin: 0 0 15px; padding: 13px; border-left: 3px solid #d2a04d; color: #6c5731; background: var(--amber-soft); font-size: 11px; }
.official-report__table th { background: #edf4f7; }
.official-report__table td { vertical-align: top; line-height: 1.42; }
.official-report__table td small { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; }
.official-report__footer { display: flex; justify-content: space-between; gap: 15px; margin-top: 16px; padding: 13px 24px; color: #547080; background: #edf4f7; border-top: 1px solid #d5e2e8; font-size: 10px; }

.permission-row { display: grid; grid-template-columns: 160px repeat(4, minmax(75px, 1fr)); gap: 8px; align-items: center; padding: 10px 0; border-bottom: 1px solid #edf1f2; font-size: 11px; }
.permission-row--head { color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.permission-cell { text-align: center; }
.tick { color: var(--teal); font-weight: 900; }
.dash { color: #a8b7bf; }

/* EduCore sign-in, deliberately aligned with the earlier Bookflix / LabFlow login. */
.login-screen { display: grid; min-height: 100vh; place-items: center; padding: 28px; background: radial-gradient(circle at 50% 10%, #e4f0f7, #f7f9fa 46%, #e8eef2); }
.login-card { width: min(100%, 450px); padding: 40px; border: 1px solid #d5e1e8; border-radius: 10px; background: #fff; box-shadow: 0 18px 48px rgba(23, 65, 92, .14); text-align: center; }
.login-crest-wrap { display: inline-grid; width: 104px; height: 104px; place-items: center; margin-bottom: 17px; padding: 5px; overflow: hidden; border-radius: 50%; background: #fff; box-shadow: 0 0 0 5px #eaf2f7; }
.login-crest { width: 94px; height: 94px; border-radius: 50%; object-fit: contain; background: #fff; }
.login-card h1 { margin: 2px 0 9px; color: var(--blue); font-size: 36px; letter-spacing: -.05em; }
.login-card > p:not(.eyebrow):not(.demo-login-note) { max-width: 345px; margin: 0 auto 23px; color: #5e7180; font-size: 14px; line-height: 1.55; }
.login-card > small { display: block; margin-top: 16px; color: #778894; font-size: 11px; line-height: 1.45; }
.login-form { text-align: left; }
.login-form label { display: block; margin: 14px 0 6px; color: #354955; font-size: 11px; font-weight: 800; }
.login-form select, .login-form input { width: 100%; height: 43px; padding: 0 11px; border: 1px solid #bdcbd5; border-radius: 5px; color: #263640; background: #fff; outline-color: #6d9dbb; font-size: 13px; }
.login-form select:focus, .login-form input:focus { border-color: #6d9dbb; box-shadow: 0 0 0 3px rgba(21, 75, 115, .12); }
.login-button { width: 100%; margin-top: 21px; padding: 12px 15px; border: 1px solid var(--blue); border-radius: 5px; color: #fff; background: var(--blue); box-shadow: 0 2px 5px rgba(33, 55, 70, .08); font-size: 13px; font-weight: 800; }
.login-button:hover { background: #0d395b; }
.login-error { margin: 0 0 18px; padding: 10px; border: 1px solid #efc7c2; border-radius: 5px; color: #9a453b; background: #fff2f0; font-size: 12px; line-height: 1.45; text-align: left; }
.demo-login-note { margin: 18px 0 0; color: #5e7180; font-size: 11px; }
.demo-login-note code { padding: 2px 5px; border-radius: 3px; color: var(--blue); background: var(--blue-soft); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-weight: 800; }

@media (max-width: 1100px) { .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .panel-grid { grid-template-columns: 1fr; } .three-col { grid-template-columns: repeat(2, minmax(0, 1fr)); } .check-grid { grid-template-columns: repeat(3, minmax(125px, 1fr)); } .check-grid--subjects { grid-template-columns: repeat(3, minmax(135px, 1fr)); } }
@media (max-width: 800px) { .sidebar { transform: translateX(-100%); transition: transform .2s ease; } body.menu-open .sidebar { transform: translateX(0); } .app-frame { margin-left: 0; } .top-header { justify-content: space-between; } .menu-toggle { display: grid; } .school-year { display: none; } .main-content { padding: 28px 18px 42px; } footer { padding: 16px 18px; } .page-heading { flex-direction: column; } .heading-actions { justify-content: flex-start; } .two-col, .three-col, .form-grid { grid-template-columns: 1fr; } .profile-hero { grid-template-columns: auto 1fr; } .profile-hero > .heading-actions { grid-column: 1 / -1; } .permission-row { min-width: 600px; } .official-report__identity { grid-template-columns: repeat(2, minmax(0, 1fr)); } .official-report__identity > div:nth-child(2) { border-right: 0; } .official-report__identity > div:nth-child(-n+2) { border-bottom: 1px solid #dfe8eb; } .official-report__summary { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .stats-grid { grid-template-columns: 1fr 1fr; } .stat-card { min-height: 110px; padding: 14px; } .top-header__right { gap: 9px; } .staff-account span:last-child { display: none; } .notification-button { width: 32px; padding: 5px; justify-content: center; font-size: 0; } .notification-count { font-size: 8px; } .filter-bar { align-items: stretch; flex-direction: column; } .search-field { max-width: none; } .profile-hero { gap: 12px; padding: 17px; } .profile-avatar { width: 50px; height: 50px; font-size: 14px; } }

@media print { .sidebar, .top-header, footer, .heading-actions, .filter-bar, .button { display: none !important; } .app-frame { margin: 0; } .main-content { padding: 0; background: #fff; } .panel { box-shadow: none; } .timetable-export-item { break-after: page; border: 0; } .timetable-export-item:last-of-type { break-after: auto; } .timetable-matrix-wrap { overflow: visible; } .timetable-matrix { width: 100%; min-width: 0; } .timetable-matrix th, .timetable-matrix td { min-width: 0; padding: 6px; } .report-page-heading { display: none; } .official-report { max-width: none; margin: 0; border: 0; border-radius: 0; box-shadow: none; } .official-report__section { break-inside: avoid; } .official-report .table-wrap { overflow: visible; } .official-report__table { font-size: 10px; } .official-report__table th, .official-report__table td { padding: 7px; white-space: normal; } }
/* Messages */
.notice--error { border-color: #e7b9b4; color: #8f2f26; background: #fdeeec; }
/* Finance */
.fin-tabs { display: flex; flex-wrap: wrap; gap: 4px; margin: -6px 0 18px; padding: 4px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.fin-tabs a { padding: 8px 12px; border-radius: 6px; color: var(--muted); font-size: 12px; font-weight: 800; text-decoration: none; }
.fin-tabs a:hover { color: var(--blue); background: var(--canvas); }
.fin-tabs a.is-active { color: #fff; background: var(--navy); }
.fin-filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 14px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.fin-filters label { display: grid; gap: 5px; min-width: 150px; color: #354955; font-size: 11px; font-weight: 800; }
.fin-filters__actions { display: flex; gap: 6px; }
.fin-table td, .fin-table th { vertical-align: top; }
.fin-table .num { text-align: right; white-space: nowrap; }
.fin-table small { display: inline; }
.fin-group td { background: var(--canvas); }
.fin-muted { color: var(--muted); }
.fin-chip { display: inline-block; margin: 0 4px 4px 0; padding: 3px 8px; border-radius: 99px; background: var(--blue-soft); color: var(--blue); font-size: 11px; font-weight: 700; white-space: nowrap; }
.fin-actions { text-align: right; white-space: nowrap; }
.fin-actions > form { display: inline-flex; }
.fin-menu__body form.form-grid { display: grid; text-align: left; white-space: normal; }
.fin-menu { position: relative; display: inline-block; text-align: left; }
.fin-menu > summary { list-style: none; cursor: pointer; }
.fin-menu > summary::-webkit-details-marker { display: none; }
.fin-menu[open] > summary { color: #fff; background: var(--navy); }
.fin-menu__body { position: absolute; z-index: 30; right: 0; top: calc(100% + 6px); width: min(420px, 86vw); padding: 6px 0; border: 1px solid var(--line); border-radius: 8px; background: #fff; box-shadow: 0 14px 40px rgba(11, 45, 73, .18); white-space: normal; }
.fin-menu__body form + form { border-top: 1px solid var(--line); }
.fin-menu__title { margin: 0; color: var(--navy); font-size: 12px; font-weight: 800; }
.fin-email pre { max-height: 340px; overflow: auto; margin: 0 14px 12px; padding: 12px; border-radius: 6px; background: var(--canvas); font: 12px/1.5 inherit; font-family: inherit; white-space: pre-wrap; }
.fin-email p { margin: 10px 14px; font-size: 12px; }
.fin-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.fin-submit { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 10px; }
.fin-submit > :first-child { margin-right: auto; }
.fin-add { border-top: 1px solid var(--line); }
.fin-success { border-color: #b8dfd1; background: #f3fbf8; }
.fin-stat-text { overflow: hidden; font-size: 15px !important; text-overflow: ellipsis; white-space: nowrap; }
.fin-reversed td { opacity: .55; }
.fin-edit-table input, .fin-edit-table select { width: 100%; min-width: 90px; }
.fin-edit-table input[type="checkbox"] { width: 16px; min-width: 0; }
.fin-new-row td { background: var(--teal-soft); }
.fin-picker__bar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px 10px; margin-bottom: 10px; }
.fin-picker__bar label { display: grid; gap: 5px; color: #354955; font-size: 11px; font-weight: 800; }
.fin-picker__count { margin-left: auto; color: var(--teal); font-size: 12px; font-weight: 800; }
.fin-picker__list { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 6px; max-height: 380px; overflow: auto; padding: 2px; }
.fin-picker__pupil { display: flex; align-items: flex-start; gap: 8px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 6px; cursor: pointer; }
.fin-picker__pupil input { width: 16px; height: 16px; margin-top: 2px; accent-color: var(--teal); }
.fin-picker__pupil span { display: grid; }
.fin-picker__pupil small { color: var(--muted); }
.fin-picker__pupil:has(input:checked) { border-color: var(--teal); background: var(--teal-soft); }
.fin-picker__pupil[hidden] { display: none; }
.fin-apply { width: 110px; text-align: right; }
.fin-bars { display: grid; grid-template-columns: repeat(12, 1fr); gap: 8px; height: 170px; padding: 16px 18px 6px; }
.fin-bars__month { display: grid; grid-template-rows: 1fr auto; gap: 4px; text-align: center; color: var(--muted); }
.fin-bars__pair { display: flex; align-items: flex-end; justify-content: center; gap: 3px; height: 100%; }
.fin-bars__bar { width: 40%; min-height: 1px; border-radius: 3px 3px 0 0; background: var(--navy); }
.fin-bars__bar--in { background: var(--teal); }
.fin-dot-billed { background: var(--navy); }
@media (max-width: 720px) { .fin-filters label { min-width: 0; flex: 1 1 140px; } .fin-menu__body { position: fixed; left: 16px; right: 16px; top: auto; bottom: 16px; width: auto; max-height: 75vh; overflow: auto; } .fin-bars { gap: 3px; padding: 12px 8px 4px; } }
@media print { .fin-tabs, .fin-filters, .fin-actions { display: none !important; } }
.panel__head p .legend-dot { display: inline-block; }
.fin-filters input, .fin-filters select, .fin-picker__bar input, .fin-picker__bar select, .fin-edit-table input, .fin-edit-table select, .fin-apply, .panel__head .inline-form select { min-height: 37px; padding: 8px 9px; border: 1px solid #cfdce1; border-radius: 4px; color: var(--ink); background: #fff; font-size: 12px; font-weight: 400; }
.fin-edit-table input[type="checkbox"] { min-height: 0; }
.attention-item > span:not(.attention-item__icon) { flex: 1; }
.form-grid [hidden], .fin-picker [hidden] { display: none !important; }
.panel__head .inline-form { display: flex; flex-shrink: 0; align-items: center; gap: 8px; white-space: nowrap; }
.button:disabled, .button[disabled] { opacity: .45; cursor: not-allowed; }
@media (max-width: 720px) { .panel__head { flex-wrap: wrap; } }
/* The Change / Reverse panels open centred on screen, so a table never cuts them off. */
.fin-menu[open] > summary::before { content: ""; position: fixed; inset: 0; z-index: 29; background: rgba(11, 45, 73, .28); cursor: default; }
.fin-menu[open] > .fin-menu__body { position: fixed; z-index: 30; top: 50%; left: 50%; right: auto; bottom: auto; width: min(460px, calc(100vw - 32px)); max-height: 85vh; overflow: auto; transform: translate(-50%, -50%); }

/* Reminders, automatic emails, cover and attendance history */
.fin-email-preview { margin-top: 8px; padding: 12px 14px; border: 1px solid var(--line, #dfe8ee); border-radius: 6px; background: #f7fafb; }
.fin-email-preview pre { margin: 8px 0 0; white-space: pre-wrap; font: inherit; font-size: 13px; line-height: 1.5; }
.att-filter { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 8px; }
.att-filter select { min-width: 160px; }
.att-bars { display: grid; gap: 6px; height: 190px; padding: 14px 18px 8px; }
.att-bars__week { display: grid; grid-template-rows: auto 1fr auto; gap: 4px; text-align: center; color: var(--muted); min-width: 0; }
.att-bars__week small { font-size: 10px; white-space: nowrap; overflow: hidden; }
.att-bars__track { display: flex; align-items: flex-end; justify-content: center; height: 100%; }
.att-bars__bar { width: 60%; max-width: 34px; min-height: 2px; border-radius: 3px 3px 0 0; background: var(--teal); }
.att-bars__bar--low { background: #c2412d; }
.cover-record > summary { cursor: pointer; list-style: none; }
.cover-record > summary::-webkit-details-marker { display: none; }
.cover-record[open] > summary .button { visibility: hidden; }
.cover-table select { min-width: 220px; max-width: 320px; }
.cover-table input { min-width: 180px; }
.cover-row--needed td:first-child { box-shadow: inset 3px 0 0 #c2412d; }
.auto-status { display: grid; gap: 10px; }
.auto-status__row { display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--line, #dfe8ee); }
.auto-status__row:last-child { border-bottom: 0; }
@media (max-width: 720px) { .att-bars { gap: 2px; padding: 12px 6px 4px; } .att-bars__week small { font-size: 9px; } .cover-table select, .cover-table input { min-width: 150px; } }
.form-grid label.check-row { display: flex; align-items: center; gap: 10px; white-space: normal; }
.form-grid label.check-row input[type="checkbox"] { width: 18px; height: 18px; flex: 0 0 auto; margin: 0; }

/* Markbook, online applications, data protection */
.mb-wrap { max-width: 100%; overflow-x: auto; }
.mb-table th small, .mb-table td small { display: block; font-weight: 400; color: var(--muted); font-size: 11px; }
.mb-table th a { color: inherit; }
.mb-table td.num, .mb-table th.num { min-width: 78px; }
.mb-sticky { position: sticky; left: 0; background: #fff; z-index: 1; min-width: 160px; }
.mb-table thead .mb-sticky, .mb-table tfoot .mb-sticky { background: #f6f9fb; }
.mb-cell--good { background: #eaf6f1; }
.mb-cell--mid { background: #fff6e3; }
.mb-cell--low { background: #fbe9e6; }
.mb-pill { display: inline-block; padding: 1px 8px; border-radius: 10px; font-weight: 700; font-size: 12px; }
.mb-pill.mb-cell--good { color: #176052; } .mb-pill.mb-cell--mid { color: #8a5a00; } .mb-pill.mb-cell--low { color: #9b2c1e; }
.oa-item { display: flex; gap: 16px; justify-content: space-between; align-items: flex-start; padding: 14px 20px; border-top: 1px solid var(--line); }
.oa-item__main { min-width: 0; }
.oa-item details { margin-top: 6px; }
.dp-clear { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: flex-end; }
.dp-clear .check-row { display: flex; align-items: center; gap: 6px; font-size: 12px; }
@media (max-width: 720px) { .oa-item { flex-direction: column; } .mb-sticky { min-width: 120px; } .dp-clear { justify-content: flex-start; } }
@media print { .mb-sticky { position: static; } }
.login-or { display: flex; align-items: center; gap: 10px; margin: 14px 0 10px; color: var(--muted); font-size: 12px; }
.login-or::before, .login-or::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
.google-button { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 44px; border: 1px solid #c9d4da; border-radius: 6px; background: #fff; color: #1f2d36; font-weight: 700; text-decoration: none; }
.google-button:hover { background: #f6f9fb; }
