/* TAOS — operations panel. Design language: Company Operations Dashboard
   (prototype). Dark near-black theme + light theme, orange accent,
   ledger rows, stat cards. Theme: Taras 2026-10-14 — the app follows
   the device color scheme by default; the user may pin Light or Dark
   (per device, localStorage 'taos-theme'). The dark palette lives in
   :root; html[data-theme="light"] overrides the variables. The index
   bootstrap sets data-theme before first paint. */
:root {
  color-scheme: dark;
  --bg: #0a0c10;
  --topfade: rgba(10, 12, 16, .28);
  --bg2: #0e1117;
  --card: #141821;
  --card2: #1a1f2a;
  --line: #242b38;
  --line-strong: #354052;
  --text: #ffffff;
  --muted: #9aa1ae;
  --faint: #646b78;
  --accent: #e8632b;
  --accent-dim: rgba(232, 99, 43, .14);
  --accent-ink: #f0924f;
  --green: #3ecf6f;
  --green-dim: rgba(62, 207, 111, .13);
  --gold: #f5b544;
  --gold-dim: rgba(245, 181, 68, .13);
  --red: #f05145;
  --red-dim: rgba(240, 81, 69, .13);
  --err: #ff6b6b;
  --steel: #8fa8cf;
  --steel-dim: rgba(143, 168, 207, .13);
  --pill-gray-bg: rgba(154, 161, 174, .12);
  --tile: #20262f;
  --seg-n-bg: #2a3140;
  --track: #262c38;
  --stop-n-bg: #232b3a;
  --photo-bg: #1a1f2b;
  --photo-empty-bg: #141821;
  --photo-empty-line: #3a4358;
  --glow: #141a24;
  --overlay: rgba(4, 6, 10, .7);
  --shadow-card: 0 24px 60px rgba(0, 0, 0, .45);
  --shadow-toast: 0 12px 32px rgba(0, 0, 0, .5);
  --radius: 16px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
}

/* ---------- light theme (html[data-theme="light"]) ----------
   Same surfaces, light palette. Brand tiles that are white-on-dark
   by design (.mark, .sec-bar, .fin-hero, PDF pages) stay as they are;
   status colors darken for contrast on white. */
html[data-theme="light"] {
  color-scheme: light;
  --bg: #f2f4f7;
  --topfade: rgba(242, 244, 247, .28);
  --bg2: #e9edf2;
  --card: #ffffff;
  --card2: #eef1f6;
  --line: #d9dfe8;
  --line-strong: #b9c4d4;
  --text: #141821;
  --muted: #5c6572;
  --faint: #8a93a1;
  --accent-dim: rgba(232, 99, 43, .12);
  --accent-ink: #c2521a;
  --green: #1d9e4b;
  --green-dim: rgba(29, 158, 75, .12);
  --gold: #a87408;
  --gold-dim: rgba(168, 116, 8, .13);
  --red: #d63a30;
  --red-dim: rgba(214, 58, 48, .10);
  --err: #d63a30;
  --steel: #4a6ea9;
  --steel-dim: rgba(74, 110, 169, .12);
  --pill-gray-bg: rgba(92, 101, 114, .12);
  --tile: #e8ecf3;
  --seg-n-bg: #dde3ec;
  --track: #dde3ec;
  --stop-n-bg: #dde3ec;
  --photo-bg: #e8ecf3;
  --photo-empty-bg: #f7f9fb;
  --photo-empty-line: #b9c2d0;
  --glow: #ffe9db;
  --overlay: rgba(20, 24, 33, .45);
  --shadow-card: 0 24px 60px rgba(20, 24, 33, .14);
  --shadow-toast: 0 12px 32px rgba(20, 24, 33, .18);
}
html[data-theme="light"] .sec-bar { border: 1px solid var(--line); }
/* Theme-change repaint kick (2026-11-02): MB.theme.apply() in app.js
   adds html.tz-kick on an actual theme change so WebKit re-promotes
   and repaints the .main scroller layer instead of keeping the
   previous theme's paint (see kickRepaint in app.js). html.tz-armed
   (v2, shell taos-v20261102e) keeps the .main layer promoted for the
   rest of the page life after the first actual theme change. */
html.tz-kick .main, html.tz-armed .main { transform: translateZ(0); }
* { box-sizing: border-box; margin: 0; padding: 0; }
/* iOS WKWebView scroll-ghosting guard (2026-10-16): the page must never
   be wider than the viewport — a wider layout makes WebKit's tiled
   compositor repaint scroll bands at mismatched offsets (doubled,
   smeared cards that settle when scrolling stops). overflow-x: clip
   (not hidden) so position: sticky keeps working. */
html, body { height: 100%; overflow-x: clip; overscroll-behavior: none; }
html { background: var(--bg); }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}
#app { min-height: 100%; }
a { color: var(--accent); }

/* ---------- login ---------- */
.login-wrap {
  min-height: 100dvh;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  background: radial-gradient(1200px 600px at 50% -10%, var(--glow) 0%, var(--bg) 60%);
}
.login-card {
  width: 100%; max-width: 380px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 32px 28px;
  box-shadow: var(--shadow-card);
  text-align: center;
}
.login-card .mark {
  width: 64px; height: 48px; border-radius: 12px; margin: 0 auto 18px;
  background: #141821; color: #141821;
  font-weight: 900; font-style: italic; font-size: 20px; letter-spacing: -.02em;
  display: flex; align-items: center; justify-content: center;
}
.login-card h1 { font-size: 22px; letter-spacing: -.02em; }
/* Trademark sign on the TAOS wordmark (USPTO application filed 2026-10-26, serial 50182848). */
.login-card h1::after { content: "\2122"; font-size: .42em; font-weight: 600; letter-spacing: 0; vertical-align: super; color: var(--muted, #8fa3ba); margin-left: 1px; }
.login-card .sub { color: var(--muted); font-size: 13px; margin: 6px 0 22px; }
/* Tenant branding at the entrance (Taras 2026-10-29, login.js swaps
   these in when the tenant host resolves): the company name heads the
   card WITHOUT the TAOS wordmark's ™ superscript (that ::after
   belongs to the platform name only), the company's own logo sits on
   a white chip in the mark slot (same treatment as the app header —
   a dark slot must never letterbox a logo), a logo-less tenant keeps
   the TAOS glyph small, and TAOS signs the card's foot modestly. */
.login-card h1.co-name::after { content: none; }
.login-card .mark.co-logo {
  width: auto; max-width: 252px; height: 72px; padding: 10px 18px;
  background: #fff; border-radius: 14px;
}
.login-card .mark.co-logo img {
  display: block; height: 100%; width: auto; max-width: 100%;
  object-fit: contain; margin: 0 auto;
}
.login-card .mark.co-sm { width: 44px; height: 34px; border-radius: 9px; margin-bottom: 12px; }
.login-taos-sign {
  margin-top: 16px; font-size: 11px; font-weight: 800; font-style: italic;
  letter-spacing: .18em; color: var(--muted);
}
.login-card form { text-align: left; }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.field input {
  width: 100%; padding: 12px 14px;
  background: var(--bg2); border: 1px solid var(--line); border-radius: 12px;
  color: var(--text); font-size: 15px; font-family: var(--font);
}
.field input:focus { outline: none; border-color: var(--accent); }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 12px 20px; border: none; border-radius: 12px;
  background: var(--accent); color: #fff;
  font-size: 15px; font-weight: 700; font-family: var(--font);
  cursor: pointer; width: 100%;
}
.btn:disabled { opacity: .5; cursor: default; }
.btn.ghost {
  background: transparent; color: var(--text);
  border: 1px solid var(--line); width: auto; font-weight: 600;
}
.btn.ghost:hover { border-color: var(--accent); color: var(--accent); }
.login-err {
  display: none; margin-top: 14px; padding: 10px 12px;
  background: var(--red-dim); border: 1px solid rgba(240,81,69,.35);
  border-radius: 12px; color: var(--red); font-size: 13px;
}

/* ---------- shell ---------- */
/* Locked app shell (2026-10-20, tablet drift fix): the shell is pinned
   to the viewport and .main scrolls INSIDE it at every width — the same
   discipline the phone got on 2026-10-19. Before this, >=861px kept the
   shell in plain document flow, so on iPad the DOCUMENT was the scroller:
   the whole frame (shell top slid -139px in touch probes) rubber-banded
   as one piece and iPad Safari's toolbar animation kept resizing the
   100dvh boxes mid-gesture — the "UI їздить" Taras reported. The <=860px
   block below restates these exact position/inset/height values for the
   phone (plus flex-direction: column), so phone layout is untouched. */
.shell { display: flex; position: fixed; inset: 0; height: 100dvh; min-height: 0; }
.side {
  width: 232px; flex-shrink: 0;
  background: var(--bg2); border-right: 1px solid var(--line);
  padding: 20px 14px 14px; display: flex; flex-direction: column; gap: 4px;
  min-height: 0; overflow-y: auto; overscroll-behavior: contain;
}
.brand { padding: 4px 10px 18px; display: flex; align-items: center; gap: 10px; }
.brand .mark {
  width: 44px; height: 34px; border-radius: 8px; flex-shrink: 0;
  background: #141821; color: #141821;
  font-weight: 900; font-style: italic; font-size: 14px;
  display: flex; align-items: center; justify-content: center;
}
.brand .t1 { font-weight: 800; font-size: 15px; letter-spacing: -.01em; }
/* TAOS mark fit (2026-10-15): the mark is a square dark-tile SVG; its
   containers (.brand .mark, .login-card .mark, .app-head .logo) keep the
   mark's own navy as the tile background so the letterboxed square blends
   seamlessly in both themes — the old light tile (sized for a wide logo
   image) showed as white side brackets around the mark in dark mode. */
.taos-mark { display: block; width: 100%; height: 100%; }
.taos-mark svg { display: block; width: 100%; height: 100%; }
.brand .t2 { color: var(--muted); font-size: 12px; }
/* Trial plan badge (migration 021): shown in the header next to the
   company name only while the tenant's platform plan is 'trial'. */
.plan-badge {
  display: inline-block; vertical-align: 1px; margin-left: 2px;
  padding: 1px 6px; border-radius: 999px;
  background: var(--gold); color: #1a1207;
  font-size: 10px; font-weight: 800; letter-spacing: .06em;
}
/* Demo showcase banner (Taras 2026-10-22): rendered by the shell ONLY
   for the demo tenant (company 99). Sticky at the top of the .main
   scroller so it stays visible on every screen and while scrolling;
   gold like the trial badge so it reads in both light and dark
   themes. z 40: under modals (50) and the statement overlay (300). */
.demo-banner {
  position: sticky; top: 0; z-index: 40;
  margin: 0 0 14px; padding: 9px 14px;
  border-radius: 10px; text-align: center;
  background: var(--gold); color: #1a1207;
  font-size: 13px; font-weight: 800; letter-spacing: .04em;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .18);
}
/* Fictional-names disclaimer (Taras 2026-10-23): a quiet second line
   inside the demo banner, so it rides with the banner on every demo
   screen. Demo tenant only — the span renders only inside .demo-banner. */
.demo-banner .demo-disclaimer {
  display: block; margin-top: 2px;
  font-size: 11px; font-weight: 600; letter-spacing: 0; opacity: .78;
}
/* Mega demo (Taras 2026-10-22): role picker grid (demo sign-in),
   walkthrough start card (Overview), reset bar (shell). All of it
   renders for the demo tenant / demo host only. */
.demo-rolegrid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.demo-rolegrid button {
  padding: 10px 8px; border-radius: 12px; cursor: pointer;
  border: 1px solid var(--line); background: var(--card);
  color: var(--text); font-size: 14px; font-weight: 700; font-family: inherit;
  /* Desktop-entry fix 2026-10-28: no double-tap zoom delay and no
     text-selection interference on rapid taps (Safari/WKWebView). */
  touch-action: manipulation; -webkit-user-select: none; user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.demo-rolegrid button span {
  display: block; font-size: 11px; font-weight: 500;
  color: var(--muted); margin-top: 2px;
}
.demo-rolegrid button:hover { border-color: var(--accent); color: var(--accent); }
.demo-rolegrid button.on {
  border-color: var(--accent); color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent);
}
.demo-rolegrid button:disabled { opacity: .55; cursor: wait; }
/* Team-entry fix (2026-10-25): Start in a not-ready state must READ
   as not-ready — the plain disabled .btn stayed orange at 50% opacity
   and looked tappable-live while a hint line said a role was missing.
   Grey like the demo sign-in button; the button itself stays tappable
   so its tap can point at what is missing (login.js). */
#demo-start.demo-start-notready {
  background: #8f959c; color: #f2f3f5; opacity: .9; cursor: pointer;
}
/* Desktop-entry fix 2026-10-28: the login card is vertically
   CENTERED, so any late-arriving content grows the card and moves
   every control under the visitor's cursor (a press that starts
   on one element and releases on another fires no click at all —
   the tap "does nothing" and the selected button visibly jumps).
   Reserve the space for the two async insertions on the demo
   lobby: the social-buttons box (filled by a fetch after first
   paint; measured 134px populated) and the Terms hint (its text
   swaps from one line to three when the Terms load completes).
   Scoped to the lobby via the #demo-start presence so real-tenant
   sign-in layout is untouched. */
.login-card:has(#demo-start) #social-box { min-height: 134px; }
#demo-terms-hint { min-height: 2.9em; }
/* Role-cards highlight when Start is tapped with no role picked. */
.demo-rolegrid.demo-rolegrid-attn {
  border-radius: 12px;
  animation: demo-role-attn .9s ease-in-out 3;
}
/* Team mode "This is me" (2026-10-25): the mark on the visitor's own
   name row in the 7-name team list — replaces the top role-card step
   while the team panel is open. */
.demo-me-btn {
  margin-top: 6px; padding: 6px 14px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--card);
  color: var(--muted); font-size: 12.5px; font-weight: 700;
  font-family: inherit; cursor: pointer;
  touch-action: manipulation; -webkit-user-select: none; user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.demo-me-btn.on {
  background: var(--accent); border-color: var(--accent); color: #fff;
}
/* Team mode open state (regression fix 2026-11-03): the "Test as a
   team" toggle carries its open state PERSISTENTLY while the team
   panel is open — the same accent treatment as a selected role
   card — so the button can never sit in its closed look while the
   panel is shown underneath it (the inconsistent state in Taras's
   2026-11-03 screen recording). login.js toggles .on together with
   the panel display and aria-expanded, from one boolean. */
#demo-team-btn.on {
  border-color: var(--accent); color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent);
}
.demo-me-btn:disabled { opacity: .55; cursor: wait; }
#demo-team-panel .field.me-on input {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent);
}
#demo-team-panel.demo-team-attn {
  border-radius: 12px;
  animation: demo-role-attn .9s ease-in-out 3;
}
@keyframes demo-role-attn {
  0%, 100% { box-shadow: 0 0 0 0 rgba(232, 99, 43, 0); }
  50% { box-shadow: 0 0 0 3px var(--accent); }
}
/* Fleet-size tiers (Taras 2026-10-22): size buttons on the picker,
   size select in the reset bar. Demo host / demo tenant only. */
.demo-sizegrid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.demo-sizegrid button {
  padding: 8px 2px; border-radius: 10px; cursor: pointer;
  border: 1px solid var(--line); background: var(--card);
  color: var(--text); font-size: 12.5px; font-weight: 700; font-family: inherit;
  touch-action: manipulation; -webkit-user-select: none; user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.demo-sizegrid button span {
  display: block; font-size: 10px; font-weight: 500;
  color: var(--muted); margin-top: 1px;
}
.demo-sizegrid button:hover { border-color: var(--accent); color: var(--accent); }
.demo-sizegrid button.on {
  border-color: var(--accent); color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent);
}
.demo-sizegrid button:disabled { opacity: .55; cursor: wait; }
.demo-resetbar .demo-sizewrap {
  display: flex; align-items: center; gap: 6px; flex-shrink: 0;
}
.demo-resetbar select {
  border: 1px solid var(--line); background: var(--card); color: var(--text);
  border-radius: 8px; padding: 5px 6px; font-weight: 600;
  font-size: 13px; font-family: inherit; cursor: pointer;
}
.demo-resetbar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 10px; margin: 0 0 14px; padding: 8px 12px;
  border-radius: 10px; border: 1px dashed var(--line);
  color: var(--muted); font-size: 13px;
}
.demo-resetbar button {
  border: 1px solid var(--line); background: var(--card); color: var(--text);
  border-radius: 8px; padding: 6px 12px; font-weight: 700;
  cursor: pointer; font-size: 13px; font-family: inherit; flex-shrink: 0;
}
.demo-resetbar button:hover { border-color: var(--accent); color: var(--accent); }
.demo-card {
  border: 1.5px solid var(--accent); border-radius: 14px;
  padding: 14px 16px; margin: 0 0 16px; background: var(--card);
}
.demo-card h3 { margin: 0 0 4px; font-size: 16px; }
.demo-card .sub { color: var(--muted); font-size: 13px; margin-top: 2px; }
.demo-card .row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 12px;
  color: var(--muted); text-decoration: none; font-size: 14px; font-weight: 500;
}
.nav a:hover { background: var(--card); color: var(--text); }
.nav a.on { background: var(--accent-dim); color: var(--accent); }
.nav .ico { width: 20px; text-align: center; }
.side .who { margin-top: auto; padding: 12px 10px 4px; border-top: 1px solid var(--line); }
.side .who .n { font-size: 13px; font-weight: 600; }
.side .who .r { font-size: 11px; color: var(--muted); text-transform: capitalize; }
.side .who button {
  margin-top: 8px; background: none; border: none; color: var(--faint);
  font-size: 12px; cursor: pointer; padding: 0; font-family: var(--font);
}
.side .who button:hover { color: var(--red); }
/* min-width: 0 (2026-10-16): as a flex item .main otherwise refuses to
   shrink below its widest child's min-content (e.g. a 620px table),
   which stretched the whole page past phone width and caused the
   WKWebView scroll ghosting. Wide children now stay inside their own
   scrollers (.tbl-wrap). */
.main { flex: 1 1 auto; min-width: 0; min-height: 0; overflow-y: auto; overflow-x: clip; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; padding: 28px 32px; max-width: 1180px; }

/* mobile app header — mirrors the prototype's logo + "Company Operations" + date card */
.app-head { display: none; }
.page-h { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.page-h h2 { font-size: 30px; font-weight: 800; letter-spacing: -.02em; }
.page-h .sub { color: var(--muted); font-size: 14px; margin-top: 2px; }
.page-h .meta { color: var(--muted); font-size: 13px; }
.page-h .btn { flex-shrink: 0; }

/* ---------- cards ---------- */
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 760px) { .grid2 { grid-template-columns: 1fr; } }
.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 20px;
}
.card h3 { font-size: 17px; letter-spacing: -.01em; font-weight: 700; }
.card .lbl {
  display: inline-block; margin-top: 4px;
  font-size: 12px; color: var(--muted);
}
.card .body { margin-top: 12px; font-size: 14px; }
.empty { color: var(--faint); font-size: 14px; padding: 18px 0 6px; }

/* prototype-style empty state: white icon tile + title + muted subtitle */
.empty-block {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 44px 24px; text-align: center;
}
.empty-block .eico {
  width: 64px; height: 64px; border-radius: 16px; margin: 0 auto 18px;
  background: #f2f3f5; color: #141821;
  display: flex; align-items: center; justify-content: center; font-size: 28px;
}
.empty-block h4 { font-size: 21px; font-weight: 700; margin-bottom: 8px; letter-spacing: -.01em; }
.empty-block p { color: var(--muted); font-size: 14px; max-width: 340px; margin: 0 auto; }

/* prototype-style info note row */
.note-row {
  display: flex; gap: 12px; align-items: center;
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 14px 16px;
  color: var(--muted); font-size: 14px; margin-bottom: 12px;
}
.note-row .nico { color: var(--accent); font-size: 18px; flex-shrink: 0; }

.sched { font-weight: 600; color: var(--green); font-size: 13px; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { text-align: right; font-variant-numeric: tabular-nums; }
.micro {
  font-size: 11px; text-transform: uppercase; letter-spacing: .06em;
  color: var(--faint); font-weight: 600;
}

/* ---------- stat cards (prototype: big number, orange/gold top edge) ---------- */
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.stat {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px;
  position: relative; overflow: hidden;
}
.stat::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--accent); }
.stat.gold::before { background: var(--gold); }
.stat .sl { color: var(--muted); font-size: 14px; }
.stat .sv {
  font-size: 34px; font-weight: 800; letter-spacing: -.02em;
  margin: 8px 0; font-variant-numeric: tabular-nums;
}
.stat .sv.neg { color: var(--red); }
.stat .ss { color: var(--muted); font-size: 13px; }
.stat.tap { cursor: pointer; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.stat.tap:active { background: var(--card2); }

/* ---------- ledger rows (prototype list style) ---------- */
.ledger { display: flex; flex-direction: column; gap: 10px; }
.ledger-row {
  display: flex; align-items: center; gap: 14px;
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 16px;
  cursor: pointer;
}
.ledger-row:hover { border-color: var(--line-strong); }
.ledger-ico {
  width: 48px; height: 48px; flex: 0 0 48px; border-radius: 12px;
  background: var(--tile); color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; font-weight: 800;
}
.ledger-ico.light { background: #f2f3f5; color: #141821; }
.ledger-main { flex: 1; min-width: 0; }
.ledger-t { font-weight: 700; font-size: 16px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; overflow-wrap: anywhere; }
.ledger-s { color: var(--muted); font-size: 13px; margin-top: 3px; overflow-wrap: anywhere; }
.ledger-s2 { color: var(--faint); font-size: 13px; margin-top: 2px; overflow-wrap: anywhere; }
.ledger-r {
  text-align: right; font-weight: 800; font-size: 17px;
  font-variant-numeric: tabular-nums; white-space: nowrap; flex-shrink: 0;
}
.ledger-r.neg { color: var(--red); }
.ledger-r .sub { display: block; font-size: 12px; color: var(--muted); font-weight: 400; margin-top: 2px; }

/* ---------- driver card (prototype fleet style) ---------- */
.drv-top { display: flex; gap: 14px; align-items: center; }
.drv-top .ledger-ico { width: 56px; height: 56px; flex-basis: 56px; font-size: 22px; }
.drv-name { font-size: 19px; font-weight: 700; }
.drv-eid { color: var(--accent); font-weight: 700; font-size: 14px; margin-top: 2px; }
.drv-sub { color: var(--muted); font-size: 13px; margin-top: 2px; }
.mini-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.mini-grid .ml { color: var(--muted); font-size: 12px; }
.mini-grid .mv { font-weight: 700; font-size: 16px; margin-top: 4px; font-variant-numeric: tabular-nums; }
.contact-green { color: var(--green); }
.link-orange { color: var(--accent); }

/* in-transit switcher */
.transit-bar { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.transit-bar .arrow {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--card); border: 1px solid var(--line); color: var(--text);
  font-size: 18px; cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.transit-bar .arrow:hover { border-color: var(--accent); color: var(--accent); }
.transit-bar .count { color: var(--muted); font-size: 13px; }

/* ---------- tables (kept for genuinely tabular data) ---------- */
.tbl-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th {
  text-align: left; padding: 12px 14px; font-size: 11px; text-transform: uppercase;
  letter-spacing: .06em; color: var(--faint); border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.tbl td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: none; }
.tbl tbody tr { cursor: pointer; }
.fin-bt tbody tr { cursor: default; }
.fin-bt td.neg { color: var(--red); }
/* By-truck table fits the phone screen (Taras 2026-10-16: "цифр в
   Finance не видно добре" — the 7-column table sat in a sideways
   scroller and the money columns ran off the right edge). It now
   renders 4 fluid columns; type + miles ride as a sub-line under the
   unit, net-per-mile as a sub-line under the net. */
.fin-bt .sub { display: block; font-size: 11px; font-weight: 400; color: var(--muted); }
.fin-bt td.num, .fin-bt th.num { text-align: right; white-space: nowrap; }
.tbl tbody tr:hover { background: var(--card2); }
.num { font-variant-numeric: tabular-nums; text-align: right; }
.pill {
  display: inline-block; padding: 4px 10px; border-radius: 999px;
  font-size: 11px; font-weight: 700; white-space: nowrap;
  text-transform: uppercase; letter-spacing: .05em;
}
.pill.green { background: var(--green-dim); color: var(--green); }
.pill.amber { background: var(--gold-dim); color: var(--gold); }
.pill.blue { background: var(--steel-dim); color: var(--steel); }
.pill.gray { background: var(--pill-gray-bg); color: var(--muted); }
.pill.red { background: var(--red-dim); color: var(--red); }

/* ---------- detail ---------- */
.detail-head { display: flex; align-items: center; gap: 14px; margin-bottom: 6px; flex-wrap: wrap; }
.back-link { display: inline-block; color: var(--accent); font-size: 15px; font-weight: 600; margin-bottom: 10px; text-decoration: none; }
.detail-head h2 { font-size: 30px; letter-spacing: -.02em; font-weight: 800; }
.route { font-size: 16px; color: var(--muted); margin-bottom: 16px; }
.route b { color: var(--text); }
.actions { display: flex; gap: 10px; margin: 18px 0; flex-wrap: wrap; }
.actions .btn { width: auto; }
.section-t { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--faint); margin: 22px 0 10px; font-weight: 600; }
.err { color: var(--err); font-size: 13px; margin: 4px 0 12px; }
.strike { text-decoration: line-through; text-decoration-thickness: 2px; color: var(--muted); text-decoration-color: var(--muted); }
.acct-btn {
  margin-left: auto; width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--line); background: transparent; color: var(--accent);
  font-size: 20px; cursor: pointer; flex-shrink: 0; position: relative;
}
/* Theme quick toggle (Taras 2026-10-14): sun/moon button in the app
   header — pins an explicit Light/Dark choice on this device
   (MB.theme in app.js). The desktop copy lives in the sidebar .who
   block as a plain .theme-toggle button. */
.theme-btn {
  width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--line); background: transparent; color: var(--gold);
  font-size: 19px; cursor: pointer; flex-shrink: 0;
}
.side .who button.theme-toggle { font-size: 16px; color: var(--gold); }
.side .who button.theme-toggle:hover { color: var(--accent); }
/* Taras 2026-10-08: unread-count badge on the account button (dispatcher/owner). */
.acct-badge {
  position: absolute; top: -6px; right: -6px; min-width: 20px; height: 20px;
  padding: 0 6px; border-radius: 10px; background: var(--accent); color: #fff;
  font-size: 12px; font-weight: 800; display: flex; align-items: center;
  justify-content: center;
}
.acct-badge[hidden] { display: none; }
/* Safety Review attention badge (Taras 2026-10-25, migration 092):
   ⚠️ (+ count) rides the Safety nav entries while an escalated
   load waits unreviewed; the [hidden] form removes it entirely. */
.sf-review-badge { margin-left: 6px; font-size: 13px; }
.sf-review-badge[hidden] { display: none; }
.tabbar .sf-review-badge { margin-left: 2px; }
/* Taras 2026-10-08: account-area Notifications entry in the desktop sidebar. */
.who-notif {
  background: none; border: 1px solid var(--line); color: inherit;
  border-radius: 8px; padding: 6px 10px; margin-top: 8px; cursor: pointer;
  font-size: 13px; width: 100%; text-align: left;
}
.who-notif b { color: var(--accent); }
.who-notif b[hidden] { display: none; }
/* Taras 2026-10-08: unread notification rows in the account area. */
.ledger-row.unread { border-color: var(--accent); }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex-shrink: 0; }
/* Offline outbox (Taras 2026-10-07): pending-sync indicator in the app header. */
.sync-pill {
  padding: 8px 12px; border-radius: 999px; margin-left: 8px;
  border: 1px solid var(--line); background: transparent; color: inherit;
  font-size: 14px; cursor: pointer; flex-shrink: 0;
}
.sync-pill[hidden] { display: none; }
@media (min-width: 861px) { .acct-btn { display: none; } }
.big-amount { font-size: 34px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }

/* ---------- modal ---------- */
.modal-bg {
  position: fixed; inset: 0; background: var(--overlay);
  display: flex; align-items: center; justify-content: center; padding: 20px; z-index: 50;
}
.modal {
  width: 100%; max-width: 480px; background: var(--card);
  border: 1px solid var(--line); border-radius: 20px; padding: 24px;
  max-height: 90dvh; overflow-y: auto;
}
.modal h3 { font-size: 19px; margin-bottom: 16px; font-weight: 800; letter-spacing: -.01em; }
/* ---------- demo chat window (2026-10-28 fixes) ----------
   FIXED FORMAT (Taras: «має бути зафіксований чат», «один формат
   на любу довжину тексту»): the card never scrolls and never
   grows with the conversation; only the message list scrolls,
   inside itself.
   FULL SCREEN + KEYBOARD (Taras, 2026-10-28 23:50: «зроби щоб
   супорт виїжав на весь екран», «клавіатура була постійно
   зафіксована»): the chat is a full-screen view, like a native
   app screen — the card fills its backdrop edge to edge, and
   JS sizes the backdrop from window.visualViewport (see
   MB.openDemoChat), because iOS Safari's dvh does NOT shrink
   when the keyboard opens: a dvh-sized sheet kept its layout
   height and the keyboard covered the composer and the last
   message. Content is capped to a centered column on wide
   screens so the full screen still reads as a chat, not a
   stretched form. While the keyboard is open (JS adds .dc-kb
   to the backdrop) the home-indicator bottom inset is dropped
   so the composer docks straight onto the keyboard.
   MINIMIZE (Taras, same evening): .dc-min makes the backdrop
   transparent and click-through and swaps the sheet for a
   small fixed pill; the body scroll lock is released by JS
   while minimized (MB.unlockScroll), so the app behind stays
   fully usable. */
.modal-bg:has(> .modal.dc-chat) { align-items: stretch; padding: 0; }
.modal.dc-chat {
  display: flex; flex-direction: column; align-items: center;
  width: 100%; max-width: none; height: 100%; max-height: none;
  border: none; border-radius: 0; overflow: hidden;
  padding: calc(16px + env(safe-area-inset-top, 0px)) 20px
           calc(12px + env(safe-area-inset-bottom, 0px));
}
.modal.dc-chat > * { width: 100%; max-width: 760px; }
.modal.dc-chat.dc-enter { animation: dc-slide-in .24s ease-out; }
@keyframes dc-slide-in {
  from { transform: translateY(28px); opacity: 0; }
  to { transform: none; opacity: 1; }
}
.modal-bg.dc-kb .modal.dc-chat { padding-bottom: 10px; }
.modal.dc-chat .dc-head { display: flex; align-items: flex-start; gap: 8px; }
.modal.dc-chat .dc-head h3 { flex: 1; margin-bottom: 6px; }
.modal.dc-chat .dc-minbtn {
  flex: none; width: 34px; height: 34px; margin-top: -2px;
  border-radius: 50%; border: 1px solid var(--line);
  background: var(--bg2); color: var(--text);
  font-size: 18px; line-height: 1; cursor: pointer;
}
.modal.dc-chat .dc-list {
  flex: 1 1 auto; min-height: 0; margin-top: 12px;
  overflow-y: auto; overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  display: flex; flex-direction: column; gap: 8px; padding: 2px;
}
.modal-bg.dc-min { background: transparent; pointer-events: none; }
.modal-bg.dc-min .modal.dc-chat { display: none; }
.dc-pill {
  display: none; position: fixed; right: 16px;
  bottom: calc(100px + env(safe-area-inset-bottom, 0px));
  z-index: 51; align-items: center; gap: 7px;
  padding: 11px 16px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--card);
  color: var(--text); font-size: 15px; font-weight: 700;
  font-family: var(--font); cursor: pointer;
  box-shadow: 0 6px 24px rgba(0, 0, 0, .28);
}
.modal-bg.dc-min .dc-pill { display: inline-flex; pointer-events: auto; }
.dc-pill .dc-badge {
  min-width: 20px; height: 20px; padding: 0 5px;
  border-radius: 999px; background: #e5484d; color: #fff;
  font-size: 12px; font-weight: 800; line-height: 20px;
  text-align: center;
}
.dc-pill .dc-badge[hidden] { display: none; }
.modal.wide { max-width: 900px; }
.pdf-pages { max-height: 70dvh; overflow-y: auto; -webkit-overflow-scrolling: touch; background: #fff; border-radius: 8px; padding: 8px; }
.pdf-pages canvas { display: block; width: 100%; height: auto; margin: 0 auto 10px; }
.pdf-pages #pdf-zoom { width: 100%; margin: 0 auto; touch-action: pan-x pan-y; }
.pdf-loading { color: #666; text-align: center; padding: 24px; }
.modal .row { display: flex; gap: 10px; margin-top: 18px; }
.modal .row .btn { flex: 1; }
/* Sticky modal footer (2026-10-22): the closing .row of every modal —
   the document Text / PDF / photo viewers and all form modals share
   this one shell (MB.openModal) — stays pinned to the card's bottom
   edge while the card's content scrolls, so Close/Save is always on
   screen instead of below the last line of content. bottom:-24px
   spans the card's own 24px padding so the footer's background
   covers content scrolling underneath it. */
.modal > .row:last-child {
  position: sticky; bottom: -24px; z-index: 2;
  background: var(--card); padding-top: 10px; margin-top: 8px;
}
select.field-in, textarea.field-in {
  width: 100%; padding: 12px 14px; background: var(--bg2);
  border: 1px solid var(--line); border-radius: 12px;
  color: var(--text); font-size: 15px; font-family: var(--font);
}
select.field-in:focus, textarea.field-in:focus { outline: none; border-color: var(--accent); }
/* Native-control finish (2026-10-16): selects get the app's own chevron
   instead of the iOS system pill, and file inputs hide behind a styled
   label facade (loads.js upload modals) instead of the raw
   "Choose File / no file selected" control. */
select.field-in {
  appearance: none; -webkit-appearance: none;
  padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' fill='none' stroke='%239aa1ae' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
}
input.file-pick-src { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.field label.file-pick {
  display: flex; align-items: center; justify-content: center;
  width: 100%; margin-bottom: 0; padding: 12px 14px;
  background: var(--bg2); border: 1px dashed var(--line-strong); border-radius: 12px;
  color: var(--text); font-size: 15px; font-weight: 600; font-family: var(--font);
  cursor: pointer; text-align: center;
}
.field label.file-pick.has { border-style: solid; border-color: var(--accent); }
.field label.file-pick .fp-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: var(--card2); border: 1px solid var(--line); color: var(--text);
  padding: 12px 20px; border-radius: 12px; font-size: 14px; z-index: 99;
  box-shadow: var(--shadow-toast);
  animation: toast-in .25s ease;
}
/* Error variant (handoff failure, 2026-10-27): same toast shell,
   unmistakably a failure — red border and text. */
.toast.err { border-color: var(--err); color: var(--err); font-weight: 600; }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 8px); } }

/* ---------- tablet/desktop shell fill + frosted top (round 2) ----------
   Taras's iPad recording (2026-10-20, installed app, landscape, light
   theme) rejected round 1: the app ended ~5% above the screen bottom
   over a solid black bar, and the top had no frosted strip. Cause: in
   the installed-app WebView 100dvh resolves SHORTER than the real
   screen, and round 1's explicit height: 100dvh on the base .shell
   capped the fixed shell at that short measure — position alone would
   have stretched it. Fix at >=861px ONLY: fill by POSITION (base rule
   already sets inset: 0; height: auto lets top+bottom stretch the
   shell to the screen edges) and paint the shell itself var(--bg) —
   html/body already paint var(--bg) — so no gap can ever show black.
   The <=860px block below still declares height: 100dvh for the phone,
   so the phone's computed shell is byte-for-byte what it was. */
@media (min-width: 861px) {
  .shell { height: auto; background: var(--bg); }
  /* Sidebar safe-area clearance (2026-10-20 late, Taras iPad): the
     sidebar is fixed content, not a scrolling area, so its first and
     last blocks must never sit under the status-bar / home-indicator
     zones. The phone block below adds the insets to .main's padding
     the same way; the sidebar never got them, so with the full-bleed
     webview the brand name's first line slid under the frosted strip
     and looked sliced (назва втекла вгору). Insets are 0 on desktop,
     so nothing changes there. Bottom constant lowered 20px -> 14px
     later the same night (Taras: the account block should sit
     lower, closer to the bottom edge); the env() inset still
     adds on top where a home indicator overlays. */
  .side { padding-top: calc(20px + env(safe-area-inset-top, 0px)); padding-bottom: calc(14px + env(safe-area-inset-bottom, 0px)); }
  /* Frosted top strip — the phone's Instagram-style strip (the <=860px
     .shell::before below) mirrored for the sidebar layout: translucent
     theme background + backdrop blur over the status-bar zone, flush
     against the top, above content, below modals (z 50+), toasts (99)
     and statements (300). Height is the safe-area inset, so it is 0
     where no status bar overlays the page. */
  .shell::before {
    content: ""; position: absolute; top: 0; left: 0; right: 0;
    height: env(safe-area-inset-top, 0px);
    background: var(--topfade);
    -webkit-backdrop-filter: blur(16px) saturate(160%);
    backdrop-filter: blur(16px) saturate(160%);
    z-index: 30; pointer-events: none;
  }
}

@media (max-width: 860px) {
  .side { display: none; }
  /* Still bottom bar (Taras 2026-10-19): in iOS Safari a fixed bottom
     bar rides up/down with the browser toolbar while the page scrolls,
     because the toolbar collapse is driven by the DOCUMENT scroll.
     Lock the shell to the viewport and scroll .main INSIDE it: the
     document never scrolls, the toolbar never animates, and the tab
     bar — the shell's last row, in normal flow — stays put. Desktop
     (>=861px) keeps plain document scroll and has no tab bar. */
  .shell { position: fixed; inset: 0; height: 100dvh; min-height: 0; flex-direction: column; }
  .main { flex: 1 1 auto; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
  /* Top spacing (tightened 2026-10-17, Taras: the header sat too low
     with a big empty band above it): the safe-area inset already
     clears the status bar / Dynamic Island in full — the added
     constant is only breathing room, so 8px, not 20px. */
  .main { padding: calc(8px + env(safe-area-inset-top, 0px)) 16px 20px; }
  /* Frosted top strip (Taras 2026-10-20, Instagram-style): when the
     content scrolls under the clock / Dynamic Island zone it goes
     blurred, not colliding with the status bar. The strip is exactly
     the safe-area inset tall, translucent page background + backdrop
     blur, flush against the top. Height 0 where there is no status
     bar overlay. Below modals (z 50+), toasts (99), statements (300). */
  .shell::before {
    content: ""; position: absolute; top: 0; left: 0; right: 0;
    height: env(safe-area-inset-top, 0px);
    background: var(--topfade);
    -webkit-backdrop-filter: blur(16px) saturate(160%);
    backdrop-filter: blur(16px) saturate(160%);
    z-index: 30; pointer-events: none;
  }
  .app-head {
    display: flex; align-items: center; gap: 12px;
    background: var(--card); border: 1px solid var(--line);
    border-radius: var(--radius); padding: 12px 14px; margin-bottom: 18px;
    /* NOT sticky (2026-10-16, scroll-ghost fix #2): a position:sticky
       header in WKWebView is repositioned + repainted on the scroll
       path against freshly painted content tiles — the header smeared
       and double-printed mid-scroll on every view, its blob logo img
       blinked, and content slid under the floating card. In-flow now:
       the header scrolls away with the page and nothing is repainted
       or repositioned while scrolling. */
  }
  .app-head .logo {
    width: 76px; height: 58px; border-radius: 10px; flex-shrink: 0;
    background: #141821; color: #141821;
    font-weight: 900; font-style: italic; font-size: 15px; letter-spacing: -.02em;
    display: flex; align-items: center; justify-content: center;
  }
  .app-head .t1 { font-weight: 800; font-size: 17px; letter-spacing: -.01em; }
  .app-head .t2 { color: var(--muted); font-size: 13px; }
  .tabbar {
    /* FLOATING PILL NAV (Taras 2026-10-20, FB/IG style; colors follow
       the app theme per his correction the same evening): the bar
       leaves the shell flow and floats over the page as a glass pill.
       position:fixed is safe again BECAUSE the document never scrolls
       (2026-10-19 locked shell): the old ride-with-the-toolbar failure
       needed a scrolling document, which no longer exists — the only
       scroller is .main inside the shell and fixed elements anchor
       to the viewport. .main pays the clearance (rules after the tab
       rules below). Colors key off html[data-theme] exactly like the
       rest of the shell: the base rules here are the DARK theme
       (dark glass pill); the light-theme override sits with the tab
       rules below. */
    position: fixed; left: 12px; right: 12px;
    bottom: calc(10px + env(safe-area-inset-bottom, 0px));
    height: 62px; z-index: 40;
    display: flex; align-items: stretch; gap: 2px;
    padding: 6px; border-radius: 999px;
    background: rgba(15, 18, 25, .40);
    border: 1px solid rgba(255, 255, 255, .16);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .10), 0 14px 34px rgba(0, 0, 0, .40), 0 2px 8px rgba(0, 0, 0, .26);
    -webkit-backdrop-filter: blur(26px) saturate(190%);
    backdrop-filter: blur(26px) saturate(190%);
    overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none;
    /* Own compositing layer (scroll-ghost fix, kept from the strip
       era): the compositor moves the finished pill; it never
       repaints while .main scrolls under it. */
    transform: translateZ(0); -webkit-transform: translateZ(0);
    will-change: transform;
    backface-visibility: hidden; -webkit-backface-visibility: hidden;
  }
  .tabbar::-webkit-scrollbar { display: none; }
  .tabbar a {
    /* Icon-only tabs; the ACTIVE tab grows a full capsule carrying
       its label (IG style). Natural content widths + the bar's own
       overflow-x:auto keep wide role sets scrollable sideways
       (2026-10-19 rule: never squeeze the tabs); render() scrolls
       the active capsule into view on navigation. */
    flex: 0 0 auto; min-width: 0; height: 100%;
    display: flex; align-items: center; justify-content: center; gap: 7px;
    padding: 0 12px; border-radius: 999px;
    color: rgba(236, 239, 244, .86);
    text-decoration: none; white-space: nowrap;
    -webkit-tap-highlight-color: transparent;
  }
  .tabbar a .ico { display: flex; flex: none; align-items: center; }
  .tabbar a .ico svg { width: 23px; height: 23px; display: block; }
  .tabbar .tab-label {
    display: none; font-size: 13px; font-weight: 600; letter-spacing: -.01em;
    min-width: 0; overflow: hidden; text-overflow: ellipsis;
  }
  /* Active capsule, dark theme: DARK capsule, light ink
     (Taras 2026-10-21: the capsule follows the theme — white on
     light, dark on dark; no inversion). */
  .tabbar a.on { background: #141821; color: #f2f3f5; box-shadow: 0 4px 12px rgba(0, 0, 0, .35); }
  .tabbar a.on .tab-label { display: block; }
  /* Fit mode (<=7 tabs): icon-only tabs share the leftover width
     equally while the active capsule keeps its natural width — the
     longest label (Settlements) fits at 360px with room to spare. */
  .tabbar.fit { overflow-x: hidden; }
  .tabbar.fit a { flex: 1 1 0; min-width: 0; padding: 0 4px; }
  .tabbar.fit a.on { flex: 0 0 auto; padding: 0 14px; }
  /* Light theme: light glass pill, dark-grey icons, WHITE capsule
     with dark ink (Taras 2026-10-21 — capsule follows the theme). */
  html[data-theme="light"] .tabbar {
    background: rgba(255, 255, 255, .34);
    border-color: rgba(255, 255, 255, .55);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .65), 0 0 0 1px rgba(0, 0, 0, .06), 0 14px 34px rgba(20, 24, 33, .14), 0 2px 8px rgba(20, 24, 33, .07);
  }
  html[data-theme="light"] .tabbar a { color: rgba(20, 20, 25, .78); }
  html[data-theme="light"] .tabbar a.on {
    background: #ffffff; color: #141821;
    box-shadow: 0 4px 12px rgba(20, 24, 33, .16);
  }
  /* Minimize on scroll (Taras 2026-10-21, «як в інстаграмі»): while
     the user scrolls forward through content, js/native-tabbar.js
     puts tabbar-min on <html> and the pill shrinks toward the
     bottom edge; the first scroll back, reaching the top, or a
     navigation removes it and the pill springs back. Transform-only
     — the fixed pill never reflows the page and .main's bottom
     clearance stays put, so nothing jumps. The native Liquid Glass
     bar mirrors the same state off the published model. */
  .tabbar { transform-origin: 50% 100%; transition: transform .3s cubic-bezier(.32, .72, .24, 1); }
  html.tabbar-min .tabbar { transform: translateZ(0) scale(.8) translateY(10px); }
  /* Scrollable natural row for EVERY tab set (Taras 2026-10-19,
     revised — supersedes the equal-share fit tried the same day and
     rejected by him: «нижнє меню має скролитись а не бути
     втиснутою»). Tabs keep the content-sized rule above (flex:1 0
     auto, min-width:68px, nowrap); the bar itself is overflow-x:auto
     (see .tabbar), so a set wider than the screen scrolls sideways
     instead of squeezing, and render() scrolls the active tab into
     view on navigation. The bar's own overflow stays INSIDE the bar:
     the shell row is width-constrained by the fixed shell, so the
     document never grows wider than the viewport. */
  /* Bottom clearance for the floating pill (2026-10-20): the pill
     overlays the page again, so .main buys the room back — pill
     height 62 + its bottom offset (10 + safe-area) + a 16px
     breathing gap = 88px + safe-area, invariant at inset 0 and
     inset 34 alike (the 2026-10-15 trapped-content bug class).
     The toast parks at the same height, just above the pill. */
  .main { padding-bottom: calc(88px + env(safe-area-inset-bottom, 0px)); }
  .toast { bottom: calc(88px + env(safe-area-inset-bottom, 0px)); }
  /* Native Liquid Glass takeover (Taras 2026-10-20, iOS app on
     iOS 26+ only): when the shell's native TabBar plugin confirms
     its glass bar is on screen, js/native-tabbar.js adds
     html.native-tabbar-on and publishes the bar's exact footprint
     (62 + 10 + safe-area) into --ntb-clear. The CSS pill steps
     aside and .main pays exactly that clearance instead of its
     own — no double padding, no trapped content. The class never
     lands in a browser, on Android, on iOS < 26 or in an older
     shell, so every rule below is inert there. */
  html.native-tabbar-on .tabbar { display: none; }
  html.native-tabbar-on .main { padding-bottom: var(--ntb-clear, 88px); }
  html.native-tabbar-on .toast { bottom: calc(var(--ntb-clear, 88px) + 10px); }
  /* Modal bottom reserve (2026-10-22 — Taras, GTF-0008 rate con Text
     viewer): a modal card must never extend into the floating pill's
     footprint. The card ran to 90dvh centered, so its bottom ~5dvh
     strip — exactly where the closing .row sits — landed under the
     pill (62px + 10px offset + safe-area). On the phone the bar is
     composited ABOVE the web content (the native Liquid Glass bar
     lives outside the WebView; the web glass pill blurs over the
     card the same way), so no web z-index can rescue a button that
     sits in that strip: the reserve below is the same 88px +
     safe-area .main already pays. .modal-bg's extra bottom padding
     lifts the whole card, and .modal's max-height shrinks to fit
     what remains, so tall viewers scroll INSIDE the card above the
     pill instead of under it. Covers every MB.openModal viewer
     (Text / PDF / photo / save sheet) and every form modal. */
  .modal-bg { padding-bottom: calc(88px + env(safe-area-inset-bottom, 0px)); }
  .modal { max-height: calc(100dvh - 108px - env(safe-area-inset-bottom, 0px)); }
  /* Demo chat is a full-screen view (see the .dc-chat block
     above): it intentionally covers the floating tab pill —
     no reserve — and its height is the backdrop's height,
     which JS drives from window.visualViewport so the iOS
     keyboard never covers the composer. */
  .modal.dc-chat { height: 100%; }
  /* Native shell (Capacitor, html.taos-native): builds <=7 ended
     the WebView at the safe-area bottom, so web overrides dropped
     the env(safe-area-inset-bottom) term there. Build 8 (TestFlight,
     2026-10-19) sets contentInsetAdjustmentBehavior=never, making
     the shell full-bleed like the browser - the base env() rules are
     correct in the shell too, so the overrides were removed
     2026-10-19 once build 8 was confirmed installed. */

  table.tbl { min-width: 620px; }
  table.tbl.fin-bt { min-width: 0; }
  .fin-bt th, .fin-bt td { padding: 10px 8px; font-size: 13px; }
  .page-h h2 { font-size: 26px; }
}
@media (min-width: 861px) { .tabbar { display: none; } }

/* ---------- artifact style (Taras 2026-10-06: GT Ops mirrors the panel) ---------- */
.arr { color: var(--red); font-weight: 800; }

/* segmented In transit / Pending toggle */
.seg {
  display: flex; background: var(--bg2); border: 1px solid var(--line);
  border-radius: 14px; padding: 4px; gap: 4px;
}
.seg-btn {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px; border: none; border-radius: 10px; background: transparent;
  color: var(--muted); font-size: 15px; font-weight: 700; font-family: var(--font);
  cursor: pointer;
}
.seg-btn.on { background: var(--card2); color: var(--text); }
.seg-n {
  min-width: 24px; height: 24px; padding: 0 7px; border-radius: 999px;
  background: var(--seg-n-bg); color: var(--muted);
  font-size: 13px; font-weight: 800;
  display: inline-flex; align-items: center; justify-content: center;
}
.seg-n.hot { background: var(--accent); color: #fff; }

/* white collapsible section bar (Completed / Cancelled Loads) */
.sec-bar {
  display: flex; align-items: center; gap: 10px;
  background: #f2f3f5; color: #141821;
  border-radius: var(--radius); padding: 15px 18px;
  cursor: pointer; user-select: none; -webkit-tap-highlight-color: transparent;
}
.sec-t { font-size: 17px; font-weight: 800; letter-spacing: -.01em; }
.sec-n {
  margin-left: auto; min-width: 28px; height: 28px; padding: 0 8px; border-radius: 999px;
  background: #d7dbe1; color: #141821;
  font-size: 14px; font-weight: 800;
  display: inline-flex; align-items: center; justify-content: center;
}
.sec-sign { font-size: 22px; font-weight: 800; color: var(--accent); width: 20px; text-align: center; line-height: 1; }
.sec-sign.open { color: var(--red); }

/* Period group stitched as ONE block (Taras 2026-11-03): the week
   header is the top section of a shared bordered container and its
   load cards follow inside it — no floating gap, nothing looks
   separate. Collapse hides the body; the header stays as the block. */
.per-group {
  margin-top: 14px; background: var(--card);
  border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden;
}
.per-group .per-head { border-radius: 0; }
html[data-theme="light"] .per-group .per-head { border: none; border-bottom: 1px solid var(--line); }
.per-group.closed .per-head { border-bottom: none; }
html[data-theme="light"] .per-group.closed .per-head { border-bottom: none; }
.per-body { padding: 10px; }
.per-body .vgrid { margin-top: 0; }

/* artifact load card */
.load-card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 16px 18px;
  cursor: pointer;
}
.load-card:hover { border-color: var(--line-strong); }
.lc-badge { margin-bottom: 8px; }
.lc-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.lc-id { font-size: 18px; font-weight: 800; color: var(--green); letter-spacing: -.01em; }
.lc-id.cx { color: var(--text); }
.lc-rate { font-size: 17px; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.lc-broker { color: var(--muted); font-size: 14px; margin-top: 6px; }
.lc-route { font-size: 16px; font-weight: 700; margin-top: 6px; }
.lc-dates { color: var(--muted); font-size: 13px; margin-top: 4px; }
.lc-na { color: var(--red); font-size: 13px; font-weight: 700; margin-top: 4px; }

/* today/tomorrow cards — always side by side, date top-right */
/* Taras 2026-10-11: empty schedule card keeps its natural compact height. */
.sched-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; margin-top: 16px; align-items: start; }
.sched-card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 16px;
  min-width: 0; overflow-wrap: break-word;
}
/* Taras 2026-10-08: Today/Tomorrow cards with a load are tappable. */
.sched-card[data-id] { cursor: pointer; }
.sched-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; flex-wrap: nowrap; min-width: 0; }
.sched-t { font-size: 17px; font-weight: 700; letter-spacing: -.01em; white-space: nowrap; }
.sched-d { font-size: 13px; color: var(--muted); white-space: nowrap; flex: none; }
.sched-empty { color: var(--faint); font-size: 14px; margin-top: 10px; }
.sched-body { margin-top: 10px; font-size: 14px; min-width: 0; }
.lc-id-sm { color: var(--green); font-weight: 800; }
.lc-route-sm { color: var(--muted); font-size: 13px; margin-top: 4px; }

/* schedule event box (panel parity, Taras 2026-10-11): mirrors the panel's
   Pickup/Delivery event under the day's load in the Today/Tomorrow cards. */
.sched-ev-lab { color: var(--faint); font-size: 12px; margin: 10px 0 6px; }
.sched-ev { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin-top: 6px; min-width: 0; }
.sched-ev-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sched-ev-time { font-weight: 700; font-size: 15px; min-width: 0; overflow-wrap: break-word; }
.sched-ev-sub { color: var(--muted); font-size: 13px; margin-top: 4px; overflow-wrap: break-word; }
.sched-ev-st { color: var(--muted); font-size: 12px; margin-top: 3px; }

/* Day-card stack (Taras 2026-10-23): a Today/Tomorrow card holding
   several loads collapses into a visual stack — layered card edges
   (box-shadow copies of the card) peek out at the bottom-right, a
   count badge sits in the header; tapping fans the loads out, each
   load tappable; the collapse bar folds it back. */
.sched-stack { cursor: pointer; }
.sched-stack:not(.open) {
  box-shadow:
    5px 6px 0 -1px var(--card), 5px 6px 0 0 var(--line-strong),
    10px 12px 0 -1px var(--card), 10px 12px 0 0 var(--line);
}
.sched-stack:not(.open) > .sched-body ~ .sched-body { display: none; }
.sched-top .sched-badge {
  margin-left: 8px; margin-right: auto; white-space: nowrap;
  font-size: 12px; font-weight: 700; color: var(--green);
  border: 1px solid var(--line-strong); border-radius: 999px;
  padding: 2px 8px;
}
.sched-more, .sched-less {
  display: none; width: 100%; margin-top: 10px; padding: 4px 0 0;
  background: none; border: 0; color: var(--muted);
  font: inherit; font-size: 13px; font-weight: 600;
  text-align: center; cursor: pointer;
}
.sched-stack:not(.open) .sched-more { display: block; font-size: 16px; line-height: 1; }
.sched-stack.open .sched-less { display: block; border-top: 1px solid var(--line); padding-top: 10px; }
.sched-stack.open { cursor: default; }
.sched-stack.open > .sched-body { cursor: pointer; }

/* ---- Panel-parity load card (Taras 2026-10-07, "один в один"):
   Overview Active Operations card mirrors the Company Operations
   panel card. Only .px-* classes are used by it. ---- */
.px-card {
  position: relative;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 12px 12px;
  overflow: hidden;
  cursor: pointer;
}
.px-card:hover { border-color: var(--line-strong); }
.px-accent {
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--accent);
}
.px-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.px-pill {
  display: inline-block; padding: 3px 10px; border-radius: 999px;
  background: rgba(232, 99, 43, .16); color: var(--accent-ink);
  font-size: 12px; font-weight: 700; letter-spacing: .01em;
}
.px-rate { font-size: 18px; font-weight: 800; color: var(--text); font-variant-numeric: tabular-nums; white-space: nowrap; }
.px-ids { display: flex; align-items: flex-end; gap: 10px; margin-bottom: 8px; }
.px-ids > div { min-width: 0; }
.px-ids > div:first-child { flex-shrink: 0; }
.px-lab {
  font-size: 9px; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 2px;
}
.px-loadid { font-size: 20px; font-weight: 800; letter-spacing: -.01em; color: var(--text); white-space: nowrap; }
.px-loadid.cx { color: var(--text); }
.px-bref { font-size: 14px; font-weight: 700; color: var(--text); padding-bottom: 1px; white-space: nowrap; }
.px-pm { margin-left: auto; font-size: 12px; color: var(--muted); white-space: nowrap; padding-bottom: 2px; font-variant-numeric: tabular-nums; }
.px-prog { margin: 2px 0 0; }
.px-segs { display: flex; gap: 6px; }
.px-seg { flex: 1; height: 5px; border-radius: 3px; background: var(--track); }
.px-seg.done { background: #2fae6e; }
.px-seg.cur { background: linear-gradient(180deg, #f07f3c, #e8632b); box-shadow: inset 0 1px 0 rgba(255, 190, 130, .45), 0 0 3px rgba(240, 122, 50, .35); }
.px-seg-lbs { display: flex; gap: 6px; margin-top: 3px; }
.px-seg-lb { flex: 1; text-align: center; font-size: 10px; color: var(--muted); white-space: nowrap; }
.px-seg-lb.cur { color: var(--text); font-weight: 700; }
.px-div { height: 1px; background: var(--line); margin: 8px 0; }
.px-route { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.px-city { font-size: 15px; font-weight: 700; color: var(--text); }
.px-city.r { text-align: right; }
.px-arrow {
  flex: 0 0 auto; width: 28px; height: 28px; border-radius: 50%;
  background: rgba(232, 99, 43, .14); color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700;
}
.px-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 10px; }
.px-cap { font-size: 10px; color: var(--muted); margin-bottom: 1px; }
.px-val { font-size: 13px; font-weight: 600; color: var(--text); }
.px-broker { font-weight: 700; }
/* Taras 2026-10-12: the status-times row overflowed the card on iPhone once the
   "Checked in (delivery)" cell landed (four nowrap timestamps never fit one
   flex row) — lay out as a wrapping two-column grid instead. */
.px-times { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 12px; }
.px-times > div { min-width: 0; }
.px-tval { font-size: 12px; font-weight: 600; color: var(--text); white-space: nowrap; font-variant-numeric: tabular-nums; }
.px-ph-toggle { text-align: right; margin: 0 0 6px; }
.px-ph-toggle a { color: var(--muted); font-size: 12px; text-decoration: underline; }
.px-photos { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.px-ph {
  min-width: 0; height: 60px; border-radius: 8px; overflow: hidden;
  background: var(--card2);
}
.px-ph img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---------- load detail compact (Taras 2026-10-07: "зроби стисліше щоб все вмістилось і не ковзало") ----------
   Scoped to #ld only — no other view is touched. */
#ld .detail-head { gap: 10px; margin-bottom: 2px; }
#ld .detail-head h2 { font-size: 22px; }
#ld .route { font-size: 12px; margin-bottom: 6px; }
#ld .grid2 { gap: 8px; }
#ld .card { padding: 10px; }
#ld .card h3 { font-size: 14px; }
#ld .card .body { margin-top: 6px; font-size: 13px; }
#ld .kv { font-size: 12px; gap: 4px 10px; }
#ld .kv dt { font-size: 11px; }
#ld .kv dd { font-size: 13px; }
#ld #load-docs .ledger-row { padding: 6px 10px; gap: 10px; }
#ld #load-docs .ledger-row + .ledger-row { margin-top: 8px; }
#ld .ledger-t { font-size: 13px; gap: 6px; }
#ld .ledger-s, #ld .ledger-s2 { font-size: 11px; margin-top: 2px; }
#ld .ledger-r .btn.ghost { padding: 6px 10px; font-size: 13px; border-radius: 10px; }
#ld .section-t { font-size: 11px; margin: 8px 0 4px; }
#ld .ld-notes {
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
  overflow: hidden; font-size: 12px; line-height: 1.45; white-space: pre-wrap;
}
#ld .ld-notes.open { display: block; }
#ld .ld-notes a { text-decoration: underline; }
#ld .notes-toggle {
  background: none; border: none; color: var(--accent); font-size: 12px;
  font-weight: 700; padding: 4px 0 0; cursor: pointer; font-family: var(--font);
  /* Taras 2026-10-19: Show more/less sits at the RIGHT edge of the notes
     block, underlined (color stays the accent orange). */
  display: block; width: 100%; text-align: right; text-decoration: underline;
}
/* Taras 2026-10-19 (late): the toggle is ANCHORED on the Notes label row —
   same row as the "Notes" label, right-aligned — so it stays in ONE place
   whether the notes are collapsed or expanded; the text grows/shrinks
   below it and the button never moves. min-width keeps the box identical
   for "Show more" and "Show less" so not even the left edge shifts. */
#ld .ld-notes-head { display: flex; align-items: baseline; justify-content: space-between; }
#ld .ld-notes-head .notes-toggle {
  display: inline-block; width: auto; min-width: 84px; padding: 0; flex: 0 0 auto;
}
#ld .actions { margin: 6px 0; gap: 8px; }
#ld .actions .btn { padding: 10px 16px; font-size: 14px; }
#ld .empty { font-size: 12px; padding: 6px 0 2px; }

/* Cargo photos grid (load detail, 2026-10-08 — identical to the panel's photos section) */
.photo-toggle-row { text-align: right; margin-bottom: 8px; }
.photo-toggle { background: none; border: none; color: var(--muted); text-decoration: underline; font-size: 13px; cursor: pointer; padding: 0; }
.photo-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.photo-grid.hidden { display: none; }
.photo-cell { cursor: pointer; min-width: 0; }
.photo-cell img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; display: block; background: var(--photo-bg); }
/* Cargo photo capture slots (Taras 2026-10-08): label under the photo, per his settled layout. */
.photo-cell .photo-label { text-align: center; font-size: 12px; color: var(--muted); margin-top: 4px; }
.photo-empty { width: 100%; aspect-ratio: 4 / 3; border: 1.5px dashed var(--photo-empty-line); border-radius: 8px; background: var(--photo-empty-bg); }
.photo-meta { text-align: center; font-size: 11px; color: var(--muted); margin-top: 2px; }
/* Compact capture buttons: 4 columns on a phone leave ~78px per cell —
   the base .btn (15px/12px padding) wrapped "Take a Photo" onto 3 lines. */
.photo-cap-btn { width: 100%; padding: 8px 4px; font-size: 12px; line-height: 1.3; }

/* Offline indicator (Taras 2026-10-08): slim pill, managed by cache.js. */
#offline-pill {
  position: fixed; top: 10px; left: 50%; transform: translateX(-50%);
  z-index: 9999; background: #3a2c10; color: #f5c86b;
  border: 1px solid #8a6a2a; border-radius: 999px;
  font-size: 12px; font-weight: 600; padding: 6px 14px;
  box-shadow: 0 2px 10px rgba(0,0,0,.4); pointer-events: none;
  white-space: nowrap;
}

/* ---------- Finance: panel-parity (Taras 2026-10-10 "вид так само як в артифакті") ---------- */
.fin-monthnav { display: flex; align-items: center; justify-content: center; gap: 20px; margin: 2px 0 10px; }
.fin-monthnav .btn { min-width: 44px; }
.fin-monthlabel { font-size: 17px; font-weight: 700; letter-spacing: -.01em; }
.fin-scope { display: flex; justify-content: center; margin-bottom: 14px; }
.fin-hero {
  background: #f5f2ec; color: #181410;
  border-radius: 14px; padding: 18px 20px;
  position: relative; overflow: hidden;
}
.fin-hero-stripe {
  position: absolute; top: -12px; bottom: -12px; right: 30px; width: 20px;
  background: var(--accent); transform: skewX(-14deg); border-radius: 3px;
}
.fin-hero-label { font-size: 13px; color: #6d675c; font-weight: 500; }
.fin-hero-num {
  font-size: 54px; font-weight: 800; letter-spacing: -.02em;
  margin: 4px 0 2px; font-variant-numeric: tabular-nums; line-height: 1.05;
  white-space: nowrap;
}
.fin-hero-num.neg { color: var(--red); }
.fin-hero-sub { font-size: 13px; color: #6d675c; }
/* compact tiles: whole-dollar values never clip at 390px */
.fin-tiles .stat { padding: 14px; }
.fin-tiles .stat .sl { font-size: 13px; }
.fin-tiles .stat .sv { font-size: 25px; margin: 6px 0; white-space: nowrap; }
.fin-tiles .stat .ss { font-size: 12px; line-height: 1.35; }
/* ---------- client-side pagination + list/grid toggle (Taras 2026-10-11) ---------- */
.pg { display:flex; align-items:center; justify-content:center; gap:6px; margin:12px 0 2px; flex-wrap:wrap; }
.pg-btn { min-width:44px; min-height:44px; padding:10px 12px; border:1px solid var(--line); border-radius:12px; background:var(--card2); color:var(--text); font-size:15px; font-weight:700; font-family:var(--font); cursor:pointer; -webkit-tap-highlight-color:transparent; touch-action:manipulation; }
.pg-btn.on { background:var(--accent); border-color:var(--accent); color:#fff; }
.pg-btn:disabled { opacity:.35; cursor:default; }
.pg-dots { color:var(--muted); font-weight:700; padding:0 2px; }
.pg-info { text-align:center; color:var(--muted); font-size:13px; margin:10px 0 2px; }
.view-toggle { display:flex; background:var(--bg2); border:1px solid var(--line); border-radius:12px; padding:3px; gap:3px; flex-shrink:0; }
.view-toggle .vt-btn { border:none; background:transparent; color:var(--muted); font-size:13px; font-weight:700; padding:9px 12px; border-radius:9px; cursor:pointer; font-family:var(--font); min-height:40px; -webkit-tap-highlight-color:transparent; touch-action:manipulation; }
.view-toggle .vt-btn.on { background:var(--card2); color:var(--text); }
.vgrid { display:grid; grid-template-columns:repeat(2, minmax(0,1fr)); gap:10px; margin-top:12px; }
@media (max-width:420px){ .vgrid { grid-template-columns:minmax(0,1fr); } }
@media (min-width:1000px){ .vgrid { grid-template-columns:repeat(3, minmax(0,1fr)); } }
/* rows render as cards inside the grid */
.vgrid > .ledger-row { flex-direction:column; align-items:flex-start; gap:8px; }
.vgrid > .ledger-row .ledger-r { text-align:left; }
.vgrid > .ledger-row .ledger-ico { width:40px; height:40px; flex:0 0 40px; font-size:16px; }

/* ---------- load status ring (Taras 2026-10-11) ---------- */
.sring { flex-shrink:0; }
.sring-t { font-size:10px; font-weight:800; fill:var(--text); font-family:var(--font); }

/* ---------- load filter chips (Taras 2026-10-11) ---------- */
.chips { display:flex; gap:8px; margin:12px 0 2px; flex-wrap:wrap; }
.chip { border:1px solid var(--line); background:var(--card2); color:var(--muted); font-size:14px; font-weight:700; font-family:var(--font); padding:10px 14px; border-radius:999px; cursor:pointer; min-height:44px; -webkit-tap-highlight-color:transparent; touch-action:manipulation; }
.chip.on { background:var(--accent); border-color:var(--accent); color:#fff; }

/* ---------- compact load card (Taras 2026-10-11) ---------- */
.lc-top { display:flex; align-items:center; gap:12px; }
.lc-idblock { min-width:0; }
.lc-driver { color:var(--muted); font-size:13px; margin-top:2px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.lc-next { color:var(--muted); font-size:13px; margin-top:8px; font-weight:600; }
.lc-next.lc-action { color:var(--red); font-weight:800; }

/* ---------- overview load switcher (Taras 2026-10-11) ---------- */

.ovsw-row { display:flex; align-items:stretch; gap:8px; }
.ovsw-slides { flex:1; min-width:0; }
.ovsw-slide { min-width:0; }
.ovsw-dots { display:flex; justify-content:space-between; align-items:center; gap:8px; margin-top:10px; }
.ovsw-dotset { display:flex; gap:8px; align-items:center; }
.ovsw-nav { width:34px; height:34px; min-width:34px; min-height:34px; max-width:34px; max-height:34px; flex:none; border-radius:999px; border:2px solid var(--accent); background:transparent; color:var(--accent); display:flex; align-items:center; justify-content:center; cursor:pointer; padding:0; -webkit-tap-highlight-color:transparent; touch-action:manipulation; }
.ovsw-nav svg { width:17px; height:17px; flex:none; }
.ovsw-nav:active { background:var(--accent); color:#fff; }
.ovsw-dot { width:12px; height:12px; border-radius:999px; border:none; background:var(--line); cursor:pointer; padding:0; min-width:12px; min-height:12px; -webkit-tap-highlight-color:transparent; touch-action:manipulation; }
.ovsw-dot.on { background:var(--accent); }
/* Stacked deck (Taras 2026-10-15): with 2+ active loads the main card
   reads as a stack — two card edges peek from behind the TOP of the
   front card, each narrower and higher. Tapping the peek spreads all
   active loads into a grid (.ovsw.grid); tapping one makes it main.
   Pure CSS layers: :has() counts the slides (hidden ones included);
   the pseudo layers sit behind the visible slide inside the slides
   box's own stacking context. The 18px top zone is the tap target. */
.ovsw-slides { position: relative; z-index: 0; }
.ovsw-slides:has(> .ovsw-slide + .ovsw-slide) { padding-top: 18px; }
.ovsw-slides:has(> .ovsw-slide + .ovsw-slide)::before,
.ovsw-slides:has(> .ovsw-slide + .ovsw-slide)::after {
  content: ''; position: absolute; bottom: 0;
  background: var(--card2); border: 1px solid var(--line);
  border-radius: var(--radius);
}
.ovsw-slides:has(> .ovsw-slide + .ovsw-slide)::before {
  left: 9px; right: 9px; top: 9px; z-index: -1;
}
.ovsw-slides:has(> .ovsw-slide + .ovsw-slide)::after {
  left: 18px; right: 18px; top: 0; z-index: -2; opacity: .55;
}
/* Grid mode: every active load side by side, no stack, no dots. */
.ovsw.grid .ovsw-slides {
  padding-top: 0; display: grid; gap: 14px; align-items: start;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}
.ovsw.grid .ovsw-slides::before, .ovsw.grid .ovsw-slides::after { display: none; }
.ovsw.grid .ovsw-dots { display: none; }
.ovsw.grid .ovsw-slide { cursor: pointer; }

/* Multi-stop loads (Taras 2026-10-12): Overview stop list + route chain.
   The upcoming stop is the "Next stop" in the brand orange (--accent) —
   never yellow, never "Current stop" (that reads as already there). */
.px-route.chain { justify-content: flex-start; }
.px-route.chain .px-city { font-size: 14px; line-height: 1.45; }
.px-stops { display: flex; flex-direction: column; gap: 6px; }
.px-stop { display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; }
.px-stop.cur { border-color: var(--accent); background: var(--accent-dim); }
.px-stop.done { opacity: .62; }
.px-stop-n { flex: 0 0 auto; width: 22px; height: 22px; border-radius: 50%; background: var(--stop-n-bg); color: var(--text); font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; margin-top: 1px; }
.px-stop.cur .px-stop-n { background: var(--accent); color: #fff; }
.px-stop-main { flex: 1 1 auto; min-width: 0; }
.px-stop-t { font-size: 13px; font-weight: 700; color: var(--text); }
.px-stop-a { font-size: 12px; color: var(--muted); margin-top: 1px; }
.px-stop-w { font-size: 12px; color: var(--muted); margin-top: 1px; }
.px-stop-st { flex: 0 0 auto; font-size: 12px; font-weight: 600; color: var(--text); text-align: right; }
.ld-stop { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; border-bottom: 1px solid var(--line); }
.ld-stop:last-child { border-bottom: none; }
.ld-stop.done { opacity: .65; }
.ld-stop-n { flex: 0 0 auto; width: 22px; height: 22px; border-radius: 50%; background: var(--stop-n-bg); color: var(--text); font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; margin-top: 1px; }
.ld-stop-main { flex: 1 1 auto; min-width: 0; }
.ld-stop-a { font-size: 12px; color: var(--muted); margin-top: 1px; }
.ld-stop-w { font-size: 12px; color: var(--muted); margin-top: 1px; }
.ld-stop-st { flex: 0 0 auto; font-size: 12px; text-align: right; }

/* Notifications inbox (migration 012): row timestamp. */
.ntf-time { color: var(--faint); font-size: 12px; white-space: nowrap; margin-left: 10px; align-self: flex-start; }

/* Settlement statement (migration 024): a PAPER document — fixed
   light palette in both app themes; the tenant's branding arrives as
   the --stmt-header / --stmt-accent variables set inline by
   js/statement.js. Layout mirrors the approved sample
   (build_sample2.py): header band, accent rule, light driver card,
   loads table, totals, AMOUNT PAID box. */
.stmt-overlay {
  position: fixed; inset: 0; z-index: 300; overflow: hidden;
  background: rgba(10, 12, 16, .55);
  display: flex; flex-direction: column;
}
.stmt-toolbar {
  flex: 0 0 auto; width: 100%; max-width: 780px; margin: 0 auto;
  padding: calc(14px + env(safe-area-inset-top)) 10px 12px; box-sizing: border-box;
  display: flex; align-items: center;
  gap: 8px; color: #fff;
}
.stmt-scroll {
  flex: 1 1 auto; overflow-y: auto; -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain; padding: 2px 10px 48px;
}
.stmt-toolbar-t { font-size: 15px; font-weight: 700; }
.stmt-sample-pill {
  background: #b00020; color: #fff; font-size: 11px; font-weight: 700;
  border-radius: 999px; padding: 2px 8px; vertical-align: middle;
}
.stmt-doc {
  background: #fff; color: #1a1a1a; max-width: 780px; margin: 0 auto;
  border-radius: 10px; padding: 30px 34px 34px; box-shadow: 0 18px 50px rgba(0,0,0,.35);
  font-family: Helvetica, Arial, sans-serif;
}
.stmt-band {
  background: var(--stmt-header); color: #fff; border-radius: 8px;
  display: flex; align-items: center; gap: 16px; padding: 16px 18px;
}
.stmt-band-l { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; }
.stmt-logo-chip { background: #fff; border-radius: 6px; padding: 6px 10px; display: inline-flex; }
.stmt-logo { max-height: 54px; max-width: 240px; display: block; }
.stmt-co-name { font-size: 20px; font-weight: 700; line-height: 1.2; }
.stmt-band-r { text-align: right; flex: 0 0 auto; }
.stmt-title { font-size: 17px; font-weight: 700; letter-spacing: .4px; }
.stmt-meta { font-size: 9.5px; line-height: 1.55; color: rgba(255,255,255,.78); margin-top: 4px; }
.stmt-rule { height: 3px; background: var(--stmt-accent); border-radius: 2px; margin: 12px 0 0; }
.stmt-coblock { margin-top: 12px; font-size: 10.5px; line-height: 1.5; color: #64748b; }
.stmt-co-legal { font-size: 12.5px; font-weight: 700; color: #1a1a1a; }
.stmt-dcard {
  background: #f5f7fa; border-radius: 6px; margin-top: 14px; padding: 12px 14px;
  display: flex; align-items: center; gap: 12px;
}
.stmt-dcard-l { flex: 1 1 auto; min-width: 0; }
.stmt-dname { font-size: 16.5px; font-weight: 700; color: var(--stmt-header); }
.stmt-dmeta { font-size: 10.5px; color: #64748b; }
.stmt-dcard-r { text-align: right; flex: 0 0 auto; }
.stmt-rate-l { font-size: 9px; color: #64748b; }
.stmt-rate-v { font-size: 12px; font-weight: 700; }
.stmt-sec {
  margin: 18px 0 8px; font-size: 13px; font-weight: 700; color: var(--stmt-header);
}
.stmt-sec-n { color: #94a3b8; font-weight: 400; }
.stmt-tbl { width: 100%; border-collapse: collapse; font-size: 10.5px; }
.stmt-tbl th {
  background: var(--stmt-header); color: #fff; text-align: left; font-weight: 700;
  padding: 7px 6px; font-size: 10px;
}
.stmt-tbl th:first-child { border-radius: 6px 0 0 0; }
.stmt-tbl th:last-child { border-radius: 0 6px 0 0; }
.stmt-tbl td { padding: 7px 6px; border-bottom: .5px solid #e2e8f0; vertical-align: middle; }
.stmt-tbl tbody tr:nth-child(even) { background: #f8fafc; }
.stmt-tbl .num, .stmt-tot .num, .stmt-extra .num { text-align: right; white-space: nowrap; }
.stmt-nolines { font-size: 11px; color: #64748b; padding: 6px 0; }
.stmt-extras { font-size: 11px; }
.stmt-extra {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 6px 0; border-bottom: .5px solid #e2e8f0;
}
.stmt-tot { width: 100%; border-collapse: collapse; font-size: 12px; margin-top: 16px; }
.stmt-tot td { padding: 5px 0; border-bottom: .5px solid #e2e8f0; }
.stmt-tot tr:last-child td { border-bottom: none; }
.stmt-tot .tl { color: #64748b; }
.stmt-paid {
  background: var(--stmt-header); border-radius: 8px; margin-top: 12px;
  padding: 13px 16px; display: flex; align-items: center; gap: 12px;
}
.stmt-paid-l { color: #fff; font-size: 13px; font-weight: 700; flex: 1 1 auto; }
.stmt-paid-v { color: var(--stmt-accent); font-size: 21px; font-weight: 700; }
.stmt-sample-note { margin-top: 16px; text-align: center; font-size: 10px; color: #94a3b8; }
.stmt-sample-note b { color: #b00020; }
.stmt-foot { margin-top: 10px; text-align: center; font-size: 10.5px; color: #64748b; white-space: pre-wrap; }
@media (max-width: 560px) {
  .stmt-doc { padding: 20px 16px 24px; }
  .stmt-band { flex-direction: column; align-items: flex-start; }
  .stmt-band-r { text-align: left; }
  .stmt-tbl { font-size: 9.5px; }
  .stmt-tbl th, .stmt-tbl td { padding: 6px 4px; }
}

/* Settings → Statement appearance: color picker + preset swatches. */
.br-pick {
  width: 52px; height: 38px; padding: 2px; cursor: pointer;
  background: var(--bg2); border: 1px solid var(--line); border-radius: 8px;
}
.br-swatch {
  width: 22px; height: 22px; border-radius: 50%; cursor: pointer; padding: 0;
  border: 2px solid rgba(127,127,127,.35);
}

/* Help chapter emphasis (Taras 2026-10-15): bold terms inside Help
   chapter bodies take the primary-button orange (var(--accent) =
   #e8632b, both themes) instead of plain black; the bold weight
   stays. Scoped to the Help chapter cards only. */
.card[id^="help-"] .body b, .card[id^="help-"] .body strong { color: var(--accent); }

/* Print: ONLY the statement document — app chrome, toolbar and the
   page behind it all disappear; Letter with modest margins. */
@page { size: Letter; margin: .5in; }
@media print {
  #to-top { display: none !important; }
  body.stmt-printing #app, body.stmt-printing .tabbar { display: none !important; }
  body.stmt-printing .stmt-overlay {
    position: static !important; overflow: visible !important;
    background: #fff !important; padding: 0 !important; display: block !important;
  }
  body.stmt-printing .stmt-scroll {
    overflow: visible !important; padding: 0 !important;
  }
  body.stmt-printing .stmt-toolbar { display: none !important; }
  body.stmt-printing .stmt-doc {
    box-shadow: none !important; border-radius: 0 !important;
    max-width: none !important; margin: 0 !important; padding: 0 !important;
  }
  .stmt-band, .stmt-tbl th, .stmt-paid { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* Back to top (Taras 2026-10-17): floating round button above the
   tab bar (z 45 — tabbar 40, modal-bg 50, toast 99, stmt 300).
   Hidden by default; app.js adds .show past 600px of window scroll
   when no modal/overlay is open. The native shell already ends the
   WebView at the safe-area bottom (see .tabbar above), so the
   inset term drops there exactly like the tab bar's own padding. */
#to-top {
  position: fixed; right: 14px;
  bottom: calc(80px + env(safe-area-inset-bottom, 0px));
  width: 46px; height: 46px; border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .18);
  background: rgba(13, 22, 34, .55); color: #fff;
  font-size: 20px; line-height: 1; padding: 0; cursor: pointer;
  display: none; align-items: center; justify-content: center;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  z-index: 45;
}
#to-top.show { display: flex; }
/* Position Board (Taras 2026-10-23): the board's own navigation
   lives on the right (‹ › cluster, Today, totals column), so while
   the board is active the back-to-top button docks bottom-LEFT and
   the two never compete for the same corner. body.on-board is
   synced by app.js (boardDockSync). */
body.on-board #to-top { right: auto; left: 14px; }

/* Photo capture confirmation (Taras 2026-10-19): a big checkmark the moment
   a photo is taken and saved — nobody should guess whether it worked. */
.photo-done { text-align: center; padding: 14px 0 4px; }
.photo-done .pd-check { font-size: 46px; line-height: 1; color: #2fbf71; font-weight: 700; }
.photo-done .pd-text { margin-top: 6px; font-size: 14px; }
.photo-cell.queued img { opacity: .6; }

/* Board — position board (Taras 2026-10-20): Nick's spreadsheet
   layout in TAOS styling — one month per view, drivers x days,
   load blocks (values in the pickup day), free city written once
   on the first free day, today covered/free strip, totals. */
.bd-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.bd-head h2 { font-size: 26px; font-weight: 800; letter-spacing: -.01em; }
.bd-sub { color: var(--muted); font-size: 13px; margin-top: 8px; }
.bd-nav { display: flex; align-items: center; gap: 8px; }
.bd-mnav { min-width: 34px; height: 34px; padding: 0 8px; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--card); color: var(--text); font-size: 17px; cursor: pointer; }
.bd-mtoday { font-size: 13px; font-weight: 700; }
.bd-mtitle { font-size: 16px; font-weight: 800; min-width: 148px; text-align: center; }
.bd-wlabel { font-size: 12px; font-weight: 600; color: var(--muted); white-space: nowrap; }
/* Board toolbar (Taras 2026-10-24): the board's action row sits
   directly above the grid, visually tied to it \u2014 Minimum
   check and the Excel export/import live here, not crowded
   into the header. */
.bd-toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 12px; }
.bd-scroll { overflow-x: auto; overscroll-behavior-x: none; border: 1px solid var(--line); border-radius: 14px; background: var(--card); margin-top: 12px;  scrollbar-width: auto; scrollbar-color: var(--accent) var(--card2); }
/* Board slider (Taras 2026-10-24): the board's horizontal
   scrollbar is a working control, not a hint -- a full-height
   bar with a thumb in the app accent, always rendered, tall
   enough to grab with a pointer on the first try. (The stock
   overlay sliver was barely visible, his words.) Firefox takes
   the scrollbar-color on .bd-scroll above; WebKit takes these. */
.bd-scroll::-webkit-scrollbar { height: 16px; }
.bd-scroll::-webkit-scrollbar-track { background: var(--card2); border-top: 1px solid var(--line); }
.bd-scroll::-webkit-scrollbar-thumb { background: var(--accent); border: 3px solid var(--card2); border-radius: 9px; min-width: 56px; }
.bd-scroll::-webkit-scrollbar-thumb:hover { background: var(--accent-ink); }
/* Week magnet (Taras 2026-10-24): on the board's swiped month
   strip, a scroll that settles NEAR the current week's Monday
   aligns softly onto it -- proximity only, never a pull from far
   away. The Monday cell (.bd-day.weekmon) is the strip's only
   snap area; board.js sets scroll-padding-left to the
   driver-column width so the snap point matches the board's own
   anchor (scrollLeft = dayIndex x dayPx). */
/* (The magnet itself is a JS settle in board.js under the
   .bd-magnet hook -- no CSS snap rules on purpose: the
   proximity snap's catch radius felt too strong, Taras
   2026-10-24.) */
.bd-grid { display: grid; }
.bd-corner { position: sticky; left: 0; transform: translateZ(0); background: var(--card); z-index: 4; border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); font-size: 10px; font-weight: 800; letter-spacing: .06em; color: var(--muted); display: flex; align-items: center; padding: 0 10px; }
.bd-day { padding: 5px 2px 6px; text-align: center; border-bottom: 1px solid var(--line); border-left: 1px solid var(--line); }
/* The divider between the frozen DRIVERS column and the first
   day is the frozen cells' own border-right (Taras 2026-10-24:
   at the month start the first day flowed into DRIVERS with no
   separator). The track's gradient never painted its left edge,
   and a day cell's border-left scrolls away / slides under the
   sticky column — the sticky cells carry the line themselves,
   glued at every scroll position. The first day cell then drops
   its own border-left so the seam stays exactly one line wide,
   like every other day separator. */
.bd-corner + .bd-day { border-left: none; }
.bd-day .dw { font-size: 9px; font-weight: 600; color: var(--faint); }
.bd-day .dn { font-size: 13px; font-weight: 800; color: var(--text); line-height: 1.15; }
.bd-day.we { background: var(--bg2); }
.bd-day.today .dn, .bd-day.today .dw { color: var(--accent-ink); }
.bd-total-h { position: sticky; right: 0; transform: translateZ(0); background: var(--card); z-index: 4; font-size: 10px; font-weight: 800; letter-spacing: .06em; color: var(--muted); display: flex; align-items: center; justify-content: flex-end; padding-right: 10px; border-bottom: 1px solid var(--line); border-left: 1px solid var(--line); }
.bd-group { grid-column: 1 / -1; padding: 7px 12px; font-size: 12px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); background: var(--bg2); border-top: 1px solid var(--line); }
.bd-group > span { position: sticky; left: 12px; transform: translateZ(0); display: inline-block; }
.bd-drv { position: sticky; left: 0; transform: translateZ(0); z-index: 3; background: var(--card); padding: 8px 10px; border-top: 1px solid var(--line); border-right: 1px solid var(--line); }
.bd-drv-t { font-size: 13px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bd-drv-s { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bd-map-btn { display: block; max-width: 100%; margin-top: 2px; padding: 1px 8px; font-size: 11px; line-height: 1.35; font-family: inherit; color: var(--muted); background: transparent; border: 1px solid var(--line); border-radius: 999px; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: left; }
.bd-map-btn:active { opacity: .6; }
.bd-note { font-size: 10.5px; line-height: 1.3; margin-top: 3px; white-space: normal; overflow-wrap: break-word; }
.bd-note-tag { font-size: 8px; font-weight: 700; letter-spacing: .5px; opacity: .5; vertical-align: 1px; }
.bd-note-ok { color: #1f9d57; }
.bd-note-info { color: var(--muted); }
.bd-note-warn { color: #b97a0c; font-weight: 600; }
.bd-note-bad { color: #d43a47; font-weight: 700; }
.bd-note-sub { font-size: 10px; line-height: 1.3; color: var(--muted); opacity: .75; margin-top: 1px; white-space: normal; overflow-wrap: break-word; }
.bd-track { position: relative; grid-column: 2 / -2; min-height: 58px; border-top: 1px solid var(--line); cursor: pointer; }
.bd-today { position: absolute; top: 0; bottom: 0; background: var(--accent-dim); opacity: .45; pointer-events: none; }
.bd-colwe { position: absolute; top: 0; bottom: 0; background: var(--bg2); opacity: .5; pointer-events: none; }
.bd-total { position: sticky; right: 0; transform: translateZ(0); z-index: 3; background: var(--card); border-top: 1px solid var(--line); border-left: 1px solid var(--line); padding: 8px 10px; text-align: right; }
.bd-total-g { font-weight: 800; font-size: 13px; white-space: nowrap; }
.bd-total-m { font-size: 11px; color: var(--muted); white-space: nowrap; }
.bd-total-a { font-size: 9px; color: var(--muted); white-space: nowrap; }
.bd-free { position: absolute; bottom: 1px; height: 15px; font-size: 10px; color: var(--muted); text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; pointer-events: none; padding: 0 1px; }
.bd-today-strip { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 12px; font-size: 13px; color: var(--muted); }
.bd-freechip { background: var(--green-dim); color: var(--green); border-radius: 999px; padding: 3px 10px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.bd-block { position: absolute; top: 4px; height: auto !important; min-height: 46px; border-radius: 8px; padding: 3px 5px; overflow: hidden; cursor: pointer; border-left: 3px solid var(--muted); }
/* Block lines NEVER truncate (Taras 2026-10-24): if the top
   line's load number + gross + rpm + all-in pill do not fit the
   block's width, the line wraps and the pill drops to a second
   line inside the block (the block grows -- its height is auto)
   instead of ellipsizing. Same rule for the miles line below. */
.bd-block-t { display: flex; flex-wrap: wrap; align-items: center; column-gap: 5px; font-size: 11.5px; line-height: 1.25; }
.bd-block-t .bd-block-id { margin-right: 0; }
.bd-block-t .bd-allin { margin-left: 0; }
.bd-block-id { font-size: 10.5px; font-weight: 700; letter-spacing: .02em; opacity: .85; margin-right: 4px; }
.bd-rpm { font-size: 10px; font-weight: 600; color: var(--muted); }
.bd-allin { padding: 0 5px; font-size: 9.5px; line-height: 1.55; text-transform: none; letter-spacing: 0; margin-left: 4px; vertical-align: 1px; }
.bd-block-m { font-size: 11px; line-height: 1.25; color: var(--muted); }
.bd-block-s { font-size: 11px; line-height: 1.25; color: var(--muted); white-space: normal; }
/* Same-day blocks (Taras 2026-10-25): pickup and delivery in ONE
   day means the block is a single day column wide. Its compact
   arrangement — number + gross, a meta line with the rpm and the
   all-in pill, miles, then the route — is set tighter (smaller
   type, tighter leading, narrower padding) so ALL of the block's
   text fits vertically inside that day at the standard lane
   height instead of wrapping into a tall tower; words may break
   rather than ever clip at phone widths. */
.bd-sameday { padding: 3px 4px; }
.bd-sameday .bd-block-t { font-size: 11px; line-height: 1.2; column-gap: 4px; }
.bd-sameday .bd-block-id { font-size: 10px; overflow-wrap: anywhere; }
.bd-block-m2 { display: flex; flex-wrap: wrap; align-items: center; column-gap: 4px; }
.bd-sameday .bd-block-m2 { line-height: 1.2; }
.bd-sameday .bd-rpm { font-size: 9.5px; overflow-wrap: anywhere; }
.bd-sameday .bd-allin { font-size: 8.5px; line-height: 1.45; padding: 0 3px; margin-left: 0; overflow-wrap: anywhere; white-space: normal; text-align: center; }
.bd-sameday .bd-block-t b { overflow-wrap: anywhere; }
.bd-sameday .bd-block-m { font-size: 10px; line-height: 1.2; }
.bd-sameday .bd-block-s { font-size: 9.5px; line-height: 1.18; overflow-wrap: break-word; }
.bd-st-booked { background: var(--steel-dim); border-left-color: var(--steel); }
.bd-st-dispatched { background: var(--gold-dim); border-left-color: var(--gold); }
.bd-st-checked_in { background: var(--gold-dim); border-left-color: var(--gold); }
.bd-st-in_transit { background: var(--green-dim); border-left-color: var(--green); }
.bd-st-delivered { background: var(--pill-gray-bg); border-left-color: var(--muted); }
.bd-st-delivered_pending { background: var(--gold-dim); border-left-color: var(--gold); }
.bd-st-paid { background: var(--pill-gray-bg); border-left-color: var(--faint); }
/* Cancelled blocks (Taras 2026-11-03): greyed like delivered/paid,
   with the cancelled red kept only on the edge and the tag — a
   visible record of the load, never a live one. */
.bd-st-cancelled { background: var(--pill-gray-bg); border-left-color: var(--red); }
.bd-st-cancelled .bd-block-id { color: var(--muted); text-decoration: line-through; }
.bd-cxl-tag { color: var(--red); font-size: 9.5px; font-weight: 800; letter-spacing: .07em; white-space: nowrap; }
.bd-mark { position: absolute; bottom: 2px; height: 15px; font-size: 9px; font-weight: 800; letter-spacing: .03em; display: flex; align-items: center; justify-content: center; border-radius: 4px; overflow: hidden; white-space: nowrap; pointer-events: none; }
.bd-mark-home { background: var(--accent-dim); color: var(--accent-ink); }
.bd-mark-reset { background: var(--gold-dim); color: var(--gold); }
.bd-mark-off { background: var(--pill-gray-bg); color: var(--muted); }
.bd-mark-repair { background: var(--red-dim); color: var(--red); }
.bd-err { color: var(--err); font-size: 13px; margin-top: 10px; }
/* Driver spec card (Taras 2026-10-20) — Nick's sheet note lines. */
.bd-spec-head { display: flex; align-items: flex-start; gap: 10px; }
.bd-spec-head h3 { flex: 1; margin-bottom: 10px; }
.bd-spec-x { flex: none; width: 30px; height: 30px; border-radius: 9px; border: 1px solid var(--line-strong); background: var(--card); color: var(--text); font-size: 17px; line-height: 1; cursor: pointer; }
.bd-spec { display: flex; flex-direction: column; gap: 3px; }
.bd-spec-l { font-size: 14px; line-height: 1.45; color: var(--text); overflow-wrap: anywhere; }
.bd-spec-copy { cursor: pointer; border-bottom: 1px dotted var(--muted); }
.bd-spec-hint { font-size: 12.5px; color: #1a8f4a; min-height: 16px; margin-top: 6px; }
@media (max-width: 860px) { .bd-mtitle { min-width: 118px; font-size: 15px; } }

/* Relay legs / team (migration 085): the Add-driver reveal on
   board blocks + the team chip. The button is parked off the
   block's right edge and slides in on swipe (.bd-swiped), on
   hover, or on keyboard focus — pointer devices get it without
   any gesture, touch devices by swiping the block. */
.bd-block { overflow: hidden; }
.bd-team-add { position: absolute; top: 4px; right: 4px; z-index: 3;
  transform: translateX(130%); transition: transform .18s ease;
  background: var(--accent, #ff7a1a); color: #fff; border: 0;
  border-radius: 999px; font-size: 10px; font-weight: 700;
  padding: 3px 8px; cursor: pointer; }
.bd-block:hover .bd-team-add, .bd-block:focus-within .bd-team-add,
.bd-block.bd-swiped .bd-team-add { transform: none; }
.bd-team-chip { margin-left: 4px; }

/* ---------- driver pay wheel (owner quick-adjust, Taras 2026-10-24) ----------
   The drum picker in the driver profile: basis switch (.seg) + one
   scroll-snapping column, 44px items, the centered item is the value. */
.pay-tap { color: var(--accent); font-weight: 700; cursor: pointer; }
.pay-ctl {
  display: flex; width: 100%; align-items: center; justify-content: space-between;
  gap: 10px; margin-top: 14px; padding: 13px 14px; background: var(--bg2);
  border: 1px solid var(--line); border-radius: 12px; color: var(--text);
  font-family: var(--font); font-size: 15px; cursor: pointer; text-align: left;
}
.pay-ctl-l { color: var(--muted); font-weight: 600; }
.pay-ctl-v { font-weight: 800; font-variant-numeric: tabular-nums; }
.pay-ctl-chev { color: var(--accent); font-weight: 700; margin-left: 10px; }
.pw-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.pw-head h3 { margin-bottom: 0; }
.pw-x {
  border: none; background: transparent; color: var(--muted);
  font-size: 17px; cursor: pointer; padding: 6px; line-height: 1;
}
.pw-wrap { position: relative; height: 220px; margin-top: 14px; }
.pw-band {
  position: absolute; left: 4px; right: 4px; top: 50%; height: 44px;
  transform: translateY(-50%); background: var(--bg2);
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  border-radius: 10px;
}
.pw-wheel {
  position: relative; height: 220px; overflow-y: auto;
  scroll-snap-type: y mandatory; padding: 88px 0; box-sizing: border-box;
  scrollbar-width: none; overscroll-behavior: contain;
}
.pw-wheel::-webkit-scrollbar { display: none; }
.pw-item {
  height: 44px; display: flex; align-items: center; justify-content: center;
  font-size: 17px; color: var(--muted); scroll-snap-align: center;
  cursor: pointer; font-variant-numeric: tabular-nums;
}
.pw-item.on { color: var(--text); font-weight: 800; font-size: 20px; }
.pw-cur { text-align: center; margin-top: 12px; font-size: 15px; font-weight: 700; }
@media (max-width: 640px) {
  .modal-bg:has(> .modal.pay-sheet) { align-items: flex-end; padding: 0; }
  .modal.pay-sheet {
    max-width: none; border-radius: 20px 20px 0 0;
    border-left: none; border-right: none; border-bottom: none;
    max-height: 92dvh;
  }
}

/* Demo Terms scroll signaling (Taras 2026-10-24): the scroll-to-end
   gate stays, but it must SAY so — a ↓ cue rides the Terms pane until
   the bottom is reached, and the hints flip to a green confirmation
   with the checkbox highlighted once the end lands. */
.demo-terms-cue {
  position: absolute; right: 12px; bottom: 12px; z-index: 2;
  background: var(--accent); color: #fff; pointer-events: none;
  font-size: 12px; font-weight: 700; line-height: 1;
  padding: 7px 11px; border-radius: 999px;
  box-shadow: 0 2px 10px rgba(0,0,0,.35);
  animation: demo-terms-cue-bob 1.6s ease-in-out infinite;
}
@keyframes demo-terms-cue-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(3px); }
}
#demo-terms-hint.terms-ok, #demo-terms-scroll-hint.terms-ok {
  color: var(--green); font-weight: 700;
}
#demo-terms-accept.terms-ready {
  outline: 2px solid var(--green); outline-offset: 2px;
  accent-color: var(--green);
}

/* Demo Terms not-accepted warning (Taras 2026-10-29): slides in
   under the checkbox when it is tapped before the Terms have
   been read to the end; the box stays unchecked. */
#demo-terms-accept.terms-locked { opacity: .45; }
#demo-terms-warn {
  max-height: 0; opacity: 0; overflow: hidden;
  transform: translateY(-4px); margin-top: 0; padding: 0 10px;
  background: rgba(229, 72, 77, .12);
  border: 1px solid rgba(229, 72, 77, .55); border-radius: 8px;
  color: var(--text); font-size: 13.5px; line-height: 1.4;
  text-align: left;
  transition: max-height .28s ease, opacity .28s ease,
    transform .28s ease, margin-top .28s ease, padding .28s ease;
}
#demo-terms-warn.show {
  max-height: 90px; opacity: 1; transform: none;
  margin-top: 8px; padding: 8px 10px;
}
/* Busy hint on the lobby Start (Taras 2026-10-29): while a claim
   is being prepared, "One moment…" reads as a heading, not a
   whisper — nobody mistakes the wait for a frozen page. */
#demo-start-hint.hint-busy {
  font-size: 14px; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--text);
}
/* Demo chat, messenger layout (Taras 2026-10-29): one compact
   composer row — growing input + round send — docked at the
   bottom; Telegram line and Close share one slim foot row. */
#dc-note:empty { display: none; }
.modal.dc-chat .dc-comp {
  display: flex; align-items: flex-end; gap: 8px; margin-top: 8px;
}
.modal.dc-chat .dc-input {
  flex: 1 1 auto; width: auto; resize: none;
  border-radius: 20px; padding: 10px 14px;
  max-height: 128px; overflow-y: auto; line-height: 1.35;
}
.modal.dc-chat .dc-sendbtn {
  flex: none; width: 44px; height: 44px; border-radius: 50%;
  border: none; background: var(--accent); color: #fff;
  font-size: 20px; font-weight: 800; line-height: 1; cursor: pointer;
}
.modal.dc-chat .dc-sendbtn:disabled { opacity: .5; }
.modal.dc-chat .dc-foot {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; margin-top: 8px;
}
.modal.dc-chat .dc-closebtn {
  flex: none; background: none; border: 1px solid var(--line);
  color: var(--text); border-radius: 999px; padding: 6px 14px;
  font-size: 13px; font-weight: 600; cursor: pointer;
  font-family: var(--font);
}
/* The chat seals its background (Taras 2026-10-29): no touch
   chaining out of the sheet — only the message list pans. */
.modal-bg:has(> .modal.dc-chat) {
  touch-action: none; overscroll-behavior: none;
}
.modal.dc-chat { touch-action: none; }
.modal.dc-chat .dc-list { touch-action: pan-y; }
.modal.dc-chat .dc-input { touch-action: manipulation; }

/* Guide-by-highlight (migration 111): the control the demo
   assistant pointed at ("where is X") pulses until tapped.
   Accent glow ring; reduced-motion gets a steady outline. */
.hl-target {
  outline: 2px solid var(--accent) !important;
  outline-offset: 2px;
  animation: hl-pulse 1.15s ease-out infinite;
  position: relative;
  z-index: 60;
}
@keyframes hl-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(232, 99, 43, .55); }
  70%  { box-shadow: 0 0 0 12px rgba(232, 99, 43, 0); }
  100% { box-shadow: 0 0 0 0 rgba(232, 99, 43, 0); }
}
@media (prefers-reduced-motion: reduce) {
  .hl-target { animation: none; box-shadow: 0 0 0 4px rgba(232, 99, 43, .45); }
}

/* ---------- offline banner (Taras 2026-11-13, Instagram-style) ----------
   When the connection drops, a solid dark pill floats above the tab
   bar: alert-circle icon + "No internet connection" — the exact
   banner Instagram shows (his reference video). Driven by the
   standalone script in index.html (online/offline events), so it
   also works in the native app. Hidden by default; .show slides it
   in. pointer-events:none in both states — it is a status, never a
   control. Parks where .toast parks: above the floating pill on
   mobile, above the native Liquid Glass bar when that is on. */
.offline-pill {
  position: fixed; left: 12px; right: 12px; bottom: 24px; z-index: 96;
  max-width: 560px; margin-left: auto; margin-right: auto;
  display: flex; align-items: center; gap: 10px;
  padding: 14px 16px; border-radius: 14px;
  background: #262626; color: #fff;
  font-size: 15px; line-height: 1.25;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .35);
  opacity: 0; transform: translateY(12px); pointer-events: none;
  transition: opacity .25s ease, transform .25s ease;
}
.offline-pill.show { opacity: 1; transform: translateY(0); }
.offline-pill svg { flex: none; display: block; }
@media (max-width: 860px) {
  .offline-pill { bottom: calc(88px + env(safe-area-inset-bottom, 0px)); }
  html.native-tabbar-on .offline-pill { bottom: calc(var(--ntb-clear, 88px) + 10px); }
}

/* ---------- TAOS brand theme (Taras 2026-11-18, Olivia's concept) ----------
   The system wears the TAOS card style: a dark background with soft
   orange glows and thin orange gradient hairlines, and the sidebar
   menu rendered as real buttons — dark rounded buttons, the active
   one an orange gradient with a glow. The button shape applies in
   both themes; the glows and hairlines belong to the dark style,
   which is now the brand default (index.html bootstrap). */
.side .nav { display: flex; flex-direction: column; gap: 8px; }
.side .nav a {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  transition: background .15s ease, border-color .15s ease, box-shadow .15s ease, color .15s ease;
}
.side .nav a:hover { background: var(--card); border-color: var(--accent); color: var(--text); }
.side .nav a.on {
  background: linear-gradient(135deg, #e8632b 0%, #f07f3c 55%, #f0924f 100%);
  border-color: rgba(240, 146, 79, .65);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 8px 22px rgba(232, 99, 43, .35), 0 0 14px rgba(232, 99, 43, .22);
}
html[data-theme="dark"] body {
  background-image:
    radial-gradient(1150px 540px at 50% -14%, rgba(240, 122, 50, .20), rgba(240, 122, 50, 0) 62%),
    radial-gradient(900px 480px at 88% -10%, rgba(232, 99, 43, .13), rgba(232, 99, 43, 0) 60%),
    radial-gradient(720px 420px at -12% 112%, rgba(232, 99, 43, .07), rgba(232, 99, 43, 0) 60%);
  background-attachment: fixed;
}
html[data-theme="dark"] .side {
  background: linear-gradient(180deg, #10131a 0%, var(--bg2) 42%);
  border-right: 1px solid rgba(232, 99, 43, .28);
  border-image: linear-gradient(180deg, transparent 0%, rgba(232, 99, 43, .55) 30%, rgba(255, 176, 102, .7) 52%, rgba(232, 99, 43, .35) 74%, transparent 100%) 1;
  box-shadow: inset -14px 0 28px -14px rgba(240, 122, 50, .35);
}
/* Glowing gradient hairlines (revised 2026-11-18 after Taras compared
   the live app with Olivia's concept: the lines must GLOW — a bright
   core that stretches and fades into the dark, with a soft bloom —
   not sit as flat solid 1px strokes). */
html[data-theme="dark"] .side .who {
  border-top: none;
  position: relative;
}
html[data-theme="dark"] .side .who::before {
  content: ""; position: absolute; top: -3px; left: 4%; right: 4%; height: 7px; pointer-events: none;
  background: radial-gradient(50% 50% at 50% 50%, rgba(255, 186, 110, 1) 0%, rgba(244, 132, 58, .85) 30%, rgba(232, 99, 43, .38) 55%, rgba(232, 99, 43, 0) 75%);
  filter: drop-shadow(0 0 5px rgba(240, 122, 50, .35));
}
html[data-theme="dark"] .page-h {
  padding-bottom: 14px;
  border-bottom: none;
  position: relative;
}
html[data-theme="dark"] .page-h::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -3px; height: 7px; pointer-events: none;
  background: radial-gradient(50% 50% at 50% 50%, rgba(255, 186, 110, 1) 0%, rgba(244, 132, 58, .85) 30%, rgba(232, 99, 43, .38) 55%, rgba(232, 99, 43, 0) 75%);
  filter: drop-shadow(0 0 5px rgba(240, 122, 50, .35));
}
html[data-theme="dark"] .card {
  position: relative;
  background-image: none;
}
html[data-theme="dark"] .card::before {
  content: ""; position: absolute; top: -4px; left: 3%; right: 3%; height: 7px; pointer-events: none;
  background: radial-gradient(50% 50% at 50% 50%, rgba(255, 186, 110, 1) 0%, rgba(244, 132, 58, .85) 30%, rgba(232, 99, 43, .38) 55%, rgba(232, 99, 43, 0) 75%);
  filter: drop-shadow(0 0 5px rgba(240, 122, 50, .35));
}

/* ---------- Smooth theme transition (Taras 2026-11-18) ----------
   While <html> carries .theme-anim (added by MB.theme.apply in app.js
   only for the switch itself, removed after 700 ms), every surface
   eases its colors between the light and dark themes. Gradient layers
   swap instantly underneath the fade, which reads as one smooth
   crossfade. First paint never animates. */
html.theme-anim, html.theme-anim *, html.theme-anim *::before, html.theme-anim *::after {
  transition: background-color .55s ease, color .55s ease, border-color .55s ease, box-shadow .55s ease, fill .55s ease, stroke .55s ease !important;
}

/* ---------- Olivia sign-in redesign (2026-11-20, shell taos-v20261120b) ----------
   Olivia's entry/sign-in cards (Taras approved, headline variant A
   "Sign in to your company"): the sign-in screen goes DARK in the TAOS
   card standard — near-black page with a warm orange ambient glow, no
   visible card slab (the form sits directly on the dark), the TAOS
   mark tile square with an orange underline and glow, the wordmark
   with its A in orange, a glowing orange gradient hairline under the
   subtitle (bright core at the center, fading symmetrically — the
   brand-theme rule), dark slate inputs, a glowing orange primary
   button with dark text, hairline-flanked "or" divider, and WHITE
   Google / Apple buttons with their brand glyphs.
   Scope discipline: the palette is redefined ONLY inside
   .login-wrap.login-olivia, a class login.js adds on non-demo hosts
   (the demo entry keeps its current look untouched, and signup —
   which shares .login-wrap/.login-card — is not in this scope). The
   html-level auth-entry light pin is unchanged; every login sub-flow
   inside the card (forgot / resend / TOTP / company picker) inherits
   the dark scope with the card. */
.login-wrap.login-olivia {
  color-scheme: dark;
  color: var(--text);
  --bg: #07090d;
  --bg2: #131926;
  --card: #0d1017;
  --card2: #171d29;
  --line: rgba(255, 255, 255, .10);
  --line-strong: rgba(255, 255, 255, .24);
  --text: #f4f6fa;
  --muted: #a8b1c1;
  --faint: #6d7686;
  --accent-ink: #f0924f;
  --red: #f05145;
  --red-dim: rgba(240, 81, 69, .13);
  --glow: rgba(232, 99, 43, .14);
  background:
    radial-gradient(760px 480px at 88% -6%, rgba(232, 99, 43, .13) 0%, rgba(232, 99, 43, 0) 60%),
    radial-gradient(1000px 560px at 50% -12%, rgba(232, 99, 43, .09) 0%, rgba(232, 99, 43, 0) 58%),
    linear-gradient(180deg, #0a0d13 0%, #07090d 100%);
}
.login-olivia .login-card {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
  max-width: 402px;
  padding: 28px 30px 28px;
}
/* Mark tile: square like the card, thin light border, orange glow,
   and the orange underline bar under the glyph. Tenant variants are
   excluded — a company logo (.co-logo, white chip) and the small
   logo-less glyph (.co-sm) keep their established treatment. */
.login-olivia .login-card .mark:not(.co-logo):not(.co-sm) {
  position: relative;
  width: 64px; height: 64px; border-radius: 16px; margin-bottom: 20px;
  border: 1px solid rgba(255, 255, 255, .10);
  box-shadow: 0 0 28px rgba(232, 99, 43, .32), 0 0 6px rgba(232, 99, 43, .22);
  overflow: hidden;
}
.login-olivia .login-card .mark:not(.co-logo):not(.co-sm)::after {
  content: ""; position: absolute; left: 50%; bottom: 7px;
  transform: translateX(-50%);
  width: 24px; height: 3px; border-radius: 2px;
  background: linear-gradient(90deg, #f5a623 0%, #ff7d2a 100%);
  box-shadow: 0 0 8px rgba(245, 166, 35, .55);
}
/* Wordmark: larger, white, the A in brand orange (the span is in
   login.js; tenant branding replaces the whole h1 text, span and
   all, exactly as before). */
.login-olivia .login-card h1 { font-size: 30px; font-weight: 800; letter-spacing: .06em; }
.login-olivia .login-card h1 .wm-a { color: var(--accent); }
/* Subtitle with the glowing gradient hairline under it — bright core
   peaking at the center, fading symmetrically to both sides, with
   bloom (the TAOS hairline rule, never a flat stroke). */
.login-olivia .login-card .sub {
  position: relative;
  font-size: 14.5px;
  margin: 8px 0 30px; padding-bottom: 16px;
}
.login-olivia .login-card .sub::after {
  content: ""; position: absolute; left: 50%; bottom: 0;
  transform: translateX(-50%);
  width: 190px; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, rgba(232, 99, 43, 0) 0%, #ff8a3d 50%, rgba(232, 99, 43, 0) 100%);
  box-shadow: 0 0 14px 2px rgba(232, 99, 43, .45);
}
/* Top-right "Open Account ›" — orange and semibold, as on the card. */
.login-olivia .login-card > div:first-child a { font-weight: 600; }
/* Fields: quiet light labels, dark slate inputs, muted placeholders,
   orange focus ring. */
.login-olivia .field label { color: #c6cdd9; font-size: 13px; font-weight: 500; margin-bottom: 8px; }
.login-olivia .field input { border-radius: 14px; padding: 14px 16px; }
.login-olivia .field input::placeholder { color: #69738a; }
.login-olivia .field input:focus {
  border-color: rgba(232, 99, 43, .65);
  box-shadow: 0 0 0 3px rgba(232, 99, 43, .16);
}
/* Primary button: orange gradient, dark text, soft orange bloom
   underneath. Ghost buttons keep their outline treatment — except
   the social buttons below. */
.login-olivia .login-card .btn:not(.ghost) {
  background: linear-gradient(180deg, #f27f31 0%, #e8632b 100%);
  color: #1c1108;
  border-radius: 14px; padding: 14px 20px;
  box-shadow: 0 14px 34px rgba(232, 99, 43, .35), 0 2px 10px rgba(232, 99, 43, .28);
}
/* "or" divider: hairlines flanking the word (the divider div is the
   social box's first child; its inline margins/type stay as-is). */
.login-olivia #social-box > div:first-child {
  display: flex; align-items: center; gap: 14px;
}
.login-olivia #social-box > div:first-child::before,
.login-olivia #social-box > div:first-child::after {
  content: ""; flex: 1; height: 1px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, .18) 50%, rgba(255, 255, 255, 0) 100%);
}
/* Social buttons: white slabs with dark text and the providers'
   brand glyphs (glyphs ride in as CSS background, so the anchors,
   data-prov hooks and click flow in login.js are untouched). */
.login-olivia #social-box a.btn.ghost {
  background: #ffffff; border: none; color: #141821;
  border-radius: 14px; padding: 13px 20px;
  font-size: 15px; font-weight: 600;
  display: flex !important; align-items: center; justify-content: center; gap: 10px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .35);
}
.login-olivia #social-box a.btn.ghost:hover { color: #141821; border-color: transparent; }
.login-olivia #social-box a[data-prov="google"]::before {
  content: ""; flex: 0 0 auto; width: 18px; height: 18px;
  background: url("data:image/svg+xml,%3Csvg%20width%3D%2218%22%20height%3D%2218%22%20viewBox%3D%220%200%20118%20120%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%3Cdefs%3E%3C%2Fdefs%3E%20%3Cg%20id%3D%22Page-1%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%20%3Cg%20id%3D%22Artboard-1%22%20transform%3D%22translate%28-332.000000%2C%20-639.000000%29%22%3E%20%3Cg%20id%3D%22google_buttn%22%20transform%3D%22translate%28332.000000%2C%20639.000000%29%22%3E%20%3Cg%20id%3D%22logo_googleg_48dp%22%3E%20%3Cpath%20d%3D%22M117.6%2C61.3636364%20C117.6%2C57.1090909%20117.218182%2C53.0181818%20116.509091%2C49.0909091%20L60%2C49.0909091%20L60%2C72.3%20L92.2909091%2C72.3%20C90.9%2C79.8%2086.6727273%2C86.1545455%2080.3181818%2C90.4090909%20L80.3181818%2C105.463636%20L99.7090909%2C105.463636%20C111.054545%2C95.0181818%20117.6%2C79.6363636%20117.6%2C61.3636364%20L117.6%2C61.3636364%20Z%22%20id%3D%22Shape%22%20fill%3D%22%234285F4%22%3E%3C%2Fpath%3E%20%3Cpath%20d%3D%22M60%2C120%20C76.2%2C120%2089.7818182%2C114.627273%2099.7090909%2C105.463636%20L80.3181818%2C90.4090909%20C74.9454545%2C94.0090909%2068.0727273%2C96.1363636%2060%2C96.1363636%20C44.3727273%2C96.1363636%2031.1454545%2C85.5818182%2026.4272727%2C71.4%20L6.38181818%2C71.4%20L6.38181818%2C86.9454545%20C16.2545455%2C106.554545%2036.5454545%2C120%2060%2C120%20L60%2C120%20Z%22%20id%3D%22Shape%22%20fill%3D%22%2334A853%22%3E%3C%2Fpath%3E%20%3Cpath%20d%3D%22M26.4272727%2C71.4%20C25.2272727%2C67.8%2024.5454545%2C63.9545455%2024.5454545%2C60%20C24.5454545%2C56.0454545%2025.2272727%2C52.2%2026.4272727%2C48.6%20L26.4272727%2C33.0545455%20L6.38181818%2C33.0545455%20C2.31818182%2C41.1545455%200%2C50.3181818%200%2C60%20C0%2C69.6818182%202.31818182%2C78.8454545%206.38181818%2C86.9454545%20L26.4272727%2C71.4%20L26.4272727%2C71.4%20Z%22%20id%3D%22Shape%22%20fill%3D%22%23FBBC05%22%3E%3C%2Fpath%3E%20%3Cpath%20d%3D%22M60%2C23.8636364%20C68.8090909%2C23.8636364%2076.7181818%2C26.8909091%2082.9363636%2C32.8363636%20L100.145455%2C15.6272727%20C89.7545455%2C5.94545455%2076.1727273%2C0%2060%2C0%20C36.5454545%2C0%2016.2545455%2C13.4454545%206.38181818%2C33.0545455%20L26.4272727%2C48.6%20C31.1454545%2C34.4181818%2044.3727273%2C23.8636364%2060%2C23.8636364%20L60%2C23.8636364%20Z%22%20id%3D%22Shape%22%20fill%3D%22%23EA4335%22%3E%3C%2Fpath%3E%20%3Cpath%20d%3D%22M0%2C0%20L120%2C0%20L120%2C120%20L0%2C120%20L0%2C0%20Z%22%20id%3D%22Shape%22%3E%3C%2Fpath%3E%20%3C%2Fg%3E%20%3C%2Fg%3E%20%3C%2Fg%3E%20%3C%2Fg%3E%20%3C%2Fsvg%3E") center / contain no-repeat;
}
.login-olivia #social-box a[data-prov="apple"]::before {
  content: ""; flex: 0 0 auto; width: 18px; height: 18px;
  background: url("data:image/svg+xml,%3Csvg%20width%3D%2218%22%20height%3D%2218%22%20fill%3D%22%23141821%22%20role%3D%22img%22%20viewBox%3D%220%200%2024%2024%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M12.152%206.896c-.948%200-2.415-1.078-3.96-1.04-2.04.027-3.91%201.183-4.961%203.014-2.117%203.675-.546%209.103%201.519%2012.09%201.013%201.454%202.208%203.09%203.792%203.039%201.52-.065%202.09-.987%203.935-.987%201.831%200%202.35.987%203.96.948%201.637-.026%202.676-1.48%203.676-2.948%201.156-1.688%201.636-3.325%201.662-3.415-.039-.013-3.182-1.221-3.22-4.857-.026-3.04%202.48-4.494%202.597-4.559-1.429-2.09-3.623-2.324-4.39-2.376-2-.156-3.675%201.09-4.61%201.09zM15.53%203.83c.843-1.012%201.4-2.427%201.245-3.83-1.207.052-2.662.805-3.532%201.818-.78.896-1.454%202.338-1.273%203.714%201.338.104%202.715-.688%203.559-1.701%22%2F%3E%3C%2Fsvg%3E") center / contain no-repeat;
}

/* ---------- Olivia sign-in: mobile stability fix (2026-11-20) ----------
   Taras's iPhone recording: the whole sign-in form visibly rode up and
   down while he scrolled/tapped ("рухається меню"). Mechanism: the
   sign-in lived in plain document flow on .login-wrap's
   min-height: 100dvh + flex centering. The card block is ~815px tall —
   taller than the toolbar-shown phone viewport (~745px) — so the
   DOCUMENT scrolled ~70px; document scroll is exactly what drives iOS
   Safari's toolbar show/hide; every toolbar movement re-valued 100dvh,
   the wrap resized, and the flex-centered card re-centered (measured:
   card top 24px <-> 42.7px across the two toolbar states, plus the
   scroll range collapsing 70px -> 0 mid-gesture and snapping scrollY
   back). A feedback loop between scroll, toolbar and centering.
   Cure — the same discipline the app shell got on 2026-10-19/20 for
   the same complaint: pin the layer to the viewport by POSITION and
   scroll INSIDE it. The document never scrolls, the toolbar never
   animates, dvh never re-values, nothing re-centers. Scoped to
   .login-olivia only: the demo entry and the plain .login-wrap views
   (signup, "Signing you in…") keep document flow untouched.
   - position: fixed + inset: 0 sizes the wrap by stretch, not by any
     viewport unit; min-height: 0 cancels the inherited 100dvh floor so
     the box can never exceed the screen.
   - overflow-y: auto makes the wrap itself the single, smooth scroller
     on screens shorter than the card; overscroll-behavior: contain
     keeps the gesture from chaining to the (now unscrollable) document.
     The wrap's background is painted on its own box, so the ambient
     glow stays glued to the screen while the form scrolls over it.
   - margin: auto on the card replaces align/justify centering with the
     overflow-safe kind: identical centered geometry whenever the card
     fits (verified: same 42.72px top at 852px viewport), and when the
     card is taller than the wrap the auto margins resolve to 0, so the
     card starts at the top padding and every pixel stays reachable by
     the internal scroll — align-items: center in a scrolling flex box
     would clip the card's top beyond reach instead.
   Shell taos-v20261120h (2026-11-20, Taras: «підтягнути все до верху»):
   the card is no longer vertically centered — margin-top is a fixed
   28px and only the bottom margin stays auto, so every entry card
   anchors near the top (card top = 24px wrap padding + 28px = 52px;
   the T-tile lands ~110px from the viewport top) and the free space
   collects underneath. Overflow safety is unchanged: the fixed top
   margin is a plain margin, never negative, so a taller-than-wrap
   card still starts inside the scroll area and every pixel of it
   stays reachable by the wrap's internal scroll. The fixed wrap,
   the document-never-scrolls pin, and the wrap-painted ambient glow
   (already anchored to the top of the viewport) are untouched.
   Shell taos-v20261120i (2026-11-20, Taras: «Олівія тобі правильно
   зробила картку» + «в тебе не получається» on a 420x912 iPhone):
   shell h DID hold at tall viewports in cold-cache renders (card top
   52px at 420x912 / 430x932 / 393x932 alike), but 52px of top gap plus
   the phone's status-bar zone lands the tile ~179px from the physical
   top — visibly lower than Olivia's Card 2 composition, whose tile
   sits ~135px from the top (~76px in viewport terms). The total top
   gap is therefore tightened: wrap padding-top 24px -> 14px and card
   margin-top 28px -> 12px (card top 26px, tile at ~76px viewport-top,
   matching her card), and the corner links she drew are restored in
   login.js / signup.js in the same shell.
   Shell taos-v20261120j (same day, Taras: «десь посеред цього всього
   появилася з права сіра риска і мені тепер не скролиться плавно а як
   сторінка а не інтерфейс»): (1) shell i shipped this comment block
   with its paragraph OUTSIDE the comment (a stray closing marker
   above it turned the paragraph plus this rule's selector into one
   invalid selector, and the parser dropped the whole fixed-pin rule
   — the document became the scroller: page-feel scroll and a visible
   document scrollbar). This merged comment is the repair; the rule
   below is live again. (2) The wrap's own scrollbar is hidden
   (scrollbar-width: none + ::-webkit-scrollbar) so no grey stripe
   paints at the right edge even when the wrap scrolls internally.
   (3) Vertical trims so the sign-in fits a phone's visible height
   without scrolling: card padding 36px/34px -> 28px/28px and the
   subtitle's padding-bottom 20px -> 16px (card ~749px tall).
   Overflow safety is unchanged: a taller-than-wrap card still starts
   inside the scroll area and stays reachable by the wrap's internal,
   momentum, overscroll-contained scroll. */
.login-wrap.login-olivia {
  position: fixed;
  inset: 0;
  min-height: 0;
  padding-top: 14px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  scrollbar-width: none;
}
.login-wrap.login-olivia::-webkit-scrollbar { display: none; }
.login-olivia .login-card { margin: 12px auto auto; }

/* ---------- Olivia sign-in: composition gap close (2026-11-20,
   shell taos-v20261120k) ----------
   Taras, on shell j from his real iPhone: «ще не дотягує трішки» and
   «внизу рядок не вліз» — the composition still sat a little lower
   and looser than Olivia's Card 2, and the Privacy/Terms line rode
   the very bottom edge behind Safari's toolbar. This pass was
   MEASURED, not eyeballed: every landmark of her card and of the
   live render was pixel-measured as a fraction of page height
   (fractions taken from below the status bar; her mock is a
   932-class phone, his a 912-class, so the targets were computed in
   his 853pt page frame). Findings and the spacing that closes them:
   - Her "Open Account" baseline sits ~25pt below the page top;
     live j had it at ~70pt — the empty stretch above the header
     row. The corner-link row is pulled up into the card's top
     padding zone (margin-top: -33px) while its padding-bottom
     grows by the same order, so the tile below keeps its place.
   - Her header block (tile -> wordmark -> subtitle) sits ~7pt
     higher than j's: wrap padding-top 14 -> 8 and card margin-top
     12 -> 6 (scoped, see below) plus the row rebalance above net
     the block -7pt, landing tile / wordmark / subtitle on her
     fractions to ~0.5pt.
   - Her subtitle -> hairline gap is ~28pt (j: ~21pt) and her
     hairline -> Email gap is ~28pt (j: ~36pt — the gap Taras
     flagged): .sub padding-bottom 16 -> 22.5px and margin-bottom
     30 -> 22px put the hairline and the Email label both on her
     marks (~0.5pt).
   - Bottom fit: with the trims above plus card padding-bottom
     28 -> 16px and wrap padding-bottom 24 -> 8px, the whole
     sign-in (Open Account row through the Privacy/Terms line) fits
     a 763pt visible height — Safari with toolbars on his phone —
     with NO internal scroll at all and ~29pt of air under the
     Privacy line (shell j scrolled ~36px there and the line rode
     the edge).
   Every rule is scoped to cards that carry the restored corner
   link (.login-card > div:first-child:has(> a) — the sign-in and
   the two signup steps), so the demo entry, invite and the
   confirmation screens keep shell j's geometry exactly. Nothing
   else changes: same colors, fonts, copy, corner links, fixed
   wrap, hidden scrollbar. Her mock draws the input boxes and the
   Sign-in button physically taller than the live components
   (inputs ~57pt vs ~50pt, button ~61pt vs ~45pt), so the button's
   absolute position keeps a residual delta that spacing alone
   cannot close without breaking the 763pt fit — documented in
   the run's measurement table. */
.login-wrap.login-olivia:has(> .login-card > div:first-child:has(> a)) {
  padding-top: 8px;
  padding-bottom: 8px;
}
.login-olivia .login-card:has(> div:first-child:has(> a)) {
  margin-top: 6px;
  padding-bottom: 16px;
}
.login-olivia .login-card > div:first-child:has(> a) {
  margin-top: -33px;
  padding-bottom: 38px;
}
.login-olivia .login-card:has(> div:first-child:has(> a)) .sub {
  padding-bottom: 22.5px;
  margin-bottom: 22px;
}

/* ---------- Olivia auth-entry flow (2026-11-20, shell taos-v20261120d) ----------
   Taras, from the new dark sign-in: "Open Account" landed on the OLD
   light signup — the entry must be logically ONE design. The dark
   scope now covers the whole auth-entry flow: signup.js, invite.js,
   emailconfirm.js and deleteconfirm.js put the same .login-olivia
   class on their .login-wrap (non-demo hosts only, exactly like
   login.js), so every rule above — palette, card, mark, wordmark,
   hairline, fields, primary button, and the fixed-pin stability
   block — applies to them verbatim, and every login sub-flow inside
   the card (forgot / resend / TOTP / company picker) rides the same
   scope. Demo hosts add no class anywhere: the demo entry (light
   card + role picker) is untouched. The rules below are only the
   deltas the shared scope does not already cover. */

/* Root backdrop under a dark entry screen: the browser chrome area
   and any rubber-band edge beyond the fixed wrap paint this — never
   a light flash. The theme-color meta is handled in step (the entry
   pin in MB.theme / the index bootstrap resolves dark on product
   hosts, so apply() writes the dark #0a0c10); this rule covers the
   painted backdrop regardless of the momentary theme state. It is
   scoped by :has() to pages whose DOM holds a dark entry wrap right
   now — the moment the app shell replaces the wrap, the rule stops
   applying and the in-app theme owns the backdrop again. */
html:has(.login-wrap.login-olivia),
html:has(.login-wrap.login-olivia) body { background: #07090d; }

/* Company picker rows (login.js showPicker): .btn.ghost buttons, so
   the social white-slab rule does not reach them — dark slate slabs
   in the same geometry as the scope's inputs and buttons. */
.login-olivia .login-card .btn.ghost.login-pick {
  background: var(--card2);
  border-color: var(--line-strong);
  border-radius: 14px;
  padding: 14px 20px;
}

/* Neutral note boxes inside the card (forgot-password and resend
   confirmations, the social sign-in hint): their inline translucent
   grey wash becomes a defined dark surface in this scope. (Their
   text color already rides in as var(--muted), which the scope
   redefines — only the background needs the override.) */
.login-olivia #forgot-note,
.login-olivia #resend-note,
.login-olivia #login-social-hint {
  background: rgba(255, 255, 255, .06) !important;
}

/* Invite-page social activation (invite.js, #inv-social): the same
   white slabs with brand glyphs as the sign-in social box. The
   anchors key on data-href (the provider rides in the URL), and
   they start disarmed at half opacity — invite.js owns that inline
   state; the slab treatment is inert to it. The "or activate with"
   line gets the same hairline-flanked divider treatment. */
.login-olivia #inv-social > div:first-child {
  display: flex; align-items: center; gap: 14px;
}
.login-olivia #inv-social > div:first-child::before,
.login-olivia #inv-social > div:first-child::after {
  content: ""; flex: 1; height: 1px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, .18) 50%, rgba(255, 255, 255, 0) 100%);
}
.login-olivia #inv-social a.btn.ghost {
  background: #ffffff; border: none; color: #141821;
  border-radius: 14px; padding: 13px 20px;
  font-size: 15px; font-weight: 600;
  display: flex !important; align-items: center; justify-content: center; gap: 10px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .35);
}
.login-olivia #inv-social a.btn.ghost:hover { color: #141821; border-color: transparent; }
.login-olivia #inv-social a[data-href*="/google/"]::before {
  content: ""; flex: 0 0 auto; width: 18px; height: 18px;
  background: url("data:image/svg+xml,%3Csvg%20width%3D%2218%22%20height%3D%2218%22%20viewBox%3D%220%200%20118%20120%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fxlink%22%3E%20%3Cdefs%3E%3C%2Fdefs%3E%20%3Cg%20id%3D%22Page-1%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%20%3Cg%20id%3D%22Artboard-1%22%20transform%3D%22translate%28-332.000000%2C-639.000000%29%22%3E%20%3Cg%20id%3D%22google_buttn%22%20transform%3D%22translate%28332.000000%2C%20639.000000%29%22%3E%20%3Cg%20id%3D%22logo_googleg_48dp%22%3E%20%3Cpath%20d%3D%22M117.6%2C61.3636364%20C117.6%2C57.1090909%20117.218182%2C53.0181818%20116.509091%2C49.0909091%20L60%2C49.0909091%20L60%2C72.3%20L92.2909091%2C72.3%20C90.9%2C79.8%2086.6727273%2C86.1545455%2080.3181818%2C90.4090909%20L80.3181818%2C105.463636%20L99.7090909%2C105.463636%20C111.054545%20%2095.0181818%20117.6%2079.6363636%20117.6%2061.3636364%20L117.6%2C61.3636364%20Z%22%20id%3D%22Shape%22%20fill%3D%22%234285F4%22%3E%3C%2Fpath%3E%20%3Cpath%20d%3D%22M60%2C120%20C76.2%2C120%2089.7818182%2C114.627273%2099.7090909%2C105.463636%20L80.3181818%2C90.4090909%20C74.9454545%2C94.0090909%2068.0727273%2C96.1363636%2060%2C96.1363636%20C44.3727273%2C96.1363636%2031.1454545%2C85.5818182%2026.4272727%2C71.4%20L6.38181818%2C71.4%20L6.38181818%2C86.9454545%20C16.2545455%2C106.554545%2036.5454545%2C120%2060%2C120%20L60%2C120%20Z%22%20id%3D%22Shape%22%20fill%3D%22%2334A853%22%3E%3C%2Fpath%3E%20%3Cpath%20d%3D%22M26.4272727%2C71.4%20C25.2272727%2C71.4%2025.2272727%2067.8%2024.5454545%2063.9545455%2024.5454545%2060%20C24.5454545%2056.0454545%2025.2272727%2052.2%2026.4272727%2048.6%20L26.4272727%2033.0545455%20L6.38181818%2033.0545455%20C2.31818182%2041.1545455%200%2050.3181818%200%2060%20C0%2069.6818182%202.31818182%2078.8454545%206.38181818%2086.9454545%2026.4272727%2071.4%20L26.4272727%2071.4%20Z%22%20id%3D%22Shape%22%20fill%3D%22%23FBBC05%22%3E%3C%2Fpath%3E%20%3Cpath%20d%3D%22M60%2023.8636364%20C68.8090909%2023.8636364%2076.7181818%2C26.8909091%2082.9363636%2032.8363636%20L100.145455%2C15.6272727%20C89.7545455%205.94545455%2076.1727273%200%2060%200%20C36.5454545%200%2016.2545455%2013.4454545%206.38181818%2033.0545455%20L26.4272727%2048.6%20C31.1454545%2034.4181818%2044.3727273%2023.8636364%2060%2023.8636364%20L60%2C23.8636364%20Z%22%20id%3D%22Shape%22%20fill%3D%22%23EA4335%22%3E%3C%2Fpath%3E%20%3Cpath%20d%3D%22M0%2C0%20L120%2C0%20L120%2C120%20L0%2C120%20L0%2C0%20Z%22%20id%3D%22Shape%22%3E%3C%2Fpath%3E%20%3C%2Fg%3E%20%3C%2Fg%3E%20%3C%2Fg%3E%20%3C%2Fg%3E%20%3C%2Fsvg%3E") center / contain no-repeat;
}
.login-olivia #inv-social a[data-href*="/apple/"]::before {
  content: ""; flex: 0 0 auto; width: 18px; height: 18px;
  background: url("data:image/svg+xml,%3Csvg%20width%3D%2218%22%20height%3D%2218%22%20fill%3D%22%23141821%22%20role%3D%22img%22%20viewBox%3D%220%200%2024%2024%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M12.152%206.896c-.948%200-2.415-1.078-3.96-1.04-2.04.027-3.91%201.183-4.961%203.014-2.117%203.675-.546%209.103%201.519%2012.09%201.013%201.454%202.208%203.09%203.792%203.039%201.52-.065%202.09-.987%203.935-.987%201.831%200%202.35.987%203.96.948%201.637-.026%202.676-1.48%203.676-2.948%201.156-1.688%201.636-3.325%201.662-3.415-.039-.013-3.182-1.221-3.22-4.857-.026-3.04%202.48-4.494%202.597-4.559-1.429-2.09-3.623-2.324-4.39-2.376-2-.156-3.675%201.09-4.61%201.09zM15.53%203.83c.843-1.012%201.4-2.427%201.245-3.83-1.207.052-2.662.805-3.532%201.818-.78.896-1.454%202.338-1.273%203.714%201.338.104%202.715-.688%203.559-1.701%22%2F%3E%3C%2Fsvg%3E") center / contain no-repeat;
}

/* Account-deletion confirm (deleteconfirm.js): its button keeps the
   red it carries inline — only the label must stay white on the red
   instead of taking the primary button's dark label. */
.login-olivia #dc-confirm { color: #fff; }

/* Signup Terms overlay: a SIBLING of the wrap, so the scope variables
   never reach it — signup.js tags it .auth-olivia on non-demo hosts
   and these rules hand it the same dark surfaces directly. Its panel
   background and borders ride in as inline styles (var(--card),
   rgba greys resolved against the page theme), hence the !important
   overrides on exactly those two properties. */
#su-terms-overlay.auth-olivia { background: rgba(3, 5, 8, .78) !important; }
#su-terms-overlay.auth-olivia > div {
  background: #0d1017 !important;
  border-color: rgba(255, 255, 255, .14) !important;
  color: #f4f6fa;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .5);
}
#su-terms-overlay.auth-olivia #su-terms-pane { border-color: rgba(255, 255, 255, .14) !important; }
#su-terms-overlay.auth-olivia .btn:not(.ghost) {
  background: linear-gradient(180deg, #f27f31 0%, #e8632b 100%);
  color: #1c1108;
  border-radius: 14px;
  box-shadow: 0 14px 34px rgba(232, 99, 43, .35), 0 2px 10px rgba(232, 99, 43, .28);
}
#su-terms-overlay.auth-olivia .btn.ghost {
  background: transparent;
  color: #f4f6fa;
  border: 1px solid rgba(255, 255, 255, .24);
  border-radius: 14px;
}


/* ---------- Demo entry dark (2026-11-20, shell taos-v20261120f) ----------
   Taras: "а чому демо вхід не чіпала?" — the demo entry is the front
   door (visitors, App Review) and wears the same dark design as the
   rest of the entry flow. The demo rules protect its BEHAVIOR — one
   tap, no form, solo without names, team names, Back to the role
   picker, the "By clicking Start your demo" line — never its look,
   so the demo light carve-out from shells b–d is retired: every
   entry view now puts .login-olivia on the wrap on demo hosts too,
   the entry theme pin resolves dark there as well (index bootstrap
   + MB.theme), and the fixed-wrap stability pattern covers the demo
   entry. The dark treatment ends where the demo session begins —
   no in-app screen is touched. The rules below are only the demo
   deltas the shared scope does not already cover. */

/* Role and size pickers + "This is me" chips: dark slate selectable
   cards. Their base rules ride var(--card), which the scope sets
   near-black; --card2 gives them the slate step. */
.login-olivia .demo-rolegrid button,
.login-olivia .demo-sizegrid button,
.login-olivia .demo-me-btn {
  background: var(--card2);
}

/* The demo's grey disabled Sign in button (inline grey by Taras's
   2026-10-23 order) must not pick up the primary button's orange
   bloom from the scope rule. Scoped to the disabled login button
   only — a live primary keeps its bloom. */
.login-olivia #login-btn[disabled] { box-shadow: none; }

/* The demo's social buttons are DISABLED by design — visible but
   inert (Taras 2026-10-22/23) — so the white-slab treatment, which
   belongs to live buttons, must not reach them: disarmed anchors in
   the social box keep the muted ghost look (their inline opacity
   and pointer-events stay exactly as login.js sets them). */
.login-olivia #social-box a.btn.ghost[aria-disabled="true"] {
  background: transparent;
  border: 1px solid var(--line-strong);
  color: var(--muted);
  box-shadow: none;
  display: block !important;
}

/* The team-code field is a bare input (not a .field input), so the
   generic input fallback painted it mid-grey (#3b3b3b, grey border)
   — off-palette next to the slate fields. Same slate family. */
.login-olivia #demo-join-code {
  background: var(--card2);
  border-color: var(--line);
  color: var(--text);
  border-radius: 14px;
}

/* ---------- Foldable / wide-phone layout (2026-11-22, iPhone Duo) ----------
   Taras's Duo unfolded reports a viewport in the phone band (<=860px), so
   the shell stretched the single-column phone layout across the big
   screen, and the Today/Tomorrow header row could push its date past the
   card's right edge (.sched-d was flex:none + nowrap inside a nowrap flex
   row — the date text spilled out of the card instead of shrinking).
   Two fixes:
   (1) the schedule date may now shrink and ellipsize instead of spilling
       out of its card — at every width;
   (2) in the 641-860px band (unfolded foldables, large phones in
       landscape) the content gets roomier padding and the two-card grids
       actually go two-up, so the wide screen is used. Folded phones
       (<=640px) and the desktop layout (>=861px) are untouched. */
.sched-d { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.sched-top .sched-badge { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
@media (min-width: 641px) and (max-width: 860px) {
  .main { padding-left: 24px; padding-right: 24px; }
  .grid2 { grid-template-columns: 1fr 1fr; }
  .sched-grid { gap: 16px; }
  .sched-card { padding: 20px; }
}

/* ---------- Foldable cover-camera clearance (2026-11-22, iPhone Duo) ----------
   On the Duo's cover screen the front camera sits in a pill at the
   top-right corner, and its touch-dead zone overlaps the app-head's
   account / notifications button (#acct) — Taras could see the button
   but not press it. In the 445-860px band (the Duo cover reports
   ~466pt wide; regular phones are <=440pt and the sidebar layout
   starts at 861px) the app-head gets extra right padding so both
   round buttons sit clear of the camera corner. Nothing else moves. */
@media (min-width: 445px) and (max-width: 860px) {
  .app-head { padding-right: 72px; }
}

/* ---------- Compact sign-in for short screens (2026-11-22, iPhone Duo cover) ----------
   The Olivia sign-in was measured to fit a 763pt visible height
   (shell taos-v20261120k, Taras's tall iPhone). The Duo's cover
   screen shows ~678pt, so the flow overflowed there: the social
   buttons and the Privacy/Terms line fell below the fold and the
   page scrolled. On screens 720pt tall or less the same
   composition runs tighter — smaller mark, shorter spacers,
   slimmer fields and buttons — so the whole sign-in fits one
   screen again. Taller phones keep the measured geometry
   exactly; the demo entry is untouched (no .login-olivia). */
@media (max-height: 720px) {
  .login-wrap.login-olivia { padding-top: 6px; padding-bottom: 6px; }
  .login-olivia .login-card { padding-top: 18px; padding-bottom: 12px; }
  .login-olivia .login-card > div:first-child:has(> a) { margin-top: -24px; padding-bottom: 16px; }
  .login-olivia .login-card .mark:not(.co-logo):not(.co-sm) { width: 46px; height: 46px; border-radius: 13px; margin-bottom: 10px; }
  .login-olivia .login-card h1 { font-size: 27px; }
  .login-olivia .login-card:has(> div:first-child:has(> a)) .sub { padding-bottom: 12px; margin-bottom: 12px; }
  .login-olivia .field { margin-bottom: 9px; }
  .login-olivia .field label { margin-bottom: 5px; }
  .login-olivia .field input { padding-top: 11px; padding-bottom: 11px; }
  .login-olivia .login-card .btn:not(.ghost) { padding-top: 11px; padding-bottom: 11px; }
  .login-olivia #social-box > div:first-child { margin-top: 10px !important; }
  .login-olivia #social-box a.btn.ghost { padding-top: 10px; padding-bottom: 10px; margin-top: 8px !important; }
}
/* The Resend / Forgot row is a space-between flex row styled
   inline; on narrow cards the two links nearly touch — let them
   wrap with a real gap instead. */
@media (max-width: 480px) {
  .login-olivia .login-card form > div:has(> #login-resend-link) { flex-wrap: wrap; gap: 2px 18px; }
}

/* ---------- Sign-in edge-to-edge on phones (2026-11-22, Taras, iPhone Duo cover) ----------
   Taras, on the Duo's cover screen: after the vertical fit,
   the sign-in should also run sideways "по краю" — to the edges
   of the visible area, without the wide empty side margins.
   On phone-width screens the Olivia wrap and card side padding
   slim down, so the fields use the width the screen gives.
   The card's max-width still caps it on wide phones; the demo
   entry (no .login-olivia) is untouched. */
@media (max-width: 480px) {
  .login-wrap.login-olivia { padding-left: 12px; padding-right: 12px; }
  .login-olivia .login-card { padding-left: 18px; padding-right: 18px; }
}

/* Cash-flow movement — Olivia redesign (2026-11-22, shell taos-v20261122g):
   diverging bars around a zero line + white net line, summary tiles on
   the card, tap/hover month detail, 3M/6M/12M switch. Wide screens:
   chart left, tiles + detail stacked right. */
.cf-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.cf-head h3 { margin: 0; }
.cf-seg { flex: none; border-radius: 11px; padding: 3px; gap: 3px; }
.cf-seg .seg-btn { flex: none; padding: 5px 11px; font-size: 12px; border-radius: 8px; }
.cf-grid { display: grid; grid-template-columns: 1fr; gap: 12px; border-radius: 8px; }
.cf-grid:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.cf-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.cf-launch { display: flex; align-items: center; gap: 8px; margin-top: 8px; padding: 8px 12px; border: 1px dashed rgba(255,255,255,.16); border-radius: 10px; font-size: 12.5px; color: var(--muted); }
.cf-launch b { color: var(--text); font-weight: 700; }
.cf-launch-tag { flex: none; font-size: 10.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #ffb27a; border: 1px solid rgba(255,122,26,.4); padding: 2px 6px; border-radius: 6px; }
.cf-tile { background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.06); border-radius: 12px; padding: 10px 12px; min-width: 0; }
.cf-tl { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); white-space: nowrap; }
.cf-tv { font-size: 17px; font-weight: 700; margin-top: 3px; white-space: nowrap; }
.cf-tc { font-size: 11px; color: var(--muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cf-pos { color: #34d8a0; }
.cf-neg { color: #ff6b81; }
.cf-zero { color: #c7ccd4; }
.cf-chartwrap { position: relative; }
.cf-svg { width: 100%; height: auto; display: block; }
.cf-lab { font-size: 11px; fill: #8a8f98; }
.cf-empty-t { font-size: 13px; fill: #8a8f98; }
.cf-hit { cursor: pointer; }
.cf-tip { position: absolute; top: 6px; transform: translateX(-50%); background: #1a1d23; border: 1px solid rgba(255,255,255,.14); color: #e8ebef; font-size: 12px; padding: 6px 9px; border-radius: 8px; pointer-events: none; white-space: nowrap; z-index: 3; box-shadow: 0 6px 18px rgba(0,0,0,.35); }
.cf-detail { font-size: 13px; color: #c7ccd4; line-height: 1.5; min-height: 20px; }
.cf-detail b { color: #fff; font-weight: 600; }
.cf-d2 { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
@media (min-width: 640px) {
  .cf-grid { grid-template-columns: 2fr 1fr; grid-template-areas: "chart tiles" "chart detail"; column-gap: 20px; }
  .cf-tiles { grid-area: tiles; grid-template-columns: 1fr; }
  .cf-chartwrap { grid-area: chart; }
  .cf-detail { grid-area: detail; }
}

/* Operating profit hero — Olivia redesign (2026-11-22, shell taos-v20261122h;
   text treatment revised taos-v20261122i per Taras: the old cream
   card's own text — one-line label, full-size $, one-line uniform
   subline, no chips — on Olivia's dark background):
   dark hero in the cash-flow card family. Corner glow + the old orange
   stripe redrawn as a tilted glowing hairline over a faint band; the
   stripe turns rose on a loss and grey at break-even. Profit number is
   white (green = Received on this page); a loss is rose + LOSS chip.
   Wide layout (>= 640px card width, .wide set by wireHero): 60px
   number left, subline right-aligned on its baseline. Loading/error
   ride the Finance page's existing handling, as with the cf card. */
.ph-card { --ph-card-top:#131a25; --ph-card-bot:#0d1219; --ph-border:rgba(255,255,255,.06);
  --ph-text:#f2f5f9; --ph-muted:#aebfd2; --ph-faint:#8fa3ba; --ph-ghost:#5f7189;
  --ph-accent:#ff7a1a; --ph-accent-hi:#ff9a3c; --ph-accent-soft:#ffb27a;
  --ph-neg:#ff6b81; --ph-neg-soft:#ffa3b1;
  position:relative; isolation:isolate; border-radius:18px; overflow:hidden;
  padding:18px 18px 17px; color:var(--ph-text); font-variant-numeric:tabular-nums;
  background:
    radial-gradient(240px 170px at 100% 0%, rgba(255,122,26,.13), rgba(255,122,26,0) 72%),
    linear-gradient(180deg, var(--ph-card-top), var(--ph-card-bot));
  border:1px solid var(--ph-border);
  box-shadow:0 14px 40px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,255,255,.04); }
.ph-card::before { content:""; position:absolute; top:0; left:8%; right:8%; height:1px; z-index:2;
  background:linear-gradient(90deg, rgba(255,122,26,0) 0%, rgba(255,122,26,.55) 25%, #ff9a3c 50%, rgba(255,122,26,.55) 75%, rgba(255,122,26,0) 100%); }
.ph-card::after { content:""; position:absolute; top:-5px; left:22%; right:22%; height:10px; filter:blur(6px); pointer-events:none; z-index:2;
  background:linear-gradient(90deg, rgba(255,122,26,0), rgba(255,122,26,.45), rgba(255,122,26,0)); }
.ph-stripe { position:absolute; z-index:0; pointer-events:none; top:-24px; bottom:-24px; right:30px; width:46px; transform:skewX(-22deg);
  --s:255,122,26;
  background:linear-gradient(180deg, rgba(var(--s),0) 0%, rgba(var(--s),.11) 34%, rgba(var(--s),.07) 70%, rgba(var(--s),0) 100%); }
.ph-stripe::before { content:""; position:absolute; left:0; top:0; bottom:0; width:1.5px;
  background:linear-gradient(180deg, rgba(var(--s),0) 4%, rgba(var(--s),.55) 30%, var(--ph-stripe-core,#ff9a3c) 48%, rgba(var(--s),.55) 68%, rgba(var(--s),0) 94%); }
.ph-stripe::after { content:""; position:absolute; left:-5px; top:22%; bottom:30%; width:11px; filter:blur(6px);
  background:linear-gradient(180deg, rgba(var(--s),0), rgba(var(--s),.40), rgba(var(--s),0)); }
.ph-card.neg .ph-stripe { --s:255,107,129; --ph-stripe-core:#ff8a9c; }
.ph-card.zero .ph-stripe { --s:174,191,210; --ph-stripe-core:#aebfd2; opacity:.7; }
.ph-in { position:relative; z-index:1; }
.ph-sr { position:absolute; width:1px; height:1px; margin:-1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; }
.ph-label { font-size:13px; font-weight:500; color:var(--ph-muted); line-height:1.3; }
.ph-val { font-size:54px; font-weight:800; letter-spacing:-.02em; line-height:1.05; margin:4px 0 2px; white-space:nowrap; color:var(--ph-text); }
.ph-card.neg .ph-val { color:var(--ph-neg); }
.ph-sub { font-size:13px; color:var(--ph-faint); line-height:1.45; }
