:root { --bg:#eef7fd; --paper:#fff; --ink:#0c2d48; --mute:#52708a; --line:#d4e6f3; --band:#0369a1; --red:#c4302b; }
* { box-sizing: border-box; }
body { margin:0; background:var(--bg); color:var(--ink); font:16px/1.55 system-ui, sans-serif; }
header { background:var(--band); color:#fff; padding:14px 5vw; display:flex; gap:12px; align-items:center; flex-wrap:wrap; }
header .who { margin-left:auto; font-size:14px; opacity:.9; }
main { max-width:1100px; margin:0 auto; padding:28px 4vw; display:grid; gap:22px; }
h1 { margin:0; font-size:clamp(26px,4vw,38px); line-height:1.1; }
h2 { margin:0 0 12px; font-size:20px; }
.mute { color:var(--mute); font-size:14px; }
.panel { background:var(--paper); border:1px solid var(--line); border-radius:12px; padding:20px; }
.grid2 { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,320px),1fr)); gap:22px; }
form.stack { display:grid; gap:10px; }
label { font-size:14px; color:var(--mute); display:grid; gap:4px; }
input, select { font:inherit; padding:10px 12px; border:1px solid var(--line); border-radius:8px; min-height:44px; width:100%; background:#fff; }
button { font:inherit; font-weight:600; min-height:44px; padding:0 16px; border:0; border-radius:8px; background:var(--band); color:#fff; cursor:pointer; }
button.ghost { background:transparent; color:var(--ink); border:1px solid var(--line); min-height:36px; font-size:14px; }
header button { background:rgba(255,255,255,.15); }
table { width:100%; border-collapse:collapse; font-size:15px; }
th { text-align:left; font-size:13px; color:var(--mute); border-bottom:2px solid var(--red); padding:8px 6px; }
td { padding:9px 6px; border-bottom:1px solid var(--line); vertical-align:middle; }
.err { color:var(--red); font-size:14px; }
.ok { color:var(--band); font-size:14px; }
.tag { font-size:13px; padding:2px 8px; border-radius:99px; background:#e0f0fb; }
.tag.off { background:#f8dcda; color:var(--red); }
.stats { display:flex; gap:28px; flex-wrap:wrap; }
.stats div { font-size:14px; color:var(--mute); }
.stats b { display:block; font-size:30px; color:var(--ink); }
.inline { display:flex; gap:8px; align-items:center; flex-wrap:wrap; }
form.inline { display:flex; gap:8px; align-items:center; flex-wrap:wrap; }
form.inline select { width:auto; flex:1; min-width:160px; }
@media (max-width:600px) { table, thead, tbody, tr, td { display:block; } thead { display:none; } tr { padding:8px 0; border-bottom:1px solid var(--line); } td { border:0; padding:3px 0; } }
header nav { display:flex; gap:4px; flex-wrap:wrap; }
header nav a { color:#fff; text-decoration:none; padding:8px 12px; border-radius:8px; opacity:.85; }
header nav a:hover { background:rgba(255,255,255,.1); opacity:1; }
header nav a[aria-current] { background:rgba(255,255,255,.18); opacity:1; font-weight:600; }
.filters { display:flex; gap:10px; flex-wrap:wrap; align-items:end; }
.filters label { flex:1; min-width:160px; }
.grid3 { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,220px),1fr)); gap:10px 18px; }
a.btn { display:inline-flex; align-items:center; min-height:36px; padding:0 12px; border:1px solid var(--line); border-radius:8px; color:var(--ink); text-decoration:none; font-size:14px; font-weight:600; }
.num { text-align:right; white-space:nowrap; }
textarea { font:inherit; padding:10px 12px; border:1px solid var(--line); border-radius:8px; width:100%; min-height:44px; }
/* Attendance */
.att-row { display:flex; gap:6px; flex-wrap:wrap; }
.att-row label { display:inline-flex; flex-direction:row; align-items:center; gap:6px; color:var(--ink); font-size:14px; border:1px solid var(--line); border-radius:8px; padding:0 10px; min-height:40px; cursor:pointer; }
.att-row input { width:auto; min-height:0; margin:0; }
.att-row label:has(input:checked) { border-color:currentColor; font-weight:600; }
.att-row label.present:has(input:checked) { background:#e3f1e8; color:#1d6b3f; }
.att-row label.absent:has(input:checked)  { background:#f8dcda; color:var(--red); }
.att-row label.late:has(input:checked)    { background:#fdf0d2; color:#8a5a00; }
.att-row label.leave:has(input:checked)   { background:#e4e9f5; color:#344f8f; }
.register { font-size:13px; }
.register th, .register td { padding:6px 4px; }
.register .day { text-align:center; min-width:26px; }
.register th.day.off { color:#b9cddc; }
.register .name { white-space:nowrap; position:sticky; left:0; background:var(--paper); }
.st-present { color:#1d6b3f; } .st-absent { color:var(--red); font-weight:700; background:#fbe9e8; }
.st-late { color:#8a5a00; } .st-leave { color:#344f8f; }
.low { color:var(--red); font-weight:700; }
.scroll { overflow-x:auto; }
@media (max-width:600px) { .register, .register thead, .register tbody, .register tr, .register td { display:revert; } .register thead { display:table-header-group; } }
/* Marks & results */
.marks input { width:72px; text-align:center; padding:8px 4px; min-height:40px; }
.marks input[readonly] { background:var(--bg); }
.marks .name, .results .name { white-space:nowrap; position:sticky; left:0; background:var(--paper); z-index:1; }
.results td, .results th { white-space:nowrap; }
.fail { color:var(--red); font-weight:700; }
.pass { color:var(--band); font-weight:700; }
@media (max-width:600px) { .marks, .marks thead, .marks tbody, .marks tr, .marks td, .results, .results thead, .results tbody, .results tr, .results td { display:revert; } .marks thead, .results thead { display:table-header-group; } }
/* Settings */
.checks { display:grid; grid-template-columns:repeat(auto-fit,minmax(170px,1fr)); gap:6px 12px; }
label.check { display:flex; flex-direction:row; align-items:center; gap:8px; color:var(--ink); font-size:15px; }
label.check input { width:18px; height:18px; min-height:0; margin:0; }
/* Account */
a.who { color:#fff; text-decoration:none; } a.who:hover { text-decoration:underline; }
.banner { background:#fdf0d2; color:#5c4100; padding:10px 5vw; font-size:14px; }
.banner a { color:inherit; font-weight:700; }
.temp-pw { font-family:ui-monospace,Consolas,monospace; font-size:18px; background:#fff; border:1px dashed currentColor; padding:2px 8px; border-radius:6px; }
/* Profile menu */
header nav { flex:1; }
details.profile { position:relative; margin-left:auto; }
details.profile summary { list-style:none; display:flex; align-items:center; gap:6px; cursor:pointer; padding:4px 6px 4px 4px; border-radius:99px; color:#fff; }
details.profile summary::-webkit-details-marker { display:none; }
details.profile summary:hover, details.profile[open] summary { background:rgba(255,255,255,.14); }
details.profile summary:focus-visible { outline:3px solid rgba(255,255,255,.6); }
details.profile[open] .chev { transform:rotate(180deg); }
.avatar { width:38px; height:38px; border-radius:50%; display:inline-grid; place-items:center; font-weight:700; font-size:14px; letter-spacing:.5px;
  background:linear-gradient(135deg,#f4d58d,#e0a63b); color:#3b2a06; box-shadow:0 0 0 2px rgba(255,255,255,.7); }
.avatar.big { width:48px; height:48px; font-size:17px; box-shadow:none; flex:none; }
details.profile .menu { position:absolute; right:0; top:calc(100% + 8px); width:280px; background:var(--paper); color:var(--ink); border:1px solid var(--line);
  border-radius:12px; box-shadow:0 12px 32px rgba(0,0,0,.18); padding:8px; z-index:50; }
.menu-head { display:flex; gap:12px; align-items:center; padding:10px 10px 12px; border-bottom:1px solid var(--line); margin-bottom:6px; font-size:14px; line-height:1.4; }
.menu-head .mute { font-size:13px; }
details.profile .menu a, details.profile .menu button.logout { display:flex; align-items:center; gap:10px; width:100%; padding:10px; border-radius:8px; color:var(--ink);
  text-decoration:none; font:inherit; font-size:15px; font-weight:500; background:none; border:0; min-height:0; cursor:pointer; text-align:left; }
details.profile .menu a:hover, details.profile .menu button.logout:hover { background:var(--bg); }
details.profile .menu button.logout { color:var(--red); border-top:1px solid var(--line); border-radius:0 0 8px 8px; margin-top:6px; padding-top:12px; }
header button.logout { background:none; }
@media (max-width:760px) {
  header { flex-wrap:wrap; row-gap:8px; }
  header nav { order:3; flex:1 0 100%; flex-wrap:nowrap; overflow-x:auto; scrollbar-width:none; }
  header nav a { flex:none; }
  details.profile .menu { width:min(280px, calc(100vw - 32px)); }
}
button.wa { background:#1f9d55; display:inline-flex; align-items:center; gap:6px; min-height:36px; font-size:14px; padding:0 12px; }
button.wa:hover { background:#17834a; }
/* Settings choice cards */
label.choice { display:flex; flex-direction:row; gap:12px; align-items:flex-start; border:1px solid var(--line); border-radius:10px; padding:14px; color:var(--ink); font-size:15px; cursor:pointer; }
label.choice input { width:18px; height:18px; min-height:0; margin-top:3px; flex:none; }
label.choice:has(input:checked) { border-color:var(--band); background:#e8f5fd; }
/* QR scanning */
.scanbox { position:relative; background:#082f49; border-radius:10px; overflow:hidden; aspect-ratio:4/3; }
.scanbox video { width:100%; height:100%; object-fit:cover; display:block; }
.scanbox .aim { position:absolute; inset:18% 22%; border:3px solid rgba(255,255,255,.8); border-radius:12px; pointer-events:none; }
.scan-result { margin-top:14px; padding:14px; border-radius:10px; font-size:17px; min-height:56px; }
.scan-result:empty { display:none; }
.scan-result.good { background:#e3f1e8; color:#1d6b3f; } .scan-result.bad { background:#f8dcda; color:var(--red); } .scan-result.info { background:#e4e9f5; color:#344f8f; }
/* ID card designer */
.idc-designer { display:grid; grid-template-columns:auto minmax(0,1fr); gap:24px; align-items:start; }
.idc-preview { position:sticky; top:12px; display:grid; gap:6px; justify-items:center; background:var(--bg); padding:14px; border-radius:12px; }
.idc-fields { list-style:none; margin:0; padding:0; display:grid; gap:4px; max-width:420px; }
.idc-fields li { display:flex; justify-content:space-between; align-items:center; border:1px solid var(--line); border-radius:8px; padding:4px 6px 4px 10px; }
.idc-fields li button { min-height:30px; padding:0 9px; margin-left:4px; }
@media (max-width:700px) { .idc-designer { grid-template-columns:1fr; } .idc-preview { position:static; } }
/* Timetable */
.tt { font-size:14px; } .tt th, .tt td { border:1px solid var(--line); padding:6px; text-align:center; vertical-align:middle; }
.tt thead th { border-bottom:2px solid var(--red); }
.tt tbody th { text-align:left; white-space:nowrap; background:var(--bg); }
.tt .brk { background:#fdf6e3; color:#8a5a00; font-size:12px; writing-mode:horizontal-tb; }
.tt td b { display:block; } .tt td .mute { font-size:12px; }
.tt select { font-size:13px; padding:4px; min-height:32px; width:100%; min-width:120px; }
.tt td.clash { background:#f8dcda; }
@media (max-width:600px) { .tt, .tt thead, .tt tbody, .tt tr, .tt td, .tt th { display:revert; } .tt thead { display:table-header-group; } }
@media print { .tt .brk { -webkit-print-color-adjust:exact; print-color-adjust:exact; } }
main > * { min-width:0; }   /* let wide tables scroll inside their panel */
/* Student photos */
.photo-field { display:flex; gap:16px; flex-wrap:wrap; align-items:flex-start; }
.photo-box { width:120px; height:150px; border-radius:10px; border:1px dashed #b9cddc; background:#f0f8fe; display:grid; place-items:center; overflow:hidden; color:var(--mute); font-size:13px; flex:none; }
.photo-box img { width:100%; height:100%; object-fit:cover; display:block; }
#camVideo { width:240px; max-width:100%; border-radius:10px; background:#000; display:block; }
.who { display:flex; gap:10px; align-items:center; }
.thumb { width:36px; height:45px; border-radius:6px; object-fit:cover; flex:none; background:#e0f0fb; display:inline-grid; place-items:center; font-weight:700; color:#7890a5; }
/* Parent login slips */
.slips { display:grid; grid-template-columns:repeat(auto-fill,minmax(300px,1fr)); gap:12px; }
.slip { border:1px dashed #8aa0b3; border-radius:10px; padding:14px; break-inside:avoid; background:#fff; font-size:14px; line-height:1.5; }
.slip .big { font-family:ui-monospace, Consolas, monospace; font-size:20px; font-weight:700; letter-spacing:1px; }

/* ---------- Buttons (one style for the whole app) ---------- */
button, a.btn {
  --b1:#0ea5e9; --b2:#0369a1;
  display:inline-flex; align-items:center; justify-content:center; gap:6px;
  font:inherit; font-weight:600; font-size:15px; line-height:1.2; letter-spacing:.1px;
  min-height:42px; padding:0 18px; border-radius:10px; cursor:pointer; text-decoration:none; white-space:nowrap;
  color:#fff; border:1px solid var(--b2); background:linear-gradient(180deg, var(--b1), var(--b2));
  box-shadow:0 1px 2px rgba(12,45,72,.12), 0 3px 8px rgba(3,105,161,.16), inset 0 1px 0 rgba(255,255,255,.14);
  transition:transform .12s ease, box-shadow .12s ease, background .12s ease, border-color .12s ease, filter .12s ease;
}
button:hover, a.btn.primary:hover { filter:brightness(1.07); transform:translateY(-1px); box-shadow:0 2px 4px rgba(12,45,72,.14), 0 6px 14px rgba(3,105,161,.2), inset 0 1px 0 rgba(255,255,255,.14); }
button:active, a.btn:active { transform:translateY(0); filter:brightness(.97); box-shadow:0 1px 2px rgba(12,45,72,.12); }
button:focus-visible, a.btn:focus-visible { outline:3px solid rgba(224,166,59,.7); outline-offset:2px; }
button:disabled { opacity:.5; cursor:not-allowed; transform:none; filter:none; }
/* secondary: white with a soft border (links styled as buttons, and .ghost buttons) */
a.btn, button.ghost {
  color:var(--ink); background:linear-gradient(180deg, #ffffff, #f0f8fe); border:1px solid #c6dbea;
  box-shadow:0 1px 2px rgba(12,45,72,.06), inset 0 1px 0 #fff; min-height:38px; padding:0 14px; font-size:14px;
}
a.btn:hover, button.ghost:hover { background:#e8f5fd; border-color:#9cc3dd; color:var(--band); filter:none; transform:translateY(-1px); box-shadow:0 2px 6px rgba(12,45,72,.1); }
/* main action links, and the selected tab */
a.btn.primary, a.btn[aria-current] { color:#fff; border-color:#0369a1; background:linear-gradient(180deg, #0ea5e9, #0369a1);
  box-shadow:0 1px 2px rgba(12,45,72,.12), 0 3px 8px rgba(3,105,161,.16), inset 0 1px 0 rgba(255,255,255,.14); }
a.btn[aria-current]:hover { color:#fff; background:linear-gradient(180deg, #0ea5e9, #0369a1); }
/* dangerous actions */
button.danger { --b1:#d6453f; --b2:#b02a25; border-color:#b02a25; }
button.ghost.danger { color:var(--red); background:#fff; border-color:#efc1be; --b1:#fff; --b2:#fff; }
button.ghost.danger:hover { background:#fdf0ef; border-color:var(--red); color:var(--red); }
/* keep special buttons as they were */
header button, details.profile .menu button.logout { box-shadow:none; transform:none; filter:none; border:0; }
details.profile .menu button.logout { background:none; justify-content:flex-start; min-height:0; font-size:15px; border-top:1px solid var(--line); }
details.profile .menu button.logout:hover { background:var(--bg); }
.tt select { min-height:32px; }
/* Timetable editing */
.tt-box { border:1px solid var(--line); background:#f7fbff; border-radius:10px; padding:12px 14px; margin-bottom:12px; }
.tt-times { display:grid; grid-template-columns:repeat(auto-fill,minmax(250px,1fr)); gap:10px 14px; margin-top:8px; }
.tt-times > div { display:grid; grid-template-columns:1fr 1fr; gap:4px 6px; font-size:14px; background:#fff; border:1px solid var(--line); border-radius:8px; padding:8px; }
.tt-times > div > span { grid-column:1 / -1; font-weight:600; } .tt-times .brk-l { color:#8a5a00; }
.tt-times input { min-height:36px; padding:4px 6px; font-size:14px; }
.clash-box { background:#f8dcda; border:2px solid var(--red); border-radius:8px; padding:4px; }
.clash-box span { display:block; color:var(--red); font-size:12px; font-weight:600; margin-top:3px; }
/* Diary */
textarea { font:inherit; padding:10px 12px; border:1px solid var(--line); border-radius:8px; width:100%; background:#fff; resize:vertical; }
.hw { display:flex; justify-content:space-between; gap:12px; align-items:flex-start; padding:10px 0; border-bottom:1px solid var(--line); }
.hw:last-of-type { border-bottom:0; }
a.btn.wa-link { color:#fff; background:linear-gradient(180deg, #25b866, #1f9d55); border-color:#1a8a4a; }
a.btn.wa-link:hover { color:#fff; background:linear-gradient(180deg, #2bc670, #1f9d55); }

/* ---------- Buttons v2: rounder, glossy, with icons ---------- */
button, a.btn { border-radius:12px; gap:8px; letter-spacing:.2px; position:relative; overflow:hidden; isolation:isolate; }
button:not(.ghost):not(.danger):not(.logout), a.btn.primary, a.btn[aria-current] {
  background:linear-gradient(135deg, #38bdf8 0%, #0369a1 55%, #075985 100%);
  border-color:#075985;
  box-shadow:0 1px 0 rgba(255,255,255,.18) inset, 0 -2px 0 rgba(0,0,0,.12) inset, 0 4px 12px rgba(3,105,161,.28);
}
/* soft shine that slides across on hover */
button:not(.logout)::after, a.btn::after {
  content:""; position:absolute; inset:0; z-index:-1; pointer-events:none;
  background:linear-gradient(120deg, transparent 30%, rgba(255,255,255,.22) 50%, transparent 70%);
  transform:translateX(-120%); transition:transform .5s ease;
}
button:hover::after, a.btn:hover::after { transform:translateX(120%); }
button:not(.ghost):not(.danger):not(.logout):hover, a.btn.primary:hover, a.btn[aria-current]:hover {
  box-shadow:0 1px 0 rgba(255,255,255,.18) inset, 0 6px 18px rgba(3,105,161,.34), 0 0 0 3px rgba(224,166,59,.25);
}
a.btn, button.ghost { border-radius:12px; background:linear-gradient(180deg, #ffffff, #f0f8fe); border-color:#c6dbea;
  box-shadow:0 1px 0 #fff inset, 0 1px 3px rgba(12,45,72,.08); }
a.btn:hover, button.ghost:hover { background:linear-gradient(180deg, #ffffff, #e0f0fb); border-color:#7fb4d6; color:#0369a1; box-shadow:0 4px 12px rgba(3,105,161,.12); }
button.danger { background:linear-gradient(135deg, #e0544d, #b02a25); border-color:#9c231f; box-shadow:0 4px 12px rgba(176,42,37,.25); }
button.ghost.danger { background:#fff; color:var(--red); border-color:#efc1be; box-shadow:none; }
button.ghost.danger:hover { background:#fff3f2; border-color:var(--red); color:var(--red); }
a.btn.wa-link { background:linear-gradient(135deg, #2fcf76, #1f9d55); border-color:#1a8a4a; color:#fff; box-shadow:0 4px 12px rgba(31,157,85,.28); }
.bi { width:17px; height:17px; flex:none; fill:none; stroke:currentColor; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; margin-left:-2px; }
a.btn .bi, button.ghost .bi { width:16px; height:16px; opacity:.85; }
button.danger .bi, button.ghost.danger .bi { opacity:1; }
button.wa:not(.ghost) { background:linear-gradient(135deg, #2fcf76, #1f9d55); border-color:#1a8a4a; box-shadow:0 4px 12px rgba(31,157,85,.28); }

/* ---------- Principal dashboard ---------- */
.hero { position:relative; overflow:hidden; border-radius:18px; padding:26px 28px; color:#fff; display:flex; gap:20px; justify-content:space-between; align-items:center; flex-wrap:wrap;
  background:radial-gradient(circle at 85% -20%, rgba(224,166,59,.45), transparent 45%), radial-gradient(circle at -10% 120%, rgba(255,255,255,.12), transparent 40%), linear-gradient(135deg, #0284c7, #0369a1 55%, #0c4a6e);
  box-shadow:0 10px 30px rgba(3,105,161,.25); }
.hero h1 { color:#fff; margin:2px 0 4px; }
.hero-main { display:flex; gap:18px; align-items:center; min-width:0; }
.hero-logo { width:72px; height:72px; border-radius:18px; background:#fff; color:#0369a1; display:grid; place-items:center; font-weight:800; font-size:26px; flex:none; overflow:hidden; box-shadow:0 4px 14px rgba(0,0,0,.18); }
.hero-logo img { width:100%; height:100%; object-fit:contain; padding:6px; }
.hero-hello { font-size:15px; opacity:.9; } .hero-sub { font-size:14px; opacity:.8; }
.hero-actions { display:flex; gap:10px; flex-wrap:wrap; }
.hero-actions a { display:inline-flex; align-items:center; gap:8px; padding:10px 16px; border-radius:12px; color:#fff; text-decoration:none; font-weight:600; font-size:14px;
  background:rgba(255,255,255,.12); border:1px solid rgba(255,255,255,.22); backdrop-filter:blur(4px); transition:background .15s, transform .15s; }
.hero-actions a:hover { background:rgba(255,255,255,.22); transform:translateY(-2px); }
.hero-actions a:first-child { background:#e0a63b; border-color:#e0a63b; color:#2b1d00; }
.hero-actions a:first-child:hover { background:#ebb54f; }
.hero-actions svg, .kpi-ico svg, .fc-ico svg { width:18px; height:18px; fill:none; stroke:currentColor; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; }

.kpis { display:grid; grid-template-columns:repeat(auto-fill,minmax(200px,1fr)); gap:14px; }
.kpi { --c:#0369a1; --t:#e8f5fd; display:grid; gap:2px; padding:18px; border-radius:16px; background:#fff; border:1px solid var(--line); text-decoration:none; color:var(--ink);
  position:relative; overflow:hidden; transition:transform .15s, box-shadow .15s; }
.kpi::before { content:""; position:absolute; inset:0 auto 0 0; width:4px; background:var(--c); }
.kpi:hover { transform:translateY(-3px); box-shadow:0 10px 24px rgba(12,45,72,.1); }
.kpi b { font-size:28px; line-height:1.15; margin-top:8px; }
.kpi > span:last-child { font-size:13px; color:var(--mute); } .kpi em { font-style:normal; color:var(--red); font-weight:600; }
.kpi-ico, .fc-ico { width:40px; height:40px; border-radius:12px; display:grid; place-items:center; background:var(--t); color:var(--c); }
.kpi-ico svg, .fc-ico svg { width:21px; height:21px; }
.k-green { --c:#1f7a4d; --t:#e3f3ea; } .k-blue { --c:#2563a8; --t:#e3eefa; } .k-purple { --c:#6b46b8; --t:#efe8fb; }
.k-amber { --c:#b7791f; --t:#fbf1dc; } .k-red { --c:#c4302b; --t:#fbe5e4; } .k-teal { --c:#0f7f86; --t:#dff3f4; }

.form-card { display:grid; gap:12px; align-content:start; border-radius:16px; box-shadow:0 2px 10px rgba(12,45,72,.04); }
.fc-head { display:flex; gap:12px; align-items:flex-start; margin-bottom:4px; } .fc-head h2 { margin:0 0 2px; }
.fc-ico { flex:none; } .fc-ico svg { width:22px; height:22px; }
.fc-row { display:flex; gap:12px; } .fc-row label:first-child { flex:1; }
.form-card > button { justify-self:start; min-width:180px; }
.pw-row { display:flex; gap:8px; } .pw-row input, .pw-row select { flex:1; min-width:0; }

.sec-head { display:flex; justify-content:space-between; align-items:center; gap:10px; margin-bottom:14px; } .sec-head h2 { margin:0; }
.class-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(290px,1fr)); gap:14px; }
.class-card { border:1px solid var(--line); border-radius:14px; padding:14px; display:grid; gap:12px; background:linear-gradient(180deg, #fff, #f7fbff); transition:box-shadow .15s, border-color .15s; }
.class-card:hover { box-shadow:0 8px 20px rgba(12,45,72,.08); border-color:#c6dbea; }
.class-card.no-head { border-color:#f0c9a0; background:linear-gradient(180deg, #fff, #fff9f1); }
.cc-top { display:flex; gap:12px; align-items:center; } .cc-top > div { flex:1; min-width:0; line-height:1.35; }
.cc-badge { width:44px; height:44px; border-radius:12px; display:grid; place-items:center; font-weight:800; font-size:18px; color:#fff; background:linear-gradient(135deg, #38bdf8, #0369a1); flex:none; }
.cc-del button { min-height:34px; padding:0 9px; }
.cc-teacher label { font-size:13px; } .cc-teacher select { min-height:40px; } .cc-teacher button { min-height:40px; }
.cc-links { display:flex; gap:6px; flex-wrap:wrap; border-top:1px dashed var(--line); padding-top:10px; }
.cc-links a { font-size:13px; font-weight:600; color:#0369a1; text-decoration:none; padding:4px 10px; border-radius:99px; background:#e8f5fd; }
.cc-links a:hover { background:#d4e6f3; }
.t-av { width:38px; height:38px; border-radius:50%; display:grid; place-items:center; font-weight:700; font-size:13px; color:#6b46b8; background:#efe8fb; flex:none; }
table.teachers tr.off { opacity:.6; }
.tag.warn { background:#fbf1dc; color:#8a5a00; } .tag.ok-tag { background:#e3f3ea; color:#1f7a4d; }
@media (max-width:600px) { .hero { padding:20px; } .hero-logo { width:56px; height:56px; font-size:20px; } .fc-row { flex-direction:column; } .fc-row label { max-width:none !important; } }
/* dashboard refinements */
.kpis { grid-template-columns:repeat(auto-fill,minmax(min(100%,290px),1fr)); }
.kpi { grid-template-columns:auto 1fr; grid-template-rows:auto auto; column-gap:14px; align-items:center; padding:16px 18px; }
.kpi .kpi-ico { grid-row:1 / 3; width:48px; height:48px; border-radius:14px; }
.kpi b { margin-top:0; font-size:26px; }
.dash-forms { align-items:start; }
.chips { display:flex; flex-wrap:wrap; gap:6px; } .chips span { font-size:13px; padding:3px 10px; border-radius:99px; background:#e3eefa; color:#2563a8; font-weight:600; }
.cc-links a { padding:4px 9px; }

/* ---------- Tables (every table inside a panel) ---------- */
.panel table:not(.tt) { border-collapse:separate; border-spacing:0; border:1px solid #d4e6f3; border-radius:14px; overflow:hidden; background:#fff; }
.panel table:not(.tt) thead th { background:linear-gradient(180deg, #f0f8fe, #e0f0fb); color:#3b5873; font-size:12px; font-weight:700; text-transform:uppercase; letter-spacing:.6px;
  padding:12px; border-bottom:1px solid #d3dfd7; border-top:3px solid #0369a1; white-space:nowrap; }
.panel table:not(.tt) td { padding:11px 12px; border-bottom:1px solid #e8f5fd; transition:background .12s; }
.panel table:not(.tt) tbody tr:nth-child(even) td { background:#f7fbff; }
.panel table:not(.tt) tbody tr:hover td { background:#e8f5fd; }
.panel table:not(.tt) tbody tr:last-child td { border-bottom:0; }
.panel table:not(.tt) tfoot td { background:#f0f8fe; font-weight:700; border-top:2px solid #d3dfd7; border-bottom:0; }
.panel table:not(.tt) td b { color:#0c2d48; }
.panel table:not(.tt) a:not(.btn) { color:#0369a1; font-weight:600; }
.panel table.register td, .panel table.register th { padding:6px 4px; }
.panel table tr.off td { opacity:.6; }
@media (max-width:600px) {
  .panel table:not(.tt) { border:0; background:none; border-radius:0; overflow:visible; }
  .panel table:not(.tt) tr { border:1px solid #d4e6f3; border-radius:12px; padding:10px 12px; margin-bottom:10px; background:#fff; box-shadow:0 1px 3px rgba(12,45,72,.05); }
  .panel table:not(.tt) tbody tr:nth-child(even) td, .panel table:not(.tt) tbody tr:hover td { background:none; }
  .panel table:not(.tt) td { border:0; padding:3px 0; }
}

/* ---------- Staff ---------- */
.att-pick { display:flex; gap:6px; flex-wrap:wrap; }
.att-pick .ap { display:inline-flex; cursor:pointer; color:var(--ink); }
.att-pick .ap input { position:absolute; opacity:0; pointer-events:none; }
.att-pick .ap span { padding:6px 12px; border-radius:99px; border:1px solid #c6dbea; font-size:13px; font-weight:600; background:#fff; transition:all .12s; }
.att-pick .ap:hover span { border-color:#7fb4d6; }
.att-pick .ap input:focus-visible + span { outline:3px solid rgba(224,166,59,.7); outline-offset:1px; }
.att-pick .ap-present input:checked + span { background:#1f7a4d; border-color:#1f7a4d; color:#fff; }
.att-pick .ap-absent  input:checked + span { background:#c4302b; border-color:#c4302b; color:#fff; }
.att-pick .ap-late    input:checked + span { background:#b7791f; border-color:#b7791f; color:#fff; }
.att-pick .ap-leave   input:checked + span { background:#2563a8; border-color:#2563a8; color:#fff; }
.slips-t input { width:78px; min-width:0; min-height:34px; padding:4px 6px; text-align:right; font-size:14px; }
.slips-t td:nth-child(6) input { text-align:left; width:108px; }
.slips-t td, .slips-t th { padding-left:8px !important; padding-right:8px !important; }
.slips-t td:first-child { min-width:130px; }
div.kpi { cursor:default; }

/* ---------- Class-wise navigation ---------- */
.pick-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(min(100%,300px),1fr)); gap:12px; }
.pick { display:flex; gap:12px; align-items:center; padding:14px; border:1px solid var(--line); border-radius:14px; text-decoration:none; color:var(--ink);
  background:linear-gradient(180deg, #fff, #f7fbff); transition:transform .15s, box-shadow .15s, border-color .15s; }
.pick:hover { transform:translateY(-2px); box-shadow:0 10px 22px rgba(12,45,72,.1); border-color:#9cc3dd; }
.pick-body { flex:1; min-width:0; display:grid; gap:2px; } .pick-body b { font-size:17px; }
.pick-extra { margin-top:4px; display:flex; gap:4px; flex-wrap:wrap; }
.pick-go { font-size:28px; color:#9cc3dd; line-height:1; } .pick:hover .pick-go { color:#0369a1; }
.class-bar { border-radius:16px; overflow:hidden; background:linear-gradient(135deg, #0284c7, #0369a1 60%, #075985); color:#fff; box-shadow:0 8px 24px rgba(3,105,161,.22); }
.cb-top { display:flex; gap:12px; align-items:center; padding:16px 18px; }
.cb-top > div { flex:1; min-width:0; display:grid; } .cb-top b { font-size:22px; line-height:1.2; } .cb-top .mute { color:rgba(255,255,255,.8); }
.cb-top .cc-badge { background:#fff; color:#0369a1; }
.cb-back { color:#fff; text-decoration:none; font-size:30px; line-height:1; padding:0 6px; opacity:.8; } .cb-back:hover { opacity:1; }
.cb-switch { color:#fff; text-decoration:none; font-size:14px; font-weight:600; padding:8px 14px; border-radius:10px; border:1px solid rgba(255,255,255,.3); background:rgba(255,255,255,.1); white-space:nowrap; }
.cb-switch:hover { background:rgba(255,255,255,.2); }
.cb-menu { display:flex; gap:4px; padding:0 12px 10px; overflow-x:auto; scrollbar-width:none; }
.cb-menu a { color:#fff; text-decoration:none; padding:8px 14px; border-radius:10px; font-size:14px; font-weight:600; opacity:.85; white-space:nowrap; }
.cb-menu a:hover { background:rgba(255,255,255,.12); opacity:1; }
.cb-menu a[aria-current] { background:#fff; color:#0369a1; opacity:1; box-shadow:0 2px 6px rgba(0,0,0,.15); }
.mini-row { display:flex; justify-content:space-between; gap:10px; padding:8px 0; border-bottom:1px solid var(--line); font-size:15px; } .mini-row:last-child { border-bottom:0; }
.mini-row a { color:var(--ink); text-decoration:none; }
.chips.subj > span { display:inline-flex; align-items:center; gap:4px; padding:4px 6px 4px 12px; }
.chips.subj form { display:inline; }
.chip-x { min-height:0; height:22px; width:22px; padding:0; border-radius:50% !important; background:rgba(37,99,168,.15) !important; color:#2563a8 !important; border:0 !important; box-shadow:none !important; font-size:15px; line-height:1; }
.chip-x:hover { background:#c4302b !important; color:#fff !important; transform:none; }
.cc-name { color:inherit; text-decoration:none; } .cc-name:hover b { text-decoration:underline; }
.cc-links a.cc-open { background:#0369a1; color:#fff; } .cc-links a.cc-open:hover { background:#0284c7; }
@media (max-width:600px) { .cb-switch { display:none; } .cb-top b { font-size:18px; } }

/* ---------- Accounts ---------- */
.bars { display:flex; align-items:flex-end; gap:10px; height:200px; padding:10px 4px 0; border-bottom:1px solid var(--line); }
.bar-col { flex:1; height:100%; display:flex; flex-direction:column; align-items:center; gap:6px; text-decoration:none; color:var(--mute); }
.bar-pair { flex:1; width:100%; display:flex; align-items:flex-end; justify-content:center; gap:4px; }
.bar { width:42%; max-width:26px; border-radius:6px 6px 0 0; min-height:2px; transition:filter .15s; }
.bar.in { background:linear-gradient(180deg, #34a06a, #1f7a4d); } .bar.out { background:linear-gradient(180deg, #e7706a, #c4302b); }
.bar-col:hover .bar { filter:brightness(1.1); }
.bar-l { font-size:12px; font-weight:600; padding-bottom:4px; } .bar-col.on .bar-l { color:#0369a1; text-decoration:underline; }
.legend { display:flex; gap:16px; margin-top:10px; font-size:13px; color:var(--mute); } .legend i { display:inline-block; width:10px; height:10px; border-radius:3px; margin-right:6px; }
.legend i.in { background:#1f7a4d; } .legend i.out { background:#c4302b; }
.seg { display:flex; background:#e8f5fd; border-radius:12px; padding:4px; gap:4px; }
.seg label { flex:1; display:block; color:var(--ink); cursor:pointer; }
.seg input { position:absolute; opacity:0; pointer-events:none; }
.seg span { display:block; text-align:center; padding:9px; border-radius:9px; font-weight:700; font-size:15px; }
.seg label:first-child input:checked + span { background:#c4302b; color:#fff; box-shadow:0 2px 6px rgba(196,48,43,.3); }
.seg label:last-child input:checked + span { background:#1f7a4d; color:#fff; box-shadow:0 2px 6px rgba(31,122,77,.3); }
.seg input:focus-visible + span { outline:3px solid rgba(224,166,59,.7); }
.cat-row { margin-bottom:8px; }
.cat-bar { height:8px; border-radius:99px; background:#e8f5fd; overflow:hidden; }
.cat-bar span { display:block; height:100%; border-radius:99px; } .cat-bar.income span { background:#1f7a4d; } .cat-bar.expense span { background:#c4302b; }
.seg label, .att-pick .ap { position:relative; } .seg input, .att-pick .ap input { left:0; top:0; width:1px; height:1px; }
/* "More" in the main menu */
details.nav-more { position:relative; }
details.nav-more summary { list-style:none; cursor:pointer; color:#fff; padding:8px 12px; border-radius:8px; opacity:.85; display:flex; align-items:center; gap:6px; }
details.nav-more summary::-webkit-details-marker { display:none; }
details.nav-more summary:hover, details.nav-more[open] summary { background:rgba(255,255,255,.1); opacity:1; }
details.nav-more summary[aria-current] { background:rgba(255,255,255,.18); opacity:1; font-weight:600; }
.nav-more-menu { position:absolute; top:calc(100% + 6px); left:0; min-width:190px; background:#fff; border-radius:12px; padding:6px; box-shadow:0 12px 30px rgba(0,0,0,.18); z-index:30; display:grid; }
header .nav-more-menu a { color:var(--ink); opacity:1; padding:10px 12px; border-radius:8px; }
header .nav-more-menu a:hover { background:var(--bg); }
header .nav-more-menu a[aria-current] { background:#e8f5fd; color:#0369a1; }
.kpis.k4 { grid-template-columns:repeat(auto-fill,minmax(min(100%,220px),1fr)); }
.bars { height:260px; }
@media (max-width:760px) { .nav-more-menu { position:fixed; top:auto; left:auto; right:16px; } }

/* Step 16: tip panel */
.note-panel { background:#fff8e6; border-color:#f0d9a0; color:#5a4410; font-size:15px; }
[hidden] { display:none !important; }

/* Step 17: admissions */
.apply-wrap { max-width:620px; width:100%; margin:0 auto; display:grid; gap:18px; }
.apply-head { text-align:center; }
.apply-head img { height:72px; width:auto; display:block; margin:0 auto 8px; }
.apply-head h1 { margin:0; font-size:26px; }
.apply-badge { display:inline-block; margin:10px 0 4px; padding:6px 18px; border-radius:30px; background:#e0a63b; color:#0c2d48; font-weight:800; letter-spacing:.5px; text-transform:uppercase; font-size:14px; }
.apply-ok { width:64px; height:64px; margin:4px auto 10px; border-radius:50%; background:#1f7a4d; color:#fff; font-size:34px; display:grid; place-items:center; }
.apply-wrap .form-card h2 { margin:6px 0 0; font-size:17px; color:#0369a1; }
.hp { position:absolute; left:-9999px; width:1px; height:1px; overflow:hidden; }
.link-box { display:flex; gap:8px; margin:14px 0 10px; }
.link-box input { flex:1; min-width:0; font-family:monospace; font-size:14px; background:#f0f8fe; }
.wa-dot { color:#25d366; text-decoration:none; font-size:14px; }
.tag.st-new { background:#e3edfb; color:#2563a8; }
.tag.st-contacted { background:#fff1d6; color:#8a5a00; }
.tag.st-visit { background:#efe6fb; color:#6b3fb3; }
.tag.st-admitted { background:#dff3e8; color:#1f7a4d; }
.tag.st-rejected { background:#f1f1f1; color:#6b6b6b; }
.hero-actions .badge-n { margin-left:6px; background:#e0a63b; color:#0c2d48; border-radius:20px; padding:1px 8px; font-size:12px; font-weight:800; }
.btn[aria-current] .tag { background:rgba(255,255,255,.25); color:#fff; }
a.wa-dot { color:#25d366 !important; }

/* Step 18: school van */
.seat-bar { display:block; height:6px; margin-top:8px; border-radius:6px; background:#e0f0fb; overflow:hidden; }
.seat-bar span { display:block; height:100%; background:#1f7a4d; border-radius:6px; }
.van-bar .cc-badge { font-size:20px; }
.stops-t input { min-height:38px; padding:6px 8px; }
.stops-t td:first-child input { width:56px; }
.stop-pick select { min-height:38px; padding:6px 8px; max-width:200px; }
.van-stack { display:grid; grid-template-columns:3fr 2fr; gap:20px; align-items:start; }
@media (max-width:1000px) { .van-stack { grid-template-columns:1fr; } }
.stops-t td:nth-child(2) input { min-width:150px; width:100%; }
.stops-t input[type=time] { min-width:118px; }
.van-form .fc-row > label { flex:1 1 0; min-width:0; }
.van-form .fc-row > label input { width:100%; }

/* ===== Step 19: sky blue theme, SMR brand, facility switches ===== */
@font-face { font-family:'SMR Brand'; src:url('fonts/righteous.woff2') format('woff2'); font-display:swap; }
:root { --bg:#eef7fd; --ink:#0c2d48; --mute:#52708a; --line:#d4e6f3; --band:#0369a1; --sky:#0ea5e9; --sky-l:#e0f2fe; }
body { background:#f3faff linear-gradient(180deg, #dff1fc 0, #f3faff 420px) no-repeat; }
header { background:linear-gradient(90deg, #0369a1 0%, #0284c7 45%, #0ea5e9 100%); box-shadow:0 4px 18px rgba(3,105,161,.25); }
header nav a[aria-current], details.nav-more summary[aria-current] { background:rgba(255,255,255,.24); }
.brand { display:flex; flex-direction:column; line-height:1; color:#fff; text-decoration:none; margin-right:6px; }
.brand-logo { font-family:'SMR Brand', 'Trebuchet MS', system-ui, sans-serif; font-size:30px; letter-spacing:3px; color:#fff !important; -webkit-text-fill-color:#fff;
  text-shadow:0 2px 0 rgba(12,45,72,.25), 0 0 18px rgba(255,255,255,.35); }
.brand-sub { font-size:10.5px; font-weight:600; letter-spacing:.6px; text-transform:uppercase; opacity:.92; margin-top:3px; white-space:nowrap; }
@media (max-width:600px) { .brand-logo { font-size:26px; } .brand-sub { font-size:9px; } }
.panel { border-color:#d4e6f3; box-shadow:0 2px 10px rgba(14,165,233,.06); }
th { border-bottom-color:var(--sky); }
.tag { background:var(--sky-l); color:#075985; }
a.btn:hover { border-color:#7dd3fc; }
.fac-grid { display:grid; grid-template-columns:repeat(auto-fit, minmax(min(100%,260px), 1fr)); gap:12px; }
.fac { display:flex; align-items:center; gap:12px; justify-content:space-between; padding:14px 16px; border:1px solid var(--line); border-radius:14px; background:#f7fbff; }
.fac.on { background:linear-gradient(135deg, #e0f2fe, #f0f9ff); border-color:#7dd3fc; }
.fac-txt { display:grid; gap:2px; min-width:0; } .fac-txt b a { color:#0369a1; text-decoration:none; }
button.switch { flex:none; position:relative; width:78px; min-height:34px; height:34px; padding:0; border-radius:99px !important; background:#cbd5e1 !important; border:0 !important; box-shadow:inset 0 1px 3px rgba(0,0,0,.15) !important; transform:none !important; }
button.switch .knob { position:absolute; top:4px; left:4px; width:26px; height:26px; border-radius:50%; background:#fff; box-shadow:0 1px 4px rgba(0,0,0,.25); transition:left .2s; }
button.switch .sw-l { position:absolute; right:10px; top:50%; transform:translateY(-50%); font-size:12px; font-weight:800; color:#475569; }
button.switch[aria-checked=true] { background:linear-gradient(90deg, #0284c7, #0ea5e9) !important; }
button.switch[aria-checked=true] .knob { left:48px; }
button.switch[aria-checked=true] .sw-l { right:auto; left:12px; color:#fff; }

/* Step 19: library */
details.ret { position:relative; }
details.ret summary { list-style:none; cursor:pointer; } details.ret summary::-webkit-details-marker { display:none; }
details.ret[open] > div, details.ret[open] > form { margin-top:8px; }
.ret-form { display:grid; gap:8px; padding:12px; border:1px solid var(--line); border-radius:12px; background:#f7fbff; min-width:210px; }
.issue-form { max-width:720px; }
details.ret summary { display:inline-flex; align-items:center; min-height:36px; padding:0 14px; border:1px solid #7dd3fc; border-radius:8px; background:#e0f2fe; color:#0369a1; font-weight:700; font-size:14px; }
details.ret[open] summary { background:#0369a1; color:#fff; border-color:#0369a1; }

/* Step 20: date sheet */
.ds-t input { min-height:38px; padding:6px 8px; }
.ds-t input[type=date] { min-width:150px; } .ds-t input[type=time] { min-width:118px; } .ds-t td:last-child input { min-width:100px; }
details.ds-auto summary { list-style:none; cursor:pointer; display:inline-flex; } details.ds-auto summary::-webkit-details-marker { display:none; }
details.ds-auto { margin-bottom:12px; }
details.ds-auto summary { align-items:center; min-height:38px; padding:0 14px; border:1px solid #7dd3fc; border-radius:8px; background:#e0f2fe; color:#0369a1; font-weight:700; font-size:14px; }

/* Step 21: fee rules */
.fam-grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap:12px; }
.fam { border:1px solid var(--line); border-radius:12px; padding:12px 14px; background:#f7fbff; display:grid; gap:2px; }
@media print { .banner { display:none !important; } }

/* ---- Step 22: notice board & calendar ---- */
.nb-wrap { display:grid; grid-template-columns:3fr 2fr; gap:22px; align-items:start; }
.notices { display:grid; gap:12px; }
.notice { border:1px solid var(--line); border-left:4px solid var(--sky); border-radius:12px; padding:12px 14px; background:#fff; display:grid; gap:6px; }
.notice.pinned { border-left-color:#f59e0b; background:linear-gradient(135deg,#fffbeb,#fff); }
.notice.off { opacity:.55; }
.n-head { display:flex; justify-content:space-between; gap:10px; align-items:baseline; flex-wrap:wrap; }
.n-head b { font-size:16px; color:var(--ink); }
.n-head .mute { font-size:13px; white-space:nowrap; }
.n-body { font-size:15px; line-height:1.55; color:#244; overflow-wrap:anywhere; }
.n-foot { display:flex; justify-content:space-between; gap:8px; align-items:center; flex-wrap:wrap; font-size:13px; }
.n-acts { display:flex; gap:6px; flex-wrap:wrap; align-items:center; }
.n-acts form { margin:0; }
.n-acts .btn, .n-acts button { min-height:34px; font-size:13px; padding:0 10px; }
.banner-hol { background:#fef2f2; border:1px solid #fecaca; color:#991b1b; padding:10px 14px; border-radius:10px; margin:0 0 10px; }
.cal-top { display:flex; justify-content:space-between; align-items:center; gap:10px; flex-wrap:wrap; }
.cal { display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); gap:4px; margin-top:10px; }
.cal-h { font-size:12px; font-weight:700; color:var(--mute); text-align:center; padding:4px 0; text-transform:uppercase; }
.cal-h.sun { color:#b91c1c; }
.cal-d { min-height:78px; border:1px solid var(--line); border-radius:8px; padding:4px; background:#fff; display:flex; flex-direction:column; gap:2px; overflow:hidden; }
.cal-d.empty { background:transparent; border-color:transparent; }
.cal-d.sun { background:#fbfdff; } .cal-d.sun .cal-n { color:#b91c1c; }
.cal-d.hol { background:#fef2f2; border-color:#fecaca; }
.cal-d.today { outline:2px solid var(--sky); outline-offset:-1px; }
.cal-n { font-size:13px; font-weight:700; color:var(--ink); }
.cal-ev { font-size:11px; line-height:1.3; padding:1px 5px; border-radius:4px; color:#fff; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.ev-holiday { background:#dc2626; } .ev-event { background:#0284c7; } .ev-exam { background:#7c3aed; } .ev-meeting { background:#d97706; } .ev-other { background:#64748b; }
.ev-dot { display:inline-block; width:10px; height:10px; border-radius:50%; margin-right:6px; vertical-align:middle; flex:none; }
.cal-legend { display:flex; flex-wrap:wrap; gap:6px 14px; margin-top:10px; font-size:13px; color:var(--mute); }
.cal-legend span { display:inline-flex; align-items:center; }
.ev-row { display:flex; justify-content:space-between; gap:10px; align-items:center; padding:8px 0; border-bottom:1px solid var(--line); }
.ev-row:last-child { border-bottom:0; }
.ev-row form { margin:0; display:inline; }
.nb-dash .notice .n-body { max-height:4.7em; overflow:hidden; }
@media (max-width:820px) { .nb-wrap { grid-template-columns:1fr; } }
@media (max-width:600px) {
  .cal { gap:2px; }
  .cal-h { font-size:10px; }
  .cal-d { min-height:46px; padding:2px; border-radius:6px; }
  .cal-n { font-size:12px; }
  .cal-ev { font-size:0; height:6px; padding:0; border-radius:3px; }
}
@media print { .n-acts, .cal-top .inline { display:none; } }
.notice > .tag { justify-self:start; }

/* ---- Step 23: leave applications ---- */
.leave-list { display:grid; gap:14px; }
.leave-card.pend { border-left:4px solid #f59e0b; }
.leave-meta { display:grid; grid-template-columns:repeat(auto-fit,minmax(130px,1fr)); gap:10px; margin:12px 0; }
.leave-meta div { display:grid; gap:2px; background:#f4f9fd; border-radius:10px; padding:8px 12px; }
.leave-meta span { font-size:12px; }
.leave-note { background:#fffbeb; border-radius:10px; padding:10px 14px; margin:0 0 12px; font-style:italic; overflow-wrap:anywhere; }
.leave-act { display:grid; gap:10px; }
.leave-act button.ghost { min-height:44px; }
.leave-row { display:grid; gap:4px; padding:10px 0; border-bottom:1px solid var(--line); }
.leave-row:last-child { border-bottom:0; }
.leave-row form { margin:0; }
.leave-reply { background:#e0f2fe; border-radius:8px; padding:6px 10px; font-size:14px; }
.leave-alert { border-left:4px solid #f59e0b; background:linear-gradient(135deg,#fffbeb,#fff); }

/* ---- QR attendance help (teacher) ---- */
.qr-steps { margin:10px 0 14px; padding-left:22px; display:grid; gap:8px; line-height:1.5; }
.qr-steps li::marker { font-weight:700; color:var(--band); }
details.qr-manual > summary, details.qr-help > summary { cursor:pointer; padding:2px 0; }
details.qr-manual[open] > summary, details.qr-help[open] > summary { margin-bottom:12px; }

/* ---- Step 24: reports ---- */
.rep-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(min(100%,300px),1fr)); gap:14px; }
.rep-card { display:grid; grid-template-columns:auto 1fr; gap:4px 14px; align-items:start; padding:16px; background:var(--paper); border:1px solid var(--line); border-radius:14px; text-decoration:none; color:var(--ink); transition:box-shadow .15s, transform .15s; }
.rep-card:hover { box-shadow:0 6px 18px rgba(3,105,161,.12); transform:translateY(-1px); border-color:#7dd3fc; }
.rep-card .rep-ico { grid-row:span 2; font-size:26px; width:48px; height:48px; display:grid; place-items:center; background:var(--sky-l); border-radius:12px; }
.rep-card b { display:block; font-size:16px; margin-bottom:2px; }
.rep-card .mute { font-size:13px; line-height:1.4; }
.rep-card .tag { justify-self:start; font-size:12px; }
.rep-head { align-items:flex-start; gap:12px; flex-wrap:wrap; margin-bottom:10px; }
.rep-table td.n, .rep-table th.n { text-align:right; white-space:nowrap; }
.rep-table tfoot td { font-weight:700; background:#f1f7fc; border-top:2px solid var(--line); }
.rep-table td { font-size:14px; }

/* ---- Class-wise groups inside long tables ---- */
tr.grp th { background:linear-gradient(90deg,#0369a1,#0ea5e9); color:#fff; font-size:14px; text-transform:none; letter-spacing:0; padding:9px 10px; border-bottom:0; text-align:left; }
tr.grp th span { font-weight:400; opacity:.85; }
tbody.grp-body + tbody.grp-body tr.grp th { border-top:14px solid var(--paper); }
tr.grp-sub td { font-weight:700; background:#f1f7fc; border-bottom:2px solid var(--line); }
.class-group { margin-top:18px; } .class-group:first-child { margin-top:0; }
.class-group > h3 { display:flex; justify-content:space-between; gap:8px; align-items:center; background:var(--sky-l); color:var(--band); padding:8px 12px; border-radius:10px; margin:0 0 10px; font-size:15px; }

/* ---- Step 25: office logins ---- */
.office-roles { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,260px),1fr)); gap:10px; margin:12px 0; }
.office-roles div { display:grid; gap:2px; background:#f4f9fd; border-radius:10px; padding:10px 14px; }
.office-form { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,190px),1fr)); gap:10px; align-items:end; }

/* ---- Step 26: my attendance ---- */
.my-att .cal-d { min-height:64px; }
.att-chip { font-size:11px; font-weight:700; padding:2px 6px; border-radius:6px; justify-self:start; align-self:flex-start; }
.att-chip.st-present { background:#dcfce7; color:#166534; } .att-chip.st-late { background:#fef3c7; color:#92400e; }
.att-chip.st-absent { background:#fee2e2; color:#991b1b; } .att-chip.st-leave { background:#e0f2fe; color:#075985; }
@media (max-width:600px) { .my-att .cal-d { min-height:48px; } .att-chip { font-size:9px; padding:1px 3px; } }

/* ---------- Principal: equal New class / New teacher forms ---------- */
.dash-forms { align-items:stretch; }
.dash-forms .form-card { display:flex; flex-direction:column; gap:12px; height:100%; box-sizing:border-box; }
.dash-forms .form-card > button { margin-top:auto; align-self:stretch; min-width:0; min-height:44px; }
.dash-forms .fc-head { min-height:58px; padding-bottom:12px; border-bottom:1px dashed var(--line); }
.fc-extra { flex:1; display:flex; flex-direction:column; gap:6px; background:#f7fbff; border:1px solid #e3eef6; border-radius:12px; padding:10px 12px; min-height:70px; }
.fc-extra > p { margin:0; font-size:13px; }
.fc-extra .chips { max-height:96px; overflow:auto; }

/* ---------- Principal: teacher cards ---------- */
#teachers .sec-head { flex-wrap:wrap; }
.t-search { max-width:260px; min-height:40px; }
.t-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(min(100%,300px),1fr)); gap:14px; }
.t-card { position:relative; display:flex; flex-direction:column; gap:12px; padding:16px; border:1px solid var(--line); border-radius:16px;
  background:linear-gradient(180deg,#fff,#f8fbfe); box-shadow:0 2px 8px rgba(12,45,72,.04); transition:box-shadow .15s, transform .15s, border-color .15s; overflow:hidden; }
.t-card::before { content:""; position:absolute; inset:0 0 auto 0; height:4px; background:linear-gradient(90deg,#38bdf8,#0369a1); }
.t-card:hover { box-shadow:0 10px 24px rgba(12,45,72,.1); transform:translateY(-2px); border-color:#c6dbea; }
.t-card.off { opacity:.62; background:#f6f7f8; } .t-card.off::before { background:#cbd5e1; }
.t-top { display:flex; gap:12px; align-items:flex-start; }
.t-avatar { --c:#0369a1; flex:none; width:48px; height:48px; border-radius:50%; display:grid; place-items:center; color:#fff; font-weight:800; font-size:16px; letter-spacing:.5px;
  background:linear-gradient(135deg, color-mix(in srgb, var(--c) 55%, #fff), var(--c)); box-shadow:0 4px 10px color-mix(in srgb, var(--c) 30%, transparent); }
.t-id { flex:1; min-width:0; display:grid; gap:2px; line-height:1.3; }
.t-id b { font-size:15.5px; } .t-id span, .t-id a { font-size:13px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; text-decoration:none; }
.t-top .tag { flex:none; font-size:11.5px; }
.t-class { font-size:14px; padding:9px 12px; border-radius:10px; background:#f3f5f7; border:1px dashed #d8dee4; }
.t-class.has { background:#e8f5fd; border:1px solid #c9e4f5; color:#0c4a6e; }
.t-assign { display:flex; gap:8px; } .t-assign select { flex:1; min-width:0; min-height:40px; } .t-assign button { min-height:40px; }
.t-acts { display:flex; flex-wrap:wrap; gap:6px; margin-top:auto; padding-top:10px; border-top:1px dashed var(--line); }
.t-acts form { margin:0; } .t-acts button { min-height:34px; padding:0 12px; font-size:13px; border-radius:99px; }
@media (max-width:600px) { .t-search { max-width:none; width:100%; } .t-top { flex-wrap:wrap; } .t-top .tag { order:3; } }

/* ---------- Step 28: light blue background ---------- */
:root { --bg:#dcedf9; }
html { background:#dcedf9; }
body { background:#dcedf9 linear-gradient(180deg, #c6e2f6 0, #dcedf9 380px) no-repeat; min-height:100vh; }
.panel, .kpi, .t-card, .class-card { box-shadow:0 2px 12px rgba(3,105,161,.07); }
.panel table:not(.tt) tbody tr:nth-child(even) td { background:#f5fafe; }

/* ---------- Step 28: plans and subscription payments ---------- */
.tabs-row { display:flex; gap:8px; flex-wrap:wrap; margin:4px 0 14px; }
.tabs-row .btn { background:#fff; color:var(--ink); border:1px solid var(--line); }
.tabs-row .btn[aria-current="page"] { background:linear-gradient(135deg,#38bdf8,#0369a1); color:#fff; border-color:transparent; }
.plan-tag { display:inline-block; font-size:12.5px; font-weight:800; letter-spacing:.3px; padding:3px 11px; border-radius:99px; color:#fff; background:#64748b; }
.plan-tag.p-basic { background:linear-gradient(135deg,#60a5fa,#2563eb); }
.plan-tag.p-standard { background:linear-gradient(135deg,#a78bfa,#6d28d9); }
.plan-tag.p-premium { background:linear-gradient(135deg,#fbbf24,#b45309); }
.plan-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,320px),1fr)); gap:16px; align-items:stretch; margin-bottom:16px; }
.plan-card { display:flex; flex-direction:column; gap:12px; margin:0; border-top:5px solid #2563eb; }
.plan-card.p-standard { border-top-color:#6d28d9; } .plan-card.p-premium { border-top-color:#b45309; }
.plan-card > button { margin-top:auto; min-height:44px; }
.plan-head { display:grid; gap:4px; justify-items:start; padding-bottom:10px; border-bottom:1px dashed var(--line); }
.plan-price { font-size:15px; color:var(--mute); } .plan-price b { font-size:30px; color:var(--ink); } .plan-price span { margin-left:4px; }
.plan-svcs { border:1px solid var(--line); border-radius:12px; padding:8px 10px; margin:0; display:grid; gap:2px; max-height:380px; overflow:auto; background:#f8fbfe; }
.plan-svcs legend { font-size:13px; font-weight:700; padding:0 6px; color:var(--mute); }
.svc-row { display:flex; gap:10px; align-items:flex-start; padding:6px 4px; border-radius:8px; cursor:pointer; font-size:14px; }
.svc-row:hover { background:#eaf4fc; } .svc-row input { margin-top:4px; width:18px; height:18px; flex:none; }
.svc-row span { display:grid; line-height:1.3; } .svc-row small { font-size:12.5px; }
.plan-compare th span { font-weight:600; text-transform:none; letter-spacing:0; }
.plan-compare td:not(:first-child), .plan-compare th:not(:first-child) { text-align:center; }
.plan-compare .yes { color:#1f7a4d; font-weight:800; font-size:17px; } .plan-compare .no { color:#a0aec0; }
.sa-edit { margin-top:6px; } .sa-edit summary { cursor:pointer; font-size:13px; font-weight:600; color:#0369a1; }
.sa-edit form { display:grid; gap:8px; margin-top:8px; padding:10px; border:1px solid var(--line); border-radius:10px; background:#f8fbfe; min-width:220px; }
.sa-edit label { font-size:13px; }
.pay-form summary.btn { display:inline-flex; align-items:center; color:#fff; font-size:14px; font-weight:700; list-style:none; padding:8px 16px; border-radius:10px; background:linear-gradient(135deg,#38bdf8,#0369a1); cursor:pointer; }
.pay-kpis { grid-template-columns:repeat(auto-fit,minmax(min(100%,220px),1fr)); } .pay-form summary::-webkit-details-marker { display:none; }
.due-n { display:inline-block; margin-top:4px; font-size:12.5px; font-weight:700; color:#9a3412; background:#ffedd5; padding:2px 9px; border-radius:99px; }
.pay-table tr.dim td { opacity:.45; } .pay-table tr.hl td { background:#fff8e6 !important; }
.pay-kpis .kpi-ico { font-size:22px; }
[data-pf][aria-pressed] { background:#0369a1; color:#fff; }
.tag.lock { background:#fff3d6; color:#8a5a00; white-space:nowrap; }
.fac.locked { opacity:.85; background:#f6f8fa; border-style:dashed; }
.choice.locked { opacity:.7; cursor:not-allowed; }
.hero-plan { display:block; width:fit-content; margin-top:8px; font-size:13px; font-weight:700; color:#fff; text-decoration:none; padding:3px 12px; border-radius:99px; background:rgba(255,255,255,.18); border:1px solid rgba(255,255,255,.35); }
.hero-plan:hover { background:rgba(255,255,255,.28); }
.plan-svc { display:flex; flex-wrap:wrap; gap:6px; }
.plan-svc span { font-size:13px; padding:4px 10px; border-radius:99px; font-weight:600; }
.plan-svc .in { background:#e3f3ea; color:#1f7a4d; } .plan-svc .out { background:#f1f3f5; color:#8795a1; }
@media (max-width:700px) { .sa-schools thead { display:none; } .sa-schools td { display:block; border:0 !important; padding:6px 12px !important; } .sa-schools tr { display:block; border-bottom:1px solid var(--line); padding:6px 0; } }
/* Step 29: delete school, demo panel */
.sa-del summary { color:#c4302b; } .sa-del form { border-color:#f3c2bf; background:#fff6f5; }
.sa-del .danger { background:#c4302b; color:#fff; border-color:#c4302b; }
.demo-ok { font-size:12px; }
.demo-panel { border-left:5px solid #0ea5e9; } .demo-panel.has { border-left-color:#e0a63b; background:linear-gradient(180deg,#fff,#fffaf0); }
.sa-schools td:first-child { min-width:170px; } .sa-schools td:last-child { width:310px; }
.sa-schools .inline { flex-wrap:wrap; gap:6px; } .sa-schools .inline form { margin:0; }
.sa-schools .inline button, .sa-schools .inline .btn { min-height:32px; padding:0 11px; font-size:13px; border-radius:99px; }
.sa-schools .tag, .sa-schools .due-n, .sa-schools .plan-tag { white-space:nowrap; } .sa-schools td:last-child { width:270px; }

/* ---------- Step 30: popup notifications (toasts) ---------- */
.toast-wrap { position:fixed; top:84px; right:20px; z-index:1000; width:min(420px, calc(100vw - 32px)); pointer-events:none; }
.toast { pointer-events:auto; position:relative; overflow:hidden; display:flex; gap:12px; align-items:flex-start; padding:14px 44px 16px 14px; border-radius:14px;
  background:#fff; border:1px solid #d4e6f3; box-shadow:0 18px 40px rgba(12,45,72,.18), 0 2px 6px rgba(12,45,72,.08); animation:toastIn .35s cubic-bezier(.2,.9,.3,1.2); }
.toast.is-ok { border-left:5px solid #16a34a; } .toast.is-err { border-left:5px solid #c4302b; }
.toast-ico { flex:none; width:34px; height:34px; border-radius:50%; display:grid; place-items:center; }
.toast-ico svg { width:20px; height:20px; fill:none; stroke:#fff; stroke-width:2.6; stroke-linecap:round; stroke-linejoin:round; }
.is-ok .toast-ico { background:linear-gradient(135deg,#4ade80,#16a34a); } .is-err .toast-ico { background:linear-gradient(135deg,#f87171,#c4302b); }
.toast-body { min-width:0; } .toast-body b { display:block; font-size:15px; color:var(--ink); margin-bottom:2px; }
.toast-body p { margin:0; font-size:14px; line-height:1.45; color:#3b5873; overflow-wrap:anywhere; }
.toast-x { position:absolute; top:8px; right:8px; width:30px; height:30px; min-height:0; padding:0; border-radius:50%; border:0; background:transparent; color:#7a8fa3; font-size:22px; line-height:1; cursor:pointer; box-shadow:none; }
.toast-x:hover { background:#eef5fb; color:var(--ink); }
.toast-bar { position:absolute; left:0; bottom:0; height:3px; width:100%; background:#16a34a; transform-origin:left; animation:toastBar 5s linear forwards; }
.toast.paused .toast-bar { animation-play-state:paused; }
.toast.out { animation:toastOut .3s ease forwards; }
@keyframes toastIn { from { opacity:0; transform:translateX(30px) scale(.97); } to { opacity:1; transform:none; } }
@keyframes toastOut { to { opacity:0; transform:translateX(30px); } }
@keyframes toastBar { to { transform:scaleX(0); } }
@media (max-width:600px) { .toast-wrap { top:auto; bottom:16px; right:16px; left:16px; width:auto; } }
@media print { .toast-wrap { display:none; } }

/* ---------- Step 30: free trial sign-up ---------- */
.signup { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1.15fr); gap:22px; align-items:start; max-width:1100px; margin:0 auto; width:100%; }
.signup-hero { position:sticky; top:20px; border-radius:20px; padding:30px; color:#fff; background:linear-gradient(140deg,#0ea5e9,#0369a1 55%,#0c2d48); box-shadow:0 18px 40px rgba(3,105,161,.25); }
.signup-hero h1 { color:#fff; font-size:34px; line-height:1.15; margin:12px 0 10px; }
.signup-hero p { opacity:.92; font-size:16px; margin:0 0 14px; }
.signup-hero ul { list-style:none; padding:0; margin:0 0 18px; display:grid; gap:8px; font-size:15px; }
.signup-badge { display:inline-block; font-size:13px; font-weight:800; padding:5px 12px; border-radius:99px; background:rgba(255,255,255,.18); border:1px solid rgba(255,255,255,.35); }
.signup-plans { display:grid; grid-template-columns:repeat(3,1fr); gap:8px; }
.signup-plans div { background:rgba(255,255,255,.13); border:1px solid rgba(255,255,255,.25); border-radius:12px; padding:10px; display:grid; gap:2px; }
.signup-plans b { font-size:15px; } .signup-plans span { font-size:12.5px; opacity:.9; }
.signup-note { font-size:13px !important; opacity:.8 !important; margin:8px 0 0 !important; }
.signup-form { gap:12px; } .signup-form h2 { margin:0 0 4px; font-size:22px; }
.signup-err { background:#fff1f0; border:1px solid #f3c2bf; padding:10px 12px; border-radius:10px; margin:0; }
.trial-pick { border:0; padding:0; margin:0; display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.trial-pick legend { font-size:14px; font-weight:600; margin-bottom:6px; padding:0; }
.trial-pick label { position:relative; cursor:pointer; }
.trial-pick input { position:absolute; opacity:0; }
.trial-pick span { display:grid; gap:2px; padding:12px 14px; border:2px solid var(--line); border-radius:12px; background:#f8fbfe; transition:border-color .15s, background .15s; }
.trial-pick b { font-size:17px; } .trial-pick small { color:var(--mute); font-size:13px; }
.trial-pick input:checked + span { border-color:#0369a1; background:#e8f5fd; box-shadow:0 0 0 3px rgba(14,165,233,.15); }
.trial-pick input:focus-visible + span { outline:2px solid #0ea5e9; outline-offset:2px; }
.hp { position:absolute !important; left:-9999px !important; width:1px; height:1px; overflow:hidden; }
.agree { display:flex !important; gap:8px; align-items:center; font-size:14px; } .agree input { width:18px; height:18px; }
.signup-form > button { min-height:48px; font-size:16px; }
.signup-cta { display:grid; gap:2px; text-align:center; text-decoration:none; padding:14px; border-radius:14px; color:#fff; background:linear-gradient(135deg,#f59e0b,#d97706); box-shadow:0 8px 20px rgba(217,119,6,.25); }
.signup-cta span { font-size:13px; opacity:.92; } .signup-cta:hover { filter:brightness(1.05); }
.trial-banner { background:linear-gradient(90deg,#fff7e0,#fffbf0); border:1px solid #f5d48a; color:#6b4a00; padding:12px 16px; border-radius:14px; font-size:14.5px; }
.tag.trial { background:#fff3d6; color:#8a5a00; }
.sa-trial form { margin-top:6px; } .trial-btns { display:flex; flex-wrap:wrap; gap:6px; margin-top:8px; } .trial-btns form { margin:0 !important; padding:0 !important; border:0 !important; background:none !important; min-width:0 !important; }
.trial-btns button { min-height:30px; padding:0 10px; font-size:13px; border-radius:99px; }
.signup-admin { display:flex; justify-content:space-between; align-items:center; gap:16px; }
@media (max-width:860px) { .signup { grid-template-columns:1fr; } .signup-hero { position:static; padding:22px; } .signup-hero h1 { font-size:26px; } }
@media (max-width:480px) { .signup-plans { grid-template-columns:1fr; } .trial-pick { grid-template-columns:1fr; } }
.toast-x, .toast-x:hover { background:transparent !important; box-shadow:none !important; border:0 !important; color:#7a8fa3 !important; transform:none !important; }
.toast-x:hover { background:#eef5fb !important; color:var(--ink) !important; }
.signup-form > button { justify-self:stretch; width:100%; }
.toast-wrap { top:96px; }
@media (max-width:600px) { .toast-wrap { top:auto; bottom:16px; right:16px; left:16px; width:auto; } }

/* ---------- Step 31: private school list (names only) and discounts ---------- */
.sa-tools { display:flex; gap:10px; flex-wrap:wrap; align-items:flex-start; margin-bottom:14px; }
.sa-tools > input[type=search] { flex:1 1 240px; max-width:360px; min-height:42px; }
.sa-pop { position:relative; } .sa-pop > summary { list-style:none; cursor:pointer; display:inline-flex; align-items:center; min-height:42px; }
.sa-pop > summary::-webkit-details-marker { display:none; }
.sa-pop[open] { flex-basis:100%; order:5; } .sa-pop[open] > .panel { margin-top:10px; }
.sa-tools-body { display:grid; gap:16px; } .sa-stats { padding-top:12px; border-top:1px dashed var(--line); }
.sch-list { display:grid; gap:10px; }
.sch { background:#fff; border:1px solid var(--line); border-radius:16px; box-shadow:0 2px 12px rgba(3,105,161,.07); overflow:hidden; transition:box-shadow .15s; }
.sch:hover { box-shadow:0 8px 22px rgba(3,105,161,.12); }
.sch > summary { list-style:none; cursor:pointer; display:flex; align-items:center; gap:14px; padding:14px 18px; font-size:17px; }
.sch > summary::-webkit-details-marker { display:none; }
.sch > summary b { flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.sch > summary:focus-visible { outline:2px solid #0ea5e9; outline-offset:-2px; }
.sch-ini { --c:#0369a1; flex:none; width:42px; height:42px; border-radius:12px; display:grid; place-items:center; color:#fff; font-weight:800; font-size:15px;
  background:linear-gradient(135deg, color-mix(in srgb, var(--c) 55%, #fff), var(--c)); }
.sch-chev { width:22px; height:22px; fill:none; stroke:#52708a; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; transition:transform .2s; flex:none; }
.sch[open] .sch-chev { transform:rotate(180deg); }
.sch[open] > summary { border-bottom:1px solid var(--line); background:linear-gradient(180deg,#f3f9fe,#fff); }
.sch-body { padding:14px 18px 18px; display:grid; gap:14px; animation:schIn .2s ease; }
@keyframes schIn { from { opacity:0; transform:translateY(-4px); } to { opacity:1; transform:none; } }
.sch-head { display:flex; flex-wrap:wrap; gap:8px; align-items:center; }
.sch-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(min(100%,280px),1fr)); gap:12px; }
.sch-grid section { display:flex; flex-direction:column; gap:6px; padding:12px 14px; border:1px solid #e3eef6; border-radius:12px; background:#f8fbfe; min-width:0; }
.sch-grid section > span, .sch-grid section > a { overflow-wrap:anywhere; }
.sch-grid h3 { margin:0 0 2px; font-size:13px; text-transform:uppercase; letter-spacing:.5px; color:#52708a; }
.sch-grid .btn.sm { align-self:flex-start; min-height:32px; padding:0 12px; font-size:13px; border-radius:99px; margin-top:auto; }
.sch-acts { display:flex; flex-wrap:wrap; gap:6px; } .sch-acts form { margin:0; }
.sch-acts button { min-height:32px; padding:0 11px; font-size:13px; border-radius:99px; }
.sch-offer { background:linear-gradient(180deg,#fffaf0,#fff7e6) !important; border-color:#f5d48a !important; }
.sch-offer em { font-size:13px; }
.sch .sa-edit form { min-width:0; }
.tag.offer-tag { background:#fde7f3; color:#9d174d; }
.offer-box { display:flex; gap:12px; align-items:flex-start; margin:0 0 12px; padding:14px 16px; border-radius:14px; background:linear-gradient(135deg,#fff7e0,#ffeef7); border:1px solid #f5c6de; }
.offer-ico { font-size:28px; line-height:1; } .offer-box > div { display:grid; gap:3px; } .offer-box b { color:#9d174d; } .offer-box span { font-size:14.5px; } .offer-box em { font-size:13.5px; color:#6b4a00; }
.price-now { color:#9d174d; } .plan-mine s { color:#94a3b8; }
.hero-chips { display:flex; flex-wrap:wrap; gap:6px; margin-top:8px; } .hero-chips .hero-plan { margin-top:0; }
.hero-offer { background:rgba(253,231,243,.25) !important; border-color:rgba(253,231,243,.6) !important; }
.sa-pop > summary.btn { padding:0 16px; border-radius:12px; font-weight:700; font-size:15px; color:#fff; background:linear-gradient(135deg,#38bdf8,#0369a1); box-shadow:0 4px 12px rgba(3,105,161,.2); }
.sa-pop > summary.btn.ghost { color:var(--ink); background:#fff; border:1px solid var(--line); box-shadow:none; }
.sch-grid section .due-n, .sch-grid section .tag { align-self:flex-start; }

/* ---------- Step 32: delete students ---------- */
.pick-col { width:34px; } .pick-col input { width:18px; height:18px; }
.stu-table tr.picked td { background:#fff1f0 !important; }
.del-pop { position:relative; } .del-pop > summary { list-style:none; cursor:pointer; } .del-pop > summary::-webkit-details-marker { display:none; }
.del-pop > summary.btn { display:inline-flex; align-items:center; min-height:38px; padding:0 14px; border-radius:10px; border:1px solid #f3c2bf; color:#c4302b; background:#fff; font-weight:700; font-size:14px; }
.del-box { position:absolute; right:0; top:46px; z-index:20; width:min(360px, 86vw); display:grid; gap:10px; padding:14px; border-radius:14px; border:1px solid #f3c2bf; background:#fff6f5; box-shadow:0 14px 30px rgba(12,45,72,.15); }
.del-box p { margin:0; font-size:14px; } .del-box .danger { background:#c4302b; color:#fff; border-color:#c4302b; }

/* ---------- Step 32: Pay SMR, payment methods, proofs ---------- */
.badge-n { display:inline-block; margin-left:6px; background:#e0a63b; color:#0c2d48; border-radius:20px; padding:0 7px; font-size:12px; font-weight:800; line-height:18px; }
.pay-top { display:grid; gap:12px; }
.pay-sum { display:grid; grid-template-columns:auto 1fr; gap:8px 18px; align-items:center; } .pay-sum > b { font-size:17px; justify-self:start; }
.pm-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(min(100%,290px),1fr)); gap:12px; }
.pm-card { border:1px solid var(--line); border-radius:14px; padding:14px; background:linear-gradient(180deg,#fff,#f6fbff); display:grid; gap:8px; border-top:4px solid #0369a1; }
.pm-card.k-jazzcash { border-top-color:#c2410c; } .pm-card.k-easypaisa { border-top-color:#16a34a; } .pm-card.k-other { border-top-color:#64748b; }
.pm-head { display:flex; gap:10px; align-items:center; } .pm-head > div { display:grid; line-height:1.25; } .pm-head b { font-size:16px; }
.pm-ico { font-size:24px; width:42px; height:42px; display:grid; place-items:center; border-radius:12px; background:#e8f5fd; }
.pm-row { display:flex; align-items:center; gap:8px; font-size:14px; padding:6px 0; border-top:1px dashed var(--line); }
.pm-row span { color:var(--mute); min-width:96px; } .pm-row b { flex:1; min-width:0; overflow-wrap:anywhere; font-family:ui-monospace, monospace; font-size:14.5px; }
.pm-copy { min-height:28px !important; padding:0 10px !important; font-size:12px !important; border-radius:99px !important; background:#fff !important; color:#0369a1 !important; border:1px solid #bfdcf0 !important; box-shadow:none !important; }
.pm-note { margin:0; font-size:13px; color:#6b4a00; background:#fff8e6; padding:8px 10px; border-radius:8px; }
.proof-form { display:grid; gap:14px; }
.month-pick { border:0; padding:0; margin:0; display:flex; flex-wrap:wrap; gap:8px; } .month-pick legend { font-weight:600; font-size:14px; margin-bottom:8px; padding:0; }
.month-pick label { position:relative; cursor:pointer; } .month-pick input { position:absolute; opacity:0; }
.month-pick span { display:grid; padding:8px 14px; border:2px solid var(--line); border-radius:12px; background:#f8fbfe; min-width:110px; }
.month-pick small { font-size:12px; color:var(--mute); }
.month-pick input:checked + span { border-color:#0369a1; background:#e8f5fd; box-shadow:0 0 0 3px rgba(14,165,233,.15); }
.month-pick input:focus-visible + span { outline:2px solid #0ea5e9; }
.month-pick label.pend { cursor:not-allowed; opacity:.7; } .month-pick label.pend span { border-style:dashed; background:#fff8e6; }
.proof-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,210px),1fr)); gap:12px; }
.drop-zone { position:relative; display:flex; align-items:center; justify-content:center; gap:14px; min-height:120px; border:2px dashed #9cc9e6; border-radius:14px; background:#f3f9fe; cursor:pointer; padding:14px; text-align:center; }
.drop-zone:hover, .drop-zone:focus-within { border-color:#0369a1; background:#e8f5fd; }
.drop-zone input { position:absolute; inset:0; opacity:0; cursor:pointer; }
.dz-txt { display:grid; gap:4px; } .dz-txt small { color:var(--mute); }
.drop-zone img { max-height:160px; max-width:45%; border-radius:10px; box-shadow:0 4px 12px rgba(0,0,0,.12); }
.drop-zone.has { border-style:solid; border-color:#16a34a; background:#f0fbf4; }
.proof-form > button { justify-self:start; min-width:220px; min-height:46px; }
.pv-modal { position:fixed; inset:0; z-index:2000; background:rgba(12,45,72,.7); display:grid; place-items:center; padding:20px; }
.pv-modal[hidden] { display:none; }
.pv-box { position:relative; max-width:min(900px,96vw); max-height:92vh; background:#fff; border-radius:14px; padding:10px; box-shadow:0 20px 50px rgba(0,0,0,.4); }
.pv-img img { display:block; max-width:100%; max-height:86vh; margin:0 auto; border-radius:8px; }
.pv-x { position:absolute !important; top:-14px; right:-14px; width:36px; height:36px; min-height:0 !important; padding:0 !important; border-radius:50% !important; font-size:22px !important; background:#fff !important; color:var(--ink) !important; box-shadow:0 4px 12px rgba(0,0,0,.3) !important; border:0 !important; }
.proof-list { display:grid; gap:10px; }
.proof-item { display:grid; grid-template-columns:auto 1fr auto; gap:14px; align-items:center; padding:12px; border:1px solid var(--line); border-radius:14px; background:#fbfdff; }
.proof-item.pending { border-color:#f5d48a; background:#fffbf0; }
.proof-thumb { width:84px; height:84px; padding:0 !important; min-height:0 !important; border-radius:10px !important; overflow:hidden; border:1px solid var(--line) !important; background:#fff !important; box-shadow:none !important; cursor:zoom-in; }
.proof-thumb img { width:100%; height:100%; object-fit:cover; display:block; }
.proof-info { display:grid; gap:3px; min-width:0; font-size:14.5px; } .proof-info .mute { font-size:13px; overflow-wrap:anywhere; }
.proof-decide { display:grid; gap:8px; min-width:250px; } .proof-decide input { min-height:38px; }
.proof-decide button { min-height:36px; padding:0 14px; }
.methods-wrap { align-items:start; } .pm-list { display:grid; gap:12px; }
.pm-item.off .pm-card { opacity:.55; } .pm-acts { display:flex; flex-wrap:wrap; gap:6px; align-items:center; margin-top:8px; } .pm-acts form { margin:0; }
.pm-acts .btn, .pm-acts button { min-height:32px; padding:0 12px; font-size:13px; border-radius:99px; }
.hero-pay { background:rgba(254,226,226,.25) !important; border-color:rgba(254,202,202,.7) !important; }
@media (max-width:700px) { .proof-item { grid-template-columns:auto 1fr; } .proof-decide { grid-column:1 / -1; min-width:0; } }

/* ---------- Step 32: Design studio ---------- */
.studio { display:grid; grid-template-columns:300px minmax(0,1fr); gap:18px; align-items:start; }
.studio-side { position:sticky; top:14px; display:grid; gap:14px; } .studio-side h2 { margin:0; }
.studio-save { min-height:46px; }
.theme-pick { display:grid; gap:8px; } .theme-pick label { position:relative; cursor:pointer; } .theme-pick input { position:absolute; opacity:0; }
.tp { display:grid; grid-template-columns:44px 1fr; grid-template-rows:auto auto; column-gap:10px; align-items:center; padding:9px 10px; border:2px solid var(--line); border-radius:12px; background:#f8fbfe; }
.tp i { grid-row:1 / 3; width:44px; height:44px; border-radius:8px; border:1px solid #d4e6f3; background:#fff; }
.tp b { font-size:15px; } .tp small { font-size:12px; color:var(--mute); line-height:1.3; }
.tp-classic i { box-shadow:inset 0 0 0 3px #fff, inset 0 0 0 4px #0c2d48; }
.tp-royal i { background:#fff; box-shadow:inset 0 0 0 4px #0c2d48, inset 0 0 0 6px #fff, inset 0 0 0 7px #c9a227; }
.tp-modern i { background:linear-gradient(180deg,#0369a1 0 38%,#fff 38%); border-radius:10px; }
.tp-elegant i { background:#fffaf0; box-shadow:inset 0 0 0 2px #c9a227, inset 0 0 0 5px #fffaf0, inset 0 0 0 6px #c9a227; }
.theme-pick input:checked + .tp { border-color:#0369a1; background:#e8f5fd; box-shadow:0 0 0 3px rgba(14,165,233,.15); }
.theme-pick input:focus-visible + .tp { outline:2px solid #0ea5e9; outline-offset:2px; }
.studio-side input[type=color] { width:100%; height:42px; padding:3px; }
.studio-more summary { cursor:pointer; font-weight:600; font-size:14px; } .studio-more .checks { margin-top:8px; display:grid; gap:6px; }
.studio-stage { min-width:0; display:grid; gap:10px; }
.studio-tip { margin:0; background:#fff8e6; border:1px solid #f5d48a; color:#6b4a00; padding:9px 14px; border-radius:12px; font-size:14px; }
.studio-card { background:#e9f1f8; border-radius:16px; padding:22px; overflow:auto; }
.ed[contenteditable] { outline:1px dashed transparent; outline-offset:2px; border-radius:3px; cursor:text; transition:outline-color .15s, background .15s; }
.studio-card .ed[contenteditable]:hover { outline-color:#38bdf8; background:rgba(56,189,248,.08); }
.studio-card .ed[contenteditable]:focus { outline:2px solid #0ea5e9; background:rgba(255,255,255,.85); color:#0c2d48; }
.ed.empty { opacity:.5; font-style:italic; }
.ph { display:inline-block; padding:0 6px; margin:0 1px; border-radius:6px; background:#e2e8f0; color:#334155; font-size:.86em; font-family:ui-monospace, monospace; line-height:1.6; white-space:nowrap; user-select:all; }
.ph-box p { margin:0 0 6px; font-size:13px; color:var(--mute); } .ph-list { display:flex; flex-wrap:wrap; gap:5px; }
.ph-add { min-height:28px !important; padding:0 8px !important; font-size:12px !important; font-family:ui-monospace, monospace; border-radius:6px !important; background:#eef2f6 !important; color:#334155 !important; border:1px solid #d6dee6 !important; box-shadow:none !important; }
.ph-add.shake { animation:shake .35s; } @keyframes shake { 25% { transform:translateX(-3px); } 75% { transform:translateX(3px); } }
.seg-links { display:flex; background:#e8f5fd; border-radius:12px; padding:4px; gap:4px; }
.seg-links a { flex:1; text-align:center; padding:8px; border-radius:9px; font-weight:700; text-decoration:none; color:var(--ink); }
.seg-links a[aria-current] { background:#0369a1; color:#fff; }
.studio-link { display:flex; justify-content:space-between; align-items:center; gap:14px; flex-wrap:wrap; }
@media (max-width:900px) { .studio { grid-template-columns:1fr; } .studio-side { position:static; } .studio-card { padding:10px; } }

/* ---------- Step 33: staff QR, staff cards, ID card studio ---------- */
.staff-qr-bar { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:10px; }
.staff-qr-bar .inline { display:flex; flex-wrap:wrap; gap:8px; }
.qr-chip { display:inline-block; font-size:12px; color:#0369a1; background:#e0f2fe; border-radius:999px; padding:1px 8px; margin-top:2px; }
.idc-stage { display:flex; justify-content:center; padding:30px 22px; }
.idc-stage .idc { zoom:1.7; box-shadow:0 6px 18px rgba(12,45,72,.18); }
.idc-stage .ed[contenteditable] { outline:1px dashed rgba(56,189,248,.5); }
@media (max-width:760px) { .idc-stage .idc { zoom:1.25; } }
.sidc { width:86mm; height:54mm; display:flex; flex-direction:column; border-radius:3mm; overflow:hidden; background:var(--bg); color:var(--tx); border:0.3mm solid #c6dbea;
  break-inside:avoid; font-family:Inter, system-ui, sans-serif; -webkit-print-color-adjust:exact; print-color-adjust:exact; box-sizing:border-box; }
.sidc .h { background:var(--hb); color:var(--ht); padding:1.8mm 3mm; display:flex; align-items:center; gap:2mm; border-bottom:0.8mm solid var(--ac); }
.sidc .h img { max-height:8mm; max-width:14mm; background:#fff; border-radius:1mm; padding:0.4mm; }
.sidc .h .t { font-weight:700; font-size:3.1mm; line-height:1.1; } .sidc .h .st { font-size:2.2mm; opacity:.9; }
.sidc .b { flex:1; display:flex; gap:3mm; align-items:center; padding:2mm 3mm; min-height:0; }
.sidc .q { width:24mm; height:24mm; flex:none; } .sidc .q svg { width:100%; height:100%; display:block; }
.sidc .f { font-size:2.6mm; line-height:1.4; min-width:0; } .sidc .f .n { font-size:3.6mm; font-weight:700; line-height:1.2; }
.sidc .f .k { opacity:.7; } .sidc .f .code { font-family:ui-monospace, Consolas, monospace; font-weight:700; letter-spacing:.3mm; }
.sidc .ft { background:var(--hb); color:var(--ht); font-size:2.1mm; text-align:center; padding:1mm 2mm; }

/* ---------- Step 34: WhatsApp and SMS alerts ---------- */
.table-scroll { overflow-x:auto; -webkit-overflow-scrolling:touch; }
.msg-ways { display:grid; grid-template-columns:repeat(auto-fit, minmax(260px, 1fr)); gap:14px; }
.msg-ways .panel h2 { margin:0 0 4px; display:flex; align-items:center; gap:8px; flex-wrap:wrap; } .msg-ways .panel p { margin:0; }
.msg-setup h2 { margin:0 0 6px; }
.msg-tpls { display:grid; grid-template-columns:repeat(auto-fit, minmax(280px, 1fr)); gap:12px; }
.msg-tpls .cnt { display:block; margin-top:3px; font-size:12.5px; font-weight:400; }
.sms-modes { display:grid; grid-template-columns:repeat(auto-fit, minmax(210px, 1fr)); gap:10px; margin-bottom:12px; }
.sms-modes label { position:relative; cursor:pointer; }
.sms-modes input { position:absolute; opacity:0; pointer-events:none; }
.sms-modes span { display:grid; gap:2px; border:2px solid #cfe3f2; border-radius:14px; padding:12px 14px; background:#fff; height:100%; box-sizing:border-box; }
.sms-modes small { color:#5b7389; font-size:13px; }
.sms-modes input:checked + span { border-color:#0284c7; background:#f0f9ff; box-shadow:0 0 0 3px rgba(2,132,199,.15); }
.sms-modes input:focus-visible + span { outline:2px solid #0284c7; outline-offset:2px; }
.sms-modes label.off span { opacity:.6; cursor:not-allowed; }
.gw-own { border:1px solid #cfe3f2; border-radius:14px; padding:12px 16px 14px; display:grid; gap:10px; margin:0; }
.gw-own legend { font-weight:700; padding:0 6px; }
.gw-own code, .msg-setup code { word-break:break-all; }
.auto-list { display:grid; gap:10px; }
.auto-list .check { align-items:flex-start; line-height:1.6; }
.send-all { justify-content:space-between; background:#f0fdf4; border-color:#bbf7d0; }
.send-all.off { background:#fff; border-color:#e2ecf4; }
.panel.soon { background:#fafcff; border-style:dashed; } .panel.soon h2 { margin:0 0 4px; }
.stats b.warn { color:#b45309; }
@media (max-width:700px) { .send-all { flex-direction:column; align-items:stretch; } }

/* Step 35: certificate register, verify page, registration number */
.regno { font-size:13px; font-weight:700; letter-spacing:.4px; color:var(--mute); }
.cert-had { border-color:#f2c46d; background:#fffaf0; }
.cert-done { font-size:13px; color:#1f7a4d; border-color:#bfe3cd; white-space:nowrap; }
tr.off td { opacity:.65; }
.verify-wrap { max-width:640px; width:100%; margin:0 auto; display:grid; gap:16px; }
.verify-res table td { padding:7px 6px; }
.verify-res.good { border:2px solid #1f7a4d; } .verify-res.bad { border:2px solid var(--red); }
.verify-big { font-size:22px; font-weight:800; margin-bottom:12px; }
.verify-res.good .verify-big { color:#1f7a4d; } .verify-res.bad .verify-big, .verify-res.bad > b { color:var(--red); }
.verify-school { display:flex; gap:12px; align-items:center; margin-bottom:10px; } .verify-school img { height:54px; width:auto; }
.signup-form .reg-hint { font-size:12.5px; color:var(--mute); }
.sidc .h .rg { font-size:2.1mm; font-weight:700; opacity:.85; margin-top:0.3mm; }
.cert-vsw { display:flex; justify-content:space-between; align-items:center; gap:14px; padding:10px 0 14px; }

/* Step 36: mobile app (PWA) */
html { -webkit-tap-highlight-color:rgba(3,105,161,.12); }
.pwa-banner { position:fixed; left:12px; right:12px; bottom:calc(12px + env(safe-area-inset-bottom)); z-index:60; display:flex; align-items:center; gap:12px;
  background:#fff; border:1px solid var(--line); border-radius:16px; padding:10px 10px 10px 12px; box-shadow:0 12px 34px rgba(3,105,161,.22); max-width:520px; margin:0 auto; }
.pwa-banner img { border-radius:11px; flex:none; }
.pwa-banner div { flex:1; min-width:0; line-height:1.3; }
.pwa-banner b { display:block; font-size:15px; }
.pwa-banner span { display:block; font-size:12.5px; color:var(--mute); }
.pwa-banner button { min-height:40px; padding:0 16px; flex:none; }
.pwa-banner .pwa-x { background:none; color:var(--mute); font-size:24px; padding:0 6px; min-height:40px; font-weight:400; }
html.pwa-banner-on main { padding-bottom:110px; }
.tabbar { display:none; }
#pwa-offline { position:sticky; top:0; z-index:70; background:#5c4100; color:#fff; text-align:center; font-size:13.5px; padding:7px 12px; }
dialog.pwa-sheet { border:0; border-radius:18px; padding:22px; max-width:min(400px, calc(100vw - 32px)); color:var(--ink); box-shadow:0 20px 50px rgba(0,0,0,.25); }
dialog.pwa-sheet::backdrop { background:rgba(12,45,72,.45); }
dialog.pwa-sheet h2 { font-size:19px; }
dialog.pwa-sheet ol { padding-left:22px; display:grid; gap:8px; margin:0 0 10px; }
dialog.pwa-sheet svg { vertical-align:-4px; color:#0369a1; }
dialog.pwa-sheet form { text-align:right; margin-top:12px; }
html.pwa-loading body::before { content:""; position:fixed; top:0; left:0; height:3px; z-index:100; background:#7dd3fc; animation:pwaLoad 1.6s ease-out forwards; }
@keyframes pwaLoad { from { width:0; } to { width:85%; } }
/* Installed app: room for the phone's status bar and the iPhone notch */
html.in-app header { padding-top:calc(14px + env(safe-area-inset-top)); }
html.in-app body { overscroll-behavior-y:none; }
@media (max-width:760px) {
  .tabbar { display:flex; position:fixed; left:0; right:0; bottom:0; z-index:50; background:#fff; border-top:1px solid var(--line);
    box-shadow:0 -4px 18px rgba(3,105,161,.10); padding:4px 4px calc(4px + env(safe-area-inset-bottom)); }
  .tabbar a, .tab-more summary { flex:1; min-width:0; display:flex; flex-direction:column; align-items:center; gap:2px; padding:6px 2px; border-radius:12px;
    color:var(--mute); text-decoration:none; font-size:11px; font-weight:600; line-height:1.2; }
  .tabbar a span { max-width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .tabbar svg { width:24px; height:24px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
  .tabbar a[aria-current], .tab-more summary[aria-current] { color:#0369a1; background:#e0f2fe; }
  .tab-more { flex:1; min-width:0; display:flex; }
  .tab-more summary { list-style:none; cursor:pointer; }
  .tab-more summary::-webkit-details-marker { display:none; }
  .tab-more[open] summary { color:#0369a1; }
  .tab-more-menu { position:fixed; right:10px; bottom:calc(72px + env(safe-area-inset-bottom)); min-width:200px; background:#fff; border-radius:14px; padding:6px;
    box-shadow:0 14px 36px rgba(0,0,0,.2); display:grid; }
  .tabbar .tab-more-menu a { flex-direction:row; font-size:15px; color:var(--ink); padding:12px 14px; border-radius:10px; align-items:center; }
  .tabbar .tab-more-menu a[aria-current] { background:#e8f5fd; color:#0369a1; }
  body:has(.tabbar) main { padding-bottom:96px; }
  body:has(.tabbar) .pwa-banner { bottom:calc(76px + env(safe-area-inset-bottom)); }
  html.pwa-banner-on body:has(.tabbar) main { padding-bottom:180px; }
  body:has(.tabbar) .toast-wrap { bottom:calc(80px + env(safe-area-inset-bottom)); }
  /* Parents and teachers have the tab bar: the long menu row in the header is not needed */
  body:has(.tabbar) header nav { display:none; }
}
@media print { .tabbar, .pwa-banner, #pwa-offline, dialog.pwa-sheet { display:none !important; } }
@media (max-width:600px) { html.pwa-banner-on .toast-wrap { bottom:calc(96px + env(safe-area-inset-bottom)); } html.pwa-banner-on body:has(.tabbar) .toast-wrap { bottom:calc(160px + env(safe-area-inset-bottom)); } }
.pwa-banner button.pwa-x, .pwa-banner button.pwa-x:hover { background:none !important; box-shadow:none !important; border:0 !important; color:var(--mute) !important; }

/* ==================== Step 37: Urdu language ====================
   Urdu font (Noto Nastaliq Urdu, SIL Open Font License, in assets/fonts) is used only for Urdu letters,
   so English words, numbers and names keep the normal font. Works offline (saved by the mobile app too). */
@font-face { font-family:'SMR Urdu'; src:url('fonts/urdu-400.woff2') format('woff2'); font-weight:100 500; font-display:swap;
  unicode-range:U+0600-06FF, U+0750-077F, U+08A0-08FF, U+200C-200F, U+FB50-FDFF, U+FE70-FEFF; }
@font-face { font-family:'SMR Urdu'; src:url('fonts/urdu-700.woff2') format('woff2'); font-weight:600 900; font-display:swap;
  unicode-range:U+0600-06FF, U+0750-077F, U+08A0-08FF, U+200C-200F, U+FB50-FDFF, U+FE70-FEFF; }
html[lang=ur] body, html[lang=ur] input, html[lang=ur] select, html[lang=ur] button, html[lang=ur] textarea { font-family:'SMR Urdu', system-ui, sans-serif; }
html[lang=ur] body { line-height:1.95; }
html[lang=ur] h1, html[lang=ur] h2, html[lang=ur] h3 { line-height:1.7; }
:where(html[lang=ur] [dir=ltr]) { line-height:1.55; }   /* printed documents stay English (zero specificity: their own styles win) */

/* Language switch (header) */
.lang-switch { margin:0; order:5; }
details.profile { order:6; }
.lang-switch button { display:inline-flex; align-items:center; gap:6px; min-height:36px; padding:0 12px; border-radius:99px; font-size:14px; font-weight:600;
  background:rgba(255,255,255,.16) !important; color:#fff; border:1px solid rgba(255,255,255,.35) !important; box-shadow:none !important; }
.lang-switch button:hover { background:rgba(255,255,255,.26) !important; }
.lang-switch button[lang=ur] { font-family:'SMR Urdu', system-ui, sans-serif; font-size:15px; padding-top:2px; }
.lang-switch button[lang=en] { font-family:system-ui, sans-serif; }
.lang-switch svg { width:16px; height:16px; fill:none; stroke:currentColor; stroke-width:1.7; }
header:not(:has(details.profile)) .lang-switch { margin-left:auto; }
[dir=rtl] header:not(:has(details.profile)) .lang-switch { margin-left:0; margin-right:auto; }
@media (max-width:600px) { .lang-switch button span { font-size:13px; } .lang-switch button { padding:0 10px; } }

/* Right-to-left fixes made by hand (the generated part below flips left/right) */
[dir=rtl] .toast-wrap { right:auto; left:20px; }
@media (max-width:600px) { [dir=rtl] .toast-wrap { left:16px; right:16px; } }
[dir=rtl] svg.bi-go, [dir=rtl] svg.bi-back, [dir=rtl] svg.bi-undo, [dir=rtl] svg.bi-send { transform:scaleX(-1); }
[dir=rtl] input[type=email], [dir=rtl] input[type=tel], [dir=rtl] input[type=number], [dir=rtl] input[type=url],
[dir=rtl] input[name=code], [dir=rtl] input[name=pin], [dir=rtl] input[type=password] { direction:ltr; text-align:right; }
[dir=rtl] .nav-more-menu { right:auto; left:0; }
@media (max-width:760px) { [dir=rtl] .nav-more-menu { left:16px; right:auto; } }

/* Right-to-left overrides made from the rules above with rtlcss (flips margins, padding, positions and text-align).
   If you add a new rule above that uses left/right, add its [dir=rtl] version here too. */
[dir=rtl] header .who:not([dir=ltr] *) {
    margin-left: 0;
    margin-right: auto
}
[dir=rtl] th:not([dir=ltr] *) {
    text-align: right
}
[dir=rtl] .num:not([dir=ltr] *) {
    text-align: left
}
[dir=rtl] .register .name:not([dir=ltr] *) {
    left: auto;
    right: 0
}
[dir=rtl] .marks .name:not([dir=ltr] *),
[dir=rtl] .results .name:not([dir=ltr] *) {
    left: auto;
    right: 0
}
[dir=rtl] details.profile:not([dir=ltr] *) {
    margin-left: 0;
    margin-right: auto
}
[dir=rtl] details.profile summary:not([dir=ltr] *) {
    padding: 4px 4px 4px 6px
}
[dir=rtl] .avatar:not([dir=ltr] *) {
    background: linear-gradient(-135deg,#f4d58d,#e0a63b)
}
[dir=rtl] details.profile .menu:not([dir=ltr] *) {
    right: auto;
    left: 0
}
[dir=rtl] details.profile .menu a:not([dir=ltr] *),
[dir=rtl] details.profile .menu button.logout:not([dir=ltr] *) {
    text-align: right
}
[dir=rtl] .idc-fields li:not([dir=ltr] *) {
    padding: 4px 10px 4px 6px
}
[dir=rtl] .idc-fields li button:not([dir=ltr] *) {
    margin-left: 0;
    margin-right: 4px
}
[dir=rtl] .tt tbody th:not([dir=ltr] *) {
    text-align: right
}
[dir=rtl] button:not(.ghost):not(.danger):not(.logout):not([dir=ltr] *),
[dir=rtl] a.btn.primary:not([dir=ltr] *),
[dir=rtl] a.btn[aria-current]:not([dir=ltr] *) {
    background: linear-gradient(-135deg, #38bdf8 0%, #0369a1 55%, #075985 100%)
}
[dir=rtl] button:not(.logout):not([dir=ltr] *)::after,
[dir=rtl] a.btn:not([dir=ltr] *)::after {
    background: linear-gradient(-120deg, transparent 30%, rgba(255,255,255,.22) 50%, transparent 70%);
    transform: translateX(120%)
}
[dir=rtl] button:hover:not([dir=ltr] *)::after,
[dir=rtl] a.btn:hover:not([dir=ltr] *)::after {
    transform: translateX(-120%)
}
[dir=rtl] button.danger:not([dir=ltr] *) {
    background: linear-gradient(-135deg, #e0544d, #b02a25)
}
[dir=rtl] a.btn.wa-link:not([dir=ltr] *) {
    background: linear-gradient(-135deg, #2fcf76, #1f9d55)
}
[dir=rtl] .bi:not([dir=ltr] *) {
    margin-left: 0;
    margin-right: -2px
}
[dir=rtl] button.wa:not(.ghost):not([dir=ltr] *) {
    background: linear-gradient(-135deg, #2fcf76, #1f9d55)
}
[dir=rtl] .hero:not([dir=ltr] *) {
    background: radial-gradient(circle at 15% -20%, rgba(224,166,59,.45), transparent 45%), radial-gradient(circle at 110% 120%, rgba(255,255,255,.12), transparent 40%), linear-gradient(-135deg, #0284c7, #0369a1 55%, #0c4a6e)
}
[dir=rtl] .kpi:not([dir=ltr] *)::before {
    inset: 0 0 0 auto
}
[dir=rtl] .cc-badge:not([dir=ltr] *) {
    background: linear-gradient(-135deg, #38bdf8, #0369a1)
}
[dir=rtl] .slips-t input:not([dir=ltr] *) {
    text-align: left
}
[dir=rtl] .slips-t td:nth-child(6) input:not([dir=ltr] *) {
    text-align: right
}
[dir=rtl] .class-bar:not([dir=ltr] *) {
    background: linear-gradient(-135deg, #0284c7, #0369a1 60%, #075985)
}
[dir=rtl] .chips.subj > span:not([dir=ltr] *) {
    padding: 4px 12px 4px 6px
}
[dir=rtl] .legend i:not([dir=ltr] *) {
    margin-right: 0;
    margin-left: 6px
}
[dir=rtl] .seg input:not([dir=ltr] *),
[dir=rtl] .att-pick .ap input:not([dir=ltr] *) {
    left: auto;
    right: 0
}
[dir=rtl] .nav-more-menu:not([dir=ltr] *) {
    left: auto;
    right: 0
}
@media (max-width:760px) {
    [dir=rtl] .nav-more-menu:not([dir=ltr] *) {
        right: auto;
        left: 16px
    }
}
[dir=rtl] .hp:not([dir=ltr] *) {
    left: auto;
    right: -9999px
}
[dir=rtl] .hero-actions .badge-n:not([dir=ltr] *) {
    margin-left: 0;
    margin-right: 6px
}
[dir=rtl] header:not([dir=ltr] *) {
    background: linear-gradient(-90deg, #0369a1 0%, #0284c7 45%, #0ea5e9 100%)
}
[dir=rtl] .brand:not([dir=ltr] *) {
    margin-right: 0;
    margin-left: 6px
}
[dir=rtl] .fac.on:not([dir=ltr] *) {
    background: linear-gradient(-135deg, #e0f2fe, #f0f9ff)
}
[dir=rtl] button.switch .knob:not([dir=ltr] *) {
    left: auto;
    right: 4px;
    transition: right .2s
}
[dir=rtl] button.switch .sw-l:not([dir=ltr] *) {
    right: auto;
    left: 10px
}
[dir=rtl] button.switch[aria-checked=true]:not([dir=ltr] *) {
    background: linear-gradient(-90deg, #0284c7, #0ea5e9) !important
}
[dir=rtl] button.switch[aria-checked=true] .knob:not([dir=ltr] *) {
    left: auto;
    right: 48px
}
[dir=rtl] button.switch[aria-checked=true] .sw-l:not([dir=ltr] *) {
    left: auto;
    right: 12px
}
[dir=rtl] .notice:not([dir=ltr] *) {
    border-left: initial;
    border-right: 4px solid var(--sky)
}
[dir=rtl] .notice.pinned:not([dir=ltr] *) {
    border-left-color: initial;
    border-right-color: #f59e0b;
    background: linear-gradient(-135deg,#fffbeb,#fff)
}
[dir=rtl] .ev-dot:not([dir=ltr] *) {
    margin-right: 0;
    margin-left: 6px
}
[dir=rtl] .leave-card.pend:not([dir=ltr] *) {
    border-left: initial;
    border-right: 4px solid #f59e0b
}
[dir=rtl] .leave-alert:not([dir=ltr] *) {
    border-left: initial;
    border-right: 4px solid #f59e0b;
    background: linear-gradient(-135deg,#fffbeb,#fff)
}
[dir=rtl] .qr-steps:not([dir=ltr] *) {
    padding-left: 0;
    padding-right: 22px
}
[dir=rtl] .rep-table td.n:not([dir=ltr] *),
[dir=rtl] .rep-table th.n:not([dir=ltr] *) {
    text-align: left
}
[dir=rtl] tr.grp th:not([dir=ltr] *) {
    background: linear-gradient(-90deg,#0369a1,#0ea5e9);
    text-align: right
}
[dir=rtl] .t-card:not([dir=ltr] *)::before {
    background: linear-gradient(-90deg,#38bdf8,#0369a1)
}
[dir=rtl] .t-avatar:not([dir=ltr] *) {
    background: linear-gradient(-135deg, color-mix(in srgb, var(--c) 55%, #fff), var(--c))
}
[dir=rtl] .tabs-row .btn[aria-current="page"]:not([dir=ltr] *) {
    background: linear-gradient(-135deg,#38bdf8,#0369a1)
}
[dir=rtl] .plan-tag.p-basic:not([dir=ltr] *) {
    background: linear-gradient(-135deg,#60a5fa,#2563eb)
}
[dir=rtl] .plan-tag.p-standard:not([dir=ltr] *) {
    background: linear-gradient(-135deg,#a78bfa,#6d28d9)
}
[dir=rtl] .plan-tag.p-premium:not([dir=ltr] *) {
    background: linear-gradient(-135deg,#fbbf24,#b45309)
}
[dir=rtl] .plan-price span:not([dir=ltr] *) {
    margin-left: 0;
    margin-right: 4px
}
[dir=rtl] .pay-form summary.btn:not([dir=ltr] *) {
    background: linear-gradient(-135deg,#38bdf8,#0369a1)
}
[dir=rtl] .demo-panel:not([dir=ltr] *) {
    border-left: initial;
    border-right: 5px solid #0ea5e9
}
[dir=rtl] .demo-panel.has:not([dir=ltr] *) {
    border-left-color: initial;
    border-right-color: #e0a63b
}
[dir=rtl] .toast-wrap:not([dir=ltr] *) {
    right: auto;
    left: 20px
}
[dir=rtl] .toast:not([dir=ltr] *) {
    padding: 14px 14px 16px 44px
}
[dir=rtl] .toast.is-ok:not([dir=ltr] *) {
    border-left: initial;
    border-right: 5px solid #16a34a
}
[dir=rtl] .toast.is-err:not([dir=ltr] *) {
    border-left: initial;
    border-right: 5px solid #c4302b
}
[dir=rtl] .is-ok .toast-ico:not([dir=ltr] *) {
    background: linear-gradient(-135deg,#4ade80,#16a34a)
}
[dir=rtl] .is-err .toast-ico:not([dir=ltr] *) {
    background: linear-gradient(-135deg,#f87171,#c4302b)
}
[dir=rtl] .toast-x:not([dir=ltr] *) {
    right: auto;
    left: 8px
}
[dir=rtl] .toast-bar:not([dir=ltr] *) {
    left: auto;
    right: 0;
    transform-origin: right
}
[dir=rtl] .signup-hero:not([dir=ltr] *) {
    background: linear-gradient(-140deg,#0ea5e9,#0369a1 55%,#0c2d48)
}
[dir=rtl] .hp:not([dir=ltr] *) {
    left: auto !important;
    right: -9999px !important
}
[dir=rtl] .signup-cta:not([dir=ltr] *) {
    background: linear-gradient(-135deg,#f59e0b,#d97706)
}
[dir=rtl] .trial-banner:not([dir=ltr] *) {
    background: linear-gradient(-90deg,#fff7e0,#fffbf0)
}
[dir=rtl] .sch-ini:not([dir=ltr] *) {
    background: linear-gradient(-135deg, color-mix(in srgb, var(--c) 55%, #fff), var(--c))
}
[dir=rtl] .offer-box:not([dir=ltr] *) {
    background: linear-gradient(-135deg,#fff7e0,#ffeef7)
}
[dir=rtl] .sa-pop > summary.btn:not([dir=ltr] *) {
    background: linear-gradient(-135deg,#38bdf8,#0369a1)
}
[dir=rtl] .del-box:not([dir=ltr] *) {
    right: auto;
    left: 0
}
[dir=rtl] .badge-n:not([dir=ltr] *) {
    margin-left: 0;
    margin-right: 6px
}
[dir=rtl] .pv-x:not([dir=ltr] *) {
    right: auto;
    left: -14px
}
[dir=rtl] .pwa-banner:not([dir=ltr] *) {
    padding: 10px 12px 10px 10px
}
[dir=rtl] dialog.pwa-sheet ol:not([dir=ltr] *) {
    padding-left: 0;
    padding-right: 22px
}
[dir=rtl] dialog.pwa-sheet form:not([dir=ltr] *) {
    text-align: left
}
html[dir=rtl].pwa-loading body::before {
    left: auto;
    right: 0
}
@media (max-width:760px) {
    [dir=rtl] .tab-more-menu:not([dir=ltr] *) {
        right: auto;
        left: 10px
    }
}/* Step 37: letter spacing breaks joined Urdu letters */
html[lang=ur] body *:not([dir=ltr]):not([dir=ltr] *) { letter-spacing:0 !important; text-transform:none !important; }
html[lang=ur] main li, html[lang=ur] main p { line-height:2.05; }

/* ---------- Step 38: online fee payment ---------- */
.paynow { display:grid; gap:12px; }
.pay-total { margin:0; font-size:17px; } .pay-total b { font-size:22px; }
.gw-buttons { display:flex; flex-wrap:wrap; gap:10px; }
.gw-btn { min-height:50px; padding:0 22px; font-size:16px; font-weight:700; border-radius:12px; }
.gw-jazzcash { background:linear-gradient(135deg,#d9232d,#a1151d) !important; color:#fff !important; }
.gw-easypaisa { background:linear-gradient(135deg,#3bb54a,#1c8a3a) !important; color:#fff !important; }
.gw-mock { background:#fff8e6 !important; color:#6b4a00 !important; border:2px dashed #e0a63b !important; }
.pay-result { border-left:6px solid #e0a63b; } .pay-result h2 { margin:0 0 6px; } .pay-result p { margin:0 0 10px; }
.pay-result.is-paid { border-left-color:#16a34a; background:#f0fbf4; } .pay-result.is-failed { border-left-color:var(--red); background:#fdf2f1; }
.proof-box > summary { cursor:pointer; padding:2px 0; } .proof-box[open] > summary { margin-bottom:14px; }
.proof-box .proof-form { display:grid; gap:12px; } .proof-where { margin-bottom:12px; display:grid; gap:4px; }
.pay-mini { display:inline-flex; margin-top:6px; min-height:32px; padding:0 12px; font-size:13px; border-radius:99px; }
.pay-setup { display:grid; gap:14px; } .pay-setup .panel { display:grid; gap:10px; } .pay-setup .panel > .sec-head { margin-bottom:0; }
.gw-setup { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,320px),1fr)); gap:14px; align-items:start; }
.mode-pick { border:0; padding:0; margin:0; display:flex; flex-wrap:wrap; gap:10px; } .mode-pick legend { font-weight:600; font-size:14px; margin-bottom:6px; padding:0; }
.mode-pick label { display:flex; flex-direction:row; gap:8px; align-items:center; padding:8px 14px; border:2px solid var(--line); border-radius:12px; background:#f8fbfe; cursor:pointer; color:var(--ink); } .mode-pick input { width:18px; height:18px; min-height:0; margin:0; } .mode-pick label:has(input:checked) { border-color:#0369a1; background:#e8f5fd; }
.copy-url { display:inline-block; margin-top:4px; padding:4px 8px; background:#f1f6fa; border-radius:6px; font-size:12.5px; overflow-wrap:anywhere; direction:ltr; }
.op-log td { vertical-align:top; } .row-warn td { background:#fffbf0; }
.op-act summary { cursor:pointer; font-weight:600; color:#0369a1; } .op-act[open] { display:grid; gap:6px; min-width:220px; } .op-act form { margin:0; }
.mock-gw { max-width:520px; width:100%; margin:20px auto; display:grid; gap:10px; border:2px dashed #e0a63b; }
.mock-band { justify-self:start; background:#e0a63b; color:#0c2d48; font-weight:800; font-size:12px; letter-spacing:.06em; padding:3px 10px; border-radius:99px; }
.mock-actions { display:grid; gap:8px; } .mock-actions button { min-height:44px; }
/* Step 39: security */
.forgot-link { justify-self:end; font-size:.95rem; font-weight:600; }
.audit-table td { vertical-align:top; }

/* Step 41: branches */
.branch-switch { margin:0; order:4; }
.branch-switch select { min-height:36px; max-width:220px; padding:0 30px 0 12px; border-radius:99px; font-size:14px; font-weight:600; color:#fff;
  background:rgba(255,255,255,.16) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 4.5 6 8l3.5-3.5' fill='none' stroke='white' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 11px center;
  border:1px solid rgba(255,255,255,.35); appearance:none; -webkit-appearance:none; cursor:pointer; }
.branch-switch select option { color:#1d2433; background:#fff; }
.branch-banner { background:#e8f1ff; color:#16325c; padding:10px 5vw; font-size:14px; border-bottom:1px solid #c9dcfb; }
.branch-banner a { color:inherit; font-weight:700; }
button.linkbtn { background:none !important; border:0 !important; box-shadow:none !important; padding:0; color:inherit; font:inherit; font-weight:700; text-decoration:underline; cursor:pointer; min-height:0; transform:none !important; }
.sr-only { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; }
.br-table { font-size:14px; }
.br-table th { font-size:11.5px; padding:8px 5px; }
.br-table td { padding:9px 5px; }
.br-table td:first-child { min-width:150px; }
.br-table td.num, .br-table th.num { text-align:right; }
.br-table td.num { white-space:nowrap; }
.br-table tr.total td { font-weight:700; border-top:2px solid #1d2433; background:#f6f7fb; }
.br-table tr.is-here td:first-child { box-shadow:inset 4px 0 0 var(--band); }
.br-cards { display:grid; grid-template-columns:repeat(auto-fit, minmax(150px, 1fr)); gap:12px; margin:0 0 16px; }
.br-card { background:#fff; border:1px solid #e3e6ef; border-radius:14px; padding:14px 16px; }
.br-card b { display:block; font-size:24px; line-height:1.2; }
.br-card span { color:#5b6475; font-size:13px; }
.br-off { opacity:.6; }
@media print { .branch-switch, .branch-banner, .no-print { display:none !important; } }

/* Step 42: stylish all-branches report */
.rp-hero { position:relative; overflow:hidden; display:flex; flex-wrap:wrap; gap:18px; align-items:flex-end; justify-content:space-between;
  padding:26px 28px; border-radius:20px; color:#fff; background:linear-gradient(120deg, #0c4a6e 0%, #0369a1 55%, #0ea5e9 100%); box-shadow:0 14px 34px -18px rgba(3,105,161,.65); }
.rp-hero::after { content:""; position:absolute; right:-60px; top:-80px; width:260px; height:260px; border-radius:50%; background:rgba(255,255,255,.08); pointer-events:none; }
.rp-hero::before { content:""; position:absolute; right:120px; bottom:-120px; width:220px; height:220px; border-radius:50%; background:rgba(255,255,255,.06); pointer-events:none; }
.rp-hero h1 { color:#fff; margin:6px 0 4px; font-size:clamp(26px,3.6vw,36px); }
.rp-hero p { margin:0; opacity:.9; }
.rp-eyebrow { display:inline-flex; align-items:center; gap:6px; font-size:12.5px; font-weight:700; letter-spacing:.06em; text-transform:uppercase; background:rgba(255,255,255,.16); padding:4px 10px; border-radius:99px; }
.rp-eyebrow svg { width:16px; height:16px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linejoin:round; }
.rp-hero-tools { position:relative; z-index:1; display:flex; gap:8px; align-items:flex-end; flex-wrap:wrap; margin:0; }
.rp-hero-tools label { color:#fff; font-size:12.5px; gap:4px; }
.rp-hero-tools label span { opacity:.85; }
.rp-hero-tools input { background:rgba(255,255,255,.95); border:0; min-height:40px; border-radius:10px; }
a.rp-hbtn, button.rp-hbtn { display:inline-flex; align-items:center; min-height:40px; padding:0 14px; border-radius:10px; font-weight:600; font-size:14px; color:#fff !important;
  background:rgba(255,255,255,.16) !important; border:1px solid rgba(255,255,255,.4) !important; box-shadow:none !important; text-decoration:none; transform:none !important; }
a.rp-hbtn:hover, button.rp-hbtn:hover { background:rgba(255,255,255,.28) !important; }

.rp-kpis { display:grid; grid-template-columns:repeat(auto-fit, minmax(160px, 1fr)); gap:12px; }
.rp-kpi b { white-space:nowrap; }
.rp-kpi { --k:#0369a1; display:flex; flex-direction:column; gap:10px; align-items:flex-start; background:#fff; border:1px solid var(--line); border-radius:16px; padding:16px; position:relative; overflow:hidden; }
.rp-kpi::before { content:""; position:absolute; inset:0 auto 0 0; width:4px; background:var(--k); }
.rp-kpi.k2 { --k:#7c3aed; } .rp-kpi.k3 { --k:#0f766e; } .rp-kpi.k4 { --k:#1d4ed8; } .rp-kpi.k5 { --k:#c2410c; }
.rp-ico { flex:none; width:40px; height:40px; border-radius:12px; display:grid; place-items:center; background:color-mix(in srgb, var(--k) 12%, #fff); color:var(--k); }
.rp-ico svg { width:22px; height:22px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.rp-kpi > div { min-width:0; flex:1; display:grid; gap:4px; }
.rp-kpi small { color:var(--mute); font-size:12.5px; font-weight:600; }
.rp-kpi b { font-size:24px; line-height:1.15; letter-spacing:-.01em; }
.rp-kpi b span { font-size:16px; color:var(--mute); font-weight:600; }
.rp-kpi em { font-style:normal; color:var(--mute); font-size:12.5px; }
.rp-bar { display:block; height:7px; border-radius:99px; background:#e8eef4; overflow:hidden; }
.rp-bar i { display:block; height:100%; width:var(--w); border-radius:99px; background:var(--k, #0369a1); transition:width .6s ease; }
.t-good { --k:#15803d; } .t-ok { --k:#b45309; } .t-low { --k:#c4302b; } .t-none { --k:#94a3b8; }
.rp-split { display:block; width:100%; height:7px; border-radius:99px; background:#ec4899; overflow:hidden; }
.rp-split i { display:block; height:100%; width:var(--w); background:#0369a1; border-right:2px solid #fff; }

.rp-h2 { margin:6px 0 -8px; font-size:20px; }
.rp-branches { display:grid; grid-template-columns:repeat(auto-fill, minmax(250px, 1fr)); gap:14px; }
.rp-bcard { background:#fff; border:1px solid var(--line); border-radius:18px; padding:16px; display:grid; gap:12px; border-top:4px solid var(--c); transition:box-shadow .2s, transform .2s; }
.rp-bcard:hover { box-shadow:0 12px 26px -16px rgba(12,45,72,.45); transform:translateY(-2px); }
.rp-bcard.is-here { outline:2px solid color-mix(in srgb, var(--c) 45%, transparent); }
.rp-bcard.is-off { opacity:.6; }
.rp-bcard .rp-bhead { display:flex; gap:10px; align-items:center; }
.rp-bcard .rp-bhead > div { flex:1; min-width:0; display:grid; }
.rp-bcard .rp-bhead b { font-size:16px; line-height:1.25; }
.rp-bcard .rp-bhead small { color:var(--mute); font-size:12.5px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.rp-ini { flex:none; width:40px; height:40px; border-radius:12px; display:grid; place-items:center; color:#fff; font-weight:800; font-size:14px; background:var(--c); }
.rp-chip { font-size:11.5px; font-weight:700; padding:3px 8px; border-radius:99px; background:#eef2f7; color:#334155; }
.rp-chip.here { background:color-mix(in srgb, var(--c) 14%, #fff); color:var(--c); }
.rp-chip.off { background:#f8dcda; color:var(--red); }
.rp-nums { display:grid; grid-template-columns:repeat(3, 1fr); gap:6px; background:#f6f9fc; border-radius:12px; padding:10px 6px; text-align:center; }
.rp-nums b { display:block; font-size:20px; line-height:1.1; }
.rp-nums small { color:var(--mute); font-size:12px; }
.rp-meter { display:grid; grid-template-columns:1fr auto; gap:4px 8px; font-size:13px; color:var(--mute); }
.rp-meter b { color:var(--ink); font-size:13.5px; }
.rp-meter .rp-bar { grid-column:1 / -1; }
.rp-bar.c i { background:var(--c); }
.rp-bcard .rp-bfoot { display:flex; justify-content:space-between; align-items:center; gap:8px; padding-top:10px; border-top:1px solid var(--line); font-size:13.5px; color:var(--mute); }
.rp-bcard .rp-bfoot b { color:var(--ink); }
.rp-bcard .rp-bfoot form { margin:0; }
button.rp-open { min-height:34px; padding:0 14px; border-radius:99px; font-size:13.5px; background:var(--c) !important; border:0 !important; color:#fff; box-shadow:none !important; }

.rp-legend { display:flex; gap:14px; font-size:13px; color:var(--mute); }
.rp-legend span { display:inline-flex; align-items:center; gap:6px; }
.sw { width:12px; height:12px; border-radius:3px; display:inline-block; }
.sw.billed, .rp-pair i.billed { background:#0369a1; }
.sw.coll, .rp-pair i.coll { background:#14b8a6; }
.rp-cols { display:grid; grid-template-columns:repeat(6, 1fr); gap:10px; height:240px; align-items:end; padding:12px 0 0;
  background:repeating-linear-gradient(to top, transparent 0 calc(25% - 1px), #edf2f7 calc(25% - 1px) 25%); background-size:100% calc(100% - 46px); background-repeat:no-repeat; }
.rp-col { position:relative; height:100%; display:grid; grid-template-rows:1fr auto auto; justify-items:center; gap:4px; border-radius:10px; outline:none; }
.rp-col:hover, .rp-col:focus-visible { background:#f3f8fc; }
.rp-pair { height:100%; width:100%; display:flex; justify-content:center; align-items:flex-end; gap:2px; }
.rp-pair i { width:min(24px, 34%); height:var(--h); min-height:2px; border-radius:4px 4px 0 0; }
.rp-col:not(.is-now) .rp-pair i { opacity:.82; }
.rp-pct { font-size:12.5px; font-weight:700; }
.rp-col small { color:var(--mute); font-size:12.5px; }
.rp-col.is-now small { color:var(--ink); font-weight:700; }
.rp-tip { position:absolute; bottom:calc(100% - 30px); left:50%; transform:translate(-50%, -8px); z-index:3; white-space:nowrap; background:#0c2d48; color:#fff; font-size:12.5px; line-height:1.45;
  padding:8px 10px; border-radius:8px; pointer-events:none; opacity:0; transition:opacity .15s; }
.rp-col:hover .rp-tip, .rp-col:focus-visible .rp-tip { opacity:1; }
@media print {
  .rp-hero { background:#0369a1 !important; -webkit-print-color-adjust:exact; print-color-adjust:exact; box-shadow:none; }
  .rp-kpi, .rp-bcard, .rp-bar i, .rp-split, .rp-ini, .rp-pair i { -webkit-print-color-adjust:exact; print-color-adjust:exact; }
  .rp-bcard { break-inside:avoid; }
}
@media (max-width:600px) { .rp-hero { padding:20px; } .rp-cols { height:200px; gap:4px; } }

/* Step 42: Super Admin delete dummy data */
.demo-clean { border:1px solid #f3c9c6; background:linear-gradient(180deg, #fff 0%, #fff8f7 100%); }
.dc-grid { display:grid; grid-template-columns:repeat(auto-fit, minmax(120px, 1fr)); gap:10px; margin:6px 0 14px; }
.dc-grid div { background:#fff; border:1px solid #f1dcda; border-radius:12px; padding:10px 12px; display:grid; }
.dc-grid b { font-size:22px; line-height:1.15; color:#9f1d17; }
.dc-grid span { font-size:12.5px; color:var(--mute); }
.dc-form { display:grid; gap:12px; }
.dc-school { align-items:flex-start !important; background:#fff; border:1px dashed #e7b7b3; border-radius:12px; padding:10px 12px; }
.dc-school input { margin-top:3px !important; flex:none; }

/* Step 43: main Principal's overview of a branch */
.ov-team { list-style:none; margin:0; padding:0; display:grid; gap:10px; }
.ov-team li { padding:10px 12px; border:1px solid var(--line); border-radius:12px; background:#fbfdff; }
.ov-team li.off { opacity:.6; }
.ov-links { display:grid; grid-template-columns:repeat(auto-fill, minmax(140px, 1fr)); gap:8px; }
.ov-links a { display:block; padding:12px; border:1px solid var(--line); border-radius:12px; background:#fbfdff; text-decoration:none; color:var(--ink); font-weight:600; font-size:14.5px; }
.ov-links a:hover { border-color:var(--band); background:#eef7fd; }

/* Step 44: teacher position */
.t-pos { display:inline-block; width:max-content; max-width:100%; font-size:12px; font-weight:700; color:#5b21b6; background:#f1eafe; border-radius:99px; padding:1px 9px; margin:2px 0; }

/* Step 44: "Check this branch" overview (main Principal in another branch) */
.ov-wrap { display:grid; grid-template-columns:minmax(260px, 320px) 1fr; gap:18px; align-items:start; }
@media (max-width:860px) { .ov-wrap { grid-template-columns:1fr; } }
.ov-sec-title { display:flex; align-items:baseline; justify-content:space-between; gap:10px; margin:0 0 12px; }
.ov-sec-title span { font-size:13px; font-weight:800; letter-spacing:.07em; text-transform:uppercase; color:var(--mute); }
.ov-sec-title a { font-size:13.5px; font-weight:700; color:var(--band); text-decoration:none; }
.ov-sec-title em { font-style:normal; font-size:12.5px; color:var(--mute); }
.ov-team-card { background:#fff; border:1px solid var(--line); border-radius:20px; padding:18px; box-shadow:0 1px 2px rgba(12,45,72,.04); }
.ov-head { position:relative; display:flex; gap:12px; align-items:center; padding:14px; border-radius:16px; color:#fff;
  background:linear-gradient(135deg, #0c4a6e, #0369a1 60%, #0ea5e9); box-shadow:0 10px 24px -14px rgba(3,105,161,.7); }
.ov-head.off { filter:grayscale(.7); opacity:.75; }
.ov-head.empty { background:#f4f8fb; color:var(--ink); box-shadow:none; border:1.5px dashed #b9d3e6; }
.ov-head.empty a { color:var(--band); font-weight:700; }
.ov-head > div { display:grid; min-width:0; }
.ov-head small { font-size:11.5px; font-weight:700; letter-spacing:.05em; text-transform:uppercase; opacity:.8; }
.ov-head b { font-size:17px; line-height:1.25; }
.ov-head span:not(.ov-avatar):not(.ov-dot) { font-size:13px; opacity:.85; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.ov-avatar { flex:none; width:48px; height:48px; border-radius:14px; display:grid; place-items:center; font-weight:800; font-size:17px; background:rgba(255,255,255,.2); border:1.5px solid rgba(255,255,255,.45); }
.ov-head.empty .ov-avatar { background:#fff; border-color:#b9d3e6; color:var(--mute); }
.ov-dot { position:absolute; top:12px; right:12px; width:10px; height:10px; border-radius:50%; background:#cbd5e1; box-shadow:0 0 0 3px rgba(255,255,255,.25); }
.ov-dot.on { background:#4ade80; }
.ov-office { list-style:none; margin:12px 0 0; padding:0; display:grid; gap:6px; }
.ov-office li { display:flex; gap:10px; align-items:center; padding:8px 10px; border-radius:12px; background:#f7fafc; }
.ov-office li.off { opacity:.55; }
.ov-office li.none { color:var(--mute); font-size:13.5px; justify-content:center; background:none; border:1px dashed var(--line); }
.ov-office li > span:last-child { display:grid; line-height:1.3; }
.ov-office small { color:var(--mute); font-size:12.5px; }
.ov-mini { flex:none; width:32px; height:32px; border-radius:10px; display:grid; place-items:center; font-size:12.5px; font-weight:800; background:#e6f1fa; color:var(--band); }
.ov-team-foot { display:grid; grid-template-columns:repeat(3, 1fr); margin-top:14px; padding-top:14px; border-top:1px solid var(--line); text-align:center; }
.ov-team-foot div + div { border-left:1px solid var(--line); }
.ov-team-foot b { display:block; font-size:22px; line-height:1.1; }
.ov-team-foot small { color:var(--mute); font-size:12px; }

.ov-check { background:#fff; border:1px solid var(--line); border-radius:20px; padding:18px; box-shadow:0 1px 2px rgba(12,45,72,.04); }
.ov-tiles { display:grid; grid-template-columns:repeat(auto-fill, minmax(175px, 1fr)); gap:12px; }
.ov-tile { --k:#0369a1; position:relative; display:flex; flex-direction:column; gap:6px; padding:14px; border-radius:16px; text-decoration:none; color:var(--ink);
  background:linear-gradient(180deg, color-mix(in srgb, var(--k) 6%, #fff), #fff 70%); border:1px solid color-mix(in srgb, var(--k) 18%, #fff);
  transition:transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.ov-tile:hover, .ov-tile:focus-visible { transform:translateY(-3px); border-color:color-mix(in srgb, var(--k) 45%, #fff); box-shadow:0 14px 26px -18px color-mix(in srgb, var(--k) 70%, #000); outline:none; }
.ov-tile.k-green { --k:#15803d; } .ov-tile.k-amber { --k:#b45309; } .ov-tile.k-red { --k:#c4302b; } .ov-tile.k-blue { --k:#1d4ed8; }
.ov-tile.k-purple { --k:#7c3aed; } .ov-tile.k-teal { --k:#0f766e; } .ov-tile.k-slate { --k:#475569; } .ov-tile.k-pink { --k:#be185d; }
.ov-tile-top { display:flex; align-items:center; gap:8px; }
.ov-ico { flex:none; width:34px; height:34px; border-radius:10px; display:grid; place-items:center; background:var(--k); color:#fff; }
.ov-ico svg { width:19px; height:19px; fill:none; stroke:currentColor; stroke-width:1.9; stroke-linecap:round; stroke-linejoin:round; }
.ov-label { font-weight:700; font-size:14.5px; flex:1; }
.ov-arrow { width:18px; height:18px; fill:none; stroke:color-mix(in srgb, var(--k) 70%, #fff); stroke-width:2.2; stroke-linecap:round; stroke-linejoin:round; transition:transform .18s; }
.ov-tile:hover .ov-arrow { transform:translateX(3px); }
.ov-big { font-size:24px; line-height:1.15; margin-top:4px; letter-spacing:-.01em; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.ov-tile small { color:var(--mute); font-size:12.5px; line-height:1.4; }
.ov-meter { display:block; height:6px; border-radius:99px; background:color-mix(in srgb, var(--k) 12%, #eef2f6); overflow:hidden; }
.ov-meter i { display:block; height:100%; border-radius:99px; background:var(--k); }
.ov-note { margin:14px 0 0; padding:10px 12px; border-radius:12px; background:#f4f8fb; color:var(--mute); font-size:13.5px; }
.ov-wrap { grid-template-columns:minmax(240px, 280px) 1fr; }
.ov-tiles { grid-template-columns:repeat(4, minmax(0, 1fr)); gap:10px; }
.ov-tile { padding:12px; }
.ov-big { font-size:20px; }
.ov-label { font-size:13.5px; }
.ov-ico { width:30px; height:30px; border-radius:9px; }
@media (max-width:1000px) { .ov-tiles { grid-template-columns:repeat(2, minmax(0, 1fr)); } }

/* Step 45: Switch branch page (big clickable branch cards) */
.sb-head { display:flex; flex-wrap:wrap; gap:16px; align-items:flex-end; justify-content:space-between; }
.sb-head h1 { margin:6px 0 4px; }
.sb-head p { margin:0; color:var(--mute); max-width:640px; }
.sb-eyebrow { display:inline-block; font-size:13px; font-weight:700; color:var(--band); background:#e0f0fb; padding:4px 12px; border-radius:99px; }
a.sb-report { display:inline-flex; align-items:center; gap:6px; min-height:44px; padding:0 18px; border-radius:12px; background:#fff; border:1px solid var(--line);
  font-weight:700; color:var(--ink); text-decoration:none; box-shadow:0 1px 2px rgba(12,45,72,.06); }
a.sb-report:hover { border-color:var(--band); color:var(--band); }
.sb-grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(260px, 1fr)); gap:16px; }
.sb-form { margin:0; display:flex; }
button.sb-card, a.sb-card { all:unset; box-sizing:border-box; cursor:pointer; flex:1; display:flex; flex-direction:column; gap:10px; min-height:230px; padding:18px;
  border-radius:20px; background:#fff; border:1px solid var(--line); position:relative; overflow:hidden; color:var(--ink);
  box-shadow:0 1px 2px rgba(12,45,72,.05); transition:transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
button.sb-card::before { content:""; position:absolute; inset:0 0 auto 0; height:86px; background:linear-gradient(135deg, var(--c), color-mix(in srgb, var(--c) 55%, #fff)); }
button.sb-card > * { position:relative; }
button.sb-card:hover, button.sb-card:focus-visible, a.sb-card:hover, a.sb-card:focus-visible { transform:translateY(-4px); border-color:color-mix(in srgb, var(--c, #0369a1) 50%, #fff);
  box-shadow:0 18px 34px -20px color-mix(in srgb, var(--c, #0369a1) 80%, #000); }
button.sb-card:focus-visible, a.sb-card:focus-visible { outline:3px solid color-mix(in srgb, var(--c, #0369a1) 40%, transparent); outline-offset:2px; }
button.sb-card.is-here { border:2px solid var(--c); }
button.sb-card.is-off { opacity:.62; }
.sb-top { display:flex; justify-content:space-between; align-items:flex-start; }
.sb-ini { width:58px; height:58px; border-radius:16px; display:grid; place-items:center; font-size:20px; font-weight:800; color:var(--c); background:#fff;
  box-shadow:0 6px 16px -8px rgba(0,0,0,.35); margin-top:22px; }
.sb-tags { display:flex; gap:6px; flex-wrap:wrap; justify-content:flex-end; }
.sb-tag { font-size:11.5px; font-weight:800; padding:3px 9px; border-radius:99px; background:rgba(255,255,255,.9); color:#334155; }
.sb-tag.here { background:#fff; color:#15803d; }
.sb-tag.off { background:#fde2e1; color:var(--red); }
.sb-name { font-size:19px; font-weight:800; line-height:1.25; margin-top:2px; }
.sb-place { font-size:13.5px; color:var(--mute); }
.sb-nums { display:grid; grid-template-columns:repeat(3, 1fr); gap:6px; background:#f5f8fb; border-radius:12px; padding:9px 6px; text-align:center; font-size:12px; color:var(--mute); }
.sb-nums b { display:block; font-size:19px; color:var(--ink); line-height:1.15; }
.sb-foot { margin-top:auto; display:flex; justify-content:space-between; align-items:center; gap:8px; padding-top:10px; border-top:1px solid var(--line); font-size:13px; }
.sb-head-name { color:var(--mute); display:inline-flex; align-items:center; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.sb-go { flex:none; display:inline-flex; align-items:center; gap:6px; font-weight:800; color:#fff; background:var(--c); padding:7px 14px; border-radius:99px; }
.sb-go svg { width:16px; height:16px; fill:none; stroke:currentColor; stroke-width:2.4; stroke-linecap:round; stroke-linejoin:round; transition:transform .18s; }
button.sb-card:hover .sb-go svg { transform:translateX(3px); }
a.sb-card.sb-add { --c:#0369a1; align-items:center; justify-content:center; text-align:center; background:#f7fbfe; border:2px dashed #b9d3e6; box-shadow:none; }
.sb-plus { width:56px; height:56px; border-radius:50%; display:grid; place-items:center; font-size:30px; font-weight:300; color:var(--band); background:#e0f0fb; }
button.sb-card { background:#fff !important; color:var(--ink) !important; border:1px solid var(--line) !important; box-shadow:0 1px 2px rgba(12,45,72,.05) !important; filter:none !important;
  font:inherit !important; text-align:left; letter-spacing:normal; text-transform:none; min-height:230px; }
button.sb-card.is-here { border:2px solid var(--c) !important; }
button.sb-card:hover, button.sb-card:focus-visible { box-shadow:0 18px 34px -20px color-mix(in srgb, var(--c) 80%, #000) !important; border-color:color-mix(in srgb, var(--c) 50%, #fff) !important; }

/* Step 46: Branches page before any branch is added */
.rp-empty { display:flex; gap:18px; align-items:flex-start; }
.rp-empty-ico { flex:none; width:64px; height:64px; border-radius:18px; display:grid; place-items:center; font-size:32px; background:#e0f0fb; }
.rp-empty h2 { margin:0 0 6px; }
.rp-empty p { margin:0 0 8px; }
@media (max-width:600px) { .rp-empty { flex-direction:column; } }

/* Step 47: profile pictures */
.has-photo { overflow:hidden; padding:0 !important; }
.has-photo img { width:100%; height:100%; object-fit:cover; display:block; border-radius:inherit; }
.avatar.up-avatar { width:96px; height:96px; font-size:32px; box-shadow:0 6px 18px -8px rgba(12,45,72,.45); flex:none; }
.up-row { display:flex; gap:18px; align-items:center; flex-wrap:wrap; }
.up-btns { display:grid; gap:8px; flex:1; min-width:200px; }
.up-btns > button { justify-self:start; }
.pl-name { display:inline-flex; align-items:center; gap:10px; }
.pl-face, .sb-face { flex:none; width:30px; height:30px; border-radius:50%; display:inline-grid; place-items:center; font-size:12px; font-weight:800; background:#e0f0fb; color:var(--band); vertical-align:middle; }
.sb-face { width:26px; height:26px; font-size:11px; margin-right:6px; }
.ov-avatar.has-photo { border-radius:14px; }
.ov-mini.has-photo { border-radius:10px; }
.del-box { margin-top:10px; padding:14px; border:1px solid #f3c9c6; border-radius:12px; background:#fff8f7; display:grid; gap:8px; }
.del-box p { margin:0; }
details.del-branch summary { color:var(--red); font-weight:700; cursor:pointer; }

/* Step 48: main Principal looking at another branch = view only (saving is also blocked on the server) */
body.view-only main form[method="post" i],
body.view-only main a[href*="new=1"], body.view-only main a[href*="edit="], body.view-only main a[href*="&new"],
body.view-only main a[href*="action="], body.view-only main .t-assign, body.view-only main .t-acts,
body.view-only main [data-edit], body.view-only main .dash-forms { display:none !important; }
.vo-badge { display:inline-block; font-size:12px; font-weight:800; color:#fff; background:#16325c; padding:2px 9px; border-radius:99px; margin-right:4px; vertical-align:1px; }
body.view-only main .panel:has(> form[method="post" i]):not(:has(> :not(form[method="post" i], script, style))) { display:none !important; }

/* Step 49: supervisor main Principal, clear Delete branch, Premium Plus offer */
.sb-form { flex-direction:column; gap:6px; }
.sb-links { display:flex; gap:14px; justify-content:flex-end; padding:0 6px; font-size:13px; font-weight:600; }
.sb-links a { color:var(--muted, #5b6b7a); text-decoration:none; } .sb-links a:hover { text-decoration:underline; }
.sb-links .sb-del { color:#c4302b; }
.br-actions { display:flex; gap:10px; flex-wrap:wrap; align-items:center; margin-top:14px; padding-top:12px; border-top:1px dashed #e3e8ee; }
a.btn.br-del-btn, a.br-del-btn { background:#fff1f0 !important; color:#b42318 !important; border:1px solid #f5b5b0 !important; font-weight:700; }
a.btn.br-del-btn:hover { background:#c4302b !important; color:#fff !important; border-color:#c4302b !important; }
.bdel-box { position:static; margin-top:12px; padding:16px; border:2px solid #f3b4ae; border-radius:14px; background:#fff7f6; display:grid; gap:8px; scroll-margin-top:90px; }
.bdel-box h3 { margin:0; color:#b42318; } .bdel-box p { margin:0; }
.bdel-box .danger { background:#c4302b !important; color:#fff !important; border-color:#c4302b !important; }
.rp-del { font-size:12.5px; font-weight:700; color:#b42318; text-decoration:none; padding:4px 8px; border-radius:8px; }
.rp-del:hover { background:#fff1f0; }
.rp-bfoot { flex-wrap:wrap; gap:6px; }
details.add-head { margin-top:8px; border:1px dashed #b9cde0; border-radius:12px; padding:10px 12px; background:#f7fbff; }
details.add-head summary { font-weight:700; color:var(--brand, #0369a1); cursor:pointer; }
.br-count { margin-left:auto; align-self:flex-start; white-space:nowrap; font-size:12.5px; font-weight:700; padding:4px 10px; border-radius:999px; background:#eef6ff; color:#0b4a7a; border:1px solid #cfe3f5; }
.br-lock .btn { display:inline-flex; }
.tag.warn-tag { background:#fff4e0; color:#8a4b00; border:1px solid #f4d39a; }
.pp-offer { position:relative; margin:0 0 18px; padding:26px 26px 22px; border-radius:20px; color:#fff; overflow:hidden;
  background:radial-gradient(circle at 85% 10%, rgba(255,214,102,.35), transparent 40%), linear-gradient(135deg, #1e1b4b, #4c1d95 55%, #7c3aed); box-shadow:0 18px 40px rgba(76,29,149,.28); scroll-margin-top:90px; }
.pp-offer h2 { margin:8px 0 6px; color:#fff; font-size:22px; } .pp-offer p { margin:0 0 10px; color:#e9e5ff; max-width:640px; }
.pp-badge { display:inline-block; padding:4px 12px; border-radius:999px; background:#fcd34d; color:#3b2a00; font-weight:800; font-size:13px; }
.pp-price { display:flex; align-items:baseline; gap:10px; flex-wrap:wrap; margin:6px 0 10px; } .pp-price b { font-size:34px; color:#fde68a; } .pp-price span { color:#ddd6fe; }
.pp-offer ul { list-style:none; padding:0; margin:0 0 14px; display:grid; gap:4px; color:#f5f3ff; }
.pp-offer form { display:inline; }
.pp-btn { background:#fcd34d !important; color:#3b2a00 !important; border:0 !important; font-weight:800; padding:12px 22px; border-radius:12px; font-size:16px; cursor:pointer; }
.pp-later { margin-left:14px; color:#ddd6fe; font-weight:600; }
.pp-sent { background:rgba(255,255,255,.14); padding:10px 14px; border-radius:12px; display:inline-block; }

/* Step 50: send parent login on WhatsApp */
.wa-btn { display:inline-flex; align-items:center; gap:7px; background:#25d366 !important; color:#fff !important; border:0 !important; border-radius:999px; padding:9px 16px; font-weight:700; font-size:14px; text-decoration:none; cursor:pointer; box-shadow:0 4px 12px rgba(37,211,102,.28); }
.wa-btn:hover { background:#1ebe5b !important; }
.wa-btn.sm { padding:6px 12px; font-size:13px; min-height:0; }
.wa-ico { width:18px; height:18px; flex:none; } .wa-btn.sm .wa-ico { width:15px; height:15px; }
.slip-wa { display:flex; align-items:center; gap:10px; flex-wrap:wrap; margin-top:10px; padding-top:10px; border-top:1px dashed #cfd8e1; }
.slip.slip-focus { border:2px solid #25d366; box-shadow:0 0 0 4px rgba(37,211,102,.15); scroll-margin-top:90px; }

/* ===== Step 51: phone menu (burger ☰ + side drawer, built by assets/js/pwa.js) ===== */
.nav-burger, .nav-drawer, .nav-shade { display:none; }
@media (max-width:760px) {
  html.has-burger header nav, body:not(:has(.tabbar)) header > nav { display:none; }
  header { flex-wrap:nowrap; gap:10px; }
  header .brand { min-width:0; }
  .nav-burger { display:inline-grid; place-items:center; flex:none; width:42px; height:42px; min-height:0; padding:0; border-radius:12px; order:-1;
    background:rgba(255,255,255,.16) !important; border:1px solid rgba(255,255,255,.35) !important; color:#fff; cursor:pointer; }
  .nav-burger:hover, html.nav-open .nav-burger { background:rgba(255,255,255,.28) !important; }
  .nav-burger:focus-visible { outline:3px solid rgba(255,255,255,.7); outline-offset:2px; }
  .nav-burger svg { width:24px; height:24px; fill:none; stroke:currentColor; stroke-width:2.2; stroke-linecap:round; }

  .nav-shade { display:block; position:fixed; inset:0; z-index:90; background:rgba(8,32,52,.45); opacity:0; transition:opacity .25s ease;
    -webkit-backdrop-filter:blur(2px); backdrop-filter:blur(2px); }
  .nav-shade[hidden] { display:none; }
  html.nav-open .nav-shade { opacity:1; }
  html.nav-open, html.nav-open body { overflow:hidden; }

  .nav-drawer { display:flex; flex-direction:column; position:fixed; top:0; bottom:0; left:0; z-index:95; width:min(310px, 86vw);
    background:#fff; box-shadow:8px 0 32px rgba(3,40,70,.25); transform:translateX(-104%); transition:transform .26s cubic-bezier(.3,.7,.3,1);
    visibility:hidden; }
  html.nav-open .nav-drawer { transform:none; visibility:visible; }
  .nd-head { position:relative; color:#fff; padding:calc(16px + env(safe-area-inset-top)) 16px 16px;
    background:linear-gradient(135deg, #0369a1 0%, #0284c7 55%, #0ea5e9 100%); }
  .nd-brand { display:flex; flex-direction:column; line-height:1; color:#fff; text-decoration:none; padding-right:44px; }
  .nd-close { position:absolute; top:calc(12px + env(safe-area-inset-top)); right:12px; width:38px; height:38px; min-height:0; padding:0; border-radius:50%;
    display:grid; place-items:center; background:rgba(255,255,255,.18) !important; border:0 !important; box-shadow:none !important; color:#fff; cursor:pointer; }
  .nd-close svg { width:20px; height:20px; fill:none; stroke:currentColor; stroke-width:2.2; stroke-linecap:round; }
  .nd-user { display:flex; gap:12px; align-items:center; margin-top:14px; padding:10px 12px; border-radius:12px; background:rgba(255,255,255,.14);
    font-size:13.5px; line-height:1.4; min-width:0; }
  .nd-user > div { min-width:0; overflow:hidden; }
  .nd-user b { font-size:15px; }
  .nd-user .mute { color:rgba(255,255,255,.85); font-size:12.5px; word-break:break-word; }
  .nd-user .avatar.big { width:44px; height:44px; box-shadow:0 0 0 2px rgba(255,255,255,.7); }
  .nd-body { position:relative; flex:1; overflow-y:auto; overscroll-behavior:contain; padding:8px 10px calc(18px + env(safe-area-inset-bottom)); }
  .nd-sec { padding:6px 0; }
  .nd-sec + .nd-sec { border-top:1px solid var(--line); }
  .nd-title { margin:8px 10px 6px; font-size:11.5px; font-weight:700; letter-spacing:.8px; text-transform:uppercase; color:var(--mute); }
  .nav-drawer a, .nav-drawer form button.logout { display:flex; align-items:center; gap:14px; width:100%; min-height:46px; padding:0 12px; border-radius:12px;
    color:var(--ink); text-decoration:none; font:inherit; font-size:15.5px; font-weight:500; text-align:left; background:none !important; border:0 !important;
    box-shadow:none !important; cursor:pointer; }
  .nav-drawer .nd-brand { flex-direction:column; align-items:flex-start; gap:0; width:auto; padding:0 44px 0 0; min-height:0; border-radius:0; color:#fff; }
  [dir=rtl] .nav-drawer .nd-brand { padding:0 0 0 44px; }
  .nav-drawer a svg, .nav-drawer form button.logout svg { width:21px; height:21px; flex:none; fill:none; stroke:currentColor; stroke-width:1.8;
    stroke-linecap:round; stroke-linejoin:round; color:#0284c7; }
  .nav-drawer a:hover, .nav-drawer a:active { background:#eef7fd !important; }
  .nav-drawer a[aria-current] { background:linear-gradient(90deg, #e0f2fe, #f0f9ff) !important; color:#0369a1; font-weight:700;
    box-shadow:inset 3px 0 0 #0284c7 !important; }
  .nav-drawer a.nd-switch { margin:6px 0 2px; background:#fff7e6 !important; color:#7a4b00; font-weight:600; border:1px solid #f4d58d !important; }
  .nav-drawer a.nd-switch svg { color:#b7791f; }
  .nav-drawer form { margin:0; }
  .nav-drawer form button.logout { color:var(--red); margin-top:4px; }
  .nav-drawer form button.logout svg { color:var(--red); }
  .nav-drawer form button.logout:hover { background:#fdf0ef !important; }
  /* Right-to-left (Urdu): drawer opens from the right */
  [dir=rtl] .nav-drawer { left:auto; right:0; transform:translateX(104%); box-shadow:-8px 0 32px rgba(3,40,70,.25); }
  [dir=rtl] .nd-brand { padding:0 0 0 44px; }
  [dir=rtl] .nd-close { right:auto; left:12px; }
  [dir=rtl] .nav-drawer a, [dir=rtl] .nav-drawer form button.logout { text-align:right; }
  [dir=rtl] .nav-drawer a[aria-current] { box-shadow:inset -3px 0 0 #0284c7 !important; }
  html[dir=rtl].nav-open .nav-drawer { transform:none; }
}
@media (max-width:380px) { .brand-sub { display:none; } header { gap:8px; } }
@media print { .nav-burger, .nav-drawer, .nav-shade { display:none !important; } }
