/*!
 * eSchool ERP & LMS — Copyright (c) 2026 Design Technosoft. All rights reserved.
 *
 * Proprietary and confidential. This file is part of eSchool ERP & LMS and is protected by copyright law,
 * including the Copyright Act, 2059 (2002) of Nepal and international copyright treaties.
 * Unauthorized copying, modification, distribution, hosting, resale or reuse of this file, of any
 * part of it, or of code copied or closely imitated from it, is strictly prohibited.
 * Anyone who steals or copies this code, in whole or in part, will face legal action.
 *
 * www.designtechnosoft.com · info@designtechnosoft.com
 */
/* ==========================================================================
   eSchool ERP & LMS design system — tokens, layout, components.
   Light/dark via data-theme on <html> (or the OS preference when unset).
   No external fonts: system UI stack with Devanagari fallback for Nepali.
   ========================================================================== */
:root {
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Noto Sans Devanagari", "Mukta", sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --radius-sm: 8px; --radius: 12px; --radius-lg: 16px;
  --space-1: .25rem; --space-2: .5rem; --space-3: .75rem; --space-4: 1rem; --space-5: 1.5rem; --space-6: 2rem;
  --sidebar-w: 264px; --topbar-h: 64px;
  --bg: #f4f5fa; --surface: #ffffff; --surface-2: #f1f3f9; --surface-3: #e8ebf3;
  --text: #151826; --text-2: #3c4256; --muted: #636a80; --border: #e1e4ee; --border-strong: #cdd2df;
  --brand: #4f46e5; --brand-hover: #4338ca; --brand-ink: #ffffff; --brand-soft: #ecebfe; --brand-text: #3f37c9;
  --ok: #0f7a4a; --ok-bg: #e4f5ec; --warn: #8a5a00; --warn-bg: #fff3d6; --err: #b42318; --err-bg: #fdeceb;
  --info: #1d4f91; --info-bg: #e7effc;
  --shadow-sm: 0 1px 2px rgb(16 24 40 / .05);
  --shadow: 0 1px 2px rgb(16 24 40 / .04), 0 6px 20px rgb(16 24 40 / .06);
  --shadow-lg: 0 20px 48px rgb(16 24 40 / .18);
  --focus: 0 0 0 3px rgb(79 70 229 / .35);
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0e1016; --surface: #161922; --surface-2: #1d212c; --surface-3: #262b38;
  --text: #eceef5; --text-2: #c9cddb; --muted: #9ba1b5; --border: #282d3a; --border-strong: #363c4d;
  --brand: #8b84ff; --brand-hover: #a19bff; --brand-ink: #0f1016; --brand-soft: #25234a; --brand-text: #b3aeff;
  --ok: #5bd39c; --ok-bg: #11301f; --warn: #f2c15e; --warn-bg: #33270c; --err: #ff8a7e; --err-bg: #3a1613;
  --info: #8db6ff; --info-bg: #14233c;
  --shadow-sm: none; --shadow: 0 1px 2px rgb(0 0 0 / .35); --shadow-lg: 0 20px 48px rgb(0 0 0 / .55);
  --focus: 0 0 0 3px rgb(139 132 255 / .45);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e1016; --surface: #161922; --surface-2: #1d212c; --surface-3: #262b38;
    --text: #eceef5; --text-2: #c9cddb; --muted: #9ba1b5; --border: #282d3a; --border-strong: #363c4d;
    --brand: #8b84ff; --brand-hover: #a19bff; --brand-ink: #0f1016; --brand-soft: #25234a; --brand-text: #b3aeff;
    --ok: #5bd39c; --ok-bg: #11301f; --warn: #f2c15e; --warn-bg: #33270c; --err: #ff8a7e; --err-bg: #3a1613;
    --info: #8db6ff; --info-bg: #14233c;
    --shadow-sm: none; --shadow: 0 1px 2px rgb(0 0 0 / .35); --shadow-lg: 0 20px 48px rgb(0 0 0 / .55);
    --focus: 0 0 0 3px rgb(139 132 255 / .45);
    color-scheme: dark;
  }
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 15px/1.6 var(--font); color: var(--text); background: var(--bg); overflow-x: hidden; }
h1, h2, h3 { line-height: 1.25; margin: 0 0 var(--space-2); color: var(--text); }
h1 { font-size: clamp(1.35rem, 2.2vw, 1.7rem); letter-spacing: -.01em; }
h2 { font-size: 1.05rem; }
h3 { font-size: .98rem; }
p { margin: 0 0 var(--space-3); }
a { color: var(--brand-text); text-underline-offset: 2px; }
code { font: .85em var(--mono); background: var(--surface-2); padding: .1em .4em; border-radius: 6px; }
img, svg { max-width: 100%; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 6px; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.nowrap { white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); border: 0; }
.skip-link { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--brand); color: var(--brand-ink); padding: .5rem 1rem; border-radius: var(--radius-sm); }
.skip-link:focus { left: 8px; }
.icon { width: 20px; height: 20px; flex: none; }
.icon--sm { width: 16px; height: 16px; }

/* ---------- app shell ---------- */
.app-shell { display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; overflow-y: auto; background: var(--surface); border-right: 1px solid var(--border); display: flex; flex-direction: column; }
.sidebar__brand { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-4) var(--space-4) var(--space-3); min-height: var(--topbar-h); }
.brand-mark { width: 38px; height: 38px; border-radius: 11px; flex: none; display: grid; place-items: center; font-weight: 800; background: linear-gradient(135deg, var(--brand), #7c3aed); color: #fff; }
.brand-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.brand-text strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-text small { color: var(--muted); font-size: .78rem; }
.sidebar__close { display: none; margin-left: auto; }
.sidebar__nav { padding: var(--space-2) var(--space-3) var(--space-5); }
.nav-label { margin: var(--space-4) var(--space-3) var(--space-2); font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.nav-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.nav-link { display: flex; align-items: center; gap: var(--space-3); padding: .55rem .75rem; border-radius: 10px; color: var(--text-2); text-decoration: none; font-weight: 500; }
.nav-link:hover { background: var(--surface-2); color: var(--text); }
.nav-link.is-active { background: var(--brand-soft); color: var(--brand-text); font-weight: 600; }
.nav-count { margin-left: auto; background: var(--brand); color: var(--brand-ink); font-size: .72rem; font-weight: 700; padding: 0 .45rem; border-radius: 999px; }
.sidebar-backdrop { display: none; }

.main-col { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 20; height: var(--topbar-h); display: flex; align-items: center; gap: var(--space-3); padding: 0 clamp(1rem, 3vw, 2rem); background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
.topbar__menu { display: none; }
.topbar__actions { margin-left: auto; display: flex; align-items: center; gap: var(--space-2); }
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: .35rem; margin: 0; padding: 0; font-size: .88rem; color: var(--muted); }
.breadcrumbs li + li::before { content: "/"; margin-right: .35rem; color: var(--border-strong); }
.breadcrumbs a { color: var(--muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--text); }
.content { padding: clamp(1rem, 3vw, 2rem); display: grid; gap: var(--space-5); align-content: start; max-width: 1400px; width: 100%; }
.content:focus { outline: none; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; min-height: 40px; padding: .5rem 1rem; border-radius: 10px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; white-space: nowrap; transition: background .15s, border-color .15s, transform .05s; }
.btn:hover { background: var(--surface-2); }
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.btn--primary:hover { background: var(--brand-hover); border-color: var(--brand-hover); }
.btn--danger { background: var(--err); border-color: var(--err); color: #fff; }
.btn--ghost-danger { color: var(--err); }
.btn--ghost-danger:hover { background: var(--err-bg); border-color: var(--err); }
.btn--sm { min-height: 32px; padding: .3rem .7rem; font-size: .85rem; border-radius: 8px; }
.btn--block { width: 100%; }
.btn[disabled], .btn.is-disabled { opacity: .5; cursor: not-allowed; pointer-events: none; }
.icon-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; border: 1px solid transparent; background: transparent; color: var(--text-2); cursor: pointer; position: relative; }
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.icon-btn--sm { width: 28px; height: 28px; }
.has-badge .dot { position: absolute; top: 9px; right: 9px; width: 8px; height: 8px; border-radius: 50%; background: var(--err); box-shadow: 0 0 0 2px var(--bg); }
.theme-icon { display: none; }
[data-theme-toggle][data-theme="light"] .theme-icon--light, [data-theme-toggle][data-theme="dark"] .theme-icon--dark, [data-theme-toggle][data-theme="system"] .theme-icon--system { display: block; }

/* ---------- user menu / dropdown ---------- */
.dropdown { position: relative; }
.user-btn { display: flex; align-items: center; gap: var(--space-2); padding: .25rem .5rem .25rem .25rem; border-radius: 12px; border: 1px solid transparent; background: transparent; color: inherit; font: inherit; cursor: pointer; }
.user-btn:hover { background: var(--surface-2); }
.user-btn__text { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.2; }
.user-btn__text small { color: var(--muted); font-size: .75rem; }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-size: .8rem; font-weight: 700; background: var(--brand-soft); color: var(--brand-text); flex: none; }
.dropdown__menu { position: absolute; right: 0; top: calc(100% + 6px); min-width: 210px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: var(--space-2); z-index: 40; }
.dropdown__menu a, .dropdown__menu button { display: flex; width: 100%; align-items: center; gap: var(--space-2); padding: .55rem .65rem; border-radius: 8px; border: 0; background: none; color: var(--text); font: inherit; text-decoration: none; cursor: pointer; text-align: left; }
.dropdown__menu a:hover, .dropdown__menu button:hover { background: var(--surface-2); }
.dropdown__menu form { margin: 0; }

/* ---------- page structure ---------- */
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--space-3); }
.page-head h1 { margin-bottom: .15rem; }
.page-head p { margin: 0; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); padding: clamp(1rem, 2.5vw, 1.5rem); min-width: 0; }
.card--flush { padding: 0; overflow: hidden; }
.card__head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); margin-bottom: var(--space-3); }
.card__head h2 { margin: 0; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-5); align-items: start; }
.grid-2--tight { gap: 0 var(--space-4); }
.stack { display: grid; gap: var(--space-4); }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); flex-wrap: wrap; }
.form-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: var(--space-2); }
.session-pill { display: inline-flex; align-items: center; gap: .4rem; padding: .35rem .8rem; border-radius: 999px; background: var(--brand-soft); color: var(--brand-text); font-size: .88rem; }

/* ---------- stats ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: var(--space-4); }
.stat { display: flex; align-items: center; gap: var(--space-3); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: var(--space-4); box-shadow: var(--shadow-sm); }
.stat__icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand-text); flex: none; }
.stat--ok .stat__icon { background: var(--ok-bg); color: var(--ok); }
.stat--warn .stat__icon { background: var(--warn-bg); color: var(--warn); }
.stat--err .stat__icon { background: var(--err-bg); color: var(--err); }
.stat--info .stat__icon { background: var(--info-bg); color: var(--info); }
.stat__label { margin: 0; color: var(--muted); font-size: .85rem; }
.stat__value { margin: 0; font-size: 1.55rem; font-weight: 750; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }

/* ---------- lists ---------- */
.activity { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-3); }
.activity li { display: flex; gap: var(--space-3); }
.activity p { margin: 0; }
.activity__dot { width: 9px; height: 9px; margin-top: .5rem; border-radius: 50%; background: var(--brand); flex: none; box-shadow: 0 0 0 4px var(--brand-soft); }
.checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-3); }
.checklist li { display: flex; gap: var(--space-2); align-items: center; color: var(--text-2); }
.checklist li.is-done { color: var(--ok); }
.notif-list { list-style: none; margin: 0; padding: 0; }
.notif { display: flex; gap: var(--space-3); align-items: flex-start; padding: var(--space-4) var(--space-5); border-bottom: 1px solid var(--border); }
.notif:last-child { border-bottom: 0; }
.notif.is-unread { background: color-mix(in srgb, var(--brand-soft) 45%, transparent); }
.notif__body { flex: 1; min-width: 0; }
.notif__body p { margin: 0 0 .15rem; }
.notif__title { font-weight: 600; }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th, .table td { padding: .75rem 1rem; text-align: left; border-bottom: 1px solid var(--border); vertical-align: top; }
.table th { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); background: var(--surface-2); font-weight: 700; white-space: nowrap; }
.table tbody tr:hover { background: color-mix(in srgb, var(--surface-2) 60%, transparent); }
.table tbody tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table .actions { display: flex; gap: var(--space-2); justify-content: flex-end; }
.table .actions form { margin: 0; }
.sort { color: inherit; text-decoration: none; }

/* ---------- badges / alerts ---------- */
.badge { display: inline-flex; align-items: center; padding: .1rem .55rem; border-radius: 999px; font-size: .75rem; font-weight: 700; background: var(--surface-3); color: var(--text-2); white-space: nowrap; }
.badge--ok { background: var(--ok-bg); color: var(--ok); }
.badge--warn, .badge--high { background: var(--warn-bg); color: var(--warn); }
.badge--err, .badge--urgent { background: var(--err-bg); color: var(--err); }
.badge--info { background: var(--info-bg); color: var(--info); }
.alert { padding: .8rem 1rem; border-radius: var(--radius); border: 1px solid transparent; }
.alert--info { background: var(--info-bg); color: var(--info); }
.alert--error { background: var(--err-bg); color: var(--err); }
.alert--success { background: var(--ok-bg); color: var(--ok); }
.alert--warning { background: var(--warn-bg); color: var(--warn); }

/* ---------- forms ---------- */
.field { display: grid; gap: .35rem; margin-bottom: var(--space-1); min-width: 0; }
.field label { font-weight: 600; font-size: .88rem; color: var(--text-2); }
.field > .label { font-weight: 600; font-size: .88rem; color: var(--text-2); }
.field .check, .field .accent-pick { font-weight: 400; color: var(--text); }
.field input, .field select, .field textarea { width: 100%; min-height: 42px; padding: .55rem .8rem; border-radius: 10px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); font: inherit; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--brand); box-shadow: var(--focus); }
.field input:disabled, .field select:disabled { background: var(--surface-2); color: var(--muted); }
.field--error input, .field--error select { border-color: var(--err); }
.field__hint { margin: 0; font-size: .82rem; color: var(--muted); }
.field__error { margin: 0; font-size: .82rem; color: var(--err); font-weight: 600; }
.input-group { position: relative; }
.input-group input { padding-right: 3rem; }
.input-group__btn { position: absolute; right: 2px; top: 50%; transform: translateY(-50%); }
.check { display: inline-flex; align-items: center; gap: .5rem; cursor: pointer; }
.check input { width: 17px; height: 17px; accent-color: var(--brand); }
.check.is-disabled { color: var(--muted); cursor: not-allowed; }
.filters { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: flex-end; } /* side by side; (the old grid mixed 2fr with auto-fit, which browsers drop) */
.filters > * { flex: 1 1 160px; min-width: 0; }
.filters > :first-child { flex: 2 1 220px; }
.filters > :not(.field):not(.filters__actions) { flex: 0 0 auto; }
.filters__actions { display: flex; gap: var(--space-2); }
.perm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: var(--space-4); }
.perm-group { border: 1px solid var(--border); border-radius: var(--radius); padding: var(--space-3) var(--space-4); margin: 0; display: grid; gap: .35rem; }
.perm-group legend { font-weight: 700; padding: 0 .3rem; font-size: .9rem; }

/* ---------- tabs / pagination / empty ---------- */
.tabs { display: flex; gap: var(--space-1); border-bottom: 1px solid var(--border); }
.tab { padding: .6rem 1rem; color: var(--muted); text-decoration: none; font-weight: 600; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tab.is-active { color: var(--brand-text); border-color: var(--brand); }
.pagination { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); flex-wrap: wrap; }
.pagination p { margin: 0; }
.pagination ul { list-style: none; display: flex; align-items: center; gap: var(--space-2); margin: 0; padding: 0; }
.pagination__pos { color: var(--muted); font-size: .88rem; }
.empty { text-align: center; padding: clamp(1.5rem, 5vw, 3rem) var(--space-4); }
.empty__icon { width: 56px; height: 56px; margin: 0 auto var(--space-3); border-radius: 16px; display: grid; place-items: center; background: var(--surface-2); color: var(--muted); }
.empty h3 { margin-bottom: .25rem; }

/* ---------- toasts & modal ---------- */
.toasts { position: fixed; right: 1rem; top: calc(var(--topbar-h, 64px) + .75rem); z-index: 60; display: grid; gap: var(--space-2); width: min(400px, calc(100vw - 2rem)); }
.toast { --tc: var(--info); position: relative; overflow: hidden; display: flex; gap: .8rem; align-items: center; padding: .8rem .8rem .9rem; border-radius: 12px; background: var(--surface);
  border: 1px solid var(--border); border-left: 4px solid var(--tc); box-shadow: 0 12px 32px rgba(15, 23, 42, .16); animation: toast-in .45s cubic-bezier(.2, .9, .3, 1.25) both; }
.toast--success { --tc: var(--ok); } .toast--error { --tc: var(--err); } .toast--warning { --tc: var(--warn); } .toast--info { --tc: var(--info); }
.toast p { margin: 0; flex: 1; font-size: .93rem; color: var(--text); }
.toast__badge { flex: none; width: 38px; height: 38px; }
.toast__badge svg { width: 100%; height: 100%; fill: none; stroke: var(--tc); stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round; }
.toast__ring { stroke-dasharray: 145; stroke-dashoffset: 145; opacity: .35; animation: toast-draw .5s .15s ease-out forwards; }
.toast__mark { stroke-dasharray: 48; stroke-dashoffset: 48; animation: toast-draw .35s .55s ease-out forwards; }
.toast--success .toast__badge { animation: toast-pop .35s .85s ease-out; }
.toast--error .toast__badge { animation: toast-shake .4s .85s ease-in-out; }
.toast__ok { flex: none; padding: .35rem .8rem; border: 1px solid var(--border-strong); border-radius: 8px; background: var(--surface); color: var(--text); font: inherit; font-size: .85rem; font-weight: 600; cursor: pointer; }
.toast__ok:hover { background: var(--surface-2); } .toast__ok:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.toast__bar { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--tc); opacity: .55; transform-origin: left; animation: toast-time 6s linear forwards; }
.toast:hover .toast__bar { animation-play-state: paused; }
.toast.is-leaving { opacity: 0; transform: translateX(24px); transition: .25s ease-in; }
@keyframes toast-in { from { opacity: 0; transform: translateX(40px) scale(.96); } }
@keyframes toast-draw { to { stroke-dashoffset: 0; } }
@keyframes toast-pop { 50% { transform: scale(1.15); } }
@keyframes toast-shake { 25% { transform: translateX(-3px); } 75% { transform: translateX(3px); } }
@keyframes toast-time { to { transform: scaleX(0); } }
.modal { border: 0; border-radius: var(--radius-lg); padding: var(--space-5); width: min(440px, calc(100vw - 2rem)); background: var(--surface); color: var(--text); box-shadow: var(--shadow-lg); }
.modal::backdrop { background: rgb(10 12 20 / .5); }
.modal__actions { display: flex; justify-content: flex-end; gap: var(--space-2); margin-top: var(--space-4); }

/* ---------- auth pages ---------- */
body.auth { min-height: 100vh; background: radial-gradient(1200px 600px at 10% -10%, var(--brand-soft), transparent), var(--bg); }
.auth__wrap { min-height: 100vh; display: grid; place-items: center; align-content: center; gap: var(--space-4); padding: var(--space-4); }
.auth__card { width: min(420px, 100%); background: var(--surface); border: 1px solid var(--border); border-radius: 20px; box-shadow: var(--shadow); padding: clamp(1.5rem, 5vw, 2.25rem); }
.auth__brand { display: flex; align-items: center; gap: var(--space-3); margin-bottom: var(--space-5); font-size: 1.05rem; }
.auth__title { font-size: 1.4rem; }
.auth__foot { color: var(--muted); font-size: .8rem; margin: 0; }
.choice-list { display: grid; gap: var(--space-2); margin: var(--space-4) 0; }
.choice { display: flex; align-items: center; gap: var(--space-3); padding: .7rem .8rem; border: 1px solid var(--border-strong); border-radius: var(--radius); background: var(--surface); color: var(--text); font: inherit; font-weight: 600; cursor: pointer; text-align: left; }
.choice span:nth-child(2) { flex: 1; }
.choice:hover { border-color: var(--brand); background: var(--brand-soft); }
.error-card { text-align: center; }
.error-code { font-size: 3.2rem; font-weight: 800; color: var(--brand); margin: 0; line-height: 1; }

/* ---------- responsive ---------- */
@media (max-width: 1024px) {
  .app-shell { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: fixed; inset: 0 auto 0 0; width: min(300px, 86vw); z-index: 50; transform: translateX(-102%); transition: transform .2s ease; box-shadow: var(--shadow-lg); }
  body.sidebar-open .sidebar { transform: none; }
  body.sidebar-open .sidebar-backdrop { display: block; position: fixed; inset: 0; z-index: 45; background: rgb(10 12 20 / .45); }
  .sidebar__close, .topbar__menu { display: inline-grid; }
  .grid-2 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .user-btn__text, .breadcrumbs { display: none; }
  .filters > * { flex-basis: 100%; }
  .filters__actions .btn { flex: 1; }
  .table th, .table td { padding: .6rem .75rem; }
  .form-actions { flex-direction: column-reverse; }
  .form-actions .btn { width: 100%; }
  .notif { flex-wrap: wrap; padding: var(--space-3) var(--space-4); }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } .toast__ring, .toast__mark { stroke-dashoffset: 0; } .toast__bar { display: none; } }
@media print { .sidebar, .topbar, .toasts, .btn, .filters { display: none !important; } .app-shell { display: block; } .card { box-shadow: none; } }

/* ---------- Phase 3 additions ---------- */
.dl { display: grid; grid-template-columns: max-content 1fr; gap: .45rem 1.25rem; margin: 0 0 var(--space-4); }
.dl dt { color: var(--muted); font-size: .88rem; }
.dl dd { margin: 0; font-weight: 500; }
.callout { background: var(--surface-2); border-radius: var(--radius); padding: var(--space-4); }
.callout h3 { margin-bottom: .25rem; }
.card__pad { padding: clamp(1rem, 2.5vw, 1.5rem) clamp(1rem, 2.5vw, 1.5rem) var(--space-2); }
.mt { margin-top: var(--space-4); }
.row-gap { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-4); align-items: center; }
.stack--tight { gap: var(--space-2); }
.usage { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-3); }
.meter { display: block; width: 100%; height: 8px; margin-top: .3rem; border: 0; border-radius: 999px; background: var(--surface-3); }
.meter::-webkit-meter-bar { background: var(--surface-3); border: 0; border-radius: 999px; height: 8px; }
.meter::-webkit-meter-optimum-value, .meter--ok::-webkit-meter-suboptimum-value { background: var(--ok); border-radius: 999px; }
.meter::-webkit-meter-suboptimum-value { background: var(--warn); border-radius: 999px; }
.meter::-webkit-meter-even-less-good-value { background: var(--err); border-radius: 999px; }
.meter::-moz-meter-bar { background: var(--ok); border-radius: 999px; }
.meter--warn::-moz-meter-bar { background: var(--warn); } .meter--err::-moz-meter-bar { background: var(--err); }
.feature-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: .4rem 1rem; }
.feature-list li { display: flex; align-items: center; gap: .4rem; }
.feature-list .is-on .icon { color: var(--ok); } .feature-list .is-off { color: var(--muted); }
.action-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: var(--space-4); align-items: start; }
.action-card { border: 1px solid var(--border); border-radius: var(--radius); padding: var(--space-4); }
.action-card h3 { margin: 0; }
fieldset.plain { border: 0; padding: 0; margin: 0; min-width: 0; }
fieldset.plain legend { font-weight: 700; margin-bottom: var(--space-2); padding: 0; }
.auth__card:has(form fieldset) { width: min(560px, 100%); }
.auth__alt { margin-top: var(--space-4); text-align: center; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.field textarea { min-height: 90px; resize: vertical; }

/* ---------- Phase 4 additions ---------- */
.stepper { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--space-2); }
.stepper li a { display: flex; align-items: center; gap: .5rem; padding: .45rem .8rem; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text-2); text-decoration: none; font-weight: 600; font-size: .9rem; }
.stepper__dot { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-3); font-size: .78rem; }
.stepper li.is-done .stepper__dot { background: var(--ok-bg); color: var(--ok); }
.stepper li.is-current a { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-text); }
.stepper li.is-current .stepper__dot { background: var(--brand); color: var(--brand-ink); }
.setup-card { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-4); border-color: var(--brand); background: linear-gradient(120deg, var(--brand-soft), var(--surface) 60%); }
.setup-card h2 { margin: 0 0 .25rem; }
.setup-card p { margin: 0; }
.input-sm { width: 100%; max-width: 110px; min-height: 36px; padding: .35rem .6rem; border-radius: 8px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); font: inherit; }
.field--check { align-self: end; padding-bottom: .5rem; }
.field--wide { grid-column: 1 / -1; }
.field input[type="color"] { padding: .25rem; height: 42px; }
.copy-form { align-items: end; }
@media (max-width: 640px) { .stepper li a span:last-child { display: none; } .stepper li.is-current a span:last-child { display: inline; } }
.form-actions--reverse { flex-direction: row-reverse; justify-content: flex-start; }
@media (max-width: 640px) { .form-actions--reverse { flex-direction: column; } }

/* ---------- Phase 5 additions ---------- */
.topbar__search { position: relative; flex: 1; max-width: 420px; margin-left: var(--space-3); }
.topbar__search .icon { position: absolute; left: .75rem; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.topbar__search input { width: 100%; min-height: 40px; padding: .45rem .8rem .45rem 2.2rem; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; }
.topbar__search input:focus { outline: none; border-color: var(--brand); box-shadow: var(--focus); }
.chip-list { list-style: none; display: flex; flex-wrap: wrap; gap: var(--space-2); margin: 0; padding: 0; }
.chip { display: inline-flex; align-items: center; gap: .35rem; padding: .3rem .4rem .3rem .75rem; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); font-size: .88rem; }
.chip form { margin: 0; }
.chip__x { border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 1.1rem; line-height: 1; padding: 0 .3rem; border-radius: 50%; }
.chip__x:hover { color: var(--err); background: var(--err-bg); }
.person-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-3); }
.person-list li { display: flex; justify-content: space-between; align-items: center; gap: var(--space-3); flex-wrap: wrap; }
.disclosure summary { cursor: pointer; color: var(--brand-text); font-weight: 600; }
.credential code { font-size: 1rem; }
@media (max-width: 1024px) { .topbar__search { max-width: none; } }
@media (max-width: 640px) { .topbar__search { display: none; } }

/* ---------- Phase 7 additions ---------- */
.balance { display: flex; flex-direction: column; align-items: flex-end; padding: .5rem 1rem; border-radius: var(--radius); background: var(--ok-bg); }
.balance strong { font-size: 1.4rem; font-variant-numeric: tabular-nums; }
.balance--due { background: var(--warn-bg); }
.document { max-width: 900px; }
.document__head { display: flex; justify-content: space-between; gap: var(--space-4); flex-wrap: wrap; border-bottom: 2px solid var(--border); padding-bottom: var(--space-3); margin-bottom: var(--space-3); }
.document__head h2 { margin: 0; }
.document__meta { text-align: right; }
.document__title { font-weight: 800; letter-spacing: .08em; color: var(--brand-text); margin: 0; }
.document__to { margin: var(--space-3) 0; }
.document tfoot td { border-bottom: 0; padding-top: .35rem; padding-bottom: .35rem; }
.document__due td { border-top: 2px solid var(--text); font-size: 1.05rem; }
@media print {
  .no-print, .toasts, .modal { display: none !important; }
  body, .content { background: #fff; color: #000; padding: 0; }
  .document { border: 0; box-shadow: none; max-width: none; }
  .table th { background: #eee; color: #000; }
}
.document--void { position: relative; opacity: .75; }
.document--void::after { content: "VOID"; position: absolute; inset: 40% 0 auto; text-align: center; font-size: 5rem; font-weight: 900; color: var(--err); opacity: .25; transform: rotate(-12deg); pointer-events: none; }
.signature { border-top: 1px solid var(--border-strong); padding-top: .3rem; min-width: 160px; text-align: center; margin-top: 2rem; }
.collect { border-color: var(--brand); }

/* ---------- Phase 10a ---------- */
.center { text-align: center; }
.table--compact td, .table--compact th { padding: .3rem .35rem; font-size: .82rem; }
.att--absent { background: var(--err-bg); color: var(--err); font-weight: 700; }
.att--late { background: var(--warn-bg); }
.att--leave { background: var(--info-bg, #e8f1fb); }
.attendance input[type=radio] { width: 1.15rem; height: 1.15rem; }
.feedback { border-left: 3px solid var(--brand); margin: 0; padding: .4rem .8rem; background: var(--surface-2, #f6f7f9); border-radius: 4px; }
.prose { white-space: normal; line-height: 1.6; overflow-wrap: anywhere; }
.tabs { display: flex; gap: .25rem; margin-bottom: var(--space-3); flex-wrap: wrap; }
.tabs__tab { padding: .4rem .8rem; border-radius: 999px; border: 1px solid var(--border); text-decoration: none; }
.tabs__tab.is-active { background: var(--brand); color: #fff; border-color: var(--brand); }

/* ---------- Phase 10b ---------- */
.outline { list-style: none; margin: 0; padding: 0; }
ol.outline { list-style: decimal; padding-left: 1.4rem; }
.outline__module { border-top: 1px solid var(--border); padding-top: var(--space-2); }
.outline__module h3 { margin: .2rem 0 .4rem; font-size: 1rem; }
.outline__lesson { display: flex; justify-content: space-between; align-items: center; gap: .5rem; padding: .35rem 0; border-bottom: 1px dashed var(--border); flex-wrap: wrap; }
ol.outline .outline__lesson { display: list-item; }
.inline { display: inline-flex; }
.btn--icon { min-width: 2rem; padding-inline: .4rem; }
.video { position: relative; aspect-ratio: 16 / 9; background: #000; border-radius: var(--radius); overflow: hidden; margin-bottom: var(--space-3); }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: var(--space-3); }
.course-card { text-decoration: none; color: inherit; transition: border-color .15s; }
.course-card:hover, .course-card:focus-visible { border-color: var(--brand); }
.lead { font-size: 1.05rem; }

/* ---------- Phase 10c ---------- */
.report-card { page-break-after: always; break-after: page; margin-bottom: var(--space-4); }
.signatures { margin-top: 2.5rem; gap: 1rem; }
@media print { .report-card:last-of-type { page-break-after: auto; break-after: auto; } }

/* ---------- Phase 12 (admin) ---------- */
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: var(--space-3); }
.media-item { margin: 0; padding: .6rem; }
.media-item img { width: 100%; height: 140px; object-fit: cover; border-radius: 6px; }
.media-item__pdf { height: 140px; display: grid; place-items: center; background: var(--surface-2, #f1f5f9); border-radius: 6px; font-weight: 800; color: var(--err); }

/* ---------- Phase 13 extras ---------- */
.audience { border: 1px solid var(--border); border-radius: var(--radius); padding: .8rem 1rem; }
.audience legend { font-weight: 600; padding: 0 .3rem; }
.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: .3rem .8rem; }
.wrap { flex-wrap: wrap; }
.sms-preview { background: var(--surface-2, #f1f5f9); border-radius: 12px; padding: .8rem 1rem; max-width: 420px; white-space: normal; }

/* ---------- BS date picker ---------- */
.bs-pop { position: fixed; top: 0; left: 0; z-index: 70; background: var(--surface, #fff); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: 0 8px 24px rgba(0,0,0,.15); padding: .6rem; width: 18rem; }
.bs-pop__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: .4rem; }
.bs-pop__grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: .15rem; text-align: center; }
.bs-pop__wd { font-size: .7rem; color: var(--muted, #64748b); }
.bs-pop__day { border: 0; background: none; padding: .35rem 0; border-radius: 6px; cursor: pointer; font: inherit; color: inherit; }
.bs-pop__day:hover, .bs-pop__day:focus-visible { background: var(--surface-2, #f1f5f9); }
.bs-pop__day.is-selected { background: var(--primary, #1d4ed8); color: #fff; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---------- Platform › BS calendar ---------- */
.bs-year-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(8.5rem, 1fr)); gap: .5rem .8rem; }
.bs-total--ok { color: var(--ok, #15803d); font-weight: 600; }
.bs-total--bad { color: var(--err, #b91c1c); font-weight: 600; }
.table--compact td, .table--compact th { padding: .35rem .5rem; }

/* ---------- Branding (16b) ---------- */
.brand-mark { background: var(--brand); color: var(--brand-ink); }
.brand-logo { height: 38px; width: auto; max-width: 150px; object-fit: contain; flex: none; border-radius: 6px; }
.auth__brand .brand-text { display: grid; line-height: 1.2; }
.auth__brand .brand-text small { color: var(--muted); font-size: .8rem; }
body.auth--branded { background-size: cover; background-position: center; background-attachment: fixed; }
body.auth--branded .auth__foot { color: #fff; text-shadow: 0 1px 2px rgb(0 0 0 / .6); }
.site-offline-banner { background: var(--warn-bg); color: var(--warn); text-align: center; padding: .5rem 1rem; font-size: .9rem; }
.color-field { display: flex; gap: .5rem; align-items: center; }
.color-field input[type="color"] { width: 3rem; height: 2.4rem; padding: .15rem; }
.brand-preview { display: flex; align-items: center; gap: .75rem; padding: .75rem; border: 1px solid var(--border); border-radius: var(--radius); }
.thumb-sm { height: 48px; width: auto; max-width: 160px; object-fit: contain; border: 1px solid var(--border); border-radius: 6px; background: var(--surface-2); }
.input-xs { width: 5.5rem; }
.pre-wrap { white-space: pre-wrap; overflow-wrap: anywhere; }

/* ---------- Printable lists (16c) ---------- */
.print-page { background: #fff; color: #111; padding: 1.5rem; max-width: 1100px; margin: 0 auto; }
.print-page__bar { margin-bottom: 1rem; }
.print-page__head { border-bottom: 2px solid #111; margin-bottom: 1rem; padding-bottom: .5rem; }
.print-page__head h1 { margin: .5rem 0 .25rem; font-size: 1.3rem; }
.print-page .table th { background: #eee; color: #111; }
.totals-grid { margin-bottom: 1rem; }
@media print { .print-page { padding: 0; } .print-page .table { font-size: 10.5pt; } .print-page tr { break-inside: avoid; } }
.check--block { align-items: flex-start; }
.dl--inline { display: grid; grid-template-columns: max-content 1fr; gap: .2rem .8rem; margin: 0; }
.dl--inline dt { color: var(--muted); }
.dl--inline dd { margin: 0; }
.text-err { color: var(--err); }
.chip-row { flex-wrap: wrap; }
button.chip { cursor: pointer; padding: .25rem .6rem; font-family: var(--font-mono, monospace); font-size: .82rem; }
button.chip:hover { border-color: var(--brand); }
.sms-preview { border: 1px dashed var(--border); border-radius: var(--radius); padding: .6rem .8rem; background: var(--surface-2); }
.sms-preview p { margin: .25rem 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.print-only { display: none; }
@media print { .print-only { display: block; } .print-summary { border-bottom: 1px solid #000; margin-bottom: .75rem; padding-bottom: .4rem; } }

/* ---------- Collapsible sidebar sections ---------- */
.nav-section { margin-top: var(--space-1); }
.nav-section__toggle { display: flex; align-items: center; gap: var(--space-3); width: 100%; padding: .55rem .75rem; border: 0; border-radius: 10px; background: none;
  color: var(--text-2); font: inherit; font-size: .78rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; text-align: left; cursor: pointer; }
.nav-section__toggle:hover { background: var(--surface-2); color: var(--text); }
.nav-section__toggle:focus-visible, .nav-sub__toggle:focus-visible { outline: none; box-shadow: var(--focus); }
.nav-section__toggle > span:not(.nav-chevron) { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-section.is-current > .nav-section__toggle { color: var(--brand-text); }
.nav-chevron { flex: none; width: .55rem; height: .55rem; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); transition: transform .2s ease; opacity: .7; margin-right: .2rem; }
[data-open] > button > .nav-chevron { transform: rotate(45deg); }
.nav-collapse { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .22s ease; }
.nav-collapse > .nav-list, .nav-collapse > div { min-height: 0; overflow: hidden; visibility: hidden; transition: visibility .22s; }
[data-open] > .nav-collapse { grid-template-rows: 1fr; }
[data-open] > .nav-collapse > .nav-list, [data-open] > .nav-collapse > div { visibility: visible; }
.nav-section .nav-list { padding: 2px 0 var(--space-1) .9rem; }
.nav-list--sub { padding-left: .9rem; }
.nav-sub__toggle { width: 100%; border: 0; background: none; font: inherit; cursor: pointer; text-align: left; }
.nav-sub__toggle > span:not(.nav-chevron) { flex: 1; }
@media (prefers-reduced-motion: reduce) { .nav-collapse, .nav-collapse > .nav-list, .nav-chevron { transition: none; } }

/* ---------- Continue with Google ---------- */
.auth-divider { display: flex; align-items: center; gap: .75rem; margin: 1rem 0; color: var(--muted); font-size: .8rem; letter-spacing: .08em; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; border-top: 1px solid var(--border); }
.google-btn { display: flex; align-items: center; justify-content: center; gap: .65rem; width: 100%; min-height: 46px; padding: .55rem 1rem;
  border: 1px solid #dadce0; border-radius: var(--radius); background: #fff; color: #1f1f1f; font: 500 1rem/1.2 inherit; text-decoration: none; cursor: pointer; }
.google-btn:hover { background: #f8f9fa; border-color: #c6c9ce; }
.google-btn:focus-visible { outline: none; box-shadow: var(--focus); }
.google-btn:disabled { color: #9aa0a6; cursor: not-allowed; background: #fff; }
.google-btn:disabled .google-btn__g { opacity: .5; }
:root[data-theme="dark"] .google-btn { background: #131314; color: #e3e3e3; border-color: #8e918f; }

/* ---------- Simple organization registration ---------- */
.reg { display: grid; gap: 1.15rem; min-width: 0; }
.reg > *, .reg__field { min-width: 0; }
.reg *, .reg *::before, .reg *::after { box-sizing: border-box; }
.reg__label { display: block; margin-bottom: .4rem; font-weight: 600; font-size: .95rem; }
.req { color: var(--err); font-weight: 700; }
.reg__input { display: block; width: 100%; min-width: 0; height: 3rem; padding: 0 .9rem; border: 1px solid var(--border); border-radius: 10px;
  background: var(--surface); color: var(--text); font-size: 1rem; transition: border-color .15s, box-shadow .15s; }
.reg__input::placeholder { color: var(--muted); }
.reg__input:focus { outline: none; border-color: var(--brand); box-shadow: var(--focus); }
.reg__preview { margin: .45rem 0 0; font-size: .85rem; color: var(--muted); overflow-wrap: anywhere; }
.reg__preview strong { color: var(--text); font-weight: 600; }
.reg__status { margin: .25rem 0 0; font-size: .82rem; color: var(--muted); }
.reg__status:empty { display: none; }
.reg__status--ok { color: var(--ok); }
.reg__status--bad { color: var(--err); }
.reg__phone { display: flex; gap: .5rem; min-width: 0; }
.reg__cc { flex: 0 0 auto; width: 7.2rem; height: 3rem; padding: 0 .6rem; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text); font-size: 1rem; }
.reg__cc:focus { outline: none; border-color: var(--brand); box-shadow: var(--focus); }
.reg__phone .reg__input { flex: 1 1 auto; }
.reg .field--error .reg__input, .reg .field--error .reg__cc { border-color: var(--err); }
.reg__terms { display: flex; align-items: center; gap: .75rem; }
.reg__terms label { cursor: pointer; line-height: 1.4; }
.reg__terms a, .reg__link { color: var(--brand-text); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
/* The checkbox itself drawn as a switch: a real, focusable input — nothing hidden or moved. */
.reg__toggle { -webkit-appearance: none; appearance: none; flex: 0 0 auto; position: relative; width: 2.75rem; height: 1.6rem; margin: 0; border-radius: 999px;
  border: 2px solid var(--border); background: var(--surface-2); cursor: pointer; transition: background .15s, border-color .15s; }
.reg__toggle::before { content: ""; position: absolute; top: 50%; left: 3px; width: 1.05rem; height: 1.05rem; border-radius: 50%; background: #fff;
  box-shadow: 0 1px 3px rgb(0 0 0 / .3); transform: translateY(-50%); transition: transform .15s; }
.reg__toggle:checked { background: var(--brand); border-color: var(--brand); }
.reg__toggle:checked::before { transform: translate(1.12rem, -50%); }
.reg__toggle:focus-visible { outline: none; box-shadow: var(--focus); }
.reg .field--error .reg__toggle { border-color: var(--err); }
.reg__google, .reg .btn--block { width: 100%; min-height: 3rem; border-radius: 10px; font-size: 1rem; }
.center { text-align: center; }
@media (prefers-reduced-motion: reduce) { .reg__toggle, .reg__toggle::before, .reg__input { transition: none; } }
.setup-card--progress { align-items: flex-start; }
.setup-card__main { flex: 1; min-width: 0; }
.setup-progress { display: flex; align-items: center; gap: .75rem; margin: .5rem 0 .75rem; }
.setup-progress progress { flex: 1; height: 10px; accent-color: var(--brand); }
.setup-steps { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .35rem 1.25rem; }
.setup-steps li.is-done { color: var(--ok, #15803d); }
.setup-steps li.is-done a { color: inherit; }

/* ---------- Website builder & theme library (18) ---------- */
.theme-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 1rem; }
.theme-card { padding: 0; overflow: hidden; display: flex; flex-direction: column; transition: transform .2s, box-shadow .2s; }
.theme-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg, 0 12px 30px -12px rgb(0 0 0 / .25)); }
.theme-card.is-active { outline: 3px solid var(--brand); }
.theme-card__img { position: relative; aspect-ratio: 16 / 9; background: var(--surface-2); }
.theme-card__img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.theme-card__badge { position: absolute; top: .6rem; left: .6rem; }
.theme-card__body { padding: 1rem; flex: 1; }
.theme-card__body h2 { margin: .1rem 0 0; font-size: 1.15rem; }
.theme-swatches { display: flex; gap: .35rem; } .swatch { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--border); }
.theme-features { margin: 0; padding-left: 1.1rem; color: var(--muted); }
.input-sm { padding: .3rem .5rem; font-size: .85rem; }
.inline-form { display: inline; }
.demo-bar { position: sticky; top: 0; z-index: 30; display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; justify-content: space-between; padding: .6rem 1rem; background: var(--surface); border-bottom: 1px solid var(--border); }
.demo-bar form { display: inline; }
.wb { display: grid; grid-template-columns: 300px minmax(0, 1fr) 380px; grid-template-rows: auto minmax(0, 1fr); gap: .75rem; height: calc(100vh - 110px); min-height: 560px; }
.wb-top { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; justify-content: space-between; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: .5rem .75rem; }
.wb-top form { display: inline; }
.wb-left, .wb-right { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: .75rem; overflow-y: auto; display: flex; flex-direction: column; gap: .75rem; }
.wb-canvas { background: repeating-conic-gradient(var(--surface-2) 0 25%, transparent 0 50%) 0 0 / 20px 20px; border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: auto; display: flex; justify-content: center; padding: .75rem; }
.wb-frame { width: 100%; height: 100%; transition: width .3s; box-shadow: 0 10px 40px -15px rgb(0 0 0 / .35); border-radius: 10px; overflow: hidden; background: #fff; }
.wb-frame[data-device="tablet"] { width: 820px; max-width: 100%; } .wb-frame[data-device="mobile"] { width: 390px; max-width: 100%; }
.wb-frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.tabs--small { display: flex; gap: .25rem; flex-wrap: wrap; } .tabs--small .tab { padding: .35rem .6rem; font-size: .85rem; }
.wb-sections, .wb-slides { list-style: none; margin: 0; padding: 0; display: grid; gap: .3rem; }
.wb-sec, .wb-slides li { display: flex; align-items: center; gap: .4rem; padding: .4rem .5rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.wb-sec a, .wb-slides a { flex: 1; min-width: 0; text-decoration: none; color: inherit; font-size: .9rem; }
.wb-sec.is-active, .wb-slides li.is-active { border-color: var(--brand); background: var(--brand-soft); }
.wb-sec.is-hidden a { opacity: .5; text-decoration: line-through; }
.wb-sec.is-dragging { opacity: .5; } .wb-sec.is-over { border-top: 3px solid var(--brand); }
.wb-sec__grip { cursor: grab; color: var(--muted); user-select: none; }
.wb-sec form { display: inline; }
.wb-items { border: 1px dashed var(--border); border-radius: var(--radius); padding: .5rem .75rem; }
.wb-item { border-bottom: 1px solid var(--border); padding-bottom: .5rem; margin-bottom: .5rem; }
.wb-colors { display: grid; grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); gap: .5rem; }
.wb-colors label { display: grid; gap: .2rem; } .wb-colors input[type=color] { width: 100%; height: 36px; padding: 2px; }
.wb-ai { border: 1px solid var(--border); border-radius: var(--radius); padding: .5rem .75rem; background: var(--brand-soft); }
.wb-ai summary { cursor: pointer; font-weight: 600; }
.wb-danger { border-top: 1px solid var(--border); padding-top: .75rem; }
.wb-empty ul { padding-left: 1.1rem; }
@media (max-width: 1180px) { .wb { grid-template-columns: 280px minmax(0, 1fr); height: auto; } .wb-right { grid-column: 1 / -1; } .wb-canvas { min-height: 520px; } }
@media (max-width: 760px) { .wb { grid-template-columns: 1fr; } .wb-canvas { min-height: 480px; } }
.theme-pick { cursor: pointer; position: relative; }
.theme-pick input { position: absolute; top: .6rem; right: .6rem; width: 1.2rem; height: 1.2rem; z-index: 2; }
.theme-pick:has(input:checked) { outline: 3px solid var(--brand); }
.theme-grid--pick { margin-bottom: 1rem; }
.captcha-box { margin: .5rem 0; min-height: 65px; } .captcha [hidden] { display: none !important; } .captcha .field__error, .captcha .field__hint { margin: .25rem 0 0; }
.avatar--img { object-fit: cover; border-radius: 50%; padding: 0; }
.avatar--xl { width: 96px !important; height: 96px !important; font-size: 2rem; }
.avatar-edit { display: flex; gap: 1.25rem; flex-wrap: wrap; align-items: flex-start; }
.avatar-crop { position: relative; width: 220px; max-width: 100%; cursor: crosshair; border-radius: var(--radius); overflow: hidden; }
.avatar-crop img { display: block; width: 100%; height: auto; }
.avatar-crop__ring { position: absolute; border: 3px solid #fff; box-shadow: 0 0 0 9999px rgb(0 0 0 / .45); border-radius: 50%; pointer-events: none; }
.pw-meter { display: flex; align-items: center; gap: .6rem; margin-top: .35rem; }
.pw-meter__bar { flex: 1; height: 6px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.pw-meter__bar span { display: block; height: 100%; width: 0; transition: width .2s, background .2s; background: var(--err); }
.pw-meter[data-level="1"] .pw-meter__bar span { background: #f97316; } .pw-meter[data-level="2"] .pw-meter__bar span { background: #eab308; }
.pw-meter[data-level="3"] .pw-meter__bar span { background: #22c55e; } .pw-meter[data-level="4"] .pw-meter__bar span { background: #15803d; }
.pw-meter__label { min-width: 6.5rem; text-align: right; color: var(--muted); }
.sys-settings { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 1rem; align-items: start; }
.sys-settings__nav { position: sticky; top: 1rem; display: grid; gap: .5rem; padding: .75rem; }
.sys-cat { display: block; padding: .45rem .6rem; border-radius: var(--radius); text-decoration: none; color: inherit; }
.sys-cat:hover, .sys-cat.is-active { background: var(--brand-soft); }
.sys-cat[hidden] { display: none; }
.sys-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: .75rem 1.25rem; }
.sys-field[hidden] { display: none; }
.input-unit { display: flex; align-items: center; gap: .4rem; } .input-unit input { max-width: 10rem; } .input-unit span { color: var(--muted); font-size: .9rem; }
@media (max-width: 860px) { .sys-settings { grid-template-columns: 1fr; } .sys-settings__nav { position: static; } }
.storage-bar { width: 100%; height: 10px; accent-color: var(--brand); }
.storage-bar.is-high { accent-color: var(--err); }
.req { color: var(--err); font-weight: 700; }
.phone-input { display: flex; gap: .4rem; } .phone-input select { flex: 0 0 auto; max-width: 9.5rem; } .phone-input input { flex: 1; min-width: 0; }
.otp-row { margin-top: .4rem; } .otp-row input { max-width: 9rem; }
.alert-row.is-unread { border-left: 4px solid var(--brand); } .badge--warn { background: #fef3c7; color: #92400e; }


/* ---------- Popups admin ---------- */
.popup-form { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 1rem; align-items: start; }
.popup-form__side { position: sticky; top: 1rem; }
@media (max-width: 1000px) { .popup-form { grid-template-columns: 1fr; } .popup-form__side { position: static; } }
.menu-actions { position: relative; }
.menu-actions > summary { list-style: none; cursor: pointer; }
.menu-actions > summary::-webkit-details-marker { display: none; }
.menu-actions__list { position: absolute; right: 0; z-index: 20; display: grid; gap: .3rem; min-width: 150px; margin-top: .3rem; padding: .5rem; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow-lg, 0 12px 30px -12px rgb(0 0 0 / .3)); }
.menu-actions__list .btn { width: 100%; justify-content: flex-start; }
.pager { display: flex; align-items: center; justify-content: center; gap: .75rem; margin-top: 1rem; }
.device-switch { display: flex; gap: .4rem; margin-bottom: .75rem; }
.device-switch .is-active { background: var(--brand); color: #fff; border-color: var(--brand); }
.device-frame { margin: 0 auto; border: 1px solid var(--border); border-radius: 14px; overflow: hidden; background: var(--surface-2); transition: width .25s ease; max-width: 100%; }
.device-frame iframe { display: block; width: 100%; height: 75vh; border: 0; background: #fff; }
.device-frame--desktop { width: 100%; } .device-frame--tablet { width: 820px; } .device-frame--mobile { width: 390px; }
.wd-hero { display: flex; gap: 1.25rem; align-items: center; flex-wrap: wrap; }
.wd-hero__thumb { width: 240px; max-width: 100%; height: auto; border-radius: 10px; border: 1px solid var(--border); }
.wd-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); gap: .75rem; margin: 1rem 0; }
.wd-tile { display: flex; gap: .75rem; align-items: flex-start; text-decoration: none; color: inherit; transition: transform .15s, box-shadow .15s; }
.wd-tile:hover, .wd-tile:focus-visible { transform: translateY(-2px); box-shadow: var(--shadow-lg, 0 12px 30px -14px rgb(0 0 0 / .3)); }
.wd-tile > span { display: grid; gap: .15rem; }
@media (prefers-reduced-motion: reduce) { .wd-tile { transition: none; } }
.pmenu { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.pmenu__item { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem; padding: .6rem; border: 1px solid var(--border); border-radius: 10px; }
.pmenu__item--child { margin-left: 1.5rem; border-style: dashed; }
.pmenu__form { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; flex: 1 1 520px; min-width: 0; }
.pmenu__form input:not([type=checkbox]), .pmenu__form select { flex: 1 1 140px; min-width: 0; }

/* ---------- Header menu editor (platform + organizations) ---------- */
.me-card { display: grid; gap: 1rem; }
.me-head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; flex-wrap: wrap; }
.me-head h2 { margin: 0; }
.me-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.me-sub { list-style: none; margin: -.15rem 0 .1rem 1.1rem; padding-left: .9rem; border-left: 2px dashed var(--border); }
.me-item { border: 1px solid var(--border); border-radius: 14px; background: var(--surface); transition: box-shadow .15s; }
.me-item:hover { box-shadow: 0 6px 18px -12px rgb(0 0 0 / .35); }
.me-item.is-hidden .me-names { opacity: .55; }
.me-row { display: flex; align-items: center; gap: .75rem 1rem; flex-wrap: wrap; padding: .75rem .9rem; }
.me-names { display: grid; min-width: 0; flex: 1 1 180px; }
.me-names strong { font-size: 1.02rem; overflow-wrap: anywhere; }
.me-names span { color: var(--muted); font-size: .9rem; }
.me-meta { display: flex; flex-wrap: wrap; gap: .35rem; flex: 1 1 160px; }
.me-badge { display: inline-flex; align-items: center; max-width: 100%; padding: .2rem .6rem; border-radius: 999px; font-size: .8rem; font-weight: 600;
  background: var(--brand-soft, #e0e7ff); color: var(--brand-text, var(--brand)); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me-badge--muted { background: var(--surface-2); color: var(--muted); }
.me-actions { display: flex; align-items: center; gap: .4rem; margin-left: auto; }
.me-actions form { display: flex; gap: .3rem; }
.me-icon { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border: 1px solid var(--border); border-radius: 10px;
  background: var(--surface); color: var(--text); font-size: 1rem; cursor: pointer; }
.me-icon:hover:not(:disabled) { background: var(--surface-2); }
.me-icon:disabled { opacity: .35; cursor: default; }
.me-icon--danger { color: var(--err); }
.me-icon--danger:hover { background: color-mix(in srgb, var(--err) 10%, transparent) !important; }
.me-panel { border-top: 1px solid var(--border); padding: .9rem; background: var(--surface-2); border-radius: 0 0 14px 14px; }
.me-panel--new { border: 1px solid var(--border); border-radius: 14px; }
.me-panel[hidden] { display: none; }
.me-form { display: grid; gap: .9rem; }
.me-form__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: .75rem 1rem; }
.me-form__grid .field { margin: 0; }
.me-form__grid input, .me-form__grid select { width: 100%; }
.me-form__checks { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1.25rem; }
.me-form__actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.me-empty { padding: 1.5rem; text-align: center; border: 1px dashed var(--border); border-radius: 14px; }
@media (max-width: 560px) { .me-actions { width: 100%; justify-content: flex-end; } .me-form__actions .btn { flex: 1; } }

/* ---------- Organization danger zone ---------- */
.danger-box { border: 2px solid var(--err); background: color-mix(in srgb, var(--err) 6%, var(--surface)); }
.danger-box h2 { color: var(--err); margin: 0; }
.danger-list { display: grid; gap: .4rem; padding-left: 1.2rem; }
.danger-zone { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding: 1rem; border: 1px solid var(--err); border-radius: 12px; }
.danger-zone h2 { color: var(--err); margin: 0 0 .25rem; font-size: 1.1rem; }
.btn--danger { background: var(--err); border-color: var(--err); color: #fff; }
.btn--danger:hover { filter: brightness(.92); }
.btn--danger:disabled { opacity: .45; cursor: not-allowed; }
.org-admin-actions .row-between { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.archived-row { display: flex; gap: 1rem; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.archived-row__main { flex: 1 1 320px; min-width: 0; }
.archived-row__main h2 { margin: 0 0 .25rem; font-size: 1.1rem; }
.archived-row__actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.danger-zone__form { flex: 1 1 280px; max-width: 420px; }
.del-sizes { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); gap: .6rem; }
.del-size { display: grid; gap: .15rem; padding: .8rem 1rem; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); }
.del-size strong { font-size: 1.35rem; }
.del-size--total { background: var(--err); border-color: var(--err); color: #fff; }
.del-size--total .small { color: rgba(255, 255, 255, .9); }
.del-cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: .5rem; }
.del-cat { border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.del-cat > summary { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .7rem .9rem; cursor: pointer; list-style: none; }
.del-cat > summary::-webkit-details-marker { display: none; }
.del-cat > summary::after { content: "▾"; color: var(--muted); margin-left: .4rem; }
.del-cat[open] > summary::after { content: "▴"; }
.del-cat > summary strong { margin-left: auto; color: var(--err); }
.del-cat ul { list-style: none; margin: 0; padding: 0 .9rem .7rem; display: grid; gap: .25rem; }
.del-cat li { display: flex; justify-content: space-between; gap: .5rem; font-size: .9rem; border-top: 1px dashed var(--border); padding-top: .25rem; }

/* ---------- Sign in as admin (impersonation) ---------- */
.imp-bar { position: sticky; top: 0; z-index: 60; display: flex; align-items: center; justify-content: space-between; gap: .5rem 1rem; flex-wrap: wrap;
  padding: .55rem 1rem; background: #fde68a; color: #422006; border-bottom: 2px solid #f59e0b; font-size: .92rem; }
.imp-bar__btn { background: #422006; color: #fff; border-color: #422006; font-weight: 600; }
.imp-bar__btn:hover { filter: brightness(1.2); }
.imp-btn { white-space: nowrap; }
/* Organization list: action buttons */
.org-actions { display: grid; gap: .4rem; min-width: 170px; }
.org-act { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; width: 100%; min-height: 40px; padding: .45rem .9rem;
  border-radius: 999px; font-size: .9rem; font-weight: 600; text-decoration: none; white-space: nowrap; cursor: pointer; transition: transform .12s, box-shadow .12s, filter .12s; }
.org-act--signin { border: 0; color: #fff; background: linear-gradient(135deg, var(--brand) 0%, #7c3aed 100%); box-shadow: 0 6px 16px -8px color-mix(in srgb, var(--brand) 80%, transparent); }
.org-act--signin:hover { transform: translateY(-1px); filter: brightness(1.08); box-shadow: 0 10px 22px -10px color-mix(in srgb, var(--brand) 85%, transparent); }
.org-act--edit { border: 1.5px solid var(--border); color: var(--text); background: var(--surface); }
.org-act--edit:hover { border-color: var(--brand); color: var(--brand); }
.org-act:focus-visible { outline: none; box-shadow: var(--focus); }
@media (prefers-reduced-motion: reduce) { .org-act { transition: none; } }

/* "Return to platform" banner + button: own colours in every state (never turns white on click) */
.imp-bar { background: linear-gradient(90deg, #fef3c7 0%, #fde68a 100%); border-bottom: 2px solid #f59e0b; box-shadow: 0 4px 14px -10px rgb(120 53 15 / .6); }
.imp-bar .imp-bar__btn, .imp-bar .imp-bar__btn:visited {
  display: inline-flex; align-items: center; gap: .45rem; min-height: 40px; padding: .45rem 1.1rem; border: 0; border-radius: 999px;
  background: linear-gradient(135deg, #92400e 0%, #b45309 55%, #d97706 100%); color: #fff; font-weight: 700; letter-spacing: .01em;
  box-shadow: 0 6px 16px -8px rgb(146 64 14 / .9); cursor: pointer; transition: transform .12s ease, box-shadow .12s ease, filter .12s ease; }
.imp-bar .imp-bar__btn:hover { background: linear-gradient(135deg, #78350f 0%, #92400e 55%, #b45309 100%); color: #fff; transform: translateY(-1px);
  box-shadow: 0 10px 20px -10px rgb(120 53 15 / .95); }
.imp-bar .imp-bar__btn:active { background: linear-gradient(135deg, #78350f 0%, #92400e 100%); color: #fff; transform: translateY(0) scale(.98);
  box-shadow: 0 3px 8px -6px rgb(120 53 15 / .9); }
.imp-bar .imp-bar__btn:focus, .imp-bar .imp-bar__btn:focus-visible { color: #fff; outline: 3px solid #fbbf24; outline-offset: 2px; }
.imp-bar .imp-bar__btn:disabled { background: #92400e; color: #fff; opacity: .85; }
@media (prefers-reduced-motion: reduce) { .imp-bar .imp-bar__btn { transition: none; } }
.person-actions { min-width: 140px; }
.org-act--none { border: 1px dashed var(--border); color: var(--muted); background: transparent; cursor: default; font-weight: 500; }

/* Confirm dialog: always centred on the screen (a global margin reset had removed the browser's centring) */
.modal { position: fixed; inset: 0; margin: auto; width: min(440px, calc(100vw - 2rem)); max-width: calc(100vw - 2rem); height: fit-content;
  max-height: calc(100dvh - 2rem); overflow: auto; box-sizing: border-box; overflow-wrap: anywhere; }
.modal[open] { display: block; }
.modal h2 { margin: 0 0 .5rem; }
.modal__actions { flex-wrap: wrap; }
@media (max-width: 480px) {
  .modal { padding: 1.25rem; }
  .modal__actions .btn { flex: 1 1 0; min-height: 46px; justify-content: center; }
}

/* Never let a wide table make the whole page wider than the phone screen (that pushed centred dialogs off-screen) */
html, body { max-width: 100%; overflow-x: clip; }
.app, .content, .shell { min-width: 0; max-width: 100vw; }

/* Toast messages on phones: bottom centre, always fully on screen */
@media (max-width: 640px) {
  .toasts { left: 0; right: 0; top: max(.75rem, env(safe-area-inset-top)); margin: 0 auto; width: calc(100% - 2rem); max-width: 420px; justify-items: stretch; }
  @keyframes toast-in { from { opacity: 0; transform: translateY(-24px) scale(.96); } }
  .toast { width: 100%; box-sizing: border-box; }
}
/* People lists: four equal action buttons (2 × 2) */
.person-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .4rem; min-width: 250px; }
.person-actions form { display: contents; }
.person-actions .org-act { min-height: 40px; padding: .4rem .7rem; font-size: .88rem; }
.org-act--profile { border: 1.5px solid color-mix(in srgb, var(--brand) 35%, transparent); color: var(--brand-text, var(--brand)); background: color-mix(in srgb, var(--brand) 9%, var(--surface)); }
.org-act--profile:hover { background: color-mix(in srgb, var(--brand) 16%, var(--surface)); }
.org-act--delete { border: 1.5px solid color-mix(in srgb, var(--err) 45%, transparent); color: var(--err); background: color-mix(in srgb, var(--err) 7%, var(--surface)); }
.org-act--delete:hover { background: var(--err); color: #fff; border-color: var(--err); }

/* People list buttons — roomier, each with its own colour */
.person-actions { grid-template-columns: repeat(2, minmax(128px, 1fr)); gap: .45rem; min-width: 272px; }
.person-actions .org-act { min-height: 42px; padding: .4rem .55rem; gap: .3rem; font-size: .84rem; font-weight: 600; letter-spacing: 0; border-radius: 12px; }
.person-actions .org-act > span[aria-hidden] { font-size: .95em; line-height: 1; }
.person-actions .org-act--signin { box-shadow: 0 4px 12px -6px color-mix(in srgb, var(--brand) 85%, transparent); }
.person-actions .org-act--edit { border: 1.5px solid #34d399; color: #047857; background: #ecfdf5; }
.person-actions .org-act--edit:hover { background: #10b981; border-color: #10b981; color: #fff; }
.person-actions .org-act--profile:hover { background: var(--brand); border-color: var(--brand); color: #fff; }
:root[data-theme="dark"] .person-actions .org-act--edit { background: color-mix(in srgb, #10b981 18%, transparent); color: #6ee7b7; border-color: #10b981; }
@media (max-width: 380px) { .person-actions { grid-template-columns: 1fr 1fr; min-width: 250px; } .person-actions .org-act { font-size: .8rem; } }
/* Archived lists: Restore + Delete permanently, side by side (stacked on narrow screens) */
.archived-actions { display: grid; grid-template-columns: repeat(2, minmax(118px, 1fr)); gap: .45rem; min-width: 250px; }
.archived-actions form { display: contents; }
.archived-actions .org-act { min-height: 42px; padding: .4rem .55rem; gap: .3rem; font-size: .84rem; border-radius: 12px; white-space: normal; text-align: center; line-height: 1.2; }
.archived-actions .org-act--profile:hover { background: var(--brand); border-color: var(--brand); color: #fff; }
@media (max-width: 380px) { .archived-actions { grid-template-columns: 1fr; min-width: 150px; } }

/* ---------- Top bar: organization + academic year selector ---------- */
.topbar-org { display: inline-flex; align-items: center; gap: .45rem; max-width: 220px; padding: .25rem .6rem .25rem .3rem; border-radius: 999px; text-decoration: none; color: var(--text); }
.topbar-org:hover { background: var(--surface-2); }
.topbar-org img { width: 28px; height: 28px; border-radius: 8px; object-fit: contain; }
.topbar-org__mark { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: var(--brand); color: #fff; font-weight: 700; }
.topbar-org__name { font-weight: 600; font-size: .92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ay-btn { display: inline-flex; align-items: center; gap: .35rem; min-height: 38px; padding: .3rem .7rem; border: 1px solid var(--border); border-radius: 999px;
  background: color-mix(in srgb, var(--brand) 8%, var(--surface)); color: var(--brand-text, var(--brand)); font: inherit; font-size: .88rem; font-weight: 600; cursor: pointer; }
.ay-btn:hover { border-color: var(--brand); }
.ay-menu { min-width: 230px; }
.ay-menu__title { margin: .2rem .6rem .3rem; font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.ay-menu form { margin: 0; }
.ay-menu button { display: flex; justify-content: space-between; align-items: center; width: 100%; }
.ay-menu button.is-selected { color: var(--brand-text, var(--brand)); font-weight: 700; background: color-mix(in srgb, var(--brand) 9%, transparent); }
.ay-menu__manage { border-top: 1px solid var(--border); margin-top: .3rem; }
@media (max-width: 760px) {
  .topbar-org__name { display: none; }
  .topbar-org { padding: .2rem; }
  .ay-btn { padding: .3rem .55rem; font-size: .8rem; }
  .topbar__actions { gap: .15rem; }
}


/* ---------- Top bar: school identity + icon-only actions (diamond icons) ---------- */
.topbar-org { max-width: none; flex: 0 1 auto; min-width: 0; padding: .2rem .4rem; border-radius: 12px; }
.topbar-org img, .topbar-org__mark { width: 40px; height: 40px; border-radius: 10px; flex: none; }
.topbar-org__mark { display: inline-grid; place-items: center; background: var(--brand); color: #fff; font-weight: 800; font-size: 1.1rem; }
.topbar-org__text { display: grid; min-width: 0; line-height: 1.2; }
.topbar-org__name { font-size: .98rem; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar-org__addr { color: var(--muted); font-size: .78rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar-org ~ .breadcrumbs { display: none; } /* schools see their identity; the platform keeps breadcrumbs */
.topbar__actions { gap: .7rem; }
.topbar__actions > .icon-btn, .topbar__actions .ay-btn {
  width: 38px; height: 38px; margin: 4px; padding: 0; border: 1px solid var(--border); border-radius: 8px; background: var(--surface);
  box-shadow: 0 4px 12px -8px rgb(0 0 0 / .45); transform: rotate(45deg); color: var(--text); transition: background .15s, color .15s, box-shadow .15s; }
.topbar__actions > .icon-btn > *, .topbar__actions .ay-btn > * { transform: rotate(-45deg); }
.topbar__actions > .icon-btn:hover, .topbar__actions .ay-btn:hover, .topbar__actions .ay-btn[aria-expanded="true"] {
  background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: 0 8px 18px -10px color-mix(in srgb, var(--brand) 90%, transparent); }
.topbar__actions > .icon-btn.has-badge .dot { transform: rotate(-45deg); }
.ay-btn .icon { width: 18px; height: 18px; }
@media (max-width: 760px) {
  .topbar { height: auto; display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "org menu" "actions actions"; gap: .5rem .75rem; padding: .6rem 1rem .7rem; }
  .topbar-org { grid-area: org; }
  .topbar__menu { grid-area: menu; justify-self: end; }
  .topbar__actions { grid-area: actions; margin-left: 0; justify-content: flex-end; gap: .9rem; padding-top: .55rem; border-top: 1px solid var(--border); }
  .topbar__actions > .dropdown:last-child { order: -1; margin-right: auto; } /* profile on the left, icons on the right */
  .topbar-org__name { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
}
@media (prefers-reduced-motion: reduce) { .topbar__actions > .icon-btn, .topbar__actions .ay-btn { transition: none; } }

/* Mobile top bar fixes: the calendar icon always shows; the profile menu opens to the right (stays on screen) */
.topbar__actions .ay-btn .icon { display: inline-block !important; width: 18px; height: 18px; }
@media (max-width: 760px) {
  .topbar__actions > .dropdown:last-child .dropdown__menu { left: 0; right: auto; min-width: 200px; max-width: calc(100vw - 2rem); }
  .topbar__actions .ay-switch .dropdown__menu { right: 0; left: auto; max-width: calc(100vw - 2rem); }
}
/* Academic-year diamond: icon exactly in the centre, like the others */
.topbar__actions .ay-btn { display: inline-grid !important; place-items: center; gap: 0; padding: 0 !important; line-height: 0; }
.topbar__actions .ay-btn > .icon { margin: 0; }
.topbar-org img { object-fit: contain; background: var(--surface); }
/* Notification count on the bell (sits on the top point of the diamond) */
.topbar__actions > .icon-btn.has-badge { position: relative; overflow: visible; }
.bell-count { position: absolute; top: -9px; left: -9px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px; display: inline-grid; place-items: center;
  background: #dc2626; color: #fff; font-size: .7rem; font-weight: 700; line-height: 1; border: 2px solid var(--surface); box-shadow: 0 2px 6px rgb(0 0 0 / .25); }
.topbar__actions > .icon-btn > .bell-count { transform: rotate(-45deg); }

/* ---------- Profile pictures ---------- */
.avatar--img { object-fit: cover; padding: 0; border-radius: 50%; }
.avatar--xl { width: 96px !important; height: 96px !important; font-size: 2rem; flex: none; }
.avatar-edit { display: flex; gap: 1.25rem; flex-wrap: wrap; align-items: flex-start; }
.avatar-edit__form { flex: 1 1 220px; min-width: 0; }
.avatar-crop { position: relative; width: 220px; max-width: 100%; cursor: crosshair; border-radius: 12px; overflow: hidden; }
.avatar-crop img { display: block; width: 100%; height: auto; }
.avatar-crop__ring { position: absolute; border: 3px solid #fff; border-radius: 50%; box-shadow: 0 0 0 9999px rgb(0 0 0 / .45); pointer-events: none; }
.student-photo { width: 120px; height: 120px; border-radius: 16px; object-fit: cover; border: 1px solid var(--border); }
.page-head__photo { display: flex; align-items: center; gap: 1rem; }
.photo-preview { display: inline-flex; flex: none; }
.photo-note { color: var(--ok, #15803d); margin: .3rem 0 0; }
/* hidden must win over display rules of avatars / previews */
[data-photo-old][hidden], .avatar[hidden], .avatar-crop[hidden], [data-avatar-preview][hidden] { display: none !important; }
.avatar-edit .avatar-crop { margin-top: .5rem; }

/* ---------- List tables: export / print toolbar ---------- */
.table-tools { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0 0 .6rem; }
.table-tools--bulk { align-items: center; }
.table-tools .bulk-bar { margin: 0 0 0 auto; }
.tt-btn { display: inline-flex; align-items: center; gap: .35rem; min-height: 36px; padding: .35rem .75rem; border: 1px solid var(--border); border-radius: 999px;
  background: var(--surface); color: var(--text); font: inherit; font-size: .85rem; font-weight: 600; cursor: pointer; box-shadow: 0 2px 6px -4px rgb(0 0 0 / .35); transition: background .15s, color .15s, border-color .15s; }
.tt-btn:hover, .tt-btn[aria-expanded="true"] { background: var(--brand); border-color: var(--brand); color: #fff; }
.tt-btn[data-tt="excel"]:hover { background: #15803d; border-color: #15803d; }
.tt-btn[data-tt="pdf"]:hover { background: #b91c1c; border-color: #b91c1c; }
.tt-btn.is-done { background: #15803d; border-color: #15803d; color: #fff; }
.tt-btn:focus-visible { outline: none; box-shadow: var(--focus); }
.tt-cols { position: relative; }
.tt-menu { position: absolute; z-index: 30; top: calc(100% + 6px); left: 0; display: grid; gap: .35rem; min-width: 200px; max-height: 320px; overflow: auto; padding: .7rem .8rem;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-lg); }
.tt-menu[hidden] { display: none; }
.col-off { display: none !important; }
.print-head { display: none; }
@media (max-width: 560px) { .tt-btn { padding: .35rem .6rem; font-size: .8rem; } .tt-btn span { display: none; } .tt-btn { width: 40px; justify-content: center; } }
@media print {
  body.print-table-mode * { visibility: hidden; }
  body.print-table-mode .print-target, body.print-table-mode .print-target * { visibility: visible; }
  body.print-table-mode .print-target { position: absolute; inset: 0 auto auto 0; width: 100%; border: 0; box-shadow: none; }
  body.print-table-mode .print-target .col-action, body.print-table-mode .print-target .col-off { display: none !important; }
  body.print-table-mode .print-head { display: grid; gap: .15rem; margin: 0 0 .8rem; font-size: 11pt; }
  body.print-table-mode .print-head strong { font-size: 14pt; }
  body.print-table-mode .table-wrap { overflow: visible !important; }
  body.print-table-mode .table th, body.print-table-mode .table td { border: 1px solid #999 !important; padding: 4px 6px !important; color: #000 !important; }
  body.print-table-mode .pagination { display: none !important; }
}
/* Subscription: days left + plan features */
.days-left { display: inline-block; margin-top: .2rem; padding: .1rem .5rem; border-radius: 999px; font-size: .75rem; font-weight: 700; white-space: nowrap; }
.days-left--ok { background: #dcfce7; color: #166534; }
.days-left--warn { background: #fef3c7; color: #92400e; }
.days-left--bad { background: #fee2e2; color: #991b1b; }
.plan-features { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); gap: .35rem .9rem; }
.plan-features li { color: var(--text); }
/* Pricing: recommended plan, discount, lifetime */
.pricing--recommended { position: relative; border: 2px solid var(--brand); box-shadow: 0 14px 30px -18px color-mix(in srgb, var(--brand) 80%, transparent); }
.pricing__badge { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); padding: .2rem .8rem; border-radius: 999px; background: var(--brand); color: #fff; font-size: .78rem; font-weight: 700; white-space: nowrap; }
.pricing__save { display: inline-block; margin-left: .3rem; padding: .1rem .5rem; border-radius: 999px; background: #dcfce7; color: #166534; font-size: .72rem; font-weight: 700; vertical-align: middle; }
.pricing__life { display: inline-block; margin-top: .2rem; font-size: .85rem; font-weight: 600; color: var(--brand-text, var(--brand)); }
/* Payment requests */
.pay-req { display: flex; gap: 1rem; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; }
.pay-req__main { flex: 1 1 320px; min-width: 0; }
.pay-req__main h2 { margin: 0 0 .3rem; font-size: 1.1rem; }
.pay-req__main p { margin: .2rem 0; }
.pay-req__actions { display: grid; gap: .45rem; min-width: 240px; }
.pay-req__actions form { display: contents; }
.pay-req__reject input { min-height: 40px; }
.tabs { display: flex; gap: .3rem; flex-wrap: wrap; margin: 0 0 1rem; border-bottom: 1px solid var(--border); }
.tabs a { padding: .55rem .9rem; text-decoration: none; color: var(--muted); font-weight: 600; border-bottom: 2px solid transparent; }
.tabs a.is-active { color: var(--brand); border-bottom-color: var(--brand); }
.renew-price { font-size: 1.4rem; font-weight: 800; color: var(--brand-text, var(--brand)); }
.method-help { padding: .7rem .9rem; border-radius: 10px; background: var(--surface-2); border: 1px dashed var(--border); font-size: .9rem; }
.approval-setting { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.approval-setting h2 { margin: 0 0 .2rem; font-size: 1.05rem; }
.awaiting { max-width: 560px; margin: 8vh auto; text-align: center; }
.awaiting__icon { font-size: 3rem; margin: 0; }
/* Domains: request form */
.domain-type { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; border: 0; padding: 0; margin: 0; }
.input-suffix { display: flex; align-items: stretch; min-width: 0; }
.input-suffix input { flex: 1 1 auto; min-width: 0; border-top-right-radius: 0; border-bottom-right-radius: 0; }
.input-suffix span { display: inline-flex; align-items: center; padding: 0 .75rem; border: 1px solid var(--border); border-left: 0; border-radius: 0 10px 10px 0; background: var(--surface-2); color: var(--muted); white-space: nowrap; max-width: 60%; overflow: hidden; text-overflow: ellipsis; }
.dns-help ul { margin: .3rem 0; padding-left: 1.2rem; }

/* Report downloads: Excel (green) and PDF (red) buttons */
.export-buttons { display: inline-flex; gap: var(--space-2); flex-wrap: wrap; }
.btn--excel { color: #11713d; border-color: #9fd3b4; background: #effaf3; }
.btn--excel:hover { background: #dcf3e5; border-color: #11713d; }
.btn--pdf { color: #b42318; border-color: #f1b3ad; background: #fff2f1; }
.btn--pdf:hover { background: #fde1de; border-color: #b42318; }
:root[data-theme="dark"] .btn--excel { color: #6fe0a2; background: #10281b; border-color: #23573a; }
:root[data-theme="dark"] .btn--pdf { color: #ff9a8f; background: #33130f; border-color: #6b2a23; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .btn--excel { color: #6fe0a2; background: #10281b; border-color: #23573a; }
  :root:not([data-theme="light"]) .btn--pdf { color: #ff9a8f; background: #33130f; border-color: #6b2a23; }
}
.att--half_day { background: var(--warn-bg); color: var(--warn); }
.att--holiday { background: var(--surface-3); color: var(--muted); }
/* QR code attendance */
.qr-scan { display: grid; gap: var(--space-4); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 960px) { .qr-scan { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); } .qr-scan > .card--flush { grid-column: 1 / -1; } }
.qr-scan__dir { display: flex; gap: var(--space-2); border: 0; padding: 0; margin: 0; flex-wrap: wrap; }
.qr-scan__opt { display: inline-flex; align-items: center; gap: .4rem; padding: .55rem .9rem; border: 1px solid var(--border-strong); border-radius: 10px; cursor: pointer; }
.qr-scan__opt:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.qr-scan__reader { width: 100%; max-width: 420px; min-height: 60px; border-radius: var(--radius); overflow: hidden; background: var(--surface-2); }
.qr-scan__input { display: flex; gap: var(--space-2); }
.qr-scan__input input { flex: 1; }
.qr-person { display: flex; gap: var(--space-4); align-items: flex-start; }
.qr-person__photo { flex: none; width: 88px; height: 88px; border-radius: 14px; background: var(--brand-soft); color: var(--brand-text); display: grid; place-items: center; font-size: 1.8rem; font-weight: 700; overflow: hidden; }
.qr-person__photo img { width: 100%; height: 100%; object-fit: cover; }
.qr-person__will { font-weight: 600; color: var(--ok); }
.dl--compact { gap: .2rem .9rem; margin: .4rem 0 0; }
.qr-log { list-style: none; margin: 0; padding: 0 var(--space-4) var(--space-4); display: grid; gap: .35rem; max-height: 320px; overflow: auto; }
.qr-log__item { padding: .45rem .7rem; border-radius: 8px; font-size: .92rem; }
.qr-log__item--ok { background: var(--ok-bg); color: var(--ok); }
.qr-log__item--err { background: var(--err-bg); color: var(--err); }
.qr-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: var(--space-3); }
.qr-card { border: 1px dashed var(--border-strong); border-radius: 10px; padding: .75rem; text-align: center; break-inside: avoid; background: #fff; color: #111; }
.qr-card svg { display: block; margin: 0 auto .4rem; width: 150px; height: 150px; }
.qr-card strong { display: block; }
.qr-card span { font-size: .8rem; color: #444; }
@media print { .qr-cards { grid-template-columns: repeat(4, 1fr); gap: 6mm; } .qr-card { border-color: #999; } }
.profile-qr svg { width: 140px; height: 140px; display: block; }

/* ---- Cards & certificates (templates, generate, print) ---- */
.grid-3, .grid-4 { display: grid; gap: 0 var(--space-4); align-items: start; }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .grid-3, .grid-4 { grid-template-columns: minmax(0, 1fr); } }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .9rem; }
.pt-editor { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: var(--space-4); align-items: start; }
@media (max-width: 900px) { .pt-editor { grid-template-columns: minmax(0, 1fr); } }
.pt-editor .rte__area { min-height: 24rem; }
.pt-tags { max-height: 32rem; overflow: auto; border: 1px solid var(--border); border-radius: 10px; padding: var(--space-3); }
.pt-tags h3 { margin: 0 0 .5rem; font-size: .95rem; }
.tag-list { list-style: none; margin: .25rem 0 .75rem; padding: 0; display: grid; gap: .2rem; }
.tag-chip { border: 1px solid var(--border); background: var(--surface, #fff); border-radius: 6px; padding: .1rem .35rem; cursor: pointer; }
.tag-chip:hover, .tag-chip:focus-visible { border-color: var(--brand); }
.pt-thumb { display: block; max-width: 100%; max-height: 70px; margin: 0 0 .4rem; border: 1px solid var(--border); border-radius: 6px; background: #fff; }
.pick-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: .35rem var(--space-3); }
.pick-list label { display: flex; gap: .5rem; align-items: flex-start; padding: .35rem .5rem; border: 1px solid var(--border); border-radius: 8px; cursor: pointer; }
.pick-list label:has(input:checked) { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 8%, transparent); }

/* the printed card itself (size, spacing, colours and background come from the template's own stylesheet) */
.pt-page { background: #e5e7eb; margin: 0; padding: 12px; color: #111; }
.pt-bar { position: sticky; top: 0; background: #fff; padding: 8px 12px; border-radius: 10px; margin-bottom: 12px; box-shadow: 0 1px 3px rgba(0,0,0,.15); z-index: 2; }
.pt-sheet { display: flex; flex-wrap: wrap; gap: 4mm; align-items: flex-start; }
.pt-sheet--certificate { flex-direction: column; }
.pt-card { position: relative; box-sizing: border-box; overflow: hidden; background-color: #fff; background-size: cover; background-position: center; background-repeat: no-repeat;
  outline: 1px dashed #9ca3af; line-height: 1.3; break-inside: avoid; page-break-inside: avoid; font-family: "Noto Sans", "Noto Sans Devanagari", Arial, sans-serif; }
.pt-card p { margin: 0 0 .35em; }
.pt-card h2 { font-size: 1.45em; margin: .1em 0 .2em; line-height: 1.15; }
.pt-card h3 { font-size: 1.15em; margin: .1em 0 .2em; }
.pt-card h4 { font-size: 1.05em; margin: .1em 0 .2em; }
.pt-card ul, .pt-card ol { margin: 0 0 .35em; padding-left: 1.2em; text-align: left; }
.pt-block { margin: 0 0 .35em; }
/* formatting from the text editor (rt-* classes) inside a printed template */
.pt-card .rt-left { text-align: left; } .pt-card .rt-center { text-align: center; } .pt-card .rt-right { text-align: right; } .pt-card .rt-justify { text-align: justify; }
.pt-card .rt-sm { font-size: .85em; } .pt-card .rt-lg { font-size: 1.25em; } .pt-card .rt-xl { font-size: 1.6em; line-height: 1.2; }
.pt-card blockquote { margin: 0 0 .35em; padding: .1em .6em; border-left: 2px solid currentColor; }
.pt-card hr { border: 0; border-top: 1px solid currentColor; opacity: .5; margin: .3em 0; }
.pt-card table.rt-table { border-collapse: collapse; margin: 0 auto .35em; }
.pt-card table.rt-table th, .pt-card table.rt-table td { border: 1px solid rgba(15, 23, 42, .45); padding: .15em .4em; text-align: left; }
.pt-photo { display: inline-block; object-fit: cover; border: 1px solid #cbd5e1; border-radius: 4px; background: #f1f5f9; vertical-align: middle; }
.pt-photo--round { border-radius: 50%; }
.pt-photo--empty { display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 1.4em; color: #64748b; }
.pt-logo { max-height: 14mm; max-width: 60%; vertical-align: middle; }
/* a logo written in a line of text (e.g. "{logo} {institute_name}") is sized by that text */
.pt-card p .pt-logo, .pt-card h1 .pt-logo, .pt-card h2 .pt-logo { max-height: 1.9em; max-width: 2.4em; margin-right: .3em; }
.pt-sign { max-height: 14mm; max-width: 45mm; vertical-align: bottom; }
.pt-sign-line { display: inline-block; width: 40mm; border-bottom: 1px solid currentColor; height: 10mm; }
.pt-qr { display: inline-block; line-height: 0; background: #fff; padding: 1mm; }
.pt-qr svg { display: block; }
.pt-table { width: 100%; border-collapse: collapse; font-size: .95em; text-align: left; }
.pt-table th, .pt-table td { border: 1px solid #94a3b8; padding: .25em .4em; }
.pt-table th { background: rgba(148, 163, 184, .18); }
.pt-sign-cell { min-width: 25mm; }
@media print {
  .pt-page { background: #fff; padding: 0; }
  .pt-card { outline: none; box-shadow: none; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .pt-sheet--certificate .pt-card, .pt-sheet--certificate { gap: 0; }
  .pt-sheet--certificate .pt-card { break-after: page; page-break-after: always; }
  .pt-sheet--certificate .pt-card:last-child { break-after: auto; page-break-after: auto; }
}
.pt-card--certificate { display: flex; flex-direction: column; justify-content: center; }

/* ---- HR: leave, payroll, payslips ---- */
.inline-details { display: inline-block; position: relative; }
.inline-details > summary { list-style: none; cursor: pointer; }
.inline-details > summary::-webkit-details-marker { display: none; }
.inline-details[open] > form { position: absolute; right: 0; z-index: 5; width: 260px; background: var(--surface, #fff); border: 1px solid var(--border); border-radius: 10px; padding: .6rem; box-shadow: 0 6px 20px rgba(0,0,0,.12); }
.salary-lines input { width: 100%; }
tr.is-void td { color: var(--muted); text-decoration: line-through; }
.doc-page { background: #e5e7eb; margin: 0; padding: 12px; color: #111; }
.doc-page__bar { position: sticky; top: 0; background: #fff; padding: 8px 12px; border-radius: 10px; margin-bottom: 12px; box-shadow: 0 1px 3px rgba(0,0,0,.15); z-index: 2; }
.payslip { position: relative; background: #fff; max-width: 190mm; margin: 0 auto 12px; padding: 10mm 12mm; box-sizing: border-box; font-size: 10.5pt; break-inside: avoid; page-break-inside: avoid; }
.payslip + .payslip { break-before: page; page-break-before: always; }
.payslip__head { display: flex; gap: 12px; align-items: center; border-bottom: 2px solid #111; padding-bottom: 6px; margin-bottom: 8px; }
.payslip__head h1 { font-size: 15pt; margin: 0; }
.payslip__head p { margin: 2px 0 0; }
.payslip__logo { max-height: 16mm; max-width: 30mm; }
.payslip__title { margin-left: auto; text-align: right; }
.payslip__meta { display: grid; grid-template-columns: max-content 1fr; gap: 2px 14px; margin: 0 0 10px; }
.payslip__meta dt { color: #555; }
.payslip__meta dd { margin: 0; }
.payslip__cols { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.payslip__cols .table { border: 1px solid #cbd5e1; }
.payslip__total td { font-weight: 700; border-top: 1px solid #94a3b8; }
.payslip__net { font-size: 13pt; margin: 10px 0 6px; }
.payslip__sign { display: flex; justify-content: space-between; margin-top: 18mm; }
.payslip__sign span { border-top: 1px solid #111; padding-top: 3px; min-width: 50mm; text-align: center; font-size: 9.5pt; }
.payslip__stamp { color: #b91c1c; border: 2px solid #b91c1c; display: inline-block; padding: 2px 8px; font-weight: 700; transform: rotate(-3deg); }
.payslip--void { opacity: .85; }
.payslip-void { max-width: 190mm; margin: 0 auto; }
@media print { .doc-page { background: #fff; padding: 0; } .payslip { margin: 0; padding: 0; max-width: none; } }

/* ---- Office accounting ---- */
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: var(--space-3); margin-bottom: var(--space-4); }
.stat-row .stat { flex-direction: column; align-items: flex-start; gap: .2rem; }
.stat-row .stat strong { font-size: 1.35rem; }
.text-ok { color: var(--ok); }

/* Library (Ramom parity phase 7) */
.book-cover { width: 40px; height: 56px; object-fit: cover; border-radius: 4px; border: 1px solid var(--border); background: var(--surface-2); display: grid; place-items: center; color: var(--muted); flex: none; }
.book-cover--lg { width: 160px; height: 224px; border-radius: 8px; }
.book-cover--lg .icon { width: 48px; height: 48px; }
.book-head { display: flex; gap: var(--space-4); align-items: flex-start; flex-wrap: wrap; }
.book-cell { display: flex; gap: var(--space-3); align-items: center; }
.library-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: var(--space-4); }
.fine-row-form { display: grid; gap: var(--space-2); min-width: 220px; margin-top: var(--space-2); }
.library-actions .grid-2 { grid-template-columns: 1fr; }
/* Transport (Ramom parity phase 8) */
.input-sm--wide { max-width: 320px; }
.input-sm[type="time"] { max-width: 140px; }

/* ---------- Online exam ---------- */
.exam-timer { position: sticky; top: .5rem; z-index: 5; display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.countdown { font-variant-numeric: tabular-nums; font-weight: 700; font-size: 1.25rem; }
.countdown--low { color: var(--err, #b42318); }
.question { border-top: 1px solid var(--border); padding-top: 1rem; }
.question:first-child { border-top: 0; padding-top: 0; }
.question__text { white-space: pre-wrap; }
.question__options { list-style: none; padding: 0; margin: .5rem 0 0; display: grid; gap: .35rem; }
.answer--right { color: var(--ok); font-weight: 600; }
.answer--wrong { color: var(--err, #b42318); }
.answer-box { background: var(--surface-2, #f6f7f9); border-radius: 8px; padding: .6rem .8rem; }
.timetable-day { display: flex; flex-wrap: wrap; gap: .5rem; }
.timetable-period { display: grid; gap: .1rem; min-width: 8.5rem; padding: .45rem .6rem; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); }
.timetable-period--break { background: var(--surface-2); }

/* ---------- School calendar and messages ---------- */
/* School calendar: BS (or AD) month grid, fits a phone without sideways scrolling */
.cal-card { padding: 0; overflow: hidden; }
.cal-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem 1rem; padding: 1rem 1.1rem; border-bottom: 1px solid var(--border); }
.cal-title { margin: 0; font-size: 1.5rem; line-height: 1.2; }
.cal-sub { margin: .15rem 0 0; color: var(--muted); font-size: .9rem; }
.cal-pick { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; }
.cal-month { width: 100%; table-layout: fixed; border-collapse: collapse; }
.cal-month th { padding: .5rem .2rem; text-align: center; font-size: .82rem; font-weight: 700; background: var(--surface-2); border-bottom: 1px solid var(--border); }
.cal-month th.is-sat { color: var(--err); }
.cal-wd { display: block; } .cal-wd2 { display: block; font-size: .7rem; font-weight: 500; color: var(--muted); }
.cal-d { vertical-align: top; height: 6.2rem; padding: .35rem .4rem; border: 1px solid var(--border); overflow: hidden; }
.cal-month tr > .cal-d:first-child { border-left: 0; } .cal-month tr > .cal-d:last-child { border-right: 0; }
.cal-d--empty { background: var(--surface-2); }
.cal-d__nums { display: flex; align-items: baseline; justify-content: space-between; gap: .2rem; }
.cal-d__main { font-size: 1.15rem; font-weight: 700; line-height: 1.1; }
.cal-d__alt { font-size: .72rem; color: var(--muted); white-space: nowrap; }
.cal-d.is-holiday .cal-d__main { color: var(--err); }
.cal-d.is-holiday:not(.is-today) { background: color-mix(in srgb, var(--err) 4%, var(--surface)); }
.holiday-days { display: grid; grid-template-columns: repeat(auto-fill, minmax(8.5rem, 1fr)); gap: .5rem; border: 0; padding: 0; margin: 0; }
.holiday-day { display: flex; align-items: center; gap: .6rem; padding: .65rem .75rem; border: 1px solid var(--border-strong); border-radius: 10px; cursor: pointer; background: var(--surface); }
.holiday-day span { display: flex; flex-direction: column; line-height: 1.2; } .holiday-day small { color: var(--muted); font-size: .75rem; }
.holiday-day:has(input:checked) { border-color: var(--err); background: color-mix(in srgb, var(--err) 7%, var(--surface)); }
.holiday-day:has(input:checked) strong { color: var(--err); }
.cal-foot { margin: 0; padding: .7rem 1rem; border-top: 1px solid var(--border); font-size: .82rem; color: var(--muted); }
.cal-key { display: inline-block; width: .8rem; height: .8rem; border-radius: 3px; vertical-align: -1px; }
.cal-key--off { background: color-mix(in srgb, var(--err) 25%, var(--surface)); border: 1px solid var(--err); }
.cal-d.is-today { background: color-mix(in srgb, var(--brand) 8%, var(--surface)); box-shadow: inset 0 0 0 2px var(--brand); }
.cal-d.is-today .cal-d__main { color: var(--brand); }
@media (max-width: 640px) {
  .cal-head { padding: .8rem; }
  .cal-title { font-size: 1.25rem; }
  .cal-pick { width: 100%; }
  .cal-month th { padding: .4rem 0; font-size: .72rem; }
  .cal-wd2 { font-size: .6rem; }
  .cal-d { height: 3.9rem; padding: .25rem .2rem; }
  .cal-d__nums { flex-direction: column; align-items: flex-start; gap: 0; }
  .cal-d__main { font-size: 1rem; }
  .cal-d__alt { font-size: .62rem; }
  .cal-d .cal-entry { font-size: .58rem; padding: 0 .15rem; margin-top: .1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
}
.cal-entry { display: block; overflow: hidden; text-overflow: ellipsis; margin-top: .2rem; padding: .1rem .35rem; border-radius: 6px; font-size: .75rem; background: var(--surface-3); line-height: 1.3; }
.cal-entry--holiday { background: var(--err-bg); color: var(--err); }
.cal-entry--exam { background: var(--warn-bg); color: var(--warn); }
.cal-entry--birthday { background: var(--ok-bg); color: var(--ok); }
tr.is-unread td { background: var(--surface-2); }
.card--accent { border-left: 3px solid var(--primary, #4f46e5); }

/* payment proof slip preview (phase 14) */
.proof-slip { max-width: 100%; max-height: 480px; border: 1px solid var(--border, #ddd); border-radius: 8px; }

/* dashboard widgets (phase 15) */
.dash-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.dash-grid > .card { margin: 0; }
.stat--link { color: inherit; text-decoration: none; }
.stat--link:hover .stat__value { text-decoration: underline; }
.att-bars { display: grid; gap: .5rem; }
.att-row { display: grid; grid-template-columns: 7rem 1fr 3.5rem; gap: .5rem; align-items: center; font-size: .875rem; }
.att-row progress { width: 100%; height: .6rem; }
.money-list { display: grid; grid-template-columns: 1fr auto; gap: .35rem 1rem; margin: 0; }
.money-list dt { color: var(--muted); }
.money-list dd { margin: 0; font-weight: 600; text-align: right; }
.money-list .is-warn { color: var(--err); }
.waiting-list, .event-list, .period-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; }
.waiting-list a { display: flex; gap: .6rem; align-items: center; }
.waiting-list strong { min-width: 2.2rem; text-align: center; padding: .1rem .4rem; border-radius: 999px; background: var(--surface-2); }
.event-list li, .period-list li { display: flex; justify-content: space-between; gap: .75rem; border-bottom: 1px solid var(--border); padding-bottom: .4rem; }
.chart { margin: 0; }
.chart__svg { width: 100%; height: auto; display: block; }
.chart__axis { stroke: var(--border-strong); stroke-width: 1; }
.chart__bar--income { fill: var(--brand); }
.chart__bar--expense { fill: var(--err); }
.chart__label { fill: var(--muted); font-size: 16px; }
.att-bars + h3 { margin-top: 1rem; }
.chart__legend { display: flex; gap: .5rem; align-items: center; font-size: .8rem; color: var(--muted); margin-top: .25rem; }
.chart__key { display: inline-block; width: .75rem; height: .75rem; border-radius: 2px; }
.chart__key--income { background: var(--brand); }
.chart__key--expense { background: var(--err); margin-left: .75rem; }
/* language switch: same diamond as the other top-bar icons (the button sits inside its own small form) */
.lang-form { display: inline-flex; margin: 0; }
.topbar__actions .lang-switch {
  width: 38px; height: 38px; margin: 4px; padding: 0; border: 1px solid var(--border); border-radius: 8px; background: var(--surface);
  box-shadow: 0 4px 12px -8px rgb(0 0 0 / .45); transform: rotate(45deg); color: var(--text); transition: background .15s, color .15s, box-shadow .15s;
  display: inline-grid; place-items: center; font-weight: 700; font-size: .85rem; line-height: 1; cursor: pointer; }
.topbar__actions .lang-switch > span { transform: rotate(-45deg); }
.topbar__actions .lang-switch:hover, .topbar__actions .lang-switch:focus-visible {
  background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: 0 8px 18px -10px color-mix(in srgb, var(--brand) 90%, transparent); }
@media (prefers-reduced-motion: reduce) { .topbar__actions .lang-switch { transition: none; } }
.input-wide { max-width: none; min-width: 12rem; }

/* reports hub (phase 16) */
.report-area { margin-bottom: 1rem; }
.report-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: .75rem 1.25rem; }
.report-list li { display: grid; gap: .15rem; }
.report-exam { margin-top: 1rem; border-top: 1px solid var(--border); padding-top: 1rem; }

/* ---------- Student promotion page ---------- */
.input--xs { width: 5.5rem; min-width: 0; padding: .35rem .5rem; }
.table tr.is-error td { background: var(--err-bg); }
.callout ol { margin: .35rem 0 0; padding-left: 1.2rem; display: grid; gap: .2rem; }
[data-promotion-row] .check + .check { margin-left: .6rem; }
[data-promotion-row].is-leaving td { color: var(--muted); }
[data-promotion] [hidden] { display: none !important; }

/* ---------- Offline payment ways with QR codes (fees page, online admission) ---------- */
.pay-ways { display: grid; gap: .8rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.pay-way { display: flex; gap: 1rem; align-items: flex-start; justify-content: space-between; padding: .9rem 1rem; border: 1px solid rgba(100, 116, 139, .35); border-radius: 12px; background: rgba(148, 163, 184, .06); }
.pay-way h3 { margin: 0 0 .3rem; font-size: 1rem; }
.pay-way p { margin: 0 0 .4rem; overflow-wrap: anywhere; }
.pay-way__text { flex: 1; min-width: 0; }
.pay-way__qr { margin: 0; display: grid; gap: .4rem; justify-items: center; flex: 0 0 auto; }
.pay-way__qr img { width: 160px; height: 160px; object-fit: contain; background: #fff; border-radius: 8px; padding: 6px; border: 1px solid rgba(100, 116, 139, .3); }
@media (max-width: 520px) { .pay-way--qr { flex-direction: column; align-items: stretch; } .pay-way__qr img { width: 200px; height: 200px; } }
.renew-qr[hidden] { display: none; }
.renew-qr { justify-items: start; }
.pm-qr { width: 96px; height: 96px; object-fit: contain; background: #fff; border: 1px solid var(--border); border-radius: 8px; padding: 4px; }

/* ---------- Subscription: plan cards and renewal steps ---------- */
.plan-cards { display: grid; gap: var(--space-3); grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.plan-card { display: flex; flex-direction: column; gap: .5rem; padding: 1rem; border: 1px solid var(--border-strong); border-radius: var(--radius); background: var(--surface); }
.plan-card h3 { margin: 0; display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.plan-card p { margin: 0; }
.plan-card .btn { margin-top: auto; align-self: flex-start; }
.plan-card--rec { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand) inset; }
.plan-card--current { background: var(--brand-soft); }
.plan-card__price strong { font-size: 1.15rem; }
.plan-card__limits { margin: 0; padding-left: 1.1rem; display: grid; gap: .15rem; }
.steps-inline { margin: 0; padding-left: 1.2rem; display: grid; gap: .25rem; color: var(--text-2); }

/* ---------- Formatted text (RichText: rt-* classes, no inline styles) ---------- */
.rt > :first-child { margin-top: 0; }
.rt > :last-child { margin-bottom: 0; }
.rt p, .rt ul, .rt ol, .rt blockquote, .rt table { margin: 0 0 .6em; }
.rt h2 { font-size: 1.3em; margin: .4em 0 .4em; } .rt h3 { font-size: 1.15em; margin: .4em 0 .35em; } .rt h4 { font-size: 1em; margin: .4em 0 .3em; }
.rt ul, .rt ol { padding-left: 1.4em; }
.rt blockquote { border-left: 3px solid currentColor; padding: .2em .8em; opacity: .85; }
.rt hr { border: 0; border-top: 1px solid rgba(100, 116, 139, .4); margin: .8em 0; }
.rt a { text-decoration: underline; overflow-wrap: anywhere; }
.rt .rt-table, .rt table { border-collapse: collapse; width: 100%; max-width: 100%; display: block; overflow-x: auto; }
.rt th, .rt td { border: 1px solid rgba(100, 116, 139, .45); padding: .35em .55em; text-align: left; vertical-align: top; min-width: 3em; }
.rt th { background: rgba(148, 163, 184, .18); font-weight: 600; }
.rt .rt-left { text-align: left; } .rt .rt-center { text-align: center; } .rt .rt-right { text-align: right; } .rt .rt-justify { text-align: justify; }
.rt .rt-sm { font-size: .85em; } .rt .rt-lg { font-size: 1.25em; } .rt .rt-xl { font-size: 1.6em; line-height: 1.2; }
.rt-c-red { color: #c81e1e; } .rt-c-orange { color: #c2560c; } .rt-c-green { color: #15803d; } .rt-c-blue { color: #1d4ed8; } .rt-c-purple { color: #7e22ce; } .rt-c-gray { color: #64748b; }
.rt-hl-yellow { background: #fef08a; color: #1f2937; } .rt-hl-green { background: #bbf7d0; color: #1f2937; } .rt-hl-blue { background: #bfdbfe; color: #1f2937; } .rt-hl-pink { background: #fbcfe8; color: #1f2937; }
mark.rt-hl-yellow, mark.rt-hl-green, mark.rt-hl-blue, mark.rt-hl-pink { padding: 0 .15em; border-radius: 2px; }

/* ---------- Rich text editor (textarea[data-rich]) ---------- */
.rte { border: 1px solid var(--border-strong); border-radius: var(--radius); background: var(--surface); overflow: visible; }
.rte__bar { display: flex; flex-wrap: wrap; gap: .35rem; padding: .4rem; background: var(--surface-2); border-bottom: 1px solid var(--border); border-radius: var(--radius) var(--radius) 0 0; position: sticky; top: 0; z-index: 3; }
.rte__group { display: inline-flex; border: 1px solid var(--border-strong); border-radius: 8px; background: var(--surface); }
.rte__group > * + * { border-left: 1px solid var(--border); }
.rte__btn { display: inline-flex; align-items: center; gap: .2rem; min-width: 34px; height: 32px; padding: 0 .5rem; border: 0; background: transparent; color: var(--text); font: inherit; font-size: .9rem; cursor: pointer; justify-content: center; }
.rte__group > :first-child, .rte__group > :first-child > .rte__btn { border-radius: 7px 0 0 7px; } .rte__group > :last-child, .rte__group > :last-child > .rte__btn { border-radius: 0 7px 7px 0; }
.rte__btn:hover { background: var(--brand-soft); } .rte__btn.is-on { background: var(--brand-soft); color: var(--brand); }
.rte__btn:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; } .rte__btn:disabled { opacity: .4; cursor: default; }
.rte__caret { font-size: .65rem; opacity: .7; } .rte__label { font-size: .82rem; }
.rte__drop { position: relative; display: inline-flex; }
.rte__menu { position: absolute; top: calc(100% + 4px); left: 0; z-index: 20; min-width: 170px; padding: .3rem; background: var(--surface); border: 1px solid var(--border-strong); border-radius: 10px; box-shadow: 0 12px 30px rgba(15, 23, 42, .18); display: grid; gap: 2px; }
.rte__menu[hidden] { display: none; }
.rte__menu--wide { min-width: 200px; }
.rte__item { justify-content: flex-start; width: 100%; height: auto; min-height: 32px; border-radius: 6px; text-align: left; white-space: nowrap; }
.rte__h2 { font-size: 1.2rem; } .rte__h3 { font-size: 1.05rem; }
.rte__swatch { display: inline-grid; place-items: center; width: 1.4em; height: 1.4em; border-radius: 4px; font-weight: 700; border: 1px solid var(--border); }
.rte__grid { grid-template-columns: repeat(6, 22px); gap: 3px; min-width: 0; padding: .45rem; }
.rte__cell { width: 22px; height: 22px; border: 1px solid var(--border-strong); border-radius: 3px; background: var(--surface); cursor: pointer; padding: 0; }
.rte__cell.is-on { background: var(--brand-soft); border-color: var(--brand); }
.rte__gridlabel { grid-column: 1 / -1; margin: .2rem 0 0; text-align: center; font-size: .8rem; color: var(--muted); }
.rte__area { min-height: 180px; max-height: 60vh; overflow: auto; padding: .8rem 1rem; outline: none; line-height: 1.55; }
.rte__area:focus { box-shadow: inset 0 0 0 2px var(--brand-soft); }
.rte__area table td, .rte__area table th { min-width: 4em; }
.rte .rte__source { width: 100%; min-height: 220px; border: 0; border-radius: 0 0 var(--radius) var(--radius); font-family: ui-monospace, monospace; font-size: .85rem; padding: .8rem; }
.rte--full { position: fixed; inset: 0; z-index: 1000; border-radius: 0; display: flex; flex-direction: column; }
.rte--full .rte__area, .rte--full .rte__source { flex: 1; max-height: none; }
body.rte-lock { overflow: hidden; }

/* ---------- Subscription invoice template (Platform › Invoice template) ---------- */
.inv-wrap { max-width: 900px; padding: 0; overflow: hidden; }
.inv { --acc: #4338ca; --acc-soft: #eef2ff; --ink: #111827; --mute: #4b5563; --line: #d1d5db;
  position: relative; background: #fff; color: var(--ink); padding: 2rem 2.2rem; font-size: .92rem; line-height: 1.5; }
.inv--indigo { --acc: #4338ca; --acc-soft: #eef2ff; } .inv--blue { --acc: #1d4ed8; --acc-soft: #eff6ff; } .inv--teal { --acc: #0f766e; --acc-soft: #f0fdfa; }
.inv--green { --acc: #15803d; --acc-soft: #f0fdf4; } .inv--maroon { --acc: #9f1239; --acc-soft: #fff1f2; } .inv--orange { --acc: #c2410c; --acc-soft: #fff7ed; } .inv--slate { --acc: #334155; --acc-soft: #f1f5f9; }
.inv p { margin: 0; }
.inv__head { display: flex; justify-content: space-between; gap: 1.5rem; align-items: flex-start; flex-wrap: wrap; padding-bottom: 1.2rem; border-bottom: 2px solid var(--acc); }
.inv__brand { display: flex; gap: .9rem; align-items: center; min-width: 0; }
.inv__logo { width: 64px; height: 64px; object-fit: contain; flex: 0 0 auto; }
.inv__mark { width: 56px; height: 56px; border-radius: 14px; background: var(--acc); color: #fff; display: grid; place-items: center; font-size: 1.6rem; font-weight: 800; flex: 0 0 auto; }
.inv__company { font-size: 1.25rem; font-weight: 800; color: var(--ink); }
.inv__contact { color: var(--mute); font-size: .82rem; margin-top: .15rem !important; }
.inv__titlebox { text-align: right; }
.inv__title { font-size: 1.6rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--acc); }
.inv__status { display: inline-block; margin-top: .35rem !important; padding: .15rem .6rem; border: 2px solid currentColor; border-radius: 6px; font-weight: 800; letter-spacing: .08em; font-size: .8rem; color: #b45309; }
.inv__status--paid { color: #15803d; } .inv__status--void, .inv__status--cancelled { color: #b91c1c; }
.inv__parties { display: flex; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; margin: 1.3rem 0; }
.inv__label { display: block; text-transform: uppercase; letter-spacing: .08em; font-size: .7rem; font-weight: 700; color: var(--acc); margin-bottom: .2rem !important; }
.inv__strong { font-weight: 700; }
.inv__small { font-size: .8rem; color: var(--mute); }
.inv__facts { margin: 0; display: grid; gap: .25rem; min-width: 220px; }
.inv__facts div { display: flex; justify-content: space-between; gap: 1rem; border-bottom: 1px dashed var(--line); padding-bottom: .2rem; }
.inv__facts dt { color: var(--mute); font-size: .82rem; } .inv__facts dd { margin: 0; font-weight: 600; text-align: right; }
.inv__items { width: 100%; border-collapse: collapse; margin-top: .4rem; }
.inv__items th { background: var(--acc); color: #fff; text-align: left; font-size: .75rem; letter-spacing: .06em; text-transform: uppercase; padding: .55rem .7rem; }
.inv__items td { padding: .65rem .7rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.inv__items .num { text-align: right; white-space: nowrap; }
.inv__items tfoot td { border-bottom: 0; padding: .35rem .7rem; color: var(--mute); }
.inv__items .inv__total td { color: var(--ink); font-weight: 800; font-size: 1.05rem; background: var(--acc-soft); border-top: 2px solid var(--acc); }
.inv__words { margin-top: .6rem !important; font-size: .85rem; } .inv__words .inv__label { display: inline; margin-right: .4rem; }
.inv__paid { margin-top: .9rem !important; padding: .55rem .8rem; border-radius: 8px; background: #f0fdf4; color: #166534; font-weight: 600; }
.inv__pay { margin-top: 1.1rem; padding: .9rem 1rem; border: 1px solid var(--line); border-radius: 10px; background: var(--acc-soft); }
.inv__methods { display: grid; gap: .7rem; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); margin: .3rem 0 .5rem; }
.inv__method { display: flex; gap: .7rem; justify-content: space-between; align-items: flex-start; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: .6rem .7rem; font-size: .85rem; }
.inv__qr { width: 96px; height: 96px; object-fit: contain; flex: 0 0 auto; }
.inv__foot { display: flex; justify-content: space-between; align-items: flex-end; gap: 2rem; margin-top: 2rem; padding-top: 1rem; border-top: 1px solid var(--line); flex-wrap: wrap; }
.inv__terms { flex: 1 1 300px; font-size: .82rem; color: var(--mute); display: grid; gap: .4rem; }
.inv__sign { position: relative; text-align: center; min-width: 190px; display: grid; justify-items: center; gap: .1rem; }
.inv__signature { max-width: 170px; max-height: 60px; object-fit: contain; }
.inv__signline { display: block; width: 170px; height: 46px; border-bottom: 1px solid var(--ink); }
.inv__stamp { position: absolute; right: -14px; top: -36px; width: 86px; height: 86px; object-fit: contain; opacity: .85; }
/* modern: coloured header band */
.inv--modern .inv__head { margin: -2rem -2.2rem 0; padding: 1.6rem 2.2rem; background: var(--acc); border-bottom: 0; color: #fff; }
.inv--modern .inv__company, .inv--modern .inv__title { color: #fff; }
.inv--modern .inv__contact { color: rgba(255, 255, 255, .85); }
.inv--modern .inv__logo { background: #fff; border-radius: 12px; padding: 4px; }
.inv--modern .inv__mark { background: #fff; color: var(--acc); }
.inv--modern .inv__status { color: #fff; }
/* minimal: black and white */
.inv--minimal { --acc: #111827; --acc-soft: #f9fafb; }
.inv--minimal .inv__items th { background: transparent; color: var(--ink); border-bottom: 2px solid var(--ink); }
.inv--minimal .inv__title { font-weight: 700; }
.inv.document--void::after { content: "VOID"; position: absolute; inset: 40% 0 auto; text-align: center; font-size: 5rem; font-weight: 900; color: #b91c1c; opacity: .2; transform: rotate(-12deg); pointer-events: none; }
@media (max-width: 640px) { .inv { padding: 1.2rem; } .inv--modern .inv__head { margin: -1.2rem -1.2rem 0; padding: 1.2rem; } .inv__titlebox { text-align: left; } .inv__items th:nth-child(3), .inv__items td:nth-child(3) { display: none; } .inv__items tfoot td[colspan] { } }
@media print {
  .inv-wrap { border: 0 !important; box-shadow: none !important; max-width: none; }
  .inv { padding: 0; font-size: 11pt; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .inv--modern .inv__head { margin: 0 0 0; }
}
/* settings page */
.inv-settings { display: grid; gap: var(--space-4); grid-template-columns: minmax(0, 420px) minmax(0, 1fr); align-items: start; }
.inv-preview { position: sticky; top: 1rem; } .inv-preview .inv { font-size: .8rem; }
@media (max-width: 1100px) { .inv-settings { grid-template-columns: 1fr; } .inv-preview { position: static; } }
.choice-list--tight { margin: .2rem 0; gap: .35rem; }
.accent-picks { display: flex; flex-wrap: wrap; gap: .4rem .9rem; }
.accent-pick { display: inline-flex; align-items: center; gap: .35rem; cursor: pointer; font-size: .9rem; }
.accent-pick__dot { width: 18px; height: 18px; border-radius: 50%; background: var(--acc); display: inline-block; }

/* ---------- Student accounting like Ramom (fee groups, invoice / collect page, prints) ---------- */
.split-2 { display: grid; gap: var(--space-4); grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); align-items: start; }
@media (max-width: 1000px) { .split-2 { grid-template-columns: 1fr; } }
.input--sm { width: 7.5rem; min-width: 0; }
.input--md { width: 14rem; max-width: 100%; }
.text-warn { color: var(--warn); }
.tabs .tabs__tab.is-active, .tabs .tabs__tab.is-active:visited, .tabs .tabs__tab.is-active:hover { background: var(--brand); border-color: var(--brand); color: #fff; }
.fee-doc { max-width: 1100px; }
.fee-doc__head { display: flex; justify-content: space-between; gap: var(--space-4); flex-wrap: wrap; border-bottom: 2px solid var(--border); padding-bottom: var(--space-3); margin-bottom: var(--space-3); }
.fee-doc__head p { margin: 0; }
.fee-doc__school { font-size: 1.15rem; font-weight: 800; }
.fee-doc__meta { text-align: right; display: grid; gap: .15rem; justify-items: end; }
.fee-doc__title { font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--brand-text, var(--brand)); }
.fee-doc__to { margin: 0 0 var(--space-3); }
.fee-doc__to dt { font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; }
.fee-doc__to dd { margin: .1rem 0 0; }
.fee-doc__tools { margin-bottom: var(--space-3); }
.fee-table .fee-table__group th, .fee-print__table .fee-table__group th { background: var(--surface-2); text-align: left; font-weight: 700; padding: .35rem .6rem; }
.fee-sum { margin: var(--space-3) 0 0 auto; max-width: 380px; display: grid; gap: .2rem; }
.fee-sum--left { margin-left: 0; }
.fee-sum div { display: flex; justify-content: space-between; gap: 1rem; padding: .2rem 0; border-bottom: 1px dashed var(--border); }
.fee-sum dt { color: var(--text-2); } .fee-sum dd { margin: 0; font-weight: 600; }
.fee-sum__total { border-bottom: 0 !important; border-top: 2px solid var(--text); font-size: 1.05rem; }
.fee-sum__words { margin: .3rem 0 0; font-size: .85rem; color: var(--muted); text-align: right; font-style: italic; }
/* printouts */
.fee-print { background: #fff; color: #111; max-width: 900px; margin: 0 auto 2rem; padding: 1.5rem; border: 1px solid #ddd; }
.fee-print + .fee-print { break-before: page; page-break-before: always; }
.fee-print__table { width: 100%; border-collapse: collapse; font-size: .85rem; }
.fee-print__table th, .fee-print__table td { border: 1px solid #ccc; padding: .3rem .45rem; text-align: left; }
.fee-print__table .num { text-align: right; white-space: nowrap; }
.fee-sum--compact { max-width: none; font-size: .8rem; }
@media print { .fee-print { border: 0; padding: 0; } .fee-table .no-print, .fee-print .no-print { display: none; } }
.split-2 > .card--flush .table td:nth-child(2), .split-2 > .card--flush .table th:nth-child(2) { min-width: 9rem; }
.split-2 > .card--flush .table td:nth-child(3) { min-width: 12rem; }

/* ---------- WhatsApp chat button (partials/whatsapp-chat.php) ---------- */
.wa-chat { position: fixed; right: 1.1rem; bottom: 1.1rem; z-index: 55; font-size: .92rem; }
.wa-chat__btn { position: relative; list-style: none; width: 60px; height: 60px; border-radius: 50%; background: transparent; display: grid; place-items: center; cursor: pointer;
  margin-left: auto; transition: transform .15s ease; -webkit-tap-highlight-color: transparent; }
/* the WhatsApp picture alone (transparent round icon), a soft ring that spreads and a little "ringing" shake every few seconds */
.wa-chat__img { position: relative; z-index: 1; width: 60px; height: 60px; filter: drop-shadow(0 6px 10px rgb(0 0 0 / .25)); animation: wa-ring 4s ease-in-out infinite; transform-origin: 50% 60%; user-select: none; -webkit-user-drag: none; }
.wa-chat__ring { position: absolute; inset: 4px; border-radius: 50%; background: rgb(37 211 102 / .45); animation: wa-pulse 2s ease-out infinite; }
@keyframes wa-pulse { 0% { transform: scale(.9); opacity: .7; } 100% { transform: scale(1.55); opacity: 0; } }
@keyframes wa-ring { 0%, 72%, 100% { transform: rotate(0) scale(1); } 76% { transform: rotate(-14deg) scale(1.08); } 80% { transform: rotate(12deg) scale(1.08); } 84% { transform: rotate(-10deg) scale(1.06); } 88% { transform: rotate(8deg) scale(1.04); } 92% { transform: rotate(-4deg); } }
.wa-chat[open] .wa-chat__img, .wa-chat:hover .wa-chat__img { animation: none; }
.wa-chat[open] .wa-chat__ring { display: none; }
/* floating: it bobs gently; it can be dragged to the left or right side (app.js) */
.wa-chat__btn { animation: wa-float 3.2s ease-in-out infinite; touch-action: none; }
@keyframes wa-float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -6px; } }
.wa-chat.is-drag .wa-chat__btn { animation: none; cursor: grabbing; transform: scale(1.08); }
.wa-chat.is-drag .wa-chat__img { animation: none; }
.wa-chat[open] .wa-chat__btn { animation: none; }
.wa-chat--left .wa-chat__panel { right: auto; left: 0; }
.wa-chat--left .wa-chat__btn { margin-left: 0; }
.wa-chat--down .wa-chat__panel { bottom: auto; top: 68px; }
@media (prefers-reduced-motion: reduce) { .wa-chat__img, .wa-chat__ring, .wa-chat__btn { animation: none; } .wa-chat__ring { display: none; } }
.wa-chat__btn::-webkit-details-marker { display: none; }
.wa-chat__btn:hover { transform: scale(1.06); }
.wa-chat__btn:focus-visible { outline: 3px solid #128c7e; outline-offset: 3px; }
.wa-chat[open] .wa-chat__btn { transform: scale(.92); }
.wa-chat__panel { position: absolute; right: 0; bottom: 68px; width: min(340px, calc(100vw - 2.2rem)); background: var(--surface, #fff); color: var(--text, #111827);
  border-radius: 14px; overflow: hidden; box-shadow: 0 12px 36px rgba(0, 0, 0, .25); text-align: left; }
.wa-chat__head { display: flex; gap: .7rem; align-items: center; padding: .9rem 1rem; background: #128c7e; color: #fff; }
.wa-chat__head-icon { color: #128c7e; display: grid; place-items: center; }
.wa-chat__head strong { display: block; font-size: 1.02rem; }
.wa-chat__head small { display: block; opacity: .92; line-height: 1.35; margin-top: .1rem; }
.wa-chat__hint { margin: .7rem 1rem .3rem; font-size: .8rem; color: var(--text-2, #6b7280); }
.wa-chat__agents { list-style: none; margin: 0; padding: 0 .5rem .4rem; max-height: 50vh; overflow: auto; }
.wa-agent { display: flex; align-items: center; gap: .7rem; padding: .55rem .5rem; border-radius: 10px; color: inherit; text-decoration: none; border-left: 3px solid #25d366; margin-bottom: .3rem; background: rgba(37, 211, 102, .06); }
.wa-agent:hover, .wa-agent:focus-visible { background: rgba(37, 211, 102, .14); }
.wa-agent--away { border-left-color: #9ca3af; background: rgba(156, 163, 175, .08); }
.wa-agent__avatar { flex: none; width: 40px; height: 40px; border-radius: 50%; background: #25d366; color: #fff; display: grid; place-items: center; font-weight: 700; }
.wa-agent--away .wa-agent__avatar { background: #9ca3af; }
.wa-agent__avatar { position: relative; }
.wa-agent__avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; background: #fff; border: 2px solid #25d366; box-sizing: border-box; }
.wa-agent--away .wa-agent__avatar img { border-color: #9ca3af; }
.wa-agent__avatar.is-online::after { content: ""; position: absolute; right: -1px; top: -1px; width: 11px; height: 11px; border-radius: 50%; background: #22c55e; border: 2px solid #fff; }
.wa-photo-cell { min-width: 9rem; }
.wa-photo-thumb { display: block; width: 40px; height: 40px; border-radius: 50%; object-fit: cover; border: 1px solid var(--border, #e5e7eb); margin-bottom: .25rem; }
.wa-photo-input { font-size: .78rem; max-width: 12rem; }
.wa-agent__text { flex: 1; min-width: 0; }
.wa-agent__text strong, .wa-agent__text small { display: block; }
.wa-agent__text small { color: var(--text-2, #6b7280); font-size: .78rem; }
.wa-agent__status { color: #15803d !important; }
.wa-agent--away .wa-agent__status { color: var(--text-2, #6b7280) !important; }
.wa-agent__go { font-size: 1.4rem; color: #128c7e; }
.wa-chat__foot { margin: 0; padding: .6rem 1rem .8rem; font-size: .78rem; color: var(--text-2, #6b7280); border-top: 1px solid var(--border, #e5e7eb); }
.wa-chat--preview { position: relative; right: auto; bottom: auto; z-index: auto; display: flex; flex-direction: column-reverse; align-items: flex-end; gap: 12px; }
.wa-chat--preview .wa-chat__panel { position: static; }
.wa-settings { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: var(--space-4); align-items: start; }
@media (max-width: 1100px) { .wa-settings { grid-template-columns: minmax(0, 1fr); } }
.wa-agents input:not([type="checkbox"]) { min-width: 7rem; width: 100%; }
.wa-agents-head { padding: var(--space-4) var(--space-4) var(--space-2); }
.wa-agents-head h2 { margin: 0 0 .25rem; }
/* keep toasts clear of the button */
@media print { .wa-chat:not(.wa-chat--preview) { display: none; } }

/* ---------- Full-screen button ---------- */
.fs-icon--off { display: none; }
[data-fullscreen][hidden] { display: none; }
[data-fullscreen].is-on .fs-icon--on { display: none; }
[data-fullscreen].is-on .fs-icon--off { display: inline; }

/* ---------- Date fields: AD and BS (वि.सं.) as one neat group each; picker month grid ---------- */
.date-group, .bs-field { position: relative; display: flex; align-items: stretch; min-width: 12.5rem; border: 1px solid var(--border-strong); border-radius: 10px;
  background: var(--surface); transition: border-color .15s, box-shadow .15s; }
.bs-field { margin-top: .35rem; }
.date-group:focus-within, .bs-field:focus-within { border-color: var(--brand); box-shadow: var(--focus); }
.date-group:has(input:disabled) { background: var(--surface-2); }
.date-tag { flex: none; display: grid; place-items: center; min-width: 2.9rem; padding: 0 .5rem; font-size: .72rem; font-weight: 700; letter-spacing: .02em; color: var(--text-2);
  background: var(--surface-2); border-right: 1px solid var(--border); border-radius: 9px 0 0 9px; }
.date-group input, .bs-field input { flex: 1; min-width: 0; width: auto !important; min-height: 38px !important; padding: .4rem .6rem !important; border: 0 !important; border-radius: 0 9px 9px 0 !important;
  box-shadow: none !important; background: transparent !important; color: var(--text); font: inherit; outline: none; }
.bs-field input { border-radius: 0 !important; }
.date-group input::-webkit-calendar-picker-indicator { cursor: pointer; opacity: .65; }
.bs-field__open { flex: none; display: inline-flex; align-items: center; gap: .35rem; padding: 0 .75rem; border: 0; border-left: 1px solid var(--border); border-radius: 0 9px 9px 0;
  background: var(--brand-soft); color: var(--brand); font: inherit; font-size: .85rem; font-weight: 600; cursor: pointer; }
.bs-field__open:hover { filter: brightness(.96); }
.bs-field .bs-field__time { flex: 0 0 auto; width: 8.5rem !important; border-left: 1px solid var(--border) !important; }
.bs-field input:disabled, .bs-field__open:disabled { background: var(--surface-2); cursor: not-allowed; }
.bs-field__open:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }
.bs-field input:invalid { color: var(--err); }
.table .date-group input, .table .bs-field input { min-height: 34px !important; }
.bs-pop { width: 19rem; padding: .7rem; border-radius: 12px; }
.bs-pop__head strong { font-size: 1rem; }
.bs-pop__nav { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--border); background: var(--surface); color: var(--text); font-size: 1.15rem; line-height: 1; cursor: pointer; }
.bs-pop__nav:hover { background: var(--surface-2); }
.bs-pop__wd:last-child { color: #dc2626; }
.bs-pop__day { aspect-ratio: 1; display: grid; place-items: center; border-radius: 50%; }
.bs-pop__day.is-sat { color: #dc2626; }
.bs-pop__day.is-today { box-shadow: inset 0 0 0 1.5px var(--brand); font-weight: 700; }
.bs-pop__day.is-selected { background: var(--brand); color: #fff; }
.bs-pop__foot { display: flex; justify-content: space-between; margin-top: .45rem; padding-top: .45rem; border-top: 1px solid var(--border); }
.bs-pop__link { border: 0; background: none; color: var(--brand); font: inherit; font-weight: 600; cursor: pointer; padding: .2rem .4rem; border-radius: 6px; }
.bs-pop__link:hover { background: var(--brand-soft); }
.bs-pop__link--muted { color: var(--text-2); }
/* inputs inside tables (fee groups, collect fees …) look like the other fields */
.table td > input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), .table td > select { min-height: 34px; padding: .35rem .55rem; border: 1px solid var(--border-strong);
  border-radius: 8px; background: var(--surface); color: var(--text); font: inherit; }
.table td > input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):focus, .table td > select:focus { outline: none; border-color: var(--brand); box-shadow: var(--focus); }
.table .date-group, .table .bs-field { min-width: 10.5rem; }
.table .date-tag { min-width: 2.3rem; padding: 0 .35rem; font-size: .66rem; }
.table .bs-field__open { padding: 0 .55rem; }
.table .bs-field__open span { display: none; }
/* Fees group form: one small card per fee type (fits the narrow side panel) */
.fg-items { border: 0; padding: 0; margin: 0; display: grid; gap: .6rem; }
.fg-items legend { font-weight: 600; margin-bottom: .4rem; padding: 0; }
.fg-item { border: 1px solid var(--border); border-radius: 12px; padding: .7rem .8rem; background: var(--surface); }
.fg-item:has([data-fee-on]:checked) { border-color: var(--brand); background: var(--brand-soft); }
.fg-item__fields { display: grid; grid-template-columns: minmax(0, 1fr) 7.5rem; gap: .6rem; margin-top: .5rem; align-items: start; }
.fg-item__fields .field { margin: 0; }
.fg-item__fields label { font-size: .8rem; }
.fg-item:not(:has([data-fee-on]:checked)) .fg-item__fields { opacity: .6; }
@media (max-width: 420px) { .fg-item__fields { grid-template-columns: minmax(0, 1fr); } }
/* narrow places (fees group cards, tables): the पात्रो button shows its icon only, so the BS date is never cut */
.fg-item .bs-field__open, .table .bs-field__open { padding: 0 .6rem; }
.fg-item .bs-field__open span { display: none; }
.fg-item .date-tag { min-width: 2.6rem; padding: 0 .4rem; }
.bs-field input, .date-group input { min-width: 6.8rem; }
.fg-item__fields { grid-template-columns: minmax(0, 1fr) 6.5rem; }

/* पात्रो: calendar icon only, everywhere */
.bs-field__open { padding: 0 .65rem !important; justify-content: center; min-width: 2.6rem; }
.bs-pop__title { display: flex; gap: .35rem; align-items: center; }
.bs-pop__select { min-height: 32px; padding: .2rem 1.6rem .2rem .5rem; border: 1px solid var(--border-strong); border-radius: 8px; background-color: var(--surface); color: var(--text);
  font: inherit; font-weight: 600; font-size: .9rem; cursor: pointer; }
.bs-pop__select:focus { outline: none; border-color: var(--brand); box-shadow: var(--focus); }

/* ---------- My fees (students and parents): cards instead of wide tables ---------- */
.mf-head { display: flex; align-items: center; gap: .8rem; }
.mf-head__avatar { flex: none; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand-text, var(--brand)); font-weight: 700; }
.mf-head__text { flex: 1; min-width: 0; }
.mf-head__text h2 { margin: 0; font-size: 1.15rem; }
.mf-head__text p { margin: .1rem 0 0; }
.mf-sum { display: grid; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); gap: .6rem; }
.mf-sum__item { border: 1px solid var(--border); border-radius: 12px; padding: .7rem .85rem; background: var(--surface); display: grid; gap: .15rem; }
.mf-sum__item span { font-size: .78rem; color: var(--text-2); }
.mf-sum__item strong { font-size: 1.12rem; }
.mf-sum__item--due { background: var(--brand-soft); border-color: transparent; }
.mf-sum__item--due strong { color: var(--brand-text, var(--brand)); font-size: 1.3rem; }
.mf-sum__item--ok strong { color: #15803d; }
.mf-sum__item--warn strong { color: #b45309; }
.mf-group { margin: .4rem 0 0; font-size: .8rem; letter-spacing: .04em; text-transform: uppercase; color: var(--text-2); }
.mf-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.mf-fee { border: 1px solid var(--border); border-left: 4px solid #ef4444; border-radius: 12px; padding: .8rem .9rem; background: var(--surface); display: grid; gap: .55rem; }
.mf-fee--partly { border-left-color: #3b82f6; }
.mf-fee--paid { border-left-color: #22c55e; }
.mf-fee--none { border-left-color: var(--border); }
.mf-fee__top { display: flex; justify-content: space-between; align-items: flex-start; gap: .8rem; }
.mf-fee__name { display: block; font-size: 1.02rem; }
.mf-fee__due { display: inline-flex; align-items: center; gap: .3rem; flex-wrap: wrap; font-size: .82rem; color: var(--text-2); margin-top: .15rem; }
.mf-fee__amount { text-align: right; flex: none; }
.mf-fee__amount small { display: block; font-size: .72rem; color: var(--text-2); }
.mf-fee__amount strong { font-size: 1.15rem; }
.mf-fee--overdue .mf-fee__amount strong { color: #dc2626; }
.mf-fee__parts { display: flex; flex-wrap: wrap; gap: .3rem 1.2rem; margin: 0; padding-top: .5rem; border-top: 1px dashed var(--border); }
.mf-fee__parts div { display: grid; }
.mf-fee__parts dt { font-size: .72rem; color: var(--text-2); }
.mf-fee__parts dd { margin: 0; font-weight: 600; font-size: .9rem; }
.mf-fee__note { margin: 0; display: flex; align-items: center; gap: .35rem; font-size: .82rem; color: #b45309; }
.mf-fee__pay { display: flex; flex-wrap: wrap; gap: .4rem; }
@media (max-width: 560px) { .mf-fee__pay .btn { flex: 1 1 100%; justify-content: center; } }
.mf-pay, .mf-receipt { display: flex; align-items: center; gap: .7rem; border: 1px solid var(--border); border-radius: 12px; padding: .65rem .8rem; background: var(--surface); color: inherit; text-decoration: none; }
.mf-receipt:hover { border-color: var(--brand); }
.mf-pay__icon { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: #dcfce7; color: #15803d; }
.mf-receipt .mf-pay__icon { background: var(--brand-soft); color: var(--brand); }
.mf-pay__text { flex: 1; min-width: 0; display: grid; gap: .1rem; }
.mf-pay__amount { flex: none; text-align: right; display: grid; gap: .1rem; }
.mf-pay__amount a, .mf-receipt .mf-pay__amount span { color: var(--brand); }

.crud-file { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem 1rem; margin-bottom: .4rem; }
.crud-file__img { display: block; max-width: 140px; max-height: 140px; border: 1px solid var(--border); border-radius: 8px; background: #fff; padding: 4px; }
/* Printable payment proof (fees/proof-print.php) */
.proof-print { background: #fff; max-width: 190mm; margin: 0 auto; padding: 10mm; }
.proof-print__head { display: flex; justify-content: space-between; gap: 1rem; border-bottom: 2px solid #111; padding-bottom: .5rem; margin-bottom: .8rem; }
.proof-print__school { font-size: 1.2rem; }
.proof-print__head p { margin: .2rem 0 0; }
.proof-print__title { text-align: right; }
.proof-print__title h1 { margin: 0; font-size: 1.15rem; }
.proof-print__dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .4rem 1.2rem; margin: 0 0 .8rem; }
.proof-print__dl dt { font-size: .75rem; color: #555; }
.proof-print__dl dd { margin: 0; }
.proof-print__slip { border: 1px solid #ccc; border-radius: 6px; padding: 6px; text-align: center; }
.proof-print__slip img { max-width: 100%; max-height: 120mm; object-fit: contain; }
.proof-print__foot { display: flex; justify-content: space-between; margin-top: 1.2rem; font-size: .85rem; }
/* printed: exactly one page (A4 or Letter) — the slip picture shrinks to the room left on the page */
@page proof { margin: 8mm; }
@media print {
  .proof-print { page: proof; padding: 0; max-width: none; margin: 0; height: 254mm; max-height: 254mm; display: flex; flex-direction: column; overflow: hidden; break-after: avoid; break-inside: avoid; }
  /* nothing else may make a second (blank) sheet */
  html:has(.proof-print), body:has(.proof-print) { height: auto !important; min-height: 0 !important; margin: 0 !important; padding: 0 !important; overflow: hidden; }
  body:has(.proof-print) > :not(.proof-print) { display: none !important; }
  .proof-print > * { flex: none; }
  .proof-print__slip { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
  .proof-print__slip img { flex: 1 1 auto; min-height: 0; max-height: 100%; width: 100%; height: 100%; object-fit: contain; }
  .proof-print__box { margin-bottom: 2.5mm; padding: 2mm 3mm; }
  .proof-print__head { margin-bottom: 3mm; }
  .proof-print__foot { margin-top: 3mm; }
}
.proof-print__brand { display: flex; align-items: center; gap: .7rem; }
.proof-print__logo { width: 56px; height: 56px; object-fit: contain; }
.proof-print__title p { margin: .2rem 0 0; }
.proof-print__box { border: 1px solid #d1d5db; border-radius: 6px; padding: .55rem .75rem; margin-bottom: .6rem; }
.proof-print__box h2, .proof-print__slip h2 { margin: 0 0 .4rem; font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; color: #374151; }
.proof-print__box--pay { background: #f8fafc; }
.proof-print__box .proof-print__dl { margin: 0; }
.proof-print__dl--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.proof-print__wide { grid-column: 1 / -1; }
.proof-print__amount { font-size: 1.15rem; font-weight: 700; }
.proof-print__table { width: 100%; border-collapse: collapse; font-size: .82rem; }
.proof-print__table th, .proof-print__table td { border: 1px solid #d1d5db; padding: .25rem .4rem; text-align: left; }
.proof-print__table th { background: #f3f4f6; }
.proof-print__table .num { text-align: right; white-space: nowrap; }
.proof-print__table tr.is-for td { background: #fef9c3; }
.proof-print__foot span { white-space: nowrap; }
@media print { .proof-print__box--pay, .proof-print__table th, .proof-print__table tr.is-for td { -webkit-print-color-adjust: exact; print-color-adjust: exact; } }

/* ---------- Fee documents: letterhead with the school logo + bill-to block (partials/fee-doc-head.php) ---------- */
.fee-lh { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; padding-bottom: .9rem; margin-bottom: 1rem;
  border-bottom: 3px solid var(--brand); position: relative; }
.fee-lh::after { content: ""; position: absolute; left: 0; right: 0; bottom: -7px; border-bottom: 1px solid var(--brand); opacity: .35; }
.fee-lh p { margin: 0; }
.fee-lh__brand { display: flex; align-items: center; gap: .85rem; min-width: 0; }
.fee-lh__logo { width: 68px; height: 68px; object-fit: contain; flex: none; }
.fee-lh__school { font-size: 1.35rem; font-weight: 800; line-height: 1.2; color: var(--text); }
.fee-lh__line { font-size: .82rem; color: var(--text-2); }
.fee-lh__meta { text-align: right; display: grid; gap: .2rem; justify-items: end; }
.fee-lh__title { font-size: 1.05rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: #fff; background: var(--brand); padding: .3rem .8rem; border-radius: 6px; }
.fee-to { border: 1px solid var(--border); border-left: 4px solid var(--brand); border-radius: 10px; padding: .7rem .9rem; margin-bottom: 1rem; background: var(--surface); }
.fee-to__label { margin: 0; font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text-2); }
.fee-to__name { margin: .1rem 0 .5rem; font-size: 1.15rem; font-weight: 700; }
.fee-to__grid { margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr)); gap: .45rem 1.2rem; }
.fee-to__grid dt { font-size: .72rem; color: var(--text-2); }
.fee-to__grid dd { margin: 0; font-weight: 600; font-size: .9rem; }
.fee-sign { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; margin-top: 2.2rem; text-align: center; font-size: .82rem; }
.fee-sign__line { display: block; border-top: 1px solid currentColor; margin: 0 .5rem .3rem; }
.fee-doc__note { margin-top: .8rem; text-align: center; }
@media print {
  .fee-lh, .fee-lh__title, .fee-to { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .fee-lh__title { color: #fff !important; }
  .fee-to { background: #fff; }
}

/* ---------- List tables: sort arrows (both shown, the active one dark) and bulk delete ---------- */
.th-sort { all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: .35rem; font: inherit; color: inherit; text-transform: inherit; letter-spacing: inherit; }
.th-sort:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 3px; }
a.sort { display: inline-flex; align-items: center; gap: .35rem; }
.th-sort::after, a.sort::after { content: ""; width: 8px; height: 12px; flex: none; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 12'%3E%3Cpath d='M4 0l4 5H0z' fill-opacity='.3'/%3E%3Cpath d='M4 12l4-5H0z' fill-opacity='.3'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 12'%3E%3Cpath d='M4 0l4 5H0z' fill-opacity='.3'/%3E%3Cpath d='M4 12l4-5H0z' fill-opacity='.3'/%3E%3C/svg%3E") center / contain no-repeat; }
.th-sort[aria-sort="ascending"]::after, a.sort[aria-sort="ascending"]::after { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 12'%3E%3Cpath d='M4 0l4 5H0z' fill-opacity='1'/%3E%3Cpath d='M4 12l4-5H0z' fill-opacity='.25'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 12'%3E%3Cpath d='M4 0l4 5H0z' fill-opacity='1'/%3E%3Cpath d='M4 12l4-5H0z' fill-opacity='.25'/%3E%3C/svg%3E"); }
.th-sort[aria-sort="descending"]::after, a.sort[aria-sort="descending"]::after { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 12'%3E%3Cpath d='M4 0l4 5H0z' fill-opacity='.25'/%3E%3Cpath d='M4 12l4-5H0z' fill-opacity='1'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 12'%3E%3Cpath d='M4 0l4 5H0z' fill-opacity='.25'/%3E%3Cpath d='M4 12l4-5H0z' fill-opacity='1'/%3E%3C/svg%3E"); }
.col-check { width: 2.2rem; text-align: center; }
.col-check .check { justify-content: center; margin: 0; }
.bulk-bar { display: flex; justify-content: flex-end; align-items: center; gap: .7rem; margin: 0 0 .5rem; }
@media print { .bulk-bar, .col-check { display: none !important; } }

/* ---------- My profile (own details and documents) ---------- */
.my-profile { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: var(--space-4); align-items: start; }
@media (max-width: 900px) { .my-profile { grid-template-columns: minmax(0, 1fr); } }
.my-profile__who { display: flex; align-items: center; gap: .75rem; }
.my-profile__who .avatar { width: 56px; height: 56px; font-size: 1.1rem; }
.my-profile__who strong { display: block; font-size: 1.05rem; margin-bottom: .2rem; }
.my-profile__dl { margin: 0; display: grid; gap: .55rem; }
.my-profile__dl dt { font-size: .74rem; color: var(--text-2); }
.my-profile__dl dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.my-profile__lock { display: flex; gap: .4rem; align-items: flex-start; margin: 0; padding-top: .6rem; border-top: 1px dashed var(--border); }
.my-docs { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.my-docs__item { display: flex; align-items: center; gap: .7rem; border: 1px solid var(--border); border-radius: 10px; padding: .55rem .7rem; flex-wrap: wrap; }
.my-docs__icon { width: 36px; height: 36px; border-radius: 8px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); flex: none; }
.my-docs__text { flex: 1; min-width: 12rem; display: grid; }
.my-docs__add { padding-top: .8rem; border-top: 1px solid var(--border); }
.self-edit-card { margin-bottom: var(--space-3); }
.person-photo__row { display: flex; gap: 1.2rem; align-items: center; flex-wrap: wrap; }
.self-edit-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: var(--space-3); }
.self-edit-grid .field input[type="number"] { max-width: 8rem; }

/* ---------- Documents with previews (profile pages, Edit forms, My profile) ---------- */
.doc-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: .75rem; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.doc-tile { border: 1px solid var(--border); border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; background: var(--surface, #fff); transition: opacity .15s, border-color .15s; }
.doc-tile.is-removing { opacity: .5; border-color: var(--danger, #dc2626); }
.doc-tile.is-removing .doc-tile__title { text-decoration: line-through; }
.doc-tile__preview { display: grid; place-items: center; height: 130px; background: var(--surface-2, #f4f6f8); color: var(--brand); text-decoration: none; overflow: hidden; }
.doc-tile__preview img { width: 100%; height: 100%; object-fit: cover; display: block; }
.doc-tile__preview--file { gap: .2rem; align-content: center; }
.doc-tile__preview--file .icon { width: 42px; height: 42px; }
.doc-tile__ext { font-size: .72rem; font-weight: 700; letter-spacing: .06em; color: var(--muted); }
.doc-tile__body { padding: .6rem .7rem .7rem; display: flex; flex-direction: column; gap: .25rem; min-width: 0; }
.doc-tile__title { overflow-wrap: anywhere; line-height: 1.3; }
.doc-tile__actions { display: flex; gap: .4rem; align-items: center; flex-wrap: wrap; margin-top: .25rem; }
.doc-tile__remove { margin-left: auto; color: var(--danger, #dc2626); }
.doc-new-list { border-top: 1px dashed var(--border); padding-top: .9rem; display: grid; gap: .7rem; }
.doc-new-list__title { margin: 0; font-size: 1rem; }
.doc-new { display: grid; grid-template-columns: 56px minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, .8fr); gap: .7rem; align-items: end; }
.doc-new[hidden] { display: none; }
.doc-new .field { margin: 0; min-width: 0; }
.doc-new__file input { max-width: 100%; }
.doc-new__preview { width: 56px; height: 56px; border-radius: 10px; border: 1px dashed var(--border); display: grid; place-items: center; overflow: hidden; color: var(--muted); font-size: .65rem; font-weight: 700; }
.doc-new__preview img { width: 100%; height: 100%; object-fit: cover; }
.doc-new__preview.has-file { border-style: solid; color: var(--brand); }
@media (max-width: 720px) {
  .doc-new { grid-template-columns: 56px minmax(0, 1fr); }
  .doc-new .field:not(.doc-new__file) { grid-column: 1 / -1; }
  .doc-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
}
[data-doc-more][hidden] { display: none; }
.doc-print-frame { position: fixed; right: 0; bottom: 0; width: 1px; height: 1px; border: 0; opacity: 0; pointer-events: none; }
.doc-tile__actions .btn--sm { padding-inline: .55rem; }
.doc-types__list { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; max-width: 560px; counter-reset: dt; }
.doc-types__row { display: flex; gap: .7rem; align-items: center; }
.doc-types__row input:not([type="checkbox"]) { flex: 1; min-width: 0; min-height: 40px; padding: .5rem .8rem; border-radius: 10px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); font: inherit; }
.doc-types__row input:not([type="checkbox"]):focus { outline: none; border-color: var(--brand); box-shadow: var(--focus); }
.doc-types__row--new { padding-right: 5.6rem; }
.doc-types__row--new input { border-style: dashed; }
.doc-types__remove { color: var(--danger, #dc2626); white-space: nowrap; }
.badge--muted { background: var(--surface-2, #eef0f3); color: var(--muted); }
.tabs__tab.is-active .muted { color: inherit; opacity: .85; }
.wa-photo { display: flex; gap: .55rem; align-items: center; }
.wa-photo__thumb { width: 44px; height: 44px; border-radius: 50%; overflow: hidden; flex: none; display: grid; place-items: center; background: #25d366; color: #fff; font-weight: 700; border: 2px solid var(--surface, #fff); box-shadow: 0 0 0 1px var(--border, #e5e7eb); }
.wa-photo__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.wa-photo__thumb.is-new { box-shadow: 0 0 0 2px var(--brand); }
.wa-photo__thumb.is-removing { opacity: .35; }
.wa-photo__ctl { display: flex; flex-direction: column; gap: .2rem; align-items: flex-start; }
.wa-photo__pick { position: relative; cursor: pointer; white-space: nowrap; }
.wa-photo__pick:focus-within { box-shadow: var(--focus); }
.wa-photo__note { color: var(--brand); white-space: nowrap; }
.wa-photo__note[hidden] { display: none; }
.wa-agents-foot { display: flex; gap: .8rem; align-items: center; flex-wrap: wrap; padding: var(--space-3) var(--space-4) var(--space-4); }

/* Platform › Website › Starter images */
.si { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 1.2rem; align-items: start; }
.si__nav { padding: .6rem; position: sticky; top: 76px; max-height: calc(100vh - 100px); overflow: auto; }
.si__group { margin: .6rem .5rem .3rem; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.si__link { display: flex; justify-content: space-between; gap: .5rem; padding: .45rem .6rem; border-radius: 8px; text-decoration: none; color: var(--text); font-size: .9rem; }
.si__link:hover { background: var(--surface-2); }
.si__link.is-active { background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.si__title { margin: 0; }
.si__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; }
.si__item { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.si__img { display: block; background: var(--surface-2); }
.si__img img { width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: contain; display: block; background: var(--surface-2); }
.si__body { padding: .8rem .9rem 1rem; }
.si__head { display: flex; justify-content: space-between; gap: .5rem; align-items: center; }
.si__body p { margin: 0; }
.si__form { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.si__form input[type="file"] { font-size: .8rem; max-width: 100%; flex: 1 1 140px; }
.si__prompt summary { cursor: pointer; font-size: .85rem; color: var(--brand); }
.si__prompt p { background: var(--surface-2); padding: .6rem .7rem; border-radius: 8px; margin: .4rem 0; line-height: 1.45; }
@media (max-width: 860px) { .si { grid-template-columns: 1fr; } .si__nav { position: static; max-height: 260px; } }
.enq-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; }
.enq-photo { width: 96px; height: 116px; object-fit: cover; border-radius: 10px; border: 1px solid var(--border); }
.enq-docs { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); margin-bottom: .6rem; }
.enq-docs .doc-tile__preview { height: 80px; }
.app-photo { display: flex; align-items: center; gap: .6rem; margin: .4rem 0 0; } .app-photo img { object-fit: cover; border-radius: 6px; border: 1px solid var(--border); }

/* Email campaigns & templates */
.email-picker__group { margin: .4rem 0 0; font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.email-picker__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .8rem; }
.email-card { display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; text-decoration: none; color: var(--text); background: var(--surface); transition: transform .15s, box-shadow .15s; }
.email-card:hover { transform: translateY(-2px); box-shadow: 0 10px 24px -14px rgb(15 23 42 / .45); border-color: var(--brand); }
.email-card__img { display: block; aspect-ratio: 2 / 1; background: var(--surface-2); }
.email-card__img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.email-card__body { display: flex; flex-direction: column; gap: .1rem; padding: .55rem .7rem .7rem; }
.email-editor { display: grid; gap: 1rem; }
.email-pic { display: flex; gap: 1rem; align-items: flex-start; flex-wrap: wrap; }
.email-pic__preview { width: 240px; max-width: 100%; aspect-ratio: 2 / 1; border-radius: 10px; border: 1px dashed var(--border); display: grid; place-items: center; overflow: hidden; background: var(--surface-2); }
.email-pic__preview img { width: 100%; height: 100%; object-fit: cover; }
.email-pic__ctl { flex: 1 1 260px; min-width: 0; }
.email-preview-frame { width: 100%; height: 900px; border: 1px solid var(--border); border-radius: 12px; background: #eef1f6; }
.email-preview-frame--short { height: 780px; }
.email-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1.2rem; align-items: start; }
@media (max-width: 1100px) { .email-layout { grid-template-columns: 1fr; } .email-preview-frame { height: 700px; } }
.mt-xs { margin-top: .4rem; }
.email-editor input[type="color"] { max-width: 140px; height: 42px; padding: .2rem; }

/* Academy Assistant */
.asst { display: flex; flex-direction: column; gap: .8rem; padding: 0; overflow: hidden; }
.asst-log { display: flex; flex-direction: column; gap: .7rem; padding: 1rem; max-height: calc(100vh - 290px); min-height: 320px; overflow-y: auto; background: var(--surface-2); }
.asst-msg { max-width: min(760px, 92%); border-radius: 14px; padding: .7rem .9rem; line-height: 1.5; }
.asst-msg p { margin: 0 0 .35rem; }
.asst-msg p:last-child { margin-bottom: 0; }
.asst-msg--me { align-self: flex-end; background: var(--brand); color: #fff; border-bottom-right-radius: 4px; }
.asst-msg--bot { align-self: flex-start; background: var(--surface); border: 1px solid var(--border); border-bottom-left-radius: 4px; }
.asst-msg--wait { color: var(--muted); letter-spacing: .2em; }
.asst-msg__title { font-weight: 700; }
.asst-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: .5rem; margin: .5rem 0; }
.asst-stat { display: flex; flex-direction: column; padding: .5rem .65rem; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); color: var(--text); text-decoration: none; }
a.asst-stat:hover { border-color: var(--brand); }
.asst-stat__value { font-weight: 700; font-size: 1.05rem; }
.asst-stat__label { font-size: .78rem; color: var(--muted); }
.asst-list { list-style: none; margin: .4rem 0; padding: 0; display: flex; flex-direction: column; gap: .3rem; }
.asst-list li { display: flex; flex-direction: column; padding: .35rem .5rem; border-radius: 8px; background: var(--surface-2); }
.asst-links { margin-top: .5rem; }
.asst-suggest { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .55rem; }
.asst-suggest .chip { cursor: pointer; border: 1px solid var(--border); background: var(--surface); font-family: inherit; font-size: .82rem; padding: .25rem .6rem; border-radius: 999px; }
.asst-suggest .chip:hover { border-color: var(--brand); color: var(--brand); }
.asst-form { display: flex; gap: .5rem; padding: 0 1rem 1rem; }
.asst-form input { flex: 1 1 auto; min-width: 0; }
/* question paper */
.qpaper { max-width: 800px; margin: 0 auto; padding: 1.5rem; background: #fff; color: #111; }
.qpaper__head { text-align: center; border-bottom: 2px solid #111; padding-bottom: .6rem; margin-bottom: 1rem; }
.qpaper__head h1 { font-size: 1.3rem; margin: .3rem 0; }
.qpaper__school { font-size: 1.25rem; font-weight: 800; margin: 0; }
.qpaper__meta { display: flex; flex-wrap: wrap; justify-content: center; gap: .4rem 1.4rem; margin: .4rem 0; font-size: .92rem; }
.qpaper__list { padding-left: 1.4rem; }
.qpaper__q { margin: 0 0 1rem; break-inside: avoid; }
.qpaper__row { display: flex; gap: 1rem; justify-content: space-between; }
.qpaper__text .rt p { margin: 0 0 .2rem; }
.qpaper__marks { white-space: nowrap; font-weight: 600; }
.qpaper__opts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .15rem 1.5rem; margin: .3rem 0 0; padding-left: 1.4rem; }
.qpaper__opts li.is-correct { font-weight: 700; }
.qpaper__lines { border-bottom: 1px dashed #999; }
.qpaper__lines--short { height: 3.2rem; background: repeating-linear-gradient(transparent 0 1.55rem, #ccc 1.55rem 1.6rem); }
.qpaper__lines--long { height: 9rem; background: repeating-linear-gradient(transparent 0 1.55rem, #ccc 1.55rem 1.6rem); }
.qpaper__explain { margin: .3rem 0 0; color: #333; }
@media (max-width: 600px) { .qpaper__opts { grid-template-columns: 1fr; } .asst-log { max-height: none; } }
.seg { display: inline-flex; gap: .25rem; align-items: center; }
.seg form { margin: 0; }

/* Tabs built from [data-tabs] (one part of a long page at a time) */
[data-tabs] > [data-tab][hidden] { display: none !important; }
.tabs--panels { margin-bottom: var(--space-3); flex-wrap: wrap; row-gap: 0; } /* all tabs visible: a second row instead of a scroll bar */
.tabs--panels a { white-space: nowrap; }
@media (max-width: 640px) { /* phones: one row that slides sideways, no scroll bar drawn */
  .tabs--panels { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .tabs--panels::-webkit-scrollbar { display: none; }
}
.tabs--panels a.tabs__has-error { color: var(--err); }
.tabs--panels a.tabs__has-error::after { content: " •"; }
[data-tabs] > [data-tab] + [data-tab] { margin-top: 0; }
@media print { .tabs--panels { display: none; } [data-tabs] > [data-tab][hidden] { display: block !important; } }

/* A test / action box at the end of a settings tab (send a test email / SMS, push keys) */
.test-box { margin-top: var(--space-4); padding-top: var(--space-3); border-top: 1px solid var(--border); display: grid; gap: var(--space-2); justify-items: start; }
.test-box h3 { margin: 0; font-size: 1rem; }
.test-box p { margin: 0; }
tr.is-muted > td { opacity: .6; }

/* One school identity at a time (as in Ramom): desktop → logo + full school name at the top of the sidebar, the top
   bar shows the breadcrumbs; tablet / phone → logo + name in the top bar, the slide-in menu header says "Menu" with ✕.
   min-width 1024.02px leaves no gap with the (max-width: 1024px) rules, also at browser zoom levels like 125 %. */
.sidebar { overflow: hidden; }
/* the school header stays put; only the menu below it scrolls */
.sidebar__brand { flex: none; background: var(--surface); }
.sidebar__nav { flex: 1 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; }
.sidebar__title { display: none; font-weight: 700; font-size: 1rem; }
@media (min-width: 1024.02px) {
  .topbar-org { display: none !important; }
  .topbar-org ~ .breadcrumbs { display: block; }
  .sidebar__brand { position: relative; flex-direction: column; align-items: center; justify-content: center; gap: .55rem; text-align: center;
    padding: .9rem 1rem .85rem; border-bottom: 1px solid var(--border); box-shadow: 0 6px 12px -12px rgb(0 0 0 / .35); }
  .sidebar__brand .brand-mark, .sidebar__brand .brand-logo { width: 56px; height: 56px; border-radius: 14px; object-fit: contain; }
  .sidebar__brand .brand-mark { font-size: 1.5rem; }
  .sidebar__brand .brand-text { align-items: center; width: 100%; }
  .sidebar__brand .brand-text strong { white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: anywhere; font-size: 1rem; line-height: 1.3; }
  .sidebar__brand .brand-text small { margin-top: .15rem; }
  .sidebar__brand .sidebar__close, .topbar .topbar__menu { display: none !important; } /* the sidebar is always open here */
}
@media (max-width: 1024px) {
  .sidebar__brand > :not(.sidebar__close):not(.sidebar__title) { display: none; }
  .sidebar__title { display: block; }
  .sidebar__brand { min-height: 56px; border-bottom: 1px solid var(--border); }
}
/* School calendar: month / year switcher (one rounded control with arrows, like a phone patro) */
.cal-pick { gap: .6rem; }
.cal-switch { display: inline-flex; align-items: stretch; height: 44px; border: 1px solid color-mix(in srgb, var(--brand) 30%, var(--border)); border-radius: 14px; overflow: hidden;
  background: color-mix(in srgb, var(--brand) 6%, var(--surface)); box-shadow: 0 6px 16px -12px color-mix(in srgb, var(--brand) 80%, transparent); }
.cal-switch__nav { display: inline-grid; place-items: center; width: 42px; color: var(--brand-text, var(--brand)); text-decoration: none; transition: background .15s, color .15s; }
.cal-switch__nav svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.cal-switch__nav:hover { background: var(--brand); color: #fff; }
.cal-switch__nav:focus-visible { outline: 2px solid var(--brand); outline-offset: -3px; }
.cal-switch__nav.is-off { opacity: .3; }
.cal-switch__sel { appearance: none; -webkit-appearance: none; height: 100% !important; min-height: 0 !important; margin: 0; border: 0 !important; border-left: 1px solid color-mix(in srgb, var(--brand) 18%, var(--border)) !important;
  border-radius: 0 !important; background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right .55rem center / 14px;
  padding: 0 1.9rem 0 .8rem !important; font: inherit; font-weight: 700; font-size: .98rem; color: var(--text); cursor: pointer; box-shadow: none !important; width: auto !important; }
.cal-switch__sel + .cal-switch__nav, .cal-switch__sel--y { border-right: 1px solid color-mix(in srgb, var(--brand) 18%, var(--border)); }
.cal-switch__sel:hover { background-color: color-mix(in srgb, var(--brand) 10%, transparent); }
.cal-switch__sel:focus-visible { outline: 2px solid var(--brand); outline-offset: -3px; }
.cal-switch__sel--m { min-width: 9.5rem; }
.cal-today { display: inline-flex; align-items: center; gap: .45rem; height: 44px; padding: 0 1rem; border-radius: 14px; border: 1px solid var(--border-strong); background: var(--surface);
  color: var(--text); font-weight: 600; text-decoration: none; transition: background .15s, color .15s, border-color .15s; }
.cal-today svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; }
.cal-today:hover { border-color: var(--brand); color: var(--brand-text, var(--brand)); }
.cal-today.is-current { background: var(--brand); border-color: var(--brand); color: #fff; }
@media (max-width: 640px) {
  .cal-pick { display: grid; grid-template-columns: minmax(0, 1fr) auto; width: 100%; }
  .cal-switch { width: 100%; height: 42px; }
  .cal-switch__sel { flex: 1; min-width: 0 !important; font-size: .9rem; padding: 0 1.6rem 0 .55rem !important; }
  .cal-switch__sel--m { flex: 1 1 auto; }
  .cal-switch__sel--y { flex: 0 0 5.4rem; }
  .cal-switch__nav { width: 38px; }
  .cal-today { height: 42px; padding: 0 .75rem; }
  .cal-today span { display: none; }
}

/* Top bar: quick links (grid) and search, as in Ramom */
.topbar__tools { display: flex; align-items: center; gap: .7rem; margin-left: .9rem; min-width: 0; }
.topbar__tools .icon-btn { width: 38px; height: 38px; margin: 4px; padding: 0; border: 1px solid var(--border); border-radius: 8px; background: var(--surface);
  box-shadow: 0 4px 12px -8px rgb(0 0 0 / .45); transform: rotate(45deg); color: var(--text); display: inline-grid; place-items: center; transition: background .15s, color .15s; }
.topbar__tools .icon-btn > * { transform: rotate(-45deg); }
.topbar__tools .icon-btn:hover, .topbar__tools .icon-btn[aria-expanded="true"] { background: var(--brand); border-color: var(--brand); color: #fff; }
.quick-links { position: relative; }
.quick-links__menu { left: 0; right: auto; width: 300px; padding: .6rem; display: grid; grid-template-columns: repeat(3, 1fr); gap: .3rem; }
.quick-links__menu[hidden] { display: none; }
.quick-link { display: flex !important; flex-direction: column; align-items: center !important; justify-content: flex-start !important; gap: .4rem; padding: .7rem .3rem !important; border-radius: 12px; text-align: center;
  font-size: .78rem; font-weight: 600; line-height: 1.25; color: var(--text) !important; text-decoration: none; white-space: normal !important; text-align: center !important; }
.quick-link > span:last-child { width: 100%; text-align: center; }
.quick-link__icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: color-mix(in srgb, var(--brand) 10%, var(--surface)); color: var(--brand-text, var(--brand)); }
.quick-link__icon .icon { width: 22px; height: 22px; }
.quick-link:hover { background: var(--surface-2); } .quick-link:hover .quick-link__icon { background: var(--brand); color: #fff; }
.topbar-search { display: flex; align-items: center; width: clamp(180px, 22vw, 280px); height: 38px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); overflow: hidden; }
.topbar-search:focus-within { border-color: var(--brand); box-shadow: var(--focus); }
.topbar-search input { flex: 1; min-width: 0; height: 100%; border: 0 !important; background: transparent; padding: 0 .75rem !important; font: inherit; font-size: .9rem; box-shadow: none !important; outline: 0; }
.topbar-search button { display: grid; place-items: center; width: 38px; height: 100%; border: 0; background: transparent; color: var(--muted); cursor: pointer; }
.topbar-search button:hover { color: var(--brand); }
.topbar-search__icon { display: none !important; }
@media (max-width: 1180px) { .topbar-search { width: 180px; } }
@media (max-width: 760px) {
  .quick-links__menu { width: min(300px, calc(100vw - 2rem)); }
}

/* Platform tagline ("Digitizing the Education Ecosystem of Nepal") under the product name */
.brand-tagline { display: block; margin-top: .15rem; font-size: .7rem !important; line-height: 1.3; font-style: italic; color: var(--muted); }
.topbar-org__tag { display: block; font-size: .68rem; font-style: italic; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 760px) { .topbar-org__tag { white-space: normal; } }
.site-brand__text { display: inline-flex; flex-direction: column; line-height: 1.2; }
.site-brand__tag { font-size: .72rem; font-weight: 500; font-style: italic; opacity: .75; }
.inv__tagline { margin: .1rem 0 .25rem; font-size: .8rem; font-style: italic; color: #6b7280; }

/* ---------- Platform dashboard (modern) ---------- */
.pd-hero { position: relative; overflow: hidden; display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1rem 1.5rem; margin-bottom: 1.25rem;
  padding: 1.6rem 1.75rem; border-radius: 20px; color: #fff;
  background: radial-gradient(120% 140% at 100% 0%, color-mix(in srgb, var(--brand) 55%, #7c3aed) 0%, transparent 55%), linear-gradient(135deg, var(--brand) 0%, color-mix(in srgb, var(--brand) 70%, #0f172a) 100%);
  box-shadow: 0 18px 40px -24px color-mix(in srgb, var(--brand) 80%, transparent); }
.pd-hero::after { content: ""; position: absolute; right: -60px; bottom: -80px; width: 260px; height: 260px; border-radius: 50%; border: 36px solid rgb(255 255 255 / .07); }
.pd-hero h1 { margin: .15rem 0 .25rem; font-size: clamp(1.4rem, 2.6vw, 1.9rem); color: #fff; }
.pd-hero__greet { display: flex; align-items: center; gap: .7rem; }
.greet-sky { flex: none; display: grid; place-items: center; width: 54px; height: 54px; border-radius: 50%; background: rgb(255 255 255 / .16); box-shadow: inset 0 0 0 1px rgb(255 255 255 / .28), 0 6px 18px rgb(0 0 0 / .12); overflow: hidden; }
.greet-sky svg { width: 38px; height: 38px; display: block; }
.greet-sky--morning { background: linear-gradient(180deg, rgb(255 236 179 / .35), rgb(255 255 255 / .12)); }
.greet-sky--afternoon { background: radial-gradient(circle at 50% 45%, rgb(255 230 120 / .45), rgb(255 255 255 / .12) 70%); }
.greet-sky--evening { background: linear-gradient(180deg, rgb(255 140 90 / .45), rgb(160 70 140 / .25)); }
.greet-sky--night { background: linear-gradient(160deg, rgb(20 30 80 / .55), rgb(60 40 120 / .35)); }
.greet-sky .gs-rays { transform-origin: 24px 24px; animation: gs-spin 24s linear infinite; }
.greet-sky--evening .gs-rays { animation: gs-pulse 3.5s ease-in-out infinite; }
.greet-sky .gs-star { animation: gs-twinkle 2.6s ease-in-out infinite; }
.greet-sky .gs-star--2 { animation-delay: .9s; }
.greet-sky .gs-star--3 { animation-delay: 1.7s; }
@keyframes gs-spin { to { transform: rotate(360deg); } }
@keyframes gs-pulse { 50% { opacity: .45; } }
@keyframes gs-twinkle { 50% { opacity: .25; } }
@media (prefers-reduced-motion: reduce) { .greet-sky .gs-rays, .greet-sky .gs-star { animation: none; } }
@media (max-width: 600px) { .greet-sky { width: 44px; height: 44px; } .greet-sky svg { width: 31px; height: 31px; } }
.pd-hero__date { margin: 0; font-size: .85rem; opacity: .85; font-weight: 600; letter-spacing: .02em; }
.pd-hero__sub { margin: 0; opacity: .85; font-style: italic; }
.pd-hero__actions { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: .5rem; }
.pd-btn-light { background: #fff !important; color: var(--brand-text, var(--brand)) !important; border-color: #fff !important; font-weight: 700; }
.pd-btn-ghost { background: rgb(255 255 255 / .12) !important; color: #fff !important; border-color: rgb(255 255 255 / .35) !important; }
.pd-btn-ghost:hover { background: rgb(255 255 255 / .22) !important; }
.pd-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 1rem; margin-bottom: 1.25rem; }
.pd-kpi { position: relative; padding: 1.1rem 1.15rem 1rem; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); box-shadow: 0 8px 24px -20px rgb(15 23 42 / .5);
  transition: transform .15s, box-shadow .15s; }
.pd-kpi:hover { transform: translateY(-2px); box-shadow: 0 14px 30px -20px rgb(15 23 42 / .55); }
.pd-kpi__icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; margin-bottom: .7rem; background: var(--brand-soft); color: var(--brand-text, var(--brand)); }
.pd-kpi__icon .icon { width: 22px; height: 22px; }
.pd-kpi__icon--ok { background: var(--ok-bg); color: var(--ok); } .pd-kpi__icon--warn { background: var(--warn-bg); color: var(--warn); } .pd-kpi__icon--info { background: var(--info-bg); color: var(--info); }
.pd-kpi__label { margin: 0; color: var(--muted); font-size: .82rem; font-weight: 600; }
.pd-kpi__value { margin: .15rem 0 .3rem; font-size: 1.6rem; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.pd-kpi__trend { margin: 0; font-size: .8rem; font-weight: 700; color: var(--muted); }
.pd-kpi__trend span { font-weight: 500; }
.pd-kpi__trend.is-up { color: var(--ok); } .pd-kpi__trend.is-down { color: var(--err); }
.pd-kpi--brand { background: linear-gradient(160deg, color-mix(in srgb, var(--brand) 10%, var(--surface)), var(--surface) 70%); border-color: color-mix(in srgb, var(--brand) 25%, var(--border)); }
.pd-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.pd-grid--wide { grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); }
@media (max-width: 900px) { .pd-grid--wide { grid-template-columns: minmax(0, 1fr); } }
.pd-card { border-radius: 16px; margin: 0; }
.pd-grid + .pd-card, .pd-grid ~ .pd-card { margin-top: 0; }
.pd-card__head { display: flex; align-items: flex-start; justify-content: space-between; gap: .75rem; margin-bottom: .9rem; }
.pd-card__head h2 { margin: 0; font-size: 1.05rem; }
.pd-card__head p { margin: .15rem 0 0; }
.pd-sub { margin: 1.1rem 0 .4rem; font-size: .85rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.chart--billing .chart__bar--expense { fill: color-mix(in srgb, var(--brand) 28%, var(--surface-2)); }
.chart--billing .chart__key--expense { background: color-mix(in srgb, var(--brand) 28%, var(--surface-2)); }
/* donut */
.pd-donut { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.25rem; }
.pd-donut__svg { width: 150px; height: 150px; flex: none; transform: rotate(-90deg); }
.pd-donut__track { fill: none; stroke: var(--surface-2); stroke-width: 12; }
.pd-donut__seg { fill: none; stroke-width: 12; transition: stroke-width .15s; }
.pd-donut__seg:hover { stroke-width: 15; }
.pd-donut__num, .pd-donut__cap { transform: rotate(90deg); transform-origin: 50px 50px; text-anchor: middle; fill: var(--text); }
.pd-donut__num { font-size: 20px; font-weight: 800; } .pd-donut__cap { font-size: 8px; fill: var(--muted); }
.pd-tone--ok { stroke: var(--ok); background: var(--ok); } .pd-tone--info { stroke: var(--info); background: var(--info); } .pd-tone--warn { stroke: var(--warn); background: var(--warn); }
.pd-tone--err { stroke: var(--err); background: var(--err); } .pd-tone--muted { stroke: var(--border-strong); background: var(--border-strong); }
.pd-legend { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; flex: 1; min-width: 140px; }
.pd-legend li { display: flex; align-items: center; gap: .5rem; font-size: .88rem; }
.pd-legend strong { margin-left: auto; font-variant-numeric: tabular-nums; }
.pd-dot { width: 10px; height: 10px; border-radius: 3px; flex: none; }
/* needs attention */
.pd-attn { list-style: none; margin: 0; padding: 0; display: grid; gap: .35rem; }
.pd-attn a, .pd-attn li > span { display: flex; align-items: center; gap: .65rem; padding: .5rem .55rem; border-radius: 12px; color: var(--text); text-decoration: none; }
.pd-attn a:hover { background: var(--surface-2); }
.pd-attn__icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; flex: none; }
.pd-attn__icon .icon { width: 18px; height: 18px; }
.pd-tone-bg--warn { background: var(--warn-bg); color: var(--warn); } .pd-tone-bg--err { background: var(--err-bg); color: var(--err); } .pd-tone-bg--info { background: var(--info-bg); color: var(--info); }
.pd-tone-bg--muted { background: var(--surface-2); color: var(--muted); }
.pd-attn__label { flex: 1; font-size: .9rem; }
.pd-attn li:not(.is-on) .pd-attn__label { color: var(--muted); }
.pd-attn__n { min-width: 28px; height: 24px; padding: 0 .45rem; border-radius: 999px; display: inline-grid; place-items: center; font-size: .8rem; font-weight: 800; background: var(--surface-2); color: var(--muted); }
.pd-attn li.is-on .pd-attn__n { background: var(--brand); color: #fff; }
/* horizontal bars */
.pd-bars { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.pd-bars li { display: grid; grid-template-columns: minmax(0, 1fr) 40% auto; align-items: center; gap: .6rem; font-size: .88rem; }
.pd-bars__label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); text-decoration: none; }
a.pd-bars__label:hover { color: var(--brand-text, var(--brand)); }
.pd-bars__track { width: 100%; height: 8px; display: block; }
.pd-bars__bg { fill: var(--surface-2); } .pd-bars__fill { fill: var(--brand); } .pd-bars__fill--alt { fill: var(--ok); }
.pd-bars strong { font-variant-numeric: tabular-nums; min-width: 2ch; text-align: right; }
/* sparkline columns */
.pd-spark { width: 100%; height: 100px; display: block; }
.pd-spark__bar { fill: color-mix(in srgb, var(--brand) 30%, var(--surface-2)); } .pd-spark__bar.is-now { fill: var(--brand); }
.pd-spark__n { font-size: 10px; font-weight: 700; fill: var(--text); } .pd-spark__m { font-size: 10px; fill: var(--muted); }
/* lists */
.pd-list { list-style: none; margin: 0; padding: 0; display: grid; }
.pd-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "name tag" "meta tag"; column-gap: .75rem; padding: .6rem 0; border-bottom: 1px solid var(--border); }
.pd-list li:last-child { border-bottom: 0; }
.pd-list li > a, .pd-list li > strong { grid-area: name; color: var(--text); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pd-list li > a:hover { color: var(--brand-text, var(--brand)); }
.pd-list li > .muted { grid-area: meta; }
.pd-list li > .badge, .pd-list li > .pd-amount { grid-area: tag; align-self: center; }
.pd-amount { font-weight: 800; color: var(--ok); font-variant-numeric: tabular-nums; white-space: nowrap; }
/* health */
.pd-health { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.pd-health li { display: flex; align-items: center; gap: .7rem; padding: .65rem .75rem; border-radius: 12px; background: var(--surface-2); }
.pd-health li > div { display: grid; flex: 1; min-width: 0; }
.pd-health__dot { width: 10px; height: 10px; border-radius: 50%; flex: none; background: var(--ok); box-shadow: 0 0 0 4px var(--ok-bg); }
.pd-health li.is-bad .pd-health__dot { background: var(--err); box-shadow: 0 0 0 4px var(--err-bg); }
.pd-health li.is-warn .pd-health__dot { background: var(--warn); box-shadow: 0 0 0 4px var(--warn-bg); }
@media (max-width: 640px) {
  .pd-hero { padding: 1.2rem; border-radius: 16px; }
  .pd-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem; }
  .pd-kpi { padding: .85rem; } .pd-kpi__value { font-size: 1.25rem; } .pd-kpi__icon { width: 36px; height: 36px; margin-bottom: .5rem; }
  .pd-donut { justify-content: center; }
}
@media (prefers-reduced-motion: reduce) { .pd-kpi, .pd-donut__seg { transition: none; } }
.chart--billing .chart__label { font-size: 10px; }
.pd-kpi__value { white-space: nowrap; font-size: clamp(1.15rem, 1.8vw, 1.6rem); }
/* quick links + search: computers only (phones / tablets have the menu) */
@media (max-width: 1024px) { .topbar__tools { display: none !important; } }
/* School dashboard (shares the platform dashboard look) */
a.pd-kpi--link { color: inherit; text-decoration: none; display: block; }
a.pd-kpi--link:hover .pd-kpi__value { color: var(--brand-text, var(--brand)); }
.pd-grid--dash { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); align-items: start; }
.pd-grid--dash > .pd-card--chart { grid-column: span 2; }
@media (max-width: 760px) { .pd-grid--dash > .pd-card--chart { grid-column: auto; } }
.pd-rings { display: grid; gap: 1rem; }
.pd-ring { display: flex; align-items: center; gap: 1rem; }
.pd-ring + .pd-ring { padding-top: 1rem; border-top: 1px solid var(--border); }
.pd-ring__svg { width: 108px; height: 108px; flex: none; }
.pd-ring__track { fill: none; stroke: var(--surface-2); stroke-width: 10; }
.pd-ring__val { fill: none; stroke: var(--ok); stroke-width: 10; stroke-linecap: round; transform: rotate(-90deg); transform-origin: 50px 50px; }
.pd-ring__val.is-low { stroke: var(--warn); }
.pd-ring__num { font-size: 20px; font-weight: 800; text-anchor: middle; fill: var(--text); }
.pd-ring__cap { font-size: 9px; text-anchor: middle; fill: var(--muted); }
.pd-ring__info { flex: 1; min-width: 0; }
.pd-ring__info h3 { margin: 0 0 .45rem; font-size: .95rem; }
.pd-money { display: grid; grid-template-columns: 1fr auto; gap: .55rem 1rem; margin: 0; }
.pd-money dt { color: var(--muted); } .pd-money dd { margin: 0; font-weight: 800; text-align: right; font-variant-numeric: tabular-nums; }
.pd-money dd.is-warn { color: var(--err); }
.pd-events { list-style: none; margin: 0; padding: 0; display: grid; }
.pd-events li { display: flex; justify-content: space-between; gap: .75rem; padding: .55rem 0; border-bottom: 1px solid var(--border); }
.pd-events li:last-child { border-bottom: 0; }
.pd-grid--dash .card { margin: 0; }
.pd-card--chart .chart__label { font-size: 12px; }
/* Student / parent dashboard */
.pd-student { margin-bottom: 1.5rem; }
.pd-student + .pd-student { padding-top: 1.25rem; border-top: 1px dashed var(--border-strong); }
.pd-student__head { display: flex; align-items: center; gap: .85rem; margin-bottom: 1rem; }
.pd-student__head h2 { margin: 0; font-size: 1.2rem; }
.pd-student__head p { margin: .1rem 0 0; }
.pd-student__head h2 a { color: inherit; text-decoration: none; }
.pd-student__head h2 a:hover { text-decoration: underline; }
.pd-student__profile { margin-left: auto; flex-shrink: 0; }
.child-switch { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1rem; }
.child-switch a { display: inline-flex; align-items: center; gap: .45rem; }
.pd-student__avatar { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; flex: none; font-size: 1.25rem; font-weight: 800; color: #fff;
  background: linear-gradient(135deg, var(--brand), color-mix(in srgb, var(--brand) 55%, #7c3aed)); }
.pd-kpis--student { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.pd-kpi--ring { display: flex !important; align-items: center; gap: .8rem; }
.pd-ring__svg--sm { width: 76px; height: 76px; flex: none; }
.pd-ring__svg--sm .pd-ring__num { font-size: 22px; }
.pd-kpi__value--text { font-size: 1.15rem !important; white-space: normal !important; }
.pd-kpi--alert { border-color: color-mix(in srgb, var(--warn) 45%, var(--border)); background: linear-gradient(160deg, var(--warn-bg), var(--surface) 70%); }
.pd-timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: .1rem; }
.pd-timeline li { position: relative; display: grid; grid-template-columns: 6.2rem minmax(0, 1fr) auto; align-items: center; gap: .6rem; padding: .55rem .6rem .55rem 1rem; border-radius: 10px; }
.pd-timeline li::before { content: ""; position: absolute; left: .3rem; top: .5rem; bottom: .5rem; width: 3px; border-radius: 3px; background: color-mix(in srgb, var(--brand) 35%, var(--surface-2)); }
.pd-timeline li.is-now { background: color-mix(in srgb, var(--brand) 8%, var(--surface)); }
.pd-timeline li.is-now::before { background: var(--brand); }
.pd-timeline li.is-past { opacity: .55; }
.pd-timeline__time { font-size: .82rem; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--muted); }
.pd-timeline__what { display: grid; min-width: 0; }
.pd-timeline__what strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pd-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: .3rem; }

/* Calendar colours (CalendarColours palette: imported school calendars keep their colours) */
:root { --cal-red: #dc2626; --cal-orange: #ea580c; --cal-amber: #d97706; --cal-green: #16a34a; --cal-teal: #0d9488; --cal-blue: #2563eb; --cal-indigo: #4f46e5; --cal-purple: #9333ea; --cal-pink: #db2777; --cal-brown: #92400e; --cal-gray: #6b7280; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --cal-red: #f87171; --cal-orange: #fb923c; --cal-amber: #fbbf24; --cal-green: #4ade80; --cal-teal: #2dd4bf; --cal-blue: #60a5fa; --cal-indigo: #818cf8; --cal-purple: #c084fc; --cal-pink: #f472b6; --cal-brown: #d6a26b; --cal-gray: #9ca3af; } }
:root[data-theme="dark"] { --cal-red: #f87171; --cal-orange: #fb923c; --cal-amber: #fbbf24; --cal-green: #4ade80; --cal-teal: #2dd4bf; --cal-blue: #60a5fa; --cal-indigo: #818cf8; --cal-purple: #c084fc; --cal-pink: #f472b6; --cal-brown: #d6a26b; --cal-gray: #9ca3af; }
.cal-sw { display: inline-block; width: .85rem; height: .85rem; border-radius: 3px; vertical-align: -2px; flex: none; background: var(--sw, transparent); border: 1px solid color-mix(in srgb, var(--sw, var(--border)) 70%, #000); }
.cal-sw--none { --sw: var(--surface-3); border-style: dashed; }
.cal-sw--red, .cal-entry--c-red, .cal-d--c-red { --sw: var(--cal-red); }
.cal-sw--orange, .cal-entry--c-orange, .cal-d--c-orange { --sw: var(--cal-orange); }
.cal-sw--amber, .cal-entry--c-amber, .cal-d--c-amber { --sw: var(--cal-amber); }
.cal-sw--green, .cal-entry--c-green, .cal-d--c-green { --sw: var(--cal-green); }
.cal-sw--teal, .cal-entry--c-teal, .cal-d--c-teal { --sw: var(--cal-teal); }
.cal-sw--blue, .cal-entry--c-blue, .cal-d--c-blue { --sw: var(--cal-blue); }
.cal-sw--indigo, .cal-entry--c-indigo, .cal-d--c-indigo { --sw: var(--cal-indigo); }
.cal-sw--purple, .cal-entry--c-purple, .cal-d--c-purple { --sw: var(--cal-purple); }
.cal-sw--pink, .cal-entry--c-pink, .cal-d--c-pink { --sw: var(--cal-pink); }
.cal-sw--brown, .cal-entry--c-brown, .cal-d--c-brown { --sw: var(--cal-brown); }
.cal-sw--gray, .cal-entry--c-gray, .cal-d--c-gray { --sw: var(--cal-gray); }
.cal-entry[class*="cal-entry--c-"] { background: color-mix(in srgb, var(--sw) 16%, var(--surface)); color: color-mix(in srgb, var(--sw) 80%, var(--text)); border-left: 3px solid var(--sw); }
.cal-d[class*="cal-d--c-"] .cal-d__main { color: var(--sw); }
.cal-file { margin: -.25rem 0 1rem; }
/* Calendar import */
.cal-import { display: grid; gap: 1rem; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); margin-bottom: 1rem; }
.cal-import__drop { display: flex; flex-direction: column; align-items: center; gap: .35rem; padding: 1.75rem 1rem; text-align: center; border: 2px dashed var(--border); border-radius: 14px; cursor: pointer; background: var(--surface-2); transition: border-color .15s, background .15s; }
.cal-import__drop:hover, .cal-import:has(#cal-file:focus-visible) .cal-import__drop { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 5%, var(--surface)); }
.cal-import__icon { width: 2.2rem; height: 2.2rem; color: var(--brand); }
.cal-import__name { font-weight: 600; color: var(--brand); word-break: break-all; }
.cal-import__progress[hidden] { display: none; }
.cal-import__progress { display: flex; flex-direction: column; gap: .35rem; }
.cal-import__progress progress { width: 100%; height: .6rem; accent-color: var(--brand); }
.cal-import__steps { margin: 0; padding-left: 1.2rem; display: grid; gap: .45rem; font-size: .9rem; }
.ci-summary { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 3fr); gap: 1rem; margin-bottom: 1rem; }
.ci-year { display: flex; flex-direction: column; justify-content: center; gap: .15rem; }
.ci-year strong { font-size: 2.2rem; line-height: 1.1; color: var(--brand); }
.ci-key__list { list-style: none; margin: .5rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem .9rem; }
.ci-key__list li { display: flex; align-items: center; gap: .4rem; font-size: .9rem; }
.ci-table td { vertical-align: top; }
.ci-table input.ci-date { width: 7.6rem; font-variant-numeric: tabular-nums; }
.ci-table input.ci-title { width: 100%; min-width: 12rem; }
.ci-table select { min-width: 6.5rem; max-width: 10rem; }
.ci-table th:nth-child(4) { min-width: 15rem; }
.ci-ad, .ci-warn, .ci-pub { display: block; margin-top: .2rem; }
.ci-warn { color: var(--warn); } .ci-pub { color: var(--info, var(--brand)); }
.ci-warn .icon, .ci-pub .icon { width: .85rem; height: .85rem; vertical-align: -2px; }
.ci-colour { display: flex; align-items: center; gap: .4rem; }
.ci-row--new { background: var(--surface-2); }
.ci-row--warn td:first-child { box-shadow: inset 3px 0 0 var(--warn); }
@media (max-width: 760px) {
  .cal-import, .ci-summary { grid-template-columns: 1fr; }
  .ci-table thead { display: none; }
  .ci-table, .ci-table tbody { display: block; }
  .ci-table tr { display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(0, 1fr); gap: .5rem .6rem; align-items: center; padding: .8rem 1rem; border-bottom: 1px solid var(--border); }
  .ci-table td { display: block; padding: 0; border: 0; min-width: 0; }
  .ci-table td:nth-child(4), .ci-table td:nth-child(7) { grid-column: 1 / -1; }
  .ci-table td:nth-child(5) { grid-column: 1 / 3; }
  .ci-table td[data-label]::before { content: attr(data-label); display: block; font-size: .72rem; color: var(--muted); margin-bottom: .15rem; }
  .ci-table td.center[data-label] { text-align: left; }
  .ci-table input.ci-date, .ci-table input.ci-title, .ci-table select { width: 100%; min-width: 0; max-width: none; }
  .ci-table th:nth-child(4) { min-width: 0; }
}
.upload-mb { width: 6.5rem; text-align: right; }
.ci-replace { border-top: 1px solid var(--border); background: color-mix(in srgb, var(--warn) 7%, var(--surface)); }
.ci-replace .badge { margin: .15rem .2rem 0 0; }

/* AI camera attendance */
.face-live [hidden], .face-enroll [hidden] { display: none !important; }
.face-live__bar { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; gap: .75rem 1rem; align-items: end; margin-bottom: 1rem; }
.face-live__actions { display: flex; gap: .5rem; }
.face-live__main { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(280px, 1fr); gap: 1rem; align-items: start; }
.face-live__view { overflow: hidden; background: #0b1020; }
/* a 16:9 picture (like a video): the camera's own moving picture underneath, the face boxes on a canvas on top;
   both fit the box the same way, so the boxes stay on the faces. "Fill" crops to fill the box, "Fit" shows all of it. */
.face-live__stage { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #0b1020; overflow: hidden; }
.face-live__canvas, .face-live__live { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: contain; }
.face-live__live { background: #0b1020; }
.face-live.is-fill .face-live__canvas, .face-live.is-fill .face-live__live { object-fit: cover; }
.face-live__fit { position: absolute; right: .5rem; bottom: .5rem; z-index: 2; padding: .25rem .6rem; border: 0; border-radius: 999px;
  font: inherit; font-size: .8rem; color: #fff; background: rgba(15, 23, 42, .65); cursor: pointer; }
.face-live:not(.is-running) .face-live__fit { display: none; }
.face-live.is-portrait .face-live__stage { aspect-ratio: 1 / 1; max-height: 70vh; margin: 0 auto; } /* an upright phone camera: square, the whole face fits */
.face-live__state { margin: 0; padding: .55rem .9rem; color: #cbd5e1; background: #111827; font-variant-numeric: tabular-nums; }
.face-live__state.is-bad { color: #fca5a5; }
.face-live__roster { max-height: calc(100vh - 9rem); display: flex; flex-direction: column; }
.fl-list { list-style: none; margin: 0; padding: 0; overflow-y: auto; flex: 1; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.fl-row { display: grid; grid-template-columns: 2.4rem minmax(0, 1fr) auto; gap: .6rem; align-items: center; padding: .5rem .9rem; border-bottom: 1px solid var(--border); }
.fl-row.is-seen { background: color-mix(in srgb, var(--ok) 7%, var(--surface)); }
.fl-photo { width: 2.4rem; height: 2.4rem; border-radius: 50%; object-fit: cover; background: var(--surface-3); display: grid; place-items: center; font-weight: 600; color: var(--muted); }
.fl-who { display: flex; flex-direction: column; min-width: 0; }
.fl-who strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fl-chip { align-self: flex-start; margin-top: .15rem; font-size: .72rem; padding: .05rem .45rem; border-radius: 999px; background: var(--surface-3); color: var(--muted); }
.fl-chip--seen { background: var(--ok-bg); color: var(--ok); font-weight: 600; }
.fl-chip--none { background: var(--warn-bg); color: var(--warn); }
.fl-status { max-width: 7.5rem; }
.face-enroll__camera { margin-bottom: 1rem; }
.face-enroll__video { width: 100%; max-width: 560px; border-radius: 12px; background: #0b1020; }
.fe-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--border); }
.fe-row { display: grid; grid-template-columns: 2.6rem minmax(0, 1.4fr) minmax(0, 1fr) auto; gap: .6rem .9rem; align-items: center; padding: .6rem 1rem; border-bottom: 1px solid var(--border); }
.fe-row.is-enrolled .fe-avatar { box-shadow: 0 0 0 2px var(--ok); }
.fe-who { display: flex; flex-direction: column; min-width: 0; }
.fe-state.is-bad { color: var(--err); }
.fe-consent, .fl-status { min-width: 0; min-height: 36px; padding: .35rem .6rem; border-radius: 9px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); font: inherit; font-size: .88rem; }
.fe-consent:focus, .fl-status:focus { outline: none; border-color: var(--brand); box-shadow: var(--focus); }
.face-setup { display: grid; gap: 1rem; }
.face-setup__cam { display: grid; gap: .75rem; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--border); }
.face-setup__cam h3, .face-setup__cam .row-gap, .face-setup__cam .check { grid-column: 1 / -1; }
.face-setup__steps { margin: 0; padding-left: 1.2rem; display: grid; gap: .35rem; }
.face-setup [hidden] { display: none !important; }
.fs-steps { margin: 0; padding: .8rem 1rem .8rem 2.2rem; background: var(--surface-2); border-radius: 12px; display: grid; gap: .3rem; }
.fs-details > summary { cursor: pointer; list-style: none; width: max-content; }
.fs-details > summary::-webkit-details-marker { display: none; }
.fs-details[open] > summary { margin-bottom: .9rem; }
.fs-details > .face-setup__cam { border-top: 0; padding: 0; }
.fs-wide { grid-column: 1 / -1; margin: 0; }
.fs-inline { display: flex; gap: .5rem; align-items: center; }
.fs-inline input { flex: 1; min-width: 0; }
.fs-found { list-style: none; margin: .5rem 0 0; padding: 0; display: grid; gap: .35rem; }
.fs-found__row { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; padding: .4rem .6rem; border: 1px solid var(--border); border-radius: 8px; }
.fs-found__row .btn { margin-left: auto; }
.fs-pick__head { display: flex; gap: 1rem; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; }
.fs-pick__head h2 { margin: 0 0 .25rem; }
.fs-grid { display: grid; gap: .8rem; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.fs-tile { display: grid; gap: .45rem; padding: .55rem; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.fs-tile.is-on { border-color: var(--brand); box-shadow: 0 0 0 2px color-mix(in srgb, var(--brand) 25%, transparent); }
.fs-tile input:not([type=checkbox]), .fs-tile select { width: 100%; min-height: 2.1rem; padding: .3rem .5rem; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: inherit; font: inherit; font-size: .88rem; }
.fs-thumb { position: relative; aspect-ratio: 16 / 9; border-radius: 8px; overflow: hidden; background: #0f172a; display: grid; place-items: center; }
.fs-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.fs-thumb span { color: #cbd5e1; font-size: .85rem; font-weight: 600; }
.fs-tile.is-empty .fs-thumb { background: repeating-linear-gradient(45deg, #1e293b, #1e293b 8px, #0f172a 8px, #0f172a 16px); }
.fs-quality { max-width: 30rem; }
.fs-addr { font-size: .75rem; word-break: break-all; }
.fs-bridge-state { margin: 0; padding: .5rem .75rem; border-radius: 8px; background: var(--surface-2); }
.fs-bridge-state.is-ok, [data-fs-pick-state].is-ok, [data-fs-tryout].is-ok { color: var(--ok); }
[data-fs-tryout].is-bad { color: var(--err); }
[data-fs-tryout] { margin: .35rem 0 0; max-width: 46ch; }
.fs-bridge-state.is-bad, [data-fs-pick-state].is-bad { color: var(--err); }
.face-setup__yaml { margin: 0; padding: .8rem 1rem; background: var(--surface-2); border-radius: 10px; overflow-x: auto; font-size: .82rem; }
@media (max-width: 900px) {
  .face-live__bar { grid-template-columns: 1fr; }
  .face-live__main { grid-template-columns: 1fr; }
  .face-live__roster { max-height: none; }
  .fe-row { grid-template-columns: 2.6rem minmax(0, 1fr); }
  .fe-consent, .fe-actions { grid-column: 1 / -1; }
  .face-setup__cam { grid-template-columns: 1fr; }
}

/* a page shown inside the mobile app (PageActivity): no website sidebar or top bar — the app has its own */
.in-app .sidebar, .in-app .sidebar-backdrop, .in-app .topbar, .in-app .skip-link { display: none !important; }
.in-app .app-shell { display: block; grid-template-columns: none; }
.in-app .content { padding-top: 14px; }
.in-app .content { max-width: 100vw; overflow-x: hidden; }
.in-app .content table { display: block; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.in-app .page-head { flex-wrap: wrap; }
.in-app .page-head > * { min-width: 0; max-width: 100%; }
.in-app, .in-app .app-shell, .in-app .app-shell > *, .in-app .content { min-width: 0; max-width: 100vw; overflow-x: hidden; }
.in-app .content > *, .in-app .card { min-width: 0; max-width: 100%; }
.in-app .table-wrap, .in-app .table-scroll { max-width: 100%; overflow-x: auto; }
.in-app .toasts { max-width: calc(100vw - 16px); left: 8px; right: 8px; }

/* the school's letterhead on every printable document (partials/doc-letterhead.php) */
.doc-lh { position: relative; }
.doc-lh__mark { width: 60px; height: 60px; flex: none; border-radius: 14px; display: grid; place-items: center; font-size: 1.7rem; font-weight: 800; color: #fff; background: var(--brand); -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.doc-lh--compact .fee-lh__logo, .doc-lh--compact .doc-lh__mark { width: 46px; height: 46px; font-size: 1.2rem; }
.doc-lh--compact .fee-lh__school { font-size: 1.05rem; }
.doc-lh--compact .fee-lh__title { font-size: .8rem; padding: .2rem .55rem; }
@media (max-width: 520px) { .fee-lh__meta { text-align: left; justify-items: start; } .fee-lh__logo { width: 52px; height: 52px; } .fee-lh__school { font-size: 1.15rem; } }

/* Platform › System › Mobile app */
.logo-preview { display: inline-block; background: var(--surface-2, #f4f5fa); padding: 8px 12px; border-radius: 10px; line-height: 0; margin: 4px 0 8px; }
.logo-preview img { display: block; height: 36px; width: auto; max-width: 240px; }
.sub-head { margin: 6px 0 0; font-size: 15px; }
.list-plain { margin: 0 0 8px; padding-left: 18px; line-height: 1.8; }

/* ---- Support tickets (school ↔ platform) ---------------------------------------------------------------------- */
.badge--violet { background: #efe9fe; color: #5b21b6; }
:root[data-theme="dark"] .badge--violet { background: #2a1f4a; color: #c4b5fd; }
.tk-list { display: grid; gap: var(--space-3); }
.tk-card { display: grid; grid-template-columns: auto 1fr auto; gap: .35rem 1rem; align-items: start; padding: 1rem 1.15rem; border: 1px solid var(--border);
  border-radius: var(--radius-lg); background: var(--surface); color: inherit; text-decoration: none; box-shadow: var(--shadow-sm); transition: border-color .15s, box-shadow .15s; }
.tk-card:hover { border-color: var(--brand); box-shadow: var(--shadow); }
.tk-card.is-unread { border-left: 4px solid var(--brand); }
.tk-card.is-overdue { border-left: 4px solid var(--err); }
.tk-card__icon { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand-text); }
.tk-card__title { font-weight: 700; margin: 0; display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.tk-card__meta { margin: .15rem 0 0; color: var(--muted); font-size: .85rem; display: flex; flex-wrap: wrap; gap: .3rem .9rem; }
.tk-card__side { display: flex; flex-direction: column; align-items: flex-end; gap: .35rem; }
.tk-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--brand); display: inline-block; }
.tk-no { font-family: var(--mono); font-size: .8rem; color: var(--muted); font-weight: 600; }
.tk-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: var(--space-4); align-items: start; }
@media (max-width: 1000px) { .tk-layout { grid-template-columns: 1fr; } }
.tk-steps { display: flex; gap: 0; list-style: none; padding: 0; margin: 0; counter-reset: tk; }
.tk-steps li { flex: 1; text-align: center; position: relative; font-size: .78rem; color: var(--muted); padding-top: 30px; }
.tk-steps li::before { counter-increment: tk; content: counter(tk); position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 24px; height: 24px; border-radius: 50%;
  background: var(--surface-3); color: var(--muted); display: grid; place-items: center; font-weight: 700; font-size: .75rem; z-index: 1; }
.tk-steps li::after { content: ""; position: absolute; top: 11px; left: -50%; width: 100%; height: 3px; background: var(--surface-3); }
.tk-steps li:first-child::after { display: none; }
.tk-steps li.is-done, .tk-steps li.is-now { color: var(--text); font-weight: 600; }
.tk-steps li.is-done::before { content: "✓"; background: var(--ok); color: #fff; }
.tk-steps li.is-now::before { background: var(--brand); color: var(--brand-ink); box-shadow: var(--focus); }
.tk-steps li.is-done::after, .tk-steps li.is-now::after { background: var(--ok); }
.tk-thread { display: flex; flex-direction: column; gap: var(--space-3); }
.tk-msg { max-width: 86%; border-radius: 16px; padding: .75rem 1rem; border: 1px solid var(--border); background: var(--surface); }
.tk-msg--mine { align-self: flex-end; background: var(--brand-soft); border-color: transparent; border-bottom-right-radius: 4px; }
.tk-msg--theirs { align-self: flex-start; border-bottom-left-radius: 4px; }
.tk-msg--internal { align-self: stretch; max-width: none; background: var(--warn-bg); border: 1px dashed var(--warn); }
.tk-msg--system { align-self: center; max-width: 90%; background: transparent; border: 0; padding: .2rem .5rem; color: var(--muted); font-size: .83rem; text-align: center; }
.tk-msg__head { display: flex; justify-content: space-between; gap: .75rem; font-size: .8rem; color: var(--muted); margin-bottom: .3rem; }
.tk-msg__head strong { color: var(--text); }
.tk-msg__body { white-space: pre-wrap; overflow-wrap: anywhere; margin: 0; }
.tk-files { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .5rem; }
.tk-file { display: inline-flex; align-items: center; gap: .35rem; padding: .25rem .6rem; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--border); font-size: .8rem; text-decoration: none; color: var(--text-2); }
.tk-file:hover { border-color: var(--brand); }
.tk-dl { display: grid; grid-template-columns: auto 1fr; gap: .35rem .9rem; margin: 0; font-size: .9rem; }
.tk-dl dt { color: var(--muted); }
.tk-dl dd { margin: 0; overflow-wrap: anywhere; }
.tk-contact { display: flex; flex-wrap: wrap; gap: .5rem; }
.tk-contact .btn { flex: 1 1 auto; justify-content: center; }
.btn--wa { background: #25d366; color: #fff; border-color: #25d366; }
.btn--wa:hover { background: #1ebe5a; color: #fff; }
.tk-stars { display: inline-flex; flex-direction: row-reverse; gap: .2rem; }
.tk-stars input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.tk-stars label { font-size: 2rem; line-height: 1; cursor: pointer; color: var(--surface-3); transition: color .1s, transform .1s; }
.tk-stars label:hover, .tk-stars label:hover ~ label, .tk-stars input:checked ~ label { color: #f5a524; }
.tk-stars input:focus-visible + label { outline: 2px solid var(--brand); border-radius: 4px; }
.tk-rated { color: #f5a524; font-size: 1.2rem; letter-spacing: .1rem; }
.tk-closed-note { display: flex; gap: .75rem; align-items: center; justify-content: space-between; flex-wrap: wrap; background: var(--surface-2); border-radius: var(--radius); padding: .9rem 1rem; }
.tk-radios { display: flex; flex-wrap: wrap; gap: .5rem; }
.tk-radios label { display: inline-flex; gap: .4rem; align-items: center; padding: .45rem .8rem; border: 1px solid var(--border); border-radius: 999px; cursor: pointer; }
.tk-radios label:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-text); font-weight: 600; }
.tk-hero { display: flex; gap: 1rem; align-items: center; padding: 1.1rem 1.25rem; border-radius: var(--radius-lg); color: #fff;
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 60%, #db2777 100%); }
.tk-hero h2 { margin: 0; color: #fff; font-size: 1.1rem; }
.tk-hero p { margin: .15rem 0 0; opacity: .9; font-size: .9rem; }
.tk-hero__icon { width: 52px; height: 52px; border-radius: 14px; background: rgb(255 255 255 / .18); display: grid; place-items: center; flex: 0 0 auto; }
.tk-tpl { border: 1px solid var(--border); border-radius: var(--radius); padding: .9rem 1rem; display: grid; gap: .5rem; }
.tk-tpl h3 { margin: 0; font-size: .95rem; }
.tk-vars { display: flex; flex-wrap: wrap; gap: .3rem; }
.tk-vars code { background: var(--surface-2); padding: .05rem .35rem; border-radius: 6px; font-size: .78rem; }
.tk-canned { display: grid; gap: .6rem; }
.tk-canned details { border: 1px solid var(--border); border-radius: var(--radius); padding: .6rem .9rem; }
.tk-canned summary { cursor: pointer; font-weight: 600; }
.tk-overdue { color: var(--err); font-weight: 700; }
.tk-table td { vertical-align: middle; }
.tk-table tr.is-unread td:first-child { box-shadow: inset 4px 0 0 var(--brand); }
.tk-table tr.is-overdue td:first-child { box-shadow: inset 4px 0 0 var(--err); }
.tk-m0 { margin: 0; }
.chip.is-active { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.tk-phone { display: flex; gap: .75rem; align-items: flex-start; padding: .85rem 1rem; border-radius: 18px; background: var(--surface-2); border: 1px solid var(--border); box-shadow: var(--shadow); }
.tk-phone__ic { width: 36px; height: 36px; border-radius: 10px; background: var(--brand); color: var(--brand-ink); display: grid; place-items: center; flex: 0 0 auto; }
.tk-phone strong { display: block; }
.tk-phone p { margin: .15rem 0 0; font-size: .88rem; color: var(--text-2); white-space: pre-wrap; overflow-wrap: anywhere; }
.tk-phone--rich { flex-wrap: wrap; }
.tk-phone__app { width: 36px; height: 36px; border-radius: 10px; flex: 0 0 auto; }
.tk-phone__txt { flex: 1 1 0; min-width: 0; }
.tk-phone__pic { flex: 1 1 100%; width: 100%; aspect-ratio: 2 / 1; object-fit: cover; border-radius: 12px; }
.bc-pics { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); grid-auto-rows: max-content; align-items: start; gap: .5rem; max-height: 320px; overflow: auto; padding: 2px; }
.bc-pic { position: relative; display: block; cursor: pointer; border-radius: 10px; border: 3px solid transparent; overflow: hidden; background: var(--surface-2); margin: 0; height: auto; }
.bc-pic img { width: 100%; height: auto; aspect-ratio: 2 / 1; object-fit: cover; display: block; }
.bc-pic input { position: absolute; opacity: 0; pointer-events: none; }
.bc-pic:has(input:checked) { border-color: var(--brand); }
.bc-pic:has(input:focus-visible) { outline: 2px solid var(--brand); outline-offset: 2px; }
.bc-pic--none { display: grid; place-items: center; aspect-ratio: 2 / 1; font-size: .85rem; color: var(--text-2); border: 1px dashed var(--border); }
a.chip { padding: .35rem .8rem; text-decoration: none; color: var(--text-2); } a.chip:hover { border-color: var(--brand); }
/* notifications: open what it is about */
.notif { position: relative; }
.notif__link { color: inherit; text-decoration: none; }
.notif__link::after { content: ""; position: absolute; inset: 0; } /* the whole row opens it */
.notif:hover .notif__link { color: var(--brand-text); }
.notif__actions { display: flex; gap: var(--space-2); align-items: center; flex-wrap: wrap; position: relative; z-index: 1; }
.notif-filters { flex-wrap: wrap; gap: .5rem; align-items: center; margin-bottom: .75rem; }
.notif-filters .tabs { margin-bottom: 0; }


/* support report */
.tk-rep__h { font-size: 1rem; margin: 0; padding: 1rem 1.25rem .5rem; }
.tk-rep-small { font-size: 1.25rem; }
.tk-rep-barcol { width: 42%; }
.tk-bar { display: block; height: 7px; border-radius: 4px; margin: 2px 0; min-width: 2px; }
.tk-bar--o { background: var(--brand); }
.tk-bar--s { background: var(--ok); }
.tk-key { display: inline-block; width: 10px; height: 10px; border-radius: 3px; vertical-align: middle; margin-left: .5rem; }
.tk-key--o { background: var(--brand); } .tk-key--s { background: var(--ok); }
.tk-w-0 { width: 0%; }
.tk-w-1 { width: 5%; }
.tk-w-2 { width: 10%; }
.tk-w-3 { width: 15%; }
.tk-w-4 { width: 20%; }
.tk-w-5 { width: 25%; }
.tk-w-6 { width: 30%; }
.tk-w-7 { width: 35%; }
.tk-w-8 { width: 40%; }
.tk-w-9 { width: 45%; }
.tk-w-10 { width: 50%; }
.tk-w-11 { width: 55%; }
.tk-w-12 { width: 60%; }
.tk-w-13 { width: 65%; }
.tk-w-14 { width: 70%; }
.tk-w-15 { width: 75%; }
.tk-w-16 { width: 80%; }
.tk-w-17 { width: 85%; }
.tk-w-18 { width: 90%; }
.tk-w-19 { width: 95%; }
.tk-w-20 { width: 100%; }
.tk-w-0 { min-width: 0; }
@media print {
  .tk-rep, .tk-rep-stats .stat { break-inside: avoid; }
  .tk-rep-stats { grid-template-columns: repeat(4, 1fr); gap: 6px; }
  .tk-rep-stats .stat { padding: 6px 8px; border: 1px solid #ccc; }
  .tk-rep-stats .stat__icon { display: none; }
  .tk-bar--o, .tk-key--o { background: #4f46e5 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .tk-bar--s, .tk-key--s { background: #0f7a4a !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
.tk-ranges { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: var(--space-3); }
/* quick periods above date filters */
.period-chips { display: flex; flex-wrap: wrap; gap: .35rem; flex: 1 1 100% !important; width: 100%; grid-column: 1 / -1; }
.period-chip { border: 1px solid var(--border); background: var(--surface); color: var(--text-2); border-radius: 999px; padding: .3rem .75rem; font: inherit; font-size: .84rem; cursor: pointer; }
.period-chip:hover { border-color: var(--brand); color: var(--brand-text); }
.period-chip.is-active { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
@media print { .period-chips { display: none !important; } }
.filters > .field:has(.date-group), .filters > .field:has(.bs-field) { flex: 1 1 13.5rem; min-width: 13.5rem; } /* date fields (AD + BS) never overlap their neighbours */

/* Email & SMS log: the message itself */
.dl-msg { min-width: 16rem; max-width: 34rem; line-height: 1.45; overflow-wrap: anywhere; }
.dl-msg details { margin-top: .25rem; }
.dl-msg summary { cursor: pointer; color: var(--brand, #4f46e5); }
.dl-msg .dl-full { margin-top: .35rem; padding: .5rem .65rem; border-radius: .5rem; background: var(--surface-2, #f4f5f7); max-height: 22rem; overflow: auto; }
.dl-msg .dl-frame { width: 100%; min-width: 24rem; height: 560px; margin-top: .4rem; }
.dl-msg .dl-sms { white-space: normal; }
@media (max-width: 700px) { .dl-msg .dl-frame { min-width: 0; height: 460px; } }
.rp-pick { display: flex; flex-wrap: wrap; gap: 1rem 1.5rem; align-items: flex-end; }
.rp-pick form { display: flex; flex-wrap: wrap; gap: 1rem; align-items: flex-end; }
.rp-pick #rp-period { min-width: 14rem; }
.period-field select { min-width: 12rem; }

/* a school's own logo wherever a school is listed (platform) */
.school-cell { display: inline-flex; align-items: center; gap: .6rem; }
div.school-cell, h2.school-cell, p.school-cell { display: flex; }
.avatar--school { border-radius: 10px; }
.avatar--school.avatar--logo { object-fit: contain; background: #fff; border: 1px solid var(--border); padding: 2px; }
.avatar--xs { width: 26px; height: 26px; font-size: .68rem; }
td > .school-cell > div { min-width: 13rem; }

/* a person's small photo beside their name in lists */
.person-cell { display: inline-flex; align-items: center; gap: .55rem; vertical-align: middle; }
.avatar--sm { width: 30px; height: 30px; font-size: .7rem; }

/* platform team: printed profile / leave application section headings */
.doc-profile__h{font-size:.85rem;margin:16px 0 6px;text-transform:uppercase;letter-spacing:.05em;color:#555}
/* chosen files: picture previews before sending */
.file-preview{display:flex;flex-wrap:wrap;gap:10px;margin-top:8px}
.file-preview__item{width:112px;display:flex;flex-direction:column;gap:4px}
.file-preview__item img{width:112px;height:112px;object-fit:cover;border-radius:10px;border:1px solid var(--border, #e3e5ec);background:#f4f5f9}
.file-preview__item span{font-size:.75rem;color:var(--muted, #667);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.file-preview__item--file{width:auto;max-width:100%}
.file-preview__item--file span{font-size:.8rem}

/* Attendance › Biometric devices › time cards (one page per person) */
.timecard__name { margin: 0 0 .2rem; font-size: 1.15rem; }
.timecard .table td, .timecard .table th { padding: .22rem .45rem; }
.timecard__sign { display: flex; justify-content: space-between; gap: 2rem; margin-top: 2.5rem; }
.timecard__sign span { flex: 1; border-top: 1px solid #555; padding-top: .3rem; text-align: center; }

/* Class diary */
.diary-entry { margin-bottom: 0; }
.diary-remove { margin: -.5rem 0 var(--space-4); display: flex; justify-content: flex-end; }
.diary-day + .diary-day { border-top: 1px solid var(--border); padding-top: var(--space-3); }
.diary-day h3 { margin: 0 0 .3rem; font-size: 1rem; }
.diary-day p { margin: .2rem 0; }

/* CAS (continuous assessment) */
.cas-grid th.cas-grid__item { min-width: 8.5rem; vertical-align: bottom; }
.cas-grid th.cas-grid__item > span { display: block; }
.cas-grid th.cas-grid__item select { margin-top: var(--space-1, .25rem); font-weight: 400; }
.cas-grid td .input-sm { min-width: 4.5rem; }
.cas-grid td .input-num { width: 5rem; min-width: 0; }
.cas-grid__note { min-width: 12rem; }
.cas-subject { border-top: 1px solid var(--border, #e2e8f0); padding-top: var(--space-3, .75rem); }
.cas-subject:first-of-type { border-top: 0; padding-top: 0; }
.cas-stars { color: #d97706; letter-spacing: 1px; }
.cas-sign { margin-top: 3rem; }
.cas-sign span { border-top: 1px solid currentColor; padding-top: .25rem; min-width: 9rem; text-align: center; }
@media print { .cas-subject { break-inside: avoid; } }
.cas-grid select.input-sm { max-width: 160px; }
.cas-grid .cas-grid__note { max-width: none; }
.is-from-cas { background: #fef9c3; border-color: #eab308; color: #422006; }
.cas-grid th.cas-grid__item { white-space: normal; text-transform: none; letter-spacing: 0; max-width: 11rem; font-size: .8rem; line-height: 1.25; }
/* Flash / IEMIS reports */
.flash-total td { font-weight: 700; border-top: 2px solid var(--border-strong, #94a3b8); }
.flash-table + .flash-table { margin-top: var(--space-4, 1rem); }
.iemis-grid select.input-sm { max-width: 150px; }

/* Exam seat plan */
.seat-front { text-align: center; font-weight: 600; letter-spacing: .05em; border: 1px dashed var(--border-strong, #94a3b8); border-radius: 8px; padding: .3rem; margin: 0; }
.seat-grid { display: grid; gap: .6rem; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.seat-grid--c1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.seat-grid--c2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.seat-grid--c3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.seat-grid--c4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.seat-grid--c5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.seat-grid--c6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.seat-grid--c7 { grid-template-columns: repeat(7, minmax(0, 1fr)); }
.seat-grid--c8 { grid-template-columns: repeat(8, minmax(0, 1fr)); }
.seat-grid--c9 { grid-template-columns: repeat(9, minmax(0, 1fr)); }
.seat-grid--c10 { grid-template-columns: repeat(10, minmax(0, 1fr)); }
.seat-grid--c11 { grid-template-columns: repeat(11, minmax(0, 1fr)); }
.seat-grid--c12 { grid-template-columns: repeat(12, minmax(0, 1fr)); }

.seat-bench { border: 1px solid var(--border-strong, #94a3b8); border-radius: 8px; padding: .35rem .45rem; display: flex; flex-direction: column; gap: .2rem; break-inside: avoid; }
.seat-bench__no { font-size: .7rem; color: var(--text-muted, #64748b); }
.seat { font-size: .82rem; line-height: 1.2; }
.seat b { display: inline-block; min-width: 1.6rem; }
.seat small { display: block; color: var(--text-muted, #64748b); padding-left: 1.6rem; font-size: .72rem; }
.seat--empty { opacity: .55; }
.seat-blank { min-width: 7rem; }
.seat-door td { font-size: 1.05rem; }
@media (max-width: 720px) { .seat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; } }
@media print { .seat-hall { break-after: page; } .seat-hall:last-of-type { break-after: auto; } .seat-grid { gap: .35rem; } }

/* Bus GPS maps */
.bus-map { height: 62vh; min-height: 320px; width: 100%; border-radius: 12px; z-index: 0; }
.bus-map--small { height: 40vh; min-height: 240px; }
.bus-map-card { overflow: hidden; padding: 0; }
.bus-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: var(--space-4, 1rem); align-items: start; }
@media (max-width: 900px) { .bus-layout { grid-template-columns: 1fr; } }
.bus-row { display: flex; flex-direction: column; align-items: flex-start; gap: .1rem; width: 100%; text-align: left; padding: .6rem 1rem; border: 0; border-top: 1px solid var(--border, #e2e8f0); background: none; color: inherit; font: inherit; cursor: pointer; }
.bus-row:hover { background: var(--surface-2, rgba(0,0,0,.03)); }
.bus-row small { color: var(--text-muted, #64748b); }
.bus-child { display: flex; flex-direction: column; gap: .2rem; min-width: 240px; }
.bus-pin span { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: #fde047; border: 2px solid #a16207; font-size: 18px; box-shadow: 0 2px 6px rgba(0,0,0,.35); }
.bus-pin--old span { background: #e5e7eb; border-color: #6b7280; filter: grayscale(1); }
.stop-pin span { display: block; width: 16px; height: 16px; border-radius: 50%; background: #2563eb; border: 3px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.4); }
.stop-pin--mine span, .stop-pin--start span { display: grid; place-items: center; width: 28px; height: 28px; background: #fff; border: 2px solid #16a34a; font-size: 15px; color: #166534; font-weight: 700; }
.copy-code { word-break: break-all; }

/* ---------- Gate pass slip (A6, half an A5) ---------- */
.gate-slip { background: #fff; max-width: 148mm; margin: 0 auto; padding: 8mm; border: 1px dashed #94a3b8; border-radius: 6px; color: #111; }
.gate-slip__body { display: flex; gap: 6mm; align-items: flex-start; margin-top: 4mm; }
.gate-slip__qr { display: flex; flex-direction: column; align-items: center; gap: 2mm; flex: 0 0 auto; }
.gate-slip__qr strong { font-size: 1.15rem; letter-spacing: .12em; }
.gate-slip .dl { flex: 1; margin: 0; }
.gate-slip__sign { display: flex; justify-content: space-between; gap: 6mm; margin-top: 12mm; font-size: .8rem; color: #475569; }
.gate-slip__sign span { flex: 1; border-top: 1px solid #94a3b8; padding-top: 1.5mm; text-align: center; }
@media print { .gate-slip { border: 0; padding: 0; } }

/* ---------- Document check (/verify) and the verification QR on printed documents ---------- */
.pt-qr--verify { text-align: center; }
.pt-qr--verify small { display: block; line-height: 1.2; font: 600 7pt/1.2 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .06em; margin-top: .5mm; color: #111; }
.auth__card.verify { width: min(520px, 100%); }
.verify__school { display: flex; gap: .75rem; align-items: center; margin-bottom: 1rem; }
.verify__logo { width: 52px; height: 52px; object-fit: contain; border-radius: 8px; }
.verify__state { display: flex; gap: .5rem; align-items: center; padding: .8rem 1rem; border-radius: 12px; margin-bottom: 1rem; }
.verify__state .icon { width: 1.4rem; height: 1.4rem; }
.verify__state--ok { background: #dcfce7; color: #166534; }
.verify__state--bad { background: #fee2e2; color: #991b1b; }

/* ---------- Surveys ---------- */
.survey-qs { list-style: decimal; margin: 0; padding: 0 1.25rem 0 2.75rem; }
.survey-qs li { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start; padding: .65rem 0; border-top: 1px solid var(--border); }
.survey-qs li::marker { color: var(--muted); }
.survey-q { font-weight: 600; font-size: 1rem; padding: 0; }
.survey-bars { display: grid; gap: .45rem; }
.survey-bar { display: grid; grid-template-columns: minmax(6rem, 14rem) 1fr auto; gap: .6rem; align-items: center; font-size: .92rem; }
.survey-bar__track { height: .7rem; background: var(--surface-2, #eef2f7); border-radius: 99px; overflow: hidden; }
.survey-bar__fill { display: block; height: 100%; background: var(--brand, #4f46e5); border-radius: 99px; }
.survey-bar__n { color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.survey-texts { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.survey-texts li { background: var(--surface-2, #f1f5f9); border-radius: 10px; padding: .6rem .8rem; }
.rating-pick { display: flex; gap: .4rem; }
.rating-pick input { position: absolute; opacity: 0; }
.rating-pick span { display: inline-grid; place-items: center; width: 2.6rem; height: 2.6rem; border: 1px solid var(--border); border-radius: 10px; cursor: pointer; font-weight: 600; }
.rating-pick input:checked + span { background: var(--brand, #4f46e5); color: #fff; border-color: transparent; }
.rating-pick input:focus-visible + span { outline: 2px solid var(--brand, #4f46e5); outline-offset: 2px; }
@media (max-width: 560px) { .survey-bar { grid-template-columns: 1fr auto; } .survey-bar__track { grid-column: 1 / -1; grid-row: 2; } }
.survey-bar__fill--0 { width: 0%; }
.survey-bar__fill--1 { width: 1%; }
.survey-bar__fill--2 { width: 2%; }
.survey-bar__fill--3 { width: 3%; }
.survey-bar__fill--4 { width: 4%; }
.survey-bar__fill--5 { width: 5%; }
.survey-bar__fill--6 { width: 6%; }
.survey-bar__fill--7 { width: 7%; }
.survey-bar__fill--8 { width: 8%; }
.survey-bar__fill--9 { width: 9%; }
.survey-bar__fill--10 { width: 10%; }
.survey-bar__fill--11 { width: 11%; }
.survey-bar__fill--12 { width: 12%; }
.survey-bar__fill--13 { width: 13%; }
.survey-bar__fill--14 { width: 14%; }
.survey-bar__fill--15 { width: 15%; }
.survey-bar__fill--16 { width: 16%; }
.survey-bar__fill--17 { width: 17%; }
.survey-bar__fill--18 { width: 18%; }
.survey-bar__fill--19 { width: 19%; }
.survey-bar__fill--20 { width: 20%; }
.survey-bar__fill--21 { width: 21%; }
.survey-bar__fill--22 { width: 22%; }
.survey-bar__fill--23 { width: 23%; }
.survey-bar__fill--24 { width: 24%; }
.survey-bar__fill--25 { width: 25%; }
.survey-bar__fill--26 { width: 26%; }
.survey-bar__fill--27 { width: 27%; }
.survey-bar__fill--28 { width: 28%; }
.survey-bar__fill--29 { width: 29%; }
.survey-bar__fill--30 { width: 30%; }
.survey-bar__fill--31 { width: 31%; }
.survey-bar__fill--32 { width: 32%; }
.survey-bar__fill--33 { width: 33%; }
.survey-bar__fill--34 { width: 34%; }
.survey-bar__fill--35 { width: 35%; }
.survey-bar__fill--36 { width: 36%; }
.survey-bar__fill--37 { width: 37%; }
.survey-bar__fill--38 { width: 38%; }
.survey-bar__fill--39 { width: 39%; }
.survey-bar__fill--40 { width: 40%; }
.survey-bar__fill--41 { width: 41%; }
.survey-bar__fill--42 { width: 42%; }
.survey-bar__fill--43 { width: 43%; }
.survey-bar__fill--44 { width: 44%; }
.survey-bar__fill--45 { width: 45%; }
.survey-bar__fill--46 { width: 46%; }
.survey-bar__fill--47 { width: 47%; }
.survey-bar__fill--48 { width: 48%; }
.survey-bar__fill--49 { width: 49%; }
.survey-bar__fill--50 { width: 50%; }
.survey-bar__fill--51 { width: 51%; }
.survey-bar__fill--52 { width: 52%; }
.survey-bar__fill--53 { width: 53%; }
.survey-bar__fill--54 { width: 54%; }
.survey-bar__fill--55 { width: 55%; }
.survey-bar__fill--56 { width: 56%; }
.survey-bar__fill--57 { width: 57%; }
.survey-bar__fill--58 { width: 58%; }
.survey-bar__fill--59 { width: 59%; }
.survey-bar__fill--60 { width: 60%; }
.survey-bar__fill--61 { width: 61%; }
.survey-bar__fill--62 { width: 62%; }
.survey-bar__fill--63 { width: 63%; }
.survey-bar__fill--64 { width: 64%; }
.survey-bar__fill--65 { width: 65%; }
.survey-bar__fill--66 { width: 66%; }
.survey-bar__fill--67 { width: 67%; }
.survey-bar__fill--68 { width: 68%; }
.survey-bar__fill--69 { width: 69%; }
.survey-bar__fill--70 { width: 70%; }
.survey-bar__fill--71 { width: 71%; }
.survey-bar__fill--72 { width: 72%; }
.survey-bar__fill--73 { width: 73%; }
.survey-bar__fill--74 { width: 74%; }
.survey-bar__fill--75 { width: 75%; }
.survey-bar__fill--76 { width: 76%; }
.survey-bar__fill--77 { width: 77%; }
.survey-bar__fill--78 { width: 78%; }
.survey-bar__fill--79 { width: 79%; }
.survey-bar__fill--80 { width: 80%; }
.survey-bar__fill--81 { width: 81%; }
.survey-bar__fill--82 { width: 82%; }
.survey-bar__fill--83 { width: 83%; }
.survey-bar__fill--84 { width: 84%; }
.survey-bar__fill--85 { width: 85%; }
.survey-bar__fill--86 { width: 86%; }
.survey-bar__fill--87 { width: 87%; }
.survey-bar__fill--88 { width: 88%; }
.survey-bar__fill--89 { width: 89%; }
.survey-bar__fill--90 { width: 90%; }
.survey-bar__fill--91 { width: 91%; }
.survey-bar__fill--92 { width: 92%; }
.survey-bar__fill--93 { width: 93%; }
.survey-bar__fill--94 { width: 94%; }
.survey-bar__fill--95 { width: 95%; }
.survey-bar__fill--96 { width: 96%; }
.survey-bar__fill--97 { width: 97%; }
.survey-bar__fill--98 { width: 98%; }
.survey-bar__fill--99 { width: 99%; }
.survey-bar__fill--100 { width: 100%; }
fieldset.card > legend.survey-q { float: left; width: 100%; margin: 0 0 .4rem; }
fieldset.card > legend.survey-q + * { clear: left; }

/* ---------- Fixed asset QR labels (A4: 3 across) ---------- */
.asset-labels { display: grid; grid-template-columns: repeat(3, 63mm); gap: 3mm; justify-content: center; background: #fff; padding: 6mm; }
.asset-label { display: flex; gap: 2mm; align-items: center; border: 1px dashed #94a3b8; border-radius: 2mm; padding: 2mm; height: 30mm; break-inside: avoid; color: #111; }
.asset-label svg { width: 24mm; height: 24mm; flex: 0 0 auto; }
.asset-label div { display: flex; flex-direction: column; gap: .5mm; min-width: 0; font-size: 8pt; line-height: 1.2; }
.asset-label strong { font-size: 10.5pt; letter-spacing: .03em; }
.asset-label small { color: #475569; font-size: 6.5pt; }
@media print { .asset-labels { padding: 0; } }
@media screen and (max-width: 760px) { .asset-labels { grid-template-columns: minmax(0, 63mm); } }

/* ---------- Student wallet / canteen counter ---------- */
.wallet-who { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
.wallet-who .avatar, .wallet-who img { width: 64px; height: 64px; border-radius: 14px; object-fit: cover; }
.wallet-who__bal { margin-left: auto; display: flex; flex-direction: column; align-items: flex-end; gap: .15rem; }
.wallet-who__bal strong { font-size: 1.6rem; font-variant-numeric: tabular-nums; }
.canteen-items { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .6rem; }
.canteen-item { display: flex; justify-content: space-between; align-items: center; gap: .5rem; border: 1px solid var(--border); border-radius: 12px; padding: .55rem .7rem; }
.canteen-item span { display: flex; flex-direction: column; font-weight: 600; }
.canteen-item small { font-weight: 400; color: var(--muted); }
.canteen-item input { width: 4.2rem; text-align: center; }
td.neg { color: #b91c1c; } td.pos { color: #15803d; }

/* ---------- sign-in, registration and password pages: a coloured side (a hero on phones) and the form (2.10.92) ---------- */
body.auth--split { background: var(--bg); }
.auth--split .auth__wrap { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); align-content: stretch; place-items: stretch; gap: 0; padding: 0; }
.auth--split .auth__side { position: relative; overflow: hidden; isolation: isolate; color: #fff; background: var(--brand);
  background: radial-gradient(900px 520px at 85% -10%, color-mix(in oklab, var(--brand) 55%, #ffffff 45%), transparent 60%),
    radial-gradient(700px 500px at -10% 110%, color-mix(in oklab, var(--brand) 60%, #ec4899 40%), transparent 60%),
    linear-gradient(150deg, color-mix(in oklab, var(--brand) 88%, #ffffff 12%), color-mix(in oklab, var(--brand) 62%, #0b0a24 38%)); }
.auth--split .auth__side::before { content: ""; position: absolute; inset: 0; z-index: -1; opacity: .5;
  background-image: radial-gradient(rgb(255 255 255 / .22) 1px, transparent 1.4px); background-size: 22px 22px;
  -webkit-mask-image: linear-gradient(160deg, #000 10%, transparent 75%); mask-image: linear-gradient(160deg, #000 10%, transparent 75%); }
.auth--branded .auth__side { background-size: cover; background-position: center; }
.auth__orb { position: absolute; z-index: -1; border-radius: 50%; filter: blur(2px); background: rgb(255 255 255 / .1); animation: auth-float 14s ease-in-out infinite; }
.auth__orb--1 { width: 340px; height: 340px; right: -110px; top: -120px; }
.auth__orb--2 { width: 220px; height: 220px; left: -70px; bottom: -80px; background: rgb(255 255 255 / .08); animation-delay: -5s; }
.auth__orb--3 { width: 120px; height: 120px; right: 18%; bottom: 14%; background: rgb(255 255 255 / .07); animation-delay: -9s; }
@keyframes auth-float { 0%, 100% { transform: translate3d(0, 0, 0); } 50% { transform: translate3d(14px, -18px, 0); } }
.auth__side-in { position: relative; height: 100%; display: flex; flex-direction: column; gap: 2.5rem; padding: clamp(2rem, 4.5vw, 3.5rem); }
.auth__side-brand { display: flex; align-items: center; gap: .85rem; }
.auth__side-brand .brand-text { display: grid; line-height: 1.25; }
.auth__side-brand strong { font-size: 1.15rem; letter-spacing: -.01em; }
.auth__side .auth__side-brand small { color: rgb(255 255 255 / .82); font-size: .82rem; }
.auth__side .auth__side-brand strong { color: #fff; }
.auth__side-mark { flex: none; width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; overflow: hidden;
  background: rgb(255 255 255 / .18); border: 1px solid rgb(255 255 255 / .28); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); box-shadow: 0 10px 30px -12px rgb(0 0 0 / .45); }
.auth__side-mark .brand-logo { width: 100%; height: 100%; object-fit: contain; background: #fff; padding: 4px; }
.auth__side-mark .brand-mark { width: auto; height: auto; background: none; color: #fff; font-size: 1.45rem; font-weight: 800; box-shadow: none; }
.auth__pitch { margin-top: auto; max-width: 30rem; }
.auth__headline { margin: 0 0 .9rem; font-size: clamp(1.9rem, 3.2vw, 2.7rem); line-height: 1.12; font-weight: 800; letter-spacing: -.025em; text-wrap: balance; }
.auth__lead { margin: 0 0 1.6rem; font-size: 1.02rem; line-height: 1.6; opacity: .88; max-width: 27rem; }
.auth__points { list-style: none; margin: 0; padding: 0; display: grid; gap: .8rem; }
.auth__points li { display: flex; align-items: center; gap: .75rem; font-weight: 550; }
.auth__point-ic { flex: none; width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; background: rgb(255 255 255 / .16); border: 1px solid rgb(255 255 255 / .22); }
.auth__chips { position: relative; min-height: 120px; margin-bottom: .5rem; }
.auth__chip { position: absolute; display: inline-flex; align-items: center; gap: .45rem; padding: .55rem .9rem; border-radius: 999px; font-size: .85rem; font-weight: 600;
  color: #fff; background: rgb(255 255 255 / .14); border: 1px solid rgb(255 255 255 / .26); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  box-shadow: 0 14px 30px -16px rgb(0 0 0 / .55); animation: auth-float 9s ease-in-out infinite; }
.auth__chip--1 { left: 0; top: 8px; }
.auth__chip--2 { left: 34%; top: 54px; animation-delay: -2s; }
.auth__chip--3 { left: 12%; top: 92px; animation-delay: -4s; }
.auth__chip--4 { left: 62%; top: 0; animation-delay: -6s; }

.auth--split .auth__main { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.25rem; padding: clamp(1.5rem, 4vw, 3rem) clamp(1rem, 4vw, 3rem); }
.auth--split .auth__card { width: min(440px, 100%); background: var(--surface); border: 1px solid var(--border); border-radius: 24px;
  box-shadow: 0 1px 2px rgb(16 24 40 / .04), 0 24px 60px -24px rgb(16 24 40 / .22); padding: clamp(1.5rem, 4vw, 2.5rem); animation: auth-rise .45s cubic-bezier(.2, .8, .2, 1) both; }
.auth--split .auth__card:has(.reg), .auth--split .auth__card:has(form fieldset) { width: min(500px, 100%); }
@keyframes auth-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.auth--split .auth__title { margin: 0 0 .35rem; font-size: 1.65rem; font-weight: 800; letter-spacing: -.02em; }
.auth--split .auth__title + .muted { margin-top: 0; margin-bottom: 1.4rem; }
.auth--split .auth__card .field input, .auth--split .auth__card .field select { min-height: 3rem; border-radius: 12px; border-width: 1.5px; background: var(--surface); transition: border-color .15s, box-shadow .15s; }
.auth--split .auth__card .field input:focus, .auth--split .auth__card .reg__input:focus { border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in oklab, var(--brand) 18%, transparent); }
.auth--split .auth__card .reg__input, .auth--split .auth__card .reg__cc { border-radius: 12px; border-width: 1.5px; }
.auth--split .auth__card .btn--primary { min-height: 3rem; border-radius: 12px; font-size: 1rem; font-weight: 700; border: 0;
  background: linear-gradient(135deg, var(--brand), color-mix(in oklab, var(--brand) 70%, #0b0a24 30%)); box-shadow: 0 12px 24px -12px var(--brand); transition: transform .12s, box-shadow .15s, filter .15s; }
.auth--split .auth__card .btn--primary:hover { filter: brightness(1.06); box-shadow: 0 16px 30px -14px var(--brand); }
.auth--split .auth__card .btn--primary:active { transform: scale(.985); }
.auth--split .google-btn { min-height: 3rem; border-radius: 12px; }
body.auth--split .auth__foot { text-align: center; color: var(--muted); font-size: .8rem; margin: 0; text-shadow: none; }
.auth--split .auth__alt { margin-top: 1.25rem; padding-top: 1.1rem; border-top: 1px dashed var(--border); }

/* phones and small tablets: the side becomes a coloured hero on top, the form card rises over it (as in the app) */
@media (max-width: 900px) {
  .auth--split .auth__wrap { grid-template-columns: 1fr; align-content: start; }
  .auth--split .auth__side { border-radius: 0 0 32px 32px; }
  .auth__side-in { gap: 1.25rem; padding: 2rem 1.4rem 4.5rem; }
  .auth__pitch { margin-top: 0; }
  .auth__headline { font-size: 1.55rem; margin-bottom: .4rem; }
  .auth__lead { font-size: .93rem; margin-bottom: 0; }
  .auth__points, .auth__chips { display: none; }
  .auth--split .auth__main { justify-content: flex-start; padding: 0 1rem 1.5rem; margin-top: -3rem; position: relative; z-index: 1; }
  .auth--split .auth__card { border-radius: 22px; padding: 1.5rem 1.15rem; }
  .auth--split .auth__title { font-size: 1.4rem; }
}
:root[data-theme="dark"] .auth--split .auth__card { box-shadow: 0 24px 60px -24px rgb(0 0 0 / .7); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .auth--split .auth__card { box-shadow: 0 24px 60px -24px rgb(0 0 0 / .7); } }
.auth--split .auth__card .reg + p { margin-top: 1rem; padding-top: 1rem; border-top: 1px dashed var(--border); margin-bottom: 0; }
.auth--split .auth__card > form + p.small { margin: 1.1rem 0 0; text-align: center; }
:root[data-theme="dark"] .auth--split:not(.auth--branded) .auth__side { background: radial-gradient(800px 480px at 85% -10%, color-mix(in oklab, var(--brand) 45%, transparent), transparent 60%), linear-gradient(150deg, color-mix(in oklab, var(--brand) 55%, #0b0a24 45%), color-mix(in oklab, var(--brand) 28%, #07061a 72%)); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .auth--split:not(.auth--branded) .auth__side { background: radial-gradient(800px 480px at 85% -10%, color-mix(in oklab, var(--brand) 45%, transparent), transparent 60%), linear-gradient(150deg, color-mix(in oklab, var(--brand) 55%, #0b0a24 45%), color-mix(in oklab, var(--brand) 28%, #07061a 72%)); } }

/* the moving picture on the sign-in side (partials/auth-scene.php) */
.scene { position: relative; width: min(100%, 440px); height: 300px; margin: 0 auto; flex: none; }
.scene__ring { position: absolute; left: 50%; top: 50%; width: 270px; height: 270px; margin: -135px 0 0 -135px; border-radius: 50%; border: 1.5px dashed rgb(255 255 255 / .28); animation: scene-spin 40s linear infinite; }
.scene__card { position: absolute; left: 50%; top: 50%; width: 190px; margin: -112px 0 0 -95px; padding: 14px; display: grid; gap: 10px; border-radius: 22px;
  background: rgb(255 255 255 / .94); color: #1f2340; box-shadow: 0 30px 60px -24px rgb(0 0 0 / .55), 0 0 0 6px rgb(255 255 255 / .12); animation: scene-bob 6s ease-in-out infinite; }
.scene__head { display: flex; align-items: center; gap: 8px; }
.scene__avatar { width: 30px; height: 30px; border-radius: 10px; flex: none; background: linear-gradient(135deg, var(--brand), color-mix(in oklab, var(--brand) 55%, #ec4899)); }
.scene__dot { position: relative; width: 8px; height: 8px; border-radius: 50%; background: #22c55e; margin-left: auto; }
.scene__dot::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: rgb(34 197 94 / .55); animation: scene-pulse 2s ease-out infinite; } /* transform + opacity only: no repaint of the page each frame */
.scene__lines { display: grid; gap: 5px; flex: 1; }
.scene__lines i { display: block; height: 6px; border-radius: 4px; background: #e6e8f2; }
.scene__lines i:first-child { width: 80%; background: #cfd3e6; }
.scene__lines i:last-child { width: 55%; }
.scene__bars { height: 64px; display: flex; align-items: flex-end; gap: 7px; padding: 6px 4px 0; border-radius: 12px; background: #f4f5fb; }
.scene__bars i { flex: 1; height: var(--h); border-radius: 5px 5px 2px 2px; transform-origin: bottom; background: linear-gradient(180deg, var(--brand), color-mix(in oklab, var(--brand) 55%, #fff)); animation: scene-grow 3.2s ease-in-out infinite; }
.scene__bars i:nth-child(2) { animation-delay: -.4s; } .scene__bars i:nth-child(3) { animation-delay: -.8s; } .scene__bars i:nth-child(4) { animation-delay: -1.2s; }
.scene__bars i:nth-child(5) { animation-delay: -1.6s; } .scene__bars i:nth-child(6) { animation-delay: -2s; }
.scene__row { display: flex; align-items: center; gap: 8px; }
.scene__tick { width: 20px; height: 20px; flex: none; border-radius: 7px; display: grid; place-items: center; background: #dcfce7; }
.scene__tick svg { width: 14px; height: 14px; fill: none; stroke: #16a34a; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; animation: scene-draw 4s ease-in-out infinite; }
.scene__tick--2 svg { animation-delay: .6s; }
.scene__progress { height: 7px; border-radius: 6px; background: #e6e8f2; overflow: hidden; }
.scene__progress i { display: block; height: 100%; width: 86%; border-radius: inherit; background: linear-gradient(90deg, #22c55e, #16a34a); transform-origin: left center; animation: scene-fill 5s ease-in-out infinite; }
.scene__ic { position: absolute; width: 52px; height: 52px; border-radius: 17px; display: grid; place-items: center; color: #fff;
  background: rgb(255 255 255 / .16); border: 1px solid rgb(255 255 255 / .3); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); box-shadow: 0 16px 30px -14px rgb(0 0 0 / .55); }
.scene__ic svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.scene__ic--cap { left: 6%; top: 6%; background: #f59e0b; border-color: transparent; animation: scene-bob 5s ease-in-out infinite; }
.scene__ic--cap svg { animation: scene-tilt 3s ease-in-out infinite; transform-origin: 50% 40%; }
.scene__ic--book { right: 4%; top: 2%; animation: scene-bob 6.5s ease-in-out -2s infinite; }
.scene__ic--bell { right: 0; top: 46%; background: #ef4444; border-color: transparent; animation: scene-bob 5.5s ease-in-out -1s infinite; }
.scene__ic--bell svg { transform-origin: 50% 15%; animation: scene-ring 2.6s ease-in-out infinite; }
.scene__ic--bell b { position: absolute; top: -5px; right: -5px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: inset 0 0 0 4px #ef4444; animation: scene-pop 2.6s ease-in-out infinite; }
.scene__ic--cal { left: 0; top: 52%; animation: scene-bob 7s ease-in-out -3s infinite; }
.scene__cal-mark { opacity: .9; } /* drawn once, still (a moving stroke repainted the picture every frame) */
.scene__ic--wallet { left: 18%; bottom: 0; background: #16a34a; border-color: transparent; animation: scene-bob 6s ease-in-out -4s infinite; }
.scene__ic--chat { right: 16%; bottom: 2%; background: #2563eb; border-color: transparent; animation: scene-bob 5.2s ease-in-out -2.5s infinite; }
.scene__typing { position: absolute; left: 50%; top: 42%; transform: translate(-50%, -50%); display: flex; gap: 3px; }
.scene__typing i { width: 4px; height: 4px; border-radius: 50%; background: #fff; animation: scene-type 1.2s ease-in-out infinite; }
.scene__typing i:nth-child(2) { animation-delay: .15s; } .scene__typing i:nth-child(3) { animation-delay: .3s; }
.scene__spark { position: absolute; width: 8px; height: 8px; border-radius: 50%; background: #fff; opacity: .7; animation: scene-twinkle 3s ease-in-out infinite; }
.scene__spark--1 { left: 30%; top: 4%; } .scene__spark--2 { right: 28%; top: 30%; animation-delay: -1s; width: 6px; height: 6px; } .scene__spark--3 { left: 38%; bottom: 8%; animation-delay: -2s; width: 5px; height: 5px; }
@keyframes scene-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes scene-spin { to { transform: rotate(360deg); } }
@keyframes scene-tilt { 0%, 100% { transform: rotate(-6deg); } 50% { transform: rotate(6deg); } }
@keyframes scene-ring { 0%, 55%, 100% { transform: rotate(0); } 10% { transform: rotate(16deg); } 20% { transform: rotate(-14deg); } 30% { transform: rotate(10deg); } 40% { transform: rotate(-6deg); } }
@keyframes scene-pop { 0%, 100% { transform: scale(1); } 15% { transform: scale(1.25); } }
@keyframes scene-draw { 0%, 100% { opacity: 0; transform: scale(.4); } 25%, 80% { opacity: 1; transform: scale(1); } } /* the tick pops in: transform + opacity only */
@keyframes scene-grow { 0%, 100% { transform: scaleY(1); } 50% { transform: scaleY(.62); } }
@keyframes scene-fill { 0%, 100% { transform: scaleX(.44); } 50% { transform: scaleX(1); } } /* was width: a new page layout every frame */
@keyframes scene-pulse { 0% { transform: scale(1); opacity: .6; } 100% { transform: scale(2.6); opacity: 0; } }
@keyframes scene-ping { 0% { box-shadow: 0 0 0 0 rgb(34 197 94 / .6); } 100% { box-shadow: 0 0 0 9px rgb(34 197 94 / 0); } }
@keyframes scene-type { 0%, 100% { transform: translateY(0); opacity: .5; } 50% { transform: translateY(-3px); opacity: 1; } }
@keyframes scene-twinkle { 0%, 100% { transform: scale(.6); opacity: .3; } 50% { transform: scale(1.2); opacity: .9; } }
@media (min-width: 901px) and (max-height: 820px) { .auth__points { display: none; } .scene { height: 260px; } }
/* phones: a row of small moving icons in the hero */
@media (max-width: 900px) {
  .scene { position: relative; width: auto; height: 46px; margin: -.25rem 0 0; display: flex; gap: 10px; align-items: flex-start; }
  .scene__ring, .scene__card, .scene__ic--cal, .scene__spark { display: none; }
  .scene__ic { position: relative; inset: auto; width: 40px; height: 40px; border-radius: 13px; }
  .scene__ic svg { width: 20px; height: 20px; }
  .scene__ic--book { order: 2; } .scene__ic--bell { order: 3; } .scene__ic--chat { order: 4; } .scene__ic--wallet { order: 5; }
}
.scene__bars i:nth-child(1) { height: 46%; } .scene__bars i:nth-child(2) { height: 72%; } .scene__bars i:nth-child(3) { height: 58%; }
.scene__bars i:nth-child(4) { height: 88%; } .scene__bars i:nth-child(5) { height: 64%; } .scene__bars i:nth-child(6) { height: 94%; }

/* ---------- "Need help?" (help/show.php), as in the mobile app (2.10.93) ---------- */
body.hlp-body { margin: 0; background: var(--bg); color: var(--text); }
.hlp { min-height: 100vh; }
.hlp-wrap { width: min(1080px, 100%); margin: 0 auto; padding: 0 clamp(1rem, 3vw, 2rem); }
.hlp-top { position: relative; isolation: isolate; overflow: hidden; color: #fff; padding-top: 1rem;
  background: radial-gradient(800px 420px at 90% -20%, color-mix(in oklab, var(--brand) 55%, #fff 45%), transparent 60%),
    linear-gradient(160deg, color-mix(in oklab, var(--brand) 85%, #0b0a24 15%), color-mix(in oklab, var(--brand) 55%, #0b0a24 45%)); }
.hlp-top::before { content: ""; position: absolute; inset: 0; z-index: -1; opacity: .45; background-image: radial-gradient(rgb(255 255 255 / .22) 1px, transparent 1.4px); background-size: 22px 22px;
  -webkit-mask-image: linear-gradient(170deg, #000, transparent 80%); mask-image: linear-gradient(170deg, #000, transparent 80%); }
.hlp-bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.hlp-back { display: inline-flex; align-items: center; gap: .4rem; padding: .5rem .9rem .5rem .6rem; border-radius: 999px; color: #fff; text-decoration: none; font-weight: 600; font-size: .9rem;
  background: rgb(255 255 255 / .14); border: 1px solid rgb(255 255 255 / .25); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); transition: background .15s; }
.hlp-back:hover { background: rgb(255 255 255 / .24); }
.hlp-back__ic { transform: rotate(180deg); }
.hlp-co { display: inline-flex; align-items: center; gap: .55rem; padding: .4rem .9rem .4rem .45rem; border-radius: 999px; background: #fff; color: #1f2340; box-shadow: 0 8px 20px -8px rgb(0 0 0 / .45); max-width: 60%; }
.hlp-co img { height: 28px; width: auto; max-width: 140px; object-fit: contain; border-radius: 8px; }
.hlp-co b { font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hlp-hero { display: flex; align-items: center; gap: clamp(1.25rem, 3vw, 2.25rem); padding: clamp(1.75rem, 5vw, 3.25rem) 0 clamp(3.5rem, 7vw, 5rem); }
.hlp-hero h1 { color: #fff; margin: 0; font-size: clamp(2rem, 4.5vw, 3rem); font-weight: 800; letter-spacing: -.025em; animation: auth-rise .5s .1s cubic-bezier(.2, .8, .2, 1) both; }
.hlp-hero p { margin: .5rem 0 0; font-size: clamp(.95rem, 1.6vw, 1.1rem); line-height: 1.55; opacity: .88; max-width: 34rem; animation: auth-rise .5s .2s cubic-bezier(.2, .8, .2, 1) both; }
.hlp-art { position: relative; flex: none; width: clamp(84px, 11vw, 120px); height: clamp(84px, 11vw, 120px); border-radius: 30px; display: grid; place-items: center;
  color: color-mix(in oklab, var(--brand) 80%, #0b0a24); background: #fff; box-shadow: 0 24px 50px -18px rgb(0 0 0 / .55); animation: hlp-pop .55s cubic-bezier(.2, 1.4, .4, 1) both, scene-bob 6s ease-in-out .6s infinite; }
.hlp-art > .icon { width: 48%; height: 48%; transform: rotate(-6deg); }
.hlp-dot { position: absolute; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; color: #fff; box-shadow: 0 8px 18px -6px rgb(0 0 0 / .45);
  animation: hlp-pop .45s cubic-bezier(.2, 1.4, .4, 1) both, scene-bob 3.6s ease-in-out infinite; }
.hlp-dot--1 { right: -14px; top: -12px; background: #16a34a; animation-delay: .25s, .8s; }
.hlp-dot--2 { left: -14px; bottom: 8px; background: #2563eb; animation-delay: .35s, 1.2s; }
.hlp-dot--3 { right: -10px; bottom: -14px; background: #f59e0b; animation-delay: .45s, 1.6s; }
@keyframes hlp-pop { from { opacity: 0; transform: scale(.4); } to { opacity: 1; transform: scale(1); } }
.hlp-wave { display: block; width: 100%; height: clamp(34px, 5vw, 70px); fill: var(--bg); position: absolute; bottom: -1px; left: 0; }
.hlp-main { position: relative; margin-top: clamp(-2.75rem, -4vw, -1.75rem); padding-bottom: 2.5rem; display: grid; gap: 1.1rem; }
.hlp-quick { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; }
.hlp-q { display: flex; align-items: center; gap: .9rem; padding: 1rem 1.1rem; border-radius: 20px; background: var(--surface); color: var(--text); text-decoration: none;
  box-shadow: 0 1px 2px rgb(16 24 40 / .05), 0 18px 40px -22px rgb(16 24 40 / .35); border: 1px solid var(--border); transition: transform .15s, box-shadow .15s; }
.hlp-q:hover { transform: translateY(-3px); box-shadow: 0 1px 2px rgb(16 24 40 / .05), 0 24px 48px -22px rgb(16 24 40 / .45); }
.hlp-q__t { display: grid; flex: 1; min-width: 0; }
.hlp-q__t b { font-size: 1.05rem; }
.hlp-q__t small { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hlp-ic { width: 48px; height: 48px; flex: none; border-radius: 15px; display: grid; place-items: center; }
.hlp-ic .icon { width: 22px; height: 22px; }
.hlp-ic.tone-info { background: #e0ecff; color: #1d4ed8; } .hlp-ic.tone-ok { background: #dcfce7; color: #15803d; } .hlp-ic.tone-warn { background: #fef3c7; color: #b45309; }
.hlp-ic.tone-bad { background: #fee2e2; color: #b91c1c; } .hlp-ic.tone-brand { background: var(--brand-soft); color: var(--brand-text); }
.hlp-go { color: var(--muted); flex: none; }
.hlp-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 1.1rem; align-items: start; }
.hlp-col { display: grid; gap: 1.1rem; }
.hlp-card { background: var(--surface); border: 1px solid var(--border); border-radius: 22px; padding: 1.1rem 1.2rem; box-shadow: 0 1px 2px rgb(16 24 40 / .04), 0 14px 34px -24px rgb(16 24 40 / .3); display: grid; gap: .2rem; }
.hlp-in { animation: auth-rise .5s cubic-bezier(.2, .8, .2, 1) both; }
.hlp-col:first-child .hlp-in:nth-child(2), .hlp-col:last-child .hlp-in:nth-child(1) { animation-delay: .08s; }
.hlp-col .hlp-in:nth-child(3), .hlp-col:last-child .hlp-in:nth-child(2) { animation-delay: .16s; }
.hlp-h { display: flex; gap: .9rem; align-items: center; padding: .1rem .1rem .6rem; }
.hlp-h h2 { margin: 0; font-size: 1.15rem; }
.hlp-h p { margin: .15rem 0 0; color: var(--muted); font-size: .9rem; line-height: 1.45; }
.hlp-t { margin: .1rem .2rem .5rem; font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.hlp-row, .hlp-agent { display: flex; align-items: center; gap: .85rem; padding: .7rem .4rem; border-radius: 14px; color: var(--text); text-decoration: none; transition: background .15s; }
a.hlp-row:hover, .hlp-agent:hover { background: var(--surface-2); }
.hlp-row + .hlp-row, .hlp-agent + .hlp-agent { border-top: 1px solid var(--border); border-radius: 0; }
.hlp-row .grow, .hlp-agent .grow { flex: 1; min-width: 0; }
.hlp-row small, .hlp-agent small { display: block; color: var(--muted); font-size: .8rem; }
.hlp-row b, .hlp-agent b { display: block; font-weight: 650; overflow-wrap: anywhere; }
.hlp-av { position: relative; width: 48px; height: 48px; flex: none; border-radius: 50%; display: grid; place-items: center; font-weight: 800; color: #fff; background: linear-gradient(135deg, #22c55e, #15803d); }
.hlp-av img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.hlp-av i { position: absolute; right: 0; bottom: 1px; width: 13px; height: 13px; border-radius: 50%; background: #9ca3af; box-shadow: 0 0 0 2.5px var(--surface); }
.hlp-av i.on { background: #22c55e; animation: scene-ping 2s ease-out infinite; }
.hlp-chat { display: inline-flex; align-items: center; gap: .35rem; padding: .5rem .85rem; border-radius: 999px; font-size: .85rem; font-weight: 700; color: #fff; background: #16a34a; box-shadow: 0 8px 18px -8px #16a34a; flex: none; }
.hlp-note { display: flex; align-items: center; gap: .4rem; margin: .4rem .3rem 0; font-size: .82rem; color: var(--muted); }
.hlp-tk__btns { display: flex; flex-wrap: wrap; gap: .6rem; }
.hlp-faq { border-top: 1px solid var(--border); }
.hlp-faq:first-of-type { border-top: 0; }
.hlp-faq summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .85rem .3rem; font-weight: 650; cursor: pointer; }
.hlp-faq summary::-webkit-details-marker { display: none; }
.hlp-faq summary .icon { color: var(--muted); transition: transform .2s; flex: none; }
.hlp-faq[open] summary .icon { transform: rotate(180deg); }
.hlp-faq p { margin: 0 .3rem .9rem; color: var(--text-2); line-height: 1.6; }
.hlp-socials { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: .6rem; }
.hlp-soc { display: grid; justify-items: center; gap: .45rem; padding: .85rem .4rem .7rem; border-radius: 16px; background: var(--surface-2); color: var(--text); text-decoration: none; font-size: .85rem; transition: transform .15s; }
.hlp-soc:hover { transform: translateY(-2px); }
.hlp-soc__ic { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; color: #fff; font-weight: 800; background: #64748b; }
.hlp-soc--facebook .hlp-soc__ic { background: #1877f2; } .hlp-soc--instagram .hlp-soc__ic { background: linear-gradient(45deg, #f59e0b, #e11d48 55%, #7c3aed); }
.hlp-soc--tiktok .hlp-soc__ic { background: #111827; box-shadow: inset -2px 0 0 #22d3ee, inset 2px 0 0 #f43f5e; } .hlp-soc--youtube .hlp-soc__ic { background: #dc2626; } .hlp-soc--linkedin .hlp-soc__ic { background: #0a66c2; }
.hlp-app { grid-template-columns: auto 1fr; align-items: center; gap: .9rem; background: linear-gradient(135deg, var(--surface), color-mix(in oklab, var(--brand) 8%, var(--surface))); }
.hlp-app p { margin: .15rem 0 0; color: var(--muted); font-size: .88rem; line-height: 1.5; }
.hlp-foot { display: flex; align-items: center; justify-content: center; gap: .6rem; flex-wrap: wrap; padding: 1rem 0 0; color: var(--muted); }
.hlp-foot img { height: 26px; width: auto; opacity: .85; }
@media (max-width: 820px) {
  .hlp-grid { grid-template-columns: 1fr; }
  .hlp-quick { grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); gap: .6rem; }
  .hlp-q { flex-direction: column; text-align: center; gap: .5rem; padding: .9rem .4rem; }
  .hlp-q__t small, .hlp-q .hlp-go { display: none; }
  .hlp-back span { display: none; }
  .hlp-back { padding: .55rem; }
}
:root[data-theme="dark"] .hlp-art, :root[data-theme="dark"] .hlp-co { background: #f4f5fa; }
.auth__help { display: inline-flex; align-items: center; gap: .5rem; padding: .55rem 1rem; border-radius: 999px; font-size: .88rem; color: var(--text-2); text-decoration: none;
  background: var(--surface); border: 1px solid var(--border); box-shadow: 0 6px 18px -12px rgb(16 24 40 / .35); transition: transform .15s, border-color .15s; }
.auth__help:hover { transform: translateY(-1px); border-color: var(--brand); }
.auth__help .icon:first-child { color: var(--brand-text); }
.auth__help b { color: var(--brand-text); }

/* sign-in side: the floating icons carry the feature's name (wide screens) */
@media (min-width: 901px) {
  .scene { width: min(100%, 560px); height: 320px; }
  .scene__card { z-index: 1; }
  .scene__ic { z-index: 2; width: auto; height: auto; min-height: 46px; padding: 6px 16px 6px 8px; gap: 10px; display: inline-flex; align-items: center; border-radius: 999px; white-space: nowrap; }
  .scene__ic > svg { width: 30px; height: 30px; padding: 6px; border-radius: 50%; background: rgb(255 255 255 / .2); box-sizing: border-box; flex: none; }
  .scene__lb { font-style: normal; font-weight: 700; font-size: .92rem; letter-spacing: .005em; color: #fff; text-shadow: 0 1px 2px rgb(0 0 0 / .18);
    animation: scene-label .6s cubic-bezier(.2, .8, .2, 1) both; }
  .scene__ic--book, .scene__ic--cal { background: rgb(255 255 255 / .2); }
  .scene__ic--cap { left: 0; top: 6%; } .scene__ic--cap .scene__lb { animation-delay: .3s; }
  .scene__ic--book { right: 2%; top: 2%; } .scene__ic--book .scene__lb { animation-delay: .45s; }
  .scene__ic--bell { right: 0; top: 44%; } .scene__ic--bell .scene__lb { animation-delay: .6s; }
  .scene__ic--bell b { right: auto; left: 26px; top: -4px; }
  .scene__ic--cal { left: 0; top: 47%; } .scene__ic--cal .scene__lb { animation-delay: .75s; }
  .scene__ic--wallet { left: 6%; bottom: 2%; } .scene__ic--wallet .scene__lb { animation-delay: .9s; }
  .scene__ic--chat { right: 6%; bottom: 4%; } .scene__ic--chat .scene__lb { animation-delay: 1.05s; }
  .scene__typing { left: 23px; top: 21px; }
}
@media (max-width: 900px) { .scene__lb { display: none; } }
@keyframes scene-label { from { opacity: 0; transform: translateX(-8px); max-width: 0; } to { opacity: 1; transform: none; max-width: 200px; } }
@media (min-width: 901px) {
  .scene__ic::after { content: ""; position: absolute; inset: -5px; border-radius: inherit; box-shadow: 0 0 0 2px rgb(255 255 255 / .75), 0 0 24px 4px rgb(255 255 255 / .35); opacity: 0; pointer-events: none; animation: scene-spot 9s ease-in-out infinite; }
  .scene__ic--book::after { animation-delay: 1.5s; } .scene__ic--bell::after { animation-delay: 3s; } .scene__ic--cal::after { animation-delay: 4.5s; }
  .scene__ic--wallet::after { animation-delay: 6s; } .scene__ic--chat::after { animation-delay: 7.5s; }
}
@keyframes scene-spot { 0%, 20%, 100% { opacity: 0; } 6%, 14% { opacity: 1; } }

/* ---- Make a question paper (Online exams) ---- */
.tabs--sub { border-bottom: 0; margin-bottom: var(--space-2); }
.tabs--sub a { border: 1px solid var(--border); border-radius: 999px; padding: .35rem .9rem; }
.tabs--sub a.is-active { background: var(--brand); border-color: var(--brand); color: #fff; }
.stats-inline { display: flex; flex-wrap: wrap; gap: var(--space-4); margin: 0; }
.stats-inline div { min-width: 6rem; }
.stats-inline dt { font-size: .8rem; color: var(--muted); }
.stats-inline dd { margin: 0; font-size: 1.4rem; font-weight: 700; }
.qp-list { margin: 0; padding-left: 1.4rem; display: grid; gap: .35rem; max-height: 22rem; overflow: auto; }

/* ---- eSchool AI (platform settings) ---- */
.ai-providers { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr)); gap: var(--space-4); }
.ai-provider--main { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand) inset; }
.ai-example { margin: 0; padding: .7rem .9rem; border-radius: 10px; background: var(--info-bg); }
.ai-rules summary { cursor: pointer; }
.ai-points { margin: 0; padding-left: 1.2rem; display: grid; gap: .35rem; }
.ai-attach { display: grid; gap: .25rem; margin: .4rem 0; }
.ai-files { margin-top: .4rem; }
.ai-pics { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: .75rem; }
.ai-pic { margin: 0; width: min(100%, 260px); display: grid; gap: .4rem; }
.ai-pic img { width: 100%; border-radius: 10px; display: block; border: 1px solid var(--border); }
.ai-poster-tools { max-width: 640px; margin: 1rem auto; }
.ai-poster { position: relative; max-width: 640px; margin: 1rem auto; overflow: hidden; border-radius: 6px; background: #111; }
.ai-poster__img { display: block; width: 100%; height: auto; }
.ai-poster__top { position: absolute; inset: 0 0 auto 0; display: flex; align-items: center; gap: .6rem; padding: 3.5% 4.5%; background: linear-gradient(rgba(0, 0, 0, .6), transparent); color: #fff; font-weight: 700; font-size: clamp(.9rem, 2.8vw, 1.35rem); }
.ai-poster__logo { height: 2.4em; width: auto; background: #fff; border-radius: 8px; padding: 3px; }
.ai-poster__text { position: absolute; inset: auto 0 0 0; padding: 20% 6% 6%; background: linear-gradient(transparent, rgba(0, 0, 0, .8)); color: #fff; display: grid; gap: .35em; text-align: center; }
.ai-poster__title { font-size: clamp(1.4rem, 6.5vw, 2.7rem); line-height: 1.15; }
.ai-poster__line { font-size: clamp(.95rem, 3.2vw, 1.35rem); }
@media print { .ai-poster { max-width: 100%; margin: 0; border-radius: 0; } .ai-poster * { -webkit-print-color-adjust: exact; print-color-adjust: exact; } }
.ai-change { margin-top: .75rem; padding: .85rem 1rem; border: 1px solid var(--border); border-left: 4px solid var(--warn, #d97706); border-radius: 12px; background: var(--surface); display: grid; gap: .5rem; }
.ai-change--done { border-left-color: var(--ok, #16a34a); }
.ai-change--cancelled, .ai-change--expired { border-left-color: var(--border); opacity: .8; }
.ai-change__head { display: flex; flex-wrap: wrap; gap: .4rem .6rem; align-items: center; }
.ai-change__form textarea { min-height: 6rem; }
.ai-change__list { display: grid; grid-template-columns: minmax(8rem, max-content) 1fr; gap: .25rem .8rem; margin: 0; font-size: .9rem; }
.ai-change__list dt { color: var(--muted); }
.ai-change__list dd { margin: 0; white-space: pre-wrap; word-break: break-word; }
.ai-pre { white-space: pre-wrap; word-break: break-word; font: inherit; font-size: .88rem; background: var(--surface-2, rgba(127,127,127,.08)); padding: .8rem 1rem; border-radius: 10px; margin: .6rem 0; }
.ai-answer { white-space: normal; line-height: 1.6; padding: 1rem 1.1rem; border-radius: 12px; border: 1px solid var(--border); background: var(--surface-2, rgba(127,127,127,.06)); overflow-wrap: anywhere; }
.stat--col { flex-direction: column; align-items: flex-start; gap: .15rem; }
.ai-bulk { align-items: end; }

/* ---- eSchool AI chat ---- */
.ai-chat { display: grid; grid-template-columns: minmax(14rem, 18rem) minmax(0, 1fr); gap: var(--space-4); align-items: start; }
@media (max-width: 860px) { .ai-chat { grid-template-columns: minmax(0, 1fr); } .ai-chat__side { order: 2; } }
.ai-chat__side { display: grid; gap: .6rem; position: sticky; top: 1rem; }
.ai-chat__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; max-height: 55vh; overflow: auto; }
.ai-chat__list a { display: grid; gap: 1px; padding: .45rem .6rem; border-radius: 8px; text-decoration: none; color: inherit; }
.ai-chat__list a span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; font-size: .9rem; }
.ai-chat__list a small { color: var(--muted); font-size: .75rem; }
.ai-chat__list a:hover, .ai-chat__list a.is-active { background: var(--info-bg); }
.ai-chat__privacy { margin: .4rem 0 0; display: flex; gap: .35rem; align-items: flex-start; }
.ai-chat__main { display: grid; gap: var(--space-3); min-width: 0; }
.ai-chat__title { margin: 0; font-size: 1.1rem; }
.ai-tasks { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr)); gap: .6rem; align-items: start; }
.ai-task { border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.ai-task > summary { cursor: pointer; padding: .7rem .9rem; font-weight: 650; display: flex; gap: .5rem; align-items: center; list-style: none; }
.ai-task > summary::-webkit-details-marker { display: none; }
.ai-task[open] { grid-column: 1 / -1; box-shadow: var(--shadow-sm); }
.ai-task[open] > summary { border-bottom: 1px solid var(--border); }
.ai-task form { padding: .8rem .9rem; }
.ai-msgs { list-style: none; margin: 0; padding: 0; display: grid; gap: .8rem; }
.ai-msg { display: grid; gap: .35rem; max-width: 100%; }
.ai-msg--user { justify-items: end; }
.ai-msg--user .ai-msg__body { background: var(--brand); color: #fff; padding: .65rem .9rem; border-radius: 14px 14px 4px 14px; max-width: min(42rem, 92%); overflow-wrap: anywhere; }
.ai-msg--ai .ai-msg__body { border-radius: 14px 14px 14px 4px; }
.ai-msg__tools { display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; }
.ai-msg__meta { margin-left: auto; }
.ai-report > summary { list-style: none; }
.ai-report > summary::-webkit-details-marker { display: none; }
.ai-report[open] { flex-basis: 100%; }
.ai-report form { margin-top: .4rem; }
.ai-compose { display: grid; gap: .5rem; }
.ai-compose textarea { resize: vertical; min-height: 4.5rem; }
.ai-delete { justify-self: start; }
.ai-answer h1, .ai-answer h2, .ai-answer h3 { font-size: 1.05rem; margin: .8rem 0 .3rem; }
.ai-answer > :first-child { margin-top: 0; }
.ai-answer ul, .ai-answer ol { padding-left: 1.3rem; }
.ai-dots { display: inline-flex; gap: 3px; vertical-align: middle; }
.ai-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--brand); animation: ai-dot 1.2s infinite ease-in-out; }
.ai-dots i:nth-child(2) { animation-delay: .2s; } .ai-dots i:nth-child(3) { animation-delay: .4s; }
@keyframes ai-dot { 0%, 80%, 100% { opacity: .25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
@media (prefers-reduced-motion: reduce) { .ai-dots i { animation: none; } }
.ai-print { max-width: 46rem; margin: 1.5rem auto; padding: 0 1rem; }
.ai-print .ai-answer { border: 0; background: none; padding: 0; }
.btn--ghost { background: transparent; border-color: transparent; color: var(--muted); }
.ai-compose textarea { width: 100%; font: inherit; padding: .7rem .85rem; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: inherit; }
.ai-compose textarea:focus { outline: 2px solid var(--brand); outline-offset: 1px; }
@media (max-width: 560px) { .topbar__ai { display: none; } }
.ai-quick { display: flex; flex-wrap: wrap; gap: .35rem; }
.ai-rate { display: inline-flex; gap: .2rem; }
.ai-rate .btn.is-on, [data-ai-speak].is-on, [data-ai-mic].is-on { background: var(--brand); border-color: var(--brand); color: #fff; }
.ai-voice { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.ai-voice__lang { width: auto; padding: .3rem .5rem; font-size: .85rem; }
[data-ai-mic].is-on { animation: ai-pulse 1.2s infinite; }
@keyframes ai-pulse { 50% { box-shadow: 0 0 0 6px rgba(220, 38, 38, .18); } }
@media (prefers-reduced-motion: reduce) { [data-ai-mic].is-on { animation: none; } }
.ai-table { margin: .6rem 0; }
.ai-table .table { font-size: .92rem; }
/* Marks from photo (exams/marks) */
.marks-photo summary { cursor: pointer; }
.marks-photo .form { margin-top: 10px; }
.marks-photo__files { display: flex; flex-wrap: wrap; gap: 8px; }
.marks-photo__files img { max-height: 160px; max-width: 100%; border-radius: 6px; border: 1px solid var(--border, #ddd); }
tr.is-photo-filled td { background: color-mix(in srgb, #22c55e 9%, transparent); }
tr.is-photo-check td { background: color-mix(in srgb, #eab308 18%, transparent); }
tr.is-photo-kept td { background: color-mix(in srgb, #3b82f6 10%, transparent); }
tr.is-photo-missing td { background: color-mix(in srgb, #94a3b8 14%, transparent); }
.photo-note { color: var(--muted, #555); }
/* Marks sheet for a photo (exams/marks-photo-sheet): A4 portrait */
/* 2.10.565 the mark slip (A4 portrait) */
.mps { position: relative; width: 210mm; max-width: 100%; min-height: 297mm; margin: 0 auto 10mm; padding: 11mm 11mm 9mm; color: #111827; background: #fff; box-sizing: border-box; display: flex; flex-direction: column; font-size: 10pt; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.mps__cont { display: flex; justify-content: space-between; align-items: baseline; gap: 4mm; border-bottom: 2px solid #1e3a8a; padding-bottom: 1.6mm; margin-bottom: 2.5mm; }
.mps__cont b { color: #1e3a8a; font-size: 11pt; } .mps__cont b span { font-weight: 400; color: #6b7280; font-size: 9pt; }
.mps__cont > span { font-size: 8pt; color: #374151; text-align: right; }
.mps__next { text-align: right; font-size: 8.5pt; font-weight: 600; color: #1e3a8a; margin: 1.6mm 0 0; }
.mps__head { display: flex; align-items: center; gap: 3.5mm; border-bottom: 3px double #1e3a8a; padding-bottom: 2.5mm; }
.mps__logo { width: 15mm; height: 15mm; object-fit: contain; flex: none; }
.mps__school { flex: 1; min-width: 0; }
.mps__school h1 { font-size: 15pt; margin: 0; color: #1e3a8a; letter-spacing: .02em; line-height: 1.15; }
.mps__line { font-size: 8.5pt; margin: 1mm 0 0; color: #4b5563; }
.mps__doc { text-align: right; flex: none; max-width: 48%; }
.mps__doc b { display: block; font-size: 13pt; letter-spacing: .35em; color: #1e3a8a; }
.mps__doc span { font-size: 8.5pt; color: #374151; }
.mps__info { margin-top: 3mm; border-collapse: collapse; border: 1.5px solid #1e3a8a; table-layout: fixed; }
.mps__info td { border: 1px solid #cbd5e1; padding: 1.4mm 2.2mm; vertical-align: top; }
.mps__info small { display: block; font-size: 7.5pt; color: #6b7280; }
.mps__info b { display: block; font-size: 10pt; }
.mps__tip { font-size: 7.8pt; color: #4b5563; margin: 2mm 0 1.6mm; }
.mps__table { width: 100%; border-collapse: collapse; font-size: 10pt; table-layout: fixed; }
.mps__table th { background: #1e3a8a; color: #fff; border: 1px solid #1e3a8a; padding: 1.3mm 1.5mm; font-size: 8.5pt; font-weight: 600; text-align: center; vertical-align: middle; }
.mps__table th small { display: block; font-weight: 400; font-size: 7.2pt; opacity: .85; }
.mps__table th.mps__nm { text-align: left; }
.mps__table td { border: 1.2px solid #374151; padding: 0 2mm; height: 8.4mm; vertical-align: middle; }
.mps__table tr { break-inside: avoid; page-break-inside: avoid; }
.mps__repeat th { background: #eef2ff; color: #1e3a8a; font-size: 8pt; }
td.mps__sn { text-align: center; color: #6b7280; font-size: 8pt; }
td.mps__roll { text-align: center; font-size: 13pt; }
.mps__name { font-weight: 600; overflow-wrap: anywhere; line-height: 1.2; }
.mps__table tbody tr:nth-child(even) td.mps__sn, .mps__table tbody tr:nth-child(even) td.mps__roll, .mps__table tbody tr:nth-child(even) td.mps__name { background: #f8fafc; }
td.mps__box { text-align: center; font-size: 12pt; font-weight: 600; }
td.mps__tot { background: #f8fafc; }
td.mps__abs { text-align: center; }
.mps__chk { display: inline-block; width: 4mm; height: 4mm; line-height: 4mm; border: 1.5px solid #374151; border-radius: 1px; font-size: 9pt; font-weight: 700; }
.mps__sum { display: flex; gap: 2.5mm; margin-top: 2.5mm; font-size: 9pt; }
.mps__sum span { flex: 1; border: 1px solid #cbd5e1; border-radius: 1.5mm; padding: 1.5mm 2.5mm; }
.mps__sum b { display: inline-block; min-width: 12mm; border-bottom: 1px solid #374151; margin-left: 2mm; text-align: center; }
.mps__sg { margin-top: auto; padding-top: 14mm; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8mm; font-size: 8.5pt; color: #6b7280; }
.mps__sg span { border-top: 1px solid #374151; padding-top: 1.2mm; text-align: center; }
.mps__sg b { display: block; color: #111827; font-size: 9.5pt; }
.mps__ft { display: grid; grid-template-columns: 1fr auto 1fr; align-items: baseline; gap: 4mm; font-size: 7.5pt; color: #9ca3af; margin: auto 0 0; padding-top: 2mm; }
.mps__ft b { color: #1e3a8a; font-size: 9pt; } .mps__ft span:last-child { text-align: right; }
.mps__sg + .mps__ft { margin-top: 2mm; }
.mps-page + .mps-page { page-break-before: always; break-before: page; }
@page marks-sheet { size: A4 portrait; margin: 7mm; }
@media print { .doc-page { background: #fff; } .mps { page: marks-sheet; margin: 0; width: auto; max-width: none; min-height: 282mm; padding: 6mm 6mm 4mm; } .mps__repeat th { background: #eef2ff !important; } }
@media screen and (max-width: 820px) { .mps { width: 100%; min-height: 0; padding: 8mm 5mm; } .mps__head { flex-wrap: wrap; } .mps__doc { text-align: left; max-width: none; } }
.platform-copy { text-align: center; margin: 24px 0 8px; }
.upload-pieces { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 9999; background: #111827; color: #fff; padding: 10px 16px; border-radius: 10px; font-size: .9rem; box-shadow: 0 6px 24px rgba(0,0,0,.25); max-width: calc(100vw - 32px); }
.lesson-media { display: block; width: 100%; max-width: 860px; margin-top: 8px; border-radius: 8px; background: #000; } audio.lesson-media { background: transparent; }
/* Website › Domains: "Change address" opens its form under the buttons */
.domain-change[open] { flex-basis: 100%; }
.domain-change > summary { list-style: none; display: inline-flex; cursor: pointer; }
.domain-change > summary::-webkit-details-marker { display: none; }
.domain-change[open] > summary { margin-bottom: .75rem; }
.domain-change > form { max-width: 34rem; }
.field[hidden], [data-domain-for][hidden] { display: none; }
/* Two-step sign-in */
.tfa-code { font-size: 1.35rem; letter-spacing: .25em; text-align: center; font-variant-numeric: tabular-nums; }
.tfa-qr { display: flex; justify-content: center; }
.tfa-qr svg { width: 200px; height: 200px; background: #fff; padding: 6px; border-radius: 8px; }
.tfa-key { text-align: center; margin: 0; }
.tfa-key code { font-size: 1.05rem; letter-spacing: .08em; word-break: break-all; }
.tfa-steps { margin: 0; padding-left: 1.2rem; }
.tfa-setup { max-width: 36rem; }
.tfa-codes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem 1.5rem; margin: 0; padding-left: 1.6rem; }
.tfa-codes code { font-size: 1.05rem; letter-spacing: .06em; }
@media (max-width: 480px) { .tfa-codes { grid-template-columns: 1fr; } }
.tfa-link { background: none; border: 0; padding: 0; color: var(--brand-text); text-decoration: underline; cursor: pointer; font: inherit; }
.tfa-roles { display: grid; grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr)); gap: .35rem 1rem; }
.tfa-school > summary { cursor: pointer; padding: .6rem 0; border-bottom: 1px solid var(--line, #e5e7eb); list-style: none; gap: .75rem; flex-wrap: wrap; }
.tfa-school > summary::-webkit-details-marker { display: none; }
.tfa-school[open] > form { padding: .75rem 0 1rem; }
.captcha-stats { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; } .captcha-stats li { display: flex; gap: .75rem; align-items: baseline; } .captcha-stats b { min-width: 3rem; font-size: 1.25rem; text-align: right; }
/* the moving picture pauses while someone is typing in the sign-in form (the computer's power goes to the form and the "I am human" check) */
.auth--typing .auth__side :not(.scene__lb), .auth--typing .auth__side :not(.scene__lb)::before, .auth--typing .auth__side :not(.scene__lb)::after { animation-play-state: paused; } /* app.js adds auth--typing while keys are pressed; the labels' one-time entrance still finishes */

/* ==== eSchool AI as a chat (2.10.128): bubbles, a bird avatar, the box to write in at the bottom; the floating "Ask eSchool AI" button ==== */
.aic { --aic-grad: linear-gradient(135deg, var(--brand), color-mix(in oklab, var(--brand) 62%, #a855f7)); display: flex; flex-direction: column; gap: .8rem;
  height: calc(100dvh - 8.5rem); min-height: 30rem; }
.aic__top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .8rem; }
.aic__brand { display: flex; gap: .8rem; align-items: center; min-width: 0; }
.aic__brand h1 { margin: 0; font-size: 1.35rem; }
.aic__brand p { margin: .1rem 0 0; max-width: 46rem; }
.aic__logo, .aic__av, .aic__hero { display: inline-grid; place-items: center; flex: none; background: transparent; box-shadow: none !important; } /* only the bird */
.aic__logo .abird, .aic__av .abird, .aic__hero .abird { width: 100%; filter: drop-shadow(0 4px 6px rgb(16 24 40 / .2)); }
.aic__logo { width: 46px; height: 46px; } .aic__logo .icon { width: 26px; height: 26px; }
.aic__logo--sm { width: 34px; height: 34px; } .aic__logo--sm .icon { width: 20px; height: 20px; }
.aic__av { width: 36px; height: 36px; margin-bottom: 2px; } .aic__av .icon { width: 19px; height: 19px; }
.aic__hero { width: 120px; height: 106px; margin: 0 auto .6rem; box-shadow: 0 0 0 10px color-mix(in oklab, var(--brand) 12%, transparent), 0 14px 30px -10px color-mix(in oklab, var(--brand) 70%, transparent); }
.aic__hero .icon { width: 42px; height: 42px; }
.aic__wrap { position: relative; flex: 1; min-height: 0; display: grid; grid-template-columns: 17rem minmax(0, 1fr); gap: 1rem; }
.aic__side { display: flex; flex-direction: column; gap: .7rem; min-height: 0; overflow: auto; padding: .9rem; border: 1px solid var(--border); border-radius: 16px; background: var(--surface); }
.aic__side .ai-chat__list { max-height: none; }
.aic__histbtn { display: none; }
.aic__main { display: flex; flex-direction: column; min-width: 0; min-height: 0; border: 1px solid var(--border); border-radius: 18px; overflow: hidden;
  background: color-mix(in oklab, var(--surface) 92%, var(--brand)); }
.aic__alert { margin: .8rem .8rem 0; }
.aic__scroll { flex: 1; min-height: 0; overflow-y: auto; padding: 1.2rem clamp(.8rem, 3vw, 1.6rem); display: flex; flex-direction: column; gap: 1rem; scroll-behavior: smooth; }
.aic__hello { text-align: center; padding: 1.4rem .5rem .4rem; }
.aic__hello h2 { margin: .2rem 0 .2rem; font-size: 1.4rem; }
.aic__hello p { margin: 0; }
.aic__tasks .ai-task { border-radius: 14px; transition: transform .15s ease, box-shadow .15s ease; }
.aic__tasks .ai-task:not([open]):hover { transform: translateY(-2px); box-shadow: 0 10px 22px -14px rgb(16 24 40 / .35); }
.ai-task__ic { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: color-mix(in oklab, var(--brand) 13%, transparent); color: var(--brand); flex: none; }
.aic__or { text-align: center; margin: 0; }
.aic__ctitle { margin: 0 auto; font-size: .82rem; color: var(--muted); padding: .25rem .8rem; border-radius: 999px; background: color-mix(in oklab, var(--surface) 70%, var(--border)); max-width: 90%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.aic .ai-msgs { gap: 1rem; }
.aic .ai-msg { display: flex; gap: .55rem; align-items: flex-end; }
.aic .ai-msg--user { justify-content: flex-end; }
.aic__bub { min-width: 0; overflow-wrap: anywhere; animation: aic-in .25s ease-out both; }
.aic__bub--me { max-width: min(36rem, 85%); padding: .7rem 1rem; border-radius: 20px 20px 6px 20px; color: #fff; background: var(--aic-grad); box-shadow: 0 8px 18px -10px color-mix(in oklab, var(--brand) 80%, transparent); }
.aic .ai-msg--user .ai-msg__body { background: none; padding: 0; border-radius: 0; max-width: none; color: inherit; }
.aic__bub--me .btn { background: rgb(255 255 255 / .18); border-color: transparent; color: #fff; }
.aic__bub--ai { max-width: min(48rem, 92%); padding: .85rem 1.05rem .55rem; border-radius: 20px 20px 20px 6px; background: var(--surface); border: 1px solid var(--border);
  box-shadow: 0 6px 18px -14px rgb(16 24 40 / .45); display: grid; gap: .5rem; }
.aic .ai-msg--ai .ai-msg__body { border: 0; padding: 0; background: none; }
.aic .ai-msg__tools { gap: .15rem; opacity: .7; transition: opacity .15s; border-top: 1px dashed var(--border); padding-top: .35rem; }
.aic .ai-msg:hover .ai-msg__tools, .aic .ai-msg__tools:focus-within { opacity: 1; }
.aic__tool { display: inline-flex; align-items: center; gap: .2rem; min-width: 30px; height: 30px; padding: 0 .4rem; justify-content: center; border-radius: 8px; border: 0; background: transparent;
  color: var(--muted); cursor: pointer; font: inherit; font-size: .85rem; text-decoration: none; list-style: none; }
.aic__tool:hover { background: color-mix(in oklab, var(--brand) 10%, transparent); color: var(--brand); }
.aic__tool.is-on { background: color-mix(in oklab, var(--brand) 16%, transparent); color: var(--brand); }
.aic__tool--txt { font-weight: 700; font-size: .75rem; }
.aic .ai-report > summary::-webkit-details-marker { display: none; }
.aic__chips { display: flex; flex-wrap: wrap; gap: .4rem; padding-left: 2.6rem; }
.aic__chip { border: 1px solid color-mix(in oklab, var(--brand) 35%, var(--border)); background: var(--surface); color: var(--brand); border-radius: 999px; padding: .35rem .8rem;
  font: inherit; font-size: .85rem; font-weight: 600; cursor: pointer; transition: background .15s; }
.aic__chip:hover { background: color-mix(in oklab, var(--brand) 9%, var(--surface)); }
.aic__typing { display: flex; gap: .55rem; align-items: flex-end; }
.aic__typing[hidden] { display: none; }
.aic__compose { padding: .7rem clamp(.7rem, 2.5vw, 1.2rem) .5rem; border-top: 1px solid var(--border); background: var(--surface); display: grid; gap: .4rem; }
.aic__box { display: flex; align-items: flex-end; gap: .35rem; padding: .35rem .4rem .35rem .5rem; border: 1.5px solid var(--border); border-radius: 26px; background: var(--surface);
  box-shadow: 0 4px 14px -10px rgb(16 24 40 / .35); transition: border-color .15s, box-shadow .15s; }
.aic__box:focus-within { border-color: color-mix(in oklab, var(--brand) 60%, var(--border)); box-shadow: 0 0 0 4px color-mix(in oklab, var(--brand) 14%, transparent); }
.aic .aic__box textarea { flex: 1; min-height: 2.5rem; max-height: 11rem; resize: none; border: 0; outline: 0; background: transparent; padding: .55rem .3rem; font: inherit; line-height: 1.45; color: inherit; box-shadow: none; }
.aic .aic__box textarea:focus { outline: 0; }
.aic .aic__box textarea::placeholder { color: color-mix(in oklab, var(--muted) 75%, transparent); }
.aic__iconbtn { display: inline-grid; place-items: center; width: 40px; height: 40px; flex: none; border-radius: 50%; border: 0; background: transparent; color: var(--muted); cursor: pointer; text-decoration: none; list-style: none; }
.aic__iconbtn:hover { background: color-mix(in oklab, var(--brand) 10%, transparent); color: var(--brand); }
.aic__iconbtn.is-on { color: #dc2626; background: rgb(220 38 38 / .1); }
.aic__send { display: inline-grid; place-items: center; width: 42px; height: 42px; flex: none; border-radius: 50%; border: 0; color: #fff; background: var(--aic-grad); cursor: pointer;
  box-shadow: 0 8px 16px -8px color-mix(in oklab, var(--brand) 80%, transparent); transition: transform .12s; }
.aic__send:hover { transform: scale(1.06); }
.aic__send:disabled { opacity: .45; cursor: default; transform: none; }
.aic__meta { margin: 0; text-align: center; font-size: .72rem; }
.aic__voice { padding: 0 .4rem; }
.aic__attach { padding: .3rem .5rem; border-radius: 12px; background: color-mix(in oklab, var(--brand) 6%, var(--surface)); }
.aic .ai-pending-hint { margin: 0; }
.aic .ai-delete { margin: -.4rem 0 0; }
.aic__shade { position: absolute; inset: 0; background: rgb(15 18 35 / .35); z-index: 4; border-radius: 18px; }
.aic__shade[hidden] { display: none; }
@keyframes aic-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .aic__bub { animation: none; } }
/* phones and the panel: the conversations slide in from the side */
@media (max-width: 860px) {
  .aic { height: calc(100dvh - 7.5rem); }
  .aic__wrap { grid-template-columns: minmax(0, 1fr); }
  .aic__histbtn { display: inline-flex; }
  .aic__side { position: absolute; z-index: 5; top: 0; bottom: 0; left: 0; width: min(19rem, 86%); transform: translateX(-105%); transition: transform .22s ease; box-shadow: 0 20px 40px -12px rgb(0 0 0 / .4); }
  .aic.is-hist .aic__side { transform: none; }
}
/* inside the floating panel */
body.embed { margin: 0; background: var(--surface); }
.embed__main { padding: 0; }
.aic--embed { height: 100dvh; min-height: 0; gap: 0; }
.aic--embed .aic__wrap { grid-template-columns: minmax(0, 1fr); gap: 0; }
.aic--embed .aic__main { border: 0; border-radius: 0; }
.aic--embed .aic__side { position: absolute; z-index: 5; top: 0; bottom: 0; left: 0; width: min(18rem, 86%); border-radius: 0; transform: translateX(-105%); transition: transform .22s ease; box-shadow: 0 20px 40px -12px rgb(0 0 0 / .4); }
.aic--embed.is-hist .aic__side { transform: none; }
.aic--embed .aic__shade { border-radius: 0; }
.aic__bar { display: flex; align-items: center; gap: .3rem; padding: .5rem .5rem; color: #fff; background: var(--aic-grad); }
.aic__bar .aic__iconbtn { color: #fff; width: 36px; height: 36px; }
.aic__bar .aic__iconbtn:hover { background: rgb(255 255 255 / .16); color: #fff; }
.aic__bar .aic__logo { background: transparent; box-shadow: none; } .aic__bar .aic__logo .abird { filter: drop-shadow(0 2px 3px rgb(0 0 0 / .25)); }
.aic__bartitle { flex: 1; min-width: 0; display: grid; line-height: 1.15; margin-left: .2rem; }
.aic__bartitle small { opacity: .85; font-size: .72rem; }
.aic__more { position: relative; }
.aic__more > summary::-webkit-details-marker { display: none; }
.aic__menu { position: absolute; right: 0; top: 40px; z-index: 6; min-width: 13rem; padding: .3rem; border-radius: 12px; background: var(--surface); color: var(--text, inherit); border: 1px solid var(--border); box-shadow: 0 16px 32px -12px rgb(0 0 0 / .35); }
.aic__menu button { display: block; width: 100%; text-align: left; padding: .55rem .7rem; border: 0; border-radius: 8px; background: transparent; font: inherit; color: inherit; cursor: pointer; }
.aic__menu button:hover { background: color-mix(in oklab, var(--brand) 9%, transparent); }
.aic--embed .aic__scroll { padding: 1rem .8rem; }
.aic--embed .aic__hello { padding-top: .6rem; }
.aic--embed .aic__tasks { grid-template-columns: minmax(0, 1fr); }

/* the floating "Ask eSchool AI" button and its panel (every page; drag it to the left or right side) */
.ailx__fab { position: fixed; z-index: 950; right: 20px; bottom: 24px; width: 72px; height: 64px; border-radius: 0; border: 0; padding: 0; cursor: grab; touch-action: none;
  background: transparent; display: grid; place-items: center; transition: transform .15s ease, bottom .25s ease; } /* glides up out of the way of the page's buttons */
.ailx__bird { width: 72px; filter: drop-shadow(0 8px 10px rgb(16 24 40 / .28)); } /* only the bird: no circle behind it */
.ailx__fab:focus-visible { outline: 3px solid color-mix(in oklab, var(--brand) 55%, transparent); outline-offset: 2px; border-radius: 14px; }
.ailx__fab:hover { transform: scale(1.06); }
.ailx__fab:active { cursor: grabbing; }
.ailx__fab .icon { width: 30px; height: 30px; }
.ailx__fab.is-drag { transition: none; transform: scale(1.08); }
.ailx__fab.is-open { transform: rotate(-8deg) scale(.95); }
.ailx__tip { position: absolute; right: calc(100% + 10px); top: 50%; transform: translateY(-50%) translateX(6px); white-space: nowrap; padding: .4rem .75rem; border-radius: 999px; font-size: .85rem; font-weight: 650;
  color: var(--text, #1f2340); background: var(--surface); box-shadow: 0 10px 24px -12px rgb(16 24 40 / .45); opacity: 0; pointer-events: none; transition: opacity .15s, transform .15s; }
.ailx--left .ailx__tip { right: auto; left: calc(100% + 10px); transform: translateY(-50%) translateX(-6px); }
.ailx__fab:hover .ailx__tip, .ailx__fab:focus-visible .ailx__tip { opacity: 1; transform: translateY(-50%); }
.ailx__fab.is-drag .ailx__tip, .ailx__fab.is-open .ailx__tip { opacity: 0; }
.ailx__ping { display: none; position: absolute; inset: 0; border-radius: 50%; border: 2px solid color-mix(in oklab, var(--brand) 60%, transparent); animation: ailx-ping 2.6s ease-out 1.2s 3; pointer-events: none; }
@keyframes ailx-ping { from { transform: scale(1); opacity: .8; } to { transform: scale(1.6); opacity: 0; } }
.ailx__panel { position: fixed; z-index: 949; right: 20px; bottom: 20px; width: min(410px, calc(100vw - 24px)); height: min(680px, calc(100dvh - 40px)); border-radius: 20px; overflow: hidden;
  background: var(--surface); border: 1px solid var(--border); box-shadow: 0 30px 70px -20px rgb(16 24 40 / .5); transform-origin: bottom right; animation: ailx-open .2s ease-out both; }
.ailx--left .ailx__panel { right: auto; left: 20px; transform-origin: bottom left; }
.ailx__panel[hidden] { display: none; }
.ailx__panel iframe { width: 100%; height: 100%; border: 0; display: block; }
.ailx__loading { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); }
@keyframes ailx-open { from { opacity: 0; transform: translateY(12px) scale(.96); } to { opacity: 1; transform: none; } }
@media (max-width: 600px) {
  .ailx__fab { width: 54px; height: 54px; }
  .ailx__panel, .ailx--left .ailx__panel { inset: 0; width: 100%; height: 100dvh; border-radius: 0; border: 0; }
  .ailx__tip { display: none; }
}
@media (prefers-reduced-motion: reduce) { .ailx__ping, .ailx__panel { animation: none; } }
@media print { .ailx__fab, .ailx__panel { display: none !important; } }
.aic [hidden] { display: none !important; } /* the speech bar, the file box, "show the button again" … stay hidden until asked */
.ailx__fab.is-open { display: none; } /* while the panel is open the bird steps aside (the panel has its own ✕); it comes back on close */

/* ==== eSchool AI's bird (2.10.131): one still picture, or three layers whose wings flap from the shoulders ==== */
.abird { display: inline-block; width: 100%; height: auto; aspect-ratio: 256 / 225; vertical-align: middle; user-select: none; -webkit-user-drag: none; pointer-events: none; }
span.abird { position: relative; }
.abird img { position: absolute; inset: 0; width: 100%; height: 100%; -webkit-user-drag: none; }
.abird__w--l { transform-origin: 40.9% 58.7%; }
.abird__w--r { transform-origin: 71.9% 59.7%; }
.abird--flap { animation: abird-bob 1.2s ease-in-out infinite; }
.abird--flap .abird__w--l { animation: abird-l .6s ease-in-out infinite; }
.abird--flap .abird__w--r { animation: abird-r .6s ease-in-out infinite; }
.abird--fast .abird__w--l, .abird--fast .abird__w--r { animation-duration: .32s; }
@keyframes abird-l { 0%, 100% { transform: rotate(-8deg); } 50% { transform: rotate(24deg); } }
@keyframes abird-r { 0%, 100% { transform: rotate(8deg); } 50% { transform: rotate(-24deg); } }
@keyframes abird-bob { 0%, 100% { transform: translateY(2%); } 50% { transform: translateY(-5%); } }
@media (prefers-reduced-motion: reduce) { .abird--flap, .abird--flap .abird__w { animation: none !important; } }

/* eSchool AI's box: one round button — the microphone while empty, Send with words, ✓ while listening (2.10.132) */
.aic__send .aic__i-mic, .aic__send .aic__i-done { display: none; }
.aic__send.is-mic .aic__i-send, .aic__send.is-rec .aic__i-send { display: none; }
.aic__send.is-mic .aic__i-mic { display: block; }
.aic__send.is-rec .aic__i-done { display: block; }
.aic__send.is-rec { background: #e5484d; animation: aic-ring 1.4s infinite; }
@keyframes aic-ring { 0% { box-shadow: 0 0 0 0 rgb(229 72 77 / .45); } 70% { box-shadow: 0 0 0 12px rgb(229 72 77 / 0); } 100% { box-shadow: 0 0 0 0 rgb(229 72 77 / 0); } }
.aic__rec { display: flex; align-items: center; gap: .6rem; margin: 0 .25rem .5rem; padding: .35rem; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); box-shadow: 0 8px 22px -14px rgb(16 24 40 / .45); }
.aic__rec[hidden] { display: none; }
.aic__rec-x { display: grid; place-items: center; width: 34px; height: 34px; flex: none; border: 0; border-radius: 50%; background: color-mix(in oklab, var(--text, #1f2340) 8%, transparent); color: var(--muted); cursor: pointer; }
.aic__rec-x .icon { width: 16px; height: 16px; }
.aic__rec-t { flex: 1; min-width: 0; font-size: .88rem; font-weight: 600; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.aic__wave { display: inline-flex; align-items: center; gap: 3px; height: 24px; flex: none; }
.aic__wave i { width: 4px; height: 20px; border-radius: 4px; background: #e5484d; animation: aic-wave 1s infinite ease-in-out; }
.aic__wave i:nth-child(2) { animation-delay: .15s; } .aic__wave i:nth-child(3) { animation-delay: .3s; } .aic__wave i:nth-child(4) { animation-delay: .45s; }
.aic__wave i:nth-child(5) { animation-delay: .3s; } .aic__wave i:nth-child(6) { animation-delay: .15s; } .aic__wave i:nth-child(7) { animation-delay: .05s; }
@keyframes aic-wave { 0%, 100% { transform: scaleY(.3); } 50% { transform: scaleY(1); } }
.aic__lang { height: 30px; padding: 0 .8rem; flex: none; border-radius: 999px; border: 1px solid color-mix(in oklab, var(--brand) 35%, var(--border)); background: color-mix(in oklab, var(--brand) 10%, transparent); color: var(--brand); font-weight: 700; font-size: .82rem; cursor: pointer; }
.aic__rec.is-err .aic__wave, .aic__rec.is-err .aic__lang { display: none; }
.aic__rec.is-err .aic__rec-t { color: #c2410c; white-space: normal; }
.aic__compose.is-listening .aic__box { border-color: rgb(229 72 77 / .55); box-shadow: 0 0 0 4px rgb(229 72 77 / .12); }
@media (prefers-reduced-motion: reduce) { .aic__wave i, .aic__send.is-rec { animation: none; } }
/* Platform › Schools' apps (2.10.136) */
.sapp-previews figure { margin: 0; text-align: center; }
.sapp-previews img { display: block; filter: drop-shadow(0 4px 10px rgb(16 24 40 / .28)); margin: 0 auto .3rem; }
.sapp-color { width: 4.5rem !important; height: 2.6rem; padding: .2rem !important; }
.sapp-share { display: flex; gap: 1rem; align-items: flex-start; flex-wrap: wrap; }
.sapp-qr { flex: none; background: #fff; padding: .4rem; border-radius: .6rem; border: 1px solid var(--border); }
.sapp-qr svg { display: block; width: 160px; height: 160px; }
.sapp-share .stack { flex: 1; min-width: 14rem; }
.sapp-card { margin: 0; flex: none; display: flex; flex-direction: column; align-items: center; gap: .45rem; padding: .8rem .8rem .7rem; background: #fff; color: #101828;
  border: 1px solid var(--border); border-radius: .8rem; border-top: 4px solid var(--brand, #4f46e5); width: 13.5rem; text-align: center; }
.sapp-card .sapp-qr { border: 0; padding: 0; }
.sapp-card__icon { border-radius: .7rem; }
.sapp-prints code { overflow-wrap: anywhere; font-size: .78rem; }
.sapp-steps { margin: 0; padding-left: 1.3rem; display: grid; gap: .3rem; }
.sapp-card figcaption { display: flex; flex-direction: column; gap: .1rem; line-height: 1.3; }
.sapp-card figcaption b { font-size: .95rem; overflow-wrap: anywhere; }
.sapp-card figcaption span { font-size: .8rem; color: #475467; }

/* Privacy policy and account deletion pages (public) */
.legal { width: min(760px, 100%); line-height: 1.6; }
.legal--form { width: min(560px, 100%); }
.legal h1 { font-size: 1.6rem; margin: 0 0 .6rem; }
.legal h2 { font-size: 1.1rem; margin: 1.4rem 0 .4rem; }
.legal ul { padding-left: 1.3rem; margin: .4rem 0; }
.legal li { margin: .2rem 0; }
.legal a { overflow-wrap: anywhere; }
.legal__box { background: var(--surface-2, #f8fafc); border: 1px solid var(--border); border-radius: 12px; padding: .7rem 1rem; margin: .8rem 0 1rem; }
.legal__box p { margin: 0; }
.legal__foot { margin-top: 1.4rem; border-top: 1px solid var(--border); padding-top: .8rem; }

/* Platform › Accounts */
.acc-stats .stat { flex-direction: column; align-items: flex-start; gap: .2rem; }
.acc-stats strong { font-size: 1.35rem; }
.acc-in { color: var(--success, #027a48); }
.acc-out { color: var(--danger, #b42318); }
.acc-bar-col { width: 32%; min-width: 120px; }
.acc-bar { display: block; height: 6px; border-radius: 3px; margin: 2px 0; min-width: 2px; }
.acc-bar--in { background: var(--success, #12b76a); }
.acc-bar--out { background: var(--danger, #f04438); }
.acc-head-form input[name=name] { min-width: 12rem; }
.card--flush > .card__title { padding: .9rem 1rem .5rem; margin: 0; font-size: 1rem; }
.card--flush > .pad { padding: 0 1rem 1rem; margin: 0; }

/* Full screen: the LMS shown in a full-screen frame so pages can change without leaving full screen (app.js) */
.fs-shell { position: fixed; inset: 0; z-index: 2147483000; background: var(--bg, #fff); }
.fs-shell iframe { display: block; width: 100%; height: 100%; border: 0; }
html.fs-open, html.fs-open body { overflow: hidden; }

/* Optional subjects: a student who has not chosen yet */
.table tr.is-warn > td { background: var(--warn-bg); }
/* Class subjects: "Choice" / "takes" only for the subjects ticked Optional */
.table tr:not(:has(.opt-tick:checked)) .opt-more > * { visibility: hidden; }
.opt-more { white-space: nowrap; }
/* Class subjects: add a subject (a new one's name only when "new" is chosen) */
.cs-add { display: flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: flex-end; }
.cs-add .field { margin: 0; }
.cs-add:not(:has(#cs-sub option[value="new"]:checked)) .cs-new { display: none; }
.cs-add .cs-pick { min-width: 15rem; }
/* Marks scheme: the class chooser and "bring from another class" side by side */
.scheme-pick { display: flex; flex-wrap: wrap; gap: .75rem 2.5rem; align-items: flex-end; }
.scheme-pick__form { display: flex; flex-wrap: wrap; gap: .5rem; align-items: flex-end; }
.scheme-pick .field { margin: 0; min-width: 12rem; }
[data-scheme-form] .table .actions { justify-content: flex-start; }
/* marks entry head, as on a marks sheet: part › piece › full / pass marks */
.marks-sheet thead th { vertical-align: bottom; text-align: center; border: 1px solid var(--border); }
.marks-sheet thead th.mk-group { text-transform: uppercase; letter-spacing: .03em; border-bottom: 0; }
.marks-sheet .mk-name { display: block; text-transform: uppercase; font-weight: 700; margin-bottom: .3rem; white-space: nowrap; }
.marks-sheet .mk-fp { display: inline-grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--border-strong); border-radius: 6px; overflow: hidden; min-width: 8.5rem; }
.marks-sheet .mk-fp > span { display: flex; flex-direction: column; align-items: center; padding: .15rem .4rem; }
.marks-sheet .mk-fp > span + span { border-left: 1px solid var(--border-strong); }
.marks-sheet .mk-fp small { font-size: .62rem; font-weight: 600; text-transform: uppercase; color: var(--text-muted, inherit); white-space: nowrap; }
.marks-sheet .mk-fp b { font-size: .9rem; color: var(--text); }
.marks-sheet .mk-sum .mk-fp { background: color-mix(in srgb, var(--brand, #4f46e5) 6%, transparent); }
.marks-sheet tbody td, .marks-sheet tbody td.num { text-align: center; }
.marks-sheet tbody td:nth-child(2) { text-align: left; }
/* marks entry: "Delete all marks of this subject" at the top right */
.marks-top { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding-bottom: 0; }
/* marks entry: an absent student's boxes, greyed out */
input.is-absent { background: var(--surface-2, #eef0f4) !important; color: var(--text-muted, #8a90a0) !important; box-shadow: inset 0 1px 3px rgba(0,0,0,.12); cursor: not-allowed; opacity: .7; }
/* a mark above the full marks: red box and the message under it */
input.is-over { border-color: var(--danger, #dc2626) !important; background: color-mix(in srgb, var(--danger, #dc2626) 8%, var(--surface)); }
.over-tip { display: block; margin-top: .25rem; color: var(--danger, #dc2626); font-size: .78rem; font-weight: 600; white-space: nowrap; }
[data-scheme-form] td.nowrap { min-width: 15rem; }
[data-scheme-form] .scheme-none { min-width: 15rem; text-align: center; }
/* Marks scheme: the school's parts (Theory, Practical …) */
.scheme-parts { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .75rem; }
.scheme-parts__label { font-weight: 600; display: inline-flex; align-items: center; gap: .35rem; }
.scheme-parts__chip { display: inline-flex; align-items: center; gap: .25rem; }
.scheme-parts__chip input.scheme-order, .scheme-order { width: 3.2rem; text-align: center; }
.scheme-parts__chip input { width: 9rem; min-height: 34px; padding: .3rem .5rem; border: 1px solid var(--border-strong); border-radius: 8px; background: var(--surface); color: var(--text); font: inherit; }
/* Exam form: "Every subject out of [50]" */
.exam-marks .check { display: flex; align-items: center; gap: .5rem; margin: .25rem 0; }
.exam-marks .check input[name="marks_total"] { width: 6rem; }
.select-search { margin-bottom: .35rem; }
/* Class subjects page */
.class-subjects .cs-kind { white-space: nowrap; }
.class-subjects .cs-kind label + label { margin-left: .9rem; }
/* Stream form: type, set and marks only for the ticked subjects; set only for optional ones */
.stream-subjects tr:not(:has(.ss-in:checked)) .ss-more > * { visibility: hidden; }
.stream-subjects tr:not(:has(.ss-kind option[value="optional"]:checked)) .ss-opt > * { visibility: hidden; }
.stream-subjects .ss-opt { white-space: nowrap; min-width: 15rem; }
.stream-subjects .ss-opt select + select { margin-left: .35rem; }
.opt-more select + select { margin-left: .35rem; }
/* Students' optional subjects: one column per subject, "All" and the count in its heading */
.opt-grid th.opt-col, .opt-grid td.opt-col { text-align: center; white-space: nowrap; }
.opt-grid th.opt-col .opt-col__name { display: block; }
.opt-grid th.opt-col .opt-col__tools { display: inline-flex; gap: .35rem; align-items: center; margin-top: .25rem; font-weight: 400; text-transform: none; }
.opt-grid td.opt-col input { width: 1.15rem; height: 1.15rem; }
.opt-grid th.opt-col--first, .opt-grid td.opt-col--first { border-left: 2px solid var(--border); }
.subject-ticks { list-style: none; margin: 0 0 var(--space-3); padding: 0; display: flex; flex-wrap: wrap; gap: .4rem .9rem; }
.subject-ticks li span[aria-hidden] { color: var(--ok); font-weight: 700; }
.role-menu__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: var(--space-3); }
.role-menu__group { margin: .4rem 0 .1rem; font-weight: 600; }
.role-menu__item[hidden], .role-menu [hidden] { display: none !important; }
.role-menu__grid { align-items: start; }
.role-menu .perm-group { display: flex; flex-direction: column; gap: .15rem; justify-content: flex-start; height: auto; }

/* Attachments book viewer */
.docview { position: relative; overflow: hidden; }
.docview__bar { display: flex; align-items: center; gap: .5rem; padding: .5rem .75rem; border-bottom: 1px solid var(--border); position: sticky; top: 0; background: var(--surface, var(--bg)); z-index: 2; }
.docview__pages { display: flex; flex-direction: column; align-items: center; gap: .75rem; padding: .75rem; background: var(--bg-muted, #eef0f6); max-height: 80vh; overflow: auto; }
.docview__page, .docview__pages canvas { max-width: 100%; background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.15); }
.docview__media { position: relative; background: #000; }
.docview__media video { display: block; width: 100%; max-height: 80vh; }
.docview--embed { position: relative; }
.docview__mark { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 3; user-select: none; }
.docview__mark span { position: absolute; left: 50%; top: 45%; transform: translate(-50%, -50%) rotate(-12deg); text-align: center; white-space: nowrap;
  color: rgba(255,255,255,.42); font-weight: 700; font-size: clamp(12px, 2.4vw, 22px); line-height: 1.3; text-shadow: 0 0 3px rgba(0,0,0,.6);
  transition: left 1.2s ease, top 1.2s ease; }
.docview__mark--light span { color: rgba(255,255,255,.26); }
.docview__mark--dark span { color: rgba(255,255,255,.62); }
.fieldset-plain { border: 0; padding: 0; margin: 0 0 var(--space-3, 1rem); min-width: 0; }
.fieldset-plain legend { padding: 0; margin-bottom: .4rem; }
.docview__logo { position: absolute; top: 10px; right: 12px; width: clamp(36px, 9%, 90px); height: auto; z-index: 3; pointer-events: none; user-select: none; opacity: .5; }
.docview__logo--light { opacity: .3; }
.docview__logo--dark { opacity: .7; }
.docview-set__logo { object-fit: contain; }
.docview__bar--end { justify-content: flex-end; border-bottom: 0; border-top: 1px solid var(--border); }
.docview__media:fullscreen { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; }
.docview__media:fullscreen video { max-height: 100vh; height: 100%; }
.docview__media:fullscreen .video { width: min(100vw, 177.78vh); margin: 0; border-radius: 0; }
.docview__media.is-full { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; }
.docview__media.is-full video { max-height: 100vh; height: 100%; }
.docview__media.is-full .video { width: min(100vw, 177.78vh); margin: 0; border-radius: 0; }
.docview__media.is-full::after { content: "✕"; position: absolute; top: 10px; right: 14px; color: #fff; font-size: 22px; pointer-events: none; }
.docview-full-open, .docview-full-open body { overflow: hidden; }
.docview__text { white-space: pre-wrap; max-height: 80vh; overflow: auto; margin: 0; }
.docview-protected [data-docview] { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
@media print { .docview-protected body * { visibility: hidden !important; } .docview-protected body::after { content: "Printing is turned off for this material."; visibility: visible; } }
/* Fonepay QR payment page */
.qrpay { max-width: 520px; }
.qrpay__amount { font-size: 1.15rem; margin: 0 0 .75rem; }
.qrpay__code { display: flex; justify-content: center; padding: .5rem; background: #fff; border-radius: var(--radius, 8px); }
.qrpay__code svg { width: min(280px, 100%); height: auto; }
.qrpay__steps { margin: .75rem 0; padding-left: 1.25rem; }
/* Paying: online / offline choice */
.paychoice { display: grid; gap: .75rem; }
.paychoice__pick { display: grid; gap: .6rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.paychoice__opt { display: flex; gap: .75rem; align-items: flex-start; text-align: left; padding: .85rem 1rem; border: 1px solid var(--border); border-radius: var(--radius, 10px);
  background: var(--surface, #fff); color: inherit; cursor: pointer; font: inherit; }
.paychoice__opt:hover, .paychoice__opt:focus-visible { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft, rgba(37,99,235,.15)); }
.paychoice__opt > span:last-child { display: grid; gap: .15rem; }
.paychoice__opt--main { border-color: var(--brand); background: var(--brand-soft, #eef3ff); }
.paychoice__icon { flex: none; display: inline-flex; width: 2rem; height: 2rem; align-items: center; justify-content: center; border-radius: 50%; background: var(--surface, #fff); }
.paychoice__when { color: var(--muted, #6b7280); }
.paychoice__panel { display: grid; gap: .6rem; }
.paychoice__panel[hidden] { display: none; }
.paychoice__back { justify-self: start; }
/* Admission › Multi class */
.mc-chip { display: inline-flex; align-items: center; gap: .15rem; margin: 0 .35rem .25rem 0; }
.mc-add select { max-width: 9rem; }
/* Student profile: the whole record (summary strip) */
.srec-sum { display: grid; gap: .6rem; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); margin-bottom: var(--space-3, 1rem); }
a.srec-sum__item { text-decoration: none; color: inherit; }
a.srec-sum__item:hover { box-shadow: 0 0 0 2px var(--brand-soft, rgba(37,99,235,.2)); }
.table__group th { background: var(--bg-muted, #f3f4f8); text-align: left; font-weight: 600; }


/* Profiles: "needs attention" and the timeline */
.profile-alerts { border: 1px solid var(--border); border-radius: var(--radius, 12px); background: var(--surface); padding: var(--space-3) var(--space-4); margin-bottom: var(--space-4); }
.profile-alerts__title { display: flex; align-items: center; gap: .4rem; font-size: 1rem; margin: 0 0 var(--space-2); }
.profile-alerts ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.profile-alerts__item { display: inline-flex; align-items: center; gap: .35rem; padding: .3rem .65rem; border-radius: 999px; font-size: .875rem; background: var(--info-bg); color: var(--info); }
.profile-alerts__item a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.profile-alerts__item--warn { background: var(--warn-bg); color: var(--warn); }
.profile-alerts__item--err { background: var(--err-bg); color: var(--err); font-weight: 600; }
.tl { list-style: none; margin: 0; padding: 0; position: relative; }
.tl::before { content: ""; position: absolute; left: 13px; top: 6px; bottom: 6px; width: 2px; background: var(--border); }
.tl__item { display: flex; gap: var(--space-3); padding: .4rem 0; position: relative; }
.tl__item p { margin: 0; }
.tl__icon { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); border: 2px solid var(--border); color: var(--muted); z-index: 1; }
.tl__item--ok .tl__icon { border-color: var(--ok); color: var(--ok); }
.tl__item--warn .tl__icon { border-color: var(--warn); color: var(--warn); }
.tl__item--err .tl__icon { border-color: var(--err); color: var(--err); }
@media print {
  .profile-print [data-tabs] > .tabs, .profile-print .page-head .btn, .profile-print .profile-actions { display: none !important; }
  .profile-print [data-tabs] > [data-tab] { display: block !important; break-inside: auto; }
  .profile-print .card, .profile-print .stat, .profile-print tr { break-inside: avoid; }
  .profile-print [data-tabs] > [data-tab]::before { content: attr(data-tab); display: block; font-weight: 700; font-size: 1.1rem; margin: 1rem 0 .4rem; border-bottom: 1px solid #999; }
  .profile-print form, .profile-print details { display: none !important; }
}

/* Needs attention: hero strip, subscription card, group chips, icon tiles, collapsible lists */
.att { --att-c: var(--info); --att-bg: var(--info-bg); display: grid; gap: var(--space-5); }
.att-hero { display: flex; flex-wrap: wrap; gap: var(--space-4); align-items: center; justify-content: space-between; padding: var(--space-5);
  border-radius: var(--radius-lg); border: 1px solid var(--border); box-shadow: var(--shadow);
  background: radial-gradient(120% 140% at 0% 0%, var(--brand-soft) 0%, transparent 55%), var(--surface); }
.att-hero--clear { background: radial-gradient(120% 140% at 0% 0%, var(--ok-bg) 0%, transparent 60%), var(--surface); }
.att-hero__text { display: flex; gap: var(--space-4); align-items: center; flex: 1 1 320px; min-width: 0; }
.att-hero__text h1 { margin: 0 0 .2rem; }
.att-hero__text p { margin: 0; color: var(--text-2); max-width: 60ch; }
.att-hero__icon { flex: none; display: grid; place-items: center; width: 3.25rem; height: 3.25rem; border-radius: 1rem; background: var(--brand); color: var(--brand-ink); box-shadow: 0 8px 22px rgb(79 70 229 / .28); }
.att-hero--clear .att-hero__icon { background: var(--ok); box-shadow: none; }
.att-hero__icon .icon { width: 1.6rem; height: 1.6rem; }
.att-hero__stats { display: grid; grid-template-columns: repeat(4, minmax(5.5rem, 1fr)); gap: var(--space-2); flex: 1 1 380px; }
.att-pill { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: .45rem; align-items: center; padding: .6rem .75rem; border-radius: var(--radius); background: var(--att-bg); color: var(--att-c); }
.att-pill .icon { grid-row: span 2; width: 1.15rem; height: 1.15rem; }
.att-pill strong { font-size: 1.35rem; line-height: 1.1; }
.att-pill span { font-size: .78rem; color: var(--text-2); }
.att-pill--err { --att-c: var(--err); --att-bg: var(--err-bg); } .att-pill--warn { --att-c: var(--warn); --att-bg: var(--warn-bg); }
.att-pill--info { --att-c: var(--info); --att-bg: var(--info-bg); } .att-pill--ok { --att-c: var(--ok); --att-bg: var(--ok-bg); }

.att-plan { --att-c: var(--ok); --att-bg: var(--ok-bg); display: grid; grid-template-columns: minmax(0, 1.4fr) auto minmax(0, 1.2fr) auto; gap: var(--space-4) var(--space-5); align-items: center;
  padding: var(--space-4) var(--space-5); background: var(--surface); border: 1px solid var(--border); border-left: 5px solid var(--att-c); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }
.att-plan--warn { --att-c: var(--warn); --att-bg: var(--warn-bg); } .att-plan--err { --att-c: var(--err); --att-bg: var(--err-bg); }
.att-plan__main { display: flex; gap: var(--space-3); align-items: center; min-width: 0; }
.att-plan__icon { flex: none; display: grid; place-items: center; width: 2.75rem; height: 2.75rem; border-radius: .85rem; background: var(--att-bg); color: var(--att-c); }
.att-plan__icon .icon { width: 1.35rem; height: 1.35rem; }
.att-plan__name { margin: .1rem 0; font-size: 1.15rem; display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.att-plan__end { margin: 0; color: var(--text-2); font-size: .9rem; }
.att-plan__days { text-align: center; padding: .5rem .9rem; border-radius: var(--radius); background: var(--att-bg); color: var(--att-c); min-width: 5.5rem; }
.att-plan__days strong { display: block; font-size: 1.8rem; line-height: 1; }
.att-plan__days span { font-size: .75rem; }
.att-plan__usage { display: grid; gap: .5rem; min-width: 0; }
.att-meter__top { display: flex; justify-content: space-between; gap: .5rem; font-size: .8rem; color: var(--text-2); }
.att-meter__bar { height: .45rem; border-radius: 99px; background: var(--surface-3); overflow: hidden; margin-top: .2rem; }
.att-meter__bar span { display: block; height: 100%; border-radius: inherit; background: var(--brand); }
.att-meter--warn .att-meter__bar span { background: var(--warn); } .att-meter--err .att-meter__bar span { background: var(--err); }

.att-jump { position: sticky; top: calc(var(--topbar-h) + .25rem); z-index: 5; display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; padding: .5rem; border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: blur(8px); border: 1px solid var(--border); box-shadow: var(--shadow-sm); }
.att-jump__chip { display: inline-flex; align-items: center; gap: .35rem; padding: .35rem .75rem; border-radius: 999px; text-decoration: none; color: var(--text); background: var(--surface-2); font-size: .88rem; }
.att-jump__chip:hover { background: var(--brand-soft); color: var(--brand-text); }
.att-jump__chip span { min-width: 1.4rem; padding: 0 .4rem; border-radius: 999px; text-align: center; background: var(--brand); color: var(--brand-ink); font-size: .75rem; font-weight: 600; }
.att-jump__chip.is-clear span { background: var(--ok-bg); color: var(--ok); }
.att-jump__tools { margin-left: auto; display: inline-flex; gap: .25rem; }

.att-group { display: grid; gap: var(--space-3); scroll-margin-top: calc(var(--topbar-h) + 4rem); }
.att-group__title { display: flex; align-items: center; gap: .55rem; margin: 0; font-size: 1.1rem; }
.att-group__icon { display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: .6rem; background: var(--brand-soft); color: var(--brand-text); }
.att-group__icon .icon { width: 1.05rem; height: 1.05rem; }
.att-tiles { display: grid; gap: var(--space-3); grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.att-tile { --att-c: var(--info); --att-bg: var(--info-bg); position: relative; display: flex; gap: var(--space-3); align-items: flex-start; padding: var(--space-4); border-radius: var(--radius-lg);
  background: var(--surface); border: 1px solid var(--border); color: inherit; text-decoration: none; overflow: hidden; transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease; }
.att-tile::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--att-c); }
.att-tile:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--att-c); }
.att-tile--err { --att-c: var(--err); --att-bg: var(--err-bg); } .att-tile--warn { --att-c: var(--warn); --att-bg: var(--warn-bg); }
.att-tile--ok { --att-c: var(--ok); --att-bg: var(--ok-bg); opacity: .75; pointer-events: none; }
.att-tile--ok::before { opacity: .5; }
.att-tile__icon { flex: none; display: grid; place-items: center; width: 2.6rem; height: 2.6rem; border-radius: .8rem; background: var(--att-bg); color: var(--att-c); }
.att-tile__icon .icon { width: 1.3rem; height: 1.3rem; }
.att-tile__body { display: grid; gap: .1rem; min-width: 0; }
.att-tile__count { font-size: 1.6rem; font-weight: 700; line-height: 1.1; color: var(--att-c); }
.att-tile--ok .att-tile__count { font-size: 1.1rem; }
.att-tile__title { font-weight: 600; }
.att-tile__hint { font-size: .8rem; color: var(--muted); }
.att-tile__total { margin-top: .2rem; font-weight: 600; color: var(--text-2); font-size: .9rem; }

.att-list { --att-c: var(--info); --att-bg: var(--info-bg); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; scroll-margin-top: calc(var(--topbar-h) + 4rem); }
.att-list--err { --att-c: var(--err); --att-bg: var(--err-bg); } .att-list--warn { --att-c: var(--warn); --att-bg: var(--warn-bg); }
.att-list > summary { display: flex; align-items: center; gap: .6rem; padding: .8rem var(--space-4); cursor: pointer; list-style: none; border-left: 4px solid var(--att-c); }
.att-list > summary::-webkit-details-marker { display: none; }
.att-list > summary:hover { background: var(--surface-2); }
.att-list > summary:focus-visible { outline: none; box-shadow: var(--focus); }
.att-list__icon { display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: .6rem; background: var(--att-bg); color: var(--att-c); flex: none; }
.att-list__icon .icon { width: 1rem; height: 1rem; }
.att-list__title { font-weight: 600; }
.att-list__total { color: var(--text-2); font-size: .9rem; }
.att-list__chev { margin-left: auto; color: var(--muted); transition: transform .2s ease; display: inline-flex; }
.att-list[open] .att-list__chev { transform: rotate(180deg); }
.att-list__bar { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center; justify-content: space-between; padding: .5rem var(--space-4); border-top: 1px solid var(--border); background: var(--surface-2); }
.att-list__bar p { margin: 0; }
.att-row--err td:first-child { box-shadow: inset 3px 0 0 var(--err); } .att-row--warn td:first-child { box-shadow: inset 3px 0 0 var(--warn); }
.att-row--info td:first-child { box-shadow: inset 3px 0 0 var(--info); }

@media (max-width: 900px) {
  .att-plan { grid-template-columns: 1fr auto; }
  .att-plan__usage, .att-plan__btn { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  .att-hero { padding: var(--space-4); }
  .att-hero__stats { grid-template-columns: repeat(2, 1fr); }
  .att-jump { border-radius: var(--radius); position: static; }
  .att-jump__tools { margin-left: 0; }
  .att-tiles { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { .att-tile, .att-list__chev { transition: none; } .att-tile:hover { transform: none; } }
@media print {
  .att-jump, .att-tiles, .att-list__bar form { display: none !important; }
  .att-list { break-inside: auto; border-color: #ccc; }
  .att-list:not([open]) { display: none; }
}
.att-clear { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0; padding: 0; list-style: none; }
.att-clear li { display: inline-flex; align-items: center; gap: .3rem; padding: .3rem .7rem; border-radius: 999px; background: var(--ok-bg); color: var(--ok); font-size: .82rem; }
.att-clear li .icon { width: .9rem; height: .9rem; }
@media print { .att-clear { display: none !important; } }

/* Reports hub: hero with search, area chips, coloured area cards, report cards */
.rep { display: grid; gap: var(--space-5); }
.rep-tone--indigo { --rep: #4f46e5; } .rep-tone--teal { --rep: #0d9488; } .rep-tone--green { --rep: #16a34a; } .rep-tone--sky { --rep: #0284c7; }
.rep-tone--amber { --rep: #d97706; } .rep-tone--rose { --rep: #e11d48; } .rep-tone--violet { --rep: #7c3aed; } .rep-tone--orange { --rep: #ea580c; }
.rep-tone--cyan { --rep: #0891b2; } .rep-tone--pink { --rep: #db2777; }
:root[data-theme="dark"] .rep-area, :root[data-theme="dark"] .rep-jump__chip { --rep-soft: color-mix(in srgb, var(--rep) 24%, transparent); --rep-ink: color-mix(in srgb, var(--rep) 55%, white); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .rep-area, :root:not([data-theme="light"]) .rep-jump__chip { --rep-soft: color-mix(in srgb, var(--rep) 24%, transparent); --rep-ink: color-mix(in srgb, var(--rep) 55%, white); } }
.rep-area, .rep-jump__chip { --rep-soft: color-mix(in srgb, var(--rep) 12%, transparent); --rep-ink: var(--rep); }

.rep-hero { display: flex; flex-wrap: wrap; gap: var(--space-4); align-items: center; justify-content: space-between; padding: var(--space-5); border-radius: var(--radius-lg);
  border: 1px solid var(--border); box-shadow: var(--shadow); background: radial-gradient(120% 140% at 0% 0%, var(--brand-soft) 0%, transparent 55%), var(--surface); }
.rep-hero__text { display: flex; gap: var(--space-4); align-items: center; flex: 1 1 340px; min-width: 0; }
.rep-hero__text h1 { margin: 0 0 .2rem; }
.rep-hero__text p { margin: 0; color: var(--text-2); max-width: 60ch; }
.rep-hero__icon { flex: none; display: grid; place-items: center; width: 3.25rem; height: 3.25rem; border-radius: 1rem; background: var(--brand); color: var(--brand-ink); box-shadow: 0 8px 22px rgb(79 70 229 / .28); }
.rep-hero__icon .icon { width: 1.6rem; height: 1.6rem; }
.rep-hero__side { display: grid; gap: .4rem; flex: 0 1 360px; min-width: 240px; }
.rep-search { display: flex; align-items: center; gap: .5rem; padding: 0 .9rem; border-radius: 999px; background: var(--surface); border: 1px solid var(--border-strong); }
.rep-search:focus-within { box-shadow: var(--focus); border-color: var(--brand); }
.rep-search .icon { color: var(--muted); flex: none; }
.rep-search input { border: 0; background: transparent; outline: none; box-shadow: none; padding: .65rem 0; width: 100%; color: var(--text); font: inherit; min-width: 0; }
.rep-hero__count { font-size: .85rem; color: var(--muted); text-align: right; }
.rep-hero__count strong { color: var(--text); }

.rep-jump { display: flex; flex-wrap: wrap; gap: .4rem; }
.rep-jump__chip { display: inline-flex; align-items: center; gap: .35rem; padding: .35rem .75rem; border-radius: 999px; text-decoration: none; font-size: .86rem; color: var(--text);
  background: var(--surface); border: 1px solid var(--border); transition: background .15s ease, border-color .15s ease; }
.rep-jump__chip .icon { color: var(--rep-ink); width: 1rem; height: 1rem; }
.rep-jump__chip span { min-width: 1.3rem; padding: 0 .35rem; border-radius: 999px; text-align: center; background: var(--rep-soft); color: var(--rep-ink); font-size: .72rem; font-weight: 600; }
.rep-jump__chip:hover { border-color: var(--rep); background: var(--rep-soft); }
.rep-jump__chip[hidden] { display: none; }

.rep-areas { display: grid; gap: var(--space-4); }
.rep-area { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: var(--space-4) var(--space-5) var(--space-5); box-shadow: var(--shadow-sm);
  border-top: 4px solid var(--rep); scroll-margin-top: calc(var(--topbar-h) + 1rem); }
.rep-area[hidden] { display: none; }
.rep-area__head { display: flex; align-items: center; gap: .6rem; margin: 0 0 var(--space-3); font-size: 1.12rem; }
.rep-area__icon { display: grid; place-items: center; width: 2.3rem; height: 2.3rem; border-radius: .7rem; background: var(--rep-soft); color: var(--rep-ink); flex: none; }
.rep-area__icon .icon { width: 1.2rem; height: 1.2rem; }
.rep-area__n { font-size: .75rem; font-weight: 600; padding: .05rem .5rem; border-radius: 999px; background: var(--surface-2); color: var(--muted); }
.rep-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: .65rem; }
.rep-list li[hidden] { display: none; }
.rep-card { position: relative; display: grid; gap: .2rem; height: 100%; padding: .8rem 2.2rem .85rem .95rem; border-radius: var(--radius); text-decoration: none; color: inherit;
  background: var(--surface-2); border: 1px solid transparent; transition: background .15s ease, border-color .15s ease, transform .15s ease, box-shadow .15s ease; }
.rep-card__title { font-weight: 600; color: var(--text); }
.rep-card__desc { font-size: .82rem; color: var(--muted); line-height: 1.45; }
.rep-card__go { position: absolute; right: .7rem; top: 50%; transform: translateY(-50%); color: var(--muted); display: inline-flex; transition: transform .15s ease, color .15s ease; }
.rep-card:hover { background: var(--surface); border-color: var(--rep); box-shadow: var(--shadow); transform: translateY(-1px); }
.rep-card:hover .rep-card__title { color: var(--rep-ink); }
.rep-card:hover .rep-card__go { color: var(--rep-ink); transform: translate(3px, -50%); }
.rep-card:focus-visible { outline: none; box-shadow: var(--focus); }
.rep-exam { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--space-3); margin-top: var(--space-4); padding: var(--space-4); border-radius: var(--radius); background: var(--rep-soft); }
.rep-exam[hidden] { display: none; }
.rep-exam__label { display: flex; gap: .55rem; align-items: center; flex: 1 1 100%; }
.rep-exam__label > .icon { color: var(--rep-ink); width: 1.3rem; height: 1.3rem; }
.rep-exam__label > span { display: grid; }
.rep-exam .field { margin: 0; flex: 1 1 200px; }
.rep-none { display: flex; align-items: center; gap: .5rem; justify-content: center; padding: var(--space-5); }
.rep-none[hidden] { display: none; }
@media (max-width: 560px) {
  .rep-hero { padding: var(--space-4); }
  .rep-hero__side { flex-basis: 100%; }
  .rep-hero__count { text-align: left; }
  .rep-area { padding: var(--space-4); }
  .rep-list { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { .rep-card, .rep-card__go { transition: none; } .rep-card:hover { transform: none; } }
@media print { .rep-search, .rep-jump, .rep-exam { display: none !important; } .rep-area { break-inside: avoid; } }

/* Small menu on a computer: the ☰ button in the top bar keeps only the icons (more room for the page); with the mouse
   on it (or keyboard focus in it) the full menu opens over the page, without moving the page. Remembered (cookie). */
@media (min-width: 1024.02px) {
  .topbar .topbar__menu { display: inline-grid !important; flex: none; place-items: center; width: 40px; height: 40px; border-radius: 12px;
    border: 1px solid var(--border); background: var(--surface); color: var(--text-2); }
  .topbar .topbar__menu:hover { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
  body.sidebar-mini { --sidebar-mini-w: 76px; }
  body.sidebar-mini .app-shell { grid-template-columns: var(--sidebar-mini-w) minmax(0, 1fr); }
  body.sidebar-mini .sidebar { width: var(--sidebar-mini-w); z-index: 40; transition: width .18s ease, box-shadow .18s ease; }
  body.sidebar-mini .sidebar:hover, body.sidebar-mini .sidebar:focus-within { width: var(--sidebar-w); box-shadow: var(--shadow-lg); transition-delay: .12s; }
  body.sidebar-mini .sidebar:not(:hover):not(:focus-within) .brand-text,
  body.sidebar-mini .sidebar:not(:hover):not(:focus-within) .nav-label,
  body.sidebar-mini .sidebar:not(:hover):not(:focus-within) .nav-link > span:not(.nav-count),
  body.sidebar-mini .sidebar:not(:hover):not(:focus-within) .nav-section__toggle > span,
  body.sidebar-mini .sidebar:not(:hover):not(:focus-within) .nav-collapse { display: none !important; }
  body.sidebar-mini .sidebar:not(:hover):not(:focus-within) .sidebar__brand { padding: .8rem .4rem; }
  body.sidebar-mini .sidebar:not(:hover):not(:focus-within) .sidebar__brand .brand-mark,
  body.sidebar-mini .sidebar:not(:hover):not(:focus-within) .sidebar__brand .brand-logo { width: 44px; height: 44px; border-radius: 12px; }
  body.sidebar-mini .sidebar:not(:hover):not(:focus-within) .sidebar__nav { padding: var(--space-2) .55rem var(--space-5); scrollbar-width: none; }
  body.sidebar-mini .sidebar:not(:hover):not(:focus-within) .sidebar__nav::-webkit-scrollbar { display: none; }
  body.sidebar-mini .sidebar:not(:hover):not(:focus-within) .nav-link,
  body.sidebar-mini .sidebar:not(:hover):not(:focus-within) .nav-section__toggle { justify-content: center; padding: .6rem 0; position: relative; }
  body.sidebar-mini .sidebar:not(:hover):not(:focus-within) .nav-section.is-current > .nav-section__toggle { background: var(--brand-soft); }
  body.sidebar-mini .sidebar:not(:hover):not(:focus-within) .nav-count { position: absolute; top: 2px; right: 6px; min-width: 1.1rem; padding: 0 .25rem; font-size: .62rem; }
  body.sidebar-mini .sidebar:not(:hover):not(:focus-within) .nav-section { margin-top: 2px; }
}
@media (min-width: 1024.02px) and (prefers-reduced-motion: reduce) { body.sidebar-mini .sidebar { transition: none; } }
@media (min-width: 1024.02px) { body.sidebar-mini .sidebar:not(:hover):not(:focus-within) .sidebar__brand { overflow: hidden; } body.sidebar-mini .sidebar:not(:hover):not(:focus-within) .sidebar__brand .brand-logo { max-width: 44px; } }
/* small menu: every icon in its own coloured box (the colour stays the same for a menu item) */
.nav-tone-0 { --nav-c: #4f46e5; } .nav-tone-1 { --nav-c: #0d9488; } .nav-tone-2 { --nav-c: #16a34a; } .nav-tone-3 { --nav-c: #0284c7; } .nav-tone-4 { --nav-c: #d97706; }
.nav-tone-5 { --nav-c: #e11d48; } .nav-tone-6 { --nav-c: #7c3aed; } .nav-tone-7 { --nav-c: #ea580c; } .nav-tone-8 { --nav-c: #0891b2; } .nav-tone-9 { --nav-c: #db2777; }
@media (min-width: 1024.02px) {
  body.sidebar-mini .sidebar:not(:hover):not(:focus-within) :is(.nav-link, .nav-section__toggle)[class*="nav-tone-"] {
    --nav-ink: var(--nav-c); width: 44px; height: 44px; margin: 5px auto; padding: 0; border-radius: 12px; border: 1px solid transparent;
    background: color-mix(in srgb, var(--nav-c) 13%, transparent); color: var(--nav-ink); transition: background .15s ease, color .15s ease, box-shadow .15s ease; }
  body.sidebar-mini .sidebar:not(:hover):not(:focus-within) :is(.nav-link, .nav-section__toggle)[class*="nav-tone-"]:hover { background: var(--nav-c); color: #fff; }
  body.sidebar-mini .sidebar:not(:hover):not(:focus-within) :is(.nav-link.is-active, .nav-section.is-current > .nav-section__toggle, .nav-sub.is-current > .nav-sub__toggle)[class*="nav-tone-"] {
    background: var(--nav-c); color: #fff; box-shadow: 0 6px 14px -6px var(--nav-c); }
  body.sidebar-mini .sidebar:not(:hover):not(:focus-within) :is(.nav-link, .nav-section__toggle) .icon { width: 20px; height: 20px; }
}
@media (min-width: 1024.02px) and (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) body.sidebar-mini .sidebar:not(:hover):not(:focus-within) :is(.nav-link, .nav-section__toggle)[class*="nav-tone-"] {
    --nav-ink: color-mix(in srgb, var(--nav-c) 60%, white); background: color-mix(in srgb, var(--nav-c) 24%, transparent); }
}
@media (min-width: 1024.02px) {
  :root[data-theme="dark"] body.sidebar-mini .sidebar:not(:hover):not(:focus-within) :is(.nav-link, .nav-section__toggle)[class*="nav-tone-"] {
    --nav-ink: color-mix(in srgb, var(--nav-c) 60%, white); background: color-mix(in srgb, var(--nav-c) 24%, transparent); }
}

/* ===================== Panel themes (Settings › Branding › Theme): body.theme-3d | theme-colourful | theme-glass | theme-simple
   and body.icons-multi | icons-brand. Every colour comes from the tokens, so light and dark both work. ===================== */
body.icons-brand [class*="nav-tone-"], body.theme-simple [class*="nav-tone-"] { --nav-c: var(--brand); }
:is(body.theme-3d, body.theme-colourful, body.theme-glass) .pd-kpi:nth-child(6n+1) { --k: #4f46e5; }
:is(body.theme-3d, body.theme-colourful, body.theme-glass) .pd-kpi:nth-child(6n+2) { --k: #0d9488; }
:is(body.theme-3d, body.theme-colourful, body.theme-glass) .pd-kpi:nth-child(6n+3) { --k: #e11d48; }
:is(body.theme-3d, body.theme-colourful, body.theme-glass) .pd-kpi:nth-child(6n+4) { --k: #d97706; }
:is(body.theme-3d, body.theme-colourful, body.theme-glass) .pd-kpi:nth-child(6n+5) { --k: #16a34a; }
:is(body.theme-3d, body.theme-colourful, body.theme-glass) .pd-kpi:nth-child(6n+6) { --k: #0284c7; }
:is(body.theme-3d, body.theme-colourful) .pd-grid > :nth-child(6n+1) { --k: #0284c7; }
:is(body.theme-3d, body.theme-colourful) .pd-grid > :nth-child(6n+2) { --k: #16a34a; }
:is(body.theme-3d, body.theme-colourful) .pd-grid > :nth-child(6n+3) { --k: #d97706; }
:is(body.theme-3d, body.theme-colourful) .pd-grid > :nth-child(6n+4) { --k: #7c3aed; }
:is(body.theme-3d, body.theme-colourful) .pd-grid > :nth-child(6n+5) { --k: #e11d48; }
:is(body.theme-3d, body.theme-colourful) .pd-grid > :nth-child(6n+6) { --k: #0d9488; }
body.icons-brand .pd-kpi:nth-child(odd), body.icons-brand .pd-grid > * { --k: var(--brand) !important; }
body.icons-brand .pd-kpi:nth-child(even) { --k: color-mix(in srgb, var(--brand) 75%, #0f172a) !important; }

/* ---------- 3D ---------- */
body.theme-3d { background: linear-gradient(180deg, color-mix(in srgb, var(--brand) 6%, var(--bg)), var(--bg) 480px) fixed var(--bg); }
body.theme-3d .sidebar :is(.nav-link, .nav-section__toggle) { font-weight: 600; padding: .4rem .6rem; transition: background .15s ease, transform .15s ease; }
body.theme-3d .sidebar :is(.nav-link, .nav-section__toggle) > .icon { flex: none; width: 34px; height: 34px; padding: 8px; border-radius: 10px; color: #fff;
  background: linear-gradient(145deg, color-mix(in srgb, var(--nav-c, var(--brand)) 70%, white), var(--nav-c, var(--brand)) 55%, color-mix(in srgb, var(--nav-c, var(--brand)) 75%, black));
  box-shadow: 0 4px 8px -3px color-mix(in srgb, var(--nav-c, var(--brand)) 70%, transparent), inset 0 1px 0 rgb(255 255 255 / .45), inset 0 -2px 0 rgb(0 0 0 / .15); }
body.theme-3d .sidebar .nav-collapse :is(.nav-link, .nav-sub__toggle) > .icon { width: 26px; height: 26px; padding: 5px; border-radius: 8px; }
body.theme-3d .sidebar :is(.nav-link, .nav-section__toggle):hover { background: var(--surface-2); transform: translateX(2px); }
body.theme-3d .sidebar .nav-link.is-active { color: #fff; background: linear-gradient(135deg, color-mix(in srgb, var(--nav-c, var(--brand)) 80%, white), var(--nav-c, var(--brand)));
  box-shadow: 0 8px 16px -8px var(--nav-c, var(--brand)), inset 0 1px 0 rgb(255 255 255 / .35); }
body.theme-3d .sidebar .nav-link.is-active > .icon { background: rgb(255 255 255 / .22); box-shadow: none; }
body.theme-3d .sidebar .nav-section.is-current > .nav-section__toggle { background: var(--surface-2); color: var(--text); }
body.theme-3d .pd-hero { background: radial-gradient(120% 140% at 100% 0%, color-mix(in srgb, var(--brand) 60%, #a5b4fc) 0%, transparent 55%),
  linear-gradient(135deg, color-mix(in srgb, var(--brand) 85%, white), var(--brand) 50%, color-mix(in srgb, var(--brand) 70%, #0f172a));
  box-shadow: 0 20px 38px -20px color-mix(in srgb, var(--brand) 85%, transparent), inset 0 1px 0 rgb(255 255 255 / .25); }
body.theme-3d .pd-kpi { color: #fff; border: 0; background: linear-gradient(145deg, color-mix(in srgb, var(--k) 75%, white), var(--k) 55%, color-mix(in srgb, var(--k) 80%, black));
  box-shadow: 0 14px 26px -14px var(--k), inset 0 1px 0 rgb(255 255 255 / .35), inset 0 -3px 0 rgb(0 0 0 / .12); }
body.theme-3d .pd-kpi :is(.pd-kpi__label, .pd-kpi__value, .pd-kpi__trend, .pd-kpi__trend span, p, small, a, .muted) { color: #fff !important; }
body.theme-3d .pd-kpi__icon { background: rgb(255 255 255 / .22) !important; color: #fff !important; box-shadow: inset 0 1px 0 rgb(255 255 255 / .4); }
body.theme-3d .pd-kpi:hover { transform: translateY(-4px); box-shadow: 0 18px 30px -14px var(--k), inset 0 1px 0 rgb(255 255 255 / .35); }
body.theme-3d :is(.card, .pd-card, .setup-card, .att-hero, .rep-hero, .rep-area, .att-plan, .att-list) { border-color: transparent;
  box-shadow: inset 0 1px 0 color-mix(in srgb, white 70%, transparent), 0 12px 28px -16px rgb(30 41 99 / .35), 0 2px 4px rgb(30 41 99 / .06); }
:root[data-theme="dark"] body.theme-3d :is(.card, .pd-card, .setup-card, .att-hero, .rep-hero, .rep-area, .att-plan, .att-list) { border-color: var(--border); box-shadow: 0 14px 30px -16px rgb(0 0 0 / .7); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) body.theme-3d :is(.card, .pd-card, .setup-card, .att-hero, .rep-hero, .rep-area, .att-plan, .att-list) { border-color: var(--border); box-shadow: 0 14px 30px -16px rgb(0 0 0 / .7); } }
body.theme-3d :is(.pd-attn__icon, .stat__icon, .att-tile__icon, .rep-area__icon, .att-list__icon) { box-shadow: inset 0 1px 0 rgb(255 255 255 / .5), 0 4px 10px -6px currentColor; }
body.theme-3d .btn { box-shadow: 0 2px 0 rgb(0 0 0 / .08), inset 0 1px 0 rgb(255 255 255 / .55); }
body.theme-3d .btn--primary { background: linear-gradient(180deg, color-mix(in srgb, var(--brand) 82%, white), var(--brand)); border-color: var(--brand);
  box-shadow: 0 6px 14px -6px var(--brand), inset 0 1px 0 rgb(255 255 255 / .3); }
body.theme-3d .btn--primary:hover { background: linear-gradient(180deg, var(--brand), var(--brand-hover)); }

/* ---------- Colourful ---------- */
body.theme-colourful .sidebar :is(.nav-link, .nav-section__toggle) { padding: .4rem .6rem; }
body.theme-colourful .sidebar :is(.nav-link, .nav-section__toggle) > .icon { flex: none; width: 32px; height: 32px; padding: 7px; border-radius: 9px;
  background: color-mix(in srgb, var(--nav-c, var(--brand)) 13%, transparent); color: var(--nav-c, var(--brand)); }
body.theme-colourful .sidebar .nav-collapse :is(.nav-link, .nav-sub__toggle) > .icon { width: 26px; height: 26px; padding: 5px; border-radius: 7px; }
body.theme-colourful .sidebar :is(.nav-link, .nav-section__toggle):hover { background: color-mix(in srgb, var(--nav-c, var(--brand)) 8%, transparent); }
body.theme-colourful .sidebar .nav-link.is-active { background: color-mix(in srgb, var(--nav-c, var(--brand)) 13%, transparent); color: var(--text); box-shadow: inset 3px 0 0 var(--nav-c, var(--brand)); }
body.theme-colourful .sidebar .nav-link.is-active > .icon { background: var(--nav-c, var(--brand)); color: #fff; }
body.theme-colourful .sidebar .nav-section.is-current > .nav-section__toggle { color: var(--text); }
body.theme-colourful .pd-hero { background: linear-gradient(120deg, var(--brand), color-mix(in srgb, var(--brand) 35%, #7c3aed) 55%, color-mix(in srgb, var(--brand) 20%, #db2777)); }
body.theme-colourful .pd-kpi { border-top: 4px solid var(--k); }
body.theme-colourful .pd-kpi__icon { background: color-mix(in srgb, var(--k) 14%, transparent) !important; color: var(--k) !important; }
body.theme-colourful .pd-kpi__value { color: var(--k); }
body.theme-colourful .pd-grid > :is(.card, .pd-card) { border-top: 4px solid var(--k); }
body.theme-colourful .pd-grid > :is(.card, .pd-card) .pd-card__head h2 { color: var(--k); }
:root[data-theme="dark"] body.theme-colourful :is(.pd-kpi__value, .pd-card__head h2) { filter: brightness(1.35); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) body.theme-colourful :is(.pd-kpi__value, .pd-card__head h2) { filter: brightness(1.35); } }

/* ---------- Modern glass ---------- */
body.theme-glass { background: radial-gradient(60% 50% at 10% 0%, color-mix(in srgb, #6366f1 16%, transparent) 0%, transparent 60%),
  radial-gradient(50% 50% at 100% 20%, color-mix(in srgb, #ec4899 12%, transparent) 0%, transparent 60%),
  radial-gradient(60% 60% at 60% 100%, color-mix(in srgb, #14b8a6 14%, transparent) 0%, transparent 60%) fixed, var(--bg); }
body.theme-glass .sidebar { background: color-mix(in srgb, var(--surface) 72%, transparent); backdrop-filter: blur(14px); }
body.theme-glass .sidebar__brand { background: transparent; }
body.theme-glass .topbar { background: color-mix(in srgb, var(--surface) 55%, transparent); }
body.theme-glass .sidebar :is(.nav-link, .nav-section__toggle) { border-radius: 999px; padding: .55rem .9rem; }
body.theme-glass .sidebar :is(.nav-link, .nav-section__toggle) > .icon { flex: none; width: 20px; height: 20px; color: var(--nav-c, var(--brand)); }
body.theme-glass .sidebar :is(.nav-link, .nav-section__toggle):hover { background: color-mix(in srgb, var(--nav-c, var(--brand)) 10%, transparent); color: var(--text); }
body.theme-glass .sidebar .nav-link.is-active { color: #fff; background: var(--nav-c, var(--brand)); box-shadow: 0 8px 18px -10px var(--nav-c, var(--brand)); }
body.theme-glass .sidebar .nav-link.is-active > .icon { color: #fff; }
body.theme-glass .sidebar .nav-section.is-current > .nav-section__toggle { background: color-mix(in srgb, var(--nav-c, var(--brand)) 10%, transparent); color: var(--text); }
body.theme-glass .sidebar .nav-section[data-open] > .nav-collapse { border-left: 2px solid color-mix(in srgb, var(--nav-c, var(--brand)) 35%, transparent); margin-left: 1.3rem; }
body.theme-glass .sidebar .nav-section[data-open] > .nav-collapse > .nav-list { padding-left: .4rem; }
body.theme-glass :is(.card, .pd-card, .pd-kpi, .setup-card, .att-hero, .rep-hero, .rep-area, .att-plan, .att-list, .att-tile) {
  background: color-mix(in srgb, var(--surface) 66%, transparent); backdrop-filter: blur(14px); border-color: color-mix(in srgb, var(--surface) 85%, transparent);
  border-radius: 22px; box-shadow: 0 10px 30px -18px rgb(15 23 42 / .28); }
body.theme-glass .pd-hero { border-radius: 24px; background: linear-gradient(120deg, color-mix(in srgb, var(--brand) 55%, #0ea5e9), var(--brand) 50%, color-mix(in srgb, var(--brand) 50%, #a855f7)); }
body.theme-glass .pd-kpi__icon { border-radius: 999px !important; background: var(--k) !important; color: #fff !important; }
body.theme-glass .pd-kpi__value { font-size: 1.9rem; }
body.theme-glass :is(.btn, .att-pill, .att-jump__chip, .rep-search) { border-radius: 999px; }

/* the small menu: the theme's own box, icons back to plain inside it */
@media (min-width: 1024.02px) {
  body.sidebar-mini .sidebar:not(:hover):not(:focus-within) :is(.nav-link, .nav-section__toggle) > .icon { width: 20px !important; height: 20px !important; padding: 0 !important;
    background: none !important; box-shadow: none !important; border-radius: 0 !important; color: inherit !important; }
  body.sidebar-mini .sidebar:not(:hover):not(:focus-within) :is(.nav-link, .nav-section__toggle) { transform: none !important; box-shadow: none; }
  body.theme-3d.sidebar-mini .sidebar:not(:hover):not(:focus-within) :is(.nav-link, .nav-section__toggle)[class*="nav-tone-"] { color: #fff;
    background: linear-gradient(145deg, color-mix(in srgb, var(--nav-c) 70%, white), var(--nav-c) 55%, color-mix(in srgb, var(--nav-c) 75%, black));
    box-shadow: 0 5px 10px -4px color-mix(in srgb, var(--nav-c) 75%, transparent), inset 0 1px 0 rgb(255 255 255 / .45), inset 0 -2px 0 rgb(0 0 0 / .15); }
  body.theme-3d.sidebar-mini .sidebar:not(:hover):not(:focus-within) :is(.nav-link.is-active, .nav-section.is-current > .nav-section__toggle)[class*="nav-tone-"] {
    outline: 3px solid color-mix(in srgb, var(--nav-c) 35%, transparent); outline-offset: 2px; }
  body.theme-glass.sidebar-mini .sidebar:not(:hover):not(:focus-within) :is(.nav-link, .nav-section__toggle)[class*="nav-tone-"] { border-radius: 999px; }
  body.theme-simple.sidebar-mini .sidebar:not(:hover):not(:focus-within) :is(.nav-link, .nav-section__toggle)[class*="nav-tone-"] { background: transparent; color: var(--text-2); }
  body.theme-simple.sidebar-mini .sidebar:not(:hover):not(:focus-within) :is(.nav-link, .nav-section__toggle)[class*="nav-tone-"]:hover { background: var(--surface-2); color: var(--text); }
  body.theme-simple.sidebar-mini .sidebar:not(:hover):not(:focus-within) :is(.nav-link.is-active, .nav-section.is-current > .nav-section__toggle)[class*="nav-tone-"] { background: var(--brand-soft); color: var(--brand-text); box-shadow: none; }
}
@media print { body[class*="theme-"] .pd-kpi { background: none !important; color: #000 !important; box-shadow: none !important; border: 1px solid #ccc !important; }
  body[class*="theme-"] .pd-kpi * { color: #000 !important; } body.theme-glass, body.theme-3d { background: #fff !important; } }
/* Settings › Branding › Theme picker */
.theme-picks { display: grid; gap: var(--space-3); grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.theme-pick { position: relative; display: grid; gap: .5rem; padding: .6rem; border-radius: var(--radius-lg); border: 2px solid var(--border); background: var(--surface); cursor: pointer;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease; }
.theme-pick:hover { border-color: var(--border-strong); transform: translateY(-2px); box-shadow: var(--shadow); }
.theme-pick input { position: absolute; opacity: 0; pointer-events: none; }
.theme-pick:has(input:checked) { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.theme-pick:has(input:focus-visible) { box-shadow: var(--focus); }
.theme-pick__img { display: block; aspect-ratio: 16 / 10; border-radius: var(--radius); overflow: hidden; background: var(--surface-2); border: 1px solid var(--border); }
.theme-pick__img img { width: 100%; height: 100%; object-fit: cover; object-position: left top; display: block; }
.theme-pick__text { display: grid; gap: .15rem; padding: 0 .2rem .2rem; }
.theme-pick__text strong { display: flex; align-items: center; gap: .4rem; }
.theme-pick__tick { position: absolute; top: .9rem; right: .9rem; display: none; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--brand); color: var(--brand-ink); box-shadow: var(--shadow); }
.theme-pick:has(input:checked) .theme-pick__tick { display: grid; }
fieldset.theme-picks { border: 0; margin: 0; padding: 0; min-width: 0; }
body.theme-3d .pd-kpi :is(strong, span, b, div, h2, h3) { color: #fff !important; }
/* Modern glass, faster: blurring the page behind every box made scrolling slow (about 20 frames a second on a weak
   computer). The boxes are now nearly solid with no blur; only the side menu keeps a light blur. Looks the same. */
body.theme-glass :is(.card, .pd-card, .pd-kpi, .setup-card, .att-hero, .rep-hero, .rep-area, .att-plan, .att-list, .att-tile) {
  backdrop-filter: none; background: color-mix(in srgb, var(--surface) 86%, transparent); }
body.theme-glass .sidebar { backdrop-filter: blur(8px); }
body.theme-glass { background-attachment: scroll; }

/* ---------- Themes: the top bar (☰, quick links, full screen, light/dark, website, year, language, bell, profile) ---------- */
.topbar__actions > :nth-child(7n+1) { --tb: #0284c7; } .topbar__actions > :nth-child(7n+2) { --tb: #7c3aed; } .topbar__actions > :nth-child(7n+3) { --tb: #0d9488; }
.topbar__actions > :nth-child(7n+4) { --tb: #d97706; } .topbar__actions > :nth-child(7n+5) { --tb: #db2777; } .topbar__actions > :nth-child(7n+6) { --tb: #e11d48; }
.topbar__actions > :nth-child(7n+7) { --tb: #16a34a; }
.topbar__tools { --tb: #4f46e5; } .topbar .topbar__menu { --tb: var(--brand); }
body.icons-brand .topbar :is(.topbar__actions > *, .topbar__tools) { --tb: var(--brand); }
/* 3D: raised coloured diamonds with white icons */
body.theme-3d :is(.topbar__actions > .icon-btn, .topbar__actions .ay-btn, .topbar__actions .lang-switch, .topbar__tools .icon-btn, .topbar .topbar__menu) {
  color: #fff; border-color: transparent;
  background: linear-gradient(145deg, color-mix(in srgb, var(--tb) 70%, white), var(--tb) 55%, color-mix(in srgb, var(--tb) 75%, black));
  box-shadow: 0 6px 12px -6px color-mix(in srgb, var(--tb) 80%, transparent), inset 0 1px 0 rgb(255 255 255 / .45), inset 0 -2px 0 rgb(0 0 0 / .15); }
body.theme-3d :is(.topbar__actions > .icon-btn, .topbar__actions .ay-btn, .topbar__actions .lang-switch, .topbar__tools .icon-btn, .topbar .topbar__menu):hover {
  color: #fff; border-color: transparent; filter: brightness(1.08); background: linear-gradient(145deg, color-mix(in srgb, var(--tb) 60%, white), var(--tb)); }
body.theme-3d .topbar-search { border-color: transparent; box-shadow: inset 0 2px 4px rgb(0 0 0 / .06), 0 4px 12px -8px rgb(30 41 99 / .35); }
body.theme-3d .user-btn { background: var(--surface); box-shadow: 0 6px 14px -10px rgb(30 41 99 / .45), inset 0 1px 0 rgb(255 255 255 / .6); border-radius: 999px; }
body.theme-3d .quick-link__icon { color: #fff; background: linear-gradient(145deg, color-mix(in srgb, var(--brand) 70%, white), var(--brand) 55%, color-mix(in srgb, var(--brand) 75%, black));
  box-shadow: 0 4px 8px -4px var(--brand), inset 0 1px 0 rgb(255 255 255 / .4); }
/* Colourful: light coloured diamonds with coloured icons */
body.theme-colourful :is(.topbar__actions > .icon-btn, .topbar__actions .ay-btn, .topbar__actions .lang-switch, .topbar__tools .icon-btn, .topbar .topbar__menu) {
  color: var(--tb); background: color-mix(in srgb, var(--tb) 12%, var(--surface)); border-color: color-mix(in srgb, var(--tb) 30%, var(--border)); }
body.theme-colourful :is(.topbar__actions > .icon-btn, .topbar__actions .ay-btn, .topbar__actions .lang-switch, .topbar__tools .icon-btn, .topbar .topbar__menu):hover {
  color: #fff; background: var(--tb); border-color: var(--tb); }
body.theme-colourful .quick-link__icon { background: color-mix(in srgb, var(--brand) 13%, transparent); }
/* Modern glass: round see-through buttons with coloured icons, pill search */
body.theme-glass :is(.topbar__actions > .icon-btn, .topbar__actions .ay-btn, .topbar__actions .lang-switch, .topbar__tools .icon-btn, .topbar .topbar__menu) {
  border-radius: 50%; color: var(--tb); background: color-mix(in srgb, var(--surface) 75%, transparent); border-color: color-mix(in srgb, var(--surface) 90%, transparent);
  box-shadow: 0 6px 16px -10px rgb(15 23 42 / .35); }
body.theme-glass :is(.topbar__actions > .icon-btn, .topbar__actions .ay-btn, .topbar__actions .lang-switch, .topbar__tools .icon-btn, .topbar .topbar__menu):hover {
  color: #fff; background: var(--tb); border-color: var(--tb); }
body.theme-glass .topbar-search { border-radius: 999px; background: color-mix(in srgb, var(--surface) 75%, transparent); }
body.theme-glass .user-btn { border-radius: 999px; background: color-mix(in srgb, var(--surface) 70%, transparent); }
body.theme-glass .quick-link__icon { border-radius: 50%; }
@media (prefers-reduced-motion: reduce) { body.theme-3d .topbar :is(.icon-btn, .topbar__menu) { transition: none; } }
:root[data-theme="dark"] body:is(.theme-colourful, .theme-glass) :is(.topbar__actions > .icon-btn, .topbar__actions .ay-btn, .topbar__actions .lang-switch, .topbar__tools .icon-btn, .topbar .topbar__menu):not(:hover) {
  color: color-mix(in srgb, var(--tb) 55%, white); background: color-mix(in srgb, var(--tb) 22%, var(--surface)); border-color: color-mix(in srgb, var(--tb) 40%, var(--border)); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) body:is(.theme-colourful, .theme-glass) :is(.topbar__actions > .icon-btn, .topbar__actions .ay-btn, .topbar__actions .lang-switch, .topbar__tools .icon-btn, .topbar .topbar__menu):not(:hover) {
  color: color-mix(in srgb, var(--tb) 55%, white); background: color-mix(in srgb, var(--tb) 22%, var(--surface)); border-color: color-mix(in srgb, var(--tb) 40%, var(--border)); } }

/* ---------- Themes: tabs take the colour of the page's menu section (main.nav-tone-N → --nav-c) ---------- */
.content { --pc: var(--nav-c, var(--brand)); }
/* 3D: raised white buttons, the open one raised in the menu colour */
body.theme-3d .tabs { border-bottom: 0; gap: .6rem; }
body.theme-3d .tabs > :is(a, button, .tab, .tabs__tab) { border: 0; border-radius: 12px; padding: .55rem 1.15rem; color: var(--text-2); background: var(--surface); text-decoration: none;
  box-shadow: 0 2px 0 rgb(0 0 0 / .06), 0 6px 14px -10px rgb(30 41 99 / .4), inset 0 1px 0 color-mix(in srgb, white 70%, transparent); transition: transform .15s ease, color .15s ease; }
body.theme-3d .tabs > :is(a, button, .tab, .tabs__tab):hover { color: var(--pc); transform: translateY(-1px); }
body.theme-3d .tabs > :is(a, button, .tab, .tabs__tab):is(.is-active, [aria-selected="true"], [aria-current="page"], [aria-current="true"]) { color: #fff !important;
  background: linear-gradient(145deg, color-mix(in srgb, var(--pc) 72%, white), var(--pc) 55%, color-mix(in srgb, var(--pc) 78%, black)) !important;
  box-shadow: 0 8px 16px -8px var(--pc), inset 0 1px 0 rgb(255 255 255 / .4), inset 0 -2px 0 rgb(0 0 0 / .15) !important; }
/* Colourful: pills, the open one filled with the menu colour */
body.theme-colourful .tabs { border-bottom: 0; gap: .5rem; }
body.theme-colourful .tabs > :is(a, button, .tab, .tabs__tab) { border: 1px solid color-mix(in srgb, var(--pc) 25%, var(--border)); border-radius: 999px; padding: .5rem 1.1rem;
  color: var(--text-2); background: var(--surface); text-decoration: none; }
body.theme-colourful .tabs > :is(a, button, .tab, .tabs__tab):hover { background: color-mix(in srgb, var(--pc) 10%, var(--surface)); color: var(--pc); }
body.theme-colourful .tabs > :is(a, button, .tab, .tabs__tab):is(.is-active, [aria-selected="true"], [aria-current="page"], [aria-current="true"]) {
  background: var(--pc) !important; border-color: var(--pc) !important; color: #fff !important; }
/* Modern glass: all tabs in one soft bar, the open one filled */
body.theme-glass .tabs { display: inline-flex; flex-wrap: wrap; max-width: 100%; border-bottom: 0; gap: .25rem; padding: .3rem; border-radius: 16px;
  background: color-mix(in srgb, var(--pc) 10%, var(--surface-2)); border: 1px solid color-mix(in srgb, var(--pc) 18%, var(--border)); }
body.theme-glass .tabs > :is(a, button, .tab, .tabs__tab) { border: 0; border-radius: 12px; padding: .5rem 1.1rem; color: var(--text-2); background: transparent; text-decoration: none; }
body.theme-glass .tabs > :is(a, button, .tab, .tabs__tab):hover { color: var(--pc); }
body.theme-glass .tabs > :is(a, button, .tab, .tabs__tab):is(.is-active, [aria-selected="true"], [aria-current="page"], [aria-current="true"]) {
  background: var(--pc) !important; color: #fff !important; box-shadow: 0 4px 10px -4px var(--pc); }
/* Simple: a coloured line under the open tab */
body.theme-simple .tabs { border-bottom: 2px solid color-mix(in srgb, var(--pc) 20%, var(--border)); gap: .2rem; }
body.theme-simple .tabs > :is(a, button, .tab, .tabs__tab) { border: 0; border-radius: 10px 10px 0 0; padding: .6rem 1.1rem; margin-bottom: -2px; border-bottom: 3px solid transparent;
  color: var(--text-2); background: transparent; text-decoration: none; }
body.theme-simple .tabs > :is(a, button, .tab, .tabs__tab):hover { color: var(--pc); background: color-mix(in srgb, var(--pc) 6%, transparent); }
body.theme-simple .tabs > :is(a, button, .tab, .tabs__tab):is(.is-active, [aria-selected="true"], [aria-current="page"], [aria-current="true"]) {
  color: var(--pc) !important; background: color-mix(in srgb, var(--pc) 12%, transparent) !important; border-bottom-color: var(--pc) !important; }
:root[data-theme="dark"] body:is(.theme-simple, .theme-3d, .theme-colourful, .theme-glass) .content { --pc: color-mix(in srgb, var(--nav-c, var(--brand)) 80%, white); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) body:is(.theme-simple, .theme-3d, .theme-colourful, .theme-glass) .content { --pc: color-mix(in srgb, var(--nav-c, var(--brand)) 80%, white); } }
.tabs__has-error { box-shadow: inset 0 -3px 0 var(--err) !important; }
@media print { .tabs { display: none !important; } }
/* list buttons kept inside a card that is one tab (or an open/close list) */
.table-tools--inside { padding: .7rem 1rem 0; margin-bottom: .5rem; }
/* full screen: the next page loads in a hidden frame behind the one shown (no blank screen); a thin bar while it loads */
.fs-shell iframe { position: absolute; inset: 0; }
.fs-shell iframe.fs-next { visibility: hidden; pointer-events: none; }
.fs-shell.is-first { background: transparent; pointer-events: none; }
.fs-shell.is-first iframe { visibility: hidden; }
.fs-shell::after { content: ""; position: absolute; top: 0; left: 0; height: 3px; width: 0; z-index: 2; background: var(--brand); opacity: 0; transition: opacity .2s ease; }
.fs-shell.is-loading::after { opacity: 1; animation: fs-load 2.5s ease-out forwards; }
@keyframes fs-load { from { width: 0; } to { width: 85%; } }
@media (prefers-reduced-motion: reduce) { .fs-shell.is-loading::after { animation: none; width: 60%; } }
/* WhatsApp logo (one picture everywhere) */
.wa-logo { display: inline-block; width: 1.25em; height: 1.25em; border-radius: 50%; object-fit: contain; flex: none; vertical-align: -.25em; }
img.icon.wa-logo { width: 20px; height: 20px; }
img.icon.wa-logo.icon--sm { width: 16px; height: 16px; }
.brand-logo { display: inline-block; width: 1.25em; height: 1.25em; object-fit: contain; flex: none; vertical-align: -.25em; }
img.icon.brand-logo { width: 20px; height: 20px; }
.hlp-soc__ic:has(> img.brand-logo) { background: none; box-shadow: none; } .hlp-soc__ic img.brand-logo { width: 100%; height: 100%; }
.wa-chat__head-logo { width: 30px; height: 30px; border-radius: 50%; display: block; }
.hlp-ic--wa { background: transparent !important; }
.hlp-ic--wa .wa-logo { width: 100%; height: 100%; }
/* in coloured menu boxes and 3D icon boxes the logo keeps its own colours */
.sidebar :is(.nav-link, .nav-section__toggle) > img.wa-logo { background: none !important; box-shadow: none !important; padding: 0 !important; }
body.theme-3d .sidebar :is(.nav-link, .nav-section__toggle) > img.wa-logo, body.theme-colourful .sidebar :is(.nav-link, .nav-section__toggle) > img.wa-logo { width: 30px; height: 30px; }
.btn--wa img.wa-logo { width: 18px; height: 18px; }
.hlp-chat img.wa-logo { width: 16px; height: 16px; background: #fff; border-radius: 50%; }
/* eSchool AI's bird as an icon (menu, headings, links) */
img.ai-logo { display: inline-block; object-fit: contain; flex: none; vertical-align: -.25em; }
img.icon.ai-logo { width: 22px; height: 22px; }
img.icon.ai-logo.icon--sm { width: 18px; height: 18px; }
h1 > img.icon.ai-logo { width: 1.3em; height: 1.3em; vertical-align: -.3em; }
.sidebar :is(.nav-link, .nav-section__toggle) > img.ai-logo { background: none !important; box-shadow: none !important; padding: 0 !important; }
body.theme-3d .sidebar :is(.nav-link, .nav-section__toggle) > img.ai-logo, body.theme-colourful .sidebar :is(.nav-link, .nav-section__toggle) > img.ai-logo { width: 32px; height: 32px; }
@media (min-width: 1024.02px) { body.sidebar-mini .sidebar:not(:hover):not(:focus-within) :is(.nav-link, .nav-section__toggle) > img:is(.ai-logo, .wa-logo) { width: 26px !important; height: 26px !important; } }

/* ---------- Paper: warm cream pages (light mode) ---------- */
:root:not([data-theme="dark"]) body.theme-paper { --bg: #f3ecdf; --surface: #fffaf1; --surface-2: #f6efe2; --surface-3: #efe6d6; --border: #eadfcb; --border-strong: #dccdb2;
  --text: #2b2418; --text-2: #5b4e3a; --muted: #8a7b62; background: var(--bg); }
:root:not([data-theme="dark"]) body.theme-paper .sidebar, :root:not([data-theme="dark"]) body.theme-paper .sidebar__brand { background: #fbf5ea; }
:root:not([data-theme="dark"]) body.theme-paper .topbar { background: color-mix(in srgb, #f3ecdf 85%, transparent); }
:root:not([data-theme="dark"]) body.theme-paper .pd-hero { background: linear-gradient(135deg, color-mix(in srgb, var(--brand) 30%, #4a2f17), color-mix(in srgb, var(--brand) 30%, #8a5a2b)); }
:root:not([data-theme="dark"]) body.theme-paper .sidebar :is(.nav-link, .nav-section__toggle) > .icon { color: var(--nav-c, var(--brand)); }
:root:not([data-theme="dark"]) body.theme-paper :is(.topbar__actions > .icon-btn, .topbar__actions .ay-btn, .topbar__actions .lang-switch, .topbar__tools .icon-btn) { background: #fffaf1; color: #6b4423; border-color: #eadfcb; }
body.theme-dark .sidebar :is(.nav-link, .nav-section__toggle) > .icon { color: var(--nav-c, var(--brand)); }
body.theme-dark :is(.topbar__actions > .icon-btn, .topbar__actions .ay-btn, .topbar__actions .lang-switch, .topbar__tools .icon-btn):not(:hover) { color: var(--tb); }

/* Class timetable, one day at a time */
.tt-days a { display: inline-flex; align-items: center; gap: .4rem; }
.tt-days__n { min-width: 1.4rem; padding: 0 .35rem; border-radius: 999px; background: var(--surface-2, rgba(0,0,0,.06)); font-size: .75rem; text-align: center; color: inherit; }
.tt-days a.is-active .tt-days__n { background: rgba(255,255,255,.25); }
.tt-quick summary { cursor: pointer; display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.tt-quick[open] summary { margin-bottom: var(--space-3); }
.tt-quick__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: var(--space-3); margin-bottom: var(--space-3); }
.tt-table select, .tt-table input[type=time] { min-width: 7.5rem; }
.tt-table tr.is-break td { background: color-mix(in srgb, var(--warning, #f59e0b) 10%, transparent); }
.tt-table tr.is-break select[disabled] { opacity: .45; }
.tt-copy__days { display: flex; flex-wrap: wrap; gap: .6rem 1.4rem; }
.tt-copy h2 { display: flex; align-items: center; gap: .45rem; margin: 0 0 .25rem; }
.tt-actions { margin: var(--space-3) 0 var(--space-5); align-items: center; }
.tt-days a.tt-days__off:not(.is-active) { opacity: .62; border-style: dashed; }
.tt-days__tag { font-size: .68rem; font-weight: 600; padding: 0 .35rem; border-radius: 999px; background: rgba(239,68,68,.12); color: #b91c1c; }
.tt-days a.is-active .tt-days__tag { background: rgba(255,255,255,.25); color: inherit; }
.tt-hint { margin: -.25rem 0 var(--space-3); display: flex; align-items: center; gap: .35rem; flex-wrap: wrap; }
.tt-hint .icon { width: 15px; height: 15px; }

/* Special days */
.sd-step { display: inline-grid; place-items: center; width: 1.6rem; height: 1.6rem; border-radius: 50%; background: var(--brand); color: #fff; font-size: .85rem; margin-right: .35rem; }
.sd-form h2 { display: flex; align-items: center; margin: 0; }
.sd-when { max-width: 420px; }
.sd-kinds { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--space-3); }
.sd-kind { display: flex; gap: .75rem; align-items: flex-start; padding: .9rem 1rem; border: 2px solid var(--border); border-radius: 14px; cursor: pointer; background: var(--surface); }
.sd-kind input { margin-top: .3rem; accent-color: var(--brand); }
.sd-kind small { display: block; color: var(--muted); margin-top: .15rem; }
.sd-kind__ic { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; flex: none; }
.sd-kind--classes .sd-kind__ic { background: var(--ok-bg); color: var(--ok); }
.sd-kind--off .sd-kind__ic { background: var(--err-bg); color: var(--err); }
.sd-kind:has(input:checked) { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(79,70,229,.12); }
.sd-section { max-width: 420px; }
.sd-from { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.chip-link { display: inline-flex; padding: .25rem .7rem; border-radius: 999px; border: 1px solid var(--border); text-decoration: none; color: var(--text-2); font-size: .85rem; background: var(--surface); }
.chip-link:hover { border-color: var(--brand); color: var(--brand); }
.sd-classes { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: var(--space-3); }
.sd-class { border: 1px solid var(--border); border-radius: 12px; padding: .6rem .8rem .8rem; margin: 0; display: flex; flex-wrap: wrap; gap: .4rem 1rem; }
.sd-class legend { padding: 0 .3rem; }
.sd-pick { display: flex; align-items: center; gap: .4rem; margin: 0 0 var(--space-4); }
.sd-coming h2 { display: flex; align-items: center; gap: .45rem; margin: 0 0 var(--space-3); }
.sd-coming__list { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.sd-coming__item { display: grid; gap: .5rem; padding: .8rem .95rem; border-radius: 12px; border-left: 4px solid var(--ok); background: var(--surface-2, rgba(0,0,0,.03)); }
.sd-coming__top { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .8rem; }
.sd-coming__when { font-size: 1.02rem; }
.sd-coming__class { color: var(--text-2); }
.sd-coming__note { margin: 0; padding: .4rem .6rem; border-radius: 8px; background: var(--surface); }
.sd-coming__note span { font-weight: 700; color: var(--muted); }
.sd-coming__off { margin: 0; color: var(--err); font-weight: 600; }
.sd-coming__table { background: var(--surface); border-radius: 8px; }
.sd-coming__item--off { border-left-color: var(--err); }
.sd-coming__date { min-width: 7.5rem; display: grid; }
.sd-coming__date span { color: var(--muted); font-size: .82rem; }
.sd-coming__body { display: grid; gap: .3rem; }
.sd-coming__periods { list-style: none; margin: 0; padding: 0; display: grid; gap: .15rem; font-size: .9rem; }
.sd-coming__time { font-variant-numeric: tabular-nums; color: var(--muted); }
[data-sd-show][hidden] { display: none !important; }
.tt-table select.is-missing { border-color: var(--warn, #d97706); box-shadow: 0 0 0 2px rgba(217,119,6,.18); }
.tt-warn { margin: 0 var(--space-4) var(--space-3); }

/* Class timetable: class picker and the chosen section's week */
.ttp__head { display: flex; justify-content: space-between; align-items: center; gap: .6rem; flex-wrap: wrap; margin-bottom: var(--space-3); }
.ttp__head h2 { display: flex; align-items: center; gap: .45rem; margin: 0; }
.ttp__classes { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: .6rem; }
.ttp__class { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; padding: .55rem .7rem; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.ttp__cname { font-weight: 700; margin-right: .25rem; min-width: 5.5rem; }
.ttp__sec { display: inline-flex; align-items: center; gap: .35rem; padding: .25rem .65rem; border-radius: 999px; border: 1px solid var(--border); text-decoration: none; color: var(--text-2); font-weight: 600; font-size: .88rem; background: var(--surface-2, rgba(0,0,0,.03)); }
.ttp__sec:hover { border-color: var(--brand); color: var(--brand); }
.ttp__sec.is-active { background: var(--brand); border-color: var(--brand); color: #fff; }
.ttp__dot { width: 8px; height: 8px; border-radius: 50%; background: #cbd5e1; display: inline-block; flex: none; }
.ttp__sec.is-set .ttp__dot, .ttp__dot--set { background: #16a34a; }
.ttp__sec.is-active .ttp__dot { box-shadow: 0 0 0 2px rgba(255,255,255,.7); }
.ttp__legend { display: flex; align-items: center; gap: .35rem; margin: var(--space-3) 0 0; }
.ttp__legend .ttp__dot + * { margin-right: .6rem; }
.ttv__head { display: flex; justify-content: space-between; align-items: center; gap: .8rem; flex-wrap: wrap; padding: var(--space-4); border-bottom: 1px solid var(--border); }
.ttv__head h2 { margin: 0; }
.ttv__head p { margin: .2rem 0 0; }
.ttv__warn { color: var(--warn, #b45309); font-weight: 700; }
.ttv__empty { display: grid; justify-items: center; text-align: center; gap: .5rem; padding: 2.2rem 1rem 2.6rem; }
.ttv__empty h3 { margin: .3rem 0 0; }
.ttv__empty p { max-width: 520px; margin: 0 0 .6rem; }
.ttv__empty-ic { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 18px; background: var(--info-bg, #eef2ff); color: var(--brand); }
.ttv__empty-ic .icon { width: 30px; height: 30px; }
.sd-days { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: .55rem; }
.sd-day { position: relative; display: grid; gap: .1rem; padding: .6rem .75rem; border: 2px solid var(--border); border-radius: 12px; text-decoration: none; color: var(--text); background: var(--surface); }
.sd-day small { color: var(--muted); }
.sd-day:hover { border-color: var(--brand); }
.sd-day.is-off:not(.is-on) { border-style: dashed; opacity: .75; }
.sd-day.is-on { border-color: var(--brand); background: var(--brand); color: #fff; box-shadow: 0 6px 16px rgba(79,70,229,.25); }
.sd-day.is-on small { color: rgba(255,255,255,.85); }
.sd-day__tag { position: absolute; top: -.55rem; right: .5rem; font-size: .66rem; font-weight: 700; padding: .05rem .4rem; border-radius: 999px; background: #f59e0b; color: #fff; }
.sd-day--blank strong { font-style: italic; }
.tt-tcell { min-width: 9rem; }
.tt-together { display: flex; align-items: center; gap: .3rem; margin-top: .3rem; font-size: .8rem; font-weight: 600; color: var(--text-2); white-space: nowrap; }
.tt-together[hidden] { display: none; }
.tt-table tr.is-clash td { background: var(--err-bg, #fee2e2); }
.tt-table tr.is-clash select[data-tt-teacher] { border-color: var(--err, #dc2626); }
.tt-table tr.tt-msg td { padding: .35rem .8rem .6rem; font-size: .85rem; font-weight: 600; color: var(--err, #b91c1c); background: var(--err-bg, #fee2e2); border-top: 0; }
.tt-table tr.tt-msg.is-ok td { color: var(--ok, #15803d); background: var(--ok-bg, #dcfce7); }
.tt-table tr.tt-msg[hidden] { display: none; }
.tt-table tr.tt-msg.is-warn td { color: var(--warn, #b45309); background: var(--warn-bg, #fef3c7); }
@media print {
  body.print-table-mode .print-head--lh { display: block; margin: 0 0 .8rem; font-size: inherit; }
  body.print-table-mode .print-head--lh .doc-lh { margin: 0; }
}
@media print {
  body.print-table-mode .print-target .table-tools, body.print-table-mode .print-target .btn, body.print-table-mode .print-target .export-buttons { display: none !important; }
}
a.is-moved, .export-buttons[hidden] { display: none !important; }

/* ---------- Registration › Verify your mobile number (code by SMS) ---------- */
.pv { display: flex; flex-direction: column; gap: 1.05rem; }
.pv-steps { display: flex; align-items: center; gap: .45rem; margin: 0; padding: 0; list-style: none; font-size: .8rem; font-weight: 600; color: var(--muted); }
.pv-steps li { display: inline-flex; align-items: center; gap: .35rem; white-space: nowrap; }
.pv-steps i { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; font-style: normal; font-size: .72rem; background: var(--border); color: var(--text); }
.pv-steps .is-done i { background: var(--ok); color: #fff; }
.pv-steps .is-now { color: var(--brand-text); }
.pv-steps .is-now i { background: var(--brand); color: #fff; box-shadow: 0 0 0 4px var(--brand-soft); }
.pv-steps li.pv-steps__bar { flex: 1; min-width: 8px; height: 2px; background: var(--border); }
.pv-steps li.pv-steps__bar.is-on { background: var(--ok); }
.pv-ic { position: relative; display: grid; place-items: center; width: 76px; height: 76px; margin: .2rem auto 0; border-radius: 24px; color: #fff;
  background: linear-gradient(135deg, #6366f1, #8b5cf6); box-shadow: 0 14px 30px -10px rgba(99, 102, 241, .6); }
.pv-ic svg { width: 38px; height: 38px; }
.pv-ic em { position: absolute; top: -6px; right: -8px; padding: 3px 7px; border-radius: 999px; background: #fff; color: #4338ca; font-size: .68rem; font-style: normal; font-weight: 700; box-shadow: 0 4px 10px rgba(0, 0, 0, .12); }
.pv-ic--ok { background: linear-gradient(135deg, #22c55e, #15803d); box-shadow: 0 14px 30px -10px rgba(22, 163, 74, .6); animation: pv-pop .45s ease-out; }
.pv-ic--bad { background: linear-gradient(135deg, #f97316, #dc2626); box-shadow: 0 14px 30px -10px rgba(220, 38, 38, .5); }
@keyframes pv-pop { 0% { transform: scale(.6); } 70% { transform: scale(1.08); } 100% { transform: scale(1); } }
.pv-title { margin: 0; text-align: center; font-size: 1.5rem; }
.pv-lead { margin: 0; text-align: center; color: var(--muted); line-height: 1.6; }
.pv-lead strong { color: var(--text); letter-spacing: .02em; }
.pv-link { color: var(--brand-text); font-weight: 600; text-decoration: underline; }
.pv-link--btn { padding: 0; border: 0; background: none; font: inherit; cursor: pointer; }
.pv-link--btn:disabled { color: var(--muted); text-decoration: none; cursor: default; }
.pv-form { display: flex; flex-direction: column; gap: .8rem; }
.pv-otp { position: relative; display: flex; justify-content: center; gap: .6rem; }
.pv-otp__box { display: grid; place-items: center; flex: 0 1 52px; min-width: 0; height: 60px; border: 1.5px solid var(--border-strong, var(--border)); border-radius: 14px;
  background: var(--surface); font-size: 1.6rem; font-weight: 700; color: var(--text); transition: border-color .15s, box-shadow .15s, background .15s; }
.pv-otp__box.is-filled { border-color: #a5b4fc; background: var(--brand-soft); }
.pv-otp__box.is-current { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
/* the real input lies over the boxes (paste, SMS auto-fill and screen readers use it); without script it is a plain field */
.pv-otp__input { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; opacity: 0; font-size: 1.6rem; letter-spacing: 1em; color: transparent; caret-color: transparent; background: transparent; }
.pv-otp:not(.is-live) .pv-otp__box { display: none; }
.pv-otp:not(.is-live) .pv-otp__input { position: static; opacity: 1; height: 3.2rem; border: 1.5px solid var(--border); border-radius: 12px; text-align: center; letter-spacing: .4em; color: var(--text); caret-color: auto; }
.pv-otp--bad .pv-otp__box { border-color: var(--err); background: var(--err-bg); color: var(--err); }
.pv-otp--bad { animation: pv-shake .35s; }
.pv-otp--ok .pv-otp__box { border-color: var(--ok); background: var(--ok-bg); color: var(--ok); }
@keyframes pv-shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
.pv-meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .4rem; font-size: .85rem; color: var(--muted); }
.pv-meta b { color: var(--text); font-variant-numeric: tabular-nums; }
.pv-meta__bad { color: var(--err); font-weight: 600; }
.pv-btn { min-height: 50px; border-radius: 12px; font-size: 1rem; }
.pv-btn--lock { display: flex; align-items: center; justify-content: center; gap: .5rem; border: 1.5px dashed var(--border); background: var(--bg); color: var(--muted); cursor: not-allowed; }
.pv-resend { display: flex; flex-wrap: wrap; justify-content: center; align-items: baseline; gap: .35rem; font-size: .9rem; color: var(--muted); }
.pv-resend b { color: var(--text); font-variant-numeric: tabular-nums; }
.pv-or { display: flex; align-items: center; gap: .6rem; color: var(--muted); font-size: .75rem; font-weight: 600; }
.pv-or::before, .pv-or::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.pv-google { min-height: 50px; border-radius: 12px; font-weight: 700; }
.pv-google--lock { border-style: dashed; background: var(--bg); color: var(--muted); cursor: not-allowed; }
.pv-google--lock .google-btn__g { filter: grayscale(1); opacity: .45; }
.pv-google--lock:hover { background: var(--bg); }
.pv-google--live { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.pv-note { display: flex; gap: .5rem; margin: 0; padding: .65rem .8rem; border: 1px solid var(--border); border-radius: 12px; background: var(--bg); font-size: .82rem; color: var(--muted); line-height: 1.5; }
.pv-note--ok { border-color: #bbf7d0; background: var(--ok-bg); color: var(--ok); }
.pv-note--bad { border-color: #fecaca; background: var(--err-bg); color: var(--err); font-weight: 600; }
.pv-lock { display: flex; gap: .75rem; padding: .9rem 1rem; border: 1px solid #fecaca; border-radius: 14px; background: var(--err-bg); color: var(--err); }
.pv-lock div { display: flex; flex-direction: column; gap: .25rem; font-size: .9rem; }
.pv-lock strong { font-size: 1.05rem; font-variant-numeric: tabular-nums; }
@media (max-width: 520px) {
  .pv-steps { font-size: .7rem; gap: .3rem; }
  .pv-otp { gap: .4rem; }
  .pv-otp__box { height: 52px; font-size: 1.35rem; border-radius: 12px; }
  .pv-title { font-size: 1.3rem; }
}
.pv-lead strong { white-space: nowrap; }
.auth__card > .pv-steps { margin-bottom: 1.25rem; }
.reg__next { margin: -.35rem 0 0; text-align: center; }
.pv-label { display: block; margin-bottom: -.35rem; font-weight: 600; font-size: .9rem; }
.pv-accounts { display: flex; flex-direction: column; gap: .5rem; margin: 0; padding: 0; border: 0; }
.pv-account { display: flex; align-items: center; gap: .7rem; padding: .7rem .9rem; border: 1.5px solid var(--border); border-radius: 12px; cursor: pointer; }
.pv-account:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.pv-account span { display: flex; flex-direction: column; gap: .1rem; }
.pv-account small { color: var(--muted); font-weight: 400; }

/* A new password's rules, ticked while typing (Platform › Sign-in settings › Password rules) */
.pw-rules { list-style: none; margin: .4rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: .3rem .9rem; font-size: .82rem; color: var(--muted); }
.pw-rules[hidden] { display: none; }
.pw-rules li { display: inline-flex; align-items: center; gap: .35rem; transition: color .15s; }
.pw-rules__ic { width: 15px; height: 15px; flex: none; border-radius: 50%; border: 1.5px solid var(--border-strong, var(--border)); display: grid; place-items: center; transition: background .15s, border-color .15s; }
.pw-rules.is-typing li:not(.is-ok) { color: var(--err); }
.pw-rules.is-typing li:not(.is-ok) .pw-rules__ic { border-color: var(--err); }
.pw-rules li.is-ok { color: var(--ok); }
.pw-rules li.is-ok .pw-rules__ic { background: var(--ok); border-color: var(--ok); }
.pw-rules li.is-ok .pw-rules__ic::after { content: ""; width: 7px; height: 4px; border: solid #fff; border-width: 0 0 2px 2px; transform: translateY(-1px) rotate(-45deg); }

/* timetable: optional subjects taught at the same time share one box */
.timetable-period--together { border-color: var(--brand, #3b82f6); }
.timetable-period__or { border: 0; border-top: 1px dashed var(--border); margin: .3rem 0; width: 100%; }

/* Students' streams & optional subjects: the groups over the columns, and what each student studies */
.opt-head__group { text-align: center; font-weight: 600; background: var(--surface-2); }
.opt-grid .opt-subjects { font-size: .85rem; font-weight: 600; color: var(--brand, inherit); }
.opt-grid td:nth-child(2) { min-width: 12rem; }

/* Exam setup list: the name on one line where it fits, the buttons together */
.exam-list td:nth-child(2) { min-width: 13rem; }
.exam-list td:nth-child(4) { min-width: 11rem; }

/* Exam form: the classes that sit the exam */
.exam-classes { grid-column: 1 / -1; }
.exam-classes__list { display: flex; flex-wrap: wrap; gap: .3rem 1.2rem; margin: .4rem 0; }
.exam-class-pick { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; margin: 0 0 1rem; }

/* <select data-combo>: a drop-down you can type in (e.g. Link a parent or guardian) */
.combo { position: relative; }
.combo__input { width: 100%; }
.combo__list { position: absolute; z-index: 40; left: 0; right: 0; top: calc(100% + 4px); max-height: 280px; overflow-y: auto; margin: 0; padding: 4px 0; list-style: none;
  background: var(--surface, #fff); border: 1px solid var(--border, #d9dce6); border-radius: 10px; box-shadow: 0 10px 28px rgba(15, 23, 42, .14); }
.combo__list li { padding: .5rem .75rem; cursor: pointer; font-size: .92rem; line-height: 1.3; }
.combo__list li:hover, .combo__list li.is-active { background: var(--primary-soft, #eef0ff); }
.combo__list li[aria-selected="true"] { font-weight: 700; }
.combo__list .combo__new { color: var(--primary, #4f46e5); font-weight: 600; border-bottom: 1px solid var(--border, #e5e7eb); }
.combo__list .combo__none { color: var(--muted, #6b7280); cursor: default; font-size: .85rem; }
.combo__list .combo__none:hover { background: none; }
[data-new-guardian][hidden] { display: none; }

/* Student profile › Contact details */
.contact-tools { justify-content: flex-end; margin-bottom: .75rem; }
.contact-dl dd a { font-weight: 600; }
.contact-wa { display: inline-flex; vertical-align: middle; margin-left: .35rem; }
.contact-wa .icon, .contact-wa img, .contact-wa svg { width: 18px; height: 18px; }
.contact-person h3 { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; margin: 0 0 .4rem; }
.contact-person--next { border-top: 1px solid var(--border, #e5e7eb); margin-top: .9rem; padding-top: .9rem; }

.notif__pic { display: block; width: 100%; max-width: 420px; aspect-ratio: 2 / 1; object-fit: cover; border-radius: 12px; margin: .4rem 0; }

/* App notifications: the ready-made templates as picture cards, by kind, with a search */
.tpl-picker__search { width: 100%; max-width: 16rem; min-height: 38px; padding: .45rem .8rem; border-radius: 10px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); font: inherit; }
.tpl-picker__search:focus { outline: none; border-color: var(--brand); box-shadow: var(--focus); }
button.chip[data-tpl-cat] { padding: .35rem .8rem; cursor: pointer; color: var(--text-2); font: inherit; font-size: .88rem; }
button.chip[data-tpl-cat].is-active { color: var(--brand-ink); }
.tpl-picker__grid { position: relative; grid-auto-rows: max-content; max-height: 34rem; overflow-y: auto; padding: .2rem; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.tpl-picker__grid .email-card.is-picked { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand); }
.tpl-picker__grid .email-card[hidden] { display: none; }
.bc-pic__tag { position: absolute; left: .3rem; top: .3rem; padding: .05rem .45rem; border-radius: 999px; background: var(--brand); color: var(--brand-ink); font-size: .72rem; font-weight: 600; }
.auto-app__pic { width: 64px; height: 32px; object-fit: cover; border-radius: 6px; flex: none; }
.auto-app { display: flex; gap: .5rem; align-items: flex-start; min-width: 13rem; }

/* An app's link page (Google Play and / or the .apk) */
.sapp-landing { max-width: 26rem; margin: 2rem auto; text-align: center; }
.sapp-landing__head { display: flex; gap: 1rem; align-items: center; justify-content: center; text-align: left; }
.sapp-landing__head img { border-radius: 18px; }
.sapp-landing__head h1 { margin: 0; font-size: 1.35rem; }
.sapp-landing__btn { width: 100%; justify-content: center; }

/* Our mobile app (school): the bigger QR code, and the A4 poster to print */
.sapp-qr--big svg { width: 220px; height: 220px; }
.app-poster { max-width: 180mm; margin: 0 auto; padding: 10mm 0; text-align: center; color: #101828; }
.app-poster__head { display: flex; gap: 1.2rem; align-items: center; justify-content: center; text-align: left; }
.app-poster__head img { border-radius: 24px; }
.app-poster__head h1 { margin: .1rem 0; font-size: 2.2rem; line-height: 1.15; }
.app-poster__school { margin: 0; font-weight: 600; color: #475467; }
.app-poster__sub { margin: 0; color: #475467; }
.app-poster__lead { font-size: 1.15rem; margin: 1.4rem 0 1rem; }
.app-poster__qr { display: inline-block; padding: 1rem; border: 3px solid #101828; border-radius: 1.2rem; background: #fff; }
.app-poster__qr svg { display: block; width: 95mm; height: 95mm; }
.app-poster__scan { font-weight: 700; font-size: 1.2rem; margin: .8rem 0 1.4rem; }
.app-poster__steps { list-style: none; margin: 0 auto; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: .8rem; text-align: left; }
.app-poster__steps li { display: flex; gap: .6rem; align-items: flex-start; border: 1px solid #d0d5dd; border-radius: .8rem; padding: .7rem; }
.app-poster__steps strong { flex: none; width: 2rem; height: 2rem; border-radius: 50%; background: #101828; color: #fff; display: grid; place-items: center; }
.app-poster__steps small { color: #475467; }
.app-poster__link { margin-top: 1.2rem; font-size: .85rem; color: #667085; overflow-wrap: anywhere; }
@media (max-width: 640px) { .app-poster__steps { grid-template-columns: 1fr; } }
.sapp-dash { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
.sapp-dash__qr svg { width: 96px; height: 96px; }
.sapp-dash h2 { margin: 0; display: flex; gap: .4rem; align-items: center; }

/* The app's page (its QR code / link): the school, the app, Download, steps, sharing */
body.appdl { background: #f4f5fa; min-height: 100vh; margin: 0; color: #101828; }
.appdl__wrap { max-width: 30rem; margin: 0 auto; padding: 1rem 1rem 2rem; display: grid; gap: 1rem; }
.appdl__hero { position: relative; text-align: center; color: var(--brand-ink, #fff); background: var(--brand, #4f46e5); background-image: linear-gradient(160deg, rgb(255 255 255 / .14), rgb(0 0 0 / .12)); border-radius: 1.2rem; padding: 1.4rem 1rem 1.2rem; box-shadow: 0 14px 30px -18px rgb(16 24 40 / .6); }
.appdl__lang { position: absolute; right: .7rem; top: .7rem; color: inherit; font-size: .85rem; border: 1px solid rgb(255 255 255 / .6); border-radius: 999px; padding: .2rem .7rem; text-decoration: none; }
.appdl__school { display: inline-flex; align-items: center; gap: .5rem; font-weight: 600; background: rgb(255 255 255 / .18); margin-top: 1rem; border-radius: 999px; padding: .3rem .8rem .3rem .3rem; margin-bottom: 1rem; }
.appdl__school .brand-logo { width: 32px; height: 32px; border-radius: 50%; object-fit: contain; background: #fff; }
.appdl__logo { width: 32px; height: 32px; border-radius: 50%; background: #fff; color: var(--brand, #4f46e5); display: grid; place-items: center; font-weight: 700; }
.appdl__icon { display: block; margin: 0 auto .7rem; border-radius: 22px; box-shadow: 0 10px 30px -8px rgb(0 0 0 / .45); background: #fff; }
.appdl__hero h1 { margin: 0; font-size: 1.5rem; line-height: 1.2; color: inherit; }
.appdl__tag { margin: .15rem 0 .35rem; opacity: .92; font-size: .95rem; font-style: italic; }
.appdl__meta { margin: .3rem 0 .4rem; opacity: .9; font-size: .9rem; }
.appdl__badge { display: inline-block; margin: 0; font-size: .75rem; background: rgb(255 255 255 / .2); border-radius: 999px; padding: .1rem .6rem; }
.appdl__card { background: #fff; border-radius: 1.1rem; padding: 1.1rem; box-shadow: 0 8px 24px -16px rgb(16 24 40 / .35); display: grid; gap: .8rem; }
.appdl__card h2 { margin: 0; font-size: 1.05rem; }
.appdl__btn { width: 100%; justify-content: center; font-size: 1.05rem; }
.appdl__note { margin: 0; background: #fef6e7; border-radius: .7rem; padding: .7rem; }
.appdl__code { border: 2px dashed var(--brand, #4f46e5); border-radius: .8rem; padding: .7rem; display: grid; gap: .3rem; font-size: .85rem; color: #475467; }
.appdl__code-row { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.appdl__code strong { font-size: 1.35rem; color: #101828; letter-spacing: .02em; overflow-wrap: anywhere; }
.appdl__steps { margin: 0; padding-left: 1.2rem; display: grid; gap: .45rem; font-size: .92rem; }
.appdl__features { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; }
.appdl__features li { display: grid; justify-items: center; gap: .25rem; background: #f4f5fa; border-radius: .7rem; padding: .6rem .3rem; font-size: .85rem; text-align: center; }
.appdl__features .icon { color: var(--brand, #4f46e5); width: 1.4rem; height: 1.4rem; }
.appdl__small { margin: 0; font-size: .82rem; color: #667085; }
.appdl__share { display: flex; flex-wrap: wrap; gap: .5rem; }
.appdl__share .btn { flex: 1 1 8rem; justify-content: center; }
.appdl__link { margin: 0; font-size: .78rem; color: #667085; overflow-wrap: anywhere; }
.appdl__qr { display: none; align-items: center; gap: .8rem; }
.appdl__qr .sapp-qr svg { width: 170px; height: 170px; }
.appdl__qr strong { display: block; font-size: 1.05rem; margin-bottom: .2rem; }
@media (min-width: 900px) { .appdl__qr { display: flex; } }
.appdl__foot { text-align: center; font-size: .8rem; color: #98a2b3; margin: 0; line-height: 1.6; }
.appdl__foot a { color: inherit; }

.appdl__sharebtn { border: 2px solid var(--brand, #4f46e5); color: var(--brand-text, var(--brand, #4f46e5)); background: #fff; }
.appdl__share[hidden] { display: none; }
.appdl__linkrow { display: flex; gap: .5rem; align-items: center; justify-content: space-between; }
.appdl__linkrow .appdl__link { flex: 1; }
.appdl__sharebtn[hidden] { display: none; }
.appdl__qrbtn { justify-self: start; width: max-content; }

.push-ask { display: flex; gap: .75rem; align-items: center; margin-bottom: 1rem; } .push-ask .grow { flex: 1; }
.push-ask[hidden], .push-ask [hidden] { display: none; }
.table tr[hidden] { display: none; }
input[data-row-filter] { margin-top: .75rem; width: 100%; max-width: 28rem; min-height: 40px; padding: .5rem .8rem; border-radius: 10px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); font: inherit; }
input[data-row-filter]:focus { outline: none; border-color: var(--brand); box-shadow: var(--focus); }

/* search as you type: the plain Search / Show button is not needed */
.live-hidden { display: none !important; }
.topbar-search { position: relative; overflow: visible; }
.topbar-search__ic { display: grid; place-items: center; width: 38px; height: 100%; flex: none; color: var(--muted); pointer-events: none; }
.topbar-search__ic .icon { width: 18px; height: 18px; }
.suggest { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 60; min-width: 18rem; max-height: 70vh; overflow-y: auto; padding: .35rem;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 12px 32px rgba(15, 23, 42, .16); }
.suggest[hidden] { display: none; }
.suggest a { display: flex; flex-direction: column; gap: 1px; padding: .5rem .65rem; border-radius: 8px; color: var(--text); text-decoration: none; }
.suggest a small { color: var(--muted); font-size: .78rem; }
.suggest a:hover, .suggest a.is-active { background: var(--brand-soft, rgba(79, 70, 229, .08)); }
.suggest__group { padding: .45rem .65rem .2rem; font-size: .7rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.suggest__none { margin: 0; padding: .6rem .65rem; color: var(--muted); }
.suggest a.suggest__all { flex-direction: row; font-weight: 600; color: var(--brand, #4f46e5); border-top: 1px solid var(--border); border-radius: 0 0 8px 8px; margin-top: .25rem; }

/* Form boxes outside a .field (a search box above a list, a select next to a button) look like every other box.
   Zero specificity: any page's own style still wins. */
:where(main :is(input[type="search"], input[type="text"], input[type="number"], input[type="email"], input[type="tel"], input[type="date"], select):not(.field *, .table td > *, .topbar-search *)) {
  min-height: 40px; padding: .5rem .8rem; border-radius: 10px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); font: inherit; max-width: 100%;
}
:where(main :is(input[type="search"], input[type="text"], input[type="number"], input[type="email"], input[type="tel"], input[type="date"], select):not(.field *, .table td > *, .topbar-search *)):focus {
  outline: none; border-color: var(--brand); box-shadow: var(--focus);
}
:where(main input[type="search"]:not(.field *, .table td > *)) { width: 100%; max-width: 26rem; }
.table tr.live-none td { padding: 1rem; }

.pwset > summary { list-style: none; display: inline-flex; } .pwset > summary::-webkit-details-marker { display: none; }
.pwset [data-pwset-own][hidden] { display: none; }
.pw-short-warn { color: var(--warn, #b45309); } .pw-short-warn[hidden] { display: none; }
.sapp-auto { padding: .9rem 1rem; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2, #f8fafc); }

/* Floating buttons (WhatsApp, eSchool AI's bird): room at the end of the panel's pages, so a last Save button is never under them */
body.app:has(.wa-chat, [data-ailx]:not([hidden])) main.content { padding-bottom: calc(var(--content-pad-bottom, 0px) + 96px); }

/* "Design Technosoft" in copyright lines: a quiet link to the company's website */
.company-link { color: inherit; text-decoration: underline; text-decoration-color: color-mix(in srgb, currentColor 45%, transparent); text-underline-offset: 2px; }
.company-link:hover { text-decoration-color: currentColor; }

/* Public websites: only the copyright line at the very bottom (no footer) */
.site-copy { margin: 0; padding: 18px 16px 22px; text-align: center; font-size: .82rem; color: #8a93a6; }

/* App tour (2.10.374): the welcome, then each button lit up with a short note */
.tour { position: fixed; inset: 0; z-index: 1000; }
.tour--dim { background: rgb(12 14 40 / .55); display: grid; place-items: center; padding: 16px; }
.tour__hole { position: fixed; border-radius: 14px; box-shadow: 0 0 0 9999px rgb(12 14 40 / .6); outline: 3px solid #fff; outline-offset: 2px; transition: all .25s ease; pointer-events: none; }
.tour__tip { position: fixed; background: var(--surface); color: var(--text); border-radius: 16px; padding: 16px 16px 12px; box-shadow: 0 14px 34px rgb(0 0 0 / .28); transition: top .25s ease, left .25s ease; }
.tour__tip h4 { margin: 0 0 4px; font-size: 1rem; }
.tour__tip p { margin: 0 0 12px; color: var(--muted); font-size: .9rem; line-height: 1.45; }
.tour__foot { display: flex; align-items: center; gap: 8px; }
.tour__n { flex: 1; font-size: .8rem; color: var(--muted); }
.tour__welcome { width: min(400px, 100%); background: var(--surface); color: var(--text); border-radius: 22px; padding: 24px 20px 16px; text-align: center; box-shadow: 0 20px 50px rgb(0 0 0 / .3); display: grid; gap: 8px; }
.tour__welcome h3 { margin: 4px 0 0; font-size: 1.2rem; }
.tour__welcome p { margin: 0 0 8px; color: var(--muted); line-height: 1.45; }
.tour__logo { width: 72px; height: 72px; margin: 0 auto 4px; border-radius: 18px; background: #fff; display: grid; place-items: center; box-shadow: 0 10px 24px rgb(15 23 42 / .16); overflow: hidden; }
.tour__logo img { width: 78%; height: 78%; object-fit: contain; }
.tour__logo--mark { background: var(--brand); color: #fff; font-size: 30px; }
@media (max-width: 640px) { .tour--dim { place-items: end stretch; padding: 0; } .tour__welcome { width: 100%; border-radius: 22px 22px 0 0; padding-bottom: 24px; } }

/* eSchool AI change cards (2.10.377): the record, the facts, from → to, Confirm / Schedule / Cancel; small once decided */
.chg { --c1: #818cf8; --c2: #4f46e5; --c3: #3730a3; margin-top: .8rem; background: var(--surface); border: 1px solid var(--border); border-radius: 18px; box-shadow: 0 10px 28px rgb(15 23 42 / .08); overflow: hidden; max-width: 34rem; }
.chg--danger { --c1: #fb7185; --c2: #e11d48; --c3: #9f1239; }
.chg--money { --c1: #fbbf24; --c2: #d97706; --c3: #92400e; }
.chg--ok { --c1: #4ade80; --c2: #16a34a; --c3: #166534; }
.chg--sched { --c1: #a78bfa; --c2: #7c3aed; --c3: #5b21b6; }
.chg--off { --c1: #cbd5e1; --c2: #94a3b8; --c3: #64748b; opacity: .85; }
.chg__head { display: flex; align-items: center; gap: .7rem; padding: .9rem .95rem .6rem; }
.chg__ic { width: 2.5rem; height: 2.5rem; flex: none; border-radius: 12px; display: grid; place-items: center; color: #fff; background: linear-gradient(145deg, var(--c1), var(--c2) 55%, var(--c3)); }
.chg__title { flex: 1; min-width: 0; display: grid; }
.chg__title strong { font-size: 1rem; }
.chg__title small { color: var(--muted); font-size: .8rem; }
.chg__tag { font-size: .72rem; font-weight: 700; padding: .25rem .6rem; border-radius: 99px; color: var(--c3); background: var(--gray-bg, #f1f3f9); background: color-mix(in srgb, var(--c2) 13%, var(--surface)); white-space: nowrap; }
.chg__subject { margin: 0 .95rem; padding: .6rem .75rem; border-radius: 14px; background: var(--surface-2); display: flex; gap: .65rem; align-items: center; }
.chg__subject b { display: block; }
.chg__subject small { color: var(--muted); font-size: .8rem; }
.chg__logo { width: 2.3rem; height: 2.3rem; flex: none; border-radius: 10px; background: var(--surface); display: grid; place-items: center; font-weight: 800; color: var(--brand); box-shadow: 0 2px 6px rgb(0 0 0 / .08); }
.chg__facts { margin: .3rem .95rem 0; font-size: .88rem; }
.chg__facts div { display: flex; justify-content: space-between; gap: 1rem; padding: .45rem 0; border-bottom: 1px dashed var(--border); }
.chg__facts div:last-child { border-bottom: 0; }
.chg__facts dt { color: var(--muted); }
.chg__facts dd { margin: 0; font-weight: 600; text-align: right; word-break: break-word; }
.chg__what { margin: .5rem .95rem .2rem; padding: .65rem .8rem; border-radius: 14px; background: var(--gray-bg, #f1f3f9); background: color-mix(in srgb, var(--c2) 8%, var(--surface)); font-size: .88rem; line-height: 1.5; }
.chg__what p { margin: 0; }
.chg__from { margin-bottom: .25rem !important; display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; }
.chg__pill { padding: .1rem .55rem; border-radius: 99px; font-size: .8rem; font-weight: 700; background: var(--surface-2); }
.chg__pill--to { background: var(--gray-bg, #f1f3f9); background: color-mix(in srgb, var(--c2) 18%, var(--surface)); color: var(--c3); }
.chg__result { margin: 0 .95rem .2rem; color: var(--muted); }
.chg__form { display: grid; gap: .55rem; padding: .7rem .95rem .2rem; }
.chg__edit { border: 1px solid var(--border); border-radius: 12px; padding: .5rem .7rem; }
.chg__edit summary { cursor: pointer; font-weight: 600; font-size: .88rem; }
.chg__edit .stack { margin-top: .6rem; }
.chg__confirm { width: 100%; justify-content: center; border: 0; color: #fff; font-weight: 700; padding: .7rem 1rem; border-radius: 14px; background: linear-gradient(135deg, var(--c1), var(--c2) 55%, var(--c3)); box-shadow: 0 8px 18px -8px var(--c2); }
.chg__confirm:hover { filter: brightness(1.05); }
.chg__row { display: flex; gap: .5rem; flex-wrap: wrap; padding: .2rem .95rem .9rem; }
.chg__form .chg__row { padding: 0 0 .7rem; }
.chg__row > .btn, .chg__row > form { flex: 1 1 8rem; }
.chg__row > form .btn, .chg__row > .btn { width: 100%; justify-content: center; }
.chg--small .chg__head { padding-bottom: .5rem; }
.chg__schedwrap { padding: 0 .95rem .9rem; }
.chg__sched { display: grid; gap: .55rem; padding: .75rem; border: 1px solid var(--border); border-radius: 14px; }
.chg__q { margin: 0; font-weight: 700; }
.chg__opts { display: flex; flex-wrap: wrap; gap: .4rem; }
.chg__opt input { position: absolute; opacity: 0; pointer-events: none; }
.chg__opt span { display: inline-block; padding: .35rem .7rem; border-radius: 99px; border: 1px solid var(--border-strong); font-size: .85rem; cursor: pointer; }
.chg__opt input:checked + span { background: #7c3aed; border-color: #7c3aed; color: #fff; }
.chg__opt input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }
.chg__own { display: grid; gap: .2rem; }
.chg__go { width: 100%; justify-content: center; background: linear-gradient(135deg, #818cf8, #7c3aed) !important; border: 0; }
.chg__sched p.small { margin: 0; }

/* An app on Google Play (Super Admin's page): its QR code for everyone and the .apk's own QR code for testing (2.10.379) */
.sapp-qrs { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 1rem; }
.sapp-q { margin: 0; padding: 1rem; border-radius: 16px; border: 1px solid var(--border); display: grid; gap: .55rem; justify-items: center; text-align: center; }
.sapp-q--play { border-color: #bbf7d0; background: color-mix(in srgb, #16a34a 6%, var(--surface)); }
.sapp-q--apk { border-color: #fde68a; background: color-mix(in srgb, #d97706 7%, var(--surface)); }
.sapp-q figcaption { display: grid; gap: .35rem; justify-items: center; }
.sapp-q figcaption b { display: inline-flex; align-items: center; gap: .35rem; }
.sapp-q__tag { font-size: .72rem; font-weight: 700; padding: .2rem .6rem; border-radius: 99px; background: #dcfce7; color: #15803d; }
.sapp-q--apk .sapp-q__tag { background: #fef3c7; color: #92400e; }
.sapp-q p { margin: 0; }
.sapp-q .field { width: 100%; }
.appdl__test { display: inline-block; margin: .4rem 0 0; font-size: .78rem; font-weight: 700; background: #fef3c7; color: #92400e; border-radius: 999px; padding: .2rem .7rem; }
/* done through an AI app: marked on the screen for the people who work in the system, never on paper (AiMark) */
.ai-mark { color: var(--muted, #6b7280); }
@media print { .ai-mark { display: none !important; } }

/* Salary payment › Pay several: the name readable, the amounts on one line */
.pay-many td:nth-child(2) { min-width: 12rem; }
.pay-many td.num, .pay-many th.num { white-space: nowrap; }

/* Messages: an attachment as a card with View / Download (2.10.408) */
.msg-file { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; border: 1px solid var(--border, #e3e5f2); border-radius: 12px; padding: .65rem .75rem; }
.msg-file__kind { width: 2.6rem; height: 2.6rem; border-radius: 10px; display: grid; place-items: center; color: #fff; font-weight: 700; font-size: .7rem; background: #64748b; flex: none; }
.msg-file__kind--pdf { background: #e5484d; }
.msg-file__kind--img { background: #12a37f; }
.msg-file__name { flex: 1 1 12rem; min-width: 0; overflow-wrap: anywhere; }
.msg-file__name small { display: block; }
.docview__pages--image { align-items: flex-start; }
.docview__pages--image canvas { margin: 0 auto; }

/* A read-only link box with a copy button at its right end (2.10.409) */
.copy-field { position: relative; display: block; }
.copy-field > input { width: 100%; padding-right: 3rem; }
.copy-field__btn { position: absolute; top: 50%; right: .35rem; transform: translateY(-50%); width: 2.25rem; height: 2.25rem; border-radius: 8px; border: 0; background: transparent; color: var(--muted, #667085); display: grid; place-items: center; cursor: pointer; }
.copy-field__btn:hover, .copy-field__btn:focus-visible { background: var(--bg-muted, #eef0f6); color: var(--primary, #4f46e5); }
.copy-field__btn.is-done { color: #12a37f; }

/* The page's Back button: top right, the same place on every inner page (2.10.410) */
.page-back { display: flex; justify-content: flex-end; margin-bottom: .25rem; }
.page-back + .page-head, .page-back + * .page-head:first-child { margin-top: 0; }
[data-back] .icon, .page-back__btn .icon { width: 1.05em; height: 1.05em; }


/* Messages as chats — Messenger-like (2.10.411) */
.chat { display: grid; grid-template-columns: minmax(16rem, 22rem) 1fr; height: calc(100vh - 9rem); min-height: 28rem; background: var(--surface, #fff); border-radius: 18px; overflow: hidden; box-shadow: 0 4px 18px rgba(30, 35, 90, .08); }
.chat > * { min-width: 0; }
.chat-list { display: flex; flex-direction: column; border-right: 1px solid var(--border, #eceef7); min-height: 0; }
.chat-list__head { display: flex; align-items: center; gap: .5rem; padding: 1rem 1rem .5rem; }
.chat-list__head h1 { margin: 0; font-size: 1.3rem; flex: 1; }
.chat-search { display: flex; align-items: center; gap: .5rem; margin: .25rem 1rem .5rem; background: var(--bg-muted, #f2f3fa); border-radius: 12px; padding: 0 .75rem; color: var(--muted, #8a8fa8); }
.chat-search input { border: 0; background: transparent; flex: 1; padding: .6rem 0; min-width: 0; outline: none; color: inherit; font: inherit; }
.chat-search .icon { width: 1rem; height: 1rem; }
.chat-tabs { display: flex; gap: .35rem; padding: 0 1rem .5rem; overflow-x: auto; scrollbar-width: none; }
.chat-tab { flex: none; font-size: .78rem; font-weight: 700; padding: .35rem .7rem; border-radius: 999px; background: var(--bg-muted, #f2f3fa); color: var(--text-2, #555); text-decoration: none; border: 0; cursor: pointer; }
.chat-tab.is-on { background: #e8e7ff; color: #4f46e5; }
.chat-tab b { background: #e5484d; color: #fff; border-radius: 999px; padding: 0 .4rem; font-size: .7rem; }
.chat-rows { flex: 1; overflow-y: auto; min-height: 0; }
.chat-row { display: flex; gap: .7rem; align-items: center; padding: .6rem 1rem; color: inherit; text-decoration: none; width: 100%; text-align: left; background: none; border: 0; cursor: pointer; font: inherit; }
.chat-row:hover { background: var(--bg-muted, #f6f6fd); }
.chat-row.is-on { background: #f1f0ff; }
.chat-row__main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .05rem; }
.chat-row__top { display: flex; justify-content: space-between; gap: .5rem; }
.chat-row__top strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-row__top small { color: var(--muted, #8a8fa8); font-size: .72rem; flex: none; }
.chat-row__who { font-size: .74rem; color: #4f46e5; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-row__last { display: flex; justify-content: space-between; gap: .4rem; font-size: .8rem; color: var(--muted, #6b7090); }
.chat-row__last > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-row.is-unread .chat-row__last > span, .chat-row.is-unread strong { color: var(--text, #1f2340); font-weight: 700; }
.chat-badge { background: #e5484d; color: #fff; border-radius: 999px; font-size: .7rem; padding: 0 .45rem; line-height: 1.4; flex: none; }
.chat-empty { padding: 1rem; }
.chat-av { width: 2.9rem; height: 2.9rem; border-radius: 50%; flex: none; display: grid; place-items: center; color: #fff; font-weight: 700; font-size: .9rem; overflow: hidden; background: #c7c9de; }
.chat-av img { width: 100%; height: 100%; object-fit: cover; }
.chat-av--c0 { background: #4f46e5; } .chat-av--c1 { background: #0ea5e9; } .chat-av--c2 { background: #10b981; } .chat-av--c3 { background: #f59e0b; }
.chat-av--c4 { background: #ef4444; } .chat-av--c5 { background: #8b5cf6; } .chat-av--c6 { background: #ec4899; } .chat-av--c7 { background: #14b8a6; }
.chat-av--md { width: 2.6rem; height: 2.6rem; }
.chat-pane { display: flex; flex-direction: column; min-height: 0; background: var(--bg-soft, #f7f8fc); }
.chat-pane__empty { margin: auto; text-align: center; color: var(--muted, #6b7090); display: flex; flex-direction: column; align-items: center; gap: .75rem; padding: 2rem; }
.chat-pane__icon .icon { width: 3rem; height: 3rem; opacity: .5; }
.chat-pane__head { display: flex; align-items: center; gap: .75rem; padding: .7rem 1rem; background: var(--surface, #fff); border-bottom: 1px solid var(--border, #eceef7); }
.chat-pane__who { flex: 1; min-width: 0; }
.chat-pane__who h2 { margin: 0; font-size: 1.05rem; }
.chat-pane__who p { margin: 0; font-size: .78rem; color: #4f46e5; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-pane__who h2 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-pane__who--new { display: flex; gap: .7rem; align-items: center; }
.chat-menu { position: relative; flex: none; }
.chat-menu summary { list-style: none; width: 2.3rem; height: 2.3rem; border-radius: 10px; display: grid; place-items: center; cursor: pointer; background: var(--bg-muted, #f2f3fa); color: #4f46e5; }
.chat-menu summary::-webkit-details-marker { display: none; }
.chat-menu__list { position: absolute; right: 0; top: calc(100% + .35rem); z-index: 20; background: var(--surface, #fff); border-radius: 12px; box-shadow: 0 10px 30px rgba(0, 0, 0, .15); padding: .4rem; display: flex; flex-direction: column; gap: .3rem; min-width: 11rem; }
.chat-menu__list .btn { width: 100%; justify-content: flex-start; }
.chat-back { display: none; color: inherit; }
.chat-msgs { flex: 1; overflow-y: auto; padding: 1rem 1.25rem; display: flex; flex-direction: column; gap: .45rem; min-height: 0; }
.chat-day { align-self: center; font-size: .72rem; color: var(--muted, #8a8fa8); background: var(--border, #eceef7); border-radius: 999px; padding: .15rem .7rem; margin: .4rem 0; }
.chat-msg { max-width: min(36rem, 75%); align-self: flex-start; background: var(--surface, #fff); border-radius: 18px 18px 18px 6px; padding: .55rem .8rem; box-shadow: 0 1px 2px rgba(0, 0, 0, .05); }
.chat-msg--me { align-self: flex-end; background: #4f46e5; color: #fff; border-radius: 18px 18px 6px 18px; }
.chat-msg__from { display: block; font-size: .75rem; color: #4f46e5; }
.chat-msg__text { margin: 0; white-space: normal; overflow-wrap: anywhere; line-height: 1.45; }
.chat-msg__time { display: block; text-align: right; font-size: .68rem; opacity: .7; margin-top: .15rem; }
.chat-file { display: flex; align-items: center; gap: .6rem; background: var(--bg-muted, #f2f3fa); border-radius: 12px; padding: .45rem .5rem; margin-top: .35rem; color: var(--text, #1f2340); }
.chat-msg--me .chat-file { background: rgba(255, 255, 255, .16); color: #fff; }
.chat-file__kind { width: 2.4rem; height: 2.4rem; border-radius: 9px; display: grid; place-items: center; color: #fff; font-size: .66rem; font-weight: 800; background: #64748b; flex: none; }
.chat-file__kind--pdf { background: #e5484d; }
.chat-file__kind--img { background: #12a37f; }
.chat-file__name { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.chat-file__name strong { font-size: .82rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-file__name small { font-size: .7rem; opacity: .8; }
.chat-file__btn { display: inline-flex; align-items: center; gap: .3rem; border-radius: 8px; padding: .35rem .6rem; font-size: .75rem; font-weight: 700; text-decoration: none; background: #fff; color: #4f46e5; border: 1px solid rgba(79, 70, 229, .25); }
.chat-file__btn .icon { width: .95rem; height: .95rem; }
.chat-msg:not(.chat-msg--me) .chat-file__btn--view { background: #4f46e5; color: #fff; }
.chat-vo { white-space: nowrap; background: #fff4e5; color: #b25e00; border-radius: 999px; padding: 0 .4rem; font-weight: 700; }
.chat-compose { display: flex; align-items: flex-end; gap: .5rem; padding: .7rem 1rem; background: var(--surface, #fff); border-top: 1px solid var(--border, #eceef7); }
.chat-compose textarea { flex: 1; resize: none; border: 0; background: var(--bg-muted, #f2f3fa); border-radius: 22px; padding: .65rem 1rem; font: inherit; max-height: 10rem; min-height: 2.6rem; outline: none; color: inherit; }
.chat-attach { width: 2.6rem; height: 2.6rem; border-radius: 12px; background: var(--bg-muted, #f2f3fa); display: grid; place-items: center; color: #4f46e5; cursor: pointer; flex: none; }
.chat-attach { position: relative; overflow: hidden; }
.chat-attach input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; font-size: 0; }
.chat-send { width: 2.6rem; height: 2.6rem; border-radius: 50%; background: #4f46e5; color: #fff; border: 0; display: grid; place-items: center; cursor: pointer; flex: none; }
.chat-send:disabled { opacity: .6; }
.chat-sheet { position: fixed; inset: 0; background: rgba(15, 20, 50, .45); display: grid; place-items: center; z-index: 200; padding: 1rem; }
.chat-sheet[hidden] { display: none; }
.chat-sheet__box { width: min(28rem, 100%); background: var(--surface, #fff); border-radius: 18px; padding: 1rem; display: flex; flex-direction: column; gap: .7rem; box-shadow: 0 20px 50px rgba(0, 0, 0, .25); }
.chat-sheet__box--tall { height: min(36rem, 90vh); }
.chat-sheet__head { display: flex; align-items: center; justify-content: space-between; }
.chat-sheet__head h2 { margin: 0; font-size: 1.1rem; }
.chat-sheet__file { display: flex; gap: .75rem; align-items: center; border: 1px solid var(--border, #eceef7); border-radius: 14px; padding: .7rem; }
.chat-sheet__file small { display: block; color: var(--muted, #6b7090); }
.chat-sheet textarea { border: 0; background: var(--bg-muted, #f2f3fa); border-radius: 12px; padding: .6rem .8rem; font: inherit; resize: vertical; color: inherit; }
.chat-sheet__btns { display: flex; justify-content: flex-end; gap: .5rem; }
.chat-opt { display: flex; gap: .6rem; align-items: flex-start; border: 2px solid var(--border, #eceef7); border-radius: 14px; padding: .7rem; cursor: pointer; }
.chat-opt:has(input:checked) { border-color: #4f46e5; background: #f5f4ff; }
.chat-opt small { display: block; color: var(--muted, #6b7090); }
.chat-opt input { margin-top: .2rem; }
.chat-search--sheet { margin: 0; }
.chat-rows--people .chat-row { padding: .5rem .25rem; }
.chat-many { display: block; text-align: center; border: 1px dashed #c9cce6; border-radius: 12px; padding: .65rem; font-weight: 700; color: #4f46e5; text-decoration: none; }
.linkish { background: none; border: 0; padding: 0; color: #4f46e5; text-decoration: underline; cursor: pointer; font: inherit; }
[data-theme="dark"] .chat-row.is-on, [data-theme="dark"] .chat-tab.is-on { background: rgba(99, 102, 241, .22); color: #c7d2fe; }
@media (max-width: 760px) {
  .chat { grid-template-columns: 1fr; height: calc(100vh - 7.5rem); border-radius: 14px; }
  .chat--open .chat-list { display: none; }
  .chat:not(.chat--open) .chat-pane { display: none; }
  .chat-back { display: inline-grid; place-items: center; width: 2rem; height: 2rem; }
  .chat-msg { max-width: 85%; }
}
/* chat: a photo shown in the chat itself; ticks sent ✓ / delivered ✓✓ / seen ✓✓ blue (2.10.412) */
.chat-photo { position: relative; margin-top: .35rem; max-width: 240px; border-radius: 14px; overflow: hidden; background: rgba(0, 0, 0, .06); }
.chat-photo > a:first-child { display: block; }
.chat-photo img { display: block; width: 100%; max-height: 320px; object-fit: cover; }
.chat-photo__dl { position: absolute; right: .4rem; bottom: .4rem; width: 2rem; height: 2rem; border-radius: 50%; display: grid; place-items: center; background: rgba(15, 23, 42, .6); color: #fff; }
.chat-photo__dl .icon { width: 1rem; height: 1rem; }
.chat-photo__vo { position: absolute; left: .4rem; top: .4rem; }
.chat-tick { font-weight: 800; font-size: .95rem; line-height: 1; letter-spacing: -.14em; margin-left: .15rem; }
.chat-tick--sent, .chat-tick--delivered { opacity: .75; }
.chat-tick--seen { color: #7dd3fc; opacity: 1; text-shadow: 0 0 1px rgba(14, 165, 233, .6); }
.chat-msg:not(.chat-msg--me) .chat-tick--seen { color: #0ea5e9; }
/* chat: the name opens "View profile"; full screen (only the chat); no floating AI / WhatsApp over Send (2.10.413) */
.chat-whomenu { position: relative; flex: 1; min-width: 0; }
.chat-whomenu summary { list-style: none; display: flex; align-items: center; gap: .75rem; cursor: pointer; border-radius: 12px; padding: .15rem .35rem .15rem 0; min-width: 0; }
.chat-whomenu summary::-webkit-details-marker { display: none; }
.chat-whomenu summary:hover { background: var(--bg-muted, #f2f3fa); }
.chat-whomenu .chat-pane__who { display: flex; flex-direction: column; }
.chat-pane__name { font-size: 1.05rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-pane__label { font-size: .78rem; color: #4f46e5; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-whomenu__caret { flex: none; color: #64748b; }
.chat-whomenu__caret .icon { width: 1rem; height: 1rem; }
.chat-whomenu[open] .chat-whomenu__caret { transform: rotate(180deg); }
.chat-whomenu__list { left: 0; right: auto; }
.chat-max { flex: none; width: 2.3rem; height: 2.3rem; border-radius: 10px; border: 0; display: grid; place-items: center; cursor: pointer; background: var(--bg-muted, #f2f3fa); color: #4f46e5; }
.chat-max .icon { width: 1.1rem; height: 1.1rem; }
.chat.is-max { position: fixed; inset: 0; z-index: 70; height: 100vh; height: 100dvh; border-radius: 0; }
body.chat-maxed { overflow: hidden; }
body:has([data-chat]) .wa-chat, body:has([data-chat]) .ailx { display: none !important; }
@media (max-width: 760px) { .chat-max { display: none; } }
/* chat: who is active (green dot, "Active now" strip, "Active 5 min ago"); the kinds slide sideways (2.10.415) */
.chat-av { position: relative; overflow: visible; }
.chat-av img { border-radius: 50%; }
.chat-dot { position: absolute; right: 0; bottom: 0; width: 28%; height: 28%; min-width: 10px; min-height: 10px; border-radius: 50%; background: #22c55e; border: 2px solid var(--surface, #fff); box-sizing: border-box; }
.chat-ago { color: #64748b; font-weight: 500; }
.chat-ago.is-on { color: #16a34a; font-weight: 700; }
.chat-pane__seen { display: block; font-size: .74rem; color: #64748b; line-height: 1.2; }
.chat-pane__seen:empty { display: none; }
.chat-pane__seen.is-on { color: #16a34a; font-weight: 700; }
.chat-pane__seen.is-on::before { content: "● "; }
.chat-tabs-wrap { position: relative; }
.chat-tabs-wrap .chat-tabs { scroll-behavior: auto; }
.chat-tabs-wrap.is-more-r .chat-tabs { -webkit-mask-image: linear-gradient(90deg, #000 82%, transparent); mask-image: linear-gradient(90deg, #000 82%, transparent); }
.chat-tabs-wrap.is-more-l .chat-tabs { -webkit-mask-image: linear-gradient(90deg, transparent, #000 18%); mask-image: linear-gradient(90deg, transparent, #000 18%); }
.chat-tabs-wrap.is-more-l.is-more-r .chat-tabs { -webkit-mask-image: linear-gradient(90deg, transparent, #000 15%, #000 85%, transparent); mask-image: linear-gradient(90deg, transparent, #000 15%, #000 85%, transparent); }
.chat-tabs-arr { position: absolute; top: calc(50% - .25rem); transform: translateY(-50%); z-index: 2; width: 1.7rem; height: 1.7rem; border-radius: 50%; border: 0; background: var(--surface, #fff); box-shadow: 0 2px 8px rgba(0, 0, 0, .18); color: #4f46e5; font-size: 1.1rem; font-weight: 800; line-height: 1; cursor: pointer; display: grid; place-items: center; }
.chat-tabs-arr[hidden] { display: none; }
.chat-tabs-arr--l { left: .4rem; }
.chat-tabs-arr--r { right: .4rem; }
.chat-active { padding: .1rem 0 .4rem; border-bottom: 1px solid var(--border, #eceef7); }
.chat-active[hidden] { display: none; }
.chat-active__h { margin: .2rem 1rem .35rem; font-size: .68rem; letter-spacing: .06em; text-transform: uppercase; color: #64748b; font-weight: 700; }
.chat-active__row { display: flex; gap: .8rem; overflow-x: auto; scrollbar-width: none; padding: 0 1rem .2rem; }
.chat-active__p { flex: none; width: 3.4rem; display: flex; flex-direction: column; align-items: center; gap: .25rem; font-size: .7rem; color: var(--text, #1f2340); text-decoration: none; text-align: center; }
.chat-active__p span:last-child { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-me-active { display: flex; align-items: flex-start; gap: .6rem; padding: .7rem 1rem; border-top: 1px solid var(--border, #eceef7); font-size: .78rem; font-weight: 600; margin-top: auto; }
.chat-me-active small { display: block; font-weight: 400; color: #64748b; font-size: .7rem; }
.chat-switch { flex: none; width: 2.3rem; height: 1.3rem; border-radius: 999px; border: 0; background: #cbd5e1; position: relative; cursor: pointer; padding: 0; margin-top: .1rem; }
.chat-switch.is-on { background: #22c55e; }
.chat-switch__knob { position: absolute; top: .15rem; left: .15rem; width: 1rem; height: 1rem; border-radius: 50%; background: #fff; transition: left .15s; }
.chat-switch.is-on .chat-switch__knob { left: 1.15rem; }
/* chat groups (2.10.417): New group, a group's lines, who wrote what, its info */
.chat-list__btns { display: flex; gap: .4rem; margin-left: auto; }
.chat-list__head h1 { margin-right: auto; }
.chat-av--group { background: linear-gradient(135deg, #6366f1, #0ea5e9); color: #fff; }
.chat-av--group .icon { width: 55%; height: 55%; }
.chat-av--sm { width: 1.9rem; height: 1.9rem; font-size: .66rem; }
.chat-whomenu--group { border: 0; background: none; padding: .15rem .35rem .15rem 0; display: flex; align-items: center; gap: .75rem; cursor: pointer; text-align: left; color: inherit; font: inherit; border-radius: 12px; }
.chat-whomenu--group:hover { background: var(--bg-muted, #f2f3fa); }
.chat-sys { align-self: center; margin: .35rem auto; max-width: 85%; text-align: center; font-size: .74rem; color: #64748b; background: var(--bg-muted, #eef0f7); border-radius: 999px; padding: .25rem .8rem; }
.chat-gmsg { display: flex; align-items: flex-end; gap: .45rem; max-width: 100%; }
.chat-gmsg .chat-msg { margin-left: 0; }
.chat-msg__from small { font-weight: 600; opacity: .75; }
.chat-from--c0 { color: #4f46e5; } .chat-from--c1 { color: #0284c7; } .chat-from--c2 { color: #059669; } .chat-from--c3 { color: #d97706; }
.chat-from--c4 { color: #dc2626; } .chat-from--c5 { color: #7c3aed; } .chat-from--c6 { color: #db2777; } .chat-from--c7 { color: #0d9488; }
.chat-seenby { font-size: .68rem; opacity: .85; }
.chat-cant { margin: 0; padding: .9rem 1rem; text-align: center; font-size: .85rem; color: #64748b; background: var(--surface, #fff); border-top: 1px solid var(--border, #eceef7); }
.chat-allgroups { display: flex; align-items: center; gap: .4rem; margin: 0 1rem .5rem; font-size: .8rem; font-weight: 700; color: #4f46e5; text-decoration: none; }
.chat-allgroups .icon { width: 1rem; height: 1rem; }
.chat-gphoto { display: flex; flex-direction: column; align-items: center; gap: .3rem; cursor: pointer; position: relative; margin-bottom: .5rem; }
.chat-gphoto input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.chat-gphoto__pic { width: 5rem; height: 5rem; border-radius: 50%; background: #eef0fb; color: #4f46e5; display: grid; place-items: center; overflow: hidden; }
.chat-gphoto__pic .icon { width: 2.2rem; height: 2.2rem; }
.chat-gphoto__pic img { width: 100%; height: 100%; object-fit: cover; }
.chat-gphoto__cam { position: absolute; top: 3.4rem; left: calc(50% + 1.3rem); width: 1.8rem; height: 1.8rem; border-radius: 50%; background: #4f46e5; color: #fff; display: grid; place-items: center; }
.chat-gphoto__cam .icon { width: 1rem; height: 1rem; }
.chat-gphoto small { color: #64748b; font-size: .74rem; }
.chat-ginput { width: 100%; box-sizing: border-box; border: 1px solid var(--border, #dfe2f0); border-radius: 12px; padding: .65rem .8rem; font: inherit; margin-bottom: .6rem; background: var(--surface, #fff); color: inherit; }
[data-group-new].is-add .chat-gphoto, [data-group-new].is-add .chat-ginput, [data-group-new].is-add .chat-gonly { display: none; }
.chat-gchips { display: flex; flex-wrap: wrap; gap: .35rem; margin: .4rem 0; }
.chat-gchip { border: 0; background: #eef0fb; color: #4f46e5; border-radius: 999px; padding: .25rem .6rem; font-size: .76rem; font-weight: 700; cursor: pointer; }
.chat-row--pick { position: relative; }
.chat-pick { margin-left: auto; width: 1.4rem; height: 1.4rem; border-radius: 6px; border: 2px solid #c7cbe0; display: grid; place-items: center; color: transparent; font-weight: 800; font-size: .8rem; flex: none; }
.chat-row--pick.is-on .chat-pick { background: #4f46e5; border-color: #4f46e5; color: #fff; }
.chat-gonly { margin: .5rem 0 0; }
.chat-ginfo { position: fixed; top: 0; right: 0; bottom: 0; width: min(380px, 100vw); z-index: 85; background: var(--surface, #fff); box-shadow: -12px 0 40px rgba(15, 23, 42, .18); overflow-y: auto; padding: .8rem 1rem 1.2rem; box-sizing: border-box; }
.chat-ginfo[hidden] { display: none; }
.chat-ginfo__head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; min-height: 2.2rem; }
.chat-ginfo__head .icon-btn { margin-left: auto; }
.chat-ginfo__top { text-align: center; }
.chat-ginfo__top h3 { margin: .5rem 0 .15rem; font-size: 1.1rem; }
.chat-ginfo__top small { color: #64748b; font-size: .76rem; }
.chat-ginfo__pic { width: 5.5rem; height: 5.5rem; border-radius: 50%; margin: 0 auto; background: linear-gradient(135deg, #6366f1, #0ea5e9); color: #fff; display: grid; place-items: center; position: relative; overflow: visible; }
.chat-ginfo__pic img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.chat-ginfo__pic > .icon { width: 2.4rem; height: 2.4rem; }
.chat-ginfo__pic.can { cursor: pointer; }
.chat-ginfo__pic input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.chat-ginfo__pic .chat-gphoto__cam { top: auto; bottom: -2px; left: auto; right: -2px; }
.chat-ginfo__rename { display: flex; gap: .4rem; justify-content: center; }
.chat-ginfo__rename input { flex: 1; min-width: 0; border: 1px solid var(--border, #dfe2f0); border-radius: 10px; padding: .4rem .6rem; font: inherit; }
.chat-ginfo__btns { display: flex; flex-wrap: wrap; gap: .4rem; justify-content: center; margin: .8rem 0; }
.chat-ginfo__only { display: flex; gap: .4rem; align-items: center; margin: .2rem 0 .6rem; }
.chat-ginfo__h { font-weight: 700; margin: .6rem 0 .2rem; font-size: .85rem; }
.chat-ginfo__m { display: flex; align-items: center; gap: .65rem; padding: .5rem .1rem; border-bottom: 1px solid var(--border, #f1f2f8); text-decoration: none; color: inherit; }
.chat-ginfo__m .chat-row__main { flex: 1; min-width: 0; }
.chat-ginfo__m .chat-menu__list { right: 0; }
.chat-gadmin { display: inline-block; background: #dcfce7; color: #15803d; border-radius: 6px; padding: 0 .35rem; font-size: .66rem; font-weight: 700; vertical-align: middle; }
.chat-ginfo__end { display: flex; flex-direction: column; gap: .4rem; margin-top: 1rem; }
.chat-newg { padding-left: .55rem; padding-right: .55rem; }
.chat-newg .icon { width: 1.15rem; height: 1.15rem; }
/* chat: "… is typing" (2.10.419) */
.chat-typing { display: flex; align-items: center; gap: .45rem; margin: .2rem 0 .3rem; color: #64748b; font-size: .74rem; }
.chat-typing__faces { display: flex; }
.chat-typing__faces .chat-av + .chat-av { margin-left: -.5rem; box-shadow: 0 0 0 2px var(--bg-soft, #f7f8fc); }
.chat-typing__bub { display: inline-flex; gap: 3px; align-items: center; background: var(--surface, #fff); border-radius: 14px; padding: .45rem .6rem; box-shadow: 0 1px 3px rgba(0, 0, 0, .08); }
.chat-typing__bub i { width: 6px; height: 6px; border-radius: 50%; background: #94a3b8; animation: chat-dots 1.2s infinite ease-in-out; }
.chat-typing__bub i:nth-child(2) { animation-delay: .15s; }
.chat-typing__bub i:nth-child(3) { animation-delay: .3s; }
@keyframes chat-dots { 0%, 60%, 100% { transform: translateY(0); opacity: .5; } 30% { transform: translateY(-4px); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .chat-typing__bub i { animation: none; } }
/* chat list: New chat + ⋮ (New group, All groups, Show when I'm active) (2.10.421) */
.chat-listmenu summary { width: 2.1rem; height: 2.1rem; }
.chat-listmenu__list { min-width: 17rem; padding: .35rem; gap: .1rem; z-index: 30; }
.chat-listmenu__item { display: flex; align-items: center; gap: .6rem; width: 100%; border: 0; background: none; padding: .6rem .65rem; border-radius: 10px; font: inherit; font-size: .86rem; font-weight: 600; color: var(--text, #1f2340); text-decoration: none; cursor: pointer; text-align: left; }
.chat-listmenu__item:hover { background: var(--bg-muted, #f2f3fa); }
.chat-listmenu__item .icon { width: 1.1rem; height: 1.1rem; color: #4f46e5; flex: none; }
.chat-listmenu__item[hidden] { display: none; }
.chat-me-active--menu { border-top: 1px solid var(--border, #eceef7); margin: .25rem 0 0; padding: .65rem .65rem .4rem; }

/* chat themes (2.10.421): the chat's background (some with little pictures), the bubbles, Send and "seen" */
.chat-tick--seen { color: var(--ct-seen, #fde047) !important; opacity: 1; background: none; box-shadow: none; padding: 0; text-shadow: 0 0 1px rgba(0, 0, 0, .25); }
.chat-tick--seen::before { content: none; }
.chat-theme--ocean { --ct-seen: #fde047; --ct-accent: #0284c7; --ct-me: linear-gradient(135deg,#0284c7,#06b6d4); }
.chat-theme--ocean .chat-msgs { background: linear-gradient(180deg,#e0f2fe,#f0f9ff); }
.chat-theme--ocean .chat-msg--me { background: linear-gradient(135deg,#0284c7,#06b6d4); color: #fff; }
.chat-theme--ocean .chat-msg:not(.chat-msg--me) { background: #fff; color: #0c4a6e; }
.chat-theme--ocean .chat-send { background: linear-gradient(135deg,#0284c7,#06b6d4); }
.chat-tswatch--ocean .chat-tswatch__pic { background: linear-gradient(180deg,#e0f2fe,#f0f9ff); }
.chat-theme--sunset { --ct-seen: #1e3a8a; --ct-accent: #ea580c; --ct-me: linear-gradient(135deg,#f97316,#ec4899); }
.chat-theme--sunset .chat-msgs { background: linear-gradient(180deg,#fff1e6,#ffe4ec); }
.chat-theme--sunset .chat-msg--me { background: linear-gradient(135deg,#f97316,#ec4899); color: #fff; }
.chat-theme--sunset .chat-msg:not(.chat-msg--me) { background: #fff; color: #7c2d12; }
.chat-theme--sunset .chat-send { background: linear-gradient(135deg,#f97316,#ec4899); }
.chat-tswatch--sunset .chat-tswatch__pic { background: linear-gradient(180deg,#fff1e6,#ffe4ec); }
.chat-theme--forest { --ct-seen: #fde047; --ct-accent: #059669; --ct-me: linear-gradient(135deg,#059669,#22c55e); }
.chat-theme--forest .chat-msgs { background: linear-gradient(180deg,#ecfdf5,#f0fdf4); }
.chat-theme--forest .chat-msg--me { background: linear-gradient(135deg,#059669,#22c55e); color: #fff; }
.chat-theme--forest .chat-msg:not(.chat-msg--me) { background: #fff; color: #064e3b; }
.chat-theme--forest .chat-send { background: linear-gradient(135deg,#059669,#22c55e); }
.chat-tswatch--forest .chat-tswatch__pic { background: linear-gradient(180deg,#ecfdf5,#f0fdf4); }
.chat-theme--berry { --ct-seen: #fde047; --ct-accent: #9333ea; --ct-me: linear-gradient(135deg,#9333ea,#db2777); }
.chat-theme--berry .chat-msgs { background: linear-gradient(180deg,#faf5ff,#fdf2f8); }
.chat-theme--berry .chat-msg--me { background: linear-gradient(135deg,#9333ea,#db2777); color: #fff; }
.chat-theme--berry .chat-msg:not(.chat-msg--me) { background: #fff; color: #581c87; }
.chat-theme--berry .chat-send { background: linear-gradient(135deg,#9333ea,#db2777); }
.chat-tswatch--berry .chat-tswatch__pic { background: linear-gradient(180deg,#faf5ff,#fdf2f8); }
.chat-theme--midnight { --ct-seen: #fde047; --ct-accent: #7c3aed; --ct-me: linear-gradient(135deg,#6366f1,#8b5cf6); }
.chat-theme--midnight .chat-msgs { background: #0f172a; }
.chat-theme--midnight .chat-msg--me { background: linear-gradient(135deg,#6366f1,#8b5cf6); color: #fff; }
.chat-theme--midnight .chat-msg:not(.chat-msg--me) { background: #1e293b; color: #e2e8f0; }
.chat-theme--midnight .chat-send { background: linear-gradient(135deg,#6366f1,#8b5cf6); }
.chat-theme--midnight .chat-sys, .chat-day { background: rgba(255, 255, 255, .1); color: #cbd5e1; }
.chat-theme--midnight .chat-typing { color: #cbd5e1; }
.chat-tswatch--midnight .chat-tswatch__pic { background: #0f172a; }
.chat-theme--himalaya { --ct-seen: #fde047; --ct-accent: #1d4ed8; --ct-me: linear-gradient(135deg,#1d4ed8,#38bdf8); }
.chat-theme--himalaya .chat-msgs { background: linear-gradient(180deg,#f8fafc,#e0e7ff); }
.chat-theme--himalaya .chat-msg--me { background: linear-gradient(135deg,#1d4ed8,#38bdf8); color: #fff; }
.chat-theme--himalaya .chat-msg:not(.chat-msg--me) { background: #fff; color: #1e293b; }
.chat-theme--himalaya .chat-send { background: linear-gradient(135deg,#1d4ed8,#38bdf8); }
.chat-tswatch--himalaya .chat-tswatch__pic { background: linear-gradient(180deg,#f8fafc,#e0e7ff); }
.chat-theme--rhododendron { --ct-seen: #fde047; --ct-accent: #dc2626; --ct-me: linear-gradient(135deg,#dc2626,#e11d48); }
.chat-theme--rhododendron .chat-msgs { background: linear-gradient(180deg,#fff1f2,#fff7ed); }
.chat-theme--rhododendron .chat-msg--me { background: linear-gradient(135deg,#dc2626,#e11d48); color: #fff; }
.chat-theme--rhododendron .chat-msg:not(.chat-msg--me) { background: #fff; color: #7f1d1d; }
.chat-theme--rhododendron .chat-send { background: linear-gradient(135deg,#dc2626,#e11d48); }
.chat-tswatch--rhododendron .chat-tswatch__pic { background: linear-gradient(180deg,#fff1f2,#fff7ed); }
.chat-theme--mango { --ct-seen: #1e3a8a; --ct-accent: #d97706; --ct-me: linear-gradient(135deg,#f59e0b,#f97316); }
.chat-theme--mango .chat-msgs { background: linear-gradient(180deg,#fefce8,#fff7ed); }
.chat-theme--mango .chat-msg--me { background: linear-gradient(135deg,#f59e0b,#f97316); color: #fff; }
.chat-theme--mango .chat-msg:not(.chat-msg--me) { background: #fff; color: #78350f; }
.chat-theme--mango .chat-send { background: linear-gradient(135deg,#f59e0b,#f97316); }
.chat-tswatch--mango .chat-tswatch__pic { background: linear-gradient(180deg,#fefce8,#fff7ed); }
.chat-theme--mint { --ct-seen: #1e3a8a; --ct-accent: #0d9488; --ct-me: linear-gradient(135deg,#14b8a6,#2dd4bf); }
.chat-theme--mint .chat-msgs { background: linear-gradient(180deg,#f0fdfa,#ecfeff); }
.chat-theme--mint .chat-msg--me { background: linear-gradient(135deg,#14b8a6,#2dd4bf); color: #fff; }
.chat-theme--mint .chat-msg:not(.chat-msg--me) { background: #fff; color: #134e4a; }
.chat-theme--mint .chat-send { background: linear-gradient(135deg,#14b8a6,#2dd4bf); }
.chat-tswatch--mint .chat-tswatch__pic { background: linear-gradient(180deg,#f0fdfa,#ecfeff); }
.chat-theme--clouds { --ct-seen: #fde047; --ct-accent: #0369a1; --ct-me: linear-gradient(135deg,#0369a1,#0ea5e9); }
.chat-theme--clouds .chat-msgs { background: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22140%22%20height%3D%22120%22%20viewBox%3D%220%200%20140%20120%22%3E%3Cpath%20transform%3D%22translate%2814%2022%29%20scale%281%29%22%20fill%3D%22%23fff%22%20fill-opacity%3D%22.9%22%20d%3D%22M0%2018h36a9%209%200%200%200-3-18a12%2012%200%200%200-23-3a9%209%200%200%200-10%2021z%22%2F%3E%3Cpath%20transform%3D%22translate%2866%2078%29%20scale%280.8%29%22%20fill%3D%22%23fff%22%20fill-opacity%3D%22.85%22%20d%3D%22M0%2018h36a9%209%200%200%200-3-18a12%2012%200%200%200-23-3a9%209%200%200%200-10%2021z%22%2F%3E%3C%2Fsvg%3E") repeat, linear-gradient(180deg,#7dd3fc,#bae6fd); background-size: 120px 120px, auto; }
.chat-theme--clouds .chat-msg--me { background: linear-gradient(135deg,#0369a1,#0ea5e9); color: #fff; }
.chat-theme--clouds .chat-msg:not(.chat-msg--me) { background: #fff; color: #0c4a6e; }
.chat-theme--clouds .chat-send { background: linear-gradient(135deg,#0369a1,#0ea5e9); }
.chat-tswatch--clouds .chat-tswatch__pic { background: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22140%22%20height%3D%22120%22%20viewBox%3D%220%200%20140%20120%22%3E%3Cpath%20transform%3D%22translate%2814%2022%29%20scale%281%29%22%20fill%3D%22%23fff%22%20fill-opacity%3D%22.9%22%20d%3D%22M0%2018h36a9%209%200%200%200-3-18a12%2012%200%200%200-23-3a9%209%200%200%200-10%2021z%22%2F%3E%3Cpath%20transform%3D%22translate%2866%2078%29%20scale%280.8%29%22%20fill%3D%22%23fff%22%20fill-opacity%3D%22.85%22%20d%3D%22M0%2018h36a9%209%200%200%200-3-18a12%2012%200%200%200-23-3a9%209%200%200%200-10%2021z%22%2F%3E%3C%2Fsvg%3E") repeat, linear-gradient(180deg,#7dd3fc,#bae6fd); }
.chat-theme--pinkclouds { --ct-seen: #1e3a8a; --ct-accent: #db2777; --ct-me: linear-gradient(135deg,#db2777,#f97316); }
.chat-theme--pinkclouds .chat-msgs { background: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22140%22%20height%3D%22120%22%20viewBox%3D%220%200%20140%20120%22%3E%3Cpath%20transform%3D%22translate%2814%2022%29%20scale%281%29%22%20fill%3D%22%23fff%22%20fill-opacity%3D%22.85%22%20d%3D%22M0%2018h36a9%209%200%200%200-3-18a12%2012%200%200%200-23-3a9%209%200%200%200-10%2021z%22%2F%3E%3Cpath%20transform%3D%22translate%2870%2080%29%20scale%280.75%29%22%20fill%3D%22%23fff%22%20fill-opacity%3D%22.8%22%20d%3D%22M0%2018h36a9%209%200%200%200-3-18a12%2012%200%200%200-23-3a9%209%200%200%200-10%2021z%22%2F%3E%3Ccircle%20cx%3D%22105%22%20cy%3D%2220%22%20r%3D%222%22%20fill%3D%22%23fff%22%20fill-opacity%3D%22.9%22%2F%3E%3C%2Fsvg%3E") repeat, linear-gradient(180deg,#fbcfe8,#fde68a); background-size: 120px 120px, auto; }
.chat-theme--pinkclouds .chat-msg--me { background: linear-gradient(135deg,#db2777,#f97316); color: #fff; }
.chat-theme--pinkclouds .chat-msg:not(.chat-msg--me) { background: #fff; color: #831843; }
.chat-theme--pinkclouds .chat-send { background: linear-gradient(135deg,#db2777,#f97316); }
.chat-tswatch--pinkclouds .chat-tswatch__pic { background: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22140%22%20height%3D%22120%22%20viewBox%3D%220%200%20140%20120%22%3E%3Cpath%20transform%3D%22translate%2814%2022%29%20scale%281%29%22%20fill%3D%22%23fff%22%20fill-opacity%3D%22.85%22%20d%3D%22M0%2018h36a9%209%200%200%200-3-18a12%2012%200%200%200-23-3a9%209%200%200%200-10%2021z%22%2F%3E%3Cpath%20transform%3D%22translate%2870%2080%29%20scale%280.75%29%22%20fill%3D%22%23fff%22%20fill-opacity%3D%22.8%22%20d%3D%22M0%2018h36a9%209%200%200%200-3-18a12%2012%200%200%200-23-3a9%209%200%200%200-10%2021z%22%2F%3E%3Ccircle%20cx%3D%22105%22%20cy%3D%2220%22%20r%3D%222%22%20fill%3D%22%23fff%22%20fill-opacity%3D%22.9%22%2F%3E%3C%2Fsvg%3E") repeat, linear-gradient(180deg,#fbcfe8,#fde68a); }
.chat-theme--love { --ct-seen: #fde047; --ct-accent: #e11d48; --ct-me: linear-gradient(135deg,#e11d48,#f43f5e); }
.chat-theme--love .chat-msgs { background: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22120%22%20height%3D%22120%22%20viewBox%3D%220%200%20120%20120%22%3E%3Cpath%20transform%3D%22translate%2830%2030%29%20scale%281%29%22%20fill%3D%22%23e11d48%22%20fill-opacity%3D%22.14%22%20d%3D%22M0%2012c-8-6-14-10-14-17a7%207%200%200%201%2014-2a7%207%200%200%201%2014%202c0%207-6%2011-14%2017z%22%2F%3E%3Cpath%20transform%3D%22translate%2890%2085%29%20scale%280.7%29%22%20fill%3D%22%23e11d48%22%20fill-opacity%3D%22.12%22%20d%3D%22M0%2012c-8-6-14-10-14-17a7%207%200%200%201%2014-2a7%207%200%200%201%2014%202c0%207-6%2011-14%2017z%22%2F%3E%3Cpath%20transform%3D%22translate%2895%2025%29%20scale%280.4%29%22%20fill%3D%22%23e11d48%22%20fill-opacity%3D%22.12%22%20d%3D%22M0%2012c-8-6-14-10-14-17a7%207%200%200%201%2014-2a7%207%200%200%201%2014%202c0%207-6%2011-14%2017z%22%2F%3E%3Cpath%20transform%3D%22translate%2825%2095%29%20scale%280.45%29%22%20fill%3D%22%23e11d48%22%20fill-opacity%3D%22.12%22%20d%3D%22M0%2012c-8-6-14-10-14-17a7%207%200%200%201%2014-2a7%207%200%200%201%2014%202c0%207-6%2011-14%2017z%22%2F%3E%3C%2Fsvg%3E") repeat, linear-gradient(180deg,#fff1f2,#ffe4e6); background-size: 120px 120px, auto; }
.chat-theme--love .chat-msg--me { background: linear-gradient(135deg,#e11d48,#f43f5e); color: #fff; }
.chat-theme--love .chat-msg:not(.chat-msg--me) { background: #fff; color: #881337; }
.chat-theme--love .chat-send { background: linear-gradient(135deg,#e11d48,#f43f5e); }
.chat-tswatch--love .chat-tswatch__pic { background: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22120%22%20height%3D%22120%22%20viewBox%3D%220%200%20120%20120%22%3E%3Cpath%20transform%3D%22translate%2830%2030%29%20scale%281%29%22%20fill%3D%22%23e11d48%22%20fill-opacity%3D%22.14%22%20d%3D%22M0%2012c-8-6-14-10-14-17a7%207%200%200%201%2014-2a7%207%200%200%201%2014%202c0%207-6%2011-14%2017z%22%2F%3E%3Cpath%20transform%3D%22translate%2890%2085%29%20scale%280.7%29%22%20fill%3D%22%23e11d48%22%20fill-opacity%3D%22.12%22%20d%3D%22M0%2012c-8-6-14-10-14-17a7%207%200%200%201%2014-2a7%207%200%200%201%2014%202c0%207-6%2011-14%2017z%22%2F%3E%3Cpath%20transform%3D%22translate%2895%2025%29%20scale%280.4%29%22%20fill%3D%22%23e11d48%22%20fill-opacity%3D%22.12%22%20d%3D%22M0%2012c-8-6-14-10-14-17a7%207%200%200%201%2014-2a7%207%200%200%201%2014%202c0%207-6%2011-14%2017z%22%2F%3E%3Cpath%20transform%3D%22translate%2825%2095%29%20scale%280.45%29%22%20fill%3D%22%23e11d48%22%20fill-opacity%3D%22.12%22%20d%3D%22M0%2012c-8-6-14-10-14-17a7%207%200%200%201%2014-2a7%207%200%200%201%2014%202c0%207-6%2011-14%2017z%22%2F%3E%3C%2Fsvg%3E") repeat, linear-gradient(180deg,#fff1f2,#ffe4e6); }
.chat-theme--lovenight { --ct-seen: #fde047; --ct-accent: #be185d; --ct-me: linear-gradient(135deg,#e11d48,#a21caf); }
.chat-theme--lovenight .chat-msgs { background: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22120%22%20height%3D%22120%22%20viewBox%3D%220%200%20120%20120%22%3E%3Cpath%20transform%3D%22translate%2830%2030%29%20scale%281%29%22%20fill%3D%22%23fb7185%22%20fill-opacity%3D%22.22%22%20d%3D%22M0%2012c-8-6-14-10-14-17a7%207%200%200%201%2014-2a7%207%200%200%201%2014%202c0%207-6%2011-14%2017z%22%2F%3E%3Cpath%20transform%3D%22translate%2890%2085%29%20scale%280.7%29%22%20fill%3D%22%23fb7185%22%20fill-opacity%3D%22.18%22%20d%3D%22M0%2012c-8-6-14-10-14-17a7%207%200%200%201%2014-2a7%207%200%200%201%2014%202c0%207-6%2011-14%2017z%22%2F%3E%3Ccircle%20cx%3D%2295%22%20cy%3D%2225%22%20r%3D%221.6%22%20fill%3D%22%23fff%22%20fill-opacity%3D%22.5%22%2F%3E%3Ccircle%20cx%3D%2220%22%20cy%3D%2295%22%20r%3D%221.4%22%20fill%3D%22%23fff%22%20fill-opacity%3D%22.45%22%2F%3E%3C%2Fsvg%3E") repeat, #1f1027; background-size: 120px 120px, auto; }
.chat-theme--lovenight .chat-msg--me { background: linear-gradient(135deg,#e11d48,#a21caf); color: #fff; }
.chat-theme--lovenight .chat-msg:not(.chat-msg--me) { background: #2e1a3a; color: #fce7f3; }
.chat-theme--lovenight .chat-send { background: linear-gradient(135deg,#e11d48,#a21caf); }
.chat-theme--lovenight .chat-sys, .chat-day { background: rgba(255, 255, 255, .1); color: #cbd5e1; }
.chat-theme--lovenight .chat-typing { color: #cbd5e1; }
.chat-tswatch--lovenight .chat-tswatch__pic { background: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22120%22%20height%3D%22120%22%20viewBox%3D%220%200%20120%20120%22%3E%3Cpath%20transform%3D%22translate%2830%2030%29%20scale%281%29%22%20fill%3D%22%23fb7185%22%20fill-opacity%3D%22.22%22%20d%3D%22M0%2012c-8-6-14-10-14-17a7%207%200%200%201%2014-2a7%207%200%200%201%2014%202c0%207-6%2011-14%2017z%22%2F%3E%3Cpath%20transform%3D%22translate%2890%2085%29%20scale%280.7%29%22%20fill%3D%22%23fb7185%22%20fill-opacity%3D%22.18%22%20d%3D%22M0%2012c-8-6-14-10-14-17a7%207%200%200%201%2014-2a7%207%200%200%201%2014%202c0%207-6%2011-14%2017z%22%2F%3E%3Ccircle%20cx%3D%2295%22%20cy%3D%2225%22%20r%3D%221.6%22%20fill%3D%22%23fff%22%20fill-opacity%3D%22.5%22%2F%3E%3Ccircle%20cx%3D%2220%22%20cy%3D%2295%22%20r%3D%221.4%22%20fill%3D%22%23fff%22%20fill-opacity%3D%22.45%22%2F%3E%3C%2Fsvg%3E") repeat, #1f1027; }
.chat-theme--starry { --ct-seen: #fde047; --ct-accent: #4f46e5; --ct-me: linear-gradient(135deg,#4f46e5,#0ea5e9); }
.chat-theme--starry .chat-msgs { background: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22120%22%20height%3D%22120%22%20viewBox%3D%220%200%20120%20120%22%3E%3Cg%20fill%3D%22%23fde68a%22%20fill-opacity%3D%22.35%22%3E%3Cpath%20d%3D%22M30%2020l2.5%207l7%202.5l-7%202.5l-2.5%207l-2.5-7l-7-2.5l7-2.5z%22%2F%3E%3Cpath%20d%3D%22M90%2075l1.8%205l5%201.8l-5%201.8l-1.8%205l-1.8-5l-5-1.8l5-1.8z%22%2F%3E%3Ccircle%20cx%3D%2295%22%20cy%3D%2225%22%20r%3D%221.5%22%2F%3E%3Ccircle%20cx%3D%2220%22%20cy%3D%2290%22%20r%3D%221.5%22%2F%3E%3Ccircle%20cx%3D%2260%22%20cy%3D%2255%22%20r%3D%221%22%2F%3E%3Ccircle%20cx%3D%2255%22%20cy%3D%22105%22%20r%3D%221.2%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E") repeat, linear-gradient(180deg,#0b1437,#1e1b4b); background-size: 120px 120px, auto; }
.chat-theme--starry .chat-msg--me { background: linear-gradient(135deg,#4f46e5,#0ea5e9); color: #fff; }
.chat-theme--starry .chat-msg:not(.chat-msg--me) { background: #1e2550; color: #e0e7ff; }
.chat-theme--starry .chat-send { background: linear-gradient(135deg,#4f46e5,#0ea5e9); }
.chat-theme--starry .chat-sys, .chat-day { background: rgba(255, 255, 255, .1); color: #cbd5e1; }
.chat-theme--starry .chat-typing { color: #cbd5e1; }
.chat-tswatch--starry .chat-tswatch__pic { background: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22120%22%20height%3D%22120%22%20viewBox%3D%220%200%20120%20120%22%3E%3Cg%20fill%3D%22%23fde68a%22%20fill-opacity%3D%22.35%22%3E%3Cpath%20d%3D%22M30%2020l2.5%207l7%202.5l-7%202.5l-2.5%207l-2.5-7l-7-2.5l7-2.5z%22%2F%3E%3Cpath%20d%3D%22M90%2075l1.8%205l5%201.8l-5%201.8l-1.8%205l-1.8-5l-5-1.8l5-1.8z%22%2F%3E%3Ccircle%20cx%3D%2295%22%20cy%3D%2225%22%20r%3D%221.5%22%2F%3E%3Ccircle%20cx%3D%2220%22%20cy%3D%2290%22%20r%3D%221.5%22%2F%3E%3Ccircle%20cx%3D%2260%22%20cy%3D%2255%22%20r%3D%221%22%2F%3E%3Ccircle%20cx%3D%2255%22%20cy%3D%22105%22%20r%3D%221.2%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E") repeat, linear-gradient(180deg,#0b1437,#1e1b4b); }
.chat-theme--school { --ct-seen: #fde047; --ct-accent: #4338ca; --ct-me: linear-gradient(135deg,#4338ca,#7c3aed); }
.chat-theme--school .chat-msgs { background: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22120%22%20height%3D%22120%22%20viewBox%3D%220%200%20120%20120%22%3E%3Cg%20fill%3D%22none%22%20stroke%3D%22%236366f1%22%20stroke-opacity%3D%22.17%22%20stroke-width%3D%222%22%20stroke-linejoin%3D%22round%22%20stroke-linecap%3D%22round%22%3E%3Cpath%20d%3D%22M12%2030l14-6l14%206v18l-14%206l-14-6z%22%2F%3E%3Cpath%20d%3D%22M26%2024v30%22%2F%3E%3Cpath%20d%3D%22M75%2015l25%2025l-6%206l-25-25zM69%2021l-3%209l9-3%22%2F%3E%3Cpath%20d%3D%22M30%2090l4%208l9%201l-7%206l2%209l-8-5l-8%205l2-9l-7-6l9-1z%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E") repeat, linear-gradient(180deg,#eef2ff,#f5f3ff); background-size: 120px 120px, auto; }
.chat-theme--school .chat-msg--me { background: linear-gradient(135deg,#4338ca,#7c3aed); color: #fff; }
.chat-theme--school .chat-msg:not(.chat-msg--me) { background: #fff; color: #1e1b4b; }
.chat-theme--school .chat-send { background: linear-gradient(135deg,#4338ca,#7c3aed); }
.chat-tswatch--school .chat-tswatch__pic { background: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22120%22%20height%3D%22120%22%20viewBox%3D%220%200%20120%20120%22%3E%3Cg%20fill%3D%22none%22%20stroke%3D%22%236366f1%22%20stroke-opacity%3D%22.17%22%20stroke-width%3D%222%22%20stroke-linejoin%3D%22round%22%20stroke-linecap%3D%22round%22%3E%3Cpath%20d%3D%22M12%2030l14-6l14%206v18l-14%206l-14-6z%22%2F%3E%3Cpath%20d%3D%22M26%2024v30%22%2F%3E%3Cpath%20d%3D%22M75%2015l25%2025l-6%206l-25-25zM69%2021l-3%209l9-3%22%2F%3E%3Cpath%20d%3D%22M30%2090l4%208l9%201l-7%206l2%209l-8-5l-8%205l2-9l-7-6l9-1z%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E") repeat, linear-gradient(180deg,#eef2ff,#f5f3ff); }
.chat[class*="chat-theme--"] .chat-msg--me .chat-file__btn { color: var(--ct-accent); }
.chat[class*="chat-theme--"] .chat-msg:not(.chat-msg--me) .chat-file__btn--view { background: var(--ct-accent); }
.chat-themes { display: grid; grid-template-columns: repeat(auto-fill, minmax(6.4rem, 1fr)); gap: .7rem; margin: .3rem 0 .8rem; }
.chat-themes__h { font-weight: 700; font-size: .82rem; margin: .5rem 0 .2rem; color: #475569; }
.chat-tswatch { border: 2px solid transparent; border-radius: 14px; padding: 0; cursor: pointer; overflow: hidden; background: none; text-align: center; font: inherit; color: inherit; }
.chat-tswatch.is-on { border-color: var(--ct-accent, #4f46e5); box-shadow: 0 0 0 3px rgba(79, 70, 229, .15); }
.chat-tswatch__pic { display: flex; flex-direction: column; gap: 4px; height: 4.6rem; padding: .45rem; box-sizing: border-box; }
.chat-tswatch__pic i { display: block; height: .7rem; border-radius: 6px; width: 60%; }
.chat-tswatch__pic i:nth-child(1) { background: #fff; }
.chat-tswatch__pic i:nth-child(2) { align-self: flex-end; width: 55%; }
.chat-tswatch__pic i:nth-child(3) { align-self: flex-end; width: 40%; }
.chat-tswatch small { display: block; padding: .3rem .2rem .4rem; font-size: .72rem; font-weight: 700; background: var(--surface, #fff); }
.chat-tswatch--ocean .chat-tswatch__pic i:nth-child(n+2) { background: linear-gradient(135deg,#0284c7,#06b6d4); }
.chat-tswatch--sunset .chat-tswatch__pic i:nth-child(n+2) { background: linear-gradient(135deg,#f97316,#ec4899); }
.chat-tswatch--forest .chat-tswatch__pic i:nth-child(n+2) { background: linear-gradient(135deg,#059669,#22c55e); }
.chat-tswatch--berry .chat-tswatch__pic i:nth-child(n+2) { background: linear-gradient(135deg,#9333ea,#db2777); }
.chat-tswatch--midnight .chat-tswatch__pic i:nth-child(n+2) { background: linear-gradient(135deg,#6366f1,#8b5cf6); }
.chat-tswatch--midnight .chat-tswatch__pic i:nth-child(1) { background: #1e293b; }
.chat-tswatch--himalaya .chat-tswatch__pic i:nth-child(n+2) { background: linear-gradient(135deg,#1d4ed8,#38bdf8); }
.chat-tswatch--rhododendron .chat-tswatch__pic i:nth-child(n+2) { background: linear-gradient(135deg,#dc2626,#e11d48); }
.chat-tswatch--mango .chat-tswatch__pic i:nth-child(n+2) { background: linear-gradient(135deg,#f59e0b,#f97316); }
.chat-tswatch--mint .chat-tswatch__pic i:nth-child(n+2) { background: linear-gradient(135deg,#14b8a6,#2dd4bf); }
.chat-tswatch--clouds .chat-tswatch__pic i:nth-child(n+2) { background: linear-gradient(135deg,#0369a1,#0ea5e9); }
.chat-tswatch--pinkclouds .chat-tswatch__pic i:nth-child(n+2) { background: linear-gradient(135deg,#db2777,#f97316); }
.chat-tswatch--love .chat-tswatch__pic i:nth-child(n+2) { background: linear-gradient(135deg,#e11d48,#f43f5e); }
.chat-tswatch--lovenight .chat-tswatch__pic i:nth-child(n+2) { background: linear-gradient(135deg,#e11d48,#a21caf); }
.chat-tswatch--lovenight .chat-tswatch__pic i:nth-child(1) { background: #2e1a3a; }
.chat-tswatch--starry .chat-tswatch__pic i:nth-child(n+2) { background: linear-gradient(135deg,#4f46e5,#0ea5e9); }
.chat-tswatch--starry .chat-tswatch__pic i:nth-child(1) { background: #1e2550; }
.chat-tswatch--school .chat-tswatch__pic i:nth-child(n+2) { background: linear-gradient(135deg,#4338ca,#7c3aed); }
.chat-sheet__box[data-theme-form], .chat-sheet__box[data-group-form] { max-height: 90vh; overflow-y: auto; }
/* chat: answer a message (quoted above it), emoji on messages, who has read it, voice messages, chats at night */
.chat-msg { position: relative; }
.chat-quote { display: grid; gap: 1px; margin: -.1rem -.2rem .35rem; padding: .35rem .6rem; border-left: 3px solid var(--ct-accent, #4f46e5); border-radius: 10px; background: rgba(15, 23, 42, .06); color: inherit; text-decoration: none; font-size: .8rem; max-width: 100%; }
.chat-quote b { font-size: .75rem; color: var(--ct-accent, #4f46e5); }
.chat-quote span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; opacity: .85; }
.chat-msg--me .chat-quote { background: rgba(255, 255, 255, .18); border-left-color: rgba(255, 255, 255, .85); }
.chat-msg--me .chat-quote b { color: #fff; }
.chat-msg.is-flash { animation: chatFlash 1.4s ease; }
@keyframes chatFlash { 0%, 60% { box-shadow: 0 0 0 4px rgba(250, 204, 21, .7); } 100% { box-shadow: 0 1px 2px rgba(0, 0, 0, .05); } }
.chat-acts { position: absolute; top: 50%; transform: translateY(-50%); right: -4.4rem; display: none; gap: .2rem; }
.chat-msg--me .chat-acts { right: auto; left: -4.4rem; }
.chat-msg:hover .chat-acts, .chat-msg:focus-within .chat-acts, .chat-msg.is-acts .chat-acts { display: inline-flex; }
.chat-acts button { width: 1.9rem; height: 1.9rem; border-radius: 50%; border: 1px solid var(--border, #e5e7eb); background: var(--surface, #fff); color: #475569; cursor: pointer; font-size: .9rem; line-height: 1; box-shadow: 0 1px 4px rgba(0, 0, 0, .08); }
@media (hover: none) { .chat-acts { right: auto; left: 0; top: auto; bottom: -2.3rem; transform: none; z-index: 3; } .chat-msg--me .chat-acts { left: auto; right: 0; } }
.chat-emo { position: absolute; bottom: calc(100% + 6px); left: 0; z-index: 5; display: flex; gap: .15rem; padding: .3rem .4rem; border-radius: 999px; background: var(--surface, #fff); box-shadow: 0 8px 24px rgba(15, 23, 42, .18); }
.chat-msg--me .chat-emo { left: auto; right: 0; }
.chat-emo button { border: 0; background: none; font-size: 1.35rem; line-height: 1; padding: .2rem; border-radius: 50%; cursor: pointer; transition: transform .12s; }
.chat-emo button:hover { transform: scale(1.25); }
.chat-reacts { position: absolute; bottom: -.9rem; right: .6rem; display: flex; gap: .2rem; }
.chat-msg--me .chat-reacts { right: auto; left: .6rem; }
.chat-msg:has(.chat-reacts) { margin-bottom: .9rem; }
.chat-react { display: inline-flex; align-items: center; gap: .15rem; padding: .05rem .4rem; border-radius: 999px; border: 1px solid var(--border, #e5e7eb); background: var(--surface, #fff); color: #334155; font-size: .8rem; line-height: 1.4; cursor: pointer; box-shadow: 0 1px 3px rgba(0, 0, 0, .1); }
.chat-react b { font-size: .7rem; }
.chat-react.is-mine { border-color: var(--ct-accent, #4f46e5); background: #eef2ff; }
button.chat-seenby { border: 0; background: none; color: inherit; padding: 0; cursor: pointer; text-decoration: underline dotted; font: inherit; font-size: .68rem; }
.chat-seen-at { margin-left: auto; color: #94a3b8; font-size: .75rem; white-space: nowrap; }
.chat-seen-at.is-on { color: #0ea5e9; }
.chat-compose { flex-wrap: wrap; }
.chat-replybar { flex: 1 0 100%; order: -1; display: flex; align-items: center; gap: .5rem; padding: .4rem .6rem; border-left: 3px solid var(--ct-accent, #4f46e5); border-radius: 10px; background: var(--bg-muted, #f2f3fa); font-size: .82rem; }
.chat-replybar[hidden] { display: none; }
.chat-replybar__txt { display: grid; min-width: 0; flex: 1; }
.chat-replybar__txt b { color: var(--ct-accent, #4f46e5); font-size: .76rem; }
.chat-replybar__txt span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #475569; }
.chat-replybar__x { border: 0; background: none; font-size: 1.3rem; line-height: 1; cursor: pointer; color: #64748b; }
.chat-mic { width: 2.6rem; height: 2.6rem; border-radius: 50%; background: var(--ct-accent, #4f46e5); color: #fff; border: 0; display: grid; place-items: center; cursor: pointer; flex: none; }
.chat-mic[hidden] { display: none; }
.chat-mic:not([hidden]) ~ .chat-send { display: none; }
.chat-rec { flex: 1; display: flex; align-items: center; gap: .6rem; min-height: 2.6rem; padding: 0 .4rem 0 .8rem; border-radius: 999px; background: #fef2f2; color: #b91c1c; font-weight: 700; font-variant-numeric: tabular-nums; }
.chat-rec[hidden] { display: none; }
.chat-rec__dot { width: .65rem; height: .65rem; border-radius: 50%; background: #ef4444; animation: chatRec 1s infinite; }
@keyframes chatRec { 50% { opacity: .25; } }
.chat-rec__x { margin-left: auto; border: 0; background: none; color: #64748b; cursor: pointer; font-weight: 600; }
.chat-rec__send { width: 2.2rem; height: 2.2rem; border-radius: 50%; border: 0; background: #ef4444; color: #fff; display: grid; place-items: center; cursor: pointer; }
.chat-compose.is-rec > :not(.chat-rec):not(input[type="hidden"]):not(.chat-replybar) { display: none; }
.chat-voice { display: flex; align-items: center; gap: .4rem; min-width: 14rem; }
.chat-voice .icon { flex: none; opacity: .8; }
.chat-voice audio { height: 2.2rem; width: 100%; max-width: 16rem; }
.chat-night__on { display: flex; align-items: center; gap: .5rem; margin: .6rem 0; font-weight: 600; }
.chat-night__times { display: flex; gap: .8rem; }
.chat-night__times label { display: grid; gap: .25rem; flex: 1; font-size: .85rem; }
/* chat: pinned, ⋯ on a message (change, delete for everyone, report, copy), deleted / edited, search and photos & files sheets */
.chat-pin { font-size: .75rem; }
.chat-acts { right: -6.4rem; }
.chat-msg--me .chat-acts { left: -6.4rem; }
.chat-mmenu { position: absolute; top: calc(100% + 4px); right: 0; z-index: 6; display: grid; min-width: 11rem; padding: .3rem; border-radius: 12px; background: var(--surface, #fff); box-shadow: 0 10px 28px rgba(15, 23, 42, .2); }
.chat-msg:not(.chat-msg--me) .chat-mmenu { right: auto; left: 0; }
.chat-mmenu button { text-align: left; border: 0; background: none; padding: .5rem .65rem; border-radius: 8px; color: #1e293b; font: inherit; font-size: .88rem; cursor: pointer; }
.chat-mmenu button:hover { background: var(--bg-muted, #f2f3fa); }
.chat-gone { font-style: italic; opacity: .7; }
.chat-msg.is-gone { box-shadow: none; background: transparent; border: 1px dashed rgba(100, 116, 139, .45); color: #64748b; }
.chat-msg--me.is-gone { color: #64748b; }
.chat-edited { font-style: italic; opacity: .8; }
.chat-mini__ta, .chat-mini__q { width: 100%; padding: .6rem .75rem; border-radius: 12px; border: 1px solid var(--border, #e5e7eb); font: inherit; margin: .4rem 0 .6rem; }
.chat-mini__r { display: flex; align-items: center; gap: .5rem; padding: .35rem 0; }
.chat-mini__list { display: grid; gap: .3rem; max-height: 55vh; overflow-y: auto; }
.chat-mini__hit { display: grid; gap: .1rem; text-align: left; border: 0; background: var(--bg-muted, #f6f7fb); padding: .55rem .7rem; border-radius: 10px; cursor: pointer; font: inherit; }
.chat-mini__hit small { color: #94a3b8; }
.chat-mini__hit span { color: #334155; font-size: .88rem; }
.chat-mini__hit mark { background: #fde68a; border-radius: 3px; }
.chat-mini__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); gap: .35rem; margin-bottom: .8rem; }
.chat-mini__grid img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; display: block; }
.chat-mini__file { display: flex; align-items: center; gap: .6rem; padding: .5rem 0; border-top: 1px solid var(--border, #eef0f6); }
.chat-mini__file > span:not(.chat-file__kind) { display: grid; flex: 1; min-width: 0; }
.chat-mini__file b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .88rem; }
.chat-mini__file small { color: #94a3b8; }
.chat-mini__file audio { height: 2rem; max-width: 12rem; }
.chat-sheet__box--tall { max-height: 85vh; overflow-y: auto; }
/* chat: blocked from chats by the school */
.chat-banned { max-width: 34rem; margin: 3rem auto; }
.chat-banned .empty__icon { color: #ef4444; }
/* New chat: the classes of Students / Parents as chips; the list class by class */
.chat-tabs--classes { margin-top: -.2rem; }
.chat-tabs--classes .chat-tab { font-size: .78rem; padding: .25rem .65rem; }
.chat-rows--people .chat-sec { margin: .7rem .3rem .2rem; font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; color: #64748b; font-weight: 800; }
/* online classes: one time / recurring, class length, next class */
.oc-kind { min-width: 0; border: 1px solid var(--border, #e5e7f0); border-radius: 16px; padding: 1rem; background: var(--bg-muted, #fafbff); display: grid; gap: .9rem; margin: 0; }
.oc-kind legend { font-weight: 700; padding: 0 .3rem; }
.oc-kind__seg { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: .6rem; }
.oc-kind__opt { display: flex; gap: .6rem; align-items: flex-start; border: 2px solid var(--border, #e5e7f0); border-radius: 14px; padding: .75rem .85rem; background: var(--surface, #fff); cursor: pointer; }
.oc-kind__opt.is-on { border-color: #4f46e5; background: #eef2ff; }
.oc-kind__opt b { display: block; }
.oc-kind__opt small { color: #64748b; }
.oc-kind .grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); gap: .75rem; }
.oc-kind__len { margin: -.3rem 0 0; font-size: .92rem; color: #334155; }
.oc-kind__len b { color: #4338ca; }
.oc-kind__rep { display: grid; gap: .8rem; }
.oc-kind__rep[hidden] { display: none; }
.oc-days { display: flex; gap: .35rem; flex-wrap: wrap; }
.oc-day { position: relative; }
.oc-day input { position: absolute; left: 0; top: 0; width: 1px; height: 1px; margin: 0; opacity: 0; pointer-events: none; }
.oc-day span { display: inline-block; padding: .4rem .8rem; border-radius: 999px; border: 1px solid #e2e8f0; background: var(--surface, #fff); color: #94a3b8; font-weight: 700; font-size: .85rem; cursor: pointer; }
.oc-day input:checked + span { background: #eef2ff; border-color: #c7d2fe; color: #3730a3; }
.oc-day input:focus-visible + span { outline: 2px solid #4f46e5; }
.oc-until { display: flex; gap: 1rem; flex-wrap: wrap; }
.oc-kind__note { margin: 0; font-size: .82rem; color: #475569; background: var(--surface, #fff); border: 1px dashed #c7d2fe; border-radius: 10px; padding: .55rem .75rem; }
.oc-len { white-space: nowrap; font-weight: 700; color: #0f766e; background: #ccfbf1; border-radius: 999px; padding: .1rem .55rem; font-size: .78rem; }
.oc-rep { display: inline-block; font-size: .75rem; font-weight: 700; color: #4338ca; background: #eef2ff; border-radius: 999px; padding: .1rem .55rem; }
.oc-join { min-width: 7.5rem; }
.oc-join .btn { white-space: nowrap; }
.oc-join .small { display: block; max-width: 9rem; line-height: 1.35; }
.oc-days-nav { display: flex; gap: .35rem; flex-wrap: wrap; margin-top: .5rem; }
.oc-days-nav .chip { padding: .3rem .75rem; text-decoration: none; color: inherit; }
.oc-days-nav .chip.is-active { background: #eef2ff; border-color: #c7d2fe; color: #3730a3; font-weight: 700; }
.oc-table .oc-title { min-width: 15rem; }
.oc-table .oc-title > a, .oc-table .oc-title > b { display: block; font-weight: 700; font-size: 1.02rem; }
.oc-by { display: flex; align-items: center; gap: .4rem; margin-top: .3rem; font-size: .85rem; color: #64748b; }
.oc-by .avatar, .oc-by img { width: 26px; height: 26px; font-size: .7rem; }
.oc-table .oc-when { min-width: 10rem; }
/* online classes: where a class stands; changing one day */
.oc-st { display: inline-block; vertical-align: middle; font-size: .78rem; font-weight: 700; border-radius: 999px; padding: .15rem .6rem; white-space: nowrap; }
h1 .oc-st { font-size: .8rem; margin-left: .3rem; }
.oc-st--ok { background: #dcfce7; color: #166534; }
.oc-st--warn { background: #fef3c7; color: #92400e; }
.oc-st--info { background: #e0e7ff; color: #3730a3; }
.oc-st--gray { background: #f1f5f9; color: #475569; }
.oc-st--bad { background: #fee2e2; color: #991b1b; }
.oc-st--ok::before { content: ""; display: inline-block; width: .5rem; height: .5rem; border-radius: 50%; background: #16a34a; margin-right: .35rem; vertical-align: middle; animation: oc-pulse 1.4s infinite; }
@keyframes oc-pulse { 50% { opacity: .3; } }
@media (prefers-reduced-motion: reduce) { .oc-st--ok::before { animation: none; } }
.oc-daysbox__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); gap: 1rem; margin-top: .75rem; }
.oc-daysbox__form { border: 1px solid var(--border, #e5e7f0); border-radius: 14px; padding: .9rem 1rem; display: grid; gap: .6rem; align-content: start; min-width: 0; }
.oc-daysbox__form h3, .oc-daysbox__h { margin: 0; font-size: 1rem; }
.oc-daysbox__h { margin-top: 1.1rem; }
.oc-daysbox .grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.oc-changes { list-style: none; margin: .5rem 0 0; padding: 0; display: grid; gap: .4rem; }
.oc-changes li { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; border: 1px solid var(--border, #e5e7f0); border-radius: 12px; padding: .5rem .75rem; }
.oc-changes .grow { flex: 1; min-width: 6rem; }
.oc-changes form { margin: 0; }
.oc-table th, .oc-table td { padding-left: .6rem; padding-right: .6rem; }
.oc-table .oc-title { min-width: 13rem; }
.oc-table .oc-when { min-width: 9rem; }
.oc-table .oc-join .small { max-width: 7rem; }
/* online classes: warnings before saving, began-on, recording and notes */
.oc-warn ul { margin: .4rem 0 .6rem 1.1rem; }
.oc-began { margin: .2rem 0 0; font-weight: 600; }
.oc-absent { margin-top: -.2rem; }
.oc-notes__form { display: grid; gap: .6rem; border: 1px solid var(--border, #e5e7f0); border-radius: 14px; padding: .9rem 1rem; margin: .6rem 0 1rem; }
.oc-notes__list { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.oc-notes__list li { border: 1px solid var(--border, #e5e7f0); border-radius: 12px; padding: .6rem .8rem; display: grid; gap: .35rem; justify-items: start; }
.oc-notes__list p { margin: 0; }
.oc-today { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.oc-today li { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; border: 1px solid var(--border, #e5e7f0); border-radius: 12px; padding: .55rem .75rem; }
.oc-today .grow { flex: 1; min-width: 9rem; }
.oc-today small { display: block; color: #64748b; }
.oc-today__h { font-size: .95rem; margin: .9rem 0 .4rem; }
.oc-zoom { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; margin-top: .4rem; }
.oc-zoom form { margin: 0; }
.oc-others { font-size: .9rem; }
.oc-others summary { cursor: pointer; color: #475569; }
.oc-zoomhelp { margin-top: .5rem; } .oc-zoomhelp summary { cursor: pointer; font-weight: 600; } .oc-zoomhelp ol { margin: .5rem 0 0 1.1rem; display: grid; gap: .35rem; }
.oc-private { margin: 0; font-size: .92rem; }
.oc-private[hidden] { display: none; }
/* the online class inside the site (Zoom Meeting SDK) */
body.ocr { margin: 0; min-height: 100vh; background: #0f1117; color: #e5e7eb; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.ocr__card { background: #fff; color: #111827; border-radius: 22px; padding: 1.6rem 1.4rem; max-width: 26rem; margin: 1rem; text-align: center; box-shadow: 0 20px 40px -20px rgba(0,0,0,.6); }
.ocr__card[hidden], .ocr__ask[hidden] { display: none; }
.ocr__card h1 { font-size: 1.2rem; margin: .4rem 0; } .ocr__card p { color: #475569; line-height: 1.55; }
.ocr__spin { width: 46px; height: 46px; border-radius: 50%; border: 5px solid #e2e8f0; border-top-color: #111827; margin: .4rem auto 1rem; animation: ocr-spin 1s linear infinite; }
@keyframes ocr-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .ocr__spin { animation: none; } }
.ocr__icon { width: 72px; height: 72px; border-radius: 50%; background: #eef2ff; margin: .3rem auto .8rem; display: grid; place-items: center; font-size: 2rem; }
.ocr__icon--bad { background: #fee2e2; color: #991b1b; }
.ocr__timer { display: inline-block; background: #fef3c7; color: #92400e; border-radius: 99px; padding: .1rem .6rem; font-weight: 700; }
.ocr__ask { position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 100000; display: flex; align-items: flex-end; justify-content: center; }
.ocr__sheet { background: #fff; color: #111827; width: 100%; max-width: 30rem; border-radius: 22px 22px 0 0; padding: 1.3rem 1.2rem 1.6rem; display: grid; gap: .55rem; }
.ocr__sheet h2 { margin: 0; font-size: 1.1rem; } .ocr__sheet p { margin: 0; color: #475569; }
/* why a form was not saved (top of the page) */
.form-problems { margin: 0 0 1rem; border-color: currentColor; } .form-problems ul { margin: .35rem 0 0 1.2rem; padding: 0; } .form-problems li + li { margin-top: .15rem; }
/* Zoom host accounts (Online class settings) */
.zh__row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: .5rem 1rem; padding: .75rem; border: 1px solid var(--line, #e5e7eb); border-radius: var(--radius); }
.zh__row--off { opacity: .6; }
.zh__form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: .5rem .75rem; flex: 1 1 auto; }
.zh__form .field { margin: 0; min-width: 9rem; flex: 1 1 9rem; } .zh__form .check { margin-bottom: .55rem; }
.zh__who { display: flex; flex-direction: column; min-width: 12rem; flex: 1 1 14rem; align-self: center; word-break: break-all; }
.zh__add { border-top: 1px dashed var(--line, #e5e7eb); padding-top: .75rem; } .zh__add h3 { margin: 0 0 .5rem; font-size: 1rem; }
@media (min-width: 900px) { .zh__row { flex-wrap: nowrap; } .zh__row > form:last-child { flex: 0 0 auto; } }
/* Online class settings: Zoom / Google Meet pages */
.oc-tabs { display: flex; gap: .5rem; flex-wrap: wrap; margin: 0 0 1rem; }
.oc-tabs__a { padding: .5rem 1rem; border-radius: 999px; background: var(--surface, #fff); border: 1px solid var(--line, #e5e7eb); font-weight: 600; text-decoration: none; color: inherit; }
.oc-tabs__a.is-on { background: var(--brand, #4f46e5); border-color: var(--brand, #4f46e5); color: #fff; }
.oc-status { display: flex; flex-wrap: wrap; gap: .5rem; padding: .75rem 1rem; margin-bottom: 1rem; }
.oc-stepno { display: inline-grid; place-items: center; width: 1.6em; height: 1.6em; border-radius: 50%; background: var(--brand, #4f46e5); color: #fff; font-size: .85em; margin-right: .25rem; vertical-align: .1em; }
.oc-later { opacity: .6; }
.ocr__details { text-align: left; white-space: pre-wrap; word-break: break-all; font-size: .72rem; max-height: 9rem; overflow: auto; background: rgba(0,0,0,.05); padding: .5rem; border-radius: 8px; margin: .5rem 0 0; }
/* the class page's own buttons (Zoom's stylesheet restyles .btn): big, clear, coloured */
.ocr .ocr__btn { display: flex; align-items: center; justify-content: center; gap: .5rem; width: 100%; min-height: 3.2rem; padding: .7rem 1rem; border-radius: 14px; font-family: inherit; font-size: 1.05rem; font-weight: 700; line-height: 1.25; text-decoration: none; cursor: pointer; border: 2px solid transparent; box-shadow: 0 6px 16px -8px rgba(0,0,0,.35); }
.ocr .ocr__btn--yes { background: #16a34a; color: #fff; }
.ocr .ocr__btn--yes:hover { background: #15803d; }
.ocr .ocr__btn--no { background: #fff; color: #b91c1c; border-color: #fca5a5; }
.ocr .ocr__btn--no:hover { background: #fef2f2; }
.ocr .ocr__btn--main { background: #4f46e5; color: #fff; }
.ocr .ocr__btn--plain { background: #f1f5f9; color: #0f172a; box-shadow: none; }
.ocr .ocr__card .ocr__btn { margin-top: .6rem; }
.ocr__sheet .ocr__who { display: flex; align-items: center; gap: .6rem; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 12px; padding: .6rem .75rem; color: #0f172a; font-weight: 600; }
.ocr__note { font-size: .85rem; color: #6b7280; margin-top: .25rem; }
.alerts-tpl { white-space: nowrap; } .alerts-tpl .btn { margin: 2px 0; } .alerts-tpl__own { border-color: #16a34a; color: #15803d; background: #f0fdf4; }
/* class recordings (2.10.471) */
.ocrecs__list { list-style: none; margin: .5rem 0 0; padding: 0; display: grid; gap: .5rem; }
.ocrecs__item { display: flex; align-items: center; gap: .75rem; padding: .6rem .75rem; border: 1px solid var(--line, #e5e7eb); border-radius: 12px; }
.ocrecs__icon { width: 38px; height: 38px; flex: none; border-radius: 10px; display: grid; place-items: center; background: var(--brand, #4f46e5); color: #fff; font-weight: 700; }
.ocrecs__what { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.ocrec__video { width: 100%; max-height: 72vh; background: #000; border-radius: 12px; display: block; }
audio.ocrec__video { background: transparent; }
.ocrec__speed { display: flex; gap: .4rem; margin-top: .6rem; flex-wrap: wrap; }
.ocrec__bar { display: inline-block; width: 110px; height: 7px; background: #e5e7eb; border-radius: 9px; vertical-align: middle; overflow: hidden; }
.ocrec__bar i { display: block; height: 100%; background: #22c55e; }
.ocrec__not { color: #b91c1c; }
.ocrec__wrap { position: relative; }
.ocrecs__add { margin: 0 0 12px; }
.ocrecs__what > .oc-st { align-self: flex-start; margin: 2px 0; }
.ocrecs__add > summary { list-style: none; cursor: pointer; display: inline-flex; }
.ocrecs__add > summary::-webkit-details-marker { display: none; }
.ocrecs__add[open] > summary { margin-bottom: 10px; }
.ocrecs__add > form { border: 2px dashed #6366f1; border-radius: 14px; padding: 14px 16px; background: rgba(99,102,241,.04); }
.ocrec__parts { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 10px; }
.ocrec__resume { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(15,23,42,.55); border-radius: 12px; }
.ocrec__resume > div { background: #fff; border-radius: 14px; padding: 14px 16px; text-align: center; box-shadow: 0 10px 30px rgba(0,0,0,.35); max-width: 90%; }
.ocrec__resume b { display: block; margin-bottom: 10px; }

/* Fees setup › Class-wise fee mapping */
.cfm-wrap{overflow-x:auto}.cfm th,.cfm td{vertical-align:top}.cfm thead th{text-transform:none;letter-spacing:0}.cfm-type{min-width:150px}.cfm-setrow td{background:var(--surface-2,#f6f7fb)}.cfm-sel{width:100%;margin-top:4px;font-size:12px;padding:3px 4px}
.cfm-day{display:flex;gap:4px;align-items:center;margin-top:4px;white-space:nowrap}.cfm-day input{width:56px;padding:3px 4px}
.cfm-amt{width:100%;min-width:90px;text-align:right}.cfm-set{display:block;margin-top:4px}.cfm-copy{align-items:end}.cfm-from{max-width:420px}.cfm-from input{max-width:240px}
.cfm-months{margin-top:4px}.cfm-months summary{cursor:pointer;color:var(--brand,#5b5fe6)}.cfm-months .check{display:inline-flex;gap:4px;margin:2px 8px 2px 0;white-space:nowrap}
.cfm-secrow td{background:var(--surface-2,#fafbfe)}.cfm-amt--sec{font-size:13px}
/* Fees setup › Previous dues */
.pd-stats{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:12px;margin-bottom:16px}.pd-stat{display:flex;flex-direction:column;gap:4px;padding:14px 16px}.pd-stat strong{font-size:1.25rem}
.pd-amt{width:130px;text-align:right}.pd-when{max-width:640px}.pd-file{align-items:end}.pd-errors{margin:6px 0 0 18px;font-size:13px}
/* Cash closing */
.cc-stats{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:12px;margin-bottom:16px}.cc-stat{display:flex;flex-direction:column;gap:4px;padding:14px 16px}.cc-stat strong{font-size:1.25rem}
.cc-diff--short{color:var(--danger,#c0392b)}.cc-diff--over{color:var(--warning,#b7791f)}.cc-diff--ok{color:var(--success,#1e8e5a)}.cc-form{max-width:720px}
/* Dues hold, instalments, fee statement */
.dh-form{max-width:720px}.dh-form fieldset{border:0;padding:0;margin:0}.dh-notes{margin:0 0 0 18px}
.inst-parts td input{width:100%;min-width:120px}.inst-plan{margin-bottom:12px}
.fee-st__block{margin-top:14px}.fee-st__block h3{font-size:14px;margin:0 0 6px}.fee-st__late{color:var(--danger,#c0392b)}
/* Fees dashboard */
.fd-setup summary{cursor:pointer;list-style:none;display:flex;gap:8px;align-items:center}.fd-steps{list-style:none;margin:12px 0 0;padding:0;display:grid;gap:10px}
.fd-step{display:grid;grid-template-columns:28px 1fr auto;gap:10px;align-items:center;padding:10px 12px;border:1px solid var(--border,#e5e7eb);border-radius:12px}
.fd-step__mark{width:24px;height:24px;border-radius:50%;border:2px solid var(--border,#cbd5e1);display:grid;place-items:center;font-size:13px;font-weight:700}
.fd-step.is-done .fd-step__mark{background:var(--success,#1e8e5a);border-color:var(--success,#1e8e5a);color:#fff}.fd-step.is-done strong{color:var(--muted,#64748b)}
.fd-bad strong{color:var(--danger,#c0392b)}.fd-wait{margin-bottom:16px}
.fd-bars{display:grid;grid-template-columns:repeat(6,1fr);gap:8px;align-items:end;height:200px;margin-top:8px}.fd-bar{display:flex;flex-direction:column;align-items:center;justify-content:flex-end;height:100%;gap:4px;min-width:0}
.fd-bar__fill{width:70%;background:var(--brand,#5b5fe6);border-radius:6px 6px 0 0}.fd-bar__val{font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}.fd-bar__lbl{white-space:nowrap}
.fd-methods{margin-top:10px}
@media (max-width:640px){.fd-step{grid-template-columns:28px 1fr}.fd-step .btn{grid-column:2}}
.fd-h1{height:5%}.fd-h2{height:10%}.fd-h3{height:15%}.fd-h4{height:20%}.fd-h5{height:25%}.fd-h6{height:30%}.fd-h7{height:35%}.fd-h8{height:40%}.fd-h9{height:45%}.fd-h10{height:50%}.fd-h11{height:55%}.fd-h12{height:60%}.fd-h13{height:65%}.fd-h14{height:70%}.fd-h15{height:75%}.fd-h16{height:80%}.fd-h17{height:85%}.fd-h18{height:90%}.fd-h19{height:95%}.fd-h20{height:100%}
/* 2.10.495 double entry */
.table tr.gl-type th{background:var(--surface-2);font-size:.85rem;text-transform:uppercase;letter-spacing:.04em;color:var(--text)}
.table tr.gl-group td,.table tr.gl-group th{background:color-mix(in srgb,var(--surface-2) 45%,transparent)}
.table td.gl-indent{padding-left:2rem}
.gl-two{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,560px),1fr));gap:var(--space-3)}
/* 2.10.496 petty cash, branches and departments */
.pc-cards{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,300px),1fr));gap:var(--space-3);margin-bottom:var(--space-3)}
.pc-card{display:flex;flex-direction:column;gap:.35rem}.pc-card--off{opacity:.65}
.pc-card__head{display:flex;justify-content:space-between;align-items:flex-start;gap:.5rem}.pc-card__head h2{margin:0}
.pc-card__big{font-size:1.6rem;font-weight:700;margin:.25rem 0 0;font-variant-numeric:tabular-nums}
.pc-kv{margin:.4rem 0;display:grid;gap:.2rem}.pc-kv div{display:flex;justify-content:space-between;gap:.75rem;font-size:.88rem}.pc-kv dt{color:var(--muted)}.pc-kv dd{margin:0;text-align:right}
.pc-notes{display:grid;grid-template-columns:repeat(auto-fill,minmax(130px,1fr));gap:0 var(--space-3)}
.pc-rules{display:grid;gap:.5rem;margin:0}.pc-rules div{display:grid;grid-template-columns:minmax(140px,260px) 1fr;gap:.75rem}.pc-rules dt{font-weight:600}.pc-rules dd{margin:0}
@media (max-width:640px){.pc-rules div{grid-template-columns:1fr;gap:0}}
.cc-switch{justify-content:space-between;align-items:center}.cc-switch__text{flex:1 1 320px}.cc-switch__text p{margin:.25rem 0 0}
.pc-print__list td,.pc-print__list th{font-size:.85rem}
/* 2.10.497 cash flow, schedules, history */
.sc-layout{display:grid;grid-template-columns:minmax(220px,280px) 1fr;gap:var(--space-3);align-items:start}
@media (max-width:900px){.sc-layout{grid-template-columns:1fr}}
.sc-index ol{list-style:none;margin:0;padding:0;display:grid;gap:2px}.sc-index a{display:block;padding:.45rem .6rem;border-radius:8px;text-decoration:none;color:inherit;font-size:.9rem}
.sc-index a:hover{background:var(--surface-2)}.sc-index a.is-active{background:color-mix(in srgb,var(--brand,#5b5fe6) 12%,transparent);font-weight:600}
.sc-print__title{margin:1.2rem 0 .4rem;break-after:avoid}
.hs-diff{display:flex;flex-direction:column;gap:2px}.hs-change del{color:var(--danger,#b42318)}.hs-change ins{color:var(--success,#027a48);text-decoration:none}
.sc-link{font-size:.75rem;padding:1px 6px;border-radius:99px;background:var(--surface-2);text-decoration:none;color:inherit;margin-left:.35rem}

/* ID card templates: ready-made design picker and colour swatches */
.idc-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: .75rem; }
.idc-opt { position: relative; display: flex; flex-direction: column; align-items: center; gap: .3rem; padding: .55rem .45rem .5rem; border: 2px solid var(--border); border-radius: 12px; cursor: pointer; text-align: center; font-weight: 600; font-size: .85rem; background: var(--surface, #fff); }
.idc-opt input { position: absolute; opacity: 0; pointer-events: none; }
.idc-opt img { width: auto; height: 120px; max-width: 100%; object-fit: contain; border-radius: 6px; box-shadow: 0 2px 8px rgba(15, 23, 42, .18); }
.idc-opt--land img { height: auto; width: 100%; max-height: 120px; margin: auto 0; }
.idc-opt small { font-weight: 500; font-size: .75rem; }
.idc-opt:hover { border-color: var(--brand); }
.idc-opt:has(input:checked) { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 25%, transparent); }
.idc-opt:has(input:focus-visible) { outline: 2px solid var(--brand); outline-offset: 2px; }
.idc-own { display: flex; align-items: center; justify-content: center; height: 120px; width: 76px; border: 2px dashed var(--border); border-radius: 6px; color: var(--muted, #64748b); }
.idc-own .icon { width: 28px; height: 28px; }
.idc-swatch { position: relative; display: inline-flex; align-items: center; gap: .4rem; padding: .35rem .7rem .35rem .45rem; border: 2px solid var(--border); border-radius: 99px; cursor: pointer; font-weight: 600; font-size: .9rem; }
.idc-swatch input { position: absolute; opacity: 0; pointer-events: none; }
.idc-swatch:has(input:checked) { border-color: var(--brand); }
.idc-swatch:has(input:focus-visible) { outline: 2px solid var(--brand); outline-offset: 2px; }
.idc-dot { width: 20px; height: 20px; border-radius: 50%; display: inline-block; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .6); }
.idc-dot--royal { background: linear-gradient(135deg, #13308f 60%, #e11d2e 60%); }
.idc-dot--maroon { background: linear-gradient(135deg, #7a1029 60%, #d4a017 60%); }
.idc-dot--green { background: linear-gradient(135deg, #0b6b3a 60%, #f2a900 60%); }
.idc-dot--purple { background: linear-gradient(135deg, #5b21b6 60%, #f97316 60%); }
.idc-dot--sky { background: linear-gradient(135deg, #0369a1 60%, #ef4444 60%); }
.pt-design { display: block; font-size: .8rem; }
.idc-dot--custom { background: conic-gradient(#ef4444, #f59e0b, #22c55e, #06b6d4, #6366f1, #d946ef, #ef4444); }
.idc-edit { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--space-4, 1rem); align-items: start; }
.idc-edit[hidden] { display: none; }
@media (max-width: 900px) { .idc-edit { grid-template-columns: minmax(0, 1fr); } .idc-live { order: -1; } }
.idc-live { position: sticky; top: 76px; border: 1px solid var(--border); border-radius: 12px; padding: .75rem; background: color-mix(in srgb, var(--brand) 5%, var(--surface, #fff)); text-align: center; }
.idc-live h3 { margin: 0 0 .5rem; font-size: .95rem; }
.idc-live__card { display: inline-block; zoom: 1.35; border-radius: 3mm; overflow: hidden; box-shadow: 0 4px 16px rgba(15, 23, 42, .22); line-height: normal; text-align: left; }
.idc-live p { margin: .5rem 0 0; max-width: 300px; }
.idc-own-colours { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: .75rem; }
.idc-own-colours[hidden] { display: none; }
.idc-own-colours .alert { grid-column: 1 / -1; margin: 0; }
.idc-colour { display: flex; gap: .4rem; align-items: center; }
.idc-colour input[type="color"] { width: 44px; height: 38px; padding: 2px; border-radius: 8px; flex: none; }
.idc-colour input:not([type="color"]) { width: 100%; font-family: ui-monospace, monospace; }
.pt-imgbox { display: flex; align-items: center; justify-content: center; height: 96px; border: 1px dashed var(--border); border-radius: 10px; background: repeating-conic-gradient(#f1f5f9 0 25%, #fff 0 50%) 0 0 / 14px 14px; margin-bottom: .35rem; overflow: hidden; }
.pt-imgbox img { max-width: 92%; max-height: 84px; object-fit: contain; }
.pt-imgbox--sign img { max-height: 60px; }
.pt-imgbox__empty { padding: 0 .5rem; text-align: center; }
[data-img-note] { margin: 0 0 .35rem; }
[data-show-if][hidden] { display: none !important; }
.idc-from-settings { border: 1px solid var(--border); border-radius: 12px; padding: .75rem 1rem; background: color-mix(in srgb, var(--brand) 4%, var(--surface, #fff)); }
.idc-from-settings .card__head { margin-bottom: .5rem; }
.idc-from-settings h3 { margin: 0; font-size: 1rem; }
.idc-set-list { display: grid; grid-template-columns: max-content 1fr; gap: .3rem 1rem; margin: 0 0 .5rem; font-size: .92rem; }
.idc-set-list dt { color: var(--muted, #64748b); }
.idc-set-list dd { margin: 0; font-weight: 600; }
.gen-people.is-loading { opacity: .45; pointer-events: none; transition: opacity .15s; }
.gen-people.is-loading::before { content: ""; display: block; height: 3px; border-radius: 3px; background: linear-gradient(90deg, transparent, var(--brand), transparent); background-size: 200% 100%; animation: gen-load 1s linear infinite; }
@keyframes gen-load { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.adm-signer { border: 1px solid var(--border); border-radius: 10px; padding: .75rem 1rem; margin: 0 0 .75rem; } .adm-signer legend { font-weight: 600; padding: 0 .35rem; }
/* structured address picker (2.10.520) */
.np-addr { border: 1px solid var(--border); border-radius: 12px; padding: .75rem 1rem 1rem; margin: 0; }
.np-addr legend { font-weight: 600; padding: 0 .35rem; }
.np-addr__grid { display: grid; grid-template-columns: 1fr 1fr 1.6fr .6fr; gap: .75rem; align-items: start; }
.np-addr__grid--2 { grid-template-columns: 1fr 1fr; margin-top: .5rem; }
.np-addr__same { display: flex; align-items: center; gap: .5rem; font-weight: 600; margin: .1rem 0 .65rem; }
.np-addr .np-addr__same input { width: 17px; height: 17px; min-height: 0; padding: 0; border: 0; box-shadow: none; background: none; }
.np-addr--same .np-addr__grid { opacity: .55; }
.np-addr--same [data-np^="line-"] { background: var(--surface-2, #f6f7fb); }
@media (max-width: 760px) { .np-addr__grid, .np-addr__grid--2 { grid-template-columns: 1fr; } }

/* 2.10.528: certificate type buttons on the template list */
.ctype-chips { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0 0 .9rem; }
.ctype-chip { border: 1px solid var(--border); border-radius: 999px; padding: .4rem .9rem; background: var(--surface, #fff); font-weight: 600; font-size: .85rem; cursor: pointer; color: inherit; }
.ctype-chip b { background: var(--surface-2, #eef0f6); border-radius: 999px; padding: 0 .45rem; margin-left: .3rem; font-size: .78rem; }
.ctype-chip.is-on { background: var(--primary, #4f46e5); border-color: var(--primary, #4f46e5); color: #fff; }
.ctype-chip.is-on b { background: rgba(255,255,255,.22); color: #fff; }

/* 2.10.529: print pages — every filter the same width (the year no longer takes the most room) */
.filters--even > :first-child { flex: 1 1 160px; }

/* 2.10.537: the sample's language on the ID card / admit card settings */
.sample-lang { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; margin: .2rem 0 .7rem; }
.idc-live__who { text-align: center; margin: .3rem 0 .5rem; font-size: .95rem; }

/* 2.10.542: award certificates — each student's own values on the print page */
.aw-row { display: flex; flex-wrap: wrap; gap: .35rem .6rem; margin-top: .35rem; }
.aw-row__f { display: inline-flex; align-items: center; gap: .3rem; font-size: .75rem; color: var(--muted, #6b7280); }
.aw-row__f input, .aw-row__f select { width: 4.6rem; padding: .15rem .4rem; font-size: .85rem; min-height: 0; height: auto; }
.aw-row__f input.aw-row__w { width: 8.5rem; }

/* 2.10.545: a certificate's colour pairs */
.cert-dot--own { background: conic-gradient(#13294b 0 25%, #7f1d1d 0 50%, #14532d 0 75%, #c9a227 0); }
.cert-dot--navy { background: linear-gradient(135deg, #13294b 60%, #c9a227 60%); }
.cert-dot--maroon { background: linear-gradient(135deg, #7f1d1d 60%, #c9a227 60%); }
.cert-dot--green { background: linear-gradient(135deg, #14532d 60%, #d4af37 60%); }
.cert-dot--purple { background: linear-gradient(135deg, #4c1d95 60%, #d4af37 60%); }
.cert-dot--teal { background: linear-gradient(135deg, #0f766e 60%, #f59e0b 60%); }
.aw-row__f input.aw-row__w--xl { width: 16rem; max-width: 100%; } /* 2.10.546: an employee certificate's longer boxes */
/* 2.10.555: Cards & certificates › Student marksheets */
.msp-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-3); align-items: start; }
.msp-grid > .field { margin: 0; }
.msp-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: var(--space-3); align-items: end; }
.msp-step { display: inline-flex; width: 1.3rem; height: 1.3rem; border-radius: 50%; background: var(--brand); color: var(--brand-ink); font-size: .7rem; align-items: center; justify-content: center; margin-right: .4rem; }
.msp-seg { border: 0; padding: 0; margin: 0; min-width: 0; }
.msp-seg legend { font-weight: 600; font-size: .85rem; margin-bottom: .35rem; padding: 0; }
.msp-seg__row { display: flex; border: 1px solid var(--border-strong); border-radius: var(--radius); overflow: hidden; }
.msp-seg__row label { flex: 1; margin: 0; cursor: pointer; position: relative; }
.msp-seg__row input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; pointer-events: none; }
.msp-seg__row span { display: flex; align-items: center; justify-content: center; min-height: 2.5rem; padding: 0 .5rem; font-size: .85rem; border-right: 1px solid var(--border); text-align: center; }
.msp-seg__row label:last-child span { border-right: 0; }
.msp-seg__row input:checked + span { background: var(--brand); color: var(--brand-ink); font-weight: 600; }
.msp-seg__row input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: -2px; }
.msp-wrap { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-4); margin-top: 0; }
[data-msp-swap="note"]:empty { display: none; }
.msp-bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: var(--space-3); margin-bottom: var(--space-3); }
.msp-bar h2 { margin: 0; }
.msp-bar__go { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: flex-end; }
.msp-bar__go .field { margin: 0; min-width: 11rem; }
.msp-table td, .msp-table th { padding-left: .45rem; padding-right: .45rem; }
.msp-table td.num, .msp-table th.num, .msp-table td.nowrap { white-space: nowrap; }
.msp-note { margin-top: var(--space-2); }
.msp-tpl { order: -1; display: flex; align-items: center; gap: var(--space-3); padding-top: var(--space-3); padding-bottom: var(--space-3); }
.msp-tpl img { width: 3.6rem; flex: none; border: 1px solid var(--border); border-radius: 4px; display: block; }
.msp-tpl__text { min-width: 0; }
.msp-tpl__text p { margin: .1rem 0; }
@media (max-width: 900px) { .msp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .msp-grid--2 { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .msp-grid { grid-template-columns: 1fr; } }
.msp-list.is-busy [data-msp-swap="list"], .msp-list.is-busy [data-msp-swap="head"] { opacity: .45; transition: opacity .15s; pointer-events: none; }
.msp-all { white-space: nowrap; margin: 0; }
.msp-tools { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); padding: var(--space-3) 0; border-top: 1px solid var(--border); }
.msp-search { flex: 1 1 18rem; max-width: 28rem; margin: 0 0 0 auto; }
/* 2.10.557: date of issue in one row — "Date of issue", the date box(es), the print button; the hint starts right under
   the first date box. Grid with auto placement, so a school showing BS only (or AD only) has no gap where the hidden box is. */
.msp-bar__go { display: grid; grid-auto-flow: column; justify-content: end; align-items: center; column-gap: var(--space-2); row-gap: .3rem; max-width: 100%; }
.msp-bar__go > .field { display: contents; }
.msp-bar__go > .field > label { grid-row: 1; grid-column: 1; margin: 0; white-space: nowrap; }
.msp-bar__go .date-group { grid-row: 1; width: 12rem; }
.msp-bar__go .bs-field { grid-row: 1; width: 13rem; margin-top: 0; }
.msp-bar__go > .btn { grid-row: 1; white-space: nowrap; }
.msp-bar__go > .field > .field__hint, .msp-bar__go > .field > .field__error { grid-row: 2; grid-column: 2 / span 2; margin: 0; text-align: left; }
.msp-wrap[hidden] { display: none; }
@media (max-width: 640px) {
  .msp-bar__go { display: flex; flex-wrap: wrap; justify-content: flex-start; }
  .msp-bar__go > .field > label, .msp-bar__go > .field > .field__hint { flex: 0 0 100%; }
  .msp-bar__go > .field > label { order: 0; } .msp-bar__go .date-group { order: 1; } .msp-bar__go .bs-field { order: 2; } .msp-bar__go > .btn { order: 3; flex: 0 0 100%; } .msp-bar__go > .field > .field__hint { order: 4; }
  .msp-bar__go .date-group, .msp-bar__go .bs-field { flex: 1 1 9rem; width: auto; }
}
/* 2.10.559: Exam master › Results › Progress report (the same page as Student marksheets) */
.msp-grid > .pr-exams { grid-column: 1 / -1; border: 0; padding: 0; margin: 0; min-width: 0; }
.pr-exams legend { font-weight: 600; font-size: .85rem; margin-bottom: .45rem; padding: 0; }
.pr-chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.pr-chip { position: relative; margin: 0; cursor: pointer; }
.pr-chip input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.pr-chip span { display: inline-flex; align-items: center; gap: .35rem; padding: .4rem .8rem; border: 1px solid var(--border-strong); border-radius: 999px; font-size: .85rem; color: var(--muted); background: var(--surface); }
.pr-chip span::before { content: "○"; }
.pr-chip input:checked + span { background: var(--brand-soft); border-color: var(--brand); color: var(--brand-text); font-weight: 600; }
.pr-chip input:checked + span::before { content: "✓"; }
.pr-chip input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }
.msp-seg .field__hint { margin-top: .3rem; }
.pr-up { color: var(--ok, #15803d); font-weight: 600; }
.pr-dn { color: var(--err, #dc2626); font-weight: 600; }
/* 2.10.561: Student marksheets — 5 Marksheet template, Result and Order on the second line, all at one height */
.msp-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; }
.msp-grid--3 > .field { margin: 0; }
.msp-grid .msp-seg legend { line-height: 1.3rem; margin-bottom: .35rem; }
@media (max-width: 900px) { .msp-grid--3 { grid-template-columns: 1fr; } }
/* 2.10.562: Exam master › Results › Tabulation sheet (the page) */
.msp-list[hidden] { display: none; }
.ts-kpi { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: var(--space-3); margin-top: var(--space-4); }
.ts-k { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: .8rem 1rem; min-width: 0; }
.ts-k b { display: block; font-size: 1.45rem; line-height: 1.2; }
.ts-k span { display: block; font-size: .78rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ts-k--ok b { color: var(--ok, #15803d); }
.ts-k--bad b { color: var(--err, #dc2626); }
.ts-k--b b { color: var(--brand-text, var(--brand)); }
.ts-keys { display: contents; }
.ts-go > .ts-xl { grid-row: 1; display: flex; }
.ts-xl:empty { display: none; }
@media (max-width: 720px) { .ts-go > .ts-xl { order: 3; flex: 0 0 100%; } .ts-go > .ts-xl .btn { flex: 1; justify-content: center; } }
.msp-list > .msp-bar ~ [data-msp-swap="warn"] .alert { margin: 0 0 var(--space-3); }
.ts-wrap { max-height: 75vh; overflow: auto; }
.ts-table { border-collapse: separate; border-spacing: 0; }
.ts-table th, .ts-table td { text-align: center; padding: .4rem .45rem; white-space: nowrap; }
.ts-table thead th { position: sticky; top: 0; z-index: 2; background: var(--brand); color: var(--brand-ink); font-size: .76rem; }
.ts-table thead th small { display: block; font-weight: 400; opacity: .8; font-size: .68rem; }
.ts-table .ts-l { text-align: left; }
.ts-table td.ts-nm { font-weight: 600; position: sticky; left: 0; background: var(--surface); z-index: 1; }
.ts-table thead th.ts-l { position: sticky; left: 0; z-index: 3; }
.ts-table td b { display: block; font-weight: 600; }
.ts-table td i { display: block; font-style: normal; font-size: .7rem; color: var(--muted); }
.ts-table td.ts-bad { background: var(--err-bg, #fee2e2); color: var(--err, #b91c1c); }
.ts-table td.ts-bad i { color: inherit; }
.ts-table td.ts-t { font-weight: 600; background: var(--surface-2, #f8fafc); }
.ts-table .ts-pc { display: block; font-size: .65rem; color: var(--muted); }
.ts-table thead .ts-pc { color: inherit; opacity: .85; font-weight: 400; white-space: normal; }
.ts-table tfoot td { background: var(--brand-soft); color: var(--brand-text, var(--brand)); font-weight: 600; }
@media (max-width: 1100px) { .ts-kpi { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 560px) { .ts-kpi { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* 2.10.562: the printed tabulation sheet — A4 landscape, English */
@page ts { size: A4 landscape; margin: 9mm 10mm; }
.ts-page { background: #e5e7eb; margin: 0; }
.ts-sheet { page: ts; box-sizing: border-box; width: 297mm; min-height: 210mm; margin: 0 auto 12mm; padding: 9mm 10mm; background: #fff; color: #111827; font-size: 9.5pt; display: flex; flex-direction: column; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.ts-hd { display: flex; align-items: center; gap: 4mm; padding-bottom: 3mm; border-bottom: 3px double #1e3a8a; }
.ts-lo { width: 15mm; height: 15mm; flex: none; border-radius: 50%; overflow: hidden; display: flex; align-items: center; justify-content: center; background: #1e3a8a; color: #fff; font-weight: 700; font-size: 16pt; }
.ts-lo img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.ts-sc b { display: block; font-size: 15pt; color: #1e3a8a; letter-spacing: .02em; }
.ts-sc span { display: block; font-size: 8.5pt; color: #4b5563; }
.ts-ti { margin-left: auto; text-align: right; }
.ts-ti b { display: block; font-size: 12pt; letter-spacing: .3em; color: #1e3a8a; }
.ts-ti span { font-size: 8.5pt; color: #374151; }
.ts-pt { width: 100%; border-collapse: collapse; margin-top: 3mm; }
.ts-pt th { background: #1e3a8a; color: #fff; border: 1px solid #1e3a8a; padding: 1.3mm 1mm; font-size: 7.6pt; font-weight: 600; }
.ts-pt th small { display: block; font-weight: 400; opacity: .85; font-size: 6.4pt; }
.ts-pt td { border: 1px solid #cbd5e1; padding: .9mm 1mm; text-align: center; font-size: 8.4pt; }
.ts-pt td b { font-weight: 600; }
.ts-pt td i { font-style: normal; font-size: 6.8pt; color: #6b7280; margin-left: 1mm; }
.ts-pt .ts-l { text-align: left; }
.ts-pt td.ts-nm { font-weight: 600; white-space: nowrap; }
.ts-pt td.ts-t { font-weight: 600; background: #f8fafc; }
.ts-pt td.ts-bad { background: #fee2e2; color: #b91c1c; }
.ts-pt td.ts-fl { color: #b91c1c; font-weight: 600; }
.ts-pt tfoot td { background: #eef2ff; color: #1e3a8a; font-weight: 600; }
.ts-pt thead { display: table-header-group; }
.ts-pt tr { break-inside: avoid; }
.ts-pt--many th, .ts-pt--many td { font-size: 7pt; padding: .7mm .6mm; }
.ts-sum { display: flex; flex-wrap: wrap; gap: 2.5mm; margin-top: 3mm; font-size: 8.4pt; }
.ts-sum span { border: 1px solid #cbd5e1; border-radius: 1.5mm; padding: 1mm 2.5mm; }
.ts-sum b { color: #1e3a8a; }
.ts-sg { margin-top: auto; padding-top: 14mm; display: flex; align-items: flex-end; gap: 10mm; font-size: 8.6pt; break-inside: avoid; }
.ts-iss { flex: none; width: 55mm; color: #374151; }
.ts-s { flex: 1; text-align: center; border-top: 1px solid #374151; padding-top: 1mm; font-weight: 600; }
@media print { .ts-page { background: #fff; } .ts-sheet { margin: 0; width: auto; min-height: 0; padding: 0; } }

/* 2.10.563 Class position & comments */
.cp-kpi { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.ts-k--warn { border-color: #fcd34d; }
.ts-k--warn b { color: #b45309; }
.cp-rule { margin: .2rem 0 0; }
.cp-acts { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center; }
.cp-acts form { margin: 0; }
.cp-table td, .cp-table th { text-align: center; vertical-align: middle; }
.cp-table th small { display: block; font-weight: 400; opacity: .8; font-size: .68rem; }
.cp-table .ts-l { text-align: left; }
.cp-table .person-cell small { display: block; }
.cp-nw { white-space: nowrap; }
.cp-pos { display: inline-flex; width: 2rem; height: 2rem; border-radius: 50%; align-items: center; justify-content: center; font-weight: 700; background: var(--brand-soft, #e0e7ff); color: var(--brand-text, var(--brand)); }
.cp-pos--1 { background: #fde68a; color: #92400e; }
.cp-pos--2 { background: #e5e7eb; color: #374151; }
.cp-pos--3 { background: #fed7aa; color: #9a3412; }
.cp-tg { display: block; margin-top: .2rem; font-size: .68rem; font-weight: 600; color: #b45309; white-space: nowrap; }
.cp-tg--hand { color: var(--brand-text, var(--brand)); }
.cp-tie > td { background: #fffbeb; }
.cp-in { width: 4.2rem; text-align: center; }
.cp-in.is-set { border-color: var(--brand); background: var(--brand-soft, #eff6ff); font-weight: 600; }
.cp-cm { min-width: 11rem; }
.cp-nm { white-space: nowrap; }
.cp-table .person-cell { white-space: nowrap; }
.cp-ta { position: relative; }
.cp-ta textarea { display: block; box-sizing: border-box; width: 100%; min-height: 3rem; padding: .4rem 2.1rem .4rem .55rem; resize: vertical; font: inherit; font-size: .84rem; line-height: 1.35; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--text); }
.cp-pick { position: absolute; top: .3rem; right: .3rem; width: 1.6rem; height: 1.6rem; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); color: var(--brand-text, var(--brand)); cursor: pointer; padding: 0; }
.cp-pick .icon { width: 14px; height: 14px; }
.cp-pick:hover, .cp-pick[aria-expanded="true"] { border-color: var(--brand); }
.cp-pop { position: absolute; z-index: 60; width: min(20rem, calc(100vw - 2rem)); max-height: 20rem; overflow: auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: 0 12px 30px rgba(0, 0, 0, .16); padding: .5rem; font-size: .85rem; }
.cp-pop b { display: block; font-size: .68rem; letter-spacing: .03em; text-transform: uppercase; color: var(--muted); margin: .35rem .5rem .2rem; }
.cp-pop button, .cp-pop a { display: block; width: 100%; text-align: left; padding: .4rem .5rem; border: 0; border-radius: 8px; background: none; color: inherit; cursor: pointer; font: inherit; }
.cp-pop button:hover, .cp-pop button:focus-visible { background: var(--brand-soft, #eff6ff); color: var(--brand-text, var(--brand)); }
.cp-pop button.is-match { color: var(--brand-text, var(--brand)); }
.cp-pop a { color: var(--brand-text, var(--brand)); text-decoration: none; border-top: 1px solid var(--border); border-radius: 0; margin-top: .3rem; padding-top: .5rem; }
.cp-pop p { margin: .4rem .5rem; color: var(--muted); }
.cp-save { position: sticky; bottom: 0; z-index: 5; display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-3); align-items: center; justify-content: space-between; margin-top: var(--space-3); padding: .7rem 1rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: 0 -6px 18px rgba(0, 0, 0, .06); }
.cp-save__b { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.cp-dot { display: inline-block; width: .5rem; height: .5rem; border-radius: 50%; background: var(--border); margin-right: .4rem; vertical-align: middle; }
.cp-save.is-dirty .cp-dot { background: #f59e0b; }
.pr-form { display: grid; gap: var(--space-4); max-width: 46rem; }
.pr-steps { margin: .5rem 0 0 1.4rem; padding: 0; color: var(--text); font-size: .9rem; display: grid; gap: .15rem; }
.rc-table td:nth-child(1), .rc-table td:nth-child(2) { width: 6.5rem; }
.rc-table td:nth-child(3) input { width: 100%; }
.rc-acts { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center; justify-content: space-between; }
@page cp { size: A4 portrait; margin: 9mm 10mm; }
.cp-sheet { page: cp; width: 210mm; min-height: 297mm; }
.cp-pt td.cp-c { font-size: 8.5pt; min-width: 60mm; }
.cp-note { font-size: 8pt; color: #4b5563; margin: 2mm 0 0; }
@media (max-width: 1100px) { .cp-kpi { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) { .cp-kpi { grid-template-columns: repeat(2, minmax(0, 1fr)); } .cp-save { flex-direction: column; align-items: stretch; } .cp-save__b .btn { flex: 1; justify-content: center; } }
.cp-sheet .ts-sc { flex: 1; min-width: 0; }

/* 2.10.564 Marks entry on one page */
.mke-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.mke-subs-f { border: 0; margin: var(--space-4) 0 0; padding: 0; min-width: 0; }
.mke-subs-f legend { font-weight: 600; font-size: .85rem; margin-bottom: .45rem; padding: 0; }
.mke-subs { display: grid; grid-template-columns: repeat(auto-fill, minmax(11.5rem, 1fr)); gap: var(--space-2); }
.mke-sub { position: relative; display: block; cursor: pointer; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: .65rem .8rem .7rem; min-width: 0; }
.mke-sub input { position: absolute; opacity: 0; pointer-events: none; }
.mke-sub b { display: block; font-size: .9rem; padding-right: 4.6rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mke-sub small { display: block; color: var(--muted); font-size: .72rem; margin-top: .1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mke-sub .mke-sub__n { color: var(--text); margin-top: .35rem; }
.mke-sub__st { position: absolute; top: .55rem; right: .6rem; font-size: .66rem; font-weight: 600; padding: .05rem .45rem; border-radius: 999px; background: #f3f4f6; color: #6b7280; }
.mke-sub__bar { display: block; height: 5px; border-radius: 9px; background: var(--border); margin-top: .45rem; overflow: hidden; }
.mke-sub__bar i { display: block; height: 100%; width: 0; border-radius: 9px; background: #d1d5db; }
.mke-sub--done .mke-sub__st { background: #dcfce7; color: #15803d; } .mke-sub--done .mke-sub__bar i { background: #16a34a; }
.mke-sub--part .mke-sub__st { background: #fef3c7; color: #b45309; } .mke-sub--part .mke-sub__bar i { background: #f59e0b; }
.mke-sub:hover { border-color: var(--brand); }
.mke-sub:has(input:checked) { border: 2px solid var(--brand); padding: calc(.65rem - 1px) calc(.8rem - 1px) calc(.7rem - 1px); box-shadow: 0 0 0 3px var(--brand-soft, #dbeafe); }
.mke-sub:has(input:focus-visible) { outline: 2px solid var(--brand); outline-offset: 2px; }
.mke-win { display: flex; gap: .5rem; align-items: center; margin: var(--space-3) 0 0; padding: .55rem .85rem; border-radius: var(--radius); background: var(--brand-soft, #eff6ff); color: var(--brand-text, var(--brand)); font-size: .85rem; }
.mke-win--lock { background: #f3f4f6; color: var(--text); }
.mke-bar { margin-bottom: var(--space-2); }
.mke-bar p { margin: .15rem 0 0; }
.mke-tools { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center; margin-bottom: var(--space-3); }
.mke-tools .mke-del { margin-left: auto; }
.mke-list .alert { margin: 0 0 var(--space-3); }
.mke-photo { margin: 0 0 var(--space-3); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: .7rem 1rem; }
.mke-keys kbd { border: 1px solid var(--border-strong); border-bottom-width: 2px; border-radius: 4px; padding: 0 .3rem; font-size: .7rem; background: var(--surface-2, #f9fafb); font-family: inherit; }
.mke-table td, .mke-table th { vertical-align: middle; }
.mke-table td .input-sm { width: 4.6rem; text-align: center; font-weight: 600; }
.mke-table input.is-changed { background: #fffbeb; border-color: #f59e0b; }
.mke-table tr.mke-fail > td { background: #fff7f7; }
.mke-table [data-me-grade] { font-weight: 600; white-space: nowrap; }
.mke-table tr.mke-fail [data-me-grade] { color: var(--err, #b91c1c); }
.mke-abs { position: relative; display: inline-flex; cursor: pointer; }
.mke-abs input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.mke-abs span { display: inline-flex; padding: .2rem .65rem; border-radius: 999px; border: 1px solid var(--border-strong); font-size: .75rem; color: var(--muted); }
.mke-abs input:checked + span { background: #fee2e2; border-color: #fecaca; color: #b91c1c; font-weight: 600; }
.mke-abs input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }
.mke-abs input:disabled + span { opacity: .55; cursor: not-allowed; }
.mke-hint { margin: var(--space-3) 0 0; }
.mke-form .marks-pieces-note { margin: 0 0 var(--space-2); }
@media (max-width: 900px) { .mke-grid { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .mke-tools .mke-del { margin-left: 0; } .mke-subs { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* 2.10.565 Mark slip choices on Marks entry */
.mke-slip { position: relative; }
.mke-slip > summary { list-style: none; cursor: pointer; }
.mke-slip > summary::-webkit-details-marker { display: none; }
.mke-slip[open] > summary { border-color: var(--brand); }
.mke-slip__pop { position: absolute; z-index: 30; top: calc(100% + 6px); left: 0; width: min(26rem, calc(100vw - 2rem)); display: grid; gap: var(--space-3); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: 0 12px 30px rgba(0, 0, 0, .14); padding: var(--space-4); }
.mke-slip__pop h3 { margin: 0; font-size: .95rem; }
.mke-slip__pop .field { margin: 0; }
.mke-slip__go { display: flex; justify-content: flex-end; }
/* 2.10.568: Exam master › Seat plan — plans as cards, the new plan in four steps, the hall picture (tap to swap) */
.sp-c0 { --sp: #ef4444; } .sp-c1 { --sp: #3b82f6; } .sp-c2 { --sp: #22c55e; } .sp-c3 { --sp: #eab308; } .sp-c4 { --sp: #a855f7; }
.sp-c5 { --sp: #f97316; } .sp-c6 { --sp: #14b8a6; } .sp-c7 { --sp: #ec4899; } .sp-c8 { --sp: #84cc16; } .sp-c9 { --sp: #64748b; }
.sp-plans { display: grid; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); gap: var(--space-3); }
.sp-plan { display: flex; flex-direction: column; gap: .25rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: .9rem 1rem; text-decoration: none; color: var(--text); min-width: 0; }
.sp-plan:hover { border-color: var(--brand); }
.sp-plan b { font-size: 1rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sp-plan small { color: var(--muted); font-size: .8rem; }
.sp-tags { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .35rem; }
.sp-plan--new { align-items: center; justify-content: center; flex-direction: row; gap: .4rem; border: 2px dashed color-mix(in srgb, var(--brand) 45%, var(--border)); color: var(--brand-text); font-weight: 600; min-height: 5.5rem; }

.sp-form .sp-step { border: 0; margin: 0; padding: 0; min-width: 0; position: relative; }
.sp-step > legend { font-weight: 600; font-size: .92rem; margin-bottom: .55rem; padding: 0; display: flex; align-items: center; width: 100%; }
.sp-terms { display: flex; flex-wrap: wrap; gap: .45rem; }
.sp-term { cursor: pointer; }
.sp-term input, .sp-card input, .sp-hall input, .sp-mode input { position: absolute; opacity: 0; pointer-events: none; }
.sp-term span { display: inline-block; padding: .4rem .9rem; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); font-size: .88rem; }
.sp-term:hover span { border-color: var(--brand); }
.sp-term input:checked + span { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); font-weight: 600; }
.sp-term input:focus-visible + span, .sp-card:has(input:focus-visible), .sp-hall:has(input:focus-visible), .sp-mode:has(input:focus-visible) { outline: 2px solid var(--brand); outline-offset: 2px; }
.sp-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(8.5rem, 1fr)); gap: .5rem; }
.sp-cards[hidden] { display: none; }
.sp-card, .sp-hall, .sp-mode { position: relative; display: block; cursor: pointer; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: .55rem .75rem; min-width: 0; }
.sp-card b, .sp-hall b, .sp-mode b { display: block; font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sp-card small, .sp-hall small, .sp-mode small { display: block; color: var(--muted); font-size: .75rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sp-card:hover, .sp-hall:hover, .sp-mode:hover { border-color: var(--brand); }
.sp-card:not(:has(input:checked)) b, .sp-card:not(:has(input:checked)) small { opacity: .55; }
.sp-card:has(input:checked), .sp-hall:has(input:checked), .sp-mode:has(input:checked) { border: 2px solid var(--brand); padding: calc(.55rem - 1px) calc(.75rem - 1px); background: color-mix(in srgb, var(--brand-soft) 55%, var(--surface)); }
.sp-halls { display: grid; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); gap: .55rem; }
.sp-hall { padding: .7rem .85rem; }
.sp-hall:has(input:checked) { padding: calc(.7rem - 1px) calc(.85rem - 1px); }
.sp-hall b { padding-right: 2rem; }
.sp-hall__no { position: absolute; top: .6rem; right: .7rem; font-style: normal; font-weight: 700; font-size: .78rem; color: var(--brand-text); }
.sp-mini { display: grid; gap: 3px; margin-top: .5rem; grid-template-columns: repeat(3, 1fr); }
.sp-mini i { display: block; height: 5px; border-radius: 3px; background: color-mix(in srgb, var(--brand) 30%, transparent); }
.sp-hall:not(:has(input:checked)) .sp-mini i { background: var(--border); }
.sp-mini--c1 { grid-template-columns: repeat(1, 1fr); } .sp-mini--c2 { grid-template-columns: repeat(2, 1fr); } .sp-mini--c4 { grid-template-columns: repeat(4, 1fr); }
.sp-mini--c5 { grid-template-columns: repeat(5, 1fr); } .sp-mini--c6 { grid-template-columns: repeat(6, 1fr); } .sp-mini--c7 { grid-template-columns: repeat(7, 1fr); }
.sp-mini--c8 { grid-template-columns: repeat(8, 1fr); } .sp-mini--c9 { grid-template-columns: repeat(9, 1fr); } .sp-mini--c10 { grid-template-columns: repeat(10, 1fr); }
.sp-mini--c11 { grid-template-columns: repeat(11, 1fr); } .sp-mini--c12 { grid-template-columns: repeat(12, 1fr); }
.sp-cap { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .5rem; margin: .7rem 0 0; padding: .6rem .8rem; border-radius: var(--radius); background: var(--ok-bg); color: var(--ok); font-size: .88rem; font-weight: 600; }
.sp-cap.is-short { background: var(--warn-bg); color: var(--warn); }
.sp-cap__bar { flex: 1 1 8rem; height: 6px; border-radius: 9px; background: color-mix(in srgb, currentColor 18%, transparent); overflow: hidden; }
.sp-cap__bar i { display: block; height: 100%; width: 0; border-radius: 9px; background: currentColor; }
.sp-modes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .55rem; }
.sp-mode { padding: .75rem .9rem; } .sp-mode:has(input:checked) { padding: calc(.75rem - 1px) calc(.9rem - 1px); }
.sp-mode small { white-space: normal; }
.sp-mode__b { display: inline-grid; grid-template-columns: repeat(6, 1.1rem); gap: 2px; margin-top: .5rem; }
.sp-mode__b i { height: .75rem; border-radius: 3px; background: color-mix(in srgb, var(--sp) 55%, transparent); }
.sp-mode__b i:nth-child(2n) { margin-right: .3rem; }
.sp-switch { display: flex; align-items: center; gap: .6rem; cursor: pointer; font-size: .9rem; }
.sp-switch input { position: absolute; opacity: 0; pointer-events: none; }
.sp-switch__t { flex: none; width: 2.4rem; height: 1.35rem; border-radius: 999px; background: var(--border-strong, #94a3b8); position: relative; transition: background .15s; }
.sp-switch__t::after { content: ""; position: absolute; top: .15rem; left: .15rem; width: 1.05rem; height: 1.05rem; border-radius: 50%; background: #fff; transition: transform .15s; }
.sp-switch input:checked + .sp-switch__t { background: var(--brand); }
.sp-switch input:checked + .sp-switch__t::after { transform: translateX(1.05rem); }
.sp-switch input:focus-visible + .sp-switch__t { outline: 2px solid var(--brand); outline-offset: 2px; }
.sp-go { display: flex; gap: .6rem; align-items: center; }
.sp-go .field { flex: 1; margin: 0; }
.sp-kpi { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 0; }
.sp-board { display: flex; flex-direction: column; gap: .7rem; }
.sp-tray { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; padding: .6rem .75rem; border-radius: var(--radius); background: var(--warn-bg); }
.sp-tray > b { color: var(--warn); font-size: .85rem; margin-right: .2rem; }
.sp-chip { cursor: pointer; padding: .3rem .75rem; font: inherit; font-size: .85rem; }
.sp-chip.is-picked { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.sp-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem; }
.sp-tabs { display: flex; flex-wrap: wrap; gap: .4rem; }
.sp-tab { position: relative; padding: .4rem .9rem; border: 1px solid var(--border); border-radius: 999px; text-decoration: none; color: var(--text); font-size: .88rem; background: var(--surface); }
.sp-tab:hover { border-color: var(--brand); }
.sp-tab.is-on { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); font-weight: 600; }
.sp-tab__hit { position: absolute; top: -.35rem; right: -.3rem; min-width: 1.1rem; height: 1.1rem; padding: 0 .25rem; border-radius: 999px; background: #f59e0b; color: #fff; font-style: normal; font-size: .66rem; font-weight: 700; display: grid; place-items: center; }
.sp-tab__hit[hidden] { display: none; }
.sp-find { margin: 0; width: min(20rem, 100%); }
.sp-legend { display: flex; flex-wrap: wrap; gap: .35rem .9rem; margin: 0; font-size: .82rem; }
.sp-legend span { display: inline-flex; align-items: center; gap: .3rem; }
.sp-legend i { width: .8rem; height: .8rem; border-radius: 3px; background: color-mix(in srgb, var(--sp) 55%, transparent); }
.sp-tip { display: flex; align-items: center; gap: .45rem; margin: 0; padding: .5rem .75rem; border-radius: var(--radius); background: var(--brand-soft); color: var(--brand-text); font-size: .86rem; }
.sp-tip.is-on { font-weight: 600; }
.sp-hallv[hidden] { display: none; }
.sp-front { text-align: center; margin: 0 0 .6rem; padding: .35rem; border: 1px dashed var(--border-strong, #94a3b8); border-radius: var(--radius); font-size: .8rem; font-weight: 600; letter-spacing: .03em; }
.sp-benches { display: grid; gap: .55rem; grid-template-columns: repeat(3, minmax(0, 1fr)); overflow-x: auto; }
.sp-benches--c1 { grid-template-columns: repeat(1, minmax(10rem, 1fr)); } .sp-benches--c2 { grid-template-columns: repeat(2, minmax(10rem, 1fr)); } .sp-benches--c3 { grid-template-columns: repeat(3, minmax(10rem, 1fr)); }
.sp-benches--c4 { grid-template-columns: repeat(4, minmax(10rem, 1fr)); } .sp-benches--c5 { grid-template-columns: repeat(5, minmax(10rem, 1fr)); } .sp-benches--c6 { grid-template-columns: repeat(6, minmax(10rem, 1fr)); }
.sp-benches--c7 { grid-template-columns: repeat(7, minmax(10rem, 1fr)); } .sp-benches--c8 { grid-template-columns: repeat(8, minmax(10rem, 1fr)); } .sp-benches--c9 { grid-template-columns: repeat(9, minmax(10rem, 1fr)); }
.sp-benches--c10 { grid-template-columns: repeat(10, minmax(10rem, 1fr)); } .sp-benches--c11 { grid-template-columns: repeat(11, minmax(10rem, 1fr)); } .sp-benches--c12 { grid-template-columns: repeat(12, minmax(10rem, 1fr)); }
.sp-bench { border: 1px solid var(--border); border-radius: var(--radius); padding: .3rem .4rem .4rem; min-width: 0; }
.sp-bench__no { display: block; font-size: .68rem; color: var(--muted); margin: 0 0 .25rem .1rem; }
.sp-seats { display: flex; gap: .3rem; }
.sp-seat { flex: 1 1 0; min-width: 0; display: grid; grid-template-columns: auto 1fr; column-gap: .3rem; align-items: baseline; text-align: left; padding: .35rem .45rem; border-radius: 7px; border: 2px solid transparent;
  background: color-mix(in srgb, var(--sp, #94a3b8) 16%, var(--surface)); color: var(--text); font: inherit; line-height: 1.2; }
button.sp-seat { cursor: pointer; }
button.sp-seat:hover { border-color: color-mix(in srgb, var(--brand) 50%, transparent); }
.sp-seat .sp-no { font-style: normal; font-weight: 700; font-size: .8rem; }
.sp-seat b { font-size: .82rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sp-seat small { grid-column: 1 / -1; font-size: .7rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sp-seat--empty { background: transparent; border: 2px dashed var(--border); }
.sp-seat.is-picked { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.sp-seat.is-busy { opacity: .5; }
.sp-board.is-finding .sp-seat:not(.is-hit) { opacity: .3; }
.sp-seat.is-hit { border-color: #f59e0b; }

.sp-print-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .6rem; }
.sp-print { position: relative; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: .75rem .85rem; display: flex; flex-direction: column; gap: .3rem; min-width: 0; }
.sp-print:hover { border-color: var(--brand); }
.sp-print--new { border-color: color-mix(in srgb, var(--ok) 50%, var(--border)); }
.sp-print__go { display: flex; align-items: center; gap: .35rem; text-decoration: none; color: var(--text); }
.sp-print__go::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.sp-print small { color: var(--muted); font-size: .78rem; }
.sp-print__xl { position: relative; z-index: 1; align-self: flex-start; display: inline-flex; align-items: center; gap: .25rem; font-size: .8rem; }
.sp-edit > summary { cursor: pointer; list-style: none; }
.sp-edit > summary::-webkit-details-marker { display: none; }
.sp-edit > summary h2 { display: inline-flex; align-items: center; gap: .4rem; margin: 0; }
.sp-edit[open] > summary { margin-bottom: var(--space-4); }
.sp-del { margin-top: var(--space-4); padding-top: var(--space-3); border-top: 1px solid var(--border); }
.bs-page { page: bench-slips; box-sizing: border-box; width: 210mm; height: 297mm; margin: 0 auto 12px; padding: 8mm; background: #fff; color: #000; display: flex; flex-direction: column; font-family: var(--font, Arial, sans-serif); }
.bs-head { display: flex; justify-content: space-between; align-items: baseline; gap: 4mm; border-bottom: 1.5px solid #000; padding-bottom: 1.5mm; margin-bottom: 3mm; }
.bs-head b { font-size: 12pt; } .bs-head span { font-size: 9pt; color: #333; white-space: nowrap; }
.bs-grid { flex: 1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: repeat(8, minmax(0, 1fr)); gap: 4mm; }
.bs-slip { border: 1px dashed #555; border-radius: 1.5mm; padding: 2mm 3mm; display: flex; flex-direction: column; justify-content: space-between; min-width: 0; overflow: hidden; }
.bs-slip__t { display: flex; justify-content: space-between; gap: 2mm; margin: 0; font-size: 8pt; color: #333; }
.bs-slip__m { display: flex; align-items: center; gap: 3mm; min-width: 0; }
.bs-slip__m > div { min-width: 0; }
.bs-slip__no { flex: none; min-width: 12mm; padding: 1mm 1.5mm; border: 2px solid #000; border-radius: 2mm; text-align: center; font-size: 24pt; line-height: 1; }
.bs-slip__nm { display: block; font-size: 11pt; line-height: 1.15; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bs-slip__c { display: block; font-size: 9pt; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bs-slip__x { font-size: 7pt; color: #444; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@page bench-slips { size: A4 portrait; margin: 0; }
@media print { .bs-page { margin: 0; break-after: page; box-shadow: none; } .bs-page:last-child { break-after: auto; } .bs-slip__no { -webkit-print-color-adjust: exact; print-color-adjust: exact; } }
@media screen { .bs-page { box-shadow: 0 2px 12px rgba(0,0,0,.18); } }
@media (max-width: 1100px) { .sp-print-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 720px) { .sp-kpi { grid-template-columns: repeat(2, minmax(0, 1fr)); } .sp-benches--c1 { grid-template-columns: repeat(1, minmax(7rem, 1fr)); } .sp-benches--c2 { grid-template-columns: repeat(2, minmax(7rem, 1fr)); } .sp-benches--c3 { grid-template-columns: repeat(3, minmax(7rem, 1fr)); } .sp-benches--c4 { grid-template-columns: repeat(4, minmax(7rem, 1fr)); } .sp-benches--c5 { grid-template-columns: repeat(5, minmax(7rem, 1fr)); } .sp-benches--c6 { grid-template-columns: repeat(6, minmax(7rem, 1fr)); } .sp-benches--c7 { grid-template-columns: repeat(7, minmax(7rem, 1fr)); } .sp-benches--c8 { grid-template-columns: repeat(8, minmax(7rem, 1fr)); } .sp-benches--c9 { grid-template-columns: repeat(9, minmax(7rem, 1fr)); } .sp-benches--c10 { grid-template-columns: repeat(10, minmax(7rem, 1fr)); } .sp-benches--c11 { grid-template-columns: repeat(11, minmax(7rem, 1fr)); } .sp-benches--c12 { grid-template-columns: repeat(12, minmax(7rem, 1fr)); } .sp-seats { flex-direction: column; } .sp-modes { grid-template-columns: 1fr; } .sp-print-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sp-go { flex-direction: column; align-items: stretch; } .sp-find { width: 100%; } .sp-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* 2.10.570: a seat plan's printouts — A4 pages, the school's small letterhead on each (exams/seat-plan-print) */
.spp-page { page: seat-prints; box-sizing: border-box; width: 210mm; min-height: 297mm; margin: 0 auto 12px; padding: 10mm; background: #fff; color: #000; display: flex; flex-direction: column; font-size: 10pt; }
.spp-page:not(.spp-page--auto) { height: 297mm; }
.spp-lh { display: flex; align-items: center; gap: 3mm; border-bottom: 2px solid #000; padding-bottom: 2mm; margin-bottom: 3mm; }
.spp-lh__logo { width: 13mm; height: 13mm; object-fit: contain; }
.spp-lh__mark { width: 13mm; height: 13mm; border-radius: 50%; border: 1.5px solid #000; display: grid; place-items: center; font-weight: 800; font-size: 14pt; }
.spp-lh b { display: block; font-size: 14pt; } .spp-lh span { display: block; font-size: 8.5pt; }
.spp-lh__r { margin-left: auto; text-align: right; } .spp-lh__r b { font-size: 12pt; letter-spacing: .04em; }
.spp-ft { margin-top: auto; padding-top: 2mm; border-top: 1.5px solid #000; display: flex; justify-content: space-between; gap: 4mm; font-size: 9pt; }
.spp-page--auto .spp-ft { margin-top: 4mm; }
.spp-none { font-size: 12pt; }
.spp-door { text-align: center; margin: 8mm 0 5mm; }
.spp-door small { display: block; font-size: 12pt; } .spp-door b { display: block; font-size: 54pt; line-height: 1; margin: 3mm 0; word-break: break-word; } .spp-door span { font-size: 14pt; }
.spp-dn { width: 100%; border-collapse: collapse; }
.spp-dn th { text-align: left; font-size: 12pt; border-bottom: 2.5px solid #000; padding: 2mm; }
.spp-dn td { font-size: 20pt; padding: 3.5mm 2mm; border-bottom: 1px solid #999; vertical-align: top; }
.spp-dn__c { font-weight: 700; white-space: nowrap; }
.spp-n { text-align: right !important; font-weight: 700; }
.spp-door__tip { font-size: 13pt; margin: 8mm 0 0; }
.spp-boxes { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid #000; margin-bottom: 3mm; }
.spp-boxes div { border-right: 1px solid #000; padding: 1.5mm 2mm; min-height: 9mm; } .spp-boxes div:last-child { border-right: 0; }
.spp-boxes small { display: block; font-size: 8pt; } .spp-boxes b { display: block; font-size: 10.5pt; margin-top: .5mm; }
.spp-at { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 10pt; }
.spp-at th { border: 1px solid #000; background: #eef2ff; padding: 1.5mm; font-size: 8.5pt; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.spp-at td { border: 1px solid #000; padding: 0 2mm; height: 8.6mm; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.spp-w11 { width: 11mm; } .spp-w12 { width: 12mm; } .spp-w22 { width: 22mm; } .spp-w26 { width: 26mm; } .spp-w32 { width: 32mm; }
.spp-at__no { text-align: center; font-weight: 700; font-size: 12pt; } .spp-at__ro { text-align: center; font-weight: 700; }
.spp-sum { display: grid; grid-template-columns: repeat(4, 1fr); gap: 3mm; margin-top: 3mm; font-size: 9pt; }
.spp-sum span { border: 1px solid #000; padding: 1.5mm 2mm; height: 8mm; }
.spp-sg { display: flex; gap: 8mm; margin-top: 14mm; font-size: 8.5pt; text-align: center; } .spp-sg span { flex: 1; border-top: 1px solid #000; padding-top: 1mm; }
.spp-cls { text-align: center; margin: 2mm 0 4mm; } .spp-cls b { display: block; font-size: 20pt; } .spp-cls span { font-size: 10.5pt; }
.spp-ls { width: 100%; border-collapse: collapse; font-size: 11pt; }
.spp-ls th { text-align: left; border-bottom: 2px solid #000; padding: 1.8mm 2mm; font-size: 9pt; } .spp-ls th.spp-c { text-align: center; }
.spp-ls td { border-bottom: 1px solid #bbb; padding: 1.9mm 2mm; }
.spp-ls__r { width: 14mm; text-align: center; font-weight: 700; } .spp-ls__h { font-weight: 700; } .spp-ls__no { text-align: center; font-size: 14pt; font-weight: 800; } .spp-ls__b { font-size: 8.5pt; color: #444; }
.spp-page.spp-page--land { page: seat-layout; width: 297mm; height: 210mm; min-height: 0; padding: 8mm 10mm; }
.spp-lt { display: flex; align-items: center; flex-wrap: wrap; gap: 2mm 3mm; margin-bottom: 2.5mm; }
.spp-lt__h { font-size: 22pt; font-weight: 800; line-height: 1; margin-right: 3mm; }
.spp-lt__k { border: 1px solid #000; border-radius: 1.5mm; padding: .8mm 2.5mm; font-size: 8.5pt; } .spp-lt__k b { font-size: 11pt; margin-right: 1mm; }
.spp-lt__lg { margin-left: auto; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 1.5mm 2mm; font-size: 8.5pt; }
.spp-key { border: 1.5px solid #000; border-radius: 1.5mm; padding: 1mm 3mm; white-space: nowrap; -webkit-print-color-adjust: exact; print-color-adjust: exact; } .spp-key b { font-size: 10pt; margin-right: .8mm; }
.spp-room { flex: 1; min-height: 0; border: 2px solid #000; border-radius: 2mm; padding: 2.5mm 3mm; display: flex; flex-direction: column; }
.spp-room__f { display: flex; justify-content: center; align-items: center; gap: 8mm; margin-bottom: 2.5mm; }
.spp-board { width: 45%; padding: 1.2mm 0; background: #222; color: #fff; border-radius: 1mm; text-align: center; font-size: 8pt; font-weight: 700; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.spp-lg { flex: 1; min-height: 0; display: grid; grid-auto-rows: minmax(0, 1fr); grid-template-rows: auto; column-gap: 6mm; row-gap: 2mm; }
.spp-lg--c1 { grid-template-columns: 11mm repeat(1, minmax(0, 1fr)); } .spp-lg--c2 { grid-template-columns: 11mm repeat(2, minmax(0, 1fr)); } .spp-lg--c3 { grid-template-columns: 11mm repeat(3, minmax(0, 1fr)); } .spp-lg--c4 { grid-template-columns: 11mm repeat(4, minmax(0, 1fr)); } .spp-lg--c5 { grid-template-columns: 11mm repeat(5, minmax(0, 1fr)); } .spp-lg--c6 { grid-template-columns: 11mm repeat(6, minmax(0, 1fr)); } .spp-lg--c7 { grid-template-columns: 11mm repeat(7, minmax(0, 1fr)); } .spp-lg--c8 { grid-template-columns: 11mm repeat(8, minmax(0, 1fr)); } .spp-lg--c9 { grid-template-columns: 11mm repeat(9, minmax(0, 1fr)); } .spp-lg--c10 { grid-template-columns: 11mm repeat(10, minmax(0, 1fr)); } .spp-lg--c11 { grid-template-columns: 11mm repeat(11, minmax(0, 1fr)); } .spp-lg--c12 { grid-template-columns: 11mm repeat(12, minmax(0, 1fr)); }
.spp-lg__ch { font-size: 8pt; font-weight: 700; text-align: center; align-self: end; }
.spp-lg__rl { font-size: 8pt; font-weight: 700; align-self: center; }
.spp-bn { display: grid; border: 1.5px solid #000; border-radius: 1.5mm; overflow: hidden; min-width: 0; min-height: 0; }
.spp-bn--p1 { grid-template-columns: repeat(1, minmax(0, 1fr)); } .spp-bn--p2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .spp-bn--p3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .spp-bn--p4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } .spp-bn--p5 { grid-template-columns: repeat(5, minmax(0, 1fr)); } .spp-bn--p6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.spp-st { display: flex; align-items: center; gap: 2mm; padding: 1mm 1.8mm; border-left: 1px solid #000; min-width: 0; overflow: hidden; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.spp-st:first-child { border-left: 0; } .spp-st > div { min-width: 0; }
.spp-st b { font-size: 16pt; line-height: 1; min-width: 7mm; }
.spp-st span { display: block; font-size: 10pt; font-weight: 700; line-height: 1.15; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.spp-st small { display: block; font-size: 8pt; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: .4mm; }
.spp-st--e { color: #777; } .spp-st--e b { color: #999; }
.spp-lay--s .spp-st b { font-size: 12pt; min-width: 5.5mm; } .spp-lay--s .spp-st span { font-size: 8.5pt; } .spp-lay--s .spp-st small { font-size: 7pt; } .spp-lay--s .spp-lg { column-gap: 4mm; row-gap: 1.5mm; }
.spp-lay--xs .spp-st { flex-direction: column; align-items: stretch; gap: .2mm; padding: .5mm .8mm; } .spp-lay--xs .spp-st b { font-size: 8pt; min-width: 0; } .spp-lay--xs .spp-st span { font-size: 6.5pt; line-height: 1.1; overflow-wrap: anywhere; } .spp-lay--xs .spp-st small { font-size: 5.5pt; margin-top: .2mm; } .spp-lay--xs .spp-st--e small { display: none; } .spp-lay--xs .spp-lg { column-gap: 2mm; row-gap: 1mm; } .spp-lay--xs .spp-lg__rl, .spp-lay--xs .spp-lg__ch { font-size: 7pt; }
.spp-sh0 { background: #fff; }
.spp-sh1 { background: #e5e7eb; }
.spp-sh2 { background: repeating-linear-gradient(45deg, #fff 0 2px, #cfcfcf 2px 3px); }
.spp-sh3 { background: radial-gradient(#bdbdbd 18%, #fff 20%) 0 0 / 2.2mm 2.2mm; }
.spp-sh4 { background: repeating-linear-gradient(90deg, #fff 0 3px, #d6d6d6 3px 4px); }
.spp-sh5 { background: repeating-linear-gradient(-45deg, #f3f4f6 0 2px, #bdbdbd 2px 3px); }
@page seat-layout { size: A4 landscape; margin: 0; }
@page seat-prints { size: A4 portrait; margin: 0; }
@media print { .spp-page { margin: 0; break-after: page; box-shadow: none; } .spp-page:last-child { break-after: auto; } }
@media screen { .spp-page { box-shadow: 0 2px 12px rgba(0,0,0,.18); } }
.spp-fill { display: flex; gap: 2mm; margin-bottom: 2mm; } .spp-fill span { flex: 1; height: 6.5mm; box-sizing: border-box; border: 1px solid #000; padding: .6mm 2mm; font-size: 7.5pt; }
.spp-st { position: relative; } .spp-ab { position: absolute; top: .8mm; right: .8mm; width: 3.2mm; height: 3.2mm; border: 1px solid #000; background: #fff; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.spp-lay--xs .spp-ab { width: 2.4mm; height: 2.4mm; top: .5mm; right: .5mm; }
.spp-lsg { display: flex; align-items: flex-end; gap: 8mm; margin-top: 2mm; font-size: 8pt; } .spp-lsg b { flex: 1.4; font-weight: 400; } .spp-lsg span { flex: 1; border-top: 1px solid #000; padding-top: .8mm; text-align: center; margin-top: 6mm; }
.spp-lsg + .spp-ft { margin-top: 2mm; }
.spp-st:has(.spp-ab) { padding-right: 4.6mm; } .spp-lay--xs .spp-st:has(.spp-ab) { padding-right: 3.6mm; }
.spp-lay--xs .spp-st { display: block; line-height: 1.12; white-space: normal; overflow: hidden; } .spp-lay--xs .spp-st b { display: inline; margin-right: .8mm; } .spp-lay--xs .spp-st > div { display: inline; } .spp-lay--xs .spp-st span { display: inline; overflow-wrap: normal; }
.spp-lay--xs .spp-st small { display: block; overflow: hidden; text-overflow: ellipsis; } .spp-lay--xs .spp-st.spp-st--e small { display: none; } .spp-lg > .spp-bn { overflow: hidden; min-height: 0; }
.sp-step > legend { flex-wrap: wrap; gap: .4rem .6rem; }
.sp-count { font-size: .8rem; font-weight: 600; color: var(--brand-text); background: var(--brand-soft); border-radius: 999px; padding: .15rem .65rem; }
.sp-acts { margin-left: auto; display: flex; flex-wrap: wrap; gap: .4rem; }
.sp-act { display: inline-flex; align-items: center; gap: .35rem; padding: .3rem .75rem; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--text); font: inherit; font-size: .8rem; font-weight: 600; cursor: pointer; }
.sp-act:hover { border-color: var(--brand); } .sp-act .icon { color: var(--brand-text); }
.sp-act__dot { width: .55rem; height: .55rem; border-radius: 50%; background: var(--brand); }
.sp-card--z small { color: var(--warn); }
.sp-card:has(input:checked)::after { content: "✓"; position: absolute; top: .45rem; right: .55rem; width: 1.05rem; height: 1.05rem; border-radius: 50%; background: var(--brand); color: var(--brand-ink); font-size: .65rem; display: grid; place-items: center; }
.sp-card b { padding-right: 1.3rem; }
.sp-hint { margin: .55rem 0 0; font-size: .8rem; color: var(--muted); }
@media (max-width: 720px) { .sp-acts { margin-left: 0; width: 100%; } }
.sp-yr { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1rem; }
.sp-yr h2 { margin: 0; font-size: .82rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.sp-tchips { display: flex; flex-wrap: wrap; gap: .4rem; }
.sp-tchip { padding: .35rem .85rem; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--text); font: inherit; font-size: .84rem; cursor: pointer; }
.sp-tchip:hover { border-color: var(--brand); } .sp-tchip.is-on { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); font-weight: 600; }
.sp-plan[hidden] { display: none; }
/* 2.10.574: the academic year a page works with, beside its heading */
.year-chip { display: inline-flex; align-items: center; gap: .3rem; vertical-align: middle; margin-left: .5rem; padding: .18rem .65rem; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--brand) 30%, transparent); background: var(--brand-soft); color: var(--brand-text); font-size: .78rem; font-weight: 600; letter-spacing: 0; line-height: 1.3; white-space: nowrap; }
.year-chip--old { background: var(--warn-bg); color: var(--warn); border-color: color-mix(in srgb, var(--warn) 35%, transparent); }
@media (max-width: 560px) { .year-chip { margin: .35rem 0 0; white-space: normal; } h1 .year-chip { display: flex; width: fit-content; } }
@media print { .year-chip { border-color: #999; background: none; color: #000; } }
/* 2.10.575: Fill the times quickly — the break after a period (and a second one), a summary */
.tt-brk { margin: .75rem 0; padding: .7rem .9rem; border: 1.5px dashed color-mix(in srgb, var(--brand) 40%, var(--border)); border-radius: var(--radius-lg); background: color-mix(in srgb, var(--brand-soft) 45%, var(--surface)); display: flex; flex-direction: column; gap: .6rem; }
.tt-brk__row { display: grid; grid-template-columns: 8rem repeat(2, minmax(0, 1fr)) auto; gap: .5rem .9rem; align-items: start; }
.tt-brk__row[hidden] { display: none; }
.tt-brk__t { font-weight: 700; align-self: center; }
.tt-brk__row .field { margin: 0; } .tt-brk__row small, .tt-quick small { display: block; margin-top: .2rem; font-size: .75rem; }
.tt-brk__add { align-self: center; display: inline-flex; align-items: center; gap: .3rem; background: none; border: 0; padding: 0; color: var(--brand-text); font: inherit; font-size: .85rem; font-weight: 600; cursor: pointer; }
.tt-brk__add[hidden] { display: none; }
.tt-quick__foot { align-items: end; }
.tt-sum { grid-column: 2 / -1; margin: 0; padding: .55rem .8rem; border-radius: var(--radius); background: var(--ok-bg); color: var(--ok); font-size: .88rem; font-weight: 600; }
.tt-sum:empty { display: none; }
@media (max-width: 720px) { .tt-brk__row { grid-template-columns: 1fr 1fr; } .tt-brk__t { grid-column: 1 / -1; } .tt-sum { grid-column: 1 / -1; } }
.tt-quick .field { align-content: start; } .tt-quick__grid, .tt-brk__row { align-items: start; } .tt-brk__t, .tt-brk__add { align-self: center; }
/* 2.10.576: Exam setup — counts, states, each exam a card with its four steps */
.ex-kpi { margin-top: 0; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.ex-k--up { border-left: 4px solid #f59e0b; } .ex-k--pub { border-left: 4px solid #8b5cf6; }
.ex-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem; }
.ex-chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.ex-find { margin: 0; width: min(18rem, 100%); }
.ex-list { display: flex; flex-direction: column; gap: var(--space-3); }
.ex-card[hidden], .ex-none[hidden] { display: none; }
.ex-card__top { display: flex; align-items: flex-start; gap: .8rem; }
.ex-card__ic { flex: none; width: 2.6rem; height: 2.6rem; border-radius: .75rem; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand-text); }
.ex-ic--published { background: var(--ok-bg); color: var(--ok); } .ex-ic--running { background: var(--ok-bg); color: var(--ok); } .ex-ic--upcoming { background: var(--warn-bg); color: var(--warn); }
.ex-card__t { flex: 1; min-width: 0; } .ex-card__t h2 { margin: 0; font-size: 1.08rem; line-height: 1.35; } .ex-card__t h2 a { color: var(--text); text-decoration: none; } .ex-card__t h2 a:hover { color: var(--brand-text); }
.ex-card__t p { margin: .2rem 0 0; font-size: .86rem; }
.ex-st { display: inline-block; vertical-align: middle; margin-left: .35rem; padding: .15rem .6rem; border-radius: 999px; font-size: .74rem; font-weight: 700; }
.ex-st--up { background: var(--warn-bg); color: var(--warn); } .ex-st--run { background: var(--ok-bg); color: var(--ok); } .ex-st--pub { background: var(--brand-soft); color: var(--brand-text); } .ex-st--fin { background: var(--surface-2, #f3f4f6); color: var(--muted); }
.ex-card__acts { display: flex; gap: .4rem; align-items: center; flex: none; }
.ex-more { position: relative; } .ex-more > summary { list-style: none; cursor: pointer; } .ex-more > summary::-webkit-details-marker { display: none; }
.ex-more__menu { position: absolute; right: 0; top: calc(100% + .3rem); z-index: 20; min-width: 10rem; padding: .3rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: 0 8px 24px rgba(0,0,0,.12); }
.ex-more__item { width: 100%; display: flex; align-items: center; gap: .4rem; padding: .45rem .6rem; border: 0; border-radius: .4rem; background: none; font: inherit; font-size: .88rem; cursor: pointer; color: var(--text); }
.ex-more__item:hover { background: var(--surface-2, #f3f4f6); } .ex-more__item--bad { color: var(--bad, #b91c1c); }
.ex-cls { display: flex; flex-wrap: wrap; gap: .35rem; margin: .7rem 0 0 3.4rem; }
.ex-cls span { font-size: .76rem; padding: .15rem .5rem; border-radius: .4rem; background: var(--surface-2, #f3f4f6); }
.ex-cls__more { border: 0; background: none; padding: .15rem .3rem; color: var(--brand-text); font: inherit; font-size: .78rem; font-weight: 600; cursor: pointer; }
.ex-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .6rem; margin: .8rem 0 0 3.4rem; }
.ex-step { display: flex; flex-direction: column; gap: .25rem; padding: .6rem .75rem; border: 1px solid var(--border); border-radius: var(--radius-lg); text-decoration: none; color: var(--text); min-width: 0; }
.ex-step:hover { border-color: var(--brand); }
.ex-step__h { display: flex; justify-content: space-between; gap: .4rem; font-size: .82rem; } .ex-step__h span { color: var(--brand-text); font-weight: 600; white-space: nowrap; }
.ex-step small { color: var(--muted); font-size: .76rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ex-step__bar { height: 6px; border-radius: 9px; background: var(--surface-2, #eef0f6); overflow: hidden; margin-top: .15rem; } .ex-step__bar i { display: block; height: 100%; width: 0; border-radius: 9px; background: var(--border-strong, #cbd5e1); }
.ex-step.is-part .ex-step__bar i { background: var(--brand); } .ex-step.is-done .ex-step__bar i { background: #22c55e; }
@media (max-width: 900px) { .ex-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-left: 0; } .ex-cls { margin-left: 0; } .ex-kpi { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .ex-card__top { flex-wrap: wrap; } .ex-card__acts { width: 100%; } .ex-card__ic { display: none; } }
/* 2.10.577: one exam's page — the class chips with how much is entered, the steps, marks entry and results */
.exam-class-pick .chip { padding-right: .35rem; }
.exv-pct { font-style: normal; font-size: .72rem; font-weight: 700; padding: .05rem .45rem; border-radius: 999px; background: var(--surface); color: var(--muted); }
.exv-pct.is-done { background: var(--ok-bg); color: var(--ok); }
.chip.is-active .exv-pct { background: rgba(255,255,255,.25); color: inherit; }
.exv-steps { margin: 0 0 var(--space-4); }
.ex-step.is-now { border: 2px solid var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.ex-step.is-done { border-color: #86efac; }
.exv-card { display: flex; flex-direction: column; gap: var(--space-3); }
.exv-card h2 { margin: 0; }
.exv-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem; }
.exv-tools { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.exv-menu__list { min-width: 16rem; display: flex; flex-direction: column; }
.exv-menu__list small { display: block; padding: .45rem .6rem .15rem; font-size: .7rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.exv-menu__list small:last-child:not(:first-child) { text-transform: none; letter-spacing: 0; font-weight: 400; line-height: 1.35; max-width: 18rem; }
.exv-menu__list .ex-more__item { text-decoration: none; }
.exv-win { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; padding: .65rem .9rem; border-radius: var(--radius-lg); border: 1px solid; }
.exv-win--ok { background: var(--ok-bg); border-color: #86efac; } .exv-win--ok b { color: var(--ok); }
.exv-win--warn { background: var(--warn-bg); border-color: #fcd34d; } .exv-win--warn b { color: var(--warn); }
.exv-win b i { font-style: normal; } .exv-win > span:not(.exv-win__acts) { font-size: .88rem; color: var(--text); }
.exv-win__acts { margin-left: auto; display: flex; gap: .4rem; align-items: center; }
.exv-winform { border: 1px dashed var(--border-strong, #cbd5e1); border-radius: var(--radius-lg); padding: var(--space-3); }
.exv-winform[hidden] { display: none; }
.exv-kpi { margin: 0; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.exv-tcol { width: 15rem; }
.exv-pb { display: flex; align-items: center; gap: .6rem; } .exv-pb .ex-step__bar { flex: 1; margin: 0; } .exv-pb .ex-step__bar i { background: var(--brand); }
.exv-pb em { font-style: normal; font-size: .82rem; color: var(--muted); white-space: nowrap; min-width: 4.2rem; }
.exv-pb.is-done .ex-step__bar i { background: #22c55e; } .exv-pb.is-done em { color: var(--ok); font-weight: 700; }
.exv-acts { white-space: nowrap; text-align: right; } .exv-acts .btn + .btn { margin-left: .3rem; }
.exv-res { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: var(--space-4); align-items: start; }
.exv-big { display: flex; align-items: center; gap: .8rem; margin: 0 0 .5rem; } .exv-big b { font-size: 1.9rem; line-height: 1; white-space: nowrap; } .exv-big span { font-size: .9rem; }
.exv-bar { display: block; height: 8px; } .exv-bar i { background: var(--brand); } .exv-bar.is-done i { background: #22c55e; }
.exv-miss { margin: .7rem 0 0; } .exv-ok { margin: .7rem 0 0; color: var(--ok); font-weight: 600; display: flex; align-items: center; gap: .3rem; }
.exv-res__acts { display: flex; flex-direction: column; gap: .5rem; } .exv-res__acts form { margin: 0; } .exv-res__acts .btn { width: 100%; justify-content: center; } .exv-res__acts small { text-align: center; }
@media (max-width: 900px) { .exv-kpi { grid-template-columns: repeat(2, minmax(0, 1fr)); } .exv-res { grid-template-columns: 1fr; } .exv-win__acts { margin-left: 0; } }
@media print { .exv-steps, .exam-class-pick, .exv-win, .exv-res__acts, .no-print { display: none !important; } .exv-res { grid-template-columns: 1fr; } }
.exv-nw { white-space: nowrap; } .exv-sub { min-width: 12rem; }
@media (max-width: 700px) { .exv-menu .ex-more__menu { left: 0; right: auto; max-width: calc(100vw - 2.5rem); } }
/* 2.10.577: new / edit exam in four parts */
.exf { gap: var(--space-3); padding-bottom: 0; }
.exf-part { display: flex; flex-direction: column; gap: var(--space-3); }
.exf-h { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; } .exf-h h2 { margin: 0; font-size: 1.05rem; }
.exf-count { margin-left: auto; }
.exf-days { margin: 0; align-self: flex-start; font-size: .82rem; font-weight: 600; padding: .2rem .7rem; border-radius: 999px; background: var(--ok-bg); color: var(--ok); }
.exf-days.is-bad { background: var(--bad-bg, #fee2e2); color: var(--bad, #b91c1c); } .exf-days[hidden] { display: none; }
.exf-classes { border: 0; padding: 0; margin: 0; min-width: 0; }
.exf-picks { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .6rem; }
.exf-cls { display: grid; grid-template-columns: repeat(auto-fill, minmax(8.5rem, 1fr)); gap: .5rem; }
.exf-c { position: relative; display: flex; flex-direction: column; gap: .1rem; padding: .55rem .7rem; border: 1.5px solid var(--border); border-radius: var(--radius-lg); cursor: pointer; background: var(--surface); }
.exf-c input { position: absolute; opacity: 0; pointer-events: none; }
.exf-c b { font-size: .9rem; } .exf-c small { color: var(--muted); font-size: .76rem; }
.exf-c:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.exf-c:has(input:checked)::after { content: "✓"; position: absolute; right: .55rem; top: .4rem; color: var(--brand-text); font-weight: 800; }
.exf-c:has(input:focus-visible) { box-shadow: var(--focus); }
.exf-c__tag { position: absolute; right: .4rem; bottom: .35rem; font-style: normal; font-size: .64rem; font-weight: 700; padding: 0 .3rem; border-radius: .25rem; background: var(--warn-bg); color: var(--warn); }
.exf-locked { margin: 0; } .exf-locked[hidden], .exf-section[hidden] { display: none; }
.exf-section { max-width: 26rem; }
.exf-ch { border: 0; padding: 0; margin: 0; min-width: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; }
.exf-ch--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.exf-opt { display: flex; flex-wrap: wrap; align-items: center; align-content: flex-start; gap: .35rem .5rem; padding: .75rem .85rem; border: 1.5px solid var(--border); border-radius: var(--radius-lg); cursor: pointer; background: var(--surface); }
.exf-opt:has(input[type=radio]:checked) { border-color: var(--brand); background: var(--brand-soft); }
.exf-opt small { flex-basis: 100%; color: var(--muted); font-size: .8rem; }
.exf-opt .input-sm { width: 5rem; }
.exf-eg { flex-basis: 100%; font-size: .8rem; padding: .3rem .5rem; border: 1px dashed var(--border-strong, #cbd5e1); border-radius: .5rem; background: var(--surface); } .exf-eg[hidden], .exf-eg:empty { display: none; }
.exf-opt[data-eg]::after { content: attr(data-eg); flex-basis: 100%; font-size: .78rem; color: var(--muted); padding-left: 1.6rem; }
.exf-notes summary { cursor: pointer; color: var(--brand-text); font-weight: 600; font-size: .9rem; list-style: none; } .exf-notes summary::-webkit-details-marker { display: none; }
.exf-notes[open] summary { margin-bottom: .5rem; }
.exf-bar { position: sticky; bottom: 0; z-index: 5; display: flex; align-items: center; gap: .6rem; padding: .7rem 1rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: 0 -6px 20px rgba(0,0,0,.06); }
.exf-bar__sum { flex: 1; min-width: 0; color: var(--muted); font-size: .86rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 700px) { .exf-ch, .exf-ch--3 { grid-template-columns: 1fr; } .exf-count { margin-left: 0; } .exf-bar__sum { display: none; } .exf-bar { justify-content: flex-end; } }
.exf small[data-t]::after, .exf i[data-t]::after { content: attr(data-t); }
/* 2.10.578: Marks scheme */
.ms-how { margin-top: .35rem; } .ms-how summary { cursor: pointer; color: var(--brand-text); font-weight: 600; font-size: .88rem; display: inline-flex; align-items: center; gap: .3rem; list-style: none; } .ms-how summary::-webkit-details-marker { display: none; }
.ms-how__body { margin-top: .5rem; padding: .7rem .9rem; border-radius: var(--radius-lg); background: var(--surface-2, #f3f4f6); font-size: .86rem; color: var(--text); max-width: 60rem; } .ms-how__body p { margin: 0 0 .4rem; } .ms-how__body p:last-child { margin: 0; }
.ms-classes { display: flex; flex-wrap: wrap; gap: .45rem; padding: var(--space-3); margin-bottom: var(--space-3); }
.ms-classes .chip { text-decoration: none; color: var(--text); padding-right: .35rem; } .ms-classes .chip.is-active { background: var(--brand); color: var(--brand-ink, #fff); border-color: var(--brand); }
.ms-st { font-style: normal; font-size: .72rem; font-weight: 700; padding: .05rem .45rem; border-radius: 999px; } .ms-st.is-ok { background: var(--ok-bg); color: var(--ok); } .ms-st.is-warn { background: var(--warn-bg); color: var(--warn); }
.chip.is-active .ms-st { background: rgba(255,255,255,.25); color: inherit; }
.ms-card { display: flex; flex-direction: column; gap: var(--space-3); }
.ms-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem; } .ms-head h2 { margin: 0; font-size: 1.1rem; }
.ms-tools { display: flex; flex-wrap: wrap; gap: .4rem; } .ms-tools form { margin: 0; }
.ms-kpi { margin: 0; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.ms-form { display: flex; flex-direction: column; gap: var(--space-3); }
.ms-quick { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem; padding: .55rem .8rem; border: 1px dashed var(--border-strong, #cbd5e1); border-radius: var(--radius-lg); background: var(--surface-2, #f8fafc); font-size: .86rem; }
.ms-quick .input-sm { width: 4.5rem; } .ms-quick__40 { margin-left: auto; }
.ms-table td { vertical-align: middle; } .ms-sub { min-width: 13rem; } .ms-sub .badge { white-space: nowrap; }
.ms-pair { display: inline-flex; align-items: center; gap: .3rem; padding: .2rem .35rem; border: 1px solid var(--border); border-radius: .6rem; white-space: nowrap; }
.ms-pair small { font-size: .68rem; color: var(--muted); } .ms-pair .input-sm { width: 3.8rem; }
.ms-pct { font-style: normal; font-size: .74rem; color: var(--muted); margin-left: .35rem; white-space: nowrap; }
.ms-tot { white-space: nowrap; font-weight: 700; } .ms-tot small { display: block; font-weight: 400; font-size: .7rem; }
.ms-pc { min-width: 10rem; } .ms-pc__go { font-weight: 600; font-size: .86rem; color: var(--brand-text); white-space: nowrap; }
.ms-pc__x { border: 0; background: none; color: var(--bad, #b91c1c); font-weight: 700; cursor: pointer; padding: 0 .25rem; }
.ms-table tr.is-changed td { background: #fffbeb; } .ms-table tr.is-changed td:first-child { box-shadow: inset 3px 0 #f59e0b; }
.ms-bar__t { flex: 1; color: var(--muted); font-size: .88rem; } .ms-bar__t.is-dirty { color: var(--warn); font-weight: 600; } .ms-bar__t.is-dirty::before { content: "● "; }
.ms-bar [hidden] { display: none; }
@media (max-width: 900px) { .ms-kpi { grid-template-columns: repeat(2, minmax(0, 1fr)); } .ms-quick__40 { margin-left: 0; } }
@media (max-width: 700px) { .ms-tools .ex-more__menu { left: 0; right: auto; } }
.ms-table td:has(.ms-pair) { white-space: nowrap; }
/* 2.10.580: the list's Copy · Excel · CSV · PDF · Print · Columns as one "Export ▾" menu (data-tools-menu) */
.tt-drop { position: relative; } .tt-drop > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: .35rem; } .tt-drop > summary::-webkit-details-marker { display: none; }
.tt-drop .table-tools--menu { position: absolute; right: 0; top: calc(100% + .3rem); z-index: 30; display: flex; flex-direction: column; align-items: stretch; gap: 0; min-width: 12rem; padding: .3rem; margin: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: 0 10px 28px rgba(0,0,0,.14); }
.table-tools--menu .tt-btn { justify-content: flex-start; width: 100%; border: 0; border-radius: .4rem; background: none; padding: .45rem .6rem; }
.table-tools--menu .tt-btn:hover { background: var(--surface-2, #f3f4f6); }
.table-tools--menu [data-tt="print"] { order: 1; } .table-tools--menu [data-tt="pdf"] { order: 2; } .table-tools--menu [data-tt="excel"] { order: 3; } .table-tools--menu [data-tt="csv"] { order: 4; } .table-tools--menu [data-tt="copy"] { order: 5; }
.table-tools--menu .tt-cols { order: 6; border-top: 1px solid var(--border); margin-top: .2rem; padding-top: .2rem; } .table-tools--menu .tt-cols .tt-menu { position: static; box-shadow: none; border: 0; padding: .2rem .6rem; }
@media (max-width: 700px) { .tt-drop .table-tools--menu { right: auto; left: 0; } }
/* 2.10.580: Reception pages */
.rc-today { display: inline-block; vertical-align: middle; margin-left: .4rem; padding: .15rem .6rem; border-radius: 999px; font-size: .74rem; font-weight: 700; background: var(--brand-soft); color: var(--brand-text); }
.rc-kpi { margin: 0 0 var(--space-3); grid-template-columns: repeat(4, minmax(0, 1fr)); } .rc-kpi__txt { font-size: 1rem !important; line-height: 1.3; }
.rc-bar { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; padding: .7rem .9rem; margin-bottom: var(--space-3); }
.rc-chips { display: flex; flex-wrap: wrap; gap: .4rem; flex: 1; min-width: 0; } .rc-chips .sp-tchip { text-decoration: none; }
.rc-find { margin: 0; width: min(18rem, 100%); }
.rc-more { position: relative; } .rc-more > summary { list-style: none; cursor: pointer; } .rc-more > summary::-webkit-details-marker { display: none; }
.rc-more__body { position: absolute; right: 0; top: calc(100% + .35rem); z-index: 25; width: min(34rem, 92vw); padding: .9rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: 0 10px 28px rgba(0,0,0,.14); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; }
.rc-more__go { grid-column: 1 / -1; display: flex; gap: .4rem; justify-content: flex-end; }
.rc-bulk { margin: 0 0 .5rem; justify-content: flex-end; }
.rc-list td small { display: block; color: var(--muted); font-size: .78rem; } .rc-list td b { font-weight: 600; }
.rx-acts { white-space: nowrap; text-align: right; } .rx-acts > * { display: inline-block; vertical-align: middle; margin-left: .25rem; } .rx-acts form { margin: 0; }
.b-in { font-size: .72rem; font-weight: 700; padding: .05rem .45rem; border-radius: 999px; background: var(--warn-bg); color: var(--warn); }
.rc-quick { display: flex; flex-direction: column; gap: .4rem; margin-bottom: var(--space-3); } .rc-quick h2 { margin: 0; font-size: 1rem; } .rc-quick p { margin: 0; }
.rc-quick__row { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr auto; gap: .6rem; align-items: end; } .rc-quick__row .field { margin: 0; }
.rc-h { font-size: 1rem; margin: 0 0 .5rem; display: flex; align-items: center; gap: .4rem; }
.rc-inside { display: grid; grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); gap: .6rem; margin-bottom: var(--space-3); }
.rc-vis { display: flex; flex-direction: column; gap: .3rem; align-items: flex-start; padding: .7rem .8rem; border: 1.5px solid #86efac; border-radius: var(--radius-lg); background: var(--surface); }
.rc-vis small { color: var(--muted); font-size: .8rem; } .rc-vis form { margin: 0; }
.rc-dir { display: inline-grid; place-items: center; width: 1.6rem; height: 1.6rem; border-radius: 50%; font-weight: 800; } .rc-dir--incoming { background: var(--ok-bg); color: var(--ok); } .rc-dir--outgoing { background: var(--brand-soft); color: var(--brand-text); }
.rc-dialog { width: min(36rem, 94vw); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1rem 1.1rem; background: var(--surface); color: var(--text); }
.rc-dialog::backdrop { background: rgba(15,23,42,.45); }
.rc-dialog__h { display: flex; align-items: center; justify-content: space-between; } .rc-dialog__h h2 { margin: 0; font-size: 1.1rem; }
.rc-dialog__go { display: flex; align-items: center; gap: .4rem; } .rc-dialog__go .sp { flex: 1; }
.rc-seg { display: inline-flex; border: 1px solid var(--border); border-radius: .6rem; overflow: hidden; } .rc-seg label, .rc-seg a { padding: .35rem .8rem; font-size: .86rem; font-weight: 600; cursor: pointer; text-decoration: none; color: var(--text); }
.rc-seg label:has(input:checked), .rc-seg a.is-on { background: var(--brand); color: var(--brand-ink, #fff); } .rc-seg input { position: absolute; opacity: 0; pointer-events: none; }
.rc-times { display: flex; align-items: center; gap: .3rem; } .rc-times input { min-width: 0; flex: 1; }
.rc-board { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .8rem; margin-bottom: .5rem; }
.rc-col { background: var(--surface-2, #f1f5f9); border-radius: var(--radius-lg); padding: .7rem; min-height: 8rem; display: flex; flex-direction: column; gap: .5rem; border: 2px dashed transparent; }
.rc-col.is-over { border-color: var(--brand); } .rc-col h2 { margin: 0 0 .2rem; font-size: .95rem; display: flex; align-items: center; gap: .4rem; } .rc-col__none { margin: 0; }
.rc-card { background: var(--surface); border: 1px solid var(--border); border-radius: .7rem; padding: .6rem .7rem; display: flex; flex-direction: column; gap: .25rem; cursor: grab; }
.rc-card.is-old { border-left: 4px solid var(--bad, #dc2626); } .rc-card.is-drag { opacity: .5; }
.rc-card__t { font-weight: 600; color: var(--text); text-decoration: none; line-height: 1.35; } .rc-card small { color: var(--muted); font-size: .78rem; }
.rc-card__f { display: flex; align-items: center; justify-content: space-between; gap: .4rem; } .rc-card__f form { margin: 0; }
@media (max-width: 900px) { .rc-kpi { grid-template-columns: repeat(2, minmax(0, 1fr)); } .rc-quick__row { grid-template-columns: 1fr 1fr; } .rc-quick__row .btn { grid-column: 1 / -1; } .rc-board { grid-template-columns: 1fr; } .rc-more__body { grid-template-columns: 1fr; right: auto; left: 0; } }
.rx-acts { width: 1%; } .rc-bulk:has([data-bulk-submit]:disabled) { display: none; }
.rc-list td:first-child + td { white-space: normal; }
.enq-bulk { position: sticky; top: .5rem; z-index: 20; display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; padding: .6rem .9rem; margin-bottom: .6rem; border: 2px solid var(--brand); background: var(--brand-soft); }
.enq-bulk[hidden] { display: none; } .enq-bulk__n { color: var(--brand-text); margin-right: .3rem; } .enq-bulk__x { margin-left: auto; }
.enq-bulk__pick { min-width: 18rem; padding: .7rem; display: flex; flex-direction: column; gap: .5rem; } .enq-bulk__pick .field { margin: 0; }
.rx-table tr.is-picked td { background: var(--brand-soft); }
.enq-quick { display: flex; flex-wrap: wrap; gap: .4rem; }
.rx-table td b { white-space: nowrap; } .rx-table td:has(> a b) { min-width: 9rem; }
/* 2.10.580: an enquiry's page */
.enq-steps { list-style: none; display: flex; margin: 0 0 var(--space-3); padding: 0; border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--border); }
.enq-steps li { flex: 1; text-align: center; padding: .5rem .4rem; font-size: .84rem; font-weight: 700; background: var(--surface-2, #f1f5f9); color: var(--muted); border-right: 2px solid var(--surface); }
.enq-steps li:last-child { border-right: 0; } .enq-steps li.is-done { background: var(--ok-bg); color: var(--ok); } .enq-steps li.is-now { background: var(--brand); color: var(--brand-ink, #fff); }
.enq-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: var(--space-3); align-items: start; }
.enq-tl-card h2, .enq-det h2 { margin: 0 0 .6rem; font-size: 1.05rem; display: flex; align-items: center; gap: .4rem; }
.enq-add { padding: .8rem; border: 1px dashed var(--border-strong, #cbd5e1); border-radius: var(--radius-lg); margin-bottom: .9rem; gap: .5rem; }
.enq-add .field { margin: 0; } .enq-add__row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; }
.enq-tl { list-style: none; margin: 0; padding: 0 0 0 1rem; border-left: 2px solid #c7d2fe; display: flex; flex-direction: column; gap: .8rem; }
.enq-tl li { position: relative; display: flex; flex-direction: column; gap: .15rem; } .enq-tl li::before { content: ""; position: absolute; left: calc(-1rem - 6px); top: .3rem; width: 10px; height: 10px; border-radius: 50%; background: var(--brand); }
.enq-tl li.enq-tl__first::before { background: var(--border-strong, #94a3b8); } .enq-tl b { font-weight: 600; } .enq-tl small { color: var(--muted); font-size: .8rem; }
@media (max-width: 900px) { .enq-grid { grid-template-columns: 1fr; } .enq-add__row { grid-template-columns: 1fr; } .enq-steps li { font-size: .72rem; } }
.enq-src { border: 0; padding: 0; margin: .6rem 0 0; } .enq-chip { cursor: pointer; } .enq-chip input { position: absolute; opacity: 0; pointer-events: none; }
.enq-chip:has(input:checked) { background: var(--brand); color: var(--brand-ink, #fff); border-color: var(--brand); } .enq-chip:has(input:focus-visible) { box-shadow: var(--focus); }
.enq-form .card > .field { margin-top: .6rem; }
.enq-more > summary { cursor: pointer; list-style: none; display: flex; flex-wrap: wrap; align-items: baseline; gap: .2rem .6rem; } .enq-more > summary::-webkit-details-marker { display: none; }
.enq-more > summary h2 { margin: 0; font-size: 1.05rem; color: var(--brand-text); } .enq-more > summary h2::before { content: "+ "; } .enq-more[open] > summary h2::before { content: "− "; } .enq-more[open] > summary { margin-bottom: .8rem; }
/* 2.10.580: Reception settings */
.ro { display: grid; grid-template-columns: 15rem minmax(0, 1fr); gap: var(--space-3); align-items: start; }
.ro-nav { display: flex; flex-direction: column; gap: .15rem; padding: .4rem; }
.ro-nav a { display: flex; justify-content: space-between; gap: .5rem; padding: .55rem .7rem; border-radius: .5rem; text-decoration: none; color: var(--text); font-weight: 600; font-size: .9rem; }
.ro-nav a:hover { background: var(--surface-2, #f3f4f6); } .ro-nav a.is-on { background: var(--brand-soft); color: var(--brand-text); } .ro-nav i { font-style: normal; color: var(--muted); font-weight: 400; }
.ro-nav__out { border-top: 1px solid var(--border); margin-top: .3rem; padding-top: .7rem !important; }
.ro-list h2 { margin: 0; font-size: 1.1rem; } .ro-list > p { margin: .2rem 0 .8rem; }
.ro-chips { list-style: none; display: flex; flex-wrap: wrap; gap: .5rem; margin: 0 0 .8rem; padding: 0; }
.ro-chip { position: relative; display: inline-flex; align-items: center; gap: .35rem; padding: .35rem .55rem; border: 1px solid var(--border); border-radius: .6rem; background: var(--surface); font-size: .9rem; }
.ro-chip[draggable="true"] { cursor: grab; } .ro-chip.is-drag { opacity: .45; } .ro-chip.is-off { color: var(--muted); } .ro-chip.is-off .ro-name { text-decoration: line-through; }
.ro-grip { color: var(--muted); font-size: .8rem; } .ro-x { margin: 0; } .ro-x button { border: 0; background: none; cursor: pointer; color: var(--muted); font-weight: 700; padding: 0 .15rem; } .ro-x button:hover { color: var(--bad, #b91c1c); }
.ro-edit > summary { list-style: none; cursor: pointer; color: var(--muted); } .ro-edit > summary::-webkit-details-marker { display: none; }
.ro-edit__f { position: absolute; left: 0; top: calc(100% + .3rem); z-index: 20; display: flex; gap: .3rem; padding: .4rem; background: var(--surface); border: 1px solid var(--border); border-radius: .6rem; box-shadow: 0 8px 22px rgba(0,0,0,.14); }
.ro-edit__f input { width: 13rem; }
.ro-hidden-h { margin: .2rem 0 .4rem; }
.ro-add { display: flex; gap: .5rem; align-items: center; margin-bottom: .4rem; } .ro-add .field { margin: 0; flex: 0 1 22rem; }
@media (max-width: 800px) { .ro { grid-template-columns: 1fr; } .ro-nav { flex-direction: row; flex-wrap: wrap; } }
@media (max-width: 700px) { .ro-edit__f { left: auto; right: 0; } .ro-edit__f input { width: 9rem; } .ro-chip { position: static; } .ro-chips { position: relative; } .enq-grid .ex-more__menu, .page-head .ex-more__menu { right: auto; left: 0; } }
.rx-table td small a { white-space: nowrap; }
/* 2.10.581 list cards: Copy · Excel · CSV · PDF · Print · Columns as the first row of the list's card (data-tools-head) */
.table-tools--head { margin: 0; padding: .6rem .8rem; border-bottom: 1px solid var(--border); align-items: center; gap: .35rem; }
.table-tools--head .tt-btn { min-height: 32px; padding: .25rem .65rem; border-radius: .55rem; box-shadow: none; font-size: .8rem; }
.table-tools--head .tt-btn svg { width: 15px; height: 15px; }
.table-tools--head [data-tt="excel"] svg { color: #107c41; } .table-tools--head [data-tt="pdf"] svg { color: #e2231a; } .table-tools--head [data-tt="csv"] svg { color: #0f766e; }
.table-tools--head .tt-btn:hover svg, .table-tools--head .tt-btn[aria-expanded="true"] svg { color: currentColor; }
.tt-count { margin-left: auto; color: var(--muted); font-size: .8rem; white-space: nowrap; }
.table-tools--head .bulk-bar { margin: 0 0 0 .5rem; gap: .4rem; }
.table-tools--head .tt-count + .bulk-bar { margin-left: .5rem; }
body.print-table-mode .tt-skip { display: none !important; }
@media (max-width: 560px) { .table-tools--head { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; } .table-tools--head .tt-btn { width: 34px; padding: 0; } .tt-count { font-size: .75rem; } }
/* tab bar: the less used parts under "More ▾" (data-tabs-more) */
.tabs--has-more { position: relative; }
.tabs .tabs__more-btn { font: inherit; font-weight: 600; cursor: pointer; background: none; border: 0; border-bottom: 2px solid transparent; padding: .55rem .9rem; color: var(--muted); white-space: nowrap; }
.tabs .tabs__more-btn.is-active { color: var(--brand); border-bottom-color: var(--brand); }
.tabs__more-menu { position: absolute; left: var(--mx, auto); top: calc(100% + .2rem); z-index: 30; min-width: 12rem; display: flex; flex-direction: column; padding: .3rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: 0 10px 28px rgba(0,0,0,.14); }
.tabs__more-menu[hidden] { display: none; }
.tabs .tabs__more-menu a { border: 0 !important; border-radius: .4rem !important; padding: .45rem .7rem !important; background: none !important; color: var(--text) !important; box-shadow: none !important; }
.tabs .tabs__more-menu a:hover { background: var(--surface-2, #f3f4f6) !important; } .tabs .tabs__more-menu a.is-active { background: var(--brand) !important; color: #fff !important; }
@media (max-width: 700px) { .tabs--panels.tabs--has-more { flex-wrap: wrap; overflow: visible; } .tabs__more-menu { left: auto; right: 0; } }
/* 2.10.581 Student details */
a.sd-k { text-decoration: none; color: var(--text); } a.sd-k:hover { border-color: var(--brand); }
.sd-k--ok { border-left: 4px solid #22c55e; } .sd-k--warn { border-left: 4px solid #f59e0b; } .sd-k--bad { border-left: 4px solid #ef4444; }
.sd-sub { display: block; color: var(--muted); font-size: .76rem; font-weight: 400; }
.sd-sub a { color: inherit; text-decoration: none; }
.sd-bulk { flex-wrap: wrap; } .sd-bulk__move { display: none; gap: .35rem; align-items: center; } .sd-bulk.is-picked .sd-bulk__move { display: inline-flex; }
.sd-bulk__move select { max-width: 13rem; }
.sd-table td { vertical-align: middle; }
.table-tools--head form.bulk-bar:not(.is-picked) { display: none; }
.table-tools--head:has(form.bulk-bar.is-picked) { background: color-mix(in srgb, var(--brand) 7%, var(--surface)); }
.table-tools--head:has(form.bulk-bar.is-picked) .tt-count { display: none; }
.sd-head .sd-photo { width: 76px; height: 76px; border-radius: 18px; display: inline-flex; align-items: center; justify-content: center; font-size: 1.5rem; font-weight: 800; background: var(--brand-soft, #eef2ff); color: var(--brand-text, var(--brand)); flex: 0 0 auto; }
.sd-head h1 { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.sd-line { display: flex; flex-wrap: wrap; gap: .15rem .9rem; margin: .2rem 0 0; } .sd-line span + span::before { content: "·"; margin-right: .9rem; color: var(--border-strong, #cbd5e1); }
.sd-line a { text-decoration: none; }
.sd-h { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.sd-more { margin-top: .4rem; }
.sd-fam > .card, .sd-fam .sd-fam__part { border: 0; box-shadow: none; background: none; padding: .8rem 0 0; margin: .8rem 0 0; border-top: 1px solid var(--border); border-radius: 0; }
.sd-fam .sd-fam__part:first-of-type { border-top: 0; margin-top: 0; padding-top: 0; }
.sd-fam > .card h2, .sd-fam h3 { font-size: .95rem; margin: 0 0 .45rem; }
.sd-acc { align-items: center; } .sd-acc__new[open] { flex: 1 0 100%; } .sd-acc__new > summary { list-style: none; } .sd-acc__new > summary::-webkit-details-marker { display: none; }
.sd-acc__new form { margin-top: .6rem; }
@media (max-width: 700px) { .sd-head .sd-photo { width: 56px; height: 56px; font-size: 1.1rem; } .sd-head .profile-actions { width: 100%; } }
.sdf-grid { gap: .2rem 1rem; } .sdf-adm { padding-top: .6rem; border-top: 1px dashed var(--border); }
.sdf .grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.sdf .grid-3 .field { margin: 0; }
.sdf-more > summary { cursor: pointer; display: flex; gap: .6rem; align-items: baseline; flex-wrap: wrap; list-style: none; } .sdf-more > summary::-webkit-details-marker { display: none; }
.sdf-more > summary::before { content: "▸"; color: var(--muted); } .sdf-more[open] > summary::before { content: "▾"; }
.sdf-more__body { margin-top: .8rem; }
.sdf-bar .btn--primary { order: 3; } .sdf-bar .btn[name="next"] { order: 2; }
.sdf-found { margin: 0; }
@media (max-width: 900px) { .sdf .grid-3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .sdf .grid-3 { grid-template-columns: 1fr; } .sdf-bar { flex-wrap: wrap; } .sdf-bar .btn { flex: 1 1 auto; justify-content: center; } }
/* 2.10.581 promotion */
.pm-bar .pm-sel { margin: 0; } .pm-bar .pm-sel select { min-height: 34px; }
.pm-chip--done { border-color: #86efac; }
.pm-to__row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: .6rem 1rem; } .pm-to__row .field { margin: 0; flex: 1 1 11rem; } .pm-to__row > b { align-self: center; }
.pm-how { position: relative; align-self: center; } .pm-how > summary { list-style: none; } .pm-how > summary::-webkit-details-marker { display: none; }
.pm-how__body { position: absolute; right: 0; top: calc(100% + .3rem); z-index: 20; width: min(30rem, 88vw); box-shadow: 0 10px 28px rgba(0,0,0,.14); background: var(--surface); }
.pm-go { display: inline-flex; border: 1px solid var(--border); border-radius: .55rem; overflow: hidden; }
.pm-go label { display: inline-flex; cursor: pointer; } .pm-go input { position: absolute; opacity: 0; pointer-events: none; }
.pm-go span { padding: .3rem .65rem; font-size: .8rem; font-weight: 600; color: var(--muted); border-left: 1px solid var(--border); }
.pm-go label:first-child span { border-left: 0; }
.pm-go input:checked + span { background: var(--brand); color: #fff; } .pm-go--leave input:checked + span { background: #dc2626; }
.pm-go input:focus-visible + span { box-shadow: var(--focus); }
.pm-table tr.is-leaving td { background: color-mix(in srgb, #ef4444 6%, var(--surface)); }
@media (max-width: 700px) { .pm-how__body { right: auto; left: 0; } }
.pm-table .person-cell strong { white-space: nowrap; } .pm-table td { vertical-align: middle; }
/* 2.10.581 login access */
.la-off { width: 17rem; padding: .7rem; }
.lc-slips { display: grid; grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); gap: .7rem; }
.lc-slip { border: 1px dashed var(--border-strong, #94a3b8); border-radius: var(--radius); padding: .8rem 1rem; background: var(--surface); break-inside: avoid; }
.lc-slip dl { display: grid; grid-template-columns: auto 1fr; gap: .2rem .6rem; margin: .5rem 0 0; font-size: .85rem; } .lc-slip dt { color: var(--muted); } .lc-slip dd { margin: 0; overflow-wrap: anywhere; }
@media print { .lc-slips { grid-template-columns: 1fr 1fr; } }
/* 2.10.581 care pages */
.cb-sep { width: 1px; align-self: stretch; background: var(--border); margin: 0 .2rem; }
.cb-dates > summary { list-style: none; cursor: pointer; } .cb-dates > summary::-webkit-details-marker { display: none; }
.cb-dates__body { right: auto; left: 0; width: min(24rem, 92vw); }
.cb-quick { padding: .7rem .9rem; margin-bottom: var(--space-3); }
.cb-quick__row { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; } .cb-quick__row .field { margin: 0; flex: 0 1 15rem; min-width: 10rem; }
.cb-quick__grow { flex: 1 1 14rem !important; } .cb-quick__t { white-space: nowrap; }
@media (max-width: 700px) { .cb-quick__row .field { flex: 1 1 100%; } .cb-quick__row .btn { flex: 1; justify-content: center; } }
.cb-quick__s { flex: 0 1 9rem !important; min-width: 7rem !important; }
.gp-code { margin: 0; flex: 1 1 18rem; } .gp-code input { font-size: 1.15rem; font-weight: 700; letter-spacing: .06em; min-height: 46px; }
.table-tools--head div.bulk-bar:has(button:disabled) { display: none; } .table-tools--head:has(div.bulk-bar button:not(:disabled)) .tt-count { display: none; }
/* 2.10.581 Student settings: one place, its parts down the left */
.ss-wrap { display: grid; grid-template-columns: 14rem minmax(0, 1fr); gap: var(--space-4); align-items: start; }
.ss-nav { position: sticky; top: 4.5rem; display: flex; flex-direction: column; gap: .15rem; padding: .6rem; }
.ss-nav__h { margin: .1rem .5rem .4rem; font-size: .75rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.ss-nav a { display: flex; align-items: center; gap: .5rem; padding: .5rem .6rem; border-radius: .5rem; text-decoration: none; color: var(--text); font-weight: 600; font-size: .9rem; }
.ss-nav a:hover { background: var(--surface-2, #f3f4f6); }
.ss-nav a.is-on { background: color-mix(in srgb, var(--brand) 10%, var(--surface)); color: var(--brand-text, var(--brand)); }
.ss-nav__out { margin-top: .4rem; border-top: 1px solid var(--border); border-radius: 0 !important; padding-top: .7rem !important; color: var(--muted) !important; font-weight: 500 !important; }
@media (max-width: 900px) { .ss-wrap { grid-template-columns: 1fr; } .ss-nav { position: static; flex-direction: row; flex-wrap: wrap; } .ss-nav__h { width: 100%; } .ss-nav__out { margin: 0; border: 0; padding-top: .5rem !important; } }
.pm-to { position: relative; }
@media (max-width: 700px) { .pm-how { position: static; } .pm-how__body { left: .5rem; right: .5rem; width: auto; }
  .sd-head .profile-actions { position: relative; } .sd-head .profile-actions .ex-more { position: static; } .sd-head .profile-actions .ex-more__menu { left: 0; right: auto; } }
.pm-go label { position: relative; }
/* 2.10.581: the "more actions" button — a white round button with the actions icon (three boxes and +), not ⋯ */
.act-btn { width: 34px; height: 34px; min-height: 34px; padding: 0 !important; border-radius: 50% !important; display: inline-flex; align-items: center; justify-content: center; background: var(--surface); box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.act-btn.btn--sm { width: 32px; height: 32px; min-height: 32px; }
.act-btn .icon { width: 17px; height: 17px; margin: 0; }
.ex-more[open] > .act-btn, .act-btn:hover { border-color: var(--brand); color: var(--brand-text, var(--brand)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 20%, transparent); }
a.ex-more__item { text-decoration: none; }
/* 2.10.582: the class drop-down beside the class chips (one line) */

/* 2.10.583: Student list filters — 1 Academic year, 2 Class, 3 Section (as on the result pages), then search and More filters */
.sf-filters { padding: .9rem 1rem; margin-bottom: var(--space-3); }
.sf-filters .field__hint { margin: .25rem 0 0; }
.sf-filters__row { display: flex; gap: .6rem; align-items: center; margin-top: .7rem; }
.sf-filters__row .rc-find, .sf-filters__row .msp-search { flex: 1 1 auto; width: auto; max-width: none; min-width: 0; margin: 0; }

/* 2.10.584: one filter look for every list (partials/step-filters.php) */
.sf-grid { display: grid; gap: var(--space-3); align-items: start; }
.sf-grid > .field { margin: 0; min-width: 0; } .sf-grid select { width: 100%; }
.sf-grid--1 { grid-template-columns: minmax(0, 22rem); } .sf-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.sf-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .sf-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.sf-dates { display: flex; gap: .35rem; align-items: center; margin-top: .4rem; } .sf-dates[hidden] { display: none; } .sf-dates input { flex: 1 1 0; min-width: 0; width: 0; padding-left: .5rem; padding-right: .3rem; }
.sf-filters > .sf-grid + .sf-filters__row { margin-top: .7rem; }
@media (max-width: 900px) { .sf-grid--3, .sf-grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .sf-grid--2, .sf-grid--3, .sf-grid--4 { grid-template-columns: 1fr; } .sf-filters__row { flex-wrap: wrap; } }
