/* icons default to a small size unless a rule says otherwise */
:where(svg.i:not([width])) { width: 18px; height: 18px; flex: none; }
@font-face { font-family: 'SSH'; src: url(fonts/stack-sans-headline.woff2) format('woff2'); font-weight: 200 800; font-display: swap; }
@font-face { font-family: 'SST'; src: url(fonts/stack-sans-text.woff2) format('woff2'); font-weight: 200 800; font-display: swap; }
@font-face { font-family: 'Noto Nastaliq Urdu'; src: url(fonts/noto-nastaliq-urdu-regular.woff) format('woff'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Noto Nastaliq Urdu'; src: url(fonts/noto-nastaliq-urdu-bold.woff) format('woff'); font-weight: 700; font-display: swap; }

/* Sawa Portal 1.0.3 — new Sawa U Sabeel blue (#062A56), cream, warm paper. Light and dark themes share one set of names:
   --surface (cards), --soft (inputs, quiet boxes), --title (headings), --btn (main buttons), and soft/ink pairs for colour tiles. */
:root {
  --brand: #062A56; --cream: #F7FBFF; /* 1.1.0: "cream" is now the brand sky white */
  --bg: #F2F7FC; --surface: #FFFFFF; --soft: #EEF4FA; --cream-2: #EAF2FA;
  --line: #DCE6F0; --line-2: #E8EFF6; --track: #E1EAF3;
  --ink: #0B2440; --ink-2: #34465C; --muted: #5D6B7C; --faint: #8B97A6;
  --title: #062A56; --link: #0B4F8F;
  --rail: #062A56; --rail-ink: #AFC3D8; --hero: #062A56; --hero-ink: #C9D7E6;
  --btn: #062A56; --btn-ink: #FFFFFF; --btn-hover: #0A3A72;
  --me: #062A56; --me-ink: #FFFFFF; --chat-bg: #F7FBFF; --sel: #EAF2FA;
  --teal: #36ADA3; --mint: #E3F4F2; --teal-ink: #1F7A72;
  --peach: #E3F4F2; --peach-ink: #1F7A72;
  --rose: #FBE7E7; --rose-ink: #9B2F2F;
  --gold: #FBF0D9; --gold-ink: #7A5A12; --amber: var(--gold); --amber-ink: var(--gold-ink);
  --sky: #E5EDF6; --sky-ink: #0B4F8F;
  --lilac: #E7EEF7; --lilac-ink: #062A56;
  --kid-bg: #F7FBFF; --masjid: #E3ECF5; --cloth-f: #B5654A; --cloth-m: #5F8DBF;
  --f-head: 'SSH', 'Segoe UI', system-ui, sans-serif;
  --f-text: 'SST', 'Segoe UI', system-ui, sans-serif;
  --f-ur: 'Noto Nastaliq Urdu', 'Jameel Noori Nastaleeq', 'SST', 'Segoe UI', sans-serif;
  --r-xl: 28px; --r-lg: 24px; --r-md: 16px; --r-sm: 12px;
  --shadow: 0 1px 2px rgba(6,53,99,.04), 0 10px 26px -18px rgba(6,53,99,.22);
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #06121F; --surface: #0C1D30; --soft: #10263D; --cream-2: #1A2A3A;
  --line: #1C3550; --line-2: #152B43; --track: #1C3550;
  --ink: #EAF0F6; --ink-2: #C3D0DE; --muted: #93A6BB; --faint: #6F849B;
  --title: #F7FBFF; --link: #9CC6F0;
  --rail: #030B14; --rail-ink: #93A6BB; --hero: #0F2B48; --hero-ink: #C3D0DE;
  --btn: #F7FBFF; --btn-ink: #062A56; --btn-hover: #DCE8F5;
  --me: #16406A; --me-ink: #EAF0F6; --chat-bg: #081829; --sel: #13304D;
  --teal: #5CC7B4; --mint: #123A36; --teal-ink: #7FD8C7;
  --peach: #123A36; --peach-ink: #7FD8C7;
  --rose: #3A1D24; --rose-ink: #F4A9A9;
  --gold: #3A3020; --gold-ink: #E8C77A;
  --sky: #11314F; --sky-ink: #9CC6F0;
  --lilac: #16304F; --lilac-ink: #C9DAEE;
  --kid-bg: #071526; --masjid: #DCE6F0; --cloth-f: #C98A6A; --cloth-m: #8FB3D9;
  --shadow: 0 1px 2px rgba(0,0,0,.2), 0 10px 26px -18px rgba(0,0,0,.6);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { min-height: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--f-text); font-size: 14.5px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 60; background: var(--bg); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; border-radius: 8px; }
h1, h2, h3, h4 { font-family: var(--f-head); margin: 0; letter-spacing: -0.01em; text-wrap: balance; }
p { margin: 0; }
a { color: var(--link); }
.num { font-variant-numeric: tabular-nums; }
[hidden] { display: none !important; }
img { max-width: 100%; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
:root { padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); }

/* ---------- app shell: floating navy rail (desktop) / top bar + floating tab bar (phone) ---------- */
.app { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 24px; min-height: 100vh; padding-block: 16px 0; padding-inline-start: max(16px, env(safe-area-inset-left, 0px)); }
.rail { background: var(--rail); border-radius: var(--r-xl); padding: 18px 8px 14px; display: flex; flex-direction: column; align-items: center; gap: 4px; position: sticky; top: 16px; height: calc(100vh - 32px); overflow: auto; scrollbar-width: none; }
.rail::-webkit-scrollbar { display: none; }
.brand { display: grid; place-items: center; padding-bottom: 12px; }
.brand img { width: 40px; height: 40px; object-fit: contain; }
.brand .bt { display: none; }
.nav { display: flex; flex-direction: column; align-items: center; gap: 4px; width: 100%; }
.nav button { position: relative; width: 74px; display: flex; flex-direction: column; align-items: center; gap: 3px; border: 0; background: none; color: var(--rail-ink); padding: 9px 2px 7px; border-radius: 18px; font-size: 10.5px; font-weight: 600; line-height: 1.2; text-align: center; }
.nav button svg { width: 22px; height: 22px; flex: none; }
.nav button span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav button:hover { background: rgba(255,255,255,.07); color: #fff; }
.nav button.on { background: var(--cream); color: #062A56; }
.cnt { position: absolute; top: 4px; inset-inline-end: 9px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: #E25C5C; color: #fff; font-size: 10.5px; font-weight: 700; line-height: 18px; text-align: center; font-family: var(--f-text); }
.rail .me { margin-top: auto; padding-top: 12px; width: 100%; display: grid; place-items: center; }
.rail .me .who { display: none; }
.rail .me .me-btn { width: auto; }
.av { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--sky); color: var(--sky-ink); font-family: var(--f-head); font-weight: 700; font-size: 13px; flex: none; }
.av.t { background: var(--mint); color: var(--teal-ink); }
.av.f { background: var(--peach); color: var(--peach-ink); }
.av.lg { width: 56px; height: 56px; font-size: 19px; }
.av.sm { width: 28px; height: 28px; font-size: 11px; }
.rail .av { background: var(--cream); color: #062A56; width: 44px; height: 44px; }
.me-btn { border: 0; background: none; color: inherit; display: flex; align-items: center; gap: 10px; text-align: start; width: 100%; padding: 0; }

.main { min-width: 0; display: flex; flex-direction: column; padding-inline-end: max(24px, env(safe-area-inset-right, 0px)); }
.top { display: flex; align-items: center; gap: 14px; padding-block: 8px 6px; flex-wrap: wrap; }
.top .ttl { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1 1 260px; }
.top .greet { color: var(--muted); font-size: 13.5px; }
.top .greet b { color: var(--ink); }
.top h1 { font-size: 34px; font-weight: 700; color: var(--title); letter-spacing: -0.02em; line-height: 1.15; }
.top .sub { color: var(--muted); font-size: 13.5px; }
.top .back { border: 1px solid var(--line); background: var(--surface); width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; color: var(--title); flex: none; }
.top .back svg { width: 18px; height: 18px; }
.top .tools { display: flex; align-items: center; gap: 10px; flex-wrap: nowrap; flex: 0 1 auto; min-width: 0; }
.top .tools .search { flex: 0 1 300px; width: auto; min-width: 180px; }
.top .tools > :not(.search) { flex-shrink: 0; }
.content { padding-block: 16px 48px; display: flex; flex-direction: column; gap: 22px; max-width: 1280px; width: 100%; }
/* wide screens: keep the page in a centred column, header lined up with the content */
@media (min-width: 861px) { .main > .top, .main > .content, .main > .kids { width: 100%; max-width: 1280px; margin-inline: auto; } }
.mtop, .tabs { display: none; }
.iconbtn { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--ink); display: grid; place-items: center; flex: none; padding: 0; }
.iconbtn svg { width: 19px; height: 19px; }
.themebtn { height: 44px; display: inline-flex; align-items: center; gap: 8px; padding: 0 16px 0 12px; border-radius: 99px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-weight: 600; font-size: 13.5px; }
.themebtn svg { width: 19px; height: 19px; }
.top .me-btn { width: auto; }
.top .me-btn .av { width: 44px; height: 44px; background: var(--cream); color: #062A56; }

/* language switch */
.lang { display: inline-flex; border: 1px solid var(--line); background: var(--surface); border-radius: 99px; padding: 4px; gap: 2px; }
.lang button { border: 0; background: none; padding: 0 13px; height: 34px; border-radius: 99px; font-size: 13.5px; font-weight: 600; color: var(--ink-2); }
.lang button.on { background: var(--btn); color: var(--btn-ink); }
.lang button.ur { font-family: var(--f-ur); font-size: 13px; line-height: 1; }

/* ---------- building blocks ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); }
.panel { background: var(--cream-2); border-radius: var(--r-lg); }
.pad { padding: 20px 22px; }
.sec-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.sec-h h2 { font-size: 19px; font-weight: 700; color: var(--title); }
.sec-h .meta { color: var(--muted); font-size: 13px; }
.eyebrow { font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--teal-ink); font-weight: 700; font-family: var(--f-head); }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.split { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: 22px; align-items: start; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.row { display: flex; align-items: center; gap: 12px; min-width: 0; }
.row.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--title); border-radius: 14px; min-height: 42px; padding: 0 16px; font-weight: 600; font-size: 14px; white-space: nowrap; text-decoration: none; }
.btn svg { width: 17px; height: 17px; flex: none; }
.btn:hover { border-color: var(--faint); }
.btn.pri { background: var(--btn); border-color: var(--btn); color: var(--btn-ink); }
.btn.pri:hover { background: var(--btn-hover); border-color: var(--btn-hover); }
.btn.teal { background: #36ADA3; border-color: #36ADA3; color: #fff; font-weight: 700; }
.btn.teal:hover { background: #2F9C93; border-color: #2F9C93; }
.btn.teal:hover { background: #2F9C93; }
.btn.ghost { background: none; border-color: transparent; color: var(--link); padding-inline: 8px; min-height: 34px; }
.btn.danger { color: var(--rose-ink); }
.btn.sm { min-height: 36px; padding: 0 12px; font-size: 13px; border-radius: 12px; }
.btn.lg { min-height: 52px; padding: 0 20px; font-size: 15.5px; border-radius: 16px; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.hero .btn.teal[disabled] { background: rgba(255,255,255,.12); border-color: transparent; color: var(--hero-ink); opacity: 1; }
.pill { display: inline-flex; align-items: center; gap: 6px; border-radius: 99px; padding: 4px 11px; font-size: 12px; font-weight: 700; white-space: nowrap; line-height: 18px; background: var(--soft); color: var(--muted); }
.pill.ok { background: var(--mint); color: var(--teal-ink); }
.pill.bad { background: var(--rose); color: var(--rose-ink); }
.pill.warn { background: var(--gold); color: var(--gold-ink); }
.pill.info { background: var(--sky); color: var(--sky-ink); }
.pill.lilac { background: var(--lilac); color: var(--lilac-ink); }
.pill.peach { background: var(--peach); color: var(--peach-ink); }
.pill.off { background: var(--soft); color: var(--muted); }
.pill.live { background: var(--teal-ink); color: var(--surface); }
.pill.live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; animation: blink 1.4s infinite; }
@keyframes blink { 50% { opacity: .25; } }
.days { display: inline-flex; align-items: center; justify-content: center; border-radius: 99px; padding: 4px 10px; font-size: 12px; font-weight: 700; white-space: nowrap; line-height: 18px; background: var(--sky); color: var(--sky-ink); }
.days.d5 { background: var(--gold); color: var(--gold-ink); }
.chip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--surface); border-radius: 99px; min-height: 40px; padding: 0 16px; font-size: 13.5px; font-weight: 600; color: var(--ink-2); }
.chip.on { background: var(--btn); color: var(--btn-ink); border-color: transparent; }
.plat { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--muted); white-space: nowrap; }
.plat i { width: 8px; height: 8px; border-radius: 2px; display: inline-block; }
.plat.zoom i { background: #2d8cff; } .plat.meet i { background: #0f9d58; } .plat.none i { background: #d39a2a; }

/* colour tiles (Today) */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 16px; }
.kpi { text-align: start; border: 0; border-radius: var(--r-lg); padding: 18px 18px 16px; display: flex; flex-direction: column; gap: 10px; min-width: 0; background: var(--k, var(--sky)); color: var(--ink); }
.kpi .kh { display: flex; justify-content: space-between; align-items: center; width: 100%; }
.kpi .kic { width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; background: var(--kc, rgba(255,255,255,.55)); color: var(--ki, var(--sky-ink)); }
.kpi .kic svg { width: 20px; height: 20px; }
.kpi .kv2 { font-size: 12px; font-weight: 700; color: var(--ki, var(--sky-ink)); }
.kpi b { font-family: var(--f-head); font-weight: 700; font-size: 34px; line-height: 1; color: var(--title); font-variant-numeric: tabular-nums; }
.kpi > span { font-size: 13.5px; color: var(--ink-2); font-weight: 600; }
.kpi.k-sky { --k: var(--sky); --ki: var(--sky-ink); } .kpi.k-rose { --k: var(--rose); --ki: var(--rose-ink); } .kpi.k-peach { --k: var(--peach); --ki: var(--peach-ink); }
.kpi.k-lilac { --k: var(--lilac); --ki: var(--lilac-ink); } .kpi.k-mint { --k: var(--mint); --ki: var(--teal-ink); } .kpi.k-gold { --k: var(--gold); --ki: var(--gold-ink); }
:root[data-theme="dark"] .kpi .kic { background: rgba(255,255,255,.07); }
.kpi.calm { opacity: .92; }
/* older name for the same strip */
.attn { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; }

/* lists / tables */
.list { display: flex; flex-direction: column; }
.li { display: flex; align-items: center; gap: 14px; padding: 13px 20px; border-top: 1px solid var(--line-2); min-width: 0; }
.li:first-child { border-top: 0; }
.li.click { cursor: pointer; }
.li.click:hover { background: var(--soft); }
.li .time { width: 72px; flex: none; font-variant-numeric: tabular-nums; font-weight: 700; color: var(--title); font-size: 14px; font-family: var(--f-head); }
.li .who { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.li .who b { font-weight: 700; font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.li .who span { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.li .end { display: flex; align-items: center; gap: 10px; flex: none; }
.li .tname { width: 140px; flex: none; color: var(--ink-2); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.li .tname + .end { min-width: 196px; justify-content: flex-end; }
.tbl-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl th { text-align: start; font-weight: 700; font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 12px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--soft); }
.tbl tr:first-child th:first-child { border-start-start-radius: var(--r-lg); }
.tbl tr:first-child th:last-child { border-start-end-radius: var(--r-lg); }
.tbl td { padding: 12px 16px; border-bottom: 1px solid var(--line-2); vertical-align: middle; white-space: nowrap; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tr.click { cursor: pointer; }
.tbl tr.click:hover td { background: var(--soft); }
.tbl .nm { display: flex; align-items: center; gap: 10px; }
.tbl .nm b { font-weight: 700; }
.tbl .nm span:not(.av) { display: block; font-size: 12px; color: var(--muted); }

/* progress */
.bar { height: 8px; border-radius: 99px; background: var(--track); overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--teal); border-radius: inherit; }
.bar.blue i { background: var(--sky-ink); }
.ring { --p: 0; width: 132px; height: 132px; border-radius: 50%; background: conic-gradient(var(--teal) calc(var(--p) * 1%), var(--track) 0); display: grid; place-items: center; flex: none; }
.ring > div { width: 104px; height: 104px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; text-align: center; }
.ring b { font-family: var(--f-head); font-size: 30px; font-weight: 700; color: var(--title); line-height: 1; display: block; }
.ring span { font-size: 11.5px; color: var(--muted); }
.ring.sm { width: 92px; height: 92px; } .ring.sm > div { width: 72px; height: 72px; } .ring.sm b { font-size: 22px; }
.ringrow { display: flex; align-items: center; gap: 16px; }
.ringtxt { display: flex; flex-direction: column; gap: 2px; min-width: 0; white-space: nowrap; }
.ringtxt b { font-weight: 700; color: var(--title); }

/* Qaida lesson path */
.path { display: grid; grid-template-columns: repeat(11, minmax(0, 1fr)); gap: 8px; }
.step { aspect-ratio: 1; max-width: 100%; max-height: 64px; width: 100%; border-radius: 12px; display: grid; place-items: center; font-family: var(--f-head); font-weight: 700; font-size: 14px; background: var(--soft); color: var(--faint); }
.step.done { background: var(--teal); color: #fff; }
.step.now { background: var(--btn); color: var(--btn-ink); box-shadow: 0 0 0 4px var(--sky); }

/* calendar */
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.cal .dn { font-size: 11px; text-align: center; color: var(--muted); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.cal .d { aspect-ratio: 1.1; width: 100%; max-width: 100%; max-height: 72px; border-radius: 12px; display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 13px; font-variant-numeric: tabular-nums; background: var(--soft); border: 1px solid transparent; color: var(--ink); gap: 2px; }
.cal .d i { width: 6px; height: 6px; border-radius: 50%; }
.cal .d.p { background: var(--mint); border-color: transparent; color: var(--teal-ink); font-weight: 700; } .cal .d.p i { background: var(--teal-ink); }
.cal .d.sa { background: var(--gold); border-color: transparent; color: var(--gold-ink); font-weight: 700; } .cal .d.sa i { background: var(--gold-ink); }
.cal .d.ta { background: var(--rose); border-color: transparent; color: var(--rose-ink); font-weight: 700; } .cal .d.ta i { background: var(--rose-ink); }
.cal .d.off { background: transparent; border-color: transparent; color: var(--faint); }
.cal .d.unmarked { background: var(--rose); border-color: transparent; color: var(--rose-ink); font-weight: 700; }
.cal .d.holiday { background: var(--sky); border-color: transparent; color: var(--sky-ink); }
.cal .d.before, .cal .d.future { color: var(--faint); }
.cal .d.today { box-shadow: 0 0 0 2px var(--title); }
.cal .d.empty { visibility: hidden; }
.legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12.5px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }

/* label ··· value rows */
.sfacts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px 20px; }
.kv { display: flex; flex-direction: column; margin-top: 12px; }
.kvr { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line-2); font-size: 13.5px; min-width: 0; }
.kvr:first-child { border-top: 0; padding-top: 2px; }
.kvr i { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.kvr span { flex: 1; min-width: 0; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kvr b { font-family: var(--f-head); font-weight: 700; color: var(--title); font-size: 15px; display: inline-flex; align-items: center; gap: 6px; }
.kvr.warn b { color: var(--gold-ink); }
.kvr.bad b { color: var(--rose-ink); }
.linkbox { display: flex; align-items: center; gap: 12px; margin-top: 14px; padding: 12px 14px; background: var(--soft); border-radius: var(--r-md); min-width: 0; }
.linkbox .grow { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.linkbox .grow > .pill { align-self: flex-start; }
.linkbox .lk, .linkbox .lkt { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; max-width: 100%; }
.linkbox .lk { color: var(--link); font-size: 13px; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.stat { background: var(--cream-2); border-radius: var(--r-md); padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; }
.stat b { font-family: var(--f-head); font-size: 24px; font-weight: 700; color: var(--title); font-variant-numeric: tabular-nums; }
.stat span { font-size: 12.5px; color: var(--muted); }

/* class hero (teacher / family) */
.hero { background: var(--hero); color: #fff; border-radius: var(--r-xl); padding: 26px 28px; display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(220px, 280px); gap: 26px; align-items: center; }
.hero .eyebrow { display: inline-flex; align-items: center; gap: 8px; color: #8FE3D3; background: rgba(92,199,180,.16); border-radius: 99px; padding: 5px 12px; font-size: 12px; letter-spacing: .04em; text-transform: none; }
.hero h2 { font-size: 30px; font-weight: 700; margin-top: 10px; color: var(--cream); }
.hero .sub { color: var(--hero-ink); font-size: 14px; margin-top: 2px; }
.hero .hinfo { min-width: 0; }
.hero .htime { text-align: start; }
.hero .when { font-family: var(--f-head); font-size: 30px; font-weight: 700; font-variant-numeric: tabular-nums; color: #fff; }
.hero .joinbox { display: flex; flex-direction: column; gap: 8px; }
.hero .joinbox .btn { width: 100%; }
.hero .joinbox .note { margin-top: 0; display: flex; align-items: center; justify-content: center; gap: 6px; flex-wrap: wrap; }
.hero .plat { color: var(--hero-ink); }
.hero .btn.teal { min-height: 54px; font-size: 16px; border-radius: 18px; }
.hero .note { font-size: 12.5px; color: var(--hero-ink); margin-top: 6px; }

/* notices */
.notice { display: flex; gap: 10px; align-items: flex-start; padding: 12px 16px; border-radius: var(--r-md); font-size: 13.5px; background: var(--sky); color: var(--sky-ink); }
.notice svg { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.notice.warn { background: var(--gold); color: var(--gold-ink); }
.notice.bad { background: var(--rose); color: var(--rose-ink); }
.notice.ok { background: var(--mint); color: var(--teal-ink); }
.notice a { color: inherit; font-weight: 700; }

/* chat */
.chat { display: grid; grid-template-columns: 320px minmax(0, 1fr); height: min(720px, calc(100vh - 190px)); min-height: 460px; overflow: hidden; }
.chat .threads { border-inline-end: 1px solid var(--line); overflow: auto; min-height: 0; }
.chat .threads .li { padding: 14px 18px; }
.chat .threads .li.on { background: var(--sel); }
.chat .conv { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.chat .ch { padding: 14px 20px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.chat .ch .seen { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--muted); background: var(--soft); border-radius: 99px; padding: 6px 12px; }
.chat .ch .seen svg { width: 15px; height: 15px; }
.chat .msgs { flex: 1; overflow: auto; padding: 18px 20px; display: flex; flex-direction: column; gap: 10px; background: var(--chat-bg); }
.bub { max-width: 74%; padding: 10px 14px; border-radius: 20px 20px 20px 6px; font-size: 14px; line-height: 1.45; background: var(--surface); border: 1px solid var(--line); align-self: flex-start; overflow-wrap: anywhere; }
.bub.me { align-self: flex-end; background: var(--me); color: var(--me-ink); border-color: transparent; border-radius: 20px 20px 6px 20px; }
.bub small { display: block; font-size: 11px; opacity: .7; margin-top: 3px; }
.bub.sys { align-self: center; background: var(--gold); border: 0; color: var(--gold-ink); font-size: 12.5px; max-width: 92%; text-align: center; border-radius: 14px; }
.bub .cap { display: block; margin-top: 8px; }
.fcard { display: flex; align-items: center; gap: 12px; min-width: 220px; max-width: 300px; color: inherit; text-decoration: none; }
.fcard .fk { width: 44px; height: 52px; border-radius: 10px; background: var(--cream); color: #062A56; display: grid; place-items: center; font-size: 11px; font-weight: 800; letter-spacing: .04em; flex: none; }
.fcard .fn { flex: 1; min-width: 0; }
.fcard .fn b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fcard .fn span { font-size: 12px; opacity: .8; }
.fcard .dl { width: 38px; height: 38px; border-radius: 12px; background: rgba(127,127,127,.14); display: grid; place-items: center; flex: none; }
.fcard .dl svg { width: 18px; height: 18px; }
.bub .ph { display: block; max-width: 260px; max-height: 260px; border-radius: 14px; object-fit: cover; }
.voice { display: flex; align-items: center; gap: 10px; min-width: 220px; max-width: 300px; }
.voice .play { width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--cream); color: #062A56; display: grid; place-items: center; flex: none; padding: 0; }
.voice .play svg { width: 16px; height: 16px; }
.voice .wave { flex: 1; min-width: 0; display: flex; align-items: center; gap: 3px; height: 32px; overflow: hidden; }
.voice .wave i { flex: none; width: 3px; border-radius: 3px; background: currentColor; opacity: .45; }
.voice .wave i.on { opacity: 1; }
.voice .vt { font-size: 12px; font-variant-numeric: tabular-nums; opacity: .85; white-space: nowrap; font-family: var(--f-text); }
.chat .compose { border-top: 1px solid var(--line); padding: 12px 16px; display: flex; gap: 10px; align-items: flex-end; background: var(--surface); flex-wrap: wrap; }
.chat .compose textarea { flex: 1; resize: none; border: 1px solid var(--line); border-radius: 14px; padding: 11px 14px; min-height: 46px; max-height: 120px; background: var(--soft); min-width: 0; }
.chat .compose .iconbtn, .chat .compose .btn.pri { width: 46px; height: 46px; min-height: 46px; padding: 0; border-radius: 14px; }
.chat .compose .btn.pri svg { width: 19px; height: 19px; }
.chat .compose .cline { display: flex; gap: 10px; align-items: flex-end; width: 100%; }
.attach { display: flex; gap: 10px; flex-wrap: wrap; width: 100%; }
.attach label { display: inline-flex; align-items: center; gap: 9px; padding: 10px 14px; border-radius: 16px; font-weight: 600; cursor: pointer; font-size: 13.5px; }
.attach label svg { width: 18px; height: 18px; }
.attach label small { font-weight: 500; opacity: .8; font-size: 11.5px; }
.attach input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.attach input:focus-visible + span { outline: 2px solid var(--link); outline-offset: 2px; }
.rec { display: flex; align-items: center; gap: 12px; width: 100%; background: var(--rose); color: var(--rose-ink); border-radius: 18px; padding: 10px 14px; flex-wrap: wrap; }
.rec i { width: 10px; height: 10px; border-radius: 50%; background: #E25C5C; animation: blink 1.2s infinite; }
.rec .grow { font-size: 12.5px; }
.upl { width: 100%; font-size: 12.5px; color: var(--muted); }
.chat-rule { margin: 0 16px 10px; padding: 8px 12px; font-size: 12.5px; }

/* forms */
.field { display: flex; flex-direction: column; gap: 7px; }
.field > span { font-size: 13px; font-weight: 700; color: var(--ink); }
.field small { color: var(--muted); font-size: 12px; }
.input, select.input, textarea.input { border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 14px; min-height: 44px; padding: 9px 14px; width: 100%; min-width: 0; }
.input::placeholder { color: var(--faint); }
textarea.input { min-height: 88px; resize: vertical; }
.opts { display: grid; gap: 8px; }
.opt { display: flex; align-items: center; gap: 12px; padding: 13px 15px; border: 0; border-radius: 16px; background: var(--soft); text-align: start; width: 100%; color: var(--ink); }
.opt.on { background: var(--sky); }
.opt .dot { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--faint); flex: none; }
.opt.on .dot { border: 5px solid var(--title); }
.opt b { font-weight: 700; display: block; }
.opt span { font-size: 12.5px; color: var(--muted); }
.lessons { display: grid; grid-template-columns: repeat(11, minmax(0, 1fr)); gap: 6px; }
.lessons button { aspect-ratio: 1; max-width: 100%; border: 1px solid transparent; background: var(--soft); border-radius: 12px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--ink); }
.lessons button.on { background: var(--btn); color: var(--btn-ink); border-color: var(--btn); }
.ticks { display: flex; flex-wrap: wrap; gap: 8px; }
.ticks label { display: inline-flex; align-items: center; gap: 8px; border: 0; border-radius: 99px; padding: 8px 14px; font-size: 13.5px; font-weight: 600; cursor: pointer; background: var(--soft); }
.ticks label:has(input:checked) { background: var(--gold); color: var(--gold-ink); }
.ticks input { width: 18px; height: 18px; accent-color: var(--teal-ink); margin: 0; }
.switch { position: relative; width: 44px; height: 26px; flex: none; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 1; width: 100%; height: 100%; }
.switch i { position: absolute; inset: 0; background: var(--track); border-radius: 99px; transition: .2s; }
.switch i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: .2s; box-shadow: 0 1px 2px rgba(0,0,0,.25); }
.switch input:checked + i { background: var(--teal-ink); }
.switch input:checked + i::after { transform: translateX(18px); }
.switch input:focus-visible + i { outline: 2px solid var(--link); outline-offset: 2px; }
.setting { display: flex; gap: 14px; align-items: flex-start; padding: 15px 20px; border-top: 1px solid var(--line-2); }
.setting:first-child { border-top: 0; }
.setting .grow b { font-weight: 700; display: block; }
.setting .grow span { font-size: 13px; color: var(--muted); }
.setting .soon { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--gold-ink); background: var(--gold); padding: 2px 8px; border-radius: 99px; font-weight: 700; }
.formgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.formgrid .full { grid-column: 1 / -1; }
@media (max-width: 560px) { .formgrid { grid-template-columns: minmax(0, 1fr); } }
.checkrow { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.checkrow input { width: 18px; height: 18px; accent-color: var(--title); }
.daychips { display: flex; flex-wrap: wrap; gap: 6px; }
.daychips label { display: inline-flex; position: relative; }
.daychips input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.daychips span { border: 1px solid transparent; background: var(--soft); border-radius: 99px; min-height: 38px; display: inline-flex; align-items: center; padding: 0 14px; font-size: 13.5px; font-weight: 600; cursor: pointer; color: var(--ink-2); }
.daychips input:checked + span { background: var(--btn); border-color: var(--btn); color: var(--btn-ink); }
.daychips input:focus-visible + span { outline: 2px solid var(--link); outline-offset: 2px; }
.daychips input:disabled + span { opacity: .4; cursor: not-allowed; }
.copybox { background: var(--soft); border-radius: var(--r-md); padding: 12px 14px; font-size: 13.5px; white-space: pre-wrap; word-break: break-word; font-family: var(--f-text); direction: ltr; text-align: left; }
.pw { font-family: var(--f-head); font-size: 24px; color: var(--title); letter-spacing: .02em; direction: ltr; }
.pwbox { position: relative; display: block; }
.pwbox .input { padding-inline-end: 50px; }
.eyebtn { position: absolute; top: 50%; inset-inline-end: 4px; transform: translateY(-50%); width: 40px; height: 36px; border: 0; background: none; border-radius: 10px; display: grid; place-items: center; color: var(--muted); }
.eyebtn:hover { background: var(--soft); color: var(--title); }
.eyebtn svg { width: 19px; height: 19px; }

/* overlays */
.scrim { position: fixed; inset: 0; background: rgba(3,11,20,.5); z-index: 70; display: flex; align-items: center; justify-content: center; padding: 16px; animation: fade .15s; }
@keyframes fade { from { opacity: 0; } }
.modal { background: var(--surface); color: var(--ink); border-radius: var(--r-lg); width: min(540px, 100%); max-height: calc(100vh - 32px); overflow: auto; box-shadow: 0 24px 60px -20px rgba(3,11,20,.55); border: 1px solid var(--line); }
.modal.wide { width: min(700px, 100%); }
.modal.xwide { width: min(1180px, 100%); }
.modal .mh { padding: 20px 22px 6px; display: flex; align-items: flex-start; gap: 12px; }
.modal .mh h3 { font-size: 20px; color: var(--title); font-weight: 700; flex: 1; }
.modal .mh .x { border: 0; background: var(--soft); width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; flex: none; color: var(--ink); }
.modal .mh .x svg { width: 16px; height: 16px; }
.modal .mb { padding: 10px 22px 20px; display: flex; flex-direction: column; gap: 14px; }
.modal .mf { padding: 14px 22px 20px; display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; border-top: 1px solid var(--line-2); position: sticky; bottom: 0; z-index: 3; background: var(--surface); }
.modal .mh { position: sticky; top: 0; z-index: 3; background: var(--surface); }
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(24px + env(safe-area-inset-bottom, 0px)); background: var(--btn); color: var(--btn-ink); padding: 12px 18px; border-radius: 16px; z-index: 90; font-size: 14px; font-weight: 600; box-shadow: 0 12px 30px -10px rgba(3,11,20,.6); display: flex; gap: 10px; align-items: center; max-width: calc(100vw - 32px); }
.toast svg { width: 18px; height: 18px; flex: none; }
.toast.bad { background: var(--rose-ink); color: #fff; }
:root[data-theme="dark"] .toast.bad { color: #3A1D24; }

/* sign-in */
.login { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0; max-width: 1600px; margin-inline: auto; }
.login .art { background: #062A56; color: #fff; margin: 16px; border-radius: var(--r-xl); padding: 44px; display: flex; flex-direction: column; justify-content: space-between; gap: 24px; }
:root[data-theme="dark"] .login .art { background: #0F2B48; }
.login .art > img { height: 54px; align-self: flex-start; }
.login .art h2 { font-size: 38px; font-weight: 700; line-height: 1.15; max-width: 15ch; color: var(--cream); }
.login .art p { color: #C9D7E6; max-width: 40ch; }
.login .art .eyebrow { color: #8FE3D3; }
.login .form { display: flex; align-items: center; justify-content: center; padding-block: 40px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.login .box { width: min(400px, 100%); display: flex; flex-direction: column; gap: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); padding: 28px; }
.login .box h1 { font-size: 28px; color: var(--title); font-weight: 700; }
.login .err { color: var(--rose-ink); background: var(--rose); border-radius: 12px; padding: 10px 12px; font-size: 13.5px; }
.login .tools { display: flex; align-items: center; gap: 8px; }
.install { display: flex; gap: 12px; align-items: center; background: var(--soft); border-radius: var(--r-md); padding: 12px 14px; font-size: 13px; }
.install .ic { width: 42px; height: 42px; border-radius: 12px; background: #062A56; display: grid; place-items: center; flex: none; }
.install .ic img { width: 28px; }

/* Urdu (teacher / family screens) */
.ur .main, .ur .tabs, .ur .rail .nav, .ur .modal, .ur .login .form, .ur .kid { font-family: var(--f-ur); }
.ur .main h1, .ur .main h2, .ur .main h3, .ur .modal h3, .ur .login h1, .ur .kid h1, .ur .kid h2 { font-family: var(--f-ur); letter-spacing: 0; font-weight: 700; line-height: 1.9; }
.ur .main, .ur .modal { line-height: 2.1; }
.ur .top h1 { font-size: 28px; }
.ur .sec-h h2 { font-size: 17px; }
.ur .li .who b, .ur .li .who span { line-height: 2; padding-block: 2px; }
.ur .pill, .ur .days { line-height: 24px; font-size: 12px; }
.ur .btn { line-height: 2; }
.ur .eyebrow { font-family: var(--f-ur); letter-spacing: 0; text-transform: none; font-size: 12.5px; }
.ur .tbl th { font-family: var(--f-ur); letter-spacing: 0; text-transform: none; font-size: 12.5px; }
.ur .nav button { font-size: 11px; line-height: 1.9; }
.ur .cal .dn { letter-spacing: 0; font-size: 11.5px; }
.ur .bub { line-height: 2; }
.ur .stat b, .ur .kpi b, .ur .ring b, .ur .when, .ur .time, .ur .num, .ur .step, .ur .lessons button { font-family: var(--f-head); }
.ur .li .time { width: auto; min-width: 82px; white-space: nowrap; font-size: 12.5px; }
.ur .eng { font-family: var(--f-text); direction: ltr; unicode-bidi: isolate; line-height: 1.5; }
.ur .num { direction: ltr; unicode-bidi: isolate; }
.ur .bub[dir="ltr"] { font-family: var(--f-text); line-height: 1.45; }
.ur .bub small, .ur .voice .vt, .ur .fcard .fn { font-family: var(--f-text); }
.ur .plat { font-family: var(--f-text); }
.ur .hero h2 { line-height: 1.7; }
.ur .monthnav button svg { transform: scaleX(-1); }

/* ---------- phone ---------- */
@media (max-width: 860px) {
  .app { grid-template-columns: minmax(0, 1fr); gap: 0; padding: 0; }
  .rail { display: none; }
  .main { padding-inline-end: 0; }
  .mtop { display: flex; align-items: center; gap: 10px; padding-block: 12px 4px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
  .mtop > img { width: 34px; height: 34px; object-fit: contain; }
  .mtop .grow { min-width: 0; flex: 1; }
  .ur .mtop .grow b { font-size: 14px; }
  .mtop .grow b { font-family: var(--f-head); font-size: 16px; font-weight: 700; display: block; line-height: 1.25; color: var(--title); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .mtop .grow span { font-size: 12px; color: var(--muted); display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .mtop .lang { padding: 3px; } .mtop .lang button { height: 32px; padding: 0 10px; font-size: 12.5px; }
  .mtop .iconbtn { width: 40px; height: 40px; }
  .mtop .me-btn { width: auto; } .mtop .av { width: 40px; height: 40px; font-size: 13px; background: var(--cream); color: #062A56; }
  .top { padding-block: 10px 0; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
  .top h1 { font-size: 26px; }
  .top .greet { display: none; }
  .content { padding-block: 12px calc(112px + env(safe-area-inset-bottom, 0px)); padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); gap: 16px; }
  .tabs { display: flex; justify-content: space-around; align-items: center; position: fixed; left: max(12px, env(safe-area-inset-left, 0px)); right: max(12px, env(safe-area-inset-right, 0px)); bottom: calc(12px + env(safe-area-inset-bottom, 0px)); z-index: 40; height: 68px; border-radius: 24px; background: var(--rail); box-shadow: 0 14px 30px -14px rgba(3,11,20,.55); padding: 0 4px; }
  .tabs button { border: 0; background: none; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; font-weight: 600; color: var(--rail-ink); padding: 0 2px; position: relative; min-width: 0; flex: 1; line-height: 1.3; }
  .tabs button svg { width: 21px; height: 21px; }
  .tabs button > i { width: 46px; height: 30px; border-radius: 12px; display: grid; place-items: center; }
  .tabs button.on { color: var(--cream); }
  .tabs button.on > i { background: rgba(247,251,255,.16); }
  .tabs button span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .tabs button .cnt { top: -2px; inset-inline-end: calc(50% - 26px); }
  .ur .tabs button { font-size: 11px; line-height: 1.8; }
  .grid2, .grid3, .split { grid-template-columns: minmax(0, 1fr); }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .kpis .kpi:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .kpi { padding: 14px 16px; gap: 6px; border-radius: 20px; }
  .kpi .kh { display: none; }
  .kpi b { font-size: 26px; }
  .kpi > span { font-size: 12.5px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .li { padding: 12px 16px; gap: 10px; }
  .li .time { width: 60px; font-size: 13px; }
  .li .tname { display: none; }
  .li .end .days { display: none; }
  .li .time + .av { display: none; }
  .chat .compose { padding: 10px 12px; gap: 8px; }
  .chat .compose .cline { gap: 8px; }
  .chat .compose .iconbtn, .chat .compose .btn.pri { width: 42px; height: 42px; min-height: 42px; }
  .chat .compose textarea { padding: 10px 12px; font-size: 14px; }
  .chat-rule { margin: 0 12px 8px; padding: 6px 10px; font-size: 11.5px; }
  .sfacts { flex-basis: 100%; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 14px; }
  .li .end { gap: 6px; }
  .li .tname + .end { min-width: 0; }
  .hide-m { display: none !important; }
  .chat { grid-template-columns: minmax(0, 1fr); height: calc(100vh - 250px); min-height: 440px; }
  .chat.has-conv .threads { display: none; }
  .chat:not(.has-conv) .conv { display: none; }
  .bub { max-width: 86%; }
  .path { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .lessons { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .ring { width: 112px; height: 112px; } .ring > div { width: 88px; height: 88px; } .ring b { font-size: 26px; }
  .hero { padding: 20px; grid-template-columns: minmax(0, 1fr); gap: 14px; border-radius: 26px; }
  .hero h2 { font-size: 26px; }
  .hero .when { font-size: 26px; }
  .hero .btn.teal { width: 100%; }
  .login { grid-template-columns: minmax(0, 1fr); }
  .login .art { margin: 12px 12px 0; padding: 24px 20px; min-height: 0; border-radius: 24px; }
  .login .art h2 { font-size: 26px; }
  .login .art .hide-m { display: none; }
  .login .box { padding: 22px 18px; border-radius: 24px; }
  .modal { border-radius: 24px 24px 0 0; align-self: flex-end; max-height: 90vh; }
  .scrim { padding: 0; align-items: flex-end; }
  .modal .mf { padding-bottom: calc(18px + env(safe-area-inset-bottom, 0px)); }
  .sheet .facts { grid-template-columns: minmax(0, 1fr); }
  .toast { bottom: calc(92px + env(safe-area-inset-bottom, 0px)); }
}
@media (min-width: 861px) { .show-m { display: none !important; } }

/* ---------- misc ---------- */
.boot { min-height: 100vh; display: grid; place-items: center; background: #062A56; }
.boot img { width: 140px; opacity: .9; animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .45; } }
.loading { padding: 40px 0; display: flex; justify-content: center; }
.spin { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--teal-ink); animation: rot .8s linear infinite; }
@keyframes rot { to { transform: rotate(360deg); } }
.empty { padding: 30px 20px; text-align: center; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 10px; }
.empty svg { width: 30px; height: 30px; color: var(--faint); }
.empty b { color: var(--ink); font-weight: 700; }
.errbox { margin: 20px 0; }
.monthnav { display: inline-flex; align-items: center; gap: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 4px; }
.monthnav button { border: 0; background: none; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; color: var(--title); }
.monthnav button:hover:not([disabled]) { background: var(--soft); }
.monthnav button[disabled] { opacity: .3; cursor: default; }
.monthnav button svg { width: 16px; height: 16px; }
.monthnav span { font-weight: 700; font-size: 13.5px; padding: 0 6px; white-space: nowrap; color: var(--title); }
.hol { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line-2); font-size: 13.5px; }
.hol:first-child { border-top: 0; }
.hol .num { width: 120px; flex: none; color: var(--muted); }
.hol .x { border: 0; background: none; color: var(--faint); width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; }
.hol .x:hover { background: var(--rose); color: var(--rose-ink); }
.hol .x svg { width: 14px; height: 14px; }
.titles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 14px; }
.titles label { display: flex; align-items: center; gap: 8px; }
.titles label b { width: 26px; flex: none; text-align: end; font-family: var(--f-head); color: var(--title); }
@media (max-width: 560px) { .titles { grid-template-columns: minmax(0, 1fr); } }
.hist { display: flex; gap: 10px; font-size: 13px; padding: 8px 0; border-top: 1px solid var(--line-2); }
.hist:first-child { border-top: 0; }
.hist span { color: var(--muted); width: 92px; flex: none; }
.ur .copybox, .ur .pw { font-family: var(--f-text); }
.sched { min-width: 760px; padding: 18px 20px 22px; }
.sched-grid { display: grid; grid-template-columns: 170px 1fr; gap: 0 12px; }
.sched-track { position: relative; border-top: 1px solid var(--line-2); min-height: 54px; background-image: linear-gradient(90deg, var(--line-2) 0, var(--line-2) 1px, transparent 1px); background-repeat: repeat-x; background-size: 12.5% 100%; }
.sched-blk { position: absolute; top: 8px; bottom: 8px; border: 0; border-radius: 10px; font-size: 11.5px; font-weight: 700; padding: 2px 6px; text-align: start; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.sched-now { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--rose-ink); opacity: .7; }
.tabsbar { display: flex; gap: 8px; flex-wrap: wrap; }

/* Admin Today: fees card, reports card, teachers */
.feecard { background: var(--hero); color: #EAF0F6; border-radius: var(--r-xl); padding: 24px; display: flex; flex-direction: column; gap: 16px; }
.feecard h2 { font-size: 20px; font-weight: 700; color: #fff; }
.feecard .tag { font-size: 12px; font-weight: 700; background: rgba(255,255,255,.14); border-radius: 99px; padding: 5px 10px; white-space: nowrap; }
.feecard .fring { --p: 0; width: 104px; height: 104px; border-radius: 50%; background: conic-gradient(#5CC7B4 calc(var(--p) * 1%), rgba(255,255,255,.16) 0); display: grid; place-items: center; flex: none; }
.feecard .fring > div { width: 78px; height: 78px; border-radius: 50%; background: var(--hero); display: grid; place-items: center; font-family: var(--f-head); font-weight: 700; font-size: 22px; color: #fff; }
.feecard .amt { font-family: var(--f-head); font-weight: 700; font-size: 28px; color: var(--cream); line-height: 1.15; }
.feecard .of { font-size: 13px; opacity: .8; }
.feecard .frow { display: flex; justify-content: space-between; gap: 10px; font-size: 13.5px; color: #EAF0F6; text-decoration: none; padding-top: 9px; border-top: 1px solid rgba(255,255,255,.12); }
.feecard .frow b { color: var(--cream); white-space: nowrap; }
.feecard .frow b.late { color: #F6B1A1; }
.feecard .btn { align-self: flex-start; background: rgba(255,255,255,.1); border-color: transparent; color: #fff; }
.repbox { border-radius: 20px; padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; background: var(--cream-2); }
.repbox.blue { background: var(--sky); }
.repbox .rr { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.repbox .rr b { color: var(--ink); }
.repbox .rr span { font-size: 12px; color: var(--muted); }
.repbox .rs { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--ink-2); gap: 8px; }
.repbox .rs b { color: var(--peach-ink); }
.repbox.blue .rs b { color: var(--sky-ink); }
.holcard { background: var(--cream-2); border-radius: var(--r-xl); padding: 20px 22px; display: flex; gap: 14px; align-items: center; }
.holcard .hi { width: 46px; height: 46px; border-radius: 16px; background: var(--cream); color: #062A56; display: grid; place-items: center; flex: none; }
.holcard .hi svg { width: 22px; height: 22px; }
.holcard b { display: block; color: var(--ink); }
.holcard span { font-size: 13px; color: var(--ink-2); }

/* Teacher history (admin) */
.thero { background: var(--hero); color: #EAF0F6; border-radius: var(--r-xl); padding: 26px 28px; display: flex; flex-direction: column; gap: 20px; }
.thero .who { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.thero .av { width: 76px; height: 76px; font-size: 24px; background: var(--cream); color: #062A56; }
.thero h2 { font-size: 32px; font-weight: 700; color: var(--cream); }
.thero .s { color: var(--hero-ink); font-size: 14px; }
.thero .acts { margin-inline-start: auto; display: flex; gap: 10px; flex-wrap: wrap; }
.thero .acts .btn { background: rgba(255,255,255,.08); color: #fff; border-color: rgba(255,255,255,.2); }
.thero .acts .btn.teal { background: #36ADA3; color: #fff; border-color: #36ADA3; }
.tstats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.tstats div { background: rgba(255,255,255,.08); border-radius: 18px; padding: 16px 18px; }
.tstats b { display: block; font-family: var(--f-head); font-size: 30px; font-weight: 700; color: #fff; line-height: 1.1; }
.tstats span { font-size: 13px; color: var(--hero-ink); }
.split-bar { display: flex; height: 12px; border-radius: 99px; overflow: hidden; background: var(--track); }
.split-bar i { display: block; height: 100%; }
.mini-cals { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.mini-cal h3 { font-size: 15px; color: var(--title); margin-bottom: 8px; }
.mini-cal .cal { gap: 4px; }
.mini-cal .cal .d { aspect-ratio: 1; font-size: 11.5px; border-radius: 8px; }
@media (max-width: 860px) { .tstats, .mini-cals { grid-template-columns: repeat(2, minmax(0, 1fr)); } .thero h2 { font-size: 26px; } .thero .acts { margin-inline-start: 0; } }

/* report sheet (simple, older) */
.sheet { background: #fff; color: #0B2440; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); max-width: 560px; width: 100%; margin-inline: auto; direction: ltr; font-family: var(--f-text); }
.sheet .sh { background: #062A56; color: #fff; padding: 16px 20px; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.sheet .sh img { height: 30px; }
.sheet .sh .t { text-align: end; }
.sheet .sh .t b { font-family: var(--f-head); font-size: 15px; display: block; }
.sheet .sh .t span { font-size: 11.5px; color: #C9D7E6; letter-spacing: .12em; text-transform: uppercase; }
.sheet .sb { padding: 16px 20px 20px; display: flex; flex-direction: column; gap: 14px; }
.sheet .facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.sheet .facts div { background: #EEF5FB; border-radius: 8px; padding: 8px 10px; min-width: 0; }
.sheet .facts span { font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: #1E6E61; font-weight: 700; display: block; }
.sheet .facts b { font-size: 13px; font-weight: 600; }
.sheet .note-t { font-size: 14px; line-height: 1.6; }
.sheet .sig { border-top: 1px solid #E8E0D4; padding-top: 10px; font-size: 12.5px; color: #5D6B7C; }
.sheet .sig b { color: #062A56; }
.sheet .bar { background: #E1EAF3; } .sheet .bar i { background: #36ADA3; }

/* ===== Report — same design as the PDF. Sizes follow the A4 page: 1mm = 1/210 of the width.
   The report is a document: it keeps its own colours in the dark theme too. */
.rp { container-type: inline-size; width: 100%; max-width: 820px; margin-inline: auto; direction: ltr; text-align: left; }
.rp .pg { --mm: max(calc(100cqw / 210), 1.75px); --pt: max(calc(100cqw / 210 * .3528), 1.18px);
  background: #f7fbff; color: #23234a; font-family: var(--f-text); line-height: 1.35; display: flex; flex-direction: column; border-radius: 12px; overflow: hidden;
  border: 1px solid var(--line); box-shadow: 0 14px 34px -22px rgba(6,53,99,.5); }
.rp .pg * { box-sizing: border-box; margin: 0; padding: 0; }
.rp .rh { background: #062A56; color: #fff; padding: calc(var(--mm)*11) calc(var(--mm)*15) calc(var(--mm)*9); }
.rp .rht { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.rp .rlogo { height: calc(var(--mm)*15); display: block; }
.rp .rmonth { font-family: var(--f-head); font-weight: 700; font-size: calc(var(--pt)*10.5); letter-spacing: .06em; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.18);
  padding: calc(var(--mm)*2.4) calc(var(--mm)*4.2); border-radius: 99px; margin-top: calc(var(--mm)*2); white-space: nowrap; }
.rp .rtitle { font-family: var(--f-head); font-weight: 700; font-size: calc(var(--pt)*24); letter-spacing: -.01em; margin-top: calc(var(--mm)*7); line-height: 1.2; color: #fff; }
.rp .rsub { font-size: calc(var(--pt)*8.6); letter-spacing: .24em; text-transform: uppercase; color: #9fd8d1; margin-top: calc(var(--mm)*2); }
.rp .rm { flex: 1 1 auto; padding: calc(var(--mm)*6) calc(var(--mm)*15) calc(var(--mm)*7); display: flex; flex-direction: column; gap: calc(var(--mm)*4.4); }
.rp .rwho { display: grid; grid-template-columns: 1.1fr 1.45fr 1fr; gap: calc(var(--mm)*3.5); }
.rp .rwho > div { background: #eaf2fa; border-radius: calc(var(--mm)*3.5); padding: calc(var(--mm)*4) calc(var(--mm)*4.6); min-width: 0; }
.rp .rk { font-size: calc(var(--pt)*7); font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: #1b7a71; }
.rp .rv { font-family: var(--f-head); font-weight: 700; font-size: calc(var(--pt)*11.5); color: #062A56; margin-top: calc(var(--mm)*1.4); line-height: 1.2; overflow-wrap: anywhere; }
.rp .rsec { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: calc(var(--mm)*3); }
.rp .rsec h2 { font-family: var(--f-head); font-weight: 700; font-size: calc(var(--pt)*12); color: #062A56; }
.rp .rsec span { font-size: calc(var(--pt)*8); color: #6b6b84; }
.rp .rstats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid #dce6f0; border-radius: calc(var(--mm)*3.5); background: #fff; }
.rp .rstat { padding: calc(var(--mm)*4.6) calc(var(--mm)*2) calc(var(--mm)*4.2); text-align: center; min-width: 0; }
.rp .rstat + .rstat { border-left: 1px solid #dce6f0; }
.rp .rnum { font-family: var(--f-head); font-weight: 700; font-size: calc(var(--pt)*22); color: #062A56; line-height: 1; font-variant-numeric: tabular-nums; }
.rp .rnum small { font-size: calc(var(--pt)*11); color: #6b6b84; font-weight: 700; }
.rp .rlbl { font-size: calc(var(--pt)*7.6); color: #6b6b84; margin-top: calc(var(--mm)*2); letter-spacing: .04em; }
.rp .rtrack { margin-top: calc(var(--mm)*3.6); background: #fff; border: 1px solid #dce6f0; border-radius: calc(var(--mm)*3.5); padding: calc(var(--mm)*4) calc(var(--mm)*4.6) calc(var(--mm)*4.2); }
.rp .rtt { display: flex; justify-content: space-between; gap: 10px; font-size: calc(var(--pt)*8.2); color: #6b6b84; }
.rp .rtt b { color: #062A56; font-family: var(--f-head); }
.rp .rbar { height: calc(var(--mm)*2.4); background: #eaf2fa; border-radius: 99px; margin: calc(var(--mm)*2.6) 0 calc(var(--mm)*2.2); position: relative; overflow: hidden; }
.rp .rbar i { position: absolute; inset: 0 auto 0 0; background: #36ada3; border-radius: 99px; }
.rp .rles { display: grid; grid-template-columns: repeat(var(--n, 22), minmax(0, 1fr)); gap: calc(var(--mm)*1.1); }
.rp .rles span { font-size: calc(var(--pt)*6.8); color: #6b6b84; text-align: center; padding: calc(var(--mm)*1.3) 0; border-radius: calc(var(--mm)*1.6); background: #f7fbff; border: 1px solid #dce6f0; font-family: var(--f-head); font-weight: 600; font-variant-numeric: tabular-nums; }
.rp .rles span.done { background: #e3f4f2; border-color: #bfe5e0; color: #1b7a71; font-weight: 700; }
.rp .rles span.now { background: #36ada3; border-color: #36ada3; color: #fff; font-weight: 700; }
.rp .rnote { background: #e3f4f2; border-radius: calc(var(--mm)*3.5); padding: calc(var(--mm)*4.8) calc(var(--mm)*6); }
.rp .rnote .rk { margin-bottom: calc(var(--mm)*2.4); }
.rp .rnote p:not(.rk) { font-size: calc(var(--pt)*9.7); line-height: 1.58; color: #26324a; }
.rp .rnote p:not(.rk) + p { margin-top: calc(var(--mm)*2.6); }
.rp .rprio { background: #062A56; border-radius: calc(var(--mm)*3.5); padding: calc(var(--mm)*1.4) calc(var(--mm)*5); color: #fff; list-style: none; }
.rp .rprio li { list-style: none; display: flex; align-items: center; gap: calc(var(--mm)*3.6); padding: calc(var(--mm)*2.5) 0; font-size: calc(var(--pt)*9.6); line-height: 1.3; }
.rp .rprio li + li { border-top: 1px solid rgba(255,255,255,.12); }
.rp .rprio b { flex: 0 0 calc(var(--mm)*6.2); height: calc(var(--mm)*6.2); border-radius: 50%; background: #36ada3; color: #062A56; font-family: var(--f-head); font-size: calc(var(--pt)*8.6); display: grid; place-items: center; }
.rp .rclose { text-align: center; padding: calc(var(--mm)*1) calc(var(--mm)*8) 0; }
.rp .rline { font-family: var(--f-head); font-weight: 700; font-size: calc(var(--pt)*10.8); color: #062A56; line-height: 1.5; }
.rp .rsign { margin-top: calc(var(--mm)*3); font-size: calc(var(--pt)*8.4); color: #6b6b84; }
.rp .rsign b { color: #062A56; font-family: var(--f-head); }
.rp .rfoot { background: #062A56; color: #fff; display: flex; justify-content: space-between; gap: 10px; padding: calc(var(--mm)*4.6) calc(var(--mm)*15); font-size: calc(var(--pt)*7.6); letter-spacing: .14em; }
.rp .rfoot b { font-family: var(--f-head); }
.rp .rfoot span { color: #c9d7e6; text-align: right; }
@container (min-width: 600px) { .rp .pg { min-height: calc(100cqw * 297 / 210); } }
@supports not (container-type: inline-size) { .rp .pg { --mm: 1.9px; --pt: 1.2px; } }
@container (max-width: 520px) {
  .rp .rwho { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .rp .rwho > div:nth-child(2) { grid-column: 1 / -1; order: 3; }
  .rp .rles { grid-template-columns: repeat(11, minmax(0, 1fr)); }
  .rp .rstat { padding-inline: 4px; }
  .rp .rclose { padding-inline: 0; }
  .rp .rfoot { letter-spacing: .08em; }
}
.rp .pg { font-family: var(--f-text) !important; }
.rp .rmonth, .rp .rtitle, .rp .rv, .rp .rsec h2, .rp .rnum, .rp .rtt b, .rp .rles span, .rp .rprio b, .rp .rline, .rp .rsign b, .rp .rfoot b { font-family: var(--f-head) !important; }
.rp .rk, .rp .rsub, .rp .rlbl, .rp .rsec span, .rp .rtt, .rp .rnote p, .rp .rprio li, .rp .rsign, .rp .rfoot span { font-family: var(--f-text) !important; }
.ur .rp .pg { line-height: 1.35; }
.ur .main .rp .rtitle { line-height: 1.2; letter-spacing: -.01em; }
.ur .main .rp .rsec h2 { line-height: 1.35; letter-spacing: 0; }
.ur .rp .rnote p:not(.rk) { line-height: 1.58; }

/* report editor (admin) */
.rv-grid { display: grid; grid-template-columns: minmax(0, 400px) minmax(0, 1fr); gap: 22px; align-items: start; }
.rv-grid .rv-prev { position: sticky; top: 0; }
.rv-fields { display: flex; flex-direction: column; gap: 14px; }
.rv-fields .two { display: grid; gap: 8px; }
.rv-fields textarea { resize: vertical; }
.rv-teacher { background: var(--soft); border-radius: 14px; padding: 10px 12px; font-size: 13.5px; white-space: pre-wrap; }
.rv-teacher.urdu { font-family: var(--f-ur); line-height: 2.1; direction: rtl; text-align: right; }
.input.has-ur { border-color: var(--rose-ink); box-shadow: 0 0 0 1px var(--rose-ink); }
@media (max-width: 980px) { .rv-grid { grid-template-columns: minmax(0, 1fr); } .rv-grid .rv-prev { position: static; } }

/* sign-in photos & videos — nothing is cropped: each picture shows whole on navy */
.login .art.has-ss { justify-content: flex-start; gap: 22px; }
.ss { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 14px; }
.ss-stage { position: relative; flex: 1; min-height: 320px; }
.ss-item { position: absolute; inset: 0; margin: 0; display: flex; flex-direction: column; gap: 14px; opacity: 0; visibility: hidden; transition: opacity .5s, visibility .5s; }
.ss-item.on { opacity: 1; visibility: visible; }
.ss-media { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; }
.ss-media img, .ss-media video { display: block; max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; border-radius: 18px; background: #042848; box-shadow: 0 24px 50px -24px rgba(0,0,0,.7); }
.ss figcaption { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; min-height: 40px; }
.ss figcaption span { font-family: var(--f-head); font-size: 19px; font-weight: 700; line-height: 1.3; color: #fff; flex: 1 1 220px; }
.ss figcaption.ur-cap span { font-family: var(--f-ur); font-size: 18px; line-height: 2; font-weight: 700; }
.ss-btn { display: inline-flex; align-items: center; gap: 8px; background: #36ADA3; color: #fff; border-radius: 99px; padding: 10px 18px; font-weight: 700; font-size: 14px; text-decoration: none; flex: none; }
.ss-btn:hover { background: #2F9C93; }
.ss-dots { display: flex; gap: 8px; align-items: center; }
.ss-dots button { width: 9px; height: 9px; border-radius: 99px; border: 0; padding: 0; background: rgba(255,255,255,.35); cursor: pointer; transition: width .25s, background .25s; }
.ss-dots button[aria-current="true"] { width: 26px; background: var(--cream); }
.ss-dots button:focus-visible, .ss-btn:focus-visible { outline: 2px solid #8FE3D3; outline-offset: 2px; }
@media (max-width: 860px) {
  .login .art.has-ss { padding: 18px 16px 16px; gap: 12px; }
  .login .art.has-ss > img { height: 40px; }
  .ss { flex: none; gap: 10px; }
  .ss-stage { display: grid; min-height: 0; flex: none; }
  .ss-item { position: static; grid-area: 1 / 1; gap: 8px; }
  .ss-media img, .ss-media video { max-height: 32vh; border-radius: 14px; }
  .ss figcaption { min-height: 0; gap: 10px; }
  .ss figcaption span { font-size: 15px; flex-basis: 160px; }
  .ss figcaption.ur-cap span { font-size: 15px; }
  .ss-btn { padding: 8px 14px; font-size: 13px; }
  .ss-dots { justify-content: center; }
}

/* sign-in slides in Settings */
.slides { display: flex; flex-direction: column; }
.sc { display: grid; grid-template-columns: 132px minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 14px 20px; border-top: 1px solid var(--line-2); }
.sc-thumb { width: 132px; height: 92px; border-radius: 12px; background: #062A56; display: grid; place-items: center; overflow: hidden; position: relative; }
.sc-thumb img, .sc-thumb video { max-width: 100%; max-height: 100%; object-fit: contain; display: block; }
.sc-thumb.missing { color: #fff; font-size: 12px; }
.sc-kind { position: absolute; left: 6px; bottom: 6px; background: rgba(0,0,0,.55); color: #fff; font-size: 11px; border-radius: 6px; padding: 2px 6px; display: inline-flex; gap: 4px; align-items: center; }
.sc-kind svg { width: 13px; height: 13px; }
.sc-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.sc-cap { color: var(--title); font-weight: 700; overflow-wrap: anywhere; }
.sc-link { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sc-acts { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.sc-acts .btn svg { width: 15px; height: 15px; }
.sl-prev { background: #062A56; border-radius: 14px; padding: 10px; display: grid; place-items: center; }
.sl-prev img, .sl-prev video { max-width: 100%; max-height: 280px; border-radius: 10px; display: block; }
.sl-prev p { color: #C9D7E6; margin-top: 8px; }
#sl-bar, #up-bar { display: block; height: 100%; background: var(--teal); border-radius: 99px; transition: width .2s; }
@media (max-width: 700px) {
  .sc { grid-template-columns: 96px minmax(0, 1fr); padding: 12px 14px; }
  .sc-thumb { width: 96px; height: 72px; }
  .sc-acts { grid-column: 1 / -1; justify-content: flex-start; }
}

/* brothers & sisters on one family login */
.kids { display: flex; gap: 10px; flex-wrap: wrap; padding: 14px 0 0; }
.kids button { display: inline-flex; align-items: center; gap: 10px; border: 1.5px solid var(--line); background: var(--surface); border-radius: 20px; padding: 6px 14px 6px 6px; font-weight: 700; color: var(--ink); cursor: pointer; min-height: 52px; }
.kids button.on { border-color: transparent; background: var(--sel); }
.kids button svg.fav { width: 40px; height: 40px; flex: none; }
@media (max-width: 860px) { .kids { padding: 10px 16px 0; } .kids button { flex: 1 1 0; min-width: 0; } }

/* ================= Kids under 12 ================= */
.kidwrap { min-height: 100vh; background: var(--kid-bg); }
.kid { max-width: 560px; margin: 0 auto; padding: 16px 16px calc(112px + env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: column; gap: 16px; color: var(--ink); }
.kid .ktop { display: flex; align-items: center; gap: 8px; }
.kid .stars { height: 42px; display: inline-flex; align-items: center; gap: 6px; padding: 0 14px 0 10px; border-radius: 99px; background: var(--gold); color: var(--gold-ink); text-decoration: none; font-family: var(--f-head); font-weight: 800; font-size: 16px; direction: ltr; border: 0; }
.kid .stars svg { width: 20px; height: 20px; }
.kid .hi { display: flex; align-items: center; gap: 14px; }
.kid .hi svg.fav { width: 76px; height: 76px; flex: none; }
.kid .hi .s { display: block; font-size: 14px; color: var(--muted); }
.kid .hi h1 { font-size: 32px; font-weight: 700; color: var(--title); line-height: 1.15; }
.kid .khero { background: var(--hero); color: #fff; border-radius: 30px; padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.kid .khero .chipw { align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; background: rgba(247,251,255,.16); color: var(--cream); border-radius: 99px; padding: 6px 12px; font-size: 13px; font-weight: 700; }
.kid .khero .chipw i { width: 8px; height: 8px; border-radius: 50%; background: #7FD8C7; }
.kid .khero h2 { font-size: 25px; font-weight: 700; line-height: 1.2; }
.kid .khero .w { font-size: 14px; color: var(--hero-ink); }
.kid .kjoin { min-height: 60px; border-radius: 20px; background: #36ADA3; color: #fff; display: flex; align-items: center; justify-content: center; gap: 12px; text-decoration: none; font-weight: 800; font-size: 18px; box-shadow: 0 5px 0 #1F7A72; border: 0; width: 100%; }
.kid .kjoin svg { width: 24px; height: 24px; }
.kid .kjoin[disabled], .kid .kjoin.off { background: rgba(255,255,255,.12); color: var(--hero-ink); box-shadow: none; font-size: 15px; }
.kid .kcard { background: var(--surface); border: 1px solid var(--line); border-radius: 28px; padding: 16px; }
.kid .kcard h2 { font-size: 18px; font-weight: 700; color: var(--title); }
.kid .kh { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.kid .kh span { font-size: 13px; font-weight: 700; color: var(--teal-ink); }
.kid .journey { display: block; width: 100%; direction: ltr; }
.kid .kp { margin: 0 0 4px; font-size: 14px; color: var(--ink-2); text-align: center; }
.kid .week { display: flex; justify-content: space-between; gap: 4px; margin-top: 10px; }
.kid .week > span { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.kid .week .wd { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--soft); border: 2px solid transparent; }
.kid .week .wd.got { background: var(--gold); }
.kid .week .wd.today { background: var(--gold); opacity: .75; }
.kid .week .wd svg { width: 20px; height: 20px; }
.kid .week .wd .dash { width: 12px; height: 3px; border-radius: 3px; background: var(--faint); }
.kid .week small { font-size: 11.5px; color: var(--muted); font-weight: 600; white-space: nowrap; }
.kid .week small.t { color: var(--title); font-weight: 800; }
.kid .badges { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.kid .badge { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; background: none; border: 0; padding: 0; color: var(--ink); }
.kid .badge .bs { width: 64px; height: 64px; display: grid; place-items: center; background: var(--bb, var(--sky)); color: var(--bi, var(--sky-ink)); clip-path: polygon(50% 0, 64% 14%, 85% 15%, 86% 36%, 100% 50%, 86% 64%, 85% 85%, 64% 86%, 50% 100%, 36% 86%, 15% 85%, 14% 64%, 0 50%, 14% 36%, 15% 15%, 36% 14%); }
.kid .badge .bs svg { width: 26px; height: 26px; }
.kid .badge.lock .bs { opacity: .4; }
.kid .badge b { font-size: 12px; font-weight: 700; line-height: 1.3; }
.kid .badge small { font-size: 11px; color: var(--muted); }
.kid .bgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.kid .bgrid .badge { background: var(--surface); border: 2px solid transparent; border-radius: 22px; padding: 12px 6px; cursor: pointer; }
.kid .bgrid .badge[aria-pressed="true"] { background: var(--gold); }
.kid .bgrid .badge .bs { width: 58px; height: 58px; }
.kid .remind { display: flex; align-items: center; gap: 10px; background: var(--mint); color: var(--teal-ink); border-radius: 20px; padding: 12px 14px; font-size: 14px; font-weight: 600; }
.kid .remind svg { width: 22px; height: 22px; flex: none; }
.kid .masha { background: var(--mint); color: var(--teal-ink); border-radius: 24px; padding: 14px 16px; display: flex; align-items: center; gap: 12px; }
.kid .masha b { display: block; font-size: 16px; }
.kid .shero { background: var(--hero); color: #fff; border-radius: 30px; padding: 20px 18px; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.kid .shero .big { font-family: var(--f-head); font-size: 46px; font-weight: 800; line-height: 1; direction: ltr; }
.kid .shero .sl { font-size: 14px; color: var(--cream); }
.kid .shero .prog { width: 100%; margin-top: 10px; display: flex; flex-direction: column; gap: 6px; }
.kid .shero .prog .r { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--hero-ink); }
.kid .shero .prog .t { height: 12px; border-radius: 99px; background: rgba(255,255,255,.16); overflow: hidden; display: block; }
.kid .shero .prog .t i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #E3B341, #F7D27A); }
.kid .ktabs2 { display: flex; gap: 6px; background: var(--soft); padding: 5px; border-radius: 18px; }
.kid .ktabs2 button { flex: 1; min-height: 44px; border-radius: 14px; border: 0; background: transparent; color: var(--muted); font-weight: 700; font-size: 14px; }
.kid .ktabs2 button[aria-selected="true"] { background: var(--surface); color: var(--title); box-shadow: 0 2px 6px rgba(6,53,99,.10); }
.kid .earn { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line-2); }
.kid .earn:first-child { border-top: 0; }
.kid .earn .ei { width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; flex: none; }
.kid .earn .ei svg { width: 21px; height: 21px; }
.kid .earn b.plus { display: inline-flex; align-items: center; gap: 4px; color: var(--gold-ink); background: var(--gold); border-radius: 99px; padding: 4px 10px; font-family: var(--f-head); direction: ltr; }
.kid .private { display: flex; gap: 10px; align-items: center; font-size: 13px; color: var(--ink-2); background: var(--soft); border-radius: 18px; padding: 11px 14px; }
.kid .private svg { width: 20px; height: 20px; flex: none; }
.kid .seldet { display: flex; gap: 12px; align-items: flex-start; }
.kid .seldet .ei { width: 40px; height: 40px; border-radius: 14px; display: grid; place-items: center; flex: none; }
.kid .seldet .ei svg { width: 20px; height: 20px; }
.ktabs { position: fixed; left: 50%; transform: translateX(-50%); width: min(536px, calc(100% - 24px)); bottom: calc(12px + env(safe-area-inset-bottom, 0px)); z-index: 40; height: 72px; border-radius: 26px; background: var(--rail); display: flex; align-items: center; justify-content: space-around; box-shadow: 0 14px 30px -14px rgba(3,11,20,.55); }
.ktabs button { border: 0; background: none; display: flex; flex-direction: column; align-items: center; gap: 2px; color: var(--rail-ink); font-size: 12px; font-weight: 700; min-width: 80px; line-height: 1.3; }
.ktabs button > i { width: 50px; height: 32px; border-radius: 14px; display: grid; place-items: center; }
.ktabs button svg { width: 22px; height: 22px; }
.ktabs button.on { color: var(--cream); }
.ktabs button.on > i { background: rgba(247,251,255,.16); }
.ur .kid { line-height: 2; }
.ur .kid .hi h1 { font-size: 28px; line-height: 1.9; }
.ur .kid .khero h2 { line-height: 1.8; }
.ur .ktabs button { font-family: var(--f-ur); font-size: 12px; line-height: 1.8; }
.pin { display: flex; gap: 10px; justify-content: center; direction: ltr; }
.pin input { width: 56px; height: 64px; text-align: center; font-family: var(--f-head); font-size: 26px; font-weight: 700; border-radius: 16px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); }
.modechip { display: flex; align-items: center; gap: 12px; background: var(--cream-2); color: var(--ink); border-radius: 22px; padding: 14px; text-decoration: none; border: 0; width: 100%; text-align: start; }
.modechip .mi { width: 44px; height: 44px; border-radius: 14px; background: var(--surface); display: grid; place-items: center; flex: none; color: var(--gold-ink); }
.modechip .mi svg { width: 22px; height: 22px; }
.modechip b { display: block; }
.modechip > svg { width: 18px; height: 18px; flex: none; color: var(--muted); }
.modechip .grow { min-width: 0; }
.modechip span { font-size: 12.5px; color: var(--muted); }

/* marks for light / dark, search, hidden labels */
.mk-dk { display: none; }
:root[data-theme="dark"] .mk-lt { display: none; } :root[data-theme="dark"] .mk-dk { display: block; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.search { display: flex; align-items: center; gap: 10px; height: 46px; padding: 0 16px; border-radius: 99px; border: 1px solid var(--line); background: var(--surface); width: 300px; max-width: 100%; color: var(--muted); }
.search svg { width: 18px; height: 18px; flex: none; }
.search input { border: 0; outline: 0; background: transparent; color: var(--ink); width: 100%; min-width: 0; font-size: 14px; }
.search:focus-within { outline: 2px solid var(--link); outline-offset: 2px; }
.login .tools { display: flex; align-items: center; gap: 8px; }
.chat .ch .back { flex: none; }
.chat .ch .back svg { width: 16px; height: 16px; }
.repbox.blue .bar i { background: var(--sky-ink); }
.kid .lang button { padding: 0 10px; height: 34px; }
.kid .iconbtn { width: 42px; height: 42px; }

/* ---------- 1.1.0: attendance — joins, family notes, lesson picker, rules ---------- */
.li .who .jline { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; white-space: normal; font-size: 12px; color: var(--ink-2); margin-top: 3px; }
.li .who .jline svg { color: var(--teal-ink); }
.li .who .jline b { font-weight: 700; color: var(--ink); }
.li .who > span:has(> .pill) { margin-top: 4px; overflow: visible; }
.li.att { align-items: flex-start; }
.li.att .who { gap: 4px; }
.li.att .who > span { white-space: normal; }
.li.att .end { flex-wrap: wrap; justify-content: flex-end; max-width: 46%; }
.mkinfo { display: flex; flex-direction: column; gap: 6px; background: var(--soft); border-radius: 14px; padding: 10px 12px; font-size: 12.5px; }
.mkinfo .jline { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.lbigs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.lbig { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 12px 14px; border-radius: 16px; border: 1px solid transparent; background: var(--soft); color: var(--ink); text-align: start; }
.lbig span { font-size: 12px; color: var(--muted); font-weight: 600; }
.lbig b { font-family: var(--f-head); font-size: 22px; font-weight: 700; line-height: 1.1; }
.lbig.on { background: var(--btn); color: var(--btn-ink); }
.lbig.on span { color: inherit; opacity: .8; }
.lbigs + .lessons { margin-top: 10px; }
.rules { line-height: 1.5; }
.awayb { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 10px; font-size: 13px; color: var(--hero-ink); }
.awayb .lnk, .lnk { border: 0; background: none; color: inherit; text-decoration: underline; font-weight: 700; padding: 0; }
.btn.ghost-l { margin-top: 10px; background: transparent; border: 1px solid rgba(247,251,255,.35); color: #F7FBFF; }
.btn.ghost-l:hover { background: rgba(247,251,255,.08); }
.knew { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; text-align: start; background: var(--sky); color: var(--sky-ink); border-radius: 18px; padding: 12px 14px; font-weight: 700; font-size: 14px; }
.ktabs button { position: relative; }
.ktabs .cnt { top: 2px; inset-inline-end: calc(50% - 22px); }
details.cbc { margin-top: 14px; border-top: 1px solid var(--line-2); padding-top: 10px; }
details.cbc summary { cursor: pointer; font-weight: 700; color: var(--title); font-size: 13.5px; padding: 6px 0; }
details.cbc .list { margin: 6px -22px -10px; }
.timebox { margin-top: 12px; }
.timebox .grow { display: flex; flex-direction: column; gap: 4px; }
/* phone: names and times are never cut */
@media (max-width: 860px) {
  .mtop .grow b { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; font-size: 15px; }
  .mtop .lang button { padding: 0 8px; }
  .mtop .iconbtn { width: 36px; height: 36px; }
  .li .who b { white-space: normal; }
  .li .who span { white-space: normal; }
  .li.att .end { max-width: 100%; }
  .li.att { flex-wrap: wrap; }
  .li.att .end { width: 100%; justify-content: flex-start; padding-inline-start: 0; }
  .lbig b { font-size: 20px; }
}
.small.muted .num, .clock, .time { white-space: nowrap; }
/* 1.1.0 voice notes: live microphone level and "Listen" before sending */
.rec .lv { width: 64px; height: 8px; border-radius: 99px; background: rgba(155,47,47,.18); overflow: hidden; flex: none; }
.rec .lv span { display: block; height: 100%; width: 0; background: currentColor; border-radius: inherit; transition: width .1s linear; }
.rec.recp { background: var(--sky); color: var(--sky-ink); }
.rec.recp audio { flex: 1; min-width: 180px; height: 38px; }
.voice .vdl { display: inline-flex; align-items: center; gap: 4px; color: inherit; font-weight: 700; margin-inline-start: 6px; }
@media (max-width: 860px) {
  .li.tcl { flex-wrap: wrap; row-gap: 8px; }
  .li.tcl .who { flex: 1 1 0; min-width: 140px; }
  .li.tcl .end { flex: 1 1 100%; justify-content: flex-end; flex-wrap: wrap; }
  .li.tcl .end .days { display: none; }
}
/* the round send button style must not squeeze the voice-note buttons */
.chat .compose .rec .btn, .chat .compose .rec .btn.pri { width: auto; height: auto; min-height: 36px; padding: 0 14px; border-radius: 12px; flex: none; }
.chat .compose .rec .btn.pri svg { width: 15px; height: 15px; }
.rec .grow { flex: 1 1 140px; }
.rec.recp audio { flex: 1 1 100%; }
.rec.recp .btn:first-of-type { margin-inline-start: auto; }
