:root {
    --navy: #0b1f5b;
    --navy-dark: #071640;
    --blue: #1c4f9c;
    --gold: #f4c430;
    --red: #d62828;
    --green: #16845b;
    --ink: #16213d;
    --muted: #66728b;
    --line: #e3e8f1;
    --surface: #ffffff;
    --background: #f3f6fa;
    --shadow: 0 12px 32px rgba(11, 31, 91, .09);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--background); font-family: 'Poppins', sans-serif; letter-spacing: 0; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
[hidden] { display: none !important; }

.login-view { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(420px, .75fr); background: white; }
.login-visual { position: relative; min-height: 100vh; overflow: hidden; background: var(--navy); }
.login-visual > img { width: 100%; height: 100%; position: absolute; inset: 0; object-fit: cover; animation: loginZoom 18s ease-out both; }
.login-visual-overlay { position: absolute; inset: 0; padding: 44px 6vw 64px; display: flex; flex-direction: column; justify-content: space-between; color: white; background: linear-gradient(180deg, rgba(7,22,64,.38), rgba(7,22,64,.08) 35%, rgba(7,22,64,.9)); }
.back-link { color: white; text-decoration: none; font-weight: 600; display: inline-flex; align-items: center; gap: 10px; width: fit-content; transition: color .2s ease, transform .2s ease; }
.back-link:hover { color: var(--gold); transform: translateX(-3px); }
.visual-copy { max-width: 730px; }
.eyebrow { color: var(--red); text-transform: uppercase; font-size: 12px; font-weight: 700; letter-spacing: .1em; }
.visual-copy .eyebrow { color: var(--gold); }
.visual-copy h1 { max-width: 690px; margin: 14px 0 18px; font: 900 clamp(36px, 4.2vw, 68px)/1.12 'Merriweather', serif; }
.visual-copy p { max-width: 610px; margin: 0; font-size: 18px; line-height: 1.75; color: rgba(255,255,255,.88); }

.login-panel { position: relative; min-height: 100vh; padding: 46px clamp(32px, 5vw, 82px) 28px; display: flex; flex-direction: column; justify-content: center; background: white; }
.login-panel-inner { width: min(100%, 480px); margin: auto; }
.portal-brand { display: flex; align-items: center; gap: 14px; margin-bottom: 52px; }
.portal-brand img { width: 68px; height: 68px; object-fit: contain; }
.portal-brand div { display: flex; flex-direction: column; color: var(--navy); line-height: 1.25; }
.portal-brand strong { font-family: 'Merriweather', serif; font-size: 18px; }
.portal-brand span { font-size: 13px; color: var(--muted); }
.preview-label { display: inline-flex; padding: 6px 10px; color: var(--navy); background: #fff5c9; border-radius: 4px; font-size: 11px; font-weight: 700; text-transform: uppercase; }
.login-heading h2 { margin: 14px 0 7px; color: var(--navy); font: 900 34px/1.2 'Merriweather', serif; }
.login-heading p { margin: 0 0 32px; color: var(--muted); }
.form-field { margin-bottom: 20px; }
.form-field label { display: block; margin-bottom: 8px; color: var(--ink); font-size: 13px; font-weight: 600; }
.label-row { display: flex; align-items: center; justify-content: space-between; }
.text-button { padding: 0; border: 0; color: var(--blue); background: transparent; font-size: 13px; font-weight: 600; }
.text-button:hover { color: var(--red); }
.input-wrap { position: relative; }
.input-wrap > i { position: absolute; top: 50%; left: 16px; color: #8993a8; transform: translateY(-50%); }
.input-wrap input { width: 100%; height: 54px; padding: 0 48px; border: 1px solid #ccd4e2; border-radius: 6px; outline: none; color: var(--ink); background: #fbfcfe; transition: border-color .2s, box-shadow .2s, background .2s; }
.input-wrap input:focus { border-color: var(--blue); background: white; box-shadow: 0 0 0 4px rgba(28,79,156,.1); }
.input-wrap.invalid input { border-color: var(--red); box-shadow: 0 0 0 3px rgba(214,40,40,.08); }
.input-wrap input::placeholder { color: #a4adbd; }
.field-error { display: block; min-height: 19px; padding-top: 5px; color: var(--red); font-size: 12px; }
.icon-button { width: 42px; height: 42px; display: inline-grid; place-items: center; border: 0; border-radius: 6px; color: var(--navy); background: transparent; }
.reveal-pin { position: absolute; top: 6px; right: 5px; color: #77839a; }
.primary-login, .preview-button { width: 100%; height: 54px; display: flex; align-items: center; justify-content: center; gap: 12px; border-radius: 6px; font-weight: 700; transition: transform .2s, box-shadow .2s, background .2s; }
.primary-login { border: 0; color: white; background: var(--navy); box-shadow: 0 12px 24px rgba(11,31,91,.2); }
.primary-login:hover { background: var(--blue); transform: translateY(-2px); box-shadow: 0 16px 28px rgba(11,31,91,.25); }
.primary-login i { transition: transform .2s; }
.primary-login:hover i { transform: translateX(4px); }
.install-app-button { width: 100%; min-height: 58px; margin-top: 14px; padding: 9px 14px; display: flex; align-items: center; gap: 12px; border: 1px solid #cbd5e5; border-radius: 6px; color: var(--navy); background: #f7f9fd; text-align: left; cursor: pointer; transition: border-color .2s, background .2s, transform .2s; }
.install-app-button:hover { border-color: var(--blue); background: #eef3ff; transform: translateY(-1px); }
.install-app-button > i:first-child { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; color: white; background: var(--blue); }
.install-app-button > i:last-child { margin-left: auto; color: var(--red); }
.install-app-button span { display: flex; flex-direction: column; }
.install-app-button strong { font-size: 12px; }
.install-app-button small { margin-top: 2px; color: var(--muted); font-size: 10px; }
.install-header { border: 1px solid #cbd5e5; color: var(--blue); background: #f7f9fd; }
.install-app-button[hidden], .install-header[hidden] { display: none; }
.preview-button { margin-top: 12px; border: 1px solid #cfd7e5; color: var(--navy); background: white; }
.preview-button:hover { border-color: var(--navy); background: #f6f8fc; }
.test-access { margin-top: 14px; padding: 12px 14px; display: flex; align-items: center; gap: 12px; border-left: 3px solid var(--gold); color: var(--navy); background: #fff9df; font-size: 11px; }
.test-access > i { color: #8c6b00; }
.test-access div { display: flex; flex-direction: column; }
.test-access span { color: var(--muted); font-size: 9px; text-transform: uppercase; font-weight: 700; }
.test-access strong { margin-top: 2px; }
.test-access b { margin: 0 6px; color: var(--muted); font-size: 8px; }
.staff-access-link { margin-top: 16px; display: inline-flex; align-items: center; gap: 8px; color: var(--blue); font-size: 11px; font-weight: 700; text-decoration: none; }
.staff-access-link:hover { color: var(--red); }
.login-help { margin-top: 34px; padding-top: 24px; border-top: 1px solid var(--line); display: flex; align-items: center; gap: 14px; }
.login-help > i { width: 42px; height: 42px; display: grid; place-items: center; color: var(--red); background: #fff0f0; border-radius: 50%; }
.login-help div { display: flex; flex-direction: column; font-size: 12px; color: var(--muted); }
.login-help a { margin-top: 2px; color: var(--navy); text-decoration: none; font-weight: 700; }
.login-footer { margin: 38px 0 0; text-align: center; color: #8c96a8; font-size: 11px; }

.dashboard-view { min-height: 100vh; display: grid; grid-template-columns: 258px minmax(0, 1fr); }
.sidebar { position: fixed; inset: 0 auto 0 0; width: 258px; padding: 28px 18px 22px; display: flex; flex-direction: column; color: white; background: var(--navy-dark); z-index: 50; }
.sidebar-brand { display: flex; align-items: center; gap: 12px; padding: 0 10px 24px; border-bottom: 1px solid rgba(255,255,255,.12); }
.sidebar-brand img { width: 54px; height: 54px; object-fit: contain; }
.sidebar-brand div { display: flex; flex-direction: column; }
.sidebar-brand strong { font: 700 19px 'Merriweather', serif; }
.sidebar-brand span { margin-top: 2px; color: rgba(255,255,255,.65); font-size: 11px; }
.side-nav { margin-top: 26px; display: grid; gap: 5px; }
.nav-item, .logout-button { width: 100%; min-height: 48px; padding: 0 14px; display: flex; align-items: center; gap: 13px; border: 0; border-radius: 6px; color: rgba(255,255,255,.7); background: transparent; font-size: 13px; text-align: left; transition: color .2s, background .2s, transform .2s; }
.nav-item i, .logout-button i { width: 20px; font-size: 16px; }
.nav-item b { min-width: 20px; margin-left: auto; padding: 2px 6px; border-radius: 10px; color: white; background: var(--red); font-size: 10px; text-align: center; }
.nav-item:hover, .logout-button:hover { color: white; background: rgba(255,255,255,.08); transform: translateX(2px); }
.nav-item.active { color: var(--navy-dark); background: var(--gold); font-weight: 700; }
.sidebar-support { margin-top: auto; padding: 18px; display: flex; flex-direction: column; border-left: 3px solid var(--gold); background: rgba(255,255,255,.07); }
.sidebar-support > i { margin-bottom: 14px; color: var(--gold); font-size: 20px; }
.sidebar-support strong { font-size: 13px; }
.sidebar-support span { margin: 4px 0 8px; color: rgba(255,255,255,.58); font-size: 10px; }
.sidebar-support a { color: white; font-size: 13px; font-weight: 700; text-decoration: none; }
.logout-button { margin-top: 16px; }
.sidebar-scrim { display: none; }

.dashboard-main { grid-column: 2; min-width: 0; min-height: 100vh; }
.portal-header { height: 86px; padding: 0 clamp(22px, 3.4vw, 52px); display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.96); position: sticky; top: 0; z-index: 30; }
.header-left { display: flex; align-items: center; gap: 14px; }
.header-left h2 { margin: 3px 0 0; color: var(--navy); font-size: clamp(17px, 2vw, 22px); }
.header-date { color: var(--muted); font-size: 11px; text-transform: uppercase; }
.menu-toggle { display: none; background: #eef2f8; }
.header-actions { display: flex; align-items: center; gap: 18px; }
.notification-button { position: relative; border: 1px solid var(--line); background: white; }
.notification-button span { position: absolute; top: -4px; right: -3px; min-width: 18px; height: 18px; padding: 0 4px; display: grid; place-items: center; border: 2px solid white; border-radius: 50%; color: white; background: var(--red); font-size: 9px; }
.parent-profile { display: flex; align-items: center; gap: 10px; }
.parent-profile > span { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; color: white; background: var(--blue); font-size: 12px; font-weight: 700; }
.parent-profile > span { overflow: hidden; }.parent-profile > span img { width: 100%; height: 100%; object-fit: cover; }
.parent-profile div { display: flex; flex-direction: column; }
.parent-profile strong { font-size: 12px; }
.parent-profile small { color: var(--muted); font-size: 10px; }
.preview-banner { min-height: 42px; padding: 8px clamp(22px, 3.4vw, 52px); display: flex; align-items: center; gap: 10px; color: #5e5014; background: #fff5c9; font-size: 11px; }
.preview-banner > span { font-weight: 700; text-transform: uppercase; }
.preview-banner p { margin: 0; }
.preview-banner button { margin-left: auto; width: 28px; height: 28px; border: 0; color: #79691f; background: transparent; }
.secure-banner { color: #15583f; background: #e7f6ef; }
.secure-banner button { color: #15583f; }
.dashboard-content { width: min(100%, 1500px); margin: 0 auto; padding: 34px clamp(22px, 3.4vw, 52px) 60px; }
.page-view { display: none; animation: viewIn .35s ease both; }
.page-view.active { display: block; }

.pupil-hero { min-height: 156px; padding: 26px 30px; display: grid; grid-template-columns: 100px minmax(0, 1fr) auto; align-items: center; gap: 24px; color: white; background: linear-gradient(110deg, var(--navy-dark), var(--navy) 65%, #173d83); border-left: 5px solid var(--gold); border-radius: 6px; box-shadow: var(--shadow); position: relative; overflow: hidden; }
.pupil-hero::after { content: "A"; position: absolute; right: 16%; bottom: -72px; color: rgba(255,255,255,.04); font: 900 240px 'Merriweather', serif; }
.pupil-photo { width: 94px; height: 94px; overflow: hidden; border: 4px solid rgba(255,255,255,.8); border-radius: 50%; z-index: 1; }
.pupil-photo img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.8); object-position: 28% 42%; }
.pupil-details { z-index: 1; }
.pupil-details .status { display: flex; align-items: center; gap: 6px; color: #d8f9e8; font-size: 10px; font-weight: 600; text-transform: uppercase; }
.status i { width: 7px; height: 7px; border-radius: 50%; background: #45d697; box-shadow: 0 0 0 4px rgba(69,214,151,.14); }
.status.not-present { color: rgba(255,255,255,.7); }.status.not-present i { background: var(--gold); box-shadow: 0 0 0 4px rgba(244,196,48,.14); }
.pupil-details h1 { margin: 7px 0 7px; font: 900 clamp(25px, 3vw, 35px) 'Merriweather', serif; }
.pupil-details p { margin: 0; color: rgba(255,255,255,.72); font-size: 12px; }
.pupil-details p span { display: inline-block; width: 3px; height: 3px; margin: 0 8px 3px; border-radius: 50%; background: var(--gold); }
.term-details { min-width: 170px; padding-left: 28px; border-left: 1px solid rgba(255,255,255,.18); display: flex; flex-direction: column; z-index: 1; }
.term-details span, .term-details small { color: rgba(255,255,255,.6); font-size: 10px; }
.term-details strong { margin: 5px 0; color: var(--gold); font-size: 16px; }
.child-switcher { margin-bottom: 12px; display: flex; flex-direction: column; }.child-switcher span { margin-bottom: 5px; color: rgba(255,255,255,.6); font-size: 9px; text-transform: uppercase; }.child-switcher select { min-width: 180px; height: 35px; padding: 0 30px 0 10px; border: 1px solid rgba(255,255,255,.32); border-radius: 4px; outline: 0; color: white; background: var(--navy-dark); font: 10px 'Poppins', sans-serif; }

.metrics-grid { margin-top: 22px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.metric-card { min-height: 126px; padding: 22px; display: flex; align-items: center; gap: 16px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); box-shadow: 0 7px 20px rgba(11,31,91,.05); transition: transform .25s, box-shadow .25s, border-color .25s; }
.metric-card:hover { transform: translateY(-3px); border-color: #cbd5e6; box-shadow: var(--shadow); }
.metric-icon { width: 48px; height: 48px; flex: 0 0 48px; display: grid; place-items: center; border-radius: 50%; color: var(--blue); background: #eaf1fc; font-size: 18px; }
.fee-metric .metric-icon, .metric-icon.gold { color: #8c6b00; background: #fff5c9; }
.task-metric .metric-icon, .metric-icon.red { color: var(--red); background: #fff0f0; }
.metric-icon.green { color: var(--green); background: #e6f7f0; }
.metric-card > div:nth-child(2) { min-width: 0; display: flex; flex-direction: column; }
.metric-card span { color: var(--muted); font-size: 11px; }
.metric-card strong { margin: 4px 0; color: var(--navy); font-size: clamp(17px, 2vw, 22px); white-space: nowrap; }
.metric-card small { color: var(--muted); font-size: 9px; }
.metric-card small i { color: var(--green); }
.small-action { margin-left: auto; padding: 7px 10px; border: 0; border-radius: 4px; color: var(--blue); background: #edf3fc; font-size: 10px; font-weight: 700; white-space: nowrap; }
.progress-ring { --size: 58px; width: var(--size); height: var(--size); margin-left: auto; display: grid !important; place-items: center; border-radius: 50%; background: conic-gradient(var(--green) calc(var(--progress) * 1%), #e8edf4 0); position: relative; }
.progress-ring::before { content: ""; position: absolute; width: 44px; height: 44px; border-radius: 50%; background: white; }
.progress-ring span { color: var(--green); font-size: 12px; font-weight: 700; z-index: 1; }

.overview-grid { margin-top: 22px; display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(300px, .75fr); gap: 22px; align-items: start; }
.content-panel { border: 1px solid var(--line); border-radius: 6px; background: white; box-shadow: 0 7px 20px rgba(11,31,91,.05); }
.section-heading { min-height: 76px; padding: 18px 22px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--line); }
.section-heading h3 { margin: 3px 0 0; color: var(--navy); font: 700 18px 'Merriweather', serif; }
.section-heading p { margin: 4px 0 0; color: var(--muted); font-size: 10px; }
.section-heading .text-button { white-space: nowrap; }
.task-list { padding: 0 22px; }
.task-row { min-height: 86px; display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center; gap: 14px; border-bottom: 1px solid var(--line); }
.task-row:last-child { border-bottom: 0; }
.subject-icon { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 6px; font-size: 16px; }
.subject-icon.maths { color: #265ab6; background: #eaf1fc; }
.subject-icon.english { color: #9e3f75; background: #f8eaf2; }
.subject-icon.science { color: var(--green); background: #e7f6ef; }
.task-row strong { color: var(--ink); font-size: 12px; }
.task-row p { margin: 3px 0 0; color: var(--muted); font-size: 10px; }
.task-row time { display: flex; flex-direction: column; align-items: flex-end; }
.task-row time b { color: var(--red); font-size: 10px; }
.task-row time span { margin-top: 2px; color: var(--muted); font-size: 9px; }
.announcement-panel { overflow: hidden; }
.notice { padding: 18px 20px; display: grid; grid-template-columns: 45px 1fr; gap: 13px; border-bottom: 1px solid var(--line); }
.notice-date { height: 48px; display: flex; flex-direction: column; align-items: center; justify-content: center; color: white; background: var(--red); font-size: 8px; font-weight: 700; }
.notice-date b { font-size: 17px; line-height: 1; }
.notice small { color: var(--red); font-size: 8px; font-weight: 700; text-transform: uppercase; }
.notice strong { display: block; margin-top: 3px; color: var(--navy); font-size: 12px; }
.notice p { margin: 5px 0 0; color: var(--muted); font-size: 9px; line-height: 1.55; }
.notice-icon { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; color: #8c6b00; background: #fff5c9; }
.notice-link { width: 100%; min-height: 45px; padding: 0 20px; display: flex; align-items: center; justify-content: space-between; border: 0; color: var(--blue); background: #f8faff; font-size: 10px; font-weight: 700; }
.quick-actions { margin-top: 22px; }
.quick-actions .section-heading { padding-left: 0; padding-right: 0; border: 0; }
.action-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.action-grid button, .action-grid a { min-height: 82px; padding: 14px; display: flex; align-items: center; gap: 13px; border: 1px solid var(--line); border-radius: 6px; color: var(--navy); background: white; text-decoration: none; font-weight: 600; font-size: 11px; box-shadow: 0 5px 16px rgba(11,31,91,.04); transition: transform .2s, border-color .2s; }
.action-grid button:hover, .action-grid a:hover { transform: translateY(-3px); border-color: var(--gold); }
.action-grid i { width: 39px; height: 39px; display: grid; place-items: center; border-radius: 50%; color: var(--red); background: #fff0f0; font-size: 15px; }

.page-intro { margin-bottom: 24px; }
.page-intro h1 { margin: 8px 0 5px; color: var(--navy); font: 900 clamp(28px, 3vw, 38px) 'Merriweather', serif; }
.page-intro p { margin: 0; color: var(--muted); font-size: 13px; }
.attendance-stats { margin-top: 0; margin-bottom: 22px; }
.calendar-panel { padding-bottom: 20px; }
.calendar-key { display: flex; gap: 15px; color: var(--muted); font-size: 9px; }
.calendar-key span { display: flex; align-items: center; gap: 5px; }
.calendar-key i { width: 7px; height: 7px; border-radius: 50%; }
.present-dot { background: var(--green); }.late-dot { background: var(--gold); }.absent-dot { background: var(--red); }
.calendar { padding: 20px; display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
.calendar > span { min-height: 48px; display: grid; place-items: center; border-radius: 4px; color: var(--muted); background: #f7f9fc; font-size: 11px; }
.calendar .day-name { min-height: 28px; color: var(--navy); background: transparent; font-weight: 700; }
.calendar .empty { background: transparent; }
.calendar .present { color: #116846; background: #e7f6ef; font-weight: 700; }
.calendar .late { color: #816300; background: #fff5c9; font-weight: 700; }
.calendar .absent { color: var(--red); background: #fff0f0; font-weight: 700; }
.calendar .weekend { color: #aeb6c4; background: #f1f3f7; }

.learning-layout { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(300px, .7fr); gap: 22px; align-items: start; }
.count-badge { padding: 5px 9px; border-radius: 12px; color: var(--red) !important; background: #fff0f0; font-size: 9px !important; font-weight: 700; }
.assignment-card { padding: 22px; display: grid; grid-template-columns: 46px 1fr; gap: 16px; border-bottom: 1px solid var(--line); }
.assignment-card:last-child { border-bottom: 0; }
.assignment-card small { color: var(--blue); font-size: 8px; font-weight: 700; }
.assignment-card h4 { margin: 4px 0; color: var(--navy); font-size: 14px; }
.assignment-card p { margin: 0 0 10px; color: var(--muted); font-size: 10px; line-height: 1.6; }
.due { color: var(--muted); font-size: 9px; }
.due.urgent { color: var(--red); font-weight: 700; }
.teacher-note { padding: 30px; position: relative; overflow: hidden; }
.quote-mark { position: absolute; top: -17px; right: 20px; color: #eef2f8; font: 900 110px Georgia, serif; }
.teacher-note h3 { margin: 8px 0; color: var(--navy); font: 700 22px 'Merriweather', serif; }
.teacher-note > p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.8; }
.teacher-note > div { margin-top: 24px; padding-top: 18px; display: flex; align-items: center; gap: 10px; border-top: 1px solid var(--line); }
.teacher-note > div > span { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; color: white; background: var(--blue); font-size: 10px; font-weight: 700; }
.teacher-note div p { margin: 0; display: flex; flex-direction: column; }
.teacher-note div strong { font-size: 10px; }.teacher-note div small { color: var(--muted); font-size: 8px; }
.parent-reports-panel { margin-top: 22px; overflow: hidden; }.parent-reports-panel > .section-heading { padding: 20px 24px; border-bottom: 1px solid var(--line); }.parent-reports-panel .section-heading p { margin: 4px 0 0; color: var(--muted); font-size: 9px; }.parent-report { border-bottom: 1px solid var(--line); }.parent-report:last-child { border-bottom: 0; }.parent-report > header { min-height: 116px; padding: 18px 22px; display: grid; grid-template-columns: minmax(180px,1fr) minmax(150px,.55fr) auto; align-items: center; gap: 20px; background: #f8fafc; }.parent-report header small { color: var(--blue); font-size: 8px; font-weight: 700; text-transform: uppercase; }.parent-report header h4 { margin: 5px 0 3px; color: var(--navy); font: 700 18px 'Merriweather',serif; }.parent-report header p { margin: 0; color: var(--muted); font-size: 8px; }.report-overall { padding-left: 18px; border-left: 3px solid var(--gold); }.report-overall span { display: block; color: var(--muted); font-size: 7px; text-transform: uppercase; }.report-overall strong { display: block; margin-top: 3px; color: var(--navy); font-size: 23px; }.report-overall b { display: block; margin-top: 2px; color: var(--green); font-size: 7px; }.parent-report header button { min-height: 38px; padding: 0 12px; display: flex; align-items: center; gap: 7px; border: 1px solid var(--navy); border-radius: 4px; color: var(--navy); background: white; font-size: 8px; font-weight: 700; }.parent-report header button:hover { color: white; background: var(--navy); }.report-subject-table { overflow-x: auto; }.report-subject-table table { min-width: 650px; width: 100%; border-collapse: collapse; }.report-subject-table th,.report-subject-table td { padding: 12px 16px; border-bottom: 1px solid var(--line); font-size: 8px; text-align: left; }.report-subject-table th { color: var(--muted); background: white; font-size: 7px; text-transform: uppercase; }.report-subject-table td strong { display: block; color: var(--navy); font-size: 9px; }.report-subject-table td small { display: block; margin-top: 2px; color: var(--muted); font-size: 7px; }.report-subject-table td span { padding: 4px 7px; border-radius: 3px; color: white; background: var(--blue); font-weight: 700; }.parent-report > footer { padding: 16px 22px; display: grid; grid-template-columns: minmax(180px,.6fr) minmax(260px,1.4fr); gap: 20px; background: white; }.parent-report footer div { min-width: 0; }.parent-report footer span { display: block; margin-bottom: 4px; color: var(--muted); font-size: 7px; text-transform: uppercase; }.parent-report footer strong { color: var(--ink); font-size: 8px; line-height: 1.55; }

.fee-summary-band { min-height: 140px; margin-bottom: 22px; padding: 28px; display: grid; grid-template-columns: repeat(4, 1fr) auto; align-items: center; color: white; background: var(--navy); border-left: 5px solid var(--gold); border-radius: 6px; }
.fee-summary-band > div { padding: 0 24px; display: flex; flex-direction: column; border-right: 1px solid rgba(255,255,255,.16); }
.fee-summary-band > div:first-child { padding-left: 0; }
.fee-summary-band span { color: rgba(255,255,255,.62); font-size: 10px; }
.fee-summary-band strong { margin-top: 6px; font-size: clamp(18px, 2vw, 24px); }
.fee-summary-band .balance strong { color: var(--gold); }
.fee-summary-band button { margin-left: 24px; padding: 11px 14px; border: 1px solid rgba(255,255,255,.28); border-radius: 4px; color: white; background: rgba(255,255,255,.08); font-size: 10px; font-weight: 600; }
.download-button { padding: 10px 13px; border-radius: 4px; color: white; background: var(--blue); text-decoration: none; font-size: 10px; font-weight: 700; }
.fee-table-wrap { overflow-x: auto; }
.fee-table-wrap table { min-width: 760px; }.payment-history-panel { margin-top: 20px; }
table { width: 100%; border-collapse: collapse; min-width: 670px; }
th, td { padding: 17px 22px; border-bottom: 1px solid var(--line); text-align: left; font-size: 10px; }
th { color: var(--muted); background: #f8faff; font-size: 9px; text-transform: uppercase; }
td { color: var(--ink); }
.paid, .pending { padding: 5px 9px; border-radius: 10px; font-size: 8px; font-weight: 700; }
.paid { color: var(--green); background: #e7f6ef; }.pending { color: #816300; background: #fff5c9; }

.message-list { display: grid; gap: 14px; }
.message-card { min-height: 128px; padding: 24px; display: grid; grid-template-columns: 48px 1fr auto; gap: 18px; align-items: start; border: 1px solid var(--line); border-radius: 6px; background: white; transition: transform .2s, box-shadow .2s; }
.message-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.message-card.unread { border-left: 4px solid var(--blue); }
.message-type { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 50%; color: var(--blue); background: #eaf1fc; }
.message-type.reminder { color: #8c6b00; background: #fff5c9; }.message-type.news { color: var(--green); background: #e7f6ef; }
.message-card small { color: var(--muted); font-size: 8px; font-weight: 700; }
.message-card h3 { margin: 6px 0; color: var(--navy); font: 700 16px 'Merriweather', serif; }
.message-card p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.7; }
.message-type.urgent { color: #a01919; background: #fff0f0; }
.delivery-label { margin-top: 10px; display: inline-flex; align-items: center; gap: 5px; color: var(--blue); font-size: 8px; font-weight: 700; }
.message-read-button { min-height: 35px; padding: 0 11px; display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--blue); border-radius: 4px; color: var(--blue); background: white; font-size: 8px; font-weight: 700; }
.message-read-button:hover { color: white; background: var(--blue); }.message-read-button:disabled { opacity: .6; }
.message-read { display: inline-flex; align-items: center; gap: 5px; color: var(--green); font-size: 8px; font-weight: 700; }.message-card.school-notice { background: #fbfcfe; }
.unread-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--red); }

.documents-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.document-card { min-height: 150px; padding: 24px; display: grid; grid-template-columns: 52px 1fr auto; align-items: center; gap: 17px; border: 1px solid var(--line); border-radius: 6px; color: inherit; background: white; text-decoration: none; }
.documents-grid button.document-card { width: 100%; font: inherit; text-align: left; cursor: pointer; }
.document-card > span { width: 50px; height: 50px; display: grid; place-items: center; border-radius: 6px; color: var(--red); background: #fff0f0; font-size: 20px; }
.document-card small { color: var(--muted); font-size: 8px; font-weight: 700; }
.document-card h3 { margin: 5px 0; color: var(--navy); font-size: 14px; }
.document-card p { margin: 0; color: var(--muted); font-size: 9px; }
.document-card > i { color: #a4adbd; }
.document-card.available { transition: transform .2s, border-color .2s; }
.document-card.available:hover { transform: translateY(-3px); border-color: var(--gold); }
.document-card.available > i { color: var(--blue); }
.settings-layout { display: grid; grid-template-columns: minmax(240px, .55fr) minmax(0, 1.25fr); gap: 22px; align-items: start; }.account-summary { padding: 30px; display: flex; flex-direction: column; align-items: center; border-radius: 6px; color: white; background: var(--navy); text-align: center; }.account-summary > span { width: 70px; height: 70px; display: grid; place-items: center; border: 3px solid rgba(255,255,255,.65); border-radius: 50%; color: var(--navy); background: var(--gold); font-size: 18px; font-weight: 700; }.account-summary h3 { margin: 14px 0 3px; font: 700 18px 'Merriweather', serif; }.account-summary > p { margin: 0; color: rgba(255,255,255,.65); font-size: 10px; }.account-summary > div { width: 100%; margin-top: 28px; padding-top: 20px; display: flex; align-items: flex-start; gap: 11px; border-top: 1px solid rgba(255,255,255,.15); text-align: left; }.account-summary > div > i { color: var(--gold); }.account-summary div span { display: flex; flex-direction: column; }.account-summary div strong { font-size: 10px; }.account-summary div small { margin-top: 4px; color: rgba(255,255,255,.6); font-size: 8px; line-height: 1.6; }.pin-panel .section-heading > i { color: var(--gold); font-size: 21px; }.pin-panel form { padding: 24px; }.settings-field { margin-bottom: 17px; }.settings-field label { display: block; margin-bottom: 7px; color: var(--ink); font-size: 10px; font-weight: 700; }.settings-field input { width: 100%; height: 48px; padding: 0 13px; border: 1px solid #ccd4e2; border-radius: 5px; outline: 0; color: var(--ink); background: #fbfcfe; }.settings-field input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(28,79,156,.09); }.settings-field.invalid input { border-color: var(--red); }.settings-field > span { display: block; min-height: 17px; padding-top: 4px; color: var(--red); font-size: 9px; }.pin-guidance { padding: 11px 12px; display: flex; align-items: flex-start; gap: 8px; color: var(--muted); background: #f3f6fa; font-size: 9px; line-height: 1.6; }.pin-guidance i { margin-top: 2px; color: var(--blue); }.settings-submit { min-height: 45px; padding: 0 18px; display: inline-flex; align-items: center; gap: 9px; border: 0; border-radius: 5px; color: white; background: var(--navy); font-size: 10px; font-weight: 700; }.settings-submit:hover { background: var(--blue); }

.mobile-bottom-nav { display: none; }
.toast { position: fixed; right: 24px; bottom: 24px; max-width: 360px; min-height: 52px; padding: 12px 18px; display: flex; align-items: center; gap: 11px; border-radius: 6px; color: white; background: var(--navy-dark); box-shadow: 0 15px 35px rgba(0,0,0,.22); font-size: 12px; transform: translateY(30px); opacity: 0; visibility: hidden; transition: .3s; z-index: 100; }
.toast i { color: var(--gold); }
.toast.error i { color: #ff8b8b; }
.toast.show { transform: translateY(0); opacity: 1; visibility: visible; }
.empty-state { padding: 24px; color: var(--muted); font-size: 11px; text-align: center; }

.parent-timetable { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.parent-timetable-day { border: 1px solid var(--line); border-radius: 6px; background: white; box-shadow: 0 7px 20px rgba(11,31,91,.05); overflow: hidden; }
.parent-timetable-day > header { min-height: 70px; padding: 13px 18px; display: flex; align-items: center; gap: 12px; border-bottom: 1px solid var(--line); background: #f7f9fc; }
.parent-timetable-day > header > span { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 5px; color: white; background: var(--navy); font-size: 9px; font-weight: 700; }
.parent-timetable-day > header div { display: flex; flex-direction: column; }.parent-timetable-day > header strong { color: var(--navy); font: 700 15px 'Merriweather', serif; }.parent-timetable-day > header small { margin-top: 3px; color: var(--muted); font-size: 8px; }
.parent-timetable-day article { min-height: 76px; padding: 13px 18px; display: flex; align-items: center; gap: 13px; border-bottom: 1px solid var(--line); }.parent-timetable-day article:last-child { border-bottom: 0; }.parent-timetable-day time { width: 50px; flex: 0 0 50px; color: var(--red); font-size: 10px; font-weight: 700; }.parent-timetable-day time span { display: block; margin-top: 3px; color: var(--muted); font-size: 8px; font-weight: 400; }.parent-timetable-day article div { min-width: 0; flex: 1; }.parent-timetable-day article strong { display: block; color: var(--navy); font-size: 11px; }.parent-timetable-day article p { margin: 4px 0 0; overflow: hidden; color: var(--muted); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }.parent-timetable-day article > i { color: #a8b2c2; font-size: 14px; }.timetable-empty { margin: 0; padding: 24px 18px; color: var(--muted); font-size: 9px; text-align: center; }
.parent-attendance-alerts { margin-top: 18px; }.parent-attendance-alert { min-height: 92px; padding: 16px 20px; display: grid; grid-template-columns: 42px minmax(0,1fr) auto; align-items: center; gap: 14px; border-bottom: 1px solid var(--line); background: #fffafa; }.parent-attendance-alert:last-child { border-bottom: 0; }.parent-attendance-alert.read { background: white; }.parent-alert-icon { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; color: var(--red); background: #fff0f0; }.parent-alert-icon.late { color: #8c6b00; background: #fff5c9; }.parent-attendance-alert div { min-width: 0; }.parent-attendance-alert small { color: var(--red); font-size: 8px; font-weight: 700; text-transform: uppercase; }.parent-attendance-alert h4 { margin: 4px 0; color: var(--navy); font: 700 13px 'Merriweather', serif; }.parent-attendance-alert p { margin: 0; color: var(--muted); font-size: 9px; line-height: 1.55; }.parent-attendance-alert button { min-height: 36px; padding: 0 12px; display: flex; align-items: center; gap: 6px; border: 1px solid var(--navy); border-radius: 4px; color: var(--navy); background: white; font-size: 8px; font-weight: 700; }.parent-attendance-alert button:hover { color: white; background: var(--navy); }.parent-alert-read { color: var(--green); font-size: 8px; font-weight: 700; }
.pupil-photo img.profile-upload { transform: none; object-position: center; }

@keyframes loginZoom { from { transform: scale(1.08); } to { transform: scale(1); } }
@keyframes viewIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

@media (max-width: 1120px) {
    .login-view { grid-template-columns: 1fr 440px; }
    .dashboard-view { grid-template-columns: 224px minmax(0, 1fr); }
    .sidebar { width: 224px; }
    .overview-grid, .learning-layout { grid-template-columns: 1fr; }
    .fee-summary-band { grid-template-columns: repeat(2, 1fr); }
    .fee-summary-band button { grid-column: 1 / -1; width: fit-content; margin: 22px 0 0; }
}

@media (max-width: 860px) {
    .login-view { display: block; position: relative; }
    .login-visual { min-height: 100vh; }
    .login-visual-overlay { padding: 28px 24px 120px; }
    .visual-copy { max-width: 620px; }
    .visual-copy h1 { font-size: clamp(32px, 8vw, 52px); }
    .visual-copy p { font-size: 15px; }
    .login-panel { min-height: auto; width: calc(100% - 32px); margin: -72px auto 20px; padding: 28px 24px; border-radius: 8px; box-shadow: 0 20px 50px rgba(7,22,64,.2); z-index: 4; }
    .portal-brand { margin-bottom: 30px; }
    .login-footer { margin-bottom: 0; }
    .dashboard-view { display: block; }
    .sidebar { width: 270px; transform: translateX(-105%); transition: transform .3s ease; box-shadow: 20px 0 40px rgba(0,0,0,.18); }
    .sidebar.open { transform: none; }
    .sidebar-scrim { position: fixed; inset: 0; display: block; background: rgba(4,12,35,.48); opacity: 0; visibility: hidden; transition: .3s; z-index: 40; }
    .sidebar-scrim.show { opacity: 1; visibility: visible; }
    .dashboard-main { min-height: 100vh; }
    .menu-toggle { display: inline-grid; }
    .metrics-grid { grid-template-columns: 1fr 1fr; }
    .metrics-grid .metric-card:last-child { grid-column: 1 / -1; }
    .action-grid { grid-template-columns: repeat(2, 1fr); }
    .documents-grid { grid-template-columns: 1fr; }
    .settings-layout { grid-template-columns: 1fr; }
    .parent-timetable { grid-template-columns: 1fr; }
    .parent-report > header { grid-template-columns: minmax(0,1fr) minmax(140px,.55fr); }.parent-report header button { grid-column: 1 / -1; width: fit-content; }
}

@media (max-width: 620px) {
    .login-visual { min-height: 650px; }
    .login-visual-overlay { background: linear-gradient(180deg, rgba(7,22,64,.38), rgba(7,22,64,.16) 30%, rgba(7,22,64,.94)); }
    .visual-copy { padding-bottom: 25px; }
    .visual-copy h1 { font-size: 34px; }
    .visual-copy p { font-size: 13px; line-height: 1.65; }
    .login-panel { margin-top: -55px; }
    .portal-brand img { width: 58px; height: 58px; }
    .login-heading h2 { font-size: 28px; }
    .portal-header { height: 70px; padding: 0 15px; }
    .header-left { gap: 8px; }
    .header-left h2 { max-width: 190px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; }
    .header-date { font-size: 8px; }
    .parent-profile div { display: none; }
    .parent-profile > span { width: 36px; height: 36px; }
    .header-actions { gap: 7px; }
    .notification-button { width: 36px; height: 36px; }
    .preview-banner { padding: 8px 15px; }
    .preview-banner p { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .dashboard-content { padding: 20px 15px 94px; }
    .pupil-hero { min-height: 210px; padding: 22px; grid-template-columns: 64px 1fr; gap: 14px; }
    .pupil-photo { width: 64px; height: 64px; }
    .pupil-details h1 { font-size: 22px; }
    .pupil-details p { line-height: 1.7; }
    .term-details { grid-column: 1 / -1; padding: 14px 0 0; border-left: 0; border-top: 1px solid rgba(255,255,255,.18); }
    .child-switcher select { width: 100%; }
    .metrics-grid { grid-template-columns: 1fr; gap: 12px; }
    .metrics-grid .metric-card:last-child { grid-column: auto; }
    .metric-card { min-height: 108px; padding: 17px; }
    .overview-grid { gap: 14px; }
    .section-heading { padding: 15px 17px; }
    .section-heading h3 { font-size: 16px; }
    .task-list { padding: 0 16px; }
    .task-row { grid-template-columns: 39px minmax(0, 1fr); padding: 13px 0; }
    .task-row time { grid-column: 2; align-items: flex-start; flex-direction: row; gap: 5px; }
    .action-grid { gap: 10px; }
    .action-grid button, .action-grid a { min-height: 76px; padding: 10px; flex-direction: column; justify-content: center; text-align: center; }
    .calendar { padding: 12px; gap: 4px; }
    .calendar > span { min-height: 38px; font-size: 9px; }
    .calendar-key { display: none; }
    .assignment-card { padding: 18px 16px; }
    .parent-attendance-alert { grid-template-columns: 38px minmax(0,1fr); padding: 15px; }.parent-alert-icon { width: 38px; height: 38px; }.parent-attendance-alert button,.parent-alert-read { grid-column: 2; justify-self: start; }
    .teacher-note { padding: 24px 20px; }
    .parent-report > header { grid-template-columns: 1fr; gap: 14px; padding: 18px 16px; }.report-overall { padding: 12px 0 0; border-left: 0; border-top: 3px solid var(--gold); }.parent-report header button { grid-column: auto; width: 100%; justify-content: center; }.parent-report > footer { grid-template-columns: 1fr; padding: 15px 16px; }
    .fee-summary-band { grid-template-columns: 1fr; padding: 22px; }
    .fee-summary-band > div { padding: 13px 0; border-right: 0; border-bottom: 1px solid rgba(255,255,255,.15); }
    .fee-summary-band button { width: 100%; margin-top: 18px; }
    .statement-panel .section-heading { align-items: flex-start; flex-direction: column; }
    .message-card { padding: 18px 15px; grid-template-columns: 40px 1fr; gap: 12px; }
    .message-type { width: 40px; height: 40px; }
    .message-card .unread-dot { position: absolute; right: 16px; }
    .message-card { position: relative; }
    .document-card { min-height: 130px; padding: 18px 15px; grid-template-columns: 44px 1fr auto; gap: 12px; }
    .document-card > span { width: 43px; height: 43px; }
    .mobile-bottom-nav { position: fixed; inset: auto 0 0; height: 69px; padding: 6px 8px max(6px, env(safe-area-inset-bottom)); display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); background: rgba(255,255,255,.97); box-shadow: 0 -10px 25px rgba(11,31,91,.08); z-index: 35; }
    .mobile-bottom-nav button { position: relative; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; border: 0; color: #8490a5; background: transparent; font-size: 9px; }
    .mobile-bottom-nav i { font-size: 17px; }
    .mobile-bottom-nav button.active { color: var(--navy); font-weight: 700; }
    .mobile-bottom-nav button.active::before { content: ""; position: absolute; top: -6px; width: 28px; height: 3px; background: var(--red); }
    .mobile-bottom-nav b { position: absolute; top: 3px; left: 54%; min-width: 16px; height: 16px; display: grid; place-items: center; border: 2px solid white; border-radius: 50%; color: white; background: var(--red); font-size: 7px; }
    .toast { right: 15px; bottom: 82px; left: 15px; max-width: none; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
