/* ═══════════════════════════════════════════════════════════════════════════════
   COMPONENT + BREAKPOINT CONVENTIONS  (read this before adding a class)

   The token layer below is in good shape — contrast ratios are documented next
   to the values and almost nothing in templates/ hardcodes a colour. The drift
   is one level up, in components and breakpoints, and it is frozen here rather
   than rewritten: a blind migration of live layout rules is a worse risk than
   the inconsistency it removes. Pages convert as they are next touched.

   ── One vocabulary per job. Use these; do not add a fourth. ──
     card    .cc-card                  (NOT a new .xx-card — there are 29 already)
     button  .cc-btn [.primary|.danger|.sm]   (NOT .btn-*, which is frozen)
     badge   .cc-tag [.ok|.warn|.bad|.info]   (NOT .pill / .chip / .tag)
   The frozen spellings still work and still ship; nothing new should use them.

   ── Breakpoint scale. Three values, and a reason to pick each. ──
     720px   phone      — the dock restacks, multi-column grids become one
     1024px  tablet     — side rails fold, wide tables scroll in their card
     1280px  desktop-   — only for genuinely wide layouts (maps, the fleet grid)
   There are currently 22 distinct max-widths in this file and in the per-page
   <style> blocks (480, 560, 600, 640, 680, 700, 719, 720, 760, 800, 820, 860,
   900, 920, 940, 980, 1000, 1024, 1040, 1100, 1180, 1280). 640-vs-680-vs-719-
   vs-720 are four different answers to "is this a phone". New rules use the
   scale above; an existing rule moves onto it when its page is edited and the
   result can actually be looked at.

   ── Page structure ──
   One <h1> per page (the page's name, not a card title), <h2> for each
   top-level section, <h3> only for something inside an <h2>. Card titles are
   <h2>: see .cc-ch h2 below.
   ═══════════════════════════════════════════════════════════════════════════════ */

/* ── Reset & Base ─────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* Tells the browser which native UA chrome to use for form controls it
     draws itself (select dropdown popups, checkboxes, scrollbars, date
     pickers) — without this, the dark theme's own CSS colors a <select>'s
     closed-state text, but the OS still renders its native open dropdown/
     option list and other native widgets with LIGHT-mode defaults, which is
     why those looked black-on-dark instead of following the theme. */
  color-scheme: light;
  /* ════════════════════════════════════════════════════
     LIGHT THEME (default). Dark theme overrides live in
     html[data-theme="dark"] below. Only theme-specific
     tokens are duplicated there; the scales below
     (spacing/type/radius/motion/fonts) are theme-agnostic.
     ════════════════════════════════════════════════════ */

  /* ── Surfaces (Explorer: airy bg, white panels, rail fills) ── */
  --bg:        #faf8f5;          /* page background — warm paper (2026-10-07, matches the PWA theme-color) */
  --bg-grid:   #f2f2f4;
  --surface:   #ffffff;          /* cards */
  --surface2:  #f1f1f3;          /* rail — subtle raised / hover fill */
  --surface-3: #e6e6ea;
  --overlay:   rgba(17, 20, 24, 0.45);

  /* ── Borders ──────────────────────────────────────── */
  --border:      #e9e9ed;
  --border-soft: #f0f0f3;
  --rule:        #dcdce1;
  --rule-2:      #c9c9d0;

  /* ── Text ─────────────────────────────────────────── */
  --text:        #1a1a1a;
  --text-2:      #4f4f4f;
  --muted:       #5f5f66;        /* WCAG AA: 5.6:1 on white, 5.3:1 on bg */
  --text-faint:  #74747c;        /* WCAG AA: 4.8:1 — used for placeholders/meta, must stay legible */

  /* ── Signal — brand accent (crimson #d82747) ──────── */
  /* Brand: AIO coral (#F9674E) primary + periwinkle (#7A80F6) secondary,
     per aioapp.com. The coral→periwinkle gradient is the brand signature. */
  --accent:        #f9674e;       /* brand coral — FILLS only (buttons, gradient, focus) */
  --accent-h:      #ec4f33;       /* hover: deeper coral */
  --accent-soft:   rgba(249, 103, 78, 0.10);
  --accent-edge:   rgba(249, 103, 78, 0.34);
  --accent-ink:    #ffffff;       /* text on brand fill */
  /* Filled controls with white text (primary buttons, active chips, badges). White on the
     brand coral is 2.97:1; this deeper coral is 4.6:1 (AA) and is the same in both themes.
     Picked 20 Oct (P1). Coral itself stays the brand colour for marks, rings and accents. */
  --accent-fill:   #cf4529;
  --accent-fill-h: #b93c22;
  /* Coral as TEXT/links: the brand fill #f9674e is only 3:1 on white, so links use a
     darkened coral that clears AA (4.6:1) while staying on-brand. */
  --accent-text:   #cf4529;
  --ring:          0 0 0 3px rgba(249, 103, 78, 0.30);
  --accent-2:      #7a80f6;       /* secondary — periwinkle */
  --accent-2-soft: rgba(122, 128, 246, 0.12);
  --brand-grad:    linear-gradient(90deg, #f9674e 0%, #7a80f6 100%);

  /* ── Semantic (darkened for contrast on white) ────── */
  --ok:        #0f6d33;           /* AA on the 10% wash used by status pills */
  --warn:      #8f4209;
  --danger:    #b42318;           /* brick red — distinct from brand crimson */
  --info:      #1a63c0;
  --ok-bg:     rgba(21, 127, 60, 0.10);
  --warn-bg:   rgba(180, 83, 9, 0.10);
  --danger-bg: rgba(180, 35, 24, 0.10);
  --info-bg:   rgba(29, 111, 216, 0.10);
  --ok-edge:     rgba(21, 127, 60, 0.30);
  --warn-edge:   rgba(180, 83, 9, 0.28);
  --danger-edge: rgba(180, 35, 24, 0.30);
  --info-edge:   rgba(29, 111, 216, 0.28);

  /* ── Chart palette (data-viz, not UI accent) ──────── */
  --chart-battery: #2563eb;
  --chart-temp:    #ea580c;
  --chart-ram:     #15803d;
  --chart-grid:    rgba(16, 24, 40, 0.08);
  --chart-tick:    #687078;

  /* ── Elevation / interaction (theme-specific) ─────── */
  --shadow-sm:  0 2px 10px rgba(0, 0, 0, 0.04);
  --shadow-md:  0 6px 20px rgba(0, 0, 0, 0.06);
  --shadow-lg:  0 12px 40px rgba(0, 0, 0, 0.08);
  --shadow-pop: 0 30px 80px rgba(0, 0, 0, 0.18);
  --hover:      rgba(16, 24, 40, 0.04);    /* row/control hover wash */
  --selected:   var(--accent-soft);        /* selection highlight */
  --page-glow:  none;                      /* ambient body wash */

  /* ── Console surfaces (logcat/shell — follow the theme;
        dark values live in the dark block below) ─────── */
  --console-bg:      #f6f7f9;
  --console-surface: #ffffff;
  --console-text:    #2c333c;
  --console-border:  #e2e6eb;

  /* ── Spacing scale (8px baseline) ─────────────────── */
  --s-1: 4px;  --s-2: 8px;  --s-3: 12px; --s-4: 16px;
  --s-5: 20px; --s-6: 24px; --s-7: 28px; --s-8: 32px;
  --s-9: 36px; --s-10: 40px;

  /* ── Type scale ───────────────────────────────────── */
  --t-10: 10px; --t-11: 11px; --t-12: 12px; --t-13: 13px;
  --t-14: 14px; --t-16: 16px; --t-18: 18px; --t-22: 22px;
  --leading-tight:  1.2;
  --leading-normal: 1.45;
  --leading-loose:  1.6;
  --fw-normal:    400;
  --fw-medium:    500;
  --fw-semibold:  600;
  --fw-bold:      700;

  /* ── Radius (Explorer: 6 chips · 9 controls · 14 cards) ── */
  --r-1: 4px; --r-2: 8px; --r-3: 12px; --r-4: 24px;
  --radius:    var(--r-3);          /* legacy alias */

  /* ── Motion ───────────────────────────────────────── */
  --dur-fast:   100ms;
  --dur:        140ms;
  --dur-slow:   220ms;
  --ease:       cubic-bezier(.2, .6, .2, 1);
  --ease-in:    cubic-bezier(.4, 0, 1, 1);
  --ease-out:   cubic-bezier(0, 0, .2, 1);

  /* ── Type families ────────────────────────────────── */
  --font:      'Poppins', 'IBM Plex Sans', system-ui, sans-serif;
  /* Display = same sans as body; the Fraunces serif is retired by preference
     (headings and big numbers all use IBM Plex Sans). */
  --font-display: 'Poppins', 'IBM Plex Sans', system-ui, sans-serif;
  --mono:      'JetBrains Mono', 'IBM Plex Mono', 'Fira Code', monospace;
}

/* ════════════════════════════════════════════════════════
   DARK THEME — overrides only the theme-specific tokens.
   ════════════════════════════════════════════════════════ */
html[data-theme="dark"] {
  color-scheme: dark;
  /* Surfaces — a near-black bg (#0b0d10, ~4% luminance) paired with near-white
     text (#e7ebf0, ~88%) put contrast well above what's comfortable for a UI
     meant to be read for long stretches (~15:1 — closer to a AAA-max spec-sheet
     number than a usable one; Material/GitHub/Linear-style dark themes deliberately
     stay off true black and off near-white for this reason). Lifted the floor and
     lowered the ceiling: a dark charcoal bg, a dimmer off-white for text, and more
     separation between bg/surface so cards read as distinct panels instead of
     nearly merging into the page. */
  --bg:        #0d0d12;
  --bg-grid:   #101016;
  --surface:   #16161d;
  --surface2:  #1e1e27;
  --surface-3: #262633;
  --overlay:   rgba(0, 0, 0, 0.58);

  /* Borders */
  --border:      #2a2a35;
  --border-soft: #202029;
  --rule:        #33333f;
  --rule-2:      #44444f;

  /* Text */
  --text:        #f4f4f6;
  --text-2:      #b3b4bd;
  --muted:       #a0a1ab;
  --text-faint:  #8a8b95;        /* WCAG AA: ~4.7:1 on surface */

  /* Brand accent — AIO coral, dimmed slightly off the neon end so it reads as a
     brand color rather than glowing against the darker bg. */
  --accent:        #f9805f;
  --accent-h:      #ffa088;
  --accent-soft:   rgba(249, 128, 95, 0.14);
  --accent-edge:   rgba(249, 128, 95, 0.36);
  --accent-ink:    #ffffff;      /* text on brand-coral fills — white throughout, per request */
  --accent-text:   #f9805f;      /* clears AA as text on the new, lighter surfaces */
  --ring:          0 0 0 2px rgba(249, 128, 95, 0.45);
  --accent-2:      #99a1f2;
  --accent-2-soft: rgba(153, 161, 242, 0.16);
  --brand-grad:    linear-gradient(92deg, #f9805f 0%, #99a1f2 100%);

  /* Semantic — same dimming pass so status colors read as information, not neon */
  --ok:        #55bd75;
  --warn:      #dba33a;
  --danger:    #e07575;
  --info:      #6ba3f0;
  --ok-bg:     rgba(85, 189, 117, 0.12);
  --warn-bg:   rgba(219, 163, 58, 0.12);
  --danger-bg: rgba(224, 117, 117, 0.12);
  --info-bg:   rgba(107, 163, 240, 0.12);
  --ok-edge:     rgba(85, 189, 117, 0.32);
  --warn-edge:   rgba(219, 163, 58, 0.32);
  --danger-edge: rgba(224, 117, 117, 0.32);
  --info-edge:   rgba(107, 163, 240, 0.32);

  /* Charts */
  --chart-battery: #6ba3f0;
  --chart-temp:    #f28654;
  --chart-ram:     #55bd75;
  --chart-grid:    rgba(61, 68, 80, 0.7);
  --chart-tick:    #838a9c;

  /* Elevation / interaction — shadows eased off slightly since the lighter bg
     needs less raw darkness to read as depth. */
  --shadow-sm:  0 2px 10px rgba(0, 0, 0, 0.3);
  --shadow-md:  0 6px 20px rgba(0, 0, 0, 0.35);
  --shadow-lg:  0 12px 40px rgba(0, 0, 0, 0.45);
  --shadow-pop: 0 30px 80px rgba(0, 0, 0, 0.6);
  --hover:      rgba(255, 255, 255, 0.05);
  --selected:   var(--accent-soft);
  --page-glow:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(244, 63, 99, 0.05) 0%, transparent 70%),
    radial-gradient(ellipse 40% 50% at 20% 80%, rgba(244, 63, 99, 0.035) 0%, transparent 70%);

  /* Console surfaces — kept closer to true black on purpose (a terminal reads as
     a terminal), just enough lifted to avoid a pure #000 void. */
  --console-bg:      #121519;
  --console-surface: #181c22;
  --console-text:    #d6dbe2;
  --console-border:  #2c333d;
}

/* The body grows with its content (min-height, not height): a body capped at the window's
   height ends one screen down, and the sticky top bar — a child of body — is released
   with it, so it scrolled away on every page longer than the window. */
html { height: 100%; }
body { min-height: 100%; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
  position: relative;
}

/* ── Focus ring (keyboard only) ──────────────────────── */
:focus { outline: none; }
:focus-visible {
  outline: none;
  box-shadow: var(--ring);
  border-radius: var(--r-2);
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[role="button"]:focus-visible,
[tabindex]:not([tabindex="-1"]):focus-visible {
  box-shadow: var(--ring);
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1; /* behind everything; <main> must NOT form a stacking context, see below */
  pointer-events: none;
  background: var(--page-glow);
  opacity: 0.6;
}

/* No z-index on <main>: it used to be z-index:1 to sit above the glow, which
   made <main> a stacking context, so every modal rendered inside a page
   (New release, kiosk mode, confirm dialogs) was trapped under the header
   (z 40), the dock (z 45) and the top bar (z 60): the backdrop blurred the
   page but never the chrome. The glow now sits at z -1 instead. */
body > nav,
body > main {
  position: relative;
}
/* NB: .modal-backdrop must NOT get position:relative here — it is a direct child of
   <body>, and relative positioning would drop the overlay into the document flow
   (the "What's new" popup rendered inline instead of above content). It keeps its
   own position:fixed; z-index:100 from the .modal-backdrop rule below. */

/* Page crossfade WITHOUT the View Transitions API. htmx tags freshly swapped
   content with .htmx-added and removes it after its settle delay (~20ms), so a
   plain opacity transition on <main> fades the new page in. Nothing outside
   <main> is snapshotted, hidden or re-composited, so the glass dock/topbar keep
   their blur layers across a navigation — the View Transitions crossfade used
   to rebuild those layers on every swap and flash them. */
main.container { transition: opacity 160ms ease; }
main.container.htmx-added { opacity: 0; }
@media (prefers-reduced-motion: reduce) {
  main.container { transition: none; }
}

/* Dock layout: full-width canvas; leave room at the bottom for the floating dock. */
body.has-dock { padding-left: 0; }
body.has-dock .container { padding-bottom: 104px; }

/* ── Responsive convention ─────────────────────────────
 * Two canonical breakpoints are used throughout this file:
 *   @media (max-width: 1024px)  → TABLET: multi-pane grids collapse
 *                                 to a single column; rails go static.
 *   @media (max-width: 640px)   → PHONE:  dense row-grids restack into
 *                                 cards; appbar condenses; padding tightens.
 * Keep new responsive rules on these two breakpoints. Dense mono/log
 * surfaces (logcat, shell, JSON/diff dumps) scroll horizontally via
 * `.scroll-x` rather than restacking.
 * ────────────────────────────────────────────────────── */

/* Never let raster media force horizontal page scroll on small screens.
 * (SVGs are sized explicitly throughout the UI, so they're left alone.) */
img, video, canvas { max-width: 100%; }
/* Form controls with fixed px widths must not overflow narrow viewports. */
input, select, textarea { max-width: 100%; }

/* Reusable horizontal-scroll wrapper for content that must not wrap
 * (wide tables, monospace consoles). Wrap the element, not the page. */
.scroll-x { overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; }

a { color: var(--accent-text); text-decoration: none; }
a:hover { color: var(--accent-h); }

/* Visually-hidden but screen-reader-available (for icon-button names, group labels). */
.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}

/* <main tabindex="-1"> is focused by script after every boosted navigation (and by
   the skip link). That focus is a starting point for the tab order, not a control
   the user chose, so it must not paint a focus ring — :focus-visible on the same
   element still does, for the keyboard-driven case. */
main[tabindex="-1"]:focus { outline: none; }

/* Skip-to-content link: off-screen until focused, then pinned top-left (WCAG 2.4.1).
   With a persistent appbar + nav dock, this lets keyboard users jump straight to <main>. */
.skip-link {
  position: fixed; top: 8px; left: 8px; z-index: 1000;
  transform: translateY(-140%); transition: transform var(--dur, .15s) ease;
  background: var(--surface); color: var(--accent-text);
  border: 1px solid var(--accent); border-radius: 8px; padding: 8px 14px;
  font-weight: var(--fw-medium, 600); box-shadow: var(--shadow-pop);
}
.skip-link:focus-visible { transform: translateY(0); outline: none; box-shadow: var(--ring); }

/* ── Navbar ──────────────────────────────────────── */
.navbar {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: 220px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 2px;
  padding: 16px 12px;
  background: var(--surface);
  border-right: 1px solid var(--border);
  z-index: 20;
  overflow-y: auto;
}
.navbar > form { width: 100%; }

.navbar-top {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  margin-bottom: 10px;
}
.navbar-brand {
  font-family: var(--font);
  font-weight: var(--fw-semibold);
  font-size: 19px;
  letter-spacing: -0.01em;
  color: var(--text);
  padding: 6px 10px;
  flex: 1 1 auto;
  min-width: 0;
  transition: opacity var(--dur) var(--ease);
}
.navbar-brand:hover { opacity: 0.85; }
/* Wordmark: AIO MDM in Poppins (the brand font) — "AIO" in the brand
   gradient, "Hub" in a calm grey. */
.brand-aio, .brand-hub { font-family: 'Poppins', var(--font); letter-spacing: -0.01em; }
.brand-aio {
  font-weight: 700;
  /* periwinkle → coral, matching the AIO MDM logo */
  background: linear-gradient(90deg, #7a80f6 0%, #f9674e 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.brand-hub { font-weight: 600; color: var(--muted); }
html[data-theme="dark"] .brand-hub { color: #fff; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--s-2);
  border-radius: var(--r-2);
  transition: background var(--dur) var(--ease);
}
.nav-toggle:hover { background: var(--surface2); }
.nav-toggle span {
  display: block;
  width: 18px;
  height: 1.5px;
  background: var(--muted);
  border-radius: 1px;
  transition: background var(--dur) var(--ease), transform var(--dur) var(--ease), opacity var(--dur) var(--ease);
  transform-origin: center;
}
.nav-toggle:hover span { background: var(--text); }
.nav-open .nav-toggle span:nth-child(1) { transform: translateY(5.5px) rotate(45deg); background: var(--text); }
.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-5.5px) rotate(-45deg); background: var(--text); }

.navbar-links {
  display: flex;
  flex-direction: column;
  gap: 2px;
  align-items: stretch;
  height: auto;
}
.nav-link {
  color: var(--muted);
  font-family: var(--font);
  font-size: var(--t-13);
  font-weight: var(--fw-medium);
  padding: 9px 10px;
  border-radius: var(--r-3);
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  position: relative;
  transition: color var(--dur) var(--ease), background var(--dur) var(--ease);
}
.nav-link:hover { color: var(--text); background: var(--hover); }
.nav-link.active {
  color: var(--accent-text);
  background: var(--accent-soft);
  font-weight: var(--fw-semibold);
}
.nav-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 16px;
  height: 16px;
  padding: 0 5px;
  margin-left: 2px;
  border-radius: 8px;
  background: var(--danger);
  color: #fff;
  font-size: 10px;
  font-weight: var(--fw-semibold);
  line-height: 1;
}

/* ── Nav sections ────────────────────────────────────
 * The sidebar is grouped into labelled domains (Monitor / Inventory /
 * Deploy / Admin) so a 14-item list reads as four short ones.
 */
.nav-section {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.nav-section + .nav-section { margin-top: 0; }
.nav-section-label {
  margin: 0 0 4px;
  padding: 0 10px;
  font-size: var(--t-10);
  font-weight: var(--fw-semibold);
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--muted);
  user-select: none;
}

/* ── Command palette trigger (sidebar) ──────────────── */
.nav-cmdk {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  width: 100%;
  margin-bottom: 12px;
  padding: 7px 10px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--r-2);
  color: var(--muted);
  font-family: var(--font);
  font-size: var(--t-12);
  cursor: pointer;
  transition: color var(--dur) var(--ease), background var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.nav-cmdk:hover { color: var(--text); border-color: var(--rule-2); background: var(--surface); }
.nav-cmdk .ui-icon { flex: 0 0 12px; }
.nav-cmdk-label { flex: 1; text-align: left; }
.nav-cmdk-kbd,
.cmdk-esc {
  font-family: var(--mono);
  font-size: var(--t-10);
  color: var(--muted);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r-1);
  padding: 1px 5px;
  line-height: 1.4;
}

/* ── Command palette overlay ───────────────────────── */
.cmdk-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 12vh 16px 16px;
  background: rgba(16, 24, 40, 0.32);
  opacity: 0;
  transition: opacity var(--dur) var(--ease);
}
/* The `hidden` attribute must win over display:flex, or the invisible
   overlay would sit on top of the page and swallow every click. */
.cmdk-backdrop[hidden] { display: none; }
.cmdk-backdrop.open { opacity: 1; }
.cmdk-panel {
  width: 100%;
  max-width: 560px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-4);
  box-shadow: var(--shadow-pop);
  overflow: hidden;
  transform: translateY(-6px);
  transition: transform var(--dur) var(--ease);
}
.cmdk-backdrop.open .cmdk-panel { transform: translateY(0); }
.cmdk-input-row {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
}
.cmdk-input-icon { color: var(--muted); flex: 0 0 14px; }
.cmdk-input {
  flex: 1;
  min-width: 0;
  border: none;
  background: none;
  color: var(--text);
  font-family: var(--font);
  font-size: var(--t-15, 15px);
  padding: 4px 2px;
}
/* The field is the bordered row; suppress the global focus ring on the bare
   input so it doesn't hug the text. */
.cmdk-input:focus,
.cmdk-input:focus-visible { outline: none; box-shadow: none; }
.cmdk-input::placeholder { color: var(--muted); }
.cmdk-list {
  list-style: none;
  margin: 0;
  padding: 6px;
  max-height: 52vh;
  overflow-y: auto;
}
.cmdk-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
  padding: 9px 10px;
  border-radius: var(--r-2);
  cursor: pointer;
  color: var(--text);
}
.cmdk-item.active { background: var(--accent-soft); }
/* motion: a fresh result list arrives top-down, 40ms apart (motion.css m-arrive), so a
   changed list reads as "found these" rather than "replaced that". */
.cmdk-item { animation: m-arrive .28s cubic-bezier(.2,.8,.2,1) backwards; }
.cmdk-item:nth-child(2) { animation-delay: .04s } .cmdk-item:nth-child(3) { animation-delay: .08s }
.cmdk-item:nth-child(4) { animation-delay: .12s } .cmdk-item:nth-child(5) { animation-delay: .16s }
.cmdk-item:nth-child(n+6) { animation-delay: .2s }
@media (prefers-reduced-motion: reduce) { .cmdk-item { animation: none } }
.cmdk-item.active .cmdk-item-label { color: var(--accent-text); font-weight: var(--fw-medium); }
.cmdk-item-label { font-size: var(--t-13); }
.cmdk-item-sub {
  font-size: var(--t-10);
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
  flex: 0 0 auto;
}
.cmdk-item-sub-device { color: var(--accent-text); }
.cmdk-empty {
  padding: 18px 16px;
  text-align: center;
  color: var(--muted);
  font-size: var(--t-13);
}

/* Rich rows (cmdk-demos.html, option C): one ranked list, every row an icon for
   its kind, a name with the matched characters marked, a second line (device:
   venue · type · build) and on the right either the device's state or the kind. */
.cmdk-item.cmdk-rich { justify-content: flex-start; gap: 11px; padding: 7px 10px; }
.cmdk-ic {
  flex: none; width: 28px; height: 28px; border-radius: 7px;
  display: grid; place-items: center;
  background: var(--surface-3); color: var(--text-2);
}
.cmdk-ic svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.cmdk-item.active .cmdk-ic { background: var(--surface); color: var(--accent-text); }
.cmdk-tx { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.cmdk-l1 { font-size: var(--t-13); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cmdk-l2 { font-size: var(--t-11); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cmdk-item.active .cmdk-l1 { color: var(--accent-text); font-weight: var(--fw-semibold); }
.cmdk-list mark { background: none; color: var(--accent-text); font-weight: 700; }
.cmdk-rt { flex: none; display: flex; align-items: center; gap: 6px; font-size: var(--t-11); color: var(--muted); }
.cmdk-kind { font-size: var(--t-10); letter-spacing: .06em; text-transform: uppercase; color: var(--text-faint); }
.cmdk-dot { flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--text-faint); }
.cmdk-dot.on { background: var(--ok); box-shadow: 0 0 0 3px var(--ok-bg); }
.cmdk-ent {
  visibility: hidden; flex: none;
  font: 600 var(--t-10) var(--mono); color: var(--accent-text);
  border: 1px solid var(--accent-edge); border-radius: var(--r-1); padding: 0 4px;
}
.cmdk-item.active .cmdk-ent { visibility: visible; }
.cmdk-head {
  font-size: var(--t-10); font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--text-faint); padding: 10px 10px 4px;
}
.cmdk-head:first-child { padding-top: 4px; }
.cmdk-item.cmdk-pending { color: var(--muted); cursor: default; gap: 10px; }
.cmdk-item.cmdk-pending.active { background: none; }
.cmdk-spin {
  flex: none; width: 13px; height: 13px; border-radius: 50%;
  border: 2px solid var(--border); border-top-color: var(--accent);
  animation: cmdk-spin .7s linear infinite;
}
@keyframes cmdk-spin { to { transform: rotate(360deg); } }
.cmdk-foot {
  display: flex; gap: 14px; padding: 8px 14px;
  border-top: 1px solid var(--border); font-size: var(--t-11); color: var(--muted);
}
.cmdk-foot kbd {
  font: 600 var(--t-10) var(--mono); border: 1px solid var(--border); border-radius: var(--r-1);
  padding: 0 4px; background: var(--bg); margin-right: 3px;
}
@media (max-width: 720px) { .cmdk-foot { display: none; } }

@media (prefers-reduced-motion: reduce) {
  .cmdk-backdrop, .cmdk-panel { transition: none; }
  .cmdk-spin { animation-duration: 2s; }
  .cmdk-backdrop.open .cmdk-panel { transform: none; }
}

/* ── Tiered confirm dialog ───────────────────────────── */
.mdm-confirm-body { margin: 0; font-size: var(--t-14, 14px); color: var(--text); line-height: 1.5; }
.mdm-confirm-scope {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: var(--r-2);
  background: var(--surface2);
  color: var(--muted);
  font-size: var(--t-13);
  line-height: 1.45;
}
.mdm-confirm-type { margin-top: 12px; }
/* .form-row sets display:flex, which would override the `hidden` attribute, so
   the type-to-confirm field must be hidden explicitly when not in use. */
.mdm-confirm-type[hidden] { display: none; }
.mdm-confirm-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: var(--s-2); margin-top: 18px; }

/* ── Admin tools links (Settings) ────────────────────── */
.admin-tool {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--r-3);
  text-decoration: none;
  color: var(--text);
  transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease);
}
.admin-tool:hover { border-color: var(--rule-2); background: var(--hover); }
.admin-tool > .ui-icon { color: var(--muted); flex: 0 0 16px; }
.admin-tool-text { display: flex; flex-direction: column; gap: 1px; flex: 1 1 auto; min-width: 0; }
.admin-tool-text strong { font-size: var(--t-13); font-weight: var(--fw-semibold); }
.admin-tool-go { color: var(--muted); flex: 0 0 auto; }

/* Reserve volatile columns so constant check-in updates never reflow the
 * roster: fixed-width digits everywhere, and min-widths on the cells whose
 * text length swings (battery %, RAM, temp, last seen). */
#device-table-container .table td { font-variant-numeric: tabular-nums; }
#device-table-container .table td:nth-child(5),
#device-table-container .table td:nth-child(6) { min-width: 52px; }
#device-table-container .table td:nth-child(7) { min-width: 100px; }
.battery-label { display: inline-block; min-width: 2.8ch; font-variant-numeric: tabular-nums; }

/* ── Devices split-pane + inspector ──────────────────
 * The roster (left) keeps its place while a compact inspector (right) shows a
 * single device at a glance. On narrow viewports the inspector becomes a
 * right-edge drawer that overlays the list.
 */
.dv-split {
  display: flex;
  align-items: flex-start;
  gap: var(--s-4);
}
.dv-split > #device-table-container { flex: 1 1 auto; min-width: 0; }

.device-inspector {
  flex: 0 0 340px;
  position: sticky;
  top: 16px;
  align-self: flex-start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-4);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  animation: dvp-in var(--dur-slow) var(--ease);
}
@keyframes dvp-in { from { opacity: 0; transform: translateX(6px); } to { opacity: 1; transform: none; } }

.dvp-loading { padding: 20px 16px; }

.dvp { padding: 14px 16px 16px; }
.dvp-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s-2); }
.dvp-id { display: flex; align-items: center; gap: var(--s-2); min-width: 0; }
.dvp-serial {
  font-size: var(--t-15, 15px);
  font-weight: var(--fw-semibold);
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dvp-id .kiosk-lock { color: var(--muted); flex: 0 0 auto; display: inline-flex; }
.dvp-close {
  flex: 0 0 auto;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  padding: 2px 8px;
  border-radius: var(--r-2);
  transition: color var(--dur) var(--ease), background var(--dur) var(--ease);
}
.dvp-close:hover { color: var(--text); background: var(--hover); }

.dvp-status { display: flex; gap: 6px; font-size: var(--t-12); margin-top: 5px; }

.dvp-vitals {
  margin-top: 16px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 16px;
}
.dvp-vital-wide { grid-column: 1 / -1; }
.dvp-k {
  font-size: var(--t-10);
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
  margin-bottom: 4px;
}
.dvp-v { font-size: var(--t-13); color: var(--text); }
.dvp-v .battery-wrap { margin: 0; }

.dvp-actions { margin-top: 18px; display: flex; flex-direction: column; gap: var(--s-2); }
.dvp-actions-row { display: flex; gap: var(--s-2); }
.dvp-actions .btn-primary,
.dvp-actions .btn-outline { width: 100%; justify-content: center; }
.dvp-actions-row .btn-outline,
.dvp-actions-row .btn-danger-sm { flex: 1; justify-content: center; }
.dvp-admin-row { margin-top: 2px; }
.dvp-open { display: inline-flex; align-items: center; justify-content: center; gap: 6px; }

/* Selected row in the roster */
#device-table-container tr.row-selected > td { background: var(--accent-soft); }
#device-table-container tr.row-selected > td:first-child { box-shadow: inset 2px 0 0 var(--accent); }

/* Narrow viewports: inspector slides in as a right-edge drawer */
@media (max-width: 1024px) {
  .dv-split { display: block; }
  .device-inspector {
    position: fixed;
    top: 0; right: 0; bottom: 0;
    flex-basis: auto;
    width: min(360px, 92vw);
    border-radius: 0;
    border-top: none; border-bottom: none; border-right: none;
    box-shadow: var(--shadow-lg);
    z-index: 50;
    overflow-y: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .device-inspector { animation: none; }
}

/* One-shot pulse when the live alert count rises (reduced-motion safe). */
@keyframes nav-badge-pulse {
  0%   { transform: scale(1); }
  35%  { transform: scale(1.3); }
  100% { transform: scale(1); }
}
.nav-badge-pulse { animation: nav-badge-pulse 600ms var(--ease); transform-origin: center; }
@media (prefers-reduced-motion: reduce) { .nav-badge-pulse { animation: none; } }

/* ── Icons ───────────────────────────────────────────
 * Single rule normalizes every inline <svg> in .ui-icon.
 * Variants: .ui-icon-sm (12px) | .ui-icon-lg (20px) | .ui-icon-xl (28px)
 */
.ui-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  color: currentColor;
  flex: 0 0 16px;
}
.ui-icon svg {
  width: 100%;
  height: 100%;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.ui-icon-sm { width: 12px; height: 12px; flex-basis: 12px; }
.ui-icon-lg { width: 20px; height: 20px; flex-basis: 20px; }
.ui-icon-xl { width: 28px; height: 28px; flex-basis: 28px; }

.charging-bolt {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 12px;
  height: 12px;
  margin-left: 2px;
  color: var(--warn);
  vertical-align: -1px;
}
.charging-bolt svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
  stroke: none;
}

.collapse-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  color: var(--muted);
  transition: color var(--dur) var(--ease);
}
.collapse-arrow svg {
  width: 14px;
  height: 14px;
  transition: transform var(--dur-slow) var(--ease);
}
.collapsible-header[aria-expanded="true"] .collapse-arrow svg,
.collapsible-header.open .collapse-arrow svg {
  transform: rotate(90deg);
}
.collapsible-header[aria-expanded="true"] .collapse-arrow,
.collapsible-header.open .collapse-arrow {
  color: var(--text);
}

.btn-logout {
  width: 100%;
  background: transparent;
  border: 1px solid var(--rule);
  color: var(--muted);
  padding: 7px 12px;
  border-radius: var(--r-2);
  cursor: pointer;
  font-size: var(--t-12);
  font-family: var(--font);
  transition: border-color var(--dur) var(--ease), color var(--dur) var(--ease), background var(--dur) var(--ease);
}
.btn-logout:hover { border-color: var(--danger-edge); color: var(--danger); background: var(--danger-bg); }

/* Theme toggle */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--rule);
  color: var(--muted);
  padding: 6px;
  border-radius: var(--r-2);
  cursor: pointer;
  flex: 0 0 auto;
  transition: border-color var(--dur) var(--ease), color var(--dur) var(--ease), background var(--dur) var(--ease);
}
.theme-toggle:hover { color: var(--text); background: var(--hover); border-color: var(--rule-2); }
.theme-toggle .ui-icon { width: 16px; height: 16px; }
.theme-toggle .ui-icon svg { width: 16px; height: 16px; }
/* Show the icon for the theme you'd switch TO */
.theme-toggle .theme-icon-light { display: none; }
.theme-toggle .theme-icon-dark { display: inline-flex; }
html[data-theme="dark"] .theme-toggle .theme-icon-light { display: inline-flex; }
html[data-theme="dark"] .theme-toggle .theme-icon-dark { display: none; }

.navbar-user {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  margin: 0 4px 10px;
  line-height: 1.1;
}
.navbar-user-name {
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
}
.navbar-user-role {
  color: var(--muted);
  font-size: 11px;
  text-transform: capitalize;
}

/* ── Layout ──────────────────────────────────────── */
/* Pages grow with the screen up to --page-max, then centre (user, 26 Oct 2026, picked
   "Grow to 1760 px, all pages": at 1280 px big screens had empty sides). */
:root { --page-max: 1760px; }
.container {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 28px 24px;
}

.back-link {
  font-size: 13px;
  color: var(--muted);
  display: inline-block;
  margin-bottom: 6px;
}
.back-link:hover { color: var(--accent-h); }

/* ── Cards ───────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-4);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
}
.card-header h3, .card-header h2 { font-size: 15px; font-weight: 600; }
.card-header-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* ── Stat cards ──────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0;
  margin-bottom: var(--s-5);
  border: 1px solid var(--border);
  border-radius: var(--r-4);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.stat-card {
  padding: 14px var(--s-5) 16px;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
  background: var(--surface);
  transition: background var(--dur) var(--ease);
}
.stat-card:hover { background: var(--surface2); }
.stat-card.is-signal::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 24px;
  height: 2px;
  background: var(--accent);
}

.stat-label {
  font-size: var(--t-11);
  font-weight: var(--fw-medium);
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--muted);
}

.stat-value {
  font-family: var(--mono);
  font-size: 22px;
  font-weight: var(--fw-semibold);
  letter-spacing: -.02em;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.stat-value.battery-low  { color: var(--danger); }
.stat-value.battery-mid  { color: var(--warn); }
.stat-value.battery-ok   { color: var(--ok); }

.stat-sub {
  font-family: var(--mono);
  font-size: var(--t-11);
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

/* ── Table ───────────────────────────────────────── */
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--t-12);
}

.table thead th {
  position: sticky;
  top: 0;
  padding: 9px var(--s-4);
  text-align: left;
  font-size: var(--t-11);
  font-weight: var(--fw-medium);
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--muted);
  border-bottom: 1px solid var(--rule);
  background: var(--surface2);
  white-space: nowrap;
}

.table tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}
.table tbody tr:last-child { border-bottom: none; }
.table tbody tr:hover {
  background: var(--surface2);
  box-shadow: inset 2px 0 0 var(--accent);
}
.table tbody tr.is-selected {
  background: var(--accent-soft);
  box-shadow: inset 2px 0 0 var(--accent);
}

.table tbody td {
  padding: 11px var(--s-4);
  vertical-align: middle;
  font-variant-numeric: tabular-nums;
}

/* ── Battery bar ─────────────────────────────────── */
.battery-wrap {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  min-width: 120px;
}

.battery-wrap.large {
  min-width: 100%;
  margin-top: var(--s-2);
}

.battery-track {
  flex: 1;
  min-width: 0;
  height: 4px;
  border-radius: 3px;
  background: var(--rule);
  overflow: hidden;
}
.battery-wrap.large .battery-track { height: 5px; }

.battery-bar {
  height: 100%;
  border-radius: 3px;
  min-width: 2px;
  transition: width var(--dur-slow) var(--ease);
}
.battery-bar.battery-low  { background: var(--danger); }
.battery-bar.battery-mid  { background: var(--warn); }
.battery-bar.battery-ok   { background: var(--ok); }

.battery-label {
  font-family: var(--mono);
  font-size: var(--t-11);
  font-weight: var(--fw-medium);
  color: var(--text-2);
  white-space: nowrap;
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
  width: 36px;
  text-align: right;
}

/* ── Helpers ─────────────────────────────────────── */
.mono  { font-family: var(--mono); }
.small { font-size: 12px; }
.muted { color: var(--muted); }
.ok { color: var(--ok); }
.warn { color: var(--warn); }
.danger { color: var(--danger); }

/* ── Empty state (canonical pattern) ─────────────────
 * Two flavors:
 *   .empty           — inline cell empty (table colspan, etc.)
 *   .empty-state     — page/section empty with icon + title + copy + CTA
 */
.empty {
  text-align: center;
  color: var(--muted);
  padding: var(--s-7) var(--s-4) !important;
  font-size: var(--t-12);
  font-family: var(--mono);
}

.extra-cell {
  max-width: 280px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* A serial (or any identifier that links to its own page): a quiet chip that reads
   as text until you reach for it. The old boxed coral-on-border version shouted at
   every row it appeared in — dozens per page — and competed with the status badges
   that actually carry the news. Colour arrives on hover, not at rest. */
.link-detail {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  padding: 3px 8px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: var(--surface2);
  white-space: nowrap;
  transition: background-color 0.15s, color 0.15s, border-color 0.15s;
}
.link-detail:hover { background: var(--accent-soft); border-color: var(--accent-edge); color: var(--accent-text); }

.refresh-badge {
  font-size: 11px;
  color: var(--muted);
  border: 1px solid var(--border);
  padding: 4px 10px;
  border-radius: 20px;
}

/* HTMX loading indicator */
.htmx-request .refresh-badge { color: var(--accent-text); border-color: var(--accent); }

/* ── Login ───────────────────────────────────────── */
.login-body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: var(--bg);
}

.login-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-4);
  box-shadow: var(--shadow-sm);
  padding: 40px 36px;
  width: 100%;
  max-width: 380px;
}

.login-brand {
  width: 48px;
  height: 48px;
  color: var(--accent-text);
  margin: 0 auto 20px;
}

.login-brand svg {
  width: 48px;
  height: 48px;
}

.login-title {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 4px;
  text-align: center;
}

.login-subtitle {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 28px;
  text-align: center;
}

.login-form { display: flex; flex-direction: column; gap: 16px; }

/* ── Auth v2 — split-screen login/signup, theme-aware (light default, dark via
   html[data-theme="dark"] like the rest of the app) ───────────────────────── */
.auth2-body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--text); font-family: var(--font); }
.auth2-wrap { display: flex; min-height: 100vh; padding: 20px; gap: 20px; box-sizing: border-box; }
@media (max-width: 860px) { .auth2-wrap { flex-direction: column; padding: 0; gap: 0; } }

.auth2-hero {
  flex: 1.05; min-width: 0; border-radius: 24px; position: relative; overflow: hidden;
  background: radial-gradient(120% 140% at 8% 0%, #ff8a5c 0%, #f9674e 22%, #d6608f 48%, #8f6fdb 72%, #6f7ff0 100%);
  display: flex; flex-direction: column; justify-content: space-between; padding: 44px 40px;
}
@media (max-width: 860px) { .auth2-hero { border-radius: 0; padding: 28px 24px 34px; flex: none; } }
.auth2-hero-top { font-size: 13px; font-weight: 650; color: rgba(255,255,255,.85); letter-spacing: .02em; }
.auth2-hero-head { font-size: clamp(28px, 3.6vw, 42px); font-weight: 800; letter-spacing: -.02em; line-height: 1.12; color: #fff; max-width: 13ch; }
.auth2-hero-sub { font-size: 15px; color: rgba(255,255,255,.88); line-height: 1.5; max-width: 42ch; margin-top: 14px; }
.auth2-hero-foot { font-size: 12px; color: rgba(255,255,255,.7); }
@media (max-width: 860px) { .auth2-hero-sub, .auth2-hero-foot { display: none; } }

.auth2-side { flex: 1; min-width: 0; display: flex; flex-direction: column; padding: 12px 40px; }
@media (max-width: 860px) { .auth2-side { padding: 32px 24px 40px; } }
.auth2-form-wrap { flex: 1; display: flex; flex-direction: column; justify-content: center; max-width: 400px; width: 100%; margin: 0 auto; }
.auth2-title { font-size: 26px; font-weight: 750; letter-spacing: -.01em; color: var(--text); margin: 0; }
.auth2-subtitle { font-size: 13.5px; color: var(--muted); margin-top: 6px; }
.auth2-form { display: flex; flex-direction: column; gap: 14px; margin-top: 26px; }
.auth2-field { display: flex; flex-direction: column; gap: 6px; }
.auth2-field label { font-size: 11.5px; font-weight: 650; color: var(--muted); }
.auth2-field input {
  font: inherit; font-size: 14px; background: var(--surface2); border: 1px solid var(--border); border-radius: 11px;
  padding: 13px 14px; color: var(--text); outline: none; transition: border-color .12s;
}
.auth2-field input::placeholder { color: var(--text-faint); }
.auth2-field input:focus { border-color: var(--accent); }
.auth2-pwrap { position: relative; }
.auth2-pwrap input { width: 100%; box-sizing: border-box; padding-right: 42px; }
.auth2-eye { position: absolute; right: 11px; top: 50%; transform: translateY(-50%); background: none; border: none; color: var(--muted); cursor: pointer; padding: 4px; display: flex; }
.auth2-eye:hover { color: var(--text); }
.auth2-eye svg { width: 18px; height: 18px; }
.auth2-row { display: flex; justify-content: flex-end; margin-top: -4px; }
.auth2-row a, .auth2-alt a { color: var(--muted); text-decoration: none; font-size: 12.5px; }
.auth2-row a:hover, .auth2-alt a:hover { color: var(--text); }
.auth2-btn {
  font: inherit; font-size: 14.5px; font-weight: 700; padding: 13px; border: none; border-radius: 11px;
  background: var(--accent-fill); color: #fff; cursor: pointer; margin-top: 4px; transition: filter .12s;
}
.auth2-btn:hover { filter: brightness(1.08); }
.auth2-divider { display: flex; align-items: center; gap: 10px; color: var(--text-faint); font-size: 11.5px; margin: 4px 0; }
.auth2-divider::before, .auth2-divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.auth2-oauth {
  display: flex; align-items: center; justify-content: center; gap: 9px; font-size: 13.5px; font-weight: 650;
  padding: 12px; border-radius: 11px; border: 1px solid var(--border); background: var(--surface2); color: var(--text); text-decoration: none;
}
.auth2-oauth:hover { border-color: var(--rule-2); }
.auth2-alt { font-size: 13px; color: var(--muted); margin-top: 22px; text-align: center; }
.auth2-alert { font-size: 13px; padding: 11px 13px; border-radius: 10px; margin-top: 22px; }
.auth2-alert.error { background: var(--danger-bg); color: var(--danger); border: 1px solid var(--danger-edge); }
.auth2-alert.success { background: var(--ok-bg); color: var(--ok); border: 1px solid var(--ok-edge); }

/* ── Form primitives ─────────────────────────────────
 * One shared input rule. Focus visual is handled by the
 * global :focus-visible ring; we also lift border-color
 * for mouse focus continuity.
 */
.form-group { display: flex; flex-direction: column; gap: var(--s-2); }

.form-group input,
.form-group select,
.form-input,
.form-textarea,
.search-input,
.filter-search-input {
  background: var(--surface2);
  border: 1px solid transparent;
  border-radius: var(--r-3);
  color: var(--text);
  padding: 8px 12px;
  font-family: var(--font);
  font-size: var(--t-13);
  line-height: var(--leading-normal);
  outline: none;
  transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.form-group input:hover,
.form-input:hover,
.form-textarea:hover,
.search-input:hover,
.filter-search-input:hover { border-color: var(--rule); }

.form-group input:focus,
.form-input:focus,
.form-textarea:focus,
.search-input:focus,
.filter-search-input:focus {
  background: var(--surface);
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.form-group input::placeholder,
.form-input::placeholder,
.form-textarea::placeholder,
.search-input::placeholder,
.filter-search-input::placeholder { color: var(--text-faint); }

.form-input--error,
.form-input.has-error,
.form-textarea--error,
.form-textarea.has-error {
  border-color: var(--danger-edge);
  background: var(--danger-bg);
}

.form-group label,
.form-label {
  font-size: var(--t-11);
  font-weight: var(--fw-medium);
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--muted);
}
.form-label[data-required]::after,
.form-group label[data-required]::after {
  content: "*";
  margin-left: 4px;
  color: var(--danger);
  font-weight: var(--fw-bold);
}

/* ── Alerts (shared bg + border + color pattern) ──── */
.alert {
  padding: var(--s-3) var(--s-4);
  border-radius: var(--r-2);
  font-size: var(--t-13);
  line-height: var(--leading-normal);
  margin-bottom: var(--s-4);
  border: 1px solid;
}
.alert-error   { background: var(--danger-bg); border-color: var(--danger-edge); color: var(--danger); }
.alert-warn    { background: var(--warn-bg);   border-color: var(--warn-edge);   color: var(--warn); }
.alert-success { background: var(--ok-bg);     border-color: var(--ok-edge);     color: var(--ok); }
.alert-info    { background: var(--info-bg);   border-color: var(--info-edge);   color: var(--info); }

.ota-incompatible {
  color: var(--muted);
  font-style: italic;
}

/* ── Search ──────────────────────────────────────── */
.search-bar {
  margin-bottom: 14px;
}

.search-input { width: 100%; }

/* ── Pagination ──────────────────────────────────── */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px;
  border-top: 1px solid var(--border);
}

.page-numbers {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  justify-content: center;
}

.page-btn,
/* These are now <button>s (keyboard-operable pagination); inherit the page font so
   they don't fall back to the UA default, and strip the native button appearance. */
.page-num, .page-btn { font-family: inherit; -webkit-appearance: none; appearance: none; }
.page-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 34px;
  padding: 0 10px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid var(--border);
  color: var(--text);
  background: transparent;
  transition: border-color 0.15s, background 0.15s;
  text-decoration: none;
}
.page-btn:hover,
.page-num:hover   { border-color: var(--accent); color: var(--accent-h); }
.page-num.active  { background: var(--accent-fill); border-color: var(--accent-fill); color: var(--accent-ink); }
.page-btn.disabled,
.page-btn.disabled:hover {
  color: var(--muted);
  cursor: default;
  border-color: var(--border);
}

.table-footer {
  padding: 10px 16px;
  font-size: 12px;
  color: var(--muted);
  border-top: 1px solid var(--border);
  text-align: right;
}

/* ── Chart ───────────────────────────────────────── */
.chart-card {
  margin-bottom: 20px;
  position: relative;
}

.chart-wrap {
  padding: 20px 20px 16px;
  position: relative;
  height: 230px;
}
.chart-wrap--tall {
  height: 300px;
}
.chart-tabs {
  display: inline-flex;
  gap: 6px;
  margin: 12px 16px 4px;
  padding: 0;
  background: none;
  border: 0;
  width: fit-content;
}
.chart-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 13px;
  font-size: 12px;
  font-weight: var(--fw-semibold);
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  transition: color 120ms, background 120ms, border-color 120ms;
}
.chart-tab:hover { color: var(--text); border-color: var(--text-faint); }
.chart-tab.active {
  background: var(--accent-soft);
  color: var(--accent-text);
  font-weight: var(--fw-semibold);
  border-color: transparent;
  box-shadow: none;
}
.chart-legend {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 4px;
  flex-wrap: wrap;
}
.chart-legend-item {
  display: flex;
  align-items: center;
  gap: 4px;
}
.chart-hover-info {
  --hover-accent: var(--chart-battery);
  display: inline-flex;
  flex: 1 1 0;
  align-items: center;
  gap: 12px;
  min-width: 0;
  max-width: 400px;
  padding: 5px 14px 5px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface2);
  color: var(--text);
  font-size: 12.5px;
  line-height: 18px;
  letter-spacing: 0.01em;
  white-space: nowrap;
  overflow: hidden;
  pointer-events: none;
  transition: border-color 160ms ease;
}
.chart-hover-info:not(.is-idle) {
  border-color: color-mix(in srgb, var(--hover-accent) 55%, transparent);
  box-shadow: var(--shadow-md);
}
.chart-hover-info[data-accent="battery"] { --hover-accent: var(--chart-battery); }
.chart-hover-info[data-accent="temp"]    { --hover-accent: var(--chart-temp); }
.chart-hover-info[data-accent="ram"]     { --hover-accent: var(--chart-ram); }

.chart-hover-info .hover-indicator {
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--hover-accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--hover-accent) 22%, transparent),
    0 0 12px color-mix(in srgb, var(--hover-accent) 65%, transparent);
  animation: hoverPulse 1.8s ease-in-out infinite;
}
.chart-hover-info.is-idle .hover-indicator {
  background: var(--muted);
  box-shadow: 0 0 0 3px var(--hover);
  animation: none;
}
.chart-hover-info .hover-body {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chart-hover-info .hover-time {
  font-variant-numeric: tabular-nums;
  font-size: 11.5px;
  color: var(--muted);
  letter-spacing: 0.02em;
}
.chart-hover-info .hover-sep {
  flex: 0 0 1px;
  width: 1px;
  height: 14px;
  background: var(--border);
}
.chart-hover-info .hover-primary {
  font-weight: 600;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.chart-hover-info .hover-extra {
  font-size: 11.5px;
  color: color-mix(in srgb, var(--hover-accent) 75%, var(--text));
  padding: 2px 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--hover-accent) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--hover-accent) 28%, transparent);
}
.chart-hover-info .hover-extra:empty {
  display: none;
}
.chart-hover-info.is-idle .hover-time,
.chart-hover-info.is-idle .hover-sep {
  display: none;
}
.chart-hover-info.is-idle .hover-primary {
  color: var(--muted);
  font-weight: 500;
  font-style: italic;
  letter-spacing: 0.02em;
}

@keyframes hoverPulse {
  0%, 100% {
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--hover-accent) 22%, transparent),
      0 0 10px color-mix(in srgb, var(--hover-accent) 55%, transparent);
  }
  50% {
    box-shadow: 0 0 0 5px color-mix(in srgb, var(--hover-accent) 10%, transparent),
      0 0 18px color-mix(in srgb, var(--hover-accent) 75%, transparent);
  }
}

@media (prefers-reduced-motion: reduce) {
  .chart-hover-info .hover-indicator { animation: none; }
}
.chart-legend-line {
  width: 18px;
  height: 3px;
  border-radius: 2px;
  display: inline-block;
}
.chart-legend-line.command-marker {
  height: 0;
  border-top: 2px dashed var(--muted);
}

/* ── Forms (groups / commands) ───────────────────── */
.inline-form {
  display: flex;
  gap: 10px;
  padding: 12px 16px;
  align-items: center;
}

.form-input { flex: 1; }

.command-form {
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
  padding: var(--s-4);
}
.form-submitting { opacity: 0.92; }

.form-row {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
}

.form-textarea {
  font-family: var(--mono);
  resize: vertical;
  min-height: 90px;
}

.radio-group,
.checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.radio-label,
.checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  cursor: pointer;
  color: var(--text);
  user-select: none;
}

input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border: 2px solid var(--border);
  border-radius: 4px;
  background: var(--surface2);
  cursor: pointer;
  flex-shrink: 0;
  transition: border-color 0.15s, background 0.15s;
  position: relative;
}

input[type="checkbox"]:checked {
  border-color: var(--accent);
  background: var(--accent);
}

input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -55%) rotate(45deg);
  width: 4px;
  height: 7px;
  border: 2px solid var(--accent-ink);
  border-top: none;
  border-left: none;
}

input[type="checkbox"]:hover {
  border-color: var(--accent);
}

.radio-label input[type="radio"] {
  appearance: none;
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border: 2px solid var(--border);
  border-radius: 50%;
  background: var(--surface2);
  cursor: pointer;
  flex-shrink: 0;
  transition: border-color 0.15s, background 0.15s;
  position: relative;
}

.radio-label input[type="radio"]:checked {
  border-color: var(--accent);
  background: var(--accent);
}

.radio-label input[type="radio"]:checked::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-ink);
}

.radio-label input[type="radio"]:hover {
  border-color: var(--accent);
}

/* ── Buttons ─────────────────────────────────────────
 * Variants: .btn-primary | .btn-outline | .btn-link
 * Modifiers: .btn-sm | .btn-danger-sm
 * All accent-fill variants use --accent-ink for AA contrast on amber.
 */
.btn-primary,
.btn-outline,
.btn-outline-sm,
.btn-danger-sm {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  font-family: var(--font);
  font-weight: var(--fw-semibold);
  white-space: nowrap;
  cursor: pointer;
  border-radius: var(--r-3);
  border: 1px solid transparent;
  transition: background var(--dur) var(--ease),
              border-color var(--dur) var(--ease),
              color var(--dur) var(--ease),
              transform var(--dur-fast) var(--ease),
              opacity var(--dur) var(--ease);
}
/* Tactile press + a busy state while an htmx action is in flight, so every
   button reacts to a click even before the swap/204 lands. */
.btn-primary:active,
.btn-outline:active,
.btn-outline-sm:active,
.btn-danger-sm:active { transform: translateY(1px); }
.btn-primary.htmx-request,
.btn-outline.htmx-request,
.btn-outline-sm.htmx-request,
.btn-danger-sm.htmx-request { opacity: .65; pointer-events: none; }
@media (prefers-reduced-motion: reduce) {
  .btn-primary:active,
  .btn-outline:active,
  .btn-outline-sm:active,
  .btn-danger-sm:active { transform: none; }
}

.btn-primary {
  background: var(--accent-fill);
  color: var(--accent-ink);
  border-color: var(--accent-fill);
  padding: 8px 16px;
  font-size: var(--t-13);
}
.btn-primary:hover  { background: var(--accent-fill-h); border-color: var(--accent-fill-h); color: var(--accent-ink); }
.btn-primary:active { background: var(--accent-fill); }
.btn-primary:disabled {
  background: var(--surface2);
  color: var(--muted);
  border-color: var(--border);
  cursor: not-allowed;
}

.btn-outline {
  background: var(--surface);
  color: var(--text-2);
  border-color: var(--rule);
  padding: 7px 14px;
  font-size: var(--t-13);
  font-weight: var(--fw-medium);
}
.btn-outline:hover {
  border-color: var(--text-2);
  color: var(--text);
}

.btn-outline-sm {
  background: var(--surface);
  color: var(--text-2);
  border-color: var(--rule);
  padding: 4px 10px;
  font-size: var(--t-12);
  font-weight: var(--fw-medium);
}
.btn-outline-sm:hover {
  border-color: var(--text-2);
  color: var(--text);
}

.btn-danger-sm {
  background: var(--surface);
  color: var(--muted);
  border-color: var(--rule);
  padding: 4px 10px;
  font-size: var(--t-12);
  font-weight: var(--fw-medium);
}
.btn-danger-sm:hover { color: var(--danger); border-color: var(--danger-edge); background: var(--danger-bg); }

/* ── Status badge / WS badge ─────────────────────────
 * Shared (bg + border + color) pattern keyed off semantic tokens.
 */
.status-badge,
.ws-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font);
  font-size: var(--t-11);
  font-weight: var(--fw-semibold);
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
  border: none;
}
.status-badge.ok,
.ws-badge.online   { color: var(--ok);     background: var(--ok-bg); }
.status-badge.warn { color: var(--warn);   background: var(--warn-bg); }
.status-badge.danger { color: var(--danger); background: var(--danger-bg); }
.status-badge.muted,
.ws-badge.offline  { color: var(--muted);  background: var(--surface-3); }
.status-badge.active { color: var(--accent-2); background: var(--accent-2-soft); }

/* Shared "Beta" pill for pre-release features (schedules, etc.). */
.beta-pill {
  display: inline-block;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #fff;
  background: var(--accent-fill);
  border-radius: 99px;
  padding: 2px 7px;
  vertical-align: middle;
  line-height: 1.4;
}

/* ── WebSocket online dot ────────────────────────── */
.ws-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--muted);
  margin-right: 5px;
  flex-shrink: 0;
}
.ws-dot.online {
  background: var(--ok);
}

/* ── Segmented control ───────────────────────────── */
.seg-control {
  display: inline-flex;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 3px;
  gap: 2px;
}

.seg-btn {
  background: transparent;
  border: none;
  color: var(--muted);
  padding: 6px 16px;
  border-radius: calc(var(--radius) - 2px);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}
.seg-btn:hover { color: var(--text); }
.seg-btn.active {
  background: var(--accent-fill);
  color: var(--accent-ink);
}
.seg-btn:disabled,
.seg-btn[disabled] {
  opacity: 0.4;
  cursor: not-allowed;
  color: var(--muted);
}
.seg-btn:disabled:hover { color: var(--muted); }

/* ── App selector ────────────────────────────────── */
.app-select-wrap {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.app-select-wrap select { flex: 1; min-width: 0; }

.btn-primary .ui-icon,
.btn-outline .ui-icon,
.btn-outline-sm .ui-icon,
.btn-danger-sm .ui-icon {
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
}

.btn-primary .ui-icon svg,
.btn-outline .ui-icon svg,
.btn-outline-sm .ui-icon svg,
.btn-danger-sm .ui-icon svg {
  width: 14px;
  height: 14px;
}

.btn-plus {
  width: 30px;
  height: 30px;
  padding: 0;
  border-radius: var(--r-2);
}

.dur-btns { display: flex; gap: 2px; }
.dur-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.dur-btn:hover { border-color: var(--accent); color: var(--accent-text); }
.dur-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.dur-btn:disabled:hover { border-color: transparent; color: var(--muted); }
.dur-btn.active { background: var(--accent-fill); border-color: var(--accent-fill); color: var(--accent-ink); }

.chart-card > .card-header { position: relative; }

@media (max-width: 760px) {
  .card-header .dur-btns { flex-wrap: wrap; }
}

.btn-link {
  background: none;
  border: none;
  color: var(--accent-text);
  font-size: var(--t-13);
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color var(--dur) var(--ease);
}
.btn-link:hover { color: var(--accent-h); }

.app-empty-hint {
  color: var(--muted);
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.bold { font-weight: 600; }

/* ── Modal ───────────────────────────────────────── */
.modal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--overlay);
  z-index: 100;
  align-items: center;
  justify-content: center;
  padding: var(--s-4);
}
.modal-backdrop.modal-open { display: flex; animation: modal-fade var(--dur) var(--ease); }
@keyframes modal-fade { from { opacity: 0; } to { opacity: 1; } }

.modal-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-4);
  box-shadow: var(--shadow-pop);
  width: 100%;
  max-width: 520px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
/* Rise + settle the dialog in rather than hard-appearing. */
.modal-backdrop.modal-open .modal-box { animation: modal-rise var(--dur-slow) var(--ease); }
@keyframes modal-rise {
  from { opacity: 0; transform: translateY(8px) scale(.98); }
  to   { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .modal-backdrop.modal-open,
  .modal-backdrop.modal-open .modal-box { animation: none; }
}
.modal-box.modal-wide { max-width: 640px; }

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--s-3) var(--s-5);
  border-bottom: 1px solid var(--border);
}

.modal-title {
  font-size: var(--t-14);
  font-weight: var(--fw-semibold);
  letter-spacing: -.005em;
}

.modal-close {
  background: none;
  border: 1px solid transparent;
  color: var(--muted);
  font-size: var(--t-18);
  cursor: pointer;
  line-height: 1;
  padding: 2px 8px;
  border-radius: var(--r-1);
  transition: color var(--dur) var(--ease), background var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.modal-close:hover { color: var(--text); background: var(--surface2); border-color: var(--rule); }

.modal-body {
  padding: var(--s-4) var(--s-5);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
}

.modal-row {
  display: flex;
  align-items: baseline;
  gap: var(--s-3);
}

.modal-label {
  font-size: var(--t-10);
  font-weight: var(--fw-semibold);
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--muted);
  min-width: 70px;
  flex-shrink: 0;
}

.modal-value { color: var(--text); }

.modal-pre {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text);
  overflow-x: auto;
  white-space: pre;
  margin-top: 4px;
}

.row-clickable { cursor: pointer; }

/* ── Pagination ──────────────────────────────────── */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 14px 0 6px;
  border-top: 1px solid var(--border);
}
.page-btn {
  display: inline-block;
  padding: 5px 14px;
  border-radius: 6px;
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 13px;
  text-decoration: none;
  background: var(--surface);
  transition: background 0.15s, border-color 0.15s;
}
.page-btn:not(.disabled):hover {
  background: var(--surface2);
  border-color: var(--accent);
}
.page-btn.disabled {
  opacity: 0.35;
  cursor: default;
  pointer-events: none;
}
.page-info {
  font-size: 13px;
  color: var(--muted);
}

/* ── Logcat ──────────────────────────────────────── */
.logcat-wrap {
  padding: 0;
  overflow: hidden;
  border-top: 1px solid var(--border);
}
.logcat-terminal {
  background: var(--console-bg);
  color: var(--console-text);
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.6;
  padding: 16px;
  margin: 0;
  max-height: 500px;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-all;
}
/* crash-trace: shared collapsible trace + Copy log button (see the "crash-trace"
   template in layout.html). Used by the device page's Alerts tab and the alerts
   page, so the markup and spacing stay identical wherever a crash is shown. */
.crash-trace { margin: 9px 0 2px; }
.crash-trace > summary {
  cursor: pointer;
  user-select: none;
  padding: 3px 0;
  font-size: 12px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 8px;
}
.crash-trace > summary::-webkit-details-marker { display: none; }
.crash-trace > summary::before { content: "▸"; font-size: 10px; }
.crash-trace[open] > summary::before { content: "▾"; }
.ct-copy {
  margin-left: auto;
  font: inherit;
  font-size: 11px;
  line-height: 1;
  padding: 4px 8px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
}
.ct-copy:hover { color: var(--text); border-color: var(--muted); }
.crash-trace > .logcat-terminal { margin-top: 6px; max-height: 320px; overflow: auto; }
.logcat-waiting {
  padding: 12px 16px;
  border-top: 1px solid var(--border);
}
.logcat-level-E { background: var(--danger-bg); color: var(--danger); border-color: var(--danger-edge); }
.logcat-level-W { background: var(--warn-bg);   color: var(--warn);   border-color: var(--warn-edge); }
.logcat-level-I { background: var(--info-bg);   color: var(--info);   border-color: var(--info-edge); }
.logcat-level-D { background: var(--ok-bg);     color: var(--ok);     border-color: var(--ok-edge); }
.logcat-level-V { background: rgba(138,146,160,0.10); color: var(--muted); border-color: rgba(138,146,160,0.25); }
.logcat-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ── Actions Grid ────────────────────────────────── */
.actions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  padding: 16px;
}
.action-card {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
}
.action-label {
  font-weight: 600;
  font-size: 13px;
}
.btn-danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  background: var(--danger-bg);
  color: var(--danger);
  border: 1px solid var(--danger-edge);
  padding: 7px 14px;
  border-radius: var(--r-2);
  cursor: pointer;
  font-size: var(--t-13);
  font-weight: var(--fw-semibold);
  font-family: var(--font);
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.btn-danger:hover {
  background: var(--danger);
  color: var(--accent-ink);
  border-color: var(--danger);
}

/* ── Screenshot ──────────────────────────────────── */
.screenshot-thumb {
  max-width: 160px;
  max-height: 90px;
  border-radius: 4px;
  border: 1px solid var(--border);
  cursor: pointer;
  display: block;
}

/* ── Table toolbar & bulk actions ────────────────── */
.table-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px 4px;
}

.bulk-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.bulk-count {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-text);
  white-space: nowrap;
}
.lookup-results {
  width: 100%;
  margin-top: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface2);
  overflow: hidden;
}

.lookup-results.compact {
  margin-top: 0;
}
.lookup-title {
  padding: 10px 12px;
  font-size: 12px;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
}
.lookup-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-top: 1px solid var(--border-soft);
}
.lookup-row:first-of-type {
  border-top: 0;
}
.lookup-empty .lookup-title {
  border-bottom: 0;
}
.kiosk-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface2);
}
.kiosk-summary-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 4px;
}
.kiosk-summary-value {
  font-size: 14px;
  color: var(--text);
}

.device-actions {
  padding: 18px 20px 20px;
  display: grid;
  gap: 18px;
}

.device-actions-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.device-actions-title {
  font-size: 16px;
  font-weight: 700;
}

.device-actions-subtitle {
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
  max-width: 580px;
}

.device-action-picker {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.device-action-tile {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  display: grid;
  gap: 6px;
  text-align: left;
  color: var(--text);
  cursor: pointer;
  transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease);
}

.device-action-tile:hover {
  border-color: var(--text-faint);
  background: var(--hover);
}

.device-action-tile.active {
  border-color: transparent;
  background: var(--accent-soft);
}
.device-action-tile.active .device-action-tile-title { color: var(--accent-text); }

.device-action-tile .ui-icon {
  width: 16px;
  height: 16px;
  color: var(--text-2);
}
.device-action-tile.active .ui-icon { color: var(--accent-text); }

.device-action-tile .ui-icon svg {
  width: 16px;
  height: 16px;
}

.device-action-tile-title {
  font-size: var(--t-13);
  font-weight: var(--fw-semibold);
}

.device-action-tile-copy {
  font-size: var(--t-11);
  color: var(--muted);
  line-height: var(--leading-normal);
}

.device-action-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}
/* Let the kiosk package dropdown escape the panel instead of being clipped. */
.device-action-panel:has(.pkg-combo.open) { overflow: visible; }
/* Same, for the bulk-kiosk modal's app picker (modal-body scrolls by default). */
.modal-body:has(.pkg-combo.open) { overflow: visible; }

.device-action-panel-head {
  padding: var(--s-4) var(--s-4) var(--s-3);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--s-4);
}

.device-action-panel-title {
  font-size: var(--t-14);
  font-weight: var(--fw-semibold);
  letter-spacing: -.005em;
}

.device-action-panel-copy {
  margin-top: 4px;
  font-size: var(--t-12);
  color: var(--muted);
}

.device-action-form {
  padding: var(--s-4);
  display: grid;
  gap: var(--s-3);
}

.device-action-inline {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  flex-wrap: wrap;
}

.device-action-note {
  padding: var(--s-3) var(--s-4);
  border-radius: var(--r-2);
  border: 1px solid var(--border);
  background: var(--surface2);
  font-size: var(--t-12);
  color: var(--text-2);
  line-height: var(--leading-normal);
}

.device-action-note.warn {
  border-color: var(--warn-edge);
  background: var(--warn-bg);
  color: var(--warn);
}

.device-action-meta {
  font-family: var(--mono);
  font-size: var(--t-11);
  color: var(--muted);
}

.danger-zone {
  background: var(--danger-bg);
  border: 1px solid var(--danger-edge);
  border-radius: 14px;
  padding: 16px 18px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.danger-zone-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--danger);
}

.danger-zone-copy {
  margin-top: 4px;
  font-size: 12px;
  color: var(--text-2);
  max-width: 560px;
}

.empty-state {
  padding: var(--s-8) var(--s-6);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: var(--s-3);
  color: var(--muted);
}

.empty-state-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--r-2);
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--text-faint);
  margin-bottom: var(--s-2);
}
.empty-state-icon svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.empty-state-copy {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  max-width: 420px;
}

.empty-state-title {
  font-size: var(--t-14);
  font-weight: var(--fw-semibold);
  color: var(--text);
}

.empty-state-text {
  font-size: var(--t-12);
  line-height: var(--leading-normal);
  color: var(--muted);
}

.empty-state-actions {
  display: flex;
  gap: var(--s-2);
  margin-top: var(--s-3);
}

.command-composer {
  padding: 20px;
  display: grid;
  gap: 18px;
}

.command-composer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.95fr);
  gap: 18px;
}

.composer-panel {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  display: grid;
  gap: 14px;
}

.composer-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.composer-title {
  font-size: 14px;
  font-weight: 700;
}

.composer-copy {
  font-size: 12px;
  color: var(--muted);
}

.choice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}

.choice-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s, transform 0.15s, background 0.15s;
  display: grid;
  gap: 8px;
}

.choice-card:hover {
  border-color: var(--accent-edge);
  transform: translateY(-1px);
}

.choice-card.active {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 1px var(--accent-edge);
}

.choice-card .ui-icon {
  width: 18px;
  height: 18px;
  color: var(--accent-h);
}

.choice-card .ui-icon svg {
  width: 18px;
  height: 18px;
}

.choice-card-title {
  font-size: 13px;
  font-weight: 700;
}

.choice-card-copy {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.45;
}

.choice-card-meta {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.composer-inline-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.composer-note {
  padding: 10px 12px;
  border: 1px solid var(--border);
  background: var(--surface2);
  border-radius: 10px;
  font-size: 12px;
  color: var(--text);
}

.composer-note.warn {
  border-color: var(--warn-edge);
  background: var(--warn-bg);
  color: var(--text);
}

.target-option-list {
  display: grid;
  gap: 8px;
}

.target-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
}

.target-option.active {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.target-option-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.target-option-title {
  font-size: 13px;
  font-weight: 600;
}

.target-option-text {
  font-size: 12px;
  color: var(--muted);
}

.composer-summary {
  display: grid;
  gap: 12px;
}

.summary-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.summary-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 12px;
  color: var(--text);
  background: var(--surface2);
}

.composer-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 6px;
}

.composer-footer-copy {
  font-size: 12px;
  color: var(--muted);
}

/* ── Filter bar ─────────────────────────────────── */
.filter-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
  flex-wrap: wrap;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px 12px;
}

.filter-search {
  position: relative;
  display: flex;
  align-items: center;
}

.filter-search-icon {
  position: absolute;
  left: 10px;
  color: var(--muted);
  pointer-events: none;
}

.filter-search-input {
  /* Layout-only overrides; visuals inherited from shared input rule. */
  padding: 6px 10px 6px 30px;
  width: 200px;
  transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease), width var(--dur-slow) var(--ease);
}
.filter-search-input:focus { width: 260px; }

.filter-divider {
  width: 1px;
  height: 24px;
  background: var(--border);
  flex-shrink: 0;
}

.filter-select {
  background: var(--surface2);
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--muted);
  padding: 6px 10px;
  font-size: 13px;
  font-weight: 500;
  outline: none;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.filter-select:hover { color: var(--text); border-color: var(--border); }
.filter-select:focus-visible { border-color: var(--accent); color: var(--text); box-shadow: var(--ring); }
.filter-select.active {
  color: var(--accent-text);
  border-color: var(--accent);
  background: var(--accent-soft);
}
.filter-select option { background: var(--surface2); color: var(--text); }

/* Leading icon inside a filter dropdown (mirrors .filter-search). */
.filter-select-ic { position: relative; display: inline-flex; align-items: center; }
.filter-select-ic > svg {
  position: absolute; left: 9px; width: 14px; height: 14px;
  color: var(--muted); pointer-events: none;
}
.filter-select-ic > .filter-select { padding-left: 28px; }
.filter-select-ic:has(.filter-select.active) > svg { color: var(--accent-text); }

/* Unset filters show a short label next to the icon (muted); set filters become an
   accent chip with a clear ✕ — all driven live by :has(option:checked). */

/* Active: a value is chosen → accent chip (icon + value) with a clear ✕. */
.filter-select-ic:has(.filter-select option:checked:not([value=""])) > .filter-select {
  color: var(--accent-text);
  border-color: var(--accent);
  background: var(--accent-soft);
  padding-right: 26px;
  -webkit-appearance: none;
  appearance: none;
}
.filter-select-ic:has(.filter-select option:checked:not([value=""])) > svg { color: var(--accent-text); }
.fchip-x {
  display: none;
  position: absolute;
  right: 5px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 16px;
  height: 16px;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: none;
  color: var(--accent-text);
  font-size: 11px;
  line-height: 1;
  cursor: pointer;
}
.fchip-x:hover { background: var(--accent-fill); color: #fff; }
.filter-select-ic:has(.filter-select option:checked:not([value=""])) > .fchip-x { display: inline-flex; }

.filter-pills {
  display: inline-flex;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 2px;
  gap: 1px;
}

.filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: transparent;
  border: none;
  color: var(--muted);
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}
.filter-pill svg { width: 13px; height: 13px; }
.filter-pill:hover { color: var(--text); }
.filter-pill.active {
  background: var(--surface);
  color: var(--accent-text);
  font-weight: var(--fw-semibold);
  box-shadow: var(--shadow-sm);
}

.filter-clear {
  background: none;
  border: none;
  color: var(--muted);
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.15s;
  white-space: nowrap;
}
.filter-clear:hover { color: var(--danger); }

/* ── Sortable column headers ────────────────────── */
.sortable-th {
  cursor: pointer;
  user-select: none;
  transition: color var(--dur) var(--ease);
}
.sortable-th:hover { color: var(--text-2); }
.sortable-th.sorted { color: var(--text); }
.sort-arrow {
  font-size: var(--t-10);
  margin-left: 5px;
  vertical-align: middle;
  color: var(--text-faint);
}
.sortable-th.sorted .sort-arrow { color: var(--accent-text); }

/* ── Export page ────────────────────────────────── */
.export-serials {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.export-form {
  margin-bottom: 24px;
}

.export-time-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.export-columns {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 8px;
}

.export-presets {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.export-col-group {
  margin-top: 14px;
}
.export-col-group:first-of-type { margin-top: 0; }

.export-col-group-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 6px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-faint);
}
.export-col-group-head strong {
  color: var(--text);
  font-weight: 600;
}

.link-btn {
  background: none;
  border: none;
  padding: 0;
  font-size: 12px;
  color: var(--accent-text);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.link-btn:hover { color: var(--accent-h); }

.serial-chip-hidden { display: none; }

.export-submit-bar {
  position: sticky;
  bottom: 0;
  margin-top: 20px;
  padding: 14px 20px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  box-shadow: var(--shadow-lg);
}
.export-submit-summary { flex: 1 1 auto; min-width: 0; }
.export-submit-bar .btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }

/* ── Send Picker ─────────────────────────────────── */
.send-picker { max-width: 480px; }

.send-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 10px;
}
.send-tab {
  padding: 6px 16px;
  font-size: 13px;
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.send-tab.active {
  color: var(--fg);
  border-bottom-color: var(--accent);
}

.send-search {
  margin-bottom: 8px;
  font-size: 13px;
}

.send-list-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.send-check-all {
  font-size: 12px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.send-list {
  max-height: 220px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.send-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px;
  cursor: pointer;
  border-bottom: 1px solid var(--border);
}
.send-item:last-child { border-bottom: none; }
.send-item:hover { background: var(--bg); }

.send-item input[type="checkbox"] {
  flex-shrink: 0;
  accent-color: var(--accent);
}

.send-count { font-size: 12px; }

/* ── OTA Progress ────────────────────────────────── */
/* Deployment "Device Status" rollup: padded body that aligns with the card
   header (20px) and a divider before the targets table. */
.ota-rollup {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}
.ota-rollup-summary {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
/* Align the targets table cells with the header/rollup (cards use 20px). */
#deployment-targets .table thead th,
#deployment-targets .table tbody td { padding-left: 20px; padding-right: 20px; }

.ota-progress-panel {
  padding: 8px 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-2);
  margin: 6px 0 2px;
  max-width: 300px;
}

.ota-progress-bar {
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 4px;
}

.ota-progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 3px;
  transition: width 0.3s ease;
}

/* ── Density Toggle ─────────────────────────────── */
.density-toggle {
  padding: 5px 8px !important;
  border: 1px solid var(--border) !important;
  background: var(--surface) !important;
  border-radius: var(--r-2);
  color: var(--muted);
}
.density-toggle:hover { color: var(--text); border-color: var(--rule-2) !important; }
.density-toggle.active { color: var(--accent-text); border-color: var(--accent-edge) !important; box-shadow: none; }
.compact .table td,
.compact .table th { padding: 5px var(--s-3); font-size: var(--t-11); line-height: 1.3; }
.compact .battery-wrap { height: 14px; }
.compact .battery-track { height: 8px; }
.compact .battery-label { font-size: 11px; }
.compact .ws-dot { width: 6px; height: 6px; }
.compact .status-badge { font-size: 10px; padding: 1px 6px; }

/* ── Row Highlighting ──────────────────────────── */
.row-alert-battery { box-shadow: inset 3px 0 0 var(--danger); }
.row-alert-temp { box-shadow: inset 3px 0 0 var(--warn); }
.row-alert-battery.row-alert-temp { box-shadow: inset 3px 0 0 var(--danger), inset 6px 0 0 var(--warn); }

/* ── Last Synced ───────────────────────────────── */
.last-synced { font-size: 10px; color: var(--muted); opacity: 0.6; margin-left: 8px; }

/* Region-level loading indicator — DISABLED. htmx adds .htmx-request to the element
 * making a request, so every live-refresh region (#apps-live, #device-vitals-live,
 * #device-queue, …) and every submitting form got a 35%-opacity overlay for the
 * duration of the request. With the morph engine updating content smoothly in place,
 * that dim-then-restore was the "flash": the pane dimmed and redrew on every telemetry
 * tick / install / uninstall instead of just the changed text updating. The morph gives
 * the visual feedback now; the top progress bar covers real page navigations. Buttons
 * keep their own .htmx-request opacity cue (see .btn-*.htmx-request). */
.htmx-request::after,
.htmx-request.htmx-indicator-row::after { content: none; }


/* ── Form Submit Feedback ─────────────────────── */
/* One spinner per busy button: the .is-busy one (motion.css), which every form post and
   htmx request gets. This class only dims and guards against a second press; it used to
   draw its own spinner too, which put one on each side of the label. */
.btn-submitting { opacity: 0.72; pointer-events: none; position: relative; }
@keyframes btn-spin { to { transform: rotate(360deg); } }

.shell-spinner {
  display: inline-block;
  width: 10px;
  height: 10px;
  border: 2px solid var(--accent);
  border-right-color: transparent;
  border-radius: 50%;
  animation: btn-spin 0.7s linear infinite;
}

/* ── Logcat Line Colors ───────────────────────── */
/* Light-legible defaults; bright variants for the dark terminal below. */
.logcat-terminal .log-E { color: #c0392b; }
.logcat-terminal .log-W { color: #9a6d00; }
.logcat-terminal .log-I { color: #2563c9; }
.logcat-terminal .log-D { color: #1e8a4c; }
.logcat-terminal .log-V { color: #6b7280; }
html[data-theme="dark"] .logcat-terminal .log-E { color: #e05656; }
html[data-theme="dark"] .logcat-terminal .log-W { color: #e6a836; }
html[data-theme="dark"] .logcat-terminal .log-I { color: #6aa9ff; }
html[data-theme="dark"] .logcat-terminal .log-D { color: #59c97a; }
html[data-theme="dark"] .logcat-terminal .log-V { color: #8a92a0; }

/* ── Logcat Pause Button ──────────────────────── */
.logcat-pause { display: flex; align-items: center; gap: 6px; }
.logcat-pause .btn-outline { font-size: 12px; padding: 3px 10px; }
.logcat-pause .btn-outline[aria-pressed="true"] {
  border-color: var(--warn);
  color: var(--warn);
}

/* ── Double-Lock Modal ────────────────────────── */
.confirm-input { font-size: 18px; text-align: center; letter-spacing: 2px; width: 120px; }
.confirm-hint { font-size: 12px; color: var(--muted); margin-top: 4px; }
.confirm-count { font-size: 24px; font-weight: 700; color: var(--danger); }
.confirm-check {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--text);
}
.poll-stamp {
  margin-left: auto;
  font-size: 11px;
  color: var(--muted);
  opacity: 0.7;
}

/* ── Toast — top banner, liquid glass (replaces the old bottom-right corner
   stack; see /demo/toasts direction C for the design this was tuned against) ── */
.toast-stack {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 500;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: calc(100% - 40px);
  max-width: 420px;
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 14px 9px 10px;
  background: rgba(255, 255, 255, .45);
  -webkit-backdrop-filter: blur(4px) saturate(180%);
  backdrop-filter: blur(4px) saturate(180%);
  /* Own compositing layer — without it, a layout change anywhere near another
     backdrop-filter surface on the page (e.g. a dropdown's content swapping
     in) can force every glass surface to drop and redraw its blur together,
     visible as the whole navbar/dock flashing, not just what actually changed. */
  will-change: backdrop-filter;
  border: 1px solid rgba(255, 255, 255, .29);
  border-radius: 20px;
  box-shadow: 0 14px 36px rgba(0, 0, 0, .21), inset 0 1px 0 rgba(255, 255, 255, .5);
  color: var(--text);
  font-size: 12.5px;
  font-weight: 550;
  line-height: 1.45;
  pointer-events: none;
  opacity: 0;
  transform: translateY(-14px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}
html[data-theme="dark"] .toast { background: rgba(20, 18, 17, .45); border-color: rgba(255, 255, 255, .12); }
.toast.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.toast-ic {
  flex: none; width: 26px; height: 26px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface2); color: var(--muted);
}
.toast-ic svg { width: 14px; height: 14px; display: block; }
.toast-msg { flex: 1; min-width: 0; word-break: break-word; }
.toast-x {
  flex: none; width: 20px; height: 20px; margin: 0;
  border: none; border-radius: 5px; background: none; color: var(--text-faint);
  opacity: .8; cursor: pointer; line-height: 1; font-size: 15px;
  transition: opacity .12s, background .12s;
}
.toast-x:hover { opacity: 1; background: rgba(0, 0, 0, .08); }
.toast.success .toast-ic { background: var(--ok-bg); color: var(--ok); }
.toast.error   .toast-ic { background: var(--danger-bg); color: var(--danger); }
.toast.warn    .toast-ic { background: var(--warn-bg); color: var(--warn); }
.toast.info    .toast-ic { background: var(--info-bg); color: var(--info); }

/* ── Responsive ──────────────────────────────────── */
@media (max-width: 1024px) {
  .stats-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
  .command-composer-grid { grid-template-columns: 1fr; }
  .type-grid { grid-template-columns: repeat(2, 1fr); }
  .container { padding: var(--s-5); }
}

@media (max-width: 900px) {
  .filter-bar { flex-wrap: wrap; }
}

@media (max-width: 640px) {
  .container { padding: var(--s-4); }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .type-grid { grid-template-columns: 1fr; }
  .ov-greet { flex-wrap: wrap; }
  .composer-footer { flex-direction: column; align-items: flex-start; }
  .choice-grid { grid-template-columns: 1fr; }
  .device-actions-header { flex-direction: column; }
  .device-action-inline { flex-direction: column; align-items: stretch; }
  .danger-zone { flex-direction: column; }
  .target-pills { flex-wrap: wrap; }
  .modal-box { max-height: 92vh; }
  /* Phones used to DELETE the fourth column of every .table — "Last seen" on the
     device table, something different on each of the others, with no indication
     anything had been removed. A technician standing in front of a device is
     exactly the phone case, and "last seen" is exactly what they came for.
     Every column stays; the table scrolls sideways inside its own card instead,
     which is already how wide tables behave at the tablet breakpoint below. */
  .card:has(> .table), .card:has(> table),
  .ovx-card:has(> .table), .ovx-card:has(> table),
  .cc-card:has(> .table), .cc-card:has(> table) {
    overflow-x: auto; -webkit-overflow-scrolling: touch;
  }
  .table { min-width: 460px; }
}

/* ── New Command Builder ──────────────────────────────────── */
.cmd-builder {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-4);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  margin-bottom: var(--s-4);
  position: relative;
}

.cmd-builder-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
}
.cmd-builder-head .head-title {
  font-size: 15px;
  font-weight: var(--fw-semibold);
  color: var(--text);
}

/* Live command preview strip — kept in DOM for JS, hidden in the clean UI */
.cmd-preview { display: none; }

.cmd-builder-body {
  padding: var(--s-4);
}

/* Type cards — match device-action-tile pattern */
.type-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--s-2);
  margin-bottom: var(--s-4);
}
.type-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  padding: var(--s-3) var(--s-4);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-2);
  text-align: left;
  cursor: pointer;
  transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease);
}
.type-card:hover {
  border-color: var(--rule-2);
  background: var(--surface2);
}
.type-card.is-active {
  border-color: var(--accent-edge);
  background: var(--accent-soft);
}
.type-card.is-active::before {
  content: "";
  position: absolute;
  top: 0; left: 0; bottom: 0;
  width: 2px;
  background: var(--accent);
}

.type-card .type-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  color: var(--text-2);
}
.type-card.is-active .type-icon { color: var(--accent-text); }
.type-card .type-icon svg { width: 14px; height: 14px; stroke-width: 1.6; fill: none; stroke: currentColor; }
.type-card .type-name {
  font-size: var(--t-13);
  font-weight: var(--fw-semibold);
  color: var(--text);
  text-transform: none;
  letter-spacing: 0;
}
.type-card .type-desc {
  font-size: var(--t-11);
  color: var(--muted);
  line-height: var(--leading-normal);
}

/* Payload zone — solid panel, not dashed */
.payload-zone {
  border: 1px solid var(--border);
  border-radius: var(--r-2);
  padding: var(--s-3) var(--s-4);
  margin-bottom: var(--s-4);
  background: var(--surface2);
  position: relative;
  min-height: 56px;
}
.payload-zone-label {
  font-size: var(--t-11);
  font-weight: var(--fw-semibold);
  letter-spacing: .02em;
  color: var(--muted);
  display: block;
  margin-bottom: var(--s-2);
}
.payload-zone .payload-section { display: none; }
.payload-zone .payload-section.is-active { display: block; }
.payload-zone .payload-empty {
  font-size: var(--t-12);
  color: var(--muted);
}

/* Target selector — segmented, matches .seg-btn radius */
.target-row {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  flex-wrap: wrap;
  margin-bottom: var(--s-3);
}
.target-row .target-label {
  font-size: var(--t-11);
  font-weight: var(--fw-semibold);
  letter-spacing: .02em;
  color: var(--muted);
}
.target-pills {
  display: inline-flex;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 2px;
  gap: 1px;
}
.target-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--muted);
  font-family: var(--font);
  font-size: var(--t-12);
  font-weight: var(--fw-medium);
  cursor: pointer;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}
.target-pill:hover { color: var(--text); }
.target-pill.is-active {
  background: var(--surface);
  color: var(--accent-text);
  font-weight: var(--fw-semibold);
  box-shadow: var(--shadow-sm);
}
.target-pill .pill-dot { display: none; }

.target-detail { display: none; margin-top: var(--s-2); }
.target-detail.is-active { display: block; }

/* Submit footer */
.cmd-builder-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
  padding: var(--s-3) var(--s-4);
  border-top: 1px solid var(--border);
  background: var(--surface);
}
.cmd-builder-foot .foot-meta {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  font-size: var(--t-12);
  color: var(--muted);
}
.cmd-builder-foot .foot-meta .meta-dot { display: none; }
.btn-send-cli {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  padding: 8px 14px;
  background: var(--accent-fill);
  color: var(--accent-ink);
  border: 1px solid var(--accent-fill);
  border-radius: var(--r-2);
  font-family: var(--font);
  font-size: var(--t-13);
  font-weight: var(--fw-semibold);
  cursor: pointer;
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.btn-send-cli:hover { background: var(--accent-fill-h); border-color: var(--accent-fill-h); }
.btn-send-cli .kbd {
  font-family: var(--mono);
  font-size: var(--t-10);
  font-weight: var(--fw-semibold);
  padding: 2px 6px;
  border-radius: var(--r-1);
  background: rgba(0,0,0,0.20);
  letter-spacing: .04em;
}

@media (max-width: 720px) {
  .type-grid { grid-template-columns: repeat(2, 1fr); }
  .cmd-builder-foot { flex-direction: column; align-items: stretch; }
}

/* ── Device detail (tabbed shell) ─────────────────── */
.device-detail { max-width: 1040px; margin: 0 auto; }

.dd-header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}
.dd-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  padding: 4px;
  border-radius: var(--r-2);
  flex: 0 0 auto;
  margin-top: 4px;
  transition: color var(--dur) var(--ease), background var(--dur) var(--ease);
}
.dd-close:hover { color: var(--text); background: var(--hover); }
.dd-avatar {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: linear-gradient(135deg, #1d2026, #2c313a);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: #cfd5de;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}
.dd-avatar svg { width: 22px; height: 22px; }
.dd-titlewrap { flex: 1 1 auto; min-width: 0; }
.dd-eyebrow {
  font-size: var(--t-12);
  color: var(--muted);
  margin-bottom: 3px;
  letter-spacing: .01em;
}
.dd-title {
  font-size: 22px;
  font-weight: var(--fw-semibold);
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin: 0;
}
.dd-header-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: var(--t-12);
  white-space: nowrap;
  flex: 0 0 auto;
  padding-top: 6px;
}
.dd-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  color: var(--muted);
  border: 1px solid var(--rule);
  border-radius: var(--r-2);
  background: transparent;
  cursor: pointer;
  transition: color var(--dur) var(--ease), background var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.dd-icon-btn:hover { color: var(--text); background: var(--hover); border-color: var(--rule-2); }

.dd-rule { border: none; border-top: 1px solid var(--border); margin: 18px 0 22px; }

/* Summary cards */
.dd-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
.dd-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-4);
  box-shadow: var(--shadow-sm);
  padding: 16px 18px;
}
.dd-card-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: var(--t-14);
  font-weight: var(--fw-semibold);
  margin-bottom: 12px;
}
.dd-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 5px 0;
  font-size: var(--t-13);
  border-top: 1px solid var(--border-soft);
}
.dd-row:first-of-type { border-top: none; }
.dd-row-label { color: var(--muted); }
.dd-row-val { color: var(--text); font-family: var(--mono); font-size: var(--t-12); font-weight: var(--fw-medium); text-align: right; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.dd-alert {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: var(--t-13);
  padding: 4px 0;
}
.dd-alert-dot { width: 8px; height: 8px; border-radius: 50%; flex: 0 0 auto; background: var(--muted); }
.dd-alert.ok     { color: var(--text-2); } .dd-alert.ok     .dd-alert-dot { background: var(--ok); box-shadow: 0 0 0 3px var(--ok-bg); }
.dd-alert.warn   { color: var(--warn); }   .dd-alert.warn   .dd-alert-dot { background: var(--warn); }
.dd-alert.danger { color: var(--danger); } .dd-alert.danger .dd-alert-dot { background: var(--danger); }

/* Tab bar */
.dd-tabs {
  display: inline-flex;
  gap: 3px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 4px;
  margin-bottom: 18px;
  max-width: 100%;
  overflow-x: auto;
}
.dd-tab {
  background: none;
  border: none;
  border-radius: 9px;
  padding: 8px 16px;
  font-family: var(--font);
  font-size: 13.5px;
  font-weight: var(--fw-semibold);
  color: var(--muted);
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: color var(--dur) var(--ease), background var(--dur) var(--ease);
}
.dd-tab:hover { color: var(--text); }
.dd-tab.active { color: var(--accent-text); background: var(--surface); box-shadow: var(--shadow-sm); }
.pill-beta {
  font-size: 10px;
  font-weight: var(--fw-semibold);
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--accent-text);
  background: var(--accent-soft);
  border: 1px solid var(--accent-edge);
  border-radius: 999px;
  padding: 1px 7px;
}
.dd-panel[hidden] { display: none; }

/* Device details — simple label/value rows inside a card surface */
.dd-details-card { padding: 6px 20px 10px; }
.dd-details {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  column-gap: 56px;
}
.dd-details .dd-drow {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 2px;
  font-size: var(--t-13);
  border-bottom: 1px solid var(--border-soft);
}
/* drop trailing dividers against the card edge (last row of each column) */
.dd-details .dd-drow:nth-last-child(-n+2) { border-bottom: none; }
@media (max-width: 720px) {
  .dd-details { grid-template-columns: 1fr; }
  .dd-details .dd-drow:nth-last-child(2) { border-bottom: 1px solid var(--border-soft); }
}

@media (max-width: 820px) {
  .dd-summary { grid-template-columns: 1fr; }
  .dd-header-meta { display: none; }
  .dd-title { font-size: 22px; }
}

/* Daily Report — live per-restaurant open-alert breakdown */
.rab:not(:empty) { margin-top: 16px; padding-top: 15px; border-top: 1px solid var(--border-soft); }
.rab-h { display: flex; align-items: baseline; gap: 10px; margin-bottom: 9px; }
.rab-t { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.rab-total { margin-left: auto; font-size: 12px; font-weight: 600; color: var(--muted); }
.rab-list { display: flex; flex-direction: column; gap: 1px; }
.rab-row { display: flex; align-items: center; gap: 12px; padding: 9px 11px; border-radius: 9px; text-decoration: none; color: inherit; transition: background .12s; }
.rab-row:hover { background: var(--surface2); color: inherit; }
.rab-name { font-weight: 600; font-size: 13.5px; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rab-pills { display: flex; gap: 6px; flex: none; }
.rab-pill { font-size: 11.5px; font-weight: 600; padding: 2px 9px; border-radius: 99px; white-space: nowrap; }
.rab-pill.crit { background: var(--danger-bg); color: var(--danger); }
.rab-pill.warn { background: var(--warn-bg); color: var(--warn); }
.rab-count { flex: none; min-width: 22px; text-align: right; font-weight: 750; font-variant-numeric: tabular-nums; font-size: 14px; }
.rab-more { display: inline-block; margin-top: 9px; font-size: 12.5px; font-weight: 600; color: var(--accent-text); }
.rab-empty { font-size: 13px; color: var(--muted); padding: 4px 2px; }

/* ════════════════════════════════════════════════════
   OVERVIEW PAGE (main1 "command deck" port)
   ════════════════════════════════════════════════════ */
.ov-greet { display: flex; align-items: baseline; gap: 14px; margin-bottom: 22px; }
.ov-greet .acts { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.ov-title { font-family: var(--font-display); font-size: 26px; font-weight: 600; letter-spacing: -0.01em; margin: 0; }
.ov-date { font-size: 13px; color: var(--text-faint); }
.ov-live { margin-left: auto; display: flex; align-items: center; gap: 7px; font-family: var(--mono);
  font-size: 11px; color: var(--ok); text-transform: uppercase; letter-spacing: 0.08em; }
.ov-live i { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px var(--ok-bg); }

.ov-hero { display: grid; grid-template-columns: 300px 1fr; gap: 22px; align-items: stretch; margin-bottom: 22px; }
.ov-pulse { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-4);
  padding: 24px; box-shadow: var(--shadow-sm); display: flex; flex-direction: column;
  justify-content: space-between; position: relative; overflow: hidden; }
.ov-pulse::after { content: ""; position: absolute; right: -50px; top: -50px; width: 170px; height: 170px;
  border-radius: 50%; background: radial-gradient(circle, var(--accent-soft), transparent 70%); }
.ov-pulse h2 { font-family: var(--font-display); font-size: 15px; font-weight: 600; margin: 0;
  color: var(--text-2); letter-spacing: 0.02em; }
.ov-score-row { display: flex; align-items: center; gap: 18px; margin: 14px 0 8px; }
.ov-ring { width: 104px; height: 104px; flex: none; }
.ov-ring-track { fill: none; stroke: var(--surface-3); stroke-width: 9; }
.ov-ring-val { fill: none; stroke: var(--accent); stroke-width: 9; stroke-linecap: round; }
.ov-ring-val.is-warn { stroke: var(--warn); }
.ov-ring-val.is-danger { stroke: var(--danger); }
.ov-score { font-family: var(--font-display); font-size: 44px; font-weight: 700; line-height: 1; letter-spacing: -0.02em; }
.ov-score-sub { font-size: 12.5px; color: var(--text-faint); margin-top: 6px; line-height: 1.45; }
.ov-verdict { font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 7px; color: var(--ok); }
.ov-verdict::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--ok);
  box-shadow: 0 0 0 4px var(--ok-bg); }
.ov-verdict.is-warn { color: var(--warn); }
.ov-verdict.is-warn::before { background: var(--warn); box-shadow: 0 0 0 4px var(--warn-bg); }
.ov-verdict.is-danger { color: var(--danger); }
.ov-verdict.is-danger::before { background: var(--danger); box-shadow: 0 0 0 4px var(--danger-bg); }

.ov-vitals { display: grid; grid-template-columns: repeat(4, 1fr); grid-template-rows: 1fr 1fr; gap: 14px; }
.ov-vital { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-4);
  padding: 15px 17px; box-shadow: var(--shadow-sm); cursor: pointer; position: relative;
  text-decoration: none; color: inherit; display: block;
  transition: transform var(--dur) var(--ease), border-color var(--dur) var(--ease); }
.ov-vital:hover { transform: translateY(-2px); border-color: var(--rule-2); }
.ov-vital.alerty { border-color: var(--danger-edge); }
.ov-vital .k { font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.07em;
  color: var(--text-faint); font-weight: var(--fw-semibold); }
.ov-vital .v { font-family: var(--font-display); font-size: 27px; font-weight: 600; margin-top: 4px; letter-spacing: -0.01em; }
.ov-vital .v.ok { color: var(--ok); }
.ov-vital .v.bad { color: var(--danger); }
.ov-vital .v.warn { color: var(--warn); }
.ov-vital .v.hot { color: var(--chart-temp); }
.ov-vital .d { font-size: 11.5px; color: var(--text-faint); margin-top: 2px; }
.ov-vital .spark { position: absolute; right: 14px; bottom: 13px; opacity: 0.85; }
.ov-vital .spark polyline { fill: none; stroke-width: 1.6; stroke: var(--muted); }
.ov-vital .spark .sp-ok { stroke: var(--ok); }
.ov-vital .spark .sp-bad { stroke: var(--danger); }
.ov-vital .spark .sp-warn { stroke: var(--warn); }
.ov-vital .spark .sp-hot { stroke: var(--chart-temp); }

.ov-strip { display: flex; align-items: center; gap: 14px;
  background: linear-gradient(90deg, var(--accent-soft), var(--surface) 60%);
  border: 1px solid var(--accent-edge); border-radius: 13px; padding: 13px 18px;
  margin-bottom: 22px; box-shadow: var(--shadow-sm); }
.ov-strip .ic { width: 34px; height: 34px; border-radius: 10px; background: var(--accent);
  display: flex; align-items: center; justify-content: center; flex: none; }
.ov-strip .ic svg { width: 17px; height: 17px; stroke: var(--accent-ink); fill: none;
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ov-strip .tx { font-size: 13.5px; color: var(--text-2); }
.ov-strip .tx b { color: var(--text); }
.ov-strip .go { margin-left: auto; font-size: 13px; font-weight: 600; color: var(--accent-text);
  text-decoration: none; white-space: nowrap; }
.ov-strip .go:hover { text-decoration: underline; }

.ov-cols { display: grid; grid-template-columns: 1.4fr 1fr; gap: 22px; align-items: start; }
.ov-side { display: flex; flex-direction: column; gap: 16px; }

.ov-qa { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 16px; }
.ov-qact { display: flex; flex-direction: column; gap: 9px; background: var(--bg);
  border: 1px solid var(--border); border-radius: 13px; padding: 15px 16px; cursor: pointer;
  text-decoration: none; color: inherit;
  transition: transform var(--dur) var(--ease), border-color var(--dur) var(--ease), background var(--dur) var(--ease); }
.ov-qact:hover { transform: translateY(-2px); border-color: var(--accent); background: var(--surface); }
.ov-qact .qi { width: 34px; height: 34px; border-radius: 10px; display: flex; align-items: center; justify-content: center; }
.ov-qact .qi svg { width: 17px; height: 17px; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.ov-qact .qi.c1 { background: var(--accent-soft); }   .ov-qact .qi.c1 svg { stroke: var(--accent); }
.ov-qact .qi.c2 { background: var(--info-bg); }       .ov-qact .qi.c2 svg { stroke: var(--info); }
.ov-qact .qi.c3 { background: var(--ok-bg); }         .ov-qact .qi.c3 svg { stroke: var(--ok); }
.ov-qact .qi.c4 { background: var(--warn-bg); }       .ov-qact .qi.c4 svg { stroke: var(--warn); }
.ov-qact .qt { font-size: 13.5px; font-weight: 600; }
.ov-qact .qd { font-size: 11.5px; color: var(--text-faint); line-height: 1.4; margin-top: -4px; }

.ov-ract { padding: 4px 18px 12px; }
.ov-ra { display: flex; align-items: center; gap: 10px; padding: 9px 0;
  border-bottom: 1px solid var(--border-soft); font-size: 12.5px; }
.ov-ra:last-child { border-bottom: 0; }
.ov-ra .who { font-weight: 600; color: var(--text-2); flex: none; }
.ov-ra .what { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ov-ra .what b { font-family: var(--mono); font-size: 11.5px; font-weight: 500; color: var(--text-2); }
.ov-ra .t { margin-left: auto; color: var(--text-faint); font-family: var(--mono); font-size: 11px; white-space: nowrap; }

.ov-alrs { padding: 4px 18px 12px; }
.ov-alr { display: flex; align-items: center; gap: 10px; padding: 9px 0;
  border-bottom: 1px solid var(--border-soft); font-size: 12.5px; }
.ov-alr:last-child { border-bottom: 0; }
.ov-alr .status-badge { flex: none; }
.ov-alr .sn { flex: none; font-size: 11.5px; }
.ov-alr .sum { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ov-alr .t { margin-left: auto; color: var(--text-faint); font-family: var(--mono); font-size: 11px; white-space: nowrap; }
.ov-alr-more { display: block; padding: 9px 0; font-size: 12.5px; font-weight: 600;
  color: var(--accent-text); text-decoration: none; }
.ov-alr-more:hover { text-decoration: underline; }
.ov-alrs-empty { display: flex; align-items: center; gap: 10px; padding: 18px;
  color: var(--muted); font-size: 13px; }
.ov-alrs-empty svg { width: 16px; height: 16px; flex: none; stroke: var(--ok); fill: none;
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ════════════════════════════════════════════════════════
   OVERVIEW · revamp (".ovx") — soft, rounded, card-forward
   dashboard. Self-contained; nothing outside the main page
   references these classes.
   ════════════════════════════════════════════════════════ */
.ovx {
  --ovx-r: 20px;          /* card radius */
  --ovx-pad: 20px;
  --ovx-lime: var(--accent);   /* interim: brand crimson, pending design pick */
  --ovx-lime-ink: var(--accent-ink);
  --ovx-green: var(--accent);  /* interim: brand crimson */
}
.ovx :is(.ovx-ico, .ovx-qact .qi, .ovx-strip .ic) svg,
.ovx .ovx-search svg, .ovx .ovx-empty svg, .ovx .ovx-bars-empty svg {
  fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round;
}

/* ── Greeting bar ── */
.ovx-top { display: flex; align-items: flex-end; gap: 18px; margin-bottom: 24px; flex-wrap: wrap; }
.ovx-hello h1 { font-family: var(--font); font-size: 28px; font-weight: 700;
  letter-spacing: -0.02em; line-height: 1.1; margin: 0; }
.ovx-hello p { font-size: 13.5px; color: var(--text-faint); margin: 6px 0 0; }
.ovx-tools { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.ovx-search { display: inline-flex; align-items: center; gap: 9px; height: 42px; padding: 0 14px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 999px;
  color: var(--muted); font: inherit; font-size: 13px; cursor: pointer; box-shadow: var(--shadow-sm);
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease); }
.ovx-search:hover { border-color: var(--rule-2); box-shadow: var(--shadow-md); }
.ovx-search svg { width: 16px; height: 16px; stroke: var(--muted); }
.ovx-search span { min-width: 110px; text-align: left; }
.ovx-search kbd { font-family: var(--mono); font-size: 10.5px; color: var(--text-faint);
  background: var(--bg); border: 1px solid var(--border); border-radius: 6px; padding: 2px 6px; }
.ovx-live { display: inline-flex; align-items: center; gap: 7px; font-family: var(--mono);
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.ovx-live i { width: 8px; height: 8px; border-radius: 50%; background: var(--ok);
  box-shadow: 0 0 0 4px var(--ok-bg); animation: ovx-pulse 2.2s var(--ease) infinite; }
@keyframes ovx-pulse { 0%,100% { box-shadow: 0 0 0 3px var(--ok-bg); } 50% { box-shadow: 0 0 0 6px transparent; } }

/* ── Layout grid ── */
.ovx-grid { display: grid; grid-template-columns: 1fr 320px; gap: 22px; align-items: start; }
.ovx-main { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.ovx-side { display: flex; flex-direction: column; gap: 18px; }
.ovx-sec { display: flex; align-items: baseline; justify-content: space-between; margin: 4px 2px -4px; }
.ovx-sec h2 { font-family: var(--font); font-size: 16px; font-weight: 700; margin: 0; letter-spacing: -0.01em; }
.ovx-sec a { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.ovx-sec a:hover { color: var(--ovx-green); }

/* ── Shared card shell ── */
.ovx-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--ovx-r);
  box-shadow: var(--shadow-sm); overflow: hidden; }
.ovx-ch { display: flex; align-items: center; justify-content: space-between; padding: 16px var(--ovx-pad) 0; }
.ovx-ch h3, .ovx-ch h2 { font-size: 14.5px; font-weight: 600; margin: 0; }
.ovx-ch a, .ovx-tag { font-size: 12px; font-weight: 600; color: var(--muted); }
.ovx-ch a:hover { color: var(--ovx-green); }
.ovx-tag { font-family: var(--mono); font-weight: 500; font-size: 11px; color: var(--text-faint); }

/* ── Pastel icon tiles ── */
.ovx-ico, .ovx-qact .qi { width: 40px; height: 40px; border-radius: 13px; flex: none;
  display: flex; align-items: center; justify-content: center; }
.ovx-ico svg, .ovx-qact .qi svg { width: 19px; height: 19px; }
.i-violet { background: rgba(124,58,237,0.12); } .i-violet svg { stroke: #7c3aed; }
.i-green  { background: var(--ok-bg); }          .i-green svg  { stroke: var(--ok); }
.i-rose   { background: var(--danger-bg); }      .i-rose svg   { stroke: var(--danger); }
.i-amber  { background: var(--warn-bg); }        .i-amber svg  { stroke: var(--warn); }
.i-blue   { background: var(--info-bg); }        .i-blue svg   { stroke: var(--info); }

/* ── Stat cards ── */
.ovx-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.ovx-stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--ovx-r);
  padding: var(--ovx-pad); display: flex; flex-direction: column; box-shadow: var(--shadow-sm);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease), border-color var(--dur) var(--ease); }
.ovx-stat:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--rule-2); }
.ovx-stat.alerty { border-color: var(--danger-edge); }
.ovx-stat-top { display: flex; align-items: center; gap: 13px; }
.ovx-stat .ovx-big { font-family: var(--font-display); font-size: 30px; font-weight: 600;
  letter-spacing: -0.02em; line-height: 1; margin: 0; color: var(--text); }
.ovx-big.ok { color: var(--ok); } .ovx-big.bad { color: var(--danger); } .ovx-big.warn { color: var(--warn); }
.ovx-stat .ovx-lbl { font-size: 13px; font-weight: 600; color: var(--text-2); margin-top: 6px; }
.ovx-stat .ovx-sub { font-size: 11.5px; color: var(--text-faint); margin-top: 2px; }

/* ── Attention strip ── */
.ovx-strip { display: flex; align-items: center; gap: 13px; padding: 13px 18px;
  background: var(--danger-bg); border: 1px solid var(--danger-edge); border-radius: var(--ovx-r); }
.ovx-strip .ic { width: 34px; height: 34px; border-radius: 11px; flex: none; background: var(--danger);
  display: flex; align-items: center; justify-content: center; }
.ovx-strip .ic svg { width: 17px; height: 17px; stroke: #fff; }
.ovx-strip .tx { font-size: 13px; color: var(--text-2); }
.ovx-strip .tx b { color: var(--text); }
.ovx-strip .go { margin-left: auto; font-size: 12.5px; font-weight: 700; color: var(--danger); white-space: nowrap; }
.ovx-strip:hover .go { text-decoration: underline; }

/* ── Activity + alerts two-up ── */
.ovx-two { display: grid; grid-template-columns: 1.25fr 1fr; gap: 18px; align-items: stretch; }
.ovx-activity, .ovx-alerts { display: flex; flex-direction: column; }
.ovx-bars { display: flex; align-items: flex-end; gap: 8px; padding: 18px var(--ovx-pad) 16px; flex: 1; min-height: 168px; }
.ovx-bar { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 9px; height: 100%; }
.ovx-bar .track { width: 100%; max-width: 30px; flex: 1; display: flex; align-items: flex-end;
  background: var(--bg); border-radius: 9px; }
.ovx-bar .fill { width: 100%; min-height: 6px; border-radius: 9px; background: var(--rule-2);
  position: relative; transition: filter var(--dur) var(--ease); animation: ovx-grow 0.6s var(--ease) backwards; transform-origin: bottom; }
.ovx-bar.cur .fill { background: var(--ovx-lime); }
.ovx-bar .cap { position: absolute; top: -22px; left: 50%; transform: translateX(-50%);
  font-family: var(--mono); font-size: 10.5px; font-weight: 600; color: var(--text); background: var(--surface);
  border: 1px solid var(--border); border-radius: 6px; padding: 1px 5px; opacity: 0;
  transition: opacity var(--dur) var(--ease); white-space: nowrap; box-shadow: var(--shadow-sm); }
.ovx-bar.cur .cap, .ovx-bar:hover .cap { opacity: 1; }
.ovx-bar .day { font-size: 11px; color: var(--text-faint); font-weight: 500; }
.ovx-bar.cur .day { color: var(--text-2); font-weight: 700; }
@keyframes ovx-grow { from { transform: scaleY(0); } to { transform: scaleY(1); } }
.ovx-bars-empty { margin: auto; color: var(--text-faint); font-size: 13px; }

.ovx-alist { padding: 10px var(--ovx-pad) 14px; display: flex; flex-direction: column; }
.ovx-al { display: flex; align-items: flex-start; gap: 11px; padding: 9px 0; border-bottom: 1px solid var(--border-soft); }
.ovx-al:last-child { border-bottom: 0; }
.ovx-al .dot { width: 9px; height: 9px; border-radius: 50%; margin-top: 4px; flex: none; background: var(--muted); }
.ovx-al .dot.danger { background: var(--danger); box-shadow: 0 0 0 3px var(--danger-bg); }
.ovx-al .dot.warn { background: var(--warn); box-shadow: 0 0 0 3px var(--warn-bg); }
.ovx-al .body { min-width: 0; }
.ovx-al .t1 { font-size: 13px; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ovx-al .t2 { font-size: 11.5px; color: var(--text-faint); margin-top: 2px; }
.ovx-al .t2 .mono { font-family: var(--mono); color: var(--muted); }
.ovx-al-more { display: block; padding-top: 10px; font-size: 12.5px; font-weight: 600; color: var(--ovx-green); }
.ovx-al-more:hover { text-decoration: underline; }
.ovx-empty { display: flex; align-items: center; gap: 10px; padding: 22px var(--ovx-pad); color: var(--muted); font-size: 13px; }
.ovx-empty svg { width: 17px; height: 17px; flex: none; stroke: var(--ok); }

/* ── Quick actions ── */
.ovx-qa { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.ovx-qact { background: var(--surface); border: 1px solid var(--border); border-radius: var(--ovx-r);
  padding: 18px; display: flex; flex-direction: column; gap: 11px; box-shadow: var(--shadow-sm);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease), border-color var(--dur) var(--ease); }
.ovx-qact:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--rule-2); }
.ovx-qact .qt { font-size: 13.5px; font-weight: 600; color: var(--text); }
.ovx-qact .qd { font-size: 11.5px; color: var(--text-faint); line-height: 1.4; margin-top: -6px; }

/* ── Fleet pulse (accent-tinted hero card) ── */
.ovx-pulse { position: relative; overflow: hidden; border-radius: var(--ovx-r); padding: 22px;
  background: color-mix(in srgb, var(--accent) 7%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--accent) 24%, var(--surface)); box-shadow: var(--shadow-sm); }
.ovx-pulse::after { content: ""; position: absolute; right: -55px; top: -55px; width: 150px; height: 150px;
  border-radius: 50%; background: radial-gradient(circle, var(--accent-2-soft), transparent 70%); pointer-events: none; }
.ovx-pulse-head { display: flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.12em; color: var(--muted); }
.ovx-pulse-head .d { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.ovx-ring-row { display: flex; align-items: center; gap: 16px; margin: 18px 0 14px; }
.ovx-ring { width: 96px; height: 96px; flex: none; }
.ovx-ring .trk { fill: none; stroke: color-mix(in srgb, var(--accent) 16%, var(--surface)); stroke-width: 9; }
.ovx-ring .val { fill: none; stroke: var(--accent); stroke-width: 9; stroke-linecap: round; }
.ovx-pulse.is-warn .val { stroke: var(--warn); }
.ovx-pulse.is-danger .val { stroke: var(--danger); }
.ovx-pulse.is-warn .ovx-pulse-head .d { background: var(--warn); }
.ovx-pulse.is-danger .ovx-pulse-head .d { background: var(--danger); }
.ovx-score b { font-family: var(--font-display); font-size: 46px; font-weight: 600; line-height: 1;
  letter-spacing: -0.02em; display: block; color: var(--text); }
.ovx-score span { font-size: 11.5px; color: var(--text-faint); line-height: 1.45; display: block; margin-top: 6px; }
.ovx-verdict { font-size: 13px; color: var(--text-2); line-height: 1.5; margin: 0 0 16px; }
.ovx-cta { display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  background: var(--brand-grad); color: #fff; font-size: 13px; font-weight: 700;
  padding: 11px 16px; border-radius: 999px; box-shadow: 0 6px 16px var(--accent-soft);
  transition: filter var(--dur) var(--ease), transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease); }
.ovx-cta:hover { filter: brightness(1.05); color: #fff; transform: translateY(-1px); box-shadow: 0 9px 22px var(--accent-edge); }

/* ── Snapshot tiles ── */
.ovx-snap-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 16px var(--ovx-pad) var(--ovx-pad); }
.ovx-snap-grid .snap { background: var(--bg); border: 1px solid var(--border-soft); border-radius: 13px;
  padding: 13px 14px; display: flex; flex-direction: column; gap: 2px;
  transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease); }
.ovx-snap-grid .snap:hover { border-color: var(--rule-2); background: var(--surface); }
.ovx-snap-grid .v { font-family: var(--font-display); font-size: 23px; font-weight: 600; line-height: 1; color: var(--text); }
.ovx-snap-grid .v.hot { color: var(--chart-temp); } .ovx-snap-grid .v.warn { color: var(--warn); }
.ovx-snap-grid .k { font-size: 11.5px; color: var(--text-faint); }

/* ── Recent activity ── */
.ovx-rlist { padding: 8px var(--ovx-pad) 14px; }
.ovx-r { display: flex; align-items: flex-start; gap: 11px; padding: 9px 0; border-bottom: 1px solid var(--border-soft); }
.ovx-r:last-child { border-bottom: 0; }
.ovx-r .av { width: 28px; height: 28px; border-radius: 50%; flex: none; display: flex; align-items: center;
  justify-content: center; background: var(--accent-soft); color: var(--accent-text); font-size: 12px;
  font-weight: 700; text-transform: uppercase; }
.ovx-r .body { min-width: 0; }
.ovx-r .t1 { font-size: 12.5px; color: var(--text-2); line-height: 1.4; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ovx-r .t1 b { color: var(--text); font-weight: 600; }
.ovx-r .t2 { font-size: 11px; color: var(--text-faint); margin-top: 1px; }
.ovx-r .t2 .mono { font-family: var(--mono); color: var(--muted); }

/* ── Entrance ── */
.ovx-top, .ovx-grid { animation: ov-rise 0.45s var(--ease) backwards; }
.ovx-grid { animation-delay: 0.08s; }

/* ── Responsive ── */
@media (max-width: 1100px) {
  .ovx-grid { grid-template-columns: 1fr; }
  .ovx-side { flex-direction: row; flex-wrap: wrap; }
  .ovx-side > * { flex: 1 1 240px; }
}
@media (max-width: 720px) {
  .ovx-stats, .ovx-qa { grid-template-columns: 1fr 1fr; }
  .ovx-two { grid-template-columns: 1fr; }
  .ovx-hello h1 { font-size: 25px; }
  .ovx-tools { width: 100%; }
  .ovx-search { flex: 1; }
}

@keyframes ov-rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.ov-hero, .ov-strip, .ov-cols { animation: ov-rise 0.45s var(--ease) backwards; }
.ov-strip { animation-delay: 0.08s; }
.ov-cols { animation-delay: 0.16s; }

/* Devices page reuses the overview vocabulary: a single-row vitals strip plus
   the same staggered entrance for the filter bar and table card. */
.dv-vitals { grid-template-rows: none; margin-bottom: 18px; animation: ov-rise 0.45s var(--ease) backwards; }
.dv-vitals .ov-vital:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.dv-rise-1 { animation: ov-rise 0.45s var(--ease) 0.08s backwards; }
.dv-rise-2 { animation: ov-rise 0.45s var(--ease) 0.16s backwards; }

/* Fleet-health vitals: five-up single row of the overview tiles. */
.hl-vitals { grid-template-columns: repeat(5, 1fr); grid-template-rows: none;
  margin-bottom: 18px; animation: ov-rise 0.45s var(--ease) backwards; }

/* Groups page: one card per cohort, same tile language as the overview vitals.
   The group name's ::after stretches over the card so the whole tile is the link;
   the delete form sits above it. */
.gp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 14px; }
.gp-card { position: relative; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-4); box-shadow: var(--shadow-sm); padding: 15px 17px;
  transition: transform var(--dur) var(--ease), border-color var(--dur) var(--ease); }
.gp-card:hover { transform: translateY(-2px); border-color: var(--rule-2); }
.gp-card.alerty { border-color: var(--danger-edge); }
.gp-top { display: flex; align-items: baseline; gap: 12px; }
.gp-name { font-family: var(--font-display); font-size: 17px; font-weight: 600;
  color: var(--text); text-decoration: none; overflow-wrap: anywhere; }
.gp-name::after { content: ""; position: absolute; inset: 0; }
.gp-score { margin-left: auto; font-family: var(--font-display); font-size: 27px;
  font-weight: 600; letter-spacing: -0.01em; flex: none; }
.gp-score.is-ok { color: var(--ok); }
.gp-score.is-warn { color: var(--warn); }
.gp-score.is-danger { color: var(--danger); }
.gp-score.is-empty { color: var(--text-faint); font-size: 20px; }
.gp-meta { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.gp-foot { display: flex; align-items: center; gap: 8px; font-size: 11.5px;
  color: var(--text-faint); margin-top: 10px; }
.gp-chip { font-family: var(--mono); font-size: 10px; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--ok); background: var(--ok-bg);
  border-radius: 5px; padding: 2px 7px; }
.gp-del { position: absolute; right: 12px; bottom: 12px; z-index: 1; opacity: 0;
  transition: opacity var(--dur) var(--ease); }
.gp-card:hover .gp-del, .gp-del:focus-within { opacity: 1; }

@media (max-width: 1100px) {
  .ov-hero { grid-template-columns: 1fr; }
  .ov-vitals { grid-template-columns: repeat(2, 1fr); }
  .ov-cols { grid-template-columns: 1fr; }
}

/* ── Alerts page ─────────────────────────────────────
 * Summary cards reuse the overview .ov-vital style; below: sticky control bar,
 * severity cells, row expansion. */
.alert-vitals {
  grid-template-columns: repeat(5, 1fr);
  grid-template-rows: none;
  margin: 14px 0 16px;
}
.alert-vitals .ov-vital .v.info { color: var(--info); }
.alert-vitals .ov-vital.is-active { border-color: var(--accent-edge); background: var(--accent-soft); }

/* Sticky control bar (search + grouped filters). */
.alert-controls {
  position: sticky;
  top: 0;
  z-index: 6;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  padding: 10px 0;
  margin-bottom: 14px;
  background: var(--bg);
  border-bottom: 1px solid var(--border-soft);
}
.alert-search {
  position: relative;
  display: flex;
  align-items: center;
  flex: 1 1 260px;
  min-width: 220px;
}
.alert-search .ui-icon { position: absolute; left: 10px; color: var(--text-faint); pointer-events: none; }
.alert-search .search-input { padding-left: 32px; }
.alert-filter-group { display: flex; align-items: center; gap: 8px; }
.alert-filter-label {
  font-size: var(--t-11);
  font-weight: var(--fw-medium);
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--text-faint);
}

/* On this page the sticky control bar owns the top edge; keep headers in flow. */
.alerts-table thead th { position: static; }
.alerts-table td { padding-top: 11px; padding-bottom: 11px; vertical-align: top; }
.alerts-table tbody tr.alert-row { cursor: default; }

/* Severity cell: icon + label, color-coded. */
.sev-cell { display: inline-flex; align-items: center; gap: 7px; font-weight: var(--fw-medium); text-transform: capitalize; }
.sev-cell .sev-icon { width: 16px; height: 16px; flex: 0 0 16px; }
.sev-cell .sev-icon svg { width: 16px; height: 16px; }
.sev-cell.sev-critical { color: var(--danger); }
.sev-cell.sev-warning  { color: var(--warn); }
.sev-cell.sev-info     { color: var(--info); }
.sev-text { font-size: var(--t-13); }

/* Occurrence multiplier badge. */
.occ-badge {
  display: inline-block;
  margin-left: 6px;
  padding: 0 6px;
  font-family: var(--mono);
  font-size: var(--t-11);
  font-weight: var(--fw-semibold);
  color: var(--warn);
  background: var(--warn-bg);
  border: 1px solid var(--warn-edge);
  border-radius: 999px;
  vertical-align: middle;
}

/* Expandable alert cell. */
.alert-expand-cell { cursor: pointer; }
.alert-caret {
  display: inline-block;
  color: var(--text-faint);
  font-size: 10px;
  margin-right: 5px;
  transition: transform var(--dur) var(--ease);
}
.alert-row.is-expanded .alert-caret { transform: rotate(90deg); }
.alert-summary { font-weight: var(--fw-medium); color: var(--text); }

/* Detail expansion row. */
.alert-detail-row > td { background: var(--surface2); padding: 0 16px; }
.alert-detail {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  padding: 12px 4px 14px 20px;
}
.alert-detail-item { display: flex; flex-direction: column; gap: 2px; }
.alert-detail-item.alert-detail-raw { flex-basis: 100%; }
.alert-detail-k {
  font-size: var(--t-11);
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--text-faint);
}
.alert-detail-v { font-size: var(--t-13); color: var(--text); }
.alert-detail-json {
  font-family: var(--mono);
  font-size: var(--t-12);
  color: var(--text-2);
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-2);
  padding: 6px 10px;
  display: block;
  white-space: pre-wrap;
  word-break: break-word;
}
/* Auto-captured crash logs shown inside an alert's detail row. */
.alert-logs { width: 100%; }
.alert-logs-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 11px; font-weight: 600; letter-spacing: .03em; text-transform: uppercase; color: var(--text-faint); margin-bottom: 6px; }
.alert-logs-acts { display: flex; gap: 6px; }
.lg-btn { font: inherit; font-size: 11px; font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--muted); background: var(--surface); border: 1px solid var(--border); border-radius: 7px; padding: 3px 9px; cursor: pointer; }
.lg-btn:hover { border-color: var(--accent-edge); color: var(--accent-text); }
.lg-btn:disabled { opacity: .6; cursor: default; }
.alert-logs-pre { max-height: 320px; overflow: auto; margin: 0; }

/* De-emphasized destructive text button (Clear all). */
.btn-link-danger {
  background: none;
  border: none;
  color: var(--muted);
  font-size: var(--t-12);
  cursor: pointer;
  padding: 3px 6px;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.btn-link-danger:hover { color: var(--danger); }

@media (max-width: 1100px) {
  .alert-stats { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 640px) {
  .alert-stats { grid-template-columns: repeat(2, 1fr); }
  .alert-controls { flex-direction: column; align-items: stretch; }
}

/* ── Fixed alerts indicator (top-right bell) ─────────
 * Replaces the sidebar Alerts link; keeps alerts reachable from every page. */
.alerts-indicator {
  position: fixed;
  top: 16px;
  right: 18px;
  z-index: 60;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--surface);
  color: var(--text-2);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease), color var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.alerts-indicator:hover { background: var(--surface2); border-color: var(--rule-2); transform: translateY(-1px); }
.alerts-indicator.active { border-color: var(--accent-edge); color: var(--accent-text); }
.alerts-indicator .ui-icon { width: 18px; height: 18px; }
.alerts-indicator .ui-icon svg { width: 18px; height: 18px; }
.alerts-indicator .nav-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  margin: 0;
  border: 2px solid var(--surface);
  height: 18px;
  min-width: 18px;
  border-radius: 9px;
}
/* ── Global top-right bar: alerts and account, shown on every page ── */
.topbar { position: fixed; top: 14px; right: 18px; z-index: 60; display: flex; align-items: center; gap: 10px; }
.topbar .alerts-indicator { position: static; }
@media (max-width: 1024px) {
  .topbar { top: 9px; right: 56px; }
}

/* ── Fleet tab strip (Devices / Restaurants / Groups unified surface) ── */
.fleet-tabs { display:flex; gap:4px; border-bottom:1px solid var(--border); margin-bottom:18px; }
.fleet-tab {
  display:flex; align-items:center; gap:8px;
  padding:9px 18px; margin-bottom:-1px;
  font-size:14px; font-weight:var(--fw-medium); color:var(--muted);
  text-decoration:none; border-bottom:2px solid transparent;
  transition:color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.fleet-tab:hover { color:var(--text-2); }
.fleet-tab.cur { color: var(--accent-text); border-bottom-color:var(--accent); }
.fleet-tab .pill.warn { background: var(--warn-bg); color: var(--warn); border-color: transparent; font-weight: 700; }
.fleet-tab .pill {
  font-family:var(--mono); font-size:var(--t-11);
  background:var(--surface2); color:var(--muted);
  border:1px solid var(--border); border-radius:999px; padding:0 7px; line-height:1.5;
}
.fleet-tab.cur .pill { color: var(--accent-text); border-color:var(--accent-edge); background:var(--accent-soft); }

/* ── Fleet Pulse status chip (on the dark hero card) ── */
.ovx-pulse-head .ovx-chip { margin-left: auto; font-size: 10.5px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.04em; padding: 3px 9px; border-radius: 999px; color: var(--text-2);
  background: var(--surface2); border: 1px solid var(--border); }
.ovx-pulse.is-warn .ovx-chip { color: var(--warn); background: var(--warn-bg); border-color: var(--warn-edge); }
.ovx-pulse.is-danger .ovx-chip { color: var(--danger); background: var(--danger-bg); border-color: var(--danger-edge); }

/* ════════════════════════════════════════════════════════
   FLEET page · filters (F1) — quick views + a Filters popover
   + active-filter chips, replacing the old inline filter row.
   ════════════════════════════════════════════════════════ */
.fleet-views { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.fleet-view { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 14px;
  border-radius: 999px; border: 1px solid var(--border); background: var(--surface);
  font: inherit; font-size: 13px; font-weight: 600; color: var(--text-2); cursor: pointer;
  transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease), color var(--dur) var(--ease); }
.fleet-view:hover { border-color: var(--rule-2); }
.fleet-view .n { font-family: var(--mono); font-size: 11px; color: var(--text-faint); }
.fleet-view.on { background: var(--accent-soft); border-color: var(--accent-edge); color: var(--accent-text); }
.fleet-view.on .n { color: var(--accent-text); }

.fleet-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 16px;
  position: relative; z-index: 40; }
.fleet-search { flex: 1; min-width: 220px; display: flex; align-items: center; gap: 9px; height: 40px;
  padding: 0 13px; background: var(--surface); border: 1px solid var(--border); border-radius: 11px; color: var(--muted); }
.fleet-search svg { width: 16px; height: 16px; flex: none; }
.fleet-search input { flex: 1; border: 0; background: none; outline: none; font: inherit; font-size: 13px; color: var(--text); }
/* The container shows the focus ring (:focus-within); suppress the input's own
   global focus ring so they don't stack into a double outline. */
.fleet-search input:focus, .fleet-search input:focus-visible { outline: none; box-shadow: none; }
.fleet-search:focus-within { border-color: var(--accent-edge); box-shadow: var(--ring); }

.fleet-fwrap { position: relative; }
.fleet-fbtn { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 11px; font: inherit;
  font-size: 13px; font-weight: 600; color: var(--text-2); cursor: pointer;
  transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease), color var(--dur) var(--ease); }
.fleet-fbtn:hover, .fleet-fbtn.open { border-color: var(--rule-2); }
.fleet-fbtn.has { color: var(--accent-text); border-color: var(--accent-edge); background: var(--accent-soft); }
.fleet-fbtn svg { width: 16px; height: 16px; }
.fleet-fbtn .cnt { display: inline-flex; align-items: center; justify-content: center; min-width: 18px;
  height: 18px; padding: 0 5px; border-radius: 9px; background: var(--accent-fill); color: #fff; font-size: 11px; font-weight: 700; }
.fleet-fbtn .cnt[hidden] { display: none; }

.fleet-iconbtn { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 11px; color: var(--text-2); cursor: pointer; }
.fleet-iconbtn:hover { border-color: var(--rule-2); }

.fleet-pop { position: absolute; top: calc(100% + 8px); right: 0; z-index: 60; width: 520px; max-width: 92vw;
  background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow-pop);
  padding: 18px; animation: ov-rise 0.16s var(--ease) backwards; }
.fleet-pop[hidden] { display: none; }
.fp-cap { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--text-faint); margin: 0 0 10px; }
.fp-cap:not(:first-child) { margin-top: 18px; }
/* minmax(0,1fr): a long option label must not widen a column past the popover */
.fp-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 11px; }
.fp-field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.fp-field span { font-size: 11.5px; color: var(--muted); font-weight: 600; }
.fp-field select { width: 100%; min-width: 0; height: 38px; padding: 0 10px; border: 1px solid var(--border); border-radius: 9px;
  background: var(--surface); font: inherit; font-size: 13px; color: var(--text); cursor: pointer; }
.fp-field select:focus { outline: none; border-color: var(--accent-edge); box-shadow: var(--ring); }
.fp-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 18px;
  padding-top: 14px; border-top: 1px solid var(--border-soft); }
.fp-clear { background: none; border: 0; font: inherit; font-size: 12.5px; font-weight: 600; color: var(--muted); cursor: pointer; }
.fp-clear:hover { color: var(--accent-text); }
.fp-done { font-size: 12.5px; padding: 8px 16px; }

.fleet-seg { display: inline-flex; border: 1px solid var(--border); border-radius: 9px; overflow: hidden; }
.fleet-seg button { padding: 8px 16px; border: 0; background: var(--surface); font: inherit; font-size: 12.5px;
  font-weight: 600; color: var(--text-2); cursor: pointer; }
.fleet-seg button + button { border-left: 1px solid var(--border); }
.fleet-seg button.on { background: var(--accent-soft); color: var(--accent-text); }

.fleet-chips { display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 13px 16px; margin: 0; border-bottom: 1px solid var(--border-soft); }
.fchip { display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 6px 0 11px;
  border-radius: 999px; background: var(--accent-soft); border: 1px solid var(--accent-edge);
  color: var(--accent-text); font-size: 12.5px; font-weight: 600; }
.fchip .k { opacity: .72; }
.fchip .x { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px;
  border: 0; border-radius: 50%; background: color-mix(in srgb, var(--accent) 16%, transparent);
  color: var(--accent-text); font-size: 13px; line-height: 1; cursor: pointer; }
.fchip .x:hover { background: color-mix(in srgb, var(--accent) 30%, transparent); }
.fchip-clear { background: none; border: 0; font: inherit; font-size: 12.5px; font-weight: 600; color: var(--muted); cursor: pointer; }
.fchip-clear:hover { color: var(--accent-text); }

@media (max-width: 680px) {
  .fp-grid { grid-template-columns: 1fr; }
  .fleet-pop { width: 340px; }
}

/* ════════════════════════════════════════════════════════
   FLEET page · master–detail (L-A) — collections rail + roster
   ════════════════════════════════════════════════════════ */
.fleet-md { display: grid; grid-template-columns: 302px minmax(0, 1fr); gap: 20px; align-items: start; }
.fleet-rail { position: sticky; top: 16px; background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; padding: 10px 8px; max-height: calc(100vh - 32px); overflow-y: auto; }
.fleet-rail-cap { display: flex; align-items: center; gap: 6px; margin: 15px 8px 5px; font-size: 10px;
  font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--text-faint); }
.fleet-rail-cap:first-child { margin-top: 4px; }
.fleet-rail-item[hidden] { display: none; }
/* Rail search (S2, 10 Nov 2026; rail-search.js). Under the tabs on Fleet; elsewhere on top, where
   it stays put while the rail scrolls. */
.fleet-rail > .rail-find { position: sticky; top: -10px; z-index: 2; margin: -10px -8px 0; padding: 10px 8px 8px; background: var(--surface); }
.fleet-rail > .rail-tabs + .rail-find, .fleet-rail > .ph-rail-btn + .rail-find { position: static; margin: 0; padding: 0 0 8px; background: none; }
.rail-find + .rail-none + .fleet-rail-cap { margin-top: 4px; }
.rail-find-box { display: flex; align-items: center; gap: 7px; height: 34px; padding: 0 10px; background: var(--bg); border: 1px solid var(--border); border-radius: 10px; color: var(--muted); }
.rail-find-box:focus-within { border-color: var(--accent-edge); box-shadow: var(--ring); }
.rail-find-box svg { width: 14px; height: 14px; flex: none; }
.rail-find-box input { flex: 1; min-width: 0; height: auto; padding: 0; border: 0; background: none; outline: none; box-shadow: none; font: inherit; font-size: 12.5px; color: var(--text); }
.rail-find-box input:focus, .rail-find-box input:focus-visible { outline: none; box-shadow: none; }
.rail-find-box input::-webkit-search-cancel-button { display: none; }
.rail-find-x { flex: none; width: 18px; height: 18px; padding: 0; border: 0; border-radius: 50%; background: var(--hover); color: var(--text-2); font-size: 12px; line-height: 1; cursor: pointer; }
.rail-find-x[hidden] { display: none; }
.fleet-rail .rail-out { display: none !important; }
.fleet-rail.rail-q .fleet-rail-empty { display: none; }
.rail-none { padding: 12px 9px; font-size: 12.5px; line-height: 1.5; color: var(--muted); overflow-wrap: anywhere; }
.rail-none[hidden] { display: none; }
.rail-none button { display: block; margin-top: 6px; padding: 0; border: 0; background: none; font: inherit; font-weight: 600; color: var(--accent-text); cursor: pointer; }
::highlight(rail-hit) { background-color: var(--accent-soft); color: var(--accent-text); }
.fleet-rail-cap a:first-child { color: var(--text-faint); }
.fleet-rail-cap a:first-child:hover, .fleet-rail-cap a:first-child.on { color: var(--accent-text); }
.fleet-rail-cap .add { margin-left: auto; width: 18px; height: 18px; display: inline-flex; align-items: center;
  justify-content: center; border-radius: 6px; font-size: 15px; line-height: 1; color: var(--muted); }
.fleet-rail-cap .add:hover { background: var(--accent-soft); color: var(--accent-text); }
.fleet-rail-item { display: flex; align-items: center; gap: 0; border-radius: 9px; font-size: 13px;
  color: var(--text-2); text-decoration: none; }
a.fleet-rail-item { gap: 9px; padding: 8px 9px; }
.fleet-rail-item:hover { background: var(--hover); }
.fleet-rail-item.on { background: var(--accent-soft); color: var(--accent-text); }
.fleet-rail-item .nm { font-weight: 600; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fleet-rail-item .ct { font-family: var(--mono); font-size: 11px; color: var(--text-faint); flex: none; padding-right: 9px; min-width: calc(3ch + 9px); text-align: right; } /* fixed width: the locks and arrows before it line up */
.fleet-rail-item .dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
/* collection rows: a filter link (.ri-main) + an always-visible "→" detail link
   (.ri-go). The arrow stays faded so it reads as "open this collection's page" at a
   glance (it used to be hover-only, which hid that the row was openable), and brightens
   + nudges right on hover. */
.fleet-rail-item .ri-main { display: flex; align-items: center; gap: 9px; flex: 1; min-width: 0;
  padding: 8px 0 8px 9px; color: inherit; text-decoration: none; }
.fleet-rail-item .ri-go { opacity: .45; width: 24px; height: 30px; display: inline-flex; align-items: center;
  justify-content: center; color: var(--muted); text-decoration: none; flex: none;
  transition: opacity .12s, transform .12s, color .12s; }
.fleet-rail-item:hover .ri-go { opacity: 1; transform: translateX(2px); }
.fleet-rail-item .ri-go:hover { color: var(--accent-text); opacity: 1; }
.fleet-rail-item.on, .fleet-rail-item.on .ri-main, .fleet-rail-item.on .nm, .fleet-rail-item.on .ct { color: var(--accent-text); }
.fleet-rail-item .dot.ok { background: var(--ok); }
.fleet-rail-item .dot.warn { background: var(--warn); }
.fleet-rail-item .dot.bad { background: var(--danger); }
.fleet-rail-item .dot.muted { background: var(--text-faint); }

.fleet-rail-empty { padding: 5px 9px 6px; font-size: 12px; color: var(--text-faint); }
.fleet-rail-empty a { font-weight: 600; color: var(--muted); }
.fleet-rail-empty a:hover { color: var(--accent-text); }

.fleet-roster { min-width: 0; }
.fleet-pane-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.fleet-pane-head .t { font-size: 17px; font-weight: 700; }
.fleet-pane-head .c { font-size: 13px; color: var(--muted); }

/* Rail section captions rendered as pills — they are section buttons/links. */
.fleet-rail-cap > a:first-child, .fleet-rail-cap > span:first-child {
  display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px;
  background: var(--hover); border: 1px solid var(--border-soft); color: var(--muted);
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em;
  text-decoration: none; line-height: 1.5; transition: background .12s, color .12s, border-color .12s; }
.fleet-rail-cap > a:first-child:hover, .fleet-rail-cap > a:first-child.on {
  background: var(--accent-soft); border-color: var(--accent-soft); color: var(--accent-text); }

/* Collection toolbar (rename / delete / manage the active group·venue·release). */
.coll-tools { display: inline-flex; align-items: center; gap: 4px; }
.ct-btn { display: inline-flex; align-items: center; justify-content: center; gap: 4px;
  height: 26px; min-width: 26px; padding: 0 8px; border-radius: 7px; border: 1px solid var(--border-soft);
  background: var(--surface); color: var(--muted); font-size: 12px; font-weight: 600; cursor: pointer;
  text-decoration: none; transition: background .12s, color .12s, border-color .12s; }
.ct-btn:hover { background: var(--hover); color: var(--accent-text); border-color: var(--border); }
.ct-btn.danger:hover { background: var(--danger-soft, rgba(216,39,71,.12)); color: var(--danger); border-color: var(--danger); }

/* Group/venue kebab menu — reuses the top-bar .nbar-pop/.nbar-mi look, positioned
   under the toolbar kebab instead of the app bar. */
.coll-menu-wrap { position: relative; }
.coll-menu { left: 0; right: auto; top: calc(100% + 6px); width: 208px; }
.coll-menu .nbar-mi { font-size: 12.5px; padding: 8px 10px; }

/* Inline rename — replaces the roster title in place; see collRenameOpen/Close. */
.coll-rename { display: inline-flex; align-items: center; gap: 6px; }
.coll-rename input[type=text] { height: 30px; font-size: 13px; width: 220px; padding: 0 10px;
  border-radius: 7px; border: 1px solid var(--border); background: var(--surface); color: var(--text); }

/* Push-page target rail — single-select scope chips (All / restaurants / groups),
   mirroring the Actions target picker. */
.push-rail { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.push-rail .pr-src { width: 100%; font-size: 10.5px; font-weight: 700; letter-spacing: .05em;
  text-transform: uppercase; color: var(--text-faint); margin: 9px 0 1px; }
.pr-item { display: inline-flex; align-items: center; gap: 7px; padding: 5px 11px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text-2, var(--muted));
  font-size: 12.5px; font-weight: 600; cursor: pointer; transition: background .12s, color .12s, border-color .12s; }
.pr-item:hover { background: var(--hover); }
.pr-item.on { background: var(--accent-soft); border-color: var(--accent-soft); color: var(--accent-text); }
.pr-item .dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.pr-item .dot.ok { background: var(--ok); }
.pr-item .dot.muted { background: var(--text-faint); }
.pr-item .ct { font-family: var(--mono); font-size: 11px; color: var(--text-faint); }
.pr-item.on .ct { color: var(--accent-text); }

@media (max-width: 1024px) {
  .fleet-md { grid-template-columns: 1fr; }
  .fleet-rail { position: static; max-height: none; }
}

/* ── Fleet collections grid + detail (in-shell, Option A) ── */
.cl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.cl-card { border: 1px solid var(--border); border-radius: 14px; padding: 15px; background: var(--surface);
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease); }
/* No hover lift on a whole list card (17 Nov 2026, UI review: "not needed"). */
.cl-card.alerty { border-color: var(--danger-edge); }
.cl-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.cl-name { font-weight: 700; font-size: 14.5px; color: var(--text); }
.cl-name:hover { color: var(--accent-text); }
.cl-score { font-family: var(--mono); font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 7px; flex: none; }
.cl-score.ok { background: var(--ok-bg); color: var(--ok); }
.cl-score.warn { background: var(--warn-bg); color: var(--warn); }
.cl-score.bad { background: var(--danger-bg); color: var(--danger); }
.cl-score.is-empty { background: var(--surface2); color: var(--text-faint); }
/* motion: the score as a ring — the conic fill is the score itself (motion.css .m-ring).
   Colour follows the same ok / warn / bad bands as the pill it replaces. */
.cl-score.m-ring { padding: 0; width: 34px; height: 34px; border-radius: 50%; display: inline-grid; place-items: center; }
.cl-score.m-ring > span { width: 26px; height: 26px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; font-size: 11px; }
.cl-score.m-ring.ok { background: conic-gradient(var(--ok) var(--p), var(--surface2) 0); }
.cl-score.m-ring.warn { background: conic-gradient(var(--warn) var(--p), var(--surface2) 0); }
.cl-score.m-ring.bad { background: conic-gradient(var(--danger) var(--p), var(--surface2) 0); }
.cl-meta { font-size: 12.5px; color: var(--muted); margin-top: 10px; }
.cl-meta .danger { color: var(--danger); }
.cl-foot { display: flex; align-items: center; gap: 14px; margin-top: 13px; padding-top: 11px;
  border-top: 1px solid var(--border-soft); font-size: 12.5px; font-weight: 600; }
.cl-foot a { color: var(--muted); }
.cl-foot a:hover { color: var(--accent-text); }
.cl-delform { margin-left: auto; }
.cl-del { background: none; border: 0; font: inherit; font-size: 12.5px; font-weight: 600; color: var(--danger); cursor: pointer; padding: 0; }
.cl-del:hover { text-decoration: underline; }

.dt-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.dt-head .dt-name { font-size: 19px; font-weight: 700; }
.dt-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 16px; }
.dt-stat { border: 1px solid var(--border); border-radius: 12px; padding: 12px 15px; background: var(--surface); }
.dt-stat .v { font-size: 22px; font-weight: 700; }
.dt-stat .k { font-size: 11.5px; color: var(--text-faint); margin-top: 2px; }

/* ════════════════════════════════════════════════════════
   FLEET · device list as cards (C2 row cards) + sort control
   ════════════════════════════════════════════════════════ */
/* Scroll the roster horizontally instead of clipping it: the .card wrapper sets
   overflow:hidden, and the columns have min-widths, so at ~320px / 400% zoom the
   right-hand columns were cut off (data loss). overflow-x:auto keeps them reachable
   (WCAG 1.4.10); overflow-y stays hidden so the card's rounded corners are preserved. */
#device-table-container { container-type: inline-size; overflow-x: auto; }
.dl-list { display: flex; flex-direction: column; }
/* Column-count control. The whole segment hides when there's no room for >1
   column; the "3" option appears only when there's room for three. */
.cols-seg { display: none; margin-left: auto; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.cols-seg button { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 28px;
  border: 0; background: var(--surface); color: var(--muted); cursor: pointer; }
.cols-seg button + button { border-left: 1px solid var(--border); }
.cols-seg button:hover { color: var(--text-2); background: var(--hover); }
.cols-seg button.on { background: var(--accent-soft); color: var(--accent-text); }
.cols-seg button svg { width: 15px; height: 15px; }
.cols-seg [data-cols="3"] { display: none; }
/* Stat-block rows: every card is the same grid, so identity, each vital, status
   and actions sit at the same x on every row whatever a device reports. The vitals
   are labelled blocks (small caps label over value); a missing reading is "—". */
.dl-card { display: grid; align-items: center; column-gap: 16px; padding: 12px 18px;
  grid-template-columns: 18px minmax(0, 1fr) 124px auto;
  grid-template-areas: "cb lead stats act";
  border-bottom: 1px solid var(--border-soft); background: var(--surface); cursor: pointer;
  transition: background var(--dur) var(--ease); }
.dl-card:first-of-type { border-top: 1px solid var(--border-soft); }
.dl-card:hover { background: var(--hover); }
.dl-card.row-selected { background: var(--accent-soft); box-shadow: inset 2px 0 0 var(--accent); }
.dl-card > .device-cb { grid-area: cb; width: 15px; height: 15px; margin: 0; }
.dl-card > .dl-cb-spacer { grid-area: cb; }
.dl-icons { position: absolute; width: 0; height: 0; overflow: hidden; }

/* device-type tile, tinted per class */
.dl-ic { flex: none; width: 38px; height: 38px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; }
.dl-ic svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.dl-ic.t7 { background: #fdebe7; color: #c9442d; }
.dl-ic.kiosk { background: #ecedfd; color: #4f55cc; }
.dl-ic.dongle { background: #e2f3ef; color: #0f7263; }
.dl-ic.mpos { background: #fcefd8; color: #98590a; }
.dl-ic.pos { background: #ece9e4; color: #4a453e; }
.dl-ic.tablet { background: #e3edfa; color: #285aab; }
.dl-ic.other { background: #efece7; color: #6b655c; }
.dl-ic.kds { background: #fde8ef; color: #b0305f; }
.dl-ic.payment { background: #e6f0f7; color: #1f5f85; }
html[data-theme="dark"] .dl-ic.kds { background: rgba(176,48,95,.24); color: #f193b6; }
html[data-theme="dark"] .dl-ic.payment { background: rgba(31,95,133,.28); color: #8cc3e6; }
html[data-theme="dark"] .dl-ic.t7 { background: rgba(201,68,45,.2); color: #f0907d; }
html[data-theme="dark"] .dl-ic.kiosk { background: rgba(79,85,204,.24); color: #a9adf5; }
html[data-theme="dark"] .dl-ic.dongle { background: rgba(15,114,99,.26); color: #6fd1bf; }
html[data-theme="dark"] .dl-ic.mpos { background: rgba(152,89,10,.26); color: #f0b765; }
html[data-theme="dark"] .dl-ic.pos, html[data-theme="dark"] .dl-ic.other { background: rgba(255,255,255,.08); color: var(--text-2); }
html[data-theme="dark"] .dl-ic.tablet { background: rgba(40,90,171,.26); color: #8fb6f0; }

/* identity: name + tags, then serial · build · agent */
.dl-card .dl-id { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.dl-card .dl-l1 { display: flex; align-items: center; gap: 8px; min-width: 0; }
.dl-card .dl-l1 .dl-serial.dl-lead { font-family: inherit; font-size: 14px; font-weight: 600; min-width: 0; }
.dl-card .dl-l1 .dl-ktag { margin: 0; }
.dl-card .dl-l1 .dl-legacy-tag { margin: 0; }
.dl-card .dl-l2 { display: flex; align-items: baseline; gap: 8px; min-width: 0; white-space: nowrap; overflow: hidden; }
.dl-l2 .dl-model { font-size: 12px; color: var(--text-2); }
/* the product role (Menu board, Self-order kiosk, …) leads the second line */
.dl-l2 .dl-role { font-size: 12px; font-weight: 600; color: var(--text-2); }
.dl-l2 .dl-role::after, .dl-l2 .dl-model::after { content: "·"; margin-left: 8px; color: var(--text-faint); font-weight: 400; }
.dl-l2 .dl-sn { font-family: var(--mono); font-size: 12px; color: var(--text-2); }
.dl-l2 .dl-buildid { font-family: var(--mono); font-size: 11.5px; color: var(--text-faint); }
.dl-l2 .dl-agent { font-size: 12px; color: var(--text-faint); }
.dl-l2 .dl-agent::before { content: "·"; margin-right: 8px; }

/* vitals: display:contents so each block is a grid column of the card */
/* vitals: one compact column right before the open button, one row per reading */
.dl-card > .dl-stats { grid-area: stats; display: flex; flex-direction: column; gap: 1px; justify-self: end; width: 124px; }
.dl-blk { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; min-width: 0; white-space: nowrap; }
/* power glyph, type tile and identity as one group right after the checkbox */
.dl-card > .dl-lead { grid-area: lead; display: flex; align-items: center; gap: 10px; min-width: 0; }
.dl-lead > .dl-ic { margin-right: 2px; }
/* power slot: one fixed width for plug and battery alike, so the type tiles line up */
.dl-lead > .dl-pw { width: 38px; flex: none; display: flex; justify-content: center; }
.dl-pw .pv { height: auto; }
/* battery: the % as small text over a compact glyph; charging / flapping is a
   small mark inside the pack rather than extra width */
.pw-bat { flex-direction: column; align-items: center; gap: 2px; }
.dl-pw .pw-bat .v { font-size: 10.5px; font-weight: 500; line-height: 1; color: var(--muted); font-variant-numeric: tabular-nums; }
.pw-bat.battery-mid .v { color: var(--warn); }
.pw-bat.battery-low .v { color: var(--danger); }
.pw-bat .gb { position: relative; display: inline-flex; }
.pw-bat .g-bat { width: 22px; height: 12px; }
/* charging / charger-fault mark right after the percentage. The number box and the
   mark slot are fixed on every row (the slot is empty when there is no mark), so the
   power column never changes width and every percentage ends at the same x. */
.pw-bat .v { display: flex; align-items: center; }
.pw-bat .pc { width: 27px; text-align: right; }
.pw-bat .mk-s { width: 11px; padding-left: 1px; display: inline-flex; justify-content: center; }
.pw-bat .mk { width: 9px; height: 9px; flex: none; }
.pw-bat .mk.chg { color: var(--ok); }
.pw-bat .mk.flap { fill: none; stroke: var(--warn); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.dl-blk .k { font-size: 10px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--text-faint); }
.dl-blk .v { font-size: 12.5px; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--text); }
.dl-blk .v.warn { color: var(--warn); }
.dl-blk .v.danger { color: var(--danger); }
.dl-blk .v.muted { color: var(--text-faint); font-weight: 500; }
/* power glyphs */
.pv { display: flex; align-items: center; height: 20px; }
.pw { display: inline-flex; align-items: center; gap: 6px; color: var(--text-2); }
.pw.battery-ok { color: var(--ok); }
.pw.battery-mid { color: var(--warn); }
.pw.battery-low, .pw.danger { color: var(--danger); }
.pw .v { color: inherit; }
.pw.battery-ok .v { color: var(--text); }
.g-bat { width: 24px; height: 13px; flex: none; }
.g-plug { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.pw.mains { color: var(--text-2); }
.g-sm { display: inline-flex; }
.g-sm svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.g-sm.chg { color: var(--ok); }
.g-sm.flap { color: var(--warn); }

/* status: state over last seen */
/* status: a dot right after the name. Green = online / reporting, grey = not, with a
   faint "3 h ago" beside it. Legacy builds (offline by design) stay grey too. */
.dl-l1 .dl-status { display: inline-flex; align-items: center; flex: none; }
.dl-l1 .dl-status i { width: 8px; height: 8px; border-radius: 50%; margin: 0; background: var(--text-faint); }
.dl-l1 .dl-status.on i { background: var(--ok); }
.dl-l1 .dl-status.off i { background: transparent; box-shadow: inset 0 0 0 1.5px var(--text-faint); }
.dl-l1 .dl-status.checkin i { background: var(--warn); }
.dl-l1 .dl-synced { font-size: 11.5px; color: var(--text-faint); opacity: .8; white-space: nowrap; }
.dl-l1 .dl-synced.hidden { display: none; }
.dl-card .dl-l3 { font-family: var(--mono); font-size: 11px; color: var(--text-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dl-card > .dl-act { grid-area: act; display: flex; align-items: center; gap: 10px; justify-self: end; }
/* battery — tinted chip: glyph + % on a level-tinted pill */
.dl-bat { display: flex; align-items: center; flex: none; }
.dl-chip { display: inline-flex; align-items: center; gap: 4px; padding: 4px 9px; border-radius: 99px;
  font-size: 11px; font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1; white-space: nowrap; }
.dl-chip .bat-glyph { display: inline-flex; }
.dl-chip .bat-glyph svg { display: block; }
.dl-chip.battery-ok { background: rgba(43, 182, 115, .13); color: #1c7d50; }
.dl-chip.battery-mid { background: rgba(232, 161, 58, .15); color: #9a6512; }
.dl-chip.battery-low { background: rgba(229, 72, 77, .13); color: #b4282d; }
html[data-theme="dark"] .dl-chip.battery-ok { background: rgba(43, 182, 115, .2); color: #5fd49a; }
html[data-theme="dark"] .dl-chip.battery-mid { background: rgba(232, 161, 58, .22); color: #f0b765; }
html[data-theme="dark"] .dl-chip.battery-low { background: rgba(229, 72, 77, .22); color: #f08a8d; }

/* identity column: serial / release / onboarded */
.dl-id { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.dl-id-top { display: flex; align-items: center; gap: 6px; min-width: 0; }
.dl-serial { display: inline; font-family: var(--mono); font-size: 13px; font-weight: 600;
  color: var(--text); background: none; padding: 0; border: 0; border-radius: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dl-serial:hover { color: var(--accent-text); background: none; text-decoration: underline; }
.dl-kiosk { color: var(--muted); display: inline-flex; flex: none; }
.dl-flap { color: var(--warn); display: inline-flex; flex: none; vertical-align: -1px; }
.vitals-flap { color: var(--warn); display: inline-flex; align-items: center; vertical-align: -2px; }
.ddc-flap-alert { display: flex; align-items: flex-start; gap: 11px; margin: 14px 0 2px; padding: 11px 14px;
  background: var(--warn-bg); border: 1px solid var(--warn); border-radius: 10px; font-size: 13px; line-height: 1.5; color: var(--text2, var(--muted)); }
.ddc-flap-alert .ic { flex: none; color: var(--warn); display: inline-flex; margin-top: 1px; }
.ddc-flap-alert b { color: var(--text); font-weight: 650; }
.dl-hidden-tag { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; flex: none;
  color: var(--muted); background: var(--surface2); border-radius: 4px; padding: 1px 5px; }
.dl-rel { font-family: var(--mono); font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dl-onboard { font-size: 10.5px; color: var(--text-faint); white-space: nowrap; }
/* Product category tag on a device card (e.g. "Kiosk 27"). */
.dl-product { display: inline-block; margin-left: 6px; padding: 0 6px; border-radius: 8px;
  background: var(--surface-2, rgba(127,127,127,.14)); color: var(--text-faint);
  font-family: var(--sans, inherit); font-size: 10px; letter-spacing: .02em; vertical-align: middle; }
/* Mains-power chip shown in place of the battery chip for wall-powered kiosks. */
.dl-chip.dl-mains { color: var(--muted); }
/* TV chip shown in place of the battery chip for TV boxes / HDMI dongles. */
.dl-chip.dl-tv { color: var(--text); }

/* status column: online/offline + last sync */
.dl-status-col { display: flex; flex-direction: column; gap: 2px; white-space: nowrap; }
.dl-status { font-size: 12.5px; font-weight: 600; }
.dl-status i { display: inline-block; width: 6px; height: 6px; border-radius: 50%; margin-right: 5px; vertical-align: middle; }
.dl-status.on { color: var(--ok); } .dl-status.on i { background: var(--ok); }
.dl-status.off { color: var(--muted); } .dl-status.off i { background: var(--text-faint); }
.dl-synced { font-size: 11px; color: var(--text-faint); }
.dl-synced.hidden { display: none; }
/* Legacy-device tag (WS-incapable firmware — always shows Offline by design). */
.ddc-legacy-tag, .dl-legacy-tag {
  display: inline-flex; align-items: center; gap: 4px; vertical-align: middle;
  border-radius: 99px; font-weight: 600; white-space: nowrap; cursor: help;
  background: rgba(122,128,246,.10); color: #5a4bd0; border: 1px solid transparent;
}
.ddc-legacy-tag { margin-left: 8px; padding: 2px 9px; font-size: 11.5px; }
.dl-legacy-tag { margin-top: 4px; padding: 1px 7px; font-size: 10px; }
.ddc-info-ic { opacity: .75; flex: none; }
html[data-theme="dark"] .ddc-legacy-tag,
html[data-theme="dark"] .dl-legacy-tag { background: rgba(122,128,246,.2); color: #b3a8f5; }
/* Settings: legacy-build chips (add/remove list). */
.legacy-build-chip { display: inline-flex; align-items: center; gap: 4px; padding: 4px 6px 4px 12px;
  border-radius: 99px; background: rgba(122,128,246,.10); color: #5a4bd0; font-size: 12.5px; font-weight: 600; }
.legacy-build-x { border: none; background: transparent; color: inherit; cursor: pointer; font-size: 16px; line-height: 1; padding: 0 4px; opacity: .6; }
.legacy-build-x:hover { opacity: 1; }
html[data-theme="dark"] .legacy-build-chip { background: rgba(122,128,246,.2); color: #b3a8f5; }

/* metrics column: RAM / Temp stacked */
.dl-metrics { display: flex; flex-direction: column; gap: 2px; white-space: nowrap; }
.dl-m { display: flex; align-items: baseline; gap: 6px; font-size: 12px; }
.dl-m .k { font-size: 10.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--text-faint); min-width: 30px; }
.dl-m .v { font-weight: 600; font-variant-numeric: tabular-nums; }
.dl-m .v.muted { color: var(--text-faint); font-weight: 500; }

.dl-view { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px;
  padding: 0; border: 0; border-radius: 8px; color: var(--muted); transition: background var(--dur) var(--ease), color var(--dur) var(--ease); }
.dl-view:hover { background: var(--accent-soft); color: var(--accent-text); }
.dl-x { width: 24px; height: 24px; border: 1px solid var(--border); border-radius: 7px; background: var(--surface);
  color: var(--muted); display: inline-flex; align-items: center; justify-content: center; font-size: 14px; cursor: pointer; }
.dl-x:hover { border-color: var(--danger-edge); color: var(--danger); }
.dl-unhide:hover { border-color: var(--accent-edge); color: var(--accent-text); }

/* Reflow based on the list's own width (handles the narrow inspector pane,
   not just the viewport): stay one line, dropping the secondary info but
   keeping status, serial and battery. */
/* Compact (narrow pane or multi-column): identity and status on top, the vitals
   as one wrapped strip underneath; build and cycles drop out. */
@container (max-width: 760px) {
  .dl-card { column-gap: 12px; grid-template-columns: 18px minmax(0, 1fr) 108px auto; }
  .dl-card > .dl-stats { width: 108px; }
  .dl-rel, .dl-blk[data-m="cycles"] { display: none; }
  .dl-ic { width: 34px; height: 34px; }
}
/* Wide enough for ≥2 columns: offer the control, and lay the cards out in
   their compact form when multi-column. cols-3 falls back to 2 here and only
   becomes 3 once there's room (next query). */
@container (min-width: 640px) {
  .cols-seg { display: inline-flex; }
  .dl-list.cols-2, .dl-list.cols-3 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .dl-list.cols-2 .dl-card, .dl-list.cols-3 .dl-card { border-right: 1px solid var(--border-soft);
    grid-template-columns: 18px minmax(0, 1fr) 108px auto; column-gap: 12px; }
  .dl-list.cols-2 .dl-card > .dl-stats, .dl-list.cols-3 .dl-card > .dl-stats { width: 108px; }
  .dl-list.cols-2 :is(.dl-rel, .dl-blk[data-m="cycles"]), .dl-list.cols-3 :is(.dl-rel, .dl-blk[data-m="cycles"]) { display: none; }
  .dl-list.cols-2 .dl-ic, .dl-list.cols-3 .dl-ic { width: 34px; height: 34px; }
}
/* Wide enough for three columns: surface the option and use it. */
@container (min-width: 930px) {
  .cols-seg [data-cols="3"] { display: inline-flex; }
  .dl-list.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* Classic fleet cards (the pre-redesign layout), for viewers who switch back with the
   fleet page's Layout toggle. Every rule is scoped to .dl-list.classic so it can't leak
   into the stat-block rows, and outranks them on the classic markup. */
.dl-list.classic {display: flex; flex-direction: column;}
.dl-list.classic .dl-card {display: grid; grid-template-columns: 18px auto minmax(0, 1.4fr) auto auto auto;
  grid-template-areas: "cb bat id metrics status act";
  align-items: center; gap: 18px; padding: 11px 16px; border-bottom: 1px solid var(--border-soft);
  background: var(--surface); transition: background var(--dur) var(--ease);}
.dl-list.classic .dl-card:first-child {border-top: 1px solid var(--border-soft);}
.dl-list.classic .dl-card:hover {background: var(--hover);}
.dl-list.classic .dl-card.row-selected {background: var(--accent-soft); box-shadow: inset 2px 0 0 var(--accent);}
.dl-list.classic .dl-card > .device-cb {width: 15px; height: 15px; grid-area: cb;}
.dl-list.classic .dl-card > .dl-cb-spacer {grid-area: cb; width: 0;}
.dl-list.classic .dl-card > .dl-bat {grid-area: bat;}
.dl-list.classic .dl-card > .dl-id {grid-area: id;}
.dl-list.classic .dl-card > .dl-metrics {grid-area: metrics; align-self: start; min-width: 104px;}
.dl-list.classic .dl-card > .dl-status-col {grid-area: status; align-self: start; min-width: 124px;}
.dl-list.classic .dl-card > .dl-act {grid-area: act;}
.dl-list.classic .dl-bat {display: flex; align-items: center; flex: none;}
.dl-list.classic .dl-chip {display: inline-flex; align-items: center; gap: 4px; padding: 4px 9px; border-radius: 99px;
  font-size: 11px; font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1; white-space: nowrap;}
.dl-list.classic .dl-chip .bat-glyph {display: inline-flex;}
.dl-list.classic .dl-chip .bat-glyph svg {display: block;}
.dl-list.classic .dl-chip.battery-ok {background: rgba(43, 182, 115, .13); color: #1c7d50;}
.dl-list.classic .dl-chip.battery-mid {background: rgba(232, 161, 58, .15); color: #9a6512;}
.dl-list.classic .dl-chip.battery-low {background: rgba(229, 72, 77, .13); color: #b4282d;}
html[data-theme="dark"] .dl-list.classic .dl-chip.battery-ok {background: rgba(43, 182, 115, .2); color: #5fd49a;}
html[data-theme="dark"] .dl-list.classic .dl-chip.battery-mid {background: rgba(232, 161, 58, .22); color: #f0b765;}
html[data-theme="dark"] .dl-list.classic .dl-chip.battery-low {background: rgba(229, 72, 77, .22); color: #f08a8d;}
.dl-list.classic .dl-id {display: flex; flex-direction: column; gap: 2px; min-width: 0;}
.dl-list.classic .dl-id-top {display: flex; align-items: center; gap: 6px; min-width: 0;}
.dl-list.classic .dl-serial {display: inline; font-family: var(--mono); font-size: 13px; font-weight: 600;
  color: var(--text); background: none; padding: 0; border: 0; border-radius: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;}
.dl-list.classic .dl-serial:hover {color: var(--accent-text); background: none; text-decoration: underline;}
.dl-list.classic .dl-kiosk {color: var(--muted); display: inline-flex; flex: none;}
.dl-list.classic .dl-flap {color: var(--warn); display: inline-flex; flex: none; vertical-align: -1px;}
.dl-list.classic .dl-hidden-tag {font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; flex: none;
  color: var(--muted); background: var(--surface2); border-radius: 4px; padding: 1px 5px;}
.dl-list.classic .dl-rel {font-family: var(--mono); font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;}
.dl-list.classic .dl-onboard {font-size: 10.5px; color: var(--text-faint); white-space: nowrap;}
.dl-list.classic .dl-product {display: inline-block; margin-left: 6px; padding: 0 6px; border-radius: 8px;
  background: var(--surface-2, rgba(127,127,127,.14)); color: var(--text-faint);
  font-family: var(--sans, inherit); font-size: 10px; letter-spacing: .02em; vertical-align: middle;}
.dl-list.classic .dl-chip.dl-mains {color: var(--muted);}
.dl-list.classic .dl-chip.dl-tv {color: var(--text);}
.dl-list.classic .dl-status-col {display: flex; flex-direction: column; gap: 2px; white-space: nowrap;}
.dl-list.classic .dl-status {font-size: 12.5px; font-weight: 600;}
.dl-list.classic .dl-status i {display: inline-block; width: 6px; height: 6px; border-radius: 50%; margin-right: 5px; vertical-align: middle;}
.dl-list.classic .dl-status.on {color: var(--ok);}
.dl-list.classic .dl-status.on i {background: var(--ok);}
.dl-list.classic .dl-status.checkin {color: var(--warn);}
.dl-list.classic .dl-status.checkin i {background: var(--warn);}
.dl-list.classic .dl-status.off {color: var(--muted);}
.dl-list.classic .dl-status.off i {background: var(--text-faint);}
.dl-list.classic .dl-synced {font-size: 11px; color: var(--text-faint);}
.dl-list.classic .dl-synced.hidden {display: none;}
.dl-list.classic .dl-legacy-tag {display: inline-flex; align-items: center; gap: 4px; vertical-align: middle;
  border-radius: 99px; font-weight: 600; white-space: nowrap; cursor: help;
  background: rgba(122,128,246,.10); color: #5a4bd0; border: 1px solid transparent;}
.dl-list.classic .dl-legacy-tag {margin-top: 4px; padding: 1px 7px; font-size: 10px;}
html[data-theme="dark"] .dl-list.classic .dl-legacy-tag {background: rgba(122,128,246,.2); color: #b3a8f5;}
.dl-list.classic .dl-metrics {display: flex; flex-direction: column; gap: 2px; white-space: nowrap;}
.dl-list.classic .dl-m {display: flex; align-items: baseline; gap: 6px; font-size: 12px;}
.dl-list.classic .dl-m .k {font-size: 10.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--text-faint); min-width: 30px;}
.dl-list.classic .dl-m .v {font-weight: 600; font-variant-numeric: tabular-nums;}
.dl-list.classic .dl-m .v.muted {color: var(--text-faint); font-weight: 500;}
.dl-list.classic .dl-act {display: flex; align-items: center; gap: 10px; justify-self: end;}
.dl-list.classic .dl-view {display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px;
  padding: 0; border: 0; border-radius: 8px; color: var(--muted); transition: background var(--dur) var(--ease), color var(--dur) var(--ease);}
.dl-list.classic .dl-view:hover {background: var(--accent-soft); color: var(--accent-text);}
.dl-list.classic .dl-x {width: 24px; height: 24px; border: 1px solid var(--border); border-radius: 7px; background: var(--surface);
  color: var(--muted); display: inline-flex; align-items: center; justify-content: center; font-size: 14px; cursor: pointer;}
.dl-list.classic .dl-x:hover {border-color: var(--danger-edge); color: var(--danger);}
.dl-list.classic .dl-unhide:hover {border-color: var(--accent-edge); color: var(--accent-text);}
@container (max-width: 680px) {
  .dl-list.classic .dl-card {grid-template-columns: 18px minmax(0, 1fr) auto auto;
    grid-template-areas:
      "cb id  status act"
      "cb bat status act";
    gap: 5px 14px;}
  .dl-list.classic .dl-metrics {display: none;}
  .dl-list.classic .dl-rel, .dl-list.classic .dl-onboard {display: none;}
}
@container (min-width: 640px) {
  .dl-list.classic.cols-2, .dl-list.classic.cols-3 {display: grid; grid-template-columns: 1fr 1fr;}
  .dl-list.classic.cols-2 .dl-card, .dl-list.classic.cols-3 .dl-card {grid-template-columns: 18px minmax(0, 1fr) auto auto;
    grid-template-areas:
      "cb id  status act"
      "cb bat status act";
    gap: 5px 14px;}
  .dl-list.classic.cols-2 .dl-metrics, .dl-list.classic.cols-3 .dl-metrics {display: none;}
  .dl-list.classic.cols-2 .dl-rel, .dl-list.classic.cols-2 .dl-onboard, .dl-list.classic.cols-3 .dl-rel, .dl-list.classic.cols-3 .dl-onboard {display: none;}
  .dl-list.classic.cols-2 .dl-card, .dl-list.classic.cols-3 .dl-card {border-right: 1px solid var(--border-soft);}
}
@container (min-width: 930px) {
  .dl-list.classic.cols-3 {grid-template-columns: 1fr 1fr 1fr;}
}

/* Sort popover (reuses .fleet-fwrap / .fleet-pop) */
.fleet-sortpop { width: 230px; }
.sortpop { display: flex; flex-direction: column; gap: 2px; }
.sortopt { display: flex; align-items: center; justify-content: space-between; padding: 9px 11px; border: 0;
  background: none; border-radius: 8px; font: inherit; font-size: 13px; color: var(--text-2); cursor: pointer; text-align: left; }
.sortopt:hover { background: var(--hover); }
.sortopt.on { background: var(--accent-soft); color: var(--accent-text); font-weight: 600; }
.sortopt .dir { font-family: var(--mono); font-size: 13px; min-width: 12px; text-align: right; }

/* ===== shared two-pane device picker (.dp-*) — used by group/restaurant add + create ===== */
.dp-tp { display: grid; grid-template-columns: 1fr 320px; gap: 16px; }
.dp-pane { background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  display: flex; flex-direction: column; overflow: hidden; min-width: 0; }
.dp-pane-h { display: flex; align-items: center; justify-content: space-between; padding: 11px 14px;
  border-bottom: 1px solid var(--border-soft); }
.dp-pane-h .t { font-weight: 700; font-size: 12.5px; }
.dp-pane-h .n { color: var(--text-faint); font-size: 11.5px; font-weight: 600; }
.dp-search { margin: 11px 14px 0; display: flex; align-items: center; gap: 8px; border: 1px solid var(--border);
  border-radius: 9px; padding: 7px 11px; color: var(--text-faint); }
.dp-search input { border: 0; outline: 0; font: inherit; font-size: 13px; flex: 1; background: none; color: var(--text); }
.dp-pills { display: flex; gap: 6px; flex-wrap: wrap; padding: 11px 14px 4px; }
.dp-pill { font: inherit; font-size: 11.5px; font-weight: 600; padding: 5px 10px; border-radius: 99px;
  border: 1px solid var(--border); background: var(--surface); color: var(--muted); cursor: pointer; }
.dp-pill.sel { background: var(--accent-soft); border-color: transparent; color: var(--accent-text); }
.dp-rows { padding: 5px 7px; overflow: auto; max-height: 340px; min-height: 120px; }
.dp-row { display: grid; grid-template-columns: auto 1fr auto auto; gap: 11px; align-items: center;
  padding: 8px 9px; border-radius: 9px; }
.dp-row:hover { background: var(--hover); }
.dp-row.staged { opacity: .55; }
.dp-bchip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 8px; border-radius: 99px;
  font-size: 11.5px; font-weight: 600; font-variant-numeric: tabular-nums; }
.dp-bchip svg { display: block; }
.dp-bchip.battery-ok { background: rgba(43,182,115,.13); color: #1c7d50; }
.dp-bchip.battery-mid { background: rgba(232,161,58,.15); color: #9a6512; }
.dp-bchip.battery-low { background: rgba(229,72,77,.13); color: #b4282d; }
html[data-theme="dark"] .dp-bchip.battery-ok { background: rgba(43,182,115,.2); color: #5fd49a; }
html[data-theme="dark"] .dp-bchip.battery-mid { background: rgba(232,161,58,.22); color: #f0b765; }
html[data-theme="dark"] .dp-bchip.battery-low { background: rgba(229,72,77,.22); color: #f08a8d; }
.dp-rid { min-width: 0; }
.dp-serial { font-weight: 600; font-size: 13px; }
.dp-sub { color: var(--muted); font-size: 11px; }
.dp-where { font-size: 11px; color: var(--muted); white-space: nowrap; }
.dp-where.lab { color: var(--accent-2); font-weight: 600; }
.dp-where.elsewhere { color: #8a5d12; background: rgba(232,161,58,.12); padding: 2px 7px; border-radius: 6px; font-weight: 600; }
html[data-theme="dark"] .dp-where.elsewhere { color: #f0b765; }
.dp-add { width: 27px; height: 27px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface);
  color: var(--accent-text); font-size: 16px; line-height: 1; cursor: pointer; }
.dp-add:hover { background: var(--accent-soft); border-color: transparent; }
.dp-add.done { color: var(--ok); border-color: transparent; background: none; cursor: default; }
.dp-empty { padding: 24px 16px; text-align: center; color: var(--text-faint); font-size: 12.5px; }
/* staging basket */
.dp-basket { padding: 7px; overflow: auto; flex: 1; min-height: 170px; }
.dp-bk-empty { display: flex; flex-direction: column; align-items: center; justify-content: center;
  height: 170px; color: var(--text-faint); font-size: 12.5px; text-align: center; }
.dp-bk-row { display: grid; grid-template-columns: auto 1fr auto; gap: 9px; align-items: center;
  padding: 7px 9px; border-radius: 8px; }
.dp-bk-row:hover { background: var(--hover); }
.dp-bk-id { min-width: 0; }
.dp-bk-move { font-size: 10.5px; color: #8a5d12; }
html[data-theme="dark"] .dp-bk-move { color: #f0b765; }
.dp-x { color: var(--text-faint); cursor: pointer; font-size: 15px; border: 0; background: none; }
.dp-x:hover { color: var(--danger); }
.dp-moves { display: flex; align-items: center; gap: 8px; background: rgba(232,161,58,.12); color: #8a5d12;
  font-size: 12px; padding: 9px 13px; border-radius: 9px; margin: 12px 14px 0; }
html[data-theme="dark"] .dp-moves { color: #f0b765; }
.dp-bar { display: flex; align-items: center; gap: 14px; padding: 14px 0 0; margin-top: 14px; border-top: 1px solid var(--border-soft); }
.dp-bar .summary { font-size: 13px; color: var(--muted); }
.dp-bar .summary b { color: var(--text); }
@media (max-width: 1024px) { .dp-tp { grid-template-columns: 1fr; } }

/* Fleet-page "Add/remove devices" popup — wider than a normal modal (it hosts the
   two-pane device picker + members list, both of which need real room), stacked
   above everything else on the page (kebab menus, toasts, etc — z-index:1300), and
   every list inside it drops to serial + one action button so it doesn't get
   crowded. The submit bar and members list sit below the picker in document flow;
   modal-box caps at 85vh with overflow:hidden, so modal-body needs its own bounded
   height + overflow-y:auto to make that reachable rather than silently clipped. A
   plain max-height (not flex-basis) is used here deliberately — it's not at the
   mercy of flex-shrink/min-height:auto edge cases that were still clipping content
   under some layouts. */
#fleet-devices-modal { z-index: 1300; }
#fleet-devices-modal .modal-box { max-width: 760px; }
#fleet-devices-modal .modal-body {
  max-height: min(66vh, 620px);
  overflow-y: auto !important;
}
/* .modal-body is flex-direction:column, and its card children have overflow:hidden
   — which makes their flex-shrink auto-minimum 0, so flexbox was compressing them
   to fit the bounded height above instead of letting them overflow into the
   scrollbar. Refusing to shrink is what actually makes the max-height above
   produce a real scrollbar instead of silently clipped content. */
#fleet-devices-modal .modal-body > * { flex-shrink: 0; }
#fleet-devices-modal .dp-tp { grid-template-columns: 1fr 1fr; }
#fleet-devices-modal .dp-rows { max-height: 220px; }
#fleet-devices-modal .dp-basket { min-height: 120px; }
#fleet-devices-modal .dp-row { grid-template-columns: 1fr auto; }
#fleet-devices-modal .dp-row .dp-bchip,
#fleet-devices-modal .dp-row .dp-where,
#fleet-devices-modal .dp-sub { display: none; }
#fleet-devices-modal .dp-rid { grid-column: 1; }
#fleet-devices-modal .dp-add { grid-column: 2; }
#fleet-devices-modal .dp-bk-row { grid-template-columns: 1fr auto; }
#fleet-devices-modal .dp-bk-row .dp-bchip { display: none; }
#fleet-devices-modal .dp-bk-id { grid-column: 1; }
#fleet-devices-modal .dp-x { grid-column: 2; }
@media (max-width: 640px) { #fleet-devices-modal .dp-tp { grid-template-columns: 1fr; } }

/* Lean device list (see "device-cards-lean") — serial + one action button. */
.dl-lean-list { display: flex; flex-direction: column; max-height: 260px; overflow: auto;
  border: 1px solid var(--border); border-radius: 12px; }
.dl-lean-row { display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 8px 12px; border-bottom: 1px solid var(--border-soft); }
.dl-lean-row:last-child { border-bottom: 0; }
.dl-lean-row:hover { background: var(--hover); }
.dl-lean-serial { font-size: 13px; font-weight: 600; color: var(--text); background: none; padding: 0; text-decoration: none; }
.dl-lean-serial:hover { color: var(--accent-text); background: none; }

/* ===== device detail — Cockpit hero ===== */
.ddc-hero { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 20px 22px; margin-bottom: 16px; }
.ddc-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.ddc-id { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.ddc-status { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; font-size: 13px; }
.ddc-status i { width: 7px; height: 7px; border-radius: 50%; flex: none; }
/* Online (O1, 21 Oct 2026): a flat dot and the word in plain text; hollow dot offline. */
.ddc-status.on { color: var(--text); } .ddc-status.on i { background: var(--ok); }
.ddc-status.off { color: var(--muted); font-weight: 500; } .ddc-status.off i { background: transparent; box-shadow: inset 0 0 0 1.5px var(--text-faint); }
.ddc-serial { font-size: 23px; font-weight: 700; letter-spacing: -.01em; }
.ddc-meta { color: var(--muted); font-size: 12.5px; }
.ddc-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.ddc-btn { display: inline-flex; align-items: center; gap: 7px; font: inherit; font-size: 13px; font-weight: 600;
  border: 1px solid var(--border); background: var(--surface); color: var(--text); padding: 8px 13px; border-radius: 10px; cursor: pointer; text-decoration: none; }
.ddc-btn:hover { background: var(--hover); }
.ddc-btn svg { width: 15px; height: 15px; flex: none; }
/* primary hero action (Remote Control) */
.ddc-btn-prim { background: var(--accent-fill); border-color: transparent; color: #fff; }
/* Keep the label white on hover. Without this, the global `a:hover { color: accent }`
   (this button is an <a>) repaints the text coral on the coral hover background,
   making it vanish. */
.ddc-btn-prim:hover { background: var(--accent-fill-h); color: #fff; }
/* hero "Actions ▾" dropdown */
.ddc-menu-wrap { position: relative; }
.ddc-caret { width: 13px; height: 13px; opacity: .8; }
.ddc-btn.open { border-color: var(--rule-2); }
.ddc-menu { position: absolute; top: calc(100% + 8px); right: 0; z-index: 30; width: 232px;
  background: rgba(255,255,255,.45); backdrop-filter: blur(18px) saturate(180%); -webkit-backdrop-filter: blur(18px) saturate(180%);
  will-change: backdrop-filter; /* own compositing layer — see .toast for why */
  border: 1px solid rgba(255,255,255,.29); border-radius: 16px;
  box-shadow: 0 14px 36px rgba(0,0,0,.21), inset 0 1px 0 rgba(255,255,255,.50); padding: 7px; animation: ov-rise 0.14s var(--ease) backwards; }
html[data-theme="dark"] .ddc-menu { background: rgba(20,18,17,.45); border-color: rgba(255,255,255,.12); }
.ddc-menu[hidden] { display: none; }
.ddc-mcap { font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--text-faint); padding: 9px 10px 5px; }
.ddc-mi { display: flex; align-items: center; gap: 11px; width: 100%; padding: 8px 10px; border: 0;
  background: none; border-radius: 9px; font: inherit; font-size: 13px; color: var(--text);
  text-align: left; text-decoration: none; cursor: pointer; box-sizing: border-box; }
.ddc-mi:hover { background: var(--hover); }
.ddc-mi svg { width: 16px; height: 16px; color: var(--muted); flex: none; }
.ddc-mi.danger, .ddc-mi.danger svg { color: var(--danger); }
.ddc-mi.danger:hover { background: var(--danger-bg); }
.ddc-msep { height: 1px; background: var(--border-soft); margin: 5px 4px; }
.ddc-menu form { margin: 0; }
.ddc-vitals { display: flex; gap: 9px; flex-wrap: wrap; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border-soft); }
.ddc-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 99px; font-size: 12.5px; font-weight: 600;
  font-variant-numeric: tabular-nums; background: var(--surface); color: var(--text); border: 1px solid var(--border); }
.ddc-chip svg, .ddc-chip .ic { display: block; flex: none; }
.ddc-chip.battery-ok { background: rgba(43,182,115,.13); color: #1c7d50; border-color: transparent; }
.ddc-chip.battery-mid { background: rgba(232,161,58,.15); color: #9a6512; border-color: transparent; }
.ddc-chip.battery-low { background: rgba(229,72,77,.13); color: #b4282d; border-color: transparent; }
html[data-theme="dark"] .ddc-chip.battery-ok { background: rgba(43,182,115,.2); color: #5fd49a; }
html[data-theme="dark"] .ddc-chip.battery-mid { background: rgba(232,161,58,.22); color: #f0b765; }
html[data-theme="dark"] .ddc-chip.battery-low { background: rgba(229,72,77,.22); color: #f08a8d; }
/* Mic gain chip (admin-only): fixed = 102 (ok), default = 84 (bad), else mixed */
.ddc-chip.mic-fixed { background: rgba(43,182,115,.13); color: #1c7d50; border-color: transparent; }
.ddc-chip.mic-mixed { background: rgba(232,161,58,.15); color: #9a6512; border-color: transparent; }
.ddc-chip.mic-default { background: rgba(229,72,77,.13); color: #b4282d; border-color: transparent; }
.ddc-chip.mic-na { color: var(--muted); }
html[data-theme="dark"] .ddc-chip.mic-fixed { background: rgba(43,182,115,.2); color: #5fd49a; }
html[data-theme="dark"] .ddc-chip.mic-mixed { background: rgba(232,161,58,.22); color: #f0b765; }
html[data-theme="dark"] .ddc-chip.mic-default { background: rgba(229,72,77,.22); color: #f08a8d; }
.ddc-chip .k { color: var(--text-faint); font-weight: 600; }
/* font-family/line-height only — "font: inherit" here would also reset the base
   rule's font-size/font-weight (button.ddc-chip outranks the plain .ddc-chip
   selector on specificity), which was why the Wi-Fi pill (the only <button>
   among these otherwise-<span> chips) rendered with different text than the rest. */
button.ddc-chip { appearance: none; cursor: pointer; font-family: inherit; line-height: inherit; }
button.ddc-chip:hover { background: var(--surface-2, var(--surface)); }
.wifi-scan-list { display: flex; flex-direction: column; gap: 2px; max-height: 360px; overflow-y: auto; }
.wifi-scan-row { display: flex; align-items: center; gap: 10px; padding: 9px 4px; border-bottom: 1px solid var(--border-soft, var(--border)); }
.wifi-scan-row:last-child { border-bottom: none; }
.wifi-scan-row .ic { flex: none; }
.wifi-scan-ssid { flex: 1; font-weight: 600; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wifi-scan-bssid { font-family: var(--mono); flex: none; }
.wifi-scan-rssi { flex: none; font-variant-numeric: tabular-nums; font-size: 12px; color: var(--text-faint); min-width: 62px; text-align: right; }
/* Wireless-charging (WLC) state chip — colours mirror the battery-graph legend. */
.ddc-chip.wlc-on  { background: rgba(232,67,147,.13); color: #c0267a; border-color: transparent; }
.ddc-chip.wlc-off { background: rgba(108,92,231,.12); color: #5a4bd0; border-color: transparent; }
.ddc-chip.wlc-bad { background: rgba(243,156,18,.15); color: #9a6512; border-color: transparent; }
html[data-theme="dark"] .ddc-chip.wlc-on  { background: rgba(232,67,147,.22); color: #f48fbf; }
html[data-theme="dark"] .ddc-chip.wlc-off { background: rgba(108,92,231,.24); color: #b3a8f5; }
html[data-theme="dark"] .ddc-chip.wlc-bad { background: rgba(243,156,18,.22); color: #f0b765; }
/* placement strip */
.ddc-place { display: flex; gap: 26px; flex-wrap: wrap; align-items: center; background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; padding: 13px 18px; margin-bottom: 16px; }
.ddc-place-item { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ddc-place-item .k { font-size: 10.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--text-faint); }
.ddc-place-item .v { font-weight: 600; font-size: 13.5px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ddc-gtag { display: inline-flex; align-items: center; gap: 6px; background: rgba(122,128,246,.12); color: #4b50c4; font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 7px; text-decoration: none; }
html[data-theme="dark"] .ddc-gtag { color: #a9adfb; }
.ddc-alert { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 99px; }
.ddc-alert.danger { background: rgba(229,72,77,.12); color: #b4282d; }
.ddc-alert.warn { background: rgba(232,161,58,.14); color: #8a5d12; }
.ddc-alert.ok { background: rgba(43,182,115,.12); color: #1c7d50; }

/* device detail — Cockpit 2-column body */
.ddc-body { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 16px; align-items: start; }
.ddc-side { display: flex; flex-direction: column; gap: 14px; }
.ddc-card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 16px 17px; }
.ddc-card-t { font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--text-faint); margin: 0 0 12px; }
.ddc-kv { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 13px; padding: 6px 0; }
.ddc-kv + .ddc-kv { border-top: 1px solid var(--border-soft); }

/* Device notes card */
.dn-ta { width: 100%; box-sizing: border-box; resize: vertical; min-height: 76px; padding: 9px 11px; font: inherit; font-size: 13px; line-height: 1.5; color: var(--fg); background: var(--surface-2, var(--surface)); border: 1px solid var(--border); border-radius: 10px; }
.dn-ta:focus { outline: none; border-color: var(--accent-edge); box-shadow: 0 0 0 3px var(--accent-soft); }
.dn-actions { display: flex; justify-content: flex-end; margin-top: 9px; }
.dn-save { padding: 5px 14px; font-size: 12px; }
.dn-view { font-size: 13px; line-height: 1.55; color: var(--fg); white-space: pre-wrap; word-break: break-word; }
.dn-saved { font-size: 10px; font-weight: 700; letter-spacing: .04em; color: var(--ok); background: var(--ok-bg); border-radius: 99px; padding: 2px 7px; margin-left: 6px; animation: dnSavedFade 2.4s forwards; }
@keyframes dnSavedFade { 0%, 60% { opacity: 1; } 100% { opacity: 0; } }
.ddc-kv .k { color: var(--muted); }
.ddc-kv .v { font-weight: 600; min-width: 0; display: flex; align-items: center; gap: 6px; justify-content: flex-end; text-align: right; }
.ddc-kv .v.tags { flex-wrap: wrap; }
/* A value with several parts (the wireless adb row: state, address, timer, link)
   wraps between parts instead of pushing out of its card, and never inside one. */
.ddc-kv .v.wrap { flex-wrap: wrap; row-gap: 4px; }
.ddc-kv .v.wrap > * { white-space: nowrap; }
#adb-tcp-row .k { flex: none; white-space: nowrap; }
#adb-tcp-row { align-items: flex-start; }
.ddc-main { min-width: 0; }
/* recent activity timeline (Overview) */
.ddc-activity { display: flex; flex-direction: column; }
.ddc-tl { display: grid; grid-template-columns: 10px 1fr auto; gap: 11px; align-items: start; padding: 9px 0; font-size: 13px; }
.ddc-tl + .ddc-tl { border-top: 1px solid var(--border-soft); }
.ddc-tl .dot { width: 9px; height: 9px; border-radius: 50%; margin-top: 4px; background: var(--accent-2); }
.ddc-tl .dot.ok { background: var(--ok); } .ddc-tl .dot.warn { background: var(--warn); } .ddc-tl .dot.err { background: var(--danger); }
.ddc-tl .when { color: var(--text-faint); font-size: 11.5px; white-space: nowrap; }
@media (max-width: 1024px) { .ddc-body { grid-template-columns: 1fr; } }

/* device detail — hero/placement affordances + inline activity (match demo) */
.ddc-btn.ddc-btn-icon { padding: 8px 11px; font-size: 15px; line-height: 1; }
.ddc-kv .kv-edit { border: 0; background: none; color: var(--text-faint); cursor: pointer; padding: 0 2px; display: inline-flex; align-items: center; }
.ddc-kv .kv-edit:hover { color: var(--accent-text); }
.ddc-gtag .gtag-x { border: 0; background: none; color: #4b50c4; opacity: .6; cursor: pointer; font-size: 14px; line-height: 1; padding: 0; }
.ddc-gtag .gtag-x:hover { opacity: 1; }
html[data-theme="dark"] .ddc-gtag .gtag-x { color: #a9adfb; }
.ddc-kv .kv-add { font: inherit; font-size: 12px; font-weight: 600; color: var(--muted); background: none; text-decoration: none; border: 1px dashed var(--border); border-radius: 7px; padding: 2px 8px; cursor: pointer; }
/* White on the dark theme's lighter --danger is 3:1; the badge keeps a deeper red there (5:1). */
html[data-theme="dark"] .nav-badge { background: #c24444; }
.ddc-kv .kv-add:hover { color: var(--accent-text); border-color: var(--accent); }
.ddc-actsec { margin-top: 18px; }
.ddc-act-h { font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--text-faint); margin: 0 0 6px; }

/* command-history timeline links + apps list (device detail) */
.ddc-tl-link { text-decoration: none; color: inherit; padding-left: 8px; padding-right: 8px; margin: 0 -8px; border-radius: 8px; transition: background var(--dur) var(--ease); }
.ddc-tl-link:hover { background: var(--hover); }
.ddc-tl-link + .ddc-tl-link { border-top: 1px solid var(--border-soft); }
.ddc-tl-main { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* installed apps — clean rows (no version / last-updated columns) */
.app-list { display: flex; flex-direction: column; }
.app-row { display: grid; grid-template-columns: 1fr auto; gap: 14px; align-items: center; padding: 11px 18px; border-top: 1px solid var(--border-soft); }
.app-row:hover { background: var(--hover); }
.app-id { min-width: 0; }
.app-name { font-weight: 600; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-pkg { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-uninstall { font: inherit; font-size: 12px; font-weight: 600; color: var(--muted); background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 5px 12px; cursor: pointer; }
.app-uninstall:hover { border-color: var(--danger-edge); color: var(--danger); }
.app-search { margin: 12px 18px 4px; max-width: 320px; }
.app-list.collapsed .app-extra { display: none; }
.app-more { display: block; width: calc(100% - 36px); margin: 8px 18px 14px; padding: 9px; font: inherit; font-size: 12.5px;
  font-weight: 600; color: var(--accent-text); background: var(--accent-soft); border: 0; border-radius: 9px; cursor: pointer; }
.app-more:hover { background: var(--accent-soft-2, var(--accent-soft)); filter: brightness(.97); }

/* searchable package combobox (kiosk settings) */
.pkg-combo { position: relative; max-width: 420px; }
.pkg-combo.open { z-index: 200; }
.pkg-list { position: absolute; left: 0; right: 0; top: 100%; margin-top: 4px; z-index: 200; max-height: 260px; overflow: auto;
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow-lg); display: none; }
.pkg-combo.open .pkg-list { display: block; }
.pkg-opt { display: flex; flex-direction: column; gap: 1px; padding: 8px 12px; cursor: pointer; position: relative; }
.pkg-opt.hidden { display: none; }
.pkg-opt.active, .pkg-opt:hover { background: var(--accent-soft); }
.pkg-opt-name { font-size: 13px; font-weight: 600; }
.pkg-opt-pkg { font-size: 11px; color: var(--muted); }

/* Bulk-kiosk: an app present on only some selected devices is greyed but usable. */
.pkg-opt-partial .pkg-opt-name, .pkg-opt-partial .pkg-opt-pkg { opacity: .5; }
.pkg-opt-badge { position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  font-size: 10px; font-weight: 700; color: var(--warn, #9a6512);
  background: rgba(232,161,58,.16); border-radius: 99px; padding: 2px 7px; }

/* placement popovers (device detail) */
.pl-pop-wrap { position: relative; display: inline-flex; }
/* Venue and group pickers: placed here, drawn by the menu kit (.cc-menu). */
.pl-pop { position: absolute; top: calc(100% + 6px); right: 0; z-index: 50; width: 250px; }
.pl-pop-list { display: flex; flex-direction: column; max-height: 260px; overflow: auto; }
.pl-pop-opt input[type=radio] { margin: 0; accent-color: var(--accent); }
.pl-pop-opt:has(input:checked) { color: var(--accent-text); font-weight: 600; }
.pl-pop .cc-mfoot button { margin-left: auto; }

/* screenshot command result — framed preview + download */
.ss-result { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.ss-frame { display: inline-block; border: 4px solid #11161c; border-radius: 16px; overflow: hidden; line-height: 0;
  background: #11161c; box-shadow: var(--shadow-sm); transition: box-shadow var(--dur) var(--ease); }
.ss-frame img { display: block; max-width: 150px; height: auto; border-radius: 9px; }
.ss-frame:hover { box-shadow: 0 10px 26px rgba(0,0,0,.16); }
.ss-dl { font-size: 12px; padding: 5px 11px; display: inline-flex; align-items: center; gap: 6px; }
.ss-dl .ui-icon { width: 13px; height: 13px; }

/* command-history type filters (device detail) */
.ch-filters { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.ch-pill { font: inherit; font-size: 12px; font-weight: 600; padding: 4px 11px; border-radius: 99px;
  border: 1px solid var(--border); background: var(--surface); color: var(--muted); cursor: pointer; }
.ch-pill:hover { color: var(--text); }
.ch-pill.on { background: var(--accent-soft); border-color: transparent; color: var(--accent-text); }

/* commands page — scannable list */
.cmd-list { display: flex; flex-direction: column; }
.cmd-row { display: grid; grid-template-columns: auto auto minmax(0,1fr) auto auto auto; gap: 13px; align-items: center;
  padding: 11px 18px; border-top: 1px solid var(--border-soft); }
.cmd-row:hover { background: var(--hover); }
.cmd-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--text-faint); }
.cmd-dot.ok { background: var(--ok); } .cmd-dot.warn { background: var(--warn); } .cmd-dot.err { background: var(--danger); }
.cmd-ic { width: 15px; height: 15px; color: var(--accent-text); display: inline-flex; }
.cmd-ic svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; }
.cmd-main { min-width: 0; text-decoration: none; color: inherit; }
.cmd-name { font-weight: 600; font-size: 13.5px; }
.cmd-sub { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cmd-chip { display: inline-flex; padding: 3px 9px; border-radius: 99px; font-size: 11.5px; font-weight: 600; font-variant-numeric: tabular-nums; }
.cmd-chip.ok { background: rgba(43,182,115,.13); color: #1c7d50; }
.cmd-chip.mid { background: rgba(232,161,58,.15); color: #9a6512; }
.cmd-chip.low { background: rgba(229,72,77,.13); color: #b4282d; }

/* Selected-device chip in the two-pane target picker. The remove control (dp-chip-x)
   is collapsed to zero width and only expands on hover/focus, so the basket stays
   compact and uncluttered while still being keyboard-accessible. */
.dp-chip { display: inline-flex; align-items: center; padding: 4px 10px; border-radius: 99px;
  font-size: 11.5px; font-weight: 600; background: var(--surface); color: var(--text);
  border: 1px solid var(--border); max-width: 100%; }
.dp-chip-t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dp-chip-x { display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 0; margin-left: 0; padding: 0; border: 0; background: none; cursor: pointer;
  color: var(--muted); font-size: 11px; line-height: 1; opacity: 0; overflow: hidden;
  transition: width .12s ease, margin .12s ease, opacity .12s ease; }
.dp-chip:hover .dp-chip-x, .dp-chip:focus-within .dp-chip-x { width: 13px; margin-left: 6px; opacity: .75; }
.dp-chip-x:hover, .dp-chip-x:focus-visible { opacity: 1; color: var(--danger); outline: none; }
.cmd-when { white-space: nowrap; }
.cmd-del { border: 0; background: none; color: var(--text-faint); font-size: 17px; line-height: 1; cursor: pointer; padding: 0 4px; }
.cmd-del:hover { color: var(--danger); }

/* releases — card list with rollout bars */
.rel-list { display: flex; flex-direction: column; }
.rel-row { display: grid; grid-template-columns: auto minmax(160px,1.3fr) minmax(150px,1fr) auto auto; gap: 16px; align-items: center;
  padding: 13px 18px; border-top: 1px solid var(--border-soft); }
.rel-row:first-child { border-top: 0; }
.rel-row:hover { background: var(--hover); }
.rel-drag { cursor: grab; color: var(--text-faint); user-select: none; }
.rel-id { min-width: 0; }
.rel-ver { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; flex-wrap: wrap; }
.rel-sub { font-size: 11.5px; color: var(--muted); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rel-roll { min-width: 0; }
.rel-bar-row { display: flex; align-items: center; gap: 10px; }
.rel-bar { flex: 1; height: 8px; border-radius: 99px; background: var(--surface2); overflow: hidden; }
.rel-bar i { display: block; height: 100%; background: var(--ok); border-radius: 99px; }
.rel-bar i.warn { background: var(--warn); }
.rel-bar i.faint { background: var(--text-faint); }
.rel-pct { font-size: 12px; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; min-width: 36px; text-align: right; }
.rel-rollnum { font-size: 11.5px; color: var(--muted); margin-top: 6px; }
.rel-dlink { color: var(--accent-text); text-decoration: none; font-weight: 600; }
.rel-dlink:hover { text-decoration: underline; }
/* releases tabs */
.rel-tabs { display: inline-flex; gap: 3px; background: var(--surface2); border: 1px solid var(--border); border-radius: 11px; padding: 4px; margin-bottom: 14px; }
.rel-tab { border: 0; background: none; font: inherit; font-size: 13px; font-weight: 600; color: var(--muted); padding: 7px 14px; border-radius: 8px; cursor: pointer; }
.rel-tab:hover { color: var(--text); }
.rel-tab.on { background: var(--surface); color: var(--accent-text); box-shadow: var(--shadow-sm); }
.rel-tab-n { color: var(--text-faint); font-weight: 600; }
.rel-tab.on .rel-tab-n { color: var(--accent-text); }
.rel-meta { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.rel-act { display: flex; gap: 6px; align-items: center; justify-content: flex-end; flex-wrap: wrap; }
.rel-act form { display: inline; }
@media (max-width: 820px) { .rel-row { grid-template-columns: 1fr auto; } .rel-roll, .rel-meta { grid-column: 1 / -1; } }

/* fleet-app picker (commands · uninstall) */
.fleet-app-list { max-height: 240px; overflow: auto; border: 1px solid var(--border); border-radius: 10px; }
.fleet-app { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; text-align: left;
  padding: 9px 12px; border: 0; border-top: 1px solid var(--border-soft); background: var(--surface); cursor: pointer; font: inherit; }
.fleet-app:first-child { border-top: 0; }
.fleet-app:hover { background: var(--hover); }
.fleet-app.sel { background: var(--accent-soft); }
.fa-id { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.fa-name { font-weight: 600; font-size: 13px; }
.fa-pkg { font-size: 11px; color: var(--muted); }
.fa-cnt { font-size: 11px; color: var(--text-faint); font-weight: 600; white-space: nowrap; }
.fleet-app.sel .fa-cnt { color: var(--accent-text); }

/* commands target two-pane: available column wider than the default picker */
.cmd-dp { grid-template-columns: 1fr 280px; }
.cmd-dp .filter-select { font-size: 12px; }
@media (max-width: 1024px) { .cmd-dp { grid-template-columns: 1fr; } }

/* command builder: concise Filters + Sort toolbar (mirrors the Fleet page) */
.cb-tools { display: flex; gap: 8px; margin: 9px 12px 2px; }
.cb-tools .fleet-fbtn { height: 34px; padding: 0 12px; font-size: 12.5px; border-radius: 9px; }
.cb-tools .fleet-fbtn svg { width: 14px; height: 14px; }
.cb-tools .fleet-pop { left: 0; right: auto; width: 360px; }
.cb-tools .fleet-sortpop { width: 210px; }
/* let the popover escape the available-devices pane (the pane itself clips its scroll list) */
.cmd-dp .dp-pane:has(.cb-tools) { overflow: visible; }
/* Command-builder Filters panel: render in-flow so it pushes the device list down
   (and spans the pane) instead of overlaying the rows as a narrow popover. */
.cmd-filters-panel { position: static; width: auto; max-width: none; margin: 8px 12px 2px; animation: none; box-sizing: border-box; }
.cmd-filters-panel .fp-grid { margin-bottom: 0; }
/* Keep the filter fields inside the (now narrower) picker pane. Without min-width:0
   a <select>'s intrinsic min-content width forces the grid tracks — and the whole
   pane — to overflow the builder's config column. */
.cmd-dp .dp-pane { min-width: 0; }
.cmd-filters-panel .fp-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.cmd-filters-panel .fp-field { min-width: 0; }
.cmd-filters-panel .fp-field select,
.cmd-filters-panel .fp-field input { width: 100%; min-width: 0; box-sizing: border-box; }

/* command-history show-more (device detail History tab) */
.ch-collapsed .ch-extra { display: none; }

/* users page */
.users-wrap { display: grid; grid-template-columns: 1fr 360px; gap: 16px; align-items: start; }
@media (max-width: 1024px) { .users-wrap { grid-template-columns: 1fr; } }
.user-list { display: flex; flex-direction: column; }
.user-row { display: grid; grid-template-columns: auto minmax(0,1fr) auto auto auto; gap: 14px; align-items: center;
  padding: 12px 18px; border-top: 1px solid var(--border-soft); }
.user-row:first-child { border-top: 0; }
.user-row:hover { background: var(--hover); }
.user-av { width: 34px; height: 34px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 15px; text-transform: uppercase; color: #fff; background: var(--accent-2); }
.role-av-admin { background: var(--accent); } .role-av-dev { background: var(--accent-2); }
.role-av-tester { background: var(--ok); } .role-av-operator { background: var(--warn); } .role-av-viewer { background: var(--text-faint); }
.user-id { min-width: 0; }
.user-name { font-weight: 600; font-size: 14px; }
.user-meta { margin-top: 1px; }
.role-chip { display: inline-flex; padding: 3px 10px; border-radius: 99px; font-size: 11.5px; font-weight: 700; text-transform: capitalize; }
.role-admin { background: var(--accent-soft); color: var(--accent-text); }
.role-dev { background: rgba(122,128,246,.14); color: #4b50c4; }
.role-tester { background: rgba(43,182,115,.13); color: #1c7d50; }
.role-operator { background: rgba(232,161,58,.15); color: #9a6512; }
.role-viewer { background: var(--surface2); color: var(--muted); }
html[data-theme="dark"] .role-dev { color: #a9adfb; }
.user-act { display: flex; align-items: center; gap: 8px; justify-content: flex-end; }
.user-role-sel { width: auto; padding: 5px 9px; font-size: 12px; }
.user-del { border: 0; background: none; color: var(--text-faint); font-size: 18px; line-height: 1; cursor: pointer; padding: 0 4px; }
.user-del:hover { color: var(--danger); }

/* commands browse list (Available pane) — Fleet-style rows */
.cb-list { padding: 4px 6px; }
.cb-row { display: grid; grid-template-columns: auto auto minmax(0,1fr) auto; gap: 11px; align-items: center;
  padding: 8px 9px; border-radius: 9px; cursor: pointer; }
.cb-row:hover { background: var(--hover); }
.cb-row input[type=checkbox] { width: 15px; height: 15px; flex: none; }
.cb-bat-na { background: var(--surface2); color: var(--muted); }
.cb-id { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.cb-serial { font-weight: 600; font-size: 13px; color: var(--accent-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cb-sub { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cb-status i { width: 7px; height: 7px; border-radius: 50%; background: var(--text-faint); display: inline-block; }
.cb-status i.on { background: var(--ok); }
.cmd-hint { color: var(--text-2, var(--text)); font-weight: 600; }

/* WLC states legend (battery chart) */
.wlc-bar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 8px 16px 0; }
/* The charge-strip legend, under the chart: tight to the strip above it. */
.wlc-bar--strip { padding: 2px 16px 8px; }

/* ============================================================================
   Global chrome v2 — top app bar + floating bottom dock (replaces the sidebar)
   ============================================================================ */
.appbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 12px 24px;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(10px);
  /* Own compositing layer — without it, this always-visible glass bar was one
     of the surfaces that flashed whenever another glass popover (e.g. the
     alerts dropdown) resized its content; see .toast for the full note. */
  will-change: backdrop-filter;
  border-bottom: 1px solid var(--border-soft);
}
.appbar-brand {
  font-family: var(--font); font-weight: var(--fw-semibold); font-size: 27px;
  letter-spacing: -0.01em; color: var(--text); flex: none;
}
.appbar-brand:hover { opacity: 0.85; }
.appbar-right { display: flex; align-items: center; gap: 10px; }

.appbar-icon {
  position: relative; width: 38px; height: 38px; flex: none;
  display: flex; align-items: center; justify-content: center;
  border-radius: 11px; border: 1px solid var(--border); background: var(--surface);
  color: var(--text-2); cursor: pointer; transition: border-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
.appbar-icon:hover { border-color: var(--rule-2); color: var(--text); }
.appbar-icon .ui-icon, .appbar-icon .ui-icon svg { width: 18px; height: 18px; }
.appbar-icon .nav-badge {
  position: absolute; top: -5px; right: -5px; min-width: 17px; height: 17px;
  padding: 0 4px; border-radius: 9px; border: 2px solid var(--bg); margin: 0;
}

.appbar-acct {
  display: flex; align-items: center; gap: 9px; height: 38px; padding: 0 6px 0 12px;
  border-radius: 11px; border: 1px solid var(--border); background: var(--surface); cursor: pointer;
  transition: border-color var(--dur) var(--ease);
}
.appbar-acct:hover { border-color: var(--rule-2); }
.appbar-acct .who { display: flex; flex-direction: column; text-align: right; line-height: 1.15; }
.appbar-acct .who .n { font-size: 12.5px; font-weight: var(--fw-semibold); color: var(--text); }
.appbar-acct .who .r { font-size: 10.5px; color: var(--muted); text-transform: capitalize; }
.appbar-acct .av {
  width: 26px; height: 26px; border-radius: 8px; flex: none;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #7a80f6, #f9674e); color: #fff;
  font-weight: 700; font-size: 12px; text-transform: uppercase;
}

/* dropdown shells */
.nbar-wrap { position: relative; }
.nbar-pop {
  position: absolute; top: calc(100% + 9px); right: 0; z-index: 50; width: 250px;
  background: rgba(255,255,255,.45); backdrop-filter: blur(18px) saturate(180%); -webkit-backdrop-filter: blur(18px) saturate(180%);
  border: 1px solid rgba(255,255,255,.29); border-radius: 16px;
  box-shadow: 0 14px 36px rgba(0,0,0,.21), inset 0 1px 0 rgba(255,255,255,.50); padding: 7px;
  animation: ov-rise 0.14s var(--ease) backwards;
  will-change: backdrop-filter;
}
html[data-theme="dark"] .nbar-pop { background: rgba(20,18,17,.45); border-color: rgba(255,255,255,.12); }
.nbar-pop[hidden] { display: none; }
.nbar-mhead { padding: 9px 11px 9px; border-bottom: 1px solid var(--border-soft); margin-bottom: 6px; }
.nbar-mhead .n { font-weight: var(--fw-semibold); font-size: 13px; color: var(--text); }
.nbar-mhead .e { font-size: 11.5px; color: var(--muted); text-transform: capitalize; }
.nbar-mi {
  width: 100%; display: flex; align-items: center; gap: 11px; padding: 9px 11px;
  border: 0; background: none; border-radius: 9px; font: inherit; font-size: 13px;
  color: var(--text); cursor: pointer; text-align: left; text-decoration: none;
}
.nbar-mi:hover { background: var(--hover); color: var(--text); }
.nbar-mi .ui-icon, .nbar-mi .ui-icon svg { width: 16px; height: 16px; color: var(--muted); }
.nbar-mi .nbar-mi-label { flex: 1; }
.nbar-mi .nbar-mi-rt, .nbar-mi .nbar-theme-state { margin-left: auto; font-size: 11px; color: var(--text-faint); }
.nbar-mi.danger, .nbar-mi.danger .ui-icon { color: var(--danger); }
.nbar-mi.danger:hover { background: var(--danger-bg); }
.nbar-sep { height: 1px; background: var(--border-soft); margin: 6px 4px; }

/* alerts dropdown list */
.nbar-alerts { width: 322px; }
/* Fixed height, not max-height: the "Loading…" placeholder and the real
   alert rows must occupy IDENTICAL outer dimensions, or swapping one for the
   other resizes .nbar-pop (a backdrop-filter surface) while it's visible —
   that resize, not just the swap itself, is what was triggering the
   blur-drops-and-reappears flicker (will-change alone didn't stop it because
   the layer still has to be re-snapshot when its own bounds change, isolated
   compositing or not). Scrolls internally instead of ever changing height. */
.nbar-al-list { height: 320px; overflow-y: auto; }
.nbar-pop-h { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-faint); padding: 7px 9px 8px; }
.nbar-al { display: flex; gap: 10px; padding: 9px 9px; border-radius: 9px; text-decoration: none; }
.nbar-al:hover { background: var(--hover); }
.nbar-al-dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 5px; flex: none; background: var(--muted); }
.nbar-al-dot.sev-critical { background: var(--danger); }
.nbar-al-dot.sev-warning { background: var(--warn); }
.nbar-al-dot.sev-info { background: var(--accent-2, #7a80f6); }
.nbar-al-main { min-width: 0; }
.nbar-al-t { display: block; font-size: 12.5px; font-weight: var(--fw-semibold); color: var(--text); }
.nbar-al-s { display: block; font-size: 11.5px; color: var(--muted); }
/* "View all" lives in the dropdown's header, which never scrolls; the copy at the end of
   the list would need a scroll past every alert to reach. */
.nbar-al-h { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.nbar-al-top { font-size: 12px; font-weight: var(--fw-semibold); letter-spacing: 0; text-transform: none; color: var(--accent-text); text-decoration: none; }
.nbar-al-top:hover { text-decoration: underline; }
.nbar-al-list .nbar-al-all { display: none; }
.nbar-al-all { display: block; text-align: center; font-size: 12px; font-weight: var(--fw-semibold); color: var(--accent-text); padding: 9px; border-top: 1px solid var(--border-soft); margin-top: 4px; text-decoration: none; }
.nbar-al-sec { font-size: 10px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--text-faint); padding: 8px 9px 3px; }

/* ── Friendly alert toasts (new critical alert) — top banner, liquid glass,
   same design as the plain .toast above (/demo/toasts direction C). ── */
#mdm-toasts { position: fixed; top: 16px; left: 50%; transform: translateX(-50%); z-index: 500; display: flex; flex-direction: column; align-items: center; gap: 10px; width: calc(100% - 40px); max-width: 460px; }
.mtoast {
  display: flex; gap: 12px; width: 100%;
  background: rgba(255, 255, 255, .45);
  -webkit-backdrop-filter: blur(4px) saturate(180%);
  backdrop-filter: blur(4px) saturate(180%);
  will-change: backdrop-filter; /* own compositing layer — see .toast for why */
  border: 1px solid rgba(255, 255, 255, .29);
  border-radius: 20px;
  box-shadow: 0 14px 36px rgba(0, 0, 0, .21), inset 0 1px 0 rgba(255, 255, 255, .5);
  padding: 12px 16px;
  animation: mtoast-in .32s cubic-bezier(.2,.7,.3,1);
}
html[data-theme="dark"] .mtoast { background: rgba(20, 18, 17, .45); border-color: rgba(255, 255, 255, .12); }
.mtoast.leaving { animation: mtoast-out .3s forwards; }
@keyframes mtoast-in { from { opacity: 0; transform: translateY(-14px); } to { opacity: 1; transform: none; } }
@keyframes mtoast-out { to { opacity: 0; transform: translateY(-14px); } }
.mtoast .mt-i { width: 32px; height: 32px; flex: none; border-radius: 9px; background: var(--danger-bg); position: relative; }
.mtoast .mt-i::after { content: "!"; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--danger); font-weight: 800; font-size: 17px; }
.mtoast .mt-m { min-width: 0; flex: 1; }
.mtoast .mt-t { font-size: 13.5px; font-weight: 700; color: var(--text); }
.mtoast .mt-s { font-size: 12px; color: var(--muted); margin-top: 1px; }
.mtoast .mt-a { display: flex; gap: 7px; margin-top: 9px; }
.mtoast .mt-b { font-size: 12px; font-weight: 600; padding: 5px 11px; border-radius: 7px; border: 1px solid var(--border); color: var(--muted); text-decoration: none; }
.mtoast .mt-b.p { border-color: transparent; background: var(--accent-fill); color: #fff; }
.mtoast .mt-x { flex: none; align-self: flex-start; background: none; border: none; color: var(--text-faint); font-size: 17px; line-height: 1; cursor: pointer; }
.nbar-al-empty { height: 100%; display: flex; align-items: center; justify-content: center; padding: 16px 11px; text-align: center; color: var(--muted); font-size: 12.5px; }

/* ── floating bottom-center dock — liquid glass over whatever's scrolled
   beneath it, coral ring kept for brand/visibility ── */
.dock {
  position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 45;
  display: flex; gap: 4px; padding: 7px;
  background: rgba(255, 255, 255, .45);
  -webkit-backdrop-filter: blur(4px) saturate(180%);
  backdrop-filter: blur(4px) saturate(180%);
  will-change: backdrop-filter; /* own compositing layer — see .toast for why */
  border: 1.5px solid rgba(255, 255, 255, .29); border-radius: 20px;
  box-shadow: 0 14px 36px rgba(0, 0, 0, .21), inset 0 1px 0 rgba(255, 255, 255, .5), 0 0 0 1.5px var(--accent-edge);
}
html[data-theme="dark"] .dock { background: rgba(20, 18, 17, .45); border-color: rgba(255, 255, 255, .12); }
.dock .nav-link {
  display: inline-flex; align-items: center; gap: 9px; padding: 10px 16px;
  border-radius: 11px; font-size: 13.5px; font-weight: var(--fw-semibold); color: var(--muted);
}
.dock .nav-link:hover { background: var(--surface2); color: var(--text); }
.dock button.nav-link { font: inherit; border: 0; background: none; cursor: pointer; }
.dock .nav-link.active { background: var(--accent-soft); color: var(--accent-text); }
/* Sized to its content. Anchored at left:50%, the dock is otherwise only allowed half
   the viewport, and once the live figures made it wider than that the links shrank
   below their content: the Fleet ring spilled out of its own highlight. */
.dock { width: max-content; max-width: calc(100vw - 24px); }
.dock > .nav-link { flex: none; white-space: nowrap; }
.dock .nav-link .ui-icon, .dock .nav-link .ui-icon svg { width: 17px; height: 17px; }


/* ── Your three ────────────────────────────────────────────────────────────────
   The three pages this browser opens most, injected before More (syncFrequent in
   layout.html). They are deliberately quieter than the four fixed links: no icon,
   smaller text, and a hairline separating "what everyone gets" from "what you
   built up". They are a shortcut, not a promotion to the same rank.

   Hidden below 860px. The dock is centre-floating and already drops its labels at
   719px; eight items do not fit a phone, and the palette is one tap away there.
   (This was 1024px, which hid them on ordinary laptop windows — the width where
   they are most wanted.) */
/* flex:none and nowrap: the dock is a flex row, and with eight items these were
   the ones that shrank — "Users" rendered as "Use…". A shortcut whose name is cut
   off is not a shortcut, so they always take their full width and the dock gets
   wider instead. When there is no room for that, they are hidden entirely (below). */
.dock .nav-link.js-freq {
  flex: none; white-space: nowrap;
  padding: 10px 13px; gap: 7px; font-size: 12.5px; font-weight: var(--fw-semibold);
  color: var(--text-faint);
}
/* A shade smaller than the four fixed links' 17px — same reason as the type:
   these are a shortcut, not a promotion to the same rank. */
.dock .nav-link.js-freq .ui-icon, .dock .nav-link.js-freq .ui-icon svg { width: 15px; height: 15px; }
.dock .nav-link.js-freq:hover { background: var(--surface2); color: var(--text); }
.dock .nav-link.js-freq.active { background: var(--accent-soft); color: var(--accent-text); }

/* One divider before the run, marking "what everyone gets" from "what you built
   up". It is its own element rather than a box-shadow on the first link: a shadow
   follows that link's 11px border-radius and drew a curved edge that read as a
   box around the group. */
.dock .dock-sep { flex: none; width: 1px; align-self: stretch; margin: 5px 5px; background: var(--border); }

/* Eight items with full labels need roughly 900px. Below that the dock would
   either overflow or start truncating again, and the palette is a click away. */
@media (max-width: 1000px) {
  .dock .nav-link.js-freq, .dock .dock-sep { display: none; }
}

/* ── "More" ────────────────────────────────────────────────────────────────────
   More does not open a menu. It opens the command palette in pages mode — the
   same object ⌘K opens, scoped to navigation.

   It was briefly a sectioned directory: four columns, 28 links, 520x268px
   hanging off a dock button. That fixed reachability (several pages had no
   inbound link at all) and created a surface that grows with every route we
   add. The palette does not: 28 pages or 60, it is a 400px column and three
   keystrokes. The directory markup still exists in layout.html as #page-index —
   hidden, never rendered, read by the palette for its page list, and still the
   place the server-side role guards live.

   Empty state in pages mode: recent pages, then the four sections as one row
   each, so browsing is still possible for someone who does not know what a page
   is called. Typing replaces it immediately. */
.cmdk-item-browse::after { content: ' ›'; font-size: 13px; letter-spacing: 0; }

@media (max-width: 640px) {
  .appbar { padding: 10px 14px; gap: 8px; }
  .appbar-brand { font-size: 22px; }
  .appbar-right { gap: 6px; }
  /* Touch targets: keep icons ≥40px on phones. */
  .appbar-icon { width: 40px; height: 40px; }
  .dock { left: 12px; right: 12px; transform: none; justify-content: space-around; bottom: 14px; width: auto; max-width: none; }
  .dock .nav-link { padding: 8px 6px; min-height: 46px; flex-direction: column; gap: 3px; font-size: 11px; }
  .appbar-acct .who { display: none; }
  .appbar-acct { height: 40px; padding: 0 6px; }
  /* Taller stacked dock — ensure page content clears it. */
  body.has-dock .container { padding-bottom: 92px; }
}
/* Very narrow phones: drop dock labels to guarantee all items fit. */
@media (max-width: 380px) {
  .dock .dock-lbl { display: none; }
  .dock .nav-link { padding: 10px 8px; }
}

/* ── Live dock ─────────────────────────────────────────────────────────────────
   Small live figures inside the dock links (layout.html, "Live dock"): the online
   ring on Fleet and the open-alert count on Alerts. */
.dock .dock-live { flex: none; }
.dock .dock-live[hidden] { display: none; }
.dock .dock-ring { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 650; color: var(--text-2);
  background: var(--surface-3); border-radius: 99px; padding: 1px 7px 1px 3px; font-variant-numeric: tabular-nums; }
.dock .dock-ring svg { width: 15px; height: 15px; }
.dock .dock-ring .trk { fill: none; stroke: var(--danger-bg); stroke-width: 2.6; }
.dock .dock-ring .val { fill: none; stroke: var(--ok); stroke-width: 2.6; }
.dock .dock-count { position: relative; min-width: 18px; height: 18px; padding: 0 5px; box-sizing: border-box; border-radius: 99px;
  display: inline-grid; place-items: center; font-size: 10.5px; font-weight: 750; font-variant-numeric: tabular-nums;
  background: var(--warn-bg); color: var(--warn); }
.dock .dock-count.crit { background: var(--danger); color: #fff; }
/* Pulses only while something is critical — a badge that always pulses gets tuned out. */
.dock .dock-count.crit::after { content: ""; position: absolute; inset: -2px; border-radius: inherit; border: 2px solid var(--danger); animation: dock-pulse 1.8s ease-out infinite; }
@keyframes dock-pulse { to { transform: scale(1.7); opacity: 0; } }
/* Phones stack icon over label: the figures become corner badges, and the ring
   drops its text. */
@media (max-width: 640px) {
  .dock .nav-link { position: relative; }
  .dock .dock-live { position: absolute; top: 2px; right: calc(50% - 22px); }
  .dock .dock-ring { padding: 0; background: none; }
  .dock .dock-ring .t { display: none; }
}

/* ── Search dock (nav.dock-s in layout.html) ───────────────────────────────────
   Destinations as an icon with its name underneath, and a search field that opens
   the ⌘K palette. Icons are outlines; the page you are on turns solid in the brand
   colour on a tint. The live figures sit on the icons: a ring round Fleet, a count
   on Alerts; hovering one shows its figure. */
.dock.dock-s { align-items: center; gap: 2px; padding: 6px; }
.dock-s > .nav-link { position: relative; flex-direction: column; justify-content: center; gap: 4px; height: 50px; min-width: 52px; padding: 0 8px; box-sizing: border-box; border-radius: 12px; }
.dock-s > .nav-link:hover { background: var(--surface2); }
.dock-s > .nav-link.active, .dock-s > .nav-link.js-freq.active { background: var(--accent-soft); color: var(--accent-text); }
.dock-s .dock-lbl { font-size: 10.5px; font-weight: 650; line-height: 1; white-space: nowrap; }
.dock-s > .nav-link.js-freq { padding: 0 8px; font-size: 10.5px; }
.dock-s .nav-link .ui-icon { position: relative; display: grid; place-items: center; }
.dock-s .nav-link .ui-icon, .dock-s .nav-link .ui-icon svg,
.dock-s .nav-link.js-freq .ui-icon, .dock-s .nav-link.js-freq .ui-icon svg { width: 19px; height: 19px; }
.dock-s .nav-link .ui-icon svg { fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.dock-s .ic-f { display: none; }
.dock-s .nav-link.active .ic-o { display: none; }
.dock-s .nav-link.active .ic-f { display: block; }
.dock-s .ic-f .fill { fill: currentColor; stroke: none; }
.dock-s .ic-f .cut { stroke: var(--surface); stroke-width: 1.9; }
/* Hover label: only when there is a figure to show. */
.dock-s > .nav-link[data-tip]::before { content: attr(data-tip); position: absolute; left: 50%; bottom: calc(100% + 10px); transform: translateX(-50%);
  background: var(--text); color: var(--bg); font-size: 11.5px; font-weight: 600; line-height: 1.3; padding: 3px 8px; border-radius: 5px; white-space: nowrap;
  opacity: 0; pointer-events: none; transition: opacity .1s; }
.dock-s > .nav-link[data-tip]:hover::before, .dock-s > .nav-link[data-tip]:focus-visible::before { opacity: 1; }
.dock-s .dock-sep { margin: 8px 4px; }
/* Live figures, on the icon (they live inside .ui-icon). */
.dock-s .dock-ring { position: absolute; top: 50%; left: 50%; right: auto; bottom: auto; transform: translate(-50%, -50%); pointer-events: none; }
.dock-s .dock-ring { width: 31px; height: 31px; padding: 0; background: none; border-radius: 50%; }
.dock-s .nav-link .ui-icon .dock-ring svg { width: 100%; height: 100%; } /* not the 19px icon size */
.dock-s .dock-ring .trk, .dock-s .dock-ring .val { stroke-width: 2.2; }
.dock-s .dock-ring .val { stroke-linecap: round; }
.dock-s .dock-count { position: absolute; top: -7px; right: -10px; left: auto; min-width: 16px; height: 16px; padding: 0 4px; font-size: 10px; box-shadow: 0 0 0 2px var(--surface); }
/* The search field is a button: it opens the palette, which does the searching. */
.dock-search { flex: none; display: flex; align-items: center; gap: 9px; width: 300px; height: 50px; margin-left: 6px; padding: 0 12px; box-sizing: border-box;
  border: 0; border-radius: 12px; background: var(--surface2); color: var(--text-faint); font: inherit; font-size: 13px; cursor: text; }
.dock-search:hover { color: var(--text-2); }
.dock-search svg { flex: none; width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; }
.dock-search .ph { flex: 1; min-width: 0; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dock-search kbd { font: 600 10.5px var(--mono); color: var(--muted); border: 1px solid var(--border); border-radius: 4px; padding: 1px 5px; background: var(--surface); }
.dock.island-on > .dock-search { opacity: 0; pointer-events: none; }
@media (max-width: 1024px) { .dock-search { width: 220px; } }
/* Dock in the header's glass (D2, picked 22 Oct 2026): the scrolled header's pill, 12px
   blur, fill and shadows, keeping the coral ring so the brand colour stays at the bottom
   of every page. Highlights, the search field and the island are pills to match. */
.dock.dock-s { border: 0; border-radius: 99px; padding: 6px 7px;
  background: rgba(255, 255, 255, .55);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  box-shadow: 0 0 0 1.5px var(--accent-edge), 0 4px 6px rgba(0, 0, 0, .04), 0 12px 40px rgba(0, 0, 0, .1), inset 0 1px 0 rgba(255, 255, 255, .6); }
html[data-theme="dark"] .dock.dock-s { background: rgba(10, 10, 20, .5);
  box-shadow: 0 0 0 1.5px var(--accent-edge), 0 4px 6px rgba(0, 0, 0, .12), 0 12px 40px rgba(0, 0, 0, .35), inset 0 1px 0 rgba(255, 255, 255, .12); }
.dock-s > .nav-link { min-width: 60px; border-radius: 99px; }
.dock-s .dock-search { border-radius: 99px; }
.dock.dock-s .dock-island { border-radius: 99px; }
/* Phones: the items share the width and the search shrinks to its icon. */
@media (max-width: 640px) {
  .dock-s > .nav-link { flex: 1; min-width: 0; padding: 0 2px; }
  .dock-s > .nav-link::before { display: none; }
  .dock-search { width: 46px; margin-left: 2px; padding: 0; justify-content: center; }
  .dock-search .ph, .dock-search kbd { display: none; }
}

/* ── Island ────────────────────────────────────────────────────────────────────
   A new critical alert turns the dock into a short notification (layout.html,
   "Island"), then it shrinks back. Dark in both themes on purpose. */
.dock .dock-island { position: absolute; left: 50%; bottom: 0; transform: translateX(-50%) scale(.96);
  width: max(100%, 460px); max-width: calc(100vw - 24px); min-height: 100%; box-sizing: border-box;
  display: flex; align-items: center; gap: 12px; padding: 12px 14px 12px 16px; border-radius: 22px;
  background: #0d0d12; color: #f4f4f6; box-shadow: 0 14px 36px rgba(0, 0, 0, .35);
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .35s cubic-bezier(.3, 1.3, .4, 1); }
.dock.island-on .dock-island { opacity: 1; transform: translateX(-50%) scale(1); pointer-events: auto; }
.dock > .nav-link, .dock > .dock-sep { transition: opacity .15s; }
.dock.island-on > .nav-link, .dock.island-on > .dock-sep { opacity: 0; pointer-events: none; }
.dock .di-i { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 91, 91, .18); color: #ff6b6b; }
.dock .di-i svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.dock .di-m { flex: 1; min-width: 0; }
.dock .di-t { display: block; font-size: 13px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dock .di-s { display: block; font-size: 11.5px; color: #a0a1ab; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dock .di-go { flex: none; font-size: 12px; font-weight: 650; background: #d83a3a; color: #fff; border-radius: 99px; padding: 6px 13px; text-decoration: none; }
.dock .di-go:hover { background: #c93636; }
.dock .di-x { flex: none; width: 28px; height: 28px; border: 0; border-radius: 50%; background: transparent; color: #a0a1ab; font-size: 18px; line-height: 1; cursor: pointer; }
.dock .di-x:hover { background: #262633; color: #fff; }
@media (prefers-reduced-motion: reduce) {
  .dock .dock-count.crit::after { animation: none; }
  .dock .dock-island, .dock > .nav-link { transition: none; }
}

/* ── Releases list — fleet-card row language ── */
.rlc-list { display: grid; grid-template-columns: 16px 40px minmax(0, 1.4fr) minmax(0, 1fr) auto auto; column-gap: 14px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; }
/* Rows share the list's column tracks (subgrid) so every progress bar lines up,
   including nested branch rows whose meta/action cells are near-empty. */
/* Offline kiosk-exit unlock code — authenticator-style live widget on the device page. */
.rlc { position: relative; grid-column: 1 / -1; display: grid; grid-template-columns: subgrid; align-items: center; column-gap: 14px; padding: 13px 16px; border-bottom: 1px solid var(--border-soft); }
/* Reported (not-yet-a-release) builds are hidden by default to reduce clutter;
   the "Show reported builds" toggle adds .show-reported to the list to reveal them. */
.rlc-list .rlc-reported { display: none; }
.rlc-list.show-reported .rlc-reported { display: grid; }
.rel-reported-toggle { display: inline-flex; align-items: center; gap: 7px; margin-top: 12px; font-size: 13px; color: var(--muted); cursor: pointer; user-select: none; }
.rel-reported-toggle input { cursor: pointer; }
.nb-details { grid-column: 1 / -1; }
.rlc:last-child { border-bottom: 0; }
.rlc:hover { background: var(--hover); }
.rlc.dragging { opacity: .5; }
.rlc-drag { cursor: grab; color: var(--text-faint); font-size: 13px; line-height: 1; user-select: none; }
.rlc-badge { width: 36px; height: 36px; border-radius: 10px; display: flex; align-items: center; justify-content: center; flex: none; }
.rlc-badge svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; }
.rlc-badge.ok { background: var(--ok-bg); color: var(--ok); }
.rlc-badge.draft { background: var(--warn-bg); color: var(--warn); }
.rlc-badge.muted { background: var(--surface2); color: var(--text-faint); }
.rlc-id { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.rlc-top { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
/* Release date pushed to the far right of the title row so dates line up in a column. */
.rlc-date { margin-left: auto; flex: none; }
.rlc-stat { font-size: 11px; font-weight: 600; text-transform: capitalize; white-space: nowrap; flex: none; }
.rlc-stat.ok { color: var(--ok); }
.rlc-stat.warn { color: var(--warn); }
.rlc-stat.danger { color: var(--danger); }
.rlc-stat.muted { color: var(--text-faint); }
.rlc-ver { font-family: var(--mono); font-size: 13.5px; font-weight: 700; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
a.rlc-ver:hover { color: var(--accent-h); text-decoration: underline; }
.rlc-sub { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rlc-roll { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.rlc-meter { height: 6px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.rlc-meter i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--accent-2), var(--accent)); }
.rlc-meter i.muted { background: var(--rule-2); }
.rlc-rollf { font-size: 11px; color: var(--muted); white-space: nowrap; }
.rlc-rollf b { color: var(--text); font-weight: 700; }
.rlc-cnt b { color: var(--text); }
.rlc-cnt:hover b { color: var(--accent-text); text-decoration: underline; }
.rlc-meta { display: flex; flex-direction: column; gap: 3px; align-items: flex-start; white-space: nowrap; }
.rchip { font-size: 10.5px; font-weight: 600; padding: 2px 7px; border-radius: 99px; }
.rchip.qa { background: var(--accent-soft); color: var(--accent-text); }
.rchip.ok { background: #e6f6ee; color: #1c7d50; }
.rchip.warn { background: var(--warn-bg); color: #9a6512; }
.rchip.bad { background: var(--danger-bg); color: var(--danger); }
.rchip.active { background: var(--accent-soft); color: var(--accent-text); }
.rchip.muted { background: var(--surface-3); color: var(--muted); }

/* ── Branch builds (off-mainline forks) — periwinkle accent ──────────────── */
.status-badge.branch { background: rgba(122,128,246,.16); color: #5b61d6; }
.rlc-badge.branch { background: rgba(122,128,246,.16); color: #5b61d6; }
.rchip.branch-merged { background: rgba(122,128,246,.16); color: #5b61d6; }
[data-theme="dark"] .rchip.branch-merged { color: #a6abfa; }
[data-theme="dark"] .status-badge.branch, [data-theme="dark"] .rlc-badge.branch { color: #a6abfa; }
.branch-banner { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 16px; padding: 11px 16px; border-radius: 10px; background: rgba(122,128,246,.10); border: 1px solid rgba(122,128,246,.30); font-size: 13px; line-height: 1.5; }
.branch-banner a { color: #5b61d6; }
[data-theme="dark"] .branch-banner a { color: #a6abfa; }
.bb-mark { color: #7a80f6; font-weight: 700; flex: none; }
.branch-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.branch-list { display: flex; flex-direction: column; }
.branch-row { display: flex; align-items: center; gap: 10px; padding: 10px 6px; border-top: 1px solid var(--border-soft); text-decoration: none; color: var(--text); border-radius: 6px; }
.branch-row:first-child { border-top: 0; }
.branch-row:hover { background: var(--surface2); }
.branch-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.branch-suggest { margin-bottom: 12px; padding: 10px 12px; border: 1px dashed rgba(122,128,246,.35); border-radius: 10px; background: rgba(122,128,246,.06); }
.branch-suggest-h { font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.branch-suggest-row { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-top: 1px solid var(--border-soft); }
.branch-suggest-row:first-of-type { border-top: 0; }

/* Branch builds nested under their parent in the releases list. */
/* Branch rows keep every column aligned with parents (subgrid); nesting is shown
   by the elbow connector drawn in the first (drag-handle) column, not a row shift. */
.rlc-child { position: relative; }
.rlc-child::before { content: ""; position: absolute; left: 23px; top: -9px; height: calc(50% + 9px); width: 21px; border-left: 2px solid rgba(122,128,246,.45); border-bottom: 2px solid rgba(122,128,246,.45); border-bottom-left-radius: 8px; }
.nb-details { margin: 0 0 8px 30px; }
.nb-summary { cursor: pointer; font-size: 12px; color: var(--muted); padding: 3px 2px; list-style: none; user-select: none; display: inline-flex; align-items: center; gap: 5px; }
.nb-summary::-webkit-details-marker { display: none; }
.nb-summary::marker { content: ""; }
.nb-summary:hover { color: var(--accent-text); }
.nb-details[open] .nb-summary { color: var(--text); font-weight: 600; }
.nb-mark { color: #7a80f6; font-weight: 700; }
.nb-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; padding: 8px 0 4px; }
.nb-name { flex: 1; min-width: 180px; }
.rlc-act { display: flex; align-items: center; gap: 6px; justify-self: end; flex-wrap: wrap; justify-content: flex-end; }
.rlc-act form { display: inline; margin: 0; }
.rlc-open { width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; color: var(--muted); flex: none; }
.rlc-open svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; }
.rlc-open:hover { border-color: var(--accent-edge); color: var(--accent-text); }
.rlc-open.disabled { opacity: .3; pointer-events: none; cursor: default; }
/* Release download + pencil-edit on the release detail page */
.qfil-ctl { display: inline-flex; align-items: center; gap: 6px; }
.qfil-edit { position: relative; display: inline-flex; }
.qfil-edit > summary { list-style: none; cursor: pointer; }
.qfil-edit > summary::-webkit-details-marker { display: none; }
.qfil-pencil { display: inline-flex; align-items: center; justify-content: center; }
.qfil-edit-pop { position: absolute; right: 0; top: calc(100% + 6px); z-index: 40; display: flex; flex-direction: column; gap: 9px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 10px 34px rgba(28,26,24,.18); padding: 12px; }
.qfil-remove { background: none; border: none; color: var(--danger); font-size: 12px; font-weight: 600; cursor: pointer; text-align: left; padding: 0; }
.qfil-remove:hover { text-decoration: underline; }
/* Subtle dismiss (×) tucked in the row's top-right corner, clear of the action icons. */
.rlc-x { position: absolute; top: 6px; right: 8px; margin: 0; z-index: 2; }
.rlc-x button { display: flex; align-items: center; justify-content: center; width: 19px; height: 19px; padding: 0; border: 0; background: transparent; border-radius: 5px; color: var(--text-faint); opacity: .35; cursor: pointer; transition: opacity .12s, color .12s, background .12s; }
.rlc:hover .rlc-x button { opacity: .6; }
.rlc-x button:hover { opacity: 1; color: var(--danger); background: var(--danger-bg); }
.rlc-x.rlc-del { right: 30px; } /* sit left of the hide button so they don't overlap */
.rlc-x svg { width: 11px; height: 11px; stroke: currentColor; stroke-width: 2.4; fill: none; }
@media (max-width: 760px) {
  .rlc-list { grid-template-columns: 16px 40px 1fr auto; }
  .rlc-roll, .rlc-meta { display: none; }
}

/* Deploy two-pane: selectable rows (override the .cb-row grid with flex) */
.dp-av { display: flex; align-items: center; gap: 11px; cursor: pointer; }
.dp-av .cb-id { flex: 1; }
.dp-av .dp-check { width: 18px; height: 18px; border-radius: 6px; border: 1.5px solid var(--border); flex: none; position: relative; }
.dp-av.sel { background: var(--accent-soft); }
.dp-av.sel .dp-check { background: var(--accent); border-color: var(--accent); }
.dp-av.sel .dp-check::after { content: ''; position: absolute; left: 5px; top: 2px; width: 5px; height: 9px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }

/* device detail: system-app tag (no uninstall) */
.app-systag { font-size: 10.5px; font-weight: 600; color: var(--text-faint); border: 1px solid var(--border); border-radius: 99px; padding: 2px 8px; white-space: nowrap; }

/* release detail: at-a-glance vitals (overview .ovx-stat cards, 5-up) */
/* .ovx-stat reads --ovx-r / --ovx-pad, which are scoped to .ovx — redeclare them
   here so the cards get the same radius/padding as the overview page. */
.rel-vitals { --ovx-r: 20px; --ovx-pad: 20px; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; }
.rel-vitals .ovx-stat:hover { transform: none; box-shadow: none; border-color: var(--border); cursor: default; }
@media (max-width: 920px) { .rel-vitals { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .rel-vitals { grid-template-columns: 1fr; } }

/* release problems: the status buttons on a problem card (Fixed here / Verified / Won't fix) */
.rp-pill { border: 0; background: none; font: inherit; font-size: 11.5px; font-weight: 600; color: var(--muted); padding: 5px 11px; border-radius: 6px; cursor: pointer; }
.rp-pill:hover { color: var(--text); }
.rp-pill.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.rchip-a { text-decoration: none; }

/* ── Release page: lifecycle pipeline ── */
.pipe { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); margin: 0 0 12px; padding: 22px 8px 18px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow-sm); }
.pipe::before { content: ""; position: absolute; left: calc(100%/8); right: calc(100%/8); top: 44px; height: 2px; background: var(--border); z-index: 0; }
.pipe.pipe-3 { grid-template-columns: repeat(3, 1fr); }
.pipe.pipe-3::before { left: calc(100%/6); right: calc(100%/6); }
.pipe .stage { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 9px; padding: 0 6px; }
.pipe .node { width: 44px; height: 44px; border-radius: 50%; background: var(--surface); border: 2px solid var(--border); display: flex; align-items: center; justify-content: center; color: var(--text-faint); }
.pipe .node svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.pipe .stage.done .node { background: var(--ok); border-color: var(--ok); color: #fff; }
.pipe .stage.now .node { background: var(--accent-fill); border-color: var(--accent-fill); color: #fff; box-shadow: 0 0 0 5px var(--accent-soft); }
.pipe .st-name { font-size: 12px; font-weight: 700; letter-spacing: .02em; }
.pipe .stage.todo .st-name { color: var(--text-faint); }
.pipe .stage.now .st-name { color: var(--accent-text); }
.pipe .stage.finish.todo .node { border-color: var(--p); color: var(--p); }
.pipe .stage.finish.todo .st-name { color: var(--p); }
.pipe .st-sub { font-size: 11px; color: var(--muted); }
.pipe-note { font-size: 12px; color: var(--muted); margin: 0 0 18px; padding-left: 2px; }
.pipe-note a { color: var(--accent-text); text-decoration: none; font-weight: 600; }
@media (max-width: 720px) { .pipe { grid-template-columns: 1fr 1fr; gap: 16px 0; } .pipe::before { display: none; } }

/* release two-column body */
.rel-cols { display: grid; grid-template-columns: 1fr 300px; gap: 20px; align-items: start; }
@media (max-width: 860px) { .rel-cols { grid-template-columns: 1fr; } }

/* package stack */
.pkg-stack { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.pkg { display: flex; align-items: center; gap: 12px; padding: 11px 13px; border: 1px solid var(--border); border-radius: 12px; }
.pkg.base { border-left: 3px solid var(--p); }
.pkg.inc { margin-left: 24px; border-left: 3px solid var(--warn); position: relative; }
.pkg.inc::before { content: ""; position: absolute; left: -15px; top: -9px; width: 13px; height: 26px; border-left: 2px solid var(--border); border-bottom: 2px solid var(--border); border-bottom-left-radius: 8px; }
.pkg .ptype { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding: 2px 8px; border-radius: 99px; white-space: nowrap; }
.pkg.base .ptype { background: var(--p-soft); color: var(--p); }
.pkg.inc .ptype { background: var(--warn-bg); color: var(--warn); }
.pkg .pmeta { flex: 1; min-width: 0; }
.pkg .pmeta b { font-size: 13px; font-weight: 650; }
.pkg .pmeta .u { display: block; font-family: var(--mono); font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-decoration: none; }
.pkg .pmeta .u:hover { color: var(--accent-text); }
.pkg .pwhen { white-space: nowrap; }
.pkg-x { border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 15px; padding: 2px 7px; border-radius: 6px; }
.pkg-x:hover { color: var(--danger); background: var(--danger-bg); }

/* package list — one dense row per artifact (see release_workspace.html) */
.pkg-tbl { width: 100%; border-collapse: collapse; font-size: 13px; margin-bottom: 16px; }
.pkg-tbl th { text-align: left; font-size: 10px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--text-faint); padding: 0 10px 7px 0; border-bottom: 1px solid var(--border); }
.pkg-tbl th.n, .pkg-tbl td.n { text-align: right; padding-right: 0; }
.pkg-tbl td { padding: 9px 10px 9px 0; border-bottom: 1px solid var(--border-soft); vertical-align: middle; }
.pkg-tbl tr:last-child td { border-bottom: 0; }
.pkg-tbl tr.yanked { opacity: .5; }
.pkg-tbl .applies { white-space: nowrap; }
.pkg-tbl .applies b { font-family: var(--mono); font-size: 12.5px; font-weight: 650; }
.pkg-tbl .applies .arr { color: var(--text-faint); margin: 0 7px; }
.pkg-tbl .applies .tgt { font-family: var(--mono); font-size: 12.5px; color: var(--muted); }
.pkg-tbl .dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 9px; vertical-align: 1px; }
.pkg-tbl tr.base .dot { background: var(--ok); }
.pkg-tbl tr.inc .dot { background: var(--warn); }
.pkg-tbl .full-tag { margin-left: 9px; font-size: 10px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; padding: 2px 7px; border-radius: 99px; background: var(--ok-bg); color: var(--ok); }
.pkg-tbl .full-tag.yank { background: var(--danger-bg); color: var(--danger); }
.pkg-tbl .art a { font-family: var(--mono); font-size: 11.5px; color: var(--muted); text-decoration: none; display: inline-block; max-width: 34ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }
.pkg-tbl .art a:hover { color: var(--accent-text); }
.pkg-tbl .pkg-x { opacity: 0; transition: opacity .12s; }
.pkg-tbl tr:hover .pkg-x, .pkg-tbl .pkg-x:focus { opacity: 1; }
@media (max-width: 720px) { .pkg-tbl .art { display: none; } .pkg-tbl th:nth-child(2) { display: none; } }

/* package composer */
.composer { border: 1px dashed var(--accent-edge); border-radius: 13px; padding: 15px; background: var(--accent-soft); }
/* A low-opacity warm tint over the dark surface reads as muddy brown rather
   than a highlight — use the plain elevated dark surface instead and let the
   dashed accent border carry the "highlighted" cue. */
html[data-theme="dark"] .composer { background: var(--surface2); }
.composer-h { font-size: 12.5px; font-weight: 700; margin-bottom: 11px; }
.tcards { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-bottom: 12px; }
.tcard { border: 1.5px solid var(--border); background: var(--surface); border-radius: 11px; padding: 10px 12px; cursor: pointer; text-align: left; transition: border-color .12s; }
.tcard:disabled { opacity: .55; cursor: not-allowed; }
.tcard.on { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.tcard .tt { font-size: 13px; font-weight: 700; display: flex; align-items: center; gap: 6px; }
.tcard .td { font-size: 11.5px; color: var(--muted); margin-top: 3px; line-height: 1.4; }
.tcard .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--border); }
.tcard.on .dot.b { background: var(--p); }
.tcard.on .dot.i { background: var(--warn); }
.composer .field { margin-bottom: 11px; }
.composer .field label { display: block; font-size: 11.5px; font-weight: 650; color: var(--muted); margin-bottom: 5px; }
.composer .sel { width: 100%; border: 1px solid var(--border); border-radius: 10px; padding: 9px 11px; font: inherit; font-size: 13px; background: var(--surface); color: var(--text); }
.composer .form-hint { font-size: 11px; color: var(--muted); margin-top: 4px; }
.urlbox { display: flex; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; background: var(--surface); }
.urlbox input { flex: 1; border: 0; padding: 10px 12px; font: inherit; font-size: 12.5px; font-family: var(--mono); background: transparent; outline: none; min-width: 0; }
.urlbox .verify { border: 0; border-left: 1px solid var(--border); background: var(--surface2); padding: 0 14px; font: inherit; font-size: 12.5px; font-weight: 650; cursor: pointer; color: var(--p); }
.urlbox .verify:hover { background: var(--surface-3); }
.detected-line { margin-top: 8px; font-size: 12px; min-height: 18px; }
.detected-line .pkg-ok { color: var(--ok); font-weight: 600; }
.detected-line .pkg-bad { color: var(--danger); font-weight: 600; }
.detected-line .pkg-chip { background: var(--surface2); border-radius: 99px; padding: 2px 9px; color: var(--muted); font-weight: 600; margin-left: 2px; }

/* QA readiness + rollout rail */
.rel-ready-top { display: flex; align-items: center; gap: 14px; }
.rel-donut { width: 74px; height: 74px; border-radius: 50%; flex: none; display: flex; align-items: center; justify-content: center; position: relative; }
.rel-donut::after { content: ""; position: absolute; width: 52px; height: 52px; border-radius: 50%; background: var(--surface); }
.rel-donut-c { position: relative; z-index: 1; font-size: 15px; font-weight: 750; }
.rel-verdict { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 700; }
.rel-verdict.ok { color: var(--ok); }
.rel-verdict.warn { color: var(--warn); }
.rel-verdict .d { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.rel-facts { margin-top: 14px; }
.rf { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; border-top: 1px solid var(--border-soft); font-size: 13px; }
.rf:first-child { border-top: 0; }
.rf .k { color: var(--muted); }
.rf .v { font-weight: 650; }
.rf .v.stat { font-family: var(--mono); }
.rf .v.ok { color: var(--ok); }
.rf .v.bad { color: var(--danger); }
.rel-deploy-row { display: flex; align-items: center; gap: 8px; padding: 9px 18px; border-top: 1px solid var(--border-soft); text-decoration: none; color: inherit; }
.rel-deploy-row:first-child { border-top: 0; }
.rel-deploy-row:hover { background: var(--surface2); }

/* Release problem reports */
.prob-form { display: flex; flex-direction: column; gap: 8px; padding: 14px; margin-bottom: 16px; background: var(--surface-2, var(--surface)); border: 1px solid var(--border); border-radius: 12px; }
/* Title input + textarea are direct children of the flex COLUMN. Override the
   global `.form-input { flex: 1 }` (meant for flex rows) so they stay full-width
   block fields instead of growing vertically / staying intrinsic-width. */
.prob-form > .form-input { flex: none; width: 100%; box-sizing: border-box; }
.prob-form-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.prob-form-row .form-input { flex: 1; min-width: 140px; }
.prob-form-row select.form-input { flex: 0 1 auto; }
.prob-list { display: flex; flex-direction: column; gap: 10px; }
.prob { padding: 12px 14px; border: 1px solid var(--border); border-radius: 10px; }
.prob.closed { opacity: .62; }
.prob-h { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.prob-title { font-weight: 600; font-size: 14px; flex: 1; min-width: 0; }
.prob-sev { font-size: 10px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; padding: 2px 7px; border-radius: 99px; }
.prob-sev.blocker { background: var(--danger-bg); color: var(--danger); }
.prob-sev.major   { background: var(--warn-bg); color: #9a6512; }
.prob-sev.minor   { background: var(--surface-3); color: var(--muted); }
.prob-status { font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; padding: 2px 8px; border-radius: 99px; background: var(--surface-3); color: var(--muted); }
.prob-status.st-open { background: var(--accent-soft); color: var(--accent-text); }
.prob-status.st-fixed { background: var(--warn-bg); color: #9a6512; }
.prob-status.st-verified { background: var(--ok-bg); color: var(--ok); }
.prob-status.st-failverify { background: var(--danger-bg); color: var(--danger); }
.prob-qa { font-size: 10px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--accent-2); background: var(--accent-2-soft); border-radius: 99px; padding: 2px 7px; }
.prob-desc { font-size: 13px; line-height: 1.5; color: var(--fg); white-space: pre-wrap; word-break: break-word; margin: 8px 0 6px; }
.prob-meta { font-size: 11.5px; color: var(--text-faint); }
.prob-actions { display: flex; align-items: center; gap: 6px; margin-top: 10px; }
.prob-resolved { font-size: 12px; color: var(--muted); margin-right: auto; }
.prob-failverify { font-size: 12px; font-weight: 600; color: var(--danger); margin-right: auto; }
.prob { position: relative; }
.prob-del { position: absolute; top: 6px; right: 8px; margin: 0; }
.prob-x { width: 20px; height: 20px; border-radius: 5px; border: none; background: transparent; display: flex; align-items: center; justify-content: center; color: var(--text-faint); cursor: pointer; padding: 0; font-size: 15px; line-height: 1; }
.prob-x:hover { color: var(--danger); background: var(--danger-bg); }
.prob-crashes { margin: 0 0 16px; padding: 10px 12px; border: 1px dashed var(--border); border-radius: 10px; }
.prob-crashes-h { font-size: 12px; font-weight: 600; margin-bottom: 8px; }
.prob-crash { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-top: 1px solid var(--border-soft); font-size: 12.5px; }
.prob-crash:first-of-type { border-top: 0; }
.prob-crash-kind { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: var(--danger); background: var(--danger-bg); padding: 2px 7px; border-radius: 99px; white-space: nowrap; }
.crash-count { font-size: 11px; font-weight: 700; color: var(--danger); background: var(--danger-bg); padding: 2px 7px; border-radius: 99px; white-space: nowrap; }
.crash-devs { white-space: nowrap; }
.crash-more { margin-top: 10px; }
.prob-crash-sum { flex: 1; min-width: 0; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prob-crash-when { white-space: nowrap; }
.prob-crash-trace { margin: 2px 0 6px; }
.prob-crash-trace > summary { cursor: pointer; user-select: none; padding: 2px 0; }
.prob-crash-trace .logcat-terminal { margin-top: 6px; max-height: 320px; overflow: auto; }
.trace-wrap { position: relative; }
.trace-copy { position: absolute; top: 8px; right: 8px; z-index: 2; opacity: .85; }
.trace-copy:hover { opacity: 1; }

/* ── Release problem trail + carried-over (Phase 2) ─────────────────────── */
.prob-carry { font-size: 10px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--accent-text); background: var(--accent-soft); border-radius: 99px; padding: 2px 7px; }
.prob-trail { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-top: 8px; font-size: 11px; color: var(--muted); }
.prob-trail .tr-step { padding: 1px 7px; border-radius: 99px; background: var(--surface-3); }
.prob-trail .tr-step b { font-weight: 600; }
.prob-trail .tr-step.fixed { background: var(--warn-bg); color: #9a6512; }
.prob-trail .tr-step.verified { background: var(--ok-bg); color: var(--ok); }
.prob-trail .tr-arrow { color: var(--text-faint); }
.carried-sec { margin-top: 18px; padding-top: 14px; border-top: 1px dashed var(--border); }
.carried-h { font-size: 12.5px; font-weight: 600; margin-bottom: 10px; }

/* ── Releases hub: focus band + cross-release problems board (Phase 3) ───── */
.hub-focus { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; padding: 16px 20px; margin: 4px 0 16px; background: var(--surface2); border: 1px solid var(--border-soft); border-radius: 14px; }
.hub-focus-main { flex: 1; min-width: 260px; display: flex; flex-direction: column; gap: 9px; }
.hub-eyebrow { font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-text); }
.hub-focus-ver { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.hub-focus-verlink { font-size: 18px; font-weight: 700; color: var(--text); text-decoration: none; }
.hub-focus-verlink:hover { color: var(--accent-text); }
.hub-qa-bar { min-width: 0; max-width: 420px; }
.hub-verdict { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 600; }
.hub-verdict .d { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.hub-verdict.ok { color: var(--ok); } .hub-verdict.warn { color: var(--warn); }
.hub-focus-stats { display: flex; gap: 20px; flex-wrap: wrap; }
.hub-stat { display: flex; flex-direction: column; gap: 2px; min-width: 62px; }
.hub-stat .n { font-size: 20px; font-weight: 700; line-height: 1; }
.hub-stat .k { font-size: 10.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
.hub-stat.bad .n { color: var(--danger); }
.hub-focus-cta { flex: none; }
.hub-list-h { font-size: 14px; font-weight: 700; margin: 22px 0 10px; color: var(--muted); }

/* Release train: the repeating ship -> test -> fix cycle, oldest -> newest. */
.rel-train { position: relative; display: flex; align-items: flex-start; gap: 0; flex-wrap: wrap; margin: 2px 0 14px; padding: 2px; overflow-x: auto; }
.rt-lines { position: absolute; left: 0; top: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; z-index: 0; }
.rt-lines path { fill: none; stroke: #7a80f6; stroke-width: 2.5; stroke-linecap: round; }
.rt-col { position: relative; z-index: 1; }
.rt-link { width: 26px; height: 2px; background: var(--border); flex: none; margin-top: 15px; }
.rt-col { display: inline-flex; flex-direction: column; align-items: center; flex: none; }
/* Branch forks hang below their build like a git graph. */
.rt-branches { position: relative; margin-top: 4px; padding-top: 11px; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.rt-branches::before { content: ""; position: absolute; top: 0; left: 50%; width: 2px; height: 11px; background: rgba(122,128,246,.5); transform: translateX(-50%); }
.rt-branch { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border: 1px solid rgba(122,128,246,.4); border-radius: 99px; background: rgba(122,128,246,.08); text-decoration: none; color: var(--text); white-space: nowrap; }
.rt-branch:hover { border-color: #7a80f6; }
.rt-branch-mark { color: #7a80f6; font-weight: 700; }
.rt-branch-ver { font-size: 11px; font-weight: 600; }
.rt-branch.merged { background: rgba(122,128,246,.16); border-color: #7a80f6; }
.rt-branch-into { font-size: 10.5px; font-weight: 700; color: #5b61d6; }
.rt-merge-in { color: #7a80f6; font-weight: 700; font-size: 12px; margin-left: 1px; }
.rt-node { display: inline-flex; align-items: center; gap: 7px; padding: 6px 11px; border: 1px solid var(--border-soft); border-radius: 99px; background: var(--surface); text-decoration: none; color: var(--text); white-space: nowrap; flex: none; }
.rt-node:hover { border-color: var(--accent); }

/* ── Lineage graph (commit-style: main spine + branch forks/merges) ── */
.collapsible-header .collapse-caret { transition: transform .15s; display: inline-block; }
.collapsible-header.open .collapse-caret { transform: rotate(90deg); }
.lineage-scroll { overflow-x: auto; padding: 20px 16px 10px; }
.lineage-svg { display: block; }
.lg-edge { stroke-width: 2; }
.lg-main { stroke: var(--rule-2, #d6d8e0); }
.lg-fork { stroke: rgba(122,128,246,.5); stroke-dasharray: 4 3; }
.lg-merge { stroke: #7a80f6; }
.lg-node { cursor: pointer; }
.lg-node:hover circle { stroke: #7a80f6; stroke-width: 2.5; }
.lg-label { font-size: 11px; font-weight: 700; fill: var(--text); font-family: var(--mono); }
.lg-blabel { fill: #5b61d6; font-size: 10.5px; }
[data-theme="dark"] .lg-blabel { fill: #a6abfa; }
.lg-sub { font-size: 9.5px; fill: var(--muted); text-transform: capitalize; }
.rt-node.active { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.rt-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--text-faint); flex: none; }
.rt-node.st-published .rt-dot { background: var(--ok); }
.rt-node.st-draft .rt-dot { background: var(--warn); }
.rt-ver { font-size: 12px; font-weight: 600; }
.rt-meta { font-size: 10.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .02em; }

/* Live pulse — signals the region auto-updates via SSE. */
.live-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); vertical-align: middle; margin-left: 2px; box-shadow: 0 0 0 0 var(--ok); animation: livepulse 2.4s ease-out infinite; }
@keyframes livepulse { 0% { box-shadow: 0 0 0 0 rgba(21,127,60,.4); } 70% { box-shadow: 0 0 0 6px rgba(21,127,60,0); } 100% { box-shadow: 0 0 0 0 rgba(21,127,60,0); } }
@media (prefers-reduced-motion: reduce) { .live-dot { animation: none; } }

.hub-board { margin-bottom: 8px; }
.board-list { display: flex; flex-direction: column; }
.board-row { display: flex; align-items: center; gap: 10px; padding: 9px 6px; border-top: 1px solid var(--border-soft); text-decoration: none; color: var(--text); font-size: 13px; border-radius: 6px; }
.board-row:first-child { border-top: 0; }
.board-row:hover { background: var(--surface2); }
.board-row.closed { opacity: .55; }
.board-title { flex: 1; min-width: 0; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board-ver { font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.board-row .tr-step.fixed { font-size: 10.5px; padding: 1px 6px; border-radius: 99px; background: var(--warn-bg); color: #9a6512; white-space: nowrap; }
.board-when { white-space: nowrap; flex: none; }
/* Board filter is a class on the list container — no JS needed for the default view. */
.board-list.filter-open .board-row[data-open="0"] { display: none; }
.board-list.filter-blocker .board-row:not([data-severity="blocker"]) { display: none; }
.board-list.filter-blocker .board-row[data-open="0"] { display: none; }
@media (max-width: 640px) {
  .board-ver, .board-when { display: none; }
  .hub-focus-cta { width: 100%; }
  .hub-focus-cta .btn-primary { width: 100%; justify-content: center; }
}
/* Tab count badge (QA / Problems tabs). Hidden when the inner pill is empty. */
.dd-tab .tab-badge { display: inline-flex; margin-left: 3px; vertical-align: middle; }
.dd-tab .tab-badge:empty { display: none; }
.dd-tab-n { font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--danger); background: var(--danger-bg); border-radius: 99px; padding: 1px 7px; }

/* device detail: Install app form (Applications tab) */
.app-install { border-bottom: 1px solid var(--border-soft); }
.app-install[hidden] { display: none; }

/* device detail: hero Kiosk pill → config popover */
.ddc-chip-btn { cursor: pointer; font: inherit; }
.ddc-chip-btn.on { background: var(--accent-soft); color: var(--accent-text); border-color: transparent; }
.ddc-kcaret { width: 12px; height: 12px; opacity: .7; }
.ddc-kpop-wrap { position: relative; display: inline-flex; }
.ddc-kpop { position: absolute; top: calc(100% + 8px); left: 0; z-index: 60; width: 300px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 13px;
  box-shadow: var(--shadow-pop); padding: 14px; animation: ov-rise 0.14s var(--ease) backwards; }
.ddc-kpop[hidden] { display: none; }
.ddc-kpop-h { font-size: 13px; font-weight: 700; margin-bottom: 10px; }
.ddc-kpop .form-row { margin-bottom: 12px; }
.ddc-kpop .form-label { font-size: 11.5px; font-weight: 600; color: var(--muted); margin-bottom: 5px; display: block; }

/* device-cards roster: remove action button */
.dl-remove { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px;
  border: 1px solid var(--border); background: var(--surface); border-radius: 8px; color: var(--text-faint); cursor: pointer; }
.dl-remove:hover { border-color: var(--danger-edge); color: var(--danger); background: var(--danger-bg); }

/* kiosk popover: enable/disable toggle row */
.ddc-kpop-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.kiosk-sw { position: relative; display: inline-block; width: 42px; height: 24px; flex: none; cursor: pointer; }
.kiosk-sw input { opacity: 0; width: 0; height: 0; }
.kiosk-sw .kiosk-sw-tr { position: absolute; inset: 0; border-radius: 99px; background: var(--surface-3); transition: background .15s; }
.kiosk-sw .kiosk-sw-kn { position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: var(--shadow-sm); transition: left .15s; }
.kiosk-sw input:checked + .kiosk-sw-tr { background: var(--accent); }
.kiosk-sw input:checked + .kiosk-sw-tr .kiosk-sw-kn { left: 21px; }
.kiosk-need { border-color: var(--accent) !important; box-shadow: var(--ring); }

/* device detail: app being installed (in-flight) */
.app-row.app-installing { background: var(--accent-soft); }
.app-installing-tag { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 600;
  color: var(--accent-text); white-space: nowrap; }
.app-dup { display: inline-block; font-size: 10.5px; font-weight: 600; color: var(--text-faint);
  border: 1px solid var(--border); border-radius: 99px; padding: 1px 6px; vertical-align: middle; }
.app-spin { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--accent-edge); border-top-color: var(--accent);
  animation: app-spin 0.7s linear infinite; flex: none; }
@keyframes app-spin { to { transform: rotate(360deg); } }

/* ── Actions history: day-grouped timeline, one line per row. Shared by /commands
   and the standalone /commands/history page. Status buckets (hgrp-h) carry the
   priority hierarchy; day headers (hist-day) carry the chronological one — each
   row then sheds every column it doesn't need instead of a fixed grid. ── */
.hgrp-h{display:flex;align-items:center;gap:8px;font-size:11px;font-weight:700;letter-spacing:.5px;text-transform:uppercase;padding:14px 18px 6px;color:var(--text-faint);}
.hgrp-h svg{width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:2.2;flex:none;}
.hgrp-h .cnt{color:var(--text-faint);font-weight:700;}
.hgrp-h.attn{color:var(--danger);}
.hgrp-h.prog{color:var(--accent-2);}
.hgrp-h.done{color:var(--text-faint);}
.hist-day{padding:10px 18px 4px;font-size:10.5px;font-weight:750;text-transform:uppercase;letter-spacing:.06em;color:var(--text-faint);}
.htrow{display:flex;align-items:center;gap:11px;padding:9px 18px;border-top:1px solid var(--border-soft);}
.htrow:hover{background:var(--surface2);}
.htrow .ht-chip{display:none;} /* the Jobs page (J1) shows it as a column */
/* Timeline rail dot (replaces the old icon-box per row, matching the chosen
   history-hierarchy demo exactly): a small state dot with a hairline connecting
   it to the next row, drawn via the wrapper's own padding so it reads as one
   continuous rail down the list without needing a separate wrapping container
   per day group. */
.ht-dotwrap{width:18px;flex:none;display:flex;justify-content:center;align-items:flex-start;padding-top:5px;position:relative;align-self:stretch;}
.ht-dotwrap::before{content:"";position:absolute;top:-9px;bottom:-9px;left:50%;width:1px;background:var(--border-soft);transform:translateX(-50%);}
.ht-dotwrap .dot{position:relative;z-index:1;width:7px;height:7px;border-radius:99px;background:var(--text-faint);flex:none;}
.ht-dotwrap .dot.ok{background:var(--ok);}
.ht-dotwrap .dot.fail{background:var(--danger);}
.ht-dotwrap .dot.run{background:var(--accent-2);}
.ht-body{flex:1;min-width:0;display:flex;align-items:baseline;gap:9px;flex-wrap:wrap;}
.ht-title{font-size:13.5px;font-weight:650;color:inherit;text-decoration:none;flex:none;}
.ht-title:hover{color:var(--accent-text);}
.ht-meta{font-size:12px;color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0;}
.ht-by{font-size:12px;color:var(--text-faint);flex:none;white-space:nowrap;display:inline-flex;align-items:center;gap:5px;}
/* avatar bubble: initial, or a small subtle picture; used next to author names */
.ubub{display:inline-flex;align-items:center;justify-content:center;width:18px;height:18px;border-radius:50%;flex:none;overflow:hidden;background:var(--surface-3,var(--surface2));color:var(--text-2,var(--muted));font-size:10px;font-weight:750;text-transform:uppercase;line-height:1;vertical-align:middle;position:relative;top:-1px;box-shadow:inset 0 0 0 1px var(--border);font-family:var(--font);}
.ubub:not(:first-child){margin-left:5px;}
.ubub img{width:100%;height:100%;object-fit:cover;display:block;opacity:.92;}
.ad-by{display:inline-flex;align-items:center;gap:6px;}
/* role-locked: visible but unusable for the viewer's role (see layout.html guard) */
/* ── Role-locked controls ──────────────────────────────────────────────────────
   A control the viewer's role cannot use. It stays on the page (so people can see
   what the product does, and what to ask for) but must READ as locked.

   It used to be opacity:.45, which put the label around 2:1 against the card —
   under the 4.5:1 floor, and indistinguishable from this app's own pending and
   disabled states. The meaning now sits in a padlock and a muted-but-legible
   colour instead of in transparency. aria-disabled and the spoken reason are
   stamped on by the guard in layout.html. */
.role-locked,.role-locked *{cursor:not-allowed !important}
.role-locked{
  opacity:1 !important;filter:none;pointer-events:auto;
  color:var(--muted) !important;
  background:var(--surface2) !important;
  border-color:var(--border) !important;
  box-shadow:none !important;
}
.role-locked svg,.role-locked .ui-icon{opacity:.7}
/* The padlock is a generated glyph so no call site has to add markup for it. */
.role-locked::after{
  content:'';display:inline-block;flex:none;width:11px;height:11px;margin-left:6px;
  vertical-align:-1px;background-color:currentColor;opacity:.85;
  -webkit-mask:var(--lock-mask) center/11px 11px no-repeat;mask:var(--lock-mask) center/11px 11px no-repeat;
}
:root{
  --lock-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='10.5' width='16' height='10.5' rx='2.5'/%3E%3Cpath d='M7.5 10.5V7a4.5 4.5 0 0 1 9 0v3.5'/%3E%3C/svg%3E");
}
/* Locked table rows / cards are not inline controls — no glyph, just the wash. */
tr.role-locked::after,.role-locked.no-lock-glyph::after{content:none}
.role-locked:focus-visible{outline:none;box-shadow:var(--ring)}
#role-lock-toast{position:fixed;left:50%;bottom:92px;transform:translate(-50%,12px);background:var(--text);color:var(--bg);padding:10px 16px;border-radius:10px;font-size:13px;font-weight:600;opacity:0;transition:opacity .18s,transform .18s;z-index:3000;pointer-events:none;box-shadow:0 12px 30px rgba(0,0,0,.25)}
#role-lock-toast.show{opacity:1;transform:translate(-50%,0)}
.ht-auto{font-size:12px;color:var(--text-faint);flex:none;white-space:nowrap;font-style:italic;}
.appbar-acct .av{overflow:hidden;}.appbar-acct .av .av-img{width:100%;height:100%;object-fit:cover;display:block;}
.ht-meta .sep{display:inline-block;width:3px;height:3px;border-radius:50%;background:var(--rule-2);margin:0 7px;vertical-align:middle;}
.ht-meta .pd{display:inline-block;width:6px;height:6px;border-radius:99px;background:var(--accent-2);animation:tlpulse 1.2s ease-in-out infinite;margin-right:5px;}
@keyframes tlpulse{0%,100%{opacity:1}50%{opacity:.25}}
.ht-fail{color:var(--danger);font-weight:600;}
.ht-when{flex:none;font-size:11px;color:var(--text-faint);white-space:nowrap;}
.hact{flex:none;display:flex;align-items:center;gap:8px;}
.hact form{display:inline;margin:0;}
.hmore{display:block;padding:9px 18px 11px;font-size:12px;font-weight:600;color: var(--accent-text);text-decoration:none;border-top:1px solid var(--border-soft);background:var(--surface);}
.hmore:hover{background:var(--surface2);}
.hretry{font-size:11.5px;font-weight:650;color: var(--accent-text);border:1px solid var(--accent-edge);background:var(--surface);border-radius:8px;padding:5px 11px;cursor:pointer;display:inline-flex;align-items:center;gap:6px;}
.hretry:hover{background:var(--accent-soft);}
.hretry svg{width:13px;height:13px;fill:none;stroke:currentColor;stroke-width:2;}
.htrow .cmd-del{border:none;background:none;color:var(--text-faint);font-size:16px;line-height:1;cursor:pointer;padding:2px 5px;border-radius:6px;}
.htrow .cmd-del:hover{color:var(--danger);background:var(--danger-bg);}
@media (max-width:640px){.htrow{flex-wrap:wrap;}.ht-when{order:1;margin-left:auto;}.hact{order:2;}.ht-body{order:3;flex-basis:100%;}}

/* History-page status context tabs */
.hist-tabs{display:flex;gap:6px;flex-wrap:wrap;margin-bottom:14px;}
.hist-tab{display:inline-flex;align-items:center;gap:7px;padding:7px 13px;border:1px solid var(--border);border-radius:9px;background:var(--surface);font-size:13px;font-weight:600;color:var(--muted);text-decoration:none;}
.hist-tab:hover{background:var(--surface2);}
.hist-tab.on{border-color:transparent;background:var(--accent-soft);color: var(--accent-text);}
.hist-tab .cnt{font-size:11.5px;color:var(--text-faint);font-weight:700;}
.hist-tab.on .cnt{color: var(--accent-text);}

/* History empty-state row + the "Clear all" (dismiss) control */
.hist-empty{padding:14px 18px;font-size:12.5px;color:var(--muted);border-top:1px solid var(--border-soft);}
.hclear{font-size:11px;font-weight:650;color:var(--muted);border:1px solid var(--border);background:var(--surface);border-radius:7px;padding:4px 10px;cursor:pointer;text-transform:none;letter-spacing:0;}
.hclear:hover{border-color:var(--danger-edge);color:var(--danger);background:var(--danger-bg);}


/* A swapped-in page waiting for its own stylesheet. */
main.css-wait,.css-wait{visibility:hidden;}


/* ════════════════════════════════════════════════════════
   FLEET HEALTH · Ops Split (hero + ranked list · evidence feed)
   ════════════════════════════════════════════════════════ */
.hl-hero { display: flex; align-items: center; gap: 22px; margin-bottom: 16px;
  background: linear-gradient(120deg, var(--surface), var(--surface2));
  border: 1px solid var(--border);
  border-radius: var(--r-4); padding: 18px 22px; box-shadow: var(--shadow-sm); }
.hl-ring { position: relative; flex: none; width: 84px; height: 84px; }
.hl-ring .trk { fill: none; stroke: var(--border); stroke-width: 8; }
.hl-ring .val { fill: none; stroke-width: 8; stroke-linecap: round; stroke: var(--muted); }
.hl-hero.is-ok .hl-ring .val { stroke: var(--ok); }
.hl-hero.is-warn .hl-ring .val { stroke: var(--warn); }
.hl-hero.is-danger .hl-ring .val { stroke: var(--danger); }
.hl-ring-num { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 24px; font-weight: 700; font-variant-numeric: tabular-nums; }
.hl-hero.is-ok .hl-ring-num { color: var(--ok); }
.hl-hero.is-warn .hl-ring-num { color: var(--warn); }
.hl-hero.is-danger .hl-ring-num { color: var(--danger); }
.hl-htxt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.hl-eyebrow { font-size: 10.5px; text-transform: uppercase; letter-spacing: .07em; color: var(--text-faint); font-weight: 600; }
.hl-verdict { font-size: 18px; font-weight: 700; letter-spacing: -.01em; }
.hl-sub { font-size: 13px; color: var(--muted); }
.hl-kpis { margin-left: auto; display: flex; gap: 22px; }
.hl-kpi { display: flex; flex-direction: column; gap: 4px; text-align: left; }
.hl-kpi .v { font-size: 21px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1; color: var(--text); }
.hl-kpi .v.ok { color: var(--ok); } .hl-kpi .v.warn { color: var(--warn); } .hl-kpi .v.bad { color: var(--danger); }
.hl-kpi .k { font-size: 11px; color: var(--muted); }
.hl-kpi:hover .v { color: var(--accent-text); }
.hl-toggle { flex: none; align-self: flex-start; }
@media (max-width: 860px) { .hl-hero { flex-wrap: wrap; } .hl-kpis { margin-left: 0; width: 100%; order: 3; } .hl-toggle { order: 2; } }

.spacer-l { margin-left: auto; }

/* split */
.hl-split { display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; align-items: start; }
@media (max-width: 980px) { .hl-split { grid-template-columns: 1fr; } }

/* ranked restaurant rows */
.hl-row { display: grid; grid-template-columns: 118px minmax(0,1.4fr) repeat(4, minmax(0,1fr));
  gap: 12px; align-items: center; padding: 11px 18px; border-bottom: 1px solid var(--border-soft);
  color: var(--text); transition: background var(--dur) var(--ease); }
.hl-row:last-child { border-bottom: 0; }
a.hl-row:hover { background: var(--hover); }
.hl-row-head { padding-top: 10px; padding-bottom: 10px; }
.hl-row-head span { font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-faint); font-weight: 600; }
.hl-row .num { text-align: right; }
.hl-scorewrap { display: flex; align-items: center; gap: 9px; }
.hl-scorebar { flex: 1; height: 6px; border-radius: 99px; background: var(--border); overflow: hidden; }
.hl-scorebar i { display: block; height: 100%; border-radius: 99px; background: var(--muted); }
.hl-scorebar i.ok { background: var(--ok); } .hl-scorebar i.warn { background: var(--warn); } .hl-scorebar i.danger { background: var(--danger); }
.hl-scoren { font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; min-width: 20px; text-align: right; }
.hl-scoren.ok { color: var(--ok); } .hl-scoren.warn { color: var(--warn); } .hl-scoren.danger { color: var(--danger); } .hl-scoren.muted { color: var(--text-faint); }
.hl-rname { font-size: 13.5px; font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hl-rname .s { display: block; font-size: 11.5px; font-weight: 400; color: var(--muted); }
.hl-cell { font-size: 13px; font-variant-numeric: tabular-nums; color: var(--text-2); }
.hl-cell b.bad { color: var(--danger); } .hl-cell .warn { color: var(--warn); }
.hl-cell .u { color: var(--text-faint); font-size: 11px; }
.hl-cell .muted { color: var(--text-faint); }

/* evidence feed */
.hl-feed { display: flex; flex-direction: column; }
.hl-evcat { display: flex; align-items: center; gap: 8px; padding: 9px 18px; background: var(--surface2);
  border-bottom: 1px solid var(--border-soft); font-size: 11px; text-transform: uppercase; letter-spacing: .06em;
  color: var(--muted); font-weight: 700; }
.hl-evcat .c { margin-left: auto; color: var(--text-faint); }
.hl-ev { display: flex; gap: 11px; padding: 11px 18px; border-bottom: 1px solid var(--border-soft); }
.hl-ev:last-child { border-bottom: 0; }
.hl-ev .dot { margin-top: 5px; }
.hl-ev .evb { min-width: 0; flex: 1; }
.hl-ev .t1 { font-size: 13px; }
.hl-ev .t1 .sm { color: var(--text-2); }
.hl-ev .t2 { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.hl-sev { flex: none; align-self: flex-start; font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .04em; padding: 2px 7px; border-radius: 5px; }
.hl-sev.c { background: rgba(180,35,24,.11); color: var(--danger); }
.hl-sev.w { background: rgba(180,83,9,.13); color: var(--warn); }
.hl-sev.m { background: var(--surface2); color: var(--muted); }
.hl-allclear { display: flex; align-items: center; gap: 13px; padding: 26px 20px; }
.hl-check { width: 34px; height: 34px; flex: none; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: var(--ok-soft, rgba(21,127,60,.12)); color: var(--ok); }
.hl-check svg { width: 18px; height: 18px; }
.hl-allclear .t { font-size: 14px; font-weight: 600; }
.hl-allclear .d { font-size: 12.5px; color: var(--muted); }

/* severity dots shared by the feed */
.hl-evidence .dot, .hl-evcat .dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; }
.d-bad { background: var(--danger); } .d-warn { background: var(--warn); } .d-muted { background: var(--text-faint); }


/* ══════════════════════════════════════════════════════════
   Responsive · phone row-grid relaxation (≤640px)
   Dense multi-column list rows wrap or shed low-value columns
   so nothing overflows on phones. Rows that already collapse
   (.rel-row@820, .rlc@760, .qa-row@720, .htrow@640) and the
   container-query fleet cards (.dl-card) keep their own rules.
   ══════════════════════════════════════════════════════════ */
@media (max-width: 640px) {
  /* Commands list: identity grows; status chip / time / delete wrap below. */
  .cmd-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
  .cmd-row .cmd-main { flex: 1 1 58%; min-width: 0; }

  /* Users list: avatar + identity on the first line; role + actions wrap. */
  .user-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
  .user-row .user-id { flex: 1 1 55%; min-width: 0; }
  .user-row .user-act { margin-left: auto; }

  /* Fleet-health ranked table: keep Score/Restaurant/Offline/Battery;
     drop the two least-critical metric columns (Charging, Max °C). */
  .hl-row { grid-template-columns: 92px minmax(0, 1fr) auto auto; gap: 10px; padding: 11px 14px; }
  .hl-row > :nth-child(5), .hl-row > :nth-child(6) { display: none; }

  /* Wide data tables (nowrap headers) scroll sideways inside their card
     instead of forcing the whole page to scroll. Cards otherwise clip
     (overflow:hidden); relax that only when they hold a raw table. */
  .card:has(> .table),
  .card:has(> table) { overflow-x: auto; -webkit-overflow-scrolling: touch; }
}

/* ── Global reduced-motion safety net (WCAG 2.3.3 / 2.2.2) ──────────────────────
   The app gates most animations individually, but the overview entrance motion
   (ov-rise, ovx-grow, dvp-in), infinite decorative pulses (ovx-pulse), the error
   toast slide (mtoast-in/out), and a few inline template keyframes were not covered.
   This catch-all neutralises any remaining animation/transition for users who ask
   for reduced motion — entrance animations that use fill-mode `both`/`forwards` snap
   straight to their final (visible, in-place) state, so nothing is hidden. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ── Changelog media gallery + "What's new" popup ─────────────────────────── */
/* Screenshot/gif grid shown on the changelog page and in the What's new popup. */
.cl-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 4px 0 14px;
}
.cl-shot { margin: 0; min-width: 0; }
.cl-shot-wide { grid-column: 1 / -1; }
.cl-shot-link {
  display: block;
  border: 1px solid var(--border);
  border-radius: var(--r-3, 10px);
  overflow: hidden;
  background: var(--surface2, var(--surface));
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.cl-shot-link:hover { border-color: var(--accent); box-shadow: var(--shadow-pop); }
.cl-shot img { display: block; width: 100%; height: auto; }
.cl-shot figcaption {
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 5px;
  line-height: 1.4;
}
@media (max-width: 560px) {
  .cl-gallery { grid-template-columns: 1fr; }
  .cl-shot-wide { grid-column: auto; }
}

/* Release push pane: group/restaurant target chips. */
.push-tgt-list { display: flex; flex-wrap: wrap; gap: 6px; max-height: 150px; overflow-y: auto; }
.push-tgt-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; font-size: 12.5px; cursor: pointer;
  border: 1px solid var(--border); border-radius: 999px; background: var(--surface);
  transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease);
}
.push-tgt-chip:hover { border-color: var(--accent); }
.push-tgt-chip:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.push-tgt-chip input { margin: 0; }

/* ════════════════════════════════════════════════════
   COMMAND-CENTER COMPONENTS (cc-*) — shared page language
   introduced with the Overview redesign. Every page uses
   these for its header, KPI strip, cards, chips, empties.
   ════════════════════════════════════════════════════ */
.cc-wrap{max-width:var(--page-max);margin:0 auto}
.cc-tnum{font-variant-numeric:tabular-nums}

/* page top bar: eyebrow · headline · subtitle | actions */
.cc-top{display:flex;align-items:flex-start;justify-content:space-between;gap:24px;margin-bottom:18px}
.cc-top>div:first-child{flex:1;min-width:0}
.cc-eyebrow{font-size:10.5px;font-weight:700;text-transform:uppercase;letter-spacing:.08em;color:var(--text-faint);display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.cc-live{display:inline-flex;align-items:center;gap:6px;font-size:10.5px;font-weight:700;letter-spacing:.06em;color:var(--ok);text-transform:uppercase}
.cc-live .dot{width:6px;height:6px;border-radius:50%;background:var(--ok);animation:ccpulse 2s infinite}
@keyframes ccpulse{0%{box-shadow:0 0 0 0 rgba(21,127,60,.45)}70%{box-shadow:0 0 0 6px rgba(21,127,60,0)}100%{box-shadow:0 0 0 0 rgba(21,127,60,0)}}
.cc-h1{font-size:26px;font-weight:750;letter-spacing:-.022em;margin:6px 0 0;line-height:1.15}
.cc-h1 .hl{color:var(--accent-text)}.cc-h1 .hl.ok{color:var(--ok)}.cc-h1 .hl.warn{color:var(--warn)}.cc-h1 .hl.danger{color:var(--danger)}
.cc-sub{font-size:13.5px;color:var(--muted);margin-top:6px;max-width:78ch;line-height:1.5}
.cc-sub b{color:var(--text);font-weight:650}
.cc-actions{display:flex;gap:8px;flex-wrap:wrap;align-items:center;justify-content:flex-end;flex:none;padding-top:20px}
@media(max-width:1000px){.cc-top{flex-direction:column;gap:14px}.cc-actions{padding-top:0;justify-content:flex-start}}
.cc-btn{display:inline-flex;align-items:center;gap:7px;font:inherit;font-size:12.5px;font-weight:650;padding:8px 13px;border-radius:10px;border:1px solid var(--border);background:var(--surface);color:var(--text-2);text-decoration:none;box-shadow:var(--shadow-sm);cursor:pointer;transition:border-color var(--dur),background var(--dur);white-space:nowrap}
.cc-btn:hover{border-color:var(--rule-2);background:var(--surface2);color:var(--text)}
.cc-btn.primary{background:var(--accent-fill);color:var(--accent-ink);border-color:transparent}.cc-btn.primary:hover{background:var(--accent-fill-h);color:#fff}
.cc-btn.danger{color:var(--danger);border-color:var(--danger-edge)}.cc-btn.danger:hover{background:var(--danger-bg)}
.cc-btn:disabled,.cc-btn[aria-disabled=true]{opacity:.5;cursor:not-allowed}
.cc-btn svg{width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.cc-btn .n{font-size:10.5px;font-weight:750;padding:1px 6px;border-radius:99px;background:var(--surface-3);color:var(--text-2);margin-left:2px}
.cc-btn .n.warn{background:var(--warn-bg);color:var(--warn)}.cc-btn .n.bad{background:var(--danger-bg);color:var(--danger)}
.cc-btn.sm{font-size:12px;padding:6px 10px;border-radius:8px}

/* hero band (tinted by state) */
.cc-hero{display:grid;gap:0;background:var(--surface);border:1px solid var(--border);border-radius:var(--r-4);box-shadow:var(--shadow-sm);margin-bottom:16px;overflow:hidden;position:relative}
.cc-hero::before{content:"";position:absolute;inset:0;pointer-events:none;background:linear-gradient(118deg,var(--accent-soft),transparent 55%)}
.cc-hero.is-ok::before{background:linear-gradient(118deg,var(--ok-bg),transparent 55%)}
.cc-hero.is-warn::before{background:linear-gradient(118deg,var(--warn-bg),transparent 55%)}
.cc-hero.is-danger::before{background:linear-gradient(118deg,var(--danger-bg),transparent 55%)}
.cc-hero>*{position:relative}
.cc-hero-cell{padding:22px 26px;min-width:0}
.cc-hero-cell+.cc-hero-cell{border-left:1px solid var(--border-soft)}
@media(max-width:980px){.cc-hero{grid-template-columns:1fr!important}.cc-hero-cell+.cc-hero-cell{border-left:none;border-top:1px solid var(--border-soft)}}
.cc-label{font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.06em;color:var(--muted)}
.cc-pill{display:inline-flex;align-items:center;gap:6px;font-size:11px;font-weight:700;padding:3px 10px;border-radius:99px;background:var(--surface2);color:var(--muted)}
.cc-pill.ok{background:var(--ok-bg);color:var(--ok)}.cc-pill.warn{background:var(--warn-bg);color:var(--warn)}.cc-pill.danger,.cc-pill.bad{background:var(--danger-bg);color:var(--danger)}.cc-pill.info{background:var(--info-bg);color:var(--info)}.cc-pill.accent{background:var(--accent-soft);color:var(--accent-text)}
.cc-big{font-size:28px;font-weight:750;letter-spacing:-.02em;line-height:1;font-variant-numeric:tabular-nums}
.cc-big small{font-size:12px;font-weight:600;color:var(--muted);letter-spacing:0;margin-left:6px}
.cc-big.ok{color:var(--ok)}.cc-big.warn{color:var(--warn)}.cc-big.danger,.cc-big.bad{color:var(--danger)}

/* score ring (SVG r=44 in a 104 viewbox; dasharray 276.5) */
.cc-ring{position:relative;width:104px;height:104px;flex:none}
.cc-ring svg{width:104px;height:104px}
.cc-ring .trk{fill:none;stroke:var(--surface-3);stroke-width:9}
.cc-ring .val{fill:none;stroke:var(--accent);stroke-width:9;stroke-linecap:round}
.cc-ring.ok .val{stroke:var(--ok)}.cc-ring.warn .val{stroke:var(--warn)}.cc-ring.danger .val{stroke:var(--danger)}
.cc-ring b{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;font-size:30px;font-weight:750;letter-spacing:-.02em;line-height:1;color:var(--accent-text)}
.cc-ring.ok b{color:var(--ok)}.cc-ring.warn b{color:var(--warn)}.cc-ring.danger b{color:var(--danger)}
.cc-ring b small{font-size:9.5px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--text-faint);margin-top:3px}

/* fact chips (linkable) */
.cc-facts{display:flex;flex-wrap:wrap;gap:7px}
.cc-fact{display:inline-flex;align-items:center;gap:6px;font-size:12px;font-weight:600;color:var(--muted);background:var(--surface);border:1px solid var(--border);border-radius:99px;padding:4px 11px;text-decoration:none}
a.cc-fact:hover{border-color:var(--rule-2);color:var(--text)}
.cc-fact b{color:var(--text);font-variant-numeric:tabular-nums}
.cc-fact.bad{color:var(--danger);border-color:var(--danger-edge)}.cc-fact.bad b{color:var(--danger)}
.cc-fact.warn{color:var(--warn);border-color:var(--warn-edge)}.cc-fact.warn b{color:var(--warn)}
.cc-fact.ok{color:var(--ok);border-color:var(--ok-edge)}.cc-fact.ok b{color:var(--ok)}
.cc-fact svg{width:12px;height:12px;fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}

/* KPI strip — state-tinted tiles: accent rail on the left, icon chip,
   corner wash and the number in the state colour. Neutral tiles stay quiet. */
.cc-kpis{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:10px;margin-bottom:16px}
.cc-kpi{--kc:var(--text-2);--kwash:transparent;--kchip:var(--surface2);position:relative;display:block;background:var(--surface);border:1px solid var(--border);border-radius:var(--r-4);box-shadow:none;padding:14px 16px 13px;text-decoration:none;color:inherit;overflow:hidden;transition:border-color var(--dur),transform var(--dur-fast),box-shadow var(--dur)}
.cc-kpi.has-spark{padding-bottom:0}
a.cc-kpi:hover{border-color:var(--rule-2);transform:translateY(-1px);color:inherit}
.cc-kpi:has(.v.ok){--kc:var(--ok);--kwash:var(--ok-bg);--kchip:var(--ok-bg)}
.cc-kpi:has(.v.warn){--kc:var(--warn);--kwash:var(--warn-bg);--kchip:var(--warn-bg)}
.cc-kpi:has(.v.bad),.cc-kpi:has(.v.danger){--kc:var(--danger);--kwash:var(--danger-bg);--kchip:var(--danger-bg)}
.cc-kpi:has(.v.info){--kc:var(--info);--kwash:var(--info-bg);--kchip:var(--info-bg)}
.cc-kpi:has(.v.accent){--kc:var(--accent);--kwash:var(--accent-soft);--kchip:var(--accent-soft)}
.cc-kpi.ok{--kc:var(--ok);--kwash:var(--ok-bg);--kchip:var(--ok-bg)}.cc-kpi.warn{--kc:var(--warn);--kwash:var(--warn-bg);--kchip:var(--warn-bg)}.cc-kpi.bad,.cc-kpi.danger{--kc:var(--danger);--kwash:var(--danger-bg);--kchip:var(--danger-bg)}.cc-kpi.info{--kc:var(--info);--kwash:var(--info-bg);--kchip:var(--info-bg)}
.cc-kpi .k{display:flex;align-items:center;gap:6px;font-size:11.5px;font-weight:600;color:var(--muted)}
.cc-kpi .k svg{width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;flex:none;color:var(--kc)}
.cc-kpi .v{font-size:26px;font-weight:700;letter-spacing:-.02em;line-height:1;margin-top:9px;font-variant-numeric:tabular-nums;color:var(--text)}
.cc-kpi .v.ok{color:var(--ok)}.cc-kpi .v.warn{color:var(--warn)}.cc-kpi .v.bad,.cc-kpi .v.danger{color:var(--danger)}.cc-kpi .v.info{color:var(--info)}.cc-kpi .v.accent{color:var(--accent-text)}
.cc-kpi .v small{font-size:13px;font-weight:600;color:var(--muted);letter-spacing:0;margin-left:4px}
.cc-kpi .d{font-size:11.5px;color:var(--muted);margin-top:7px;display:flex;align-items:center;gap:5px;min-height:16px}
.cc-dl{font-weight:700;display:inline-flex;align-items:center;gap:1px}
.cc-dl.bad{color:var(--danger)}.cc-dl.good{color:var(--ok)}
.cc-dl svg{width:10px;height:10px;fill:none;stroke:currentColor;stroke-width:2.6}
.cc-sp{display:block;width:100%;height:30px;margin-top:6px}
.cc-sp polyline{fill:none;stroke-width:1.8;stroke-linejoin:round;stroke-linecap:round;vector-effect:non-scaling-stroke}
.cc-sp polygon{opacity:.14}
.cc-sp.ok polyline{stroke:var(--ok)}.cc-sp.ok polygon{fill:var(--ok)}
.cc-sp.warn polyline{stroke:var(--warn)}.cc-sp.warn polygon{fill:var(--warn)}
.cc-sp.bad polyline{stroke:var(--danger)}.cc-sp.bad polygon{fill:var(--danger)}
.cc-sp.accent polyline{stroke:var(--accent)}.cc-sp.accent polygon{fill:var(--accent)}
.cc-sp.mut polyline{stroke:var(--rule-2)}.cc-sp.mut polygon{fill:var(--rule-2)}
.cc-sp-empty{height:30px;margin-top:6px}

/* layout grids */
.cc-grid{display:grid;grid-template-columns:minmax(0,1.55fr) minmax(0,1fr);gap:16px;align-items:start}
.cc-grid.even{grid-template-columns:1fr 1fr}
.cc-grid.rail{grid-template-columns:260px minmax(0,1fr)}
@media(max-width:980px){.cc-grid,.cc-grid.even,.cc-grid.rail{grid-template-columns:1fr}}
.cc-col{display:flex;flex-direction:column;gap:16px;min-width:0}

/* cards */
.cc-card{background:var(--surface);border:1px solid var(--border);border-radius:var(--r-4);box-shadow:var(--shadow-sm);overflow:hidden}
.cc-card+.cc-card{margin-top:16px}
.cc-ch{display:flex;align-items:center;gap:9px;padding:13px 17px;border-bottom:1px solid var(--border-soft);flex-wrap:wrap}
.cc-ch h3,.cc-ch h2{font-size:14px;font-weight:700;margin:0;letter-spacing:-.005em}
.cc-ch .ic{width:26px;height:26px;border-radius:8px;display:flex;align-items:center;justify-content:center;background:var(--accent-soft);color:var(--accent-text);flex:none}
.cc-ch .ic.v2{background:var(--accent-2-soft);color:var(--accent-2)}
.cc-ch .ic.ok{background:var(--ok-bg);color:var(--ok)}
.cc-ch .ic.warn{background:var(--warn-bg);color:var(--warn)}
.cc-ch .ic.danger,.cc-ch .ic.bad{background:var(--danger-bg);color:var(--danger)}
.cc-ch .ic.info{background:var(--info-bg);color:var(--info)}
.cc-ch .ic.mut{background:var(--surface2);color:var(--muted)}
.cc-ch .ic svg{width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.cc-ch .m{margin-left:auto;font-size:12px;color:var(--muted);white-space:nowrap}
.cc-ch .r{font-size:12px;font-weight:650;color:var(--accent-text);text-decoration:none;white-space:nowrap}
.cc-ch .m+.r{margin-left:12px}
.cc-ch .right{margin-left:auto;display:inline-flex;align-items:center;gap:8px}
.cc-cb{padding:14px 17px}
.cc-foot{display:block;text-align:center;padding:10px;font-size:12.5px;font-weight:600;color:var(--accent-text);border-top:1px solid var(--border-soft);text-decoration:none}
.cc-foot:hover{background:var(--surface2)}

/* list rows inside cards */
.cc-row{display:flex;align-items:center;gap:12px;padding:12px 17px;border-top:1px solid var(--border-soft);color:inherit;text-decoration:none}
.cc-row:first-of-type{border-top:none}
a.cc-row:hover,.cc-row.hover:hover{background:var(--surface2);color:inherit}
.cc-row .main{flex:1;min-width:0}
.cc-row .t{font-size:13.5px;font-weight:650;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.cc-row .s{font-size:12px;color:var(--muted);margin-top:2px}
.cc-row .s .mono,.cc-mono{font-family:var(--mono)}
.cc-row .end{flex:none;display:inline-flex;align-items:center;gap:8px;font-size:12px;color:var(--muted)}
.cc-sq{width:40px;height:40px;flex:none;border-radius:10px;display:flex;align-items:center;justify-content:center;font-size:15px;font-weight:750;font-variant-numeric:tabular-nums;background:var(--surface2);color:var(--muted)}
.cc-sq.ok{background:var(--ok-bg);color:var(--ok)}.cc-sq.warn{background:var(--warn-bg);color:var(--warn)}.cc-sq.danger,.cc-sq.bad{background:var(--danger-bg);color:var(--danger)}.cc-sq.info{background:var(--info-bg);color:var(--info)}.cc-sq.accent{background:var(--accent-soft);color:var(--accent-text)}.cc-sq.v2{background:var(--accent-2-soft);color:var(--accent-2)}
.cc-sq svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}

/* tags */
.cc-tag{font-size:10px;font-weight:700;padding:1px 6px;border-radius:5px;background:var(--surface2);color:var(--muted);white-space:nowrap;letter-spacing:.02em}
.cc-tag.bad,.cc-tag.danger{background:var(--danger-bg);color:var(--danger)}.cc-tag.warn{background:var(--warn-bg);color:var(--warn)}.cc-tag.ok{background:var(--ok-bg);color:var(--ok)}.cc-tag.info{background:var(--info-bg);color:var(--info)}.cc-tag.accent{background:var(--accent-soft);color:var(--accent-text)}.cc-tag.v2{background:var(--accent-2-soft);color:var(--accent-2)}
.cc-tag.up{text-transform:uppercase;letter-spacing:.04em}

/* meters + stacked bars */
.cc-meter{height:6px;border-radius:99px;background:var(--surface-3);overflow:hidden}
.cc-meter i{display:block;height:100%;border-radius:99px;background:var(--accent-2)}
.cc-meter i.ok{background:var(--ok)}.cc-meter i.warn{background:var(--warn)}.cc-meter i.bad,.cc-meter i.danger{background:var(--danger)}.cc-meter i.accent{background:var(--accent)}
.cc-stack{display:flex;height:9px;border-radius:99px;overflow:hidden;background:var(--surface-3);gap:2px}
.cc-stack i{display:block;height:100%;min-width:3px}
.cc-c1{background:var(--accent)}.cc-c2{background:var(--accent-2)}.cc-c3{background:var(--info)}.cc-c4{background:var(--ok)}.cc-c5{background:var(--warn)}.cc-c6{background:var(--rule-2)}
.cc-legend{display:flex;flex-wrap:wrap;gap:5px 13px;margin-top:10px;font-size:11.5px;color:var(--muted)}
.cc-legend span{display:inline-flex;align-items:center;gap:6px}
.cc-legend i{width:8px;height:8px;border-radius:2px;display:inline-block}
.cc-legend b{color:var(--text);font-weight:650;font-variant-numeric:tabular-nums}

/* segmented filter chips */
.cc-seg{display:inline-flex;gap:6px;flex-wrap:wrap}
.cc-seg a,.cc-seg button{font:inherit;font-size:12px;font-weight:650;padding:5px 11px;border-radius:99px;border:1px solid var(--border);background:var(--surface);color:var(--muted);cursor:pointer;text-decoration:none;display:inline-flex;align-items:center;gap:6px;white-space:nowrap}
.cc-seg a:hover,.cc-seg button:hover{border-color:var(--rule-2);color:var(--text)}
.cc-seg .on,.cc-seg .cur,.cc-seg [aria-pressed=true]{background:var(--accent-soft);border-color:var(--accent-edge);color:var(--accent-text)}
.cc-seg .n{font-size:10.5px;font-weight:700;color:var(--text-faint)}
.cc-seg i.dot{width:7px;height:7px;border-radius:50%;background:var(--muted)}
.cc-seg i.dot.ok{background:var(--ok)}.cc-seg i.dot.warn{background:var(--warn)}.cc-seg i.dot.danger{background:var(--danger)}

/* empty states */
.cc-empty{display:flex;align-items:center;gap:10px;padding:20px 17px;font-size:13px;color:var(--muted)}
.cc-empty .i{width:32px;height:32px;flex:none;border-radius:9px;background:var(--ok-bg);color:var(--ok);display:flex;align-items:center;justify-content:center}
.cc-empty .i.mut{background:var(--surface2);color:var(--muted)}.cc-empty .i.warn{background:var(--warn-bg);color:var(--warn)}.cc-empty .i.accent{background:var(--accent-soft);color:var(--accent-text)}
.cc-empty .i svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:2.3;stroke-linecap:round;stroke-linejoin:round}
.cc-empty b{display:block;color:var(--text);font-weight:650;font-size:13px}
.cc-empty.tall{flex-direction:column;text-align:center;padding:36px 20px;gap:12px}
.cc-empty.tall .i{width:44px;height:44px;border-radius:12px}.cc-empty.tall .i svg{width:20px;height:20px}

/* stat tiles (hero right cell) */
.cc-mini{display:grid;grid-template-columns:1fr 1fr;gap:8px 14px;margin-top:14px;padding-top:12px;border-top:1px solid var(--border-soft)}
.cc-mini div{font-size:11.5px;color:var(--muted)}
.cc-mini b{display:block;font-size:15px;font-weight:700;color:var(--text);font-variant-numeric:tabular-nums;letter-spacing:-.01em}

/* section label between blocks */
.cc-sec{font-size:10.5px;font-weight:700;text-transform:uppercase;letter-spacing:.08em;color:var(--text-faint);display:flex;align-items:center;gap:10px;margin:22px 0 10px}
.cc-sec::after{content:"";flex:1;height:1px;background:var(--border-soft)}
.cc-sec .n{font-size:10.5px;padding:1px 7px;border-radius:99px;background:var(--surface2);color:var(--muted)}

/* data tables inside cards */
.cc-table{width:100%;border-collapse:collapse;font-size:13px}
.cc-table th{font-size:10.5px;font-weight:700;text-transform:uppercase;letter-spacing:.06em;color:var(--text-faint);text-align:left;padding:10px 17px;border-bottom:1px solid var(--border-soft);background:color-mix(in srgb,var(--surface2) 55%,transparent)}
.cc-table td{padding:11px 17px;border-top:1px solid var(--border-soft);vertical-align:middle}
.cc-table tr:first-child td{border-top:none}
.cc-table tbody tr:hover td{background:var(--surface2)}
.cc-table .num{text-align:right;font-variant-numeric:tabular-nums}

/* ════════════════════════════════════════════════════
   APP SHELL ON PHONES / TABLETS (PWA) + GUIDED TOUR
   ════════════════════════════════════════════════════ */
html{-webkit-text-size-adjust:100%;text-size-adjust:100%}
body{-webkit-tap-highlight-color:transparent;overscroll-behavior-y:none}
a,button,[role=button]{touch-action:manipulation}
/* Safe areas: notch / home indicator. */
.appbar{padding-top:max(10px,env(safe-area-inset-top));padding-left:max(14px,env(safe-area-inset-left));padding-right:max(14px,env(safe-area-inset-right))}
.dock{bottom:max(22px,calc(env(safe-area-inset-bottom) + 10px))}
@media (max-width:640px){
  .dock{bottom:max(10px,env(safe-area-inset-bottom));left:8px;right:8px;border-radius:18px;padding:6px}
  body.has-dock .container{padding-bottom:calc(96px + env(safe-area-inset-bottom))}
  .appbar{position:sticky;top:0;z-index:40;background:var(--bg);border-bottom:1px solid var(--border-soft)}
  #whatsnew-btn{display:none}
  .container{padding:12px 12px 0}
  /* Any page-level top bar stacks on phones. */
  /* Page-level <style> blocks come later in the cascade, so these carry extra
     specificity (.container …) to win on phones. */
  .container .cc-top,.container .ov3-top,.container .fm-top{flex-direction:column;gap:12px}
  .container .cc-actions,.container .ov3-actions,.container .fm-actions{padding-top:0;justify-content:flex-start;flex-wrap:nowrap;overflow-x:auto;-webkit-overflow-scrolling:touch;width:100%;padding-bottom:4px;scrollbar-width:none;max-width:100%}
  .container .cc-actions::-webkit-scrollbar,.container .ov3-actions::-webkit-scrollbar,.container .fm-actions::-webkit-scrollbar{display:none}
  .container .cc-actions>*,.container .ov3-actions>*,.container .fm-actions>*{flex:none}
  .container .ov3-cust{position:static}
  .cc-btn,.ov3-btn,.fm-btn{min-height:40px}
  .cc-h1,.ov3-h1{font-size:22px}
  .cc-kpis,.ov3-kpis{grid-template-columns:repeat(2,1fr)!important;gap:8px}
  .cc-hero,.ov3-hero{grid-template-columns:1fr!important}
  .ov3-score,.cc-hero-cell{padding:16px 18px}
  .ov3-sites{grid-template-columns:repeat(2,1fr);padding:12px}
  .ov3-pop{position:fixed;left:12px;right:12px;top:auto;bottom:calc(84px + env(safe-area-inset-bottom));width:auto;max-height:60vh;overflow:auto}
  .cc-table{min-width:560px}
  .cc-card:has(> .cc-table),.cc-card > .cc-table-wrap{overflow-x:auto}
  .modal-box{width:100%;max-width:none;border-radius:16px 16px 0 0;position:fixed;left:0;right:0;bottom:0;max-height:88vh}
  .cc-ch{padding:11px 13px}.cc-cb{padding:12px 13px}.cc-row{padding:11px 13px}
  input,select,textarea{font-size:16px!important} /* iOS: no zoom-on-focus */
}
/* Installed (standalone) app: no browser chrome, slightly denser header. */
html.is-pwa .appbar{padding-top:max(12px,env(safe-area-inset-top))}
html.is-pwa body{overscroll-behavior:none}

/* Install nudge */
.pwa-nudge{position:fixed;left:12px;right:12px;bottom:calc(84px + env(safe-area-inset-bottom));z-index:80;display:flex;align-items:center;gap:12px;padding:12px 12px 12px 14px;background:var(--surface);border:1px solid var(--border);border-radius:16px;box-shadow:var(--shadow-pop);animation:pwa-in .25s var(--ease-out)}
@keyframes pwa-in{from{transform:translateY(12px);opacity:0}to{transform:none;opacity:1}}
.pwa-nudge img{width:40px;height:40px;border-radius:11px;flex:none}
.pwa-nudge .t{flex:1;min-width:0}.pwa-nudge .t b{display:block;font-size:13.5px}.pwa-nudge .t span{font-size:12px;color:var(--muted)}
.pwa-nudge .ok{font:inherit;font-size:12.5px;font-weight:650;padding:8px 13px;border-radius:9px;border:0;background:var(--accent-fill);color:#fff;cursor:pointer}
.pwa-nudge .x{font:inherit;font-size:18px;line-height:1;width:32px;height:32px;border-radius:8px;border:0;background:transparent;color:var(--muted);cursor:pointer}

/* Guided tour */
.tour-ov{position:fixed;inset:0;z-index:120;opacity:0;transition:opacity .2s}
.tour-ov.in{opacity:1}.tour-ov.out{opacity:0}
.tour-spot{position:fixed;border-radius:14px;box-shadow:0 0 0 9999px rgba(12,10,9,.62),0 0 0 3px var(--accent);transition:top .25s var(--ease),left .25s var(--ease),width .25s var(--ease),height .25s var(--ease);pointer-events:none}
html[data-theme="dark"] .tour-spot{box-shadow:0 0 0 9999px rgba(0,0,0,.72),0 0 0 3px var(--accent)}
.tour-card{position:fixed;background:var(--surface);color:var(--text);border:1px solid var(--border);border-radius:16px;box-shadow:var(--shadow-pop);padding:16px 18px 14px;transition:top .25s var(--ease),left .25s var(--ease)}
.tour-card::before{content:"";position:absolute;left:var(--ax,50%);top:-7px;width:12px;height:12px;background:var(--surface);border-left:1px solid var(--border);border-top:1px solid var(--border);transform:translateX(-50%) rotate(45deg)}
.tour-card.above::before{top:auto;bottom:-7px;border:0;border-right:1px solid var(--border);border-bottom:1px solid var(--border)}
.tour-card.sheet::before{display:none}
.tour-k{font-size:10.5px;font-weight:700;text-transform:uppercase;letter-spacing:.08em;color:var(--accent-text)}
.tour-t{font-size:16px;font-weight:750;letter-spacing:-.01em;margin-top:4px}
.tour-b{font-size:13px;color:var(--muted);line-height:1.5;margin-top:6px}
.tour-f{display:flex;align-items:center;gap:10px;margin-top:14px}
.tour-f button{font:inherit;font-size:12.5px;font-weight:650;padding:7px 12px;border-radius:9px;border:1px solid var(--border);background:var(--surface);color:var(--text-2);cursor:pointer;min-height:36px}
.tour-f button:hover{border-color:var(--rule-2);color:var(--text)}
.tour-f .tour-skip{border-color:transparent;color:var(--muted);padding-left:4px}
.tour-f .tour-next{background:var(--accent-fill);color:#fff;border-color:transparent}.tour-f .tour-next:hover{background:var(--accent-fill-h);color:#fff}
.tour-f button:disabled{opacity:.4;cursor:default}
.tour-nav{margin-left:auto;display:inline-flex;gap:6px}
.tour-dots{display:inline-flex;gap:4px}
.tour-dots i{width:6px;height:6px;border-radius:50%;background:var(--surface-3);display:inline-block}
.tour-dots i.done{background:var(--accent-edge)}.tour-dots i.on{background:var(--accent);width:16px;border-radius:3px}
@media (max-width:719px){.tour-dots{display:none}}

/* ============================================================================
   AIO landing design language, applied app-wide (Sept 2026, stage-dpc).
   Source of truth is templates/landing.html: Poppins, thin large headlines,
   coral highlight, gradient pill buttons, 24px cards carried by shadow (not
   border), floating pill glass chrome. Tokens above were retuned to the
   landing palette; the rules here restyle the shared components on top.
   ============================================================================ */
body .ov3-h1 { font-family: var(--font-display); font-weight: 300; font-size: 34px; letter-spacing: -.035em; line-height: 1.1; text-wrap: balance; }
/* Page header (H1, picked 20 Oct): eyebrow = the section, h1 = the page's name and nothing
   else, then one status line (.cc-status: numbers, coloured only where one is a problem),
   an optional muted description (.cc-sub), and the page's actions on the right. Every
   list and tool page uses it at the container's full width; the device page and the
   Overview keep their own heroes. */
body .cc-h1 { font-family: var(--font-display); font-weight: 650; font-size: 28px; letter-spacing: -.02em; line-height: 1.15; margin-top: 4px; display: flex; align-items: center; gap: 10px; }
body .cc-h1 .vicon { width: 30px; height: 30px; border-radius: 8px; flex: none; }
.cc-status { font-size: 14px; color: var(--text-2); margin-top: 6px; line-height: 1.5; }
.cc-status b { color: var(--text); font-weight: 650; }
.cc-status a { color: inherit; }
.cc-status .hl { color: var(--text); font-weight: 650; }
.cc-status .hl.ok { color: var(--ok); } .cc-status .hl.warn { color: var(--warn); } .cc-status .hl.danger { color: var(--danger); } .cc-status .hl.accent { color: var(--accent-text); }
body .cc-status + .cc-sub { font-size: 13px; margin-top: 3px; }
.cc-top .cc-actions { align-self: flex-end; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
body .cc-h1 .hl, body .ov3-h1 .hl { color: var(--accent); }
body .cc-h1 .hl.ok { color: var(--ok); } body .cc-h1 .hl.warn { color: var(--warn); } body .cc-h1 .hl.danger { color: var(--danger); }
body .cc-eyebrow, body .ov3-eyebrow { font-weight: 500; letter-spacing: .12em; color: var(--accent-text); }
body .cc-sub, body .ov3-sub { font-size: 14px; }
body .cc-big, body .ov3-big { font-weight: 300; letter-spacing: -.04em; }
body .cc-kpi .v, body .ov3-kpi .v { font-weight: 300; font-size: 30px; letter-spacing: -.04em; }
body .cc-ch h3, body .cc-ch h2, .card-header h3, .card-header h2 { font-weight: 500; }
.auth2-title { font-weight: 300; font-size: 32px; letter-spacing: -.035em; }
.brand-aio, .brand-hub { font-weight: 500; }

body .cc-btn, body .ov3-btn, .btn-primary, .btn-outline, .btn-outline-sm, .btn-danger-sm, .auth2-btn { border-radius: 40px; }
body .cc-btn, body .ov3-btn { font-weight: 500; padding: 9px 16px; }

.cc-card, .card, .cc-hero, body .ov3-hero, .cc-kpi, body .ov3-kpi, .modal-box, .nbar-pop, .ddc-menu { border-color: transparent; box-shadow: var(--shadow-lg); }
.cc-kpi, body .ov3-kpi { box-shadow: var(--shadow-md); }
html[data-theme="dark"] .cc-card, html[data-theme="dark"] .card, html[data-theme="dark"] .cc-hero, html[data-theme="dark"] .ov3-hero, html[data-theme="dark"] .cc-kpi, html[data-theme="dark"] .ov3-kpi, html[data-theme="dark"] .modal-box { border-color: rgba(255, 255, 255, .06); }
body .cc-tag { border-radius: 40px; padding: 2px 8px; }

/* Chrome: the top bar stays the original full-width sticky header and the
   dock keeps its original glass and radius. Buttons are pills in solid coral;
   the gradient stays on the landing page only. */
/* Boosted navigation scrolls <main> into view; keep the sticky header above
   it instead of landing the page a header-height down. */
main.container { scroll-margin-top: 72px; }
/* Thin Poppins headlines run wider: give the headline column of every page
   top row room and let the action group wrap under it instead of squeezing
   the verdict into a narrow column. */
body .cc-top > div:first-child, body .ov3-top > div:first-child { flex: 1 1 420px; min-width: min(420px, 100%); }
body .cc-actions, body .ov3-actions { flex: 0 1 auto; max-width: 60%; }
@media (max-width: 1000px) { body .cc-actions, body .ov3-actions { max-width: 100%; } }
/* Once the top row stacks into a column, that 420px basis becomes a HEIGHT: a
   420px-tall headline block with empty space under the subtitle. Size to content. */
@media (max-width: 1000px) { body .cc-top > div:first-child { flex: none; min-width: 0; } }
@media (max-width: 640px) { body .container .ov3-top > div:first-child { flex: none; min-width: 0; } }
/* Every input popup blurs the page behind it (New release, What's new, the
   command palette, the tour). */
.modal-backdrop, .cmdk-backdrop, .tour-ov { -webkit-backdrop-filter: blur(10px) saturate(1.2); backdrop-filter: blur(10px) saturate(1.2); }
/* No outer glow on buttons, resting or hovered; solid coral, no gradient. */
body .co-send { background: var(--accent-fill); box-shadow: none; border-radius: 40px; }
body .co-send:hover { background: var(--accent-fill-h); box-shadow: none; }
.ovx-cta:hover { box-shadow: none; }

/* Sign-in / sign-up / password pages in the landing language: the photo hero
   with the thin headline and coral phrase, 12px fields, solid coral pill. */
.auth2-hero { background: #0a0a0f url(/static/img/landing/hero.webp) center / cover no-repeat; }
.auth2-hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, .5), rgba(0, 0, 0, .45) 55%, rgba(0, 0, 0, .75)); }
.auth2-hero > * { position: relative; }
.auth2-hero-top { font-size: 15px; font-weight: 500; letter-spacing: 0; }
.auth2-hero-head { font-weight: 200; font-size: clamp(34px, 3.8vw, 54px); letter-spacing: -.045em; line-height: 1.05; max-width: 16ch; text-wrap: balance; }
.auth2-hero-head .hl { color: var(--accent); }
.auth2-hero-sub { font-weight: 400; margin-top: 18px; }
.auth2-subtitle { font-size: 14px; }
.auth2-field label { font-weight: 500; letter-spacing: .04em; text-transform: uppercase; font-size: 11px; }
.auth2-field input { border-radius: 12px; background: var(--surface); }
.auth2-btn { border-radius: 40px; font-weight: 500; background: var(--accent-fill); }
.auth2-btn:hover { background: var(--accent-fill-h); filter: none; }
.auth2-oauth { border-radius: 40px; font-weight: 500; background: var(--surface); }
.auth2-alert { border-radius: 12px; }
.auth2-row a, .auth2-alt a { color: var(--accent-text); }
/* Header: the landing navbar's liquid glass, full width (light glass over the
   light theme, dark glass over the dark theme). */
.appbar { background: rgba(255, 255, 255, .6); border-bottom: 1px solid rgba(0, 0, 0, .06);
  /* 12px, no saturate/brightness: a 32px filter chain on a full-width sticky
     bar re-blurs the whole viewport width every scrolled frame and made the
     dashboard feel sluggish on real GPUs (2026-09-09). */
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  box-shadow: 0 4px 6px rgba(0, 0, 0, .04), 0 12px 40px rgba(0, 0, 0, .08), inset 0 1px 0 rgba(255, 255, 255, .6); }
html[data-theme="dark"] .appbar { background: rgba(10, 10, 20, .4); border-bottom-color: rgba(255, 255, 255, .12);
  box-shadow: 0 4px 6px rgba(0, 0, 0, .12), 0 12px 40px rgba(0, 0, 0, .35), inset 0 1px 0 rgba(255, 255, 255, .12); }
/* Actions page: the Scopes and Devices lists sit in recessed wells so their
   white rows separate from the white pane (shadow-only rows vanished on it).
   The scroll edge fades instead of chopping the last row. */
/* No mask-image on these scrolling wells: a mask forces the whole list to be
   re-rasterised through it on every scroll frame, which made the Actions page
   crawl on real GPUs (2026-09-09). */
body .co-scopelist, body .co-devlist { background: var(--surface2); border-radius: 16px; padding: 10px; margin: 0; }
body .co-scopelist { max-height: 216px; }
body .co-devlist { max-height: 250px; gap: 8px; }
body .co-scope, body .co-devlist > label, body .co-devlist > .co-dev { border-color: transparent; box-shadow: 0 1px 2px rgba(0, 0, 0, .05); }
body .co-scope.on { border-color: var(--accent-edge); }
body .co-r-cap { margin-top: 14px; }

/* "?" next to a venue/group score: hover, tap or focus shows the penalties. */
.sc-why { position: relative; display: inline-flex; vertical-align: middle; margin-left: 4px; }
.sc-why > i { width: 16px; height: 16px; border-radius: 50%; border: 1px solid var(--border); background: var(--surface); color: var(--muted); font: 600 10px/14px var(--font); text-align: center; font-style: normal; cursor: help; }
.sc-why:hover > i, .sc-why:focus > i, .sc-why:focus-within > i { color: var(--accent-text); border-color: var(--accent-edge); }
.sc-why .sc-pop { display: none; position: absolute; left: 50%; top: calc(100% + 8px); transform: translateX(-50%); z-index: 70; width: 260px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow-pop); padding: 12px 14px; text-align: left; font-size: 12.5px; line-height: 1.45; color: var(--text); white-space: normal; text-transform: none; letter-spacing: 0; font-weight: 400; }
.sc-why:hover .sc-pop, .sc-why:focus .sc-pop, .sc-why:focus-within .sc-pop { display: block; }
.sc-why .sc-pop b { display: block; font-weight: 600; font-size: 12px; margin-bottom: 6px; }
.sc-why .sc-pop ul { margin: 0; padding-left: 16px; }
.sc-why .sc-pop li { margin: 2px 0; font-variant-numeric: tabular-nums; }
.sc-why .sc-pop small { display: block; margin-top: 8px; color: var(--text-faint); font-size: 11px; }

/* Fleet selection: the toolbar keeps "Select all"; with a selection a panel
   floats at the right edge of the viewport (#sel-sheet under <body>) with the
   count and the actions. No device list: the checked rows are the list. */
.selbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 14px; margin: 0 0 6px; }
.selbar-check { gap: 8px; font-size: 13px; font-weight: 500; color: var(--text-2); }
#sel-sheet { position: fixed; right: 24px; top: 50%; transform: translateY(-50%); z-index: 46; width: 232px; display: flex; flex-direction: column; gap: 12px;
  /* Liquid glass, same recipe as the landing navbar. */
  background: rgba(255, 255, 255, .55); -webkit-backdrop-filter: blur(32px) saturate(2) brightness(1.04); backdrop-filter: blur(32px) saturate(2) brightness(1.04);
  border: 1px solid rgba(255, 255, 255, .6); border-radius: 24px; padding: 16px 16px 14px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, .06), 0 12px 40px rgba(0, 0, 0, .14), inset 0 1px 0 rgba(255, 255, 255, .7); }
html[data-theme="dark"] #sel-sheet { background: rgba(10, 10, 20, .4); border-color: rgba(255, 255, 255, .12); box-shadow: 0 4px 6px rgba(0, 0, 0, .12), 0 12px 40px rgba(0, 0, 0, .35), inset 0 1px 0 rgba(255, 255, 255, .12); }
#sel-sheet .cc-btn { background: color-mix(in srgb, var(--surface) 70%, transparent); border-color: rgba(255, 255, 255, .5); }
html[data-theme="dark"] #sel-sheet .cc-btn { border-color: rgba(255, 255, 255, .12); }
#sel-sheet .cc-btn.primary { background: var(--accent-fill); border-color: transparent; }
#sel-sheet[hidden] { display: none; }
#sel-sheet { width: 292px; max-height: calc(100vh - 48px); overflow-y: auto; }
.ss-sec { display: flex; flex-direction: column; gap: 6px; }
.ss-sec + .ss-sec { margin-top: 4px; }
.ss-lbl { font-size: 10px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); padding: 0 2px; }
.ss-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.ss-grid .cc-btn, .ss-sec > .cc-btn { min-height: 32px; padding: 0 8px; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ss-grid .cc-btn svg { flex: none; margin-right: 5px; }
.ss-w, .ss-grid > form.ss-w, .ss-grid > .ss-w { grid-column: 1 / -1; }
.ss-grid > form { display: contents; }
.ss-preview { font-size: 12.5px; line-height: 1.7; margin: 4px 0 12px; padding: 8px 12px; border-radius: 12px; background: var(--surface2); }
.ss-preview code { font: 500 11px var(--mono); color: var(--muted); }
/* ── Selection panel: one primary, the rest behind More ──────────────────────
   The primary is the only full-height button in the panel; the promoted
   shortcuts sit under it at normal size, and everything else lives in the
   collapsible below. The point is that the composer that can do anything no
   longer looks like Copy serials. */
.ss-primary { min-height: 40px !important; font-size: 13px !important; font-weight: 700 !important; }
.ss-more-btn { justify-content: center; color: var(--text-faint); }
.ss-more-btn .ss-chev { margin-left: 4px; transition: transform var(--dur, .15s) ease; }
.ss-more-btn.open .ss-chev { transform: rotate(180deg); }
.ss-more { display: flex; flex-direction: column; gap: 6px; }
.ss-more[hidden] { display: none; }
.ss-more .ss-lbl { margin-top: 4px; }
.ss-more .ss-lbl:first-child { margin-top: 0; }
/* Everything past this rule is hard or impossible to undo. It is last, it is
   separated, and it is the only place in the panel that uses the danger colour —
   Retire used to be one grid cell below Copy serials, in the same grey. */
.ss-danger { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; padding-top: 9px;
  border-top: 1px solid var(--danger-edge); }
.ss-danger form { display: contents; }

.ss-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ss-acts .bulk-actions { display: flex; flex-direction: column; align-items: stretch; gap: 8px; }
.ss-acts .bulk-actions form { display: contents; }
.ss-acts .bulk-actions .cc-btn { justify-content: center; }
.ss-acts .bulk-count, .ss-acts .selbar-sep, .ss-acts > .bulk-actions > .selbar-clear { display: none; }
.ss-acts .selbar-match { text-align: center; }
.bulk-count { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 600; color: var(--accent-ink); background: var(--accent-fill); border-radius: 40px; padding: 6px 12px; white-space: nowrap; }
.bulk-count::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #fff; opacity: .85; }
.selbar-match { border: 0; background: none; font: inherit; font-size: 12.5px; font-weight: 500; color: var(--accent-text); cursor: pointer; padding: 6px 8px; border-radius: 40px; white-space: nowrap; }
.selbar-match:hover { background: var(--accent-soft); }
.selbar-clear { width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--border); background: var(--surface); color: var(--muted); font-size: 16px; line-height: 1; cursor: pointer; }
.selbar-clear:hover { color: var(--text); border-color: var(--rule-2); }
.bulk-actions .cc-btn.sm { padding: 7px 13px; font-size: 12.5px; }
.bulk-actions .selbar-danger { color: var(--danger); }
.bulk-actions .selbar-danger:hover { background: var(--danger-bg); border-color: var(--danger-edge); }
@media (max-width: 900px) { #sel-sheet { right: 12px; left: 12px; top: auto; bottom: 84px; transform: none; width: auto; } .ss-acts .bulk-actions { flex-direction: row; flex-wrap: wrap; } }

/* Install popup: family tiles with a variant/version chooser under a selected tile. */
.install-tile-wrap { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.install-tile-wrap .install-tile { width: 100%; }
.install-pick { font-size: 11px; padding: 3px 6px; max-width: 100%; }
.install-pick[hidden] { display: none; }
.install-tile .app-tmeta { font-size: 10px; font-weight: 600; letter-spacing: .04em; color: var(--accent-text); background: var(--accent-soft); border-radius: 40px; padding: 2px 8px; white-space: nowrap; margin-top: 2px; }
.install-tile.is-family .app-icon, .install-tile.is-family .app-mono { box-shadow: 3px 3px 0 0 var(--surface2), 6px 6px 0 0 var(--border); }

/* Alerts: the count cards are the view tabs. */
.cc-kpi.on { box-shadow: 0 0 0 2px var(--accent) inset, var(--shadow-lg); }
a.cc-kpi { text-decoration: none; color: inherit; }

/* ── Serial-leads cards (fleet_layout=serial) ────────────────────────────────
   Same grid discipline as the other layouts, so identity, vitals and actions
   still line up row to row: the serial takes the identity column and the name
   and model drop to the line beneath it, where they identify the device without
   competing with the one field a technician reads off the hardware. */
.dl-serial-list .dl-card {
  grid-template-columns: 18px 38px 38px minmax(0, 1fr) 124px auto;
  grid-template-areas: "cb pw ic lead stats act";
}
.dl-serial-list .dl-card > .device-cb { grid-area: cb; width: 15px; height: 15px; margin: 0; }
.dl-serial-list .dl-card > .dl-cb-spacer { grid-area: cb; }
.dl-serial-list .dl-card > .dl-pw { grid-area: pw; width: 38px; flex: none; display: flex; justify-content: center; }
.dl-serial-list .dl-card > .dl-ic { grid-area: ic; }
.dl-serial-list .dl-card > .dl-sc-id { grid-area: lead; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.dl-serial-list .dl-card > .dl-stats { grid-area: stats; }
.dl-serial-list .dl-card > .dl-act { grid-area: act; }
/* Phones: identity and actions on the first line, power and vitals as one strip under
   it. The one-line grid needs ~520px and squeezed the serial to nothing below that. */
@media (max-width: 720px) {
  .dl-serial-list .dl-card { grid-template-columns: auto 34px minmax(0, 1fr) auto;
    grid-template-areas: "cb ic lead act" "cb pw stats stats"; column-gap: 10px; row-gap: 6px; padding: 10px 12px; }
  .dl-serial-list .dl-card > .dl-cb-spacer { display: none; }
  .dl-serial-list .dl-card > .dl-pw { width: 34px; }
  .dl-serial-list .dl-card > .dl-ic { width: 34px; height: 34px; }
  .dl-serial-list .dl-card > .dl-stats { flex-direction: row; flex-wrap: wrap; width: auto; justify-self: start; align-self: center; gap: 4px 14px; }
}

/* The gap is per-sibling rather than a flex gap: the status dot reads as part of the
   serial, so those two sit together and everything after keeps the old 8px. */
.dl-sc-l1 { display: flex; align-items: center; gap: 0; min-width: 0; }
.dl-sc-l1 > * + * { margin-left: 8px; }
.dl-sc-l1 .dl-status + .dl-sc-sn { margin-left: 0; }
.dl-sc-sn { font-family: var(--mono); font-size: 14.5px; font-weight: 600; letter-spacing: .01em; white-space: nowrap; }
.dl-sc-sn .pre { color: var(--text-faint); font-weight: 500; }
.dl-sc-sn .tail { color: var(--text); }
.dl-card:hover .dl-sc-sn .tail { color: var(--accent-text); }
.dl-sc-l2 { display: flex; align-items: baseline; gap: 7px; min-width: 0; font-size: 12.5px; color: var(--muted); }
.dl-sc-l2 .sep { color: var(--border); }
.dl-sc-l2 > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dl-sc-l3 { font-family: var(--mono); font-size: 11.5px; color: var(--text-faint); margin-top: 1px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Copy-a-serial, shared by the serial and column layouts. Delegated in JS so it keeps
   working across htmx re-renders; sits inside the row, which is itself clickable. */
.dl-copy { display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 22px; height: 22px; padding: 0; border: 0; border-radius: 6px; background: none;
  color: var(--text-faint); cursor: pointer; }
/* The copy button only appears on the card under the pointer. Hidden with opacity, not
   display, so revealing it never reflows the row; and only where hover exists, since a
   touch device would otherwise have no way to bring it back. Keyboard focus shows it
   too, or tabbing would land on something invisible. */
@media (hover: hover) {
  .dl-copy { opacity: 0; pointer-events: none; transition: opacity .12s ease; }
  .dl-card:hover .dl-copy, .dl-copy:focus-visible { opacity: 1; pointer-events: auto; }
}
@media (hover: hover) and (prefers-reduced-motion: reduce) { .dl-copy { transition: none; } }
.dl-copy:hover { color: var(--accent-text); background: var(--hover); }
/* "on stage": the device is reporting to another MDM. Deliberately not red — this is
   not a fault, it is a device doing exactly what it was told to do somewhere else. */
.dl-elsewhere { flex: none; font-size: 10px; font-weight: 700; letter-spacing: .02em;
  border-radius: 6px; padding: 1px 6px; background: var(--surface2); color: var(--muted); }
.dl-copy svg { width: 13px; height: 13px; }

/* ── Serial-column cards (fleet_layout=table) ────────────────────────────────
   One aligned row per device with the serial in its own tabular-figures column,
   so a screen of them can be read against a spreadsheet. A list, not a card —
   meant as a second view rather than the only one. */
.dl-table .dl-tbl-hd,
.dl-table .dl-card {
  display: grid; column-gap: 14px; align-items: center;
  grid-template-columns: 18px 38px minmax(0, 1.5fr) 215px minmax(0, .9fr) 118px 190px 30px;
  grid-template-areas: "cb ic name sn model state reads act";
}
.dl-table .dl-tbl-hd { padding: 9px 18px; font-size: 11px; font-weight: 600; letter-spacing: .06em;
  text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--border-soft); }
.dl-table .dl-tbl-hd > *:nth-child(1) { grid-area: cb; }
.dl-table .dl-tbl-hd > *:nth-child(2) { grid-area: ic; }
.dl-table .dl-tbl-hd > *:nth-child(3) { grid-area: name; }
.dl-table .dl-tbl-hd > *:nth-child(4) { grid-area: sn; }
.dl-table .dl-tbl-hd > *:nth-child(5) { grid-area: model; }
.dl-table .dl-tbl-hd > *:nth-child(6) { grid-area: state; }
.dl-table .dl-tbl-hd > *:nth-child(7) { grid-area: reads; }
.dl-table .dl-card > .device-cb { grid-area: cb; width: 15px; height: 15px; margin: 0; }
.dl-table .dl-card > .dl-cb-spacer { grid-area: cb; }
.dl-table .dl-card > .dl-ic { grid-area: ic; }
.dl-table .dl-card > .dl-stats { display: none; }   /* the Reads column carries these */
.dl-td-name { grid-area: name; min-width: 0; }
.dl-td-name a { font-weight: 600; }
.dl-td-name a:hover { color: var(--accent-text); }
.dl-td-name small { display: block; font-size: 12px; color: var(--muted); }
.dl-td-sn { grid-area: sn; display: flex; align-items: center; gap: 5px; min-width: 0;
  font-family: var(--mono); font-size: 12.5px; font-weight: 600; letter-spacing: .02em;
  font-variant-numeric: tabular-nums; white-space: nowrap; }
.dl-td-sn a:hover { color: var(--accent-text); }
.dl-td-model { grid-area: model; min-width: 0; font-size: 13px; color: var(--text-2);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dl-td-state { grid-area: state; }
.dl-td-reads { grid-area: reads; font-size: 13px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.dl-td-reads .k { display: none; }   /* the header names the column; each cell needs no label */
.dl-table .dl-card > .dl-view { grid-area: act; }
.dl-tbl-sort { display: inline-flex; align-items: center; gap: 5px; padding: 0; border: 0; background: none;
  font: 600 11px var(--font); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); cursor: pointer; }
.dl-tbl-sort:hover { color: var(--accent-text); }
.dl-tbl-sort svg { width: 11px; height: 11px; }

/* Inside the column view the row is already a table: two boxed .link-detail pills on one
   line read as noise, so the name and the serial drop back to plain text and keep the
   hover tint only. */
.dl-table .dl-td-name a.link-detail,
.dl-table .dl-td-sn a.link-detail { padding: 0; background: none; font-size: 13.5px; }
.dl-table .dl-td-name a.link-detail:hover,
.dl-table .dl-td-sn a.link-detail:hover { background: none; color: var(--accent-text); }
/* Reads sit side by side in one cell rather than stacked — the header names the column. */
.dl-td-reads { display: flex; align-items: baseline; gap: 8px; }
.dl-td-reads .dl-blk + .dl-blk::before { content: '·'; margin-right: 8px; color: var(--border); }
/* The serial is the headline here, not a pill — same reset as the column view. */
.dl-serial-list .dl-card .dl-sc-sn.link-detail { padding: 0; background: none; font-size: 14.5px; color: var(--text); }
.dl-serial-list .dl-card .dl-sc-sn.link-detail:hover { background: none; color: var(--text); }

/* ── List tools: search box + filter chips + "Show all N" cap on long lists (Clients,
   Enrollment, Wireless adb). Markup contract is in layout.html next to ltInit(). ── */
.lt-bar{display:flex;align-items:center;gap:8px;flex-wrap:wrap;padding:10px 14px;border-bottom:1px solid var(--border)}
.lt-q{font:inherit;font-size:12.5px;padding:6px 10px;border:1px solid var(--border);border-radius:9px;background:var(--surface);color:var(--text);flex:1;min-width:160px;max-width:320px}
.lt-q:focus{outline:none;border-color:var(--accent)}
.lt-chips{display:flex;gap:4px;flex-wrap:wrap;align-items:center}
.lt-chip{font:inherit;font-size:11.5px;font-weight:650;line-height:1;padding:5px 9px;border:1px solid var(--border);border-radius:99px;background:var(--surface);color:var(--text-faint);cursor:pointer}
.lt-chip:hover{color:var(--text)}
.lt-chip.on{background:var(--accent-fill);color:#fff;border-color:var(--accent-fill)}
.lt-sep{width:1px;height:16px;background:var(--border);margin:0 2px}
.lt-count{font-size:12px;color:var(--text-faint);margin-left:auto}
.lt-out,.lt-hid{display:none!important}
.lt-none{padding:14px 16px;font-size:12.5px;color:var(--text-faint)}
tr.lt-more>td{padding:0 12px!important;border-bottom:0!important}
tr.lt-more .app-more{width:100%;margin:6px 0 10px}
div.lt-more{padding:0 15px}

/* ── Appbar: pill on scroll, page: warm paper + two soft glows (2026-10-07, picked from
   static/appbar-pill-demos.html — header A, background 2). The bar stays sticky and keeps
   its height. 40px into a scroll layout.html adds .is-scrolled, which sets --ph to 1;
   width, inset, radius, fill and the hairline ring all derive from --ph and run through
   one 700ms ease-out-expo transition (fast start, long soft tail — picked from
   static/appbar-motion-demos.html, option 4, over scroll-linked morphs that stepped
   on a wheel notch). Same animation back below 40px. The glows are
   one fixed pseudo-element behind the page, so they cost nothing per frame; cards go
   slightly translucent so the glow shows at their edges — no backdrop-filter on them, the
   glow is smooth and there is nothing to blur (see the 2026-09-09 notes above). ── */
.appbar { --ph: 0;
  top: calc(8px * var(--ph));
  /* One straight interpolation from full width to the pill width (--pw, set by
     layout.html = min(viewport - 48px, 1140px)). A max-width that animated alongside
     only started to bite near the end on wide screens, which read as a second step. */
  width: calc(100% * (1 - var(--ph)) + var(--pw, 1140px) * var(--ph)); margin: 0 auto;
  border-radius: calc(100px * var(--ph));
  padding-left: calc(24px - 2px * var(--ph)); padding-right: calc(24px - 10px * var(--ph));
  border-bottom-color: rgba(0, 0, 0, calc(.06 * (1 - var(--ph))));
  background: rgba(255, 255, 255, calc(.6 - .05 * var(--ph)));
  box-shadow: 0 0 0 1px rgba(0, 0, 0, calc(.1 * var(--ph))), 0 4px 6px rgba(0, 0, 0, .04), 0 12px 40px rgba(0, 0, 0, calc(.08 + .02 * var(--ph))), inset 0 1px 0 rgba(255, 255, 255, .6);
  transition-property: top, width, border-radius, background-color, box-shadow, padding, border-color;
  transition-duration: .7s; transition-timing-function: cubic-bezier(.22, 1, .36, 1); }
.appbar.is-scrolled { --ph: 1; }
html[data-theme="dark"] .appbar { background: rgba(10, 10, 20, calc(.4 + .1 * var(--ph)));
  border-bottom-color: rgba(255, 255, 255, calc(.12 * (1 - var(--ph))));
  box-shadow: 0 0 0 1px rgba(255, 255, 255, calc(.14 * var(--ph))), 0 4px 6px rgba(0, 0, 0, .12), 0 12px 40px rgba(0, 0, 0, .35), inset 0 1px 0 rgba(255, 255, 255, .12); }
.appbar .appbar-icon, .appbar .appbar-acct { border-radius: calc(10px + 89px * var(--ph)); transition: border-radius .7s cubic-bezier(.22, 1, .36, 1); }
@media (prefers-reduced-motion: reduce) { .appbar, .appbar .appbar-icon, .appbar .appbar-acct { transition: none; } }

body::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(640px 400px at 6% -8%, rgba(249, 103, 78, .13), transparent 60%),
    radial-gradient(560px 380px at 96% 8%, rgba(26, 99, 192, .09), transparent 60%),
    radial-gradient(520px 320px at 50% 112%, rgba(15, 109, 51, .06), transparent 60%); }
html[data-theme="dark"] body::before { background:
    radial-gradient(640px 400px at 6% -8%, rgba(249, 128, 95, .16), transparent 60%),
    radial-gradient(560px 380px at 96% 8%, rgba(90, 150, 255, .10), transparent 60%); }
.cc-card { background: rgba(255, 255, 255, .72); border-color: rgba(0, 0, 0, .06); }
html[data-theme="dark"] .cc-card { background: rgba(30, 28, 26, .6); border-color: rgba(255, 255, 255, .09); }


/* The by-venue report as a page: its fragment header belongs to the Overview card it was
   written for, where there is no page title to say the same thing. */
.rab-page > .rab-h { display: none; }
.rab-page .rab-list { gap: 2px; }
.rab-page .rab-row { padding: 11px 12px; }

/* The device wall is one shape: a square per device. Battery/mains was carried by circle
   vs square and read as two kinds of status at a glance when it is a hardware fact, and
   it cost a second legend to explain. State — online, alert, offline, dormant — is the
   only thing the wall encodes now, in colour, with one legend. */
.ovd-wall .sq a.shape-circle, .ovd-wall .sq a { border-radius: 3px; }
.ovd-wfoot-cls { display: none; }

/* ── Page nav pills ──────────────────────────────────────────────────────────
   A page whose own navigation is a handful of views carries them as a row
   under its title: same links and counts as before, in the flow of the page. */
.nav-pills { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 2px 0 16px; }
.nav-pills a, .nav-pills button { font: inherit; font-size: 12.5px; font-weight: 650; display: inline-flex;
  align-items: center; gap: 7px; padding: 6px 12px; border-radius: 99px; border: 1px solid var(--border);
  background: var(--surface); color: var(--muted); text-decoration: none; cursor: pointer; white-space: nowrap; }
.nav-pills a:hover, .nav-pills button:hover { border-color: var(--rule-2); color: var(--text); }
.nav-pills .on, .nav-pills .active { background: var(--accent-soft); border-color: var(--accent-edge); color: var(--accent-text); }
.nav-pills .n { font-size: 10.5px; font-weight: 700; color: var(--text-faint); font-variant-numeric: tabular-nums; }
.nav-pills .n.warn { color: var(--warn); }
.nav-pills .cap { font-size: 10px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--text-faint); padding-right: 3px; }


/* ── Context island ─────────────────────────────────────────────────────────────
   The floating top pill carries the page's name, status and main buttons once the page
   has scrolled (static/chrome-island-demos.html, option A). Hidden at the top of the
   page, where the page's own header says the same thing. */
.appbar-island { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; margin: 0 14px;
  opacity: 0; transform: translateY(-4px); pointer-events: none; transition: opacity .35s ease, transform .35s ease; overflow: hidden; }
.appbar.is-scrolled .appbar-island { opacity: 1; transform: none; pointer-events: auto; }
.appbar-island.always { opacity: 1; transform: none; pointer-events: auto; }
/* What the island already says is not said again on the page (wide screens only: the
   island is hidden on phones). .isl-dup leaves the page; .isl-dup-sr stays for screen
   readers (the page's <h1>). */
/* body:has(#page-island) applies from the first paint and the moment a navigation swaps a
   page in, before any script has run; body.has-island is the fallback where :has is missing.
   Without it the page's own header flashed up and then vanished (20 Oct). */
@media (min-width: 721px) {
  body.has-island .isl-dup, body:has(#page-island) .isl-dup { display: none !important; }
  body:has(#page-island) .isl-dup-sr,
  body.has-island .isl-dup-sr { position: absolute !important; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
}
.appbar-island::before { content: ""; width: 1px; height: 22px; background: var(--border); flex: none; }
.appbar-island .isl-t { font-size: 13px; font-weight: 650; color: var(--text); white-space: nowrap; flex: 0 1 auto; min-width: 72px; max-width: 40%; overflow: hidden; text-overflow: ellipsis; }
.appbar-island .isl-s { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; flex: 1; }
.appbar-island .isl-dot { width: 8px; height: 8px; border-radius: 99px; background: var(--muted); flex: none; }
.appbar-island .isl-dot.on { background: var(--ok); }
.appbar-island .isl-dot.off { background: transparent; box-shadow: inset 0 0 0 1.5px var(--text-faint); }
.appbar-island .isl-dot.warn { background: var(--warn); }
.appbar-island .isl-dot.danger, .appbar-island .isl-dot.bad { background: var(--danger); }
.appbar-island .isl-s b { color: var(--text); font-weight: 650; }
.appbar-island .isl-s .w { color: var(--warn); font-weight: 650; }
.appbar-island .isl-s .d { color: var(--danger); font-weight: 650; }
.appbar-island .isl-cls { width: 18px; height: 18px; flex: none; fill: none; stroke: var(--text-2); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.appbar-island .isl-acts { display: flex; gap: 6px; flex: none; align-items: center; }
.appbar-island .isl-acts form { margin: 0; display: inline-flex; gap: 6px; align-items: center; }
.appbar-island .isl-acts .cc-btn { padding: 5px 11px; font-size: 12px; box-shadow: none; }
.appbar-island .isl-acts .cc-btn:focus-visible { box-shadow: var(--ring); }
.appbar-island .isl-acts select { font: inherit; font-size: 12px; padding: 4px 6px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); color: var(--text); }
.appbar.island-live.is-scrolled { box-shadow: 0 0 0 2px var(--warn), 0 12px 40px rgba(0,0,0,.12) !important; }
/* Phones: the bar scrolls away, so the island would never be seen; pages keep their own header. */
@media (max-width: 720px) { .appbar-island { display: none; } }
@media (max-width: 1100px) { .appbar-island .isl-s { display: none; } }

.appbar-island .isl-tagn { font-size: 10.5px; font-weight: 700; border-radius: 6px; padding: 2px 7px; background: var(--surface2); color: var(--text-2); white-space: nowrap; flex: none; }
.appbar-island .isl-tagn.warn { background: var(--warn-bg); color: var(--warn); }
.appbar-island .isl-more { position: relative; }
.appbar-island .isl-more > summary { list-style: none; cursor: pointer; padding: 5px 11px; }
.appbar-island .isl-more > summary::-webkit-details-marker { display: none; }
.appbar-island .isl-menu { position: fixed; margin-top: 8px; z-index: 60; width: 270px; }
.appbar-island .isl-menu form { display: block; }
.appbar-island .isl-menu form.cc-mfield { display: flex; }
.appbar-island .isl-menu form.cc-mfield[hidden] { display: none; }
@media (max-width: 1280px) { .appbar-island .isl-tagn { display: none; } }
/* The build stays: it is the one tag that says which firmware you are looking at. */
.appbar-island .isl-tagn.isl-build { display: inline-block; font-family: var(--mono); font-weight: 600; letter-spacing: 0; }
/* Raised capsule (static/top-bar-capsule-demos.html, B, picked 15 Oct): the page's own
   context is one white capsule, so it stops reading as part of the global controls
   (theme, alerts, account) beside it. Its buttons lose their borders inside; a hairline
   keeps the primary apart from the rest. */
.appbar-island.always, .appbar.is-scrolled .appbar-island {
  height: 46px; padding: 0 6px 0 14px; border-radius: 14px; background: var(--surface);
  border: 1px solid var(--border-soft); box-shadow: 0 1px 2px rgba(0,0,0,.05), 0 6px 18px -8px rgba(0,0,0,.18); }
html[data-theme="dark"] .appbar-island.always, html[data-theme="dark"] .appbar.is-scrolled .appbar-island {
  box-shadow: 0 1px 0 rgba(255,255,255,.05) inset, 0 8px 20px -10px rgba(0,0,0,.6); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .appbar-island.always {
  box-shadow: 0 1px 0 rgba(255,255,255,.05) inset, 0 8px 20px -10px rgba(0,0,0,.6); } }
.appbar-island.always::before, .appbar.is-scrolled .appbar-island::before { display: none; }
.appbar-island .isl-acts { gap: 2px; }
.appbar-island .isl-acts .cc-btn:not(.primary), .appbar-island .isl-more > summary.cc-btn {
  background: transparent; border-color: transparent; border-radius: 10px; }
.appbar-island .isl-acts .cc-btn:not(.primary):hover, .appbar-island .isl-more > summary.cc-btn:hover { background: var(--surface2); }
.appbar-island .isl-acts .cc-btn.primary { border-radius: 10px; }
.appbar-island .isl-acts > .cc-btn.primary:not(:first-child), .appbar-island .isl-acts > form:not(:first-child) .cc-btn.primary {
  position: relative; margin-left: 9px; overflow: visible; }
.appbar-island .isl-acts > .cc-btn.primary:not(:first-child)::before, .appbar-island .isl-acts > form:not(:first-child) .cc-btn.primary::before {
  content: ""; position: absolute; left: -6px; top: 5px; bottom: 5px; width: 1px; background: var(--border); }


/* ── Menu kit (device-menus-demos.html, M1, picked 15 Oct) ─────────────────────
   One panel for every dropdown and popover: .cc-menu, rows .cc-mi (icon · label ·
   .rt value), .cc-mh title (+ .sub), .cc-mst status line, .cc-msec section title in
   sentence case, .cc-msep rule, .cc-mfoot footer, .cc-mnote warning, .cc-mlog
   version list, .cc-mfield inline form, .cc-msw switch. Positioning stays with each
   menu's own class; the look comes from here. */
.cc-menu { box-sizing: border-box; min-width: 220px; padding: 6px; border: 1px solid var(--border); border-radius: 12px;
  background: var(--surface); box-shadow: var(--shadow-pop); font-size: 13px; font-weight: 500; line-height: normal; letter-spacing: normal;
  white-space: normal; text-transform: none; color: var(--text); text-align: left; }
.cc-menu[hidden] { display: none !important; }
.cc-mh { display: flex; align-items: baseline; gap: 8px; padding: 8px 10px 6px; margin: 0; font-size: 13.5px; font-weight: 650; color: var(--text); }
.cc-mh .sub { margin-left: auto; font-family: var(--mono); font-size: 11.5px; font-weight: 500; color: var(--muted); white-space: nowrap; }
.cc-mst { display: flex; align-items: center; gap: 7px; padding: 0 10px 8px; font-size: 12.5px; color: var(--muted); }
.cc-mdot { width: 7px; height: 7px; border-radius: 50%; flex: none; background: var(--text-faint); }
.cc-mdot.ok { background: var(--ok); } .cc-mdot.warn { background: var(--warn); }
.cc-msec { padding: 8px 10px 4px; font-size: 11.5px; font-weight: 600; color: var(--muted); letter-spacing: 0; text-transform: none; }
.cc-mi { box-sizing: border-box; display: flex; align-items: center; gap: 10px; width: 100%; min-height: 34px; padding: 0 10px;
  border: 0; border-radius: 8px; background: none; box-shadow: none; color: var(--text); font: inherit; font-size: 13px; font-weight: 500;
  text-align: left; text-decoration: none; cursor: pointer; }
.cc-mi:hover, .cc-mi:focus-visible { background: var(--hover); outline: none; color: var(--text); }
.cc-mi > svg { width: 16px; height: 16px; flex: none; fill: none; stroke: var(--text-2); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.cc-mi .rt, .cc-mi > small { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12px; font-weight: 500; white-space: nowrap; }
.cc-mi.active { color: var(--accent-text); font-weight: 600; }
.cc-mi.active::after { content: "✓"; margin-left: 8px; font-weight: 700; color: var(--accent-text); }
.cc-mi.active:not(:has(> small, > .rt))::after { margin-left: auto; }
.cc-mi.is-static { cursor: default; } .cc-mi.is-static:hover { background: none; }
.cc-mi.is-off, .cc-mi:disabled { cursor: default; color: var(--text-faint); }
.cc-mi.is-off:hover, .cc-mi:disabled:hover { background: none; }
.cc-mi.is-off > svg { stroke: var(--text-faint); }
.cc-mi.danger { color: var(--danger); } .cc-mi.danger > svg { stroke: var(--danger); }
.cc-mi.is-danger { color: var(--danger); } .cc-mi.is-danger > svg { stroke: var(--danger); }
.cc-menu form { margin: 0; }
.cc-msep { height: 1px; margin: 5px 4px; border: 0; background: var(--border-soft); }
.cc-mfoot { display: flex; align-items: center; gap: 8px; margin-top: 4px; padding: 8px 10px 4px; border-top: 1px solid var(--border-soft); font-size: 12.5px; color: var(--muted); }
.cc-mfoot a { margin-left: auto; color: var(--accent-text); font-weight: 600; text-decoration: none; white-space: nowrap; }
.cc-mfoot a:hover { text-decoration: underline; }
.cc-mnote { margin: 4px 6px; padding: 8px 10px; border-radius: 8px; background: var(--warn-bg); color: var(--warn); font-size: 12px; line-height: 1.45; }
.cc-mnote b { font-weight: 650; }
.cc-mnote[hidden] { display: none; }
.cc-mlog { list-style: none; margin: 0; padding: 0 10px 4px; }
.cc-mlog li { display: grid; grid-template-columns: 46px 1fr; gap: 8px; padding: 4px 0; font-size: 12.5px; line-height: 1.45; color: var(--text-2); }
.cc-mlog li .v { padding-top: 1px; font-family: var(--mono); font-size: 11.5px; color: var(--muted); }
.cc-mfield { display: flex; gap: 6px; padding: 4px 6px 6px; }
.cc-mfield[hidden] { display: none; }
.cc-mfield input { flex: 1; min-width: 0; padding: 7px 9px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg); color: var(--text); font: inherit; font-size: 12.5px; }
.cc-mfield button { padding: 0 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface2); color: var(--text); font: inherit; font-size: 12.5px; font-weight: 650; cursor: pointer; }
.cc-mfield button:hover { border-color: var(--accent); color: var(--accent-text); }
.cc-msw { position: relative; flex: none; width: 30px; height: 18px; border-radius: 9px; background: var(--surface2); box-shadow: inset 0 0 0 1px var(--border); transition: background .15s; }
.cc-msw::after { content: ""; position: absolute; left: 2px; top: 2px; width: 14px; height: 14px; border-radius: 50%; background: var(--text-faint); transition: left .15s, background .15s; }
.on > .rt > .cc-msw, .on .cc-msw { background: var(--ok); box-shadow: none; }
.on > .rt > .cc-msw::after, .on .cc-msw::after { left: 14px; background: #fff; }

/* Right-click menus (R1, picked 30 Oct 2026; static/js/layout/context-menu.js): the menu
   kit's panel, fixed at the pointer. .ctx-ro marks what the viewer can't do here; a picker
   (group, venue, role) swaps in under a .cc-mfield search. */
.ctx-menu { position: fixed; z-index: 1200; min-width: 240px; max-width: min(320px, calc(100vw - 16px));
  max-height: calc(100vh - 16px); overflow: auto; overscroll-behavior: contain; }
.ctx-menu .cc-mh { overflow: hidden; }
.ctx-menu .cc-mh > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ctx-menu kbd { margin-left: auto; font-family: var(--mono); font-size: 11px; color: var(--muted); background: none; border: 0; padding: 0; }
.ctx-menu .ctx-ro { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; color: var(--muted); }
.ctx-menu .ctx-ro svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 2; }
.ctx-menu .ctx-list { max-height: 240px; overflow: auto; }
.ctx-menu .ctx-empty { padding: 8px 10px; font-size: 12.5px; color: var(--muted); }
.ctx-on > td, .ctx-on.dl-card, .ctx-on.fleet-rail-item, .ctx-on.dl-lean-row { background: var(--hover); }

/* Wireless adb stepper and command rows (adb_flow.go): the /adb page draws them
   (static/js/adb-steps.js). */
.adb-st{list-style:none;margin:6px 0 0;padding:0}
.adb-st li{display:grid;grid-template-columns:22px minmax(0,1fr) auto;gap:10px;align-items:start;padding:6px 0;font-size:13px;color:var(--muted)}
.adb-st .dot{width:18px;height:18px;border-radius:50%;border:2px solid var(--rule-2);margin-top:1px;position:relative;box-sizing:border-box}
.adb-st li.now,.adb-st li.ok,.adb-st li.wait,.adb-st li.failed{color:var(--text)}
.adb-st li.now .dot{border-color:var(--accent);border-top-color:transparent;animation:adbspin .9s linear infinite}
.adb-st li.wait .dot{border-color:var(--warn);border-style:dashed;animation:adbspin 3s linear infinite}
.adb-st li.ok .dot{border-color:var(--ok);background:var(--ok)}
.adb-st li.ok .dot:after{content:"";position:absolute;left:4px;top:1px;width:5px;height:9px;border:solid #fff;border-width:0 2px 2px 0;transform:rotate(45deg)}
.adb-st li.failed .dot{border-color:var(--danger);background:var(--danger)}
.adb-st li.failed .dot:after{content:"!";position:absolute;inset:0;color:#fff;font-size:11px;font-weight:800;text-align:center;line-height:14px}
.adb-st li.skip{opacity:.75}
.adb-st li.skip .dot{border-style:dotted}
.adb-st small{display:block;color:var(--muted);font-size:11.5px;margin-top:2px;line-height:1.4}
.adb-st li.failed small{color:var(--danger)}
@keyframes adbspin{to{transform:rotate(360deg)}}
.adb-cmd{display:flex;align-items:center;gap:8px;background:var(--surface);border:1px solid var(--border);border-radius:9px;padding:7px 10px;margin-top:6px}
.adb-cmd code{flex:1;font-family:var(--mono);font-size:13px;color:var(--text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.adb-cmd .w{font-size:11px;color:var(--muted);white-space:nowrap}

/* Venue icons (I1, 19 Oct): the venue's own icon, or its initial on a colour tile.
   venue_icon.go draws them; sm 20px (headers, Fleet's list), md 32px (Venues list). */
.vicon { flex: none; display: inline-block; box-sizing: border-box; object-fit: contain; background: #fff; box-shadow: inset 0 0 0 1px var(--border); vertical-align: middle; }
.vicon-sm { width: 20px; height: 20px; border-radius: 6px; padding: 2px; }
.vicon-md { width: 32px; height: 32px; border-radius: 9px; padding: 3px; }
.vicon-ini { display: inline-grid; place-items: center; padding: 0; box-shadow: none; color: #fff; font-weight: 750; line-height: 1; background: hsl(var(--vh, 210) 45% 46%); }
.vicon-sm.vicon-ini { font-size: 10.5px; }
.vicon-md.vicon-ini { font-size: 14px; }
.appbar-island .vicon { margin-right: -2px; }
.vn-nm-ic { display: flex; align-items: center; gap: 11px; }
.vn-nm-ic > span { min-width: 0; }
/* Fleet's Restaurants list: the status dot sits on the icon's corner. */
.vicon-dot { position: relative; display: inline-flex; flex: none; }
.fleet-rail-item .vicon-dot .dot { position: absolute; right: -3px; bottom: -3px; width: 8px; height: 8px; box-shadow: 0 0 0 2px var(--surface); }
.vicon-lg { width: 48px; height: 48px; border-radius: 12px; padding: 4px; }
.vicon-lg.vicon-ini { font-size: 20px; }

/* The island never clips its actions (19 Oct): it is a size container, the title gives way
   with an ellipsis, and the tags go as it narrows, least useful first — the build number
   (the page says it again), then the warning tag, then the class. */
.appbar-island { container: isl / inline-size; }
@container isl (max-width: 1080px) { .appbar-island .isl-tagn.isl-build { display: none; } }
@container isl (max-width: 980px) { .appbar-island .isl-tagn.warn { display: none; } }
@container isl (max-width: 880px) { .appbar-island .isl-tagn { display: none; } }

/* ── Fleet table (R1, picked 20 Oct) ──
   The device list on Fleet, venue, group and production pages ("device-cards" in
   devices.html): one header row, one ~44px line per device, numbers right-aligned so
   they read down a column. Fixed layout: the header cells set the widths, Device and
   Venue share what is left and truncate. Columns drop by the list's own width (the
   inspector pane narrows it), never by the viewport. */
.ft-wrap { container: ft / inline-size; }
.ft { width: 100%; table-layout: fixed; border-collapse: separate; border-spacing: 0; font-size: 12.5px; color: var(--text); }
.ft th { height: 36px; padding: 0 10px; text-align: left; vertical-align: middle; white-space: nowrap;
  font-size: 10.5px; font-weight: 650; letter-spacing: .05em; text-transform: uppercase; color: var(--muted);
  border-bottom: 1px solid var(--border); background: var(--surface); }
.ft td { height: 44px; padding: 0 10px; vertical-align: middle; border-bottom: 1px solid var(--border-soft);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ft tbody tr:last-child > td { border-bottom: 0; }
.ft .ft-num { text-align: right; font-variant-numeric: tabular-nums; }
/* widths (the Device and Venue columns take the rest) */
.ft th:first-child, .ft td:first-child { padding-left: 18px; }
.ft th.ft-cb { width: 38px; padding: 0 0 0 16px; }
.ft td.ft-cb { padding: 0 0 0 16px; }
/* Device is wide enough for a whole serial: its last characters are what people read out,
   so a serial is never cut short (16-character stock serials included). Venue takes the rest. */
.ft th.ft-dev { width: 196px; }
.ft td.ft-dev { overflow: visible; }
.ft th.ft-type { width: 108px; }
.ft th.ft-bat { width: 92px; }
.ft th.ft-temp { width: 92px; }  /* "CPU 61.4°C" whole */
.ft th.ft-ram { width: 52px; }
.ft th.ft-build { width: 80px; }
.ft th.ft-client { width: 84px; }
.ft th.ft-seen { width: 80px; }
.ft th.ft-act { width: 46px; }
.ft.ft-rm th.ft-act { width: 80px; }
.ft input[type="checkbox"] { width: 15px; height: 15px; margin: 0; vertical-align: middle; }
/* sortable headers: the whole label is the button; the arrow shows on the active column */
.ft-sort { display: inline-flex; align-items: center; gap: 4px; max-width: 100%; padding: 0; border: 0; background: none;
  font: inherit; letter-spacing: inherit; text-transform: inherit; color: inherit; cursor: pointer; }
.ft-num .ft-sort { flex-direction: row-reverse; }
.ft-sort:hover, .ft th.on .ft-sort { color: var(--text); }
.ft-sort:focus-visible { outline: none; box-shadow: var(--ring); border-radius: 4px; }
.ft-dir { font-size: 11px; letter-spacing: 0; opacity: 0; }
.ft-sort:hover .ft-dir { opacity: .45; }
.ft th.on .ft-dir { opacity: 1; color: var(--accent-text); }
/* rows */
.ft-row { cursor: pointer; }
.ft-row > td { transition: background var(--dur, .12s) var(--ease, ease); }
.ft-row:hover > td { background: var(--hover); }
.ft-row:has(.device-cb:checked) > td { background: var(--accent-soft); }
.ft tr.ft-row.row-lost > td { background: var(--danger-bg); }
/* problem cues: a rule down the left edge (the old card's), on the first cell */
.ft tr.ft-row { box-shadow: none; }
.ft tr.row-alert-battery > td:first-child { box-shadow: inset 3px 0 0 var(--danger); }
.ft tr.row-alert-temp > td:first-child { box-shadow: inset 3px 0 0 var(--warn); }
.ft tr.row-alert-battery.row-alert-temp > td:first-child { box-shadow: inset 3px 0 0 var(--danger), inset 6px 0 0 var(--warn); }
.ft tr.row-lost > td:first-child { box-shadow: inset 3px 0 0 var(--danger); }
#device-table-container .ft tr.row-selected > td:first-child { box-shadow: inset 2px 0 0 var(--accent); }
/* Device: status dot, serial (quiet batch prefix, bold tail), then nickname and tags */
.ft-l1 { display: flex; align-items: center; gap: 7px; min-width: 0; }
.ft-l1 .dl-status { display: inline-flex; flex: none; }
.ft-l1 .dl-status i { width: 7px; height: 7px; margin: 0; border-radius: 50%; background: var(--text-faint); }
.ft-l1 .dl-status.on i { background: var(--ok); }
.ft-l1 .dl-status.off i { background: transparent; box-shadow: inset 0 0 0 1.5px var(--text-faint); }
.ft-l1 .dl-status.checkin i { background: var(--warn); box-shadow: 0 0 0 3px color-mix(in srgb, var(--warn) 18%, transparent); }
.ft-sn { flex: none; overflow: visible; text-overflow: clip; white-space: nowrap; font-family: var(--mono); font-size: 12.5px; font-weight: 600;
  letter-spacing: .01em; color: var(--text); text-decoration: none; }
.ft a.ft-sn.link-detail, .ft a.ft-sn.link-detail:hover { padding: 0; border: 0; border-radius: 0; background: none; color: var(--text); }
.ft-sn .pre { color: var(--text-faint); font-weight: 500; }
.ft-row:hover .ft-sn .tail { color: var(--accent-text); }
.ft-l1 .dl-kiosk { color: var(--muted); }
.ft-l1 .dl-copy { width: 20px; height: 20px; margin-left: -3px; }
@media (hover: hover) { .ft-row:hover .dl-copy { opacity: 1; pointer-events: auto; } }
.ft-l2 { display: flex; align-items: center; gap: 6px; min-width: 0; margin: 1px 0 0 14px; font-size: 11px; line-height: 1.3; color: var(--muted); }
.ft-l2 > * { flex: none; }
.ft-l2 .ft-nick { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.ft-l2 .dl-ktag { margin: 0; vertical-align: 0; }
.ft-legacy { font-size: 10px; font-weight: 650; color: var(--text-faint); cursor: help; }
/* Type, Venue */
.ft-ell { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ft td.ft-type { color: var(--text-2); }
.ft-vn { display: flex; align-items: center; gap: 8px; min-width: 0; color: var(--text-2); }
.ft-vn .vicon-sm { width: 18px; height: 18px; border-radius: 5px; }
.ft-vn .vicon-sm.vicon-ini { font-size: 9.5px; }
.ft-none { color: var(--text-faint); }
/* Battery: a small bar and the percentage; red when low, amber when getting there */
.ft-pw { display: inline-flex; align-items: center; gap: 7px; font-variant-numeric: tabular-nums; }
.ft-bar { position: relative; flex: none; width: 26px; height: 6px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.ft-bar i { position: absolute; inset: 0 auto 0 0; border-radius: inherit; background: var(--ok); }
.ft-pw .pc { min-width: 30px; font-weight: 600; }
.ft-pw.battery-mid .ft-bar i { background: var(--warn); }
.ft-pw.battery-low .ft-bar i { background: var(--danger); }
.ft-pw.battery-low .pc { color: var(--danger); }
.ft-pw .mk { width: 12px; height: 12px; flex: none; margin-left: -3px; }
.ft-pw .mk.chg { color: var(--ok); }
.ft-pw .mk.flap { color: var(--danger); }
.ft-pw.mains { color: var(--text-faint); }
.ft-pw.danger { color: var(--danger); font-weight: 600; }
/* Battery fault (G1, 21 Oct 2026): the pack is not detected, a hardware fault, not mains. */
.ft-pw.ft-fault { gap: 6px; padding: 2px 9px 2px 7px; border-radius: 99px; background: var(--danger-bg); font-size: 12px; font-weight: 700; }
.ft-pw.ft-fault .g-bat { width: 17px; height: 9px; flex: none; }
.dl-pw .pw-bat.pw-fault .v { color: var(--danger); font-weight: 700; }
.pw-bat.pw-fault .pc { width: auto; }
/* Temp, RAM: plain when fine, coloured only when they need a look */
.ft .v { font-weight: 600; }
.ft .v.ok { color: var(--text); }
.ft .v.warn { color: var(--warn); }
.ft .v.danger { color: var(--danger); }
.ft .v.muted { color: var(--text-faint); font-weight: 500; }
.ft-src { margin-right: 5px; font-size: 9.5px; font-weight: 650; letter-spacing: .04em; color: var(--text-faint); }
/* Build, Client */
.ft td.ft-build { font-family: var(--mono); font-size: 11.5px; color: var(--text-2); }
.ft td.ft-build .ft-none { font-family: inherit; }
.ft td.ft-client { font-variant-numeric: tabular-nums; color: var(--text-2); }
.ft-ver { font-family: var(--mono); font-size: 11.5px; }
.ft-k { margin-left: 6px; font-size: 10px; font-weight: 650; color: var(--text-faint); }
/* Last seen */
.ft td.ft-seen { color: var(--muted); }
.ft-seen .dl-synced.is-on { color: var(--text-2); }
/* open ↗ / remove × */
.ft td.ft-act { padding: 0 10px 0 0; text-align: right; overflow: visible; }
.ft td.ft-act form { display: inline; margin: 0; }
.ft td.ft-act .dl-view, .ft td.ft-act .dl-remove { width: 30px; height: 30px; vertical-align: middle; }
.ft td.ft-act .dl-remove { margin-right: 4px; }
/* narrower lists (the inspector open, or a side card): drop the least-read columns */
@container ft (max-width: 900px) {
  .ft .ft-build, .ft .ft-client { display: none; }
}
@container ft (max-width: 680px) {
  .ft .ft-type, .ft .ft-ram { display: none; }
}

/* Cards view (users.fleet_view = cards): the serial never truncates there either. */
.dl-sc-l1 .dl-sc-sn { flex: none; overflow: visible; text-overflow: clip; }
.dl-cards-sel { display: flex; align-items: center; padding: 10px 18px; border-bottom: 1px solid var(--border-soft); }

/* Staff mode (client 1.13.7): the host app unlocked for staff with the staff PIN. Info, not a fault. */
.dl-ktag.staff { display: inline-block; font-size: 9.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; padding: 1px 6px; border-radius: 5px; background: var(--info-bg); color: var(--info); margin-right: 4px; vertical-align: 1px; }

/* Island status links (e.g. Releases "1 updating") read as part of the line. */
.appbar-island .isl-s a { color: inherit; text-decoration: underline; text-decoration-style: dotted; text-underline-offset: 2px; }

/* Fleet view switch (V1): an icon pair at the right end of the list's title line. */
.fl-viewsw { margin-left: auto; display: inline-flex; gap: 2px; padding: 3px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
.fl-viewsw a { display: grid; place-items: center; width: 30px; height: 26px; border-radius: 7px; color: var(--muted); }
.fl-viewsw a:hover { color: var(--text); background: var(--hover); }
.fl-viewsw a.on { color: var(--text); background: var(--surface2); box-shadow: inset 0 0 0 1px var(--border); }
.fl-viewsw svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }


/* ── Banner, delta cards, timeline and rail ──────────────────────────────────
   The Overview's components (O2 20 Oct, C 21 Oct 2026), shared with the Lineup's role
   pane (L1, 21 Oct): the coral to-do banner (.ov2-ban + .oc-todo), delta cards
   (.oc-stats), cards with a legend footer (.oc-card), the seven-day timeline (.oc-tl),
   the right-hand rail (.ov2-rail) and its attention list. */
.ovd-dot{display:inline-block;width:7px;height:7px;border-radius:50%;background:var(--text-faint);margin-right:7px;vertical-align:1px}
.ovd-dot.ok{background:var(--ok)}.ovd-dot.warn{background:var(--warn)}.ovd-dot.danger{background:var(--danger)}
/* ── O2: banner and a right-hand rail (picked 20 Oct 2026) ── */
.ov2{display:grid;grid-template-columns:minmax(0,1fr) 330px;gap:18px;align-items:start}
@media(max-width:1024px){.ov2{grid-template-columns:1fr}}
.ov2-main{min-width:0}
.ov2-ban{position:relative;overflow:hidden;border-radius:22px;padding:24px 28px 26px;color:#fff;background:linear-gradient(120deg,var(--accent-fill),#f9674e 60%,#ff9a7a)}
.ov2-ban.is-bad{background:linear-gradient(120deg,#b8321f,var(--accent-fill) 55%,#f9674e)}
.ov2-ban::after{content:"";position:absolute;right:-50px;top:-70px;width:300px;height:300px;border-radius:50%;background:rgba(255,255,255,.12);pointer-events:none}
.ov2-ban::before{content:"";position:absolute;right:130px;bottom:-100px;width:230px;height:230px;border-radius:50%;background:rgba(255,255,255,.08);pointer-events:none}
.ov2-ban.is-calm{color:var(--text);background:linear-gradient(120deg,var(--ok-bg),var(--surface) 70%);border:1px solid var(--border)}
.ov2-ban.is-calm::after,.ov2-ban.is-calm::before{background:var(--ok-bg);opacity:.6}
.ov2-ban>*{position:relative}
.ov2-ban-k{font-size:11px;font-weight:600;letter-spacing:.12em;text-transform:uppercase;opacity:.85}
.ov2-ban h2{font-family:var(--font-display);font-weight:500;font-size:30px;letter-spacing:-.02em;line-height:1.15;margin:10px 0 6px;max-width:34ch}
.ov2-ban p{margin:0 0 18px;font-size:14px;line-height:1.5;max-width:60ch;opacity:.92}
.ov2-go{display:inline-flex;align-items:center;gap:10px;background:#16161c;color:#fff;border-radius:99px;padding:8px 9px 8px 16px;font-size:13px;font-weight:600;text-decoration:none}
.ov2-go i{width:22px;height:22px;border-radius:50%;background:#fff;color:#16161c;display:grid;place-items:center;font-style:normal;font-size:12px}
.ov2-go:hover{background:#000}
.ov2-nav{display:flex;align-items:center;gap:6px}
.ov2-nav button{width:28px;height:28px;border-radius:50%;border:1px solid var(--border);background:var(--surface);color:var(--text-2);cursor:pointer;font-size:15px;line-height:1}
.ov2-nav button:hover{border-color:var(--rule-2);color:var(--text)}
.ov2-nav a{font-size:12.5px;font-weight:650;color:var(--accent-text);text-decoration:none;margin-left:6px}
.ov2-strip{display:grid;grid-auto-flow:column;grid-auto-columns:calc((100% - 28px)/3);gap:14px;overflow-x:auto;scroll-snap-type:x mandatory;scrollbar-width:none;margin-bottom:24px;padding:2px}
.ov2-strip::-webkit-scrollbar{display:none}
.ov2-v{scroll-snap-align:start;display:flex;flex-direction:column;background:var(--surface);border:1px solid var(--border);border-radius:16px;overflow:hidden;text-decoration:none;color:inherit;min-width:0}
.ov2-v:hover{border-color:var(--rule-2)}
.ov2-v .cov{height:74px;display:flex;align-items:flex-end;padding:10px 12px;background:linear-gradient(135deg,var(--ok-bg),var(--surface2))}
.ov2-v.s-warn .cov{background:linear-gradient(135deg,var(--warn-bg),var(--surface2))}
.ov2-v.s-danger .cov{background:linear-gradient(135deg,var(--danger-bg),var(--surface2))}
.ov2-v.s-empty .cov{background:var(--surface2)}
.ov2-v .cov .vicon{box-shadow:0 0 0 3px var(--surface)}
.ov2-v .bd{display:flex;flex-direction:column;gap:4px;padding:10px 13px 13px;flex:1}
.ov2-v .bd b{font-size:14px;font-weight:650;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-top:2px}
.ov2-v .bd small{font-size:11.5px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ov2-st{align-self:flex-start;font-size:11px;font-weight:700;padding:2px 8px;border-radius:99px;background:var(--ok-bg);color:var(--ok)}
.ov2-st.s-warn{background:var(--warn-bg);color:var(--warn)}.ov2-st.s-danger{background:var(--danger-bg);color:var(--danger)}.ov2-st.s-empty{background:var(--surface2);color:var(--muted)}
.ov2-v .pips{display:flex;gap:3px;flex-wrap:wrap;margin-top:4px;min-height:9px}
.ov2-v .pips i{width:9px;height:9px;border-radius:3px;background:var(--ok)}
.ov2-v .pips i.off{background:var(--warn)}.ov2-v .pips i.dormant{background:var(--text-faint);opacity:.5}
.ov2-v .pips em{font-style:normal;font-size:10.5px;color:var(--text-faint);line-height:9px}
.ov2-v .hb{height:4px;border-radius:99px;background:var(--surface2);overflow:hidden;margin-top:auto;position:relative;top:6px}
.ov2-v .hb i{display:block;height:100%;background:var(--ok)}
.ov2-v.s-warn .hb i{background:var(--warn)}.ov2-v.s-danger .hb i{background:var(--danger)}
.ov2-v-more .bd{justify-content:center;align-items:flex-start}
.ov2-v-more .bd small{color:var(--accent-text);font-weight:600}
.ov2-t{width:100%;border-collapse:collapse;font-size:12.5px}
.ov2-t th{text-align:left;font-size:10.5px;font-weight:650;letter-spacing:.05em;text-transform:uppercase;color:var(--muted);padding:10px 16px;border-bottom:1px solid var(--border-soft)}
.ov2-t td{padding:9px 16px;border-top:1px solid var(--border-soft)}
.ov2-t tbody tr:first-child td{border-top:0}
.ov2-t .num{text-align:right;font-variant-numeric:tabular-nums;font-weight:650}
.ov2-t .mut{color:var(--muted)}
.ov2-t .act{text-align:right;white-space:nowrap}
.ov2-rail{background:var(--surface);border:1px solid var(--border);border-radius:22px;padding:18px;display:flex;flex-direction:column;gap:14px}
.ov2-ring{position:relative;width:132px;height:132px;margin:2px auto 0;display:block;text-decoration:none;color:inherit}
.ov2-ring svg{width:100%;height:100%}
.ov2-ring .trk{fill:none;stroke:var(--surface2);stroke-width:10}
.ov2-ring .val{fill:none;stroke:var(--ok);stroke-width:10;stroke-linecap:round}
.ov2-ring.s-warn .val{stroke:var(--warn)}.ov2-ring.s-danger .val{stroke:var(--danger)}
.ov2-ring>span{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center}
.ov2-ring b{font-family:var(--font-display);font-size:32px;font-weight:500;line-height:1}
.ov2-ring small{font-size:11px;color:var(--muted);margin-top:3px}
.ov2-hi{text-align:center;display:flex;flex-direction:column;gap:2px}
.ov2-hi b{font-size:15px;font-weight:650}
.ov2-hi small{font-size:12px;color:var(--muted)}
.ov2-hi small.down{color:var(--danger)}.ov2-hi small.up{color:var(--ok)}
.ov2-bars{display:flex;align-items:flex-end;gap:7px;height:104px;padding:12px 12px 8px;border-radius:16px;background:var(--surface-3,var(--surface2))}
.ov2-bars>div{flex:1;height:100%;display:flex;flex-direction:column;align-items:center;justify-content:flex-end;gap:5px}
.ov2-bars i{width:100%;border-radius:6px;background:color-mix(in srgb,var(--accent) 28%,var(--surface));min-height:4px}
.ov2-bars i.on{background:var(--accent)}
.ov2-bars span{font-size:10px;color:var(--muted)}
.ov2-rh{display:flex;align-items:center;justify-content:space-between;margin-top:4px}
.ov2-rh h2{margin:0;font-size:15px;font-weight:650}
.ov2-rh h2 span{font-size:11px;font-weight:700;padding:1px 7px;border-radius:99px;background:var(--warn-bg);color:var(--warn);margin-left:4px;vertical-align:2px}
.ov2-rh a{font-size:12.5px;font-weight:650;color:var(--accent-text);text-decoration:none}
.ov2-att{list-style:none;margin:-4px 0 0;padding:0}
.ov2-att li{display:flex;align-items:center;gap:10px;padding:9px 0;border-top:1px solid var(--border-soft)}
.ov2-att li:first-child{border-top:0}
.ov2-att .ovd-dot{margin:0;flex:none}
.ov2-att .t{flex:1;min-width:0}
.ov2-att .t a{display:block;font-size:13px;font-weight:600;color:var(--text);text-decoration:none;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ov2-att .t a:hover{text-decoration:underline}
.ov2-att small{display:block;font-size:11.5px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ov2-att .ser{font-family:var(--mono);font-size:11px}
.ov2-all{display:block;text-align:center;padding:9px;border-radius:12px;background:var(--accent-soft);color:var(--accent-text);font-weight:650;font-size:12.5px;text-decoration:none}
.ov2-all:hover{background:color-mix(in srgb,var(--accent) 22%,var(--surface))}
.ov2-comp{display:flex;align-items:center;gap:12px;padding:12px;border-radius:16px;border:1px solid var(--border-soft);text-decoration:none;color:inherit}
.ov2-comp:hover{border-color:var(--rule-2)}
.ov2-comp .ovc-ring{width:56px;height:56px}
.ov2-comp b{display:block;font-size:13.5px;font-weight:650}
.ov2-comp small{display:block;font-size:11.5px;color:var(--muted)}
.ov2-comp em{font-style:normal;color:var(--warn);font-weight:650}

/* ── C: filter pills, to-do banner, delta cards, pill chart, rollouts (21 Oct 2026) ── */
.oc-bar{display:flex;align-items:center;gap:8px;margin:0 0 12px;justify-content:flex-end;flex-wrap:wrap}
.oc-bar .lbl{margin-right:auto;font-size:12.5px;color:var(--muted)}
.oc-bar .lbl b{color:var(--text);font-weight:650}
.oc-f,.oc-cm{position:relative}
.oc-fb{font:inherit;display:inline-flex;align-items:center;gap:6px;font-size:12.5px;padding:7px 12px 7px 14px;border-radius:99px;border:1px solid var(--border);background:var(--surface);color:var(--text-2);cursor:pointer;max-width:260px}
.oc-fb b{color:var(--text);font-weight:650;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.oc-fb:hover{border-color:var(--rule-2)}
.oc-fb.set{border-color:var(--accent);background:var(--accent-soft)}
.oc-fb svg{width:12px;height:12px;flex:none;stroke:currentColor;fill:none;stroke-width:2}
.oc-f .cc-menu,.oc-cm .cc-menu{position:absolute;right:0;top:calc(100% + 6px);z-index:30;min-width:200px}
.oc-scroll{max-height:340px;overflow-y:auto}
.oc-clear{font-size:12.5px;font-weight:650;color:var(--accent-text);text-decoration:none;padding:6px}
.oc-clear:hover{text-decoration:underline}
.oc-scope{display:inline-flex;align-items:center;gap:8px;margin:0 0 14px;font-size:12px;font-weight:600;background:rgba(255,255,255,.18);border-radius:99px;padding:4px 5px 4px 12px}
.oc-scope a{display:grid;place-items:center;background:rgba(0,0,0,.25);color:#fff;border-radius:99px;width:20px;height:20px;text-decoration:none;line-height:1}
.is-calm .oc-scope{background:var(--surface2)}.is-calm .oc-scope a{background:var(--text-faint)}
.oc-todo{list-style:none;counter-reset:oc;margin:4px 0 2px;padding:0;display:grid;gap:8px;max-width:680px}
.oc-todo li{counter-increment:oc;display:flex;align-items:center;gap:12px;background:rgba(255,255,255,.14);border-radius:14px;padding:9px 9px 9px 12px;font-size:13.5px;font-weight:550}
.oc-todo li::before{content:counter(oc);width:22px;height:22px;border-radius:50%;background:rgba(255,255,255,.92);color:#b8321f;display:grid;place-items:center;font-size:11.5px;font-weight:800;flex:none}
.oc-todo .t{flex:1;min-width:0}
.oc-todo small{display:block;opacity:.85;font-size:12px;font-weight:400;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.oc-todo a{flex:none;background:#16161c;color:#fff;border-radius:99px;padding:6px 13px;font-size:12px;font-weight:650;text-decoration:none}
.oc-todo a:hover{background:#000}
.oc-todo form{margin:0;flex:none}
.oc-todo button{font:inherit;border:0;cursor:pointer;background:#16161c;color:#fff;border-radius:99px;padding:6px 13px;font-size:12px;font-weight:650}
.oc-todo button:hover{background:#000}
.oc-more{display:inline-flex;gap:6px;margin-top:12px;color:inherit;font-size:12.5px;font-weight:650;text-decoration:none;opacity:.92}
.oc-more:hover{text-decoration:underline}.oc-more i{font-style:normal}
.oc-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:14px 0 24px}
.oc-st{background:var(--surface);border:1px solid var(--border);border-radius:18px;padding:14px 16px 0;overflow:hidden;display:flex;flex-direction:column;min-width:0}
/* .oc-st: no hover lift on a container card (17 Nov 2026, UI review) */
.oc-sth{display:flex;justify-content:space-between;align-items:center}
.oc-sth>a{font-size:10.5px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--muted);text-decoration:none}
.oc-sth>a:hover{color:var(--text)}
.oc-dots{font:inherit;border:0;background:none;color:var(--muted);cursor:pointer;font-size:15px;letter-spacing:1px;padding:0 3px;line-height:1;border-radius:6px}
.oc-dots:hover{color:var(--text);background:var(--surface2)}
.oc-stm{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:8px 0 4px;text-decoration:none;color:inherit}
.oc-stm>span{min-width:0}
.oc-tri{display:block;font-size:11px;font-weight:700;min-height:15px}
.oc-tri.good{color:var(--ok)}.oc-tri.bad{color:var(--danger)}.oc-tri.flat{color:var(--muted)}
.oc-stm b{display:block;font-family:var(--font-display);font-weight:500;font-size:28px;letter-spacing:-.02em;line-height:1.05;font-variant-numeric:tabular-nums}
.oc-stm small{display:block;font-size:11.5px;color:var(--muted);margin-top:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.oc-sp{display:block;width:calc(100% + 32px);margin:4px -16px 0;height:54px}
.oc-sp path{fill:none;stroke-width:2;stroke-linejoin:round;stroke-linecap:round;vector-effect:non-scaling-stroke}
.oc-sp .a{stroke:var(--ok)}.oc-sp .b{stroke:var(--warn)}
.oc-sp .fa{fill:color-mix(in srgb,var(--ok) 12%,transparent);stroke:none}
.oc-empty{margin:10px 0 16px;font-size:12.5px;color:var(--muted);line-height:1.5}
.oc-two{display:grid;grid-template-columns:minmax(0,.75fr) minmax(0,1.25fr);gap:14px;margin:0 0 24px}
.oc-two.solo{grid-template-columns:1fr}
.oc-card{background:var(--surface);border:1px solid var(--border);border-radius:18px;padding:16px 18px 12px;display:flex;flex-direction:column;min-width:0}
.oc-ch{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:0 0 12px}
.oc-ch h2{margin:0;font-family:var(--font-display);font-size:18px;font-weight:500}
.oc-ch h2 span{font-family:var(--font);font-size:12.5px;color:var(--muted);font-weight:500;margin-left:6px}
.oc-foot{display:flex;align-items:center;flex-wrap:wrap;gap:6px 14px;border-top:1px solid var(--border-soft);margin-top:auto;padding-top:10px;font-size:11.5px;color:var(--muted)}
.oc-foot span{display:inline-flex;align-items:center;gap:6px}
.oc-foot i{width:9px;height:9px;border-radius:50%;display:inline-block}
.oc-foot .tot{margin-left:auto}.oc-foot .tot b{color:var(--text)}
.k-on{background:#8fd47a}.k-run{background:var(--accent)}.k-al{background:#f6a43c}.k-off{background:var(--surface);box-shadow:inset 0 0 0 1.5px var(--text-faint)}
.oc-pc{display:grid;gap:6px;align-items:stretch;min-height:250px;margin-bottom:10px}
.oc-pcol{display:flex;flex-direction:column;align-items:center;justify-content:flex-end;gap:6px;position:relative;text-decoration:none;color:inherit;min-width:0}
.oc-pcol::before{content:"";position:absolute;top:0;bottom:26px;left:50%;border-left:1px dashed var(--border)}
.oc-pcol>*{position:relative}
.oc-pill{width:36px;border-radius:99px;display:grid;place-items:center;font-size:11.5px;font-weight:750;font-variant-numeric:tabular-nums;min-height:28px}
.oc-pill.on{background:#8fd47a;color:#14301c}
.oc-pill.off{background:var(--surface);color:var(--text);box-shadow:inset 0 0 0 1.5px var(--border)}
.oc-pill.al{background:#f6a43c;color:#2b1a00}
.oc-pdot{width:7px;height:7px;border-radius:50%;background:var(--text-faint)}
.oc-pcol .lb{font-size:11.5px;font-weight:650;color:var(--text-2);height:16px;white-space:nowrap}
.oc-pcol:hover .lb{color:var(--text);text-decoration:underline}
.oc-tl{display:grid;grid-template-columns:132px minmax(0,1fr);column-gap:10px;margin-bottom:10px}
.oc-two.solo .oc-tl{grid-template-columns:200px minmax(0,1fr);column-gap:14px}
.oc-tl-l{display:flex;flex-direction:column;justify-content:center;min-width:0;height:44px}
.oc-tl-l b{font-size:12px;font-weight:650;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.oc-tl-l small{font-size:11px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.oc-tl-r{position:relative;height:44px;overflow:hidden;background-image:repeating-linear-gradient(90deg,var(--border-soft) 0 1px,transparent 1px calc(100%/7))}
.oc-tl-r::after{content:"";position:absolute;top:0;bottom:0;left:var(--now);border-left:1.5px dashed var(--accent);opacity:.6}
.oc-tb{position:absolute;top:8px;height:28px;border-radius:99px;display:flex;align-items:center;gap:6px;padding:0 10px 0 3px;font-size:11.5px;font-weight:700;color:#14301c;text-decoration:none;white-space:nowrap;box-sizing:border-box;overflow:hidden;min-width:104px;max-width:100%}
.oc-tb:hover{filter:brightness(1.05);box-shadow:0 2px 8px rgba(0,0,0,.12)}
.oc-tb .ic{width:22px;height:22px;border-radius:50%;display:grid;place-items:center;font-size:9.5px;font-weight:800;background:rgba(255,255,255,.85);color:#222;flex:none}
.oc-tb .av{width:20px;height:20px;border-radius:50%;display:grid;place-items:center;font-size:8.5px;font-weight:800;color:#fff;flex:none;margin-left:-4px;box-shadow:0 0 0 2px rgba(255,255,255,.7)}
.oc-tb .n{margin-left:auto;font-variant-numeric:tabular-nums;padding-left:4px}
.oc-tb.ok{background:#8fd47a}
.oc-tb.run{background:var(--accent-fill);color:#fff}
.oc-tb.warn{background:#f6a43c;color:#2b1a00}
.oc-tb.q{background:var(--surface);color:var(--text);box-shadow:inset 0 0 0 1.5px var(--border)}
.oc-tb.q .ic{background:var(--surface2)}
.oc-tl-ax{grid-column:2;display:grid;grid-template-columns:repeat(7,minmax(0,1fr));font-size:10.5px;color:var(--muted);margin-top:6px}
.oc-tl-ax span{white-space:nowrap;overflow:hidden}
.oc-tl-ax span:last-child{color:var(--accent-text);font-weight:700}

/* Settings rows (S1 venue settings, 19 Oct 2026; shared since 21 Oct by the person page's
   Account card and Settings › People & sign-in): a card of rows, each showing its value
   and opening its form in place (<details class="vs-row">). */
.vs-card{background:var(--surface);border:1px solid var(--border);border-radius:14px;min-width:0;overflow:hidden}
.vs-h{padding:12px 14px 10px}.vs-h h2{font-size:13.5px;font-weight:650;margin:0}
.vs-row>summary{display:flex;align-items:center;gap:10px;padding:10px 14px;border-top:1px solid var(--border-soft);list-style:none;cursor:pointer;font-size:13px}
.vs-row>summary::-webkit-details-marker{display:none}
.vs-row>summary:hover{background:var(--hover)}
.vs-row>summary:focus-visible{outline:none;box-shadow:inset var(--ring)}
.vs-row[open]>summary{background:var(--accent-soft)}
.vs-k{width:96px;flex:none;color:var(--muted);font-size:12.5px}
.vs-v{flex:1;min-width:0;display:flex;align-items:center;gap:7px;color:var(--text);white-space:nowrap;overflow:hidden}
.vs-v>span{min-width:0;overflow:hidden;text-overflow:ellipsis}
.vs-v small{color:var(--muted);font-size:12px}
.vs-ch{flex:none;width:14px;height:14px;fill:none;stroke:var(--text-faint);stroke-width:2;stroke-linecap:round;stroke-linejoin:round;transition:transform .15s}
.vs-row[open] .vs-ch{transform:rotate(90deg);stroke:var(--accent-text)}
.vs-body{border-top:1px solid var(--border-soft)}
.vs-body .vn-form{border-top:0}
.vs-body .vn-form+.vn-form{border-top:1px solid var(--border-soft)}
.vs-note{padding:10px 14px 2px;font-size:11.5px;color:var(--text-faint);line-height:1.5}
.vs-note:last-child{padding-bottom:12px}
.vs-ro{padding:10px 14px 12px;font-size:12.5px;color:var(--text-2);line-height:1.5;white-space:pre-wrap}

/* "Install on…" chooser (app-install-targets in settings.html), shared by the library
   dialogs, the Apps list (A1) and the app page (D1). A fixed last column so the two Queue
   buttons line up whatever their counts. */
.ait-wrap{margin:6px 0 2px;}
.ait{border:1px solid var(--border);border-radius:11px;margin-top:8px;overflow:hidden;}
.ait-h{padding:9px 12px;background:var(--surface-3);font-size:12.5px;border-bottom:1px solid var(--border-soft);}
.ait-opt{display:grid;grid-template-columns:40px 1fr 118px;align-items:center;gap:11px;padding:10px 12px;border-bottom:1px solid var(--border-soft);}
.ait-opt .cc-btn{width:100%;justify-content:center;}
.ait-opt:last-child{border-bottom:0;}
.ait-n{font-weight:800;font-size:16px;text-align:right;font-variant-numeric:tabular-nums;}
.ait-t{flex:1;min-width:0;font-size:12.5px;line-height:1.45;}
.ait-t .d{display:block;color:var(--muted);font-size:11.5px;margin-top:1px;}
.ait-none{font-size:12.5px;color:var(--muted);padding:9px 2px;line-height:1.5;}

/* No page header block (user, 26 Oct 2026: "i dont want this section on any page, that
   includes page category page type and status"). The section label, status line and
   description go; the title stays only for screen readers (one h1 per page) and the
   island at the top names the page. A page's buttons stay, right-aligned. */
body .cc-top .cc-eyebrow,
body .cc-top .cc-status,
body .cc-top .cc-sub { display: none; }
body .cc-top .cc-h1 {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
body .cc-top { margin-bottom: 0; justify-content: flex-end; }
body .cc-top > div:first-child { flex: 0 0 0; min-width: 0; }
body .cc-top .cc-actions { padding-top: 0; }
body .cc-top:has(.cc-actions:not(.isl-dup) > :not(.isl-dup, .isl-dup-sr)) { margin-bottom: 14px; }

/* D3 island (picked 3 Nov 2026): a breadcrumb in front of the page's name (layout.html
   crumbs()), and live moments over the island (static/js/layout/island.js): what a click
   did (flash), a new critical alert (alert, until Open / Later), and a job slot. */
.appbar-island { position: relative; }
.appbar-island .isl-cr { display: flex; align-items: center; gap: 6px; min-width: 0; flex: 0 1 auto; font-size: 13px; }
.appbar-island .isl-cr .cr { color: var(--muted); white-space: nowrap; text-decoration: none; font-weight: 500; }
.appbar-island .isl-cr a.cr:hover { color: var(--accent-text); text-decoration: underline; text-underline-offset: 3px; }
.appbar-island .isl-cr .sep { color: var(--text-faint); flex: none; }
.appbar-island .isl-cr .isl-t { max-width: none; min-width: 0; }
@media (max-width: 1280px) { .appbar-island .isl-cr .cr:first-child, .appbar-island .isl-cr .cr:first-child + .sep { display: none; } }
.appbar-island .isl-live { position: absolute; top: 0; left: 0; right: 0; height: 100%; display: flex; align-items: center; gap: 10px; padding: 0 10px 0 16px; border-radius: inherit;
  background: var(--surface); opacity: 0; transform: translateY(-4px) scale(.985); transition: opacity .18s ease, transform .18s ease; z-index: 2; }
.isl-live.show { opacity: 1; transform: none; }
.isl-live .il-m { flex: 1; min-width: 0; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text); }
.isl-live .il-m b { font-weight: 650; }
.isl-live .il-m small { color: var(--muted); font-size: 12px; margin-left: 8px; }
.isl-live .il-ic { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; flex: none; color: #fff; background: var(--info); }
.isl-live .il-ic svg { width: 13px; height: 13px; }
.isl-live .il-ic.ok { background: var(--ok); } .isl-live .il-ic.err { background: var(--danger); } .isl-live .il-ic.warn { background: var(--warn); }
.isl-live.flash.err { box-shadow: inset 0 0 0 1.5px var(--danger); }
.isl-live .il-x { border: 0; background: transparent; color: var(--muted); font-size: 18px; line-height: 1; cursor: pointer; padding: 2px 6px; border-radius: 8px; }
.isl-live .il-x:hover { color: var(--text); background: var(--hover); }
.isl-live.alert { box-shadow: inset 0 0 0 1.5px var(--danger); }
.isl-live .il-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--danger); flex: none; box-shadow: 0 0 0 0 rgba(207,69,41,.5); animation: il-pulse 1.4s infinite; }
@keyframes il-pulse { 70% { box-shadow: 0 0 0 8px rgba(207,69,41,0); } 100% { box-shadow: 0 0 0 0 rgba(207,69,41,0); } }
@media (prefers-reduced-motion: reduce) { .isl-live, .isl-live .il-dot { transition: none; animation: none; } }
.isl-job { display: inline-flex; align-items: center; gap: 7px; flex: none; border: 1px solid var(--border); border-radius: 99px; padding: 3px 10px 3px 5px;
  font-size: 12px; color: var(--text-2); text-decoration: none; background: var(--surface); max-width: 260px; }
.isl-job:hover { border-color: var(--accent-edge); color: var(--text); }
.isl-job .ij-ring { width: 16px; height: 16px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: conic-gradient(var(--accent) var(--p), var(--surface2) 0); }
.isl-job .ij-ring i { width: 10px; height: 10px; border-radius: 50%; background: var(--surface); display: block; }
.isl-job .ij-t { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.isl-job .ij-n { font-family: var(--mono); font-size: 11.5px; color: var(--muted); flex: none; }
@media (max-width: 1100px) { .isl-job .ij-t { display: none; } }
/* D3 chips: the page's key numbers, one each; a link chip opens that view. */
.appbar-island .isl-chips { display: flex; align-items: center; gap: 6px; min-width: 0; flex: 1; overflow: hidden; }
.appbar-island .isl-chip { flex: none; display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--border); border-radius: 99px;
  padding: 3px 10px; font-size: 12px; color: var(--text-2); white-space: nowrap; text-decoration: none; background: var(--surface); }
.appbar-island .isl-chip b { color: var(--text); font-weight: 650; }
.appbar-island a.isl-chip:hover { border-color: var(--accent-edge); color: var(--text); }
.appbar-island .isl-chip.warn { background: var(--warn-bg); border-color: transparent; color: var(--warn); }
.appbar-island .isl-chip.bad { background: var(--danger-bg, #fde8e4); border-color: transparent; color: var(--danger); }
.appbar-island .isl-chip.warn b, .appbar-island .isl-chip.bad b { color: inherit; }
.appbar-island .isl-chip .w, .appbar-island .isl-chip .d { color: inherit; font-weight: 650; }
.appbar-island .isl-chip.info { background: var(--info-bg); border-color: transparent; color: var(--info); }
@media (max-width: 1100px) { .appbar-island .isl-chips .isl-chip:nth-child(n+3) { display: none; } }

/* ══ H1 · One canvas (picked 5 Nov 2026) ══════════════════════════════════════════
   User: "i really like the page design … the navbar and the header seems incoherent".
   Every page sits on the Overview's soft grey canvas; the header, its island and the dock
   are white rounded shapes like the cards, the dock's selected item is the same dark pill
   as a selected tab, and state colour lives in dots. Last in the file on purpose: it
   overrides the header glass and its scroll morph, the coral dock ring (D2), the body's
   colour washes and the island chips' tints above. */
:root { --canvas: #efeff2; --bg: #efeff2; }
html[data-theme="dark"] { --canvas: #0d0d12; }
body { background: var(--canvas); }
body::before { display: none; }
.cc-card { background: var(--surface); }
html[data-theme="dark"] .cc-card { background: var(--surface); }

/* Header: no bar. The canvas fades in behind the pills once the page scrolls under them. */
.appbar, .appbar.is-scrolled { --ph: 0; top: 0; width: 100%; border-radius: 0; border-bottom: 0;
  padding-left: 24px; padding-right: 24px; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none;
  background: linear-gradient(var(--canvas) 70%, color-mix(in srgb, var(--canvas) 0%, transparent)); }
html[data-theme="dark"] .appbar, html[data-theme="dark"] .appbar.is-scrolled { box-shadow: none; border-bottom: 0;
  background: linear-gradient(var(--canvas) 70%, color-mix(in srgb, var(--canvas) 0%, transparent)); }
.appbar-brand { display: inline-flex; align-items: center; gap: 0; font-size: 21px; }
.appbar-brand .brand-hub { margin-left: .3em; }
.appbar-brand::before { content: ""; width: 34px; height: 34px; border-radius: 10px; flex: none; margin-right: 10px;
  background: url(/static/favicon.svg) center / contain no-repeat; }
.appbar-brand .brand-aio, .appbar-brand .brand-hub { background: none; -webkit-text-fill-color: currentColor; color: var(--text); font-weight: 650; }
/* E1 (16 Nov 2026): the server's label after the wordmark on any server that isn't prod. */
.appbar-brand .brand-env { margin-left: 10px; font-size: 11px; font-weight: 700; letter-spacing: .06em; line-height: 1;
  color: #fff; -webkit-text-fill-color: #fff; background: var(--accent-fill); border-radius: 99px; padding: 4px 9px; }
.appbar .appbar-icon { width: 42px; height: 42px; border: 0; border-radius: 50%; background: var(--surface); }
.appbar .appbar-icon:hover { background: var(--surface2); }
.appbar .appbar-icon .nav-badge { border-color: var(--canvas); }
.appbar .appbar-acct { height: 42px; border: 0; border-radius: 99px; background: var(--surface); padding: 0 5px 0 14px; }
.appbar .appbar-acct:hover { background: var(--surface2); }

/* The island: one white pill; its status chips are grey pills with a coloured dot. */
.appbar-island.always, .appbar.is-scrolled .appbar-island { background: var(--surface); border-radius: 99px;
  min-height: 44px; padding: 0 6px 0 16px; margin: 0 12px; }
.appbar-island::before { display: none; }
.appbar-island .isl-chip { background: var(--canvas); border: 0; color: var(--text-2); gap: 6px; }
.appbar-island .isl-chip::before { content: ""; width: 7px; height: 7px; border-radius: 50%; flex: none; background: var(--text-faint); }
.appbar-island .isl-chip.ok::before { background: #1f9d60; }
.appbar-island .isl-chip.warn, .appbar-island .isl-chip.bad, .appbar-island .isl-chip.info { background: var(--canvas); color: var(--text-2); }
.appbar-island .isl-chip.warn::before { background: #ef7d31; }
.appbar-island .isl-chip.bad::before { background: #d64432; }
.appbar-island .isl-chip.info::before { background: var(--info); }
.appbar-island .isl-chip.warn b, .appbar-island .isl-chip.bad b, .appbar-island .isl-chip .w, .appbar-island .isl-chip .d { color: var(--text); }
.appbar-island a.isl-chip:hover { background: var(--surface2); }

/* The dock: a white rounded card; the selected page is the coral pill (5 Nov 2026, user: no black as the accent). */
.dock.dock-s, html[data-theme="dark"] .dock.dock-s { border-radius: 22px; background: var(--surface);
  -webkit-backdrop-filter: none; backdrop-filter: none;
  box-shadow: 0 1px 0 rgba(0, 0, 0, .03), 0 14px 34px -18px rgba(0, 0, 0, .35); }
html[data-theme="dark"] .dock.dock-s { box-shadow: 0 0 0 1px rgba(255, 255, 255, .06), 0 14px 34px -14px rgba(0, 0, 0, .7); }
.dock-s > .nav-link { border-radius: 15px; }
.dock .nav-link.active { background: var(--accent-fill); color: #fff; }
.dock-s .dock-search { border-radius: 15px; background: var(--canvas); border: 0; }
.dock.dock-s .dock-island { border-radius: 22px; }

/* ══ K1 · Ctrl+K as grouped cards on the canvas (picked 5 Nov 2026) ══════════════════
   The palette is the grey canvas with the search as a white pill, each kind of result a
   white card under its own heading, the row you'd open the dark pill (like the dock),
   state as a dot; opened empty it starts with the main pages as tiles. */
.cmdk-panel { background: var(--canvas); border: 0; border-radius: 24px; padding: 10px; }
.cmdk-input-row { background: var(--surface); border: 0; border-radius: 99px; padding: 8px 14px; }
.cmdk-esc { background: var(--surface); }
.cmdk-list { padding: 0; max-height: 58vh; display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.cmdk-grp { list-style: none; }
.cmdk-grp > ul { list-style: none; margin: 0; padding: 6px; background: var(--surface); border-radius: 18px; }
.cmdk-head, .cmdk-head:first-child { font-size: 10.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); padding: 6px 10px 4px; }
.cmdk-item { border-radius: 13px; }
.cmdk-item.cmdk-rich { gap: 10px; padding: 8px 10px; }
.cmdk-ic { width: 30px; height: 30px; border-radius: 10px; background: var(--canvas); }
.cmdk-item.active { background: var(--accent-fill); color: #fff; }
.cmdk-item.active .cmdk-l1 { color: var(--surface); }
.cmdk-item.active .cmdk-l2, .cmdk-item.active .cmdk-rt { color: color-mix(in srgb, var(--surface) 70%, transparent); }
.cmdk-item.active .cmdk-ic { background: color-mix(in srgb, var(--surface) 14%, transparent); color: var(--surface); }
.cmdk-item.active .cmdk-ent { color: var(--surface); border-color: color-mix(in srgb, var(--surface) 40%, transparent); }
.cmdk-item.active .cmdk-kind { color: color-mix(in srgb, var(--surface) 70%, transparent); }
.cmdk-list mark { color: inherit; font-weight: 700; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 2px; text-decoration-color: color-mix(in srgb, var(--accent) 60%, transparent); }
.cmdk-kind { text-transform: none; letter-spacing: 0; font-size: 11px; color: var(--muted); }
.cmdk-dot.on { box-shadow: none; }
.cmdk-item.cmdk-pending.active { background: none; color: var(--muted); }
.cmdk-fleet .cmdk-l1 { font-size: 12px; color: var(--text-2); }
.cmdk-foot { border: 0; padding: 9px 8px 2px; color: var(--text-2); }
.cmdk-foot kbd { background: var(--surface); }
.cmdk-still .cmdk-item { animation: none; }

/* ══ K1 for the bell and the account menu (5 Nov 2026, user: "make top right alert
   dropdown and profile dropdown also consistent with this design") ══ The grey canvas,
   white groups, the dark pill under the pointer, like Ctrl+K. */
#alerts-pop, #acct-pop { background: var(--canvas); border: 0; border-radius: 22px; padding: 8px; box-shadow: 0 30px 70px -30px rgba(0,0,0,.45), 0 2px 8px rgba(0,0,0,.08); backdrop-filter: none; -webkit-backdrop-filter: none; will-change: auto; }
#acct-pop { width: 264px; }
#acct-pop .nbar-mhead { background: var(--surface); border: 0; border-radius: 16px; padding: 10px 12px; margin: 0 0 8px; }
#acct-pop .nbar-mi { position: relative; isolation: isolate; background: var(--surface); border-radius: 0; padding: 9px 14px; }
#acct-pop .nbar-mi::before { content: ""; position: absolute; inset: 2px 6px; border-radius: 12px; z-index: -1; transition: background .12s; }
#acct-pop .nbar-mi:hover, #acct-pop .nbar-mi:focus-visible { background: var(--surface); color: var(--surface); outline: none; }
#acct-pop .nbar-mi:hover::before, #acct-pop .nbar-mi:focus-visible::before { background: var(--accent-fill); }
#acct-pop .nbar-mi:hover .ui-icon, #acct-pop .nbar-mi:hover .ui-icon svg, #acct-pop .nbar-mi:hover .nbar-mi-rt { color: color-mix(in srgb, var(--surface) 75%, transparent); }
#acct-pop .nbar-mi.danger:hover::before { background: var(--danger); }
#acct-pop .nbar-mi.danger:hover, #acct-pop .nbar-mi.danger:hover .ui-icon { color: #fff; }
#acct-pop :is(.nbar-mhead, .nbar-sep) + .nbar-mi, #acct-pop .nbar-sep + form .nbar-mi { border-top-left-radius: 16px; border-top-right-radius: 16px; padding-top: 11px; }
#acct-pop .nbar-mi:has(+ .nbar-sep), #acct-pop .nbar-mi:last-child, #acct-pop form:last-child .nbar-mi { border-bottom-left-radius: 16px; border-bottom-right-radius: 16px; padding-bottom: 11px; }
#acct-pop .nbar-sep { height: 8px; background: none; margin: 0; }
#acct-pop .nbar-mi-rt { background: var(--canvas); border-radius: 99px; padding: 1px 8px; }
#acct-pop .nbar-mi:hover .nbar-mi-rt { background: color-mix(in srgb, var(--surface) 14%, transparent); }
#alerts-pop .nbar-pop-h { padding: 4px 6px 8px 10px; align-items: center; color: var(--muted); }
#alerts-pop .nbar-al-top { background: var(--surface); color: var(--text); border-radius: 99px; padding: 4px 11px; font-size: 11.5px; }
#alerts-pop .nbar-al-top:hover { text-decoration: none; background: var(--accent-fill); color: #fff; }
#alerts-pop .nbar-al-list { background: var(--surface); border-radius: 18px; padding: 6px; }
#alerts-pop .nbar-al { border-radius: 13px; padding: 9px 10px; }
#alerts-pop .nbar-al:hover { background: var(--accent-fill); }
#alerts-pop .nbar-al:hover .nbar-al-t { color: var(--surface); }
#alerts-pop .nbar-al:hover .nbar-al-s { color: color-mix(in srgb, var(--surface) 70%, transparent); }
#alerts-pop .nbar-al-sec { color: var(--muted); padding: 8px 10px 4px; }
#alerts-pop .nbar-al-dot { width: 7px; height: 7px; }

/* ══ The coral is the accent, never black (5 Nov 2026, user: "you switch to black as accent
   color at many places, we cant do that … otherwise accent is this orange color") ══
   Whatever is selected or under the pointer is the coral fill (--accent-fill, white text in
   both themes); main buttons are the coral pill with a white circle and an arrow, after the
   user's reference ("Book Demo"). */
.cmdk-item.active .cmdk-l1, .cmdk-item.active .cmdk-ent { color: #fff; }
.cmdk-item.active .cmdk-l2, .cmdk-item.active .cmdk-rt, .cmdk-item.active .cmdk-kind { color: rgba(255,255,255,.82); }
.cmdk-item.active .cmdk-ic { background: rgba(255,255,255,.2); color: #fff; }
.cmdk-item.active .cmdk-ent { border-color: rgba(255,255,255,.55); }
.cmdk-item.active mark { text-decoration-color: rgba(255,255,255,.75); }
.cmdk-item.active .cmdk-dot.on { box-shadow: 0 0 0 2px #fff; }
#acct-pop .nbar-mi:hover, #acct-pop .nbar-mi:focus-visible { color: #fff; }
#acct-pop .nbar-mi:hover .ui-icon, #acct-pop .nbar-mi:hover .ui-icon svg, #acct-pop .nbar-mi:hover .nbar-mi-rt { color: rgba(255,255,255,.85); }
#acct-pop .nbar-mi:hover .nbar-mi-rt { background: rgba(255,255,255,.2); }
#alerts-pop .nbar-al:hover .nbar-al-t { color: #fff; }
#alerts-pop .nbar-al:hover .nbar-al-s { color: rgba(255,255,255,.82); }
#alerts-pop .nbar-al:hover .nbar-al-dot { box-shadow: 0 0 0 2px #fff; }
.appbar-island .isl-acts > .cc-btn.primary {
  display: inline-flex; align-items: center; gap: 10px; background: var(--accent-fill); color: #fff;
  border: 0; border-radius: 99px; padding: 4px 4px 4px 15px; font-weight: 600; box-shadow: none; }
.appbar-island .isl-acts > .cc-btn.primary:hover { background: var(--accent-fill-h); color: #fff; }
.appbar-island .isl-acts > .cc-btn.primary::after {
  content: ""; flex: none; width: 24px; height: 24px; border-radius: 50%;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23cf4529' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 17 17 7M9 7h8v8'/%3E%3C/svg%3E") center / 13px no-repeat; }

/* ══ The gradient call to action, exactly aioapp.com's "Book demo" (.generic--primary; user,
   5 Nov 2026: "i need animation exactly like on aioapp"). Coral #F9674E into violet #7A80F6;
   on hover white floods out from the arrow circle (clip-path, 0.8 s in, 0.4 s out), the label
   becomes gradient text, the circle turns gradient and its arrow white. Markup:
   <a class="cta-g"><span class="cta-t">Open</span></a>; .plus swaps the arrow for a plus. */
.cta-g.cta-g { position: relative; isolation: isolate; overflow: hidden; display: inline-flex; align-items: center; justify-content: space-between; gap: 14px;
  border: 0; border-radius: 40px; padding: 5px 5px 5px 16px; min-height: 0; background: linear-gradient(90deg, #f9674e, #7a80f6); color: #fff;
  font-weight: 600; text-decoration: none; cursor: pointer; box-shadow: none; }
.cta-g.cta-g:hover { background: linear-gradient(90deg, #f9674e, #7a80f6); color: #fff; }
/* Once the white has flooded in, the gradient underneath goes too: its antialiased rounded
   edge left a 1 px coloured line on the left (17 Nov 2026, UI review). Back at once on leave. */
.cta-g.cta-g { transition: background-image 0s; transition-behavior: allow-discrete; }
.cta-g.cta-g:hover, .cta-g.cta-g:focus-visible { background-image: none; background-color: #fff; transition: background-image 0s .75s, background-color 0s .75s; transition-behavior: allow-discrete; }
.cta-g.cta-g::before { content: ""; position: absolute; inset: -2px; border-radius: inherit; background: #fff; z-index: -1;
  clip-path: circle(0px at calc(100% - 20px) 50%); transition: clip-path .4s cubic-bezier(.4, 0, .2, 1); }
/* inset -2px: the flood reaches past the edge, so no hairline of the gradient stays on the left */
.cta-g.cta-g:hover::before, .cta-g.cta-g:focus-visible::before { clip-path: circle(150% at calc(100% - 20px) 50%); transition: clip-path .8s cubic-bezier(.4, 0, .2, 1); }
.cta-g .cta-t { white-space: nowrap; transition: color .4s ease-in-out, -webkit-text-fill-color .4s ease-in-out; }
.cta-g:hover .cta-t, .cta-g:focus-visible .cta-t { background: linear-gradient(90deg, #f9674e, #7a80f6); -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; transition: color .1s ease-in-out .1s, -webkit-text-fill-color .8s ease-in-out .15s; }
.cta-g.cta-g::after { content: ""; flex: none; width: 26px; height: 26px; border-radius: 999px; display: block;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 11 10' fill='none'%3E%3Cdefs%3E%3ClinearGradient id='g' x1='9.3' y1='.7' x2='.9' y2='9.3' gradientUnits='userSpaceOnUse'%3E%3Cstop stop-color='%23F9674E'/%3E%3Cstop offset='1' stop-color='%237A80F6'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath d='M9.32136 0.699868L9.32136 7.93896M9.32136 0.699868L1.94305 0.699868M9.32136 0.699868L0.713332 9.14548' stroke='url(%23g)' stroke-width='1.41334' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 11px 10px no-repeat; transition: background .4s ease-in-out; }
.cta-g.cta-g:hover::after, .cta-g.cta-g:focus-visible::after { background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 11 10' fill='none'%3E%3Cpath d='M9.32136 0.699868L9.32136 7.93896M9.32136 0.699868L1.94305 0.699868M9.32136 0.699868L0.713332 9.14548' stroke='%23fff' stroke-width='1.41334' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 11px 10px no-repeat, linear-gradient(135deg, #f9674e, #7a80f6);
  transition: background .8s ease-in-out .15s; }
.cta-g.plus::after { background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 11 10' fill='none'%3E%3Cdefs%3E%3ClinearGradient id='g' x1='9.3' y1='.7' x2='.9' y2='9.3' gradientUnits='userSpaceOnUse'%3E%3Cstop stop-color='%23F9674E'/%3E%3Cstop offset='1' stop-color='%237A80F6'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath d='M5.5 .8v8.4M1.3 5h8.4' stroke='url(%23g)' stroke-width='1.41334' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 11px 10px no-repeat; }
.cta-g.plus:hover::after, .cta-g.plus:focus-visible::after { background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 11 10' fill='none'%3E%3Cpath d='M5.5 .8v8.4M1.3 5h8.4' stroke='%23fff' stroke-width='1.41334' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 11px 10px no-repeat, linear-gradient(135deg, #f9674e, #7a80f6); }
.cta-g .ui-icon { display: none; }
@media (prefers-reduced-motion: reduce) { .cta-g.cta-g::before, .cta-g .cta-t, .cta-g.cta-g::after { transition: none; } }

/* ══ Dark mode: the bright fills step down a shade (5 Nov 2026, user: "bright colors need to
   be adjusted accordingly in dark mode"). The coral fill, the gradient pill and its hover
   flood (dark, not white), and white rims on map dots. */
html[data-theme="dark"] { --accent-fill: #b8432c; --accent-fill-h: #a33b26; }
html[data-theme="dark"] .cta-g.cta-g, html[data-theme="dark"] .cta-g.cta-g:hover { background: linear-gradient(90deg, #c9543f, #6268cf); }
html[data-theme="dark"] .cta-g.cta-g::before { background: #24242c; }
html[data-theme="dark"] .cta-g.cta-g::after { background-color: #e9e9ee; }

/* ══ App shell (5 Nov 2026; user: "no pages are scrollable", "navbar should not hide") ══
   chrome.js sets html.shell on a desktop window: the window never scrolls, <main> ends 12 px
   above the dock (--shell-h) and scrolls inside. A Fleet-style list page (main.shell-list) does
   not scroll at all: its .fleet-md is sized by chrome.js, the rail and the toolbar stay, and
   only the table scrolls under its sticky header row. */
html.shell, html.shell body { overflow: hidden; }
html.shell main#main { height: var(--shell-h); overflow-y: auto; overscroll-behavior: contain; padding-bottom: 0; scrollbar-width: thin; }
/* A page that scrolls runs to the window's bottom edge and slides under the floating dock; the
   padding is the dock's band, so the end of the page comes to rest above it (29 Nov 2026, user:
   "above the dock there is an invisible line that is cutting them"). List pages (shell-list)
   don't scroll and keep ending above the dock; pages that fit the window size from --shell-h. */
html.shell main#main:not(.shell-list) { box-sizing: border-box; height: var(--shell-full, var(--shell-h)); padding-bottom: calc(var(--shell-full, var(--shell-h)) - var(--shell-h)); }
html.shell .fleet-md { align-items: stretch; }
/* Releases: the release list and the detail run to the bottom, each scrolling, level at the
   top (17 Nov 2026, UI review: "the side rail has to be till the bottom like other pages …
   right pane starting point y has to be same as left rail"). */
html.shell .ro-md { align-items: stretch; min-height: 0; }
html.shell .ro-md > * { margin-top: 0; min-height: 0; }
html.shell .ro-md > .ro-list { position: static; max-height: 100%; overflow-y: auto; scrollbar-width: thin; }
html.shell .ro-md > .ro-det { overflow-y: auto; scrollbar-width: thin; }
html.shell .fleet-md > .fleet-rail { position: static; align-self: stretch; max-height: 100%; overflow-y: auto; scrollbar-width: thin; }
/* Fleet: tabs and search stay, only the open list scrolls. */
html.shell .fleet-md > .fleet-rail:has(> .rail-tabs) { display: flex; flex-direction: column; overflow: hidden; }
html.shell .fleet-md > .fleet-rail:has(> .rail-tabs) > * { flex: none; }
html.shell .fleet-md > .fleet-rail:has(> .rail-tabs) > .fleet-rail-list { flex: 1 1 auto; min-height: 0; overflow-y: auto; scrollbar-width: thin; }
html.shell .fleet-md > .fleet-roster { display: flex; flex-direction: column; min-height: 0; overflow-y: auto; scrollbar-width: thin; }
html.shell .fleet-roster > * { flex: none; }
html.shell .fleet-roster > :has(.ft-wrap) { flex: 0 1 auto; min-height: 0; }
/* Only the last table on the page is the one that scrolls; tables above it (an app's Versions
   above its Devices) keep their height. */
html.shell .fleet-roster > :has(.ft-wrap):has(~ :has(.ft-wrap)) { flex: none; }
html.shell .fleet-roster > :has(.ft-wrap):has(~ :has(.ft-wrap)) .ft-wrap { overflow: visible; }
html.shell .fleet-roster > :has(.ft-wrap):not(.card) { align-items: stretch; overflow: hidden; }
html.shell .fleet-roster > :has(.ft-wrap):not(.card) > * { max-height: 100%; min-height: 0; }
html.shell .fleet-roster .card:has(> .ft-wrap) { display: flex; flex-direction: column; min-height: 0; }
html.shell .fleet-roster .card:has(> .ft-wrap) > * { flex: none; }
html.shell .fleet-roster .card > .ft-wrap { flex: 1 1 auto; min-height: 0; overflow: auto; scrollbar-width: thin; }
html.shell .fleet-roster .ft-wrap thead th { position: sticky; top: 0; z-index: 2; background: var(--surface); }
/* What stuck under the old scrolling header now sticks at the top of the page area. */
html.shell :is(.ua-side, .i1-pv, .fleet-bar.is-sel, .fleet-bar.is-nmsel, .dd-split-l, .dd-tabrow, .settings-nav, .cl-side, .ro-list, .pl-side) { top: 0; }
html.shell .fleet-roster .device-inspector { overflow-y: auto; }
/* A pane whose tables sit inside sections that can't shrink (Setup's and Enrollment's
   Enrolled, Profiles…): the whole pane scrolls instead of a clipped table (17 Nov 2026,
   UI review: "show more … the list is unscrollable"). */
html.shell .fleet-roster > .pane-flow { flex: none; overflow: visible; max-height: none; }
html.shell .fleet-roster > .pane-flow .ft-wrap { overflow: visible; max-height: none; }
html.shell .fleet-roster > .pane-flow .card { min-height: auto; }

/* ══ Compact chrome on short windows (3 Dec 2026, product owner: most laptops show 650–800 px of
   page: 1366×768, 1080p at 125–150 %). Under 800 px of window height a desktop window gets a
   slimmer header (52 px, was 68), less room above the page and a slimmer, lower dock, about 45 px
   back for the page. Pages tighten their own cards in their fit rules (Overview, device page).
   --fit-chrome is what the header, the page's top padding and the dock take, for the first
   frame of a fitted page. 800 px and taller is untouched. ══ */
:root { --fit-chrome: 192px; }
/* While a fitted page measures itself (fit-min.js mdmFitMeasure) nothing transitions. */
html.fit-measure *, html.fit-measure *::before, html.fit-measure *::after { transition: none !important; }
@media (min-width: 1101px) and (max-height: 799px) {
  :root { --fit-chrome: 146px; }
  html .appbar, html .appbar.is-scrolled { padding-top: 6px; padding-bottom: 6px; }
  html .appbar .appbar-icon { width: 38px; height: 38px; }
  html .appbar .appbar-acct { height: 38px; }
  html .appbar:has(.appbar-island.always) .appbar-brand { height: 40px; }
  html .appbar-island.always, html .appbar.is-scrolled .appbar-island { height: 40px; min-height: 38px; }
  html.shell main#main { padding-top: 16px; }
  html.shell main#main:has(.dd-tabrow) { padding-top: 6px; }
  html .dock { bottom: 12px; }
  html .dock.dock-s { padding: 5px 6px; }
  html .dock-s > .nav-link { height: 44px; gap: 3px; }
  html .dock-search { height: 44px; }
}

/* Cards sit flat on the canvas (5 Nov 2026, user: "the border radius has a darker grey around
   it than the rest of the page"): the old --shadow-lg showed as a grey halo round every corner.
   Floating things (menus, popups, dock, island, the map's card) keep their shadows. */
html body :is(.card, .cc-card, .ddc-card, .fleet-rail, .cl-card, .dd-needs) { box-shadow: none; }

/* Getting started checklist (Settings cards, and How to enroll on Setup). */
.st-steps{display:grid;gap:8px;padding:14px 16px}
.cs{display:flex;gap:11px;padding:11px 12px;border:1px solid var(--border);border-radius:13px;background:var(--surface);transition:all .3s;opacity:.7;text-decoration:none;color:inherit}
.cs:hover{opacity:1}
.cs.on{opacity:1;border-color:var(--accent);background:color-mix(in srgb,var(--accent) 8%,transparent)}
.cs.ok{opacity:1;border-color:var(--ok)}
.cs .n{width:24px;height:24px;border-radius:50%;background:var(--surface2);display:flex;align-items:center;justify-content:center;font-size:11.5px;font-weight:800;flex:none}
.cs.on .n{background:var(--accent-fill);color:#fff}.cs.ok .n{background:var(--ok-bg);color:var(--ok)}
.cs b{display:block;font-size:12.5px}.cs span{font-size:11.5px;color:var(--muted);line-height:1.45}

/* A pane being swapped by its rail (pane-loading.js): dimmed, with a moving bar on top. */
.pane-loading { position: relative; }
.pane-loading > * { opacity: .45; transition: opacity .12s; pointer-events: none; }
main.pane-loading > [data-pill-nav] { opacity: 1; pointer-events: auto; }
.pane-loading::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; z-index: 5; border-radius: 3px;
  background: linear-gradient(90deg, transparent, var(--accent-fill), transparent); background-size: 40% 100%; background-repeat: no-repeat;
  animation: pane-load 1s linear infinite; }
@keyframes pane-load { from { background-position: -40% 0; } to { background-position: 140% 0; } }
@media (prefers-reduced-motion: reduce) { .pane-loading::before { animation: none; background: var(--accent-fill); opacity: .4; } }

/* Fleet-style pages line up with Fleet (17 Nov 2026, UI review: "make all relevant pages match
   fleet page width and all placement"): the same width (--page-max) and the rail and pane
   start at the top; a page's pill bar sits at the top of its pane, as Fleet's tabs do. */
body :is(.cl-page, .ro-wrap, .vn-page, .fl-page) { max-width: var(--page-max); }
.fleet-roster > .cc-tabs { margin: 0 0 12px !important; }
.fleet-roster > .ap-pills, .fleet-roster > .k1-bar { margin: 0 0 12px; }
body :is(.pl-wrap) { max-width: var(--page-max); }
/* A list page never scrolls as a whole: no bottom padding under the list (Apps had 96 px from
   the old floating dock). */
html.shell main.shell-list > :is(.cl-page, .cc-wrap, .vn-page, .fl-page, .ro-wrap) { padding-bottom: 0; margin-bottom: 0; }
/* A pane whose list sits in a plain wrapper with its own head (Alerts): the wrapper is a column,
   so its table scrolls inside instead of being cut at the bottom; with several tables in it
   (Alerts › Crashes) the wrapper scrolls as one. */
html.shell .fleet-roster > div:not(.card):has(> .fleet-pane-head) { display: flex; flex-direction: column; min-height: 0; }
html.shell .fleet-roster > div:not(.card):has(> .fleet-pane-head) > * { flex: none; max-height: none; }
html.shell .fleet-roster > div:not(.card):has(> .fleet-pane-head) > .card:has(> .ft-wrap) { flex: 0 1 auto; min-height: 0; }
html.shell .fleet-roster > div:not(.card):has(> .fleet-pane-head):has(> .card ~ .card) { overflow-y: auto; scrollbar-width: thin; }
html.shell .fleet-roster > div:not(.card):has(> .fleet-pane-head):has(> .card ~ .card) > .card { flex: none; }
html.shell .fleet-roster > div:not(.card):has(> .fleet-pane-head):has(> .card ~ .card) .ft-wrap { overflow: visible; max-height: none; }

/* A closed <details>' content takes no room anywhere: Chromium keeps a closed menu's
   absolutely placed popup laid out, and on Alerts 55 of them made the page scroll. */
details:not([open]) > :not(summary) { display: none; }
/* Absolutely placed bits in a list (screen-reader labels, popups) scroll with the list: they were
   placed against <main> and made a list page scroll (Alerts). */
html.shell .fleet-roster, html.shell .fleet-roster .ft-wrap { position: relative; }
/* A page reached from its own pills or rail (navigation.js) arrives in place: no entrance
   animation on any of its parts. */
main.nav-still, main.nav-still * { animation: none !important; }
main.nav-still.htmx-added { opacity: 1 !important; }


/* Fleet table: no scrolling, pages only (user, 18 Nov 2026), and ONLY the Fleet device list: Venues, Groups and the other list pages have no pager, so they scroll in their pane (20 Nov 2026). The page holds exactly the rows that fit
   (fitpages.js); a table too wide for the window may still pan sideways. The scroll cue and the fades
   that hinted at more rows are gone with it. */
html.shell #device-table-container .ft-wrap, html.shell .fleet-roster .card > .ft-wrap:is(#device-table-container *) { overflow-y: hidden; overflow-x: auto; }
.fl-cue, .fl-fade { display: none !important; }

/* A card that holds an open dialog is never clipped to the page edge: clip-path also clips its
   position:fixed descendants, which cut the Add app dialog down to the card's box (19 Nov 2026). */
:is(.card, .cc-card, .ddc-card, .fleet-rail, .ovb-c, .ro-list):has(.modal-backdrop.modal-open) { clip-path: none !important; }

/* Top-level page tabs, one look everywhere (20 Nov 2026, user: "I like this pill design for top-level
   pills, implement it everywhere, the one on the Access page"): a white pill holding the tabs, the open
   one a coral pill. People · Access · Activity, Jobs, Alerts, Apps and the other page-level strips all
   take it: .pg-tabs is the class to use; the older strip classes are aliased here so no page keeps its own. */
html body :is(.pg-tabs, .ac1-nav, .nav-pills, nav.cc-tabs[data-pill-nav]) {
  display: flex; flex-wrap: nowrap; align-items: center; gap: 2px; align-self: flex-start;
  width: max-content; max-width: 100%; overflow-x: auto; scrollbar-width: none;
  margin: 0 0 16px; padding: 3px; background: var(--surface); border: 0; border-radius: 99px; box-shadow: none;
}
html body :is(.pg-tabs, .ac1-nav, .nav-pills, nav.cc-tabs[data-pill-nav]) > :is(a, button) {
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; font: inherit; font-size: 12px; font-weight: 600;
  padding: 6px 13px; border: 0; border-radius: 99px; background: none; box-shadow: none; color: var(--text-2); text-decoration: none; cursor: pointer;
}
html body :is(.pg-tabs, .ac1-nav, .nav-pills, nav.cc-tabs[data-pill-nav]) > :is(a, button):hover { background: var(--surface2); color: var(--text); }
html body :is(.pg-tabs, .ac1-nav, .nav-pills, nav.cc-tabs[data-pill-nav]) > :is(a, button):is(.on, .active, [aria-current="page"], [aria-selected="true"]) {
  background: var(--accent-fill); color: #fff;
}
html body :is(.pg-tabs, .ac1-nav, .nav-pills) > :is(a, button) .n { font-size: 10.5px; font-weight: 700; opacity: .75; font-variant-numeric: tabular-nums; }
html body :is(.pg-tabs, .ac1-nav, .nav-pills) > .cap { display: none; }
@media (max-width: 720px) { html body :is(.pg-tabs, .ac1-nav, .nav-pills) { margin-bottom: 12px; } }

/* A hidden pane stays hidden: the pane rule above gives every .fleet-roster pane display:flex, which
   beat the hidden attribute, so Alerts' Crashes pane showed (empty, with its pager) under Needs action
   and squeezed the page (20 Nov 2026). */
html.shell .fleet-roster > [hidden] { display: none !important; }

/* Clickable rows and cards never start a text selection (23 Nov 2026: a fast click, a double-click
   or a shift-click on the device sheets' lists highlighted whole blocks of text). Detail text,
   inputs and code stay selectable. */
.app-row, .app-tile, .ddc-tl, .ft-row, tr[data-href], [role="button"], [role="option"], [role="tab"],
.fleet-rail-item, .ovb-li, .cc-mi, .pl-vi, .bt-sheet-h, .dd-tab, .ptab, .fq, .cc-btn, button, summary {
  -webkit-user-select: none; user-select: none;
}
input, textarea, select, [contenteditable], .mono, pre, code, .sel-ok { -webkit-user-select: text; user-select: text; }

/* Scroll hints (scroll-hints.js): fades and the "more" chip are fixed overlays; the thin scrollbar is on the pane. */
.sh-fade { position: fixed; height: 36px; pointer-events: none; opacity: 0; transition: opacity .15s; }
.sh-chip { position: fixed; transform: translateX(-50%); background: var(--text); color: var(--surface); font-size: 12px; font-weight: 600; line-height: 1; border-radius: 99px; padding: 7px 13px; box-shadow: 0 6px 18px rgba(0,0,0,.25); cursor: pointer; opacity: 0; transition: opacity .15s; white-space: nowrap; user-select: none; }
@media (hover: hover) and (pointer: fine) {
  .sh { scrollbar-width: thin; scrollbar-color: var(--text-faint) transparent; }
  .sh::-webkit-scrollbar { display: block; width: 8px; height: 8px; }
  .sh::-webkit-scrollbar-thumb { background: var(--text-faint); border-radius: 99px; border: 2px solid transparent; background-clip: content-box; }
  .sh::-webkit-scrollbar-track { background: transparent; }
}
@media (hover: none), (pointer: coarse) { .sh-chip { display: none; } }
@media print { .sh-fade, .sh-chip { display: none; } }

/* On/off switch (was Settings-only; Hardware uses it too since 27 Nov 2026). */
.sw-toggle{width:42px;height:24px;border-radius:99px;border:0;background:var(--surface2);position:relative;cursor:pointer;padding:0;flex:none;transition:background .15s;}
.sw-toggle.on{background:var(--ok);}
.sw-knob{position:absolute;top:3px;left:3px;width:18px;height:18px;border-radius:50%;background:#fff;transition:left .15s;box-shadow:0 1px 2px rgba(0,0,0,.25);}
.sw-toggle.on .sw-knob{left:21px;}

/* Copy as an icon (user, 3 Dec 2026): a check for a moment once copied. */
/* (padding:0 must beat .cc-btn.sm's padding, or the icon sits off-centre: 3 Dec 2026) */
.cc-copy,.cc-btn.cc-copy,html .cc-btn.sm.cc-copy{width:30px;height:30px;padding:0!important;display:inline-grid;place-items:center;flex:none;gap:0}
.cc-copy svg{width:15px;height:15px;grid-area:1/1}
.cc-copy .ci-ok{display:none;color:var(--ok)}
.cc-copy.ok .ci-copy{display:none}.cc-copy.ok .ci-ok{display:block}
/* Bell menu: the desktop notifications switch (3 Dec 2026). */
.nbar-al-foot{border-top:1px solid var(--border);padding:8px 10px 6px;display:flex;flex-direction:column;gap:3px}
.nbar-dn{display:flex;align-items:center;gap:8px;width:100%;font:inherit;font-size:12.5px;border:0;background:none;color:var(--text);cursor:pointer;padding:6px 6px;border-radius:9px;text-align:left}
.nbar-dn:hover{background:var(--hover)}
.nbar-dn svg{width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;color:var(--text-2)}
.nbar-dn span{flex:1}
.nbar-dn b{font-size:11px;font-weight:650;border-radius:99px;padding:2px 8px;background:var(--surface-2,var(--hover));color:var(--text-2)}
.nbar-dn[aria-pressed=true] b{background:color-mix(in srgb,var(--ok) 18%,transparent);color:var(--ok)}
.nbar-al-foot small{font-size:11.5px;color:var(--muted);padding:0 6px}

/* Text selection is coral, the MDM's accent (user, 4 Dec 2026). */
::selection{background:color-mix(in srgb,var(--accent-fill,#cf4529) 24%,transparent);color:inherit}
