:root {
  --bg: #f4f6fb; --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);
  --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 Nastaliq Urdu", "Jameel Noori Nastaleeq", "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; }
.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: #fff; 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: #f8f9fc; text-transform: uppercase; letter-spacing: .04em; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover td, table tr:hover td { background: #fafbff; }
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 #dfe6f2; 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 #edf1f7; vertical-align: middle; font-size: 14px; }
.table-wrap tbody tr:nth-child(even) td { background: #fafcff; }
.table-wrap tbody tr { transition: background .12s; }
.table-wrap tbody tr:hover td { background: #eef5ff; }
.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: #eef0f5; 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: #eef0f5; color: var(--muted); }
.b-brand { background: var(--brand-soft); color: var(--brand); }
.b-zoom { background: #e8f1fd; 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: #c7cbe0; 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 #d5d9e6; border-radius: var(--radius-sm); background: #fff; 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: #eef0f5; 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: #fff; transition: all .12s; }
.att-choice label:hover { border-color: #c7cbe0; }
.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: #f8f9fc; }
.input-ico input:focus { background: #fff; }
.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: #e8f1fd; 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: #eef0f5; }
.meter { height: 8px; border-radius: 99px; background: #eef0f5; 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: #e9ecf5; 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: #fff; 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: #fff; 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: #c7cbe0; }
.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: #f1f3f8; 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: #f1f3f8; }
.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: #f8f9fc; 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: #eef0f5; color: var(--ink-2); }
.plat-zoom { background: #e8f1fd; 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: #fff; }

/* ---------- 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: #f2f8ff; }
.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: #f8f9fc; }
.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 { 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: 860px) {
  .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: #f6f8fc; 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: #e9ecf5; 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: #fff; 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: #f5f9ff; }
.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: #eef0f5; 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: #f6f8fc; 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: #f1f4fa; }
.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: #fff; 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: #f1f3f8;
  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: #e8f2fe; 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: #eef0f5; color: var(--muted); }

/* ---------- Calendar with events ---------- */
.ek-holiday { background: var(--bad-soft); color: var(--bad); } .ek-exam { background: #f3ecff; color: #6d28d9; }
.ek-event { background: #e8f2fe; color: #1c5cab; } .ek-meeting { background: var(--ok-soft); color: var(--ok); }
.ek-other { background: #eef0f5; color: var(--muted); }
.cal-events .day { height: auto; min-height: 76px; align-items: stretch; justify-content: flex-start; padding: 6px; gap: 3px; background: #f8f9fc; }
.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: #eef0f5; 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: #e8f2fe; 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; }
.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: #fff; }
.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: #edf0f6; 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: #fff; 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: #fff;
  border-radius: 18px; overflow: hidden; box-shadow: 0 24px 60px rgba(16,24,40,.28); border: 1px solid #e3e8f2;
  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: #f6f8fc; 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: #fff; color: var(--ink);
  border: 1px solid #e6eaf3; 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: #fff; color: #0a3a9e; border-radius: 99px; padding: 6px 11px; font: inherit; font-size: 13px;
  cursor: pointer; text-align: start; }
.ai-chip:hover { background: #eef3ff; }
.ai-form { display: flex; gap: 8px; padding: 10px; border-top: 1px solid #e6eaf3; background: #fff; }
.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: #fff; }
@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: #fff; 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) ---- */
@font-face { font-family: "Noto Nastaliq Urdu"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("vendor/fonts/noto-nastaliq-urdu-arabic-400-normal.1d9ba7ff26a9.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 Nastaliq Urdu"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("vendor/fonts/noto-nastaliq-urdu-arabic-700-normal.05bf8c16d8dd.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 Nastaliq Urdu", "Jameel Noori Nastaleeq", "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: 2; }
html[lang="ur"] h1, html[lang="ur"] h2, html[lang="ur"] h3 { line-height: 1.8; 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.9; }
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: #fff; 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 Nastaliq Urdu", serif; line-height: 2.1; }
.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: #fff; 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: #f4f7fd; 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: #f4f6fb; 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: #fff; 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: #fff; }
.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: #fff; } .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: #fff; 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: #f6f8fc; 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: #eef3fc; 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: #fafbfe; 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: #f3f5f9; 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: #fff; color: #8a94a6;
  box-shadow: 0 4px 14px rgba(15,23,42,.12); border: 1px solid #e6e9f2; 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; } }
