:root {
  --bg: #f6f7fb; --panel: #ffffff; --ink: #0f172a; --ink-2: #334155; --muted: #64748b; --line: #e6e9f2;
  /* SmartIdara logo palette: navy #0a3a9e, sky #1e93f2, green #34b856 */
  --brand: #0a3a9e; --brand-2: #1e93f2; --accent: #34b856; --brand-ink: #ffffff; --brand-soft: #e8f2fe;
  --grad: linear-gradient(135deg, #0a3a9e 0%, #1e93f2 100%);
  --ok: #0f7a43; --ok-soft: #e6f6ed; --warn: #b45309; --warn-soft: #fef3e2; --bad: #c0262d; --bad-soft: #fdecec;
  --side-1: #061a4a; --side-2: #0a2c72; --side-ink: #c6d6f2; --side-mute: #8aa3cf; --side-hover: rgba(255,255,255,.08);
  --panel-2: #f8fafc; --line-2: #dfe3eb; --hover: #f5f8ff; --th-bg: #fafbfd; --input-bg: #ffffff;
  --side-bg: #ffffff; --side-text: #334155; --side-strong: #0f172a; --side-muted: #94a3b8; --side-active: #eef4ff;
  --top-bg: rgba(246,247,251,.85); --toast-bg: #0f172a;
  --radius: 16px; --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(15,23,42,.04), 0 6px 24px rgba(15,23,42,.05);
  --shadow-lg: 0 2px 4px rgba(15,23,42,.05), 0 18px 40px rgba(15,23,42,.10);
  /* chart tokens (validated categorical slots 1-3 + status palette) */
  --series-1: #2a78d6; --series-2: #eb6834; --series-3: #1baf7a;
  --st-good: #0ca30c; --st-warn: #fab219; --st-serious: #ec835a; --st-critical: #d03b3b;
  --grid: #eceef4; --axis: #c9cedb; --axis-ink: #8a90a2;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 15px/1.55 "Plus Jakarta Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  background: var(--bg); color: var(--ink); -webkit-font-smoothing: antialiased; }
html[dir="rtl"] body { font-family: "Noto Naskh Arabic", "Segoe UI", sans-serif; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
.ico { flex: none; vertical-align: middle; }

/* ---------- Layout & sidebar ---------- */
.layout { display: grid; grid-template-columns: 264px 1fr; min-height: 100vh; }
.side { background: linear-gradient(180deg, var(--side-1) 0%, var(--side-2) 100%); color: var(--side-ink);
  padding: 18px 12px; overflow-y: auto; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column;
  z-index: 40; /* above the page header and sticky table headings, so the Settings menu always opens on top */ }
.side .brand { padding: 8px 12px 18px; margin-bottom: 10px; border-bottom: 1px solid rgba(255,255,255,.08); min-width: 0; }
.side .brand .logo-link { display: inline-block; max-width: 100%; }
.side .brand .logo-link img { display: block; height: 26px; width: auto; max-width: 100%; object-fit: contain; }
.side .brand .school { margin-top: 14px; padding: 10px; border-radius: 12px; background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.08); display: flex; gap: 10px; align-items: center; min-width: 0; color: inherit; text-decoration: none; }
.side .brand .school:hover { background: rgba(255,255,255,.1); text-decoration: none; }
.side .brand .school-logo { width: 42px; height: 42px; border-radius: 10px; background: var(--panel); flex: none; display: grid; place-items: center;
  overflow: hidden; color: #0a3a9e; font-weight: 800; font-size: 18px; }
.side .brand .school-logo img { width: 100%; height: 100%; object-fit: contain; }
.side .brand .school-who { min-width: 0; display: flex; flex-direction: column; }
.side .brand b { display: block; color: #fff; font-size: 13.5px; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side .brand small { color: var(--side-mute); font-size: 12px; }
.side .nav-label { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--side-mute);
  padding: 8px 12px 6px; }
.side details { margin-bottom: 2px; }
.side summary { list-style: none; cursor: pointer; padding: 9px 12px; border-radius: 10px; color: #e6e8f6;
  font-weight: 600; font-size: 14px; display: flex; align-items: center; gap: 10px; transition: background .15s; }
.side summary .ico { opacity: .8; }
.side summary::after { content: ""; margin-inline-start: auto; width: 6px; height: 6px; border-right: 2px solid var(--side-mute);
  border-bottom: 2px solid var(--side-mute); transform: rotate(-45deg); transition: transform .2s; }
.side details[open] summary::after { transform: rotate(45deg); }
.side summary::-webkit-details-marker { display: none; }
.side summary:hover { background: var(--side-hover); }
.side details a { display: block; padding: 7px 12px 7px 40px; color: var(--side-ink); font-size: 13.5px; border-radius: 8px;
  position: relative; margin: 1px 0; }
html[dir="rtl"] .side details a { padding: 7px 40px 7px 12px; }
.side details a:hover { background: var(--side-hover); color: #fff; text-decoration: none; }
.side details a.active { background: rgba(30,147,242,.28); color: #fff; font-weight: 600; }
.side details a.active::before { content: ""; position: absolute; inset-inline-start: 24px; top: 50%; width: 6px; height: 6px;
  margin-top: -3px; border-radius: 50%; background: var(--accent); }
.side .foot { margin-top: auto; padding: 14px 8px 4px; border-top: 1px solid rgba(255,255,255,.08); font-size: 13px; }
.side .foot a { color: var(--side-ink); display: flex; gap: 10px; align-items: center; padding: 7px 8px; border-radius: 8px; }
.side .foot a:hover { background: var(--side-hover); color: #fff; text-decoration: none; }
.side .foot select { background: rgba(255,255,255,.06); color: #e6e8f6; border-color: rgba(255,255,255,.12); }
.side .foot select option { color: var(--ink); }
.side .me { display: flex; gap: 10px; align-items: center; padding: 10px 8px 0; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--grad); color: #fff; font-weight: 700;
  display: grid; place-items: center; font-size: 14px; flex: none; text-transform: uppercase; }
.side .me .who { min-width: 0; flex: 1; line-height: 1.3; }
.side .me .who b { color: #fff; font-size: 13px; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side .me .who small { color: var(--side-mute); font-size: 12px; }
.icon-btn { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); color: var(--side-ink);
  width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; cursor: pointer; }
.icon-btn:hover { background: rgba(255,255,255,.14); color: #fff; }

.main { padding: 0 32px 64px; min-width: 0; animation: rise .35s ease-out; }
.top { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap;
  margin: 0 -32px 22px; padding: 18px 32px; position: sticky; top: 0; z-index: 5;
  background: rgba(244,246,251,.82); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(230,233,242,.8); }
.top .no-print { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
h1 { font-size: 23px; margin: 0; letter-spacing: -.02em; }
h2 { font-size: 17px; margin: 26px 0 12px; letter-spacing: -.01em; }
.muted { color: var(--muted); }
.btn.menu-toggle { display: none; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .main, .card { animation: none !important; transition: none !important; } }

/* ---------- Cards & stats ---------- */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px;
  box-shadow: var(--shadow); }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.stat { position: relative; overflow: hidden; transition: transform .2s, box-shadow .2s; }
.stat:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.stat .label { color: var(--muted); font-size: 13px; font-weight: 600; }
.stat .value { font-size: 26px; font-weight: 800; margin-top: 2px; letter-spacing: -.02em; }
.stat .sub { font-size: 13px; color: var(--muted); }

/* ---------- Tables ---------- */
table { width: 100%; border-collapse: collapse; background: var(--panel); }
th, td { padding: 11px 14px; border-bottom: 1px solid var(--line); text-align: start; vertical-align: top; }
th { font-size: 12px; color: var(--muted); font-weight: 700; background: var(--panel-2); text-transform: uppercase; letter-spacing: .04em; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover td, table tr:hover td { background: var(--panel-2); }
td.num, th.num { text-align: end; font-variant-numeric: tabular-nums; }

/* Every on-screen data table (module lists, attendance, results, reports...) */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel);
  box-shadow: 0 1px 2px rgba(10,58,158,.04), 0 10px 30px rgba(10,58,158,.07); }
.table-wrap table { border-collapse: separate; border-spacing: 0; }
.table-wrap th { position: sticky; top: 0; z-index: 1; background: var(--brand); color: #fff; font-size: 12px; font-weight: 700;
  letter-spacing: .05em; padding: 14px 16px; white-space: nowrap; border-bottom: 0; }
.table-wrap tr:first-child th:first-child { border-start-start-radius: calc(var(--radius) - 1px); }
.table-wrap tr:first-child th:last-child { border-start-end-radius: calc(var(--radius) - 1px); }
/* <th> used as a row label (timetable days) or a totals row, not the header */
.table-wrap tbody tr:not(:first-child) th { position: static; background: var(--brand-soft); color: var(--brand);
  border-bottom: 1px solid #dbe8fb; border-radius: 0; text-transform: none; letter-spacing: 0; font-size: 13.5px; }
.table-wrap td { padding: 13px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; font-size: 14px; }
.table-wrap tbody tr:nth-child(even) td { background: var(--panel-2); }
.table-wrap tbody tr { transition: background .12s; }
.table-wrap tbody tr:hover td { background: var(--brand-soft); }
.table-wrap tbody tr td:first-child { box-shadow: inset 3px 0 0 transparent; transition: box-shadow .12s; }
.table-wrap tbody tr:hover td:first-child { box-shadow: inset 3px 0 0 var(--brand-2); }
html[dir="rtl"] .table-wrap tbody tr:hover td:first-child { box-shadow: inset -3px 0 0 var(--brand-2); }
.table-wrap td a:not(.act):not(.btn) { font-weight: 600; }
.table-wrap.tiny-wrap th, .table-wrap .tiny-cal th { padding: 8px 5px; letter-spacing: 0; }
.table-wrap .tiny-cal td { padding: 4px 5px; }
.table-wrap tbody tr.empty td, .table-wrap tbody tr.empty:hover td { background: var(--panel); box-shadow: none; }

/* Module list pages */
.data-card { display: flex; flex-direction: column; gap: 14px; }
.data-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.data-count { color: var(--muted); font-size: 14px; }
.data-count b { color: var(--ink); font-size: 16px; }
.data-search { position: relative; display: flex; align-items: center; width: 100%; max-width: 360px; }
.data-search > .ico { position: absolute; inset-inline-start: 13px; color: #94a3b8; pointer-events: none; }
.data-search input { max-width: none; height: 42px; padding-inline-start: 40px; padding-inline-end: 36px; border-radius: 12px;
  background: var(--panel); box-shadow: 0 1px 2px rgba(15,23,42,.04); }
.data-clear { position: absolute; inset-inline-end: 8px; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
  color: var(--muted); font-size: 18px; line-height: 1; }
.data-clear:hover { background: var(--brand-soft); color: var(--brand); text-decoration: none; }
.data-table .idx { width: 1%; color: var(--muted); font-variant-numeric: tabular-nums; font-size: 13px; }
.data-table th.idx { color: #fff; }
.data-table td:has(.money) { text-align: end; }
.money { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.nil { color: #c0c7d4; }
.who-cell { display: inline-flex; align-items: center; gap: 10px; }
.who-cell .ini { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: var(--grad); color: #fff; font-size: 12px; font-weight: 700; letter-spacing: .02em; }
.who-cell b { font-weight: 600; }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 8px; border-radius: 99px; font-size: 12px;
  font-weight: 700; white-space: nowrap; background: var(--panel-2); color: var(--ink-2); }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .8; }
.b-ok { background: var(--ok-soft); color: var(--ok); }
.b-warn { background: var(--warn-soft); color: var(--warn); }
.b-serious { background: #fff1e6; color: #b6470f; }
.b-bad { background: var(--bad-soft); color: var(--bad); }
.b-mute { background: var(--panel-2); color: var(--muted); }
.b-brand { background: var(--brand-soft); color: var(--brand); }
.b-zoom { background: var(--brand-soft); color: #1c5cab; }
.b-meet { background: var(--ok-soft); color: var(--ok); }
.b-teams { background: #efeefe; color: #4b4bb3; }
.empty-state { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 42px 16px; text-align: center; }
.empty-state .chip-ico { width: 52px; height: 52px; border-radius: 16px; margin-bottom: 6px; }
.empty-state b { font-size: 16px; }
.empty-state span { color: var(--muted); font-size: 14px; }
.pager { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 13.5px; }
.pager > div { display: flex; gap: 8px; align-items: center; }
.pager-num { padding: 0 6px; font-weight: 600; }

.confirm-del { max-width: 480px; margin: 24px auto; padding: 32px; text-align: center; }
.confirm-del .confirm-ico { width: 60px; height: 60px; border-radius: 18px; display: inline-grid; place-items: center;
  background: var(--bad-soft); color: var(--bad); margin-bottom: 12px; }
.confirm-del h2 { margin: 0 0 8px; font-size: 20px; }
.confirm-del p { color: var(--ink-2); margin: 0 0 24px; }
.confirm-del form { display: flex; gap: 10px; justify-content: center; }

/* Row action buttons (edit / delete) */
.acts { width: 1%; white-space: nowrap; text-align: end; }
th.acts-h { text-align: end; }
.act { position: relative; display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 10px;
  border: 1px solid transparent; transition: background .15s, color .15s, transform .15s, box-shadow .15s; vertical-align: middle; }
.act + .act { margin-inline-start: 6px; }
.act.edit { background: var(--brand-soft); color: var(--brand-2); border-color: #d4e6fd; }
.act.edit:hover { background: var(--brand-2); color: #fff; box-shadow: 0 6px 14px rgba(30,147,242,.35); transform: translateY(-1px); }
.act.del { background: var(--bad-soft); color: var(--bad); border-color: #f8d4d4; }
.act.del:hover { background: var(--bad); color: #fff; box-shadow: 0 6px 14px rgba(192,38,45,.3); transform: translateY(-1px); }
.act:hover { text-decoration: none; }
.act:focus-visible { outline: 3px solid rgba(30,147,242,.35); outline-offset: 2px; }
[data-tip]::after { content: attr(data-tip); position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translate(-50%, 4px);
  background: #0f172a; color: #fff; font-size: 11.5px; font-weight: 600; padding: 4px 8px; border-radius: 6px; white-space: nowrap;
  pointer-events: none; opacity: 0; transition: opacity .12s, transform .12s; z-index: 5; }
[data-tip]:hover::after, [data-tip]:focus-visible::after { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 9px 16px; border-radius: 10px;
  border: 1px solid transparent; background: var(--grad); color: var(--brand-ink); font: inherit; font-size: 14px; font-weight: 600;
  cursor: pointer; box-shadow: 0 4px 14px rgba(10,58,158,.25); transition: transform .15s, box-shadow .15s, filter .15s; }
.btn:hover { text-decoration: none; filter: brightness(1.06); transform: translateY(-1px); box-shadow: 0 8px 20px rgba(10,58,158,.3); }
.btn:active { transform: none; }
.btn.ghost { background: var(--panel); color: var(--ink-2); border-color: var(--line); box-shadow: 0 1px 2px rgba(15,23,42,.05); }
.btn.ghost:hover { border-color: var(--line-2); color: var(--brand); }
.btn.danger { background: var(--bad); box-shadow: 0 4px 14px rgba(192,38,45,.25); }
.btn.small { padding: 5px 11px; font-size: 13px; border-radius: 8px; }

/* ---------- Forms ---------- */
form.stack p, form.stack .field { margin: 0 0 16px; }
form.stack label { display: block; font-weight: 600; font-size: 13.5px; margin-bottom: 6px; color: var(--ink-2); }
input[type=text], input[type=number], input[type=date], input[type=time], input[type=password], input[type=email],
input[type=search], input[type=month], input[type=tel], input[type=url], select, textarea {
  font: inherit; padding: 9px 12px; border: 1px solid var(--line-2); border-radius: var(--radius-sm); background: var(--panel); width: 100%;
  max-width: 460px; color: var(--ink); transition: border-color .15s, box-shadow .15s; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px rgba(30,147,242,.18); }
select[multiple] { min-height: 120px; }
textarea { min-height: 100px; }
input[type=checkbox], input[type=radio] { accent-color: var(--brand); width: 16px; height: 16px; vertical-align: middle; }
.inline-form { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; }
form.inline-form { padding: 14px 16px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.inline-form input, .inline-form select { width: auto; }
.inline-form label { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.helptext { display: block; font-size: 12px; color: var(--muted); margin-top: 4px; }
.errorlist { color: var(--bad); margin: 6px 0; padding-inline-start: 18px; font-size: 13px; }
.errorlist.nonfield { list-style: none; padding: 10px 14px; background: var(--bad-soft); border-radius: var(--radius-sm); }

/* ---------- Messages & pills ---------- */
.msgs { list-style: none; padding: 0; margin: 0 0 18px; }
.msgs li { padding: 12px 16px; border-radius: 12px; margin-bottom: 8px; background: var(--ok-soft); color: var(--ok);
  border-inline-start: 4px solid currentColor; font-weight: 500; }
.msgs li.info { background: var(--brand-soft); color: var(--brand); }
.msgs li.error { background: var(--bad-soft); color: var(--bad); }
.msgs li.warning { background: var(--warn-soft); color: var(--warn); }

.pill { display: inline-block; padding: 2px 10px; border-radius: 99px; font-size: 12px; font-weight: 700; background: var(--panel-2); color: var(--ink-2); }
.pill.Paid, .pill.P { background: var(--ok-soft); color: var(--ok); }
.pill.Partial, .pill.L { background: var(--warn-soft); color: var(--warn); }
.pill.Overdue, .pill.A { background: var(--bad-soft); color: var(--bad); }

.att-choice { display: inline-flex; gap: 4px; }
.att-choice input { display: none; }
.att-choice label { padding: 4px 12px; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; font-weight: 700; font-size: 13px; background: var(--panel); transition: all .12s; }
.att-choice label:hover { border-color: var(--line-2); }
.att-choice input:checked + label.P { background: var(--ok); color: #fff; border-color: var(--ok); }
.att-choice input:checked + label.A { background: var(--bad); color: #fff; border-color: var(--bad); }
.att-choice input:checked + label.L { background: var(--warn); color: #fff; border-color: var(--warn); }

/* ---------- Home module tiles ---------- */
.module-card { display: flex; flex-direction: column; gap: 6px; }
.module-card .mhead { display: flex; gap: 12px; align-items: center; margin-bottom: 6px; }
.module-card a { display: flex; justify-content: space-between; align-items: center; padding: 6px 0; border-top: 1px dashed var(--line); color: var(--ink-2); font-weight: 500; }
.module-card a:hover { color: var(--brand); text-decoration: none; }
.chip-ico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); flex: none; }

/* ---------- Login ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; background: var(--panel); }
.auth-hero { position: relative; overflow: hidden; color: #fff; padding: 56px 64px; display: flex; flex-direction: column;
  background: radial-gradient(1200px 600px at 10% 10%, #0a3a9e 0%, transparent 60%),
              radial-gradient(900px 500px at 90% 90%, #1e93f2 0%, transparent 55%), #061a4a; }
.auth-hero::before { content: ""; position: absolute; inset: 0; opacity: .14;
  background-image: linear-gradient(rgba(255,255,255,.5) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.5) 1px, transparent 1px);
  background-size: 44px 44px; mask-image: radial-gradient(ellipse at 30% 40%, #000 20%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at 30% 40%, #000 20%, transparent 70%); }
.auth-hero .blob { position: absolute; border-radius: 50%; filter: blur(60px); opacity: .55; animation: float 12s ease-in-out infinite; }
.auth-hero .blob.a { width: 320px; height: 320px; background: #1e93f2; top: -80px; right: -60px; }
.auth-hero .blob.b { width: 260px; height: 260px; background: #34b856; opacity: .35; bottom: -60px; left: 20%; animation-delay: -6s; }
@keyframes float { 0%,100% { transform: translate(0,0); } 50% { transform: translate(20px,-24px); } }
.auth-hero > * { position: relative; }
.auth-hero .brandmark { display: flex; gap: 12px; align-items: center; font-weight: 700; font-size: 17px; }
.auth-hero .brandmark { flex-wrap: wrap; gap: 14px; }
.auth-hero .brandmark img { display: block; height: 32px; width: auto; max-width: 100%; }
.auth-hero .brandmark .tenant { padding-inline-start: 14px; border-inline-start: 1px solid rgba(255,255,255,.25);
  color: #dbe7fb; font-weight: 600; font-size: 15px; }.auth-hero h2 { font-size: 40px; line-height: 1.12; margin: auto 0 14px; letter-spacing: -.03em; max-width: 520px; }
.auth-hero h2 span { background: linear-gradient(90deg, #7cc4ff, #6ee08a); -webkit-background-clip: text; background-clip: text; color: transparent; }
.auth-hero p.lead { color: #c6d6f2; font-size: 16px; max-width: 460px; margin: 0 0 28px; }
.features { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; max-width: 520px; margin-bottom: auto; }
.features div { display: flex; gap: 10px; align-items: center; padding: 12px 14px; border-radius: 14px; font-size: 14px; font-weight: 600;
  background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.12); backdrop-filter: blur(8px); }
.features .ico { color: #6ee08a; }
.auth-hero .fine { color: #8aa3cf; font-size: 13px; margin-top: 32px; }
.auth-form { display: grid; place-items: center; padding: 40px 24px; }
.login-box { width: 100%; max-width: 400px; }
.login-box .back-home { display: inline-block; font-size: 13.5px; font-weight: 600; color: var(--muted); margin-bottom: 28px; }
.login-box .back-home:hover { color: var(--brand); text-decoration: none; }
.login-box h1 { font-size: 28px; margin-bottom: 6px; }
.login-box .muted { margin: 0 0 28px; }
.input-ico { position: relative; }
.input-ico > .ico { position: absolute; inset-inline-start: 13px; top: 50%; transform: translateY(-50%); color: #94a3b8; pointer-events: none; }
.input-ico input { padding-inline-start: 42px !important; max-width: none; height: 48px; border-radius: 12px; background: var(--panel-2); }
.input-ico input:focus { background: var(--panel); }
.input-ico .reveal { position: absolute; inset-inline-end: 8px; top: 50%; transform: translateY(-50%); background: none; border: 0;
  color: #94a3b8; cursor: pointer; padding: 6px; border-radius: 8px; }
.input-ico .reveal:hover { color: var(--brand); background: var(--brand-soft); }
.login-box .btn { width: 100%; height: 48px; font-size: 15px; border-radius: 12px; margin-top: 6px; }
.login-box .secure { display: flex; gap: 8px; align-items: center; justify-content: center; color: var(--muted); font-size: 12.5px; margin-top: 22px; }

/* ---------- Dashboard ---------- */
.hero { position: relative; overflow: hidden; border-radius: 20px; padding: 26px 28px; color: #fff; margin-bottom: 20px;
  background: radial-gradient(600px 300px at 100% 0%, rgba(52,184,86,.30), transparent 60%), var(--grad);
  box-shadow: 0 14px 40px rgba(10,58,158,.28); display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }
.hero::after { content: ""; position: absolute; right: -60px; bottom: -90px; width: 260px; height: 260px; border-radius: 50%;
  border: 40px solid rgba(255,255,255,.08); }
.hero h2 { margin: 0 0 4px; font-size: 24px; color: #fff; }
.hero p { margin: 0; color: #dcebfd; }
.hero .quick { display: flex; gap: 8px; flex-wrap: wrap; position: relative; z-index: 1; }
.hero .quick a { display: inline-flex; gap: 8px; align-items: center; padding: 9px 14px; border-radius: 12px; color: #fff; font-weight: 600; font-size: 13.5px;
  background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.22); backdrop-filter: blur(6px); transition: background .15s; }
.hero .quick a:hover { background: rgba(255,255,255,.24); text-decoration: none; }

.kpis { display: grid; gap: 16px; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 20px; }
@media (max-width: 1100px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .kpis { grid-template-columns: 1fr; } }
.kpi { display: flex; flex-direction: column; gap: 4px; min-height: 160px; }
.kpi .khead { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.kpi .chip-ico.c1 { background: var(--brand-soft); color: #1c5cab; }
.kpi .chip-ico.c2 { background: #e6f6ed; color: var(--ok); }
.kpi .chip-ico.c3 { background: #f3ecff; color: #6d28d9; }
.kpi .chip-ico.c4 { background: var(--bad-soft); color: var(--bad); }
.kpi .chip-ico.c5 { background: #fff1e6; color: #b6470f; }
.kpi .chip-ico.c6 { background: #e6f7f3; color: #0c7a5a; }
.kpi .value { font-size: 28px; }
.kpi .spark { margin-top: auto; height: 34px; }
.delta { display: inline-flex; gap: 3px; align-items: center; font-size: 12.5px; font-weight: 700; padding: 2px 8px; border-radius: 99px; white-space: nowrap; }
.delta.up { color: var(--ok); background: var(--ok-soft); }
.delta.down { color: var(--bad); background: var(--bad-soft); }
.delta.flat { color: var(--muted); background: var(--panel-2); }
.meter { height: 8px; border-radius: 99px; background: var(--panel-2); overflow: hidden; margin: 8px 0 4px; }
.meter > span { display: block; height: 100%; border-radius: 99px; background: var(--grad); }

.filterbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin: 6px 0 14px; }
.filterbar h2 { margin: 0; }
.seg { display: inline-flex; background: var(--panel-2); border-radius: 10px; padding: 3px; gap: 2px; }
.seg button { border: 0; background: transparent; font: inherit; font-size: 13px; font-weight: 600; color: var(--muted); padding: 5px 12px; border-radius: 8px; cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--panel); color: var(--ink); box-shadow: 0 1px 3px rgba(15,23,42,.12); }

.charts { display: grid; gap: 16px; grid-template-columns: repeat(12, minmax(0, 1fr)); margin-bottom: 16px; }
.span-12 { grid-column: span 12; } .span-8 { grid-column: span 8; } .span-7 { grid-column: span 7; }
.span-6 { grid-column: span 6; } .span-5 { grid-column: span 5; } .span-4 { grid-column: span 4; }
.chart-card { display: flex; flex-direction: column; min-width: 0; }
.chart-card .chead { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 10px; }
.chart-card h3 { margin: 0; font-size: 15px; letter-spacing: -.01em; }
.chart-card .csub { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.chart-card .tbl-toggle { border: 1px solid var(--line); background: var(--panel); color: var(--muted); font: inherit; font-size: 12px; font-weight: 600;
  border-radius: 8px; padding: 4px 9px; cursor: pointer; white-space: nowrap; }
.chart-card .tbl-toggle:hover { color: var(--brand); border-color: var(--line-2); }
.chart-card .tbl-toggle[aria-pressed="true"] { background: var(--brand-soft); color: var(--brand); border-color: transparent; }
.chart-card .ctable { display: none; max-height: 300px; overflow: auto; border: 1px solid var(--line); border-radius: 10px; }
.chart-card .ctable th, .chart-card .ctable td { padding: 6px 10px; font-size: 13px; }
.chart-card.show-table .ctable { display: block; }
.chart-card.show-table .plot { display: none; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--ink-2); margin-bottom: 6px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.plot { position: relative; }
.plot svg { display: block; width: 100%; overflow: visible; }
.plot .tick { font-size: 11px; fill: var(--axis-ink); font-variant-numeric: tabular-nums; }
.plot .dlabel { font-size: 11.5px; font-weight: 700; fill: var(--ink-2); paint-order: stroke; stroke: #fff; stroke-width: 4px; stroke-linejoin: round; }
.tip { position: absolute; pointer-events: none; z-index: 4; background: #0f172a; color: #fff; border-radius: 10px; padding: 8px 11px;
  font-size: 12.5px; line-height: 1.5; box-shadow: 0 10px 24px rgba(15,23,42,.25); white-space: nowrap; opacity: 0; transition: opacity .12s; }
.tip.on { opacity: 1; }
.tip b { display: block; font-size: 12px; color: #cbd5e1; font-weight: 600; margin-bottom: 2px; }
.tip i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-inline-end: 6px; }
.empty-chart { display: grid; place-items: center; text-align: center; color: var(--muted); font-size: 13.5px; min-height: 180px;
  border: 1px dashed var(--line); border-radius: 12px; padding: 16px; }

.hbars { display: flex; flex-direction: column; gap: 10px; }
.hbar { display: grid; grid-template-columns: minmax(70px, 30%) 1fr auto; gap: 10px; align-items: center; font-size: 13px; }
.hbar .hl { color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.hbar .track { height: 12px; border-radius: 0 4px 4px 0; background: var(--panel-2); position: relative; }
.hbar .fill { display: block; height: 100%; border-radius: 0 4px 4px 0; min-width: 2px; }
.hbar .hv { font-weight: 700; font-variant-numeric: tabular-nums; color: var(--ink); min-width: 48px; text-align: end; }

.stackbar { display: flex; gap: 2px; height: 16px; border-radius: 6px; overflow: hidden; margin: 6px 0 14px; background: var(--panel-2); }
.stackbar span { display: block; height: 100%; }
.s-Paid { background: var(--st-good); } .s-Partial { background: var(--st-warn); }
.s-Unpaid { background: var(--st-serious); } .s-Overdue { background: var(--st-critical); }
.status-list { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.status-list div { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 12px; background: var(--panel-2); font-size: 13px; }
.status-list .dot { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.status-list b { display: block; font-size: 15px; }
.status-list small { color: var(--muted); }
.big-ring { display: flex; gap: 18px; align-items: center; margin-bottom: 14px; }
.big-ring .rv { font-size: 30px; font-weight: 800; letter-spacing: -.02em; line-height: 1; }

.feed { list-style: none; margin: 0; padding: 0; }
.feed li { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.feed li:last-child { border-bottom: 0; }
.feed .who { flex: 1; min-width: 0; }
.feed .who b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feed .who small { color: var(--muted); }
.feed .amt { font-weight: 700; color: var(--ok); white-space: nowrap; }

/* ---------- LMS ---------- */
.lms-today { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); margin-bottom: 22px; }
.lms-today-card { display: flex; flex-direction: column; gap: 4px; }
.lms-today-card.live { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(52,184,86,.15), var(--shadow); }
.lms-today-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.lms-today-card .muted { font-size: 13px; }
.lms-time { font-weight: 700; font-size: 14px; margin: 4px 0 10px; }
.lms-today-card .btn { align-self: flex-start; }
.live-dot { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: var(--ok); }
.live-dot::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 0 0 rgba(52,184,86,.6); animation: pulse 1.6s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 8px rgba(52,184,86,0); } 100% { box-shadow: 0 0 0 0 rgba(52,184,86,0); } }

.plat { display: inline-block; padding: 3px 10px; border-radius: 99px; font-size: 12px; font-weight: 700; white-space: nowrap;
  background: var(--panel-2); color: var(--ink-2); }
.plat-zoom { background: var(--brand-soft); color: #1c5cab; }
.plat-meet { background: var(--ok-soft); color: var(--ok); }
.plat-teams { background: #efeefe; color: #4b4bb3; }

.lms-filter { margin-bottom: 18px; }
.lms-filter-title { display: block; font-size: 15px; margin-bottom: 12px; }
.lms-filter-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.lms-filter-row select { width: auto; min-width: 180px; }
.lms-search { display: flex; flex: 1; min-width: 260px; max-width: 560px; }
.lms-search .input-ico { flex: 1; display: block; }
.lms-search .input-ico input { height: 42px; border-radius: 10px 0 0 10px; }
.lms-search .btn { border-radius: 0 10px 10px 0; box-shadow: none; }
.table-wrap tr.paused td { color: var(--muted); }
.lms-join { display: inline-flex; gap: 6px; align-items: center; font-weight: 600; }

.lms-brief { margin-bottom: 16px; }
.lms-brief-meta { display: flex; gap: 10px 28px; flex-wrap: wrap; padding-bottom: 12px; margin-bottom: 12px; border-bottom: 1px solid var(--line); }
.lms-brief-meta span { font-size: 14px; }
.lms-brief-meta b { display: block; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.lms-brief p { margin: 0 0 10px; }
.pct { font-weight: 700; }
.pct.low { color: var(--bad); }
.pct.high { color: var(--ok); }
form.stack .field > div[id] { display: flex; flex-wrap: wrap; gap: 6px 16px; }
form.stack .field > div[id] label { display: inline-flex; gap: 6px; align-items: center; font-weight: 500; margin: 0; }

/* ---------- Digital library ---------- */
.lib-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.lib-book { display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.lib-book.paused { opacity: .7; }
.lib-cover { display: grid; place-items: center; height: 170px; background: var(--brand-soft); color: var(--brand); }
.lib-cover img { width: 100%; height: 100%; object-fit: cover; }
.lib-cover span { display: grid; justify-items: center; gap: 6px; }
.lib-cover em { font-style: normal; font-weight: 800; font-size: 12px; letter-spacing: .08em; }
.lib-body { display: flex; flex-direction: column; gap: 4px; flex: 1; padding: 14px 16px 16px; }
.lib-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 4px; }
.lib-title { font-size: 15px; line-height: 1.3; }
.lib-body .muted { font-size: 13px; }
.lib-meta { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); }
.lib-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: auto; padding-top: 10px; }
.lib-locked { display: inline-flex; gap: 5px; align-items: center; font-size: 12.5px; font-weight: 700; color: var(--warn);
  background: var(--warn-soft); padding: 4px 10px; border-radius: 99px; }
.lib-admin { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 12px; padding-top: 10px;
  border-top: 1px dashed var(--line); }
.lib-switch { display: inline-flex; gap: 6px; align-items: center; font-size: 13px; font-weight: 600; cursor: pointer; margin: 0; }
.lib-settings { display: flex; gap: 10px 22px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.lib-settings label { display: inline-flex; gap: 6px; align-items: center; margin: 0; font-weight: 600; }
.lib-note { display: flex; gap: 8px; align-items: center; padding: 10px 14px; border-radius: 10px; background: var(--warn-soft); color: var(--warn); }
.lib-rank { margin: 0; padding-inline-start: 20px; display: grid; gap: 8px; font-size: 13.5px; }
.lib-rank li span { display: inline-flex; gap: 4px; align-items: center; color: var(--muted); font-size: 12.5px; margin-inline-start: 6px; }
.lib-rank.plain { list-style: none; padding: 0; }
.lib-rank.plain li { display: flex; justify-content: space-between; border-bottom: 1px solid var(--line); padding-bottom: 6px; }
.lib-rank.plain li span { margin: 0; font-size: 13.5px; color: var(--ink-2); }
.lib-dash { display: grid; gap: 16px; grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(0, 2fr); }
.lib-dash > div { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; border-radius: 12px; background: var(--bg); }
.lib-dash .label { color: var(--muted); font-size: 12.5px; font-weight: 600; }
.lib-dash b { font-size: 24px; font-weight: 800; letter-spacing: -.02em; }
.lib-dash small { color: var(--muted); font-size: 12.5px; }
.lib-dash .lib-rank { margin-top: 6px; }
@media (max-width: 900px) { .lib-dash { grid-template-columns: repeat(3, minmax(0, 1fr)); } .lib-dash-top { grid-column: 1 / -1; } }
@media (max-width: 560px) { .lib-dash { grid-template-columns: 1fr; } }
.lib-reader-meta { margin-top: -6px; font-size: 13.5px; }
.lib-reader { width: 100%; height: calc(100vh - 190px); min-height: 520px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--panel); }

/* ---------- Download Center ---------- */
.side .nav-link { display: flex; align-items: center; gap: 10px; padding: 9px 12px; margin-bottom: 4px; border-radius: 10px;
  color: #e6e8f6; font-weight: 600; font-size: 14px; }
.side .nav-link .ico { opacity: .8; }
.side .nav-link:hover { background: var(--side-hover); text-decoration: none; color: #fff; }
.side .nav-link.active { background: rgba(30,147,242,.28); color: #fff; }
.dc-steps { display: grid; gap: 14px; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 20px; }
.dc-steps > div { display: flex; gap: 12px; align-items: flex-start; padding: 16px 18px; border-radius: var(--radius);
  background: var(--brand-soft); color: var(--brand); }
.dc-steps b { display: block; color: var(--ink); }
.dc-steps span { font-size: 13px; color: var(--ink-2); }
.dc-module { margin-bottom: 16px; padding: 0; overflow: hidden; }
.dc-head { display: flex; gap: 12px; align-items: center; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.dc-head h2 { margin: 0; font-size: 16px; }
.dc-row { display: flex; justify-content: space-between; align-items: center; gap: 12px 20px; flex-wrap: wrap; padding: 14px 20px;
  scroll-margin-top: 90px; }
.dc-row + .dc-row { border-top: 1px dashed var(--line); }
.dc-row:target { background: var(--panel-2); }
.dc-name b { display: block; font-size: 14.5px; }
.dc-name span { font-size: 12.5px; }
.dc-actions, .dc-export, .dc-import { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.dc-actions { gap: 10px 14px; }
.dc-export input[type=date] { width: 140px; padding: 5px 8px; font-size: 13px; }
.dc-file { position: relative; display: inline-flex; align-items: center; max-width: 190px; padding: 5px 11px; font-size: 13px;
  border: 1px dashed #b9c4da; border-radius: 8px; color: var(--muted); cursor: pointer; background: var(--panel-2); }
.dc-file span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dc-file input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.dc-file:hover { border-color: var(--brand-2); color: var(--brand); }
@media (max-width: 820px) { .dc-steps { grid-template-columns: 1fr; } }

/* ---------- Print sheets ---------- */
.print-sheet { background: #fff; max-width: 780px; margin: 0 auto; padding: 32px; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.print-sheet .head { text-align: center; border-bottom: 2px solid var(--ink); padding-bottom: 10px; margin-bottom: 14px; }
.print-sheet .head h1 { font-size: 22px; }
.print-sheet table tr:hover td { background: none; }
.copies { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.copies .copy { border: 1px dashed #999; padding: 10px; font-size: 13px; }
.copies table td, .copies table th { padding: 3px 4px; }
.sig { display: flex; justify-content: space-between; margin-top: 48px; }
.sig span { border-top: 1px solid var(--ink); padding-top: 4px; min-width: 160px; text-align: center; }
.tiny-cal td, .tiny-cal th { padding: 4px 5px; font-size: 12px; text-align: center; }

@media (max-width: 1100px) {
  .span-8, .span-7, .span-6, .span-5, .span-4 { grid-column: span 12; }
}
@media (max-width: 900px) {
  .auth { grid-template-columns: 1fr; }
  .auth-hero { padding: 32px 24px; }
  .auth-hero h2 { font-size: 28px; margin-top: 28px; }
  .features, .auth-hero .fine { display: none; }}
@media (max-width: 820px) {
  .layout { grid-template-columns: 1fr; }
  .side { display: none; position: fixed; inset: 0 22% 0 0; z-index: 20; height: auto; box-shadow: 20px 0 60px rgba(0,0,0,.35); }
  .side.open { display: flex; }
  .btn.menu-toggle { display: inline-flex; }
  .main { padding: 0 16px 48px; }
  .top { margin: 0 -16px 16px; padding: 12px 16px; }
  .copies { grid-template-columns: 1fr; }
  .hero { padding: 20px; }
  .status-list { grid-template-columns: 1fr; }
}
/* ---------- Public landing page ---------- */
.lp { background: var(--panel); }
.lp-wrap { max-width: 1160px; margin: 0 auto; padding: 0 24px; }
.lp-nav { position: sticky; top: 0; z-index: 30; background: rgba(255,255,255,.92); backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid transparent; transition: box-shadow .2s, border-color .2s; }
.lp-nav.scrolled { border-color: var(--line); box-shadow: 0 4px 20px rgba(15,23,42,.06); }
.lp-nav-in { display: flex; align-items: center; gap: 20px; height: 72px; }
.lp-logo img { display: block; height: 28px; width: auto; }
.lp-links { display: flex; align-items: center; gap: 4px; margin-inline-start: auto; }
.lp-links a { padding: 8px 12px; border-radius: 8px; color: var(--ink-2); font-weight: 600; font-size: 14.5px; }
.lp-links a:hover { color: var(--brand); background: var(--brand-soft); text-decoration: none; }
.lp-links a.active { color: var(--brand); }
.lp-links a.lp-login { margin-inline-start: 10px; padding: 7px 14px; color: var(--ink-2); background: var(--panel); }
.lp-links a.lp-login:hover { color: var(--brand); background: var(--panel); }
.lp-burger { display: none; margin-inline-start: auto; background: none; border: 1px solid var(--line); border-radius: 10px;
  width: 42px; height: 42px; color: var(--ink); cursor: pointer; place-items: center; }

.lp-eyebrow { display: inline-block; font-size: 12.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: #7cc4ff; margin-bottom: 14px; }
.lp-eyebrow.dark { color: var(--brand-2); }
.lp-btn-lg { padding: 13px 22px; font-size: 15px; border-radius: 12px; }

.lp-hero { position: relative; overflow: hidden; color: #fff; padding: 96px 0 104px;
  background: radial-gradient(1000px 520px at 5% 0%, #0a3a9e 0%, transparent 60%),
              radial-gradient(800px 480px at 100% 100%, #1e93f2 0%, transparent 55%), #061a4a; }
.lp-hero::before { content: ""; position: absolute; inset: 0; opacity: .12;
  background-image: linear-gradient(rgba(255,255,255,.5) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.5) 1px, transparent 1px);
  background-size: 44px 44px; mask-image: radial-gradient(ellipse at 30% 40%, #000 20%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at 30% 40%, #000 20%, transparent 70%); }
.lp-hero .blob { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .45; animation: float 12s ease-in-out infinite; }
.lp-hero .blob.a { width: 340px; height: 340px; background: #1e93f2; top: -100px; right: 10%; }
.lp-hero .blob.b { width: 260px; height: 260px; background: #34b856; opacity: .25; bottom: -80px; left: 30%; animation-delay: -6s; }
.lp-hero-in { position: relative; display: grid; grid-template-columns: 1.2fr 1fr; gap: 56px; align-items: center; }
.lp-hero h1 { font-size: 52px; line-height: 1.08; letter-spacing: -.035em; margin: 0 0 18px; }
.lp-hero h1 span { background: linear-gradient(90deg, #7cc4ff, #6ee08a); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lp-hero .lead { color: #c6d6f2; font-size: 17.5px; max-width: 540px; margin: 0 0 30px; }
.lp-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.btn.lp-ghost-dark { background: rgba(255,255,255,.08); color: #fff; border-color: rgba(255,255,255,.25); box-shadow: none; }
.btn.lp-ghost-dark:hover { background: rgba(255,255,255,.16); color: #fff; border-color: rgba(255,255,255,.4); }
.lp-points { list-style: none; margin: 0; padding: 22px; display: grid; gap: 6px; border-radius: 20px;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); backdrop-filter: blur(10px); }
.lp-points li { display: flex; gap: 14px; align-items: center; padding: 10px 8px; }
.lp-points li + li { border-top: 1px solid rgba(255,255,255,.08); }
.lp-points .ico { color: #6ee08a; flex: none; }
.lp-points b { display: block; font-size: 15px; }
.lp-points small { color: #a9bde3; font-size: 13px; }

.lp-sec { padding: 96px 0; }
.lp-sec.alt { background: var(--bg); }
.lp-sec h2 { font-size: 34px; letter-spacing: -.03em; line-height: 1.15; margin: 0 0 12px; }
.lp-head { text-align: center; max-width: 620px; margin: 0 auto 48px; }
.lp-head p { color: var(--muted); font-size: 16.5px; margin: 0; }

.lp-features { display: grid; gap: 16px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.lp-feature { display: flex; gap: 14px; align-items: flex-start; padding: 20px; border-radius: var(--radius);
  border: 1px solid var(--line); background: var(--panel); transition: border-color .2s, box-shadow .2s, transform .2s; }
.lp-feature:hover { border-color: #bcd8f8; box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.lp-feature b { display: block; font-size: 15px; margin-bottom: 2px; }
.lp-feature p { margin: 0; color: var(--muted); font-size: 13.5px; }

.lp-plans { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); align-items: stretch;
  max-width: 1000px; margin: 0 auto; }
.lp-plan { position: relative; display: flex; flex-direction: column; padding: 30px 28px; border-radius: 20px;
  background: var(--panel); border: 1px solid var(--line); box-shadow: var(--shadow); }
.lp-plan.featured { border: 2px solid var(--brand-2); box-shadow: 0 20px 50px rgba(10,58,158,.16); }
.lp-badge { position: absolute; top: -13px; left: 50%; transform: translateX(-50%); display: inline-flex; gap: 5px; align-items: center;
  background: var(--grad); color: #fff; font-size: 12px; font-weight: 700; padding: 5px 12px; border-radius: 99px; white-space: nowrap; }
.lp-plan h3 { margin: 0 0 10px; font-size: 18px; }
.lp-price { font-size: 40px; font-weight: 800; letter-spacing: -.03em; line-height: 1; color: var(--ink); }
.lp-price small { font-size: 16px; font-weight: 700; margin-inline-end: 4px; color: var(--muted); }
.lp-price span { font-size: 15px; font-weight: 600; color: var(--muted); letter-spacing: 0; }
.lp-plan ul { list-style: none; margin: 20px 0 24px; padding: 18px 0 0; border-top: 1px solid var(--line); display: grid; gap: 10px; }
.lp-plan li { display: flex; gap: 10px; align-items: center; font-size: 14.5px; font-weight: 600; color: var(--ink-2); }
.lp-plan li .ico { color: var(--brand-2); }
.lp-plan .btn { margin-top: auto; width: 100%; padding: 11px 16px; }

.lp-compare-title { text-align: center; font-size: 28px; letter-spacing: -.02em; margin: 72px 0 24px; }
.lp-compare { max-width: 1000px; margin: 0 auto; overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--panel); box-shadow: var(--shadow); }
.lp-compare table { min-width: 560px; }
.lp-compare th { background: var(--brand); color: #fff; font-size: 15px; text-transform: none; letter-spacing: 0; padding: 18px 22px; }
.lp-compare td { padding: 14px 22px; font-size: 14.5px; color: var(--ink); vertical-align: middle; }
.lp-compare td:first-child { font-weight: 600; }
.lp-compare .c { text-align: center; width: 20%; }
.lp-compare td.strong { font-weight: 800; }
.lp-compare tr.group td { background: var(--bg); color: var(--muted); font-size: 12px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .06em; padding: 10px 22px; }
.lp-compare tr:hover td { background: #f7fafe; }
.lp-compare tr.group:hover td { background: var(--bg); }
.lp-compare .yes { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%;
  background: var(--ok-soft); color: var(--accent); }
.lp-compare .yes .ico { stroke-width: 3; }
.lp-compare .no { color: #b6bdcc; font-weight: 700; }

.lp-split { display: grid; grid-template-columns: 1fr 1.25fr; gap: 56px; align-items: start; }
.lp-steps { list-style: none; counter-reset: s; margin: 28px 0 0; padding: 0; display: grid; gap: 18px; }
.lp-steps li { counter-increment: s; display: grid; grid-template-columns: 38px 1fr; column-gap: 14px; }
.lp-steps li::before { content: counter(s); grid-row: span 2; width: 38px; height: 38px; border-radius: 12px; display: grid;
  place-items: center; background: var(--brand-soft); color: var(--brand); font-weight: 800; }
.lp-steps b { font-size: 15px; }
.lp-steps span { color: var(--muted); font-size: 14px; }
.lp-contact { list-style: none; margin: 28px 0 0; padding: 0; display: grid; gap: 14px; }
.lp-contact li { display: flex; gap: 12px; align-items: center; font-weight: 600; }
.lp-contact .ico { color: var(--brand); width: 40px; height: 40px; padding: 10px; border-radius: 12px; background: var(--brand-soft); }

.lp-form-card { padding: 28px; border-radius: 20px; box-shadow: var(--shadow-lg); }
.lp-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 18px; margin-bottom: 20px; }
.lp-field.wide { grid-column: 1 / -1; }
.lp-field label { display: block; font-weight: 600; font-size: 13.5px; margin-bottom: 6px; color: var(--ink-2); }
.lp-field label em { color: var(--bad); font-style: normal; }
.lp-form input, .lp-form select, .lp-form textarea { max-width: none; height: 46px; border-radius: 12px; background: #f8f9fc; }
.lp-form textarea { height: auto; }
.lp-form input:focus, .lp-form select:focus, .lp-form textarea:focus { background: #fff; }
.lp-form .btn { width: 100%; }
.lp-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.lp-sent { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; margin-bottom: 20px; border-radius: 12px;
  background: var(--ok-soft); color: var(--ok); }
.lp-sent b { display: block; }
.lp-sent span { color: var(--ink-2); font-size: 14px; }

.lp-foot { color: #b9cbe8; padding: 64px 0 96px; position: relative; overflow: hidden;
  background: radial-gradient(900px 400px at 0% 0%, rgba(30,147,242,.22), transparent 60%),
              radial-gradient(700px 380px at 100% 100%, rgba(52,184,86,.14), transparent 60%),
              linear-gradient(160deg, #061a4a 0%, #0a2c72 55%, #082a5e 100%); }
.ft-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 36px; }
.ft-brand img { height: 34px; width: auto; }
.ft-tag { color: #fff; font-weight: 700; margin: 14px 0 10px; font-size: 15px; }
.ft-brand p:last-child { margin: 0; line-height: 1.7; font-size: 14.5px; max-width: 420px; }
.ft-col { display: flex; flex-direction: column; gap: 14px; }
.ft-col h4, .ft-col .ft-h { margin: 4px 0 6px; font-size: 17px; color: #ffd27a; letter-spacing: .01em; }
.ft-col:nth-child(3) h4 { color: #7fd2ff; } .ft-col:nth-child(4) h4 { color: #fff; }
.ft-col a, .ft-col span { display: flex; align-items: flex-start; gap: 10px; color: #dbe6f7; font-size: 14.5px; line-height: 1.4; }
.ft-col a:hover { color: #fff; text-decoration: none; }
.ft-col .ico { width: 16px; height: 16px; flex: none; margin-top: 2px; color: #7fd2ff; }
.ft-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; margin-top: 44px; }
.ft-card { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: 16px; color: #fff;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); transition: background .15s, transform .15s; min-width: 0; }
.ft-card:hover { background: rgba(255,255,255,.11); transform: translateY(-2px); text-decoration: none; color: #fff; }
.ft-card b { display: block; font-size: 15.5px; }
.ft-card small { display: block; font-size: 14.5px; color: #dbe6f7; overflow-wrap: anywhere; }
.ft-ico { width: 50px; height: 50px; border-radius: 14px; display: grid; place-items: center; flex: none; color: #fff; }
.ft-ico .ico { width: 22px; height: 22px; }
.ft-ico.c-gold { background: linear-gradient(135deg, #f5b301, #d98a00); }
.ft-ico.c-red { background: linear-gradient(135deg, #ef4444, #b91c1c); }
.ft-ico.c-blue { background: linear-gradient(135deg, #4f8df5, #2b5fd9); }
.ft-ico.c-green { background: linear-gradient(135deg, #25D366, #128c4b); }
.ft-bottom { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 36px; padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,.1); font-size: 13px; }
.ft-bottom b { color: #ffd27a; }
@media (max-width: 980px) { .ft-grid { grid-template-columns: 1fr 1fr; } .ft-brand { grid-column: 1 / -1; } }
@media (max-width: 560px) { .ft-grid { grid-template-columns: 1fr; } .lp-foot { padding-top: 48px; } }

@media (max-width: 980px) {
  .lp-hero-in, .lp-split { grid-template-columns: 1fr; gap: 40px; }
  .lp-features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lp-hero h1 { font-size: 40px; }
}
@media (max-width: 960px) {
  .lp-nav .lp-cta { display: none; }
  .lp-burger { display: grid; }
  .lp-links { display: none; position: absolute; top: 72px; left: 0; right: 0; flex-direction: column; align-items: stretch;
    gap: 2px; padding: 10px 16px 18px; background: #fff; border-bottom: 1px solid var(--line); box-shadow: 0 16px 30px rgba(15,23,42,.1); }
  .lp-nav.open .lp-links { display: flex; }
  .lp-links a { padding: 12px 14px; }
  .lp-links a.lp-login { margin: 8px 0 0; justify-content: center; }
}
@media (max-width: 600px) {
  .lp-wrap { padding: 0 16px; }
  .lp-hero { padding: 64px 0 72px; }
  .lp-hero h1 { font-size: 34px; }
  .lp-sec { padding: 64px 0; }
  .lp-sec h2 { font-size: 27px; }
  .lp-features, .lp-grid { grid-template-columns: 1fr; }
  .lp-form-card { padding: 20px; }
}

@media print {
  .side, .top, .no-print, .msgs { display: none !important; }
  .layout { display: block; }
  .main { padding: 0; animation: none; }
  body { background: #fff; }
  .card, .table-wrap { box-shadow: none; }
  .print-sheet { border: 0; padding: 0; max-width: none; box-shadow: none; }
}

/* ---------- Parent portal ---------- */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
.ward-card { display: flex; gap: 12px; align-items: center; padding: 12px; margin: 0 0 8px; border-radius: 12px;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.08); min-width: 0; }
.ward-photo { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; flex: none; border: 2px solid rgba(255,255,255,.25); }
.ward-initial { display: grid; place-items: center; background: var(--grad); color: #fff; font-weight: 800; font-size: 18px; }
.ward-who { min-width: 0; display: flex; flex-direction: column; }
.ward-who b { color: #fff; font-size: 14px; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ward-who small { color: var(--side-mute); font-size: 12px; }
.ward-who .ward-id { color: #7fd99a; }
.ward-switch { margin: 0 0 6px; }
.ward-switch select { width: 100%; background: rgba(255,255,255,.06); color: #e6e8f6; border: 1px solid rgba(255,255,255,.14);
  border-radius: 8px; padding: 7px 8px; font: inherit; font-size: 13px; }
.ward-switch select option { color: var(--ink); }
.nav-count { margin-inline-start: auto; min-width: 22px; padding: 1px 7px; border-radius: 99px; background: #ef4444; color: #fff;
  font-size: 11.5px; font-weight: 700; text-align: center; }
.preview-bar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; padding: 10px 14px; margin-bottom: 16px;
  border-radius: 12px; background: var(--warn-soft); color: var(--warn); font-size: 14px; }
.preview-bar select { width: auto; max-width: 320px; }
.pp-head { display: flex; gap: 16px; align-items: center; margin-bottom: 18px; }
.pp-head .ward-photo { width: 64px; height: 64px; border-color: var(--line); }
.pp-head h2 { margin: 0; font-size: 20px; }
.pp-grid { display: grid; gap: 16px; grid-template-columns: repeat(12, minmax(0, 1fr)); }
.pp-grid > .span-12 { grid-column: span 12; } .pp-grid > .span-8 { grid-column: span 8; }
.pp-grid > .span-7 { grid-column: span 7; } .pp-grid > .span-5 { grid-column: span 5; } .pp-grid > .span-4 { grid-column: span 4; }
@media (max-width: 960px) { .pp-grid > [class*="span-"] { grid-column: span 12; } }
.card h3 { margin: 0 0 12px; font-size: 15px; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.card h3 a { font-size: 13px; font-weight: 600; }
.child-card { display: flex; flex-direction: column; gap: 12px; }
.child-card .child-top { display: flex; gap: 12px; align-items: center; }
.child-card .child-top .ward-photo { width: 48px; height: 48px; border-color: var(--line); }
.child-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.child-stats div { background: var(--panel-2); border-radius: 10px; padding: 10px; }
.child-stats small { display: block; color: var(--muted); font-size: 12px; }
.child-stats b { font-size: 16px; white-space: nowrap; }
.list-rows { list-style: none; margin: 0; padding: 0; }
.list-rows li { display: flex; gap: 10px; align-items: flex-start; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--line); }
.list-rows li:last-child { border-bottom: 0; }
.list-rows .sub { color: var(--muted); font-size: 13px; }
.tabs { display: inline-flex; background: var(--panel-2); border-radius: 10px; padding: 3px; gap: 2px; }
.tabs a { font-size: 13px; font-weight: 600; color: var(--muted); padding: 6px 12px; border-radius: 8px; }
.tabs a:hover { text-decoration: none; color: var(--ink); }
.tabs a.on { background: var(--panel); color: var(--ink); box-shadow: 0 1px 3px rgba(15,23,42,.12); }
.tabs .n { margin-inline-start: 4px; color: var(--muted); font-weight: 500; }
.inbox-filter { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.inbox-filter input { width: auto; }
.inbox-row { display: grid; grid-template-columns: 34px 92px 1fr auto; gap: 14px; align-items: start; padding: 14px 16px;
  border-bottom: 1px solid var(--line); }
.inbox-row:last-child { border-bottom: 0; }
.inbox-row.unread { background: var(--panel-2); }
.inbox-row.unread .inbox-title { font-weight: 700; }
.inbox-row .inbox-title { color: var(--ink); font-weight: 500; }
.inbox-row .inbox-title:hover { color: var(--brand); }
.inbox-date { font-size: 12.5px; color: var(--muted); }
.star-btn { border: 0; background: none; cursor: pointer; padding: 2px; color: #c4c9d6; line-height: 0; }
.star-btn.on { color: #f5a524; }
.star-btn.on svg { fill: currentColor; }
.tag { display: inline-block; padding: 1px 8px; border-radius: 6px; font-size: 11.5px; font-weight: 600; background: var(--panel-2); color: var(--ink-2); margin: 4px 4px 0 0; }
.tag.new { background: var(--ok-soft); color: var(--ok); }
@media (max-width: 700px) {
  .inbox-row { grid-template-columns: 30px minmax(0, 1fr); row-gap: 6px; padding: 12px; }
  .inbox-row > :first-child { grid-row: 1 / span 3; }
  .inbox-row > :not(:first-child) { grid-column: 2; }
  .inbox-date-col { display: flex; gap: 8px; align-items: center; }
  .inbox-date-col .tag { margin: 0; }
}
.cal { width: 100%; border-collapse: separate; border-spacing: 6px; }
.cal th { background: none; color: var(--muted); font-size: 12px; text-transform: uppercase; padding: 4px; text-align: center; }
.cal td { border: 0; padding: 0; text-align: center; vertical-align: middle; }
.cal .day { height: 54px; border-radius: 10px; background: var(--panel-2); display: flex; flex-direction: column; align-items: center;
  justify-content: center; font-weight: 600; font-size: 14px; gap: 2px; }
.cal .day small { font-size: 10.5px; font-weight: 700; letter-spacing: .02em; }
.cal .day.out { background: transparent; color: #c4c9d6; }
.cal .day.P { background: var(--ok-soft); color: var(--ok); }
.cal .day.A { background: var(--bad-soft); color: var(--bad); }
.cal .day.L { background: var(--warn-soft); color: var(--warn); }
.cal .day.today { outline: 2px solid var(--brand-2); }
.cal .day.sun { color: #b8bfcf; }
.legend-row { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.legend-row span::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-inline-end: 6px; vertical-align: -1px; background: var(--c); }
.prose { white-space: pre-wrap; line-height: 1.7; }
.chat { display: flex; flex-direction: column; gap: 10px; }
.bubble { max-width: 78%; padding: 10px 14px; border-radius: 14px; background: var(--panel-2); }
.bubble.mine { align-self: flex-end; background: var(--brand-soft); }
.bubble small { display: block; color: var(--muted); font-size: 12px; margin-bottom: 2px; }
.news-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.news-card { padding: 0; overflow: hidden; }
.news-card img { width: 100%; height: 160px; object-fit: cover; display: block; }
.news-card .nb { padding: 14px 16px; }
.news-card h4 { margin: 4px 0 6px; font-size: 15px; }
.dl-row { display: flex; gap: 12px; align-items: center; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--line); }
.dl-row:last-child { border-bottom: 0; }
.dl-row .dl-name { display: flex; gap: 12px; align-items: center; min-width: 0; }
.kv { display: grid; grid-template-columns: 180px 1fr; gap: 0; }
.kv div { padding: 10px 0; border-bottom: 1px solid var(--line); }
.kv div:nth-child(odd) { color: var(--muted); font-size: 13.5px; }
@media (max-width: 600px) { .kv { grid-template-columns: 1fr; } .kv div:nth-child(odd) { border-bottom: 0; padding-bottom: 0; } }
@media print { .preview-bar { display: none !important; } }

/* ---------- Top search ---------- */
.top-right { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.top-search { position: relative; display: flex; align-items: center; }
.top-search > .ico { position: absolute; inset-inline-start: 12px; color: #94a3b8; pointer-events: none; }
.top-search input[type=search] { width: 270px; max-width: 60vw; height: 40px; padding-inline-start: 38px; padding-inline-end: 34px;
  border-radius: 11px; background: var(--panel); border: 1px solid var(--line); font-size: 14px; }
.top-search input[type=search]:focus { border-color: var(--brand-2); box-shadow: 0 0 0 3px rgba(30,147,242,.15); outline: none; }
.top-search kbd { position: absolute; inset-inline-end: 10px; font: 600 11px/1 inherit; color: var(--muted); background: var(--panel-2);
  border: 1px solid var(--line); border-radius: 5px; padding: 3px 6px; pointer-events: none; }
.top-search input:focus + kbd, .top-search input:not(:placeholder-shown) + kbd { display: none; }
@media (max-width: 820px) { .top-search input[type=search] { width: 100%; } .top-search { flex: 1 1 100%; order: 2; } }
/* search icon inside list search boxes: keep the text clear of the icon */
.data-search input[type=search], .data-search input { padding-inline-start: 40px !important; }

/* ---------- Sidebar sections ---------- */
.side .nav-label { margin-top: 10px; }
.side .nav-label:first-of-type { margin-top: 0; }
.side .nav-link { font-weight: 600; font-size: 14px; color: #e6e8f6; }

/* ---------- Admission pipeline ---------- */
.pipeline { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.pipe { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border-radius: 12px; background: var(--panel);
  border: 1px solid var(--line); border-top: 4px solid var(--c, var(--brand-2)); color: var(--ink); }
.pipe:hover { text-decoration: none; box-shadow: var(--shadow); }
.pipe.on { box-shadow: 0 0 0 2px var(--c, var(--brand-2)) inset; }
.pipe b { font-size: 22px; }
.pipe span { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.pipe-new { --c: #1e93f2; } .pipe-contacted { --c: #6d28d9; } .pipe-visit { --c: #b45309; } .pipe-admitted { --c: #0f7a43; } .pipe-lost { --c: #94a3b8; }
@media (max-width: 760px) { .pipeline { grid-template-columns: repeat(2, 1fr); } }
.st-new { background: var(--brand-soft); color: #1c5cab; } .st-contacted { background: #f3ecff; color: #6d28d9; }
.st-visit { background: var(--warn-soft); color: var(--warn); } .st-admitted { background: var(--ok-soft); color: var(--ok); }
.st-lost { background: var(--panel-2); color: var(--muted); }

/* ---------- Calendar with events ---------- */
.ek-holiday { background: var(--bad-soft); color: var(--bad); } .ek-exam { background: #f3ecff; color: #6d28d9; }
.ek-event { background: var(--brand-soft); color: #1c5cab; } .ek-meeting { background: var(--ok-soft); color: var(--ok); }
.ek-other { background: var(--panel-2); color: var(--muted); }
.cal-events .day { height: auto; min-height: 76px; align-items: stretch; justify-content: flex-start; padding: 6px; gap: 3px; background: var(--panel-2); }
.cal-events .day .dn { font-size: 13px; text-align: start; }
.cal-events .day.hol { background: #fff5f5; }
.cal-events .ev { display: block; font-size: 11px; font-weight: 600; text-align: start; padding: 2px 5px; border-radius: 5px; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; background: var(--panel-2); color: var(--ink-2); }
.cal-events .ev-holiday { background: var(--bad-soft); color: var(--bad); } .cal-events .ev-exam { background: #f3ecff; color: #6d28d9; }
.cal-events .ev-event { background: var(--brand-soft); color: #1c5cab; } .cal-events .ev-meeting { background: var(--ok-soft); color: var(--ok); }
@media (max-width: 700px) { .cal-events .ev { font-size: 0; height: 6px; padding: 0; } .cal-events .day { min-height: 52px; } }
.holiday-note { padding: 10px 14px; border-radius: 12px; background: var(--bad-soft); color: var(--bad); margin-bottom: 14px; font-weight: 600; }
.cal { table-layout: fixed; }
.cal-events td { overflow: hidden; }
.filterbar .data-search { max-width: 260px; }

/* =================== Printable documents (voucher, certificate, profile) =================== */
.doc-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.pdf-mode .no-pdf { display: none !important; }

/* ---- Fee voucher: 3 copies on A4 landscape ---- */
.voucher-sheet { background: #fff; border-radius: 14px; box-shadow: var(--shadow); padding: 14px; overflow-x: auto; }
.voucher-row { display: grid; grid-template-columns: repeat(3, minmax(250px, 1fr)); gap: 0; min-width: 790px; }
.vc { position: relative; padding: 0 12px; border-inline-end: 2px dashed #b9c2d6; font-size: 11.5px; color: #1c2434; }
.vc:last-child { border-inline-end: 0; }
.vc:not(:last-child)::after { content: "\2702"; position: absolute; inset-inline-end: -9px; top: 46%; background: #fff; color: #8a93a8;
  font-size: 13px; line-height: 1; transform: rotate(90deg); }
.vc-head { display: flex; gap: 8px; align-items: center; padding: 8px 10px; border-radius: 10px 10px 0 0;
  background: linear-gradient(135deg, #0a3a9e 0%, #1e93f2 100%); color: #fff; }
.vc-logo { width: 38px; height: 38px; border-radius: 50%; background: #fff; display: grid; place-items: center; flex: none; overflow: hidden;
  color: #0a3a9e; font-weight: 800; font-size: 17px; }
.vc-logo img { width: 100%; height: 100%; object-fit: contain; }
.vc-school b { display: block; font-size: 13px; line-height: 1.2; }
.vc-school small { display: block; font-size: 9.5px; opacity: .9; line-height: 1.3; }
.vc-ribbon { display: flex; justify-content: space-between; align-items: center; padding: 4px 10px; font-size: 10px; font-weight: 800;
  letter-spacing: .08em; text-transform: uppercase; color: #fff; background: var(--rib, #0f7a43); }
.vc-ribbon span:last-child { font-weight: 600; letter-spacing: 0; text-transform: none; }
.vc.bank { --rib: #b45309; } .vc.school { --rib: #0a3a9e; } .vc.parent { --rib: #0f7a43; }
.vc-body { border: 1px solid #d5dbe8; border-top: 0; border-radius: 0 0 10px 10px; padding: 8px 10px 10px; position: relative; overflow: hidden; }
.vc-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 10px; margin-bottom: 8px; }
.vc-meta div small { display: block; color: #6b7487; font-size: 9px; text-transform: uppercase; letter-spacing: .04em; }
.vc-meta div b { font-size: 11.5px; }
.vc-meta .due b { color: #c0262d; }
.vc-student { background: #f4f7fd; border-radius: 8px; padding: 6px 8px; margin-bottom: 8px; line-height: 1.5; }
.vc-student b { font-size: 12.5px; }
.vc-table { width: 100%; border-collapse: collapse; background: none; }
.vc-table td { padding: 3px 2px; border-bottom: 1px dotted #c9d0de; font-size: 11.5px; }
.vc-table td:last-child { text-align: end; font-variant-numeric: tabular-nums; font-weight: 600; }
.vc-table tr.minus td:last-child { color: #0f7a43; }
.vc-table tr.total td { border-bottom: 0; border-top: 2px solid #0a3a9e; padding-top: 6px; font-size: 13px; font-weight: 800; color: #0a3a9e; }
.voucher-row.two { grid-template-columns: repeat(2, minmax(300px, 1fr)); min-width: 640px; }
.vc-table td small { display: block; font-size: 9px; color: #6b7487; font-weight: 500; }
.vc-table tr.sub td { color: #4b5466; }
.vc-table tr.arrears td { color: #b45309; }
.vc-table tr.arrears td:last-child { color: #b45309; }
.vc-table tr.after td { border-bottom: 0; background: #fdecec; color: #c0262d; font-weight: 700; padding: 4px 6px; }
.vc-table tr.after td:first-child { border-radius: 6px 0 0 6px; } .vc-table tr.after td:last-child { border-radius: 0 6px 6px 0; }
.voucher-batch .voucher-sheet { margin-bottom: 16px; }
@media print { .voucher-batch .voucher-sheet { break-after: page; page-break-after: always; margin: 0; box-shadow: none; }
  .voucher-batch .voucher-sheet:last-child { break-after: auto; page-break-after: auto; } }
.vc-words { font-size: 10px; font-style: italic; color: #39424f; margin: 4px 0 6px; }
.vc-paid { display: flex; justify-content: space-between; font-size: 11px; padding: 4px 6px; border-radius: 6px; background: #e6f6ed; color: #0f7a43; font-weight: 700; margin-bottom: 6px; }
.vc-paid.due { background: #fdecec; color: #c0262d; }
.vc-note { font-size: 9.5px; color: #5b6475; line-height: 1.4; border-inline-start: 3px solid #f5a524; background: #fffaf0; padding: 4px 6px; border-radius: 4px; margin-top: 6px; white-space: pre-line; }
.vc-sign { display: flex; justify-content: space-between; gap: 10px; margin-top: 22px; font-size: 9.5px; color: #5b6475; }
.vc-sign span { flex: 1; border-top: 1px solid #1c2434; padding-top: 3px; text-align: center; }
.vc-stamp { position: absolute; top: 38%; left: 50%; transform: translate(-50%, -50%) rotate(-18deg); font-size: 40px; font-weight: 900;
  letter-spacing: .12em; color: rgba(15,122,67,.16); border: 4px solid rgba(15,122,67,.16); border-radius: 10px; padding: 2px 14px; pointer-events: none; }
.vc-foot { text-align: center; font-size: 8.5px; color: #8a93a8; margin-top: 6px; }

/* ---- Leaving certificate: always exactly one A4 portrait page (794 x 1123 px) ---- */
.cert-wrap { display: flex; justify-content: center; }
.cert { width: 794px; height: 1122px; overflow: hidden; background: #fffdf8; position: relative; padding: 30px; color: #2b2418;
  font-family: "Cormorant Garamond", Georgia, "Times New Roman", serif; box-shadow: var(--shadow-lg); box-sizing: border-box; flex: none; }
.cert-frame { position: absolute; inset: 16px; border: 3px solid #a8842f; outline: 1px solid #a8842f; outline-offset: -10px; pointer-events: none; }
.cert-frame::before { content: ""; position: absolute; inset: 14px; border: 1px solid rgba(168,132,47,.55); }
.cert-corner { position: absolute; width: 58px; height: 58px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64' fill='none' stroke='%23a8842f' stroke-width='2'%3E%3Cpath d='M4 60V18C4 10 10 4 18 4h42'/%3E%3Cpath d='M12 60V24c0-7 5-12 12-12h36'/%3E%3Ccircle cx='24' cy='24' r='5'/%3E%3Cpath d='M4 34h8M34 4v8'/%3E%3C/svg%3E") center / contain no-repeat; }
.cert-corner.tl { top: 20px; left: 20px; } .cert-corner.tr { top: 20px; right: 20px; transform: scaleX(-1); }
.cert-corner.bl { bottom: 20px; left: 20px; transform: scaleY(-1); } .cert-corner.br { bottom: 20px; right: 20px; transform: scale(-1); }
.cert-water { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }
.cert-water span { font-size: 360px; font-weight: 700; color: rgba(10,58,158,.045); font-family: Georgia, serif; line-height: 1; }
.cert-inner { position: relative; height: 100%; box-sizing: border-box; padding: 40px 50px 34px; display: flex; flex-direction: column; }
.cert-top { display: flex; justify-content: space-between; font-family: "Plus Jakarta Sans", sans-serif; font-size: 12px; color: #6b5a33; }
.cert-head { text-align: center; margin-top: 6px; }
.cert-logo { width: 74px; height: 74px; border-radius: 50%; margin: 0 auto 8px; display: grid; place-items: center; overflow: hidden;
  background: radial-gradient(circle at 30% 30%, #1e93f2, #0a3a9e); color: #fff; font-size: 34px; font-weight: 700; border: 3px solid #a8842f; }
.cert-logo img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.cert-school { font-size: 33px; font-weight: 700; letter-spacing: .02em; color: #0a2c72; line-height: 1.1; }
.cert-addr { font-family: "Plus Jakarta Sans", sans-serif; font-size: 12px; color: #6b5a33; margin-top: 4px; }
.cert-title { display: inline-block; margin: 16px 0 6px; padding: 7px 32px; font-size: 24px; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: #fff; background: linear-gradient(90deg, #8a6a1f, #c9a24a, #8a6a1f); border-radius: 4px;
  box-shadow: 0 3px 0 #6e5418; }
.cert-sub { font-style: italic; font-size: 18px; color: #6b5a33; }
.cert-body { margin-top: 20px; font-size: 18.5px; line-height: 1.95; }
.cert-line { display: flex; gap: 10px; align-items: baseline; min-width: 0; }
.cert-line > span:first-child { white-space: nowrap; }
.cert-fill { flex: 1; min-width: 0; border-bottom: 1.5px dotted #8a7444; font-weight: 700; color: #0a2c72; padding: 0 6px; font-size: 19.5px;
  min-height: 1.45em; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.cert-two { display: grid; grid-template-columns: 1fr 1fr; gap: 0 26px; }
.cert-note { margin: 24px 0 0; font-size: 17px; font-style: italic; text-align: center; color: #4a3f29; }
.cert-sign { display: grid; grid-template-columns: 1fr auto 1fr; align-items: end; gap: 20px; margin-top: auto; padding-top: 18px;
  font-family: "Plus Jakarta Sans", sans-serif; }
.cert-sign .line { border-top: 1.5px solid #2b2418; padding-top: 6px; text-align: center; font-size: 13px; font-weight: 600; }
.cert-seal { width: 100px; height: 100px; border-radius: 50%; border: 2px dashed #a8842f; display: grid; place-items: center; text-align: center;
  font-size: 11px; color: #a8842f; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.cert-edit { max-width: 794px; margin: 0 auto 16px; }
@media (max-width: 860px) { .cert-wrap { overflow-x: auto; justify-content: flex-start; } }

/* ---- Student profile ---- */
.sp-hero { display: grid; grid-template-columns: auto 1fr auto; gap: 22px; align-items: center; padding: 22px; border-radius: var(--radius);
  background: linear-gradient(135deg, #0a3a9e 0%, #1e93f2 100%); color: #fff; margin-bottom: 18px; }
.sp-photo { width: 112px; height: 112px; border-radius: 22px; object-fit: cover; border: 4px solid rgba(255,255,255,.35); background: var(--panel); }
.sp-photo.ini { display: grid; place-items: center; font-size: 46px; font-weight: 800; color: #0a3a9e; }
.sp-hero h2 { margin: 0; font-size: 26px; color: #fff; }
.sp-hero .sp-sub { opacity: .9; margin-top: 2px; }
.sp-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.sp-chips span { background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.22); padding: 4px 10px; border-radius: 99px; font-size: 13px; }
.sp-hero .sp-status { text-align: end; }
.sp-hero .badge { font-size: 13px; }
@media (max-width: 760px) { .sp-hero { grid-template-columns: 1fr; text-align: center; } .sp-photo { margin: 0 auto; } .sp-chips { justify-content: center; } .sp-hero .sp-status { text-align: center; } }
.sp-bars { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; align-items: end; height: 150px; margin-top: 8px; }
.sp-bar { display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; font-size: 12px; color: var(--muted); }
.sp-bar i { display: block; width: 100%; max-width: 44px; border-radius: 8px 8px 3px 3px; background: linear-gradient(180deg, #1e93f2, #0a3a9e); min-height: 3px; }
.sp-bar b { color: var(--ink); font-size: 12.5px; }
.sp-bar.low i { background: linear-gradient(180deg, #f08a8a, #c0262d); }
.pct-bar { height: 8px; border-radius: 99px; background: var(--panel-2); overflow: hidden; min-width: 90px; }
.pct-bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #1e93f2, #0a3a9e); }
.sp-section { break-inside: avoid; }
.pdf-mode .sp-hero { box-shadow: none; }
.pdf-mode .card { box-shadow: none !important; animation: none !important; }

@media print {
  .voucher-sheet { box-shadow: none; padding: 0; border-radius: 0; overflow: visible; }
  .voucher-row { min-width: 0; }
  .cert-wrap { display: block; }
  .cert { box-shadow: none; width: 210mm; height: 296mm; margin: 0 auto; break-inside: avoid; page-break-after: avoid; }
  .cert, .cert * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .cert-edit, .sp-actions { display: none !important; }
  .sp-hero { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .vc-head, .vc-ribbon, .cert-title, .cert-logo, .pct-bar i, .sp-bar i { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .card { break-inside: avoid; }
}
/* PDF versions: the certificate keeps its fixed A4 size; the profile reflows to page width */
.pdf-mode .cert { box-shadow: none; }
.pdf-mode #profile-doc .pp-grid > [class*="span-"] { grid-column: span 12; }
.pdf-mode #profile-doc .kpis { grid-template-columns: repeat(2, 1fr) !important; }
.pdf-mode #profile-doc .sp-hero { grid-template-columns: auto 1fr auto; }

/* ---- Salary slip (single copy, A4 portrait) ---- */
.ps-wrap { display: flex; justify-content: center; }
.ps { width: 794px; flex: none; background: #fff; border-radius: 14px; box-shadow: var(--shadow-lg); overflow: hidden; color: #1c2434;
  border: 1px solid #dfe5f1; }
.ps-head { display: grid; grid-template-columns: auto 1fr auto; gap: 16px; align-items: center; padding: 22px 28px; color: #fff;
  background: linear-gradient(120deg, #0a2c72 0%, #0a3a9e 45%, #1e93f2 100%); position: relative; }
.ps-head::after { content: ""; position: absolute; right: -60px; top: -60px; width: 220px; height: 220px; border-radius: 50%;
  background: rgba(255,255,255,.07); }
.ps-logo { width: 62px; height: 62px; border-radius: 50%; background: #fff; color: #0a3a9e; display: grid; place-items: center; overflow: hidden;
  font-size: 28px; font-weight: 800; border: 3px solid rgba(255,255,255,.5); }
.ps-logo img { width: 100%; height: 100%; object-fit: contain; }
.ps-school b { display: block; font-size: 22px; line-height: 1.2; }
.ps-school small { display: block; opacity: .88; font-size: 12.5px; margin-top: 3px; }
.ps-title { text-align: end; position: relative; z-index: 1; }
.ps-title span { display: block; font-size: 13px; letter-spacing: .22em; text-transform: uppercase; font-weight: 800; color: #ffd27a; }
.ps-title small { display: block; font-size: 20px; font-weight: 700; margin-top: 2px; }
.ps-ribbon { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 8px 28px; font-size: 12px; color: #5b4a1d;
  background: linear-gradient(90deg, #f6e7c1, #fff4d9, #f6e7c1); border-bottom: 1px solid #e8d49d; }
.ps-body { padding: 22px 28px 20px; position: relative; }
.ps-stamp { position: absolute; top: 210px; right: 60px; transform: rotate(-16deg); font-size: 46px; font-weight: 900; letter-spacing: .14em;
  color: rgba(15,122,67,.16); border: 5px solid rgba(15,122,67,.16); border-radius: 12px; padding: 0 18px; pointer-events: none; }
.ps-emp { display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: center; padding: 16px; border-radius: 12px;
  background: #f4f7fd; border: 1px solid #e3e9f6; }
.ps-avatar { width: 64px; height: 64px; border-radius: 16px; display: grid; place-items: center; font-size: 28px; font-weight: 800; color: #fff;
  background: linear-gradient(135deg, #0a3a9e, #1e93f2); }
.ps-emp-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px 16px; }
.ps-emp-grid small, .ps-pay small, .ps-net small, .ps-foot-info small { display: block; font-size: 10px; text-transform: uppercase;
  letter-spacing: .05em; color: #6b7487; }
.ps-emp-grid b { font-size: 13.5px; }
.ps-att { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin: 16px 0; }
.ps-att div { text-align: center; padding: 10px 6px; border-radius: 10px; border: 1px solid #e3e9f6; }
.ps-att b { display: block; font-size: 20px; line-height: 1.1; color: #0a2c72; }
.ps-att small { font-size: 11px; color: #6b7487; }
.ps-att .ok b { color: #0f7a43; } .ps-att .bad b { color: #c0262d; } .ps-att .lv b { color: #b45309; }
.ps-tables { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.ps-table { width: 100%; border-collapse: separate; border-spacing: 0; border: 1px solid #dfe5f1; border-radius: 10px; overflow: hidden; background: #fff; }
.ps-table th { white-space: nowrap; text-align: start; padding: 9px 12px; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: #fff; }
.ps-table.earn th { background: #0f7a43; } .ps-table.ded th { background: #c0262d; }
.ps-table th:last-child, .ps-table td:last-child { text-align: end; font-variant-numeric: tabular-nums; }
.ps-table td { padding: 8px 12px; border-bottom: 1px solid #eef1f7; font-size: 13.5px; }
.ps-table tfoot td { font-weight: 800; background: #f7f9fd; border-bottom: 0; border-top: 2px solid #dfe5f1; }
.ps-net { display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: center; margin-top: 16px; padding: 18px 20px; border-radius: 12px;
  background: linear-gradient(120deg, #0a2c72, #0a3a9e); color: #fff; }
.ps-net small { color: rgba(255,255,255,.75); }
.ps-net b { display: block; font-size: 30px; line-height: 1.15; }
.ps-net i { display: block; font-size: 12.5px; opacity: .9; margin-top: 2px; }
.ps-pay { display: grid; gap: 6px; text-align: end; }
.ps-pay small { color: rgba(255,255,255,.75); }
.ps-pay b { font-size: 13.5px; }
.ps-badge { display: inline-block; padding: 2px 10px; border-radius: 99px; font-size: 12px; font-weight: 800; }
.ps-badge.paid { background: #d9f5e4; color: #0f7a43; } .ps-badge.due { background: #ffe1e1; color: #c0262d; }
.ps-foot-info { display: flex; gap: 16px; margin-top: 14px; align-items: stretch; }
.ps-foot-info > div { padding: 10px 14px; border-radius: 10px; border: 1px dashed #c9d2e4; font-size: 13px; }
.ps-foot-info b { font-size: 16px; color: #0a2c72; }
.ps-remarks { flex: 1; }
.ps-sign { display: grid; grid-template-columns: repeat(3, 1fr); gap: 34px; margin-top: 56px; font-size: 12px; color: #39424f; }
.ps-sign span { border-top: 1.5px solid #1c2434; padding-top: 5px; text-align: center; font-weight: 600; }
.ps-note { text-align: center; font-size: 10.5px; color: #8a93a8; margin: 16px 0 0; }
@media (max-width: 860px) { .ps-wrap { overflow-x: auto; justify-content: flex-start; } }
@media print {
  .ps-wrap { display: block; }
  .ps { box-shadow: none; width: 100%; border-radius: 0; }
  .ps, .ps * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
.pdf-mode .ps { box-shadow: none; border-radius: 0; }

/* ---- My salary page ---- */
.my-pay-hero { display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: center; }
.my-pay-hero .big { font-size: 30px; font-weight: 800; color: var(--ink); line-height: 1.1; }

/* ---- Website contact: offices + floating WhatsApp button ---- */
.lp-offices { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 26px; }
.lp-office { background: var(--panel); border: 1px solid var(--line, #e6e9f2); border-radius: 16px; padding: 16px; box-shadow: var(--shadow); }
.lp-office-head { display: flex; gap: 12px; align-items: center; }
.lp-office-head .flag { width: 42px; height: 28px; border-radius: 4px; box-shadow: 0 0 0 1px rgba(0,0,0,.12); flex: none; }
.lp-office-head b { display: block; font-size: 16px; }
.lp-office-head small { color: var(--muted); font-size: 12.5px; }
.lp-office .lp-contact { margin-top: 12px; gap: 10px; }
.lp-office .lp-contact li { font-size: 14px; align-items: flex-start; }
.lp-office .lp-contact .ico { width: 32px; height: 32px; padding: 7px; flex: none; }
.lp-contact li.wa .ico { color: #fff; background: #25D366; }
@media (max-width: 640px) { .lp-offices { grid-template-columns: 1fr; } }
.wa-float { position: fixed; right: 20px; bottom: 20px; z-index: 60; display: flex; align-items: center; gap: 8px; height: 58px;
  padding: 0 15px; border-radius: 99px; background: #25D366; color: #fff; font-weight: 700; text-decoration: none;
  box-shadow: 0 10px 24px rgba(37,211,102,.38), 0 2px 6px rgba(0,0,0,.15); transition: transform .15s ease; }
.wa-float:hover { transform: translateY(-2px); color: #fff; text-decoration: none; }
.wa-float .wa-label { font-size: 14.5px; padding-inline-end: 4px; }
@media (max-width: 640px) { .wa-float .wa-label { display: none; } .wa-float { width: 58px; padding: 0; justify-content: center; } }
@media print { .wa-float { display: none !important; } }

/* ---- In-app help assistant ---- */
.ai-help { position: fixed; right: 20px; bottom: 20px; z-index: 70; }
.ai-fab { display: flex; align-items: center; gap: 8px; height: 52px; padding: 0 18px 0 15px; border: 0; border-radius: 99px; cursor: pointer;
  color: #fff; font: inherit; font-weight: 700; font-size: 14.5px; background: linear-gradient(135deg, #0a3a9e 0%, #1e93f2 100%);
  box-shadow: 0 12px 26px rgba(10,58,158,.35), 0 2px 6px rgba(0,0,0,.15); transition: transform .15s ease; }
.ai-fab:hover { transform: translateY(-2px); }
.ai-help.open .ai-fab { display: none; }
.ai-panel { width: 380px; height: min(600px, calc(100vh - 40px)); display: flex; flex-direction: column; background: var(--panel);
  border-radius: 18px; overflow: hidden; box-shadow: 0 24px 60px rgba(16,24,40,.28); border: 1px solid var(--line);
  animation: aiIn .18s ease-out; }
.ai-panel[hidden] { display: none; }
@keyframes aiIn { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }
.ai-head { display: flex; align-items: center; gap: 10px; padding: 14px 14px; color: #fff;
  background: linear-gradient(135deg, #0a2c72 0%, #0a3a9e 50%, #1e93f2 100%); }
.ai-head > div:nth-child(2) { flex: 1; min-width: 0; }
.ai-head b { display: block; font-size: 15px; }
.ai-head small { display: block; font-size: 12px; opacity: .85; }
.ai-avatar { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; font-weight: 800; font-size: 13px;
  background: rgba(255,255,255,.18); border: 1px solid rgba(255,255,255,.3); flex: none; }
.ai-icon { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 9px; border: 0; cursor: pointer;
  background: rgba(255,255,255,.12); color: #fff; }
.ai-icon:hover { background: rgba(255,255,255,.24); }
.ai-icon .ico { width: 16px; height: 16px; }
.ai-log { flex: 1; overflow-y: auto; padding: 14px; background: var(--panel-2); display: flex; flex-direction: column; gap: 10px; }
.ai-msg { display: flex; flex-direction: column; max-width: 88%; }
.ai-msg.me { align-self: flex-end; align-items: flex-end; }
.ai-bubble { padding: 9px 12px; border-radius: 14px; font-size: 14px; line-height: 1.5; background: var(--panel); color: var(--ink);
  border: 1px solid var(--line); border-bottom-left-radius: 4px; overflow-wrap: anywhere; }
.ai-msg.me .ai-bubble { background: #0a3a9e; color: #fff; border-color: #0a3a9e; border-bottom-left-radius: 14px; border-bottom-right-radius: 4px; }
.ai-bubble p { margin: 0 0 6px; } .ai-bubble p:last-child { margin: 0; }
.ai-bubble ul { margin: 4px 0 6px; padding-inline-start: 18px; } .ai-bubble li { margin: 2px 0; }
.ai-bubble a { color: #0a3a9e; font-weight: 700; }
.ai-msg.typing .ai-bubble { color: var(--muted); letter-spacing: .2em; animation: aiPulse 1s infinite; }
@keyframes aiPulse { 50% { opacity: .4; } }
.ai-links { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.ai-links a { font-size: 12.5px; font-weight: 700; padding: 4px 10px; border-radius: 99px; background: var(--brand-soft, #e8efff); color: #0a3a9e;
  text-decoration: none; }
.ai-links a:hover { background: #d6e3ff; }
.ai-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ai-chip { border: 1px solid #cfdaf2; background: var(--panel); color: #0a3a9e; border-radius: 99px; padding: 6px 11px; font: inherit; font-size: 13px;
  cursor: pointer; text-align: start; }
.ai-chip:hover { background: var(--brand-soft); }
.ai-form { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--line); background: var(--panel); }
.ai-form input { flex: 1; min-width: 0; border-radius: 12px; }
.ai-send { width: 44px; border: 0; border-radius: 12px; background: #0a3a9e; color: #fff; display: grid; place-items: center; cursor: pointer; flex: none; }
.ai-send:hover { background: #0a2c72; }
.ai-foot { margin: 0; padding: 0 12px 8px; font-size: 11px; color: var(--muted); text-align: center; background: var(--panel); }
@media (max-width: 520px) {
  .ai-help { right: 12px; bottom: 12px; }
  .ai-help.open { left: 0; right: 0; bottom: 0; top: 0; }
  .ai-help.open .ai-panel { width: 100%; height: 100%; border-radius: 0; }
  .ai-fab span { display: none; } .ai-fab { width: 52px; padding: 0; justify-content: center; }
}
.pdf-mode .ai-help { display: none !important; }

/* ---- Login: keep me logged in ---- */
.login-box .remember { display: flex; align-items: center; gap: 9px; font-size: 14px; font-weight: 600; color: var(--ink-2); cursor: pointer; margin: 2px 0 0; }
.login-box .remember input { width: 17px; height: 17px; accent-color: #0a3a9e; margin: 0; flex: none; }
.login-box .remember-hint { margin: -4px 0 6px 26px; font-size: 12.5px; color: var(--muted); }

/* ---- School letterhead on printouts ---- */
.doc-head { display: flex; align-items: center; gap: 14px; padding-bottom: 12px; margin-bottom: 14px; border-bottom: 2px solid #0a3a9e; }
.doc-logo { width: 60px; height: 60px; border-radius: 12px; flex: none; display: grid; place-items: center; overflow: hidden;
  background: linear-gradient(135deg, #0a3a9e, #1e93f2); color: #fff; font-weight: 800; font-size: 26px; }
.doc-logo img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.doc-school { flex: 1; min-width: 0; }
.doc-school b { display: block; font-size: 20px; line-height: 1.2; color: #0a2c72; }
.doc-school small { display: block; color: #5b6475; font-size: 12.5px; margin-top: 3px; }
.doc-title { flex: none; padding: 6px 14px; border-radius: 8px; background: #0a3a9e; color: #fff; font-weight: 800; font-size: 12.5px;
  letter-spacing: .08em; text-transform: uppercase; }
.doc-sub { margin: -6px 0 12px; font-weight: 700; color: #334155; }
@media print { .doc-logo, .doc-title { -webkit-print-color-adjust: exact; print-color-adjust: exact; } }
@media (max-width: 560px) { .doc-head { flex-wrap: wrap; } }
.sprof { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
@media (max-width: 900px) { .sprof { grid-template-columns: 1fr; } }
/* ---- School login page branding ---- */
.tenant-brand { display: flex; align-items: center; gap: 14px; }
.tenant-logo { width: 58px; height: 58px; border-radius: 14px; background: var(--panel); display: grid; place-items: center; overflow: hidden; flex: none;
  color: #0a3a9e; font-weight: 800; font-size: 26px; box-shadow: 0 6px 18px rgba(0,0,0,.18); }
.tenant-logo img { width: 100%; height: 100%; object-fit: contain; }
.tenant-brand b { display: block; color: #fff; font-size: 20px; line-height: 1.2; }
.tenant-brand small { display: block; color: rgba(255,255,255,.75); font-size: 13px; margin-top: 2px; }
.login-school { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; font-weight: 700; color: var(--brand); }
.login-school img { width: 36px; height: 36px; object-fit: contain; border-radius: 8px; }

/* ---- Urdu interface (font is bundled: SIL Open Font License, static/vendor/fonts) ---- */
/* Urdu font: Noto Naskh Arabic (SIL Open Font License) — light and clear on phones */
@font-face { font-family: "Noto Naskh Arabic"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("vendor/fonts/noto-naskh-arabic-arabic-400-normal.9ebecc332fb3.woff2") format("woff2"); unicode-range: U+0600-06FF,U+0750-077F,U+0870-088E,U+0890-0891,U+0897-08E1,U+08E3-08FF,U+200C-200E,U+2010-2011,U+204F,U+2E41,U+FB50-FDFF,U+FE70-FE74,U+FE76-FEFC; }
@font-face { font-family: "Noto Naskh Arabic"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("vendor/fonts/noto-naskh-arabic-arabic-700-normal.de2762f6a840.woff2") format("woff2"); unicode-range: U+0600-06FF,U+0750-077F,U+0870-088E,U+0890-0891,U+0897-08E1,U+08E3-08FF,U+200C-200E,U+2010-2011,U+204F,U+2E41,U+FB50-FDFF,U+FE70-FE74,U+FE76-FEFC; }
html[lang="ur"] body { font-family: "Noto Naskh Arabic", "Plus Jakarta Sans", system-ui, sans-serif; }
html[lang="ur"] body, html[lang="ur"] .nav-link, html[lang="ur"] .side details summary, html[lang="ur"] .side details a { line-height: 1.7; }
html[lang="ur"] h1, html[lang="ur"] h2, html[lang="ur"] h3 { line-height: 1.5; letter-spacing: 0; }
html[lang="ur"] .nav-label, html[lang="ur"] .label, html[lang="ur"] th { letter-spacing: 0; text-transform: none; }
html[lang="ur"] .btn, html[lang="ur"] .badge { line-height: 1.6; }
html[lang="ur"] input, html[lang="ur"] select, html[lang="ur"] textarea { font-family: inherit; }
html[lang="ur"] [translate="no"] { font-family: "Plus Jakarta Sans", system-ui, sans-serif; line-height: normal; direction: ltr; text-align: left; }
html[lang="ur"] .cert[translate="no"] { font-family: "Cormorant Garamond", Georgia, serif; }

/* ---- Installable app ---- */
.app-screen { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px;
  background: linear-gradient(160deg, #061a4a 0%, #0a3a9e 55%, #1e93f2 100%); }
.app-card { width: 100%; max-width: 420px; background: var(--panel); border-radius: 22px; padding: 28px 24px; text-align: center;
  box-shadow: 0 24px 60px rgba(0,0,0,.25); }
.app-card .app-icon { width: 76px; height: 76px; border-radius: 18px; margin-bottom: 12px; }
.app-card h1 { font-size: 22px; margin: 0 0 8px; }
.app-card p { color: var(--muted); font-size: 14.5px; margin: 0 0 10px; }
.app-card .app-ur { font-family: "Noto Naskh Arabic", serif; line-height: 1.8; }
.app-card form { text-align: start; margin-top: 14px; }
.app-card input { width: 100%; font-size: 18px; text-align: center; letter-spacing: .03em; }
.app-card .btn { width: 100%; justify-content: center; margin-top: 6px; }
.install-big { width: 100%; justify-content: center; margin-top: 14px; }
.find-school { text-align: center; margin-top: 14px; font-size: 14px; }
.find-school a { display: inline-flex; gap: 6px; align-items: center; }
.ios-help { position: fixed; inset: 0; z-index: 90; background: rgba(6,26,74,.55); display: grid; place-items: end center; padding: 16px; }
.ios-card { width: 100%; max-width: 420px; background: var(--panel); border-radius: 18px; padding: 20px; box-shadow: 0 -10px 40px rgba(0,0,0,.25); }
.ios-card ol { margin: 10px 0 14px; padding-inline-start: 20px; line-height: 1.9; }
.ios-card .btn { width: 100%; justify-content: center; }
@media (display-mode: standalone) { .install-app { display: none !important; } }
.dl-card { max-width: 480px; }
.dl-btn { font-size: 16px; padding: 14px; margin-top: 10px; }
.app-card .dl-btn.ghost { color: var(--brand); }
.dl-steps { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 18px; text-align: start; }
.dl-steps > div { background: var(--panel-2); border: 1px solid #e3e9f6; border-radius: 12px; padding: 12px; font-size: 13.5px; }
.dl-steps ol { margin: 6px 0 0; padding-inline-start: 18px; line-height: 1.6; color: var(--ink-2); }
@media (max-width: 420px) { .dl-steps { grid-template-columns: 1fr; } }
.lp-links .lp-dl { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: var(--brand); }

/* ---- WhatsApp buttons & shared documents ---- */
.btn.wa-btn { background: #25D366; border-color: #25D366; color: #fff; }
.btn.wa-btn:hover { background: #1ebe5b; border-color: #1ebe5b; color: #fff; }
.btn.wa-btn .ico { color: #fff; }
td .btn.wa-btn { margin-inline-start: 6px; }
.wa-list { margin-top: 16px; }
.wa-list h3 { display: flex; align-items: center; justify-content: flex-start; gap: 8px; color: #128c4b; margin: 0 0 4px; }
.wa-list .list-rows li { align-items: center; }
.wa-page { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 18px; align-items: start; }
@media (max-width: 900px) { .wa-page { grid-template-columns: 1fr; } }
.wa-page select { width: 100%; margin-top: 8px; }
.wa-attach { display: grid; gap: 8px; padding: 12px; border-radius: 12px; background: #f0fbf4; border: 1px solid #c9eed6; font-size: 14px; }
.wa-attach label { display: flex; gap: 8px; align-items: center; font-weight: 500; }
.wa-help ol { padding-inline-start: 18px; line-height: 1.8; }
.wa-promo { border-inline-start: 4px solid #25D366; }
.share-page { background: var(--panel-2); margin: 0; }
.share-top { position: sticky; top: 0; z-index: 5; display: flex; justify-content: space-between; align-items: center; gap: 12px;
  flex-wrap: wrap; padding: 10px 16px; background: var(--panel); border-bottom: 1px solid var(--line); box-shadow: 0 2px 10px rgba(16,24,40,.05); }
.share-school { display: flex; align-items: center; gap: 10px; min-width: 0; }
.share-logo { width: 42px; height: 42px; border-radius: 10px; display: grid; place-items: center; overflow: hidden; flex: none;
  background: linear-gradient(135deg, #0a3a9e, #1e93f2); color: #fff; font-weight: 800; }
.share-logo img { width: 100%; height: 100%; object-fit: contain; background: var(--panel); }
.share-school b { display: block; font-size: 15px; line-height: 1.2; }
.share-school small { display: block; color: var(--muted); font-size: 12.5px; }
.share-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.share-main { max-width: 1120px; margin: 0 auto; padding: 18px 12px 30px; }
.share-foot { text-align: center; color: var(--muted); font-size: 12.5px; margin-top: 18px; }
.share-foot span { display: block; margin-top: 2px; }
@media print { .share-page { background: var(--panel); } .share-main { padding: 0; } }

/* ---------- Checks & "Are you sure?" ---------- */
.check-box { border-radius: 12px; padding: 12px 14px; border: 1px solid; margin-bottom: 4px; }
.check-box > b { display: flex; align-items: center; gap: 8px; }
.check-box ul { margin: 8px 0 0; padding-inline-start: 22px; line-height: 1.55; }
.check-box.warn { background: var(--warn-soft); border-color: #f5c98a; color: #7a3d06; }
.check-box.bad { background: var(--bad-soft); border-color: #f2b3b3; color: #8f1d22; }
.check-box.ok { background: var(--brand-soft); border-color: #bcd7fb; color: var(--ink); }
.check-ok { display: flex; gap: 8px; align-items: flex-start; margin-top: 10px; font-weight: 600; cursor: pointer; }
.check-ok input { margin-top: 3px; width: 17px; height: 17px; flex: none; }
.gen-check { display: grid; gap: 16px; }
.gen-check .kpis { margin-bottom: 0; }
tr.row-flag td { background: #fffaf0; }
.cf-modal { position: fixed; inset: 0; z-index: 95; background: rgba(6,26,74,.55); display: grid; place-items: center; padding: 16px; animation: cfIn .15s ease-out; }
.cf-card { width: 100%; max-width: 480px; max-height: 88vh; overflow: auto; background: var(--panel); border-radius: 18px; padding: 22px; box-shadow: 0 20px 60px rgba(0,0,0,.3); }
.cf-card h3 { margin: 8px 0 4px; font-size: 19px; }
.cf-card .muted { margin: 0 0 10px; }
.cf-ico { width: 42px; height: 42px; border-radius: 50%; background: var(--warn-soft); color: var(--warn); display: grid; place-items: center; font-weight: 900; font-size: 22px; }
.cf-list { list-style: none; margin: 10px 0 16px; padding: 0; border: 1px solid var(--line); border-radius: 12px; }
.cf-list li { padding: 9px 12px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: baseline; font-size: 14px; }
.cf-list li:first-child { border-top: 0; }
.cf-list li b { flex-basis: 100%; font-size: 12.5px; color: var(--muted); font-weight: 600; }
.cf-old { color: var(--bad); text-decoration: line-through; text-decoration-color: rgba(192,38,45,.5); }
.cf-arrow { color: var(--muted); }
.cf-new { color: var(--ok); font-weight: 700; }
.cf-btns { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
@keyframes cfIn { from { opacity: 0; } to { opacity: 1; } }

/* ---------- Teacher profile ---------- */
.tt-mini td, .tt-mini th { text-align: center; font-size: 12.5px; padding: 6px; }
.tt-mini td .sub { font-size: 11px; color: var(--muted); }
.pdf-mode #staff-doc .pp-grid > [class*="span-"] { grid-column: span 12; }
.pdf-mode #staff-doc .kpis { grid-template-columns: repeat(2, 1fr) !important; }
.pdf-mode .no-pdf { display: none !important; }

/* ---------- Inventory ---------- */
.inv-bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.inv-bars li { display: grid; grid-template-columns: minmax(120px, 38%) 1fr auto; gap: 10px; align-items: center; font-size: 14px; }
.inv-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inv-track { height: 10px; border-radius: 99px; background: #eef1f7; overflow: hidden; }
.inv-track i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #1e93f2, #0a3a9e); min-width: 3px; }
@media (max-width: 560px) { .inv-bars li { grid-template-columns: 1fr auto; } .inv-track { grid-column: 1 / -1; grid-row: 2; } }

/* ---------- Printed documents (stock report, attendance register) ---------- */
.doc-sheet { background: #fff; border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); color: #0f172a; }
.doc-meta { display: flex; flex-wrap: wrap; gap: 6px 20px; font-size: 13px; color: #334155; margin: 0 0 12px; }
.doc-group { display: flex; justify-content: space-between; margin: 16px 0 6px; padding: 6px 10px; background: #eef3fc; border-radius: 6px; color: #0a2c72; font-size: 14px; }
.doc-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.doc-table th { background: #0a3a9e; color: #fff; font-weight: 700; text-align: start; padding: 6px 8px; font-size: 11.5px; }
.doc-table td { padding: 6px 8px; border-bottom: 1px solid #e3e7ef; }
.doc-table tr:nth-child(even) td { background: #f8fafd; }
.doc-table small { color: #64748b; }
.st-low-stock { color: #b45309; font-weight: 700; }
.st-out-of-stock { color: #c0262d; font-weight: 700; }
.doc-sign { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; margin-top: 46px; }
.doc-sign > div { border-top: 1.5px solid #334155; padding-top: 6px; text-align: center; font-size: 12.5px; font-weight: 700; color: #334155; }
.doc-sign small { display: block; font-weight: 500; color: #64748b; }
.doc-printed { text-align: center; color: #94a3b8; font-size: 11px; margin: 18px 0 0; }

.att-title { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 12px; }
.att-title h2 { margin: 0; font-size: 20px; color: #0a2c72; letter-spacing: .2px; }
.att-sub { color: #334155; font-size: 13.5px; margin-top: 3px; }
.att-stats { display: flex; gap: 8px; }
.att-stats > div { border: 1px solid #d8e2f3; border-radius: 10px; padding: 6px 12px; text-align: center; min-width: 78px; background: #f6f9ff; }
.att-stats b { display: block; font-size: 17px; color: #0a2c72; }
.att-stats span { font-size: 10.5px; color: #64748b; text-transform: uppercase; letter-spacing: .4px; }
.table-wrap-att { overflow-x: auto; }
.att-grid { width: 100%; border-collapse: collapse; font-size: 11px; table-layout: auto; }
.att-grid th, .att-grid td { border: 1px solid #cfd8e6; padding: 3px 2px; text-align: center; min-width: 19px; }
.att-grid thead th { background: #0a3a9e; color: #fff; font-weight: 700; border-color: #0a3a9e; }
.att-grid thead th.wd { background: #1e4fb5; font-weight: 600; font-size: 9.5px; }
.att-grid thead th.sun { background: #6b7a99; }
.att-grid thead th.hol { background: #b45309; }
.att-grid td.sun { background: #eceff4; }
.att-grid td.hol { background: #fdf0de; }
.att-grid .c-roll { width: 30px; }
.att-grid .c-name { text-align: start; padding: 3px 6px; white-space: nowrap; min-width: 150px; }
.att-grid .c-name small { color: #64748b; font-size: 10px; }
.att-grid .c-name small.joined { color: #1e4fb5; }
.att-grid .c-tot, .att-grid .c-pct { background: #f3f6fb; font-weight: 600; min-width: 24px; }
.att-grid thead .c-tot, .att-grid thead .c-pct { background: #0a2c72; }
.att-grid td.bad { color: #c0262d; font-weight: 800; }
.att-grid tbody tr:nth-child(even) td:not(.sun):not(.hol):not(.c-tot):not(.c-pct) { background: #fafbfe; }
.att-grid tfoot td { background: #eef3fc; font-weight: 700; color: #0a2c72; }
.m-p { color: #0f7a43; font-weight: 900; font-size: 13px; line-height: 1; }
.m-a { color: #fff; background: #c0262d; border-radius: 3px; padding: 0 3px; font-weight: 800; }
.m-l { color: #fff; background: #d38a0b; border-radius: 3px; padding: 0 3px; font-weight: 800; }
.m-x { color: #94a3b8; }
.att-foot { display: grid; gap: 6px; margin-top: 10px; font-size: 12px; color: #334155; }
.att-key .sw { display: inline-block; width: 12px; height: 10px; border: 1px solid #cfd8e6; vertical-align: -1px; }
.att-key .sw.sun { background: #eceff4; } .att-key .sw.hol { background: #fdf0de; }
.att-notes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.att-notes > div { background: #f6f9ff; border: 1px solid #e0e8f5; border-radius: 8px; padding: 6px 10px; }
@media (max-width: 760px) { .att-notes { grid-template-columns: 1fr; } .att-reg { overflow-x: auto; } .att-grid { min-width: 900px; } }
.pdf-mode .doc-sheet { box-shadow: none; border-radius: 0; padding: 0; }
.pdf-mode .att-reg { width: 1120px; }
@media print {
  .doc-sheet { box-shadow: none; padding: 0; border-radius: 0; }
  .doc-table th, .doc-group, .att-grid thead th, .att-grid td.sun, .att-grid td.hol, .m-a, .m-l, .att-stats > div,
  .att-notes > div, .att-grid tfoot td, .att-grid .c-tot, .att-grid .c-pct { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .att-grid { min-width: 0; font-size: 9.5px; }
  .att-grid tr { break-inside: avoid; }
}
.nowrap { white-space: nowrap; }
.autofill-note { width: fit-content; max-width: 100%; margin-top: 6px; font-size: 12.5px; color: var(--brand); background: var(--brand-soft); border-radius: 8px; padding: 6px 10px; }
.autofilled { animation: autofill 1.4s ease-out; }
@keyframes autofill { 0% { background: #fff4c2; } 100% { background: transparent; } }

/* ---------- Timetable document ---------- */
.tt-grid { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 12px; }
.tt-grid th, .tt-grid td { border: 1px solid #cfd8e6; padding: 5px; text-align: center; vertical-align: middle; }
.tt-grid thead th { background: #0a3a9e; color: #fff; font-weight: 700; border-color: #0a3a9e; }
.tt-grid thead th small { display: block; font-weight: 500; opacity: .85; font-size: 10.5px; }
.tt-grid th.tt-day { width: 92px; background: #eef3fc; color: #0a2c72; text-align: start; padding-inline-start: 10px; }
.tt-grid thead th.tt-day { background: #0a2c72; color: #fff; }
.tt-grid td { height: 52px; }
.tt-slot { border-radius: 7px; padding: 5px 4px; line-height: 1.25; margin: 2px 0; }
.tt-slot b { display: block; font-size: 12px; }
.tt-slot span { display: block; font-size: 10.5px; opacity: .8; }
.tt-free { color: #b6bfcf; }
.tt-slot.c0 { background: #e8f1fd; color: #1c4f9c; } .tt-slot.c1 { background: #e6f6ed; color: #0f6b3b; }
.tt-slot.c2 { background: #f3ecff; color: #5b21b6; } .tt-slot.c3 { background: #fff1e6; color: #a8430d; }
.tt-slot.c4 { background: #fdecec; color: #a3232a; } .tt-slot.c5 { background: #e7f7f8; color: #0e6a73; }
.tt-slot.c6 { background: #fdf6dc; color: #8a6200; } .tt-slot.c7 { background: #eef0f5; color: #334155; }
.tt-load { grid-template-columns: 1fr; margin-top: 10px; font-size: 12px; }
.pdf-mode .tt-doc { width: 1120px; }
@media (max-width: 760px) { .tt-doc { overflow-x: auto; } .tt-grid { min-width: 820px; } }
@media print { .tt-grid thead th, .tt-grid th.tt-day, .tt-slot { -webkit-print-color-adjust: exact; print-color-adjust: exact; } .tt-grid { min-width: 0; } }

/* ---------- Income & expense statement ---------- */
.acc-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 14px; }
.acc-kpi { border: 1px solid #d8e2f3; border-radius: 12px; padding: 10px 14px; background: #f6f9ff; }
.acc-kpi span { display: block; font-size: 11px; color: #64748b; text-transform: uppercase; letter-spacing: .4px; font-weight: 700; }
.acc-kpi b { display: block; font-size: 20px; color: #0a2c72; margin: 2px 0; }
.acc-kpi small { color: #64748b; font-size: 11.5px; }
.acc-kpi.in { background: #eefaf3; border-color: #bfe6cf; } .acc-kpi.in b { color: #0f6b3b; }
.acc-kpi.out { background: #fff4f0; border-color: #f6cdbd; } .acc-kpi.out b { color: #b6470f; }
.acc-kpi.net { background: #0a3a9e; border-color: #0a3a9e; } .acc-kpi.net span, .acc-kpi.net small { color: #c9d8f5; } .acc-kpi.net b { color: #fff; }
.acc-kpi.net.neg { background: #c0262d; border-color: #c0262d; }
.acc-grid { width: 100%; border-collapse: collapse; font-size: 12px; font-variant-numeric: tabular-nums; }
.acc-grid th, .acc-grid td { border: 1px solid #d6dde9; padding: 6px 8px; text-align: end; white-space: nowrap; }
.acc-grid thead th { color: #fff; font-weight: 700; font-size: 11px; text-align: center; }
.acc-grid th.c-mo { background: #0a2c72; text-align: start; }
.acc-grid th.g-in { background: #0f7a43; } .acc-grid th.g-in2 { background: #1d9457; }
.acc-grid th.g-out { background: #b6470f; } .acc-grid th.g-out2 { background: #d0612a; }
.acc-grid thead th.tot { filter: brightness(.88); }
.acc-grid th.c-net { background: #0a3a9e; }
.acc-grid td.c-mo { text-align: start; font-weight: 600; color: #0a2c72; background: #f6f8fc; }
.acc-grid td.tot-in { background: #eefaf3; font-weight: 700; color: #0f6b3b; }
.acc-grid td.tot-out { background: #fff4f0; font-weight: 700; color: #b6470f; }
.acc-grid td.c-net { font-weight: 800; background: #eef3fc; }
.acc-grid td.c-net.pos { color: #0f6b3b; } .acc-grid td.c-net.neg { color: #c0262d; }
.acc-grid tr.future td { color: #a8b2c4; } .acc-grid tr.future td.c-net, .acc-grid tr.future td.tot-in, .acc-grid tr.future td.tot-out { color: #a8b2c4; }
.acc-grid tfoot td { background: #0a2c72 !important; color: #fff !important; font-weight: 800; border-color: #0a2c72; }
.acc-grid tbody tr:nth-child(even) td:not(.c-mo):not(.tot-in):not(.tot-out):not(.c-net) { background: #fafbfe; }
.acc-split { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 16px; }
.acc-split h4 { margin: 0 0 8px; color: #0a2c72; font-size: 14px; }
.acc-bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.acc-bars li { display: grid; grid-template-columns: minmax(110px, 30%) 1fr auto 46px; gap: 10px; align-items: center; font-size: 12.5px; }
.acc-bars li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acc-bars i { height: 9px; background: #eef1f7; border-radius: 99px; overflow: hidden; }
.acc-bars em { display: block; height: 100%; border-radius: 99px; min-width: 3px; }
.acc-bars.in em { background: linear-gradient(90deg, #34b856, #0f7a43); }
.acc-bars.out em { background: linear-gradient(90deg, #f08a5d, #b6470f); }
.acc-bars small { color: #64748b; text-align: end; }
.acc-note { font-size: 11.5px; color: #64748b; margin: 12px 0 0; }
.pdf-mode .acc-doc { width: 1120px; }
@media (max-width: 760px) { .acc-kpis, .acc-split { grid-template-columns: 1fr 1fr; } .acc-doc { overflow-x: auto; } .acc-grid { min-width: 820px; } }
@media print { .acc-kpi, .acc-grid th, .acc-grid td, .acc-bars em { -webkit-print-color-adjust: exact; print-color-adjust: exact; } .acc-grid { min-width: 0; } }

/* ---------- Dashboard: staff & payroll strip ---------- */
.staff-strip { margin-bottom: 20px; }
.ss-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.ss-head h3 { margin: 0; display: flex; align-items: center; gap: 8px; }
.ss-head a { font-size: 13px; }
.ss-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.ss-grid > div { background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.ss-grid span { display: block; font-size: 12.5px; color: var(--muted); font-weight: 600; }
.ss-grid b { display: block; font-size: 22px; margin: 4px 0 2px; color: var(--ink); }
.ss-grid b em { font-style: normal; font-size: 14px; color: var(--muted); font-weight: 600; }
.ss-grid small { font-size: 12px; color: var(--muted); }
.ss-grid > div.bad { background: var(--bad-soft); border-color: #f2b3b3; } .ss-grid > div.bad b { color: var(--bad); }
@media (max-width: 900px) { .ss-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- Quick add, phone, checkbox lists, roll number ---------- */
.qa-wrap { display: flex; gap: 8px; align-items: stretch; max-width: 560px; }
.qa-wrap select { flex: 1; min-width: 0; }
.qa-btn { flex: none; white-space: nowrap; padding-inline: 12px; }
.qa-btn span { font-weight: 800; font-size: 16px; line-height: 1; }
.qa-card { max-width: 520px; }
.qa-title { margin: 0 0 4px; }
.phone-wrap { display: flex; align-items: stretch; max-width: 460px; }
.phone-pre { display: grid; place-items: center; padding: 0 12px; background: var(--brand-soft); border: 1px solid var(--line); border-inline-end: 0;
  border-radius: 10px 0 0 10px; font-weight: 700; color: var(--brand); }
.phone-wrap input { border-radius: 0 10px 10px 0 !important; flex: 1; min-width: 0; letter-spacing: .5px; }
.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px 12px; max-width: 560px; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--panel-2); max-height: 260px; overflow: auto; }
.check-grid label { display: flex; gap: 8px; align-items: center; font-weight: 500; cursor: pointer; }
.check-grid input { width: 16px; height: 16px; }
.check-all { align-self: flex-start; margin-bottom: 6px; }
.roll-auto { display: flex; gap: 8px; align-items: center; margin-top: 6px; font-size: 13.5px; font-weight: 600; cursor: pointer; }
input.is-auto { background: var(--panel-2); color: var(--muted); }

/* ---------- Results ---------- */
.res-filter { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) auto; gap: 12px; align-items: end; margin-bottom: 16px;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow); }
.res-filter label { display: block; font-size: 12.5px; font-weight: 700; color: var(--muted); margin-bottom: 5px; }
.res-filter select { width: 100%; }
.res-go { display: flex; gap: 8px; }
@media (max-width: 860px) { .res-filter { grid-template-columns: 1fr; } }
.res-sheet td, .res-sheet th { white-space: nowrap; }
.doc-table th.num, .doc-table td.num { text-align: end; }
.doc-table tr.rank1 td { background: #fff8e1 !important; }
.doc-table td.fail { color: #c0262d; font-weight: 700; }
.res-note { font-size: 12px; color: #475569; margin: 10px 0 0; }
.res-card { max-width: 820px; }
.rc-who { display: flex; gap: 16px; align-items: center; border: 1px solid #d8e2f3; border-radius: 12px; padding: 14px; background: #f6f9ff; margin-bottom: 14px; }
.rc-who img, .rc-ini { width: 84px; height: 84px; border-radius: 14px; object-fit: cover; flex: none; }
.rc-ini { display: grid; place-items: center; background: #0a3a9e; color: #fff; font-size: 34px; font-weight: 800; }
.rc-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px 18px; flex: 1; }
.rc-grid small, .rc-result small { display: block; font-size: 10.5px; color: #64748b; text-transform: uppercase; letter-spacing: .4px; }
.rc-grid b { font-size: 14px; color: #0f172a; }
.rc-table .rc-total td { background: #0a2c72 !important; color: #fff; font-weight: 800; }
.rc-result { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 14px; }
.rc-result > div { border: 1px solid #d8e2f3; border-radius: 10px; padding: 10px 12px; text-align: center; background: #f6f9ff; }
.rc-result b { font-size: 20px; color: #0a2c72; }
.rc-result .pass { background: #e6f6ed; border-color: #a8dcbc; } .rc-result .pass b { color: #0f7a43; }
.rc-result .fail { background: #fdecec; border-color: #f2b3b3; } .rc-result .fail b { color: #c0262d; }
.pdf-mode .res-doc { width: 1120px; } .pdf-mode .res-card { width: 780px; }
@media print { .rc-who, .rc-ini, .rc-result > div, .rc-total td, .doc-table tr.rank1 td { -webkit-print-color-adjust: exact; print-color-adjust: exact; } }
.ft-ico.c-fb { background: linear-gradient(135deg, #3b8bff, #1462d8); }
.ft-social { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 26px; flex-wrap: wrap; }
.ft-social > span { color: #c6d6f2; font-weight: 600; font-size: 14px; margin-inline-end: 4px; }
/* social icons: grey until the mouse is over them, then the network's own colour */
.ft-social .soc { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; color: #cbd5e1;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14); transition: transform .18s, background .18s, color .18s, border-color .18s; }
.ft-social .soc:hover, .ft-social .soc:focus-visible { transform: translateY(-2px); color: #fff; border-color: transparent; text-decoration: none; }
.ft-social .soc-facebook:hover, .ft-social .soc-facebook:focus-visible { background: #1877f2; }
.ft-social .soc-instagram:hover, .ft-social .soc-instagram:focus-visible { background: linear-gradient(45deg, #f9b233, #e1306c 50%, #833ab4); }
.ft-social .soc-linkedin:hover, .ft-social .soc-linkedin:focus-visible { background: #0a66c2; }
.lp-social { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.lp-social a { display: inline-flex; align-items: center; gap: 6px; }

/* floating social bar on the left edge of the website */
.side-social { position: fixed; left: 0; top: 50%; transform: translateY(-50%); z-index: 55; display: flex; flex-direction: column; gap: 6px; }
.side-social a { position: relative; display: flex; align-items: center; gap: 10px; width: 46px; height: 46px; padding-inline-start: 13px;
  overflow: hidden; white-space: nowrap; border-radius: 0 12px 12px 0; background: var(--panel); color: #8a94a6;
  box-shadow: 0 4px 14px rgba(15,23,42,.12); border: 1px solid var(--line); border-left: 0;
  transition: width .22s ease, background .2s, color .2s; }
.side-social a span { font-weight: 700; font-size: 14px; opacity: 0; transition: opacity .15s; }
.side-social a:hover, .side-social a:focus-visible { width: 138px; color: #fff; text-decoration: none; border-color: transparent; }
.side-social a:hover span, .side-social a:focus-visible span { opacity: 1; }
.side-social .ss-facebook:hover, .side-social .ss-facebook:focus-visible { background: #1877f2; }
.side-social .ss-instagram:hover, .side-social .ss-instagram:focus-visible { background: linear-gradient(45deg, #f9b233, #e1306c 50%, #833ab4); }
.side-social .ss-linkedin:hover, .side-social .ss-linkedin:focus-visible { background: #0a66c2; }
.side-social:hover a:not(:hover) { color: #64748b; }
@media (max-width: 760px) { .side-social a { width: 38px; height: 38px; padding-inline-start: 9px; } .side-social a:hover { width: 38px; } .side-social a span { display: none; } }
@media print { .side-social { display: none; } }

/* billing banner (top of every page when a payment is due / overdue) */
.bill-banner { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 14px; border-radius: 12px;
  margin: 0 0 14px; font-size: 14px; font-weight: 600; border: 1px solid; }
.bill-banner a { margin-inline-start: auto; font-weight: 700; text-decoration: underline; color: inherit; }
.bill-banner.info { background: var(--brand-soft); border-color: #bcd7fb; color: var(--ink); }
.bill-banner.warn { background: var(--warn-soft); border-color: #f5c98a; color: #7a3d06; }
.bill-banner.bad { background: var(--bad-soft); border-color: #f2b3b3; color: #8f1d22; }
.pill.Due { background: var(--warn-soft); color: var(--warn); }
.pill.Cancelled { background: var(--panel-2); color: var(--muted); }
.temp-slips { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.temp-slip { border: 1px dashed #9aa3b5; border-radius: 10px; padding: 12px 14px; break-inside: avoid; }
.temp-slip code { font-size: 15px; font-weight: 700; }
@media (max-width: 600px) { .temp-slips { grid-template-columns: 1fr; } }


/* ---- landing: data safety, FAQ and interactive touches ---- */
.lp-progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 60; pointer-events: none; }
.lp-progress span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--brand-2), #6ee08a);
  box-shadow: 0 0 10px rgba(30,147,242,.6); transition: width .1s linear; }
.lp-anim [data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s cubic-bezier(.2,.7,.2,1);
  transition-delay: calc(var(--d, 0) * 70ms); }
.lp-anim [data-reveal].in { opacity: 1; transform: none; }
[data-spot] { position: relative; overflow: hidden; }
[data-spot]::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .25s;
  background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 50%), rgba(30,147,242,.12), transparent 70%); }
[data-spot]:hover::before { opacity: 1; }
.lp-safe-sec { background: linear-gradient(180deg, #fff 0%, #f3f8ff 100%); }
.lp-safe { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 18px; }
.lp-safe-card { padding: 26px 24px; border-radius: 18px; border: 1px solid var(--line); background: var(--panel);
  transition: transform .25s, box-shadow .25s, border-color .25s; }
.lp-safe-card:hover { transform: translateY(-4px); border-color: #bcd8f8; box-shadow: 0 18px 40px rgba(10,58,158,.12); }
.lp-safe-ico { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; margin-bottom: 14px;
  background: #e6f6ed; color: #157f3b; transition: background .25s, color .25s, transform .35s; }
.lp-safe-card:hover .lp-safe-ico { background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; transform: rotate(-8deg) scale(1.06); }
.lp-safe-card b { display: block; font-size: 16.5px; margin-bottom: 6px; position: relative; }
.lp-safe-card p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.6; position: relative; }
.lp-faq-wrap { max-width: 820px; }
.lp-faq-search { display: flex; align-items: center; gap: 10px; padding: 0 16px; margin: -18px auto 22px; max-width: 520px;
  border: 1px solid var(--line); border-radius: 99px; background: var(--panel); color: var(--muted); box-shadow: var(--shadow); }
.lp-faq-search:focus-within { border-color: var(--brand-2); box-shadow: 0 0 0 4px rgba(30,147,242,.15); }
.lp-faq-search input { border: 0 !important; box-shadow: none !important; padding: 13px 0 !important; flex: 1; background: transparent; font-size: 15px; }
.lp-faq details { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; margin-bottom: 10px;
  transition: box-shadow .2s, border-color .2s; }
.lp-faq details:hover { border-color: #cfe0f7; }
.lp-faq details[open] { box-shadow: 0 10px 28px rgba(10,58,158,.08); border-color: #bcd8f8; }
.lp-faq summary { cursor: pointer; list-style: none; padding: 18px 56px 18px 22px; font-weight: 700; font-size: 16px; position: relative; }
.lp-faq summary::-webkit-details-marker { display: none; }
.lp-faq summary i { position: absolute; right: 20px; top: 50%; width: 26px; height: 26px; margin-top: -13px; border-radius: 50%;
  background: var(--brand-soft); transition: transform .3s, background .2s; }
.lp-faq summary i::before, .lp-faq summary i::after { content: ""; position: absolute; left: 7px; right: 7px; top: 12px; height: 2px;
  border-radius: 2px; background: var(--brand); transition: transform .3s; }
.lp-faq summary i::after { transform: rotate(90deg); }
.lp-faq details[open] summary i { transform: rotate(180deg); background: var(--brand); }
.lp-faq details[open] summary i::before, .lp-faq details[open] summary i::after { background: var(--panel); }
.lp-faq details[open] summary i::after { transform: rotate(0deg); }
.lp-faq details[open] .lp-faq-a { animation: lpFaqIn .3s ease; }
@keyframes lpFaqIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.lp-faq-a p { margin: 0; padding: 0 22px 20px; color: var(--ink-2); line-height: 1.7; }
.lp-faq-none, .lp-faq-more { text-align: center; color: var(--muted); margin-top: 22px; }
.lp-top { position: fixed; right: 22px; bottom: 92px; z-index: 40; width: 44px; height: 44px; border-radius: 50%; display: grid;
  place-items: center; background: var(--panel); color: var(--brand); border: 1px solid var(--line); box-shadow: var(--shadow-lg);
  opacity: 0; transform: translateY(12px); pointer-events: none; transition: .25s; }
.lp-top.show { opacity: 1; transform: none; pointer-events: auto; }
.lp-top:hover { background: var(--brand); color: #fff; }
.lp-links a, .lp-cta, .lp-login { white-space: nowrap; }
@media (max-width: 900px) { .lp-safe { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .lp-safe { grid-template-columns: 1fr; } .lp-top { right: 16px; } }
@media (prefers-reduced-motion: reduce) { .lp-safe-card, .lp-safe-ico, .lp-faq summary i { transition: none; } }

/* ---- sidebar settings menu (gear) ---- */
.set-wrap { position: relative; margin: 2px 0 4px; }
.set-btn { width: 100%; display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 10px; cursor: pointer;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.10); color: #e6e8f6; font: inherit; font-size: 13.5px; font-weight: 600;
  transition: background .15s, border-color .15s; }
.set-btn:hover, .set-btn.open { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.22); color: #fff; }
.set-btn.on { border-color: rgba(124,196,255,.45); }
.set-btn .ico { transition: transform .5s cubic-bezier(.2,.7,.2,1); }
.set-btn:hover .ico, .set-btn.open .ico { transform: rotate(90deg); }
.set-btn span { flex: 1; text-align: start; }
.set-chev { opacity: .7; transition: transform .2s; }
.set-btn.open .set-chev { transform: rotate(180deg); }
.set-panel { position: fixed; left: 12px; bottom: 74px; width: 300px; max-width: calc(100vw - 24px); max-height: calc(100vh - 110px); overflow: auto;
  z-index: 80; background: var(--panel); color: var(--ink); border-radius: 16px; padding: 8px; border: 1px solid var(--line);
  box-shadow: 0 24px 60px rgba(8,20,60,.35); animation: setIn .18s ease-out; }
@keyframes setIn { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
.set-head { display: flex; align-items: center; gap: 10px; padding: 8px 8px 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.set-head b { display: block; font-size: 15px; }
.set-head small { color: var(--muted); font-size: 12px; display: block; max-width: 190px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.set-gear { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-2)); }
.set-x { margin-inline-start: auto; width: 28px; height: 28px; border-radius: 8px; border: 0; background: transparent; color: var(--muted);
  font-size: 20px; line-height: 1; cursor: pointer; }
.set-x:hover { background: var(--bg); color: var(--ink); }
.set-label { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 10px 10px 4px; }
.side .set-panel a, .set-lang { display: flex; align-items: center; gap: 11px; padding: 8px 10px; border-radius: 10px; color: var(--ink);
  text-decoration: none; transition: background .12s; }
.side .set-panel a:hover { background: var(--brand-soft); color: var(--ink); text-decoration: none; }
.side .set-panel a.on { background: var(--brand-soft); }
.side .set-panel a.on b { color: var(--brand); }
.set-panel .si { width: 34px; height: 34px; flex: none; border-radius: 10px; display: grid; place-items: center; background: var(--bg);
  color: var(--brand); transition: background .12s, color .12s; }
.side .set-panel a:hover .si, .side .set-panel a.on .si { background: var(--brand); color: #fff; }
.set-panel b { display: block; font-size: 13.5px; font-weight: 700; }
.set-panel small { display: block; font-size: 12px; color: var(--muted); line-height: 1.35; }
.set-lang { margin-top: 2px; }
.set-lang > span:nth-of-type(2) { flex: 1; }
.side .set-panel .set-lang select { width: auto; background: var(--panel); color: var(--ink); border: 1px solid var(--line); padding: 5px 8px; font-size: 13px; }
[dir="rtl"] .set-panel { left: auto; right: 12px; }
@media (max-width: 900px) { .set-panel { bottom: 80px; } }
.act-filter { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)) auto; gap: 12px; align-items: end; margin-bottom: 14px; }
.act-filter .field { margin: 0; display: flex; flex-direction: column; gap: 6px; }
.act-filter .field input, .act-filter .field select { width: 100%; height: 42px; box-sizing: border-box; }
.act-btns { display: flex; gap: 8px; }
.act-btns .btn { height: 42px; }
@media (max-width: 900px) { .act-filter { grid-template-columns: 1fr 1fr; } .act-btns { grid-column: 1 / -1; } }

/* ---- roles & access ---- */
.ra-intro { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 16px; }
.ra-intro p { margin: 6px 0 0; }
.ra-intro-ico { width: 44px; height: 44px; flex: none; border-radius: 12px; display: grid; place-items: center; color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-2)); }
.lvl-chip { display: inline-block; padding: 2px 9px; border-radius: 99px; font-size: 12px; font-weight: 700; }
.lvl-chip.full { background: #dcfae6; color: #157f3b; } .lvl-chip.view { background: #fef3c7; color: #a15c07; } .lvl-chip.off { background: var(--panel-2); color: #667085; }
.ra-wrap { max-height: calc(100vh - 290px); overflow: auto; }
.ra-table th.c, .ra-table td.c { text-align: center; }
.ra-table thead th { position: sticky; top: 0; z-index: 2; }
.ra-table thead th b { display: block; } .ra-table thead th small { display: block; font-weight: 500; opacity: .8; text-transform: none; letter-spacing: 0; }
.ra-reset { margin-top: 4px; background: rgba(255,255,255,.15); color: #fff; border: 1px solid rgba(255,255,255,.3); border-radius: 99px;
  font-size: 11px; padding: 2px 10px; cursor: pointer; }
.ra-reset:hover { background: rgba(255,255,255,.3); }
.ra-mod { display: flex; align-items: center; gap: 9px; font-weight: 600; white-space: nowrap; }
.ra-mod .ico { color: var(--brand); }
.ra-lock { color: #b45309; display: inline-flex; }
.lvl { display: inline-flex; padding: 3px; border-radius: 99px; background: var(--bg); border: 1px solid var(--line); position: relative; }
.lvl.custom::after, .ra-dot { content: ""; position: absolute; top: -3px; right: -3px; width: 9px; height: 9px; border-radius: 50%;
  background: var(--brand-2); box-shadow: 0 0 0 2px #fff; }
.ra-dot { position: static; display: inline-block; vertical-align: middle; box-shadow: none; }
.lvl label { position: relative; cursor: pointer; }
.lvl input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.lvl span { display: block; padding: 5px 11px; border-radius: 99px; font-size: 12.5px; font-weight: 700; color: var(--muted); transition: .15s; }
.lvl label:hover span { color: var(--ink); }
.lvl input:focus-visible + span { outline: 2px solid var(--brand-2); outline-offset: 1px; }
.lvl .l-full input:checked + span { background: #16a34a; color: #fff; }
.lvl .l-view input:checked + span { background: #f59e0b; color: #fff; }
.lvl .l-off input:checked + span { background: #98a2b3; color: #fff; }
.lvl .l-same input:checked + span { background: var(--brand); color: #fff; }
.ra-std { display: block; font-size: 11px; color: var(--muted); margin-top: 3px; }
.ra-save { position: sticky; bottom: 0; display: flex; justify-content: flex-end; align-items: center; gap: 14px; padding: 14px 0 4px;
  background: linear-gradient(180deg, transparent, var(--bg) 35%); }
.ra-save .muted { margin-inline-end: auto; position: relative; }
.ra-people { margin: 0; padding-inline-start: 18px; line-height: 1.9; }
.ra-table td { vertical-align: middle; }

/* ---- Print a class's vouchers ---- */
.vb-filter { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; align-items: end; margin-bottom: 14px; }
.vb-filter .field { margin: 0; }
@media print { .vb-filter { display: none !important; } }

/* ---- Student ID cards (85.6 x 54 mm, 10 per A4) ---- */
.idc-sheets { display: grid; gap: 18px; }
.idc-page { display: grid; grid-template-columns: repeat(2, 85.6mm); gap: 3mm 6mm; justify-content: center; background: #fff;
  padding: 6mm; border-radius: 14px; box-shadow: var(--shadow); overflow-x: auto; }
.idc { width: 85.6mm; height: 54mm; box-sizing: border-box; border-radius: 3mm; overflow: hidden; background: #fff; color: #1c2434;
  border: .3mm solid #c9d0de; display: flex; flex-direction: column; font-size: 2.6mm; position: relative; break-inside: avoid; }
.idc.blank { border: .3mm dashed #e3e7ef; }
.idc-top { display: flex; gap: 2mm; align-items: center; padding: 1.8mm 2.6mm; color: #fff;
  background: linear-gradient(135deg, #0a3a9e 0%, #1e93f2 100%); }
.idc-logo { width: 8mm; height: 8mm; border-radius: 50%; background: #fff; color: #0a3a9e; display: grid; place-items: center;
  font-weight: 800; font-size: 4mm; overflow: hidden; flex: none; }
.idc-logo img { width: 100%; height: 100%; object-fit: contain; }
.idc-top b { display: block; font-size: 3.2mm; line-height: 1.15; }
.idc-top small { display: block; font-size: 2.1mm; opacity: .9; line-height: 1.2; max-height: 2.6mm; overflow: hidden; }
.idc-main { flex: 1; display: grid; grid-template-columns: 21mm 1fr 15mm; gap: 2.2mm; padding: 2.4mm 2.6mm 1.4mm; align-items: start; min-height: 0; }
.idc-photo { width: 21mm; height: 26mm; border-radius: 2mm; overflow: hidden; background: #e8eefb; border: .4mm solid #0a3a9e;
  display: grid; place-items: center; color: #0a3a9e; font-weight: 800; font-size: 6mm; }
.idc-photo img { width: 100%; height: 100%; object-fit: cover; }
.idc-info { line-height: 1.45; min-width: 0; font-size: 2.75mm; }
.idc-info div { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.idc-info small { display: inline-block; min-width: 11.5mm; color: #6b7487; font-size: 2.1mm; text-transform: uppercase; letter-spacing: .02em; }
.idc-name { display: block; font-size: 3.9mm; color: #0a2c72; margin-bottom: .6mm; line-height: 1.15; max-height: 7.8mm; overflow: hidden; }
.idc-qr { width: 15mm; height: 15mm; margin-top: 1mm; }
.idc-qr svg { width: 100%; height: 100%; display: block; }
.idc-foot { display: flex; justify-content: space-between; padding: 1.2mm 2.6mm; font-size: 2.2mm; font-weight: 700; color: #fff;
  background: #0f7a43; text-transform: uppercase; letter-spacing: .05em; }
.idc.back { padding: 3mm 3.4mm; display: block; font-size: 2.4mm; line-height: 1.35; background: #f7f9fe; }
.idc-back-head { font-size: 2.2mm; color: #6b7487; text-transform: uppercase; letter-spacing: .06em; }
.idc-back-school { display: block; font-size: 3.4mm; color: #0a2c72; margin: .6mm 0 .4mm; }
.idc-back-addr { color: #39424f; }
.idc.back ul { margin: 1.6mm 0 0; padding-inline-start: 3.4mm; }
.idc-sign { position: absolute; inset-inline-end: 3.4mm; bottom: 3mm; width: 26mm; text-align: center; border-top: .3mm solid #1c2434;
  padding-top: .6mm; font-size: 2.1mm; color: #5b6475; }
@media print {
  .idc-sheets { display: block; }
  .idc-page { box-shadow: none; border-radius: 0; padding: 0; break-after: page; page-break-after: always; overflow: visible; }
  .idc-page:last-child { break-after: auto; page-break-after: auto; }
  .idc, .idc-top, .idc-foot, .idc-photo { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ---- Public online admission form ---- */
.apply-body { margin: 0; min-height: 100vh; background: linear-gradient(160deg, #eaf2ff 0%, #f6f8fc 45%, #eefaf2 100%);
  font-family: "Plus Jakarta Sans", system-ui, sans-serif; color: var(--ink); }
.apply-body.embed { background: transparent; min-height: 0; }
.apply-wrap { max-width: 620px; margin: 0 auto; padding: 24px 16px 32px; }
.apply-body.embed .apply-wrap { padding: 8px 4px; }
.apply-head { display: flex; gap: 12px; align-items: center; padding: 16px 18px; border-radius: 18px 18px 0 0; color: #fff; background: var(--grad); }
.apply-logo { width: 48px; height: 48px; border-radius: 50%; background: var(--panel); color: var(--brand); display: grid; place-items: center;
  font-weight: 800; font-size: 22px; overflow: hidden; flex: none; }
.apply-logo img { width: 100%; height: 100%; object-fit: contain; }
.apply-head b { display: block; font-size: 18px; line-height: 1.2; }
.apply-head small { display: block; opacity: .9; font-size: 13px; }
.apply-card { background: var(--panel); border-radius: 0 0 18px 18px; padding: 22px 20px 20px; box-shadow: var(--shadow); }
.apply-card h1 { font-size: 22px; margin: 0 0 6px; }
.apply-intro { color: var(--ink-2); margin: 0 0 16px; }
.apply-form fieldset { border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px 4px; margin: 0 0 14px; }
.apply-form legend { font-weight: 800; font-size: 13px; color: var(--brand); padding: 0 6px; text-transform: uppercase; letter-spacing: .05em; }
.apply-form .field { margin-bottom: 12px; display: grid; gap: 5px; }
.apply-form .field label { font-weight: 600; font-size: 14px; }
.apply-form input:not([type=radio]), .apply-form select, .apply-form textarea { width: 100%; box-sizing: border-box; font: inherit; font-size: 16px;
  padding: 11px 12px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--panel); }
.apply-form input:focus, .apply-form select:focus, .apply-form textarea:focus { outline: 2px solid var(--brand-2); outline-offset: 1px; border-color: var(--brand-2); }
.apply-form .radios > div { display: flex; gap: 10px; }
.apply-form .radios > div > div { flex: 1; }
.apply-form .radios .lbl { font-weight: 600; font-size: 14px; }
.apply-form .radios > div label { display: flex; gap: 8px; align-items: center; justify-content: center; border: 1px solid var(--line-2); border-radius: 10px;
  padding: 10px; cursor: pointer; font-weight: 600; }
.apply-form .radios > div label:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); color: var(--brand); }
.apply-form .errorlist { list-style: none; margin: 0; padding: 0; color: var(--bad); font-size: 13px; font-weight: 600; }
.apply-trap { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; margin: -1px; padding: 0; border: 0; }
.apply-send { width: 100%; justify-content: center; padding: 14px; font-size: 16px; }
.apply-privacy { display: flex; gap: 6px; align-items: center; justify-content: center; color: var(--muted); font-size: 12.5px; margin: 12px 0 0; text-align: center; }
.apply-done { text-align: center; padding: 10px 0; }
.apply-done > span { width: 64px; height: 64px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--ok-soft); color: var(--ok); margin-bottom: 8px; }
.apply-foot { text-align: center; color: var(--muted); font-size: 12px; margin-top: 14px; }

/* ---- Admission form settings (staff) ---- */
.af-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); align-items: start; }
.af-link { display: flex; gap: 8px; align-items: center; background: var(--brand-soft); border-radius: 10px; padding: 10px 12px; word-break: break-all; }
.af-link a { font-weight: 700; flex: 1; }
.af-code { width: 100%; box-sizing: border-box; font: 12px/1.45 ui-monospace, Consolas, monospace; min-height: 84px; padding: 8px; border-radius: 8px;
  border: 1px solid var(--line); background: var(--panel-2); resize: vertical; }
.af-poster { border: 2px dashed var(--line-2); border-radius: 16px; padding: 18px; text-align: center; background: var(--panel); }
.af-poster h2 { margin: 6px 0 2px; font-size: 22px; color: var(--brand); }
.af-poster .qr { width: 180px; height: 180px; margin: 10px auto; }
.af-poster .qr svg { width: 100%; height: 100%; }
@media print { body.af-print-poster .af-grid > :not(.af-poster-card), body.af-print-poster .af-hide-print { display: none !important; }
  body.af-print-poster .af-grid { display: block; } body.af-print-poster .af-poster-card { box-shadow: none; border: 0; }
  body.af-print-poster .af-poster { border: 0; padding-top: 40px; } body.af-print-poster .af-poster .qr { width: 300px; height: 300px; }
  body.af-print-poster .af-poster h2 { font-size: 36px; } }

/* ---- First-time setup checklist (dashboard) ---- */
.setup-card { margin-bottom: 18px; border: 1px solid #cfe0fb; background: linear-gradient(135deg, #f3f8ff 0%, #ffffff 60%); }
.setup-top { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.setup-ring { --p: 0; width: 64px; height: 64px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: conic-gradient(var(--accent) calc(var(--p) * 1%), #dfe6f3 0); position: relative; }
.setup-ring::before { content: ""; position: absolute; inset: 7px; border-radius: 50%; background: var(--panel); }
.setup-ring b { position: relative; font-size: 15px; color: var(--brand); }
.setup-intro { flex: 1; min-width: 220px; }
.setup-intro h3 { margin: 0 0 2px; }
.setup-intro p { margin: 0; }
.setup-actions { display: flex; gap: 8px; align-items: center; }
.setup-actions form { margin: 0; }
.setup-steps { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.setup-steps a { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--panel); color: var(--ink); text-decoration: none; height: 100%; box-sizing: border-box; transition: border-color .15s, transform .15s; }
.setup-steps a:hover { border-color: var(--brand-2); transform: translateY(-1px); }
.setup-steps b { display: block; font-size: 13.5px; line-height: 1.3; }
.setup-steps small { display: block; color: var(--muted); font-size: 12px; line-height: 1.35; margin-top: 2px; }
.setup-dot { width: 24px; height: 24px; border-radius: 50%; flex: none; display: grid; place-items: center; font-size: 12px; font-weight: 800;
  background: #eef2f9; color: var(--muted); }
.setup-steps li.done a { background: #f6fbf8; }
.setup-steps li.done b { color: var(--muted); text-decoration: line-through; text-decoration-color: #9ab; }
.setup-steps li.done .setup-dot { background: var(--ok); color: #fff; }
.setup-steps li.next a { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(30,147,242,.15); }
.setup-steps li.next .setup-dot { background: var(--brand); color: #fff; }

/* ---- List filters and sorting ---- */
.data-filters { display: grid; grid-template-columns: repeat(auto-fill, minmax(155px, 1fr)); gap: 10px 12px; align-items: end;
  padding: 12px 0 2px; margin-top: 12px; border-top: 1px solid var(--line); }
.df-sel { display: grid; gap: 4px; min-width: 0; margin: 0; }
.df-sel > span { display: flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 700; color: var(--muted);
  text-transform: uppercase; letter-spacing: .05em; white-space: nowrap; }
.df-sel select { width: 100%; max-width: none; height: 38px; padding-block: 0; border-radius: 10px; font-size: 13.5px; font-weight: 600;
  cursor: pointer; text-overflow: ellipsis; }
.df-sel.on select { border-color: var(--brand-2); background-color: var(--brand-soft); color: var(--brand); }
.df-sort > span { color: var(--brand); }
.df-reset { display: inline-flex; align-items: center; justify-content: center; gap: 4px; height: 38px; padding: 0 12px; border-radius: 10px; font-size: 13px; white-space: nowrap;
  font-weight: 700; color: var(--bad); background: var(--bad-soft); }
.df-reset:hover { text-decoration: none; filter: brightness(.97); }
.th-sort { color: inherit; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.th-sort:hover { color: #fff; text-decoration: none; opacity: .9; }
.th-arrow { width: 8px; height: 12px; display: inline-block; opacity: .45;
  background: linear-gradient(currentColor, currentColor) 0 0 / 0 0 no-repeat; position: relative; }
.th-arrow::before, .th-arrow::after { content: ""; position: absolute; left: 0; border: 4px solid transparent; }
.th-arrow::before { top: -3px; border-bottom-color: currentColor; }
.th-arrow::after { bottom: -3px; border-top-color: currentColor; }
.th-sort.asc .th-arrow, .th-sort.desc .th-arrow { opacity: 1; }
.th-sort.asc .th-arrow::after { display: none; } .th-sort.desc .th-arrow::before { display: none; }
@media (max-width: 720px) { .data-filters { grid-template-columns: 1fr 1fr; } }
.idc.blank { border-color: transparent; background: none; }
.idc-page.idc-single { justify-content: start; }
@media print { .idc.blank { border: 0; } }
input.cnic-pk { max-width: 460px; letter-spacing: .6px; font-variant-numeric: tabular-nums; }
.phone-wrap input { font-variant-numeric: tabular-nums; }
.apply-form .phone-pre { font-size: 16px; }
.act.leave { background: var(--warn-soft); color: var(--warn); border-color: #f6dfb8; }
.act.leave:hover { background: var(--warn); color: #fff; box-shadow: 0 6px 14px rgba(180,83,9,.3); transform: translateY(-1px); }
.act.readmit { background: var(--ok-soft); color: var(--ok); border-color: #c9ead6; }
.act.readmit:hover { background: var(--ok); color: #fff; box-shadow: 0 6px 14px rgba(15,122,67,.3); transform: translateY(-1px); }

/* ---- Leave / graduate / rejoin ---- */
.leave-card { max-width: 620px; }
.leave-who { display: flex; gap: 12px; align-items: center; padding-bottom: 14px; margin-bottom: 14px; border-bottom: 1px solid var(--line); }
.leave-who .ini { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--grad); color: #fff; font-weight: 800; font-size: 18px; flex: none; }
.leave-who b { display: block; font-size: 16px; }
.leave-who small { color: var(--muted); }
.leave-kind { border: 0; padding: 0; margin: 0; display: grid; gap: 8px; grid-template-columns: 1fr 1fr; }
.leave-kind legend { font-weight: 700; margin-bottom: 6px; padding: 0; }
.leave-kind label { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; }
.leave-kind label:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.leave-kind input { margin-top: 3px; }
.leave-kind b { display: block; }
.leave-kind small { color: var(--muted); font-size: 12.5px; }
.leave-note { display: flex; gap: 8px; align-items: flex-start; background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font-size: 13.5px; color: var(--ink-2); }
.leave-note .ico { flex: none; margin-top: 2px; color: var(--brand); }
@media (max-width: 560px) { .leave-kind { grid-template-columns: 1fr; } }

/* ---- Lists on smaller laptops: one line per cell, actions always visible ---- */
.data-table td { white-space: nowrap; }
.data-table td:has(.who-cell) b { white-space: nowrap; }
.data-table td.acts { white-space: nowrap; text-align: end; }
.data-table th.acts-h { text-align: end; }
@media (max-width: 1440px) {
  .data-table td { padding: 11px 12px; font-size: 13.5px; }
  .data-table th { padding-inline: 12px; }
  .data-table .act { width: 32px; height: 32px; }
  .data-table .act + .act { margin-inline-start: 4px; }
}
form.stack .leave-kind label { display: flex; flex-direction: row; gap: 10px; align-items: flex-start; margin: 0; }
.leave-card .leave-kind label > span { display: block; }
.leave-card .leave-kind input[type=radio] { flex: none; margin: 3px 0 0; }
.leave-card .stack > * + * { margin-top: 4px; }
.lc-note { display: flex; gap: 10px 16px; align-items: center; justify-content: space-between; }
.lc-note > span { flex: 1 1 320px; }
.lc-note .btn { flex: none; }
@media (max-width: 720px) { .lc-note { flex-wrap: wrap; } }
.locked-note { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; margin-bottom: 16px; border-radius: 12px;
  background: var(--panel-2); border: 1px solid var(--line-2); color: var(--ink-2); font-size: 14px; }
.locked-note .ico { flex: none; margin-top: 2px; color: var(--muted); }
.qa-cred { display: grid; gap: 8px; margin: 12px 0; padding: 12px 14px; border-radius: 12px; background: var(--brand-soft); border: 1px solid #cfe0fb; }
.qa-cred small { display: block; color: var(--muted); font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; }
.qa-cred b { font-family: ui-monospace, Consolas, monospace; font-size: 16px; letter-spacing: .3px; word-break: break-all; }
.cf-ico.ok { background: var(--ok-soft); color: var(--ok); }
@media (max-width: 1300px) {
  .data-table td { padding: 9px 8px; font-size: 13px; }
  .data-table th { padding-inline: 8px; font-size: 11.5px; letter-spacing: .02em; }
  .data-table .act + .act { margin-inline-start: 3px; }
  .data-table .who-cell { gap: 8px; }
  .data-table .who-cell .ini { width: 28px; height: 28px; font-size: 11px; }
  .data-table .act { width: 30px; height: 30px; }
  .data-table .badge { padding: 2px 8px 2px 7px; font-size: 11.5px; }
}
/* Admission form: Boy / Girl are plain buttons — the radio circle is hidden but still works with keyboard */
.apply-form .radios > div label { position: relative; padding: 12px; transition: background .15s, border-color .15s, color .15s; }
.apply-form .radios > div label:hover { border-color: var(--brand-2); }
.apply-form .radios input[type=radio] { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none; }
.apply-form .radios > div label:has(input:checked) { background: var(--brand); border-color: var(--brand); color: #fff; }
.apply-form .radios > div label:has(input:focus-visible) { outline: 2px solid var(--brand-2); outline-offset: 2px; }
.apply-head { position: relative; }
.apply-lang { margin-inline-start: auto; display: flex; gap: 2px; background: rgba(255,255,255,.16); padding: 3px; border-radius: 99px; flex: none; }
.apply-lang a { color: #fff; text-decoration: none; font-weight: 700; font-size: 13px; padding: 5px 12px; border-radius: 99px; line-height: 1.4; }
.apply-lang a.on { background: var(--panel); color: var(--brand); }
.apply-lang a[lang="ur"] { font-family: "Noto Naskh Arabic", serif; font-size: 14px; line-height: 1.6; padding-block: 2px; }
html[lang="ur"] .apply-body { font-family: "Noto Naskh Arabic", "Plus Jakarta Sans", sans-serif; }
html[lang="ur"] .apply-form .field label, html[lang="ur"] .apply-card h1, html[lang="ur"] .apply-intro { line-height: 1.7; }
html[lang="ur"] .apply-form legend { letter-spacing: 0; text-transform: none; }
html[lang="ur"] .apply-form input[type=date] { direction: ltr; text-align: end; }
@media (max-width: 420px) { .apply-head { flex-wrap: wrap; } .apply-lang { margin-inline-start: 0; } }
.af-lang { display: flex; align-items: center; gap: 6px; margin: 0 0 10px; flex-wrap: wrap; }
.af-lang span { font-size: 13px; margin-inline-end: 4px; }
.af-lang a { padding: 4px 14px; border-radius: 99px; border: 1px solid var(--line); font-weight: 700; font-size: 13px; text-decoration: none; color: var(--ink-2); }
.af-lang a.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.af-lang a[lang="ur"] { font-family: "Noto Naskh Arabic", serif; }
.af-poster[lang="ur"] h2, .af-poster[lang="ur"] div { font-family: "Noto Naskh Arabic", serif; line-height: 1.7; }


/* =====================================================================================
   2026 refresh: light, flat look + dark mode.  Colours come from the variables at the top;
   dark mode only changes the variables (Settings → Appearance: Light / Dark / Automatic).
   Printed documents (vouchers, slips, certificates, ID cards…) always stay white paper.
   ===================================================================================== */
:root[data-theme="dark"] { --bg: #0b1120; --panel: #121a2b; --panel-2: #0f1626; --line: #222d42; --line-2: #2e3b54; --hover: #172238;
  --th-bg: #0f1626; --input-bg: #0f1626; --ink: #e5eaf3; --ink-2: #c3cbda; --muted: #8e9ab1;
  --brand: #3d7ff0; --brand-2: #5aa9ff; --brand-soft: #172a52; --grad: #3d7ff0; --accent: #34c262;
  --ok: #4ade80; --ok-soft: #10291c; --warn: #fbbf24; --warn-soft: #2b2110; --bad: #f87171; --bad-soft: #2d1518;
  --side-bg: #0e1525; --side-text: #c3cbda; --side-strong: #eef2f8; --side-muted: #6c7a92; --side-active: #172a52;
  --top-bg: rgba(11,17,32,.86); --toast-bg: #1e293b;
  --shadow: 0 1px 2px rgba(0,0,0,.3); --shadow-lg: 0 14px 34px rgba(0,0,0,.45);
  --grid: #222d42; --axis: #2e3b54; --axis-ink: #8e9ab1; color-scheme: dark; }
@media (prefers-color-scheme: dark) { :root[data-theme="auto"] { --bg: #0b1120; --panel: #121a2b; --panel-2: #0f1626; --line: #222d42; --line-2: #2e3b54; --hover: #172238;
  --th-bg: #0f1626; --input-bg: #0f1626; --ink: #e5eaf3; --ink-2: #c3cbda; --muted: #8e9ab1;
  --brand: #3d7ff0; --brand-2: #5aa9ff; --brand-soft: #172a52; --grad: #3d7ff0; --accent: #34c262;
  --ok: #4ade80; --ok-soft: #10291c; --warn: #fbbf24; --warn-soft: #2b2110; --bad: #f87171; --bad-soft: #2d1518;
  --side-bg: #0e1525; --side-text: #c3cbda; --side-strong: #eef2f8; --side-muted: #6c7a92; --side-active: #172a52;
  --top-bg: rgba(11,17,32,.86); --toast-bg: #1e293b;
  --shadow: 0 1px 2px rgba(0,0,0,.3); --shadow-lg: 0 14px 34px rgba(0,0,0,.45);
  --grid: #222d42; --axis: #2e3b54; --axis-ink: #8e9ab1; color-scheme: dark; } }
.voucher-sheet, .cert-wrap, .cert, .ps, .doc-sheet, .print-sheet, .idc-sheets, .af-poster, .stock-card, #stock-card, #stock-report {
  --bg: #f6f7fb; --panel: #ffffff; --panel-2: #f8fafc; --line: #e6e9f2; --line-2: #dfe3eb; --hover: #f5f8ff;
  --th-bg: #fafbfd; --input-bg: #ffffff; --ink: #0f172a; --ink-2: #334155; --muted: #64748b;
  --brand: #0a3a9e; --brand-2: #1e93f2; --brand-soft: #e8f2fe; --ok: #0f7a43; --ok-soft: #e6f6ed;
  --warn: #b45309; --warn-soft: #fef3e2; --bad: #c0262d; --bad-soft: #fdecec; color-scheme: light; color: #0f172a; }
:root[data-theme="dark"] .idc-page, :root[data-theme="dark"] .voucher-sheet, :root[data-theme="dark"] .doc-sheet { box-shadow: 0 10px 30px rgba(0,0,0,.4); }
@media print { :root, :root[data-theme] { --bg: #f6f7fb; --panel: #ffffff; --panel-2: #f8fafc; --line: #e6e9f2; --line-2: #dfe3eb; --hover: #f5f8ff;
  --th-bg: #fafbfd; --input-bg: #ffffff; --ink: #0f172a; --ink-2: #334155; --muted: #64748b;
  --brand: #0a3a9e; --brand-2: #1e93f2; --brand-soft: #e8f2fe; --ok: #0f7a43; --ok-soft: #e6f6ed;
  --warn: #b45309; --warn-soft: #fef3e2; --bad: #c0262d; --bad-soft: #fdecec; color-scheme: light; color: #0f172a; } body { background: #fff !important; } }

/* ---- sidebar: light, brand colour only on the active item ---- */
.side { background: var(--side-bg); color: var(--side-text); border-inline-end: 1px solid var(--line); }
.side .brand { border-bottom-color: var(--line); }
.side .brand .logo-link img.logo-dark-bg { display: none; }
:root[data-theme="dark"] .side .brand .logo-link img.logo-light-bg { display: none; }
:root[data-theme="dark"] .side .brand .logo-link img.logo-dark-bg { display: block; }
@media (prefers-color-scheme: dark) { :root[data-theme="auto"] .side .brand .logo-link img.logo-light-bg { display: none; }
  :root[data-theme="auto"] .side .brand .logo-link img.logo-dark-bg { display: block; } }
.side .brand .school { background: transparent; border: 1px solid var(--line); }
.side .brand .school:hover { background: var(--panel-2); }
.side .brand .school-logo { background: var(--brand-soft); color: var(--brand); }
.side .brand b { color: var(--side-strong); }
.side .brand small, .side .nav-label { color: var(--side-muted); }
.side summary, .side .nav-link { color: var(--side-text); }
.side summary .ico, .side .nav-link .ico { color: var(--side-muted); opacity: 1; }
.side summary::after { border-color: var(--side-muted); }
.side summary:hover, .side .nav-link:hover { background: var(--panel-2); color: var(--side-strong); }
.side details[open] > summary { color: var(--side-strong); }
.side details a { color: var(--muted); }
.side details a:hover { background: var(--panel-2); color: var(--side-strong); }
.side details a.active, .side .nav-link.active { background: var(--side-active); color: var(--brand); font-weight: 700; }
.side .nav-link.active .ico { color: var(--brand); }
.side details a.active::before { background: var(--brand); box-shadow: none; }
.side .foot { border-top-color: var(--line); }
.side .me .who b { color: var(--side-strong); }
.side .me .who small { color: var(--side-muted); }
.icon-btn { background: var(--panel-2); border-color: var(--line); color: var(--ink-2); }
.icon-btn:hover { background: var(--brand-soft); color: var(--brand); }
.set-btn { background: var(--panel-2); border-color: var(--line); color: var(--side-text); }
.set-btn:hover, .set-btn.open { background: var(--brand-soft); border-color: var(--line-2); color: var(--brand); }
.set-btn.on { border-color: var(--line-2); }
.set-panel { background: var(--panel); color: var(--ink); border-color: var(--line); }
.side::-webkit-scrollbar { width: 8px; } .side::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 8px; }

/* ---- top bar, cards, buttons: flat and calm ---- */
.top { background: var(--top-bg); border-bottom-color: var(--line); }
.card { box-shadow: var(--shadow); }
:root { --shadow: 0 1px 2px rgba(15,23,42,.04), 0 1px 1px rgba(15,23,42,.02); }
.btn { background: var(--brand); box-shadow: 0 1px 2px rgba(10,58,158,.2); font-weight: 700; }
.btn:hover { filter: brightness(1.08); transform: none; box-shadow: 0 2px 8px rgba(10,58,158,.22); }
.btn.ghost { background: var(--panel); color: var(--ink-2); border-color: var(--line); box-shadow: none; }
.btn.ghost:hover { border-color: var(--line-2); background: var(--panel-2); color: var(--ink); }
.btn.danger { background: var(--bad); box-shadow: none; }
input[type=text], input[type=number], input[type=date], input[type=time], input[type=password], input[type=email],
input[type=search], input[type=month], input[type=tel], input[type=url], select, textarea {
  background-color: var(--input-bg); border-color: var(--line-2); color: var(--ink); }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: .75; }

/* ---- tables: light header, quiet rows, actions appear on hover ---- */
th, .table-wrap th { background: var(--th-bg); color: var(--muted); border-bottom: 1px solid var(--line); }
.table-wrap { border-color: var(--line); background: var(--panel); }
.data-table th.idx { color: var(--muted); }
.th-sort { color: inherit; } .th-sort:hover { color: var(--brand); opacity: 1; }
.th-sort.asc, .th-sort.desc { color: var(--ink); }
.table-wrap tbody tr:nth-child(even) td { background: transparent; }
tbody tr:hover td, table tr:hover td, .table-wrap tbody tr:hover td { background: var(--hover); }
.table-wrap td { border-bottom-color: var(--line); }
.data-table .act { background: transparent; border-color: transparent; color: var(--muted); }
.data-table .act.edit:hover { background: var(--brand-soft); color: var(--brand); box-shadow: none; transform: none; }
.data-table .act.del:hover { background: var(--bad-soft); color: var(--bad); box-shadow: none; transform: none; }
.data-table .act.leave:hover { background: var(--warn-soft); color: var(--warn); box-shadow: none; transform: none; }
.data-table .act.readmit { color: var(--ok); }
.data-table .act.readmit:hover { background: var(--ok-soft); color: var(--ok); box-shadow: none; transform: none; }
@media (hover: hover) { .data-table tbody tr .act { opacity: .45; transition: opacity .15s, background .15s; }
  .data-table tbody tr:hover .act, .data-table tbody tr .act:focus-visible { opacity: 1; } }
.who-cell .ini { background: var(--brand-soft); color: var(--brand); }
.badge { background: var(--panel-2); }
.b-mute { background: var(--panel-2); }
.df-sel.on select { background-color: var(--brand-soft); }

/* ---- dashboard greeting: no heavy gradient ---- */
.hero { background: var(--panel); color: var(--ink); border: 1px solid var(--line); box-shadow: var(--shadow); padding: 20px 22px; }
.hero::before, .hero::after { display: none; }
.hero h2 { color: var(--ink); } .hero p { color: var(--muted); }
.hero .quick a { background: var(--panel-2); color: var(--ink-2); border: 1px solid var(--line); backdrop-filter: none; }
.hero .quick a:hover { background: var(--brand-soft); color: var(--brand); border-color: var(--line-2); }
.hero .quick a .ico { color: var(--brand); }

/* ---- dark mode details ---- */
:root[data-theme="dark"] .vc-note, :root[data-theme="dark"] .holiday-note { filter: none; }
:root[data-theme="dark"] img.logo-on-light { filter: brightness(0) invert(1); }

/* ---- toasts (messages) ---- */
.msgs.toasts { position: fixed; inset-inline-end: 22px; bottom: 22px; z-index: 900; margin: 0; display: flex; flex-direction: column;
  gap: 8px; max-width: min(420px, calc(100vw - 32px)); pointer-events: none; }
.msgs.toasts li { pointer-events: auto; display: flex; align-items: flex-start; gap: 10px; margin: 0; padding: 12px 12px 12px 14px;
  background: var(--toast-bg); color: #f1f5f9; border: 0; border-radius: 12px; box-shadow: 0 12px 30px rgba(15,23,42,.28);
  font-size: 14px; line-height: 1.45; animation: toast-in .25s ease-out; transition: opacity .3s, transform .3s; }
.msgs.toasts li.out { opacity: 0; transform: translateY(8px); }
.msgs.toasts li .t-ico { flex: none; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center;
  background: #16a34a; color: #fff; margin-top: -1px; }
.msgs.toasts li .t-ico .ico { width: 13px; height: 13px; stroke-width: 3; }
.msgs.toasts li.info .t-ico { background: #3b82f6; }
.msgs.toasts li.warning .t-ico { background: #f59e0b; }
.msgs.toasts li.error .t-ico { background: #ef4444; }
.msgs.toasts li.error { box-shadow: 0 12px 30px rgba(15,23,42,.28), inset 3px 0 0 #ef4444; }
.msgs.toasts li .t-txt { flex: 1; } .msgs.toasts li a { color: #93c5fd; font-weight: 700; }
.msgs.toasts li .t-x { flex: none; background: none; border: 0; color: #94a3b8; font-size: 20px; line-height: 1; cursor: pointer; padding: 0 2px; }
.msgs.toasts li .t-x:hover { color: #fff; }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } }
@media (max-width: 640px) { .msgs.toasts { inset-inline: 12px; bottom: 12px; max-width: none; } }

/* ---- loading bar ---- */
.load-bar { position: fixed; top: 0; inset-inline-start: 0; height: 3px; width: 0; z-index: 1000; background: var(--brand-2);
  box-shadow: 0 0 8px var(--brand-2); opacity: 0; pointer-events: none; }
.load-bar.go { opacity: 1; animation: load-go 8s cubic-bezier(.1,.7,.2,1) forwards; }
@keyframes load-go { 0% { width: 0; } 20% { width: 45%; } 100% { width: 92%; } }

/* ---- phone: list tables become cards ---- */
@media (max-width: 640px) {
  .m-cards table, .m-cards tbody { display: block; width: 100%; min-width: 0 !important; }
  .m-cards thead { display: none; }
  .m-cards { border: 0 !important; background: transparent !important; overflow: visible !important; }
  .m-cards tbody tr { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; padding: 12px 14px; margin-bottom: 10px;
    background: var(--panel); border: 1px solid var(--line); border-radius: 12px; position: relative; }
  .m-cards tbody tr:hover td { background: transparent !important; }
  .m-cards tbody td { display: block; border: 0 !important; padding: 0 !important; background: transparent !important;
    white-space: normal !important; font-size: 13.5px; min-width: 0; overflow-wrap: anywhere; }
  .m-cards tbody td[data-label]::before { content: attr(data-label); display: block; font-size: 11px; font-weight: 600; color: var(--muted);
    text-transform: uppercase; letter-spacing: .03em; margin-bottom: 1px; }
  .m-cards tbody td.c-first { grid-column: 1 / -1; font-size: 15px; font-weight: 700; padding-inline-end: 40px !important; }
  .m-cards tbody td.c-first::before { display: none; }
  .m-cards tbody td.idx { position: absolute; top: 12px; inset-inline-end: 14px; color: var(--muted); font-size: 12px; }
  .m-cards tbody td.acts { grid-column: 1 / -1; display: flex; gap: 6px; padding-top: 8px !important; margin-top: 4px;
    border-top: 1px solid var(--line) !important; }
  .m-cards tbody td.acts .act { opacity: 1 !important; background: var(--panel-2); border: 1px solid var(--line); }
  .m-cards tbody tr.empty { display: block; }
  .m-cards tbody tr.empty td::before { display: none; }
}

/* ---- dark mode: pastel tints become soft glows ---- */
:root[data-theme="dark"] .b-serious, :root[data-theme="dark"] .kpi .chip-ico.c5, :root[data-theme="dark"] .tt-slot.c3 { background: rgba(251,146,60,.14); color: #fdba74;}
:root[data-theme="dark"] .b-teams, :root[data-theme="dark"] .plat-teams { background: rgba(129,140,248,.15); color: #a5b4fc;}
:root[data-theme="dark"] .kpi .chip-ico.c1, :root[data-theme="dark"] .tt-slot.c0 { background: rgba(96,165,250,.15); color: #93c5fd;}
:root[data-theme="dark"] .kpi .chip-ico.c2, :root[data-theme="dark"] .tt-slot.c1 { background: rgba(74,222,128,.13); color: #86efac;}
:root[data-theme="dark"] .kpi .chip-ico.c3, :root[data-theme="dark"] .st-contacted, :root[data-theme="dark"] .ek-exam, :root[data-theme="dark"] .cal-events .ev-exam, :root[data-theme="dark"] .tt-slot.c2 { background: rgba(167,139,250,.15); color: #c4b5fd;}
:root[data-theme="dark"] .kpi .chip-ico.c4, :root[data-theme="dark"] .tt-slot.c4 { background: rgba(248,113,113,.14); color: #fca5a5;}
:root[data-theme="dark"] .kpi .chip-ico.c6, :root[data-theme="dark"] .tt-slot.c5 { background: rgba(45,212,191,.13); color: #5eead4;}
:root[data-theme="dark"] .tt-slot.c6 { background: rgba(250,204,21,.13); color: #fde68a;}
:root[data-theme="dark"] .tt-slot.c7 { background: var(--panel-2); color: var(--ink-2);}
:root[data-theme="dark"] .st-new { color: #93c5fd;}
:root[data-theme="dark"] .cal-events .day.hol, :root[data-theme="dark"] tr.row-flag td { background: rgba(251,191,36,.07);}
:root[data-theme="dark"] .ai-links a { background: var(--brand-soft); color: #93c5fd;}
:root[data-theme="dark"] .ai-links a:hover { background: #1e3a6e;}
:root[data-theme="dark"] .dl-steps > div { border-color: var(--line);}
:root[data-theme="dark"] .wa-attach { background: rgba(74,222,128,.08); border-color: rgba(74,222,128,.25);}
:root[data-theme="dark"] .check-box.warn, :root[data-theme="dark"] .bill-banner.warn { border-color: rgba(251,191,36,.35); color: #fcd34d;}
:root[data-theme="dark"] .check-box.bad, :root[data-theme="dark"] .bill-banner.bad, :root[data-theme="dark"] .ss-grid > div.bad { border-color: rgba(248,113,113,.35); color: #fca5a5;}
:root[data-theme="dark"] .check-box.ok { border-color: rgba(74,222,128,.3);}
:root[data-theme="dark"] .inv-track, :root[data-theme="dark"] .acc-bars i { background: var(--panel-2);}
:root[data-theme="dark"] .acc-kpi { background: var(--panel-2); border-color: var(--line);}
:root[data-theme="dark"] .acc-kpi.in { background: rgba(74,222,128,.08); border-color: rgba(74,222,128,.25);}
:root[data-theme="dark"] .acc-kpi.in b { color: #86efac;}
:root[data-theme="dark"] .acc-kpi.out { background: rgba(251,146,60,.08); border-color: rgba(251,146,60,.25);}
:root[data-theme="dark"] .acc-kpi.out b { color: #fdba74;}
:root[data-theme="dark"] .lvl-chip.full { background: rgba(74,222,128,.13); color: #86efac;}
:root[data-theme="dark"] .lvl-chip.view { background: rgba(251,191,36,.13); color: #fcd34d;}
:root[data-theme="dark"] .setup-card { background: var(--panel); border-color: var(--line-2);}
:root[data-theme="dark"] .setup-ring { background: conic-gradient(var(--accent) calc(var(--p) * 1%), var(--line-2) 0);}
:root[data-theme="dark"] .setup-dot { background: var(--panel-2);}
:root[data-theme="dark"] .setup-steps li.done a { background: rgba(74,222,128,.05);}
:root[data-theme="dark"] .setup-steps li.done b { text-decoration-color: var(--muted);}
:root[data-theme="dark"] .act.edit, :root[data-theme="dark"] .act.del, :root[data-theme="dark"] .act.leave { border-color: transparent;}
:root[data-theme="dark"] .tbl-toggle, :root[data-theme="dark"] .seg { border-color: var(--line);}
@media (prefers-color-scheme: dark) {
:root[data-theme="auto"] .b-serious, :root[data-theme="auto"] .kpi .chip-ico.c5, :root[data-theme="auto"] .tt-slot.c3 { background: rgba(251,146,60,.14); color: #fdba74;}
:root[data-theme="auto"] .b-teams, :root[data-theme="auto"] .plat-teams { background: rgba(129,140,248,.15); color: #a5b4fc;}
:root[data-theme="auto"] .kpi .chip-ico.c1, :root[data-theme="auto"] .tt-slot.c0 { background: rgba(96,165,250,.15); color: #93c5fd;}
:root[data-theme="auto"] .kpi .chip-ico.c2, :root[data-theme="auto"] .tt-slot.c1 { background: rgba(74,222,128,.13); color: #86efac;}
:root[data-theme="auto"] .kpi .chip-ico.c3, :root[data-theme="auto"] .st-contacted, :root[data-theme="auto"] .ek-exam, :root[data-theme="auto"] .cal-events .ev-exam, :root[data-theme="auto"] .tt-slot.c2 { background: rgba(167,139,250,.15); color: #c4b5fd;}
:root[data-theme="auto"] .kpi .chip-ico.c4, :root[data-theme="auto"] .tt-slot.c4 { background: rgba(248,113,113,.14); color: #fca5a5;}
:root[data-theme="auto"] .kpi .chip-ico.c6, :root[data-theme="auto"] .tt-slot.c5 { background: rgba(45,212,191,.13); color: #5eead4;}
:root[data-theme="auto"] .tt-slot.c6 { background: rgba(250,204,21,.13); color: #fde68a;}
:root[data-theme="auto"] .tt-slot.c7 { background: var(--panel-2); color: var(--ink-2);}
:root[data-theme="auto"] .st-new { color: #93c5fd;}
:root[data-theme="auto"] .cal-events .day.hol, :root[data-theme="auto"] tr.row-flag td { background: rgba(251,191,36,.07);}
:root[data-theme="auto"] .ai-links a { background: var(--brand-soft); color: #93c5fd;}
:root[data-theme="auto"] .ai-links a:hover { background: #1e3a6e;}
:root[data-theme="auto"] .dl-steps > div { border-color: var(--line);}
:root[data-theme="auto"] .wa-attach { background: rgba(74,222,128,.08); border-color: rgba(74,222,128,.25);}
:root[data-theme="auto"] .check-box.warn, :root[data-theme="auto"] .bill-banner.warn { border-color: rgba(251,191,36,.35); color: #fcd34d;}
:root[data-theme="auto"] .check-box.bad, :root[data-theme="auto"] .bill-banner.bad, :root[data-theme="auto"] .ss-grid > div.bad { border-color: rgba(248,113,113,.35); color: #fca5a5;}
:root[data-theme="auto"] .check-box.ok { border-color: rgba(74,222,128,.3);}
:root[data-theme="auto"] .inv-track, :root[data-theme="auto"] .acc-bars i { background: var(--panel-2);}
:root[data-theme="auto"] .acc-kpi { background: var(--panel-2); border-color: var(--line);}
:root[data-theme="auto"] .acc-kpi.in { background: rgba(74,222,128,.08); border-color: rgba(74,222,128,.25);}
:root[data-theme="auto"] .acc-kpi.in b { color: #86efac;}
:root[data-theme="auto"] .acc-kpi.out { background: rgba(251,146,60,.08); border-color: rgba(251,146,60,.25);}
:root[data-theme="auto"] .acc-kpi.out b { color: #fdba74;}
:root[data-theme="auto"] .lvl-chip.full { background: rgba(74,222,128,.13); color: #86efac;}
:root[data-theme="auto"] .lvl-chip.view { background: rgba(251,191,36,.13); color: #fcd34d;}
:root[data-theme="auto"] .setup-card { background: var(--panel); border-color: var(--line-2);}
:root[data-theme="auto"] .setup-ring { background: conic-gradient(var(--accent) calc(var(--p) * 1%), var(--line-2) 0);}
:root[data-theme="auto"] .setup-dot { background: var(--panel-2);}
:root[data-theme="auto"] .setup-steps li.done a { background: rgba(74,222,128,.05);}
:root[data-theme="auto"] .setup-steps li.done b { text-decoration-color: var(--muted);}
:root[data-theme="auto"] .act.edit, :root[data-theme="auto"] .act.del, :root[data-theme="auto"] .act.leave { border-color: transparent;}
:root[data-theme="auto"] .tbl-toggle, :root[data-theme="auto"] .seg { border-color: var(--line);}
}

/* ---- dashboard: Today panel ---- */
.today-card { margin-bottom: 18px; padding: 16px 18px; }
.today-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.today-head h3 { margin: 0; font-size: 16px; display: flex; align-items: center; gap: 8px; }
.today-head h3 .ico { color: var(--brand); }
.today-count { min-width: 24px; height: 24px; padding: 0 8px; border-radius: 99px; background: var(--warn-soft); color: var(--warn);
  font-weight: 800; font-size: 13px; display: inline-grid; place-items: center; }
.today-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.today-list a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line);
  color: var(--ink); text-decoration: none; transition: background .15s, border-color .15s; }
.today-list a:hover { background: var(--hover); border-color: var(--line-2); }
.today-list .t-dot { width: 30px; height: 30px; border-radius: 9px; flex: none; display: grid; place-items: center;
  background: var(--warn-soft); color: var(--warn); }
.today-list .tone-bad .t-dot { background: var(--bad-soft); color: var(--bad); }
.today-list .tone-info .t-dot { background: var(--brand-soft); color: var(--brand); }
.today-list .t-text { flex: 1; font-weight: 600; font-size: 14px; min-width: 0; }
.today-list .t-go { color: var(--brand); font-size: 13px; font-weight: 700; display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
[dir=rtl] .today-list .t-go .ico { transform: scaleX(-1); }
.today-clear, .today-good { margin: 0; display: flex; align-items: center; gap: 8px; color: var(--ok); font-weight: 600; font-size: 14px; }
.today-good { margin-top: 10px; padding: 8px 12px; background: var(--ok-soft); border-radius: 10px; }
@media (max-width: 640px) { .today-list .t-go { font-size: 0; } .today-list .t-go .ico { width: 16px; height: 16px; } }

/* ---- add / edit forms: grouped cards, two columns, save bar that stays in view ---- */
.sf-wrap { max-width: 860px; }
.sf-wrap.has-sections { max-width: 1080px; display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 22px; align-items: start; }
.sf-nav { position: sticky; top: 84px; display: grid; gap: 2px; }
.sf-nav-h { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: 0 10px 6px; }
.sf-nav a { display: flex; align-items: center; gap: 9px; padding: 8px 10px; border-radius: 9px; color: var(--ink-2); font-size: 13.5px;
  font-weight: 600; text-decoration: none; }
.sf-nav a i, .sf-card h3 i { font-style: normal; width: 22px; height: 22px; border-radius: 50%; display: inline-grid; place-items: center;
  font-size: 11.5px; font-weight: 800; background: var(--panel-2); color: var(--muted); border: 1px solid var(--line); flex: none; }
.sf-nav a:hover { background: var(--panel-2); color: var(--ink); }
.sf-nav a.on { background: var(--brand-soft); color: var(--brand); }
.sf-nav a.on i { background: var(--brand); color: #fff; border-color: var(--brand); }
.sf-editing { margin: 0 0 12px; }
form.sf { margin: 0; }
.sf-card { margin-bottom: 14px; padding: 18px 20px 4px; scroll-margin-top: 84px; }
.sf-card h3 { margin: 0 0 14px; font-size: 15px; display: flex; align-items: center; justify-content: flex-start; gap: 9px; }
.sf-card h3 i { background: var(--brand-soft); color: var(--brand); border-color: transparent; }
.sf-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px; }
.sf-grid.one { grid-template-columns: minmax(0, 1fr); }
.sf-wrap.narrow { max-width: 640px; }
.sf-grid > .field { min-width: 0; }
.sf-grid > .field.wide { grid-column: 1 / -1; }
.sf-grid > .field input:not([type=checkbox]):not([type=radio]), .sf-grid > .field select, .sf-grid > .field textarea { width: 100%; max-width: none; }
.sf-bar { position: sticky; bottom: 0; z-index: 20; display: flex; align-items: center; gap: 10px; padding: 12px 16px; margin: 4px 0 0;
  background: var(--top-bg); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border: 1px solid var(--line);
  border-radius: 14px; box-shadow: 0 -6px 20px rgba(15,23,42,.06); }
.sf-bar-gap { flex: 1; }
.sf-dirty { display: inline-flex; align-items: center; gap: 6px; color: var(--warn); font-size: 13px; font-weight: 700; }
.sf-dirty[hidden] { display: none; }
@media (max-width: 1100px) { .sf-wrap.has-sections { grid-template-columns: minmax(0, 1fr); } .sf-nav { display: none; } }
@media (max-width: 640px) { .sf-grid { grid-template-columns: minmax(0, 1fr); } .sf-card { padding: 16px 14px 2px; }
  .sf-bar { margin-inline: -4px; border-radius: 12px; } .sf-bar .btn { flex: 1; justify-content: center; } .sf-bar-gap, .sf-dirty { display: none; } }

/* ---- letterhead on screen follows the theme; on paper it stays dark blue ---- */
:root { --doc-ink: #0a2c72; --doc-muted: #5b6475; }
:root[data-theme="dark"] { --doc-ink: #e5eaf3; --doc-muted: #8e9ab1; }
@media (prefers-color-scheme: dark) { :root[data-theme="auto"] { --doc-ink: #e5eaf3; --doc-muted: #8e9ab1; } }
.voucher-sheet, .cert-wrap, .cert, .ps, .doc-sheet, .print-sheet, .idc-sheets, .af-poster { --doc-ink: #0a2c72; --doc-muted: #5b6475; }
@media print { :root, :root[data-theme] { --doc-ink: #0a2c72; --doc-muted: #5b6475; } }
.doc-school b { color: var(--doc-ink); } .doc-school small { color: var(--doc-muted); } .doc-sub { color: var(--ink-2); }
.sp-photo.ini { color: var(--brand); }

/* ---- form steps: clicked / typed-in part is blue, finished parts get a green tick ---- */
.sf-nav a.done i { background: var(--ok); border-color: var(--ok); color: transparent; position: relative; }
.sf-nav a.done i::after { content: ""; position: absolute; width: 5px; height: 9px; border: solid #fff; border-width: 0 2px 2px 0;
  transform: rotate(45deg); top: 4px; left: 8px; }
.sf-nav a.on i { background: var(--brand); border-color: var(--brand); color: #fff; }
.sf-nav a.on.done i { background: var(--ok); border-color: var(--ok); color: transparent; }
.sf-grid .phone-wrap { max-width: none; }

/* ---- mark attendance: status beside the names, WhatsApp list the same width ---- */
.att-mark { max-width: 880px; }
.att-mark th.c-roll { width: 70px; }
.att-mark .c-status { width: 1%; white-space: nowrap; text-align: end; }

/* ---- result sheet: buttons sit at the end of the row, no empty strip ---- */
.res-sheet td:last-child, .res-sheet th:last-child { width: 1%; white-space: nowrap; text-align: end; }

/* ---- online admission form settings: three cards of equal height ---- */
.af-grid { align-items: stretch; }
.af-grid > .card { display: flex; flex-direction: column; margin: 0; }

/* ---- online admission form: every field the same width as the Boy / Girl buttons ---- */
.apply-form input:not([type=radio]):not([type=checkbox]), .apply-form select, .apply-form textarea, .apply-form .phone-wrap { max-width: none; }
.res-sheet td { vertical-align: middle; }

/* ---- ID cards on a phone: one card per row, nothing cut off at the left (printing is unchanged) ---- */
.idc-page { justify-content: safe center; }
@media screen and (max-width: 760px) {
  .idc-page { grid-template-columns: 85.6mm; padding: 3mm; gap: 4mm; overflow-x: visible; }
  .idc-page.idc-single { justify-content: safe center; }
}
@media screen and (max-width: 360px) { .idc-page { zoom: .9; } }

/* ======================= Exam papers ======================= */
.pp-filters { margin-bottom: 14px; }
.pp-sum { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 14px; }
.pp-sum > a { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; color: var(--ink); text-decoration: none; }
.pp-sum > a:hover { border-color: var(--line-2); background: var(--hover); }
.pp-sum b { display: block; font-size: 24px; } .pp-sum span { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.pp-sum .warn b { color: var(--warn); } .pp-sum .ok b { color: var(--ok); } .pp-sum .bad b { color: var(--bad); } .pp-sum .info b { color: var(--brand); }
.b-info { background: var(--brand-soft); color: var(--brand); }
.pp-tbl td.acts .btn { margin-inline-start: 4px; white-space: nowrap; }
@media (max-width: 640px) {
  .m-cards.pp-tbl tbody td.acts { display: flex !important; width: auto !important; gap: 8px; justify-content: flex-start; }
  .m-cards.pp-tbl tbody td.acts .btn { flex: 1; justify-content: center; margin: 0; white-space: nowrap; }
}
.pp-tbl .pp-wa { background: #16a34a; }
.pp-note-s { font-size: 12px; margin-top: 3px; max-width: 220px; white-space: normal; }
.pp-privacy { display: flex; gap: 6px; align-items: center; font-size: 13px; margin-top: 10px; }
.pp-mode { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding-bottom: 14px; }
.pp-mode label { cursor: pointer; }
.pp-mode input { position: absolute; opacity: 0; pointer-events: none; }
.pp-mode label > span { display: grid; gap: 4px; height: 100%; padding: 14px; border: 1.5px solid var(--line-2); border-radius: 12px; background: var(--panel); }
.pp-mode label > span .ico { color: var(--brand); }
.pp-mode small { color: var(--muted); font-size: 12.5px; line-height: 1.45; }
.pp-mode input:checked + span { border-color: var(--brand); background: var(--brand-soft); box-shadow: 0 0 0 3px var(--brand-soft); }
.pp-mode input:focus-visible + span { outline: 2px solid var(--brand-2); outline-offset: 2px; }
@media (max-width: 640px) { .pp-mode { grid-template-columns: 1fr; } }

.pp-headcard { margin-bottom: 14px; }
.pp-headrow { display: flex; gap: 14px; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; }
.pp-chips { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.pp-chips span { display: grid; } .pp-chips small { font-size: 11.5px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .03em; }
.pp-chips b { font-size: 15px; }
.pp-headact { display: flex; gap: 8px; align-items: center; }
.pp-total { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 12px; padding: 10px 12px; border-radius: 10px;
  background: var(--ok-soft); color: var(--ok); font-weight: 600; font-size: 14px; }
.pp-total.bad { background: var(--warn-soft); color: var(--warn); }
.pp-tot-note { font-weight: 500; }
.pp-tabs { display: flex; gap: 8px; margin: 0 0 14px; flex-wrap: wrap; }
.pp-tabs button { font: inherit; display: inline-flex; gap: 8px; align-items: center; padding: 9px 14px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--panel); font-weight: 700; font-size: 14px; color: var(--ink-2); cursor: pointer; }
.pp-tabs button.on { background: var(--brand-soft); color: var(--brand); border-color: var(--brand-soft); }
.pp-sec { border: 1px solid var(--line); border-radius: 14px; background: var(--panel); margin-bottom: 14px; scroll-margin-top: 90px; }
.pp-sec-h { display: flex; align-items: center; gap: 10px; padding: 12px 16px; background: var(--panel-2); border-bottom: 1px solid var(--line); border-radius: 14px 14px 0 0; }
.pp-sec-t { flex: 1; min-width: 0; display: grid; gap: 2px; } .pp-sec-t b { font-size: 15px; } .pp-sec-t .muted { font-size: 13px; }
.pp-tools { display: flex; gap: 4px; align-items: flex-start; flex: none; }
.pp-tools form { margin: 0; display: flex; gap: 4px; }
.pp-ic { width: 30px; height: 30px; border-radius: 8px; display: inline-grid; place-items: center; border: 1px solid var(--line); background: var(--panel);
  color: var(--muted); cursor: pointer; font: inherit; font-size: 14px; padding: 0; text-decoration: none; list-style: none; }
.pp-ic::-webkit-details-marker { display: none; }
.pp-ic:hover { color: var(--brand); border-color: var(--line-2); background: var(--brand-soft); }
.pp-ic.del:hover { color: var(--bad); background: var(--bad-soft); }
.pp-q { display: grid; grid-template-columns: 30px minmax(0, 1fr) 64px auto; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); align-items: start; }
.pp-q .n { width: 26px; height: 26px; border-radius: 8px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; font-weight: 800; font-size: 13px; }
.pp-q .txt { font-size: 15px; line-height: 1.6; min-width: 0; overflow-wrap: anywhere; }
.pp-q .opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; margin-top: 8px; }
.pp-q .opts span { border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; font-size: 14px; }
.pp-q .opts span.ok { border-color: var(--ok); background: var(--ok-soft); color: var(--ok); font-weight: 700; }
.pp-q .mk { text-align: center; font-weight: 800; font-size: 14px; padding-top: 3px; } .pp-q .mk small { display: block; font-weight: 600; color: var(--muted); font-size: 11px; }
.pp-qimg { display: block; max-width: min(100%, 360px); max-height: 220px; margin-top: 8px; border-radius: 8px; border: 1px solid var(--line); background: #fff; }
.pp-ans { margin-top: 6px; font-size: 13px; color: var(--ok); font-weight: 600; }
.pp-kind { display: inline-block; margin-top: 6px; font-size: 11.5px; color: var(--muted); font-weight: 600; }
.pp-emptysec { margin: 0; padding: 14px 16px; font-size: 14px; }
.ur { font-family: "Noto Naskh Arabic", "Plus Jakarta Sans", serif; line-height: 2; }
.pp-add { display: flex; gap: 8px; padding: 12px 16px; flex-wrap: wrap; border-top: 1px solid var(--line); }
.pp-add a { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border: 1px dashed var(--line-2); border-radius: 9px; font-size: 13px; font-weight: 700; color: var(--brand); text-decoration: none; }
.pp-add a:hover { background: var(--brand-soft); border-style: solid; }
.pp-pop { position: relative; }
.pp-pop > summary { list-style: none; cursor: pointer; } .pp-pop > summary::-webkit-details-marker { display: none; }
.pp-pop-b { position: absolute; inset-inline-end: 0; top: calc(100% + 6px); z-index: 30; width: 300px; display: grid; gap: 10px; padding: 14px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg); }
.pp-pop.up .pp-pop-b { top: auto; bottom: calc(100% + 8px); }
.pp-pop-b label { display: grid; gap: 4px; font-size: 13px; font-weight: 600; } .pp-pop-b input, .pp-pop-b textarea { width: 100%; max-width: none; }
.pp-newsec { margin-bottom: 14px; } .pp-newsec summary { cursor: pointer; font-weight: 700; color: var(--brand); display: flex; gap: 6px; align-items: center; }
.pp-newsec-f { display: grid; grid-template-columns: 2fr 2fr 1fr auto; gap: 10px; align-items: end; margin-top: 12px; }
.pp-newsec-f label { display: grid; gap: 4px; font-size: 13px; font-weight: 600; } .pp-newsec-f input { width: 100%; max-width: none; }
@media (max-width: 760px) { .pp-newsec-f { grid-template-columns: 1fr; } .pp-q { grid-template-columns: 26px minmax(0, 1fr) 46px; } .pp-q .pp-tools { grid-column: 2 / -1; } }
.pp-bar { position: sticky; bottom: 0; z-index: 20; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 12px 16px; border: 1px solid var(--line);
  border-radius: 14px; background: var(--top-bg); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); margin-top: 6px; }
.pp-bar .sp { flex: 1; } .pp-bar .muted { font-size: 13px; } .pp-bar form { margin: 0; }
.pp-warn { display: inline-flex; gap: 6px; align-items: center; color: var(--warn); font-size: 13px; font-weight: 700; max-width: 520px; }
.pp-approve { background: var(--ok); }
.pp-file { display: flex; gap: 12px; align-items: center; padding: 12px; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 14px; }
.pp-file > div { flex: 1; display: grid; } .pp-file-ico { color: var(--brand); }
.pp-drop { display: grid; justify-items: center; gap: 4px; padding: 26px; border: 2px dashed var(--line-2); border-radius: 14px; background: var(--panel-2);
  text-align: center; cursor: pointer; color: var(--ink); }
.pp-drop .ico { color: var(--brand); } .pp-drop small { color: var(--muted); }
.pp-drop input { margin-top: 8px; max-width: 100%; }
/* question form */
.pp-edit { border: 1.5px solid var(--line-2); border-radius: 12px; background: var(--panel); overflow: hidden; }
.pp-edit:focus-within { border-color: var(--brand-2); box-shadow: 0 0 0 3px var(--brand-soft); }
.pp-tb { display: flex; flex-wrap: wrap; gap: 4px; padding: 8px; border-bottom: 1px solid var(--line); background: var(--panel-2); align-items: center; }
.pp-tb button { font: inherit; font-size: 14px; min-width: 34px; height: 32px; padding: 0 9px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--panel); color: var(--ink); cursor: pointer; font-weight: 600; }
.pp-tb button:hover { border-color: var(--brand-2); color: var(--brand); }
.pp-tb button.on { background: var(--brand); color: #fff; border-color: var(--brand); }
.pp-tb .pp-ur { font-family: "Noto Naskh Arabic", serif; font-size: 15px; }
.pp-tb .sep { width: 1px; height: 22px; background: var(--line-2); margin: 0 4px; }
.pp-tb .lbl { font-size: 11px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; margin: 0 4px; }
.pp-edit textarea { border: 0 !important; border-radius: 0 !important; box-shadow: none !important; width: 100%; max-width: none; font-size: 16px; min-height: 110px; resize: vertical; }
.pp-edit textarea.ur, .pp-qform input.ur { font-size: 18px; }
.pp-prev-wrap { border-top: 1px dashed var(--line); padding: 8px 12px; background: var(--panel-2); }
.pp-prev-lbl { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.pp-prev { min-height: 24px; font-size: 16px; line-height: 1.8; font-family: "Times New Roman", serif; }
.pp-prev:empty::before { content: "—"; color: var(--muted); }
.pp-qform math { font-size: 1.2em; } .pp-q math { font-size: 1.18em; }
.pp-qform code { background: var(--panel-2); padding: 1px 5px; border-radius: 5px; font-size: 12.5px; }
.pp-img-cur { display: flex; gap: 14px; align-items: center; margin-bottom: 8px; }
.pp-img-cur img { max-width: 220px; max-height: 140px; border-radius: 8px; border: 1px solid var(--line); background: #fff; }
.pp-qform [hidden] { display: none !important; }
.pp-keys { display: flex; flex-wrap: wrap; gap: 4px 6px; padding: 8px 10px; border-top: 1px solid var(--line); background: var(--panel); font-size: 15px; }
.pp-keys span { display: inline-flex; align-items: center; gap: 3px; font-family: "Noto Naskh Arabic", serif; }
.pp-keys kbd { font: 600 11px/1 system-ui, sans-serif; padding: 3px 5px; border-radius: 5px; border: 1px solid var(--line-2); background: var(--panel-2); color: var(--muted); }
.pp-q .mk .pp-kind2 { font-size: 10.5px; color: var(--muted); font-weight: 600; margin-bottom: 2px; }
.check-box.pp-info { background: var(--brand-soft); border-color: var(--line-2); color: var(--ink); } .check-box.pp-info .ico { color: var(--brand); }
.pp-newsec-f .btn { min-height: 44px; }

/* ---- phone cards: tidy numbers, links and buttons (vouchers, salary slips and other lists) ---- */
@media (max-width: 640px) {
  .m-cards tbody td, .m-cards tbody td .money { text-align: start !important; }
  .m-cards tbody tr { gap: 8px 14px; padding: 14px 16px; }
  .m-cards tbody td.idx { top: 14px; inset-inline-end: 16px; }
  .m-cards tbody td.acts { order: 98; grid-column: 1 / 2; align-items: center; padding-top: 10px !important; width: auto !important; }
  .m-cards tbody td.acts .act { width: 38px !important; min-width: 38px; height: 38px; border-radius: 10px; display: inline-grid; place-items: center; padding: 0; }
  .m-cards tbody tr:not(:has(td[data-label=""])) td.acts { grid-column: 1 / -1; }
  .m-cards tbody td[data-label=""] { order: 99; grid-column: 2 / 3; display: flex; justify-content: flex-end; align-items: center;
    border-top: 1px solid var(--line) !important; padding-top: 10px !important; margin-top: 4px;
    margin-inline-start: -14px; padding-inline-start: 14px !important; }
  .m-cards tbody td[data-label=""]::before { display: none; }
  .m-cards tbody td[data-label=""] a { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 10px;
    background: var(--brand); color: #fff; font-weight: 700; font-size: 13.5px; text-decoration: none; white-space: nowrap; }
  .m-cards tbody td[data-label=""]:empty { display: none; }
  .m-cards tbody td .money { font-weight: 700; }
}

/* =====================================================================================
   Brand & interactivity layer (SmartIdara logo colours, livelier type, motion).
   Uses only variables, so light and dark mode both work. Respects "reduce motion".
   ===================================================================================== */
:root {
  --bg: #f4f7fd;
  --wb-grad: linear-gradient(125deg, #0a3a9e 0%, #1560d8 55%, #1e93f2 100%);
  --m-reports: #0a3a9e; --m-admissions: #0d9488; --m-frontdesk: #0891b2; --m-complaints: #e11d48;
  --m-students: #2563eb; --m-attendance: #16a34a; --m-timetable: #7c3aed; --m-exams: #d97706; --m-homework: #0284c7;
  --m-lms: #9333ea; --m-library: #b45309; --m-fees: #059669; --m-online_payment: #0d9488; --m-accounts: #c026d3;
  --m-staff: #4f46e5; --m-inventory: #a16207; --m-transport: #ea580c; --m-branches: #475569; --m-portal: #db2777;
  --m-communication: #16a34a;
}
:root[data-theme="dark"] { --bg: #0b1120; --wb-grad: linear-gradient(125deg, #12306f 0%, #1a4fb0 55%, #1d7fd0 100%); }
@media (prefers-color-scheme: dark) { :root[data-theme="auto"] { --bg: #0b1120; --wb-grad: linear-gradient(125deg, #12306f 0%, #1a4fb0 55%, #1d7fd0 100%); } }
body { background: var(--bg); }

/* ---- type: clearer hierarchy ---- */
.top h1 { font-size: 24px; font-weight: 800; letter-spacing: -.02em; }
.kpi .value, .stat .value { font-size: 30px; font-weight: 800; letter-spacing: -.025em; font-variant-numeric: tabular-nums; }
.kpi .label, .stat .label { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
html[lang="ur"] .kpi .label, html[lang="ur"] .stat .label { text-transform: none; letter-spacing: 0; font-size: 13px; }
.card h3 { letter-spacing: -.01em; }

/* ---- module colours: every menu icon has its own colour ---- */
.side [data-mod] .ico { color: var(--mc, var(--side-muted)); }
.side [data-mod="reports"] { --mc: var(--m-reports); } .side [data-mod="admissions"] { --mc: var(--m-admissions); }
.side [data-mod="frontdesk"] { --mc: var(--m-frontdesk); } .side [data-mod="complaints"] { --mc: var(--m-complaints); }
.side [data-mod="students"] { --mc: var(--m-students); } .side [data-mod="attendance"] { --mc: var(--m-attendance); }
.side [data-mod="timetable"] { --mc: var(--m-timetable); } .side [data-mod="exams"] { --mc: var(--m-exams); }
.side [data-mod="homework"] { --mc: var(--m-homework); } .side [data-mod="lms"] { --mc: var(--m-lms); }
.side [data-mod="library"] { --mc: var(--m-library); } .side [data-mod="fees"] { --mc: var(--m-fees); }
.side [data-mod="online_payment"] { --mc: var(--m-online_payment); } .side [data-mod="accounts"] { --mc: var(--m-accounts); }
.side [data-mod="staff"] { --mc: var(--m-staff); } .side [data-mod="inventory"] { --mc: var(--m-inventory); }
.side [data-mod="transport"] { --mc: var(--m-transport); } .side [data-mod="branches"] { --mc: var(--m-branches); }
.side [data-mod="portal"] { --mc: var(--m-portal); } .side [data-mod="communication"] { --mc: var(--m-communication); }
:root[data-theme="dark"] .side [data-mod] .ico { filter: brightness(1.45) saturate(.85); }
@media (prefers-color-scheme: dark) { :root[data-theme="auto"] .side [data-mod] .ico { filter: brightness(1.45) saturate(.85); } }
.side summary .nav-count, .side details a .nav-count { margin-inline-start: auto; font-size: 11px; line-height: 18px; min-width: 20px; padding: 0 6px; text-align: center; }
.side details a { display: flex; align-items: center; }

/* ---- motion: hover lift, button press, cards fade in ---- */
.btn { transition: background .15s, box-shadow .15s, transform .12s, filter .15s; }
.btn:active { transform: scale(.97); }
.kpi, .module-card, .today-list a, .setup-steps a, .pp-sum > a, .dt-card, .chart-card, .staff-strip { transition: transform .18s, box-shadow .18s, border-color .18s; }
@media (hover: hover) {
  .kpi:hover, .module-card:hover, .dt-card:hover, .pp-sum > a:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(15,23,42,.08); }
  .today-list a:hover { transform: translateX(3px); }
  [dir=rtl] .today-list a:hover { transform: translateX(-3px); }
}
@keyframes fade-up { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.kpis > .card, .dash-trio > .card, .charts > .card, .grid > .module-card, .today-list li, .pp-sum > a, .m-cards tbody tr {
  animation: fade-up .45s cubic-bezier(.2,.7,.2,1) both; }
.kpis > :nth-child(2), .dash-trio > :nth-child(2), .charts > :nth-child(2), .grid > :nth-child(2), .today-list li:nth-child(2), .pp-sum > :nth-child(2), .m-cards tbody tr:nth-child(2) { animation-delay: .05s; }
.kpis > :nth-child(3), .dash-trio > :nth-child(3), .charts > :nth-child(3), .grid > :nth-child(3), .today-list li:nth-child(3), .pp-sum > :nth-child(3), .m-cards tbody tr:nth-child(3) { animation-delay: .1s; }
.kpis > :nth-child(4), .charts > :nth-child(4), .grid > :nth-child(4), .today-list li:nth-child(4), .pp-sum > :nth-child(4), .m-cards tbody tr:nth-child(4) { animation-delay: .15s; }
.kpis > :nth-child(5), .charts > :nth-child(5), .grid > :nth-child(5), .today-list li:nth-child(5), .pp-sum > :nth-child(5), .m-cards tbody tr:nth-child(5) { animation-delay: .2s; }
.kpis > :nth-child(n+6), .charts > :nth-child(n+6), .grid > :nth-child(n+6), .today-list li:nth-child(n+6), .m-cards tbody tr:nth-child(n+6) { animation-delay: .25s; }

/* ---- welcome banner (dashboard) ---- */
.hero.wb { background: var(--wb-grad); color: #fff; border: 0; box-shadow: 0 14px 34px rgba(10,58,158,.25); padding: 24px 26px;
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px 28px; align-items: center; }
.hero.wb::before { display: block; content: ""; position: absolute; inset: auto -80px -120px auto; width: 320px; height: 320px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.16), rgba(255,255,255,0) 70%); pointer-events: none; }
.hero.wb::after { display: block; content: ""; position: absolute; inset: -90px auto auto 40%; width: 220px; height: 220px; border-radius: 50%;
  background: radial-gradient(circle, rgba(52,184,86,.28), rgba(52,184,86,0) 70%); pointer-events: none; }
.hero.wb h2 { color: #fff; font-size: 26px; font-weight: 800; letter-spacing: -.02em; display: flex; align-items: center; gap: 10px; }
.wb-wave { display: inline-block; transform-origin: 70% 70%; animation: wave 1.6s ease-in-out .3s 2; }
@keyframes wave { 0%, 60%, 100% { transform: rotate(0); } 10%, 30% { transform: rotate(14deg); } 20% { transform: rotate(-8deg); } 40% { transform: rotate(-4deg); } 50% { transform: rotate(10deg); } }
.hero.wb .wb-date { color: rgba(255,255,255,.78); margin: 2px 0 0; font-size: 14px; }
.hero.wb .wb-sum { color: #fff; margin: 10px 0 14px; font-size: 15.5px; }
.hero.wb .wb-sum b { font-size: 18px; }
.hero.wb .quick a { background: rgba(255,255,255,.14); color: #fff; border: 1px solid rgba(255,255,255,.22); backdrop-filter: blur(4px); }
.hero.wb .quick a .ico { color: #fff; }
.hero.wb .quick a:hover { background: rgba(255,255,255,.26); color: #fff; border-color: rgba(255,255,255,.35); transform: translateY(-1px); }
.wb-stats { display: grid; grid-template-columns: repeat(3, auto); gap: 10px; position: relative; z-index: 1; }
.wb-stats > div { background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.2); border-radius: 14px; padding: 12px 16px; min-width: 120px; }
.wb-stats b { display: block; font-size: 28px; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.wb-stats span { display: block; font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: rgba(255,255,255,.8); margin-top: 3px; }
html[lang="ur"] .wb-stats span { text-transform: none; letter-spacing: 0; font-size: 13px; }
@media (max-width: 1100px) { .hero.wb { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 640px) { .hero.wb { padding: 20px 18px; } .hero.wb h2 { font-size: 22px; }
  .wb-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; } .wb-stats > div { min-width: 0; padding: 10px; }
  .wb-stats b { font-size: 22px; } .wb-stats span { font-size: 10px; } }

/* ---- dashboard: Coming up · Birthdays · App usage ---- */
.dash-trio { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; margin: 0 0 20px; }
.dt-card { margin: 0; padding: 16px 18px; display: flex; flex-direction: column; }
.dt-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.dt-head h3 { margin: 0; font-size: 15.5px; display: flex; align-items: center; gap: 8px; }
.dt-head h3 .ico { color: var(--brand); } .dt-head a { font-size: 13px; font-weight: 600; }
.dt-count { min-width: 26px; height: 26px; padding: 0 8px; border-radius: 99px; background: var(--brand-soft); color: var(--brand); font-weight: 800; font-size: 13px; display: inline-grid; place-items: center; }
.dt-empty { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.dt-tip { margin: auto 0 0; padding-top: 10px; font-size: 12.5px; color: var(--muted); }
.up-list, .bd-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.up-list li { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 12px; background: var(--panel-2); border: 1px solid var(--line); }
.up-date { width: 44px; flex: none; text-align: center; border-radius: 10px; padding: 4px 0; background: var(--brand-soft); color: var(--brand); line-height: 1.1; }
.up-date b { display: block; font-size: 18px; } .up-date small { font-size: 11px; font-weight: 700; text-transform: uppercase; }
.up-list .k-holiday .up-date { background: var(--bad-soft); color: var(--bad); }
.up-list .k-exam .up-date { background: var(--warn-soft); color: var(--warn); }
.up-list .k-meeting .up-date { background: var(--ok-soft); color: var(--ok); }
.up-txt { flex: 1; min-width: 0; display: grid; } .up-txt b { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.up-txt small { color: var(--muted); font-size: 12px; }
.up-when { flex: none; font-size: 12px; font-weight: 700; color: var(--muted); }
.up-when.soon { color: var(--warn); }
.bd-list li { display: flex; align-items: center; gap: 10px; padding: 4px 2px; }
.bd-list li.past { opacity: .55; }
.bd-list li.today { background: linear-gradient(90deg, var(--warn-soft), transparent); border-radius: 10px; padding: 6px; }
.ini.av { width: 34px; height: 34px; border-radius: 50%; flex: none; display: grid; place-items: center; font-weight: 800; font-size: 14px;
  background: var(--brand-soft); color: var(--brand); }
.bd-txt { flex: 1; min-width: 0; display: grid; } .bd-txt a { font-weight: 700; font-size: 14px; color: var(--ink); }
.bd-txt small { color: var(--muted); font-size: 12px; } .bd-day { font-size: 12.5px; font-weight: 700; color: var(--muted); white-space: nowrap; }
.bd-list li.today .bd-day { color: var(--warn); }
.us-row { margin-bottom: 14px; } .us-row small { color: var(--muted); font-size: 12.5px; }
.us-top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; font-size: 14px; }
.us-top span b { font-size: 20px; font-weight: 800; color: var(--brand); }
.us-bar { height: 10px; border-radius: 99px; background: var(--panel-2); overflow: hidden; border: 1px solid var(--line); margin-bottom: 5px; }
.us-bar span { display: block; height: 100%; border-radius: 99px; background: var(--wb-grad); animation: grow 1s cubic-bezier(.2,.7,.2,1) both .2s; transform-origin: left center; }
.us-bar.s span { background: linear-gradient(90deg, #16a34a, #34d399); }
[dir=rtl] .us-bar span { transform-origin: right center; }
@keyframes grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.meter span { animation: grow .9s cubic-bezier(.2,.7,.2,1) both .2s; transform-origin: left center; }

/* ---- avatars with their own colour ---- */
.ini.hued, .who-cell .ini.hued { background: hsl(var(--hue) 85% 93%); color: hsl(var(--hue) 60% 32%); }
:root[data-theme="dark"] .ini.hued { background: hsl(var(--hue) 45% 22%); color: hsl(var(--hue) 85% 78%); }
@media (prefers-color-scheme: dark) { :root[data-theme="auto"] .ini.hued { background: hsl(var(--hue) 45% 22%); color: hsl(var(--hue) 85% 78%); } }

/* ---- list status tabs with counts ---- */
.st-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 2px 0 12px; }
.st-tabs a { display: inline-flex; align-items: center; gap: 8px; padding: 7px 8px 7px 14px; border-radius: 99px; border: 1px solid var(--line);
  background: var(--panel); color: var(--ink-2); font-weight: 600; font-size: 13.5px; text-decoration: none; transition: background .15s, color .15s, border-color .15s; }
.st-tabs a b { min-width: 24px; padding: 1px 8px; border-radius: 99px; background: var(--panel-2); color: var(--muted); font-size: 12px; text-align: center; }
.st-tabs a:hover { border-color: var(--line-2); background: var(--hover); }
.st-tabs a.on { background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: 0 4px 12px rgba(10,58,158,.22); }
.st-tabs a.on b { background: rgba(255,255,255,.22); color: #fff; }
@media (max-width: 640px) { .st-tabs { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; } .st-tabs a { flex: none; } }

/* ---- success messages: a little check "pop" ---- */
.msgs.toasts li.success .t-ico { animation: pop .45s cubic-bezier(.2,1.6,.4,1) both .1s; }
@keyframes pop { from { transform: scale(0); } to { transform: scale(1); } }

/* ---- calmer for people who turn off motion ---- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; transition-duration: .01ms !important; }
}
@media print { .kpis > .card, .charts > .card, .m-cards tbody tr { animation: none !important; } }
/* ---- parent portal: livelier child cards ---- */
.child-card { position: relative; overflow: hidden; transition: transform .18s, box-shadow .18s; animation: fade-up .45s cubic-bezier(.2,.7,.2,1) both; }
.child-card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--wb-grad); }
@media (hover: hover) { .child-card:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(15,23,42,.08); } }
.child-card .ward-initial.ini.av { width: 56px; height: 56px; font-size: 22px; border-radius: 16px; }
.child-stats b { font-variant-numeric: tabular-nums; }
.my-pay-hero .big { font-variant-numeric: tabular-nums; }
@media (max-width: 640px) { .wb-stats span { letter-spacing: .02em; } }

/* ---- welcome banner: greeting + one line only (quick links and numbers are already on the page) ---- */
.hero.wb { grid-template-columns: minmax(0, 1fr); padding: 22px 26px; }
.hero.wb .wb-sum { margin: 10px 0 0; }
.hero.wb .wb-sum a { color: #fff; text-decoration: none; border-bottom: 1px dashed rgba(255,255,255,.5); }
.hero.wb .wb-sum a:hover { border-bottom-style: solid; }

/* ---- live updates ---- */
.msgs.toasts li.live-toast { animation: toast-in .3s ease-out, live-ring 1.2s ease-out .3s 1; }
@keyframes live-ring { 0% { box-shadow: 0 12px 30px rgba(15,23,42,.28), 0 0 0 0 rgba(30,147,242,.6); }
  100% { box-shadow: 0 12px 30px rgba(15,23,42,.28), 0 0 0 14px rgba(30,147,242,0); } }
.chat .live-new { animation: fade-up .4s ease-out both; }
.side .set-alerts .btn { flex: none; }
@keyframes live-flash { 0% { box-shadow: 0 0 0 0 rgba(30,147,242,.45); } 100% { box-shadow: 0 0 0 12px rgba(30,147,242,0); } }
.live-flash { animation: live-flash 1.2s ease-out 1; }

/* ===== Landing page: offer strip, hero devices, trust line, Why section, compare toggle (Oct 2026) ===== */
.lp-offer { background: linear-gradient(90deg, #0a3a9e, #1e93f2); color: #fff; font-size: 14.5px; font-weight: 600; }
.lp-offer .lp-wrap { display: flex; justify-content: center; align-items: center; gap: 6px 14px; flex-wrap: wrap;
  padding-top: 9px; padding-bottom: 9px; text-align: center; }
.lp-offer a { color: #ffd166; text-decoration: underline; font-weight: 700; white-space: nowrap; }
.lp-hero-in:has(.lp-devices) { grid-template-columns: 1fr 1.08fr; }
.lp-btn-lg.lp-wa { background: #25d366; border-color: #25d366; color: #fff; }
.lp-btn-lg.lp-wa:hover { background: #1fb956; box-shadow: 0 8px 20px rgba(37,211,102,.35); }
.lp-trust { list-style: none; margin: 22px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 20px; color: #c6d6f2; font-size: 14px; }
.lp-trust li { display: inline-flex; align-items: center; gap: 6px; }
.lp-trust .ico { color: #6ee08a; }
.lp-devices { position: relative; padding: 0 0 34px; }
.lp-laptop { margin-inline-end: 56px; }
.lp-screen { background: #0b1220; border: 1px solid rgba(255,255,255,.16); border-bottom: 0; border-radius: 14px 14px 0 0; padding: 9px;
  box-shadow: 0 30px 60px rgba(0,0,0,.35); }
.lp-screen img, .lp-phone img { display: block; width: 100%; height: auto; }
.lp-screen img { border-radius: 6px; }
.lp-laptop-base { position: relative; height: 15px; margin: 0 -26px; border-radius: 0 0 16px 16px; background: linear-gradient(#d3d9e6, #9aa4b8); }
.lp-laptop-base::after { content: ""; position: absolute; left: 50%; top: 0; width: 86px; height: 6px; margin-left: -43px;
  background: #8a93a6; border-radius: 0 0 8px 8px; }
.lp-phone { position: absolute; right: 0; bottom: 0; width: 26%; max-width: 150px; padding: 6px; border-radius: 24px; background: #0b1220;
  border: 1px solid rgba(255,255,255,.2); box-shadow: 0 24px 50px rgba(0,0,0,.45); }
.lp-phone img { border-radius: 18px; }
.lp-why { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.lp-why > div { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 24px; }
.lp-why .q { display: block; color: var(--bad); font-weight: 700; font-size: 15px; }
.lp-why b { display: block; font-size: 19px; margin-top: 6px; color: var(--ink); }
.lp-why p { color: var(--muted); margin: 8px 0 0; font-size: 14.5px; }
.lp-plan-offer { text-align: center; margin: -8px 0 26px; }
.lp-plan-offer span { display: inline-block; background: #fff4d6; color: #7a4f00; font-weight: 700; padding: 7px 16px; border-radius: 999px; }
.lp-compare-wrap { margin-top: 48px; }
.lp-compare-wrap > summary { list-style: none; display: flex; width: max-content; margin: 0 auto 22px; cursor: pointer; }
.lp-compare-wrap > summary::-webkit-details-marker { display: none; }
.lp-compare-wrap > summary .ico { transition: transform .2s; }
.lp-compare-wrap[open] > summary .ico { transform: rotate(180deg); }
html[dir="rtl"] .lp-phone { right: auto; left: 0; }
html[dir="rtl"] .lp-laptop { margin-inline-end: 0; margin-inline-start: 56px; }
@media (max-width: 960px) { .lp-hero-in:has(.lp-devices) { grid-template-columns: 1fr; } .lp-devices { max-width: 560px; } }
@media (max-width: 760px) {
  .side-social { display: none; }                    /* covered the headline on phones; the footer has the same links */
  .lp-why { grid-template-columns: 1fr; }
  .lp-laptop { margin-inline-end: 36px; } .lp-phone { border-radius: 16px; padding: 4px; } .lp-phone img { border-radius: 12px; }
  .lp-offer { font-size: 13.5px; }
}
:root[data-theme="dark"] .lp-plan-offer span { background: #3a2f12; color: #ffd98a; }
@media (prefers-color-scheme: dark) { :root[data-theme="auto"] .lp-plan-offer span { background: #3a2f12; color: #ffd98a; } }

/* Contact section: offices list (one card per office, edited in the control panel) */
.lp-offices.one { grid-template-columns: minmax(0, 420px); }
.lp-office-head .flag-any { display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); }

/* Landing: per-student price calculator */
.lp-calc { display: grid; grid-template-columns: 1.25fr 1fr; gap: 0; max-width: 980px; margin: 0 auto; padding: 0; overflow: hidden; border-radius: 22px; }
.lp-calc-in { padding: 32px; }
.lp-calc-q { display: block; font-weight: 700; font-size: 18px; margin-bottom: 16px; color: var(--ink); }
.lp-calc-row { display: flex; gap: 14px; align-items: center; }
.lp-calc-row input[type=range] { flex: 1; min-width: 0; accent-color: var(--brand-2); height: 6px; }
.lp-calc-row input[type=number] { width: 110px; flex: none; font-size: 18px; font-weight: 700; text-align: center; padding: 10px; }
.lp-calc-out { margin: 24px 0 18px; padding: 18px 20px; border-radius: 16px; background: var(--brand-soft); }
.lp-calc-out small { display: block; color: var(--muted); font-weight: 600; }
.lp-calc-out b { font-size: 40px; letter-spacing: -.03em; color: var(--brand); }
.lp-calc-out .per { color: var(--muted); font-weight: 600; margin-inline-start: 4px; }
.lp-calc-out p { margin: 4px 0 0; font-size: 14px; }
.lp-calc-rules, .lp-calc-inc ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; font-size: 14.5px; }
.lp-calc-rules li, .lp-calc-inc li { display: flex; gap: 8px; align-items: flex-start; }
.lp-calc-rules .ico, .lp-calc-inc .ico { color: var(--accent, #34b856); flex: none; margin-top: 2px; }
.lp-calc-inc { padding: 32px; background: linear-gradient(160deg, #0a3a9e, #1e93f2); color: #fff; display: flex; flex-direction: column; gap: 16px; }
.lp-calc-inc b { font-size: 18px; }
.lp-calc-inc .ico { color: #8ff0a8; }
.lp-calc-inc .btn { margin-top: auto; background: #fff; color: #0a3a9e; border-color: #fff; justify-content: center; }
@media (max-width: 760px) {
  .lp-calc { grid-template-columns: 1fr; }
  .lp-calc-in, .lp-calc-inc { padding: 22px; }
  .lp-calc-out b { font-size: 34px; }
}

/* ===== Phone fixes: nothing wider than the screen (Nov 2026) ===== */
.main { overflow-wrap: break-word; }                                  /* long links / file names wrap */
.table-scroll { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
@media print { .table-scroll { overflow: visible; } }
@media (max-width: 820px) {
  .top-search input[type=search] { max-width: none; }
  .top-search kbd { display: none; }                                  /* keyboard hint: no keyboard on a phone */
  .tabs { display: flex; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
  .tabs::-webkit-scrollbar { display: none; }
  .tabs a { white-space: nowrap; flex: none; }
}
@media (max-width: 560px) {
  .doc-school { flex: 1 1 calc(100% - 80px); }                         /* document title moves under the school name */
  .sig { gap: 10px; }
  .sig span { min-width: 0; flex: 1; font-size: 12px; }
}
@media (max-width: 640px) {
  .m-cards tr.m-head { display: none !important; }                    /* heading row written without <thead> */
  .m-cards tbody tr.m-total { font-weight: 700; }
  .m-cards tbody td.c-first b { font-size: 15px; }
}
@media (max-width: 640px) { .m-cards tbody td.wide { grid-column: 1 / -1; } }
@media (max-width: 640px) {
  .m-cards tbody td.wide { flex-wrap: wrap; }
  .m-cards tbody td.wide::before { flex: 0 0 100%; }
}
@media (max-width: 640px) { .m-cards tbody td { width: auto !important; max-width: none !important; } }
@media (max-width: 640px) { .m-cards .badge, .m-cards .pill { white-space: normal; max-width: 100%; } }

/* ===== Landing polish (Nov 2026): phone bar, touch sizes, focus, contrast, consistent cards ===== */
.lp { --muted: #56657a; }                                              /* slightly darker grey: easier to read */
:root[data-theme="dark"] .lp { --muted: #8e9ab1; }
@media (prefers-color-scheme: dark) { :root[data-theme="auto"] .lp { --muted: #8e9ab1; } }

/* keyboard users always see where they are */
.lp a:focus-visible, .lp button:focus-visible, .lp summary:focus-visible, .lp input:focus-visible,
.lp select:focus-visible, .lp textarea:focus-visible, .lp-mbar a:focus-visible, .wa-float:focus-visible, .lp-top:focus-visible {
  outline: 3px solid #ffb020; outline-offset: 2px; }

/* one card style everywhere on the page */
.lp-feature, .lp-why > div, .lp-safe-card, .lp-office { border-radius: 16px; }
.lp-why > div, .lp-safe-card, .lp-office { transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.lp-why > div:hover, .lp-safe-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); border-color: #bcd8f8; }
.lp .btn { transition: transform .15s ease, box-shadow .2s ease, background .2s ease; }
.lp .btn:active { transform: translateY(1px); }
.lp .btn.is-sending { opacity: .75; cursor: progress; }

/* hero pictures slide in gently */
@keyframes lp-rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.lp-devices .lp-laptop { animation: lp-rise .7s ease-out both; }
.lp-devices .lp-phone { animation: lp-rise .7s .18s ease-out both; }
.lp-devices picture { display: block; }
@media (prefers-reduced-motion: reduce) { .lp-devices .lp-laptop, .lp-devices .lp-phone { animation: none; } }

/* phone bottom bar: Book a free demo + WhatsApp */
.lp-mbar { display: none; }
@media (max-width: 760px) {
  .lp-mbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 70; display: flex; gap: 10px;
    padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); background: rgba(255,255,255,.96);
    border-top: 1px solid var(--line); box-shadow: 0 -8px 24px rgba(15,23,42,.08); backdrop-filter: blur(8px);
    transition: transform .25s ease; }
  .lp-mbar .btn { flex: 1; justify-content: center; min-height: 48px; font-size: 15px; border-radius: 12px; }
  .lp-mbar .lp-wa { background: #25d366; border-color: #25d366; color: #fff; flex: 0 0 auto; padding-inline: 18px; }
  .lp-mbar.away { transform: translateY(110%); }
  body:has(.lp-mbar) .wa-float, body:has(.lp-mbar) .lp-top { display: none !important; }
  body:has(.lp-mbar) .lp { padding-bottom: 74px; }
  /* touch-friendly: bigger tap targets, 16px fields so phones don't zoom in */
  .lp .btn, .lp-links a { min-height: 44px; }
  .lp-form input, .lp-form select, .lp-form textarea, .lp-calc-row input[type=number] { font-size: 16px; }
}
:root[data-theme="dark"] .lp-mbar { background: rgba(18,26,43,.96); }
@media (prefers-color-scheme: dark) { :root[data-theme="auto"] .lp-mbar { background: rgba(18,26,43,.96); } }
@media print { .lp-mbar { display: none !important; } }
/* readable small blue labels and green buttons (WCAG AA contrast) */
.lp-eyebrow.dark { color: #126bbd; }
:root[data-theme="dark"] .lp-eyebrow.dark { color: #5aa9ff; }
@media (prefers-color-scheme: dark) { :root[data-theme="auto"] .lp-eyebrow.dark { color: #5aa9ff; } }
.wa-float, .lp-btn-lg.lp-wa, .lp-mbar .lp-wa { background: #15803d; border-color: #15803d; }
.wa-float:hover, .lp-btn-lg.lp-wa:hover { background: #116a32; }
.lp-faq-more a { text-decoration: underline; text-underline-offset: 3px; }
.ft-col .ft-h { font-weight: 700; }
/* laptops 961–1180px: the menu is tighter so "Book a demo" never slides off the edge */
@media (min-width: 961px) and (max-width: 1180px) {
  .lp-nav-in { gap: 12px; }
  .lp-links { gap: 0; }
  .lp-links a { padding: 8px 9px; font-size: 14px; }
  .lp-links a.lp-login { margin-inline-start: 6px; }
}

/* ===== Landing interactivity (Nov 2026): hero tilt + floating cards, scroll story, magnetic buttons ===== */
/* hero: devices rise in with depth, then follow the cursor a little (desktop) or float gently (phones) */
.lp-hero { --gx: 70%; --gy: 40%; }
.lp-glow { position: absolute; inset: 0; pointer-events: none; z-index: 0; opacity: 0; transition: opacity .4s ease;
  background: radial-gradient(420px circle at var(--gx) var(--gy), rgba(30,147,242,.28), transparent 65%); }
.lp-hero.glow .lp-glow { opacity: 1; }
.lp-hero-in { z-index: 1; }
.lp-devices { perspective: 1400px; }
.lp-devices > .lp-laptop, .lp-devices > .lp-phone { transform-style: preserve-3d; }
.lp-devices.tilt { transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .25s ease-out; transform-style: preserve-3d; }
@keyframes lp-rise3d { from { opacity: 0; transform: translateY(40px) rotateX(16deg) scale(.96); } to { opacity: 1; transform: none; } }
.lp-devices .lp-laptop { animation: lp-rise3d .9s cubic-bezier(.2,.7,.2,1) both; }
.lp-devices .lp-phone { animation: lp-rise3d .9s .2s cubic-bezier(.2,.7,.2,1) both; }

/* floating cards with real figures from the dashboard picture */
.lp-chips { position: absolute; inset: 0; pointer-events: none; }
.lp-chip { position: absolute; display: flex; gap: 9px; align-items: center; padding: 9px 13px; border-radius: 14px;
  background: rgba(255,255,255,.96); color: #101d35; box-shadow: 0 14px 34px rgba(4,16,48,.35); font-size: 12.5px; line-height: 1.25;
  white-space: nowrap; opacity: 0; animation: lp-pop .5s cubic-bezier(.2,.9,.3,1.3) forwards, lp-float 6s ease-in-out infinite; }
.lp-chip > .ico { flex: none; width: 30px; height: 30px; padding: 7px; border-radius: 10px; background: #e8f2fe; color: #0a3a9e; }
.lp-chip b { display: block; font-size: 13px; }
.lp-chip small { color: #56657a; font-size: 11.5px; }
.lp-chip.c1 { left: -26px; top: 18%; animation-delay: .9s, 1.4s; }
.lp-chip.c2 { right: 14%; top: -18px; animation-delay: 1.15s, 2s; }
.lp-chip.c2 > .ico { background: #e7f8ee; color: #15803d; }
.lp-chip.c3 { right: -18px; bottom: 16%; animation-delay: 1.4s, .6s; }
.lp-chip.c3 > .ico { background: #fff4d6; color: #8a5a00; }
.lp-chip.c4 { left: 12%; bottom: 0; animation-delay: 1.65s, 1.1s; }
.lp-chip.c4 > .ico { background: #f3ecff; color: #6d28d9; }
@keyframes lp-pop { from { opacity: 0; transform: translateY(10px) scale(.85); } to { opacity: 1; transform: none; } }
@keyframes lp-float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -8px; } }
@media (max-width: 760px) {
  .lp-chip { padding: 6px 9px; font-size: 11px; border-radius: 11px; gap: 6px; }
  .lp-chip > .ico { width: 24px; height: 24px; padding: 5px; }
  .lp-chip b { font-size: 11.5px; } .lp-chip small { display: none; }
  .lp-chip.c1 { left: -6px; } .lp-chip.c3 { right: -4px; } .lp-chip.c2 { top: -10px; right: 8%; } .lp-chip.c4 { display: none; }
}

/* scroll story: laptop stays on screen, its screen changes with each step */
.st-wrap { display: grid; grid-template-columns: 1.25fr 1fr; gap: 56px; align-items: start; }
.st-stage { position: sticky; top: 110px; padding-bottom: 40px; }
.st-laptop { margin-inline-end: 70px; }
.st-laptop .lp-screen { position: relative; aspect-ratio: 16 / 10; padding: 9px; }
.st-img { position: absolute; inset: 9px; width: calc(100% - 18px); height: calc(100% - 18px); object-fit: cover; object-position: top left;
  border-radius: 6px; opacity: 0; transform: scale(1.03); transition: opacity .55s ease, transform .7s ease; }
.st-img.on { opacity: 1; transform: none; }
.st-phone { position: absolute; right: 0; bottom: 30px; width: 26%; max-width: 170px; padding: 6px; border-radius: 24px; background: #0b1220;
  border: 1px solid rgba(255,255,255,.2); box-shadow: 0 24px 50px rgba(4,16,48,.35); opacity: 0; transform: translateY(30px) scale(.94);
  transition: opacity .5s ease, transform .6s cubic-bezier(.2,.8,.2,1.15); }
.st-phone img { display: block; width: 100%; height: auto; border-radius: 18px; }
.st-phone.on { opacity: 1; transform: none; }
.st-bar { height: 4px; margin: 26px 70px 0 0; border-radius: 99px; background: var(--line); overflow: hidden; }
.st-bar span { display: block; height: 100%; width: 25%; border-radius: 99px; background: linear-gradient(90deg, #1e93f2, #0a3a9e); transition: width .5s ease; }
.st-steps { list-style: none; margin: 0; padding: 0; }
.st-step { min-height: 62vh; display: flex; flex-direction: column; justify-content: center; padding: 10px 0;
  opacity: .32; transition: opacity .4s ease, transform .4s ease; transform: translateX(10px); }
.st-step.on { opacity: 1; transform: none; }
.st-n { display: inline-block; align-self: flex-start; font-size: 12.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: #126bbd; background: var(--brand-soft); padding: 5px 11px; border-radius: 99px; margin-bottom: 12px; }
.st-step h3 { font-size: 28px; letter-spacing: -.02em; margin: 0 0 10px; }
.st-step p { color: var(--muted); font-size: 16.5px; margin: 0; max-width: 440px; }
.st-mob { display: none; }
@media (max-width: 960px) {
  .st-wrap { grid-template-columns: 1fr; gap: 0; }
  .st-stage { display: none; }
  .st-step { min-height: 0; opacity: 1; transform: none; padding: 0 0 40px; }
  .st-mob { display: block; width: 100%; height: auto; margin-top: 18px; border-radius: 14px; border: 1px solid var(--line);
    box-shadow: 0 14px 30px rgba(15,23,42,.10); }
  .st-mob.st-mob-phone { width: 62%; max-width: 260px; margin-inline: auto; border-radius: 22px; border: 6px solid #0b1220; }
  .st-step h3 { font-size: 23px; }
}
:root[data-theme="dark"] .st-n { color: #8cc4ff; }
@media (prefers-color-scheme: dark) { :root[data-theme="auto"] .st-n { color: #8cc4ff; } }

/* magnetic buttons (desktop with a mouse) */
.lp .btn.mag { transition: transform .18s ease-out, box-shadow .2s ease, background .2s ease; }

/* Pause motion switch (footer) + visitors who asked for less motion */
.lp-motion { background: none; border: 1px solid rgba(255,255,255,.35); color: inherit; border-radius: 99px; padding: 5px 12px; font: inherit;
  font-size: 12.5px; cursor: pointer; }
.lp-motion[aria-pressed="true"] { background: rgba(255,255,255,.15); }
html.lp-still .lp *, html.lp-still .lp *::before, html.lp-still .lp *::after { animation: none !important; }
html.lp-still .lp-chip { opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  .lp-chip { animation: none; opacity: 1; }
  .lp-devices .lp-laptop, .lp-devices .lp-phone { animation: none; }
  .st-img, .st-phone, .st-step { transition: none; }
}
/* story steps: the current step is marked by a blue line and darker heading (no faded text, so it stays readable) */
.st-step { opacity: 1; transform: none; padding-inline-start: 24px; border-inline-start: 3px solid var(--line);
  transition: border-color .4s ease; }
.st-step h3 { color: var(--muted); transition: color .4s ease; }
.st-step.on { border-color: #1e93f2; }
.st-step.on h3 { color: var(--ink); }
@media (max-width: 960px) { .st-step { border: 0; padding-inline-start: 0; } .st-step h3 { color: var(--ink); } }

/* ===== Story fixes (Nov 2026): pictures stay inside the laptop screen, laptop centred, short step accent ===== */
.st-laptop .lp-screen { overflow: hidden; border-radius: 14px 14px 0 0; }
.st-stage { top: max(96px, calc(50vh - 230px)); }
.st-step { position: relative; border-inline-start: 0; padding-inline-start: 26px; }
.st-step::before { content: ""; position: absolute; inset-inline-start: 0; top: calc(50% - 56px); height: 112px; width: 3px;
  border-radius: 99px; background: var(--line); transition: background .4s ease; }
.st-step.on::before { background: linear-gradient(#1e93f2, #0a3a9e); }
@media (max-width: 960px) { .st-step::before { display: none; } .st-step { padding-inline-start: 0; } }

/* ===== Features page + "See all features" ===== */
.lp-more { text-align: center; margin: 34px 0 0; }
.lp-feature h3 { display: block; font-size: 15px; margin: 0 0 2px; letter-spacing: 0; }
.lp-fhero { padding-top: 56px; padding-bottom: 48px; background: linear-gradient(180deg, var(--brand-soft), transparent); }
.lp-fhero h1 { font-size: 46px; line-height: 1.1; letter-spacing: -.03em; margin: 10px 0 14px; max-width: 760px; }
.lp-fhero .lead { color: var(--muted); font-size: 17.5px; max-width: 640px; margin: 0 0 26px; }
.lp-crumb { display: flex; gap: 8px; align-items: center; font-size: 13.5px; color: var(--muted); margin-bottom: 18px; }
.lp-crumb a { color: var(--brand); }
.lp-fjump { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 30px; }
.lp-fjump a { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 99px; background: var(--panel);
  border: 1px solid var(--line); color: var(--ink-2); font-weight: 600; font-size: 14px; }
.lp-fjump a:hover { border-color: #bcd8f8; color: var(--brand); text-decoration: none; }
.lp-fjump a span { font-size: 12px; color: var(--muted); background: var(--panel-2); border-radius: 99px; padding: 1px 7px; }
.lp-fgroup { padding: 56px 0; }
.lp-fgroup h2 { font-size: 28px; margin: 0 0 22px; }
.lp-fcta { padding: 56px 0 80px; }
.lp-fcta-in { display: flex; gap: 24px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 34px 38px;
  border-radius: 22px; background: linear-gradient(135deg, #0a3a9e, #1e93f2); color: #fff; }
.lp-fcta-in h2 { margin: 0 0 6px; font-size: 28px; color: #fff; }
.lp-fcta-in p { margin: 0; color: #dbe8ff; }
.lp-fcta-in .btn { background: #fff; color: #0a3a9e; border-color: #fff; }
.lp-nav .lp-links a[aria-current="page"] { color: var(--brand); }
@media (max-width: 600px) {
  .lp-fhero h1 { font-size: 32px; }
  .lp-fgroup { padding: 40px 0; } .lp-fgroup h2 { font-size: 23px; }
  .lp-fcta-in { padding: 26px 22px; }
}
/* story laptop: the picture fills the screen evenly on all four sides (overrides the hero rule ".lp-screen img") */
.st-laptop .lp-screen .st-img { inset: 9px; width: calc(100% - 18px); height: calc(100% - 18px); }
/* phone bar slides in only after the top buttons are out of view (and is not clickable while hidden) */
@media (max-width: 760px) {
  .lp-mbar { transition: transform .25s ease, visibility 0s linear 0s; }
  .lp-mbar.away { visibility: hidden; transition: transform .25s ease, visibility 0s linear .25s; }
}

/* =====================================================================================
   Owner tools: bell, My pages, weekly report, day-by-day report, data check
   ===================================================================================== */
:root { --h1: #fde2e2; --h1-ink: #9f1d24; --h2: #feeccc; --h2-ink: #8a4b08; --h3: #fdf6c9; --h3-ink: #6b5a06;
  --h4: #dff3e6; --h4-ink: #17643a; --h5: #bfe8cf; --h5-ink: #0d4d2b; }
:root[data-theme="dark"] { --h1: #4a1d22; --h1-ink: #fecaca; --h2: #4a3212; --h2-ink: #fde3b0; --h3: #3f3a12; --h3-ink: #fdf3b4;
  --h4: #143a26; --h4-ink: #bbf7d0; --h5: #0f5132; --h5-ink: #dcfce7; }
@media (prefers-color-scheme: dark) { :root[data-theme="auto"] { --h1: #4a1d22; --h1-ink: #fecaca; --h2: #4a3212; --h2-ink: #fde3b0;
  --h3: #3f3a12; --h3-ink: #fdf3b4; --h4: #143a26; --h4-ink: #bbf7d0; --h5: #0f5132; --h5-ink: #dcfce7; } }

/* ---- bell ---- */
.bell-wrap { position: relative; }
.bell-btn { position: relative; width: 40px; height: 40px; border-radius: 11px; border: 1px solid var(--line); background: var(--panel);
  color: var(--ink-2); display: grid; place-items: center; cursor: pointer; transition: background .15s, color .15s; }
.bell-btn:hover, .bell-btn.open { background: var(--brand-soft); color: var(--brand); border-color: transparent; }
.bell-btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.bell-n { position: absolute; top: -6px; inset-inline-end: -6px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 99px;
  background: #dc2626; color: #fff; font-size: 11px; font-weight: 800; line-height: 19px; text-align: center; box-shadow: 0 0 0 2px var(--panel); }
.bell-n.pop { animation: bellpop .5s ease; }
@keyframes bellpop { 0% { transform: scale(1); } 40% { transform: scale(1.35); } 100% { transform: scale(1); } }
.bell-btn:has(.bell-n:not([hidden])) svg { transform-origin: 50% 10%; }
.bell-panel { position: absolute; top: calc(100% + 8px); inset-inline-end: 0; z-index: 60; width: min(340px, calc(100vw - 24px));
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg); padding: 8px; }
.bell-head { display: flex; align-items: center; gap: 8px; padding: 6px 8px 8px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.bell-head b { font-size: 14px; }
.bell-list { list-style: none; margin: 0; padding: 0; }
.bell-list a { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 10px; color: var(--ink); text-decoration: none; font-size: 14px; }
.bell-list a:hover, .bell-list a:focus-visible { background: var(--hover); }
.bell-list a svg { margin-inline-start: auto; color: var(--muted); flex: none; }
.bell-c { min-width: 28px; padding: 2px 7px; border-radius: 99px; background: var(--bad-soft); color: var(--bad); font-weight: 800;
  font-size: 12.5px; text-align: center; flex: none; }
.bell-empty { display: flex; gap: 8px; align-items: center; margin: 0; padding: 14px 10px; color: var(--ok); font-size: 14px; }
.bell-foot { display: flex; gap: 6px; align-items: center; margin-top: 4px; padding: 9px 10px; border-top: 1px solid var(--line);
  font-size: 13px; color: var(--brand); text-decoration: none; }
@media (max-width: 640px) { .bell-btn { width: 36px; height: 36px; } .bell-panel { position: fixed; top: 60px; inset-inline: 12px; width: auto; } }
@media (prefers-reduced-motion: reduce) { .bell-n.pop { animation: none; } }

/* ---- sidebar "My pages" link ---- */
.side .nav-edit { opacity: .85; }
.side .nav-edit .nav-edit-n { margin-inline-start: auto; font-size: 11px; color: var(--side-muted); }

/* ---- My pages (pop-up window and page) ---- */
.mp-dialog { width: min(720px, calc(100vw - 24px)); max-height: calc(100vh - 40px); padding: 0; border: 1px solid var(--line);
  border-radius: 16px; background: var(--panel); color: var(--ink); box-shadow: var(--shadow-lg); overflow: hidden; }
.mp-dialog::backdrop { background: rgba(15,23,42,.45); }
.mp-dialog[open] { display: flex; }
.mp-form { display: flex; flex-direction: column; min-height: 0; width: 100%; max-height: calc(100vh - 40px); }
.mp-card .mp-form { max-height: none; }
.mp-card [data-mp-close].set-x { display: none; }
.mp-head { display: flex; gap: 12px; align-items: flex-start; padding: 18px 20px 6px; }
.mp-head h2 { margin: 0 0 4px; font-size: 19px; }
.mp-head p { margin: 0; font-size: 13.5px; }
.mp-tools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 10px 20px; border-bottom: 1px solid var(--line); }
.mp-search { flex: 1 1 200px; display: flex; gap: 8px; align-items: center; padding: 0 10px; border: 1px solid var(--line-2);
  border-radius: 10px; background: var(--input-bg); color: var(--muted); }
.mp-search input { border: 0; background: transparent; padding: 9px 0; width: 100%; min-width: 0; box-shadow: none; }
.mp-search:focus-within { border-color: var(--brand); }
.mp-body { overflow: auto; padding: 6px 20px 14px; flex: 1 1 auto; min-height: 0; }
.mp-card .mp-body { overflow: visible; }
.mp-sec h3 { margin: 14px 0 6px; font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.mp-mod { border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; margin-bottom: 8px; background: var(--panel-2); }
.mp-modname { display: flex; gap: 8px; align-items: center; font-size: 14px; cursor: pointer; padding: 4px 0; color: var(--ink); }
.mp-modname svg { color: var(--brand); flex: none; }
.mp-modname input, .mp-page input { width: 17px; height: 17px; margin: 0; flex: none; accent-color: var(--brand); }
.mp-modname input { order: 3; margin-inline-start: auto; }
.mp-pages { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 2px 14px; padding: 2px 0 2px 24px; }
.mp-page { display: flex; gap: 8px; align-items: center; font-size: 13.5px; padding: 5px 0; cursor: pointer; color: var(--ink-2); }
.mp-page:has(input:not(:checked)) span { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--line-2); }
.mp-foot { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 12px 20px; border-top: 1px solid var(--line); background: var(--panel); }
.mp-count { margin-inline-end: auto; font-size: 13.5px; color: var(--muted); }
.mp-count b { color: var(--ink); }
@media (max-width: 640px) {
  .mp-dialog { width: 100vw; max-width: 100vw; max-height: 100dvh; height: 100dvh; border-radius: 0; margin: 0; }
  .mp-form { max-height: 100dvh; }
  .mp-head, .mp-tools, .mp-body, .mp-foot { padding-inline: 14px; }
  .mp-pages { grid-template-columns: 1fr; padding-inline-start: 4px; }
  .mp-foot .btn { flex: 1 1 auto; }
  .mp-count { flex-basis: 100%; }
}

/* ---- weekly report ---- */
.wr-bar { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-bottom: 14px; }
.wr-nav { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.wr-range { font-size: 15px; padding: 0 4px; }
.wr-mail { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; font-size: 13.5px; color: var(--muted); }
.wr-mail-txt { display: inline-flex; gap: 6px; align-items: center; min-width: 0; overflow-wrap: anywhere; }
.wr-note { display: flex; gap: 8px; align-items: center; margin: 0 0 12px; padding: 9px 12px; border-radius: 10px;
  background: var(--warn-soft); color: var(--warn); font-size: 13.5px; }
.wr-doc { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 22px; }
.wr-title { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; border-bottom: 2px solid var(--brand);
  padding-bottom: 12px; margin-bottom: 16px; }
.wr-title h2 { margin: 0; font-size: 21px; }
.wr-title p { margin: 3px 0 0; color: var(--muted); font-size: 14px; }
.wr-printed { color: var(--muted); font-size: 12px; white-space: nowrap; }
.wr-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.wr-kpi { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 3px; background: var(--panel-2); }
.wr-kpi .label { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.wr-kpi b { font-size: 24px; font-weight: 800; letter-spacing: -.01em; }
.wr-kpi small { font-size: 12.5px; color: var(--muted); }
.wr-kpi.bad b { color: var(--bad); }
.wr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.wr-card { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; break-inside: avoid; }
.wr-card h3 { display: flex; gap: 8px; align-items: center; margin: 0 0 8px; font-size: 15px; }
.wr-card h3 svg { color: var(--brand); }
.wr-card h4 { margin: 12px 0 4px; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.wr-lines { list-style: none; margin: 0; padding: 0; }
.wr-lines li { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; border-bottom: 1px dashed var(--line); font-size: 14px; }
.wr-lines li:last-child { border-bottom: 0; }
.wr-lines li span { min-width: 0; overflow-wrap: anywhere; }
.wr-lines li small { color: var(--muted); font-size: 12px; }
.wr-lines b { white-space: nowrap; }
.wr-lines b.bad { color: var(--bad); } .wr-lines b.warn { color: var(--warn); }
.wr-more { display: inline-block; margin-top: 8px; font-size: 13px; }
.wr-foot { margin: 16px 0 0; color: var(--muted); font-size: 12px; text-align: center; }
@media (max-width: 900px) { .wr-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) {
  .wr-doc { padding: 14px; border-radius: 12px; }
  .wr-title { flex-direction: column; } .wr-printed { white-space: normal; }
  .wr-kpi b { font-size: 20px; }
  .wr-grid { grid-template-columns: 1fr; }
  .wr-nav .btn { flex: 1 1 auto; } .wr-range { flex-basis: 100%; order: -1; text-align: center; }
}
@media print {
  .wr-doc { --panel: #fff; --panel-2: #f8fafc; --line: #dfe3eb; --ink: #0f172a; --ink-2: #334155; --muted: #64748b; --brand: #0a3a9e;
    --bad: #c0262d; --warn: #b45309; --ok: #0f7a43; --ok-soft: #e6f6ed; --bad-soft: #fdecec;
    border: 0; padding: 0; color: #0f172a; background: #fff; }
  .wr-grid { grid-template-columns: repeat(2, 1fr); }
  .wr-kpis { grid-template-columns: repeat(4, 1fr); }
}

/* ---- day-by-day report ---- */
.dd-filters { display: flex; gap: 10px 14px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 14px; }
.dd-chips { display: inline-flex; padding: 3px; border-radius: 11px; background: var(--panel-2); border: 1px solid var(--line); }
.dd-chip { border: 0; background: transparent; color: var(--ink-2); padding: 7px 12px; border-radius: 8px; font: inherit; font-size: 13.5px;
  font-weight: 600; cursor: pointer; white-space: nowrap; }
.dd-chip:hover { color: var(--brand); }
.dd-chip.on { background: var(--panel); color: var(--brand); box-shadow: var(--shadow); }
.dd-chip:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }
.dd-range { display: flex; gap: 8px; }
.dd-range label, .dd-sel { display: flex; flex-direction: column; gap: 3px; font-size: 12px; color: var(--muted); font-weight: 600; }
.dd-range input { width: 150px; } .dd-sel select { min-width: 150px; max-width: 240px; }
.dd-sum { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
.dd-sum > div { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.dd-sum .label { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.dd-sum b { font-size: 19px; }
.dd-sum small { font-size: 12.5px; color: var(--muted); overflow-wrap: anywhere; }
.dd-wrap { overflow-x: auto; }
.dd-wrap .dd-grid { border-collapse: separate; border-spacing: 2px; width: auto; min-width: 100%; font-size: 12.5px; font-variant-numeric: tabular-nums; }
.dd-wrap .dd-grid th, .dd-wrap .dd-grid td { text-transform: none; letter-spacing: 0; vertical-align: middle; box-shadow: none; position: static;
  padding: 6px 4px; text-align: center; min-width: 34px; border: 0; border-radius: 6px; white-space: nowrap; }
.dd-wrap .dd-grid thead th { background: transparent; color: var(--muted); font-weight: 700; font-size: 11.5px; line-height: 1.15; }
.dd-wrap .dd-grid thead th small { display: block; font-weight: 500; font-size: 10.5px; }
.dd-wrap .dd-grid thead th.sun { color: var(--bad); }
.dd-wrap .dd-grid tbody tr:hover td:not([class*="h"]) { background: var(--hover); }
.dd-wrap .dd-grid tbody tr:hover .dd-name { color: var(--brand); }
.dd-wrap .dd-grid .dd-name { text-align: start; position: sticky; inset-inline-start: 0; z-index: 1; background: var(--panel); min-width: 130px;
  max-width: 200px; overflow: hidden; text-overflow: ellipsis; font-weight: 600; color: var(--ink); font-size: 13px; }
.dd-wrap .dd-grid .dd-name small { color: var(--muted); font-weight: 500; }
.dd-wrap .dd-grid .dd-name a { color: var(--ink); text-decoration: none; } .dd-wrap .dd-grid .dd-name a:hover { color: var(--brand); text-decoration: underline; }
.dd-wrap .dd-grid td { background: var(--panel-2); color: var(--muted); }
.dd-wrap .dd-grid td.off { background: transparent; }
.dd-wrap .dd-grid .dd-tot { font-weight: 800; color: var(--ink); min-width: 56px; }
.dd-wrap .dd-grid tfoot th, .dd-wrap .dd-grid tfoot td { font-weight: 800; border-top: 0; }
.dd-wrap .dd-grid td.h1 { background: var(--h1); color: var(--h1-ink); } .dd-wrap .dd-grid td.h2 { background: var(--h2); color: var(--h2-ink); }
.dd-wrap .dd-grid td.h3 { background: var(--h3); color: var(--h3-ink); } .dd-wrap .dd-grid td.h4 { background: var(--h4); color: var(--h4-ink); }
.dd-wrap .dd-grid td.h5 { background: var(--h5); color: var(--h5-ink); }
/* fees / absences: one colour, darker = more */
.dd-wrap .dd-fees td.h1, .dd-wrap .dd-absent td.h1 { background: color-mix(in srgb, var(--brand) 12%, var(--panel)); color: var(--ink); }
.dd-wrap .dd-fees td.h2, .dd-wrap .dd-absent td.h2 { background: color-mix(in srgb, var(--brand) 24%, var(--panel)); color: var(--ink); }
.dd-wrap .dd-fees td.h3, .dd-wrap .dd-absent td.h3 { background: color-mix(in srgb, var(--brand) 40%, var(--panel)); color: var(--ink); }
.dd-wrap .dd-fees td.h4, .dd-wrap .dd-absent td.h4 { background: color-mix(in srgb, var(--brand) 62%, var(--panel)); color: #fff; }
.dd-wrap .dd-fees td.h5, .dd-wrap .dd-absent td.h5 { background: var(--brand); color: #fff; }
.dd-wrap .dd-absent td.h1, .dd-wrap .dd-absent td.h2, .dd-wrap .dd-absent td.h3 { background: color-mix(in srgb, var(--bad) 18%, var(--panel)); }
.dd-wrap .dd-absent td.h4, .dd-wrap .dd-absent td.h5 { background: var(--bad); color: #fff; }
.dd-x { color: var(--line-2); font-weight: 800; }
.dd-key { font-size: 12.5px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-top: 10px; }
.dd-key .sw { display: inline-block; width: 14px; height: 14px; border-radius: 4px; vertical-align: middle; }
.dd-key .sw.h1 { background: var(--h1); } .dd-key .sw.h2 { background: var(--h2); } .dd-key .sw.h3 { background: var(--h3); }
.dd-key .sw.h4 { background: var(--h4); } .dd-key .sw.h5 { background: var(--h5); }
@media (max-width: 900px) { .dd-sum { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) {
  .dd-filters { gap: 10px; } .dd-chips { width: 100%; } .dd-chip { flex: 1 1 0; padding: 8px 4px; }
  .dd-range { width: 100%; } .dd-range label { flex: 1 1 0; min-width: 0; } .dd-range input { width: 100%; }
  .dd-sel { flex: 1 1 140px; min-width: 0; } .dd-sel select { min-width: 0; width: 100%; max-width: none; }
  .dd-wrap .dd-grid .dd-name { min-width: 104px; max-width: 120px; }
}

/* ---- data check ---- */
.dc-top { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.dc-score { display: flex; gap: 12px; align-items: center; padding: 14px 18px; border-radius: 14px; border: 1px solid var(--line); background: var(--panel); }
.dc-score b { display: block; font-size: 17px; } .dc-score small { color: var(--muted); font-size: 13px; }
.dc-score.warn svg { color: var(--warn); } .dc-score.ok svg { color: var(--ok); }
.dc-help { flex: 1 1 280px; margin: 0; font-size: 13.5px; }
.dc-list { display: flex; flex-direction: column; gap: 8px; }
.dc-item { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; border-inline-start: 4px solid var(--line-2); }
.dc-item.bad { border-inline-start-color: var(--bad); } .dc-item.warn { border-inline-start-color: var(--warn); }
.dc-item.info { border-inline-start-color: var(--brand-2); } .dc-item.ok { border-inline-start-color: var(--ok); }
.dc-item summary { display: flex; gap: 12px; align-items: center; padding: 12px 14px; cursor: pointer; list-style: none; }
.dc-item summary::-webkit-details-marker { display: none; }
.dc-dot { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--panel-2); color: var(--muted); }
.dc-item.bad .dc-dot { background: var(--bad-soft); color: var(--bad); } .dc-item.warn .dc-dot { background: var(--warn-soft); color: var(--warn); }
.dc-item.info .dc-dot { background: var(--brand-soft); color: var(--brand); } .dc-item.ok .dc-dot { background: var(--ok-soft); color: var(--ok); }
.dc-t { flex: 1 1 auto; min-width: 0; } .dc-t b { display: block; font-size: 14.5px; } .dc-t small { color: var(--muted); font-size: 12.5px; }
.dc-n { font-weight: 800; font-size: 15px; min-width: 40px; text-align: center; padding: 3px 10px; border-radius: 99px; background: var(--panel-2); }
.dc-item.bad .dc-n { color: var(--bad); background: var(--bad-soft); } .dc-item.warn .dc-n { color: var(--warn); background: var(--warn-soft); }
.dc-item.ok .dc-n { color: var(--ok); background: var(--ok-soft); font-size: 12.5px; }
.dc-item.ok summary { opacity: .8; }
.dc-rows { list-style: none; margin: 0; padding: 0 14px 6px 56px; }
.dc-rows li { display: flex; gap: 10px; align-items: center; justify-content: space-between; padding: 7px 0; border-top: 1px dashed var(--line); }
.dc-rows li span { min-width: 0; overflow-wrap: anywhere; } .dc-rows li b { font-size: 13.5px; font-weight: 600; }
.dc-rows li small { display: block; color: var(--muted); font-size: 12px; }
.dc-more { margin: 0; padding: 4px 14px 12px 56px; font-size: 13px; }
@media (max-width: 640px) { .dc-rows, .dc-more { padding-inline-start: 14px; } .dc-item summary { gap: 10px; padding: 12px; } }
.dd-wrap .dd-grid .dd-m { font-weight: 800; }
.dd-wrap .dd-grid td.h5 .dd-mL, .dd-wrap .dd-grid td .dd-mL { color: var(--warn); }
.bell-empty[hidden], .mp-mod[hidden], .mp-sec[hidden], .mp-page[hidden], .mp-none[hidden], .bell-list li[hidden] { display: none; }
@media (max-width: 640px) { .mp-search { flex-basis: 100%; } .mp-tools .btn { flex: 1 1 0; } .dd-sum b { font-size: 17px; } }
.dd-wrap .dd-grid .dd-name { border-bottom: 1px solid var(--line); }
/* text that sits on the page background (not a card) uses the darker grey for AA contrast */
.wr-mail, .dd-range label, .dd-sel, .dd-key.muted, .dc-help.muted, .dd-key .dd-x { color: var(--ink-2); }
.dc-item.ok summary { opacity: 1; }
.dd-wrap .dd-grid td { color: var(--ink-2); }
.dc-n { white-space: nowrap; flex: none; }

/* ---- report Download menu (PDF / Excel / CSV / Print) ---- */
.dl-wrap { position: relative; }
.dl-btn { gap: 6px; }
.dl-btn svg:last-child { opacity: .8; }
.dl-menu { position: absolute; top: calc(100% + 8px); inset-inline-end: 0; z-index: 60; width: 300px; padding: 6px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg); }
.dl-menu[hidden] { display: none; }
.dl-menu a, .dl-menu button { display: flex; gap: 12px; align-items: center; width: 100%; padding: 10px; border: 0; border-radius: 10px;
  background: transparent; color: var(--ink); text-decoration: none; font: inherit; text-align: start; cursor: pointer; }
.dl-menu a:hover, .dl-menu button:hover, .dl-menu a:focus-visible, .dl-menu button:focus-visible { background: var(--hover); outline: none; }
.dl-menu b { display: block; font-size: 14px; } .dl-menu small { display: block; font-size: 12px; color: var(--ink-2); }
.dl-ico { width: 38px; height: 38px; border-radius: 9px; flex: none; display: grid; place-items: center; font-size: 10.5px;
  font-weight: 800; letter-spacing: .03em; color: #fff; }
.dl-ico.pdf { background: #c0262d; } .dl-ico.xls { background: #107c41; } .dl-ico.csv { background: #475569; }
.dl-ico.prt { background: var(--brand-soft); color: var(--brand); }
@media (max-width: 640px) {
  .dl-btn { padding: 8px 14px; font-size: 14px; min-height: 38px; border-radius: 10px; }
  .dl-menu { width: min(310px, calc(100vw - 24px)); padding: 6px; }
  .dl-menu a, .dl-menu button { padding: 12px 10px; }
}
@media (max-width: 640px) {
  .top-right { position: relative; }
  .top-right .dl-wrap { position: static; }
  .top-right .dl-menu { top: 46px; inset-inline-end: 0; }
}
/* Download button: same height and corners as the search box next to it */
.top-right .dl-btn { height: 40px; min-height: 40px; padding: 0 14px; font-size: 14px; line-height: 1; border-radius: 11px; box-sizing: border-box; }
.top-right .dl-btn svg { width: 15px; height: 15px; }
@media (max-width: 640px) { .bell-btn { width: 40px; height: 40px; } }
.top-right .dl-wrap { display: flex; align-items: center; } .top-right .dl-btn { margin: 0; vertical-align: middle; }

/* =====================================================================================
   Public site: eye-catching buttons and colourful module cards (features page + home)
   ===================================================================================== */
/* glowing gradient button: See pricing / See all features */
.lp .btn.lp-btn-glow { position: relative; overflow: hidden; isolation: isolate; display: inline-flex; align-items: center; gap: 12px;
  padding: 10px 22px 10px 10px; min-height: 58px; border-radius: 16px; border: 0; color: #fff; font-size: 17px; font-weight: 800;
  background: linear-gradient(120deg, #0a3a9e 0%, #1560d8 45%, #1e93f2 100%); background-size: 160% 100%;
  box-shadow: 0 10px 28px rgba(21, 96, 216, .38), inset 0 1px 0 rgba(255,255,255,.25);
  transition: transform .2s ease, box-shadow .2s ease, background-position .4s ease; }
.lp .btn.lp-btn-glow small { font-weight: 600; opacity: .85; font-size: 14px; }
.lp .btn.lp-btn-glow:hover, .lp .btn.lp-btn-glow:focus-visible { transform: translateY(-2px); background-position: 100% 0;
  box-shadow: 0 16px 36px rgba(21, 96, 216, .48), inset 0 1px 0 rgba(255,255,255,.3); color: #fff; text-decoration: none; }
.lp .btn.lp-btn-glow:focus-visible { outline: 3px solid #8ec5ff; outline-offset: 3px; }
.lp .btn.lp-btn-glow > svg:last-child { transition: transform .2s ease; }
.lp .btn.lp-btn-glow:hover > svg:last-child { transform: translateX(4px); }
.lp-glow-ico { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; flex: none;
  background: rgba(255,255,255,.18); box-shadow: inset 0 0 0 1px rgba(255,255,255,.28); }
/* soft shine that sweeps across every few seconds */
.lp .btn.lp-btn-glow::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(105deg, transparent 35%, rgba(255,255,255,.28) 50%, transparent 65%);
  transform: translateX(-120%); animation: lpShine 4.5s ease-in-out 1.2s infinite; }
@keyframes lpShine { 0%, 62% { transform: translateX(-120%); } 82%, 100% { transform: translateX(120%); } }
html[dir="rtl"] .lp .btn.lp-btn-glow:hover > svg:last-child { transform: translateX(-4px) scaleX(-1); }
html[dir="rtl"] .lp .btn.lp-btn-glow > svg:last-child { transform: scaleX(-1); }
@media (prefers-reduced-motion: reduce) { .lp .btn.lp-btn-glow::after { animation: none; display: none; } }
.lp-more .lp-btn-glow { margin-top: 4px; }
@media (max-width: 560px) {
  .lp .btn.lp-btn-glow { width: 100%; justify-content: flex-start; font-size: 16px; }
  .lp .btn.lp-btn-glow > svg:last-child { margin-inline-start: auto; }
}

/* "All 20 features" inside the blue pricing box: white and readable */
.lp-calc-inc a.lp-inc-link { color: #fff; font-weight: 700; text-decoration: underline; text-decoration-color: rgba(255,255,255,.55);
  text-underline-offset: 3px; }
.lp-calc-inc a.lp-inc-link:hover { text-decoration-color: #fff; }

/* colourful module cards: coloured edge, tinted icon tile, coloured glow on hover */
.lp .lp-feature.lp-mod { position: relative; overflow: hidden; border-inline-start: 0; padding-inline-start: 24px;
  box-shadow: 0 1px 2px rgba(15,23,42,.04), 0 6px 18px rgba(15,23,42,.05); }
.lp .lp-feature.lp-mod .chip-ico { width: 48px; height: 48px; border-radius: 14px; flex: none; display: grid; place-items: center;
  color: var(--mc, var(--brand)); background: color-mix(in srgb, var(--mc, var(--brand)) 13%, #fff);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--mc, var(--brand)) 18%, transparent); transition: transform .25s ease; }
.lp .lp-feature.lp-mod h3, .lp .lp-feature.lp-mod b { font-size: 16px; font-weight: 800; color: var(--ink); }
.lp .lp-feature.lp-mod:hover { border-color: color-mix(in srgb, var(--mc, var(--brand)) 40%, var(--line));
  box-shadow: 0 14px 32px color-mix(in srgb, var(--mc, var(--brand)) 20%, transparent); transform: translateY(-3px); }
.lp .lp-feature.lp-mod:hover .chip-ico { transform: scale(1.08) rotate(-4deg); color: #fff; background: var(--mc, var(--brand)); }
html[data-theme="dark"] .lp .lp-feature.lp-mod .chip-ico { background: color-mix(in srgb, var(--mc, var(--brand)) 22%, var(--panel)); }
@media (prefers-reduced-motion: reduce) { .lp .lp-feature.lp-mod:hover, .lp .lp-feature.lp-mod:hover .chip-ico { transform: none; } }
.lp .lp-feature.lp-mod { border-inline-start: 5px solid var(--mc, var(--brand)); padding-inline-start: 20px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--mc, var(--brand)) 7%, var(--panel)) 0%, var(--panel) 55%); }
.lp .lp-feature.lp-mod:hover { border-inline-start-color: var(--mc, var(--brand)); }

/* module cards follow the cursor: 3D lean, coloured spotlight, icon drifts toward the pointer */
.lp-features { perspective: 1000px; }
.lp .lp-feature.lp-mod { transform-style: preserve-3d; will-change: transform; }
.lp-anim .lp .lp-feature.lp-mod[data-reveal].in.tilt, .lp .lp-feature.lp-mod.tilt {
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(-4px);
  transition: transform .12s ease-out, box-shadow .25s, border-color .25s; }
.lp .lp-feature.lp-mod[data-spot]::before {
  background: radial-gradient(240px circle at var(--mx, 50%) var(--my, 50%),
    color-mix(in srgb, var(--mc, var(--brand)) 22%, transparent), transparent 70%); }
.lp .lp-feature.lp-mod.tilt .chip-ico { transform: translate(var(--ix, 0), var(--iy, 0)) scale(1.1) rotate(-4deg);
  color: #fff; background: var(--mc, var(--brand)); box-shadow: 0 8px 18px color-mix(in srgb, var(--mc, var(--brand)) 40%, transparent); }
.lp .lp-feature.lp-mod.tilt h3, .lp .lp-feature.lp-mod.tilt b { color: color-mix(in srgb, var(--mc, var(--brand)) 72%, #000); transition: color .2s; }
.lp .lp-feature.lp-mod.tilt { box-shadow: 0 18px 40px color-mix(in srgb, var(--mc, var(--brand)) 26%, transparent); }
html.lp-still .lp .lp-feature.lp-mod.tilt { transform: none; }
@media (prefers-reduced-motion: reduce) { .lp .lp-feature.lp-mod.tilt, .lp .lp-feature.lp-mod.tilt .chip-ico { transform: none; } }

/* Public module cards: one calm look (no per-module colours). Resting = plain white card with the brand-blue icon;
   on hover = SmartIdara blue for the edge, glow, icon and title, following the cursor. */
.lp .lp-feature.lp-mod { --mc: #1560d8; border-inline-start: 1px solid var(--line); padding-inline-start: 20px; background: var(--panel); }
.lp .lp-feature.lp-mod .chip-ico { color: var(--brand); background: var(--brand-soft); box-shadow: none; }
.lp .lp-feature.lp-mod:hover, .lp .lp-feature.lp-mod.tilt { border-color: #b9d3f7; }
.lp .lp-feature.lp-mod.tilt .chip-ico, .lp .lp-feature.lp-mod:hover .chip-ico { color: #fff;
  background: linear-gradient(135deg, #0a3a9e, #1e93f2); }
.lp .lp-feature.lp-mod.tilt h3, .lp .lp-feature.lp-mod.tilt b { color: #0a3a9e; }
html[data-theme="dark"] .lp .lp-feature.lp-mod .chip-ico { background: var(--brand-soft); }
