/* Student IS: additions on top of base.css (the asset-register dashboard look). Same tokens, same panels. */

/* ---------- sidebar: brand, grouped nav ---------- */
.side { height: auto; min-height: calc(100vh - 32px); align-self: start; }
.sbrand { display: flex; align-items: center; gap: 11px; padding: 2px 8px 18px; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.sbrand .crest { width: 42px; height: 42px; border-radius: 14px; background: var(--dark); color: var(--org); display: grid; place-items: center; flex: none; box-shadow: inset 0 -3px 0 var(--org); }
.sbrand .crest svg { width: 24px; height: 24px; }
.sbrand b { font: 700 18px/1 var(--num); letter-spacing: -.01em; display: block; }
.sbrand b span { color: var(--org); }
.sbrand small { display: block; margin-top: 4px; color: var(--org-d); font: 600 9px var(--ui); letter-spacing: .2em; text-transform: uppercase; }
.nav { gap: 2px; padding: 14px 0 18px; }
.nav a { padding: 10px 14px; padding-right: 30px; }
.nav a svg { width: 19px; height: 19px; }
.nav .ng { font-size: 10.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--mute); padding: 14px 14px 4px; opacity: .8; }
.nav .ng:first-of-type { padding-top: 2px; }
.nav em.badge { margin-left: auto; }
.side-foot b { color: var(--ink); font-weight: 600; display: block; }
.term-pill { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: var(--soft); font-size: 12.5px; font-weight: 600; color: var(--ink-2); white-space: nowrap; }
.term-pill i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); }
.me-role { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 10px 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.me-role small { flex: 0 0 100%; color: var(--mute); font-size: 11.5px; font-weight: 600; }
.me-role button { font-size: 12px; font-weight: 600; padding: 5px 9px; border-radius: 9px; background: var(--soft); color: var(--ink-2); }
.me-role button.on { background: var(--dark); color: #fff; }
body[data-theme="dark"] .me-role button.on { background: var(--org); color: #161b26; }

/* ---------- avatars ---------- */
.av { width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center; flex: none; font: 600 13px var(--num); color: #fff; letter-spacing: .02em; }
.av.s { width: 32px; height: 32px; border-radius: 10px; font-size: 11.5px; }
.av.l { width: 72px; height: 72px; border-radius: 22px; font-size: 24px; }
.av.xl { width: 96px; height: 96px; border-radius: 28px; font-size: 32px; }
.av.lt { color: var(--ink); }
.s-cell { display: flex; align-items: center; gap: 12px; min-width: 0; text-decoration: none; color: inherit; }
.s-cell > span { min-width: 0; }
.s-cell b { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.s-cell small { display: block; color: var(--mute); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- generic data table: <div class="dt" style="--cols: ..."> ---------- */
.dt { font-size: 13.5px; }
.dt .dh, .dt .dr { display: grid; grid-template-columns: var(--cols); gap: 12px; align-items: center; }
.dt .dh { color: var(--mute); font-size: 12px; font-weight: 500; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.dt .dr { padding: 10px; border-bottom: 1px solid var(--line); border-radius: 14px; transition: background .2s; color: inherit; text-decoration: none; min-height: 58px; }
.dt .dr:last-child { border-bottom: 0; }
.dt a.dr:hover, .dt .dr.click:hover { background: var(--soft); cursor: pointer; }
.dt .dr > * { min-width: 0; }
.dt .r, .dt .dh .r { text-align: right; justify-self: end; }
.dt .c { text-align: center; justify-self: center; }
.dt .n { font: 600 14px var(--num); white-space: nowrap; }
.dt .mono, .mono { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 12.5px; letter-spacing: .01em; }
.dt .sub { display: block; color: var(--mute); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dt .ell { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dt .dr.tot { font-weight: 700; background: var(--soft); border-bottom: 0; }
.dt .dr.picked { background: var(--org-s); }
.dt-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 10px 0; color: var(--mute); font-size: 12.5px; flex-wrap: wrap; }
.pg { display: flex; gap: 4px; }
.pg button { min-width: 34px; height: 34px; border-radius: 10px; background: var(--soft); font-weight: 600; font-size: 13px; color: var(--ink-2); }
.pg button.on { background: var(--dark); color: #fff; }
.pg button:disabled { opacity: .4; cursor: default; }
@media (max-width: 860px) {
  .dt .dh { display: none; }
  .dt .dr { grid-template-columns: var(--mcols, 1fr auto); padding: 10px 4px; border-radius: 0; row-gap: 4px; }
  .dt .hm { display: none !important; }
}

/* ---------- pills, tags ---------- */
.p-grey { background: var(--soft); color: var(--mute); }
.p-dark { background: var(--dark); color: #fff; }
.p-dark::before { background: var(--org); }
.pill.np::before { display: none; }
.tagx { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 600; padding: 3px 8px; border-radius: 7px; background: var(--soft); color: var(--ink-2); white-space: nowrap; }
.tagx svg { width: 13px; height: 13px; }
.tagx.o { background: var(--org-s); color: var(--org-d); }
.tagx.b { background: var(--blue-s); color: var(--blue); }
.tagx.g { background: var(--green-s); color: var(--green); }
.tagx.r { background: var(--red-s); color: var(--red); }
.erp { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.erp i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); }
.erp.pending i { background: var(--org); animation: livep 1.6s infinite; }
.erp.failed { color: var(--red); }
.erp.failed i { background: var(--red); }
.erp a { color: inherit; }

/* ---------- small layout helpers ---------- */
.g2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.g3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.g21 { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 16px; align-items: stretch; }
.g12 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.7fr); gap: 16px; align-items: stretch; }
.box { padding: 20px 22px 22px; }
.stack16 { display: grid; gap: 16px; align-content: start; }
.kpis.five { grid-template-columns: repeat(5, 1fr); }
.kpis.three { grid-template-columns: repeat(3, 1fr); }
.kpi .bar2 { height: 6px; border-radius: 3px; background: var(--soft); overflow: hidden; margin-top: 10px; }
.kpi .bar2 i { display: block; height: 100%; background: var(--org); border-radius: 3px; }
.kpi .delta { font-size: 12px; font-weight: 600; }
.kpi .delta.up { color: var(--green); } .kpi .delta.down { color: var(--red); }
.kpis .kpi .k-ic.g { background: var(--green-s); color: var(--green); }
@media (max-width: 1320px) { .kpis.five { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 1100px) { .g3 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .g21, .g12 { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 860px) { .g2, .g3 { grid-template-columns: minmax(0, 1fr); gap: 12px; } .box { padding: 16px; } .kpis.five, .kpis.three { display: flex; } }

/* ---------- meters (horizontal bars with a label) ---------- */
.meters { display: grid; gap: 12px; }
.mt { display: grid; grid-template-columns: minmax(90px, 140px) 1fr auto; gap: 12px; align-items: center; font-size: 13.5px; text-decoration: none; color: inherit; }
.mt > b:first-child, .mt > span:first-child { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mt small { display: block; color: var(--mute); font-size: 11.5px; font-weight: 500; }
.mt-t { height: 12px; border-radius: 6px; background: var(--soft); overflow: hidden; display: flex; }
.mt-t i { display: block; height: 100%; width: 0; background: var(--org); transition: width 1s cubic-bezier(.22,1,.36,1); }
.mt-t i + i { background: #ffd9a3; }
.drawn .mt-t i, .mt-t.now i { width: var(--w); }
.mt em { font: 600 13.5px var(--num); font-style: normal; white-space: nowrap; text-align: right; min-width: 52px; }
.mt em small { font: 500 11.5px var(--ui); }
a.mt:hover > b:first-child { color: var(--org-d); }

/* ---------- column chart ---------- */
.colc { display: flex; align-items: flex-end; gap: 10px; height: 210px; padding: 24px 4px 0; position: relative; }
.colc .cl { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 8px; min-width: 0; }
.colc .cl .cb { width: min(40px, 70%); height: 0; border-radius: 9px 9px 4px 4px; background: var(--c, var(--org)); transition: height 1s cubic-bezier(.22,1,.36,1); transition-delay: calc(var(--i) * 50ms); position: relative; }
.drawn .colc .cl .cb { height: var(--h); }
.colc .cl .cb em { position: absolute; left: 50%; bottom: 100%; transform: translate(-50%, -4px); font: 600 11.5px var(--num); font-style: normal; color: var(--ink-2); white-space: nowrap; opacity: 0; transition: opacity .3s .8s; }
.drawn .colc .cl .cb em { opacity: 1; }
.colc .cl span { font-size: 11.5px; color: var(--mute); font-weight: 600; }
.colc .cl.now .cb { background: var(--dark); }
.colc .cl.now span { color: var(--ink); }
.colc .cl.dim .cb { opacity: .35; }
body[data-theme="dark"] .colc .cl.now .cb { background: var(--org); }

/* sparkline-ish week attendance */
.wk { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.wk div { display: grid; gap: 6px; justify-items: center; font-size: 11.5px; color: var(--mute); font-weight: 600; }
.wk .wb { width: 100%; height: 96px; border-radius: 12px; background: var(--soft); display: flex; align-items: flex-end; overflow: hidden; }
.wk .wb i { display: block; width: 100%; height: 0; background: var(--green); border-radius: 12px 12px 0 0; transition: height 1s cubic-bezier(.22,1,.36,1); }
.drawn .wk .wb i { height: var(--h); }
.wk b { font: 600 13px var(--num); color: var(--ink); }

/* ---------- section tabs inside a page ---------- */
.ptabs { display: flex; gap: 4px; flex-wrap: wrap; background: var(--panel); padding: 6px; border-radius: 18px; box-shadow: 0 1px 0 rgba(22,27,38,.04), 0 12px 32px -18px rgba(22,27,38,.18); }
.ptabs button { display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 13px; font-weight: 600; font-size: 13.5px; color: var(--ink-2); }
.ptabs button svg { width: 17px; height: 17px; }
.ptabs button:hover { background: var(--soft); }
.ptabs button.on { background: var(--dark); color: #fff; }
.ptabs button.on svg { color: var(--org); }
.ptabs button em { font-style: normal; font-size: 11.5px; background: var(--soft); color: var(--mute); border-radius: 999px; padding: 1px 7px; }
.ptabs button.on em { background: rgba(255,255,255,.14); color: #fff; }
body[data-theme="dark"] .ptabs button.on { background: var(--org); color: #161b26; }
body[data-theme="dark"] .ptabs button.on svg { color: #161b26; }
@media (max-width: 860px) { .ptabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; } .ptabs button { flex: none; } }

/* ---------- facts list ---------- */
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px; margin: 0; }
.facts div { padding: 9px 0; border-bottom: 1px solid var(--line); min-width: 0; }
.facts dt { font-size: 12px; color: var(--mute); }
.facts dd { margin: 1px 0 0; font-weight: 600; font-size: 13.5px; overflow-wrap: anywhere; }
.facts.one { grid-template-columns: minmax(0, 1fr); }
.facts.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 860px) { .facts.three { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- CRDB control number card ---------- */
.ctrl { border-radius: 20px; background: var(--dark); color: #fff; padding: 18px 20px; position: relative; overflow: hidden; }
.ctrl::after { content: ""; position: absolute; right: -40px; top: -40px; width: 160px; height: 160px; border-radius: 50%; border: 26px solid rgba(243,146,0,.16); }
.ctrl small { color: rgba(255,255,255,.6); font-size: 11.5px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; display: block; }
.ctrl .cn { font: 600 26px/1.2 var(--num); letter-spacing: .06em; margin: 6px 0 2px; color: #fff; display: flex; align-items: center; gap: 10px; }
.ctrl .cn button { width: 30px; height: 30px; border-radius: 9px; background: rgba(255,255,255,.1); color: #fff; display: grid; place-items: center; }
.ctrl .cn button svg { width: 15px; height: 15px; }
.ctrl .cr { display: flex; justify-content: space-between; gap: 12px; margin-top: 14px; padding-top: 12px; border-top: 1px solid rgba(255,255,255,.12); font-size: 12.5px; color: rgba(255,255,255,.7); flex-wrap: wrap; }
.ctrl .cr b { display: block; color: #fff; font: 600 15px var(--num); }
.ctrl .bank { position: absolute; right: 18px; top: 16px; font: 700 12px var(--num); letter-spacing: .12em; color: var(--org); z-index: 1; }

/* ---------- flow steps (how a CRDB payment travels) ---------- */
.flow { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; counter-reset: fl; }
.flow li { list-style: none; padding: 14px; border-radius: 16px; background: var(--soft); position: relative; font-size: 12.5px; color: var(--ink-2); }
.flow li b { display: block; font: 600 13.5px var(--num); color: var(--ink); margin: 8px 0 3px; }
.flow li span { width: 30px; height: 30px; border-radius: 10px; background: var(--panel); color: var(--org-d); display: grid; place-items: center; box-shadow: 0 1px 2px rgba(22,27,38,.08); }
.flow li span svg { width: 16px; height: 16px; }
.flow li::after { counter-increment: fl; content: counter(fl); position: absolute; right: 12px; top: 10px; font: 700 22px var(--num); color: var(--line); }
.flow { padding: 0; margin: 0; }
@media (max-width: 1100px) { .flow { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- feed (activity rows) ---------- */
.feed { display: grid; }
.fd { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 4px; border-bottom: 1px solid var(--line); text-decoration: none; color: inherit; }
.fd:last-child { border-bottom: 0; }
.fd .fi { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--soft); color: var(--ink-2); }
.fd .fi svg { width: 18px; height: 18px; }
.fd .fi.o { background: var(--org-s); color: var(--org-d); } .fd .fi.g { background: var(--green-s); color: var(--green); } .fd .fi.r { background: var(--red-s); color: var(--red); } .fd .fi.b { background: var(--blue-s); color: var(--blue); }
.fd b { display: block; font-weight: 600; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fd small { display: block; color: var(--mute); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fd em { font: 600 14px var(--num); font-style: normal; white-space: nowrap; text-align: right; }
.fd em small { font: 500 11.5px var(--ui); }
a.fd:hover { background: var(--soft); border-radius: 12px; }

/* ---------- attendance register ---------- */
.reg .dr { min-height: 64px; }
.pal { display: inline-flex; gap: 4px; background: var(--soft); padding: 3px; border-radius: 12px; }
.pal button { width: 36px; height: 32px; border-radius: 9px; font: 700 12.5px var(--num); color: var(--mute); transition: background .15s, color .15s, transform .15s; }
.pal button:hover { color: var(--ink); }
.pal button.on[data-v="P"] { background: var(--green); color: #fff; }
.pal button.on[data-v="A"] { background: var(--red); color: #fff; }
.pal button.on[data-v="L"] { background: var(--org); color: #161b26; }
.pal button.on[data-v="E"] { background: var(--blue); color: #fff; }
.pal button:active { transform: scale(.92); }
.reg .why select { font: inherit; font-size: 12.5px; background: var(--soft); border: 0; border-radius: 10px; padding: 7px 8px; color: var(--ink-2); width: 100%; }
.reg .why select:disabled { opacity: .35; }
.regsum { display: flex; gap: 8px; flex-wrap: wrap; }
.regsum span { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 10px; background: var(--soft); font-size: 12.5px; font-weight: 600; }
.regsum span b { font: 600 15px var(--num); }
.regsum .g b { color: var(--green); } .regsum .r b { color: var(--red); } .regsum .o b { color: var(--org-d); } .regsum .bl b { color: var(--blue); }
.secgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.secb { display: grid; gap: 4px; padding: 14px; border-radius: 16px; background: var(--soft); text-align: left; position: relative; transition: transform .2s, box-shadow .2s; }
.secb:hover { transform: translateY(-2px); box-shadow: 0 10px 22px -16px rgba(22,27,38,.4); }
.secb b { font: 600 15px var(--num); }
.secb small { color: var(--mute); font-size: 12px; }
.secb .pill { justify-self: start; margin-top: 4px; }
.secb.on { background: var(--dark); color: #fff; }
.secb.on small { color: rgba(255,255,255,.6); }
body[data-theme="dark"] .secb.on { background: var(--org); color: #161b26; }
body[data-theme="dark"] .secb.on small { color: rgba(22,27,38,.7); }

/* heat calendar (attendance per day) */
.heat { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 5px; }
.heat .hd { font-size: 11px; color: var(--mute); text-align: center; font-weight: 600; }
.heat i { aspect-ratio: 1.6; border-radius: 7px; background: var(--soft); display: grid; place-items: center; font: 600 10.5px var(--num); font-style: normal; color: transparent; }
.heat i.P { background: var(--green-s); }
.heat i.L { background: #ffe1b0; color: var(--org-d); }
.heat i.A { background: var(--red); color: #fff; }
.heat i.E { background: var(--blue-s); color: var(--blue); }
.heat i:hover { color: var(--ink); outline: 2px solid var(--ink); }
.hkey { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--mute); margin-top: 12px; }
.hkey span { display: inline-flex; align-items: center; gap: 6px; }
.hkey i { width: 14px; height: 10px; border-radius: 3px; display: inline-block; }

/* ---------- timetable ---------- */
.tt { overflow-x: auto; }
.tt table { width: 100%; border-collapse: separate; border-spacing: 6px; min-width: 820px; }
.tt th { font-size: 12px; color: var(--mute); font-weight: 600; text-align: left; padding: 4px 6px; }
.tt th small { display: block; font-weight: 500; }
.tt td { padding: 0; vertical-align: top; }
.tt .slot { border-radius: 12px; padding: 9px 10px; min-height: 58px; background: var(--soft); display: grid; gap: 2px; border-left: 4px solid var(--c, var(--org)); }
.tt .slot b { font-size: 13px; font-weight: 600; }
.tt .slot small { font-size: 11.5px; color: var(--mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tt .brk { border-radius: 12px; background: repeating-linear-gradient(135deg, var(--soft) 0 8px, transparent 8px 16px); color: var(--mute); font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; display: grid; place-items: center; min-height: 58px; writing-mode: vertical-rl; transform: rotate(180deg); }
.tt .empty-s { min-height: 58px; border-radius: 12px; border: 1.5px dashed var(--line); }
.tt td.tday { width: 92px; font: 600 13px var(--num); color: var(--ink-2); padding: 18px 6px 0; }

/* ---------- marks entry ---------- */
.mk input { width: 74px; font: 600 14px var(--num); text-align: center; background: var(--soft); border: 1.5px solid transparent; border-radius: 10px; padding: 8px 6px; color: var(--ink); }
.mk input:focus { outline: none; border-color: var(--org); background: var(--panel); }
.mk input.bad { border-color: var(--red); background: var(--red-s); }
.gr { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; font: 700 13px var(--num); }
.gr.A { background: var(--green-s); color: var(--green); } .gr.B { background: var(--blue-s); color: var(--blue); } .gr.C { background: var(--amber-s); color: var(--org-d); } .gr.D { background: var(--org-s); color: var(--org-d); } .gr.E { background: var(--red-s); color: var(--red); }
.gr.t-green { background: var(--green-s); color: var(--green); } .gr.t-blue { background: var(--blue-s); color: var(--blue); } .gr.t-amber { background: var(--amber-s); color: var(--org-d); } .gr.t-orange { background: var(--org-s); color: var(--org-d); } .gr.t-red { background: var(--red-s); color: var(--red); } .gr.t-purple { background: rgba(124, 58, 237, .12); color: #7c3aed; } .gr.t-grey { background: var(--soft); color: var(--mute); }
.gr { width: auto; min-width: 30px; padding: 0 5px; } /* two-letter grades (A+, B-) */
.scale { display: flex; gap: 6px; flex-wrap: wrap; }
.scale span { display: inline-flex; align-items: center; gap: 8px; padding: 5px 10px 5px 5px; border-radius: 11px; background: var(--soft); font-size: 12px; color: var(--ink-2); font-weight: 600; }
.scale .gr { width: auto; min-width: 24px; height: 24px; font-size: 12px; border-radius: 7px; }

/* ---------- report card (paper) ---------- */
.paper { background: #fff; color: #161b26; border-radius: 6px; box-shadow: 0 0 0 1px var(--line), 0 30px 60px -30px rgba(22,27,38,.4); padding: 40px 44px; max-width: 820px; margin: 0 auto; font-size: 13px; }
.paper .rh { display: grid; grid-template-columns: 64px 1fr 64px; gap: 16px; align-items: center; text-align: center; border-bottom: 3px double #161b26; padding-bottom: 14px; }
.paper .rh .crest { width: 64px; height: 64px; border-radius: 18px; background: #161b26; color: #f39200; display: grid; place-items: center; }
.paper .rh .crest svg { width: 34px; height: 34px; }
.paper .rh h2 { font: 700 19px var(--num); text-transform: uppercase; letter-spacing: .04em; }
.paper .rh p { color: #485164; font-size: 12px; }
.paper .rh h3 { font: 600 14px var(--num); margin-top: 6px; color: #b56c00; letter-spacing: .12em; text-transform: uppercase; }
.paper .who { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px 16px; margin: 16px 0; padding: 12px 14px; background: #f3f5f9; border-radius: 8px; }
.paper .who small { display: block; color: #677084; font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em; }
.paper .who b { font-weight: 600; }
.paper table { width: 100%; border-collapse: collapse; }
.paper th, .paper td { border: 1px solid #d5dae3; padding: 7px 8px; text-align: center; }
.paper th { background: #161b26; color: #fff; font-weight: 600; font-size: 11.5px; }
.paper td:first-child, .paper th:first-child { text-align: left; }
.paper tr.tot td { font-weight: 700; background: #f3f5f9; }
.paper .rem { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 16px; }
.paper .rem div { border: 1px solid #d5dae3; border-radius: 8px; padding: 10px 12px; min-height: 76px; }
.paper .rem small { display: block; color: #677084; font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 4px; }
.paper .sig { display: flex; justify-content: space-between; margin-top: 30px; color: #485164; font-size: 12px; }
.paper .sig span { border-top: 1px solid #161b26; padding-top: 4px; min-width: 200px; text-align: center; }
.paper .att3 { display: flex; gap: 16px; margin-top: 12px; color: #485164; }
.paper .att3 b { color: #161b26; }
.paper.stmt .who { grid-template-columns: repeat(3, 1fr); }
.paper td.r, .paper th.r { text-align: right; }

/* ---------- admissions board ---------- */
.board { display: grid; grid-template-columns: repeat(5, minmax(220px, 1fr)); gap: 12px; overflow-x: auto; padding-bottom: 6px; }
.lane { background: var(--panel); border-radius: var(--r); padding: 14px; display: flex; flex-direction: column; gap: 8px; min-height: 300px; box-shadow: 0 1px 0 rgba(22,27,38,.04), 0 12px 32px -18px rgba(22,27,38,.18); }
.lane > header { display: flex; justify-content: space-between; align-items: center; padding: 2px 4px 6px; }
.lane > header b { font: 600 14px var(--num); display: flex; align-items: center; gap: 8px; }
.lane > header b i { width: 8px; height: 8px; border-radius: 50%; }
.lane > header em { font-style: normal; font-size: 12px; font-weight: 600; color: var(--mute); background: var(--soft); border-radius: 999px; padding: 2px 9px; }
.appc { background: var(--soft); border-radius: 14px; padding: 12px; display: grid; gap: 8px; cursor: pointer; transition: transform .2s, box-shadow .2s; text-align: left; width: 100%; }
.appc:hover { transform: translateY(-2px); box-shadow: 0 10px 20px -14px rgba(22,27,38,.45); }
.appc .s-cell b { font-size: 13.5px; }
.appc .ar { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 11.5px; color: var(--mute); }
@media (max-width: 860px) { .board { grid-template-columns: repeat(5, 78vw); margin: 0 -12px; padding: 0 12px 6px; scroll-snap-type: x mandatory; } .lane { scroll-snap-align: start; } }

/* ---------- parent portal phone ---------- */
.phonewrap { display: grid; grid-template-columns: 380px minmax(0, 1fr); gap: 24px; align-items: start; }
.phone { width: 360px; max-width: 100%; margin: 0 auto; border-radius: 44px; background: #0a0d13; padding: 12px; box-shadow: 0 40px 80px -30px rgba(22,27,38,.55); }
.phone .scr { border-radius: 34px; background: var(--bg); height: 720px; overflow-y: auto; position: relative; scrollbar-width: none; }
.phone .scr::-webkit-scrollbar { display: none; }
.phone .notch { height: 30px; display: flex; justify-content: space-between; align-items: center; padding: 0 26px; font: 600 12px var(--num); color: var(--ink); }
.pp-h { padding: 6px 18px 16px; display: flex; justify-content: space-between; align-items: center; }
.pp-h b { font: 600 20px var(--num); display: block; }
.pp-h small { color: var(--mute); font-size: 12px; }
.pp-kid { display: flex; gap: 8px; padding: 0 18px 12px; overflow-x: auto; scrollbar-width: none; }
.pp-kid button { display: flex; align-items: center; gap: 8px; padding: 5px 12px 5px 5px; border-radius: 999px; background: var(--panel); font-size: 12.5px; font-weight: 600; flex: none; box-shadow: 0 0 0 1px var(--line); }
.pp-kid button.on { background: var(--dark); color: #fff; box-shadow: none; }
.pp-kid .av { width: 28px; height: 28px; border-radius: 50%; font-size: 10px; }
.pp-c { margin: 0 12px 12px; background: var(--panel); border-radius: 22px; padding: 16px; }
.pp-c h4 { margin: 0 0 10px; font: 600 14px var(--num); display: flex; justify-content: space-between; align-items: center; }
.pp-c h4 small { font: 500 12px var(--ui); color: var(--mute); }
.pp-tabs { position: sticky; bottom: 0; margin: 12px 0 0; display: flex; justify-content: space-around; padding: 10px 8px 14px; background: var(--panel); border-radius: 24px 24px 0 0; box-shadow: 0 -10px 30px -20px rgba(22,27,38,.4); }
.pp-tabs button { display: grid; justify-items: center; gap: 3px; font-size: 10.5px; font-weight: 600; color: var(--mute); padding: 4px 8px; border-radius: 12px; }
.pp-tabs button.on { color: var(--ink); background: var(--org-s); }
.pp-tabs button.on svg { color: var(--org); }
.pp-tabs svg { width: 20px; height: 20px; }
@media (max-width: 1100px) { .phonewrap { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 420px) { .phone { padding: 0; border-radius: 0; background: none; box-shadow: none; } .phone .scr { border-radius: 0; height: auto; } .phone .notch { display: none; } }

/* ---------- settings / integration cards ---------- */
.intg { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; gap: 14px; align-items: center; }
.intg .lg { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; font: 800 13px var(--num); letter-spacing: .02em; }
.intg .lg.erp { background: #e8f0fe; color: #1f5fd6; }
.intg .lg.crdb { background: #e6f5ec; color: #0b7a3e; }
.intg .lg.sms { background: var(--org-s); color: var(--org-d); }
.intg b { font: 600 16px var(--num); display: block; }
.intg small { color: var(--mute); font-size: 12.5px; }
.kv { display: grid; grid-template-columns: minmax(130px, 210px) minmax(0, 1fr); gap: 0 16px; font-size: 13.5px; margin-top: 14px; }
.kv dt, .kv dd { padding: 9px 0; border-top: 1px solid var(--line); margin: 0; }
.kv dt { color: var(--mute); }
.kv dd { font-weight: 600; overflow-wrap: anywhere; }
@media (max-width: 720px) { .kv { grid-template-columns: minmax(0, 1fr); } .kv dd { border-top: 0; padding-top: 0; } }
.maprow { display: grid; grid-template-columns: minmax(0, 1fr) 24px minmax(0, 1fr); gap: 10px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); font-size: 13px; }
.maprow svg { width: 18px; height: 18px; color: var(--org); }
.maprow b { display: block; font-weight: 600; }
.maprow small { color: var(--mute); font-size: 12px; }

/* ---------- misc ---------- */
.hint { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; background: var(--blue-s); color: var(--blue); font-size: 13px; font-weight: 500; }
.hint svg { width: 17px; height: 17px; flex: none; margin-top: 1px; }
.hint.o { background: var(--org-s); color: var(--org-d); }
.hint.r { background: var(--red-s); color: var(--red); }
.hint.g { background: var(--green-s); color: var(--green); }
.btn-d { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 13px; font-weight: 600; font-size: 13.5px; background: var(--dark); color: #fff; }
.btn-d svg { width: 17px; height: 17px; color: var(--org); }
.btn-s { display: inline-flex; align-items: center; gap: 6px; padding: 7px 11px; border-radius: 10px; font-weight: 600; font-size: 12.5px; background: var(--soft); color: var(--ink-2); white-space: nowrap; }
.btn-s:hover { background: var(--org-s); color: var(--org-d); }
.btn-s svg { width: 15px; height: 15px; }
.icb { width: 34px; height: 34px; border-radius: 10px; display: inline-grid; place-items: center; color: var(--mute); }
.icb:hover { background: var(--soft); color: var(--ink); }
.icb svg { width: 17px; height: 17px; }
body[data-theme="dark"] .btn-d { background: var(--soft); }
.ph .tools { justify-content: flex-end; }
.subh { font: 600 12px var(--ui); text-transform: uppercase; letter-spacing: .08em; color: var(--mute); margin: 18px 0 8px; }
.subh:first-child { margin-top: 0; }
.big-n { font: 600 34px/1.1 var(--num); letter-spacing: -.02em; }
.big-n small { font: 500 14px var(--ui); color: var(--mute); letter-spacing: 0; }
.dhero { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 20px; align-items: center; padding: 22px; }
.dhero h1 { font: 600 28px/1.1 var(--num); letter-spacing: -.01em; }
.dhero .dmeta { display: flex; gap: 8px 16px; flex-wrap: wrap; color: var(--ink-2); font-size: 13.5px; margin-top: 8px; }
.dhero .dmeta span { display: inline-flex; align-items: center; gap: 6px; }
.dhero .dmeta svg { width: 16px; height: 16px; color: var(--mute); }
.dhero .dact { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 1100px) { .dhero { grid-template-columns: auto minmax(0, 1fr); } .dhero .dact { grid-column: 1 / -1; justify-content: flex-start; } }
@media (max-width: 860px) { .dhero { padding: 16px; gap: 14px; } .dhero h1 { font-size: 22px; } .dhero .av.xl { width: 64px; height: 64px; font-size: 22px; border-radius: 20px; } }
.ministat { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.ministat > div { padding: 12px 14px; border-radius: 16px; background: var(--soft); }
.ministat small { display: block; font-size: 11.5px; color: var(--mute); font-weight: 600; }
.ministat b { font: 600 19px var(--num); }
.ministat b.g { color: var(--green); } .ministat b.r { color: var(--red); } .ministat b.o { color: var(--org-d); }
@media (max-width: 860px) { .ministat { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.chk { width: 18px; height: 18px; accent-color: var(--org); cursor: pointer; }
.sel.find.wide input { width: 240px; }
.toolbar.tight { margin-bottom: 10px; }
.drop { border: 2px dashed var(--line); border-radius: 18px; padding: 26px; display: grid; justify-items: center; gap: 6px; text-align: center; color: var(--mute); font-size: 13px; }
.drop svg { width: 34px; height: 34px; color: var(--org); }
.drop b { color: var(--ink); font-size: 14px; }
.steps { display: flex; gap: 6px; flex-wrap: wrap; }
.steps span { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--mute); }
.steps span i { width: 22px; height: 22px; border-radius: 50%; background: var(--soft); display: grid; place-items: center; font: 700 11px var(--num); font-style: normal; }
.steps span.done i { background: var(--green); color: #fff; }
.steps span.now { color: var(--ink); }
.steps span.now i { background: var(--org); color: #161b26; }
.steps span + span::before { content: ""; width: 16px; height: 2px; background: var(--line); border-radius: 1px; }
.login { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); background: var(--bg); }
.login .lft { background: var(--dark); color: #fff; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.login .rgt { display: grid; place-items: center; padding: 32px 20px; }
@media (max-width: 900px) { .login { grid-template-columns: minmax(0, 1fr); } .login .lft { display: none; } }

@media print {
  .side, .top, .tabs, .phead .pact, .ptabs, .noprint, .toolbar { display: none !important; }
  .app { display: block; padding: 0; }
  body { background: #fff; }
  .panel { box-shadow: none !important; }
  .paper { box-shadow: none; padding: 0; max-width: none; }
}

/* reduced motion: charts show their final state at once */
@media (prefers-reduced-motion: reduce) {
  .mt-t i { width: var(--w); transition: none; }
  .colc .cl .cb { height: var(--h); transition: none; }
  .colc .cl .cb em { opacity: 1; transition: none; }
  .wk .wb i { height: var(--h); transition: none; }
  .main [data-mk-reveal] { opacity: 1 !important; transform: none !important; }
}
@media (prefers-reduced-motion: reduce) { .donut svg.intro .sweep { stroke-dashoffset: 0 !important; animation: none !important; } }
.lchip { white-space: nowrap; }
.erp.cancelled { color: var(--mute); }
.erp.cancelled i { background: var(--mute); }

/* ---------- compact summary (body.kpi-min) and foldable panels ---------- */
.sumtgl { display: inline-flex; align-items: center; gap: 7px; padding: 10px 13px; border-radius: 13px; font-weight: 600; font-size: 13px; background: var(--panel); color: var(--ink-2); box-shadow: 0 1px 2px rgba(22,27,38,.08); }
.sumtgl svg { width: 16px; height: 16px; }
.sumtgl .chev { transition: transform .25s; transform: rotate(-90deg); }
.sumtgl.on .chev { transform: none; }
.sumtgl.on { color: var(--ink); }
.hello .sumtgl { align-self: center; margin-left: 12px; }
body.kpi-min .main .hello p#helloS { display: none; } /* page descriptions under titles always show, as on the register */
body.kpi-min .main .kpis { gap: 10px; }
body.kpi-min .main .kpis .kpi { display: flex; align-items: center; gap: 10px; padding: 9px 14px; min-height: 0; }
body.kpi-min .main .kpis .kpi .k-ic { width: 30px; height: 30px; border-radius: 10px; flex: none; }
body.kpi-min .main .kpis .kpi .k-ic svg { width: 16px; height: 16px; }
body.kpi-min .main .kpis .kpi p { margin: 0 !important; font-size: 12.5px; line-height: 1.3; flex: 1; min-width: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
body.kpi-min .main .kpis .kpi .num { font-size: 19px !important; margin: 0; white-space: nowrap; }
body.kpi-min .main .kpis .kpi small, body.kpi-min .main .kpis .kpi .bar2, body.kpi-min .main .kpis .kpi .tc-foot { display: none; }
@media (max-width: 860px) {
  body.kpi-min .main .kpis .kpi { flex: 0 0 auto; max-width: 78vw; }
  .sumtgl span { display: none; }
}
.foldb { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; color: var(--mute); flex: none; margin-left: 4px; order: 99; }
.foldb:hover { background: var(--soft); color: var(--ink); }
.foldb svg { width: 16px; height: 16px; transition: transform .25s; }
.panel > header.ph h3 { cursor: pointer; }
.panel.folded > header.ph { margin-bottom: 0; }
.panel.folded > header.ph .foldb svg { transform: rotate(-90deg); }
.panel.folded > :not(header.ph) { display: none !important; }
.attn .foldb { color: rgba(255,255,255,.6); }
.attn .foldb:hover { background: rgba(255,255,255,.1); color: #fff; }

/* pupil photos */
.av.ph { background: var(--soft); overflow: hidden; padding: 0; }
.av.ph img { width: 100%; height: 100%; display: block; object-fit: cover; }

/* ---------- sidebar groups (accordion) ----------
   A group header looks like a menu item (icon, name, chevron). Open groups show their links indented on a guide
   line; the current link's segment of the line turns orange. A closed group that holds the current page keeps an
   orange icon and dot, and shows any alert badge of its links. */
.nav { padding-top: 12px; gap: 2px; }
.ngrp { display: grid; }
.ngh { display: flex; align-items: center; gap: 12px; width: 100%; padding: 11px 14px; border-radius: 14px; font-weight: 500; font-size: 14px; color: var(--ink-2); text-align: left; transition: background .2s, color .2s; }
.ngh:hover { background: var(--soft); color: var(--ink); }
.ngh > svg:first-child { width: 19px; height: 19px; }
.ngh span { flex: 1; }
.ngh .chev { width: 15px; height: 15px; color: var(--mute); transition: transform .3s cubic-bezier(.22,1,.36,1); }
.ngh .badge { font-size: 10.5px; min-width: 19px; height: 19px; }
.ngh .ndot { width: 7px; height: 7px; border-radius: 50%; background: var(--org); display: none; }
.ngrp.open > .ngh { color: var(--ink); font-weight: 600; }
.ngrp.open > .ngh .chev { transform: rotate(180deg); color: var(--ink); }
.ngrp.open > .ngh .badge { display: none; }
.ngrp.cur > .ngh > svg:first-child { color: var(--org); }
.ngrp.cur:not(.open) > .ngh { color: var(--ink); font-weight: 600; }
.ngrp.cur:not(.open) > .ngh .ndot { display: block; }
.ngl { display: none; padding: 2px 0 6px; }
.ngrp.open > .ngl { display: grid; animation: ngIn .3s cubic-bezier(.22,1,.36,1); }
@keyframes ngIn { from { opacity: 0; transform: translateY(-6px); } }
.ngl a { padding: 9px 30px 9px 46px; font-size: 13.5px; }
.ngl a svg { width: 17px; height: 17px; }
.ngl a::before { content: ""; position: absolute; left: 23px; top: 0; bottom: 0; width: 2px; background: var(--line); }
.ngl a:first-child::before { top: 4px; }
.ngl a:last-child::before { bottom: 4px; }
.ngl a.on::before { background: var(--org); top: 6px; bottom: 6px; border-radius: 2px; }
.side { position: sticky; top: 16px; height: calc(100vh - 32px); min-height: 0; }
.side .nav { flex: 1; overflow: visible; align-content: start; }
@media (max-height: 760px) { .ngh { padding: 9px 14px; } .ngl a { padding-top: 7px; padding-bottom: 7px; } .sbrand { padding-bottom: 12px; } .side-foot { padding: 10px 12px; } }
.ngl a { padding-left: 42px; padding-right: 24px; gap: 10px; }
.ngl a span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.ngl a em { flex: none; }

/* flat sidebar menu (no collapsing): compact so all links fit without scrolling */
.nav { gap: 1px; padding: 10px 0 12px; }
.nav a { padding: 8px 14px; padding-right: 30px; font-size: 13.5px; }
.nav a svg { width: 18px; height: 18px; }
.nav .ng { padding: 12px 14px 3px; font-size: 10px; }
.nav .ng:first-of-type { padding-top: 8px; }
@media (max-height: 800px) { .nav a { padding-top: 6px; padding-bottom: 6px; } .nav .ng { padding-top: 8px; } .sbrand { padding-bottom: 12px; } .side-foot { display: none; } }
.facts dd a, .dfacts dd a { color: var(--org-d); text-decoration: none; } .facts dd a:hover { text-decoration: underline; }

/* ---------- house fixes (asset-register look) ---------- */
/* the crest lives in the sidebar; the top bar only shows it on phones, where the sidebar is hidden */
.top .m-brand { display: none; }
@media (max-width: 860px) { .top .m-brand { display: flex; } }
/* page header: small school line above the title, as on the register */
.hello h1 .ht-co { display: block; font: 600 12px var(--ui); letter-spacing: .08em; text-transform: uppercase; color: var(--mute); margin-bottom: 6px; }
body[data-theme="orange"] .hello h1 .ht-co { color: rgba(22,27,38,.78); }
@media (max-width: 860px) { .hello h1 .ht-co { font-size: 11.5px; margin-bottom: 4px; } }
.hello { align-items: flex-start; }
.hello .sumtgl { align-self: flex-start; margin-top: 18px; }
/* links that sit in panel headers and small buttons are never underlined */
.ph a, a.btn-s, a.btn-o, a.btn-l, .sumtgl { text-decoration: none; }
/* a long ERPNext status (e.g. "Cancelled · ACC-SINV-…") wraps inside its column instead of running off the card */
.dt .erpc .erp { white-space: normal; align-items: flex-start; line-height: 1.35; }
.dt .erpc .erp i { margin-top: 5px; flex: none; }
/* every page header is the same height, with or without action buttons, so the tabs below never jump */
@media (min-width: 861px) { .phead { min-height: 46px; } }
/* class card actions: three equal buttons on one row */
.cls-acts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: auto; }
.cls-acts .btn-s { justify-content: center; }
/* admissions board: lanes share the width equally; long names shorten inside their card instead of widening the lane */
.board > .lane, .lane > * { min-width: 0; }
/* links are never underlined at rest (house style); plain document numbers underline only on hover */
a { text-decoration: none; }
a.mono:hover, .dt a.mono:hover { text-decoration: underline; }
/* a column of stacked cards beside a single card: the last card in the stack grows so both columns end level */
.g21 > .stack16, .g12 > .stack16 { display: flex; flex-direction: column; gap: 16px; }
.g21 > .stack16 > :last-child, .g12 > .stack16 > :last-child { flex: 1; }
/* long meter lists inside a full-width card run in two columns */
.meters-2 .meters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 40px; }
@media (max-width: 860px) { .meters-2 .meters { grid-template-columns: minmax(0, 1fr); } }
/* pupil photos use class "ph", which collides with the panel-header ".ph" (flex + 16px bottom margin) and made every
   pupil row ~16px taller; reset it here */
.av.ph { display: grid; margin: 0; gap: 0; justify-content: center; }
/* data-entry tables (marks entry): tighter rows */
.dt.dense .dr { padding-top: 6px; padding-bottom: 6px; min-height: 0; }
/* selected class / section tiles: light orange tint with a ring and a tick, not a solid dark block */
body:not([data-theme="dark"]) .secb.on { background: var(--org-s); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--org); }
body:not([data-theme="dark"]) .secb.on small { color: var(--org-d); }
.secb.on::after { content: ""; position: absolute; top: 12px; right: 12px; width: 18px; height: 18px; border-radius: 50%; background: var(--org) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12 5 5 9-10'/%3E%3C/svg%3E") center / 12px no-repeat; }
/* report cards: the paper keeps its own height and stays in view while the pupil list scrolls */
.rc-wrap { align-items: start; }
@media (min-width: 1101px) { .rc-wrap > :last-child { position: sticky; top: 16px; } }
/* a chart card beside a taller card: the chart grows to fill it instead of leaving blank space underneath */
@media (min-width: 1101px) {
  .g21 > .panel:has(> .colc), .g12 > .panel:has(> .colc) { display: flex; flex-direction: column; }
  .g21 > .panel > .colc, .g12 > .panel > .colc { flex: 1 1 auto; height: auto !important; min-height: 190px; }
}
/* phone: the two header chips sit side by side, so their text wraps and the arrow drops */
@media (max-width: 560px) { .hello p#helloS .lchip { min-width: 0; white-space: normal; line-height: 1.3; } .hello p#helloS .lchip .go { display: none; } }
@media (max-width: 560px) {
  .hello { position: relative; }
  .hello > div { flex: 1; min-width: 0; }
  .hello .sumtgl { position: absolute; top: 0; right: 4px; margin: 0; }
  .hello h1 { padding-right: 56px; }
}
@media (max-width: 420px) { .hello p#helloS { grid-template-columns: minmax(0, 1fr); gap: 8px; } }
/* ---------- 8-link menu: pill switcher for pages that share a menu link ---------- */
.subnav { display: inline-flex; flex-wrap: wrap; gap: 4px; align-self: flex-start; padding: 4px; margin: 2px 0 -6px; border-radius: 14px; background: rgba(22,27,38,.05); }
.subnav a { display: inline-flex; align-items: center; gap: 7px; padding: 7px 13px; border-radius: 11px; font-size: 13px; font-weight: 600; color: var(--mute); white-space: nowrap; transition: background .2s, color .2s, box-shadow .2s; }
.subnav a:hover { color: var(--ink); }
.subnav a svg { width: 16px; height: 16px; }
.subnav a.on { background: var(--panel); color: var(--ink); box-shadow: 0 1px 2px rgba(22,27,38,.08), 0 4px 12px -6px rgba(22,27,38,.18); }
.subnav a.on svg { color: var(--org); }
.subnav .badge { font-size: 10.5px; min-width: 18px; height: 18px; }
body[data-theme="dark"] .subnav { background: rgba(255,255,255,.06); }
@media (max-width: 860px) { .subnav { display: flex; flex-wrap: nowrap; overflow-x: auto; max-width: 100%; scrollbar-width: none; } }
/* sidebar spacing matched to the live asset register now the menu is 8 links (was squeezed for 15) */
.nav { gap: 6px; padding-top: 10px; }
.nav a { padding: 12px 30px 12px 14px; font-size: 14px; }
.nav a svg { width: 20px; height: 20px; }
@media (max-height: 800px) { .nav a { padding-top: 10px; padding-bottom: 10px; } .nav { gap: 4px; } }
.main > .subnav { justify-self: start; width: max-content; max-width: 100%; }
.nav { padding-top: 20px; }
/* ---------- sidebar sub-links: the open section lists its pages under it, joined by a thin line ---------- */
.nav .nsub { display: grid; gap: 2px; margin: -2px 0 4px; }
.nav .nsub a { position: relative; padding: 8px 14px 8px 47px; font-size: 13.5px; font-weight: 500; color: var(--mute); border-radius: 12px; }
.nav .nsub a::before { content: ""; position: absolute; left: 23px; top: 0; bottom: 0; width: 2px; background: var(--line); }
.nav .nsub a:first-child::before { top: 4px; } .nav .nsub a:last-child::before { bottom: 4px; }
.nav .nsub a:hover { color: var(--ink); background: var(--soft); }
.nav .nsub a.on { color: var(--ink); font-weight: 600; background: none; }
.nav .nsub a.on::before { background: var(--org); top: 6px; bottom: 6px; border-radius: 2px; }
.nav .nsub a span { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav .nsub .badge { font-size: 10.5px; min-width: 18px; height: 18px; }
/* one card holding the filters and the list below them (Students) */
.lcard > #lst { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }

/* ---------- nested menu items (ERPNext style): arrow opens a section's pages in place ---------- */
.nav .nrow { position: relative; display: grid; }
.nav .nrow > a { padding-right: 44px; }
.nav .ncar { position: absolute; right: 6px; top: 50%; width: 30px; height: 30px; margin-top: -15px; border-radius: 9px; display: grid; place-items: center; color: var(--mute); z-index: 2; transition: background .2s, color .2s; }
.nav .ncar:hover { background: rgba(22,27,38,.06); color: var(--ink); }
.nav .ncar svg { width: 15px; height: 15px; transition: transform .3s cubic-bezier(.22,1,.36,1); }
.nav .nitem.open > .nrow .ncar svg { transform: rotate(180deg); }
.nav .nrow > a .badge, .nav .nrow > a .count { margin-right: 4px; }
.nav .nitem.open > .nrow > a .badge { display: none; }
.nav .nitem > .nsub { display: none; }
.nav .nitem.open > .nsub { display: grid; animation: nsubIn .28s cubic-bezier(.22,1,.36,1); }
@keyframes nsubIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .nav .nitem.open > .nsub { animation: none; } }
/* ---------- section dropdowns beside the sidebar: same card as the user menu (.me-menu) ---------- */
.nav a.nmulti .nfly-go { width: 14px; height: 14px; margin-left: 6px; color: var(--mute); flex: none; transition: transform .2s; }
.nav a.nmulti .badge, .nav a.nmulti .count { margin-left: auto; }
.nav a.nmulti { padding-right: 14px; }
.nav a.nmulti.fly-on { background: var(--soft); color: var(--ink); }
.nav a.nmulti.fly-on .nfly-go { transform: translateX(2px); color: var(--ink); }
.nfly { position: fixed; width: 260px; padding: 8px; z-index: 1200; box-shadow: 0 24px 60px -20px rgba(22,27,38,.35), 0 0 0 1px var(--line); animation: flyIn .2s cubic-bezier(.2,.7,.2,1); }
@keyframes flyIn { from { opacity: 0; transform: translateX(-6px); } }
.nfly .nfly-ic { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; background: var(--org-s); color: var(--org-d); flex: none; }
.nfly .nfly-ic svg { width: 18px; height: 18px; }
.nfly a { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 12px; color: var(--ink-2); font-weight: 500; font-size: 13.5px; }
.nfly a:hover { background: var(--soft); color: var(--ink); }
.nfly a > svg:first-child { width: 17px; height: 17px; }
.nfly a span { flex: 1; min-width: 0; }
.nfly a.on { background: var(--org-s); color: var(--ink); font-weight: 600; }
.nfly a.on > svg:first-child { color: var(--org-d); }
.nfly .nfly-tick { width: 15px; height: 15px; color: var(--org-d); }
.nfly .badge { font-size: 10.5px; min-width: 18px; height: 18px; }
body[data-theme="dark"] .nfly { background: var(--panel); }
@media (prefers-reduced-motion: reduce) { .nfly { animation: none; } }
.nav a.nmulti .nfly-go { margin-left: auto; }
.nav a.nmulti .badge + .nfly-go, .nav a.nmulti .count + .nfly-go { margin-left: 8px; }

/* dropdown sized to its longest page name, not a fixed 260px */
.nfly { width: max-content; min-width: 180px; max-width: 240px; padding: 6px; }
.nfly a { padding: 9px 12px 9px 10px; }
.nav a.nmulti { cursor: pointer; }

/* ---------- Reports in the register's layout ---------- */
.rp-crest { width: 64px; height: 64px; border-radius: 18px; background: #161b26; color: #f39200; display: grid; place-items: center; }
.rp-crest svg { width: 34px; height: 34px; }
.rp-lh { grid-template-columns: 150px 1fr 150px; }
.rp-lead.neg { color: #c0392b; }
.rp-kf b.neg { color: #c0392b; } .rp-kf b.okt { color: #1e8e5a; }
.rpanel .tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.rpanel .seg.view button { white-space: nowrap; }
.dlw { position: relative; }
.dlw .chev { width: 14px; height: 14px; margin-left: 2px; }
.dlm { position: absolute; right: 0; top: calc(100% + 8px); width: max-content; min-width: 210px; padding: 6px; z-index: 1200; box-shadow: 0 24px 60px -20px rgba(22,27,38,.35), 0 0 0 1px var(--line); animation: menuIn .2s cubic-bezier(.2,.7,.2,1); }
.dlm a { display: flex; align-items: center; gap: 10px; padding: 9px 12px 9px 10px; border-radius: 12px; color: var(--ink-2); font-weight: 500; font-size: 13.5px; }
.dlm a:hover { background: var(--soft); color: var(--ink); }
.dlm a svg { width: 17px; height: 17px; }
@media print { .ltools, .rpanel .toolbar, .phead { display: none !important; } .rpanel, .rpanel .paperwrap { background: none !important; box-shadow: none !important; padding: 0 !important; } .paper { box-shadow: none; } }
/* report documents use the register's light ruled header; the dark header stays on report cards */
.paper .rp-t th { background: #f1f3f7; color: #2c3445; }

.paper .rp-t th, .paper .rp-t td { text-align: left; }
.paper .rp-t .n { text-align: right; } .paper .rp-t .c { text-align: center; }

.rpanel .paper.wide { max-width: 1080px; width: 100%; }
.rpanel .rp-lh { border-bottom: 3px double #161b26; }

/* ---------- class page: a page opened for one class becomes a tab of that class (js/classctx.js) ---------- */
.chero-ic { width: 96px; height: 96px; border-radius: 26px; display: grid; place-items: center; flex: none; background: var(--org-s); color: var(--org-d); font: 700 26px var(--num); letter-spacing: -.01em; }
body.in-class .main > .phead > div:first-child { display: none; }
body.in-class .main > .phead { justify-content: flex-end; min-height: 0; }
body.in-class .main > .phead:not(:has(.pact > *)) { display: none; }
body.in-class .main > #tabs, body.in-class .main > #xTabs, body.in-class.cls-students .main > .kpis { display: none; }
body.in-class.cls-students #tb > .toolbar:first-child, body.in-class .sel:has(#fStream),
body.in-class .sel:has(#secSel), body.in-class .sel:has(#rCls), body.in-class .sel:has(#cSec), body.in-class .sel:has(#mSec),
body.in-class .sec-pick, body.in-class .regpick .secgrid { display: none !important; }
body.in-class .regpick { padding-bottom: 6px; }
body.in-class .regpick .ph { margin-bottom: 0; }
@media (max-width: 860px) { .chero-ic { width: 64px; height: 64px; border-radius: 18px; font-size: 18px; } }
.cls-acts.one { grid-template-columns: minmax(0, 1fr); }
.fd.sec-open .go { width: 15px; height: 15px; color: var(--mute); flex: none; margin-left: 4px; transition: transform .2s, color .2s; }
.fd.sec-open:hover .go { transform: translateX(3px); color: var(--org-d); }
body.in-class.cls-students #viewSeg [data-view="classes"] { display: none; }
.fd.sec-open { display: flex; align-items: center; gap: 12px; }
.fd.sec-open > span:not(.av) { flex: 1; min-width: 0; }
.fd.sec-open > em { flex: none; }

/* ---------- optional features switched off (Settings › Features; body.off-* set by kit.js) ---------- */
body.off-ttgen [data-feat="ttgen"], body.off-ttgen .ptabs [data-tab="gen"],
body.off-how .ptabs [data-tab="how"], body.off-books [data-feat="books"], body.off-seating [data-feat="seating"],
body.off-portal [data-feat="portal"] { display: none !important; }
/* Settings › Features */
.feats { display: grid; gap: 4px; }
.feat { display: flex; align-items: center; gap: 14px; padding: 14px 12px; border-radius: 14px; cursor: pointer; }
.feat:hover { background: var(--soft); }
.feat + .feat { border-top: 1px solid var(--line); }
.feat-ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--soft); color: var(--ink-2); flex: none; }
.feat-ic svg { width: 19px; height: 19px; }
.feat-t { flex: 1; min-width: 0; } .feat-t b { display: block; font-size: 14px; } .feat-t small { display: block; color: var(--mute); font-size: 12.5px; margin-top: 2px; max-width: 70ch; }
.feat .sw { position: relative; flex: none; width: 42px; height: 24px; }
.feat .sw input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.feat .sw i { position: absolute; inset: 0; border-radius: 999px; background: #d5d9e2; transition: background .2s; pointer-events: none; }
.feat .sw i::after { content: ""; position: absolute; left: 3px; top: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform .2s; }
.feat .sw input:checked + i { background: var(--org); } .feat .sw input:checked + i::after { transform: translateX(18px); }
.feat .sw input:focus-visible + i { outline: 2px solid var(--org); outline-offset: 2px; }
/* dashboard stat cards (register style): pupil photos in the footer */
.tc-pics i { overflow: hidden; }
.tc-pics i img { width: 100%; height: 100%; object-fit: cover; display: block; }
.kpis.types4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1100px) { .kpis.types4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* pupil header (mockup option B): the four figures run along the bottom of the header card */
.dhero { padding-bottom: 0; }
.dhero .dfigs { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 4px -22px 0; border-top: 1px solid var(--line); }
.dhero .dfigs > div { padding: 14px 22px 16px; }
.dhero .dfigs > div + div { border-left: 1px solid var(--line); }
.dhero .dfigs small { display: block; color: var(--mute); font-size: 12.5px; }
.dhero .dfigs b { font: 600 22px var(--num); display: inline-flex; align-items: center; gap: 8px; }
.dhero .dfigs b.g { color: var(--green); } .dhero .dfigs b.r { color: var(--red); }
.dhero .dfigs .gr { width: auto; min-width: 24px; height: 24px; font-size: 12px; }
@media (max-width: 860px) { .dhero .dfigs { grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 4px -16px 0; } .dhero .dfigs > div { padding: 12px 16px; } .dhero .dfigs > div:nth-child(3) { border-left: 0; } .dhero .dfigs > div:nth-child(n+3) { border-top: 1px solid var(--line); } .dhero .dfigs b { font-size: 18px; } }.dhero:not(:has(.dfigs)) { padding-bottom: 22px; }
@media (max-width: 860px) { .dhero:not(:has(.dfigs)) { padding-bottom: 16px; } }

/* pupil header figures: no lines around or between them */
.dhero .dfigs, .dhero .dfigs > div, .dhero .dfigs > div + div { border: 0 !important; }
.dhero .dfigs { margin-top: 0; }
.dhero .dfigs > div { padding-top: 8px; padding-bottom: 20px; }

/* import-from-Excel dialog: needed on every page that has an import, not just Students */
.drop.over { border-color: var(--org); background: var(--org-s); }
.drop a { color: var(--org-d); font-weight: 600; }
.imp-help { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.imp-tbl { font-size: 12.5px; }
.imp-tbl .dr { min-height: 44px; padding: 6px 10px; }
.imp-tbl .dr.bad-row { background: var(--red-s); }
.imp-map { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px; }
.imp-map .sel select { max-width: none; width: 100%; }
@media (max-width: 720px) { .imp-map { grid-template-columns: minmax(0, 1fr); } }
/* green action: today's register (Pupils page) */
.btn-g { display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 13px; font-weight: 600; font-size: 13.5px; background: var(--green-s); color: var(--green); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--green) 22%, transparent); transition: background .2s, color .2s; white-space: nowrap; }
.btn-g:hover { background: var(--green); color: #fff; }
.btn-g svg { width: 17px; height: 17px; }
.btn-g em { font-style: normal; font-size: 11.5px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--green); color: #fff; }
.btn-g:hover em { background: #fff; color: var(--green); }
/* related-page button: opens another page of the same section (Applications, Teachers & subjects, ...) */
.btn-rel { display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 13px; font-weight: 600; font-size: 13.5px; background: var(--blue-s); color: var(--blue); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--blue) 18%, transparent); white-space: nowrap; transition: background .2s, color .2s; }
.btn-rel:hover { background: var(--blue); color: #fff; }
.btn-rel svg { width: 17px; height: 17px; }
.btn-rel svg.go { width: 15px; height: 15px; margin-left: -2px; transition: transform .2s; }
.btn-rel:hover svg.go { transform: translateX(2px); }
.btn-rel em { font-style: normal; font-size: 11.5px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--org); color: #161b26; }
body[data-theme="dark"] .btn-rel { background: rgba(127,162,214,.14); color: #9db8e0; }
.tc-pics i { border-color: var(--panel); }

.feat .sw i { background: color-mix(in srgb, var(--ink) 20%, transparent); }

/* ---------- Violet theme (the asset register's "violet"): the default look ----------
   Same light layout; the accent changes from orange to violet and the page and soft greys take a faint violet tint.
   Cards stay white. Category colours (subjects, levels, seating, statuses) stay the same in every theme. */
body[data-theme="violet"] { --org: #7c3aed; --org-d: #6d28d9; --org-s: #f2ecfe; --bg: #f0ebfa; --soft: #f5f1fd; --track: #e7e0f6; --line: #e9e3f6; }
/* text and icons sitting on a violet fill are white (orange used dark ink) */
body[data-theme="violet"] :is(.btn-o, .avatar, .dedit, .tl li.now .tl-ic, .acard:hover .ac-go, .tr-n, .rpick.on .rp-open .k-ic, .tab-search, .pal button.on[data-v="L"], .steps span.now i, .btn-rel em, .lcard1 .btn-o) { color: #fff; }
body[data-theme="violet"] .btn-o svg { color: #fff; }
body[data-theme="violet"] .chip.on { box-shadow: 0 6px 14px -8px rgba(124, 58, 237, .7); }
body[data-theme="violet"] .tab-search { box-shadow: 0 0 0 6px #fff, 0 12px 24px -8px rgba(124, 58, 237, .6); }/* warnings stay amber in every theme (they used the accent, which turned them violet) */
.arow2 em.warn { color: #ffb547; }

/* ---------- selection, as on the asset register: tick boxes + a floating bar while something is ticked ---------- */
.tr-act { display: inline-flex; align-items: center; gap: 7px; padding: 9px 12px; border-radius: 12px; background: rgba(255,255,255,.08); color: #fff; font-weight: 600; font-size: 13px; white-space: nowrap; }
.tr-act:hover { background: rgba(255,255,255,.16); }
.tr-act svg, .tray .btn-o svg { width: 16px; height: 16px; }
.tray .btn-o { padding: 9px 14px; border-radius: 12px; }
#tray .tr-row { grid-template-columns: 30px minmax(0, 1fr) 28px; }
#tray .tr-row .av { width: 30px; height: 30px; border-radius: 10px; }
.pick-lab { display: inline-flex; align-items: center; font-size: 13px; font-weight: 600; color: var(--ink-2); padding: 0 6px; }
.dt .dh .pick, .dt .dr .pick { margin-right: 0; }
.dr.picked { background: var(--org-s); }
.scard .sc-pick .pick { margin: 0; }
body.has-tray .main { padding-bottom: 96px; }
body[data-theme="violet"] .pick svg, body[data-theme="violet"] .tr-n { color: #fff; }
body[data-theme="violet"] .pick.all i { background: var(--org); }
@media (max-width: 860px) { .tray { left: 12px; right: 12px; transform: none; bottom: 84px; flex-wrap: wrap; } .tr-act span, .tray .btn-o span { display: none; } }
/* warning statuses (part paid / late, late arrival) stay amber in the violet theme: the accent is not a status colour */
body[data-theme="violet"] .p-title, body[data-theme="violet"] .p-survey, body[data-theme="violet"] .p-term { background: #fff3e2; color: #b56c00; }
body[data-theme="violet"] .pal button.on[data-v="L"] { background: #f39200; color: #161b26; }

/* active tab = the theme colour everywhere (was black in some places, violet chips in others) */
.ptabs button.on { background: var(--org); color: var(--ink); }
.ptabs button.on svg { color: currentColor; }
.ptabs button.on em { background: rgba(255,255,255,.22); color: inherit; }
body[data-theme="violet"] .ptabs button.on { color: #fff; box-shadow: 0 6px 14px -8px rgba(124, 58, 237, .7); }.pg button.on, .me-role button.on, .pp-kid button.on { background: var(--org); color: var(--ink); }
body[data-theme="violet"] :is(.pg button.on, .me-role button.on, .pp-kid button.on) { color: #fff; }

/* Reports: the report switch and its filters sit at the far right of the group chips' row (wrap below only when there is no room) */
.rpanel .toolbar { flex-wrap: wrap; align-items: center; }
.rpanel .toolbar > .tools { flex: 0 1 auto; margin-left: auto; justify-content: flex-end; }

/* ---------- figure tiles: fuller, like the dashboard cards (the thin strip read as small pills) ---------- */
.main .ministat { gap: 14px; }
.main .ministat > div { padding: 18px 20px; min-height: 92px; border-radius: 18px; display: flex; flex-direction: column; justify-content: space-between; gap: 8px; }
.main .ministat small { font-size: 12.5px; font-weight: 500; color: var(--mute); }
.main .ministat b { font: 600 26px/1.1 var(--num); white-space: nowrap; }
/* a strip that sits straight on the page (not inside a card) gets white cards with the dashboard's shadow */
.main > .ministat > div, .pbody > .ministat > div, #tabBody > .ministat > div { background: var(--panel); box-shadow: 0 1px 0 rgba(22,27,38,.04), 0 12px 32px -18px rgba(22,27,38,.18); border-radius: 22px; }
/* inside the small class cards the tiles stay compact */
.main .plc .ministat > div { min-height: 0; padding: 10px 12px; border-radius: 14px; }
.main .plc .ministat b { font-size: 20px; }
@media (max-width: 860px) { .main .ministat b { font-size: 20px; } .main .ministat > div { min-height: 76px; padding: 14px 16px; } }body[data-theme="violet"] .ministat b.o, body[data-theme="violet"] .dfigs b.o { color: #b56c00; }

/* ---------- tabs never sit in a thin block of their own ----------
   On pages with a header card (a pupil, a class) the tabs run along the bottom of that card; elsewhere they are a
   row of pills straight under the page title. */
.ptabs { background: none; box-shadow: none; padding: 0; border-radius: 0; gap: 6px; }
.ptabs button:not(.on):hover { background: color-mix(in srgb, var(--org) 10%, transparent); color: var(--org-d); }
.ptabs button:not(.on) { color: var(--ink-2); }
.dhero > .ptabs { grid-column: 1 / -1; margin: 0 -22px; padding: 6px 16px 14px; }

.dhero:has(> .ptabs) { padding-bottom: 0; }
@media (max-width: 860px) { .dhero > .ptabs { margin: 0 -16px; padding: 4px 12px 12px; } }
/* phone: page header buttons wrap instead of running off the screen */
@media (max-width: 860px) { .phead .pact { flex-wrap: wrap; } }
/* Reports: the figures sit open in the card like the pupil page's four figures, no tinted boxes */
.rpanel .ministat { gap: 0; margin: 8px 0 18px; }
.rpanel .ministat > div { background: none; box-shadow: none; border-radius: 0; min-height: 0; padding: 6px 22px 14px 0; justify-content: flex-start; gap: 6px; }
.rpanel .ministat small { font-size: 12.5px; }
.rpanel .ministat b { font-size: 28px; }
@media (max-width: 860px) { .rpanel .ministat { row-gap: 10px; } .rpanel .ministat b { font-size: 21px; } }
/* Reports laid out like Exams & results: figure cards between the tabs and the report card */
.rpanel .toolbar .rtitle { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.rpanel .toolbar .rtitle h3 { margin: 0; font-size: 16px; font-weight: 600; }
.rpanel .toolbar .rtitle .muted { font-size: 12.5px; }
#rbody > .rkpis { margin-bottom: 16px; }
/* donut: the register's solid rounded slices; a lifted slice gets a soft SVG shadow */
.donut .seg { stroke: none; }
.donut .seg.pop { filter: var(--seg-shadow); }
.donut .hits .hit { fill: transparent; pointer-events: all; cursor: pointer; }
/* Classes: the whole class card is clickable */
.plc-open { cursor: pointer; transition: transform .2s, box-shadow .2s; }
.plc-open:hover { transform: translateY(-2px); box-shadow: 0 1px 0 rgba(22,27,38,.04), 0 18px 36px -18px rgba(22,27,38,.28); }
.plc-open:focus-visible { outline: 2px solid var(--org); outline-offset: 2px; }
/* ---------- one dropdown look everywhere (the register's rule) ----------
   Every select (filters, report choices, edit forms, the register's reason picker, the theme menu) uses the
   register's thin chevron instead of the browser's own arrow, at the same distance from the right edge; the
   filter controls share one height (38 px) so they line up with search boxes and buttons. */
.sel select, .fm-f select, .me-sel select, .reg .why select, .sform select {
  -webkit-appearance: none; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23677084' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 14px 14px;
  padding-right: 34px; cursor: pointer;
}
.sel select { height: 38px; padding-top: 0; padding-bottom: 0; line-height: 38px; }
.sel select::-ms-expand { display: none; }
.fm-f select { padding-right: 36px; }
.reg .why select { background-position: right 9px center; background-size: 12px 12px; padding-right: 26px; }
.sel select:hover { background-color: var(--track); }
.sel select:focus-visible { outline: 2px solid var(--org); outline-offset: 1px; }
body[data-theme="dark"] .sel select, body[data-theme="dark"] .fm-f select, body[data-theme="dark"] .me-sel select, body[data-theme="dark"] .reg .why select, body[data-theme="dark"] .sform select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239aa3b5' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
}
/* ---------- pupil page: term register as month calendars ----------
   Every box = one school day: its date, a colour and an icon. Present is a soft green box with a tick,
   late amber with a clock, absent solid red with a cross, excused blue; holidays are hatched "off" days,
   today has a violet ring, days still to come are faint. The key above shows the same boxes with the term's counts. */
.rcal { display: flex; flex-direction: column; gap: 16px; }
.rcal .ph { margin-bottom: 0; }
.rc-d { --c: var(--mute); --s: transparent; position: relative; display: grid; place-items: center; align-content: center; gap: 1px; border-radius: 10px; background: var(--s); color: var(--c); font-style: normal; aspect-ratio: 1.1; }
.rc-d em { font: 600 13px/1 var(--num); font-style: normal; color: var(--ink); }
.rc-d svg { width: 13px; height: 13px; stroke-width: 2.6; }
.rc-d small { font-size: 9.5px; font-weight: 600; letter-spacing: .02em; color: var(--mute); line-height: 1; }
.rc-d.k-P { --c: var(--green); --s: var(--green-s); }
.rc-d.k-L { --c: #b56c00; --s: #ffe9c7; }
.rc-d.k-L em { color: #8a5200; }
.rc-d.k-A { --c: #fff; --s: var(--red); }
.rc-d.k-A em { color: #fff; }
.rc-d.k-E { --c: var(--blue); --s: var(--blue-s); }
.rc-d.k-hol { --s: repeating-linear-gradient(135deg, var(--soft) 0 5px, var(--track) 5px 7px); }
.rc-d.k-hol em { color: var(--mute); font-weight: 500; }
.rc-d.k-none { box-shadow: inset 0 0 0 1.5px var(--line); }
.rc-d.k-none em, .rc-d.k-future em { color: var(--mute); font-weight: 500; }
.rc-d.k-future { opacity: .45; }
.rc-d.k-today { box-shadow: 0 0 0 2px var(--panel), 0 0 0 4px var(--org); }
.rc-d.out { background: none; }
.rc-d[title] { cursor: default; transition: transform .15s; }
.rc-d[title]:hover { transform: scale(1.08); z-index: 1; }
.rc-key { display: flex; flex-wrap: wrap; gap: 8px 16px; padding: 12px 14px; border-radius: 16px; background: var(--soft); }
.rc-k { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--ink-2); }
.rc-k b { font: 600 14px var(--num); color: var(--ink); }
.rc-k .rc-d { width: 26px; aspect-ratio: 1; border-radius: 8px; }
.rc-k .rc-d svg { width: 12px; height: 12px; }
.rc-key .rc-d.k-today { background: var(--panel); box-shadow: inset 0 0 0 2px var(--org); }
.rc-months { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 20px 24px; }
.rc-mh { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 6px; }
.rc-mh b { font: 600 15px var(--num); }
.rc-mh small { font-size: 12px; font-weight: 600; }
.rc-mh small.g { color: var(--green); } .rc-mh small.r { color: var(--red); }
.rc-wd, .rc-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 5px; }
.rc-wd span { font-size: 11px; color: var(--mute); text-align: center; padding-bottom: 3px; font-weight: 600; }
body[data-theme="dark"] .rc-d.k-L { --s: #4a3410; } body[data-theme="dark"] .rc-d.k-L em { color: #ffcf7a; }
/* register calendar, calmer: small fixed-size day boxes, months on an even grid with room between them,
   the month's summary under its name instead of squeezed beside it */
.rcal { gap: 18px; }
.rc-months { grid-template-columns: repeat(auto-fill, 172px); gap: 26px 36px; justify-content: start; }
.rc-mh { display: block; margin-bottom: 10px; }
.rc-mh b { display: block; font-size: 14px; }
.rc-mh small { display: block; margin-top: 2px; font-size: 11.5px; font-weight: 500; }
.rc-wd, .rc-grid { grid-template-columns: repeat(5, 30px); gap: 5px; justify-content: start; }
.rc-wd span { font-size: 10.5px; padding-bottom: 2px; }
.rc-grid .rc-d { width: 30px; height: 30px; aspect-ratio: auto; border-radius: 8px; }
.rc-grid .rc-d em { font-size: 11.5px; }
.rc-d[title]:hover { transform: scale(1.12); }
.rc-key { gap: 8px 18px; padding: 10px 14px; }
.rc-k { font-size: 12px; gap: 6px; }
.rc-k b { font-size: 13px; }
.rc-k .rc-d { width: 14px; height: 14px; border-radius: 4px; }
.rc-key .rc-d.k-today { box-shadow: inset 0 0 0 1.5px var(--org); }
.rc-grid .rc-d.k-today { box-shadow: 0 0 0 2px var(--panel), 0 0 0 3.5px var(--org); }
@media (max-width: 860px) { .rc-months { grid-template-columns: repeat(auto-fill, 172px); justify-content: space-between; gap: 22px 16px; } }
/* register key sits straight on the card (no tint), so its colour boxes read exactly like the calendar's */
.rc-key { background: none; padding: 0; border-radius: 0; }
.rc-key .rc-d.k-today { background: none; }
/* ---------- timetable: soft subject tiles (option A, 17 Nov) ----------
   No coloured side or top stripes: each lesson is a soft tint of its subject colour (like the register's tinted
   category chips), subject in ink, teacher underneath in a deeper shade of the same colour. Study periods are
   plain grey tiles, break and lunch are quiet grey columns, a clash stays red. Same rule in the class view, the
   teacher view and the generator preview. */
.main .tt .slot { border-left: 0; background: color-mix(in srgb, var(--c, var(--org)) 14%, var(--panel)); align-content: center; gap: 3px; transition: background .15s, transform .15s; }
.main .tt .slot:hover { background: color-mix(in srgb, var(--c, var(--org)) 24%, var(--panel)); box-shadow: none; transform: translateY(-1px); }
.main .tt .slot b { color: var(--ink); line-height: 1.2; }
.main .tt .slot small { color: color-mix(in srgb, var(--c, var(--org)) 55%, var(--ink-2)); }
.main .tt .slot.study { background: var(--soft); box-shadow: none; }
.main .tt .slot.study:hover { background: var(--track); }
.main .tt .slot.study small { color: var(--mute); }
.main .tt .slot.clash { background: var(--red-s); box-shadow: inset 0 0 0 1.5px var(--red); }
.main .tt .slot.clash small:not(.cw) { color: var(--ink-2); }
.main .tt .brk { background: var(--soft); letter-spacing: .1em; font-size: 10.5px; }
.main .tt .empty-s { border: 0; background: none; }
.main .gc { border-top: 0; background: color-mix(in srgb, var(--c) 16%, var(--panel)); }
.main .gc small { color: color-mix(in srgb, var(--c) 55%, var(--ink-2)); }
.main .gc.st { background: var(--soft); }
.main .gc.dbl { box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--c) 45%, transparent); }
body[data-theme="dark"] .main .tt .slot { background: color-mix(in srgb, var(--c, var(--org)) 22%, var(--panel)); }
body[data-theme="dark"] .main .tt .slot small, body[data-theme="dark"] .gc small { color: color-mix(in srgb, var(--c, var(--org)) 45%, #c9cfdb); }
@media print { .main .tt .slot { background: color-mix(in srgb, var(--c, var(--org)) 14%, #fff) !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; } }
/* ---------- Attendance › Take register: register list beside the open register (17 Nov) ----------
   A slim white list of the day's registers grouped by level, each with its class chip, teacher and a plain status
   word; the open one gets the violet highlight like the menu. No tinted boxes. */
.regwrap { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: 16px; align-items: start; }
.reglist { padding: 10px; display: grid; gap: 2px; position: sticky; top: 16px; }
.rl-h { padding: 8px 10px 12px; display: grid; gap: 4px; }
.rl-h b { font: 600 15px var(--num); } .rl-h small { font-size: 12px; color: var(--mute); }
.rl-bar { display: block; height: 6px; border-radius: 99px; background: var(--track); overflow: hidden; margin-top: 4px; }
.rl-bar i { display: block; height: 100%; border-radius: 99px; background: var(--org); }
.rl-grp { font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--mute); padding: 12px 10px 4px; }
.reglist .secb.rl-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 12px; background: none; transform: none; box-shadow: none; transition: background .15s; }
.reglist .secb.rl-row:hover { background: var(--soft); transform: none; box-shadow: none; }
.reglist .secb.rl-row.on { background: var(--org-s); color: var(--ink); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--org) 40%, transparent); }
.reglist .secb.rl-row.on::after { display: none; }
.reglist .secb.rl-row.on small { color: var(--mute); }
.rl-row .cc { height: 28px; min-width: 38px; border-radius: 9px; font-size: 11.5px; }
.rl-n { min-width: 0; }
.rl-n b { display: block; font-size: 13.5px; font-weight: 600; } .rl-n small { display: block; font-size: 11.5px; color: var(--mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rl-st { font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.rl-st.todo { color: var(--red); } .rl-st.abs { color: #b56c00; } .rl-st.ok { color: var(--green); }
body[data-theme="dark"] .reglist .secb.rl-row.on { background: color-mix(in srgb, var(--org) 22%, var(--panel)); color: var(--ink); }
body[data-theme="dark"] .rl-st.abs { color: #ffcf7a; }
.reg .ph .tools { flex-wrap: wrap; }
/* inside a class page the list is not needed: just that class's register */
body.in-class .regwrap { grid-template-columns: minmax(0, 1fr); }
body.in-class .reglist { display: none !important; }
@media (max-width: 1100px) { .regwrap { grid-template-columns: minmax(0, 1fr); } .reglist { position: static; } }
/* section names can be anything (A/B, colours, names): the chip shows the class, the section name sits in the text */
.rl-n b em { font-style: normal; font-weight: 500; color: var(--ink-2); }
.rl-n b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chero-ic { display: grid; place-content: center; text-align: center; line-height: 1.05; }
.chero-ic small { display: block; font-size: .42em; font-weight: 600; letter-spacing: .02em; opacity: .8; max-width: 64px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 3px; }
/* register list grouped by class: sections as small buttons inside the class row */
.rl-cls { padding: 8px 10px 10px; border-radius: 12px; display: grid; gap: 8px; }
.rl-cls.has-on { background: color-mix(in srgb, var(--org) 5%, var(--panel)); }
.rl-ch { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; align-items: center; }
.rl-ch .cc { height: 28px; min-width: 38px; border-radius: 9px; font-size: 11.5px; }
.rl-secs { display: flex; flex-wrap: wrap; gap: 6px; padding-left: 48px; }
.reglist .secb.rl-sec { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; background: var(--soft); font-size: 12.5px; font-weight: 600; color: var(--ink); max-width: 100%; transform: none; box-shadow: none; transition: background .15s; }
.reglist .secb.rl-sec:hover { background: var(--track); transform: none; box-shadow: none; }
.reglist .secb.rl-sec.on { background: var(--org); color: #fff; }
.reglist .secb.rl-sec.on::after { display: none; }
.rl-sec i { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.rl-sec.todo i { box-shadow: inset 0 0 0 2px var(--red); } .rl-sec.abs i { background: #f39200; } .rl-sec.ok i { background: var(--green); }
.rl-sec.on i { box-shadow: 0 0 0 2px #fff; }
.rl-sec.on.todo i { background: #fff; box-shadow: inset 0 0 0 2px var(--red), 0 0 0 1.5px #fff; }
.rl-sec em { font-style: normal; font-size: 11px; background: #ffe9c7; color: #8a5200; border-radius: 99px; padding: 0 6px; }
.rl-sec.on em { background: rgba(255,255,255,.25); color: #fff; }
.rl-f { margin-top: 10px; justify-self: start; }
.rl-f button { padding: 5px 12px; font-size: 12px; }
.rl-f em { font-style: normal; font-size: 11px; background: var(--red-s); color: var(--red); border-radius: 99px; padding: 0 6px; margin-left: 2px; }
.rl-key { display: flex; flex-wrap: wrap; gap: 6px 12px; padding: 12px 10px 4px; margin-top: 6px; border-top: 1px solid var(--line); font-size: 11px; color: var(--mute); }
.rl-key span { display: inline-flex; align-items: center; gap: 5px; }
.rl-key i { width: 8px; height: 8px; border-radius: 50%; }
.rl-key .todo i { box-shadow: inset 0 0 0 2px var(--red); } .rl-key .abs i { background: #f39200; } .rl-key .ok i { background: var(--green); }
.rl-none { display: flex; align-items: center; gap: 8px; padding: 14px 10px; font-size: 13px; color: var(--green); font-weight: 600; margin: 0; }
.rl-none svg { width: 16px; height: 16px; }
.reglist { max-height: calc(100vh - 32px); overflow-y: auto; scrollbar-width: thin; }
@media (max-width: 1100px) { .reglist { max-height: none; } }
/* register list = classes only; the class's sections are switched at the top of the register */
.reglist { max-height: none; overflow: visible; }
.reglist .rl-cls-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 12px; background: none; border: 0; font: inherit; color: var(--ink); text-align: left; cursor: pointer; transition: background .15s; }
.reglist .rl-cls-row:hover { background: var(--soft); }
.reglist .rl-cls-row.on { background: var(--org-s); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--org) 40%, transparent); }
body[data-theme="dark"] .reglist .rl-cls-row.on { background: color-mix(in srgb, var(--org) 22%, var(--panel)); }
.reg-secs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 12px; }
.reg-secs > .muted { font-size: 12px; margin-right: 4px; }
.reg .secb.rs-b { display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px 6px 10px; border-radius: 999px; background: var(--soft); font-size: 13px; font-weight: 600; color: var(--ink); transform: none; box-shadow: none; transition: background .15s; }
.reg .secb.rs-b:hover { background: var(--track); transform: none; box-shadow: none; }
.reg .secb.rs-b small { font-size: 11.5px; font-weight: 500; color: var(--mute); }
.reg .secb.rs-b i { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.rs-b.todo i { box-shadow: inset 0 0 0 2px var(--red); } .rs-b.abs i { background: #f39200; } .rs-b.ok i { background: var(--green); }
.reg .secb.rs-b.on { background: var(--org); color: #fff; }
.reg .secb.rs-b.on::after { display: none; }
.reg .secb.rs-b.on small { color: rgba(255,255,255,.8); }
.rs-b.on i { box-shadow: 0 0 0 1.5px #fff; }
.rs-b.on.todo i { background: #fff; box-shadow: inset 0 0 0 2px var(--red), 0 0 0 1.5px #fff; }

/* ---------- loading skeleton (js/skel.js), as on the asset register ----------
   Grey shimmering shapes in the page's own layout, drawn over the page the moment it starts and faded out once the
   page is built; colours follow the theme. */
.boot-skel { position: fixed; inset: 0; z-index: 5000; overflow: hidden; display: grid; grid-template-columns: 244px minmax(0, 1fr); gap: 16px; padding: 16px max(16px, calc((100vw - 1680px) / 2 + 16px)); align-content: start; background: var(--bg); transition: opacity .18s ease; }
.boot-skel > * { max-width: 100%; }
.boot-skel.out { opacity: 0; pointer-events: none; }
.sk { display: block; flex: none; max-width: 100%; border-radius: 7px; background: linear-gradient(90deg, var(--track) 0%, var(--soft) 45%, var(--track) 90%); background-size: 220% 100%; animation: skm 1.25s linear infinite; }
@keyframes skm { from { background-position: 120% 0; } to { background-position: -100% 0; } }
.sk-p { background: var(--panel); border-radius: 22px; padding: 22px; display: grid; gap: 12px; align-content: start; box-shadow: 0 1px 0 rgba(22,27,38,.04), 0 12px 32px -18px rgba(22,27,38,.18); }
.bs-side { gap: 18px; align-content: start; height: calc(100vh - 32px); }
.bs-main { display: grid; gap: 16px; align-content: start; min-width: 0; }
.bs-top { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; min-height: 64px; }
.sk-head { display: flex; justify-content: space-between; align-items: end; gap: 16px; padding: 6px 4px 0; min-height: 62px; }
.sk-head > span, .sk-hello { display: grid; gap: 10px; flex: 1; min-width: 0; }
.sk-hello { padding: 6px 4px 0; }
.sk-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.sk-filters { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 2px 0 4px; }
.sk-kpis { display: grid; grid-template-columns: repeat(var(--n, 4), minmax(0, 1fr)); gap: 16px; }
.sk-kpi { min-height: 168px; gap: 10px; }
.sk-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); }
.sk-row span { display: grid; gap: 7px; }
.sk-row.s { padding: 6px 0; border-top: 0; }
.sk-two { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 16px; }
.sk-two.b { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.sk-side { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: 16px; align-items: start; }
.sk-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.sk-grid { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 6px; }
.sk-hero { gap: 18px; }
.sk-hh { display: flex; gap: 18px; align-items: center; } .sk-hh > span { display: grid; gap: 10px; flex: 1; min-width: 0; }
@media (max-width: 1100px) { .sk-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .sk-two, .sk-side { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 860px) {
  .boot-skel { grid-template-columns: minmax(0, 1fr); padding: 12px; gap: 12px; }
  .bs-side { display: none; }
  .bs-main { gap: 12px; }
  .sk-cards, .sk-two.b { grid-template-columns: minmax(0, 1fr); }
  .sk-kpis { display: flex; overflow: hidden; } .sk-kpi { flex: 0 0 72%; }
  .sk-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sk-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) { .sk { animation: none; } }

/* ---------- switching pages: a quick cross-fade instead of a blank flash; sidebar and top bar stay put ---------- */
@view-transition { navigation: auto; }
.side { view-transition-name: sis-side; }
.top { view-transition-name: sis-top; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .16s; }
@media (prefers-reduced-motion: reduce) { ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; } }
/* menu tint: one quick, smooth glide (.3 s) that finishes before the page changes */
.nav-ind { transition: transform .3s cubic-bezier(.4, 0, .2, 1), height .2s; }
.nav-ind.instant { transition: none; }
.side { view-transition-name: none; }
/* skeleton covers only the content area: the sidebar and top bar are the same on every page and show through */
.boot-skel { background: none; pointer-events: none; }
.bs-side, .bs-top { visibility: hidden; }
.bs-top { min-height: 64px; }
.bs-body { display: grid; gap: 16px; align-content: start; background: var(--bg); margin: -16px -16px 0; padding: 16px; min-height: 100vh; }
@media (max-width: 860px) { .bs-body { gap: 12px; margin: -12px -12px 0; padding: 12px; } }
/* role-based menu (17 Nov): a plain list, no group headings; same spacing as before */
/* ---------- Classes & sections: a directory, one row per section (17 Nov) ---------- */
.dir { padding: 8px 12px 12px; }
.dir-lv { font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--mute); padding: 16px 10px 6px; }
.dir-lv:first-child { padding-top: 10px; }
.dir-cls { padding: 6px 0 10px; }
.dir-cls + .dir-cls { border-top: 1px solid var(--line); }
.dir-ch { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 10px 6px; }
.dir-ch .cc { height: 32px; min-width: 42px; border-radius: 10px; font-size: 12px; }
.dir-cn b { display: block; font: 600 15.5px var(--num); } .dir-cn small { display: block; font-size: 12px; color: var(--mute); }
.dir-ct { white-space: nowrap; }
.dir-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr) 120px auto; gap: 16px; align-items: center; margin-left: 54px; padding: 8px 10px; border-radius: 14px; transition: background .15s; }
.dir-row:hover { background: var(--soft); }
.dir-sec { color: var(--ink); text-decoration: none; min-width: 0; }
.dir-sec b { display: block; font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dir-sec small { font-size: 11.5px; color: var(--mute); }
.dir-sec:hover b { color: var(--org-d); }
.dir-t { display: flex; align-items: center; gap: 9px; min-width: 0; }
.dir-t > span { min-width: 0; } .dir-t b { display: block; font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .dir-t small { font-size: 11.5px; color: var(--mute); }
.dir-n b { display: block; font: 600 16px var(--num); } .dir-n small { font-size: 11.5px; color: var(--mute); white-space: nowrap; }
.dir-doors { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.dir-door { display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px; border-radius: 999px; background: var(--panel); box-shadow: inset 0 0 0 1px var(--line); font-size: 12.5px; font-weight: 600; color: var(--ink-2); text-decoration: none; transition: background .15s, color .15s, box-shadow .15s; }
.dir-door svg { width: 14px; height: 14px; }
.dir-door:hover { background: var(--org-s); color: var(--org-d); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--org) 40%, transparent); }
@media (max-width: 1100px) { .dir-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr) 100px; } .dir-doors { grid-column: 1 / -1; justify-content: flex-start; } }
@media (max-width: 860px) { .dir-row { margin-left: 0; grid-template-columns: minmax(0, 1fr) auto; } .dir-t { grid-column: 1 / -1; grid-row: 2; } .dir-ch { grid-template-columns: auto minmax(0, 1fr); } .dir-ct { grid-column: 1 / -1; justify-self: start; } .dir-door span { display: none; } .dir-door { padding: 7px 10px; } }
/* ---------- Classes directory: a soft tint on the class you point at, and the section row inside lifts to white
   (the register's rule: inside a tint, hover uses the panel colour) ---------- */
.dir-cls { border-radius: 16px; transition: background .15s; }
.dir-cls:hover { background: var(--soft); }
.dir-cls:hover + .dir-cls, .dir-cls:hover { border-top-color: transparent; }
.dir-cls:hover .dir-row:hover { background: var(--panel); box-shadow: 0 1px 0 rgba(22,27,38,.04), 0 6px 16px -10px rgba(22,27,38,.25); }
/* Classes directory, section hover v2: the class block keeps its soft tint; the section row under the pointer gets
   a slightly deeper violet tint that stays inside the class block (no white, no shadow) */
.dir-cls { padding-left: 6px; padding-right: 6px; }
.dir-cls:hover .dir-row:hover, .dir-row:hover { background: color-mix(in srgb, var(--org) 8%, var(--soft)); box-shadow: none; }
.dir-row:hover .dir-sec b { color: var(--org-d); }
/* ---------- Applications: one table with stage pills, form fee and a row menu (17 Nov) ---------- */
.stg { display: inline-flex; align-items: center; gap: 7px; padding: 4px 10px; border-radius: 999px; background: var(--soft); font-size: 12px; font-weight: 600; color: var(--ink); white-space: nowrap; }
.stg i { width: 8px; height: 8px; border-radius: 50%; background: var(--mute); }
.stg-new i { background: var(--blue); } .stg-interview i { background: #f39200; } .stg-offer i { background: var(--org); }
.stg-enrolled { background: var(--green-s); color: var(--green); } .stg-enrolled i { background: var(--green); }
.stg-declined { color: var(--mute); } .stg-declined i { background: var(--red); }
.fee-ok { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 600; color: var(--green); } .fee-ok svg { width: 14px; height: 14px; stroke-width: 2.4; }
.fee-no { font-size: 13px; font-weight: 600; color: var(--red); }
.rmw { position: relative; display: inline-block; }
.rmenu { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; color: var(--mute); transition: background .15s, color .15s; }
.rmenu:hover { background: var(--soft); color: var(--ink); } .rmenu svg { width: 17px; height: 17px; }
.rm-pop { position: absolute; right: 0; top: calc(100% + 6px); z-index: 50; min-width: 230px; padding: 6px; border-radius: 16px; display: grid; gap: 2px; box-shadow: 0 18px 40px -16px rgba(22,27,38,.35), 0 0 0 1px var(--line); text-align: left; }
.rm-pop button { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 10px; font-size: 13px; font-weight: 600; color: var(--ink); text-align: left; }
.rm-pop button:hover:not(:disabled) { background: var(--soft); }
.rm-pop button:disabled { color: var(--mute); cursor: not-allowed; }
.rm-pop button svg { width: 16px; height: 16px; flex: none; }
.rm-pop small { display: block; font-size: 11px; font-weight: 500; color: var(--red); }
.rm-pop [data-ra="decline"] { color: var(--red); }
/* Attendance: SMS status for absent pupils, and the phone picker that replaces the register list on small screens */
.reg .why { display: grid; gap: 4px; }
.sms { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 600; justify-self: start; }
.sms svg { width: 13px; height: 13px; stroke-width: 2.4; }
.sms.ok { color: var(--green); }
.sms.bad { color: var(--red); background: var(--red-s); padding: 3px 9px; border-radius: 999px; cursor: pointer; }
.sms.bad:hover { filter: brightness(.97); }
.reg-mpick { display: none; margin-bottom: 12px; }
.reg-mpick select { width: 100%; max-width: none; height: 44px; font-size: 14px; }
@media (max-width: 860px) { .reglist { display: none !important; } .reg-mpick { display: block; } }
body.in-class .reg-mpick { display: none !important; }
#attExport[hidden] { display: none; }
.necta { font-family: var(--mono, ui-monospace, monospace); font-size: 11px; color: var(--org-d); }

/* ---------- one row hover everywhere (17 Nov) ----------
   Every list row gets the same soft tint under the pointer, with straight edges (no rounded corners), so it is
   always clear which row the cursor is on: table rows, feed rows, the Classes directory, the register list, the
   settings feature rows. Header and total rows stay as they are. */
/* straight edges only for table rows; list rows, cards and blocks keep their rounded corners */
.dt .dr { border-radius: 0 !important; }
.dt .dr:not(.tot):hover, .feed .fd:hover, a.fd:hover, .feat:hover { background: var(--soft); }
.dt .dr.picked:hover { background: color-mix(in srgb, var(--org) 14%, var(--panel)); }
.dt .dr.tot:hover { background: var(--soft); }

.attn .dt .dr:hover, .attn .feed .fd:hover { background: rgba(255,255,255,.07); }
/* meter rows (periods per subject, teacher workload) and the dashboard's dark Needs attention list follow the same row rule */
.mt { padding: 8px 10px; margin: 0 -10px; border-radius: 12px; transition: background .15s; }
.mt:hover { background: var(--soft); }

/* meter labels had room but were cut at 140px ('Science and Techn…'): give them up to 210px */
.mt { grid-template-columns: minmax(110px, 210px) 1fr auto; }

/* timetable tiles inside pop-up windows too (a teacher's week in their details) */
.fm .tt .slot { border-left: 0; background: color-mix(in srgb, var(--c, var(--org)) 14%, var(--panel)); align-content: center; gap: 2px; box-shadow: none; }
.fm .tt .slot:hover { background: color-mix(in srgb, var(--c, var(--org)) 24%, var(--panel)); transform: none; }
.fm .tt .slot b { color: var(--ink); }
.fm .tt .slot small { color: color-mix(in srgb, var(--c, var(--org)) 55%, var(--ink-2)); }
.fm .tt .brk { background: var(--soft); letter-spacing: .1em; font-size: 10px; }
.fm .tt .empty-s { border: 0; background: none; }
/* a window heading right after a list of details: the details' own bottom line is enough, no second line above the heading */
.fm-body .facts + .fm-h { border-top: 0; padding-top: 4px; }

/* skeleton only when a page is slow: invisible until skel.js adds .show after 250 ms */
.boot-skel { opacity: 0; transition: opacity .15s ease; }
.boot-skel.show { opacity: 1; }
.boot-skel.out { opacity: 0; }
/* page switches: the sidebar and top bar stay in place (only the content changes) */
.side { view-transition-name: sis-side; }
.top { view-transition-name: sis-top; }
::view-transition-group(sis-side), ::view-transition-group(sis-top) { animation-duration: 0s; }
::view-transition-old(sis-side), ::view-transition-old(sis-top) { display: none; }
::view-transition-new(sis-side), ::view-transition-new(sis-top) { animation: none; }
/* after the first page of a visit: no entrance animations, pages simply appear */
body.calm .main [data-mk-reveal]:not(.is-in) { opacity: 1 !important; transform: none !important; transition: none !important; }
body.calm .donut svg.intro .sweep { stroke-dashoffset: 0 !important; animation: none !important; }
/* dropdowns inside pop-up windows lost their chevron to a later background rule: put it back */
.fm .sel select, .fm .fm-f select, .fm-body select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23677084' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important; background-position: right 12px center !important; background-size: 14px 14px !important; padding-right: 34px !important; -webkit-appearance: none; appearance: none;
}
/* class pages: the class header stays exactly where it is while its tabs switch (only the tab content changes) */
.chero { view-transition-name: sis-classhead; }
::view-transition-group(sis-classhead) { animation-duration: 0s; }
::view-transition-old(sis-classhead) { display: none; }
::view-transition-new(sis-classhead) { animation: none; }
/* page titles stay still when a tab loads its own page (Staff: Teachers / Subjects) */
.main > .phead { view-transition-name: sis-phead; }
::view-transition-group(sis-phead) { animation-duration: 0s; }
::view-transition-old(sis-phead) { display: none; }
::view-transition-new(sis-phead) { animation: none; }

/* header cards (pupil page, class page) look the same on every page: these two rules used to live only in pages-a.css,
   which only the Pupils tab loads, so the class header changed shape between tabs */
.dhero .dpills { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.dhero .adm { font: 600 12px var(--ui); letter-spacing: .08em; text-transform: uppercase; color: var(--mute); }

/* ---------- photo picker (pupils, applicants, teachers, my profile, school crest) ---------- */
.ph-pick { display: flex; align-items: center; gap: 16px; }
.ph-prev .av.l { width: 72px; height: 72px; border-radius: 22px; }
.ph-none { background: var(--soft) !important; color: var(--mute); display: grid; place-items: center; }
.ph-none svg { width: 26px; height: 26px; }
.ph-act { display: grid; gap: 6px; } .ph-act > span { display: flex; flex-wrap: wrap; gap: 6px; }
.ph-act small { font-size: 12px; color: var(--mute); }
.ph-rm { color: var(--red); }
.ph-cam { display: inline-flex; } /* phones: the phone camera; computers: live webcam preview (kit.js webcam) */
.cam-wrap { position: fixed; inset: 0; z-index: 10000; display: grid; place-items: center; background: rgba(14, 18, 25, .6); padding: 16px; }
.cam-box { width: min(560px, 100%); padding: 16px; display: grid; gap: 12px; }
.cam-box video { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 14px; background: #000; transform: scaleX(-1); }
.cam-msg { margin: 0; font-size: 13px; }
.cam-act { display: flex; gap: 10px; justify-content: flex-end; }
/* tap a photo to change it (pupil header, my profile) */
.ph-hero { position: relative; padding: 0; border: 0; background: none; border-radius: 28px; cursor: pointer; }
.ph-hero > span:last-child { position: absolute; right: -4px; bottom: -4px; width: 30px; height: 30px; border-radius: 50%; background: var(--panel); color: var(--ink-2); display: grid; place-items: center; box-shadow: 0 2px 8px rgba(22,27,38,.18); opacity: 0; transition: opacity .15s; }
.ph-hero > span:last-child svg { width: 15px; height: 15px; }
.ph-hero:hover > span:last-child, .ph-hero:focus-visible > span:last-child { opacity: 1; }
@media (hover: none) { .ph-hero > span:last-child { opacity: 1; } }
.ph-hero.sm > span:last-child { width: 26px; height: 26px; right: -6px; bottom: -6px; }
/* an uploaded crest fills its tile; my photo fills the round avatar */
.crest-img { width: 100%; height: 100%; object-fit: contain; display: block; }
.avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; display: block; }
.prof-ph { margin-top: 8px; justify-self: start; }
.prof > div { display: grid; justify-items: start; }

/* ---------- the Student IS logo ("the reader", 18 Nov): light violet tile, violet child and left page, ink right page ---------- */
.crest.brand, .lcrest.brand { background: #efe7fd !important; box-shadow: none !important; }
.brand-mk .bm-a { fill: #6d28d9; } .brand-mk .bm-c { fill: #1b1530; }
.sbrand .crest.brand svg { width: 26px; height: 26px; }
body[data-theme="dark"] .crest.brand, body[data-theme="dark"] .lcrest.brand { background: #2a2140 !important; }
body[data-theme="dark"] .brand-mk .bm-a { fill: #c4b5fd; } body[data-theme="dark"] .brand-mk .bm-c { fill: #fff; }

/* summary cards folded on list pages (shell.js "Summary" button) */
body.kp-shut .main .kpis { display: none !important; }
