/* Nest Construction design system, in the Nest family theme (Nest POS, Nest WhatsApp, Nest Mail, Nest School):
   navy rail, indigo → violet brand, the Nest pink (paper plane) for the one thing that needs you now.
   One family (Plus Jakarta Sans), tabular figures for every number. A company can swap the brand colour for its own. */
@font-face { font-family: 'Jakarta'; src: url('fonts/jakarta.woff2') format('woff2'); font-weight: 200 800; font-display: swap; }

:root {
  --brand: #4F46E5;            /* Nest indigo: primary buttons, links */
  --brand-2: #7C3AED;          /* Nest violet */
  --brand-ink: #3730A3;
  --brand-bg: #EEF0FF;
  --rail-bg: #12142A;          /* Nest navy rail, same as every Nest product */
  --bus: #E8457F;              /* Nest pink (the paper plane): attention, the current item */
  --bus-ink: #B0124F;
  --bus-bg: #FFE9F1;
  --paper: #F4F5F9;            /* page */
  --surface: #FFFFFF;
  --sunk: #F0F1F6;
  --raise: #FAFAFD;            /* a step up inside a panel (rows on hover, inner tiles) */
  --ink: #14172B;
  --ink-2: #474C66;
  --ink-3: #6B7089;
  --line: #E6E8F0;
  --line-2: #D4D7E2;
  --present: #157A4E; --present-bg: #E2F3EA;
  --absent: #C2352B;  --absent-bg: #FCE8E5;
  --late: #A86A0F;    --late-bg: #FCF1DC;
  --leave: #2F63CC;   --leave-bg: #E6EEFC;
  /* charts: categorical in a fixed order (indigo, pink, amber, teal; checked for colour-blind separation), ordinal ramp, grid, axis */
  --c1: #4F46E5; --c2: #E8457F; --c3: #E39B0B; --c4: #0E9F8E;
  --o1: #B9B5F8; --o2: #8C85F1; --o3: #5B52E6; --o4: #2E2795;
  --grid: #ECEDF3; --axis: #C9CCD8; --track: #ECEDF4;
  --hero-bg: #12142A; --hero-ink: #F2F3FB; --hero-ink-2: #A9AECB; --hero-accent: #A5A0FF; --hero-track: rgba(255,255,255,.12); --hero-line: rgba(255,255,255,.09);
  --r-s: 6px; --r: 10px; --r-l: 14px; --r-xl: 20px;
  --shadow: 0 1px 2px rgba(18, 20, 42, .06), 0 10px 28px -14px rgba(18, 20, 42, .28);   /* only for things that float: menus, dialogs, toasts */
  --ease: cubic-bezier(.2, .7, .2, 1);
  --rail: 248px;
  --f: 'Jakarta', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color-scheme: light;
}
:root[data-mode='dark'] {
  --brand-ink: #B9B5FF; --brand-bg: #1F1E47; --rail-bg: #0A0B17;
  --bus-ink: #FF93BA; --bus-bg: #3A1528;
  --paper: #0C0E1B; --surface: #151829; --sunk: #1C2035; --raise: #191C30;
  --ink: #ECEEF8; --ink-2: #B1B6CD; --ink-3: #8C91AA;
  --line: #242942; --line-2: #313752;
  --present: #4CC38A; --present-bg: #10301F; --absent: #F27A70; --absent-bg: #3A1714;
  --late: #E6A94A; --late-bg: #33260C; --leave: #86ACF4; --leave-bg: #142340;
  --c1: #6F68F0; --c2: #E0508A; --c3: #BA7E05; --c4: #12998B;
  --o1: #3B3794; --o2: #5650C8; --o3: #8A84F4; --o4: #C3C0FB;
  --grid: #20243A; --axis: #343A55; --track: #232741;
  --hero-bg: #171A33; --hero-accent: #ABA6FF; --hero-track: rgba(255,255,255,.10); --hero-line: rgba(255,255,255,.08);
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 12px 30px -14px rgba(0,0,0,.85);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font: 400 14.5px/1.5 var(--f); color: var(--ink); background: var(--paper); font-feature-settings: 'tnum' 1, 'cv11' 1; -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; letter-spacing: -.012em; }
h1 { font-size: 26px; font-weight: 750; }
h2 { font-size: 18px; font-weight: 700; }
h3 { font-size: 15px; font-weight: 700; }
p { margin: 0; }
a { color: var(--brand-ink); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2.5px solid var(--bus); outline-offset: 2px; border-radius: 4px; }
.muted { color: var(--ink-2); } .faint { color: var(--ink-3); } .small { font-size: 12.5px; } .num { font-variant-numeric: tabular-nums; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; } .row.end { justify-content: flex-end; } .row.between { justify-content: space-between; }
.stack { display: flex; flex-direction: column; gap: 14px; } .stack.s { gap: 6px; } .stack.l { gap: 24px; }
.grow { flex: 1; min-width: 0; } .right { text-align: right; } .nowrap { white-space: nowrap; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- shell: dark green rail, quiet topbar, paper canvas */
.shell { display: grid; grid-template-columns: var(--rail) 1fr; min-height: 100vh; }
.rail { background: var(--rail-bg); color: #C9CCE4; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 18px 12px; overflow-y: auto; }
.rail .brand { display: flex; gap: 10px; align-items: center; padding: 4px 8px 18px; }
.rail .brand img { width: 36px; height: 36px; border-radius: 10px; background: #fff1; }
.rail .brand b { font-size: 15px; line-height: 1.15; display: block; }
.rail .brand span { font-size: 12px; opacity: .7; }
.rail nav { display: flex; flex-direction: column; gap: 1px; }
.rail .grp { font-size: 12px; opacity: .55; padding: 14px 10px 4px; }
.rail a { display: flex; align-items: center; gap: 11px; padding: 8px 10px; border-radius: 8px; color: inherit; text-decoration: none; font-weight: 550; position: relative; }
.rail a svg { width: 19px; height: 19px; opacity: .8; flex: none; }
.rail a:hover { background: #ffffff12; }
.rail a.on { background: rgba(124, 58, 237, .28); color: #fff; }
.rail a.on::before { content: ''; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 4px; border-radius: 0 4px 4px 0; background: var(--bus); }
.rail .badge { margin-left: auto; background: var(--bus); color: #fff; font-size: 11.5px; font-weight: 700; padding: 0 7px; border-radius: 99px; line-height: 19px; }
.rail .foot { margin-top: auto; padding: 14px 8px 0; font-size: 12px; opacity: .6; }
.rail-scrim { display: none; }
/* phones: the top bar fits 390 px (project picker shrinks, the account chip shows only its icon) */
@media (max-width: 560px) {
  .top { gap: 6px; }
  .top .grow { display: none; }
  .top select.input { flex: 1 1 0; min-width: 0; width: 0 !important; max-width: none !important; }
  .top .chip { font-size: 0; gap: 0; padding: 7px; }
  .top .chip svg { width: 18px; height: 18px; }
}
/* rail sub-items:a module with pages expands under itself (chevron), thin guide line, 13px items; the open page is marked */
.rail .mrow { position: relative; }
.rail .mrow > a.has-sub { padding-right: 36px; }
.rail .ml { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rail .mod.open > .mrow > a.on { background: #ffffff10; }
.rail .chev { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 28px; height: 28px; display: grid; place-items: center; border: 0; border-radius: 7px; background: transparent; color: inherit; cursor: pointer; opacity: .55; }
.rail .chev:hover { background: #ffffff18; opacity: 1; }
.rail .chev svg { width: 15px; height: 15px; transition: transform .15s ease; }
.rail .chev[aria-expanded='true'] svg { transform: rotate(90deg); }
.rail .subnav { display: flex; flex-direction: column; gap: 1px; margin: 2px 0 6px 19px; padding-left: 9px; border-left: 1px solid #ffffff1f; }
.rail .subnav a { font-size: 13px; font-weight: 500; line-height: 1.35; padding: 5px 10px; color: #A9AECB; }
.rail .subnav a:hover { color: #fff; background: #ffffff0f; }
.rail .subnav a.on { color: #fff; font-weight: 650; background: rgba(124, 58, 237, .30); }
.rail .subnav a.on::before { left: -10px; top: 5px; bottom: 5px; width: 2px; border-radius: 2px; background: #C4B5FD; }
.rail a:focus-visible, .rail .chev:focus-visible { outline: 2px solid #C4B5FD; outline-offset: -2px; }
.main { min-width: 0; display: flex; flex-direction: column; }
.top { height: 60px; display: flex; align-items: center; gap: 12px; padding: 0 28px; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: blur(8px); position: sticky; top: 0; z-index: 20; }
.top .search { flex: 1; max-width: 420px; position: relative; }
.top .search > svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 17px; color: var(--ink-3); }
.top .search input { padding-left: 36px; background: var(--sunk); border-color: transparent; }
.top .search .results { position: absolute; top: 44px; left: 0; right: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); max-height: 380px; overflow: auto; }
.top .search .results button { display: flex; width: 100%; gap: 10px; align-items: center; padding: 9px 12px; border: 0; background: none; text-align: left; cursor: pointer; }
.top .search .results button:hover, .top .search .results button:focus { background: var(--sunk); }
.chip svg { width: 16px; height: 16px; }
.chip { white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 99px; background: var(--sunk); font-size: 12.5px; font-weight: 600; color: var(--ink-2); border: 0; }
.page { padding: 28px; max-width: 1320px; width: 100%; margin: 0 auto; }
.phead { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.phead .t { flex: 1; min-width: 240px; }
.phead p { color: var(--ink-2); margin-top: 6px; max-width: 64ch; }
.menu-btn { display: none; }

/* ---------- surfaces */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); }
.panel > .ph { display: flex; align-items: center; gap: 10px; padding: 16px 20px 0; }
.panel > .pb { padding: 16px 20px 20px; }
.panel.flush > .pb { padding: 0; }
.grid { display: grid; gap: 18px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-main { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); }
.split { display: grid; gap: 18px; align-items: start; grid-template-columns: minmax(0, var(--l, 300px)) minmax(0, 1fr); }

/* ---------- today strip: the dashboard's opening line, numbers set large and quiet */
.today { display: grid; grid-template-columns: repeat(4, 1fr); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); margin-bottom: 18px; }
.today > div { padding: 18px 22px; border-left: 1px solid var(--line); }
.today > div:first-child { border-left: 0; }
.today .v { font-size: 30px; font-weight: 750; letter-spacing: -.02em; line-height: 1.1; }
.today .l { color: var(--ink-2); font-size: 13px; margin-top: 4px; }
.today .s { font-size: 12.5px; margin-top: 8px; color: var(--ink-3); }
.bar { height: 6px; border-radius: 6px; background: var(--sunk); overflow: hidden; margin-top: 10px; }
.bar > i { display: block; height: 100%; background: var(--present); border-radius: 6px; }

/* ---------- buttons and fields */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 38px; padding: 0 15px; border-radius: var(--r); border: 1px solid var(--line-2); background: var(--surface); font-weight: 650; cursor: pointer; white-space: nowrap; text-decoration: none; color: var(--ink); }
.btn:hover { background: var(--sunk); }
.btn svg { width: 17px; height: 17px; }
.btn.p { background: var(--brand); border-color: transparent; color: #fff; }
.btn.p:hover { filter: brightness(1.08); }
.btn.bus { background: var(--bus); border-color: var(--bus); color: #fff; }
.btn.d { color: var(--absent); border-color: color-mix(in srgb, var(--absent) 40%, var(--line)); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.sm { height: 31px; padding: 0 11px; font-size: 13px; border-radius: 8px; }
.btn.lg { height: 46px; padding: 0 22px; font-size: 15px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.iconbtn { width: 36px; height: 36px; display: inline-grid; place-items: center; border: 0; background: transparent; border-radius: 9px; cursor: pointer; color: var(--ink-2); }
.iconbtn:hover { background: var(--sunk); color: var(--ink); }
.iconbtn svg { width: 19px; height: 19px; }
.input, select.input, textarea.input { width: 100%; height: 40px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--surface); outline: none; }
textarea.input { height: auto; min-height: 90px; padding: 10px 12px; resize: vertical; }
.input:focus { border-color: var(--brand-2); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-2) 20%, transparent); }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.field > small { color: var(--ink-3); font-size: 12px; }
.form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.form .full { grid-column: 1 / -1; }
.check { display: flex; gap: 9px; align-items: center; cursor: pointer; }
.check input { width: 17px; height: 17px; accent-color: var(--brand); }
.seg { display: inline-flex; background: var(--sunk); border-radius: var(--r); padding: 3px; gap: 2px; max-width: 100%; overflow-x: auto; }
.seg button { border: 0; background: transparent; padding: 6px 13px; border-radius: 8px; font-weight: 600; color: var(--ink-2); cursor: pointer; }
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.12); }

/* ---------- tables */
.tbl { width: 100%; border-collapse: collapse; }
.tbl th { text-align: left; font-size: 12.5px; font-weight: 650; color: var(--ink-3); padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; position: sticky; top: 0; background: var(--surface); }
.tbl td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr.click { cursor: pointer; }
.tbl tbody tr.click:hover { background: var(--sunk); }
.tbl .r { text-align: right; }
.tblwrap { overflow: auto; }
.person { display: flex; gap: 11px; align-items: center; min-width: 0; }
.person b { display: block; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.person small { color: var(--ink-3); }
.av { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 13px; flex: none; background: #E0E3F5; color: var(--brand-ink); object-fit: cover; }
.av.f { background: #FBE7EF; color: #9C2D5A; } :root[data-mode='dark'] .av.f { background: #3A1A28; color: #F2A3C3; }
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 99px; font-size: 12px; font-weight: 650; background: var(--sunk); color: var(--ink-2); white-space: nowrap; }
.pill.ok { background: var(--present-bg); color: var(--present); } .pill.bad { background: var(--absent-bg); color: var(--absent); }
.pill.warn { background: var(--late-bg); color: var(--late); } .pill.info { background: var(--leave-bg); color: var(--leave); } .pill.bus { background: var(--bus-bg); color: var(--bus-ink); }
.empty { padding: 48px 20px; text-align: center; color: var(--ink-2); }
.empty b { display: block; color: var(--ink); font-size: 15px; margin-bottom: 6px; }
.pager { display: flex; gap: 8px; align-items: center; justify-content: space-between; padding: 12px 16px; border-top: 1px solid var(--line); }

/* ---------- roll call: the signature screen. Every child is a tile; one tap cycles present, absent, late. */
.roll { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.kid { padding-right: 24px !important; position: relative; border: 1.5px solid var(--line); background: var(--surface); border-radius: 14px; padding: 12px; display: flex; gap: 10px; align-items: center; cursor: pointer; text-align: left; min-height: 64px; transition: border-color .12s, background .12s; }
.kid .no { font-size: 20px; font-weight: 750; width: 30px; color: var(--ink-3); flex: none; text-align: center; }
.kid b { font-size: 13.5px; font-weight: 650; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.kid .st { position: absolute; top: 8px; right: 10px; font-weight: 800; font-size: 12px; }
.kid[data-s='P'] .st { color: var(--present); }
.kid[data-s='A'] { border-color: var(--absent); background: var(--absent-bg); } .kid[data-s='A'] .no, .kid[data-s='A'] .st { color: var(--absent); }
.kid[data-s='L'] { border-color: var(--late); background: var(--late-bg); } .kid[data-s='L'] .no, .kid[data-s='L'] .st { color: var(--late); }
.kid[data-s='H'] { border-color: var(--late); border-style: dashed; } .kid[data-s='E'] { border-color: var(--leave); background: var(--leave-bg); } .kid[data-s='E'] .st { color: var(--leave); }
.rollbar { position: sticky; bottom: 0; margin-top: 18px; display: flex; gap: 14px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); padding: 12px 16px; box-shadow: var(--shadow); }
.tally { display: flex; gap: 18px; flex: 1; flex-wrap: wrap; }
.tally span { font-weight: 650; } .tally i { font-style: normal; font-size: 20px; font-weight: 750; margin-right: 4px; }
.legend { display: flex; gap: 14px; font-size: 12.5px; color: var(--ink-2); flex-wrap: wrap; }
.legend span::before { content: ''; display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 6px; background: var(--c); }

/* ---------- section picker: classes as rows, sections as buttons (fast with 80+ sections) */
.secpick { display: grid; gap: 6px; }
.secpick .cls { display: grid; grid-template-columns: 44px 1fr; align-items: center; gap: 10px; }
.secpick .cls > b { font-size: 13px; color: var(--ink-2); }
.secpick .secs { display: flex; gap: 6px; flex-wrap: wrap; }
.secbtn { min-width: 38px; height: 34px; padding: 0 8px; border-radius: 9px; border: 1px solid var(--line-2); background: var(--surface); font-weight: 700; cursor: pointer; }
.secbtn.done { background: var(--present-bg); border-color: transparent; color: var(--present); }
.secbtn.on { background: var(--brand); border-color: var(--brand); color: #fff; }

/* ---------- admissions board */
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(250px, 1fr); gap: 14px; overflow-x: auto; padding-bottom: 8px; }
.col { background: var(--sunk); border-radius: var(--r-l); padding: 10px; display: flex; flex-direction: column; gap: 8px; min-height: 300px; }
.col > header { display: flex; justify-content: space-between; padding: 4px 6px 6px; font-weight: 700; }
.col > header span { color: var(--ink-3); font-weight: 600; }
.lead { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 11px 12px; cursor: pointer; display: flex; flex-direction: column; gap: 4px; text-align: left; }
.lead:hover { border-color: var(--line-2); }
.lead.due { box-shadow: inset 3px 0 0 var(--bus); }

/* ---------- timetable grid */
.tt { border-collapse: separate; border-spacing: 4px; width: 100%; }
.tt th { font-size: 12.5px; color: var(--ink-3); font-weight: 650; padding: 4px; }
.tt td { background: var(--sunk); border-radius: 9px; height: 56px; padding: 6px 8px; vertical-align: top; min-width: 110px; cursor: pointer; }
.tt td b { display: block; font-size: 13px; } .tt td small { color: var(--ink-3); font-size: 11.5px; }
.tt td.brk { background: transparent; text-align: center; color: var(--ink-3); font-size: 12px; cursor: default; vertical-align: middle; }
.tt td.empty-cell:hover { outline: 1.5px dashed var(--line-2); }

/* ---------- marks sheet */
.marks td input { width: 84px; text-align: right; height: 34px; }
.marks tr.fail input { color: var(--absent); font-weight: 700; }

/* ---------- report card (screen + print) */
.rc { background: #fff; color: #18221F; max-width: 800px; margin: 0 auto 24px; border: 1px solid #DCE3DF; border-radius: 12px; padding: 32px 36px; page-break-after: always; }
.rc header { display: flex; gap: 16px; align-items: center; border-bottom: 3px solid #4F46E5; padding-bottom: 14px; margin-bottom: 16px; }
.rc header img { width: 54px; height: 54px; }
.rc h2 { font-size: 20px; } .rc table { width: 100%; border-collapse: collapse; margin: 12px 0; }
.rc th, .rc td { border: 1px solid #DCE3DF; padding: 7px 10px; font-size: 13px; text-align: left; } .rc th { background: #F2F5F3; }
.rc .meta { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px 18px; font-size: 13px; }
.rc .sign { display: flex; justify-content: space-between; margin-top: 44px; font-size: 12.5px; color: #4A5752; }
.rc .sign span { border-top: 1px solid #9AA6A1; padding-top: 6px; min-width: 150px; text-align: center; }

/* ---------- receipt (A5 / thermal-friendly) */
.receipt { background: #fff; color: #18221F; max-width: 420px; margin: 0 auto; padding: 22px; border: 1px dashed #C8D2CD; border-radius: 10px; }
.receipt .amt { font-size: 28px; font-weight: 800; margin: 10px 0; }

/* ---------- drawers, modals, toasts */
.scrim { position: fixed; inset: 0; background: rgba(10, 25, 20, .38); z-index: 50; display: flex; justify-content: flex-end; animation: fade .15s; }
.scrim.center { justify-content: center; align-items: center; padding: 16px; }
.drawer { width: min(560px, 100%); height: 100%; background: var(--surface); overflow-y: auto; padding: 22px 24px 40px; animation: slide .2s ease-out; }
.drawer.wide { width: min(820px, 100%); }
.modal { width: min(520px, 100%); max-height: 92vh; overflow: auto; background: var(--surface); border-radius: var(--r-l); padding: 22px 24px; box-shadow: var(--shadow); }
.dhead { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 18px; }
@keyframes fade { from { opacity: 0; } } @keyframes slide { from { transform: translateX(30px); opacity: .4; } }
.toasts { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 90; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast { background: var(--ink); color: var(--surface); padding: 10px 16px; border-radius: 10px; font-weight: 600; box-shadow: var(--shadow); max-width: 90vw; }
.toast.err { background: var(--absent); color: #fff; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; }
.tabs button { border: 0; background: none; padding: 10px 12px; font-weight: 650; color: var(--ink-2); cursor: pointer; border-bottom: 2.5px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs button.on { color: var(--ink); border-color: var(--brand); }
.kv { display: grid; grid-template-columns: 130px 1fr; gap: 8px 14px; font-size: 13.5px; } .kv dt { color: var(--ink-3); } .kv dd { margin: 0; font-weight: 550; }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal div { aspect-ratio: 1; display: grid; place-items: center; border-radius: 8px; font-size: 12.5px; font-weight: 650; background: var(--sunk); color: var(--ink-3); }
.cal .P { background: var(--present-bg); color: var(--present); } .cal .A { background: var(--absent); color: #fff; } .cal .L { background: var(--late-bg); color: var(--late); } .cal .E { background: var(--leave-bg); color: var(--leave); }
.alert { padding: 12px 14px; border-radius: var(--r); background: var(--bus-bg); color: var(--bus-ink); font-weight: 550; }
.alert.err { background: var(--absent-bg); color: var(--absent); }
.chart { display: flex; align-items: flex-end; gap: 6px; height: 120px; }
.chart > div { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; justify-content: flex-end; }
.chart > div > i { width: 100%; max-width: 24px; background: var(--c1); border-radius: 4px 4px 0 0; min-height: 2px; }
.chart > div > i.low { background: var(--late); }
.chart small { font-size: 10.5px; color: var(--ink-3); }
.hbar { display: grid; grid-template-columns: 54px 1fr 44px; gap: 10px; align-items: center; font-size: 13px; }
.hbar > i { height: 10px; border-radius: 5px; background: var(--brand-bg); position: relative; overflow: hidden; }
.hbar > i > em { position: absolute; inset: 0 auto 0 0; background: var(--brand-2); border-radius: 5px; }
.qr svg { width: 200px; height: 200px; background: #fff; border-radius: 12px; padding: 6px; }
code, .code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; background: var(--sunk); padding: 2px 6px; border-radius: 5px; }
.copy { display: flex; gap: 8px; align-items: center; } .copy code { flex: 1; overflow: auto; padding: 9px 10px; }

/* ---------- sign-in: split, the left half shows the school's day in one quiet line of chalk */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1.05fr 1fr; }
.auth .art { background: radial-gradient(120% 90% at 100% 100%, #5B2DC9 0%, transparent 55%), var(--rail-bg); color: #E6E8F7; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.auth .art::after { content: ''; position: absolute; inset: auto -10% -30% auto; width: 520px; height: 520px; border-radius: 50%; border: 60px solid #ffffff0a; }
.auth .art h1 { font-size: 40px; line-height: 1.08; font-weight: 750; max-width: 13ch; letter-spacing: -.025em; }
.auth .art .day { display: flex; flex-direction: column; gap: 10px; max-width: 360px; position: relative; z-index: 1; }
.auth .art .day div { display: flex; gap: 12px; align-items: center; background: #ffffff10; padding: 11px 14px; border-radius: 12px; }
.auth .art .day b { font-size: 13.5px; } .auth .art .day span { font-size: 12.5px; opacity: .7; }
.auth .art .day i { width: 8px; height: 8px; border-radius: 50%; background: var(--bus); flex: none; }
.auth .form-side { display: grid; place-items: center; padding: 32px 20px; background: var(--surface); }
.auth .box { width: min(380px, 100%); display: flex; flex-direction: column; gap: 16px; }
.otp { letter-spacing: .5em; font-size: 22px; text-align: center; font-weight: 700; height: 52px; }

/* ---------- parent app: phone-first */
.papp { max-width: 560px; margin: 0 auto; min-height: 100vh; background: var(--paper); }
.papp .hero { background: radial-gradient(120% 120% at 100% 0%, var(--brand-2), transparent 60%), var(--rail-bg); color: #fff; padding: 22px 20px 54px; border-radius: 0 0 26px 26px; }
.papp .hero .row { justify-content: space-between; }
.papp .kidcard { margin: -38px 16px 0; background: var(--surface); border-radius: 18px; padding: 16px; box-shadow: var(--shadow); display: flex; gap: 14px; align-items: center; }
.papp .kidcard .av { width: 54px; height: 54px; font-size: 18px; }
.papp .body { padding: 18px 16px 90px; display: flex; flex-direction: column; gap: 14px; }
.papp .tile { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 16px; }
.papp .due { border: 1.5px solid var(--bus); background: var(--bus-bg); }
.papp .tabbar { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: min(560px, 100%); display: grid; grid-template-columns: repeat(5, 1fr); background: var(--surface); border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); z-index: 30; }
.papp .tabbar button { border: 0; background: none; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11.5px; font-weight: 600; color: var(--ink-3); padding: 6px 0; cursor: pointer; }
.papp .tabbar button svg { width: 22px; height: 22px; }
.papp .tabbar button.on { color: var(--brand-ink); }

/* ---------- responsive */
@media (max-width: 1100px) { .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g-main { grid-template-columns: 1fr; } }
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .rail { position: fixed; left: 0; top: 0; z-index: 60; width: 270px; transform: translateX(-100%); transition: transform .2s; }
  .shell.open .rail { transform: none; }
  .shell.open .rail-scrim { display: block; position: fixed; inset: 0; z-index: 59; background: rgba(0,0,0,.4); }
  .menu-btn { display: inline-grid; }
  .top { padding: 0 14px; } .page { padding: 18px 14px; }
  .today { grid-template-columns: 1fr 1fr; } .today > div:nth-child(3) { border-left: 0; } .today > div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .g2, .g3, .split { grid-template-columns: minmax(0, 1fr); }
  .split.picked > :first-child { order: 2; } .form { grid-template-columns: 1fr; }
  .auth { grid-template-columns: 1fr; } .auth .art { display: none; }
  .roll { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
  .hide-m { display: none; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
@media print {
  body { background: #fff; } .rail, .top, .noprint, .toasts, .phead { display: none !important; }
  .shell { display: block; } .page { padding: 0; max-width: none; } .rc { border: 0; border-radius: 0; padding: 10mm; margin: 0; } .receipt { border: 0; }
}

/* ---------- parent & student sign-in: the school's own page, light and plain like a real school app */
.gate { min-height: 100vh; max-width: 480px; margin: 0 auto; display: flex; flex-direction: column; background: var(--paper); }
.gate-top { padding: 22px 20px 54px; background: var(--surface); border-bottom: 1px solid var(--line); }
.gate-top.has-photo { background-size: cover; background-position: center; min-height: 190px; display: flex; align-items: flex-end; border: 0; position: relative; }
.gate-top.has-photo::before { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10,12,28,.05) 30%, rgba(10,12,28,.7)); }
.gate-school { display: flex; gap: 12px; align-items: center; position: relative; }
.gate-school img { width: 52px; height: 52px; border-radius: 14px; background: #fff; padding: 4px; box-shadow: 0 1px 3px rgba(0,0,0,.12); object-fit: contain; }
.gate-school b { display: block; font-size: 17px; line-height: 1.25; }
.gate-school span { font-size: 13px; color: var(--ink-2); }
.gate-top.has-photo .gate-school b, .gate-top.has-photo .gate-school span { color: #fff; }
.gate-card { margin: -34px 16px 0; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 22px 20px; display: flex; flex-direction: column; gap: 16px; position: relative; box-shadow: 0 6px 24px -16px rgba(20,22,40,.35); }
.gate-card h1 { font-size: 22px; }
.gate-sub { color: var(--ink-2); margin-top: -8px; }
.gate-foot { padding: 20px 24px 28px; text-align: center; font-size: 13px; color: var(--ink-2); display: flex; flex-direction: column; gap: 6px; margin-top: auto; }
.gate-brand { color: var(--ink-3); font-size: 12px; margin-top: 8px; }
.phone-in { display: flex; align-items: stretch; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--surface); overflow: hidden; }
.phone-in > span { display: grid; place-items: center; padding: 0 12px; background: var(--sunk); font-weight: 650; color: var(--ink-2); border-right: 1px solid var(--line-2); }
.phone-in .input { border: 0; border-radius: 0; font-size: 18px; letter-spacing: .04em; height: 48px; }
.phone-in:focus-within { border-color: var(--brand-2); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-2) 20%, transparent); }
.code-boxes { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.code-boxes .input { height: 54px; padding: 0; text-align: center; font-size: 22px; font-weight: 700; }
.linkbtn { border: 0; background: none; padding: 0; color: var(--brand-ink); font-weight: 650; cursor: pointer; text-decoration: underline; }
.wa-note { display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--ink-2); }
.wa-note svg { width: 18px; height: 18px; color: #1FA855; flex: none; }
/* on a laptop the sign-in page is one framed card in the middle, not a strip floating on the page */
@media (min-width: 600px) {
  .gate { min-height: 0; margin: 6vh auto 40px; border: 1px solid var(--line); border-radius: 22px; overflow: hidden; box-shadow: 0 24px 60px -36px rgba(10, 12, 28, .55); }
  .gate-top { padding: 26px 26px 60px; }
  .gate-card { margin: -36px 20px 0; }
  .gate-foot { margin-top: 8px; }
}
.btn.p:disabled { background: var(--sunk); color: var(--ink-3); opacity: 1; filter: none; }
.gate-demo { margin: 0 0 16px; padding: 10px 12px; border-radius: 10px; background: color-mix(in srgb, var(--bus) 10%, var(--surface)); border: 1px solid color-mix(in srgb, var(--bus) 30%, transparent); font-size: 13px; line-height: 1.5; color: var(--ink-2); }

/* ---------- Nest Construction additions: site app and portal, tiles, progress bars, Gantt, KPI cards */
.papp { padding: 0 14px; }
.ptop { display: flex; gap: 10px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--paper); z-index: 20; }
.ptop img { border-radius: 9px; background: #fff; padding: 3px; }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tile { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 16px; cursor: pointer; color: var(--ink); min-height: 104px; }
.tile svg { width: 26px; height: 26px; color: var(--brand-ink); }
.tile b { font-size: 15px; } .tile small { color: var(--ink-3); font-size: 12.5px; }
.tile:active { transform: scale(.98); }
.fieldmode .btn.lg, .fieldmode .input { min-height: 44px; }
.alert.warn { background: var(--late-bg); color: var(--late); } .alert.ok { background: var(--present-bg); color: var(--present); } .alert.info { background: var(--leave-bg); color: var(--leave); }
.prog { height: 8px; background: var(--sunk); border-radius: 99px; overflow: hidden; min-width: 60px; }
.prog > i { display: block; height: 100%; background: var(--brand); border-radius: 99px; }
.prog.warn > i { background: var(--late); } .prog.bad > i { background: var(--absent); } .prog.ok > i { background: var(--present); }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-bottom: 18px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); padding: 14px 16px; }
.kpi .v { font-size: 24px; font-weight: 750; letter-spacing: -.02em; } .kpi .l { color: var(--ink-2); font-size: 13px; } .kpi .s { color: var(--ink-3); font-size: 12px; margin-top: 4px; }
.kpi.bad .v { color: var(--absent); } .kpi.warn .v { color: var(--late); } .kpi.ok .v { color: var(--present); }
.gantt { position: relative; overflow-x: auto; }
.gantt .grow-row { display: grid; grid-template-columns: 260px 1fr; align-items: center; border-bottom: 1px solid var(--line); min-height: 30px; }
.gantt .bar-track { position: relative; height: 30px; }
.gantt .gbar { position: absolute; top: 8px; height: 14px; border-radius: 4px; background: var(--brand-bg); border: 1px solid var(--brand); overflow: hidden; }
.gantt .gbar > i { display: block; height: 100%; background: var(--brand); opacity: .75; }
.gantt .gbar.base { top: 23px; height: 4px; background: var(--ink-3); border: 0; opacity: .5; }
.gantt .gbar.late { border-color: var(--absent); } .gantt .gbar.late > i { background: var(--absent); }
.gantt .today-line { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--bus); }
.tbl td.r, .tbl th.r { text-align: right; }
.tbl tr.grp td { background: var(--sunk); font-weight: 700; }
.tbl tr.sub td { color: var(--ink-2); font-size: 13px; }
.tbl tfoot td { font-weight: 750; border-top: 2px solid var(--line-2); }
.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; }
.photos img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); background: var(--sunk); }
.doc { background: #fff; color: #171A2E; padding: 28px; border-radius: 6px; font-size: 13px; }
.doc table { width: 100%; border-collapse: collapse; } .doc th, .doc td { border: 1px solid #C9CCD8; padding: 5px 7px; text-align: left; } .doc td.r, .doc th.r { text-align: right; }
.doc h2 { font-size: 17px; } .doc .muted { color: #4B5068; }
@media print { .noprint { display: none !important; } .doc { padding: 0; } }

/* ---------- Arabic and right-to-left (i18n.mjs sets <html lang="ar" dir="rtl">). System Arabic fonts only, nothing loaded from outside. */
:root[lang="ar"] { --f: 'Noto Sans Arabic', 'Segoe UI', Tahoma, 'Geeza Pro', 'Jakarta', system-ui, sans-serif; }
.ar { font-family: 'Noto Sans Arabic', 'Segoe UI', Tahoma, 'Geeza Pro', sans-serif; }
[dir="rtl"] .rail a.on::before { left: auto; right: -12px; border-radius: 4px 0 0 4px; }
[dir="rtl"] .rail .badge { margin-left: 0; margin-right: auto; }
[dir="rtl"] .top .search > svg { left: auto; right: 11px; }
[dir="rtl"] .top .search input { padding-left: 12px; padding-right: 36px; }
[dir="rtl"] .top .search .results button, [dir="rtl"] .lead, [dir="rtl"] .tile { text-align: right; }
[dir="rtl"] .tbl th, [dir="rtl"] .rc th, [dir="rtl"] .rc td, [dir="rtl"] .doc th, [dir="rtl"] .doc td { text-align: right; }
[dir="rtl"] .tbl .r, [dir="rtl"] .tbl td.r, [dir="rtl"] .tbl th.r, [dir="rtl"] .doc td.r, [dir="rtl"] .doc th.r, [dir="rtl"] .right, [dir="rtl"] .marks td input { text-align: left; }
[dir="rtl"] .today > div { border-left: 0; border-right: 1px solid var(--line); } [dir="rtl"] .today > div:first-child { border-right: 0; }
[dir="rtl"] .kid { padding-right: 12px !important; padding-left: 24px !important; } [dir="rtl"] .kid .st { right: auto; left: 10px; }
[dir="rtl"] .tally i { margin-right: 0; margin-left: 4px; } [dir="rtl"] .legend span::before { margin-right: 0; margin-left: 6px; }
[dir="rtl"] .phone-in > span { border-right: 0; border-left: 1px solid var(--line-2); }
[dir="rtl"] .drawer { animation-name: slide-rtl; } @keyframes slide-rtl { from { transform: translateX(-30px); opacity: .4; } }
[dir="rtl"] svg.flip { transform: scaleX(-1); }
[dir="rtl"] .num, [dir="rtl"] input[type="date"], [dir="rtl"] input[inputmode="decimal"], [dir="rtl"] input[inputmode="numeric"], [dir="rtl"] input[type="email"], [dir="rtl"] code { direction: ltr; unicode-bidi: isolate; }
@media (max-width: 860px) {
  [dir="rtl"] .rail { left: auto; right: 0; transform: translateX(100%); }
  [dir="rtl"] .shell.open .rail { transform: none; }
}
/* bilingual documents (tax invoice, PO): English on the left, Arabic on the right, whatever the screen language */
[dir="rtl"] .doc[dir="ltr"] th, [dir="rtl"] .doc[dir="ltr"] td { text-align: left; }
[dir="rtl"] .doc[dir="ltr"] th.r, [dir="rtl"] .doc[dir="ltr"] td.r { text-align: right; }
.doc .bi { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.doc .ar { direction: rtl; unicode-bidi: isolate; text-align: right; }
.doc th .ar, .doc td .ar { display: block; font-weight: 500; font-size: 11.5px; color: #4B5068; }
.doc .qr { width: 118px; height: 118px; image-rendering: pixelated; }

/* =====================================================================================================================
   ui2: the refreshed Nest Construction look. Everything below refines the rules above (same class names, so page code is
   untouched): one type scale, quiet hairlines, flat surfaces separated by a tone step, shadows only on what floats,
   tabular figures for every number, and the Today dashboard (hero band, widgets, charts).
   Type scale: 12 · 13 · 14 · 16 · 20 · 28 · 34.  Space: 4 · 8 · 12 · 16 · 20 · 24 · 32.
   ===================================================================================================================== */
body { font-size: 14px; line-height: 1.5; letter-spacing: -.003em; }
h1 { font-size: 28px; font-weight: 750; letter-spacing: -.022em; }
h2 { font-size: 16px; font-weight: 700; letter-spacing: -.01em; }
::selection { background: color-mix(in srgb, var(--brand) 22%, transparent); }
.num, .tbl td.r, .kpi .v, .today .v { font-variant-numeric: tabular-nums; }
.sr { white-space: nowrap; left: 0; top: 0; clip-path: inset(50%); }

/* ---------- rail */
.rail { padding: 16px 10px 14px; scrollbar-width: thin; scrollbar-color: #ffffff22 transparent; }
.rail .brand { padding: 4px 8px 16px; margin-bottom: 4px; border-bottom: 1px solid #ffffff10; }
.rail .brand img { width: 34px; height: 34px; border-radius: 9px; background: #fff; padding: 3px; }
.rail .brand b { font-size: 14.5px; color: #fff; letter-spacing: -.01em; }
.rail .brand span { font-size: 12px; opacity: .6; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 170px; }
.rail .grp { font-size: 11.5px; font-weight: 600; opacity: .48; padding: 16px 10px 5px; letter-spacing: .01em; }
.rail a { padding: 7px 10px; font-size: 13.5px; font-weight: 550; color: #C3C7E2; border-radius: 8px; transition: background .12s, color .12s; }
.rail a svg { width: 18px; height: 18px; opacity: .72; }
.rail a:hover { background: #ffffff0d; color: #fff; }
.rail a.on { background: #ffffff14; color: #fff; }
.rail a.on svg { opacity: 1; color: #C4BFFF; }
.rail a.on::before { left: -10px; top: 7px; bottom: 7px; width: 3px; }
.rail .mod.open > .mrow > a.on { background: transparent; }
.rail .subnav { margin: 1px 0 6px 18px; padding-left: 10px; border-left-color: #ffffff17; }
.rail .subnav a { font-size: 13px; padding: 5px 10px; color: #9EA3C3; }
.rail .subnav a.on { background: #ffffff12; color: #fff; }
.rail .subnav a.on::before { left: -11px; background: var(--bus); }
.rail .badge { font-size: 11px; line-height: 18px; padding: 0 6px; }
.rail .foot { opacity: .55; line-height: 1.7; border-top: 1px solid #ffffff10; margin-top: 14px; }

/* ---------- top bar: search with a shortcut, compact pickers, account chip */
.top { height: 60px; padding: 0 24px; gap: 8px; background: var(--paper); backdrop-filter: none; border-bottom-color: var(--line); }
.top .search { flex: 0 1 440px; max-width: 440px; }
.top .search input { height: 38px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); padding-right: 64px; transition: border-color .12s, box-shadow .12s; }
.top .search input:hover { border-color: var(--line-2); }
.top .search kbd { position: absolute; right: 9px; top: 50%; transform: translateY(-50%); font: 600 11px/1 var(--f); color: var(--ink-3); background: var(--sunk); border: 1px solid var(--line); border-radius: 6px; padding: 4px 6px; pointer-events: none; }
.top .search .results { top: 46px; padding: 6px; border-radius: 12px; }
.top .search .results button { border-radius: 8px; }
.top .search .results button.on { background: var(--sunk); }
.top .search .results .av { width: 32px; height: 32px; border-radius: 9px; }
.top .search .results .av svg { width: 16px; height: 16px; position: static; transform: none; color: var(--brand-ink); }
.pick { position: relative; display: inline-flex; align-items: center; height: 36px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); color: var(--ink-2); transition: border-color .12s; min-width: 0; }
.pick:hover { border-color: var(--line-2); }
.pick:focus-within { border-color: var(--brand-2); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-2) 18%, transparent); }
.pick > svg { position: absolute; left: 10px; width: 16px; height: 16px; pointer-events: none; color: var(--ink-3); }
.pick::after { content: ''; position: absolute; right: 11px; top: 50%; width: 6px; height: 6px; margin-top: -5px; border: solid var(--ink-3); border-width: 0 1.6px 1.6px 0; transform: rotate(45deg); pointer-events: none; }
.pick select { appearance: none; -webkit-appearance: none; border: 0; background: transparent; height: 100%; padding: 0 30px 0 33px; font-size: 13.5px; font-weight: 600; color: var(--ink); cursor: pointer; outline: none; max-width: 250px; text-overflow: ellipsis; }
.pick.lang select { max-width: 120px; }
.pick select option { background: var(--surface); color: var(--ink); }
.dotbadge { position: absolute; top: 2px; right: 0; background: var(--brand); color: #fff; font-size: 10.5px; font-weight: 700; line-height: 16px; min-width: 16px; padding: 0 4px; border-radius: 99px; box-shadow: 0 0 0 2px var(--paper); }
.dotbadge.bus { background: var(--bus); }
.me-chip { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 10px 0 4px; border: 0; background: transparent; border-radius: 99px; cursor: pointer; text-align: left; }
.me-chip:hover { background: var(--sunk); }
.me-chip .av { width: 30px; height: 30px; font-size: 11.5px; background: var(--brand); color: #fff; }
.me-t b { display: block; font-size: 13px; line-height: 1.15; }
.me-t small { display: block; font-size: 11.5px; color: var(--ink-3); line-height: 1.2; white-space: nowrap; }
@media (max-width: 1180px) { .me-t { display: none; } .me-chip { padding: 0 4px; } }
@media (max-width: 560px) {
  .top { padding: 0 10px; gap: 4px; }
  .top .search { flex: 0 0 auto; max-width: none; width: 38px; }
  .top .search input { width: 38px; padding: 0; color: transparent; cursor: pointer; }
  .top .search input::placeholder { color: transparent; }
  .top .search input:focus { position: fixed; left: 10px; right: 10px; top: 11px; width: auto; z-index: 30; padding: 0 12px 0 36px; color: var(--ink); cursor: text; }
  .top .search input:focus::placeholder { color: var(--ink-3); }
  .top .search:focus-within > svg { position: fixed; left: 21px; top: 30px; z-index: 31; }
  .top .search .results { position: fixed; top: 56px; left: 10px; right: 10px; }
  .top .search kbd { display: none; }
  .top .grow { display: block; flex: 1; }
  .pick { flex: 0 1 auto; }
  .pick select { max-width: 112px; padding-right: 24px; font-size: 13px; }
  .pick.lang select { width: 36px; max-width: 36px; padding: 0; color: transparent; } .pick.lang::after { display: none; } .pick.lang > svg { left: 10px; }
  .pick::after { right: 9px; }
}

/* ---------- page header and breadcrumb */
.page { padding: 26px 28px 48px; max-width: 1400px; }
.phead { align-items: flex-end; gap: 6px 16px; margin-bottom: 20px; }
.phead .crumb { flex-basis: 100%; display: flex; gap: 7px; align-items: center; font-size: 12.5px; color: var(--ink-3); margin-bottom: -2px; flex-wrap: wrap; }
.phead .crumb a { color: var(--ink-2); text-decoration: none; font-weight: 600; }
.phead .crumb a:hover { color: var(--brand-ink); text-decoration: underline; }
.phead .crumb > span[aria-hidden] { opacity: .5; }
.phead p { margin-top: 4px; font-size: 14px; }
.phead .acts { gap: 8px; }

/* ---------- surfaces */
.panel { border-radius: var(--r-l); border-color: var(--line); }
.panel > .ph { padding: 16px 20px 0; min-height: 30px; }
.panel > .ph h2 { font-size: 15px; }
.panel > .pb { padding: 14px 20px 20px; }
.grid { gap: 16px; }

/* ---------- buttons and fields */
.btn { height: 36px; padding: 0 14px; border-radius: 10px; font-size: 13.5px; font-weight: 650; border-color: var(--line-2); transition: background .12s, border-color .12s, transform .08s, box-shadow .12s; }
.btn:hover { background: var(--sunk); border-color: color-mix(in srgb, var(--line-2) 70%, var(--ink-3)); }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn svg { width: 16px; height: 16px; }
.btn.p { background: var(--brand); }
.btn.p:hover { background: color-mix(in srgb, var(--brand) 88%, #000); filter: none; }
.btn.bus:hover { background: color-mix(in srgb, var(--bus) 88%, #000); }
.btn.d:hover { background: var(--absent-bg); }
.btn.ghost:hover { background: var(--sunk); border-color: transparent; }
.btn.sm { height: 30px; padding: 0 10px; font-size: 12.5px; border-radius: 8px; }
.btn.lg { height: 46px; border-radius: 12px; }
.iconbtn { border-radius: 10px; transition: background .12s, color .12s; }
.input, select.input, textarea.input { height: 38px; border-radius: 10px; border-color: var(--line-2); transition: border-color .12s, box-shadow .12s; font-size: 14px; }
.input:hover { border-color: color-mix(in srgb, var(--line-2) 60%, var(--ink-3)); }
select.input { appearance: none; -webkit-appearance: none; padding-right: 32px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23808599' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 11px center; }
[dir="rtl"] select.input { padding-right: 12px; padding-left: 32px; background-position: left 11px center; }
.field > span { font-size: 12.5px; color: var(--ink-2); }
.form { gap: 14px 16px; }
.seg { border-radius: 10px; padding: 3px; }
.seg button { padding: 5px 12px; font-size: 13px; border-radius: 7px; transition: background .12s, color .12s; }
.seg button:hover:not(.on) { color: var(--ink); }
.seg button.on { box-shadow: 0 1px 2px rgba(18,20,42,.12), 0 0 0 1px var(--line); }
:root[data-mode='dark'] .seg button.on { background: var(--line-2); box-shadow: none; }
.tabs { gap: 2px; margin-bottom: 20px; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { padding: 10px 12px 11px; font-size: 13.5px; font-weight: 600; color: var(--ink-3); border-bottom-width: 2px; transition: color .12s, border-color .12s; }
.tabs button:hover { color: var(--ink); }
.tabs button.on { color: var(--ink); border-color: var(--brand); }

/* ---------- tables: sticky header, hairlines, right-aligned tabular numbers, quiet hover */
.tblwrap { border-radius: inherit; }
.tbl th { font-size: 12px; font-weight: 600; color: var(--ink-3); padding: 9px 14px; background: var(--surface); box-shadow: inset 0 -1px 0 var(--line); border-bottom: 0; z-index: 1; }
.tbl td { padding: 10px 14px; border-bottom-color: var(--line); font-size: 13.5px; }
.tbl tbody tr { transition: background .1s; }
.tbl tbody tr:hover { background: var(--raise); }
.tbl tbody tr.click:hover { background: var(--sunk); }
.tbl td.r, .tbl th.r, .tbl .r { text-align: right; font-variant-numeric: tabular-nums; }
.tbl tr.grp td { background: var(--sunk); font-size: 13px; }
.tbl tfoot td { border-top: 1px solid var(--line-2); background: var(--raise); }
.tbl.compact td, .tbl.compact th { padding: 7px 10px; }
.panel.flush .tbl th:first-child, .panel.flush .tbl td:first-child { padding-left: 20px; }
.panel.flush .tbl th:last-child, .panel.flush .tbl td:last-child { padding-right: 20px; }

/* ---------- status pills: a dot carries the tone as well as the colour */
.pill { padding: 2px 9px 2px 8px; font-size: 12px; font-weight: 600; line-height: 18px; gap: 6px; }
.pill.ok::before, .pill.bad::before, .pill.warn::before, .pill.info::before, .pill.bus::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
.chip { background: var(--sunk); }

/* ---------- KPI tiles: icon and label, value, note or change */
.kpis { gap: 12px; }
.kpis.fit { grid-template-columns: repeat(var(--n, 4), minmax(0, 1fr)); margin: 0; }
@media (max-width: 1100px) { .kpis.fit { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) { .kpis.fit { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.kpi { border-radius: var(--r-l); padding: 14px 16px 15px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.kpi .l { order: -1; display: flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 600; color: var(--ink-2); margin-bottom: 4px; }
.kpi .l svg { width: 15px; height: 15px; color: var(--ink-3); flex: none; }
.kpi .v { font-size: 24px; line-height: 1.15; letter-spacing: -.025em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi .s { font-size: 12px; color: var(--ink-3); margin-top: 2px; }
.delta { font-weight: 700; font-size: 11.5px; white-space: nowrap; }
.delta.up { color: var(--present); } .delta.down { color: var(--absent); }

/* ---------- loading, empty */
.sk { display: block; height: 12px; border-radius: 6px; background: var(--sunk); position: relative; overflow: hidden; }
.sk::after { content: ''; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--surface) 70%, transparent), transparent); animation: shimmer 1.3s infinite; }
@keyframes shimmer { to { transform: translateX(100%); } }
.loading { display: flex; flex-direction: column; gap: 10px; padding: 8px 0; }
.page > .loading { padding: 32px 0; max-width: 720px; }
.empty { padding: 44px 20px; }
.empty-ic { display: grid; place-items: center; width: 44px; height: 44px; margin: 0 auto 12px; border-radius: 50%; background: var(--sunk); color: var(--ink-3); }
.empty-ic svg { width: 20px; height: 20px; }

/* ---------- drawers, modals, toasts */
.scrim { background: rgba(10, 12, 28, .45); }
.drawer { padding: 22px 24px 40px; box-shadow: var(--shadow); }
.modal { border-radius: var(--r-xl); padding: 22px 24px; }
.dhead { padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.toast { border-radius: 12px; padding: 11px 16px; font-size: 13.5px; }
@keyframes slide { from { transform: translateX(24px); opacity: .3; } }

/* ---------- the Today dashboard */
.dash { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; grid-auto-flow: row dense; align-items: stretch; }
.dash > .w { min-width: 0; display: flex; flex-direction: column; animation: rise .5s var(--ease) both; animation-delay: calc(var(--i, 0) * 45ms); }
.dash > .w > * { flex: 1; }
.w-s { grid-column: span 1; } .w-m { grid-column: span 2; } .w-l { grid-column: 1 / -1; }
@media (max-width: 1100px) { .dash { grid-template-columns: repeat(2, minmax(0, 1fr)); } .w-m { grid-column: 1 / -1; } }
@media (max-width: 720px) { .dash { grid-template-columns: minmax(0, 1fr); gap: 12px; } .w-s, .w-m { grid-column: 1 / -1; } }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
.wp { display: flex; flex-direction: column; }
.wp > .pb { flex: 1; display: flex; flex-direction: column; gap: 12px; }
.wp .ph .open { text-decoration: none; font-weight: 650; font-size: 12.5px; padding: 4px 8px; margin-right: -8px; border-radius: 7px; }
.wp .ph .open:hover { background: var(--sunk); }
.wp .ph .count { font-size: 12px; font-weight: 700; background: var(--bus-bg); color: var(--bus-ink); padding: 1px 8px; border-radius: 99px; }

/* hero band: a field of the Nest navy in both modes, the greeting and the pulse */
.dhero { background: var(--hero-bg); color: var(--hero-ink); border-radius: var(--r-xl); padding: 24px 26px 0; position: relative; overflow: hidden; }
.dhero h1 { font-size: 30px; color: #fff; }
.dhero .hero-top { display: flex; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.dhero .hero-top > div:first-child { flex: 1; min-width: 220px; }
.dhero .hero-top p { color: var(--hero-ink-2); margin-top: 4px; }
.dhero .btn { background: rgba(255,255,255,.07); border-color: rgba(255,255,255,.14); color: #fff; }
.dhero .btn:hover { background: rgba(255,255,255,.14); }
.pulse { display: grid; grid-template-columns: minmax(296px, 1.4fr) repeat(var(--n, 4), minmax(0, 1fr)); gap: 0; margin-top: 22px; }
.pm { padding: 4px 18px 20px; border-left: 1px solid var(--hero-line); min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.pm.pm-lead { flex-direction: row; align-items: center; gap: 16px; border-left: 0; padding-left: 0; }
.pm-lead > div:not(.ring) { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.pm .pl { font-size: 12.5px; color: var(--hero-ink-2); font-weight: 550; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pm .pr { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.pm .pv { font-size: 24px; font-weight: 750; letter-spacing: -.025em; color: #fff; line-height: 1.15; white-space: nowrap; font-variant-numeric: tabular-nums; }
.pm.pm-lead .pv { font-size: 34px; }
.pm .ps { font-size: 12px; color: var(--hero-ink-2); line-height: 1.4; }
.pm .spark { flex: none; margin-bottom: 3px; }
.pm.bad .pv { color: #FF9C93; } .pm.warn .pv { color: #FFD08A; }
.dhero .delta.up { color: #6EE3A8; } .dhero .delta.down { color: #FF9C93; }
.dhero .ring span b { font-size: 21px; color: #fff; } .dhero .ring span small { color: var(--hero-ink-2); }
.hero-foot { display: flex; margin: 0 -26px; border-top: 1px solid var(--hero-line); background: rgba(255,255,255,.03); overflow-x: auto; scrollbar-width: none; }
.hero-foot > * { flex: 1; display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 12px 26px; border: 0; border-left: 1px solid var(--hero-line); background: transparent; color: inherit; font: inherit; text-align: left; white-space: nowrap; min-width: 0; }
.hero-foot > *:first-child { border-left: 0; }
.hero-foot button { cursor: pointer; transition: background .12s; } .hero-foot button:hover { background: rgba(255,255,255,.06); }
.hero-foot span { font-size: 12.5px; color: var(--hero-ink-2); } .hero-foot b { font-size: 14.5px; color: #fff; font-variant-numeric: tabular-nums; }
@media (max-width: 1320px) { .pulse { grid-template-columns: repeat(var(--n, 4), minmax(0, 1fr)); row-gap: 10px; } .pm.pm-lead { grid-column: 1 / -1; padding-bottom: 14px; } .pm:nth-child(2) { border-left: 0; padding-left: 0; } }
@media (max-width: 720px) {
  .dhero { padding: 20px 16px 0; border-radius: 16px; } .dhero h1 { font-size: 23px; }
  .dhero .hero-top { flex-wrap: nowrap; } .dhero .hero-top > div:first-child { min-width: 0; } .dhero .hero-top .acts { flex-wrap: nowrap; gap: 6px; } .dhero .btn { padding: 0 10px; }
  .attn { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; } .ag { padding: 10px; gap: 8px; } .ag-i { display: none; } .ag-l small { display: none; } .ag > b { font-size: 22px; }
  .pulse { grid-template-columns: repeat(2, minmax(0, 1fr)); } .pm { padding: 4px 12px 14px; } .pm:nth-child(2n) { border-left: 0; padding-left: 0; } .pm.pm-lead { grid-column: 1 / -1; }
  .pm.pm-lead .pv { font-size: 28px; } .pm .pv { font-size: 20px; } .pm .spark { display: none; }
  .hero-foot { margin: 0 -16px; flex-wrap: wrap; } .hero-foot > * { flex: 1 1 50%; padding: 11px 16px; border-top: 1px solid var(--hero-line); } .hero-foot > *:nth-child(odd) { border-left: 0; }
}

/* small stats inside widgets */
.stats { display: flex; gap: 22px; flex-wrap: wrap; }
.stats.vert { flex-direction: column; gap: 12px; }
.st { display: flex; flex-direction: column; min-width: 0; }
.st b { font-size: 20px; font-weight: 750; letter-spacing: -.02em; line-height: 1.2; font-variant-numeric: tabular-nums; }
.st span { font-size: 12.5px; color: var(--ink-3); }
.st.bad b { color: var(--absent); } .st.warn b { color: var(--late); } .st.ok b { color: var(--present); } .st.bus b { color: var(--bus-ink); }
.bad-t { color: var(--absent); } .warn-t { color: var(--late); } .ok-t { color: var(--present); } .-t { color: inherit; }
.pcode { font-weight: 700; font-size: 12px; letter-spacing: .02em; background: var(--sunk); color: var(--ink-2); padding: 1px 7px; border-radius: 6px; }
.none { display: flex; align-items: center; gap: 10px; color: var(--ink-3); font-size: 13.5px; padding: 6px 0; }
.none > span { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--present-bg); color: var(--present); flex: none; }
.none > span svg { width: 15px; height: 15px; }
.keys { display: flex; flex-wrap: wrap; gap: 6px 20px; align-items: baseline; }
.keys > div { display: flex; align-items: baseline; gap: 7px; font-size: 12.5px; color: var(--ink-2); }
.keys i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; align-self: center; }
.keys b { font-size: 16px; color: var(--ink); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.keys > .faint { margin-left: auto; }

/* lists inside widgets */
.lis { display: flex; flex-direction: column; gap: 2px; margin: 0 -8px; }
.li { display: flex; align-items: center; gap: 10px; width: 100%; padding: 7px 8px; border: 0; background: transparent; border-radius: 9px; text-align: left; cursor: pointer; color: var(--ink); font-size: 13.5px; line-height: 1.35; }
.li:hover { background: var(--sunk); }
.li-i { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; flex: none; color: var(--ink-3); background: var(--sunk); }
.li-i svg { width: 15px; height: 15px; }
.li.bad .li-i { color: var(--absent); background: var(--absent-bg); } .li.warn .li-i { color: var(--late); background: var(--late-bg); } .li.info .li-i { color: var(--leave); background: var(--leave-bg); }
.li-r { font-size: 12px; color: var(--ink-3); white-space: nowrap; }
.acc { display: flex; flex-direction: column; }
.acc > div, .acc > .accb { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line); font-size: 13.5px; min-width: 0; }
.acc > :first-child { border-top: 0; }
.acc.tight > div { padding: 7px 0; }
.acc .accb { width: 100%; background: transparent; border-left: 0; border-right: 0; border-bottom: 0; cursor: pointer; text-align: left; color: inherit; font: inherit; border-radius: 0; }
.acc .accb:hover .ell { color: var(--brand-ink); }
.acc b.num { font-weight: 700; white-space: nowrap; } .acc b.neg { color: var(--absent); }
.acc small, .ell small { display: block; color: var(--ink-3); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acc .r { text-align: right; flex: none; } .acc .r small { text-align: right; }
.ell { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.date { flex: none; font-size: 12px; font-weight: 700; padding: 3px 8px; border-radius: 7px; background: var(--sunk); color: var(--ink-2); min-width: 54px; text-align: center; font-variant-numeric: tabular-nums; }
.date.bad { background: var(--absent-bg); color: var(--absent); }
.days { flex: none; display: flex; flex-direction: column; align-items: center; justify-content: center; width: 50px; height: 42px; border-radius: 10px; background: var(--sunk); color: var(--ink-2); font-size: 10.5px; line-height: 1.1; }
.days b { font-size: 16px; } .days.bad { background: var(--absent-bg); color: var(--absent); } .days.warn { background: var(--late-bg); color: var(--late); }
.mbar { display: block; height: 4px; border-radius: 4px; background: var(--track); margin-top: 6px; overflow: hidden; max-width: 220px; }
.mbar > i { display: block; height: 100%; background: var(--late); border-radius: 4px; }
.mbar.bad > i { background: var(--absent); }
.stk .r b { display: block; }

/* needs attention: one card per kind, counted; one opens to its items */
.attn { display: grid; grid-template-columns: repeat(auto-fit, minmax(168px, 1fr)); gap: 10px; }
.ag { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; text-align: left; color: var(--ink); transition: border-color .12s, background .12s, transform .12s; position: relative; }
.ag:hover { border-color: var(--line-2); background: var(--raise); }
.ag.on { border-color: currentColor; }
.ag.bad.on { border-color: var(--absent); background: var(--absent-bg); } .ag.warn.on { border-color: var(--late); background: var(--late-bg); }
.ag > b { font-size: 24px; font-weight: 750; letter-spacing: -.02em; line-height: 1; font-variant-numeric: tabular-nums; }
.ag-i { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; flex: none; }
.ag-i svg { width: 17px; height: 17px; }
.ag.bad .ag-i { background: var(--absent-bg); color: var(--absent); } .ag.warn .ag-i { background: var(--late-bg); color: var(--late); }
.ag.bad > b { color: var(--absent); }
.ag-l { font-size: 13px; font-weight: 650; line-height: 1.25; min-width: 0; }
.ag-l small { display: block; font-size: 11.5px; font-weight: 500; color: var(--ink-3); }
.attn-list { margin-top: 4px; padding-top: 8px; border-top: 1px solid var(--line); animation: rise .25s var(--ease) both; }

/* approvals by type */
.appr { display: flex; flex-direction: column; gap: 2px; margin: 0 -8px; }
.appr button { display: grid; grid-template-columns: minmax(0, 2fr) minmax(36px, 1fr) 26px 54px; align-items: center; gap: 10px; padding: 7px 8px; border: 0; background: transparent; border-radius: 8px; cursor: pointer; text-align: left; color: inherit; font-size: 13px; }
.appr button:hover { background: var(--sunk); }
.appr .al { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.appr .ab { height: 8px; border-radius: 4px; background: var(--track); overflow: hidden; }
.appr .ab i { display: block; height: 100%; background: var(--bus); border-radius: 4px; }
.appr b { text-align: right; font-variant-numeric: tabular-nums; }
.appr em { font-style: normal; text-align: right; font-size: 12px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.more { align-self: flex-start; text-decoration: none; }

/* project cards */
.pgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; }
.pcard { display: flex; flex-direction: column; gap: 6px; text-align: left; padding: 16px 16px 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); cursor: pointer; color: var(--ink); font: inherit; transition: border-color .15s, transform .15s var(--ease), box-shadow .15s; min-width: 0; }
.pcard:hover { border-color: color-mix(in srgb, var(--brand) 40%, var(--line)); transform: translateY(-2px); box-shadow: 0 10px 24px -18px rgba(30, 30, 90, .5); }
.pc-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.pc-n { font-size: 15px; font-weight: 700; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 39px; letter-spacing: -.01em; }
.pc-c { font-size: 12px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pc-m { display: flex; align-items: center; gap: 16px; margin: 8px 0 4px; }
.pc-bars { flex: 1; display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.pc-bars > div { display: grid; grid-template-columns: 68px minmax(0, 1fr) 64px; align-items: center; gap: 8px; font-size: 12px; }
.pc-bars span { color: var(--ink-3); }
.pc-bars i { height: 6px; border-radius: 3px; background: var(--track); overflow: hidden; }
.pc-bars em { display: block; height: 100%; border-radius: 3px; }
.pc-bars b { text-align: right; font-variant-numeric: tabular-nums; font-size: 12.5px; }
.pc-s { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; padding: 10px 0 2px; border-top: 1px solid var(--line); margin-top: 4px; }
.pc-k { display: flex; gap: 14px; }
.pc-k span { display: flex; flex-direction: column; font-size: 11.5px; color: var(--ink-3); text-align: right; }
.pc-k b { white-space: nowrap; font-size: 14px; color: var(--ink); font-variant-numeric: tabular-nums; }
.pc-f { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 8px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--ink-2); }
.pc-f .lab { display: inline-flex; align-items: center; gap: 5px; } .pc-f .lab svg { width: 14px; height: 14px; color: var(--ink-3); }
.pcard.wide { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.2fr) minmax(0, 1fr); grid-template-areas: 'h m s' 'n m s' 'c m s' 'f m s'; column-gap: 28px; row-gap: 6px; align-items: start; }
.pcard.wide .pc-h { grid-area: h; } .pcard.wide .pc-n { grid-area: n; min-height: 0; } .pcard.wide .pc-c { grid-area: c; } .pcard.wide .pc-f { grid-area: f; align-self: end; }
.pcard.wide .pc-m { grid-area: m; margin: 0; align-self: center; } .pcard.wide .pc-s { grid-area: s; border-top: 0; margin: 0; padding: 0; flex-direction: column; align-items: stretch; align-self: center; gap: 12px; }
.pcard.wide .pc-k { justify-content: space-between; }
@media (max-width: 900px) { .pcard.wide { display: flex; align-items: stretch; } .pcard.wide .pc-m { margin: 8px 0 4px; } .pcard.wide .pc-s { flex-direction: row; align-items: flex-end; border-top: 1px solid var(--line); padding-top: 10px; margin-top: 4px; } .pcard.wide .pc-s .minicurve { width: 40%; } }
.pmini { display: flex; align-items: center; gap: 12px; width: 100%; padding: 8px; border: 0; background: transparent; border-radius: 10px; cursor: pointer; text-align: left; color: inherit; font: inherit; }
.pmini:hover { background: var(--sunk); }
.pmini small { display: block; font-size: 12px; color: var(--ink-3); }
.pmini .ring span { font-size: 10.5px; }

/* gauges and funnel */
.gauges { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.gauge { position: relative; display: flex; flex-direction: column; align-items: center; width: 132px; flex: none; }
.gauge b { position: absolute; top: 34px; font-size: 26px; font-weight: 750; letter-spacing: -.02em; line-height: 1; }
.gauge b small { font-size: 13px; font-weight: 700; color: var(--ink-3); margin-left: 1px; }
.gauge > span { font-size: 12px; color: var(--ink-3); text-align: center; margin-top: 4px; line-height: 1.3; }
.gauges .stats { flex: 1; min-width: 150px; }
.funnel-h { display: flex; align-items: center; gap: 18px; }
.custom .crow { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); flex-wrap: wrap; row-gap: 4px; cursor: grab; }
.custom .crow.drag { background: var(--sunk); }
.custom .crow.add { border-style: dashed; cursor: default; flex-wrap: nowrap; }
.custom .crow b { font-size: 13.5px; min-width: 140px; }
.custom .grip { color: var(--ink-3); width: 14px; }

/* ---------- charts (charts.mjs) */
.chart-x { position: relative; width: 100%; min-width: 0; }
.chart-x svg { display: block; overflow: visible; }
.chart-x .tk { font-size: 11px; fill: var(--ink-3); font-variant-numeric: tabular-nums; }
.chart-x g.dim path { opacity: .35; transition: opacity .12s; }
.chart-x rect:focus { outline: none; } .chart-x rect:focus-visible { outline: 2px solid var(--bus); }
.chart-x svg > g > path, .chart-x svg > path { animation: fadein .6s var(--ease) both; }
@keyframes fadein { from { opacity: 0; } }
.ctip { position: absolute; transform: translate(-50%, -100%); margin-top: -6px; background: var(--ink); color: var(--surface); border-radius: 10px; padding: 8px 10px; font-size: 12px; min-width: 150px; pointer-events: none; z-index: 5; box-shadow: var(--shadow); white-space: nowrap; }
.ctip b { display: block; font-size: 12px; margin-bottom: 4px; }
.ctip div { display: flex; align-items: center; gap: 7px; line-height: 1.6; }
.ctip i { width: 8px; height: 8px; border-radius: 2px; flex: none; }
.ctip span { margin-left: auto; padding-left: 14px; font-weight: 700; font-variant-numeric: tabular-nums; }
.ctip .net { border-top: 1px solid color-mix(in srgb, var(--surface) 25%, transparent); margin-top: 4px; padding-top: 3px; }
.lgd { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12px; color: var(--ink-2); margin-top: 8px; }
.lgd span { display: inline-flex; align-items: center; gap: 6px; }
.lgd i { width: 10px; height: 10px; border-radius: 3px; } .lgd i.dash { height: 2px; border-radius: 0; width: 14px; }
.spark { display: block; overflow: visible; }
.ring { position: relative; flex: none; display: grid; place-items: center; }
.ring svg { position: absolute; inset: 0; }
.ring .ring-v { transition: stroke-dasharray .8s var(--ease); }
.ring > span { position: relative; display: flex; flex-direction: column; align-items: center; line-height: 1; font-weight: 750; font-size: 14px; font-variant-numeric: tabular-nums; }
.ring > span b { font-size: 16px; } .ring > span small { font-size: 10.5px; font-weight: 600; color: var(--ink-3); margin-top: 2px; }
.hbars { display: flex; flex-direction: column; gap: 9px; }
.hb { display: grid; grid-template-columns: var(--lw, 120px) minmax(0, 1fr) auto; align-items: center; gap: 10px; font-size: 13px; }
.hb.click { cursor: pointer; }
.hb-l { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hb-l small { display: block; font-size: 11.5px; color: var(--ink-3); }
.hb-t { height: 12px; background: var(--track); border-radius: 0 4px 4px 0; overflow: hidden; }
.hb-t i { display: block; height: 100%; border-radius: 0 4px 4px 0; transform-origin: left; animation: growx .7s var(--ease) both; }
@keyframes growx { from { transform: scaleX(0); } }
.hb-v { font-variant-numeric: tabular-nums; font-size: 13px; min-width: 52px; text-align: right; }
.stackbar .sb { display: flex; gap: 2px; border-radius: 4px; overflow: hidden; background: var(--track); }
.stackbar .sb i { display: block; min-width: 3px; transition: opacity .12s; } .stackbar .sb i.dim { opacity: .35; }
.stackbar .sb-l { display: grid; grid-template-columns: repeat(auto-fit, minmax(104px, 1fr)); gap: 8px 12px; margin-top: 10px; }
.stackbar .sb-l span { display: flex; flex-direction: column; font-size: 12px; color: var(--ink-3); position: relative; padding-left: 14px; }
.stackbar .sb-l i { position: absolute; left: 0; top: 4px; width: 9px; height: 9px; border-radius: 3px; }
.stackbar .sb-l em { font-style: normal; } .stackbar .sb-l b { color: var(--ink); font-size: 14px; font-variant-numeric: tabular-nums; }
.minicurve { display: block; overflow: visible; flex: 0 1 auto; min-width: 0; max-width: 100%; height: auto; }

/* ---------- sign-in (office, site app and portal share the gate) */
.gate-top { background: var(--hero-bg); border-bottom: 0; color: #fff; }
.gate-top .gate-school b { color: #fff; } .gate-top .gate-school span { color: var(--hero-ink-2); }
.gate-card { border-radius: 18px; padding: 24px 22px; }
.gate-card h1 { font-size: 22px; letter-spacing: -.02em; }
@media (min-width: 600px) { .gate { border-radius: 24px; } }

/* ---------- site app and portal: the same surfaces, phone first */
.papp { padding: 0 16px; }
.ptop { padding: 12px 0; background: var(--paper); }
.ptop b { font-size: 15px; letter-spacing: -.01em; }
.papp > select.input { height: 46px !important; border-radius: 12px; font-weight: 650; background-color: var(--surface); }
.tiles { gap: 10px; }
.tile { border-radius: 16px; padding: 16px; min-height: 112px; gap: 4px; transition: border-color .12s, transform .1s, background .12s; }
.tile:hover { border-color: color-mix(in srgb, var(--brand) 40%, var(--line)); background: var(--raise); }
.tile svg { width: 24px; height: 24px; color: var(--brand); margin-bottom: auto; stroke-width: 2; }
.tile b { font-size: 15px; letter-spacing: -.01em; margin-top: 12px; }
.papp .tabs { margin: 12px 0 16px !important; }
.papp .panel > .pb { padding: 14px 16px 16px; }

/* ---------- right to left */
[dir="rtl"] .pick > svg { left: auto; right: 10px; } [dir="rtl"] .pick::after { right: auto; left: 11px; }
[dir="rtl"] .pick select { padding: 0 33px 0 30px; }
[dir="rtl"] .top .search input { padding-left: 64px; padding-right: 36px; } [dir="rtl"] .top .search kbd { right: auto; left: 9px; }
[dir="rtl"] .pm { border-left: 0; border-right: 1px solid var(--hero-line); } [dir="rtl"] .pm.pm-lead { border-right: 0; padding-right: 0; padding-left: 18px; }
[dir="rtl"] .hero-foot > * { border-left: 0; border-right: 1px solid var(--hero-line); text-align: right; } [dir="rtl"] .hero-foot > *:first-child { border-right: 0; }
[dir="rtl"] .li, [dir="rtl"] .ag, [dir="rtl"] .appr button, [dir="rtl"] .pcard, [dir="rtl"] .pmini, [dir="rtl"] .acc .accb, [dir="rtl"] .me-chip { text-align: right; }
[dir="rtl"] .keys > .faint { margin-left: 0; margin-right: auto; }
[dir="rtl"] .pc-k span, [dir="rtl"] .acc .r, [dir="rtl"] .appr b, [dir="rtl"] .appr em, [dir="rtl"] .hb-v { text-align: left; }
[dir="rtl"] .hb-t, [dir="rtl"] .hb-t i { border-radius: 4px 0 0 4px; transform-origin: right; }
[dir="rtl"] .stackbar .sb-l span { padding-left: 0; padding-right: 14px; } [dir="rtl"] .stackbar .sb-l i { left: auto; right: 0; }
[dir="rtl"] .rail .subnav { margin: 1px 18px 6px 0; padding-left: 0; padding-right: 10px; border-left: 0; border-right: 1px solid #ffffff17; }
[dir="rtl"] .rail .subnav a.on::before { left: auto; right: -11px; }
[dir="rtl"] .rail .chev { right: auto; left: 4px; } [dir="rtl"] .rail .mrow > a.has-sub { padding-right: 10px; padding-left: 36px; }
[dir="rtl"] .rail .chev svg { transform: scaleX(-1); } [dir="rtl"] .rail .chev[aria-expanded='true'] svg { transform: rotate(90deg); }
[dir="rtl"] .dotbadge { right: auto; left: 0; }
[dir="rtl"] .chart-x svg { direction: ltr; }
@media (max-width: 1320px) { [dir="rtl"] .pm:nth-child(2) { border-right: 0; padding-right: 0; } }

@media (max-width: 860px) { .page { padding: 18px 14px 40px; } .phead { margin-bottom: 16px; } h1 { font-size: 24px; } }
@media print { .dhero { background: #fff; color: #000; } .dash > .w { animation: none; } }
@media (prefers-reduced-motion: reduce) { .sk::after { display: none; } .pcard:hover { transform: none; } }

/* ---------- sign-in frame beside the product panel (laptops); phones keep the single card */
.gate-art { display: none; }
.small > svg, .muted > svg, .faint > svg { width: 1.1em; height: 1.1em; vertical-align: -.18em; }
@media (min-width: 1000px) {
  .gate-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); background: var(--paper); }
  .gate-art { display: flex; flex-direction: column; justify-content: space-between; gap: 32px; background: var(--hero-bg); color: var(--hero-ink); padding: 44px 56px; position: relative; overflow: hidden; }
  .ga-brand { display: flex; align-items: center; gap: 12px; } .ga-brand img { background: #fff; border-radius: 11px; padding: 4px; } .ga-brand b { font-size: 17px; color: #fff; letter-spacing: -.01em; }
  .ga-body { max-width: 470px; }
  .ga-body h2 { font-size: 38px; line-height: 1.08; font-weight: 750; letter-spacing: -.03em; color: #fff; margin-bottom: 30px; }
  .ga-body ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 18px; }
  .ga-body li { padding-left: 22px; position: relative; } .ga-body li::before { content: ''; position: absolute; left: 0; top: 7px; width: 8px; height: 8px; border-radius: 50%; background: var(--bus); }
  .ga-body li b { display: block; color: #fff; font-size: 15px; } .ga-body li span { color: var(--hero-ink-2); font-size: 14px; line-height: 1.5; }
  .ga-foot { color: var(--hero-ink-2); font-size: 12.5px; }
  .gate-shell .gate { margin: auto; align-self: center; width: min(480px, calc(100% - 48px)); }
}
@media (min-width: 1000px) {
  .gate-shell .gate-top:not(.has-photo) { background: var(--surface); border-bottom: 1px solid var(--line); }
  .gate-shell .gate-top:not(.has-photo) .gate-school b { color: var(--ink); } .gate-shell .gate-top:not(.has-photo) .gate-school span { color: var(--ink-2); }
  .gate-shell .gate-top:not(.has-photo) .gate-school img { box-shadow: 0 0 0 1px var(--line); }
}
/* amounts stay left-to-right inside Arabic text (₹12.90 Cr, not Cr ₹12.90) */
[dir="rtl"] .pv, [dir="rtl"] .st b, [dir="rtl"] .keys b, [dir="rtl"] .hb-v, [dir="rtl"] .acc b.num, [dir="rtl"] .hero-foot b, [dir="rtl"] .pc-bars b, [dir="rtl"] .pc-k b,
[dir="rtl"] .kpi .v, [dir="rtl"] .appr em, [dir="rtl"] .stackbar .sb-l b, [dir="rtl"] .ctip span, [dir="rtl"] .date, [dir="rtl"] .gauge b, [dir="rtl"] .ring > span { direction: ltr; unicode-bidi: isolate; }
@media (max-width: 560px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .kpi { padding: 12px 13px; } .kpi .v { font-size: 20px; } .kpi .l { font-size: 12px; }
  .pick > svg { display: none; } .pick select { padding-left: 11px; } .pick.lang > svg { display: block; }
}
.top .search > svg { pointer-events: none; z-index: 1; }
[dir="rtl"] .pm .ps, [dir="rtl"] .pm .pl, [dir="rtl"] .st span, [dir="rtl"] .ag-l { unicode-bidi: plaintext; }

/* tyre map (fleet) */
.tmap{display:flex;flex-direction:column;gap:8px;align-items:center;padding:8px 0}
.tcab{width:180px;text-align:center;padding:8px;border-radius:12px 12px 4px 4px;background:var(--brand-soft, rgba(79,70,229,.1));font-weight:600;font-size:12px}
.taxle{display:grid;grid-template-columns:1fr 70px 1fr;gap:8px;align-items:center;width:100%;max-width:560px}
.taxle.spare{grid-template-columns:1fr 70px;margin-top:6px;border-top:1px dashed var(--line);padding-top:10px}
.tside{display:flex;gap:6px;justify-content:center}
.tshaft{height:6px;border-radius:3px;background:var(--line);position:relative;font-size:10px;color:var(--muted, #888);text-align:center;line-height:22px}
.tyre{display:flex;flex-direction:column;align-items:center;gap:2px;min-width:62px;padding:8px 4px;border-radius:9px;border:2px dashed var(--line);background:transparent;cursor:pointer;font:inherit;font-size:11px;color:inherit}
.tyre b{font-size:11px}.tyre span{font-size:10px;opacity:.75;max-width:74px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.tyre.on{border-style:solid;border-color:#2F3A45;background:rgba(47,58,69,.08)}
.tyre.worn{border-color:var(--bad, #c0392b);background:rgba(192,57,43,.08)}
.tyre:hover{outline:2px solid var(--brand, #4F46E5)}
@media (max-width:560px){.tyre{min-width:48px;padding:6px 2px}.tyre span{max-width:52px}.taxle{grid-template-columns:1fr 34px 1fr}.tshaft{font-size:0}}
/* report frame: company header shown on print */
.rpt-head{display:none}
@media print{.rpt-head{display:flex;justify-content:space-between;align-items:center;border-bottom:2px solid #000;padding-bottom:8px;margin-bottom:12px}.rpt-head img{height:44px}.no-print{display:none!important}}
.map{height:460px;border-radius:14px;overflow:hidden;border:1px solid var(--line)}
.livegrid{display:grid;grid-template-columns:minmax(0,1fr) 300px;gap:14px;align-items:start}
@media (max-width:900px){.livegrid{grid-template-columns:1fr}.map{height:340px}}
button.kpi{font:inherit;color:inherit;width:100%}
.report h3{break-after:avoid}
@media print{.report .panel{box-shadow:none}.report .tbl{font-size:11px}}
/* ---------- Nest Track */
.map.tall{height:calc(100vh - 190px);min-height:420px}
.livegrid{grid-template-columns:minmax(0,1fr) 340px}
@media (max-width:900px){.livegrid{grid-template-columns:1fr}.map.tall{height:56vh;min-height:320px}}
.vlist{max-height:calc(100vh - 330px);overflow:auto;margin:0 -8px}
.vrow{display:flex;align-items:center;gap:10px;width:100%;text-align:left;background:none;border:0;border-radius:9px;padding:8px;cursor:pointer;color:inherit;font:inherit}
.vrow:hover,.vrow.on{background:var(--sunk)}
.vrow b{display:block;font-size:13.5px}.vrow small{display:block;color:var(--ink-3);font-size:12px}
.chip.on{background:var(--brand-bg);color:var(--brand-ink)}
.leaflet-container{font:inherit;background:var(--sunk)}
.sms{display:flex;gap:10px;align-items:flex-start;padding:10px 12px;border:1px solid var(--line);border-radius:10px}
.sms code{font-size:14px;word-break:break-all;white-space:pre-wrap}.sms small{display:block;color:var(--ink-3);margin-top:3px}
.hex{font:12px/1.5 ui-monospace,Menlo,monospace;word-break:break-all;color:var(--ink-2)}
.sharepage{max-width:900px;margin:0 auto;padding:14px}
.sharepage .map{height:62vh;min-height:320px}

/* ---------- Nest Track theme: royal blue header and rail, white cards on a pale page, a tab bar at the bottom on phones */
:root { --brand: #1456F0; --brand-2: #2F6BFF; --brand-ink: #0B3A9E; --brand-bg: #EAF1FF; --rail-bg: #0B3A9E; --bus: #F5A524; --bus-ink: #8A5A00; --bus-bg: #FFF4D6;
  --paper: #F5F7FB; --line: #E3E8F2; --sunk: #EEF2F9; --c1: #1456F0; --c2: #D97706; --o1: #BBD0FB; --o2: #86A9F7; --o3: #4B7FF3; --o4: #0B3A9E; --head: #0B3A9E; }
:root[data-mode='dark'] { --rail-bg: #0A2A70; --head: #0A2A70; }
.rail { background: linear-gradient(180deg, var(--rail-bg) 0%, color-mix(in srgb, var(--rail-bg) 82%, #000) 100%); color: #D6E2FF; }
.rail a.on, .rail .subnav a.on { background: rgba(255, 255, 255, .16); color: #fff; }
.rail .mod.open > .mrow > a.on { background: rgba(255, 255, 255, .10); }
.rail a.on::before { background: #fff; } .rail .subnav a.on::before { background: #BBD0FB; }
.rail .subnav a { color: #B8CBF7; }
.rail .brand img { background: #fff; padding: 3px; }
.rail .brand b { color: #fff; text-transform: uppercase; letter-spacing: .02em; }
.btn.p { background: var(--brand); border-color: var(--brand); }
.top .mbrand { display: none; }
.tabbar { display: none; }
@media (max-width: 900px) {
  /* phone: blue header with the company's logo and name, like an app; the menu moves to the tab bar at the bottom */
  .top { background: var(--head); border-bottom: 0; backdrop-filter: none; height: 62px; padding: 0 14px; color: #fff; }
  .top .mbrand { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; }
  .top .mbrand img { width: 40px; height: 40px; border-radius: 9px; background: #fff; padding: 4px; flex: none; }
  .top .mbrand b { display: block; font-size: 15px; line-height: 1.1; text-transform: uppercase; letter-spacing: .02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .top .mbrand span { display: block; font-size: 11.5px; opacity: .8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .top .menu-btn, .top .search, .top .grow, .top .pick.lang { display: none !important; }
  .top .iconbtn { color: #fff; } .top .iconbtn:hover { background: rgba(255, 255, 255, .14); }
  .top .me-chip .av { background: transparent; border: 2px solid #fff; color: #fff; }
  .top .pick { background: rgba(255, 255, 255, .14); border-color: transparent; color: #fff; max-width: 132px; } .top .pick select { color: #fff; } .top .pick option { color: #14172B; }
  .page { padding-bottom: 92px !important; }
  .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: var(--surface); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
  .tabbar a, .tabbar button { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 9px 2px 8px; border: 0; background: none; color: var(--ink-3); font: 600 11.5px var(--f); text-decoration: none; position: relative; cursor: pointer; }
  .tabbar svg { width: 23px; height: 23px; }
  .tabbar .on { color: var(--brand); } .tabbar .on::before { content: ''; position: absolute; top: -1px; left: 22%; right: 22%; height: 3px; border-radius: 0 0 3px 3px; background: var(--brand); }
  .tabbar .tb-n { position: absolute; top: 4px; left: 54%; background: #E5484D; color: #fff; font-size: 10px; line-height: 16px; min-width: 16px; padding: 0 4px; border-radius: 9px; }
  .toasts { bottom: 84px !important; }
}
/* home */
.hm { display: flex; flex-direction: column; gap: 16px; max-width: 1180px; }
.greet span { color: var(--ink-2); font-size: 17px; } .greet h1 { color: var(--brand-ink); font-size: 30px; margin-top: 2px; }
:root[data-mode='dark'] .greet h1 { color: #9DBBFF; }
.note { display: flex; gap: 14px; align-items: center; padding: 14px 18px; border-radius: 12px; border: 1px solid #C9DBFB; background: #EDF3FF; color: #14172B; }
.note b { display: block; } .note .ni { width: 34px; height: 34px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; font: 700 18px Georgia, serif; flex: none; }
.note.tip { border-color: #F3DCA2; background: #FFF8E6; } .note.tip .ni { background: transparent; color: #E39B0B; font-size: 24px; }
:root[data-mode='dark'] .note { background: #16233F; border-color: #2A3E6B; color: #E8EEFF; } :root[data-mode='dark'] .note.tip { background: #33290F; border-color: #5C4A17; }
.blank { border: 1.5px dashed var(--line-2); border-radius: 16px; background: var(--surface); padding: 30px 18px 34px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.blank > svg { width: min(330px, 80%); height: auto; } .blank h2 { font-size: 24px; } .blank p { color: var(--ink-2); max-width: 520px; } .blank .btn { margin-top: 12px; height: 50px; padding: 0 28px; font-size: 16px; }
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.step { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; padding: 18px 10px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); cursor: pointer; font: inherit; color: inherit; }
.step:hover { border-color: var(--brand); }
.step .si { width: 50px; height: 50px; position: relative; display: grid; place-items: center; } .step .si > svg { width: 40px; height: 40px; }
.step .ok { position: absolute; right: -4px; bottom: -2px; width: 20px; height: 20px; border-radius: 50%; background: #1A9F53; color: #fff; display: grid; place-items: center; border: 2px solid var(--surface); } .step .ok svg { width: 11px; height: 11px; stroke-width: 3.4; }
.step b { font-size: 14.5px; } .step small { font-size: 13.5px; color: var(--ink-3); } .step.done small { color: #1A9F53; } .step.now small { color: var(--brand); font-weight: 600; }
.step .bar { align-self: stretch; height: 4px; border-radius: 3px; background: var(--line-2); margin-top: 8px; overflow: hidden; } .step .bar i { display: block; height: 100%; border-radius: 3px; background: var(--brand); } .step.done .bar i { background: #1A9F53; }
.stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.stat { text-align: left; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); cursor: pointer; font: inherit; color: inherit; border-top: 3px solid var(--tone, var(--brand)); }
.stat span { font-size: 13px; color: var(--ink-2); display: block; } .stat b { font-size: 28px; line-height: 1.2; display: block; font-variant-numeric: tabular-nums; } .stat small { color: var(--ink-3); font-size: 12px; }
.hm .cols { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; }
@media (max-width: 900px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } .stats .stat:last-child { grid-column: 1 / -1; } .hm .cols { grid-template-columns: 1fr; } .greet h1 { font-size: 26px; } }

/* reports: totals, then charts side by side, then the table */
.rgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.rgrid > .panel.wide { grid-column: 1 / -1; }
@media (max-width: 900px) { .rgrid { grid-template-columns: 1fr; } }
@media print { .rgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); break-inside: avoid; } .report .kpis { grid-template-columns: repeat(5, 1fr); } }

/* vehicle pictures: the picker, the list, the pulse under a moving one */
@keyframes vpulse { from { transform: scale(.6); opacity: .45; } to { transform: scale(2.6); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .vmark i { animation: none !important; } }
.vicon { display: inline-grid; place-items: center; width: 30px; height: 34px; border-radius: 9px; background: var(--sunk); flex: none; }
.iconpick { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 8px; }
.iconpick button { display: grid; justify-items: center; gap: 4px; padding: 8px 4px 6px; border: 1.5px solid var(--line); border-radius: 10px; background: var(--surface); font: inherit; font-size: 12px; color: var(--ink-2); cursor: pointer; }
.iconpick button:hover { border-color: var(--c1); } .iconpick button.on { border-color: var(--c1); background: color-mix(in srgb, var(--c1) 9%, transparent); color: var(--ink); font-weight: 600; }
.iconpick button:focus-visible { outline: 2px solid var(--c1); outline-offset: 2px; }
/* a node's vehicles against its allowance */
.quota { display: inline-grid; gap: 3px; min-width: 92px; text-align: right; } .quota i { display: block; height: 5px; border-radius: 3px; background: var(--sunk); overflow: hidden; } .quota i b { display: block; height: 100%; background: var(--c1); } .quota.full i b { background: var(--absent); }

/* tolls: the list beside the map */
.tollgrid { display: grid; grid-template-columns: minmax(340px, 2fr) 3fr; gap: 16px; align-items: start; }
.tollgrid .tolllist { max-height: calc(100vh - 250px); min-height: 440px; overflow: auto; } .tollgrid .tolllist tr.on td { background: color-mix(in srgb, var(--c1) 9%, transparent); }
@media (max-width: 1000px) { .tollgrid { grid-template-columns: 1fr; } .tollgrid .tolllist { max-height: 340px; min-height: 0; order: 2; } }
.tollgrid > .panel { isolation: isolate; }

/* ---------- route playback */
.pbtop { gap: 10px; margin-bottom: 12px; align-items: center; }
.pbchips { display: flex; gap: 6px; flex-wrap: wrap; }
.pbchip { border: 1.5px solid var(--line); background: var(--surface); color: var(--ink-2); border-radius: 99px; padding: 6px 13px; font: inherit; font-size: 13px; cursor: pointer; white-space: nowrap; }
.pbchip:hover { border-color: var(--c1); color: var(--ink); } .pbchip.on { background: var(--c1); border-color: var(--c1); color: #fff; font-weight: 600; }
.pbchip:focus-visible, .tool:focus-visible, .pbitem:focus-visible { outline: 2px solid var(--c1); outline-offset: 2px; }
.pbcustom { gap: 10px; padding: 10px 14px; margin-bottom: 12px; align-items: end; } .pbcustom label { display: grid; gap: 4px; }
.pbgrid { display: grid; grid-template-columns: minmax(0, 1fr) 390px; gap: 14px; align-items: start; }
.pbgrid:fullscreen { background: var(--paper); padding: 12px; overflow: auto; } .pbgrid:fullscreen .pbmap { height: calc(100vh - 24px); }
.pbmapwrap { position: relative; } .pbmap { height: calc(100vh - 210px); min-height: 460px; border-radius: 14px; }
.pbtools { position: absolute; top: 12px; right: 12px; z-index: 500; display: grid; gap: 6px; }
.tool { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); cursor: pointer; box-shadow: 0 1px 4px rgba(15,23,42,.14); }
.tool svg { width: 19px; height: 19px; } .tool:hover { color: var(--c1); } .tool.on { background: var(--c1); border-color: var(--c1); color: #fff; }
.pblegend { position: absolute; left: 12px; bottom: 26px; z-index: 500; display: flex; gap: 10px; flex-wrap: wrap; padding: 6px 10px; border-radius: 10px; background: color-mix(in srgb, var(--surface) 92%, transparent); font-size: 12px; color: var(--ink-2); box-shadow: 0 1px 4px rgba(15,23,42,.12); }
.pblegend span { display: inline-flex; align-items: center; gap: 5px; } .pblegend i { width: 16px; height: 4px; border-radius: 2px; display: inline-block; } .pblegend i.dash { background: repeating-linear-gradient(90deg, #94A3B8 0 4px, transparent 4px 7px); }
.pbmeasure { position: absolute; left: 50%; top: 12px; transform: translateX(-50%); z-index: 500; display: flex; gap: 10px; align-items: center; padding: 6px 8px 6px 12px; border-radius: 10px; background: var(--surface); font-size: 13px; font-weight: 600; box-shadow: 0 1px 6px rgba(15,23,42,.18); }
.pbside { display: grid; gap: 12px; min-width: 0; }
.pbcard { padding: 14px; display: grid; gap: 10px; } .pbname { font-size: 16px; }
.pbnow { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; font-size: 13px; } .pbnow b { font-variant-numeric: tabular-nums; }
.pbaddr { display: flex; gap: 6px; align-items: flex-start; } .pbaddr svg { width: 14px; height: 14px; flex: none; margin-top: 2px; }
.pbctl { display: flex; align-items: center; gap: 6px; } .pbplay { width: 42px; height: 42px; padding: 0; border-radius: 50%; display: grid; place-items: center; flex: none; } .pbplay svg { width: 18px; height: 18px; fill: currentColor; }
.pbctl .iconbtn svg { fill: currentColor; } .pbbar { flex: 1; min-width: 0; } .pbrate { width: auto; flex: none; padding: 6px 8px; }
.pbbar input[type=range] { width: 100%; accent-color: var(--c1); }
.pbgraph { width: 100%; height: 86px; display: block; cursor: pointer; background: var(--sunk); border-radius: 8px; }
.pbticks { display: flex; justify-content: space-between; margin-top: -4px; font-variant-numeric: tabular-nums; }
.pbopts { gap: 10px 14px; flex-wrap: wrap; color: var(--ink-2); }
.pbkpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 0; }
.pbk { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; min-width: 0; } .pbk span { display: block; font-size: 11.5px; color: var(--ink-3); } .pbk b { font-size: 14px; white-space: nowrap; }
.pbtabs { display: flex; border-bottom: 1px solid var(--line); } .pbtabs button { flex: 1; background: none; border: 0; border-bottom: 2.5px solid transparent; padding: 11px 6px; font: inherit; font-size: 13px; color: var(--ink-3); cursor: pointer; }
.pbtabs button.on { color: var(--c1); border-bottom-color: var(--c1); font-weight: 600; }
.pblist { max-height: 420px; overflow: auto; padding: 6px; }
.pbitem { display: flex; gap: 10px; align-items: center; width: 100%; text-align: left; background: none; border: 0; border-radius: 10px; padding: 9px 8px; cursor: pointer; color: inherit; font: inherit; }
.pbitem:hover { background: var(--sunk); } .pbitem.on { background: color-mix(in srgb, var(--c1) 10%, transparent); }
.pbitem b { display: block; font-size: 13.5px; } .pbitem small { display: block; color: var(--ink-3); font-size: 12px; }
.pbdot { width: 22px; height: 22px; border-radius: 50%; flex: none; display: grid; place-items: center; font-style: normal; font-size: 11px; font-weight: 700; color: #fff; }
.pbdot.trip { background: #16A34A; width: 12px; height: 12px; margin: 0 5px; } .pbdot.stop { background: #2563EB; }
.pbgo { color: var(--ink-3); } .pbgo svg { width: 14px; height: 14px; fill: currentColor; } .pbitem:hover .pbgo { color: var(--c1); }
.pbexport { gap: 8px; align-items: center; }
.pbpin b { display: grid; place-items: center; border-radius: 50%; color: #fff; font: 700 12px/1 system-ui, sans-serif; border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.35); }
@media (max-width: 1100px) { .pbgrid { grid-template-columns: 1fr; } .pbmap { height: 56vh; min-height: 340px; } .pbkpis { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 560px) { .pbkpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .pblegend { display: none; } }
@media print { .pbtools, .pbctl, .pbopts, .pbexport, .pbtabs { display: none !important; } .pbgrid { grid-template-columns: 1fr; } .pblist { max-height: none; } }

.pbctl .input.pbrate { width: 78px; min-width: 0; flex: none; padding: 7px 8px; } .pbbar { min-width: 60px; }
.pbopts .input.pbsmall { width: 88px; padding: 5px 8px; height: auto; } .pbopts input.pbsmall { width: 60px; }
.pbgrid, .pbside, .pbcard { min-width: 0; max-width: 100%; }

/* ---------- 1.9.0 every screen size: phones (Android / iPhone), tablets, laptops, big monitors */
.top .mbrand > div { min-width: 0; flex: 1; }
.mapnote { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 450; display: flex; gap: 8px; align-items: center; max-width: calc(100% - 90px); padding: 10px 16px; border-radius: 12px; background: var(--surface); color: var(--ink); box-shadow: 0 4px 18px rgba(15, 23, 42, .18); font-weight: 600; font-size: 14px; text-align: center; pointer-events: none; }
.mapnote svg { width: 20px; height: 20px; color: var(--brand); flex: none; }
@supports (height: 100dvh) {
  .shell { min-height: 100dvh; } .rail { height: 100dvh; }
  .pbmap { height: calc(100dvh - 210px); } .pbgrid:fullscreen .pbmap { height: calc(100dvh - 24px); }
}
.leaflet-container { touch-action: none; } .leaflet-control-attribution { font-size: 10px; max-width: 70%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
img, svg, video, canvas { max-width: 100%; }
.page { min-width: 0; } .main { min-width: 0; }
@media (max-width: 900px) {
  .pbchips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; margin: 0 -14px; padding: 0 14px 2px; }
  .pbchips::-webkit-scrollbar { display: none; } .pbchip { flex: none; }
  .pbtop > div:first-child { flex: 1 1 100%; min-width: 0 !important; }
  @supports (height: 100dvh) { .pbmap { height: 52dvh; } .map.tall { height: 52dvh; } }
  .tabs, .subtabs { overflow-x: auto; scrollbar-width: none; flex-wrap: nowrap; } .tabs::-webkit-scrollbar { display: none; }
}
@media (max-width: 700px) {
  .tbl th, .tbl td { padding: 9px 10px; }
  .tbl td { white-space: nowrap; } .tbl td.wrap { white-space: normal; min-width: 180px; }
  .tblwrap { -webkit-overflow-scrolling: touch; }
  .row > .grow.small, .row > .grow.muted { flex: 1 1 100%; }
  .modal, .dialog { max-width: calc(100vw - 20px) !important; }
  input, select, textarea { font-size: 16px; }                 /* iPhone zooms the page when a box under 16px gets focus */
}
@media (max-width: 560px) {
  .top .pick { width: 40px; max-width: 40px !important; flex: none; padding: 0; }
  .top .pick select { width: 40px; max-width: 40px; padding: 0; color: transparent !important; }
  .top .pick::after { display: none; } .top .pick > svg { display: block; left: 12px; color: #fff; }
  .top { padding: 0 10px !important; gap: 2px !important; } .top .mbrand img { width: 36px; height: 36px; } .top .mbrand b { font-size: 14px; }
  .pbmap { min-height: 300px; }
}
@media (max-width: 340px) { .top .mbrand span { display: none; } .tabbar a, .tabbar button { font-size: 10.5px; } }
@media (min-width: 1800px) { .page { max-width: 1760px; } }
.nf { max-width: 520px; margin: 40px auto; text-align: center; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 36px 24px; }
.nf-code { display: block; font: 800 clamp(64px, 18vw, 96px)/1 var(--f); letter-spacing: -.04em; background: linear-gradient(120deg, var(--brand), var(--brand-ink)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.nf h1 { margin: 12px 0 6px; font-size: 22px; }
.keys { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 360px), 1fr)); gap: 12px; margin-bottom: 16px; }
.keyc { padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; } .keyc.off { opacity: .6; }
.keyw { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13.5px; } .keyw span { display: inline-flex; gap: 6px; align-items: center; } .keyw svg { width: 16px; height: 16px; color: var(--brand); }
.keywin { display: grid; grid-template-columns: 110px 1fr 1fr; gap: 8px; align-items: center; margin-top: 8px; } .keywin label:not(.check) { display: flex; gap: 6px; align-items: center; font-size: 13px; color: var(--ink-2); } .keywin .input { min-width: 0; }
@media (max-width: 420px) { .keywin { grid-template-columns: 1fr 1fr; } .keywin .check { grid-column: 1 / -1; } }
.made { border-color: #1A9F53; margin-bottom: 16px; } .keybox { flex: 1; min-width: 0; overflow-wrap: anywhere; padding: 8px 10px; border-radius: 8px; background: var(--sunk); font-size: 13px; }
.keycode, .apidocs code { font-size: 12.5px; } .keycode { white-space: pre-wrap; overflow-wrap: anywhere; background: var(--sunk); padding: 10px; border-radius: 8px; margin: 0; }
.apidocs summary { padding: 14px 16px; cursor: pointer; } .apidocs .tbl td { vertical-align: top; } .apidocs code { overflow-wrap: anywhere; }

/* ---------- 1.10.0 live map */
.livemap { position: relative; }
.livemap .pbtools { top: 12px; right: 12px; }
.maplook { position: absolute; left: 10px; top: 84px; z-index: 500; }
.maplook .tool { width: 34px; height: 34px; }
.maplook-m { position: absolute; left: 42px; top: 0; display: grid; gap: 2px; padding: 6px; min-width: 140px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow, 0 6px 24px rgba(15,23,42,.18)); }
.maplook-m button { display: flex; gap: 9px; align-items: center; padding: 7px 9px; border: 0; background: none; border-radius: 8px; font: 600 13.5px var(--f); color: var(--ink); cursor: pointer; text-align: left; }
.maplook-m button:hover, .maplook-m button.on { background: var(--sunk); } .maplook-m button.on { color: var(--brand); }
.mlk { width: 26px; height: 20px; border-radius: 5px; border: 1px solid var(--line-2); flex: none; }
.mlk.street { background: linear-gradient(135deg, #F2EFE9 50%, #AAD3DF 50%); } .mlk.sat { background: linear-gradient(135deg, #3D5A2A, #7A6A45); }
.mlk.hybrid { background: linear-gradient(135deg, #3D5A2A, #7A6A45); box-shadow: inset 0 0 0 2px #F5C04A; } .mlk.dark { background: #20232E; }
.mapdark .leaflet-tile-pane { filter: invert(1) hue-rotate(180deg) brightness(.95) contrast(.9) saturate(.6); }
.mapdark { background: #1b1d24 !important; }
.mlegend { position: absolute; left: 10px; bottom: 22px; z-index: 450; display: flex; flex-wrap: wrap; gap: 4px 10px; padding: 5px 10px; border-radius: 9px; background: color-mix(in srgb, var(--surface) 92%, transparent); box-shadow: 0 1px 4px rgba(15,23,42,.18); font-size: 12px; font-weight: 600; max-width: calc(100% - 20px); }
.mlegend span { display: inline-flex; gap: 5px; align-items: center; } .mlegend i { width: 9px; height: 9px; border-radius: 50%; }
.vclus div { border-radius: 50%; display: grid; place-items: center; box-shadow: 0 2px 8px rgba(0,0,0,.35); cursor: pointer; }
.vclus b { width: calc(100% - 10px); height: calc(100% - 10px); border-radius: 50%; background: #fff; color: #12142A; display: grid; place-items: center; font: 800 13px/1 system-ui, sans-serif; }
.chiprow { display: flex; gap: 6px; padding: 0 16px 10px; overflow-x: auto; scrollbar-width: none; } .chiprow::-webkit-scrollbar { display: none; }
.chiprow .pbchip { flex: none; display: inline-flex; gap: 5px; align-items: center; } .chiprow .pbchip b { font-weight: 700; opacity: .8; }
.search.mini { position: relative; flex: 1 1 180px; max-width: 260px; } .search.mini > svg { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--ink-3); }
.search.mini .input { height: 34px; padding-left: 32px; }
.vcard .ph { gap: 10px; } .vcard h2 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vcard-ic { width: 38px; height: 38px; border-radius: 10px; background: var(--sunk); display: grid; place-items: center; flex: none; }
.vaddr { display: flex; gap: 6px; align-items: flex-start; text-align: left; border: 0; background: none; padding: 0; font: inherit; font-size: 13.5px; color: var(--ink); cursor: copy; } .vaddr svg { width: 16px; height: 16px; flex: none; margin-top: 2px; color: var(--brand); }
.vstats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.vstat { background: var(--sunk); border-radius: 10px; padding: 8px 10px; min-width: 0; } .vstat span { display: block; font-size: 11.5px; color: var(--ink-3); } .vstat b { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vstat.ok b { color: #16A34A; } .vstat.bad b { color: #DC2626; }
.vkv { grid-template-columns: 118px 1fr; margin: 2px 0 0; font-size: 13.5px; } .vkv dd { min-width: 0; overflow-wrap: anywhere; }
.ico-l { display: inline-flex; gap: 5px; align-items: center; } .ico-l svg { width: 15px; height: 15px; }
.sigbars { display: inline-flex; gap: 2px; align-items: flex-end; vertical-align: -2px; margin-right: 4px; } .sigbars i { width: 4px; border-radius: 1px; background: var(--line-2); } .sigbars i.on { background: #16A34A; }
.livemap:fullscreen { background: var(--paper); } .livemap:fullscreen .map.tall { height: 100vh !important; border-radius: 0; }
@media (max-width: 560px) { .vstats { grid-template-columns: repeat(2, minmax(0, 1fr)); } .mlegend { bottom: 20px; font-size: 11px; } }
@media (max-width: 900px) { .vlist { max-height: none; } }
.livegrid > * { min-width: 0; }
@media (min-width: 901px) { .livecol .vstats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 901px) { .livemap .map.tall { height: calc(100vh - 120px); height: calc(100dvh - 120px); min-height: 460px; } }
@media (max-width: 640px) {
  /* vehicles: one card per vehicle on phones instead of a wide table */
  .vtbl thead { display: none; } .vtbl, .vtbl tbody { display: block; }
  .vtbl tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
  .vtbl td { border: 0 !important; padding: 0 !important; white-space: normal !important; max-width: none !important; }
  .vtbl td:nth-child(1) { grid-column: 1; grid-row: 1; } .vtbl td:nth-child(6) { grid-column: 2; grid-row: 1; }
  .vtbl td:nth-child(2) { grid-column: 1 / -1; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
  .vtbl td:nth-child(3) { grid-column: 1 / -1; color: var(--ink-2); }
  .vtbl td:nth-child(4) { grid-column: 1; text-align: left !important; } .vtbl td:nth-child(4)::after { content: ' today'; color: var(--ink-3); font-size: 12px; }
  .vtbl td:nth-child(5) { grid-column: 2; text-align: right; }
}
/* the map keeps its layers to itself: drawers, pop-ups, the header and the menu always stay above it (Leaflet's panes go up to z-index 1000) */
.leaflet-container { isolation: isolate; z-index: 0; }
.livemap, .pbmapwrap, .mapwrap, .sharepage { isolation: isolate; position: relative; z-index: 0; }
.pbgrid:fullscreen, .livemap:fullscreen { z-index: auto; }
/* role access */
.tbl.racc td.c, .tbl.racc th.c { text-align: center; width: 110px; } .tbl.racc tr.grp td { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-3); }
.acc-box { display: inline-grid; place-items: center; cursor: pointer; } .acc-box input { width: 20px; height: 20px; accent-color: var(--brand); cursor: pointer; }
.acc-sum { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 12px; margin-top: 14px; }
@media (max-width: 700px) { .tbl.racc td:first-child { white-space: normal !important; min-width: 150px; } .tbl.racc td.c, .tbl.racc th.c { width: 70px; } }
.pbdot.idle { background: #D97706; }
/* ---------- folded menu (computer): icons only, the name shows on hover */
@media (min-width: 861px) {
  .shell { transition: grid-template-columns .2s ease; }
  .shell.mini { grid-template-columns: 72px minmax(0, 1fr); }
  .shell.mini .rail { padding: 14px 8px; overflow-x: hidden; }
  .shell.mini .rail .brand { justify-content: center; padding: 4px 0 14px; } .shell.mini .rail .brand > div { display: none; }
  .shell.mini .rail .grp { font-size: 0; padding: 8px 0 4px; margin: 6px 10px 0; border-top: 1px solid #ffffff1f; }
  .shell.mini .rail .ml, .shell.mini .rail .chev, .shell.mini .rail .subnav, .shell.mini .rail .foot { display: none !important; }
  .shell.mini .rail .mrow > a, .shell.mini .rail a { justify-content: center; padding: 10px 0 !important; }
  .shell.mini .rail a svg { width: 21px; height: 21px; opacity: .9; }
  .shell.mini .rail a.on::before { left: -8px; }
  .shell.mini .rail .badge { position: absolute; top: 3px; right: 8px; margin: 0; font-size: 10px; line-height: 16px; padding: 0 5px; }
}
.rail nav { gap: 2px; }
.rail a svg { stroke-width: 1.9; }
.rail a.on svg { opacity: 1; }
/* live alert pop-ups */
.alertpops { position: fixed; top: 118px; right: 16px; z-index: 95; display: flex; flex-direction: column; gap: 8px; width: min(360px, calc(100vw - 24px)); }
.alertpop { display: flex; gap: 10px; align-items: center; text-align: left; padding: 11px 14px; border-radius: 14px; border: 1px solid #F3C9C9; border-left: 5px solid #DC2626; background: var(--surface); color: var(--ink); box-shadow: 0 10px 30px rgba(15,23,42,.22); cursor: pointer; font: inherit; animation: popin .25s ease; }
.alertpop i { font-style: normal; font-size: 22px; } .alertpop b { display: block; font-size: 14px; } .alertpop small { display: block; color: var(--ink-2); font-size: 12.5px; }
@keyframes popin { from { transform: translateY(-8px); opacity: 0; } to { transform: none; opacity: 1; } }
.permbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 8px 24px; background: var(--brand-bg); color: var(--brand-ink); font-size: 13.5px; border-bottom: 1px solid var(--line); }
.permbar span { flex: 1 1 240px; }
@media (max-width: 900px) { .alertpops { top: 70px; right: 12px; } .permbar { padding: 8px 14px; } }
.form2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; } @media (max-width: 480px) { .form2 { grid-template-columns: 1fr; } }
.claimcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.claimcard { border: 1.5px dashed var(--line-2); border-radius: 12px; padding: 12px 14px; background: var(--surface); break-inside: avoid; }
.claimcard b { display: block; font-size: 15px; } .claimcard code { font-size: 20px; letter-spacing: 3px; font-weight: 800; } .claimcard small { display: block; color: var(--ink-2); }
@media print { .claimcards { grid-template-columns: repeat(3, 1fr); } }
/* scanning */
.scanbtn { flex: none; } .scanbtn svg { width: 17px; height: 17px; }
.scanbox { position: relative; border-radius: 14px; overflow: hidden; background: #0B1020; aspect-ratio: 4 / 3; max-height: 60vh; }
.scanbox video { width: 100%; height: 100%; object-fit: cover; display: block; }
.scanframe { position: absolute; inset: 18% 12%; border: 3px solid rgba(255,255,255,.9); border-radius: 14px; box-shadow: 0 0 0 999px rgba(0,0,0,.28); }
.bad-t { color: #B42318; } .ok-t { color: #1A9F53; }
/* 1.14: ready tracker commands, version and what's new */
.cmdpre{display:grid;grid-template-columns:repeat(auto-fill,minmax(190px,1fr));gap:6px}
.cmdpre .chip{white-space:normal;flex-direction:column;align-items:flex-start;gap:2px;border-radius:10px;padding:7px 10px;text-align:left;cursor:pointer;border:1px solid var(--line)}
.cmdpre .chip small{font-weight:500;color:var(--ink-3);font-size:11.5px;line-height:1.35}
.cmdpre .chip.on{border-color:var(--brand)}
.verbtn{background:none;border:0;padding:0;color:inherit;font:inherit;cursor:pointer;text-decoration:underline dotted;text-underline-offset:3px}
.newdot{display:inline-block;width:7px;height:7px;border-radius:50%;background:#F59E0B;margin-left:5px;vertical-align:middle}
.wn{display:flex;flex-direction:column;gap:16px;max-height:min(70vh,640px);overflow:auto}
.wn h4{margin:0 0 4px;font-size:14.5px;display:flex;gap:8px;align-items:baseline}
.wn h4 small{font-weight:500;color:var(--ink-3)}
.wn ul{margin:0;padding-left:18px;line-height:1.55;font-size:13.5px}
.wn .cur{background:var(--brand-bg);color:var(--brand-ink);border-radius:99px;padding:1px 8px;font-size:11px}
.gate-ver{font-size:11.5px;opacity:.6;margin-top:6px}
.shell.mini .rail .foot .verline{display:none}
/* two-step sign-in choice */
.steppick{display:flex;flex-direction:column;gap:6px}
.steprow{display:flex;gap:10px;align-items:flex-start;padding:9px 12px;border:1px solid var(--line);border-radius:10px;cursor:pointer}
.steprow input{margin-top:3px}
.steprow span{display:flex;flex-direction:column;gap:1px}
.steprow small{color:var(--ink-3);font-size:12px}
.steprow.on{border-color:var(--brand);background:var(--brand-bg)}
.steprow.dis{opacity:.5;cursor:not-allowed}
.steprow.dis{opacity:1}
.steprow.dis b,.steprow.dis > span > small:first-of-type{opacity:.5}
.steprow .why{color:var(--bus-ink,#9A3412);opacity:1;margin-top:4px;font-weight:600}
.steprow .why a{color:var(--brand);text-decoration:underline}
/* phones: 16px text in every box so iPhone Safari does not zoom in on tap and leave the page cut off at the side */
@media (max-width: 860px), (pointer: coarse) {
  html .input, html select.input, html textarea.input, html input[type=text], html input[type=email], html input[type=password], html input[type=tel], html input[type=number], html input[type=search], html input[type=date], html select, html textarea { font-size: 16px; }
}
