/* Vixty admin shell - vanilla CSS, no dependencies (Phase 6A.2).
   Shared across /index.html, /fleet.html, /zones.html. Layered ON TOP of the
   per-page CSS; provides the topbar/page/workspace/cards/tables/chips. */

:root {
  /* Clean modern UI font stack - Inter when present, else crisp system fallbacks
     (Segoe UI on Windows). No font files shipped; system-resolved only. */
  --vx-font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  --vx-bg: #eef1f6;
  --vx-surface: #ffffff;
  --vx-surface-soft: #f7f9fc;   /* a slightly-recessed panel surface */
  --vx-ink: #1b2330;
  --vx-ink-soft: #5b6472;
  --vx-line: #dfe4ec;
  --vx-line-soft: #eaeef4;
  --vx-accent: #2d6cdf;
  --vx-accent-ink: #1a4fa0;
  --vx-accent-soft: #eef2ff;    /* Cade M5: light-blue tint for semantic "posted/booked" status chips */
  --vx-accent-soft-line: #c5d8f7;   /* N-1: the accent-soft chip border (themed - not light-on-dark in Night) */
  /* 18v-f8: the primary BUTTON fill family. --vx-accent / --vx-accent-ink are INKS (light in the dark theme, for links and
     accents on dark surfaces) and must never be a fill under white text: white on the dark --vx-accent measured 3.26:1.
     Light values equal what the rules rendered before (no light change). */
  --vx-accent-fill: #2d6cdf; --vx-accent-fill-hover: #1a4fa0; --vx-on-accent-fill: #fff;
  /* ... and the edge of a BORDERLESS filled control (fleet.css .vx-publish-btn), drawn as an inset ring so no box moves:
     transparent in light (no light change). */
  --vx-accent-fill-line: transparent;
  --vx-chrome-h: 99px;          /* banner (topbar) + titlebar height - the feed/rail sit BELOW it */
  /* Pane-switcher bar height below 1401px (see the pane-mode section at the end of this file).
     The bar is fixed to the bottom of the viewport, so every sticky full-height column must
     subtract it or its footer (the rail's Save/Cancel, the feed's pager) ends up UNDER it.
     Costs nothing when docked: the bar is display:none there and nothing subtracts it. */
  --vx-pane-bar-h: 52px;
  --vx-on-bg: #e7f6ec; --vx-on-ink: #1d6b3a; --vx-on-line: #b6e0c4;
  --vx-off-bg: #eceef1; --vx-off-ink: #5b636e; --vx-off-line: #d7dbe0;
  --vx-warn-bg: #fcf6df; --vx-warn-ink: #8a6d00; --vx-warn-line: #e8d99a;
  --vx-bad-bg: #fdeceb; --vx-bad-ink: #b3261e; --vx-bad-line: #f2c4c0;
  /* 18v-f5: the destructive BUTTON fill family. --vx-bad-ink is an INK (light in the dark theme, for text on dark
     surfaces) and must never be used as a fill: white on the dark --vx-bad-ink measured 2.72:1. Light values equal
     what button.vx-confirm-primary rendered before (no light change). */
  --vx-bad-fill: #b3261e; --vx-bad-fill-hover: #9c211a; --vx-on-bad-fill: #fff; --vx-bad-fill-line: transparent;
  /* 18v-f6: horizontal cell padding of a dense data table (.vx-data-table--compact). */
  --vx-cell-pad-x-compact: 6px;
  --vx-radius: 14px;
  /* 18v S3: the ticker sits on the FIXED dark .vx-page-titlebar gradient in BOTH themes, so its severity inks follow
     that surface, not the theme. Defined here once and never in a theme block (the light-theme --vx-bad-ink measured
     about 2.5-2.8:1 and --vx-warn-ink about 3.3-3.7:1 on the gradient). */
  --vx-ticker-bad-ink: #ff6f64;
  --vx-ticker-warn-ink: #e8c04a;
  --vx-gap-sm: 6px;      /* small spacing between sibling controls (e.g. a button row) */
  --vx-shadow: 0 1px 2px rgba(20, 28, 46, 0.06), 0 1px 1px rgba(20, 28, 46, 0.04);
  /* One shared control height for the Antessia control family (selects + small
     toggle buttons). Reusable on future menus via .vx-control. */
  --vx-control-height: 38px;
  /* White control template - the shared default action-button/control style,
     matching the Ready operational-status control: white bg, dark ink, subtle
     border, shared control height/radius. ON, Refresh, New, … reuse this. */
  --vx-control-bg: #fff;
  --vx-control-ink: var(--vx-ink);
  --vx-control-border: var(--vx-line);
  --vx-control-border-hover: #c3ccda;
  --vx-control-border-focus: var(--vx-accent);
  --vx-control-hover-bg: #f4f6fb;
  --vx-control-active-bg: #e9edf4;
  /* One explicit, accessible focus ring - replaces the native OS focus outline
     (blue on Linux / black on Windows) so controls render consistently.
     Accent (#2d6cdf) at ~25% alpha via 8-digit hex. */
  --vx-focus-ring: #2d6cdf40;
  /* Thin left indicators on the white status controls (layout-neutral):
     blue for ON (enabled), green for the operational-status (Ready) control. */
  --vx-status-on-indicator: #4FA3D1;
  --vx-status-ready-indicator: #2E7D32;
  /* Compact config-mode notice (quiet operational strip, not a warning panel). */
  --vx-notice-bg: #fffdf5;
  --vx-notice-border: #ecdfae;
  --vx-notice-accent: #c79a16;
  --vx-notice-ink: #7a6420;
  /* Nav/tab hover + active(selected) share ONE neutral state - no blue. */
  --vx-nav-hover-bg: rgba(255, 255, 255, 0.08);  /* sidebar hover/active overlay */
  --vx-nav-active-ink: var(--vx-ink);            /* tab hover/active text + underline */
}

/* ============================ DARK THEME (Day/Night) ========================
   Owner rule 2026-07-18 (Cade cockpit review): a Night theme, activated by
   [data-theme="dark"] on <html>. It ONLY overrides the SHARED design-system token
   VALUES; :root above stays the Light default UNCHANGED, so any not-yet-tokenized
   per-page colour simply stays its Light value (a light speck on dark - graceful,
   never broken). The sidebar/titlebar are already dark, so they need no change.
   The status palette is a DISTINCT dark set (deeper fills, brighter ink) - NOT a
   neutral inversion (Cade condition) - so on/warn/bad chips stay readable. Shadow +
   focus-ring get dark-appropriate variants. To avoid a light->dark FOUC flash the
   theme is set by a tiny inline <head> script BEFORE this stylesheet loads. */
html[data-theme="dark"] {
  --vx-bg: #0f1419;
  --vx-surface: #161c24;
  --vx-surface-soft: #1b2230;
  --vx-ink: #e6edf3;
  --vx-ink-soft: #9aa4b2;
  --vx-line: #29313d;
  --vx-line-soft: #202632;
  --vx-accent: #4b8bff;
  --vx-accent-ink: #7aa7ff;
  --vx-accent-soft: #1a2740;    /* Night: dark-blue recess for the semantic status chips */
  --vx-accent-soft-line: #2a3a5a;
  /* 18v-f8: white on #2563d6 = 5.48:1, on #1d4fb0 (hover) = 7.51:1. The edge on a dark surface comes from each control's
     accent border line (fill vs #161c24 alone is 3.13:1). */
  --vx-accent-fill: #2563d6; --vx-accent-fill-hover: #1d4fb0; --vx-on-accent-fill: #fff;
  /* the fill alone is 2.91:1 on --vx-notice-bg (the Publish panel's warn state) and 2.61:1 on --vx-on-bg; the ring is
     4.88:1 / 4.38:1 there (Grok design r1 #1) */
  --vx-accent-fill-line: #4b8bff;
  --vx-on-bg: #12301f; --vx-on-ink: #4ade80; --vx-on-line: #1f5638;
  --vx-off-bg: #232a34; --vx-off-ink: #9aa4b2; --vx-off-line: #333c48;
  --vx-warn-bg: #322a10; --vx-warn-ink: #e8c04a; --vx-warn-line: #55471a;
  --vx-bad-bg: #391b18; --vx-bad-ink: #ff6f64; --vx-bad-line: #582a26;
  /* 18v-f5: white on #c62f26 = 5.47:1, on #b3261e (hover) = 6.54:1. The fill alone is only ~2.6:1 against the
     confirm card (--vx-warn-bg), so the edge comes from the border line: #ff6f64 vs #322a10 = 5.23:1. */
  --vx-bad-fill: #c62f26; --vx-bad-fill-hover: #b3261e; --vx-on-bad-fill: #fff; --vx-bad-fill-line: #ff6f64;
  --vx-shadow: 0 1px 2px rgba(0, 0, 0, 0.45), 0 1px 1px rgba(0, 0, 0, 0.35);
  --vx-control-bg: #1c232e;
  --vx-control-ink: #e6edf3;
  --vx-control-border: #2a3140;
  --vx-control-border-hover: #3a4454;
  --vx-control-hover-bg: #232b37;
  --vx-control-active-bg: #2a3340;
  --vx-focus-ring: #4b8bff66;
  --vx-notice-bg: #1b2230;
  --vx-notice-border: #33405a;
  --vx-notice-accent: #d6ab2e;
  --vx-notice-ink: #cdb977;
}

/* Owner 2026-09-03: *"cand il dam pe orizontal, ramane cu marimea implicita de pe vertical
   si de asta trebuie facut zoom out"*. iOS Safari auto-adjusts font size on a portrait->landscape
   rotation, which comes back as a page that looks re-zoomed instead of re-laid-out. Both PHONE-FIRST
   pages in this repo already carry the guard (driver.css, driver-login.css); the operator shell
   became a phone surface with pane mode and never got it. On the inherited root so it covers every
   page this stylesheet serves. (The dominant cause of the owner's zoom-out was the shell column's
   floor - see the 760px block - and this is the hardening beside it, not the fix itself.) */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body.vx-app {
  margin: 0; background: var(--vx-bg); color: var(--vx-ink);
  font-family: var(--vx-font);
  font-size: 14px; line-height: 1.45; letter-spacing: 0.1px;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  /* Phase 2 (owner 2026-07-18): 4 zones - sidebar | layout#1 booked feed | layout#2 content |
     layout#3 cockpit rail. Explicit grid-column on each (Cade M6) so two independent JS injectors
     (feed + rail) can't reorder the columns; collapses to 3 / 1 columns on narrower screens below. */
  /* Owner 2026-07-18: a full-width BANNER (topbar row1 + titlebar row2) spans feed+content+cockpit,
     above them. Numeric grid-column + grid-row (not grid-areas) - lower-risk, preserves the M6 anti-
     reorder hardening. Sidebar spans all rows; feed/content/rail sit in row 3 below the banner. */
  display: grid; grid-template-columns: 212px 300px minmax(0, 1fr) auto;
  grid-template-rows: auto auto 1fr; min-height: 100vh;
  min-height: 100dvh;   /* dynamic viewport: shrinks with the iOS toolbar */
}
/* Banner + zone placements are folded into each element's MAIN rule below (sidebar spans all rows M1;
   topbar+titlebar span feed+content+cockpit as the two top rows; feed/content/rail sit in row 3 BELOW
   the banner with a --vx-chrome-h top offset + shrunk height, B2). One rule per selector = no dup. */
/* Form controls inherit the app font (kills browser-default control typography
   that looked cheap, esp. on Windows). */
body.vx-app button, body.vx-app input, body.vx-app select, body.vx-app textarea {
  font-family: inherit; box-sizing: border-box; }
/* Strip native control chrome so OS styling (Windows button border, native
   select arrow, spinner, etc.) doesn't leak and render differently per OS.
   Checkbox/radio keep their native appearance (they need it). */
body.vx-app button,
body.vx-app input:not([type="checkbox"]):not([type="radio"]),
body.vx-app select, body.vx-app textarea {
  -webkit-appearance: none; -moz-appearance: none; appearance: none; }
/* ONE explicit, accessible focus style for every app control - replaces the
   inconsistent native focus ring (blue on Linux, black/native on Windows). */
body.vx-app button:focus-visible,
body.vx-app input:focus-visible,
body.vx-app select:focus-visible,
body.vx-app textarea:focus-visible {
  outline: none;
  border-color: var(--vx-control-border-focus);
  box-shadow: 0 0 0 3px var(--vx-focus-ring);
}
/* Subtle, explicit hover border on text inputs + selects (buttons darken via
   their own brightness hover) - no OS-dependent hover border. */
body.vx-app input:not([type="checkbox"]):not([type="radio"]):hover:not([disabled]),
body.vx-app select:hover:not([disabled]),
body.vx-app textarea:hover:not([disabled]) {
  border-color: var(--vx-control-border-hover); }
/* Explicit disabled state (not OS-default). */
body.vx-app button:disabled, body.vx-app input:disabled,
body.vx-app select:disabled, body.vx-app textarea:disabled {
  opacity: 0.6; cursor: not-allowed; }
/* Consistent CSS chevron for arrow-bearing selects (appearance:none removed the
   native one). The status pill select (.vx-opstatus-select) and .vx-status-toggle
   intentionally stay arrow-less and are not listed here. */
body.vx-app select.vx-driver-select,
body.vx-app select.vx-company-select,
body.vx-app select.vx-row-group-select,
body.vx-app select.vx-row-equip-select,
body.vx-app .vx-filters select,
body.vx-app select.vx-control {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none' stroke='%235b6472' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 9px center;
  padding-right: 26px; }

/* Left sidebar (dark gradient) - hamburger + logo + vertical nav + version */
.vx-sidebar {
  grid-column: 1; grid-row: 1 / -1;   /* spans all rows, left of the banner (Cade M1) */
  background: linear-gradient(180deg, #0a0d14 0%, #11151f 60%, #171c28 100%);
  color: #fff;
  display: flex; flex-direction: column; gap: 8px;
  padding: 12px 12px; border-right: 1px solid #1c2130;
  position: sticky; top: 0; align-self: start; height: 100vh; box-sizing: border-box;
  height: 100dvh;
  overflow: hidden;
}
/* Top row: Antessia logo (left) sits immediately beside the hamburger (right). */
.vx-sidebar-top { display: flex; align-items: center; justify-content: space-between;
  gap: 8px; padding: 0 2px 12px; border-bottom: 1px solid #1c2130; margin-bottom: 8px; }
.vx-sidebar-brand { display: flex; align-items: center; justify-content: flex-start;
  padding: 0; border: none; margin: 0; min-width: 0; }
/* Sidebar wordmark - the transparent Antessia raster (RGBA, no black box). Sized
   by max-height so it stays compact and the nav layout/spacing is unchanged. */
.vx-logo { width: auto; max-width: 132px; max-height: 34px; height: auto; display: block;
  flex: 0 0 auto; }       /* don't let the flex sidebar-brand shrink it to 0 (was invisible) */
/* clickable version footer, pinned to the bottom */
.vx-sidebar-foot { margin-top: auto; display: flex; align-items: center; gap: 7px;
  padding: 12px 8px 2px; border-top: 1px solid #1c2130;
  font-size: 12px; color: #9aa3b2; background: transparent; border-left: none;
  border-right: none; border-bottom: none; cursor: pointer; text-align: left;
  width: 100%; box-sizing: border-box; }
.vx-sidebar-foot:hover { color: #fff; }
.vx-amark { flex: 0 0 auto; color: #5b8cff; }
/* Day/Night toggle - a sidebar-native button (the sidebar is dark in BOTH themes,
   so it keeps a fixed dark-on-light-ink look regardless of data-theme). */
.vx-theme-toggle { display: flex; align-items: center; gap: 6px; width: 100%;
  box-sizing: border-box; margin: 4px 0 0; padding: 7px 10px; font-size: 12px;
  font-weight: 600; color: #cdd4e0; background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.10); border-radius: 8px; cursor: pointer;
  text-align: left; }
.vx-theme-toggle:hover { background: rgba(255, 255, 255, 0.12); color: #fff; }
body.vx-sidebar-collapsed .vx-theme-toggle { justify-content: center; padding: 7px 0;
  font-size: 0; }
body.vx-sidebar-collapsed .vx-theme-toggle::first-letter { font-size: 14px; }
.vx-sidenav { display: flex; flex-direction: column; gap: 4px; }
/* Firm company name: a header at the TOP of the nav (above Dashboard), so it
   collapses with the menu on the hamburger toggle (not beside the logo). */
.vx-firm-brand {
  color: #eef1f6; font-weight: 700; font-size: 15px; letter-spacing: .2px;
  padding: 4px 12px 10px; margin-bottom: 4px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.vx-sidenav a {
  color: #c7cdd8; text-decoration: none; font-size: 14px; font-weight: 500;
  padding: 10px 12px; border-radius: 8px;
  display: flex; align-items: center; gap: 10px;        /* clean icon + label row */
  border-left: 3px solid transparent;                   /* green accent only when active */
}
/* A feature-gated nav item ships [hidden] and is revealed by auth-shell.js (Trips S3:
   data-feature="trips"); display:flex above would otherwise override the UA [hidden] rule. */
.vx-sidenav a[hidden] { display: none; }
/* Nav icon: inline SVG, themeable via currentColor; never shrinks. */
.vx-nav-icon { flex: 0 0 auto; width: 18px; height: 18px; display: inline-flex;
  align-items: center; justify-content: center; opacity: 0.8; }
.vx-nav-icon svg { width: 18px; height: 18px; display: block; }
.vx-nav-label { min-width: 0; }
/* Sidebar hover AND active(selected) share the same neutral overlay - no blue.
   Active adds a green operational left accent + heavier weight. */
.vx-sidenav a:hover { background: var(--vx-nav-hover-bg); color: #fff; }
.vx-sidenav a:hover .vx-nav-icon { opacity: 1; }
.vx-sidenav a.active { background: var(--vx-nav-hover-bg); color: #fff;
  font-weight: 600; border-left-color: var(--vx-status-ready-indicator); }
.vx-sidenav a.active .vx-nav-icon { opacity: 1; color: var(--vx-status-ready-indicator); }
.vx-sidenav a.vx-nav-disabled, .vx-sidenav a[aria-disabled="true"] {
  opacity: 0.4; cursor: not-allowed; }

/* Main column = dark top bar (breadcrumb) + light content */
.vx-shell-main { display: flex; flex-direction: column; min-width: 0; grid-column: 3; grid-row: 3; }

/* Layout #1 - the persisted Booked feed column (injected by booked-feed.js as the 2nd grid child). */
.vx-booked-feed {
  grid-column: 2; grid-row: 3; position: sticky; top: var(--vx-chrome-h); align-self: start;
  height: calc(100vh - var(--vx-chrome-h)); overflow: hidden;
  height: calc(100dvh - var(--vx-chrome-h));
  box-sizing: border-box; padding: 12px; display: flex; flex-direction: column; gap: 8px;
  background: var(--vx-bg); color: var(--vx-ink); border-right: 1px solid var(--vx-line); font-size: 13px;
}
/* owner 2026-07-20: the head sizes to its content (period controls) so the list starts BELOW them
   (no overlap); its full flex-row layout is defined once below. */
.vx-bf-list { flex: 1 1 auto; min-height: 0; overflow: auto; overflow-x: clip;
  display: flex; flex-direction: column; gap: 8px; }
.vx-bf-empty { color: var(--vx-ink-soft); font-size: 12px; padding: 8px 2px; }
.vx-bf-item {
  background: var(--vx-surface); border: 1px solid var(--vx-line); border-radius: var(--vx-radius, 10px);
  box-shadow: var(--vx-shadow, 0 1px 2px rgba(0, 0, 0, 0.06)); padding: 9px 11px;
}
.vx-bf-plate { display: flex; align-items: baseline; gap: 8px; font-weight: 600; }
.vx-bf-co { font-weight: 500; font-size: 11px; color: var(--vx-ink-soft); }
.vx-bf-time { margin-left: auto; white-space: nowrap; font-weight: 400; font-size: 11px; color: var(--vx-ink-soft); }
/* owner 2026-07-19: driver name on its own line under the plate (the person on the load). */
.vx-bf-driver { margin-top: 2px; font-size: 12px; font-weight: 500; color: var(--vx-ink); }
/* booked-load display 2026-10-11: the real course on one line under the driver (server string). */
.vx-bf-load { margin-top: 2px; font-size: 11px; color: var(--vx-ink-soft); }
/* driver stop workflow S4: the stop progress line + its small attention flags (warn tokens). */
.vx-bf-stops { margin-top: 2px; font-size: 11px; color: var(--vx-ink); display: flex; flex-wrap: wrap;
  align-items: center; gap: 4px; }
.vx-bf-stops-flag { padding: 0 6px; border-radius: 6px; font-size: 10px; line-height: 16px;
  background: var(--vx-warn-bg); color: var(--vx-warn-ink); border: 1px solid var(--vx-warn-line); }
.vx-bf-pending { font-size: 10px; color: var(--vx-ink-soft); opacity: 0.8; margin-top: 4px;
  text-transform: uppercase; letter-spacing: 0.4px; }
/* pas 3: a confirmed booked trip reads in the OK/green tone (dispatcher acknowledged it). */
.vx-bf-confirmed { color: var(--vx-on-ink); opacity: 1; text-transform: none;
  letter-spacing: 0; }
/* owner 2026-07-20: booked-trip lifecycle status tones (In Transit / Delivered / Cancelled), tokenised
   so they follow the Day/Night theme (no bespoke hex). */
.vx-bf-intransit { color: var(--vx-accent); opacity: 1; text-transform: none; letter-spacing: 0; }
.vx-bf-delivered { color: var(--vx-on-ink); opacity: 1; text-transform: none; letter-spacing: 0; }
.vx-bf-cancelled { color: var(--vx-ink-soft); opacity: 1; text-transform: none; letter-spacing: 0;
  text-decoration: line-through; }
/* owner 2026-07-21 (two-sided confirm): awaiting the driver's accept (booked, driver not yet confirmed);
   and the In-Transit-but-NOT-dispatch-confirmed red alert. Tokenised (no bespoke hex, theme-safe). */
.vx-bf-awaiting { color: var(--vx-ink-soft); opacity: 1; text-transform: none; letter-spacing: 0; }
.vx-bf-nodispatch { color: var(--vx-bad-ink); }
.vx-bf-nodispatch .vx-bf-warn { color: var(--vx-bad-ink); font-weight: 700; }
.vx-bf-warn { color: var(--vx-bad-ink); font-weight: 700; }
/* Read-more: minimal card by default; details expand inline. */
.vx-bf-det { margin-top: 6px; font-size: 12px; color: var(--vx-ink); display: flex; flex-direction: column; gap: 2px; }
.vx-bf-det[hidden] { display: none; }

/* What's-new: an IN-FLOW panel shown at the TOP of the page content (owner 2026-07-19: clicking the
   version reveals it at the top - not appended at the bottom). NO overlay/backdrop/modal (owner's
   standing "no overlay" rule is kept). Shared across EVERY surface incl. firm pages, injected by
   auth-shell.js. Dismissed via the Close button (or by clicking the version again). */
.vx-wn-panel { width: min(640px, 100%); max-width: 640px; margin: 0 0 16px; }
.vx-wn-panel[hidden] { display: none; }
/* Vixty core-CSS parity fix (2026-09-28): auth-shell.js mounts this panel as the FIRST CHILD of
   #runtime-status-panel, which IS the cockpit rail (class .vx-rail, runtime-status.js:120-121).
   .vx-rail itself does not scroll (overflow: hidden, ~:503-512 - only its own detail card does),
   so a What's-new body taller than the rail's fixed height was clipped with no way to reach the
   rest of it. Scoped to a DIRECT child of .vx-rail so this never touches the panel's OTHER host
   (main.vx-page / body, used when the rail has not been JS-built yet). Pinned:
   tests/test_auth_input_length_pins.py. */
.vx-rail > .vx-wn-panel { overflow: auto; min-height: 0; }
/* CORRECTED 2026-10-09 (owner: "se afiseaza in cockpit, dar deasupra continutului existent ... nu
   era asa inainte"). The rule above is right but only half the job: min-height: 0 made the panel
   SHRINKABLE in the rail's fixed-height flex column, so the rail head, the detail/intro card
   (crushed to ~44px at 1366x768 - its own min-height is 0 too) and Live coverage all re-entered
   the visible rail UNDER the panel. Before it, the un-shrinkable panel pushed them past the
   rail's overflow:hidden edge, so What's new looked like it REPLACED the cockpit. Rendered and
   measured (chromium, Vixty render seam) at HEAD and at 8d108a7^. Fix: while the panel is open
   IN the rail, auth-shell.js (syncRailWhatsNew) puts .vx-rail-wn-open on the rail and the
   detail card + modes bar step aside (display:none - DOM and staged edits survive, the
   rail-collapse idiom); the panel scrolls in the freed space; Live coverage stays pinned
   (owner 2026-07-18/20). (0,4,0) beats the pane floors (body.vx-pane-* .vx-rail-detail-card,
   which set no display anyway). :not(.vx-fwin) keeps the Telematics Focus FLOATING cockpit
   out of it (tests/test_telematics_speed_pill_and_rail_visibility.py - a rail hide must never
   reach the floated window). Pinned: tests/test_whatsnew_inline_frontend.py
   (WhatsNewTakesTheCockpitWhileOpenTests). */
.vx-rail.vx-rail-wn-open:not(.vx-fwin) > .vx-rail-detail-card,
.vx-rail.vx-rail-wn-open:not(.vx-fwin) > .vx-rail-modes-bar { display: none; }
.vx-wn-head { display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-bottom: 10px; }
.vx-wn-head h2 { margin: 0; font-size: 16px; }
/* Small muted helper line under a settings control (Updates page list-timer hint, 2026-10-09). */
.vx-nf-hint { flex-basis: 100%; margin: 0; font-size: 12px; color: var(--vx-ink-soft); }
.vx-bf-readmore { appearance: none; -webkit-appearance: none; border: none; background: transparent;
  color: var(--vx-accent); font: inherit; font-size: 11px; padding: 4px 0 0; cursor: pointer; align-self: flex-start; }
.vx-bf-readmore:hover { text-decoration: underline; }
/* owner 2026-07-20: the booking SESSION line (owner-only) - small, muted, monospace-ish tag. */
.vx-bf-session { font-size: 10px; color: var(--vx-ink-soft); opacity: 0.85; margin-top: 2px;
  letter-spacing: 0.02em; }
/* owner 2026-07-30: the small "Vehicle changed from <A>" bottom note on a reassigned trip's NEW
   (target) row - muted sub-line, tokenised so it follows the Day/Night theme. */
.vx-bf-reassigned-from { font-size: 10px; color: var(--vx-ink-soft); opacity: 0.85; margin-top: 2px; }
/* owner 2026-07-20: per-row dispatcher CONFIRM on a PENDING trip (owner-only). Small accent button,
   tokenised (no bespoke hex) so it follows the Day/Night theme. */
.vx-bf-confirm { appearance: none; -webkit-appearance: none; align-self: flex-start; margin-top: 6px;
  border: 1px solid var(--vx-accent-ink); background: var(--vx-accent-fill); color: var(--vx-on-accent-fill);
  font: inherit; font-size: 11px; font-weight: 600; border-radius: 6px; padding: 3px 12px; cursor: pointer; }
/* 18v-f913 F12: 1.05 lightened the fill under white text to 4.496:1 in light (< 4.5). 0.96 = the .vx-rail-save:hover
   value. For an ENABLED <button> the generic button:hover (0,4,1, brightness 0.97) out-ranks this rule anyway. */
.vx-bf-confirm:hover { filter: brightness(0.96); }
.vx-bf-confirm:disabled { opacity: 0.6; cursor: default; }
/* owner 2026-07-20: Cancel Trip (shown while In Transit) - an OUTLINE variant so it reads distinct from
   the accent-filled Confirm; tokenised. Sits on top of .vx-bf-confirm (shape/size inherited). */
.vx-bf-cancel-trip { border-color: var(--vx-ink-soft); background: transparent; color: var(--vx-ink); }
/* owner 2026-07-29: Change Vehicle (booked-feed Entry 2). */
/* "Change Vehicle" button - neutral outline variant (like Cancel Trip); sits on .vx-bf-confirm shape. */
.vx-bf-change-vehicle { border-color: var(--vx-ink-soft); background: transparent; color: var(--vx-ink); }
/* vehicle_changed status tone - a muted teal so it reads distinct from Delivered (on-ink) + Cancelled. */
.vx-bf-vehicle-changed { color: var(--vx-ink); opacity: 1; text-transform: none; letter-spacing: 0;
  font-style: italic; }
/* S1 (2026-10-15 render check): a reusable row of sibling buttons - wraps on a narrow screen and keeps
   the buttons apart by a token gap (no per-button margins / inline styles). */
.vx-btn-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--vx-gap-sm); }
/* Inline reassign panel below a feed row item. */
.vx-bf-reassign-panel { margin-top: 6px; padding: 8px 10px; background: var(--vx-warn-bg);
  border-radius: 6px; border: 1px solid var(--vx-line); display: flex; flex-direction: column; gap: 6px; }
.vx-bf-reassign-warn { font-size: 12px; color: var(--vx-ink); margin: 0; }
.vx-bf-reassign-status { font-size: 11px; color: var(--vx-ink-soft); margin: 0; }
/* Reusable target-vehicle picker - used in the fleet trip-confirm panel AND the booked-feed row panel. */
.vx-reassign-picker { font: inherit; font-size: 12px; height: var(--vx-control-height);
  border: 1px solid var(--vx-line); border-radius: 6px; background: var(--vx-control-bg);
  color: var(--vx-ink); padding: 0 8px; cursor: pointer; }
.vx-reassign-picker:focus-visible { outline: 2px solid var(--vx-accent); outline-offset: 1px; }
/* fleet.html trip-confirm reassign warning paragraph. */
.vx-reassign-warn { font-size: 13px; color: var(--vx-ink); margin: 8px 0 4px; }
/* New-entry animation: a fresh Booked flies UP from the bottom of the feed to the TOP. */
@keyframes vx-bf-fly { from { transform: translateY(55vh); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.vx-bf-item.is-new { animation: vx-bf-fly 0.6s cubic-bezier(0.22, 1, 0.36, 1); }
@media (prefers-reduced-motion: reduce) { .vx-bf-item.is-new { animation: none; } }
/* owner 2026-07-19: an UNMISTAKABLE "unread" indicator on the feed (#1) + rail (#3)
   reopen controls when new content arrives while the panel is collapsed. The modern
   enterprise pattern: a NOTIFICATION DOT (accent) on the control's corner + a pulsing
   glow ring + an accent border on the control itself. Clearly visible, not kitsch.
   Reduced-motion -> a static (non-animated) dot that is still clearly present. */
.vx-bf-collapse.is-unread, .vx-rail-collapse.is-unread, .vx-pane-seg.is-unread {
  position: relative; overflow: visible;
  color: var(--vx-accent); border-color: var(--vx-accent);
}
.vx-bf-collapse.is-unread::after, .vx-rail-collapse.is-unread::after,
.vx-pane-seg.is-unread::after {
  content: ""; position: absolute; top: -4px; right: -4px;
  width: 11px; height: 11px; border-radius: 50%;
  background: var(--vx-accent);
  box-shadow: 0 0 0 2px var(--vx-surface), 0 0 6px 1px var(--vx-accent);
  animation: vx-unread-dot 1.1s ease-in-out infinite;
}
/* opacity is animated too (not just transform), so the pulse is visible even on a
   browser/GPU that skips transform animations. */
@keyframes vx-unread-dot {
  0%, 100% { transform: scale(1); opacity: 1;
             box-shadow: 0 0 0 2px var(--vx-surface), 0 0 4px 0 var(--vx-accent); }
  50%      { transform: scale(1.45); opacity: 0.5;
             box-shadow: 0 0 0 2px var(--vx-surface), 0 0 11px 2px var(--vx-accent); }
}
/* Reduced-motion: no scale/movement, but a gentle OPACITY breathe (not vestibular
   motion) so the "new" marker still blinks for users who reduce motion. */
@media (prefers-reduced-motion: reduce) {
  .vx-bf-collapse.is-unread::after, .vx-rail-collapse.is-unread::after,
  .vx-pane-seg.is-unread::after {
    animation: vx-unread-fade 1.4s ease-in-out infinite;
  }
}
@keyframes vx-unread-fade { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
.vx-bf-more {
  flex: 0 0 auto; appearance: none; -webkit-appearance: none; border: 1px solid var(--vx-line);
  background: var(--vx-control-bg); color: var(--vx-ink); border-radius: 8px; padding: 6px 10px;
  font: inherit; font-size: 12px; cursor: pointer;
}
.vx-bf-more:hover { background: var(--vx-control-hover-bg); }
.vx-bf-more[hidden] { display: none; }
/* owner 2026-07-21 (#60): the Booked-feed page arrows (◀ i/N ▶) - a fixed-height row BELOW the list
   (the list flexes to fill the remaining window). Reuses the .vx-bf-nav arrow style + .vx-bf-navrow. */
.vx-bf-pager { flex: 0 0 auto; justify-content: center; padding-top: 8px; }
.vx-bf-pager[hidden] { display: none; }
.vx-bf-pg-ind { font-size: 11px; color: var(--vx-ink-soft); min-width: 46px; text-align: center; }
.vx-topbar {
  grid-column: 2 / -1; grid-row: 1;   /* banner row 1, over feed+content+cockpit (owner 2026-07-18) */
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 12px;
  background: linear-gradient(90deg, #11151f 0%, #1a2030 100%); color: #fff;
  padding: 0 18px; height: 52px;
  box-shadow: 0 1px 6px rgba(16, 22, 35, 0.22);
}
/* Hamburger (lives in the sidebar) - toggles the collapsed RAIL. */
.vx-burger { display: inline-flex; flex-direction: column; gap: 3px;
  width: 32px; height: 32px; align-items: center; justify-content: center;
  background: transparent; border: 1px solid #2a3142; border-radius: 7px;
  cursor: pointer; padding: 0; flex: 0 0 auto; }
.vx-burger span { display: block; width: 16px; height: 2px; background: #c7cdd8;
  border-radius: 2px; }
.vx-burger:hover { background: rgba(255, 255, 255, 0.08); }
/* Collapsed = narrow rail. Sidebar STAYS a grid child (no display:none, so the
   main column never shifts to col 1). Only the hamburger remains visible. */
body.vx-sidebar-collapsed { grid-template-columns: 56px 300px minmax(0, 1fr) auto; }
/* Layout #1 collapse (owner 2026-07-18): the feed is a FIXED 300px track, so - like the sidebar, not
   the rail - collapsing REWRITES the track to a thin strip (Cade MJ-3), reclaiming the space. */
body.vx-booked-feed-collapsed { grid-template-columns: 212px 40px minmax(0, 1fr) auto; }
body.vx-sidebar-collapsed.vx-booked-feed-collapsed { grid-template-columns: 56px 40px minmax(0, 1fr) auto; }
/* owner 2026-09-03: the three rules that hide the feed's CONTENT carry :not(.vx-pane-booked).
   The feed ships COLLAPSED by default (unset localStorage -> collapsed, booked-feed.js:77-84) and
   these rules hide by BODY CLASS, not by width - so below 1401px, where the feed is no longer a
   collapsible TRACK but a full-width PANE, they would render it as a lone blank head strip on
   every fresh browser. "Collapsed" has no meaning for a pane; the exclusions turn the concept off
   exactly there and nowhere else (the docked collapse preference is untouched).
   CORRECTED 2026-09-28 (Vixty core-CSS parity): the exclusion above covered `Booked` only, but
   `showPane("both")` sets vx-pane-split (booked-feed.js:445) WITHOUT clearing
   vx-booked-feed-collapsed, and `Both` (booked-feed.js:2044, the 761-1200px band) shows this
   same feed content beside the rail - so a fresh browser landing in `Both` hit the identical
   blank-head-strip bug the July fix was meant to close. Added :not(.vx-pane-split) so BOTH
   panes are covered, matching the rail-collapse rules at :572-574/:730, which already did this
   right. Pinned: tests/test_booked_feed_pane_mode.py
   (CollapsedByDefaultTrapTests.test_every_collapse_content_rule_is_also_neutralised_in_the_split_pane). */
body.vx-booked-feed-collapsed:not(.vx-pane-booked):not(.vx-pane-split) .vx-booked-feed { padding: 12px 6px; }
body.vx-booked-feed-collapsed:not(.vx-pane-booked):not(.vx-pane-split) .vx-booked-feed > *:not(.vx-bf-head) { display: none; }
/* owner 2026-07-19: when the feed is collapsed to the thin strip, hide the period controls too -
   only the collapse toggle stays (they live INSIDE .vx-bf-head, so the rule above misses them). */
body.vx-booked-feed-collapsed:not(.vx-pane-booked):not(.vx-pane-split) .vx-bf-controls { display: none; }
/* owner 2026-07-20: the toggle sits top-right; the controls STACK vertically to its left. */
.vx-bf-head { flex: 0 0 auto; display: flex; align-items: flex-start; gap: 6px; min-height: 26px; }
/* owner 2026-07-19/20: Booked-feed period controls - the mode row, then (Weekly/Daily) an arrows row
   BELOW it, then the period description; stacked so nothing is clipped and the list starts below. */
.vx-bf-controls { display: flex; flex-direction: column; align-items: flex-start; gap: 6px;
  flex: 1 1 auto; min-width: 0; }
.vx-bf-navrow { display: flex; align-items: center; gap: 8px; }
.vx-bf-navrow[hidden] { display: none; }
/* "Week N" / day label with a TRANSPARENT date input overlaid (click = open the native picker). */
.vx-bf-period-label { position: relative; display: inline-flex; align-items: center;
  justify-content: center; min-width: 96px; font-size: 12px; font-weight: 600; color: var(--vx-ink);
  border: 1px solid var(--vx-line); border-radius: 8px; padding: 2px 8px; cursor: pointer;
  background: var(--vx-control-bg); }
.vx-bf-period-label:hover { background: var(--vx-control-hover-bg); }
.vx-bf-period-label .vx-bf-date { position: absolute; inset: 0; width: 100%; height: 100%;
  opacity: 0; border: 0; padding: 0; margin: 0; cursor: pointer; }
.vx-bf-seg { display: inline-flex; border: 1px solid var(--vx-line); border-radius: 8px; overflow: hidden; }
.vx-bf-seg-btn { border: none; background: var(--vx-control-bg); color: var(--vx-ink-soft);
  font-size: 11px; padding: 3px 8px; cursor: pointer; line-height: 1.4; }
.vx-bf-seg-btn + .vx-bf-seg-btn { border-left: 1px solid var(--vx-line); }
.vx-bf-seg-btn:hover { background: var(--vx-control-hover-bg); }
.vx-bf-seg-btn.is-active { background: var(--vx-accent-soft); color: var(--vx-on-ink); font-weight: 600; }
/* prev/next arrows that step the anchor by a whole week / day (owner 2026-07-19). */
.vx-bf-nav { width: 22px; height: 22px; padding: 0; line-height: 1; font-size: 11px;
  border: 1px solid var(--vx-line); border-radius: 8px; background: var(--vx-control-bg);
  color: var(--vx-control-ink); cursor: pointer; }
.vx-bf-nav:hover { background: var(--vx-control-hover-bg); }
.vx-bf-nav[hidden] { display: none; }
.vx-bf-weeklabel { font-size: 11px; color: var(--vx-ink-soft); white-space: nowrap; }
.vx-bf-weeklabel[hidden] { display: none; }
.vx-bf-collapse { margin-left: auto; width: 26px; height: 26px; padding: 0; line-height: 1;
  border: 1px solid var(--vx-line); border-radius: 8px; background: var(--vx-control-bg);
  color: var(--vx-control-ink); cursor: pointer; }
.vx-bf-collapse:hover { background: var(--vx-control-hover-bg); }

/* ===== Telematics v3 (slice E): Layout #1 screen host + filter panel + clickable rows =====
   Four documented, tokens-only reusable classes (no new hex; no inline styles). */
/* The screen wrapper: the template hook for any future Layout-#1 screen. It carries the
   FULL flex chain so #vx-bf-list keeps growing against it and measurePerPage stays a real
   number; a hidden (inactive) screen is display:none. */
.vx-bf-screen { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; }
.vx-bf-screen[hidden] { display: none; }
/* SL-1: the period controls MOVED into the column-flex screen wrapper carry flex:1 1 auto
   (written for the horizontal head ROW); pin them to flex:0 0 auto here so they do not steal
   vertical grow from #vx-bf-list (else measurePerPage under-measures on every Telematics load). */
.vx-bf-screen > .vx-bf-controls { flex: 0 0 auto; }
/* The narrow VERTICAL filter stack (screen #2). .vx-filters (elsewhere) is a horizontal wrap
   row; a narrow vertical stack for the feed column is genuinely absent - hence this class. */
.vx-filter-panel { display: flex; flex-direction: column; gap: 8px; padding: 4px 0;
  overflow: auto; overflow-x: clip; min-height: 0; }
/* One label + control per group. Its <select> EXTENDS the shared control rule by restating
   the selector (the vixty.css:155/1208 pattern) - no duplicated literals. */
.vx-filter-group { display: flex; flex-direction: column; gap: 2px; }
.vx-filter-group label { font-size: 12px; color: var(--vx-ink-soft); }
.vx-filter-group select { box-sizing: border-box; height: var(--vx-control-height);
  padding: 0 10px; border-radius: 8px; border: 1px solid var(--vx-control-border);
  background: var(--vx-control-bg); color: var(--vx-control-ink); font-size: 13px; }
/* Clickable-row affordance for NEW code (replaces the ad-hoc row.style.cursor pattern).
   is-selected marks the currently-open Cockpit driver (works on the list-only path too). */
.vx-row-clickable { cursor: pointer; }
.vx-row-clickable.is-selected { background: var(--vx-accent-soft); }

/* Below 1400px the fixed chrome (sidebar+feed+rail) is too wide -> drop the feed column to 3 zones. */
@media (max-width: 1400px) {
  /* Cade NIT-B: the feed is display:none here, so drop its track entirely - also for the collapsed
     combos (higher base specificity) so no 40px orphan column survives. */
  body.vx-app,
  body.vx-booked-feed-collapsed { grid-template-columns: 212px minmax(0, 1fr) auto; }
  body.vx-sidebar-collapsed,
  body.vx-sidebar-collapsed.vx-booked-feed-collapsed { grid-template-columns: 56px minmax(0, 1fr) auto; }
  .vx-booked-feed { display: none; }
  .vx-shell-main { grid-column: 2; }
  .vx-rail { grid-column: 3; }
}

/* ===== Live coverage RIGHT RAIL (owner rule 2026-07-18, cockpit S3) =========
   The re-homed runtime-status panel: grid column 3 (auto width). Sticky, own scroll,
   themed via --vx-* tokens (readable in Day + Night). Collapsible to a thin strip so a
   narrow laptop keeps the content column; auto-collapses on medium screens; on mobile it
   drops out of the grid entirely (the shell stacks to one column). */
/* Owner R1 (Cade): the rail is a FLEX COLUMN of two rounded "window" cards. The rail itself does
   NOT scroll (overflow:hidden); only the TOP detail card scrolls, so there's exactly one scroll
   region + the coverage card stays pinned at the bottom, always visible. */
.vx-rail {
  grid-column: 4; grid-row: 3;    /* layout #3 (cockpit) - explicit placement (Cade M6 + B2 below-banner) */
  position: sticky; top: var(--vx-chrome-h); align-self: start;
  height: calc(100vh - var(--vx-chrome-h)); overflow: hidden;
  height: calc(100dvh - var(--vx-chrome-h));
  width: 320px; box-sizing: border-box; padding: 12px;
  display: flex; flex-direction: column; gap: 10px;
  background: var(--vx-bg); color: var(--vx-ink); font-size: 13px; line-height: 1.4;
  border-left: 1px solid var(--vx-line);
}
.vx-rail-head { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.vx-rail-title { font-weight: 600; display: flex; align-items: center; gap: 8px; }
.vx-rail-collapse, .vx-rail-coverage-collapse { margin-left: auto; width: 26px; height: 26px;
  padding: 0; border: 1px solid var(--vx-line); border-radius: 8px;
  background: var(--vx-control-bg); color: var(--vx-control-ink); cursor: pointer;
  line-height: 1; }
.vx-rail-collapse:hover, .vx-rail-coverage-collapse:hover { background: var(--vx-control-hover-bg); }
/* owner 2026-09-06 (iPhone 16e): the Live-coverage card's OWN collapse toggle - reuses the
   rail-head chevron's exact look (shared declaration above), not a new control. Hidden at a
   docked width (the July pinning keeps coverage always-open there); shown only inside a pane
   (see @media (max-width: 1200px) below), where it defaults to collapsed. */
.vx-rail-coverage-collapse { display: none; }
/* A "window-in-window" card: rounded, own surface + border + shadow. */
.vx-rail-card { background: var(--vx-surface); border: 1px solid var(--vx-line);
  border-radius: var(--vx-radius); box-shadow: var(--vx-shadow); padding: 12px 14px;
  box-sizing: border-box; }
.vx-rail-card-title { font-weight: 600; margin-bottom: 6px; display: flex; align-items: center;
  gap: 8px; }
/* owner 2026-07-19: the default-cockpit menu intro (moved from the top line). Subtle, readable. */
.vx-rail-intro { font-size: 12px; line-height: 1.5; color: var(--vx-ink-soft); }
/* owner 2026-07-19: the menu Intro (default cockpit) wears the SAFE-TESTING callout accent - a thin
   left border + the notice tint - ONLY in the intro state (a selected row's detail has no accent). */
.vx-rail-card.vx-rail-intro-mode { border-left: 3px solid var(--vx-notice-accent);
  background: var(--vx-notice-bg); }
.vx-rail-card.vx-rail-intro-mode .vx-rail-card-title { color: var(--vx-notice-ink);
  text-transform: uppercase; font-size: 11px; letter-spacing: 0.5px; }
/* owner 2026-07-20: "Check coverage" + "Recompile now" on one line (config pages only). */
.vx-rail-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0 0 8px; }
.vx-rail-recompile { padding: 5px 10px; font-size: 12px; cursor: pointer;
  background: var(--vx-control-bg); color: var(--vx-control-ink);
  border: 1px solid var(--vx-control-border); border-radius: 6px; }
.vx-rail-recompile:hover { background: var(--vx-control-hover-bg); }
/* 2026-10-10: the "Recompile now" outcome (compile + per-runtime result). It lives INSIDE the
   coverage card's title row - the one child the collapsed pane keeps visible - so the title row
   wraps and the line takes a full row of its own under the heading. Tokens only. */
.vx-rail-coverage-card .vx-rail-card-title { flex-wrap: wrap; }
.vx-rail-recompile-status { flex-basis: 100%; font-weight: 400; font-size: 12px;
  line-height: 1.4; color: var(--vx-ink-soft); overflow-wrap: anywhere; }
.vx-rail-recompile-status.is-success { color: var(--vx-on-ink); }
.vx-rail-recompile-status.is-error { color: var(--vx-bad-ink); }
/* TOP = detail card: grows + is the ONLY scroller. BOTTOM = coverage: content-sized, pinned. */
/* Cade M2: content-sized (flex-grow 0) but STILL the only scroller (min-height:0 + overflow:auto),
   so a short detail no longer stretches to shove coverage around, and a tall detail scrolls in place. */
/* 2026-11-03 (D2): the sticky action bar covered the last field (Site phones: "Where did you find it?").
   The bar's top margin (24px, above) is clear space at the END of the scroll; scroll-padding-bottom keeps a
   focused field out from under the bar while tabbing. One shared fix for every rail panel. */
.vx-rail-detail-card { flex: 0 1 auto; min-height: 0; overflow: auto; scroll-padding-bottom: 64px; }
/* owner 2026-07-18: an empty detail card is HIDDEN (no placeholder box) - the flex display on the
   card class would otherwise override the [hidden] UA rule, so hide it explicitly. */
.vx-rail-detail-card[hidden] { display: none; }
/* owner 2026-07-18: coverage is PINNED to the bottom (margin-top:auto eats the free space above), so
   it stays put whether the detail card is shown, hidden, or short. */
/* owner 2026-07-20: Live coverage stays PINNED to the bottom of the rail (margin-top:auto), fixed -
   it must NOT move with the top detail window, regardless of the detail card's own height. */
.vx-rail-coverage-card { flex: 0 0 auto; margin-top: auto; }
/* Detail-card X close (top-right in the title row) + read-only link field + a danger action button. */
.vx-rail-x { margin-left: auto; width: 22px; height: 22px; padding: 0; line-height: 1;
  border: 1px solid var(--vx-line); border-radius: 6px; background: var(--vx-control-bg);
  color: var(--vx-ink-soft); cursor: pointer; font-size: 15px; }
.vx-rail-x:hover { background: var(--vx-control-hover-bg); color: var(--vx-ink); }
.vx-rail-link { color: var(--vx-accent); text-decoration: none; }
.vx-rail-link:hover { text-decoration: underline; }
.vx-rail-danger { border-color: var(--vx-bad-line); color: var(--vx-bad-ink); }
/* Collapsed = a thin strip: only the header shows; both cards hide (DOM + any edit preserved). */
/* owner 2026-09-03 (S1): body:not(.vx-pane-cockpit), the SAME neutralisation the Booked pane
   needed for .vx-booked-feed-collapsed. "Collapsed" is a persisted DOCKED-track preference with
   no meaning for a pane - an operator who collapsed the rail on a desktop would otherwise open
   the Cockpit pane on a phone and find a blank head strip. The pane bar is the way in and out.
   EXTENDED 2026-09-04 (S3): :not(.vx-pane-split) too - `Both` shows the rail beside the feed at
   761-1200, and a desktop-collapsed rail would render there as a blank 40px strip next to it. */
body:not(.vx-pane-cockpit):not(.vx-pane-split) .vx-rail.vx-rail-collapsed { width: 40px; padding: 12px 6px; }
body:not(.vx-pane-cockpit):not(.vx-pane-split) .vx-rail.vx-rail-collapsed .vx-rail-title { display: none; }
body:not(.vx-pane-cockpit):not(.vx-pane-split) .vx-rail.vx-rail-collapsed .vx-rail-card { display: none; }
/* S4 delegated detail panel inside the rail (tokenized; presentation-only). */
.vx-rail-detail { display: flex; flex-direction: column; gap: 8px; }
.vx-rail-field { display: flex; flex-direction: column; gap: 2px; }
.vx-rail-field label { font-size: 11px; color: var(--vx-ink-soft); text-transform: uppercase;
  letter-spacing: .03em; }
.vx-rail-value { color: var(--vx-ink); word-break: break-word; }
/* Compact row kebab (shared, tokenised) - a "..." trigger + a small menu, for dense admin tables
   (e.g. the company-users table's per-user actions). Like the Drivers kebab, no bespoke inline styles. */
.vx-umenu { position: relative; display: inline-block; }
.vx-umenu-btn { background: none; border: 1px solid var(--vx-line); border-radius: 6px;
  color: var(--vx-ink-soft); cursor: pointer; padding: 2px 9px; font-size: 15px; line-height: 1; }
.vx-umenu-btn:hover { background: var(--vx-control-hover-bg); color: var(--vx-ink); }
/* FIXED-positioned (placed at the trigger by JS) so it floats ABOVE the layout and is never clipped
   by the table-wrap overflow - the absolute version appeared only after scrolling. */
.vx-umenu-list { position: fixed; z-index: 1000;
  background: var(--vx-surface); border: 1px solid var(--vx-line); border-radius: 8px;
  box-shadow: var(--vx-shadow); min-width: 150px; padding: 4px; }
.vx-umenu-list[hidden] { display: none; }
.vx-umenu-item { display: block; width: 100%; text-align: left; background: none; border: none;
  color: var(--vx-ink); padding: 6px 10px; border-radius: 6px; cursor: pointer; font-size: 13px; }
.vx-umenu-item:hover { background: var(--vx-control-hover-bg); }
.vx-uname-sub { display: block; font-size: 11px; color: var(--vx-ink-soft); }
/* Settings: the Booked-alert-sound control row (sound select + enable toggle + Play). */
.vx-sound-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 6px 0 4px; }
.vx-sound-lbl { font-size: 13px; color: var(--vx-ink-soft); }
.vx-sound-current { font-size: 12px; color: var(--vx-ink-soft); font-weight: 500; }
/* Toned read-only value = an enterprise callout for warnings/errors in the rail (tokenised, both
   themes). danger = permanent/destructive (red); warn = reversible caution / blocker (amber). A left
   accent bar + tinted bg keeps it distinct from plain fields without shouting. */
.vx-rail-value--danger, .vx-rail-value--warn {
  padding: 8px 10px; border-radius: 8px; border: 1px solid transparent;
  border-left-width: 3px; font-size: 12.5px; line-height: 1.45; }
.vx-rail-value--danger { background: var(--vx-bad-bg); color: var(--vx-bad-ink);
  border-color: var(--vx-bad-line); }
.vx-rail-value--warn { background: var(--vx-warn-bg); color: var(--vx-warn-ink);
  border-color: var(--vx-warn-line); }
/* owner 2026-07-21 (#64): an empty read-only VIEW field shows a muted, italic "Not defined" placeholder
   (tokenised) instead of a bare "-". Presentation only - the stored value stays null. */
.vx-rail-notdef { color: var(--vx-ink-soft); font-style: italic; }
/* owner 2026-07-21 (#63/#65): the sticky PICKUP/DELIVERY sub-selector above a sided editor (Schedule
   fields / Zone-groups pager). Reuses the .vx-bf-seg style; full-width, pinned to the top of the
   scrolling detail card so it stays visible while paging the selected side. */
.vx-rail-side-seg { position: sticky; top: 0; z-index: 2; display: flex; width: 100%;
  margin: 0 0 8px; background: var(--vx-surface); }
.vx-rail-side-seg .vx-bf-seg-btn { flex: 1 1 0; text-align: center; }
.vx-rail-input { height: 32px; border: 1px solid var(--vx-control-border); border-radius: 8px;
  background: var(--vx-control-bg); color: var(--vx-control-ink); padding: 0 10px;
  box-sizing: border-box; font: inherit; }
.vx-rail-select { width: 100%; appearance: none; -webkit-appearance: none; cursor: pointer; }
/* SLICE 1 (owner 2026-07-20): reusable read-only PAGINATED cockpit content ("rail pager"). One page
   at a time; ◀/▶ nav + "i / N" indicator when >1 page. Presentation-only, tokenised, no overlay,
   reduced-motion safe (no animation). Every page reuses these instead of hand-rolling more content. */
.vx-rail-pager { display: flex; flex-direction: column; gap: 8px; }
.vx-rail-pg-body { display: flex; flex-direction: column; gap: 8px; }
.vx-rail-pg-title { font-weight: 600; font-size: 11px; color: var(--vx-ink-soft);
  text-transform: uppercase; letter-spacing: .05em; }
.vx-rail-pg-row { display: flex; flex-direction: column; gap: 2px; }
.vx-rail-pg-k { font-size: 11px; color: var(--vx-ink-soft); text-transform: uppercase;
  letter-spacing: .03em; }
.vx-rail-pg-v { color: var(--vx-ink); word-break: break-word; }
/* owner 2026-09-07: an OPTIONAL Copy affordance on a pager row's value (Telematics Cockpit
   "Coordinates"/"Address" rows - paste straight into Google Maps search). Wraps the value in a
   row so a "Copy" button sits on the right instead of stacking under the label; a row that does
   not opt in (no `copy: true`) never gets this wrapper, so it stays byte-identical to before.
   The button keeps the shared plain-button look (design-system rule: colours/border/radius are
   inherited from the global `button` rule, already tokenised) - just shorter than the default
   control height, sized for a dense rail row. */
.vx-rail-pg-vwrap { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.vx-rail-pg-vwrap .vx-rail-pg-v { flex: 1 1 auto; min-width: 0; }
.vx-rail-pg-copy { flex: 0 0 auto; height: 26px; padding: 0 10px; font-size: 12px; }
/* owner 2026-07-21 (Slice B): an editable field inside the paginated Zones editor - full-width input
   aligned under its label, checkbox left. Reuses the shared .vx-rail-input tokens (no bespoke hex). */
.vx-rail-pg-input { width: 100%; }
.vx-rail-pg-input[type="checkbox"] { width: 18px; height: 18px; align-self: flex-start; }
/* Per-page STRUCTURAL act row inside the editable pager (owner 2026-09-02): add/remove
   ring + zone, create/reset override. Layout ONLY - the buttons keep the shared
   .vx-rail-open look (and .vx-rail-danger for a destructive one), so nothing is hand-rolled. */
.vx-rail-pg-acts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.vx-rail-pg-act { flex: 0 0 auto; }
/* owner 2026-08-29 (occlusion fix, RETIRES the 2026-07-25 sticky-bottom navbar below): a page could
   carry TWO independent sticky-bottom footers - this navbar and .vx-rail-detail-acts (Save/Cancel) -
   pinned to the SAME scrollport edge with the same negative-margin idiom; .vx-rail-detail-acts is
   built LATER in renderRailDetail()'s tree order (runtime-status.js ~:1012 vs the pager mount
   ~:917), so it painted OVER the ◀/▶ arrows - not "below the fold", OCCLUDED. The fix moves the nav
   into ".vx-rail-pg-head" (sticky-TOP instead), so .vx-rail-detail-acts is now the ONLY sticky-bottom
   rule left in this whole stylesheet - the collision is structurally impossible, not rearranged.
   .vx-rail-pg-navbar itself keeps its base look (for readability / any future non-head reuse) minus
   the sticky-bottom positioning; the descendant rule right after .vx-rail-pg-head neutralises its
   footer-style margin/padding/border when it is actually nested inside a head (both current callers -
   renderRailPager and renderEditPager - always nest it there today). */
.vx-rail-pg-navbar { display: flex; align-items: center; justify-content: center; gap: 12px;
  background: var(--vx-surface); border-top: 1px solid var(--vx-line);
  margin: 8px -14px -12px; padding: 10px 14px; }
.vx-rail-pg-navbar[hidden] { display: none; }   /* sided pager: hide the arrows when one page fits a side */
/* THE sticky cluster: PICKUP/DELIVERY seg (when present) + the ◀/▶ nav, pinned together to the TOP
   of the scrolling detail card (see the JS-side occlusion-fix comments on renderRailPager /
   renderEditPager in runtime-status.js for the full story). Negative margins bleed to the card's own
   padding edges (the card is 12px 14px) - the mirror of the .vx-rail-detail-acts footer idiom below,
   reflected top<->bottom. z-index 2 matches .vx-rail-side-seg's own (now-redundant, harmless) z-index
   so a head nested pager and a plain sided-fields editor (which still uses .vx-rail-side-seg on its
   own, outside any pager) layer identically. */
.vx-rail-pg-head { display: flex; flex-direction: column; gap: 8px;
  position: sticky; top: 0; z-index: 2;
  background: var(--vx-surface); border-bottom: 1px solid var(--vx-line);
  /* Cade M1 (2026-08-30): top margin is 0, NOT -12px. The -12px in the acts-footer idiom works
     only because .vx-rail-detail-acts is always the LAST child, so its negative margins eat the
     CARD's padding. The head is never the FIRST child - the card title and the `<- NAME ->`
     section navrow always sit above it - so a negative top margin eats a SIBLING instead
     (~4px over the navrow on the vehicle path, ~6px over the title in the zones menu). Only the
     horizontal bleed is faithful to the idiom. */
  margin: 0 -14px 8px; padding: 10px 14px; }
/* Neutralise the navbar's OWN footer-style chrome when it is nested inside the head - the head
   already supplies the sticky positioning, the surface background, the divider and the bleeding
   margins/padding, so the nested navbar must contribute none of its own or the two would double up
   (a doubled border, doubled bleed, or the navbar's own now-absent sticky-bottom reappearing). */
.vx-rail-pg-head .vx-rail-pg-navbar { position: static; margin: 0; padding: 0; border-top: 0; }
/* Cade N1 (2026-08-30): inside the head the seg contributes no spacing or positioning of its own -
   the head already supplies gap 8px and the sticky. Without this the seg's own `margin: 0 0 8px`
   doubles with the head's gap (16px seg->arrows), and its now-redundant sticky-top lingers. */
.vx-rail-pg-head .vx-rail-side-seg { margin: 0; position: static; }
.vx-rail-pg-nav { background: var(--vx-control-bg); color: var(--vx-control-ink);
  border: 1px solid var(--vx-control-border); border-radius: 8px; cursor: pointer;
  padding: 2px 12px; line-height: 1.6; font: inherit; }
.vx-rail-pg-nav:hover { background: var(--vx-control-hover-bg); }
.vx-rail-pg-nav:disabled { opacity: 0.4; cursor: default; }
.vx-rail-pg-ind { font-size: 12px; color: var(--vx-ink-soft); min-width: 46px; text-align: center; }
/* owner 2026-07-19: the action bar is a STICKY footer pinned to the bottom of the scrolling detail
   card, so the primary/secondary actions (Save / Confirm / Cancel / Close) never fall below the fold
   on a tall panel (e.g. Delete Driver). Default for EVERY rail panel. A solid card-surface background
   + a top divider let the fields scroll cleanly behind it; the negative margins bleed the bar to the
   card's padding edges (the card is 12px 14px) and the padding re-aligns the buttons. */
.vx-rail-detail-acts { display: flex; gap: 8px; flex-wrap: wrap;
  position: sticky; bottom: 0; z-index: 1;
  background: var(--vx-surface); border-top: 1px solid var(--vx-line);
  margin: 24px -14px -12px; padding: 10px 14px; }
.vx-rail-save { background: var(--vx-accent-fill); color: var(--vx-on-accent-fill); border-color: var(--vx-accent-ink); }
.vx-rail-save:hover { filter: brightness(0.96); }
/* "Open editor" (vehicle peek) - a secondary/outline action, distinct from Save. */
.vx-rail-open { background: var(--vx-control-bg); color: var(--vx-accent-ink);
  border: 1px solid var(--vx-control-border); }
.vx-rail-open:hover { background: var(--vx-control-hover-bg); }
/* Cockpit VIEW | EDIT hub - SLICE A (shell, owner 2026-07-20). The VIEW|EDIT segmented header
   reuses .vx-bf-seg; a full-width seg so each mode is an equal, obvious target. The EDIT hub is a
   clean enterprise list of full-width section buttons; the quiet "Back to Edit" returns to the hub.
   Tokenised (--vx-*), no bespoke hex, no overlay. */
.vx-rail-modes { display: flex; width: 100%; margin: 0 0 10px; }
.vx-rail-modes .vx-bf-seg-btn { flex: 1 1 0; text-align: center; }
/* NAV RESTRUCTURE (owner 2026-07-20): match the Booked-feed nav EXACTLY. The VIEW|EDIT segmented
   control lives OUTSIDE the vehicle window - a thin bar BETWEEN the rail head and the detail card
   (like All/Weekly/Daily above the feed). A full-width seg so each mode is an equal, obvious target.
   Hidden until a vehicle carries `modes`; hidden with the cards when the rail is collapsed. */
.vx-rail-modes-bar { display: flex; margin: 0 0 8px; }
.vx-rail-modes-bar[hidden] { display: none; }
.vx-rail-modes-bar .vx-bf-seg { width: 100%; }
.vx-rail-modes-bar .vx-bf-seg-btn { flex: 1 1 0; text-align: center; }
body:not(.vx-pane-cockpit):not(.vx-pane-split) .vx-rail.vx-rail-collapsed .vx-rail-modes-bar { display: none; }
/* INSIDE the window, at the top: the `◀ NAME ▶` selector (reuses .vx-bf-navrow + .vx-bf-nav + the
   centre .vx-bf-period-label). Full width, name centred; no date-picker here so the label is inert. */
.vx-rail-sel { width: 100%; justify-content: space-between; margin: 0 0 8px; }
.vx-rail-sel .vx-bf-period-label { flex: 1 1 auto; cursor: default; }
.vx-rail-sel .vx-bf-period-label:hover { background: var(--vx-control-bg); }
.vx-edit-hub { display: flex; flex-direction: column; gap: 6px; }
.vx-edit-hub-btn { display: block; width: 100%; text-align: left; padding: 10px 12px;
  border-radius: 8px; cursor: pointer; font-family: inherit; font-size: 13px;
  background: var(--vx-control-bg); color: var(--vx-ink);
  border: 1px solid var(--vx-control-border); }
.vx-edit-hub-btn:hover { background: var(--vx-control-hover-bg); border-color: var(--vx-accent); }
.vx-rail-back { align-self: flex-start; background: none; border: none; padding: 2px 0 8px;
  color: var(--vx-accent); font-size: 12px; cursor: pointer; }
.vx-rail-back:hover { color: var(--vx-accent-ink); }
/* SLICE 3 (money-path, owner 2026-07-20): the DEDICATED payout editor - a repeatable
   {payOut, perMile} tier list (two numeric inputs + unit hint + Remove per row) with an Add-tier
   action and a read-only platform-default block. Tokenised (--vx-*), no bespoke hex, no overlay. */
.vx-payout-editor { display: flex; flex-direction: column; gap: 8px; }
/* Cockpit redesign (owner 2026-07-20): "Platform default | Custom" segmented toggle (reuses the
   Booked-feed .vx-bf-seg style); a full-width seg so each mode is an obvious, equal target. */
.vx-payout-seg { display: flex; width: 100%; }
.vx-payout-seg-btn { flex: 1 1 0; text-align: center; font-size: 12px; padding: 5px 8px; }
.vx-payout-custom { display: flex; flex-direction: column; gap: 8px; }
.vx-payout-custom[hidden], .vx-payout-default[hidden] { display: none; }
/* READ-ONLY reference line: the default the user is overriding (custom mode). */
.vx-payout-ref { font-size: 12px; color: var(--vx-ink-soft); }
.vx-payout-tiers { display: flex; flex-direction: column; gap: 8px; }
.vx-payout-tier { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.vx-payout-num { width: 84px; flex: 0 0 auto; }
.vx-payout-unit { font-size: 12px; color: var(--vx-ink-soft); }
.vx-payout-add { align-self: flex-start; }
/* PROMINENT primary "+ Add tier": a SELF-CONTAINED full-width accent button - always visible (owner
   2026-07-20: it must not depend on / be overridden by .vx-row-action) and NO underline on hover. */
.vx-payout-add-primary { display: block; align-self: stretch; width: 100%; text-align: center;
  padding: 8px 12px; border-radius: 8px; cursor: pointer; font-family: inherit; font-size: 12px;
  font-weight: 600; text-decoration: none;
  background: var(--vx-accent-fill); color: var(--vx-on-accent-fill); border: 1px solid var(--vx-accent); }
.vx-payout-add-primary:hover { background: var(--vx-accent-fill-hover); border-color: var(--vx-accent-ink);
  text-decoration: none; }
/* REVERT affordance: a quiet text button that selects the Platform-default segment. */
.vx-payout-revert { align-self: flex-start; background: none; border: none; padding: 2px 0;
  color: var(--vx-accent); font-size: 12px; cursor: pointer; text-decoration: underline; }
.vx-payout-revert:hover { color: var(--vx-accent-ink); }
.vx-payout-remove { margin-left: auto; }
/* Prominent, VISIBLE platform default block (default mode): the values the vehicle books at. */
.vx-payout-default { display: flex; flex-direction: column; gap: 2px;
  padding: 10px 12px; border-radius: 8px; background: var(--vx-accent-soft);
  border: 1px solid var(--vx-accent-soft-line); font-size: 13px; color: var(--vx-ink); }
.vx-payout-default-tier { font-weight: 600; }
/* owner 2026-07-20: read-only VIEW mirror of the payout editor (cockpit VIEW<->EDIT parity). Same
   layout/classes as the editor; custom tiers render as readable text lines; the segmented toggle is
   inert (only SHOWS the active mode, never toggles). */
.vx-payout-tier--view { font-weight: 600; }
.vx-payout-view .vx-payout-seg-btn[disabled] { cursor: default; opacity: 1; }
/* owner 2026-07-20: non-blocking payout cautions (typo backstop + partial-row hint), notice tone. */
.vx-payout-caution { display: flex; flex-direction: column; gap: 2px; margin-top: 6px;
  padding: 6px 10px; border-radius: 8px; border-left: 3px solid var(--vx-notice-accent);
  background: var(--vx-notice-bg); color: var(--vx-notice-ink); font-size: 12px; }
.vx-payout-caution[hidden] { display: none; }
body.vx-sidebar-collapsed .vx-sidebar { padding: 12px 10px; align-items: center; }
/* Rail keeps ONLY the hamburger (the restore control) - centered, no divider. */
body.vx-sidebar-collapsed .vx-sidebar-top { justify-content: center; padding: 0 0 8px;
  border-bottom: none; margin-bottom: 0; }
body.vx-sidebar-collapsed .vx-sidebar-brand,
body.vx-sidebar-collapsed .vx-sidenav,
body.vx-sidebar-collapsed .vx-authbox,
body.vx-sidebar-collapsed .vx-sidebar-foot { display: none; }
.vx-breadcrumb { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.vx-breadcrumb a { color: #9aa3b2; text-decoration: none; }
.vx-breadcrumb a:hover { color: #fff; }
.vx-crumb-sep { color: #5b6472; }
.vx-crumb-current { color: #fff; font-weight: 600; }
.vx-logo { image-rendering: -webkit-optimize-contrast; }
/* Subpage header = two dark rows: the .vx-topbar breadcrumb row, then a separate
   .vx-page-titlebar with the larger white page title. Light content starts after
   the title row. (owner 2026-07-19: the Dashboard now carries the same top line too.) */
.vx-page-titlebar { grid-column: 2 / -1; grid-row: 2; position: sticky; top: 52px; z-index: 19;
  background: linear-gradient(90deg, #11151f 0%, #1a2030 100%);
  border-top: 1px solid rgba(255, 255, 255, 0.06); padding: 9px 18px 12px; }
.vx-page-title { margin: 0; font-size: 22px; font-weight: 600; color: #fff;
  letter-spacing: 0.2px; }

/* Subpage section tabs (e.g. Map Rules: Locations / Zone Groups / Usage).
   Plain text on the grey content - no filled background, no card, no heavy
   border. Inactive = grey text; hover AND active(selected) share ONE neutral
   state (no blue) via --vx-nav-active-ink; the active underline indicator stays.
   (Resets the global filled-button base for .vx-tab buttons.) */
.vx-tabs { display: flex; gap: 24px; margin: 0 0 16px;
  border-bottom: 1px solid var(--vx-line); }
.vx-tab { appearance: none; -webkit-appearance: none; background: none;
  border: none; border-bottom: 2px solid transparent; border-radius: 0;
  margin: 0 0 -1px; padding: 8px 2px; font-family: inherit; font-size: 14px;
  font-weight: 500; color: var(--vx-ink-soft); cursor: pointer; }
.vx-tab:hover { color: var(--vx-nav-active-ink); background: none; filter: none; }
/* Selected tab = the hover grey (no blue) + the underline indicator kept. */
.vx-tab.is-active { color: var(--vx-nav-active-ink); font-weight: 600;
  border-bottom-color: var(--vx-nav-active-ink); }

/* RETIRED 2026-09-04 (S3) - the 761-1200px cockpit DEAD BAND.
   What stood here: `@media (max-width: 1200px)` collapsed .vx-rail to a 40px PEEK strip
   (width: 40px + overflow: hidden), hid .vx-rail-title, hid `.vx-rail > *:not(.vx-rail-head)`
   AND hid .vx-rail-collapse. Its stated intent ("the content column keeps priority") was
   sound; its effect was not. The Cockpit detail card is a direct child of the rail
   (web/runtime-status.js), so every cockpit EDITOR was invisible between 761 and 1200px -
   on a 1024px tablet or a 1280px laptop, clicking a vehicle row appeared to do nothing, and
   railUsable() still answered TRUE (the 40px node rendered a box) so no fallback fired
   either. With the expand toggle hidden too, the band was a dead end. And .vx-rail-head's
   only remaining child WAS that hidden toggle, so what the band actually rendered was an
   empty 40px column, on all 13 shell pages.
   The owner REJECTED the cheap fix (raise RAIL_MIN_WIDTH_PX to 1200 and route the operator
   away from the rail) in favour of this layout work, so RAIL_MIN_WIDTH_PX stays 760.
   The replacement lives in the pane-mode section at the end of this file: below 1201px the
   rail UNDOCKS and becomes a pane in the bar's roster (Console | Booked | Cockpit | Both).
   Pinned: tests/test_pane_band_761_1200.py. */
@media (max-width: 760px) {
  /* Owner 2026-09-03: *"trebuie sa micsorez, adica sa fac zoom out mult ca sa pot sa vad capatul
     din dreapta"* + *"Console e mai ingusta decat header-ul de sus"*. A bare `1fr` is
     `minmax(auto, 1fr)`: the track's floor is the largest AUTOMATIC MINIMUM SIZE among its items,
     so the column refuses to go under its widest child and the whole document scrolls sideways.
     Concretely, alerts-ticker.js appends a nowrap marquee track (rendered TWICE for a seamless
     loop) into .vx-page-titlebar on EVERY shell page, and at <=760px the titlebar stops SPANNING
     (grid-column: auto below) - a spanning item that crosses a flexible track is skipped by grid's
     accommodate-spanning-items step, a single-track item is not - so its ~2000px content-based
     minimum became the shell's width. Every other shell grid in this file already writes
     `minmax(0, 1fr)`; this one was the only bare `1fr` left. That also explains why rotating
     changed nothing: the document width was not a function of the viewport at all. */
  /* The collapsed COMBOS must be listed here, and this is a SPECIFICITY fix, not a tidy-up:
     `body.vx-sidebar-collapsed.vx-booked-feed-collapsed` (the 1400 block above) is 0-2-1 and
     BEATS a lone `body.vx-app` (0-1-1) no matter how late this block comes, so a phone whose
     hamburger was ever tapped got the THREE-column `56px minmax(0,1fr) auto` template - and its
     trailing `auto` track is `minmax(auto, max-content)`, i.e. exactly the un-floored track this
     whole block exists to remove. The feed half of the combo is DEFAULT-ON (booked-feed.js:99-104
     returns true for an unset key), so only the sidebar toggle had to be touched once, ever. */
  body.vx-app,
  body.vx-booked-feed-collapsed,
  body.vx-sidebar-collapsed,
  body.vx-sidebar-collapsed.vx-booked-feed-collapsed {
    grid-template-columns: minmax(0, 1fr); grid-template-rows: none; }
  .vx-sidebar { position: static; height: auto; flex-direction: row;
    align-items: center; flex-wrap: wrap; gap: 4px; }
  .vx-sidebar-brand { border: none; margin: 0; padding: 4px 12px 4px 0; }
  .vx-sidenav { flex-direction: row; flex-wrap: wrap; }
  /* single column: drop the banner/zone grid placement (the banner stacks normally) */
  .vx-sidebar, .vx-topbar, .vx-page-titlebar, .vx-shell-main { grid-column: auto; grid-row: auto; }
  /* minmax(0, ...) above sizes the TRACK; a grid item still defaults to `min-width: auto` and can
     be laid out wider than its track, painting outside it. Of the body-level items .vx-shell-main
     already declares min-width: 0 and .vx-sidebar is overflow: hidden - these two are the whole
     remaining set with neither escape, and the titlebar is the one that actually hosts the ticker. */
  .vx-topbar, .vx-page-titlebar { min-width: 0; }
  .vx-page-titlebar { position: static; }
  .vx-booked-feed { display: none; }
  /* Same exclusion as the 1200 block. This one HAPPENED to work already - `.vx-fwin
     { display: flex }` is later in the file than this rule, so it won.  That is a
     SOURCE-ORDER accident, not a decision, and re-ordering this stylesheet would have
     silently broken Focus on phones. Say it in the selector instead. */
  .vx-rail:not(.vx-fwin) { display: none; }   /* mobile: one column, docked rail out of flow */
}

/* Page container + header - left-aligned (no centering) so content hugs the
   sidebar edge instead of drifting right. */
.vx-page { max-width: 1440px; margin: 0; padding: 18px 22px; }
.vx-page-header { display: flex; align-items: flex-end; justify-content: space-between;
  flex-wrap: wrap; gap: 12px; margin-bottom: 16px; }
.vx-page-header h1 { margin: 0; font-size: 20px; letter-spacing: 0.2px; }

.vx-banner {
  background: var(--vx-warn-bg); color: var(--vx-warn-ink);
  border: 1px solid var(--vx-warn-line); border-radius: 10px;
  padding: 10px 14px; font-size: 13px; margin-bottom: 16px;
}
/* Themed banner modifiers (Cade S1 nit): use the shared status tokens so they don't
   stay light islands on the Night theme. */
.vx-banner.info { background: var(--vx-notice-bg); color: var(--vx-accent-ink);
  border-color: var(--vx-notice-border); }
.vx-banner.success { background: var(--vx-on-bg); color: var(--vx-on-ink);
  border-color: var(--vx-on-line); }
.vx-banner.error { background: var(--vx-bad-bg); color: var(--vx-bad-ink);
  border-color: var(--vx-bad-line); }

/* Operator SAVE CONFIG row: the primary action button + a quiet inline hint. */
.vx-config-save { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.vx-config-save .hint { font-size: 13px; }

/* Compact config-mode notice - a quiet operational strip with a thin left accent
   and a small label, NOT a dominant stacked warning panel. */
.vx-config-notice { display: flex; align-items: baseline; gap: 10px;
  background: var(--vx-notice-bg); border: 1px solid var(--vx-notice-border);
  border-left: 3px solid var(--vx-notice-accent); border-radius: 8px;
  padding: 8px 12px; margin: 0 0 14px; font-size: 12px;
  color: var(--vx-ink-soft); }
.vx-config-notice-label { flex: 0 0 auto; font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.5px; color: var(--vx-notice-ink); }
.vx-config-notice-body { margin: 0; min-width: 0; }
.vx-config-notice-body p { margin: 0; line-height: 1.45; }

/* Cards + metrics */
.vx-card {
  background: var(--vx-surface); border: 1px solid var(--vx-line);
  border-radius: var(--vx-radius); box-shadow: var(--vx-shadow); padding: 16px 18px;
  margin-bottom: 16px;
  /* Vixty core-CSS parity fix (2026-09-28): .vx-wn-panel (~:294) puts an explicit
     width on a .vx-card - without border-box the 16/18px padding above ADDS to
     that width instead of being cut from it, so the panel overflows its host by
     the padding amount. Every explicit-width .vx-card is affected, not just the
     What's-new panel. Pinned: tests/test_auth_input_length_pins.py. */
  box-sizing: border-box;
}
.vx-panel-header { display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }
.vx-panel-header h2, .vx-panel-header h3 { margin: 0; font-size: 15px; }

.vx-summary-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px; margin-bottom: 16px;
}
.vx-metric-card {
  background: var(--vx-surface); border: 1px solid var(--vx-line);
  border-radius: var(--vx-radius); box-shadow: var(--vx-shadow); padding: 14px 16px;
}
.vx-metric-card .vx-metric-label { font-size: 11px; text-transform: uppercase;
  letter-spacing: 0.5px; color: var(--vx-ink-soft); }
.vx-metric-card .vx-metric-value { font-size: 24px; font-weight: 700; margin-top: 4px; }
.vx-metric-card .vx-metric-foot { font-size: 12px; color: var(--vx-ink-soft); margin-top: 2px; }

/* Workspace: master/detail */
.vx-workspace { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.vx-entity-panel {
  background: var(--vx-surface); border: 1px solid var(--vx-line);
  border-radius: var(--vx-radius); box-shadow: var(--vx-shadow); padding: 16px 18px;
}

/* Search - floating-label field with an inline (left) magnifier icon.
   Pure CSS: the label floats up when the input is focused or has a value
   (uses placeholder=" " so :placeholder-shown reflects empty state). */
.vx-search { display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
  margin-bottom: 12px; }
.vx-search-field { position: relative; flex: 1; min-width: 220px; max-width: 560px; }
.vx-search-field .vx-search-icon { position: absolute; left: 11px; top: 50%;
  transform: translateY(-50%); margin: 0; pointer-events: none; }
/* Slightly shorter than before (was 48px) so it reads closer to the toolbar
   action buttons while still leaving room for the floating label. */
.vx-search-field input[type="text"] { width: 100%; box-sizing: border-box;
  height: 44px; padding: 17px 12px 5px 34px; font-size: 13px;
  border: 1px solid var(--vx-line); border-radius: 9px;
  /* Cade M1: tokenized bg + explicit color so Night is not black-on-dark. */
  background: var(--vx-control-bg); color: var(--vx-control-ink); caret-color: var(--vx-accent); }
.vx-search-field input[type="text"]::placeholder { color: var(--vx-ink-soft); }
.vx-search-label { position: absolute; left: 34px; top: 50%;
  transform: translateY(-50%); color: var(--vx-ink); font-size: 13px;
  pointer-events: none; transition: top .12s ease, font-size .12s ease,
  color .12s ease, transform .12s ease; }
/* floated state: input focused OR has a value -> small grey label at the top */
.vx-search-field input[type="text"]:focus + .vx-search-label,
.vx-search-field input[type="text"]:not(:placeholder-shown) + .vx-search-label {
  top: 9px; transform: none; font-size: 11px; color: var(--vx-ink-soft); }

/* Data tables */
.vx-table-wrap { width: 100%; overflow-x: auto; border-radius: 10px; }
.vx-data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.vx-data-table thead th {
  position: sticky; top: 0; background: var(--vx-control-hover-bg); color: var(--vx-ink-soft);
  text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: 0.4px;
  padding: 9px 12px; border-bottom: 1px solid var(--vx-line); white-space: nowrap;
}
/* Top-align so every cell's primary control/value line sits on ONE shared band
   (the .vx-cell-main / select band below), with action lines (Details, Show
   rings) hanging beneath at a consistent gap - keeps controls aligned and the
   row separator straight even when some cells have an extra action line. */
.vx-data-table tbody td { padding: 10px 12px; border-bottom: 1px solid var(--vx-line-soft);
  vertical-align: top; }
/* 18v-f6: a DENSE data table - horizontal padding only (vertical stays the shared table's). Opt-in per table;
   the Updates queue uses it so nine columns fit a 1024/1440 content column. */
.vx-data-table--compact thead th,
.vx-data-table--compact tbody td { padding-left: var(--vx-cell-pad-x-compact);
  padding-right: var(--vx-cell-pad-x-compact); }
/* A window chip in a dense table may wrap between its words ("Window partly ended" was the PLATES column's
   width); everywhere else .vx-chip stays nowrap. */
.vx-data-table--compact .vx-window-chip { white-space: normal; }
/* Primary value band for text cells (plate name, company, equipment, read-only
   side/driver values). min-height = the shared control height so the text centres
   in the same vertical band the row's <select>s occupy → controls + text align. */
.vx-cell-main { display: flex; align-items: center; min-height: var(--vx-control-height); }
/* Fleet board: quieter status/count line (less noisy than a heavy status bar).
   TWO nodes on ONE row: #status = the operator's outcome (written only by setStatus),
   #fleet-count = the ambient count / "Loading…" / coverage note that every render() rewrites.
   min-height keeps the row from collapsing while #status is empty (page load, before the
   first outcome), so the table does not jump when the first message arrives. */
.vx-status-line { display: flex; align-items: baseline; flex-wrap: wrap; gap: 10px;
  min-height: 14px; margin: 2px 0 10px; }
/* Trips S3 (2026-10-16): the Trips page's twin pair - #trips-status (outcome, setStatus only) and
   #trips-count (ambient) - joins each of the three rules below (named touch, pinned by
   tests/test_trips_s3_server.py::VixtyStatusSelectors). */
#status.status, #fleet-count.status,
#trips-status.status, #trips-count.status { color: var(--vx-ink-soft); font-size: 11px;
  letter-spacing: 0.2px; margin: 0; }
#status.status, #trips-status.status { color: var(--vx-ink); }
/* Before the first outcome the node is empty; as a flex item it would still consume the row's
   10px gap and the count would sit indented, then jump left the moment a message arrives. */
#status.status:empty, #trips-status.status:empty { display: none; }
/* The read-only "Coverage as of <time>" note appended to the ambient line by
   renderCoverageNote() - a class, not two inline styles at the call site. */
.vx-coverage-note { color: var(--vx-ink-soft); margin-left: 10px; opacity: 0.7; }
.vx-data-table tbody tr { cursor: pointer; }
.vx-data-table tbody tr:hover { background: var(--vx-control-hover-bg); }
.vx-data-table tbody tr.selected { background: var(--vx-control-active-bg);
  box-shadow: inset 3px 0 0 var(--vx-accent); }
.vx-name { font-weight: 600; }
.vx-muted-id { color: var(--vx-ink-soft); font-size: 11px; font-family: ui-monospace, monospace; }

/* Chips */
.vx-chip { display: inline-flex; align-items: center; gap: 5px; font-size: 12px;
  padding: 2px 10px; border-radius: 999px; line-height: 1.6; white-space: nowrap; }
.vx-chip.on { background: var(--vx-on-bg); color: var(--vx-on-ink); border: 1px solid var(--vx-on-line); }
.vx-chip.off { background: var(--vx-off-bg); color: var(--vx-off-ink); border: 1px solid var(--vx-off-line); }
.vx-chip.warn { background: var(--vx-warn-bg); color: var(--vx-warn-ink); border: 1px solid var(--vx-warn-line); }
.vx-chip.bad { background: var(--vx-bad-bg); color: var(--vx-bad-ink); border: 1px solid var(--vx-bad-line); }
.vx-chip.neutral { background: var(--vx-control-hover-bg); color: var(--vx-ink-soft); border: 1px solid var(--vx-line); }
.vx-chip-row { display: flex; flex-wrap: wrap; gap: 6px; }


/* Zone-group entries table - never squeeze zone names */
.vx-entry-table { min-width: 880px; }
.vx-entry-table th, .vx-entry-table td { padding: 6px 10px; }
.vx-entry-table .vx-entry-zone,
.vx-entry-table th:nth-child(1), .vx-entry-table td:nth-child(1) { min-width: 340px; }
.vx-entry-table th:nth-child(2), .vx-entry-table td:nth-child(2) { min-width: 160px; }
.vx-entry-table th:nth-child(3), .vx-entry-table td:nth-child(3) { min-width: 140px; }
.vx-entry-table th:nth-child(4), .vx-entry-table td:nth-child(4) { min-width: 110px; }
.vx-entry-table th:last-child, .vx-entry-table td:last-child { min-width: 110px; }
.vx-empty { color: var(--vx-ink-soft); font-size: 13px; padding: 10px 0; }

/* 6A.3: grouped fleet rows */
.vx-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  margin: 4px 0 10px; font-size: 12px; color: var(--vx-ink-soft); }
.vx-filters select { font-size: 13px; margin-left: 4px; }  /* height: shared .vx-control */
.vx-group-row .vx-name { font-size: 14px; }
.vx-view-link { font-size: 11px; color: var(--vx-accent-ink); text-decoration: none; }
.vx-view-link:hover { text-decoration: underline; }

/* 6A.3.1: grouped-view clarity - helper line, entity-card rows, prominent status
   chip. (The sparse note, count badge and expander rules were removed 2026-09-01:
   nothing in web/ emits those classes any more - see audit A finding 12.) */
.vx-group-overview { margin: 4px 0 10px; }
.vx-group-helper { margin: 0; font-size: 11px; text-transform: uppercase;
  letter-spacing: 0.5px; color: var(--vx-ink-soft); }
.vx-group-row > td { padding-top: 12px; padding-bottom: 12px; vertical-align: top; }
.vx-group-row.row { box-shadow: inset 3px 0 0 var(--vx-line-soft); }
.vx-group-row.row:hover, .vx-group-row.row.selected {
  box-shadow: inset 3px 0 0 var(--vx-accent); }
.vx-group-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  margin-top: 4px; }
.vx-status-chip { font-size: 12px; font-weight: 600; padding: 3px 12px; }
.vx-entry-read td { vertical-align: middle; }
.vx-entry-read .vx-entry-zone .vx-name { white-space: normal; }

/* Default site button = the white control template (same family as the Ready
   control): white bg, dark ink, subtle border, control radius. Action buttons in
   toolbars/detail bars also take the exact shared control height (below). Tabs
   and the ON/OFF toggle keep their own states; coloured/secondary/destructive
   buttons keep their background + white text via more specific selectors. */
button { background: var(--vx-control-bg); color: var(--vx-control-ink);
  border: 1px solid var(--vx-control-border); box-sizing: border-box;
  border-radius: 8px; padding: 0 12px; line-height: 1.2; }
/* Subtle darken on hover/press (brightness works on white AND coloured buttons,
   so it never bleeds a grey wash onto the destructive/secondary ones). */
button:not(.vx-tab):not(.vx-enable-toggle):hover:not([disabled]) {
  filter: brightness(0.97); }
button:not(.vx-tab):not(.vx-enable-toggle):active:not([disabled]) {
  filter: brightness(0.94); }
/* Toolbar + detail-bar action buttons (Refresh, New …, Edit, Save, Validate)
   share the exact control height and vertically centre their label. */
.toolbar button { height: var(--vx-control-height);
  display: inline-flex; align-items: center; justify-content: center; }
/* Coloured/secondary/destructive buttons keep their own background + white text
   (they override the white default) and stay visually distinct. */
button.secondary, #cancel-btn,
.btn-group[data-group="config-state"] button,
.btn-group[data-group="navigation"] button,
button.row-rm, button.row-add { color: #fff; border-color: transparent; }
/* Secondary / cancel buttons must be self-contained in the shared sheet: pages
   that do NOT load styles.css (RAW, API) otherwise render white text on the white
   base background, making Cancel/Undo invisible. Give them the grey secondary fill
   here (same colour styles.css uses, so fleet/zones are unchanged). */
button.secondary, #cancel-btn { background: #6b7280; color: #fff;
  border-color: transparent; }
button.secondary:hover:not([disabled]), #cancel-btn:hover:not([disabled]) {
  filter: brightness(0.95); }
/* Legacy filled-green id buttons (fleet.css #new-vehicle-btn / #save-btn) -> the
   shared white control template. No coloured fill on these primary actions. */
#new-vehicle-btn, #save-btn { background: var(--vx-control-bg);
  color: var(--vx-control-ink); border: 1px solid var(--vx-control-border); }
#new-vehicle-btn:hover:not([disabled]), #save-btn:hover:not([disabled]) {
  background: var(--vx-control-hover-bg); filter: none; }
#new-vehicle-btn:active:not([disabled]), #save-btn:active:not([disabled]) {
  background: var(--vx-control-active-bg); filter: none; }
/* Subtle "+" affordance on New vehicle (layout-neutral, no colour). */
#new-vehicle-btn::before { content: "+"; margin-right: 6px; font-weight: 600;
  color: var(--vx-ink-soft); }

/* 6A.3.2: human editing UX - clickable enabled, parent-group sections,
   read-only ring cards with guarded (deep-link) edit, status legend. */
/* ON = the white control template (matches Ready); OFF = lighter grey/neutral,
   kept visually distinct. */
.vx-enable-toggle { cursor: pointer; font-family: inherit;
  border: 1px solid transparent; }
.vx-enable-toggle.on { background: var(--vx-control-bg); color: var(--vx-control-ink);
  border-color: var(--vx-control-border);
  box-shadow: inset 3px 0 0 var(--vx-status-on-indicator); }  /* thin blue left bar */
.vx-enable-toggle.on:hover { background: var(--vx-control-hover-bg); filter: none; }
.vx-enable-toggle.on:active { background: var(--vx-control-active-bg); filter: none; }
.vx-enable-toggle.off { background: var(--vx-off-bg); color: var(--vx-off-ink);
  border-color: var(--vx-off-line); }
.vx-enable-toggle.off:hover { filter: brightness(0.97); }
.vx-apply-all-note { font-size: 11px; color: var(--vx-ink-soft); margin-top: 4px;
  max-width: 220px; }
/* Lightweight action links (Vehicles + Zones) - no underline, chevron-marked
   row actions read as actions, not body links. */
.vx-link-btn { font-size: 12px; background: none; border: none; padding: 0;
  color: var(--vx-accent-ink); text-decoration: none; cursor: pointer;
  font-family: inherit; }
.vx-link-btn:hover { color: var(--vx-accent); }
/* Compact row actions (PLATE "open profile", PICKUP/DELIVERY "coverage") - a small
   neutral ellipsis icon button. No underline, no blue link styling, not dominant. */
/* Text row action ("Details" / "Show rings"): subtle neutral underlined text -
   no chevron, no icon, no strong blue link look. Compact + table-friendly. */
/* Premium text row action ("Details" / "Show rings"): neutral medium-weight
   text, NO permanent underline (not a cheap link) - underline + stronger ink
   appear only on hover/focus. Compact, stable line-height. */
.vx-row-action { background: none; border: none; padding: 0 1px; line-height: 1.2;
  font-size: 12px; font-weight: 500; letter-spacing: 0; color: var(--vx-ink-soft);
  cursor: pointer; font-family: inherit; text-decoration: none;
  text-underline-offset: 2px; border-radius: 4px; vertical-align: baseline;
  transition: color .12s ease; }
.vx-row-action:hover { color: var(--vx-ink); text-decoration: underline; }
.vx-row-action:focus-visible { color: var(--vx-ink); text-decoration: underline;
  outline: none; box-shadow: 0 0 0 3px var(--vx-focus-ring); border-radius: 4px; }

.vx-pg-section { border: 1px solid var(--vx-line); border-radius: 10px;
  padding: 10px 12px; margin: 8px 0; background: var(--vx-surface-soft); }
.vx-pg-section.pickup { box-shadow: inset 4px 0 0 #b6e0c4; }
.vx-pg-section.delivery { box-shadow: inset 4px 0 0 var(--vx-accent-soft-line); }
.vx-pg-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.vx-pg-title { font-size: 13px; }
.vx-shared { font-size: 11px; }
.vx-pg-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  margin: 6px 0; }
.vx-pg-warn { font-size: 11px; color: var(--vx-warn-ink); background: var(--vx-warn-bg);
  border: 1px solid var(--vx-warn-line); border-radius: 8px; padding: 6px 10px;
  margin: 4px 0; }
.vx-pg-guard { font-size: 11px; color: var(--vx-ink-soft); margin: 4px 0 0; }
.vx-guarded { font-size: 11px; padding: 2px 9px; border-radius: 7px;
  border: 1px dashed var(--vx-line); background: var(--vx-control-hover-bg); color: var(--vx-ink-soft);
  cursor: not-allowed; font-family: inherit; }
.vx-guarded[disabled] { opacity: 0.7; }
.vx-edit-in-zones, .vx-open-zg { font-size: 11px; }

.vx-zone-card { border: 1px solid var(--vx-line-soft); border-radius: 9px;
  padding: 8px 10px; margin: 6px 0; background: var(--vx-surface); }
.vx-zone-h { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.vx-ring-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  padding: 4px 0; border-top: 1px solid var(--vx-line-soft); margin-top: 6px; }
.vx-ring-val { font-size: 12px; color: var(--vx-ink); white-space: nowrap; }
.vx-usage { font-size: 11px; }

.vx-legend { background: var(--vx-surface); border: 1px solid var(--vx-line);
  border-radius: var(--vx-radius); box-shadow: var(--vx-shadow);
  padding: 14px 18px; margin-top: 16px; }
.vx-legend h2 { margin: 0 0 8px; font-size: 15px; }
.vx-legend-list { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px;
  margin: 0; align-items: center; }
.vx-legend-list dt { margin: 0; }
.vx-legend-list dd { margin: 0; font-size: 13px; color: var(--vx-ink-soft); }

/* P5a: vehicle-owned config render (read-only) + template-fallback labels. */
.vx-pg-section.vx-owned { box-shadow: inset 4px 0 0 var(--vx-accent); }
.vx-owned-chip { font-size: 11px; font-weight: 600; }
.vx-pg-prov { font-size: 12px; color: var(--vx-ink-soft); margin: 4px 0 0; }
.vx-pg-help { font-size: 11px; color: var(--vx-accent-ink); margin: 4px 0 0; }
.vx-pg-fallback { font-size: 12px; font-weight: 600; color: var(--vx-warn-ink);
  margin: 4px 0 0; }

/* P5b: inline ring editing (vehicle-owned config only). */
.vx-ring-edit-btn { font-size: 11px; margin-left: 6px; }
.vx-ring-editing { background: var(--vx-surface-soft); border: 1px solid var(--vx-accent);
  border-radius: 8px; padding: 6px 8px; gap: 12px; }
.vx-ring-lab { font-size: 12px; color: var(--vx-ink); display: inline-flex;
  align-items: center; gap: 4px; }
.vx-ring-input { width: 76px; padding: 3px 6px; font-size: 12px;
  border: 1px solid var(--vx-line); border-radius: 6px; }
.vx-ring-save, .vx-ring-cancel { font-size: 11px; padding: 3px 11px;
  border-radius: 7px; border: 1px solid var(--vx-line); cursor: pointer;
  font-family: inherit; }
.vx-ring-save { background: var(--vx-on-bg); color: var(--vx-on-ink);
  border-color: var(--vx-on-line); font-weight: 600; }
.vx-ring-cancel { background: var(--vx-surface); color: var(--vx-ink-soft); }

/* P5c1: add/delete ring controls. */
.vx-ring-del-btn { color: var(--vx-bad-ink); margin-left: 6px; }
.vx-ring-confirm-del { font-size: 11px; padding: 3px 11px; border-radius: 7px;
  border: 1px solid var(--vx-bad-line); background: var(--vx-bad-bg);
  color: var(--vx-bad-ink); font-weight: 600; cursor: pointer; margin-left: 6px;
  font-family: inherit; }
.vx-add-ring-btn { font-size: 11px; margin-top: 6px; }

/* P5c2: add/delete zone controls + inline zone picker. */
.vx-zone-del-btn { color: var(--vx-bad-ink); margin-left: 8px; }
.vx-zone-confirm-del { font-size: 11px; padding: 3px 11px; border-radius: 7px;
  border: 1px solid var(--vx-bad-line); background: var(--vx-bad-bg);
  color: var(--vx-bad-ink); font-weight: 600; cursor: pointer; margin-left: 8px;
  font-family: inherit; }
.vx-add-zone-btn { font-size: 12px; margin-top: 8px; font-weight: 600; }
.vx-zone-add { display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  margin-top: 8px; padding: 8px; border: 1px solid var(--vx-accent);
  border-radius: 8px; background: var(--vx-surface-soft); }
.vx-zone-select { padding: 4px 8px; font-size: 13px; border: 1px solid var(--vx-line);
  border-radius: 7px; background: var(--vx-surface); min-width: 200px; }

/* P5d: load/reapply template controls + confirm panel. */
.vx-tmpl-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.vx-load-tmpl-btn, .vx-reapply-tmpl-btn { font-size: 12px; font-weight: 600; }
.vx-tmpl-pick, .vx-tmpl-confirm { display: flex; flex-wrap: wrap; align-items: center;
  gap: 8px; margin-top: 8px; padding: 8px 10px; border: 1px solid var(--vx-accent);
  border-radius: 8px; background: var(--vx-surface-soft); }
.vx-tmpl-pick { }
.vx-tmpl-confirm { flex-direction: column; align-items: stretch; }
.vx-tmpl-select { padding: 4px 8px; font-size: 13px; border: 1px solid var(--vx-line);
  border-radius: 7px; background: var(--vx-surface); min-width: 220px; }
.vx-tmpl-confirm-h { margin: 0; font-size: 13px; font-weight: 600; }
/* P5e1: save vehicle-owned config as a new template */
.vx-tmpl-save-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.vx-save-tmpl-btn { font-size: 12px; font-weight: 600; }
.vx-tmpl-save, .vx-tmpl-save-confirm { display: flex; flex-direction: column;
  align-items: stretch; gap: 8px; margin-top: 8px; padding: 8px 10px;
  border: 1px solid var(--vx-accent); border-radius: 8px; background: var(--vx-surface-soft); }
.vx-tmpl-save-lbl { display: flex; flex-direction: column; gap: 3px; font-size: 12px;
  font-weight: 600; color: var(--vx-muted); }
.vx-tmpl-save-name, .vx-tmpl-save-desc { padding: 4px 8px; font-size: 13px;
  border: 1px solid var(--vx-line); border-radius: 7px; background: var(--vx-surface); }

@media (min-width: 1000px) {
  .vx-workspace.split { grid-template-columns: minmax(360px, 0.9fr) minmax(0, 1.5fr); }
}
@media (max-width: 720px) {
  .vx-page { padding: 14px; }
  .vx-topbar { height: auto; padding: 10px 14px; flex-wrap: wrap; }
}

/* Fleet UI polish: sort headers, row group selects, Status, Show-rings modal */
#fleet-table thead th.vx-sort { cursor: pointer; user-select: none; }
#fleet-table thead th.vx-sort:hover { text-decoration: underline; }
/* Owner "View As" controls - reuse the DESIGN-SYSTEM control tokens (never bespoke inline
   styles): the Dashboard card picker + the banner role select + Exit button all take the
   shared control height, border, and 8px radius so they match every other button/select. */
.vx-view-as-select {
  max-width: 320px; height: var(--vx-control-height);
  border: 1px solid var(--vx-control-border); border-radius: 8px;
  background: var(--vx-control-bg); color: var(--vx-control-ink);
  padding: 0 12px; box-sizing: border-box; cursor: pointer; }
#vx-view-as-card { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
#vx-view-as-card .vx-view-as-hint { margin: 0; color: var(--vx-ink-soft); }
/* Banner controls (on the purple bar): keep the same 8px radius + control height as every
   other button, just with an inverted palette so they read on the accent background. */
.vx-view-as-role, .vx-view-as-exit {
  height: 28px; border-radius: 8px; border: 0; padding: 0 12px;
  font-weight: 600; cursor: pointer; box-sizing: border-box; }
.vx-view-as-role { background: rgba(255,255,255,0.9); color: #4b1fa6; }
.vx-view-as-exit { margin-left: auto; background: #fff; color: #6b21c9; }
.vx-view-as-exit:hover { filter: brightness(0.96); }
.vx-row-group-select { font-size: 13px; max-width: 220px; }  /* height: shared .vx-control */
.vx-row-equip-select { font-size: 13px; max-width: 220px; }  /* same look as the group select */
/* Delivery zone/ring selector (2026-08-18; row slimmed 2026-08-29): the per-row DELIVERY
   zone dropdown. Reuses the SAME design-system tokens as the other row selects (control
   height / border / radius / dropdown arrow) via its own standalone rules - no inline
   styles. The row no longer carries Radius/Buffer inputs next to it - those stay
   editable via the vzo drawer's ring editor (still .vx-ring-input there). Kept OFF the
   shared .vx-row-group-select selector groups so those money-safety token pins stay
   verbatim. */
body.vx-app select.vx-row-zone-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none' stroke='%235b6472' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 9px center;
  padding-right: 26px; }
.vx-row-zone-select {
  box-sizing: border-box; height: var(--vx-control-height); line-height: 1.2;
  padding: 0 10px; border-radius: 8px; vertical-align: middle;
  border: 1px solid var(--vx-control-border); background: var(--vx-control-bg);
  /* 2026-08-31: `color` is REQUIRED here, not optional. This rule declares its own
     BACKGROUND from a token, so it must declare the matching INK from a token too -
     otherwise the text falls back to the browser default (black) while the background
     follows the theme, and the cell turns black-on-dark and unreadable in night mode.
     The sibling row selects (.vx-row-group-select / .vx-row-equip-select) never hit
     this because they set neither, so they inherit a matched pair. Rule of thumb:
     declare background and color together, or declare neither. */
  color: var(--vx-control-ink);
  font-size: 13px; max-width: 180px; }
/* Compact white driver select in the DRIVER column (shared control template via
   .vx-control). No status colour/indicator - it is a plain catalog picker. */
/* owner 2026-07-18: the DRIVER column shows a compact "Lastname I." label, so the
   picker is narrowed to reclaim horizontal space for the rest of the table. */
.vx-driver-select { font-size: 13px; max-width: 130px; cursor: pointer; }
/* P1-C driver PRESENCE (advisory, DISPLAY-ONLY): the vehicle's driver name turns
   GREEN when its assigned driver is available-fresh (server-derived). Tokenised
   (--vx-on-ink, themed Day/Night) - never a bespoke hex. Never gates dispatch. */
.vx-driver-ready { color: var(--vx-on-ink); font-weight: 600; }
/* Presence DOT: a small solid-green dot next to a present driver so the Vehicles
   DRIVER column reads as GREEN at a glance (the bare green-text on a <select> is too
   subtle). Owner 2026-07-21. Tokenised (--vx-on-ink); display-only, never gates. */
/* Driver-presence GREEN dot rendered INSIDE the status control on its RIGHT (owner
   2026-07-22) - a tokenised radial-gradient background layer, never a stray sibling
   element to the left. Mirrors the OFF no-entry glyph's inside-on-the-right placement
   (.vx-offlock). Shown on ANY status whenever the assigned driver is available-fresh.
   Display-only; the green comes from the --vx-on-ink theme token (Day/Night), never a
   bespoke hex. Applies to the <select> op-status button and the aggregate status chip. */
.vx-status-toggle.has-presence {
  background-image: radial-gradient(circle at calc(100% - 11px) center,
    var(--vx-on-ink) 0 4px, transparent 5px);
  background-repeat: no-repeat;
  padding-right: 24px;
}
.vx-driver-cell { display: flex; align-items: center; }
/* Owner-editable COMPANY select in the COMPANY column (same control template as the
   driver picker). owner 2026-07-18. */
.vx-company-select { font-size: 13px; max-width: 200px; cursor: pointer; }
/* A firm is single-company, so the COMPANY column is redundant - hide the whole
   column (header + every cell carry .vx-col-company) when body.vx-hide-company. */
body.vx-hide-company .vx-col-company { display: none; }
.vx-row-changed { margin-left: 6px; }
/* Status controls: two stacked, equal-width controls (op status over ON/OFF).
   Now live inside the PLATE cell, between the plate number and Details. */
/* STATUS cell stays a NORMAL table-cell (no display:flex on the <td>) so its
   bottom border / row separator aligns with the other columns. The flex column
   layout lives in the inner .vx-status-stack wrapper instead. */
.vx-status-cell { min-width: 132px; }
.vx-status-stack { display: flex; flex-direction: column; align-items: flex-start;
  gap: 5px; }
/* STATUS primary band - matches .vx-cell-main so the status control sits on the
   same vertical band as the rest of the row (it must be centred in a control-
   height band, NOT top-packed as a bare flex item). Full width so the select
   still spans the column. */
.vx-status-main { display: flex; align-items: center;
  min-height: var(--vx-control-height); width: 100%; }
.vx-status-toggle { width: 100%; text-align: center;
  font-size: 12px; font-weight: 600; }            /* height/box: shared .vx-control */
.vx-opstatus { display: flex; flex-direction: column; gap: 5px; }
/* Unified STATUS control: white control, no native dropdown arrow. Behaviour/
   values unchanged - it stays a real <select>. Thin left indicators are per
   status: Ready = green, OFF = grey; Not Ready/Booked/Out of sync stay neutral. */
.vx-opstatus-select { font-size: 13px; cursor: pointer;
  appearance: none; -webkit-appearance: none; -moz-appearance: none; }
.vx-opstatus-select.op-ready {
  box-shadow: inset 3px 0 0 var(--vx-status-ready-indicator); }  /* green left bar */
.vx-opstatus-select.op-off { background-color: var(--vx-off-bg);
  color: var(--vx-off-ink); border-color: var(--vx-off-line);
  box-shadow: inset 3px 0 0 var(--vx-off-line); }               /* grey OFF control */
.vx-opstatus-select.op-booked { background-color: var(--vx-accent-soft); border-color: var(--vx-accent-soft-line); }
.vx-opstatus-select.op-out_of_sync { background-color: var(--vx-bad-bg); border-color: #f2c4c0; }
.vx-opstatus-select.op-not_ready { background-color: var(--vx-off-bg); border-color: #d6dae0; }
.vx-opstatus-q { margin: 2px 0; font-size: 12px; }
.vx-status-cell .vx-enable-toggle { cursor: pointer; }
/* Search icon replaces the old "Vehicles" label next to the search box. */
.vx-search-icon { line-height: 1; color: var(--vx-ink-soft); margin-right: 2px;
  display: inline-flex; align-items: center; }
/* Stroke-based SVG icons (search magnifier, refresh) inherit currentColor and
   size from their slot - crisp + consistent across OSes (no Unicode/emoji). */
.vx-search-icon svg { display: block; width: 16px; height: 16px; }
.vx-btn-icon { display: inline-flex; align-items: center; color: var(--vx-ink-soft);
  margin-right: 6px; }
.vx-btn-icon svg { display: block; width: 14px; height: 14px; }
/* Antessia control family - one EXACT height so native <select> and the ON/OFF
   <button> render at the same visual height (min-height alone did not equalize
   them: selects carry their own intrinsic UA height). Reusable on future menus
   via .vx-control / .vx-control-button. Font size is left per-control. */
.vx-control,
.vx-filters select, .vx-row-group-select, .vx-row-equip-select, .vx-opstatus-select, .vx-status-toggle {
  box-sizing: border-box; height: var(--vx-control-height); line-height: 1.2;
  padding: 0 10px; border-radius: 8px; vertical-align: middle;
  border: 1px solid var(--vx-control-border); background: var(--vx-control-bg);
  color: var(--vx-control-ink); }
/* Buttons in the family center their label vertically at the shared height. */
.vx-control-button, .vx-status-toggle {
  display: inline-flex; align-items: center; justify-content: center; }
tr.vx-rowedit > td { background: var(--vx-surface-soft); padding: 8px 10px;
  border-bottom: 1px solid var(--vx-line, #d9dde3); }
.vx-row-save, .vx-row-reset { margin-right: 8px; }
/* REMOVED 2026-09-01: the .vx-modal* family (modal / backdrop / box / head / h /
   close / sm). The UI migrated from floating modals to inline expanding panels and
   SEVEN test files now BAN this markup on every page, so the rules could only ever
   style something the suite rejects. .vx-confirm-* below is still live. */
.vx-confirm-msg { font-size: 14px; margin: 4px 0 14px; }
.vx-confirm-actions { display: flex; gap: 10px; }
.vx-det-card { border: 1px solid var(--vx-line, #d9dde3); border-radius: 8px;
  padding: 10px 12px; margin-bottom: 10px; }
.vx-det-h { margin: 0 0 6px; font-size: 13px; }
.vx-det-row { display: flex; gap: 8px; padding: 2px 0; font-size: 13px; }
.vx-det-k { color: var(--vx-off-ink); min-width: 90px; }
.vx-det-v { font-weight: 600; }

/* P5f: Template Usage Map (read-only) */
.chip.neutral { background: var(--vx-off-bg); color: var(--vx-off-ink); border: 1px solid var(--vx-line, #d9dde3); }
.chip.ok { background: var(--vx-on-bg); color: #1d6b3a; border: 1px solid #b6e0c4; }
#template-usage { margin-top: 16px; }
.tu-card { border: 1px solid var(--vx-line, #d9dde3); border-radius: 10px;
  padding: 10px 12px; margin: 10px 0; background: var(--vx-surface); }
.tu-card.tu-tier-high-risk { border-color: #e6a4a0; background: var(--vx-bad-bg); }
.tu-card.tu-tier-immediate-fallback-impact { border-color: #e8d99a; background: var(--vx-warn-bg); }
.tu-card.tu-tier-safe-ish { border-color: #cdd4dc; }
.tu-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.tu-risk { font-weight: 600; }
.tu-tier { font-size: 11px; }
.tu-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 8px 0 6px; font-size: 12px; }
.tu-pair .tu-k { color: var(--vx-off-ink); }
.tu-pair .tu-v { font-weight: 600; }
.tu-acts { display: flex; gap: 12px; }
/* ---- API documentation page (api.html) ----------------------------------- */
/* Method badges. Mutating methods (POST/PUT/DELETE) read as cautionary but not
   alarming - muted amber/red tints, never a loud solid fill. */
.vx-m { display: inline-flex; align-items: center; justify-content: center;
  min-width: 52px; padding: 1px 8px; border-radius: 6px; font-size: 11px;
  font-weight: 600; letter-spacing: 0.4px; border: 1px solid transparent; }
.vx-m-get { background: var(--vx-on-bg); color: var(--vx-on-ink); border-color: var(--vx-on-line); }
.vx-m-post { background: var(--vx-accent-soft); color: #2f3f8a; border-color: var(--vx-accent-soft-line); }
.vx-m-put { background: var(--vx-warn-bg); color: var(--vx-warn-ink); border-color: var(--vx-warn-line); }
.vx-m-delete { background: var(--vx-bad-bg); color: var(--vx-bad-ink); border-color: var(--vx-bad-line); }
.vx-api-group { margin-bottom: 14px; }
.vx-api-internal { font-size: 12px; color: var(--vx-warn-ink); background: var(--vx-warn-bg);
  border: 1px solid var(--vx-warn-line); border-radius: 8px; padding: 6px 10px; margin: 4px 0 8px; }
.vx-api-ep { border: 1px solid var(--vx-line); border-radius: 10px; padding: 9px 12px;
  margin: 8px 0; background: var(--vx-surface-soft); }
.vx-api-ep.is-mut { border-color: var(--vx-warn-line); background: var(--vx-warn-bg); }
.vx-api-ep-top { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; }
.vx-api-path { font-family: ui-monospace, monospace; font-size: 13px; color: var(--vx-ink);
  word-break: break-all; }
.vx-api-caution { font-size: 11px; font-weight: 600; color: var(--vx-warn-ink);
  background: var(--vx-warn-bg); border: 1px solid var(--vx-warn-line);
  border-radius: 999px; padding: 1px 9px; }
.vx-api-summary { margin: 6px 0 2px; font-size: 13px; color: var(--vx-ink); }
.vx-api-det { margin-top: 4px; }
.vx-api-det > summary { cursor: pointer; font-size: 12px; font-weight: 600;
  color: var(--vx-ink-soft); }
.vx-api-field { display: flex; gap: 8px; padding: 3px 0; font-size: 12px;
  border-top: 1px solid var(--vx-line-soft); }
.vx-api-field:first-of-type { border-top: none; }
.vx-api-field-k { flex: 0 0 132px; color: var(--vx-ink-soft); font-weight: 600; }
.vx-api-field-v { flex: 1; color: var(--vx-ink); min-width: 0; }
.vx-api-note { font-size: 12px; color: var(--vx-ink-soft); margin: 6px 0 0;
  font-style: italic; }

/* ---- RAW page (raw.html) -------------------------------------------------- */
.vx-raw-pre { width: 100%; box-sizing: border-box; margin: 6px 0 0;
  font-family: ui-monospace, monospace; font-size: 12px;
  background: var(--vx-surface-soft); border: 1px solid var(--vx-line); border-radius: 8px;
  padding: 10px 12px; overflow: auto; max-height: 420px; color: var(--vx-ink); }
.vx-section-h { margin: 18px 0 4px; font-size: 13px; text-transform: uppercase;
  letter-spacing: 0.6px; color: var(--vx-ink-soft); }
.vx-raw-danger { border-color: var(--vx-bad-line); }
.vx-raw-danger .vx-panel-header h2 { color: var(--vx-bad-ink); }
.vx-raw-danger-note { border-color: var(--vx-bad-line); background: var(--vx-bad-bg); }

/* ---- Build / version display (What's New "Current build" card) ----------- */
.vx-build-block { margin: 0 0 12px; }
.vx-build-card { border: 1px solid var(--vx-line); border-radius: 10px;
  padding: 10px 12px; background: var(--vx-surface-soft); }
.vx-build-h { margin: 0 0 6px; font-size: 12px; text-transform: uppercase;
  letter-spacing: 0.5px; color: var(--vx-ink-soft); }
.vx-build-row { display: flex; gap: 8px; padding: 3px 0; font-size: 13px;
  border-top: 1px solid var(--vx-line-soft); }
.vx-build-row:first-of-type { border-top: none; }
.vx-build-k { flex: 0 0 110px; color: var(--vx-ink-soft); font-weight: 600; }
.vx-build-v { flex: 1; color: var(--vx-ink); min-width: 0; word-break: break-word; }

/* Button rows are self-contained in the shared sheet too (RAW/API don't load
   styles.css) so Save / Cancel / Undo sit in a clean row with spacing. */
.actions { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 8px; }

/* ---- Message rows -----------------------------------------------------------
   Same reason as .actions above, and found the same way (2026-09-10): `.msg`,
   `.msg.ok`, `.msg.warn` and `.msg.error` lived ONLY in styles.css, which only
   home.html loads - so on /raw.html, the one page whose whole message surface is
   built by rawMsg("ok"|"warn"|"error"), every success, warning and error rendered
   as an UNTONED div. The tone IS the message's role, and the role was inert on the
   page that has the most of them. Tokens, not the hex styles.css hard-codes, so the
   rows also follow the Day/Night theme (which the light-only hexes never did). */
.msg { padding: 8px 10px; border-radius: 6px; margin-bottom: 8px; font-size: 13px; }
.msg.ok { background: var(--vx-on-bg); color: var(--vx-on-ink);
  border: 1px solid var(--vx-on-line); }
.msg.warn { background: var(--vx-warn-bg); color: var(--vx-warn-ink);
  border: 1px solid var(--vx-warn-line); }
.msg.error { background: var(--vx-bad-bg); color: var(--vx-bad-ink);
  border: 1px solid var(--vx-bad-line); }

/* ---- RAW editor sizing -----------------------------------------------------
   raw.html loads only vixty.css (not styles.css), so the shared sheet must give
   textareas a full width - otherwise the RAW editors render at the browser
   default (cols) width and are far too narrow to edit. */
body.vx-app textarea { width: 100%; box-sizing: border-box; }
.vx-raw-textarea { width: 100%; box-sizing: border-box; min-height: 420px;
  font-family: ui-monospace, monospace; font-size: 12px; line-height: 1.45;
  resize: vertical; padding: 10px 12px; border: 1px solid var(--vx-line);
  border-radius: 8px; background: var(--vx-surface-soft); color: var(--vx-ink); }
.vx-raw-textarea-tall { min-height: 560px; }
/* The editor wrappers fill the full content width of their card (no extra cap). */
#raw-editor, #rawfile-editor { width: 100%; }
@media (max-width: 720px) {
  .vx-raw-textarea { min-height: 300px; }
  .vx-raw-textarea-tall { min-height: 360px; }
}

/* ---- What's New "Important changes" (grouped changelog) -------------------- */
.vx-changelog { margin-top: 6px; }
.vx-changelog-item { padding: 8px 0; border-top: 1px solid var(--vx-line-soft); }
.vx-changelog-item:first-child { border-top: none; }
.vx-changelog-head { display: flex; flex-wrap: wrap; align-items: baseline;
  gap: 8px; }
.vx-changelog-title { font-weight: 600; font-size: 13px; color: var(--vx-ink); }
.vx-changelog-meta { font-size: 11px; color: var(--vx-ink-soft); }
.vx-changelog-sum { margin: 3px 0 0; font-size: 12px; color: var(--vx-ink-soft);
  line-height: 1.45; }

/* Dashboard brand / platform identity block (enterprise, understated). A light
   card (soft surface + neutral border, via .vx-card) holding the Antessia mark on
   a small rounded brand plate beside a compact identity + build chip. */
.vx-brand-card { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.vx-brand-plate {
  flex: 0 0 auto; display: flex; align-items: center; justify-content: center;
  padding: 14px 20px; border-radius: 12px;
  /* Brand identity surface - the same dark gradient family as the sidebar, where
     this metallic mark already lives. The PNG is TRANSPARENT, so its anti-aliased
     edges fade into the plate (no hard/opaque black rectangle). */
  background: linear-gradient(180deg, #0a0d14 0%, #11151f 60%, #171c28 100%);
  border: 1px solid #1c2130; }
.vx-brand-mark { display: block; width: auto; height: auto;
  max-width: 220px; max-height: 56px; }
.vx-brand-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.vx-brand-name { display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  font-weight: 600; font-size: 15px; color: var(--vx-ink); }
.vx-brand-badge { font-size: 10.5px; font-weight: 600; letter-spacing: 0.4px;
  text-transform: uppercase; color: var(--vx-ink-soft);
  background: var(--vx-line-soft); border: 1px solid var(--vx-line);
  border-radius: 999px; padding: 2px 8px; }
.vx-brand-sub { font-size: 12.5px; color: var(--vx-ink-soft); }
.vx-brand-chip { align-self: flex-start; margin-top: 4px; font-size: 11.5px;
  color: var(--vx-ink-soft); background: var(--vx-bg);
  border: 1px solid var(--vx-line); border-radius: 999px; padding: 2px 9px; }
/* Secondary "Powered by Vixty" mark - subtle, right-aligned, never dominates the
   Antessia name. Thin divider on wide screens; stacks below on narrow. */
.vx-brand-powered { margin-left: auto; align-self: stretch; display: flex;
  flex-direction: column; justify-content: center; align-items: flex-end; gap: 1px;
  padding-left: 18px; border-left: 1px solid var(--vx-line-soft); text-align: right; }
.vx-powered-label { font-size: 9.5px; font-weight: 600; letter-spacing: 1px;
  text-transform: uppercase; color: var(--vx-ink-soft); opacity: 0.7; }
.vx-powered-name { font-size: 14px; font-weight: 600; letter-spacing: 0.2px;
  color: var(--vx-ink); text-decoration: none; transition: color 0.12s ease; }
/* Vixty links to v64.ai - subtle by default, visible-but-quiet on hover/focus. */
a.vx-powered-name:hover { color: var(--vx-accent); text-decoration: underline;
  text-underline-offset: 2px; }
a.vx-powered-name:focus-visible { outline: none; color: var(--vx-accent);
  border-radius: 4px; box-shadow: 0 0 0 3px var(--vx-focus-ring); }
/* v64.ai on its own row under the Vixty mark - small, subtle, same quiet hover. */
.vx-powered-url { font-size: 11px; letter-spacing: 0.2px; color: var(--vx-ink-soft);
  text-decoration: none; transition: color 0.12s ease; }
a.vx-powered-url:hover { color: var(--vx-accent); text-decoration: underline;
  text-underline-offset: 2px; }
a.vx-powered-url:focus-visible { outline: none; color: var(--vx-accent);
  border-radius: 4px; box-shadow: 0 0 0 3px var(--vx-focus-ring); }
@media (max-width: 520px) {
  .vx-brand-powered { margin-left: 0; align-items: flex-start; text-align: left;
    border-left: none; padding-left: 0; padding-top: 10px; width: 100%;
    border-top: 1px solid var(--vx-line-soft); }
  .vx-brand-plate { padding: 12px 14px; }
  .vx-brand-mark { max-width: 170px; max-height: 46px; } }

/* === Inline expanding rows (Vehicles: the announcement / trip-confirm / status-confirm
   panels) ====================================================================
   A confirm or announcement panel is re-placed INLINE as a full-width row directly beneath
   the vehicle row it is about, pushing the rows below it down naturally (no floating modal,
   no overlap). The row itself is structural only - no hover, cursor or borders of its own;
   the adopted panel brings its own card chrome. */
.vx-data-table tbody tr.vx-detail-row,
.vx-data-table tbody tr.vx-detail-row:hover { background: transparent; cursor: default; }
.vx-data-table tbody tr.vx-detail-row > td.vx-detail-cell {
  padding: 0; border-bottom: 1px solid var(--vx-line); }

/* === Enterprise consistency: read-only status toggle + Advanced disclosure ===
   A display-only pill toggle for enabled/active status (green on / grey off).
   It mirrors the operational toggle look without being an interactive write
   control (state still changes via the Edit form / existing controls). */
.vx-toggle { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; }
.vx-toggle-track { position: relative; flex: 0 0 auto; width: 30px; height: 17px;
  border-radius: 999px; background: var(--vx-off-line); transition: background 0.12s ease; }
.vx-toggle-track::after { content: ""; position: absolute; top: 2px; left: 2px;
  width: 13px; height: 13px; border-radius: 50%; background: #fff;
  box-shadow: 0 1px 2px rgba(16, 22, 35, 0.25); transition: left 0.12s ease; }
.vx-toggle.is-on .vx-toggle-track { background: var(--vx-status-ready-indicator); }
.vx-toggle.is-on .vx-toggle-track::after { left: 15px; }
.vx-toggle-label { font-weight: 500; color: var(--vx-ink); }
.vx-toggle.is-off .vx-toggle-label { color: var(--vx-ink-soft); }
@media (prefers-reduced-motion: reduce) {
  .vx-toggle-track, .vx-toggle-track::after { transition: none; }
}

/* Settings -> Communications (channels + notifications) */
/* P2: WhatsApp gateway health badge (always-on; owner Settings) */
.vx-wa-health { display: flex; align-items: center; gap: 8px; margin-bottom: 14px;
  padding: 8px 12px; border-radius: 8px; font-size: 13px; font-weight: 600; }
.vx-wa-health.ok { background: var(--vx-on-bg); color: #1a7f43; border: 1px solid #b6e2c6; }
.vx-wa-health.bad { background: var(--vx-bad-bg); color: #b4232a; border: 1px solid #f2b8b8; }
.vx-wa-dot { width: 9px; height: 9px; border-radius: 50%; background: currentColor;
  flex: 0 0 auto; }
/* P-shared: the company "add our number" how-to steps */
.vx-wa-steps { margin: 4px 0 10px; padding-left: 20px; font-size: 13px; color: #3a4150;
  line-height: 1.5; }
.vx-wa-steps li { margin-bottom: 4px; }
/* P-shared claim-code (firm self-service) */
.vx-wa-claim { margin-top: 8px; display: flex; flex-direction: column; gap: 8px;
  align-items: flex-start; }
.vx-wa-code { font-family: monospace; font-size: 18px; font-weight: 700; letter-spacing: 2px;
  background: var(--vx-accent-soft); color: #1e293b; border: 1px dashed var(--vx-accent-soft-line); border-radius: 6px;
  padding: 6px 12px; }
.vx-wa-cand-list { list-style: none; padding: 0; margin: 0; width: 100%; }
.vx-wa-cand-list li { display: flex; align-items: center; gap: 10px; padding: 6px 0;
  border-bottom: 1px solid #eef0f3; }
.vx-wa-cand-meta { flex: 1; font-size: 13px; }
.vx-comm-card { margin-bottom: 14px; }
.vx-comm-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.vx-comm-title { font-weight: 600; font-size: 15px; color: var(--vx-ink); flex: 1 1 auto; }
.vx-comm-soon { font-size: 11px; color: var(--vx-ink-soft); background: var(--vx-control-hover-bg);
  border: 1px solid var(--vx-line); border-radius: 999px; padding: 2px 8px; }
.vx-comm-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px; margin: 12px 0; }
.vx-comm-hint { font-size: 12px; color: var(--vx-ink-soft); margin: 4px 0 10px; line-height: 1.5; }
.vx-comm-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.vx-comm-saveflash { font-size: 12px; color: var(--vx-on-ink); opacity: 0;
  transition: opacity 0.15s ease; }
.vx-comm-saveflash.show { opacity: 1; }
.vx-comm-result { margin-top: 8px; font-size: 12px; color: var(--vx-ink-soft);
  display: grid; gap: 3px; }
.vx-notif-row { display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--vx-line); }
.vx-notif-row:last-child { border-bottom: none; }
/* A short numeric field on a settings row (e.g. the check-in radius); height, border and radius come
   from the shared .vx-control family. */
.vx-num-input { width: 96px; text-align: right; }
.vx-notif-label { color: var(--vx-ink); font-size: 14px; }
/* booked-load display 2026-10-11: a BOOKED sub-option row, indented under its notification. */
.vx-notif-opt { padding-left: 16px; }
.vx-notif-opt .vx-notif-label { color: var(--vx-ink-soft); font-size: 13px; }

/* WhatsApp pairing (QR connect) body inside the channel card. */
.vx-wa-body { margin-top: 12px; }
.vx-wa-who { font-size: 14px; color: var(--vx-ink); margin: 0 0 10px; font-weight: 500; }
.vx-wa-qr { display: block; width: 320px; height: 320px; max-width: 100%;
  border: 1px solid var(--vx-line); border-radius: 8px; background: var(--vx-surface);
  padding: 8px; box-sizing: border-box; image-rendering: pixelated; }
.vx-wa-picker { margin: 4px 0 8px; }
.vx-wa-group { min-width: 220px; max-width: 100%; }
.vx-wa-busy::before { content: ""; display: inline-block; width: 10px; height: 10px;
  margin-right: 8px; border-radius: 50%; border: 2px solid var(--vx-line);
  border-top-color: var(--vx-ink-soft); vertical-align: -1px;
  animation: vx-wa-spin 0.8s linear infinite; }
@keyframes vx-wa-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .vx-wa-busy::before { animation: none; } }

/* Advanced/Developer disclosure: keeps technical metadata (IDs, version, raw
   config) available but out of the primary operator view. */
.vx-advanced { margin-top: 12px; border-top: 1px solid var(--vx-line-soft);
  padding-top: 6px; }
.vx-advanced > summary { cursor: pointer; font-size: 12px; font-weight: 600;
  color: var(--vx-ink-soft); padding: 4px 0; }
.vx-advanced > summary:hover { color: var(--vx-ink); }
.vx-advanced[open] > summary { margin-bottom: 8px; }

/* Compact inline-panel meta line, e.g. "11 zones - 13 active rings - Version 1". */
.vx-detail-meta { font-size: 12.5px; color: var(--vx-ink-soft); margin: 2px 0 12px; }
.vx-detail-name { font-size: 16px; font-weight: 600; color: var(--vx-ink); }
.vx-detail-headrow { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* === In-app inline confirmation card (replaces native browser popups) =========
   A self-contained confirmation panel rendered next to a destructive/safety
   action (Zone Group OFF, raw-file restore). Styled standalone so it looks right
   on pages that do not load fleet.css/zones.css (e.g. raw.html loads only this).
   See docs/ops/STYLE.md - native window.confirm/alert/prompt are not allowed. */
.vx-inline-confirm { margin: 8px 0; padding: 12px 14px; background: var(--vx-warn-bg);
  border: 1px solid var(--vx-warn-line); border-radius: 10px;
  box-shadow: var(--vx-shadow); max-width: 460px; }
.vx-inline-confirm-title { font-size: 13.5px; font-weight: 600; color: var(--vx-ink);
  margin-bottom: 4px; }
.vx-inline-confirm-msg { margin: 0 0 10px; font-size: 13px; line-height: 1.45;
  color: var(--vx-warn-ink); }
.vx-inline-confirm-acts { display: flex; gap: 8px; flex-wrap: wrap; }
/* 18v S2: announcement tone "bad" (renderAnnouncement sets data-vx-tone; e.g. a saved time window
   that has already ended). Tokens only, so light and dark both follow the theme. */
.vx-inline-confirm[data-vx-tone="bad"] { background: var(--vx-bad-bg); border-color: var(--vx-bad-line); }
.vx-inline-confirm[data-vx-tone="bad"] .vx-inline-confirm-title { color: var(--vx-bad-ink); }
.vx-inline-confirm-acts button { font-size: 13px; }
button.vx-confirm-primary { background: var(--vx-bad-fill); color: var(--vx-on-bad-fill);
  border-color: var(--vx-bad-fill-line); font-weight: 600; }
button.vx-confirm-primary:hover:not([disabled]) { background: var(--vx-bad-fill-hover); }

/* --- Announcement surface (owner 2026-09-02) -------------------------------------------------
   The ONE window for operator communications. It is not a new visual language: the host is the
   existing .vx-inline-confirm panel, and these classes only lay out the parts the host cannot
   express - the AFFECTED-ENTITIES list (plates, and where relevant companies), the dispatcher
   call to action, and the CLAUDE.md 7b offer-to-resolve question. Colours ride --vx-* tokens
   only, so a Day/Night swap stays a token swap. */
.vx-announce-block { margin: 0 0 10px; }
.vx-announce-h { margin: 0 0 4px; font-size: 12px; font-weight: 600;
  letter-spacing: 0.02em; text-transform: uppercase; color: var(--vx-ink-soft); }
.vx-announce-list { list-style: none; margin: 0 0 8px; padding: 0;
  display: flex; flex-direction: column; gap: 2px; }
.vx-announce-item { font-size: 13px; line-height: 1.4; color: var(--vx-ink); }
.vx-announce-plate { font-weight: 600; color: var(--vx-ink); }
.vx-announce-company { font-size: 12px; color: var(--vx-ink-soft); }
.vx-announce-note { font-size: 12px; color: var(--vx-warn-ink); }
.vx-announce-cta { margin: 0 0 6px; font-size: 13px; line-height: 1.45;
  font-weight: 600; color: var(--vx-ink); }
.vx-announce-offer { margin: 0 0 8px; font-size: 13px; line-height: 1.45;
  color: var(--vx-warn-ink); }

/* --- Operator-shell auth box (logged-in user + logout, injected by auth-shell.js) --- */
.vx-authbox { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px;
  margin: 4px 8px 0; border-top: 1px solid var(--vx-border, #223047); }
.vx-authbox[hidden] { display: none; }
.vx-auth-who { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.vx-auth-name { font-weight: 600; font-size: 13px; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; }
.vx-auth-role { font-size: 11px; color: var(--vx-muted, #93a1b5);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vx-auth-logout { align-self: flex-start; font-size: 12px; cursor: pointer;
  padding: 5px 10px; border-radius: 8px; border: 1px solid var(--vx-border, #223047);
  background: transparent; color: inherit; }
.vx-auth-logout:hover { border-color: var(--vx-status-ready-indicator); }
/* SMS S9 begin - the authbox "Account security" link (shown only while phone verification is live) and the one
   shared muted hint line the account page uses (design S9 delta 5.4, revision 1 R1-14). Tokens only. */
.vx-auth-account { align-self: flex-start; font-size: 12px; color: inherit; text-decoration: none;
  padding: 2px 0; border-bottom: 1px solid var(--vx-border, var(--vx-line)); }
.vx-auth-account:hover { border-bottom-color: var(--vx-status-ready-indicator); }
.vx-hint { margin: 4px 0 0; font-size: 12px; color: var(--vx-ink-soft); }
/* A shared layout class with its own display rule outranks the UA [hidden] rule - hide these explicitly (the
   .vx-umenu-list[hidden] precedent). The account page toggles its forms and rows through [hidden]. */
.vx-comm-form[hidden], .vx-filter-group[hidden], .vx-chip-row[hidden] { display: none; }
/* SMS S9 end */

/* --- Alerts ticker (Phase 2.3 item B, owner 2026-07-18) --------------------------------------------
   Replaces the static page title in the .vx-page-titlebar with a right-to-left, news-style marquee.
   Injected by alerts-ticker.js; the <h1 class="vx-page-title"> stays in the DOM (a11y + tests) but is
   visually hidden while the ticker is active (.vx-has-ticker). All colours ride --vx-* tokens so a
   Day/Night theme swap stays a token swap. */
.vx-page-titlebar.vx-has-ticker .vx-page-title {
  /* visually hidden but a11y-present (screen-reader accessible) */
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.vx-ticker { position: relative; overflow: hidden; width: 100%; max-width: 100%;
  white-space: nowrap; -webkit-mask-image: linear-gradient(90deg, transparent, #000 3%,
    #000 97%, transparent); mask-image: linear-gradient(90deg, transparent, #000 3%,
    #000 97%, transparent); }
.vx-ticker-track { display: inline-block; white-space: nowrap; will-change: transform;
  animation: vx-ticker-scroll 32s linear infinite; }
.vx-ticker:hover .vx-ticker-track, .vx-ticker:focus .vx-ticker-track { animation-play-state: paused; }
.vx-ticker-item { display: inline-block; padding: 0 40px; font-size: 20px; font-weight: 600;
  color: var(--vx-ticker-ink, #fff); letter-spacing: 0.2px; }
.vx-ticker-item.is-warn { color: var(--vx-ticker-warn-ink); }
.vx-ticker-item.is-bad { color: var(--vx-ticker-bad-ink); font-weight: 700; }
@keyframes vx-ticker-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }   /* the track holds 2 copies -> -50% loops seamlessly */
}
@media (prefers-reduced-motion: reduce) {
  .vx-ticker-track { animation: none; }   /* static, no scroll - respects the OS preference */
  /* 18v S3: a static clipped line would hide every item after the first. The line stays ONE line - it must not
     wrap: --vx-chrome-h (99px) is a constant the feed and the rail stick to - the decorative second copy is
     dropped, and the line is a scrollport (swipe, trackpad, shift+wheel, or arrow keys: the ticker is focusable).
     No scrollbar (it would change the titlebar height); the cue is a fade at the RIGHT end only, so the start of
     the first alert is never faded. The alerts are first in the source order. */
  .vx-ticker { overflow-x: auto; overflow-y: hidden; scrollbar-width: none;
    -webkit-mask-image: linear-gradient(90deg, #000 92%, transparent); mask-image: linear-gradient(90deg, #000 92%, transparent); }
  .vx-ticker::-webkit-scrollbar { display: none; }
  .vx-ticker-item[aria-hidden="true"] { display: none; }
}
/* 18v S3: a "window ended" chip whose last refresh failed (kept for one interval, then dropped). No opacity: the
   contrast stays that of the chip; the text marker is in its title and aria-label. */
.vx-chip.vx-window-chip.is-stale { border-style: dashed; font-style: italic; }
.vx-chip.vx-payout-chip.is-stale { border-style: dashed; font-style: italic; }
/* 18v S3: the row slot that holds the window chips (18x-ch: below the plate). The " " separators collapse in a flex
   box, so the slot carries its own spacing; empty, it takes no room. */
.vx-window-slot { display: flex; flex-wrap: wrap; gap: 4px; margin: 2px 0 0; }
/* 18x-ch (owner 2026-11-19): the chips sit BELOW the plate. The slot is block-level (Updates: under the plate text);
   on Fleet it lives in .vx-plate-chips under the .vx-cell-main band. A chip may wrap inside a narrow plate column. */
.vx-plate-chips { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 4px; }
.vx-plate-chips > .vx-chip { margin-top: 2px; }
/* Wide: a chip keeps its one line (the plate column grows to the widest chip; render 2026-11-19 showed 3-line pills when
   the column was left to shrink). Phone width: a chip may wrap inside the plate column. */
@media (max-width: 760px) {
  .vx-plate-chips .vx-chip, .vx-window-slot .vx-chip { white-space: normal; max-width: 100%; }
}
.vx-window-slot:empty { display: none; }

/* =====================================================================
   Companies page - Updates-style numbered, draggable priority list
   (owner Phase 2.4). Mirrors the Updates drag affordances (.vx-pos /
   .vx-grip / .dragging / .drop-before / .drop-after), tokenized onto the
   companies row so the two bespoke inline styles that used to live in
   companies.js (a #8a8a8a priority sub-line + a width:64px input) are
   retired. All colours ride --vx-* tokens (no invented hex) so a Day/Night
   theme swap stays a token swap.
   ===================================================================== */
.vx-co-row { cursor: grab; }
.vx-co-row.dragging { opacity: 0.45; }
.vx-co-row.drop-before td { box-shadow: inset 0 2px 0 0 var(--vx-accent, #2d6cdf); }
.vx-co-row.drop-after td { box-shadow: inset 0 -2px 0 0 var(--vx-accent, #2d6cdf); }

/* The leading "#" cell: a drag grip glyph + the editable priority input. */
.vx-co-pos {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  color: var(--vx-ink-soft, #5b6472);
}
.vx-co-grip {
  color: var(--vx-ink-soft, #5b6472);
  user-select: none;
  padding-right: 6px;
  cursor: grab;
}
.vx-co-pos-input {
  width: 64px;
  padding: 6px 8px;
  border: 1px solid var(--vx-line, #d6dde6);
  border-radius: 8px;   /* Cade NIT: align to the design-system control radius (8px) */
  background: var(--vx-surface);
  color: var(--vx-ink, #1b2330);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

/* --- Telematics live-map page (display-only fleet map) --------------------- *
 * All colours/spacing on --vx-* tokens so a Day/Night theme swap is a token
 * swap, never a per-component rewrite (owner rule 2026-07-17). No magic hex. */
/* Layout #2 map sizing (owner 2026-07-22): the map must FILL the main content area
   inside the shell (like .vx-workspace on Vehicles), not sit at a collapsed/oversized
   fixed height. The shell-main is grid-row 3 (1fr of a 100vh grid) so it has a real
   height; the telematics main -> workspace -> panel -> map form a flex-fill chain that
   stretches to that height, with a viewport-relative floor so the map never collapses. */
.telematics-page { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; }
.telematics-page > .vx-workspace { flex: 1 1 auto; min-height: 0; }
.telematics-panel {
  position: relative;                 /* anchor for the centered empty-state overlay */
  display: flex;
  flex-direction: column;
  gap: var(--vx-gap, 12px);
  flex: 1 1 auto;
  min-height: 0;
}
.telematics-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--vx-gap, 12px);
  flex-wrap: wrap;
}
.telematics-legend {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--vx-ink-soft);
  font-size: 12px;
}
.telematics-legend-item { display: inline-flex; align-items: center; gap: 6px; }
.telematics-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--vx-off-ink);
  border: 1px solid var(--vx-line);
}
.telematics-dot.is-online { background: var(--vx-accent); border-color: var(--vx-accent-soft-line); }
.telematics-dot.is-offline { background: var(--vx-off-ink); border-color: var(--vx-off-line); }
/* Phase C legend glyphs: SHAPE encodes vehicle-vs-driver (mirroring the map markers),
   an arrow encodes heading, all tokenised so a Day/Night theme is a token swap. */
.telematics-toolbar-right { display: inline-flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.telematics-glyph {
  width: 11px; height: 11px;
  background: var(--vx-accent);
  border: 1px solid var(--vx-accent-soft-line);
}
.telematics-glyph.is-vehicle { border-radius: 3px; }     /* square-ish = a vehicle pin */
.telematics-glyph.is-driver { border-radius: 50%; }      /* round dot = a driver, no vehicle */
.telematics-arrow.is-heading {
  width: 0; height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-bottom: 8px solid var(--vx-accent);             /* a heading/bearing arrow */
}
/* Count bubble class for a clustered group (self-authored clusterer - NO external lib).
   Tokenised fill; the on-map bubble is an SVG data-URI baked from the same accent token. */
.telematics-cluster {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 22px; height: 22px; padding: 0 6px;
  border-radius: 999px;
  background: var(--vx-accent-fill); color: var(--vx-on-accent-fill);
  border: 2px solid var(--vx-surface);
  font-size: 12px; font-weight: 700;
}
.telematics-fit { flex: 0 0 auto; }
/* Marker redesign (2026-07-29): show-speed toggle + label chip. Token-only, no magic hex. */
.telematics-speed-toggle {
  flex: 0 0 auto;
  border-color: var(--vx-line);
  color: var(--vx-ink-soft);
  font-size: 12px;
}
.telematics-speed-toggle.is-active {
  background: var(--vx-accent-soft);
  border-color: var(--vx-accent);
  color: var(--vx-accent-ink);
}
/* Label chip: single-line, compact, rounded, subtle surface. Rendered below the
   badge dot via the Google Maps marker label (or a custom DOM element if needed).
   Used as a CSS reference class; the actual label is set via marker label API. */
.telematics-label-chip {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 6px;
  background: var(--vx-surface);
  border: 1px solid var(--vx-line);
  color: var(--vx-ink);
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.telematics-banner { margin: 0; }
.telematics-map {
  flex: 1 1 auto;
  min-height: 50vh;                   /* viewport-relative floor; flex fills the rest */
  width: 100%;
  border: 1px solid var(--vx-line);
  border-radius: var(--vx-radius);
  background: var(--vx-surface-soft);
  overflow: hidden;
}
/* Empty state (owner 2026-07-22): a centered, tokenised card shown over the map when
   the positions feed is empty (no driver sharing GPS). pointer-events:none so it never
   blocks panning; toggled via [hidden] by telematics.js. */
.telematics-empty {
  position: absolute; left: 50%; top: 58%; transform: translate(-50%, -50%);
  max-width: 320px; text-align: center; padding: 12px 16px;
  background: var(--vx-surface); border: 1px solid var(--vx-line);
  border-radius: var(--vx-radius); color: var(--vx-ink-soft);
  font-size: 13px; line-height: 1.5; box-shadow: var(--vx-shadow);
  pointer-events: none; z-index: 2;
}
.telematics-empty[hidden] { display: none; }

/* --- Telematics v2 Phase D: the 2-view switcher (Vehicles | Map) ----------- *
 * A CLASSIC ◀ LABEL ▶ navrow (reuses .vx-bf-navrow + .vx-bf-nav + the centre
 * .vx-bf-period-label) over TWO sibling views, only one shown at a time. All
 * spacing/colour on --vx-* tokens so a Day/Night swap is a token swap; no magic
 * hex, no inline styles (owner UI rules 2026-07-17). */
.telematics-view-switcher { display: flex; align-items: center; justify-content: center;
  margin: 0 0 var(--vx-gap, 12px); }
.telematics-view-navrow { justify-content: center; }
/* the centre label is INERT here (no date-picker overlay) - a plain view name. */
.telematics-view-label { min-width: 120px; cursor: default; }
.telematics-view-label:hover { background: var(--vx-control-bg); }
/* the two view containers: flex-fill so a view stretches the content area; the
   inactive one is [hidden]. Higher specificity than .telematics-panel's display,
   so the map view collapses cleanly when hidden. */
.telematics-view { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; }
.telematics-view[hidden] { display: none; }
.telematics-view-vehicles { gap: var(--vx-gap, 12px); }
.telematics-roster-table { width: 100%; }
.telematics-view-empty { padding: 16px 12px; text-align: center; color: var(--vx-ink-soft);
  font-size: 13px; line-height: 1.5; }
.telematics-view-empty[hidden] { display: none; }

/* H3: the History control bar - compact row of date/time pickers and action buttons.
   Tokenised sizing so it scales with the shared --vx-control-height token.
   Stays above the map div; no inline styles, no magic numbers. */
.telematics-history-bar {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 6px 0;
  border-bottom: 1px solid var(--vx-line);
  font-size: 13px; color: var(--vx-ink);
}
.telematics-history-label {
  font-weight: 500; white-space: nowrap; color: var(--vx-ink-soft);
}
.telematics-history-date { width: 140px; }
.telematics-history-time { width: 96px; }
.telematics-history-sep { color: var(--vx-ink-soft); padding: 0 2px; }
.telematics-history-msg {
  font-size: 12px; color: var(--vx-ink-soft); font-style: italic;
}
.telematics-history-msg[hidden] { display: none; }

/* Ph1 (2026-07-28): driver search-to-select for offline History access.
   The search input (.telematics-driver-search) and the floating results
   dropdown (.telematics-driver-results) reuse --vx-* tokens; no bespoke
   inline styles, no magic numbers. Presence badges mirror the status colours
   used in the roster table. */
.telematics-driver-search {
  position: relative; display: inline-block;
}
.telematics-driver-search-input {
  width: 200px;
}
.telematics-driver-results {
  position: absolute; top: 100%; left: 0; z-index: 100;
  background: var(--vx-surface); border: 1px solid var(--vx-line);
  border-radius: var(--vx-radius, 6px); box-shadow: 0 4px 12px rgba(0,0,0,.12);
  min-width: 240px; max-height: 280px; overflow-y: auto;
  font-size: 13px;
}
.telematics-driver-results[hidden] { display: none; }
.telematics-driver-result-item {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 10px; cursor: pointer; border-bottom: 1px solid var(--vx-line);
  color: var(--vx-ink);
}
.telematics-driver-result-item:last-child { border-bottom: none; }
.telematics-driver-result-item:hover,
.telematics-driver-result-item:focus { background: var(--vx-hover); outline: none;
  box-shadow: inset 0 0 0 2px var(--vx-focus-ring); }
.telematics-driver-result-name { font-weight: 500; flex: 1; }
.telematics-driver-result-plate { font-size: 11px; color: var(--vx-ink-soft); }
.telematics-driver-presence-badge {
  font-size: 11px; font-weight: 600; padding: 1px 6px;
  border-radius: 10px; white-space: nowrap;
}
.telematics-driver-presence-badge.is-online {
  background: var(--vx-on-bg, #d6f0e0); color: var(--vx-on-ink, #1d6b3a);
}
.telematics-driver-presence-badge.is-offline {
  background: var(--vx-off-bg, #eef0f2); color: var(--vx-off-ink, #5b636e);
}
.telematics-driver-result-error {
  padding: 8px 10px; color: var(--vx-warn-ink, #8b4513); font-size: 12px;
}

/* Ph2 (2026-07-28): History TIMELINE strip - scrubber, activity graph, play/pause,
   day arrows, trip arrows, quick-range chips. Token-based sizing; no magic hex;
   no inline styles. Shown only when _historyMode = true (telematics.js). */

/* Outer timeline container - sits between the history bar and the map div. */
.telematics-timeline {
  display: flex; flex-direction: column; gap: 4px;
  padding: 4px 0 6px; border-bottom: 1px solid var(--vx-line);
}
.telematics-timeline[hidden] { display: none; }

/* Top row: chips + day nav + trip nav + play button, all inline. */
.telematics-timeline-toprow {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px;
  font-size: 13px;
}

/* Quick-range chip cluster */
.telematics-timeline-chips { display: flex; gap: 4px; }
.telematics-chip {
  font-size: 12px; padding: 2px 10px;
  border-radius: var(--vx-radius, 6px);
  white-space: nowrap;
}
.telematics-chip.is-active {
  background: var(--vx-accent-fill, #2d6cdf); color: var(--vx-on-accent-fill, #fff);
  border-color: var(--vx-accent, #2d6cdf);
}

/* Day navigation row */
.telematics-timeline-dawnav { display: flex; align-items: center; gap: 4px; }
.telematics-timeline-dateinput { width: 136px; }
.telematics-timeline-arrow { padding: 2px 8px; font-size: 11px; }

/* Trip navigation */
.telematics-timeline-tripnav { display: flex; align-items: center; gap: 4px; }
.telematics-timeline-tripnav-label {
  font-size: 12px; color: var(--vx-ink-soft); white-space: nowrap;
}

/* Play/Pause button */
.telematics-play-btn { min-width: 56px; }

/* Activity graph: a horizontal strip with drive segments (filled) and gaps (stops).
   Clickable; positioned absolutely inside the relative container. */
.telematics-activity-graph {
  position: relative; height: 20px;
  background: var(--vx-control-bg, #f5f6f7);
  border-radius: var(--vx-radius, 6px);
  overflow: hidden; cursor: pointer;
  border: 1px solid var(--vx-line);
}
/* Drive segment: filled bar inside the graph, positioned by JS (left% + width%). */
.telematics-activity-drive {
  position: absolute; top: 2px; bottom: 2px;
  background: var(--vx-accent, #2d6cdf); border-radius: 2px;
  cursor: pointer; opacity: 0.82;
  transition: opacity 0.1s;
}
.telematics-activity-drive:hover { opacity: 1; }
/* Stop marker: a small vertical tick in the graph. */
.telematics-activity-stop {
  position: absolute; top: 3px; bottom: 3px; width: 2px;
  background: var(--vx-off-ink, #5b636e); border-radius: 1px; opacity: 0.55;
}

/* Scrubber row: the 00:00-24:00 track with a draggable playhead. */
.telematics-scrubber-wrap {
  display: flex; align-items: center; gap: 6px; font-size: 11px;
  color: var(--vx-ink-soft);
}
.telematics-scrubber-tick { white-space: nowrap; flex-shrink: 0; }
/* The track itself - the element the user drags inside. */
.telematics-scrubber {
  position: relative; flex: 1 1 auto; height: 6px;
  background: var(--vx-control-bg, #f5f6f7);
  border: 1px solid var(--vx-line);
  border-radius: 3px; cursor: pointer;
}
/* The draggable playhead knob. */
.telematics-playhead {
  position: absolute; top: 50%; left: 0;
  transform: translate(-50%, -50%);
  width: 14px; height: 14px;
  background: var(--vx-accent, #2d6cdf);
  border: 2px solid #fff;
  border-radius: 50%;
  box-shadow: 0 1px 4px rgba(0,0,0,.18);
  cursor: grab; touch-action: none;
}
.telematics-playhead:active { cursor: grabbing; }
/* Current time label next to the scrubber. */
.telematics-scrubber-time {
  min-width: 42px; font-size: 12px; font-weight: 500;
  color: var(--vx-ink); white-space: nowrap;
}
.telematics-no-history {
  padding: 6px 12px; font-size: 13px; font-style: italic;
  color: var(--vx-ink-dim); text-align: center;
}
.telematics-no-history[hidden] { display: none; }

/* ---- Live ETA panel (2026-07-29) ---------------------------------------- */
.telematics-eta-panel {
  display: flex; flex-direction: column; gap: 6px;
  padding: 8px 12px;
  background: var(--vx-surface);
  border-bottom: 1px solid var(--vx-line);
}
.telematics-eta-panel[hidden] { display: none; }

.telematics-eta-row {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
}
.telematics-eta-input {
  flex: 1 1 180px; min-width: 120px;
}

/* Stats row: ETA / distance / speed / clock time */
.telematics-eta-stats {
  display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap;
  font-size: 13px;
}
.telematics-eta-stats[hidden] { display: none; }

.telematics-eta-label {
  color: var(--vx-ink-soft); font-weight: 500; white-space: nowrap;
}
.telematics-eta-value {
  color: var(--vx-ink); font-weight: 600; white-space: nowrap; min-width: 40px;
}
.telematics-eta-clock {
  margin-left: 6px; color: var(--vx-ink-soft); font-style: italic;
  font-size: 12px; white-space: nowrap;
}

/* Arrived banner */
.telematics-eta-arrived {
  font-size: 13px; font-weight: 700;
  color: var(--vx-on-ink, #1d6b3a);
  padding: 4px 0;
}
.telematics-eta-arrived[hidden] { display: none; }

/* Inline message (fallback / Directions API not enabled) */
.telematics-eta-msg {
  font-size: 12px; font-style: italic;
  color: var(--vx-ink-dim); padding: 2px 0;
}
.telematics-eta-msg[hidden] { display: none; }

/* Descending distance-over-time SVG graph */
.telematics-eta-graph {
  width: 100%; height: 48px; overflow: hidden;
  border-radius: var(--vx-radius, 4px);
  background: var(--vx-hover);
}
.telematics-eta-graph:empty { display: none; }

/* ---- Live-ETA 5-feature enhancements (2026-07-29) -----------------------
   Feature 1: Saved / recent destinations quick-pick chips
   Feature 2: Zone picker (styled as .vx-control select)
   Feature 3: Traffic indicator badge (token-colored, light / moderate / heavy)
   Feature 4: In-app arrival alert banner (prominent, local only)
   Feature 5: Live speed readout (always visible)
   All additive - no existing rule modified. Reduced-motion safe (no animation).
   -------------------------------------------------------------------------- */

/* Feature 5: Live speed always-visible row */
.telematics-eta-live-speed-row {
  display: flex; align-items: baseline; gap: 6px;
  font-size: 13px;
}
.telematics-eta-live-speed {
  font-size: 16px; font-weight: 700; color: var(--vx-ink);
  min-width: 64px;
}

/* Feature 2: Zone picker select - same height/radius as other .vx-control elements */
.telematics-eta-zone-pick {
  flex: 1 1 180px; min-width: 140px;
  height: var(--vx-control-height, 38px);
  border: 1px solid var(--vx-control-border);
  border-radius: 8px;
  background: var(--vx-control-bg);
  color: var(--vx-control-ink);
  font-size: 13px; padding: 0 8px;
  cursor: pointer;
}
.telematics-eta-zone-pick:focus {
  outline: 2px solid var(--vx-focus-ring);
  border-color: var(--vx-control-border-focus);
}

/* Feature 1: Recent destinations chips container */
.telematics-eta-recents {
  display: flex; flex-wrap: wrap; gap: 4px;
  padding: 2px 0;
}
.telematics-eta-recents[hidden] { display: none; }
.telematics-eta-recent-chip {
  display: inline-flex; align-items: center;
  font-size: 12px; padding: 2px 8px;
  background: var(--vx-accent-soft); color: var(--vx-accent-ink);
  border: 1px solid var(--vx-accent-soft-line);
  border-radius: 12px; cursor: pointer; white-space: nowrap;
  line-height: 1.4;
}
.telematics-eta-recent-chip:hover {
  background: var(--vx-accent); color: var(--vx-surface);
}

/* Feature 3: Traffic badge - token-based colors only, no magic hex */
.telematics-eta-traffic {
  display: inline-flex; align-items: center;
  font-size: 11px; font-weight: 600; padding: 1px 6px;
  border-radius: 10px; white-space: nowrap; margin-left: 2px;
}
.telematics-eta-traffic[hidden] { display: none; }
/* Light traffic: reuse the on/green token set */
.vx-traffic-light {
  background: var(--vx-on-bg); color: var(--vx-on-ink);
  border: 1px solid var(--vx-on-line);
}
/* Moderate traffic: reuse the warn/amber token set */
.vx-traffic-moderate {
  background: var(--vx-warn-bg); color: var(--vx-warn-ink);
  border: 1px solid var(--vx-warn-line);
}
/* Heavy traffic: reuse the bad/red token set */
.vx-traffic-heavy {
  background: var(--vx-bad-bg); color: var(--vx-bad-ink);
  border: 1px solid var(--vx-bad-line);
}

/* Feature 4: In-app arrival alert banner */
.telematics-eta-alert {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 12px;
  background: var(--vx-on-bg); color: var(--vx-on-ink);
  border: 2px solid var(--vx-on-line);
  border-radius: 8px;
  font-size: 14px; font-weight: 700;
}
.telematics-eta-alert[hidden] { display: none; }

/* ==========================================================================
   Ph3 - Focus full-screen shell (2026-07-29)
   Body class .vx-telematics-focus: hides shell chrome, expands the map
   section to fill the entire viewport. All existing telematics overlays
   (driver search, history timeline, Live ETA, view controls) remain visible
   as overlays on top of the full-screen map (Ph4 will make them draggable).
   Additive-only: no existing rule changed.
   ========================================================================== */

/* Hide shell chrome in Focus mode. */
.vx-telematics-focus .vx-sidebar     { display: none; }
.vx-telematics-focus .vx-topbar      { display: none; }
.vx-telematics-focus .vx-page-titlebar { display: none; }
/* Ph4 (2026-07-29): the Booked window is NO LONGER hidden in Focus - it becomes
   a floating window (see the .vx-fwin block below). The Ph3 rule that set the
   booked feed to display:none in Focus was removed. */

/* Expand the map section to fill the viewport. The telematics map section
   (.telematics-panel[data-view="map"]) gets position:fixed + inset:0 so the
   map area takes the full screen. z-index 200 sits above all shell chrome
   (topbar z-index 20, titlebar z-index 19) but below any modal dialogs. */
.vx-telematics-focus .telematics-panel[data-view="map"] {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: var(--vx-surface, #fff);
  padding: var(--vx-gap, 12px);
  box-sizing: border-box;
  overflow: auto;
}

/* Map control button group (owner 2026-07-29): compact, segmented icon-button
   cluster for Show-speed + Focus enter/exit. Token-only, no magic hex.
   Reusable by any map overlay that needs a tight row of icon-action buttons. */
.vx-map-ctrl-group {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 2px;
  flex: 0 0 auto;
}
.vx-map-ctrl-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 10px;
  min-height: var(--vx-control-h, 30px);
  border: 1px solid var(--vx-line);
  border-radius: var(--vx-radius, 6px);
  background: var(--vx-surface);
  color: var(--vx-ink-soft);
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.12s, color 0.12s, border-color 0.12s;
}
.vx-map-ctrl-btn:hover {
  background: var(--vx-surface-raised);
  color: var(--vx-ink);
  border-color: var(--vx-accent);
}
.vx-map-ctrl-btn:focus-visible {
  outline: 2px solid var(--vx-accent);
  outline-offset: 2px;
}
.vx-map-ctrl-btn.is-active {
  background: var(--vx-accent-soft);
  border-color: var(--vx-accent);
  color: var(--vx-accent-ink);
}

/* Focus button: map overlay control (top-right of the map section). Owner
   2026-09-07: this is now the SINGLE Focus/full-screen toggle - the separate
   Exit Focus button (and its rule) were removed. Its pressed state reuses the
   shared .vx-map-ctrl-btn.is-active tokens, so it needs no bespoke styling. */
.telematics-focus-btn {
  flex: 0 0 auto;
}

/* ==========================================================================
   Map marker label pill (owner 2026-09-07)
   Owner: the map text looked "too classic" - the same colour and treatment as
   Google's own map text, overlapping it and therefore not visible.
   The driver/vehicle label is a google.maps.MarkerLabel. A naked MarkerLabel is
   drawn by GOOGLE'S OWN renderer with its default styling - dark text, no
   background - the exact treatment its place labels get, so our text collided with
   the basemap text. telematics.js labelSpec() now passes className "vx-map-label"
   and the pill is authored here, on --vx-* tokens only (Day/Night = a token swap).

   !important is load-bearing, not decoration: Google writes color, white-space and
   the font props as INLINE styles on the label element, and an author !important is
   the only author declaration that beats an inline one.

   `translate`, NOT `transform`: markerIcon's labelOrigin is the pill's CENTRE, so a
   two-line pill would sit back over the badge. `translate` COMPOSES with whatever
   transform Google writes on the element, whereas a `transform` here would REPLACE
   it and could break Google's own centring. (No collision management is in use, so
   the Maps caveat about transformed labels does not apply.)
   ========================================================================== */
.vx-map-label {
  background: var(--vx-surface) !important;
  color: var(--vx-ink-soft) !important;
  /* The typeface is authored HERE as well as in labelSpec's fontFamily. Google writes the
     label's font props as INLINE styles from the MarkerLabel object, and the JS side passes
     the literal string "var(--vx-font, ...)" through Google's own CSSOM write - which is one
     assumption too many to rest a whole design system on. This author !important beats the
     inline declaration either way, so the pill uses OUR font even if that string is ever
     dropped or normalised away. The JS fontFamily stays: it is what a non-!important future
     would need, and it costs nothing. */
  font-family: var(--vx-font) !important;
  border: 1px solid var(--vx-line) !important;
  border-radius: 8px !important;
  padding: 3px 8px !important;
  box-shadow: var(--vx-shadow) !important;
  white-space: pre-line !important;    /* honour the "\n" between the two lines */
  text-align: center !important;
  line-height: 1.3 !important;
  translate: 0 50%;                    /* hang BELOW the anchor, any line count */
}

/* Line 1 is the PLATE: strong ink, heavier, a touch larger. ::first-line accepts
   font + colour properties, which is all this needs - and it is the only way to get
   two weights out of the ONE text node a MarkerLabel allows (its text is plain text;
   there is no markup). */
.vx-map-label::first-line {
  color: var(--vx-ink) !important;
  font-weight: 700 !important;
  font-size: 12px !important;
}

/* An OFFLINE record (and a driver with neither plate nor name) has no plate line,
   so its lone line must NOT be rendered as if it were one. The element carries BOTH
   classes, so this selector is written doubled on purpose: it beats the rule above
   on SPECIFICITY (0,2,0 vs 0,1,0) rather than on source order, which a future
   re-ordering of this file could silently flip. */
.vx-map-label.vx-map-label-soft::first-line {
  color: var(--vx-ink-soft) !important;
  font-weight: 500 !important;
  font-size: 11px !important;
}

/* Compact tier (owner 2026-09-07, three-tier zoom rework - see labelTierFor() in
   telematics.js): zooming OUT never shrank the SELECTED marker's pill - it kept the
   full two-line DETAIL form at every zoom, forever - so it dominated the map. This is
   the ONE line / smaller / tighter modifier for the mid and far zoom tiers.

   Both rules below carry the FULL ".vx-map-label" prefix (and, for the -soft
   combination, one extra class) so the override wins on SPECIFICITY, never source
   order - the same discipline the -soft rule above documents for itself. Without the
   extra class, ".vx-map-label-compact.vx-map-label-soft::first-line" (an offline or
   name-only compact label) would TIE the -soft rule above at the same specificity and
   the winner would depend on which rule happens to sit later in this file - exactly
   the kind of silent flip a future reordering could cause. */
.vx-map-label.vx-map-label-compact {
  padding: 2px 6px !important;
}
.vx-map-label.vx-map-label-compact::first-line {
  font-size: 10px !important;
}
.vx-map-label.vx-map-label-compact.vx-map-label-soft::first-line {
  font-size: 10px !important;
}

/* ==========================================================================
   Ph4 - Focus floating window manager (2026-07-29)
   In Focus mode the existing telematics panels (.telematics-driver-search,
   #runtime-status-panel, .vx-booked-feed, #telematics-timeline,
   #telematics-eta-panel) are decorated as floating, draggable,
   minimize-to-dock windows over the full-screen map. Elevated cards on the
   --vx-surface with a stronger shadow, no page background behind them.
   All rules are additive (appended after the Ph3 focus rules). Reduced-motion
   safe: snap is instant (no required transition/animation).
   ========================================================================== */

/* The floating window shell: an elevated card sitting above the full-screen
   map (map container is z-index 200 in Focus; windows sit at 260). */
.vx-fwin {
  position: fixed;
  z-index: 260;
  background: var(--vx-surface, #fff);
  border: 1px solid var(--vx-line);
  border-radius: var(--vx-radius, 12px);
  box-shadow: 0 12px 40px rgba(20, 28, 46, 0.22),
              0 2px 8px rgba(20, 28, 46, 0.12);
  min-width: 220px;
  max-width: 92vw;
  max-height: 84vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-sizing: border-box;
}

/* Minimize-to-dock fix (owner 2026-07-29): the author rule .vx-fwin{display:flex}
   overrides the UA [hidden]{display:none}, so el.hidden=true alone could NOT hide
   a floated window (only the title landed in the dock). This higher-specificity
   rule (class + attribute) makes hidden actually collapse the window off-screen. */
.vx-fwin[hidden] { display: none; }

/* The titlebar = the drag handle. Title text on the left, minimize on the right. */
.vx-fwin-titlebar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px 6px 12px;
  background: var(--vx-surface-soft, #f7f9fc);
  border-bottom: 1px solid var(--vx-line);
  cursor: move;
  touch-action: none;               /* let pointer drag own the gesture on touch */
  user-select: none;
  font-weight: 600;
  font-size: 13px;
  color: var(--vx-ink);
}
.vx-fwin-title {
  flex: 1 1 auto;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.vx-fwin-min {
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  padding: 0;
  line-height: 1;
  border: 1px solid var(--vx-control-border);
  border-radius: 8px;
  background: var(--vx-surface, #fff);
  color: var(--vx-ink-soft);
  cursor: pointer;
}
.vx-fwin-min:hover { background: var(--vx-control-hover-bg); }

/* The floated content sits below the titlebar and scrolls if it overflows. */
.vx-fwin-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
}

/* A snapped window is flush to an edge (still a card, still draggable away). */
.vx-fwin-snapped { border-radius: 0; }

/* The bottom dock / taskbar: collects minimized windows as buttons. Only
   present while there is at least one minimized window (built + removed in JS). */
.vx-fwin-dock {
  position: fixed;
  left: 50%;
  bottom: 12px;
  transform: translateX(-50%);
  z-index: 280;
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 6px 10px;
  background: var(--vx-surface, #fff);
  border: 1px solid var(--vx-line);
  border-radius: var(--vx-radius, 12px);
  box-shadow: 0 8px 24px rgba(20, 28, 46, 0.18);
  max-width: 92vw;
  overflow: auto;
}
.vx-fwin-dockbtn {
  flex: 0 0 auto;
  height: 30px;
  padding: 0 12px;
  border: 1px solid var(--vx-control-border);
  border-radius: 8px;
  background: var(--vx-surface, #fff);
  color: var(--vx-ink);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.vx-fwin-dockbtn:hover { background: var(--vx-control-hover-bg); }
/* The Reset layout control lives in the dock, visually separated. */
.vx-fwin-dock-reset {
  flex: 0 0 auto;
  height: 30px;
  padding: 0 12px;
  margin-left: 4px;
  border: 1px solid var(--vx-control-border);
  border-radius: 8px;
  background: var(--vx-surface-soft, #f7f9fc);
  color: var(--vx-ink-soft);
  font-size: 12px;
  cursor: pointer;
  white-space: nowrap;
}
.vx-fwin-dock-reset:hover { background: var(--vx-control-hover-bg); }

/* In Focus, the Booked window + Cockpit rail are floated (not grid-homed): the
   .vx-fwin decoration above supplies position/z-index. These overrides make the
   grid-column layout no longer apply while they carry the .vx-fwin class. */
.vx-fwin.vx-booked-feed,
.vx-fwin.vx-rail {
  grid-column: auto;
  width: auto;
  height: auto;
}

/* Build B (2026-07-29): Live Coverage card as an independent floating window.
   #vx-rail-coverage-card is normally pinned to the bottom of the rail (flex:0 0 auto;
   margin-top:auto). When it gains .vx-fwin it must lose that rail-specific layout so
   it stands alone as a proper floating card. */
.vx-fwin.vx-rail-coverage-card {
  flex: none;
  margin-top: 0;
  grid-column: auto;
  width: auto;
  height: auto;
  min-width: 220px;
}

/* Build B (2026-07-29): Resize handle - bottom-right corner drag target.
   A 14x14 visible triangle affordance. Reduced-motion safe: resize is direct
   (no transition on the resized window is mandated here). */
.vx-fwin-resize {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 14px;
  height: 14px;
  cursor: se-resize;
  background: transparent;
  border-bottom-right-radius: var(--vx-radius, 12px);
  /* Visual affordance: a subtle resize triangle using a border trick. */
  border-right: 4px solid var(--vx-line);
  border-bottom: 4px solid var(--vx-line);
  box-sizing: border-box;
  touch-action: none;
  flex: 0 0 auto;
  z-index: 2;
}

/* Focus is Map-view-only (owner 2026-07-29): the List View | Map View switcher
   does NOT appear in Focus. Exiting Focus returns to the classic menu where the
   switcher lives, so an in-Focus copy is redundant. Hide it entirely. */
.vx-telematics-focus .telematics-view-switcher {
  display: none;
}

/* Focus fix (owner 2026-07-31): in Focus the "Find a driver" search floats as a
   window whose overflow:hidden CLIPPED this absolute results dropdown (top:100%),
   and the dropdown z-index (100) sat BELOW the floating-window stack (260) - so the
   results were invisible. Let the floated search overflow so the dropdown shows, and
   lift the dropdown above the window stack. */
.vx-telematics-focus .telematics-driver-search.vx-fwin { overflow: visible; }
.vx-telematics-focus .telematics-driver-results { z-index: 320; }

/* Owner 2026-07-29: the classic History bar (date + from/to + View/Back buttons)
   is hidden in Focus - it is redundant with the Timeline window (chips + day/trip
   arrows + play). Enter/exit History in Focus is done via the map-overlay
   History <-> Back-to-live toggle below (so no function is lost). */
.vx-telematics-focus .telematics-history-bar {
  display: none;
}

/* The History toggle lives in the map control group but is only meaningful in
   Focus (the classic view keeps the full History bar). Hidden by default; shown
   in Focus. Uses the shared .vx-map-ctrl-btn look. */
.telematics-history-toggle {
  display: none;
}
.vx-telematics-focus .telematics-history-toggle {
  display: inline-flex;
}
/* Active (in-History) state reuses the shared .vx-map-ctrl-btn.is-active themed
   token pattern (applied by showTimeline via classList) - no bespoke tint. */

/* Ph5 (2026-07-29): map-overlay driver count badge. Light token-based pill
   shown near the Fit/Focus controls so the operator sees online/total at a glance.
   Hidden when no drivers are map-relevant. */
.telematics-count-badge {
  display: inline-flex;
  align-items: center;
  height: var(--vx-control-height, 32px);
  padding: 0 10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--vx-ink-soft);
  background: var(--vx-surface, #fff);
  border: 1px solid var(--vx-line);
  border-radius: var(--vx-radius, 12px);
  white-space: nowrap;
  pointer-events: none;
}

/* (The .telematics-roster-panel styles were removed with the roster window -
   owner 2026-07-29; the single "Find a driver" search is the only driver search.) */

/* Ph5 responsive: on narrow viewports (~820px) the floating windows must not
   overlap or fall off-screen. They revert to a static, stacked, full-width
   layout so they remain usable on tablets and small displays.
   Reduced-motion safe: no transitions are required for snap. */
@media (max-width: 820px) {
  .vx-fwin {
    position: static !important;
    left: auto !important;
    top: auto !important;
    width: 100% !important;
    max-width: 100% !important;
    border-radius: 0;
    box-shadow: none;
    margin-bottom: 4px;
  }
  .vx-fwin-dock {
    left: 0;
    right: 0;
    transform: none;
    bottom: 0;
    border-radius: 0;
    max-width: 100vw;
    overflow-x: auto;
  }
  /* Ensure the dock is always visible on narrow screens (not hidden by fwin
     z-index stacking or off-screen positioning). */
  .vx-telematics-focus .vx-fwin {
    position: static !important;
    left: auto !important;
    top: auto !important;
    width: 100% !important;
  }
}

/* ==========================================================================
   PANE MODE - the Booked feed below 1401px (owner 2026-09-03:
   "fa Feed-ul Booked sa mearga pe companii, pe telefon")
   --------------------------------------------------------------------------
   The defect this fixes: the shell docks four columns only at >=1401px, so
   `@media (max-width: 1400px)` (and again the 760px block) set
   `.vx-booked-feed { display: none }` with NO fallback of any kind - no
   railUsable()-style guard, no drawer, nothing. A company on a phone, on a
   tablet, or on a 1366x768 laptop had no LIVE dispatch surface at all.
   Recorded: shared/memory/product/a64-booked-feed-hidden-below-1401.md.

   The mechanism: below 1401px the feed stops being a docked TRACK and becomes
   a PANE that shares the content cell with the page. A fixed bottom segmented
   bar (.vx-pane-bar, built from the existing .vx-bf-seg / .vx-bf-seg-btn
   chrome - no new visual vocabulary) switches Page <-> Booked. Nothing moves
   in the DOM across a breakpoint: the SAME nodes are re-placed by CSS, so a
   staged reassign panel, the feed's listeners and its scroll survive a
   rotation for free (the rail-collapse precedent).

   Design: shared/brainstorms/responsive-shell-pane-switching-2026-09-02.md,
   slices A + B ONLY. All colours/sizes on --vx-* tokens (Day/Night safe).

   SCOPE, AMENDED TWICE - this paragraph used to end "Deliberately NOT here: the
   cockpit is not a pane and the 761-1200px rail stub is not retired (slice C) -
   that needs railUsable() to become pane-aware, and the owner rejected routing
   the operator away from the rail." BOTH halves are now VOID:
     - S1 (2026-09-03) made the cockpit a pane at <=760 and railUsable()
       pane-aware (it reads the bar's Cockpit segment, not the hidden pane);
     - S3 (2026-09-04) retired the 761-1200 stub, extended the cockpit pane to
       the whole band and added the `Both` split. RAIL_MIN_WIDTH_PX is still 760:
       the owner's rejection stood, and the layout work replaced that fix rather
       than reviving it.
   ========================================================================== */

/* Docked (>=1401px): the bar does not render and reserves no space whatsoever. */
.vx-pane-bar { display: none; }

/* COCKPIT PANE (S1, owner 2026-09-03: "pe telefon, cand dau click pe o masina, mi se deschide
   varianta veche de editare a detaliilor masinii ... Varianta pe care am cerut sa o scoatem din
   uz de tot"). The Cockpit segment is built into the bar on every shell page - a presence gate
   on #runtime-status-panel would race runtime-status.js's own boot render - but the cockpit is
   a PANE only on a phone: between 761 and 1400 the rail is still docked (as the 40px stub, a
   dead band that slice S3 owns), so offering the segment there would be a dead tap. Hidden here,
   revealed inside the 760 block below - the SAME breakpoint that hosts the pane, which is why
   fleet.js's railPaneHosted() can read the segment's own rendered box instead of carrying a
   third copy of 760. */
.vx-pane-seg[data-pane="cockpit"],
.vx-pane-seg[data-pane="both"] { display: none; }

@media (max-width: 1400px) {
  /* The switcher. position:fixed keeps it OUT of the shell grid, so the Cade-M6
     explicit grid-column placements are untouched and no zone can be reordered. */
  .vx-pane-bar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    align-items: center; justify-content: center; box-sizing: border-box;
    padding: 7px 12px calc(7px + env(safe-area-inset-bottom, 0px));
    background: var(--vx-surface); color: var(--vx-ink);
    border-top: 1px solid var(--vx-line); }
  /* Reserve the bar's height. A fixed bar over a sticky full-height column would cover
     the rail's sticky Save/Cancel footer and the feed's own pager - both live at the
     bottom of a calc(100vh - chrome) box. */
  body.vx-app { padding-bottom: var(--vx-pane-bar-h); }
  .vx-rail { height: calc(100vh - var(--vx-chrome-h) - var(--vx-pane-bar-h));
             height: calc(100dvh - var(--vx-chrome-h) - var(--vx-pane-bar-h)); }
  /* The active Booked pane takes the content track full-width; the page pane hides.
     :not(.vx-fwin) leaves the Telematics Focus floating-window decoration alone. */
  /* `Both` (S3, 761-1200) shares this placement verbatim: the feed takes the content track
     while the rail stays in its own. That is not a coincidence - it is WHY Both was cheap.
     Tapping Booked at 1201-1400 has always produced exactly this (feed beside the docked
     rail); S3 only gives the same layout its own roster entry in the band where the rail had
     to be un-stubbed first. The split's own overrides (the equal-halves track template, the
     divider, min-width) live in the 1200 block below. */
  body.vx-pane-booked .vx-booked-feed:not(.vx-fwin),
  body.vx-pane-split .vx-booked-feed:not(.vx-fwin) { display: flex; grid-column: 2;
    border-right: none; height: calc(100vh - var(--vx-chrome-h) - var(--vx-pane-bar-h));
    height: calc(100dvh - var(--vx-chrome-h) - var(--vx-pane-bar-h)); }
  body.vx-pane-booked .vx-shell-main,
  body.vx-pane-split .vx-shell-main { display: none; }
  /* "Collapsed" is a docked-track concept with no meaning for a pane: the three content
     rules carry :not(.vx-pane-booked) (see them above), and the chevron goes too - the
     bar is the way in and out. Without this the pane is a blank head strip on a fresh
     browser, because the feed ships COLLAPSED by default. */
  body.vx-pane-booked .vx-bf-collapse,
  body.vx-pane-split .vx-bf-collapse { display: none; }
  /* The unread dot on the Booked segment reuses the built .is-unread pattern, moved
     INSIDE the button: .vx-bf-seg has overflow:hidden and would clip a corner-hung dot. */
  .vx-pane-seg.is-unread::after { top: 3px; right: 3px; }
  /* Telematics Focus (a FIRM page) is its own full-screen mode: the shell chrome is hidden and
     the feed is decorated as a floating .vx-fwin window with its own dock. There is nothing for
     the bar to switch there, so it stays out - Focus is entered from the Page pane, so the
     Booked pane can never be the active one when it opens. */
  body.vx-telematics-focus .vx-pane-bar { display: none; }
}

/* --------------------------------------------------------------------------------------
   S3 (owner 2026-09-04) - 761-1200px: the rail UNDOCKS, and `Both` shows Booked + Cockpit
   side by side.

   This block REPLACES the 40px rail stub that used to live at `@media (max-width: 1200px)`
   near the rail's own rules (see the RETIRED note there). The stub hid every child of the
   rail, so the whole cockpit was invisible on a 1024px tablet or a 1280px laptop while
   railUsable() still said "usable" - a dead click, on 13 pages. Retiring it without a
   replacement would only move the problem, so the rail becomes the third pane here, exactly
   as it already is on a phone: THE SAME NODE, re-placed by CSS. Nothing is appended, inserted
   or removed, so a staged zone edit, the rail's listeners and its scroll survive a switch and
   a rotation for free (the pane-mode invariant).

   Owner: *"as vrea sa avem optiune sa vedem si Booked feed si Cockpit sub o forma Enterprise
   ... sa fie si futurist, idei moderne."* `Both` is that option. It introduces NO new
   breakpoint and NO new component: its band is "this block, minus the phone block", and its
   segment is the same .vx-bf-seg-btn chrome as the other three.

   Why `Both` is NOT offered below 761px: the split would be two ~170px columns, and the pane
   bar already clips at 360px with THREE segments. The roster SHRINKING with the viewport is
   the fit policy - there is no horizontal scroller on a position:fixed bar, and a fourth
   segment is simply never rendered at a width where it could make the fit worse. The 760
   block below re-hides it.
   -------------------------------------------------------------------------------------- */
@media (max-width: 1200px) {
  /* The rail stops being a docked TRACK. Its grid track is `auto`, so an empty one collapses
     to zero and the content column reclaims the full width - which is what the stub was
     reaching for, without hiding the cockpit to get it. */
  /* :not(.vx-fwin) is load-bearing (owner 2026-09-07). In Telematics FOCUS the Cockpit is
     not a docked track at all - applyFloating() re-parents it as a floating .vx-fwin window.
     A BARE `.vx-rail { display: none }` here beat `.vx-fwin { display: flex }` on SOURCE
     ORDER (equal specificity, this block is later in the file), so on any laptop narrower
     than 1200 CSS px - 1366x768 at 125% is 1093 - clicking a driver on the map dispatched
     the rail correctly and the operator saw NOTHING, while the floating "Find a driver"
     window stayed visible because it lives inside the fixed map panel. That asymmetry is
     exactly what the owner reported. The exclusion says what was always meant: hide the
     DOCKED track, never a floating window. */
  .vx-rail:not(.vx-fwin) { display: none; }
  /* Both banded segments are offered here; the base cascade hides them, and CSS alone decides
     where they exist - which is why fleet.js's railPaneHosted() can read the Cockpit
     segment's own rendered box instead of carrying another copy of the breakpoint. */
  .vx-pane-seg[data-pane="cockpit"],
  .vx-pane-seg[data-pane="both"] { display: inline-block; }

  /* COCKPIT: the rail alone, in the content cell. Still a sticky, self-scrolling column here
     (this is a laptop/tablet band, not a phone) - the 760 block below is what turns it into a
     document-flow pane. */
  body.vx-pane-cockpit .vx-rail { display: flex; grid-column: 2; width: auto; min-width: 0;
    border-left: none; }
  body.vx-pane-cockpit .vx-shell-main { display: none; }
  /* "Collapsed" is a docked-track concept with no meaning for a pane (the .vx-bf-collapse
     precedent): the bar is the way in and out, so the chevron goes. */
  body.vx-pane-cockpit .vx-rail-collapse { display: none; }

  /* BOTH: equal halves. At the 761px floor that is (761 - 212 sidebar) / 2 ~= 274px each -
     tight but real, and accepted deliberately rather than inventing a new breakpoint. A
     `minmax(0, 320px)` rail track (the rail's natural width) would instead leave the feed
     229px, which is not a feed. Both tracks carry a zero floor and both ITEMS carry
     min-width: 0, because a grid item defaults to its content-based minimum and would
     otherwise drag the shell sideways (the fit slice's lesson). */
  body.vx-pane-split { grid-template-columns: 212px minmax(0, 1fr) minmax(0, 1fr); }
  body.vx-pane-split.vx-sidebar-collapsed {
    grid-template-columns: 56px minmax(0, 1fr) minmax(0, 1fr); }
  body.vx-pane-split .vx-booked-feed:not(.vx-fwin) { min-width: 0;
    border-right: 1px solid var(--vx-line); }
  body.vx-pane-split .vx-rail { display: flex; grid-column: 3; width: auto; min-width: 0;
    border-left: none; }
  body.vx-pane-split .vx-rail-collapse { display: none; }

  /* iPhone 16e landscape (owner 2026-09-05/06): "In Cockpit se vede fereastra de Live coverage
     mare jos, dar continutul esential din Cockpit se vede intr-o singura linie". At this band
     .vx-rail is STILL the fixed-height sticky column from the @media(max-width:1400px) block
     above (calc(100dvh - --vx-chrome-h - --vx-pane-bar-h)) - on a landscape phone that is well
     under 300px, and the July pinning (owner 2026-07-18/20: coverage PINNED to the bottom via
     margin-top:auto + flex:0 0 auto - correct on a 900+px DOCKED desktop, untouched above)
     meant the detail card - the ONLY shrinkable item, the essential Cockpit content - absorbed
     the entire deficit down to a single scrolling line. These selectors are scoped to the pane
     classes AND fenced inside this <=1200px block, so a docked width can never match them
     regardless of body class - the July pinning is exactly as it was. In a pane the trade-off
     inverts: the detail card gets the space, coverage is capped with its own scroller and
     collapsed BY DEFAULT (one tap reveals it, via the shared .vx-rail-coverage-collapse rule
     above - not a new control), and both cards carry a min-height FLOOR so neither is ever
     squeezed below a usable height again (see tests/test_cockpit_pane_priority.py for the
     arithmetic against --vx-chrome-h/--vx-pane-bar-h this floor is sized against). The rail
     itself gets a vertical scroll escape hatch (overflow: hidden auto) as the deliberate
     backstop for whatever the floors' arithmetic does not model (head height, inter-card gaps,
     an active modes-bar) - scroll the rail rather than silently clip a card. */
  body.vx-pane-cockpit .vx-rail,
  body.vx-pane-split .vx-rail { overflow: hidden auto; }
  body.vx-pane-cockpit .vx-rail-detail-card,
  body.vx-pane-split .vx-rail-detail-card { flex: 1 1 0; min-height: 64px; }
  body.vx-pane-cockpit .vx-rail-coverage-card,
  body.vx-pane-split .vx-rail-coverage-card { flex: 0 1 auto; margin-top: 0; min-height: 32px;
    max-height: 40vh; overflow: auto; }
  /* Collapsed BY DEFAULT (runtime-status.js render() sets this on first pane-mode paint):
     only the title row (with the toggle + the Live/Last-known chip) stays visible. */
  body.vx-pane-cockpit .vx-rail-coverage-card.vx-rail-coverage-collapsed > *:not(.vx-rail-card-title),
  body.vx-pane-split .vx-rail-coverage-card.vx-rail-coverage-collapsed > *:not(.vx-rail-card-title) {
    display: none; }
  body.vx-pane-cockpit .vx-rail-coverage-collapse,
  body.vx-pane-split .vx-rail-coverage-collapse { display: inline-block; }
}

/* 18v-f9 (2026-11-18) - A LANDSCAPE PHONE IS A PHONE. The 761-1200 band above keeps the Cockpit pane a FIXED-height
   sticky column (100dvh - chrome - pane bar), the right design for a tablet or laptop. On an 844x390 landscape phone that
   column is 239 px and the detail card (flex 1 1 0) rendered 137 px (Fleet schedule) / 86 px (zones EDIT): too short to
   hold its own sticky head + sticky Save footer + a field, so the last field was unreachable. A width-only band cannot
   tell those devices apart; a SHORT viewport can. Here the Cockpit pane scrolls with the document, as on a portrait phone
   (the 760 block below, 18v-f7): the rail keeps its grid column beside the sidebar, the card is content-sized, and its
   own overflow: auto + 64px floor stay so the sticky footer still binds to the card's scroll box. A VIEWPORT policy: any
   window <= 1200 x 500 CSS px gets it. 18v-f913 F10: Both (vx-pane-split) had the same 239 px rail column (card 137 px,
   last field covered) and gets the same two declarations; the Booked feed beside it keeps its own sticky
   self-scrolling column (its pager lives at its bottom), so it stays in view while the document scrolls the rail.
   tests/test_shell_fits_the_screen.rules() models a TALL viewport and drops this block; it is pinned by
   tests/test_ui_fixes_18vf89f6.py. */
@media (max-width: 1200px) and (max-height: 500px) {
  body.vx-pane-cockpit .vx-rail,
  body.vx-pane-split .vx-rail { position: static; height: auto; overflow: visible; }
  body.vx-pane-cockpit .vx-rail-detail-card,
  body.vx-pane-split .vx-rail-detail-card { flex: 0 1 auto; }
}

@media (max-width: 760px) {
  /* Phone. A taller bar (bigger thumb targets) reserves more room. */
  :root { --vx-pane-bar-h: 64px; }
  /* The shell is ONE column here, so the pane drops its grid placement and its sticky
     offset and scrolls with the document. A leftover grid-column: 2 would open an
     implicit second column and overflow the viewport sideways. */
  /* `overflow: visible` here is deliberate (a pane scrolls with the DOCUMENT, it is not a clipped
     sticky column) - but it also removes the containment that kept the docked track from being
     widened by its content. min-width: 0 is the replacement escape; re-clipping would undo the
     pane. Same reasoning on the Cockpit pane below. */
  body.vx-pane-booked .vx-booked-feed:not(.vx-fwin) { grid-column: auto; grid-row: auto;
    position: static; height: auto; overflow: visible; min-width: 0; border-right: none; }
  /* Touch fitness. .vx-bf-nav shipped at 22x22px - under even WCAG 2.5.8's 24px minimum
     and far under a ~44px thumb. One token drives every select/input/toolbar button; the
     feed's own controls are bumped explicitly. Phone breakpoint only - the desktop
     control sizes are untouched. */
  body.vx-app { --vx-control-height: 44px; }
  .vx-bf-nav { width: 44px; height: 44px; font-size: 14px; }
  .vx-bf-seg-btn { min-height: 44px; padding: 8px 14px; font-size: 13px; }
  .vx-bf-period-label { min-height: 44px; font-size: 13px; }
  .vx-bf-confirm { min-height: 44px; padding: 8px 16px; font-size: 13px; }
  .vx-bf-collapse { width: 44px; height: 44px; }
  .vx-pane-bar .vx-bf-seg-btn { min-width: 120px; }
  /* A long company display name + the seconds-precision timestamp can outgrow a 390px card;
     let the plate line wrap instead of pushing the row sideways. */
  .vx-bf-plate { flex-wrap: wrap; }
  /* The trip cards get a little more room on a 390px screen. */
  .vx-booked-feed { padding: 10px 8px; }

  /* --- COCKPIT PANE (S1) --------------------------------------------------------------
     The rail is the third pane here. Same node, re-placed by CSS (the pane-mode invariant):
     nothing is appended, inserted or removed, so a staged zone edit, the rail's listeners and
     its scroll survive a switch and a rotation for free. */
  /* AMENDED 2026-09-04 (S3): the segment reveal, the .vx-shell-main hide and the chevron hide
     MOVED UP to the 1200 block - they are true across the whole paned band now, not only on a
     phone. What stays here is only what a ONE-COLUMN shell that scrolls with the DOCUMENT
     needs. And `Both` is re-hidden: two ~170px columns are unusable, and a fourth segment on a
     360px bar is the fit trap the shell slice closed. */
  .vx-pane-seg[data-pane="both"] { display: none; }
  /* THE SPLIT-PANE PHONE TRAP (found by another project, propagated back). Booked and Cockpit
     each get a reset in this block because each is still SELECTABLE at this width (their own
     segment is never display:none here) - hiding the page there is a real pane switch, and the
     operator can always tap back to Console. `Both`/`vx-pane-split` is the one state whose OWN
     segment has no pressed control at this width: the rule right above this one hides it, so a
     body that still carries vx-pane-split - carried down across a single rotation, since the
     pane is held in SCRIPT and does not re-derive itself on every paint - keeps `.vx-shell-main
     { display: none }` live (the >760px rule) with nothing in CSS left to clear it. Console
     (booked-feed.js's showPane("page")) still clears the class in script the moment it runs,
     and the 760px matchMedia listener normally fires that on the very crossing - so this is the
     CSS FLOOR for the gap between the stale class landing and script catching up (and the one
     rendering engine, if any, where that listener does not fire), not a claim that no escape
     exists at all. Pinned in tests/test_split_pane_phone_trap.py (resolves the cascade; the
     transferable lesson generalises - a reset written for one state class is the shape worth
     checking for the others, and the state whose OWN segment has no control at a given width
     is the one CSS alone cannot escape). */
  body.vx-pane-split .vx-booked-feed:not(.vx-fwin),
  body.vx-pane-split .vx-rail { display: none; }
  body.vx-pane-split .vx-shell-main { display: flex; }
  /* F1 (Cade counter-sign of the trap fix above, 2026-09-16: the fix was HALF a floor).
     `display: flex` alone is not the same reset shape as Booked/Cockpit above - unlike their
     classes, `body.vx-pane-split` ALSO overrides `grid-template-columns` in the <=1200px block
     (212px/56px + two `minmax(0, 1fr)` tracks - the two-track split layout, `:2834-2836`), at
     the SAME specificity (one class on body) as this block's own single-column reset
     (`body.vx-app, ... { grid-template-columns: minmax(0, 1fr) }`, `:865-869`) and LATER in
     source, so a stale vx-pane-split at <=760px showed the page inside a 212px first column
     under a 212px sidebar - chrome auto-placed into the remaining ~89px cells, not a page that
     fits the screen. Both the bare selector and the `.vx-sidebar-collapsed` combo need their
     own reset here (the `:857-864` lesson: a combo one specificity level up would otherwise
     still win the two-track template even after the bare selector is fixed). Pinned in
     tests/test_split_pane_phone_trap.py:TheGridTemplateAlsoGoesStaleTests, across every
     collapse combo that can co-occur with the pane state (sidebar collapse, booked-feed
     collapse - both persisted independently of which pane is showing), plus a negative at
     900px proving the two-track template is untouched where `Both` is a real, selectable
     layout. */
  body.vx-pane-split,
  body.vx-pane-split.vx-sidebar-collapsed { grid-template-columns: minmax(0, 1fr); }
  body.vx-pane-cockpit .vx-rail { grid-column: auto; grid-row: auto;
    position: static; height: auto; overflow: visible;
    padding: 12px; border-top: 1px solid var(--vx-line); }
  /* 18v-f7 (2026-11-17): the 1200 block's `flex: 1 1 0` is right for a FIXED-height pane, but here the pane is
     height: auto, and in an auto-height column flex container a basis-0 card is sized to its 64px floor (rendered:
     the Fleet schedule card and the zones card at exactly 64px on a 390px phone). Size it by its content; its own
     overflow: auto and 64px floor stay, so the sticky Save/Cancel footer keeps the card as its scroll box. */
  body.vx-pane-cockpit .vx-rail-detail-card { flex: 0 1 auto; }
}

/* --------------------------------------------------------------------------------------
   THE PANE SWITCH MOTION (S3) - "enterprise, futurist, not kitsch"

   Motion COMMUNICATES STATE here; it never decorates. There are exactly TWO motions in the
   pane surface and this is one of them: a short directional slide+fade on the pane that is
   ENTERING, so the operator sees WHICH way the roster moved rather than a silent repaint.
   The other is the BUILT unread-dot pulse (.is-unread, above), which says a booking arrived
   while you were looking elsewhere. Nothing else animates, and the "futurism" is live state
   made visible, not chrome that moves.

   The class is applied by booked-feed.js's showPane() ONLY when the pane actually changes -
   re-asserting the current pane (every boot, every resize inside the band) plays nothing, so
   the shell does not fade in on page load. Direction comes from the roster order: forward
   (entering from the right) by default, .vx-pane-enter-back when the operator moved left.

   Gated OPT-IN on `prefers-reduced-motion: no-preference` rather than overridden under
   `reduce`, so an engine that does not understand the query plays nothing at all.

   The `transform: none` end state is load-bearing, not tidiness: a lingering transform is a
   containing block for position:fixed descendants - the exact mechanism that killed a
   `transform: scale()` shell in this design. Telematics Focus is excluded outright for the
   same reason: there, the map inside .vx-shell-main IS position:fixed, so even a 160ms
   transform on its ancestor would capture it. All values are token-free box metrics; no
   colour is introduced, so Day/Night is unaffected.
   -------------------------------------------------------------------------------------- */
@media (prefers-reduced-motion: no-preference) {
  .vx-pane-enter { animation: vx-pane-enter 160ms ease-out; }
  .vx-pane-enter.vx-pane-enter-back { animation-name: vx-pane-enter-back; }
  body.vx-telematics-focus .vx-pane-enter { animation: none; }
}
@keyframes vx-pane-enter { from { opacity: 0; transform: translateX(12px); } to { opacity: 1; transform: none; } }
@keyframes vx-pane-enter-back { from { opacity: 0; transform: translateX(-12px); } to { opacity: 1; transform: none; } }

/* ==========================================================================
   THE PORTRAIT WALL - the operator console does not open on a phone held
   upright (owner 2026-09-03: "orice s-ar intampla in soft, pe acel device nu
   se poate vedea nimic daca telefonul e vertical, deci Antessia se incarca
   doar daca telefonul este pe orizontal").
   --------------------------------------------------------------------------
   A HARD wall: no button, no dismissal, no storage. It supersedes the SOFT
   "blur + Continue anyway" gate in shared/decision-log.md (2026-09-03) - the
   owner heard the one-handed-booking argument and decided against the escape
   hatch. The half that stands: forcing device orientation is impossible on
   the web (screen.orientation.lock() needs fullscreen and is unsupported on
   iOS Safari - verify; and the transform:rotate(90deg) hack is rejected
   because a transform's containing block captures position:fixed, which
   .vx-pane-bar uses), so the wall is a VIEWPORT predicate in CSS. Nothing in
   JS reads it: a rotation therefore clears the wall with no listener, no
   re-render and no state to get stuck.

   THE TRIGGER - each term earns its place:
     (orientation: portrait)  the actual question (height >= width).
     (max-width: 760px)       keeps the wall OFF screens that work. A portrait
                              MONITOR is ~1080px wide - MORE usable width than
                              the 844px landscape phone we serve - so gating on
                              orientation alone would forbid a good screen and
                              permit a narrower one. And because the wall is
                              undismissable, a walled viewer cannot reach
                              Settings to switch it off: it must never fire on
                              a usable screen. 760 is the existing phone
                              breakpoint (fleet.js RAIL_MIN_WIDTH_PX), not a
                              new number.
     (pointer: coarse)        excludes a desktop window merely dragged narrow.
                              (iOS Safari / Chrome Android report coarse; a
                              touchscreen laptop with a mouse reports fine as
                              its PRIMARY pointer - verify.)

   HOW IT IS INERT, not merely blurred: every shell child goes
   `visibility: hidden`, which - unlike a scrim - takes the content out of hit
   testing AND out of the focusable set (an element that is not rendered is not
   a focusable area), so there is no control left behind an overlay nobody can
   dismiss. `visibility` keeps every box, so nothing reflows and scrollWidth
   cannot grow (the fit slice, tests/test_shell_fits_the_screen.py). The wall
   opts back IN to visibility and is the only thing on screen. It sits above
   VxAnnounce and the Booked confirm by design, not by luck: in portrait the
   operator answers nothing.

   THE OFF-SEAM: `html.vx-rotate-wall-off` is the ONE hook a follow-up slice
   flips (a company-scoped, server-persisted preference: "compania are voie sa
   o schimbe pt ca o priveste doar pe ea"). It is INERT today - nothing reads a
   preference, calls an endpoint or touches storage, and the wall is DEFAULT ON
   ("lasa zidul implicit activ").

   CORRECTION 2026-09-03 (follow-up slice, same day): the seam is no longer
   inert. `web/auth-shell.js` reads a company-scoped, server-persisted
   `require_landscape_on_phones` (GET /api/company/current/console-policy) and
   adds `vx-rotate-wall-off` to <html> on a literal `=== false` and on nothing
   else - fail-closed on every other outcome, so the wall is still DEFAULT ON.
   Nothing about THIS stylesheet changed, and nothing about booked-feed.js
   changed: the wall's display is still resolved entirely by the media query
   below, so a rotation still clears it with no JS.

   NEVER the driver pages: they are phone-first by design and are the driver
   app's live surface (a webview over them). They carry no `vx-app` and never
   load booked-feed.js, so neither lock can reach them.
   Pinned: tests/test_portrait_rotation_wall.py.
   ========================================================================== */

.vx-rotate-wall { display: none; }
/* The message box IS the shared card - no new component. Box metrics only. */
.vx-rotate-wall-panel { width: 100%; max-width: 360px; min-width: 0; margin: 0; }
/* The two lines of copy: the shared announcement type, on the card's own rhythm
   (a bare <p> would carry the browser's 1em default and read as two loose blocks). */
.vx-rotate-wall-panel p { margin: 0 0 10px; }
.vx-rotate-wall-panel p:last-child { margin-bottom: 0; }

@media (orientation: portrait) and (max-width: 760px) and (pointer: coarse) {
  html:not(.vx-rotate-wall-off) body.vx-app > * { visibility: hidden; }
  html:not(.vx-rotate-wall-off) body.vx-app > .vx-rotate-wall {
    visibility: visible; display: flex; position: fixed;
    top: 0; right: 0; bottom: 0; left: 0; z-index: 2000;
    box-sizing: border-box; align-items: center; justify-content: center;
    padding: 24px 16px; overflow: auto;
    background: var(--vx-bg); color: var(--vx-ink);
    animation: vx-rotate-wall-in 140ms ease-out; }
}

@keyframes vx-rotate-wall-in { from { opacity: 0; } to { opacity: 1; } }

/* The override must carry the SAME selector: `.vx-rotate-wall { animation: none }`
   would lose the cascade to the three-class show rule above and the fade would
   still play. Same specificity, later in source order - so it wins. */
@media (prefers-reduced-motion: reduce) {
  html:not(.vx-rotate-wall-off) body.vx-app > .vx-rotate-wall { animation: none; }
}

/* Public document pages (privacy notice, L6, 2026-10-04): a single readable column on the page
   background, no operator shell. Tokens only, so the Day/Night swap applies. */
body.vx-doc-body {
  margin: 0; background: var(--vx-bg); color: var(--vx-ink);
  font-family: var(--vx-font); font-size: 16px; line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
.vx-doc { max-width: 760px; margin: 0 auto; padding: 24px 16px 56px; }
.vx-doc-brand { display: inline-block; margin-bottom: 16px; }
.vx-doc-brand img { height: 30px; width: auto; display: block; }
.vx-doc h1 { font-size: 1.75rem; line-height: 1.25; margin: 0 0 8px; }
.vx-doc h2 {
  font-size: 1.3rem; line-height: 1.3; margin: 32px 0 8px;
  padding-top: 16px; border-top: 1px solid var(--vx-line);
}
.vx-doc h3 { font-size: 1.05rem; margin: 20px 0 4px; }
.vx-doc p, .vx-doc li { overflow-wrap: anywhere; }
.vx-doc ul { padding-left: 1.25rem; }
.vx-doc a { color: var(--vx-accent-ink); }
.vx-doc-lead { color: var(--vx-ink-soft); margin: 0 0 16px; }
.vx-doc-toc { background: var(--vx-surface); border: 1px solid var(--vx-line);
  border-radius: var(--vx-radius); padding: 12px 16px; box-shadow: var(--vx-shadow); }
.vx-doc-toc ul { margin: 0; list-style: none; padding: 0; }
.vx-doc-toc li { padding: 2px 0; }
.vx-doc-foot { margin-top: 40px; color: var(--vx-ink-soft); font-size: 0.9rem; }
/* A small form inside a public document page (account deletion, L5a, 2026-10-05). Tokens only.
   The button is the site button (or button.vx-confirm-primary for the destructive action). */
.vx-doc-form { display: flex; flex-direction: column; gap: 8px; max-width: 420px;
  margin: 16px 0; padding: 16px; background: var(--vx-surface);
  border: 1px solid var(--vx-line); border-radius: var(--vx-radius); }
.vx-doc-form[hidden], .vx-doc-ok[hidden], .vx-doc-error[hidden] { display: none; }
.vx-doc-form button { align-self: flex-start; min-height: 36px; }
.vx-doc-label { font-weight: 600; }
.vx-doc-input { box-sizing: border-box; width: 100%; min-height: 40px; padding: 0 12px;
  font: inherit; color: var(--vx-control-ink); background: var(--vx-control-bg);
  border: 1px solid var(--vx-control-border); border-radius: 8px; }
.vx-doc-error { margin: 0; color: var(--vx-bad-ink); }
.vx-doc-ok { color: var(--vx-ink); background: var(--vx-surface); border: 1px solid var(--vx-line);
  border-radius: var(--vx-radius); padding: 12px 16px; }
