/* ORION-ILSMS — enterprise UI, built to the approved mockups (1280 × 720 reference).
   Brand: navy #01164B, purple #52019B, Poppins. */

@font-face { font-family: "Poppins"; font-weight: 400; font-style: normal; font-display: swap; src: url("../fonts/poppins-400.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-weight: 500; font-style: normal; font-display: swap; src: url("../fonts/poppins-500.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-weight: 700; font-style: normal; font-display: swap; src: url("../fonts/poppins-700.woff2") format("woff2"); }

:root {
    --c-navy: #01164B;
    --c-side: #011750;
    --c-purple: #52019B;
    --c-violet: #7B2FF7;
    --c-blue: #0157FC;
    --c-green: #16A34A;
    --c-red: #E5303F;
    --c-orange: #F97316;
    --c-ink: #0E1530;
    --c-ink-2: #3F4868;
    --c-muted: #7A82A0;
    --c-line: #E6EAF5;
    --c-bg: #F5F7FD;
    --radius: 10px;
    --shadow: 0 1px 2px rgba(1, 22, 75, .04), 0 4px 14px rgba(1, 22, 75, .06);
    --side-w: 185px;
    --top-h: 62px;
    --focus: 0 0 0 3px rgba(82, 1, 155, .22);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 400 13px/1.45 "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--c-ink); background: var(--c-bg); }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
img { max-width: 100%; display: block; }
[hidden] { display: none !important; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 6px; }
.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; }
.icon { width: 16px; height: 16px; flex: none; }
.icon--xs { width: 11px; height: 11px; }
.empty { color: var(--c-muted); text-align: center; padding: 20px 0; }
.muted { color: var(--c-muted); }
.field__error { color: var(--c-red); font-size: 12px; margin: -6px 0 2px 4px; }

.alert { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border-radius: 9px; margin-bottom: 12px; font-size: 12.5px; border: 1px solid; text-align: left; }
.alert .icon { margin-top: 2px; }
.alert--ok { background: #EAF7F1; border-color: #BFE6D4; color: #0B5E43; }
.alert--error { background: #FDECEE; border-color: #F5C2C8; color: #8F1D2A; }
.alert span { flex: 1; }
.alert__close { background: none; border: 0; cursor: pointer; color: inherit; opacity: .7; padding: 0; }

/* ================================ Sign-in ================================ */
.login { position: relative; height: 100vh; min-height: 640px; overflow: hidden; background: linear-gradient(135deg, #FFFFFF 40%, #EAF0FF 100%); }
.login__photo { position: absolute; top: 0; bottom: 0; left: 0; width: 64%; }
.login__photo img { width: 100%; height: 100%; object-fit: cover; object-position: 18% 30%; }
.login__photo::after {
    content: ""; position: absolute; inset: 0;
    background:
        radial-gradient(ellipse 48% 30% at 22% 7%, rgba(255, 255, 255, .95) 0%, rgba(255, 255, 255, .6) 50%, rgba(255, 255, 255, 0) 100%),
        linear-gradient(180deg, rgba(1, 22, 75, 0) 50%, rgba(1, 22, 75, .45) 78%, rgba(1, 22, 75, .75) 100%);
}
.login__wave { position: absolute; inset: 0; width: 100%; height: 100%; }
.login__hex { position: absolute; top: 0; right: 0; width: 200px; height: 140px; }
.login__brand { position: absolute; top: 3.1%; left: 4.7%; width: 32.2%; max-width: 520px; z-index: 2; }
.login__slogan { position: absolute; left: 3.7%; bottom: 17%; z-index: 2; color: #fff; font-weight: 700; font-style: italic; line-height: 1.12; text-shadow: 0 2px 12px rgba(1, 22, 75, .45); font-size: clamp(24px, 2.75vw, 46px); }
.login__slogan p:nth-child(2) { padding-left: .18em; }
.login__slogan .is-accent { font-size: 1.22em; margin-top: .05em; background: linear-gradient(90deg, #C29BFF, #9A55F0 60%, #8A3FE6); -webkit-background-clip: text; background-clip: text; color: transparent; text-shadow: none; filter: drop-shadow(0 2px 8px rgba(1, 22, 75, .5)); }
.login__swoosh { display: block; width: 62%; height: 5px; margin: 14px 0 0 12%; border-radius: 50%; background: linear-gradient(90deg, transparent, #A15BFF 25%, #7A2EE6 75%, transparent); }

.login__card-wrap { position: absolute; z-index: 3; top: 0; bottom: 0; left: 59%; right: 4.6%; display: flex; align-items: center; justify-content: center; padding-bottom: 1.5vh; }
.login__card { width: 100%; max-width: 465px; background: #fff; border-radius: 22px; padding: 38px 40px 20px; text-align: center; box-shadow: 0 18px 50px rgba(1, 22, 75, .14), 0 2px 6px rgba(1, 22, 75, .05); }
.login__logo { width: 92%; margin: 0 auto 26px; }
.login__title { font-size: 29px; font-weight: 700; color: var(--c-navy); letter-spacing: -.2px; }
.login__lead { color: var(--c-navy); font-size: 15px; margin-top: 2px; }
.login__rule { display: block; width: 168px; height: 3px; margin: 10px auto 16px; border-radius: 3px; background: linear-gradient(90deg, rgba(123, 47, 247, .15), #7B2FF7 30%, #01164B 75%, rgba(1, 22, 75, .15)); }
.login__powered { margin-top: 18px; font-size: 14px; color: var(--c-navy); }
.login__powered strong { color: var(--c-purple); font-weight: 500; }
.login__back { margin-top: 16px; font-size: 13px; }

.lform { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; text-align: left; }
.lfield { display: flex; align-items: center; gap: 16px; height: 48px; padding: 0 16px 0 20px; border: 1.5px solid #CBC6EC; border-radius: 11px; background: #fff; transition: border-color .15s, box-shadow .15s; }
.lfield > .icon { width: 20px; height: 21px; color: var(--c-navy); }
.lfield:focus-within { border-color: #7B2FF7; box-shadow: var(--focus); }
.lfield input { flex: 1; min-width: 0; height: 100%; border: 0; outline: none; background: transparent; font-size: 16px; color: var(--c-navy); }
.lfield input:focus-visible { box-shadow: none; }
.lfield input::placeholder { color: #5E6587; }
.lfield.has-error { border-color: var(--c-red); }
.lfield__toggle { background: none; border: 0; padding: 4px; cursor: pointer; color: var(--c-navy); display: grid; }
.lfield__toggle .icon { width: 22px; height: 20px; }
.lform__row { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: 15px; margin: 4px 0 4px; }
.lcheck { display: inline-flex; align-items: center; gap: 14px; cursor: pointer; color: var(--c-navy); }
.lcheck input { width: 22px; height: 22px; margin: 0; accent-color: var(--c-purple); }
.lform__link { color: var(--c-purple); font-weight: 500; font-size: 15px; }
.lform__link:hover { text-decoration: underline; }
.lbtn { display: flex; align-items: center; justify-content: center; gap: 14px; width: 100%; height: 49px; border-radius: 11px; border: 1.5px solid transparent; font-size: 19px; font-weight: 500; cursor: pointer; transition: filter .15s, transform .05s; }
.lbtn .icon { width: 22px; height: 22px; }
.lbtn:active { transform: translateY(1px); }
.lbtn--primary { color: #fff; background: linear-gradient(90deg, #40009C 0%, #5A14C4 45%, #7835D3 100%); box-shadow: 0 6px 16px rgba(82, 1, 155, .25); }
.lbtn--primary:hover { filter: brightness(1.08); }

.login__band { position: absolute; left: 0; right: 0; bottom: 0; z-index: 4; height: 16%; min-height: 104px; color: #fff; }
.login__band-wave { position: absolute; inset: 0; width: 100%; height: 100%; }
.login__band-inner { position: relative; height: 100%; display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; padding: 0 2% 0 3.1%; }
.login__features { list-style: none; margin: 0 0 4.2vh; padding: 0; display: flex; align-items: center; }
.login__features li { display: flex; align-items: center; gap: 14px; padding: 2px 30px; font-size: 13.5px; line-height: 1.25; border-left: 1.5px solid rgba(255, 255, 255, .55); }
.login__features li:first-child { padding-left: 0; border-left: 0; }
.login__features .icon { width: 44px; height: 34px; }
.login__meta { display: flex; align-items: center; gap: 12px; font-size: 13.5px; white-space: nowrap; margin-bottom: 2.6vh; }
.login__meta i { width: 1.5px; height: 15px; background: rgba(255, 255, 255, .6); }
.login__meta b { width: 1.5px; height: 24px; background: rgba(255, 255, 255, .6); margin: 0 16px 0 22px; }
.login__meta .icon { width: 20px; height: 20px; }

/* =============================== App shell =============================== */
.shell { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); grid-template-rows: var(--top-h) 1fr; min-height: 100vh; }

.topbar { grid-column: 1 / -1; position: sticky; top: 0; z-index: 30; display: flex; align-items: center; height: var(--top-h); padding-right: 22px; background: #fff; border-bottom: 1px solid var(--c-line); box-shadow: 0 1px 6px rgba(1, 22, 75, .05); }
.topbar__brand { width: 280px; height: 100%; flex: none; display: flex; align-items: center; padding: 0 22px; border-right: 1px solid var(--c-line); }
.topbar__brand img { width: 236px; }
.topbar__menu { display: none; width: 38px; height: 38px; border-radius: 9px; border: 1px solid var(--c-line); background: #fff; color: var(--c-navy); place-items: center; cursor: pointer; }
.search { display: flex; align-items: center; gap: 14px; width: 398px; max-width: 34vw; height: 31px; padding: 0 16px; margin-left: 25px; background: #E9EEFC; border: 1px solid transparent; border-radius: 16px; color: var(--c-navy); }
.search .icon { width: 17px; height: 17px; }
.search:focus-within { background: #fff; border-color: #C9BEEB; box-shadow: var(--focus); }
.search input { flex: 1; min-width: 0; border: 0; outline: none; background: transparent; font-size: 13px; color: var(--c-navy); }
.search input:focus-visible { box-shadow: none; }
.search input::placeholder { color: #3D4566; }
.topbar__actions { margin-left: auto; display: flex; align-items: center; gap: 16px; }
.bell { position: relative; width: 34px; height: 34px; display: grid; place-items: center; border: 0; background: none; color: var(--c-navy); cursor: pointer; border-radius: 9px; }
.bell .icon { width: 20px; height: 22px; }
.bell:hover { background: var(--c-bg); }
.bell__badge { position: absolute; top: 0; right: 0; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--c-red); color: #fff; font-size: 10px; font-weight: 700; display: grid; place-items: center; border: 1.5px solid #fff; }
.topbar__divider { width: 1px; height: 32px; background: #D7DCEB; }
.usermenu { position: relative; }
.usermenu__btn { display: flex; align-items: center; gap: 12px; border: 0; background: none; cursor: pointer; padding: 3px; border-radius: 10px; }
.usermenu__btn:hover { background: var(--c-bg); }
.avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; display: grid; place-items: center; font-weight: 700; font-size: 14px; color: #fff; background: linear-gradient(135deg, #01164B, #52019B); }
.usermenu__who { display: grid; text-align: left; line-height: 1.3; }
.usermenu__who strong { font-size: 12.5px; font-weight: 500; color: var(--c-navy); }
.usermenu__who small { font-size: 12px; color: var(--c-ink-2); }
.usermenu__btn > .icon { color: var(--c-navy); margin-left: 14px; width: 12px; height: 12px; }
.usermenu__list { position: absolute; right: 0; top: calc(100% + 10px); width: 230px; padding: 6px; background: #fff; border: 1px solid var(--c-line); border-radius: 12px; box-shadow: 0 14px 34px rgba(1, 22, 75, .16); }
.usermenu__head { padding: 8px 10px 10px; border-bottom: 1px solid var(--c-line); margin-bottom: 6px; display: grid; }
.usermenu__head small { color: var(--c-muted); font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; }
.usermenu__list a, .usermenu__list button { width: 100%; display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; background: none; border: 0; cursor: pointer; font-size: 13px; text-align: left; }
.usermenu__list .icon { width: 14px; height: 14px; color: var(--c-purple); }
.usermenu__list a:hover, .usermenu__list button:hover { background: var(--c-bg); }
.usermenu__list form { margin: 6px 0 0; border-top: 1px solid var(--c-line); padding-top: 6px; }

.sidebar { position: sticky; top: var(--top-h); height: calc(100vh - var(--top-h)); display: flex; flex-direction: column; padding: 16px 8px 28px; background: var(--c-side); color: #fff; overflow-y: auto; }
.nav { display: grid; gap: 0; }
.nav__link { display: flex; align-items: center; gap: 0; height: 32.5px; padding: 0 14px 0 12px; border-radius: 8px; font-size: 13px; color: #fff; transition: background .15s; }
.nav__link > .icon:first-child { width: 18px; height: 17px; margin-right: 16px; }
.nav__link span { flex: 1; white-space: nowrap; }
.nav__chev { width: 8px; height: 10px; }
.nav__link:hover { background: rgba(255, 255, 255, .08); }
.nav__link.is-active { height: 36px; margin-bottom: 7px; background: linear-gradient(90deg, #0157FC, #1A66F0); font-size: 13.5px; font-weight: 500; }
.nav__link.is-active > .icon:first-child { width: 19px; height: 18px; }
.status-box { margin: auto 2px 0; display: flex; align-items: center; gap: 12px; padding: 13px 14px 13px 14px; border-radius: 8px; background: rgba(255, 255, 255, .03); border: 1px solid rgba(255, 255, 255, .28); }
.status-box div { flex: 1; display: grid; line-height: 1.35; }
.status-box strong { font-size: 12px; font-weight: 500; color: #34E36A; }
.status-box small { font-size: 9.5px; color: #E2E6F5; }
.status-box__dot { width: 13px; height: 13px; border-radius: 50%; background: #22E54D; flex: none; }
.status-box__dot.is-off { background: #F59E0B; }
.status-box__icon { width: 14px; height: 14px; color: #E2E6F5; }
.shell__overlay { display: none; }

.page { min-width: 0; padding: 0 15px 16px 13px; display: grid; gap: 10px; align-content: start; }

/* ================================ Dashboard ================================ */
.hero { position: relative; display: flex; align-items: stretch; height: 98px; margin: 0 -15px 0 -13px; background: linear-gradient(90deg, #F2F4FF 0%, #EEF1FD 60%, #E9EDFB 100%); overflow: hidden; }
.hero__text { position: relative; z-index: 2; flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 0 0 0 40px; }
.hero__text::before { content: ""; position: absolute; left: 21px; top: 23px; bottom: 26px; width: 4px; border-radius: 3px; background: linear-gradient(180deg, #0157FC, #3B1FB8); }
.hero__text h2 { font-size: 23.5px; font-weight: 700; color: #0B2A9B; letter-spacing: -.2px; }
.hero__text p { font-size: 15.5px; color: var(--c-navy); margin-top: 3px; }
.hero__image { position: absolute; top: 0; bottom: 0; right: 0; width: 54%; }
.hero__image img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 45%; }
.hero__image::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(90deg, #EEF1FD 0%, rgba(238, 241, 253, .85) 8%, rgba(238, 241, 253, 0) 24%); }
.hero__panel { position: absolute; z-index: 1; top: 0; bottom: 0; right: 0; width: 38%; }
.hero__panel svg { width: 100%; height: 100%; display: block; }
.hero__slogan { position: absolute; z-index: 2; right: 24px; top: 17px; display: grid; color: #fff; font-weight: 700; font-style: italic; font-size: 15px; line-height: 1.27; text-align: right; }
.hero__slogan span:nth-child(1) { margin-right: 0; }
.hero__slogan span:nth-child(2) { margin-right: 10px; }
.hero__slogan span:nth-child(3) { margin-right: 6px; }
.hero__swoosh { position: absolute; z-index: 2; right: 22px; bottom: 12px; width: 120px; height: 10px; }

.kpis { display: grid; grid-template-columns: 249fr 238fr 263fr 284fr; gap: 10px; margin-top: 2px; }
.kpi { position: relative; overflow: hidden; display: flex; align-items: center; height: 80px; padding: 0 16px 0 18px; border-radius: 8px; color: #fff; box-shadow: 0 6px 16px rgba(1, 22, 75, .12); }
.kpi--blue { background: linear-gradient(100deg, #014BEA 0%, #0A66F2 55%, #027FF5 100%); }
.kpi--purple { background: linear-gradient(100deg, #4C0297 0%, #6203B5 55%, #7904CE 100%); }
.kpi--navy { background: linear-gradient(100deg, #011959 0%, #02246F 55%, #003289 100%); }
.kpi--white { background: #fff; color: var(--c-navy); border: 1px solid #E6E8F7; box-shadow: var(--shadow); }
.kpi__icon { position: relative; z-index: 1; flex: none; width: 52px; display: grid; place-items: center; margin-right: 18px; }
.kpi__icon .icon { width: 50px; height: 42px; }
.kpi--white .kpi__icon .icon { color: var(--c-navy); }
.kpi__mark { position: absolute; z-index: 0; right: 22px; top: 6px; opacity: .14; }
.kpi__mark .icon { width: 74px; height: 60px; }
.kpi--white .kpi__mark { display: none; }
.kpi__body { position: relative; z-index: 1; display: grid; min-width: 0; flex: 1; }
.kpi__value { font-size: 23px; font-weight: 700; line-height: 1.2; white-space: nowrap; }
.kpi__label { font-size: 12.5px; white-space: nowrap; }
.kpi__side { position: absolute; z-index: 1; inset: 12px 14px 9px auto; display: grid; justify-items: end; align-content: space-between; }
.spark { width: 60px; height: 26px; color: #fff; opacity: .7; }
.kpi--white .spark { color: #8B3FE6; opacity: 1; width: 66px; height: 30px; }
.kpi__trend { display: inline-flex; align-items: center; gap: 3px; font-size: 12.5px; font-weight: 700; color: #6EF0A0; }
.kpi__trend.is-down { color: #FFB3BB; }
.kpi--white .kpi__trend { color: var(--c-green); }
.kpi--white .kpi__trend.is-down { color: var(--c-red); }

.dash { display: grid; grid-template-columns: minmax(0, 1fr) 252px; gap: 10px; align-items: start; margin-top: 3px; }
.dash__main { display: grid; gap: 15px; min-width: 0; }
.dash__row { display: grid; gap: 10px; align-items: stretch; }
.dash__row--a { grid-template-columns: minmax(0, 520fr) minmax(0, 275fr); }
.dash__row--b { grid-template-columns: minmax(0, 365fr) minmax(0, 428fr); gap: 12px; }
.dash__side { display: grid; gap: 7px; }

.card { min-width: 0; background: #fff; border: 1px solid var(--c-line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 12px 14px; }
.card__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; min-height: 26px; }
.card__head h3 { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 700; color: var(--c-navy); white-space: nowrap; }
.card__head h3 .card__title { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; text-decoration-color: rgba(1, 22, 75, .55); }
.card__icon { width: 17px; height: 17px; color: var(--c-blue); }
.card__link { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 500; color: var(--c-blue); white-space: nowrap; }
.card__link:hover { text-decoration: underline; }

.filters { display: flex; gap: 8px; }
.filters select { height: 24px; padding: 0 24px 0 10px; border: 1px solid #DCE1EF; border-radius: 6px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%2301164B' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 8px center / 8px; -webkit-appearance: none; appearance: none; font-size: 12px; cursor: pointer; color: var(--c-navy); }

.perf { display: grid; grid-template-columns: 224px minmax(0, 1fr); align-items: center; min-height: 170px; }
.perf__donut { display: flex; align-items: center; gap: 14px; height: 100%; border-right: 1px solid var(--c-line); padding-right: 6px; }
.donut { position: relative; width: 132px; height: 132px; flex: none; }
.donut svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.donut__centre { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.donut__centre strong { font-size: 22px; font-weight: 700; color: var(--c-navy); line-height: 1.1; }
.donut__centre span { font-size: 11.5px; color: var(--c-navy); }
.legend { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.legend li { display: flex; align-items: flex-start; gap: 8px; font-size: 11.5px; color: var(--c-navy); }
.legend li div { display: grid; line-height: 1.25; }
.legend li strong { font-weight: 500; font-size: 11px; color: var(--c-navy); }
.legend__dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 4px; flex: none; }
.dot--blue { background: var(--c-blue); }
.dot--purple { background: #6A1FD0; }
.dot--red { background: var(--c-red); }
.dot--amber { background: #F5B014; }
.perf__chart { padding-left: 12px; }
.perf__chart h4 { font-size: 11px; font-weight: 700; color: var(--c-navy); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(1, 22, 75, .5); }
.chart-legend { display: flex; justify-content: center; gap: 12px; font-size: 9px; color: var(--c-navy); margin: 6px 0 0; }
.chart-legend span { display: inline-flex; align-items: center; gap: 5px; }
.chart-legend i { width: 7px; height: 7px; border-radius: 50%; }
.barchart { width: 100%; height: auto; display: block; }
.barchart__grid { stroke: #EEF1F8; stroke-width: 1; }
.barchart__axis { stroke: #C9CFE0; stroke-width: 1; }
.barchart__tick, .barchart__label { font-size: 9px; fill: var(--c-navy); font-family: "Poppins", sans-serif; }
.bar--blue { fill: #0157FC; }
.bar--purple { fill: #6A1FD0; }

.qa { display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-rows: 78px; gap: 9px 9px; padding: 0 2px; }
.qa__tile { display: grid; justify-items: center; align-content: center; gap: 4px; padding: 6px 4px; border-radius: 9px; text-align: center; font-size: 11px; line-height: 1.2; color: var(--c-navy); transition: transform .12s, box-shadow .12s; }
.qa__tile:hover, .eco__tile:hover { transform: translateY(-2px); box-shadow: 0 6px 14px rgba(1, 22, 75, .1); }
.qa__icon { display: grid; place-items: center; height: 28px; }
.qa__icon .icon { width: 26px; height: 24px; }
.tile--blue { background: #E4EBFD; } .tile--blue .icon { color: var(--c-blue); }
.tile--green { background: #E3F5EE; } .tile--green .icon { color: #12A150; }
.tile--purple { background: #EFE6FF; } .tile--purple .icon { color: #7A1FE0; }

.feed { list-style: none; margin: 0; padding: 0 2px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 7px; }
.feed li { display: flex; align-items: center; gap: 14px; min-width: 0; height: 20px; font-size: 12px; color: var(--c-navy); }
.feed__icon { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; flex: none; color: #fff; }
.feed__icon .icon { width: 10px; height: 10px; }
.feed__text { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.feed__time { font-size: 10.5px; color: var(--c-ink-2); white-space: nowrap; }
.tone--green { background: #16A34A; } .tone--blue { background: #0157FC; } .tone--purple { background: #6A1FD0; }
.tone--orange { background: #F97316; } .tone--red { background: var(--c-red); } .tone--grey { background: var(--c-muted); }

.eco { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 65px; gap: 10px 10px; }
.eco__tile { display: grid; justify-items: center; align-content: center; gap: 6px; border-radius: 9px; font-size: 12px; color: var(--c-navy); transition: transform .12s, box-shadow .12s; }
.eco__tile .icon { width: 26px; height: 24px; }

.school { padding: 0; overflow: hidden; }
.school__img { width: 100%; height: 86px; object-fit: cover; object-position: center 45%; }
.school__body { padding: 8px 14px 12px; text-align: center; }
.school__body h3 { font-size: 14px; font-weight: 700; color: var(--c-navy); }
.school__motto { font-size: 11.5px; font-style: italic; color: var(--c-navy); margin-top: 2px; }
.school__facts { list-style: none; margin: 10px 0 0; padding: 0 0 0 0; display: grid; gap: 1px; text-align: left; font-size: 11.5px; color: var(--c-navy); }
.school__facts li { display: flex; align-items: center; gap: 14px; }
.school__facts .icon { width: 11px; height: 11px; color: var(--c-navy); }

.syncbox { display: grid; gap: 9px; padding: 11px 12px; background: #E9FAF0; border: 1.5px solid #7FCEA1; }
.syncbox.is-warn { background: #FFF7E8; border-color: #F0C16B; }
.syncbox__row { display: flex; align-items: center; gap: 12px; }
.syncbox__row div { flex: 1; display: grid; line-height: 1.3; min-width: 0; }
.syncbox__row strong { font-size: 12.5px; font-weight: 700; color: var(--c-navy); }
.syncbox__row small { font-size: 9.5px; color: var(--c-ink-2); }
.syncbox__badge { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; flex: none; background: #16A34A; color: #fff; }
.syncbox__badge .icon { width: 12px; height: 12px; }
.syncbox.is-warn .syncbox__badge:not(.syncbox__badge--db) { background: #E09A1A; }
.syncbox__badge--db { background: none; color: #16A34A; }
.syncbox__badge--db .icon { width: 20px; height: 22px; }
.syncbox__cloud { width: 26px; height: 22px; color: #0157FC; }

.events { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.events li { display: flex; align-items: center; gap: 12px; }
.events__date { width: 28px; flex: none; text-align: center; border-radius: 5px; background: #F0EBFF; padding: 1px 0 2px; line-height: 1.05; }
.events__date span { display: block; font-size: 8.5px; font-weight: 500; color: #6A1FD0; }
.events__date strong { display: block; font-size: 15px; color: #52019B; }
.events p { font-size: 11.5px; font-weight: 500; color: var(--c-navy); line-height: 1.25; }
.events small { font-size: 10.5px; color: var(--c-ink-2); }
.dash__side .card { padding: 10px 12px; }
.dash__side .card__head { margin-bottom: 8px; }
.dash__side .card__head h3 { font-size: 12.5px; gap: 8px; }
.dash__side .card__icon { width: 15px; height: 15px; }
.dash__side .card__link { font-size: 10px; gap: 4px; }

/* Module placeholder and error page */
.placeholder { max-width: 620px; text-align: center; margin: 30px auto; padding: 48px 32px; display: grid; justify-items: center; gap: 12px; }
.placeholder__icon { width: 72px; height: 72px; border-radius: 20px; display: grid; place-items: center; background: #EFE6FF; color: #7A1FE0; }
.placeholder__icon .icon { width: 32px; height: 32px; }
.placeholder h2 { font-size: 22px; font-weight: 700; color: var(--c-navy); }
.placeholder p { color: var(--c-ink-2); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 18px; border-radius: 9px; border: 1px solid transparent; font-weight: 500; cursor: pointer; }
.btn--primary { background: linear-gradient(90deg, #40009C, #7835D3); color: #fff; }
.btn--ghost { background: #fff; border-color: var(--c-line); color: var(--c-navy); }
.btn--ghost:hover { border-color: #7B2FF7; }
.page > .card.placeholder { margin-top: 24px; }
.error-page { min-height: 100vh; display: grid; place-content: center; justify-items: center; text-align: center; gap: 12px; padding: 24px; }
.error-page__mark { width: 64px; }
.error-page__code { font-size: 72px; font-weight: 700; line-height: 1; background: linear-gradient(135deg, #01164B, #52019B); -webkit-background-clip: text; background-clip: text; color: transparent; }
.error-page h1 { font-size: 22px; color: var(--c-navy); }
.error-page p { color: var(--c-ink-2); max-width: 420px; margin-bottom: 8px; }

/* =============================== Responsive =============================== */
@media (min-width: 1500px) {
    body { font-size: 14px; }
    .dash { grid-template-columns: minmax(0, 1fr) 290px; }
}
@media (max-width: 1180px) {
    .dash { grid-template-columns: minmax(0, 1fr); }
    .dash__side { grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; }
    .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .login__photo { width: 100%; }
    .login__wave, .login__hex, .login__slogan { display: none; }
    .login__card-wrap { left: 0; right: 0; padding: 90px 20px 120px; }
    .login__card { background: rgba(255, 255, 255, .97); }
}
@media (max-width: 960px) {
    .dash__row--a, .dash__row--b { grid-template-columns: minmax(0, 1fr); }
    .hero__image { width: 46%; }
}
@media (max-width: 900px) {
    .shell { grid-template-columns: minmax(0, 1fr); }
    .topbar { padding-right: 12px; gap: 8px; }
    .topbar__brand { width: auto; border: 0; padding: 0 6px; order: 2; }
    .topbar__brand img { width: 170px; }
    .topbar__menu { display: inline-grid; order: 1; margin-left: 12px; }
    .topbar__actions { order: 3; gap: 8px; }
    .search, .usermenu__who, .topbar__divider, .usermenu__btn > .icon { display: none; }
    .sidebar { position: fixed; z-index: 40; left: 0; top: var(--top-h); width: 230px; transform: translateX(-100%); transition: transform .2s; }
    .shell.is-open .sidebar { transform: none; }
    .shell.is-open .shell__overlay { display: block; position: fixed; inset: var(--top-h) 0 0 0; z-index: 35; background: rgba(1, 22, 75, .4); }
    .page { padding: 0 12px 20px; }
    .hero { margin: 0 -12px; }
    .dash__side { grid-template-columns: minmax(0, 1fr); }
    .login__features, .login__brand { display: none; }
    .login__band-inner { justify-content: center; }
}
@media (max-width: 600px) {
    .hero { height: auto; padding: 18px 0; }
    .hero__image { display: none; }
    .hero__text h2 { font-size: 19px; }
    .kpis { grid-template-columns: minmax(0, 1fr); }
    .perf { grid-template-columns: minmax(0, 1fr); }
    .perf__donut { border-right: 0; justify-content: center; padding: 0 0 10px; }
    .perf__chart { padding-left: 0; }
    .qa { grid-template-columns: repeat(2, 1fr); }
    .eco { grid-template-columns: repeat(2, 1fr); }
    .card__head { flex-wrap: wrap; }
    .login__card { padding: 26px 20px 18px; }
    .login__meta { font-size: 11px; gap: 8px; }
    .login__meta b { margin: 0 6px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* ---- Pass 2: matched against the mockup at 1280 × 720 ---- */
.hero__panel { width: 205px; }
.hero__image { width: 56%; }
.hero__image::before { background: linear-gradient(90deg, #EEF1FD 0%, rgba(238, 241, 253, .7) 7%, rgba(238, 241, 253, 0) 18%); }
.status-box { gap: 10px; padding: 12px 10px 12px 12px; }
.status-box strong, .status-box small { white-space: nowrap; }
.school__body h3 { font-size: 13.5px; letter-spacing: -.2px; white-space: nowrap; }
.school__motto { font-size: 11px; white-space: nowrap; }
.school__facts { padding-left: 4px; }
.perf { min-height: 158px; }
.card__head { margin-bottom: 8px; }
.eco { grid-auto-rows: 62px; }
.qa { grid-auto-rows: 76px; }
.hero__image { width: 420px; right: 178px; }
.hero__image img { object-position: center; }
.hero__image::before { background: linear-gradient(90deg, #EEF1FD 0%, rgba(238, 241, 253, .55) 10%, rgba(238, 241, 253, 0) 22%); }
.nav__link { height: 30.3px; }
.kpis { margin-top: -8px; }
.perf { min-height: 148px; }
.school__img { height: 87px; object-position: center; }
.events p { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.events li > div:last-child { min-width: 0; }
.syncbox { padding: 9px 12px; gap: 7px; }
.dash__side { gap: 7px; }
.perf { min-height: 140px; }
.events { grid-template-columns: minmax(0, 1fr); }
.events li { min-width: 0; }
.school__body { padding: 6px 14px 9px; }
.school__facts { margin-top: 7px; }
.dash { margin-top: -2px; }
.events { gap: 4px; } .dash__side .card__head { margin-bottom: 6px; }
@media (max-width: 600px) {
    .hero__panel, .hero__slogan, .hero__swoosh { display: none; }
    .hero__text { padding-left: 34px; padding-right: 12px; }
    .hero__text::before { left: 16px; top: 18px; bottom: 18px; }
}

/* ---- Login card: kept fully inside the white area — right of the curve, above the bottom band ---- */
.login__card-wrap { top: 4vh; left: 67.5%; right: 3%; bottom: calc(max(16%, 104px) + 2.5vh); padding: 0; align-items: center; }
.login__card { max-width: 430px; padding: clamp(22px, 4.2vh, 36px) clamp(22px, 2.6vw, 36px) clamp(16px, 2.8vh, 24px); }
.login__logo { margin-bottom: clamp(14px, 3vh, 24px); }
.login__powered { margin-top: clamp(14px, 2.6vh, 22px); }
@media (max-width: 1180px) {
    .login__card-wrap { left: 0; right: 0; top: 0; padding: 70px 20px 0; bottom: calc(max(16%, 104px) + 16px); }
}
.login__hex { width: auto; height: min(10vh, 84px); aspect-ratio: 200 / 140; }
.login__card-wrap { top: calc(min(10vh, 84px) + 10px); }
@media (max-height: 700px) {
    .login__logo { width: 80%; margin-bottom: 10px; }
    .login__title { font-size: 25px; }
    .login__rule { margin: 8px auto 12px; }
    .lform { gap: 11px; }
    .lfield, .lbtn { height: 44px; }
}

/* ---- Larger login card (mockup size ≈ 465 × 570 at 1280 × 720) ---- */
.login__photo { width: 58%; }
.login__card-wrap { left: 60%; right: 2.8%; }
.login__card { max-width: 500px; padding: clamp(26px, 4.8vh, 44px) clamp(26px, 3.2vw, 46px) clamp(18px, 3vh, 28px); }
.login__logo { width: 94%; margin-bottom: clamp(16px, 3.2vh, 28px); }
.login__title { font-size: clamp(26px, 4.2vh, 32px); }
.login__lead { font-size: 15.5px; }
.lform { gap: clamp(12px, 2vh, 16px); }
.lfield { height: clamp(46px, 7vh, 54px); }
.lbtn { height: clamp(46px, 7vh, 54px); font-size: 19px; }
@media (max-height: 700px) {
    .login__logo { width: 84%; margin-bottom: 12px; }
}
@media (max-width: 1180px) {
    .login__photo { width: 100%; }
    .login__card-wrap { left: 0; right: 0; }
}
.login__card { max-width: clamp(470px, 30vw, 590px); }
@media (min-width: 1700px) and (min-height: 950px) {
    .login__title { font-size: 36px; }
    .login__lead, .lfield input, .lform__row, .lform__link { font-size: 17px; }
    .lfield, .lbtn { height: 60px; }
    .lbtn { font-size: 21px; }
    .login__powered { font-size: 15.5px; }
}

/* =====================================================================
   LOGIN — exact replica of the approved mockup (1280 × 720 reference).
   --u is one mockup pixel, scaled to the screen, so every part keeps
   the mockup's size and position. (Microsoft sign-in intentionally removed.)
   ===================================================================== */
.login { --u: min(calc(100vw / 1280), calc(100vh / 720)); }
.login__photo { width: 64%; }
.login__hex { width: calc(200 * var(--u)); height: calc(140 * var(--u)); aspect-ratio: auto; }
.login__brand { top: 3.1%; left: 4.7%; width: calc(412 * var(--u)); max-width: none; }
.login__slogan { left: 3.6%; bottom: auto; top: 64%; font-size: calc(36 * var(--u)); line-height: 1.02; }
.login__slogan .is-accent { font-size: calc(44 * var(--u)); margin-top: calc(4 * var(--u)); }
.login__swoosh { width: calc(196 * var(--u)); height: calc(5 * var(--u)); margin: calc(14 * var(--u)) 0 0 calc(44 * var(--u)); }

.login__card-wrap { display: block; top: 10.4%; left: 59%; right: auto; bottom: auto; width: calc(465 * var(--u)); padding: 0; }
.login__card {
    width: 100%; max-width: none; border-radius: calc(22 * var(--u));
    padding: calc(40 * var(--u)) calc(42 * var(--u)) calc(24 * var(--u));
    box-shadow: 0 calc(18 * var(--u)) calc(50 * var(--u)) rgba(1, 22, 75, .16), 0 2px 6px rgba(1, 22, 75, .05);
}
.login__logo { width: calc(370 * var(--u)); margin: 0 auto calc(26 * var(--u)); }
.login__title { font-size: calc(29 * var(--u)); }
.login__lead { font-size: calc(15 * var(--u)); margin-top: calc(2 * var(--u)); }
.login__rule { width: calc(166 * var(--u)); height: calc(3 * var(--u)); margin: calc(9 * var(--u)) auto calc(15 * var(--u)); }
.lform { gap: calc(14 * var(--u)); }
.lfield { height: calc(48 * var(--u)); padding: 0 calc(16 * var(--u)) 0 calc(20 * var(--u)); gap: calc(16 * var(--u)); border-radius: calc(11 * var(--u)); }
.lfield > .icon { width: calc(21 * var(--u)); height: calc(22 * var(--u)); }
.lfield input { font-size: calc(16 * var(--u)); }
.lfield__toggle .icon { width: calc(23 * var(--u)); height: calc(21 * var(--u)); }
.lform__row { font-size: calc(15 * var(--u)); margin: calc(8 * var(--u)) 0 calc(6 * var(--u)); }
.lcheck { gap: calc(16 * var(--u)); }
.lcheck input { width: calc(22 * var(--u)); height: calc(22 * var(--u)); }
.lform__link { font-size: calc(15 * var(--u)); }
.lbtn { height: calc(49 * var(--u)); font-size: calc(19 * var(--u)); border-radius: calc(11 * var(--u)); gap: calc(16 * var(--u)); }
.lbtn .icon { width: calc(24 * var(--u)); height: calc(24 * var(--u)); }
.login__powered { font-size: calc(14 * var(--u)); margin-top: calc(26 * var(--u)); }
.login .alert { font-size: calc(13 * var(--u)); padding: calc(9 * var(--u)) calc(12 * var(--u)); margin-bottom: calc(10 * var(--u)); }

.login__band { height: calc(115 * var(--u)); min-height: 0; }
.login__features { margin: 0 0 calc(30 * var(--u)); }
.login__features li { font-size: calc(13.5 * var(--u)); gap: calc(14 * var(--u)); padding: calc(2 * var(--u)) calc(30 * var(--u)); }
.login__features li:first-child { padding-left: 0; }
.login__features .icon { width: calc(44 * var(--u)); height: calc(34 * var(--u)); }
.login__meta { font-size: calc(13.5 * var(--u)); gap: calc(12 * var(--u)); margin-bottom: calc(20 * var(--u)); }
.login__meta .icon { width: calc(20 * var(--u)); height: calc(20 * var(--u)); }
.login__meta b { height: calc(24 * var(--u)); margin: 0 calc(16 * var(--u)) 0 calc(22 * var(--u)); }

/* Phones and narrow tablets: photo full width, card centred above the band. */
@media (max-width: 1000px) {
    .login { --u: 1px; }
    .login__photo { width: 100%; }
    .login__wave, .login__hex, .login__slogan, .login__brand, .login__features { display: none; }
    .login__card-wrap { left: 50%; top: 50%; transform: translate(-50%, -56%); width: min(465px, calc(100vw - 32px)); }
    .login__card { background: rgba(255, 255, 255, .97); padding: 30px 24px 20px; }
    .login__logo { width: 100%; }
    .login__band { height: 96px; }
    .login__band-inner { justify-content: center; }
}
/* Taller card (about +34 mockup px), still above the bottom band's wave */
.login__card-wrap { top: 9.7%; }
.login__card { padding: calc(48 * var(--u)) calc(42 * var(--u)) calc(30 * var(--u)); }
.login__logo { margin-bottom: calc(30 * var(--u)); }
.login__rule { margin: calc(11 * var(--u)) auto calc(19 * var(--u)); }
.lform { gap: calc(16 * var(--u)); }
.lform__row { margin: calc(9 * var(--u)) 0 calc(8 * var(--u)); }
.login__powered { margin-top: calc(28 * var(--u)); }
@media (max-width: 1000px) {
    .login__card-wrap { top: 50%; }
    .login__card { padding: 34px 24px 24px; }
}
/* Account: change password */
.account { max-width: 520px; margin-top: 16px; }
.aform { display: grid; gap: 14px; }
.afield { display: grid; gap: 5px; font-size: 12.5px; font-weight: 500; color: var(--c-navy); }
.afield input { height: 42px; padding: 0 12px; border: 1.5px solid #CBC6EC; border-radius: 9px; font-size: 14px; }
.afield input:focus { outline: none; border-color: #7B2FF7; box-shadow: var(--focus); }
.afield.has-error input { border-color: var(--c-red); }
.afield .field__error { margin: 0; font-weight: 400; }
.aform .btn { justify-self: start; }

/* Installer */
.install { background: linear-gradient(135deg, #F7F8FF 0%, #E9EEFF 100%); }
.install__wrap { max-width: 720px; margin: 0 auto; padding: 36px 20px 30px; }
.install__logo { width: 330px; margin: 0 auto 22px; }
.install__card { padding: 28px 32px; }
.install__title { font-size: 24px; font-weight: 700; color: var(--c-navy); }
.install__lead { color: var(--c-ink-2); margin: 4px 0 18px; }
.install__form fieldset { border: 1px solid var(--c-line); border-radius: 12px; padding: 14px 16px 16px; margin: 0; display: grid; gap: 12px; }
.install__form legend { display: inline-flex; align-items: center; gap: 6px; padding: 0 6px; font-weight: 700; font-size: 13px; color: var(--c-purple); }
.install__row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.afield em { font-style: normal; font-weight: 400; color: var(--c-muted); }
.afield__help { font-weight: 400; color: var(--c-muted); font-size: 11.5px; }
.install__btn { height: 46px; font-size: 15px; justify-self: stretch !important; }
.install__btn:disabled { opacity: .5; cursor: not-allowed; }
.install__foot { text-align: center; margin-top: 18px; font-size: 12.5px; color: var(--c-navy); }
.install__foot strong { color: var(--c-purple); font-weight: 500; }
@media (max-width: 600px) { .install__row { grid-template-columns: 1fr; } .install__card { padding: 22px 18px; } .install__logo { width: 250px; } }
/* System updates */
.sys { display: grid; gap: 14px; max-width: 860px; }
.sys .muted { margin-bottom: 12px; }
.sys__list { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 6px; font-size: 12.5px; color: var(--c-navy); }
.sys__list li { display: flex; align-items: center; gap: 8px; }
.sys__list .icon { color: var(--c-violet); }
.sys__history summary { cursor: pointer; font-size: 12.5px; color: var(--c-blue); margin-top: 6px; }
.sys__history .sys__list { margin-top: 10px; }
.sys__table { width: 100%; border-collapse: collapse; font-size: 12.5px; margin-bottom: 10px; }
.sys__table th { text-align: left; font-weight: 500; color: var(--c-muted); border-bottom: 1px solid var(--c-line); padding: 6px 8px; }
.sys__table td { padding: 8px; border-bottom: 1px solid var(--c-line); color: var(--c-navy); }
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 20px; font-size: 11.5px; font-weight: 500; white-space: nowrap; }
.pill--ok { background: #E7F7EE; color: #12804A; }
.pill--warn { background: #FFF3DD; color: #9A6200; }
.update-banner { display: flex; align-items: center; gap: 10px; padding: 10px 14px; margin-top: 12px; border-radius: 10px; background: #FFF6E5; border: 1px solid #F3D49B; color: #7A4F00; font-size: 12.5px; }
.update-banner a { margin-left: auto; font-weight: 500; color: var(--c-purple); }

.kpis--1 { grid-template-columns: minmax(0, 1fr); } .kpis--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .kpis--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.syncbox:has(.syncbox__row) .syncbox__badge--db { color: #16A34A; }
.afield { align-content: start; }

/* ---- Login: never magnified beyond the mockup size; card always clear of the bottom band ---- */
.login { --u: min(calc(100vw / 1280), calc(100vh / 720), 1.05px); }
.login__card-wrap {
    display: flex; align-items: center; justify-content: center;
    top: calc(min(10vh, 84px) + 8px); bottom: calc(115 * var(--u) + 14px);
    left: 59%; right: 2.8%; width: auto;
}
.login__card { width: calc(465 * var(--u)); flex: none; }
/* When a message is shown (e.g. "installed", "signed out", an error), tighten the card so it still fits. */
.login__card:has(.alert) { padding-top: calc(30 * var(--u)); padding-bottom: calc(22 * var(--u)); }
.login__card:has(.alert) .login__logo { margin-bottom: calc(16 * var(--u)); }
.login__card:has(.alert) .login__rule { margin: calc(8 * var(--u)) auto calc(12 * var(--u)); }
.login__card:has(.alert) .lform { gap: calc(12 * var(--u)); }
.login__card:has(.alert) .login__powered { margin-top: calc(18 * var(--u)); }
.login .alert { font-size: calc(12.5 * var(--u)); padding: calc(7 * var(--u)) calc(11 * var(--u)); margin-bottom: calc(10 * var(--u)); line-height: 1.35; }
@media (max-width: 1000px) {
    .login__card-wrap { left: 50%; right: auto; top: 50%; bottom: auto; transform: translate(-50%, -56%); display: block; width: min(465px, calc(100vw - 32px)); }
    .login__card { width: 100%; }
}
/* Card a little larger than the rest of the page (up to 1.16×), background stays at up to 1.05× */
.login__card-wrap {
    --u: min(calc(100vw / 1280), calc(100vh / 720), 1.16px);
    bottom: calc(min(calc(100vw / 1280), calc(100vh / 720), 1.05px) * 115 + 14px);
}

/* ---- App screens scale with the screen like the mockup (zoom set by app.js as --z) ---- */
.shell { min-height: calc(100vh / var(--z, 1)); }
.sidebar { height: calc(100vh / var(--z, 1) - var(--top-h)); }

/* =====================================================================
   Shared module components: page header, toolbar, tables, forms, tabs
   ===================================================================== */
.phead { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; flex-wrap: wrap; }
.phead h2 { font-size: 19px; font-weight: 700; color: var(--c-navy); display: flex; align-items: center; gap: 10px; }
.phead h2 .icon { width: 19px; height: 19px; color: var(--c-blue); }
.phead p { font-size: 12.5px; color: var(--c-ink-2); margin-top: 2px; }
.phead__actions { display: flex; gap: 8px; flex-wrap: wrap; }
.crumbs { font-size: 11.5px; color: var(--c-muted); margin-top: 12px; }
.crumbs a { color: var(--c-blue); }
.btn--sm { height: 32px; padding: 0 12px; font-size: 12.5px; border-radius: 8px; }
.btn .icon { width: 14px; height: 14px; }
.btn--danger { background: #fff; border-color: #F3C3C8; color: var(--c-red); }
.btn--danger:hover { background: #FDECEE; }
.btn--link { background: none; border: 0; color: var(--c-blue); padding: 0; height: auto; font-weight: 500; cursor: pointer; font-size: 12.5px; }

.toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.toolbar input[type=search], .toolbar select, .toolbar input[type=date] { height: 34px; padding: 0 12px; border: 1px solid #DCE1EF; border-radius: 8px; background: #fff; font-size: 12.5px; color: var(--c-navy); }
.toolbar input[type=search] { min-width: 240px; flex: 1; max-width: 360px; }
.toolbar input:focus, .toolbar select:focus { outline: none; border-color: #7B2FF7; box-shadow: var(--focus); }
.toolbar__spacer { flex: 1; }

.table-wrap { overflow-x: auto; border: 1px solid var(--c-line); border-radius: 10px; }
.table { width: 100%; border-collapse: collapse; font-size: 12.5px; background: #fff; }
.table th { text-align: left; font-weight: 500; font-size: 11.5px; color: var(--c-muted); background: #F8F9FE; padding: 9px 12px; border-bottom: 1px solid var(--c-line); white-space: nowrap; }
.table td { padding: 9px 12px; border-bottom: 1px solid var(--c-line); color: var(--c-navy); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: #FAFBFF; }
.table a.rowlink { color: var(--c-navy); font-weight: 500; }
.table a.rowlink:hover { color: var(--c-blue); text-decoration: underline; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table .actions { text-align: right; white-space: nowrap; }
.table .muted { color: var(--c-muted); }
.table input[type=number], .table input[type=text], .table select { height: 30px; padding: 0 8px; border: 1px solid #DCE1EF; border-radius: 6px; font-size: 12.5px; width: 100%; }
.who { display: flex; align-items: center; gap: 10px; }
.who .avatar { width: 30px; height: 30px; font-size: 11px; flex: none; }
.who small { display: block; color: var(--c-muted); font-size: 11px; }

.badge { display: inline-flex; align-items: center; padding: 2px 9px; border-radius: 20px; font-size: 11px; font-weight: 500; white-space: nowrap; }
.badge--green { background: #E7F7EE; color: #12804A; }
.badge--blue { background: #E8EEFF; color: #1A4FD6; }
.badge--purple { background: #F1E8FE; color: #6A1FD0; }
.badge--amber { background: #FFF3DD; color: #9A6200; }
.badge--red { background: #FDECEE; color: #B42334; }
.badge--grey { background: #EEF0F6; color: #5B6280; }

.pager { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; font-size: 12px; color: var(--c-ink-2); }
.pager__links { display: flex; gap: 4px; }
.pager__links a, .pager__links span { min-width: 30px; height: 30px; padding: 0 8px; display: inline-grid; place-items: center; border-radius: 7px; border: 1px solid var(--c-line); background: #fff; color: var(--c-navy); }
.pager__links a:hover { border-color: #7B2FF7; }
.pager__links .is-current { background: var(--c-blue); border-color: var(--c-blue); color: #fff; }
.pager__links .is-disabled { opacity: .45; }

.fgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 14px; }
.fgrid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.fgrid .span-2 { grid-column: span 2; }
.fgrid .span-all { grid-column: 1 / -1; }
.ffield { display: grid; gap: 5px; align-content: start; font-size: 12px; font-weight: 500; color: var(--c-navy); }
.ffield b { color: var(--c-red); font-weight: 500; }
.ffield input, .ffield select, .ffield textarea { width: 100%; min-height: 38px; padding: 8px 11px; border: 1.5px solid #D5D9EC; border-radius: 8px; background: #fff; font-size: 13px; font-weight: 400; color: var(--c-navy); }
.ffield textarea { resize: vertical; }
.ffield input:focus, .ffield select:focus, .ffield textarea:focus { outline: none; border-color: #7B2FF7; box-shadow: var(--focus); }
.ffield.has-error input, .ffield.has-error select, .ffield.has-error textarea { border-color: var(--c-red); }
.ffield .field__error { margin: 0; font-weight: 400; }
.ffield__help { font-weight: 400; color: var(--c-muted); font-size: 11px; }
.fcheck { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--c-navy); }
.fcheck input { width: 16px; height: 16px; accent-color: var(--c-purple); }
.factions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--c-line); }
.fsection { font-size: 12.5px; font-weight: 700; color: var(--c-purple); margin: 18px 0 10px; display: flex; align-items: center; gap: 8px; }
.fsection::after { content: ""; flex: 1; height: 1px; background: var(--c-line); }

.subnav { display: flex; gap: 4px; flex-wrap: wrap; border-bottom: 1px solid var(--c-line); margin: 12px 0 14px; }
.subnav a { padding: 9px 14px; font-size: 12.5px; font-weight: 500; color: var(--c-ink-2); border-bottom: 2px solid transparent; margin-bottom: -1px; display: inline-flex; gap: 7px; align-items: center; }
.subnav a .icon { width: 13px; height: 13px; }
.subnav a:hover { color: var(--c-navy); }
.subnav a.is-active { color: var(--c-blue); border-bottom-color: var(--c-blue); }

.split { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 14px; align-items: start; }
.split--wide { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.stack { display: grid; gap: 14px; }
.kv { display: grid; grid-template-columns: 130px 1fr; gap: 7px 12px; font-size: 12.5px; }
.kv dt { color: var(--c-muted); }
.kv dd { margin: 0; color: var(--c-navy); font-weight: 500; }
.profile-head { display: flex; align-items: center; gap: 16px; }
.profile-head .avatar { width: 58px; height: 58px; font-size: 19px; }
.profile-head h2 { font-size: 19px; font-weight: 700; color: var(--c-navy); }
.profile-head p { font-size: 12.5px; color: var(--c-ink-2); }
.minis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.mini { background: #fff; border: 1px solid var(--c-line); border-radius: 10px; padding: 12px 14px; box-shadow: var(--shadow); }
.mini span { display: block; font-size: 11.5px; color: var(--c-muted); }
.mini strong { font-size: 20px; font-weight: 700; color: var(--c-navy); }
.inline-form { display: inline; }
.onetime { background: #FFF8E6; border: 1px dashed #E0A626; border-radius: 10px; padding: 12px 14px; font-size: 13px; color: #6B4600; }
.onetime code { font-size: 15px; font-weight: 700; letter-spacing: .5px; background: #fff; padding: 2px 8px; border-radius: 6px; user-select: all; }
@media (max-width: 960px) {
    .split, .split--wide { grid-template-columns: minmax(0, 1fr); }
    .fgrid, .fgrid--3 { grid-template-columns: minmax(0, 1fr); }
    .fgrid .span-2 { grid-column: auto; }
}
@media print {
    .sidebar, .topbar, .update-banner, .phead__actions, .noprint, .subnav, .toolbar, .pager { display: none !important; }
    .shell { display: block; }
    .page { padding: 0; }
    body { background: #fff; zoom: 1 !important; }
    .card { box-shadow: none; border-color: #ccc; }
}
.table input[type=date] { height: 30px; padding: 0 8px; border: 1px solid #DCE1EF; border-radius: 6px; font-size: 12.5px; width: 100%; }
.tform { display: grid; grid-template-columns: 1.1fr 1fr 1fr auto; gap: 8px; align-items: center; }
/* Utilities (inline style attributes are blocked by the Content Security Policy) */
.mt-10 { margin-top: 10px; } .mt-12 { margin-top: 12px; } .mb-8 { margin-bottom: 8px !important; } .mb-12 { margin-bottom: 12px; } .m-0 { margin: 0 !important; }
.gap-10 { gap: 10px !important; } .maxw-720 { max-width: 720px; } .maxw-860 { max-width: 860px; }
.factions--start { justify-content: flex-start; }
.fcheck--box { align-items: flex-start; padding: 9px 11px; border: 1px solid var(--c-line); border-radius: 9px; }
.split--half { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.w-pct { display: block; height: 100%; border-radius: 8px; background: linear-gradient(90deg, var(--c-navy), var(--c-purple)); }
/* Attendance */
.att { display: inline-flex; border: 1px solid #DCE1EF; border-radius: 8px; overflow: hidden; }
.att__opt { position: relative; cursor: pointer; }
.att__opt input { position: absolute; opacity: 0; pointer-events: none; }
.att__opt span { display: block; padding: 5px 11px; font-size: 12px; font-weight: 500; color: var(--c-ink-2); border-left: 1px solid #DCE1EF; background: #fff; transition: background .12s, color .12s; }
.att__opt:first-child span { border-left: 0; }
.att__opt input:focus-visible + span { box-shadow: inset 0 0 0 2px #7B2FF7; }
.att__opt--present input:checked + span { background: #16A34A; color: #fff; }
.att__opt--late input:checked + span { background: #E09A1A; color: #fff; }
.att__opt--absent input:checked + span { background: #E5303F; color: #fff; }
.att__opt--excused input:checked + span { background: #0157FC; color: #fff; }
.att__opt input:disabled + span { cursor: not-allowed; opacity: .75; }
.att-count { font-size: 12px; color: var(--c-ink-2); font-weight: 500; }
.table--grid th.c, .table--grid td.c { text-align: center; padding: 6px 4px; min-width: 26px; font-size: 11.5px; }
.mk--present { color: #12804A; } .mk--late { color: #9A6200; font-weight: 700; } .mk--absent { color: #fff; background: #E5303F; font-weight: 700; } .mk--excused { color: #1A4FD6; } .mk--none { color: #C5CAD9; }
.table tr.is-flag td:first-child { box-shadow: inset 3px 0 0 #E5303F; }
/* Examinations */
.progress { height: 6px; background: var(--c-line); border-radius: 6px; overflow: hidden; margin-bottom: 3px; max-width: 160px; }
.marks__in { max-width: 90px; text-align: right; font-variant-numeric: tabular-nums; }
.marks__in.is-bad { border-color: var(--c-red) !important; background: #FDECEE; }
.marks__summary { margin-right: auto; align-self: center; font-size: 12px; }
.table--grid td.is-low { color: #B42334; font-weight: 700; }
.table tr.is-total td { background: #F8F9FE; }
/* Report card (A4) */
.rcard { position: relative; background: #fff; border: 1px solid var(--c-line); border-radius: 10px; padding: 26px 30px; margin: 14px auto 0; max-width: 820px; box-shadow: var(--shadow); color: #0E1530; }
.rcard.is-draft::before { content: "DRAFT"; position: absolute; top: 38%; left: 50%; transform: translate(-50%, -50%) rotate(-28deg); font-size: 120px; font-weight: 700; color: rgba(229, 48, 63, .07); pointer-events: none; }
.rcard__head { display: grid; grid-template-columns: 70px 1fr auto; gap: 16px; align-items: center; border-bottom: 3px solid var(--c-navy); padding-bottom: 12px; }
.rcard__logo { width: 64px; }
.rcard__school h1 { font-size: 20px; font-weight: 700; color: var(--c-navy); }
.rcard__school p { font-size: 11px; color: var(--c-ink-2); }
.rcard__motto { font-style: italic; color: var(--c-purple) !important; font-size: 12px !important; }
.rcard__title { text-align: right; display: grid; }
.rcard__title strong { font-size: 15px; letter-spacing: 1.5px; color: var(--c-navy); }
.rcard__title span { font-size: 12.5px; color: var(--c-purple); font-weight: 500; }
.rcard__draft { margin: 10px 0 0; padding: 6px 10px; background: #FDECEE; color: #B42334; font-size: 11.5px; font-weight: 500; border-radius: 6px; text-align: center; }
.rcard table { width: 100%; border-collapse: collapse; font-size: 12px; margin-top: 14px; }
.rcard__info th { text-align: left; font-weight: 500; color: var(--c-ink-2); width: 16%; padding: 5px 8px; background: #F6F7FC; border: 1px solid #E6E9F3; }
.rcard__info td { padding: 5px 8px; border: 1px solid #E6E9F3; }
.rcard__marks th, .rcard__marks td { border: 1px solid #DCE0EC; padding: 6px 8px; }
.rcard__marks thead th { background: var(--c-navy); color: #fff; font-weight: 500; font-size: 11px; }
.rcard__marks thead th small { color: #C8CEEA; font-weight: 400; }
.rcard__marks .c { text-align: center; }
.rcard__marks tfoot th, .rcard__marks tfoot td { background: #F6F7FC; }
.rcard__comments { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 14px; }
.rcard__comments h4 { font-size: 11.5px; color: var(--c-purple); font-weight: 700; margin-bottom: 4px; }
.rcard__comments p { min-height: 46px; font-size: 12px; border: 1px solid #E6E9F3; border-radius: 6px; padding: 7px 9px; }
.rcard__blank { display: block; border-bottom: 1px dotted #B9BED2; height: 30px; }
.rcard__foot { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-top: 20px; font-size: 12px; }
.rcard__sign { border-top: 1px solid #0E1530; padding-top: 4px; min-width: 220px; text-align: center; color: var(--c-ink-2); }
.rcard__edit { margin-top: 18px; border-top: 1px dashed var(--c-line); padding-top: 4px; }
@media print {
    .rcard { box-shadow: none; border: 0; border-radius: 0; margin: 0; max-width: none; padding: 0 4mm; page-break-after: always; break-after: page; }
    .rcard:last-of-type { page-break-after: auto; }
    .rcard__marks thead th { background: #01164B !important; color: #fff !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    @page { size: A4 portrait; margin: 12mm; }
}
/* Finance */
.amt-owe { color: #B42334; } .amt-credit { color: #12804A; }
.table tr.is-void td { color: var(--c-muted); text-decoration: line-through; }
.table tr.is-void td .badge, .table tr.is-void td a { text-decoration: none; }
.inline-details summary { list-style: none; cursor: pointer; }
.inline-details summary::-webkit-details-marker { display: none; }
.inline-details form input { height: 30px; padding: 0 8px; border: 1px solid #DCE1EF; border-radius: 6px; font-size: 12px; min-width: 200px; }
.daybars { display: flex; align-items: flex-end; gap: 6px; height: 140px; padding: 8px 2px 0; border-bottom: 1px solid var(--c-line); }
.daybars__col { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; }
.daybars__bar { width: 100%; max-width: 26px; min-height: 2px; border-radius: 4px 4px 0 0; background: linear-gradient(180deg, #7B2FF7, #0157FC); }
.daybars small { font-size: 10px; color: var(--c-muted); }
.rcard--receipt { max-width: 680px; }
.receipt__amount { display: flex; justify-content: space-between; align-items: center; margin-top: 14px; padding: 14px 18px; border-radius: 10px; background: #F1F4FF; border: 1px solid #D9E0F8; }
.receipt__amount span { font-size: 13px; color: var(--c-ink-2); }
.receipt__amount strong { font-size: 26px; color: var(--c-navy); }
.rcard.is-void-doc::before { content: "REVERSED"; font-size: 90px; }
/* Reports */
.rgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; margin-bottom: 8px; }
.rtile { display: flex; gap: 12px; align-items: flex-start; padding: 16px; background: #fff; border: 1px solid var(--c-line); border-radius: 12px; color: inherit; text-decoration: none; box-shadow: 0 1px 2px rgba(16,24,64,.04); transition: border-color .15s, box-shadow .15s, transform .15s; }
.rtile:hover, .rtile:focus-visible { border-color: #0157FC; box-shadow: 0 6px 18px rgba(1,87,252,.12); transform: translateY(-1px); }
.rtile__icon { flex: 0 0 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: #EEF2FF; color: #0157FC; }
.rtile strong { display: block; color: var(--c-navy); font-size: 14px; }
.rtile small { display: block; color: var(--c-muted); font-size: 12px; margin-top: 3px; line-height: 1.4; }
.rnote { margin: 0 0 8px; font-size: 12.5px; color: var(--c-ink-2); }
.table--report th, .table--report td { white-space: nowrap; }
.table--report tfoot th { background: #F6F8FD; font-weight: 700; color: var(--c-navy); }
@media print { .table--report { font-size: 10px; } .table--report th, .table--report td { padding: 3px 5px; } }
/* Portal */
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 14px; }
.pchild { display: flex; flex-direction: column; gap: 14px; padding: 18px; background: #fff; border: 1px solid var(--c-line); border-radius: 14px; color: inherit; text-decoration: none; box-shadow: 0 1px 2px rgba(16,24,64,.04); transition: border-color .15s, box-shadow .15s; }
.pchild:hover, .pchild:focus-visible { border-color: #0157FC; box-shadow: 0 6px 18px rgba(1,87,252,.12); }
.pchild__head { display: flex; align-items: center; gap: 12px; }
.pchild__head > div { flex: 1; }
.pchild__head strong { display: block; color: var(--c-navy); font-size: 16px; }
.pchild__head small { color: var(--c-muted); font-size: 12px; }
.pchild__stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); gap: 10px; }
.pchild__stats > div { background: #F6F8FD; border-radius: 10px; padding: 10px 12px; }
.pchild__stats span { display: block; font-size: 11px; color: var(--c-muted); }
.pchild__stats strong { display: block; font-size: 18px; color: var(--c-navy); margin-top: 2px; }
.pchild__stats small { font-size: 11px; color: var(--c-ink-2); }
.pchild__more { font-size: 12.5px; color: #0157FC; font-weight: 600; }
@media (max-width: 480px) { .pgrid { grid-template-columns: 1fr; } }
.search--off { visibility: hidden; }
.pchild__stats strong { font-size: 16px; white-space: nowrap; }
/* Search suggestions */
.search { position: relative; }
.search__panel { position: absolute; top: calc(100% + 6px); left: 0; width: min(480px, 92vw); max-height: 70vh; overflow-y: auto; background: #fff; border: 1px solid var(--c-line); border-radius: 12px; box-shadow: 0 18px 40px rgba(16,24,64,.16); padding: 6px; z-index: 60; }
.search__group { margin: 8px 10px 4px; font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #6A3BD8; }
.search__panel a { display: block; padding: 7px 10px; border-radius: 8px; color: inherit; text-decoration: none; }
.search__panel a:hover, .search__panel a.is-active { background: #EEF2FF; }
.search__panel a strong { display: block; font-size: 13px; color: var(--c-navy); }
.search__panel a small { display: block; font-size: 11.5px; color: var(--c-muted); }
.search__panel a.search__all { margin-top: 4px; border-top: 1px solid var(--c-line); border-radius: 0 0 8px 8px; text-align: center; font-size: 12.5px; font-weight: 600; color: #0157FC; }
.search__empty { margin: 10px; font-size: 13px; color: var(--c-muted); }
.slist { list-style: none; margin: 0 0 10px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; }
.slist a { display: block; padding: 10px 12px; border: 1px solid var(--c-line); border-radius: 10px; color: inherit; text-decoration: none; }
.slist a:hover, .slist a:focus-visible { border-color: #0157FC; background: #F6F8FF; }
.slist strong { display: block; color: var(--c-navy); font-size: 13.5px; }
.slist small { display: block; color: var(--c-muted); font-size: 12px; margin-top: 2px; }
/* Notifications */
.bellwrap { position: relative; }
.bellmenu { position: absolute; right: -8px; top: calc(100% + 10px); width: 360px; max-width: 92vw; background: #fff; border: 1px solid var(--c-line); border-radius: 12px; box-shadow: 0 18px 40px rgba(16,24,64,.16); z-index: 60; overflow: hidden; }
.bellmenu__head { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--c-line); }
.bellmenu__head strong { color: var(--c-navy); font-size: 14px; }
.bellmenu__item, .nlist__btn { display: flex; gap: 10px; width: 100%; padding: 10px 14px; border: 0; background: none; text-align: left; cursor: pointer; font: inherit; color: inherit; border-bottom: 1px solid #F0F2F8; }
.bellmenu__item:hover, .nlist__btn:hover { background: #F6F8FF; }
.bellmenu__item strong { display: block; font-size: 13px; color: var(--c-navy); }
.bellmenu__item small { display: block; font-size: 12px; color: var(--c-ink-2); margin-top: 1px; }
.bellmenu__item em { display: block; font-style: normal; font-size: 11px; color: var(--c-muted); margin-top: 2px; }
.nlist__dot { flex: 0 0 8px; height: 8px; margin-top: 6px; border-radius: 50%; background: transparent; }
.is-unread .nlist__dot { background: #0157FC; }
.bellmenu__item.is-unread strong, .nlist__item.is-unread strong { font-weight: 700; }
.bellmenu__empty { margin: 0; padding: 18px 14px; font-size: 13px; color: var(--c-muted); }
.bellmenu__all { display: block; padding: 10px; text-align: center; font-size: 12.5px; font-weight: 600; color: #0157FC; text-decoration: none; }
.nlist { list-style: none; margin: 0; padding: 0; }
.nlist__btn { align-items: flex-start; }
.nlist__text { flex: 1; }
.nlist__text strong { display: block; font-size: 13.5px; color: var(--c-navy); font-weight: 500; }
.nlist__text span { display: block; font-size: 12.5px; color: var(--c-ink-2); margin-top: 2px; }
.nlist__btn small { white-space: nowrap; font-size: 11.5px; color: var(--c-muted); }
@media (max-width: 760px) { .search__panel { position: fixed; left: 4vw; right: 4vw; top: 60px; width: auto; } }
/* Academics: timetable grid */
.meter { height: 6px; border-radius: 4px; background: #EEF1F8; overflow: hidden; max-width: 160px; }
.meter span { display: block; height: 100%; background: linear-gradient(90deg, #7B2FF7, #0157FC); border-radius: 4px; }
.tt { width: 100%; border-collapse: separate; border-spacing: 4px; table-layout: fixed; min-width: 900px; }
.tt th { font-size: 11.5px; font-weight: 600; color: var(--c-navy); text-align: center; padding: 4px 2px; }
.tt th small { display: block; font-weight: 400; color: var(--c-muted); font-size: 10.5px; }
.tt tbody th { text-align: left; width: 88px; font-size: 12.5px; }
.tt__corner { width: 88px; }
.tt td { height: 64px; border-radius: 8px; padding: 6px 7px; vertical-align: top; font-size: 11px; }
.tt td strong { display: block; font-size: 12.5px; color: var(--c-navy); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tt td small { display: block; color: var(--c-ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tt th.tt__break { width: 44px; color: var(--c-muted); }
.tt td.tt__break { background: repeating-linear-gradient(135deg, #F3F4F8, #F3F4F8 6px, #ECEEF4 6px, #ECEEF4 12px); width: 44px; }
.tt td.tt__free { background: #FAFBFD; border: 1px dashed #E3E7F1; }
.tt tr.is-today th { color: #0157FC; }
.tt--c0 { background: #E8EFFF; } .tt--c1 { background: #EFE7FF; } .tt--c2 { background: #E3F6EC; } .tt--c3 { background: #FFF1DD; }
.tt--c4 { background: #FDE7EC; } .tt--c5 { background: #E0F4F8; } .tt--c6 { background: #F1F3D9; } .tt--c7 { background: #EDEFF4; }
.tt--edit { min-width: 1150px; }
.tt--edit td { background: #FAFBFD; border: 1px solid #E8EBF3; height: auto; padding: 5px; }
.tt--edit td.is-set { background: #F1F5FF; border-color: #CFDBFB; }
.tt--edit select, .tt--edit input { display: block; width: 100%; height: 26px; margin-bottom: 3px; padding: 0 4px; font-size: 11px; border: 1px solid #DCE1EF; border-radius: 5px; background: #fff; }
/* Academics: month calendar */
.cal { display: grid; grid-template-columns: repeat(7, 1fr); border-top: 1px solid var(--c-line); border-left: 1px solid var(--c-line); }
.cal__dow { padding: 6px; font-size: 11px; font-weight: 600; text-transform: uppercase; color: var(--c-muted); border-right: 1px solid var(--c-line); border-bottom: 1px solid var(--c-line); background: #F7F8FC; }
.cal__day { min-height: 96px; padding: 4px 5px; border-right: 1px solid var(--c-line); border-bottom: 1px solid var(--c-line); display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cal__day.is-other { background: #FAFBFD; }
.cal__day.is-other .cal__num { color: #B8BED0; }
.cal__day.is-weekend { background: #FBFBFE; }
.cal__day.is-holiday { background: #FFF6F0; }
.cal__num { font-size: 12px; font-weight: 600; color: var(--c-navy); }
.cal__day.is-today .cal__num { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: #0157FC; color: #fff; }
.cal__item { display: block; font-size: 10.5px; line-height: 1.35; padding: 2px 5px; border-radius: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--c-navy); text-decoration: none; }
a.cal__item[href]:hover { filter: brightness(.95); }
.cal__item--all { background: #E3EBFF; } .cal__item--staff { background: #EDE6FF; } .cal__item--parents { background: #E2F5EA; }
.cal__item--holiday { background: #FFE2D2; color: #8A3A12; } .cal__item--term { background: #FFF2C9; color: #6B5300; }
.cal__legend { margin-top: 10px; font-size: 11.5px; display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; }
.cal__key { display: inline-block; width: 12px; height: 12px; border-radius: 3px; padding: 0; vertical-align: middle; }
@media (max-width: 760px) { .cal__day { min-height: 64px; } .cal__item { font-size: 9.5px; padding: 1px 3px; } }
@media print { .tt { min-width: 0; } .tt td { height: 48px; } .cal__day { min-height: 70px; } }
.mini small { display: block; margin-top: 2px; font-size: 11.5px; }
.page { min-width: 0; }
.page form, .page .card { min-width: 0; max-width: 100%; }
.avatar--lg { width: 64px; height: 64px; font-size: 22px; object-fit: cover; }
img.avatar { object-fit: cover; }
.table tr.is-changed td { background: #FFF8E6; }
.nowrap { white-space: nowrap; }
.wrap { white-space: normal; word-break: break-word; }
.stack > input[type=password] { height: 38px; padding: 0 12px; border: 1px solid #DCE1EF; border-radius: 8px; font-size: 13px; background: #fff; }
.stack > input[type=password]:focus { border-color: #8C6CF0; box-shadow: var(--focus); outline: none; }
.stack > input[type=file] { font-size: 12.5px; }
/* HR */
.lbal { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.lbal__item { background: #F6F8FD; border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; }
.lbal__name { font-size: 12px; color: var(--c-ink-2); }
.lbal__item strong { font-size: 18px; color: var(--c-navy); }
.lbal__item strong small { font-size: 11.5px; font-weight: 500; color: var(--c-muted); }
.lbal .meter { max-width: none; }
.subnav--pills { border-bottom: 0; gap: 6px; }
.subnav--pills a { border: 1px solid var(--c-line); border-radius: 999px; padding: 5px 12px; }
.subnav--pills a.is-active { background: #0157FC; border-color: #0157FC; color: #fff; }
.subnav--pills a small { opacity: .75; margin-left: 3px; }
.w-90 { width: 90px; }
/* Payroll */
.steps { margin: 0; padding-left: 18px; font-size: 12.5px; color: var(--c-ink-2); display: grid; gap: 6px; }
.pslip { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 12px; }
.pslip .rcard__marks { margin-top: 0; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
@media (max-width: 640px) { .pslip { grid-template-columns: 1fr; } }
/* Document title shown when the letterhead replaces the built-in header */
.rcard__doctitle { display: none; justify-content: space-between; align-items: baseline; gap: 12px; border-bottom: 2px solid var(--c-navy); padding-bottom: 6px; margin-bottom: 4px; }
.rcard__doctitle strong { font-size: 15px; letter-spacing: .08em; color: var(--c-navy); }
.rcard__doctitle span { font-size: 12.5px; color: #5B2BC9; font-weight: 600; }
.lh-print { display: none; }
.lhframe { width: 100%; border-collapse: collapse; }
.lhframe > thead td, .lhframe > tfoot td, .lhframe > tbody > tr > td { padding: 0; border: 0; }
.lhframe__top, .lhframe__bottom { height: 0; }
mark.ph { background: #FFF1C2; color: #6B5300; border-radius: 3px; padding: 0 3px; font-size: .92em; }
mark.ph--missing { background: #FDE2E5; color: #8F1D2A; }
@media print { mark.ph { background: none; color: inherit; border-bottom: 1px dotted #999; } }
.lhprev { position: relative; border: 1px solid var(--c-line); border-radius: 6px; overflow: hidden; background: #fff; aspect-ratio: 210 / 297; }
.lhprev img, .lhprev canvas { display: block; width: 100%; height: 100%; object-fit: fill; }
.lhprev .empty { padding-top: 40%; }
.lhprev__top, .lhprev__bottom { position: absolute; left: 0; right: 0; background: rgba(1, 87, 252, .12); border: 1px dashed rgba(1, 87, 252, .5); pointer-events: none; }
.lhprev__top { top: 0; border-top: 0; } .lhprev__bottom { bottom: 0; border-bottom: 0; }
/* Contracts */
.mw-640 { max-width: 640px; }
.ctredit { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; align-items: start; }
.ctredit__preview { position: sticky; top: 8px; max-height: calc(100vh / var(--z, 1) - 90px); overflow: auto; }
@media (max-width: 1100px) { .ctredit { grid-template-columns: 1fr; } .ctredit__preview { position: static; max-height: none; } }
.savebar { position: sticky; bottom: 0; background: linear-gradient(transparent, var(--c-bg, #F4F6FB) 30%); padding: 10px 0 4px; z-index: 2; }
.secs { display: grid; gap: 8px; }
.sec { border: 1px solid #E3E7F1; border-radius: 10px; padding: 8px 10px; background: #fff; }
.sec.is-off { background: #F7F8FB; }
.sec.is-off .sec__title, .sec.is-off .sec__body { color: #9AA1B5; }
.sec__head { display: flex; align-items: center; gap: 8px; }
.sec__toggle input { width: 16px; height: 16px; }
.sec__title { flex: 1; min-width: 0; border: 0; border-bottom: 1px dashed transparent; font-weight: 600; font-size: 13.5px; color: var(--c-navy); padding: 3px 2px; background: transparent; }
.sec__title:focus { border-bottom-color: #8C6CF0; outline: none; }
.sec__req { font-size: 11.5px; color: var(--c-muted); display: flex; gap: 4px; align-items: center; white-space: nowrap; }
.sec__tools { display: flex; gap: 6px; }
.sec__tools .btn--link { font-size: 14px; padding: 0 3px; }
.sec__del { color: var(--c-red) !important; }
.sec__body { width: 100%; margin-top: 6px; border: 1px solid #E8EBF3; border-radius: 7px; padding: 7px 9px; font: inherit; font-size: 12.5px; line-height: 1.5; resize: vertical; min-height: 64px; background: #FCFCFE; }
.sec__body:focus { border-color: #8C6CF0; outline: none; background: #fff; }
.phhelp summary { cursor: pointer; }
.phlist { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.phlist code { font-size: 11px; background: #F1F4FF; border-radius: 4px; padding: 2px 5px; }
.ctrpaper { background: #fff; border: 1px solid #E3E7F1; border-radius: 6px; padding: 26px 30px; box-shadow: inset 0 0 0 1px #fff; }
.ctr { font-family: Georgia, 'Times New Roman', serif; color: #111827; font-size: 13px; line-height: 1.6; }
.ctr__title { font-size: 20px; text-align: center; margin: 0; letter-spacing: .04em; text-transform: uppercase; color: #01164B; }
.ctr__meta { text-align: center; margin: 2px 0 14px; color: #555; font-size: 12px; }
.ctr__section { break-inside: avoid-page; }
.ctr__section h2 { font-size: 13.5px; margin: 14px 0 4px; color: #01164B; }
.ctr__section p { margin: 0 0 7px; }
.ctr__section ul, .ctr__section ol { margin: 0 0 7px; padding-left: 22px; }
.rcard--contract { max-width: 820px; }
.rcard--contract .rcard__doctitle { margin-bottom: 10px; }
@media print { .ctr { font-size: 11.5pt; } .ctr__section h2 { break-after: avoid; } .ctredit__preview { display: none; } }
@media print { .rcard--contract.is-draft::before { position: fixed; top: 50%; } }
.lh-top, .lh-bottom { display: none; }
/* Sidebar tags: modules not built yet / switched off for this school */
.nav__tag { margin-left: auto; font-size: 9.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; padding: 2px 6px; border-radius: 999px; background: rgba(255,255,255,.12); color: rgba(255,255,255,.75); }
.nav__link--off { opacity: .55; }
.nav__link--off:hover { opacity: .85; }
.nav__tag--off { background: rgba(255, 170, 0, .22); color: #FFD68A; }
/* Library */
.input-mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .02em; }
.bpick { position: relative; }
.bpick__list { position: absolute; top: 64px; left: 0; right: 0; z-index: 20; background: #fff; border: 1px solid var(--c-line); border-radius: 10px; box-shadow: 0 14px 30px rgba(16,24,64,.14); padding: 4px; max-height: 300px; overflow: auto; }
.bpick__list button { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 7px 9px; border-radius: 7px; cursor: pointer; font: inherit; }
.bpick__list button:hover, .bpick__list button:focus { background: #EEF2FF; }
.bpick__list strong { display: block; font-size: 13px; color: var(--c-navy); }
.bpick__list small { display: block; font-size: 11.5px; color: var(--c-muted); }
.bpick__list p { margin: 8px; font-size: 12.5px; color: var(--c-muted); }
.ffield input[type=search], .ffield input[type=text].input-mono { height: 38px; padding: 0 12px; border: 1px solid #DCE1EF; border-radius: 8px; font-size: 13px; }
/* Transport */
.rtile--route small { margin-top: 2px; }
.rtile--route.is-off { opacity: .6; }
.rtile__meter { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.rtile__meter .meter { flex: 1; max-width: 140px; }
.stops { margin: 0; padding-left: 20px; display: grid; gap: 6px; font-size: 13px; }
.stops small { display: block; color: var(--c-muted); font-size: 11.5px; }

/* ---------------------------------------------------------------- LMS */
.lpost__head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin-bottom: 8px; }
.lpost__title { font-size: 16px; font-weight: 700; color: var(--text, #0f172a); margin: 0; text-decoration: none; }
a.lpost__title:hover { color: var(--primary, #2563eb); }
.lpost__head small { margin-left: auto; }
.lpost--announcement { border-left: 4px solid #f59e0b; }
.lpost--material { border-left: 4px solid #3b82f6; }
.lpost--assignment { border-left: 4px solid #8b5cf6; }
.lpost__due { display: flex; align-items: center; gap: 6px; font-size: 13px; color: #475569; margin: 0 0 8px; }
.lpost__body { font-size: 14px; line-height: 1.6; overflow-wrap: anywhere; }
.lpost__body p { margin: 0 0 8px; }
.lpost__body ul { margin: 0 0 8px 18px; padding: 0; }
.lfiles { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 6px; }
.lfiles li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 7px 10px; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 8px; font-size: 13px; }
.lfiles li > a:first-child { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; overflow-wrap: anywhere; }
.lfiles .inline-form { margin-left: auto; }
.llist { list-style: none; margin: 0; padding: 0; }
.llist li { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 12px 4px; border-bottom: 1px solid #eef2f7; }
.llist li:last-child { border-bottom: 0; }
.llist li > a { text-decoration: none; color: inherit; display: flex; align-items: center; gap: 8px; }
.llist li > small { grid-column: 1; }
.llist li > span { grid-column: 2; grid-row: 1 / span 2; align-self: center; }
.lgrade { background: #f0fdf4; border: 1px solid #bbf7d0; border-radius: 10px; padding: 12px 14px; }
.lgrade > strong { font-size: 26px; color: #166534; display: block; margin-bottom: 4px; }
.lgrade > strong small { font-size: 15px; color: #4b5563; }
.lsub .card__head { flex-wrap: wrap; gap: 6px; }
[data-assignment-only][hidden] { display: none; }

/* ---------------------------------------------------------------- Settings: email & schedule */
.codebox { background: #0f172a; color: #e2e8f0; padding: 12px 14px; border-radius: 8px; font-size: 12.5px; white-space: pre-wrap; word-break: break-all; margin: 10px 0; user-select: all; }
ol.steps { margin: 0 0 6px 18px; padding: 0; line-height: 1.8; font-size: 14px; }
[data-smtp-only][hidden] { display: none; }
.mlog { list-style: none; margin: 8px 0 0; padding: 0; }
.mlog li { display: grid; gap: 2px; padding: 8px 0; border-bottom: 1px solid #eef2f7; font-size: 13px; overflow-wrap: anywhere; }
.mlog li:last-child { border-bottom: 0; }

/* ---------------------------------------------------------------- Operations */
[data-kind][hidden] { display: none; }
.lstock { font-size: 14px; margin: 0 0 12px; color: var(--c-ink-2, #475569); }
.lstock strong { font-size: 24px; color: var(--c-navy, #0f172a); }
