/* ═══════════════════════════════════════════════════════════════════
Estigator — standalone commercial repair-estimation software.
Identity: paper ground, ink type, deep teal action color, warm copper
for emphasis (totals). Big Shoulders Display / IBM Plex Sans / IBM Plex
Mono. Distinct from EstiNow's own consumer-facing navy/blue theme
— this is the shop-facing product's own brand, not a shared skin.
═══════════════════════════════════════════════════════════════════ */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

[hidden] {
  display: none !important;
}

:root {
  --bg: #eef1ef;
  --bg-2: #e5eae7;
  --surface: #ffffff;
  --surface-2: #f4f6f5;
  --surface-3: #e9ede9;
  /* Was #d3d8d4/#b8c0bb (1.4:1 / 1.9:1 on white — both well under WCAG's
     3:1 non-text minimum). Card edges, table borders, and input outlines
     were all barely visible, which read as "the whole page is washed
     out/dull" even after the text-contrast fixes above — a page can't
     look defined if nothing actually draws a line around anything.
     Darkened along the same hue (same desaturated green-gray family, not
     switched to plain gray) rather than picking arbitrary new colors. */
  --border: #9aa69d;
  --border-hi: #738178;
  --text: #14202a;
  --text-dim: #4b5a63;
  /* Was #7c8891 (3.6:1 on white, 3.2:1 on --bg — fails WCAG AA's 4.5:1 for
     normal text). This token backs nearly every secondary/hint label in
     the app (.muted-sm and friends), so the old value made section
     descriptions and helper copy genuinely hard to read, not just
     stylistically muted. #556169 clears 6.3:1 on white / 5.6:1 on --bg —
     still visibly lighter than --text-dim, but no longer failing. */
  --text-faint: #556169;

  /* Estigator identity: deep teal = primary action, copper = secondary
     emphasis (grand totals, highlighted figures) — replaces the old
     amber/steel-blue Workshop palette wholesale, not a re-tint of it. */
  --accent: #0e6c64;
  /* Was #159c8e (3.4:1 on white — fails WCAG AA). Used as foreground TEXT
     color in 14+ places (part-card prices, labor/OBD subtotals, the
     Listing pill, disposition chips) as well as gradient stops, so it
     couldn't just be swapped for --accent everywhere without losing the
     two-tone identity on buttons/badges. Darkened along the same hue
     instead — #10756b clears 5.6:1 while staying visibly a shade lighter
     than --accent in gradients. */
  --accent-2: #10756b;
  --accent-rgb: 14, 108, 100;
  --accent-glow: rgba(14, 108, 100, 0.22);
  --on-accent: #ffffff;
  --info: #2b6cb0;
  --info-2: #4a90d9;
  --info-rgb: 43, 108, 176;
  --copper: #b8622e;
  --copper-2: #d98a52;
  --copper-rgb: 184, 98, 46;

  --success: #2f7d4f;
  --warning: #a9761f;
  --danger: #b3402f;
  --danger-rgb: 179, 64, 47;

  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 16px;
  --font-ui: 'IBM Plex Sans', system-ui, -apple-system, sans-serif;
  --font-head: 'Big Shoulders Display', 'IBM Plex Sans', system-ui, sans-serif;
  --font-mono: 'IBM Plex Mono', 'JetBrains Mono', Consolas, monospace;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

html,
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 14px;
  line-height: 1.5;
  min-height: 100vh;
  /* clip, not hidden — both suppress the horizontal scrollbar equally,
     but overflow:hidden (any non-visible overflow value, really) makes
     an element a valid position:sticky containing block whether or not
     it ever actually overflows. On the root/body this silently broke
     EVERY position:sticky element on the page, header included — a real,
     page-wide bug that predates this session, confirmed via a raw,
     from-scratch sticky test element inserted directly into the DOM
     (stuck correctly once switched to overflow-x:clip, never stuck with
     overflow-x:hidden, everything else identical). clip suppresses the
     same overflow visually without establishing a scroll container. */
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}

/* ── Ambient background ──────────────────────────────────────────── */
/* The old dark theme's glow orbs / grid were a generic "AI SaaS" dark-mode
   cliché — dropped outright for Estigator's flat paper ground rather than
   retinted. Elements kept in the DOM (index.html still references them)
   so nothing needs to be ripped out there; they're just inert here. */
.bg-glow,
.bg-grid {
  display: none;
}

/* ── Shell / layout ──────────────────────────────────────────────── */
.app-shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

/* ── Header ──────────────────────────────────────────────────────── */
/* The blur/background live on a ::before, not on `header` itself —
   `backdrop-filter` (like `transform`/`filter`) makes an element the
   containing block for any `position:fixed` descendant, which broke
   .primary-nav's fixed-to-viewport-bottom mobile tab bar below (it was
   fixing to the header's own box instead of the viewport). */
header {
  border-bottom: 1px solid var(--border);
  color: var(--text);
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 14px;
  height: 60px;
  position: sticky;
  /* Not a bare 0 — the admin-only readiness banner and the workshop-tenant-
     only email-verify banner (mutually exclusive per session — a login is
     either admin or workshop, never both) both sit above this in the DOM
     and are also position:sticky at top:0; two siblings both stuck at the
     same y would just overlap (the banner's higher z-index winning, hiding
     the header underneath it). syncReadinessBannerOffset()/
     syncEmailVerifyBannerOffset() (app.js) keep these in sync with each
     banner's real rendered height, 0px whenever hidden — summed here so
     this still works correctly even if both were ever visible together. */
  top: calc(var(--readiness-banner-h, 0px) + var(--email-verify-banner-h, 0px) + var(--broadcast-banner-h, 0px));
  z-index: 100;
}
header::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: -1;
}

header .brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

header .brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--on-accent);
  font-weight: 700;
  font-size: 16px;
  box-shadow: 0 4px 16px var(--accent-glow);
  flex-shrink: 0;
  overflow: hidden;
}

header h1 {
  font-family: var(--font-head);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}

header h1 strong {
  color: var(--accent);
  font-weight: 800;
}

.badge {
  font-size: 10px;
  font-weight: 700;
  background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.2), rgba(var(--info-rgb), 0.15));
  border: 1px solid rgba(var(--accent-rgb), 0.3);
  color: var(--accent-2);
  border-radius: 100px;
  padding: 3px 10px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

/* Review-queue count (Phase 4.3 MVP) — polled every ~30s while Workshop
   is open, shown on the Search nav button since that's the review queue. */
.nav-badge {
  display: inline-block;
  margin-left: 5px;
  min-width: 16px;
  padding: 0 4px;
  border-radius: 100px;
  background: #d9534f;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  text-align: center;
  line-height: 16px;
}

/* Primary destination pills, sit in the header next to the brand */
.primary-nav {
  display: flex;
  align-items: center;
  gap: 3px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 3px;
  margin-left: 12px;
}

.primary-nav .nav-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  width: auto;
  margin: 0;
  padding: 7px 16px;
  border: none;
  background: transparent;
  border-radius: 100px;
  cursor: pointer;
  font-size: 13px;
  font-family: var(--font-ui);
  /* Was --text-dim — same "technically passes contrast math but still
     reads dull" issue as label/.rate-tbl th above; primary navigation
     shouldn't be visually secondary. */
  color: var(--text);
  font-weight: 600;
  transition: all 0.15s var(--ease);
  white-space: nowrap;
}

.primary-nav .nav-btn:hover {
  color: var(--text);
}

.primary-nav .nav-btn.active {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: var(--on-accent);
  box-shadow: 0 2px 10px var(--accent-glow);
}

.primary-nav .nav-btn .ic { font-size: 14px; line-height: 1; }

/* ── Notifications bell (Phase 7) — a real dropdown list, replacing the
   passive-only Search-tab badge for the review queue. Deliberately plain
   CSS (position:relative/absolute), not a new modal system — matches how
   little UI machinery this app already has for a "click to reveal a
   small panel" interaction. ── */
/* ── Help assistant — same floating-panel recipe as .notif-dropdown right
   below (position:relative wrap, absolute panel, frosted-glass surface),
   just taller/scrollable for a chat message list instead of a short list
   of rows. See CLAUDE.md's Help assistant section. ── */
.assistant-wrap {
  position: relative;
  margin-left: 8px;
}
.assistant-trigger-btn {
  /* Deliberately NOT the plain transparent/bordered treatment the
     notif-bell/other header icon buttons use — this is the one feature
     in the header a brand-new user has no other way to discover, so it
     gets its own distinct, always-on visual weight (not just the one-time
     pulse below, which fades after first use). */
  background: linear-gradient(135deg, var(--accent), var(--info, var(--accent)));
  border: 1px solid transparent;
  border-radius: 8px;
  color: #fff;
  font-size: 15px;
  line-height: 1;
  padding: 7px 10px;
  cursor: pointer;
}
.assistant-trigger-btn:hover { opacity: 0.9; }
@keyframes assistant-pulse-ring {
  0%   { box-shadow: 0 0 0 0 rgba(var(--accent-rgb), 0.55); }
  70%  { box-shadow: 0 0 0 10px rgba(var(--accent-rgb), 0); }
  100% { box-shadow: 0 0 0 0 rgba(var(--accent-rgb), 0); }
}
.assistant-trigger-btn.pulse { animation: assistant-pulse-ring 1.8s ease-out infinite; }

.assistant-callout {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 240px;
  background: var(--surface);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(var(--accent-rgb), 0.4);
  border-radius: 10px;
  box-shadow: 0 12px 32px -8px rgba(0,0,0,0.5);
  padding: 12px 14px;
  z-index: 151;
  opacity: 1;
  transition: opacity 0.2s ease;
}
.assistant-callout.fade-out { opacity: 0; }
.assistant-callout::before {
  /* Small pointer arrow back to the trigger button, right-aligned to match
     the panel/dropdowns' own right-anchored positioning above. */
  content: "";
  position: absolute;
  top: -6px;
  right: 14px;
  width: 11px;
  height: 11px;
  background: var(--surface);
  border-left: 1px solid rgba(var(--accent-rgb), 0.4);
  border-top: 1px solid rgba(var(--accent-rgb), 0.4);
  transform: rotate(45deg);
}
.assistant-callout strong { display: block; font-size: 12.5px; margin-bottom: 4px; }
.assistant-callout p { font-size: 12px; color: var(--text-dim); margin: 0; line-height: 1.4; }
.assistant-callout-close {
  position: absolute;
  top: 6px;
  right: 8px;
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  padding: 2px 4px;
}
.assistant-callout-close:hover { color: var(--text); }
.assistant-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 340px;
  max-height: 440px;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 12px 32px -8px rgba(0,0,0,0.5);
  z-index: 150;
}
.assistant-panel-head {
  padding: 10px 14px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-dim);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.assistant-messages {
  flex: 1;
  overflow-y: auto;
  padding: 10px 12px;
  min-height: 120px;
  max-height: 320px;
}
.assistant-empty { padding: 6px 2px; }
.assistant-suggestions { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.assistant-suggestion-chip {
  text-align: left;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 7px 10px;
  font-size: 12.5px;
  color: var(--text);
  cursor: pointer;
  font-family: inherit;
}
.assistant-suggestion-chip:hover { background: var(--surface-3, var(--surface-2)); }
.assistant-msg { margin-bottom: 10px; max-width: 90%; }
.assistant-msg-user {
  margin-left: auto;
  background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.25), rgba(var(--info-rgb), 0.18));
  border-radius: 10px 10px 2px 10px;
  padding: 7px 11px;
  font-size: 13px;
}
.assistant-msg-bot {
  /* Real <p>/<ol>/<ul>/<li>/<strong> elements now carry structure (see
     renderAssistantMarkdown() in app.js) instead of relying on raw
     newline preservation — pre-wrap would double up on the block
     elements' own spacing. */
  background: var(--surface-2);
  border-radius: 10px 10px 10px 2px;
  padding: 7px 11px;
  font-size: 13px;
  line-height: 1.45;
}
.assistant-msg-bot p { margin: 0 0 6px; }
.assistant-msg-bot p:last-child { margin-bottom: 0; }
.assistant-msg-bot ol, .assistant-msg-bot ul {
  margin: 0 0 6px;
  padding-left: 20px;
}
.assistant-msg-bot ol:last-child, .assistant-msg-bot ul:last-child { margin-bottom: 0; }
.assistant-msg-bot li { margin-bottom: 3px; }
.assistant-msg-bot li:last-child { margin-bottom: 0; }
.assistant-msg-bot strong { font-weight: 700; color: var(--text); }
.assistant-msg-bot a { color: var(--accent); text-decoration: underline; word-break: break-word; }
.assistant-msg-bot a:hover { text-decoration: none; }
.assistant-msg-actions { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.assistant-action-btn {
  font-size: 12.5px;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid rgba(var(--accent-rgb), 0.3);
  background: rgba(var(--accent-rgb), 0.12);
  color: var(--accent);
  cursor: pointer;
  font-family: inherit;
  text-align: left;
}
.assistant-action-btn:hover { background: rgba(var(--accent-rgb), 0.2); }
.assistant-msg-loading {
  font-size: 12.5px;
  color: var(--text-dim);
  font-style: italic;
  display: flex;
  align-items: center;
  gap: 6px;
  /* Confirmed via real layout measurement: on a longer conversation
     forcing .assistant-messages to scroll, this last child's own bottom
     edge landed a few px past the scroll container's clipped bottom edge
     (a flex/max-height sub-pixel rounding case), reading as the loading
     text being cut off/hidden right at the input row's top border. This
     margin guarantees real clearance regardless of that rounding. */
  margin-bottom: 10px;
}
.assistant-loading-icon {
  display: inline-block;
  font-style: normal;
  color: var(--accent);
  font-size: 11px;
  line-height: 1;
}
@keyframes assistant-loading-icon-pop {
  0%   { transform: scale(0.5) rotate(-20deg); opacity: 0.3; }
  50%  { transform: scale(1.15) rotate(8deg); opacity: 1; }
  100% { transform: scale(1) rotate(0deg); opacity: 1; }
}
.assistant-loading-icon-pop { animation: assistant-loading-icon-pop 0.35s ease-out; }
.assistant-input-row {
  display: flex;
  gap: 6px;
  padding: 10px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}
.assistant-input-row input {
  flex: 1;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 7px 10px;
  font-size: 13px;
  color: var(--text);
  font-family: inherit;
}
.assistant-send-btn {
  background: var(--accent);
  border: none;
  border-radius: 8px;
  color: #fff;
  width: 34px;
  cursor: pointer;
  flex-shrink: 0;
}
.assistant-send-btn:hover { opacity: 0.9; }
.assistant-send-btn:disabled { opacity: 0.5; cursor: default; }

.notif-bell-wrap {
  position: relative;
  margin-left: 8px;
}
.notif-bell-btn {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-dim);
  font-size: 15px;
  line-height: 1;
  padding: 7px 10px;
  cursor: pointer;
}
.notif-bell-btn:hover { background: var(--surface-2); color: var(--text); }
.notif-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 320px;
  max-height: 360px;
  overflow-y: auto;
  background: var(--surface);
  /* --surface is a deliberately near-transparent rgba(255,255,255,0.035)
     tint (see :root) — everywhere else it's used, it's paired with this
     same blur to actually read as a solid frosted-glass card against the
     dark page behind it. This dropdown was missing that pairing, so it
     rendered essentially see-through (the var(--surface, fallback) hex
     fallback never applies — the variable IS defined, just to a barely-
     visible value) — flagged directly by the user as having no
     background color at all. */
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 12px 32px -8px rgba(0,0,0,0.5);
  z-index: 50;
}
.notif-dropdown-head {
  padding: 10px 14px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-dim);
  border-bottom: 1px solid var(--border);
}
.notif-empty { padding: 18px 14px; font-size: 13px; color: var(--text-dim); text-align: center; }
.notif-row {
  display: block;
  width: 100%;
  text-align: left;
  padding: 10px 14px;
  border: none;
  border-bottom: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font-family: inherit;
}
.notif-row:last-child { border-bottom: none; }
.notif-row:hover { background: var(--surface-2); }
.notif-row-title { font-size: 13px; font-weight: 600; }
.notif-row-sub { font-size: 11.5px; color: var(--text-dim); margin-top: 2px; }

/* ── Account menu — the role badge (username · role) is the dropdown
   trigger itself, not a separate avatar/kebab. It already read as "who/
   what you're logged in as"; adding a chevron and making it clickable
   reuses that existing, already-styled `.badge`-shaped element instead of
   inventing a new one. Deliberately plain CSS (position:relative/
   absolute), matching the notif-bell-wrap dropdown right next to it —
   same "click to reveal a small panel" idiom, not a new modal system.
   This single element now behaves identically at every viewport width,
   which is what retires the old always-on header-links row + the
   separate "⋮" kebab that only appeared below 1150px (that split existed
   only because header-links' plain button row didn't fit in one line at
   medium widths — a dropdown anchored to one small trigger has no such
   problem, so there's nothing left to collapse). ── */
.user-menu-wrap {
  position: relative;
  margin-left: auto;
}
.user-badge-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  /* Was 10px / color: var(--accent-2) (#159c8e, 3.4:1 on white — fails
     WCAG AA). This is "who am I logged in as," the account-menu trigger
     itself (see CLAUDE.md's Account menu section) — it needs to actually
     read at a glance, not just look like a subtle chip. Bumped size and
     switched to the deeper --accent (6.3:1). */
  font-size: 12px;
  font-weight: 700;
  font-family: inherit;
  background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.2), rgba(var(--info-rgb), 0.15));
  border: 1px solid rgba(var(--accent-rgb), 0.3);
  color: var(--accent);
  border-radius: 100px;
  padding: 6px 11px 6px 13px;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.15s;
}
.user-badge-btn:hover {
  background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.3), rgba(var(--info-rgb), 0.22));
}
.user-badge-btn .icon { width: 12px; height: 12px; }

.user-menu-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 210px;
  background: var(--surface);
  /* Same frosted-glass pairing --surface needs everywhere else it's used
     for a floating panel — see .notif-dropdown's own comment above. */
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 12px 32px -8px rgba(0,0,0,0.5);
  padding: 6px;
  z-index: 150;
}
.user-menu-row {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  text-align: left;
  padding: 9px 10px;
  border: none;
  border-radius: 7px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font: 500 12.5px var(--font-ui);
}
.user-menu-row:hover { background: var(--surface-2); }
.user-menu-row .icon { flex-shrink: 0; color: var(--text-dim); }
/* Live system-health dot — click opens Settings > System (admin) */
.user-menu-row .dot {
  width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0;
  background: var(--text-faint);
  transition: background 0.2s;
}
.user-menu-row .dot.ok { background: var(--success); box-shadow: 0 0 6px rgba(52,211,153,0.6); }
.user-menu-row .dot.err { background: var(--danger); box-shadow: 0 0 6px rgba(248,113,113,0.6); }
.user-menu-row-danger { color: var(--danger); }
.user-menu-row-danger .icon { color: var(--danger); }
.user-menu-sep { height: 1px; background: var(--border); margin: 5px 2px; }

@media (max-width: 760px) {
  header { gap: 8px; }

  .primary-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 200;
    width: 100%;
    margin: 0;
    gap: 2px;
    border: none;
    border-top: 1px solid var(--border);
    border-radius: 0;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 6px max(6px, env(safe-area-inset-right)) calc(6px + env(safe-area-inset-bottom)) max(6px, env(safe-area-inset-left));
  }
  .primary-nav .nav-btn {
    flex: 1;
    flex-direction: column;
    gap: 2px;
    padding: 6px 4px;
    font-size: 10.5px;
    justify-content: center;
  }
  .primary-nav .nav-btn .ic { font-size: 18px; }

  .content { padding-bottom: 84px; }
}

/* ── Main layout (single-column — no sidebar in the workshop shell) ── */
.main-layout {
  display: flex;
  flex: 1;
  width: 100%;
}

/* ── Content ─────────────────────────────────────────────────────── */
.content {
  flex: 1;
  /* overflow-y:auto here was dead weight, not a real scroll container —
     .app-shell/html/body only ever set min-height, never a bounded
     height, so .content always grows to fit its own content instead of
     clipping and scrolling internally (confirmed live: its scrollHeight
     always equalled clientHeight). The page has only ever actually
     scrolled at the window/document level — that's what header's own
     position:sticky already implicitly depends on. Worse than just
     dead, though: merely setting overflow-y:auto makes an element a
     valid sticky-positioning containing block regardless of whether it
     ever really overflows, which silently broke .wb-est-rail's
     position:sticky (it stuck to this box, which itself just scrolls
     away with the page — confirmed live via getBoundingClientRect
     during a real scroll, the rail scrolled fully off-screen instead of
     stopping). Removed so sticky positioning resolves against the real
     window scroll, same as header already does. */
  padding: 28px 32px 60px;
  min-width: 0;
  max-width: 1520px;
  margin: 0 auto;
  width: 100%;
}

/* Was capped to a narrow reading column while Dashboard/Search/Settings
   all use the shell's full 1520px .content width — flagged directly as
   an inconsistency (Workbench reading "congested and contained around
   the center" next to the other three tabs). Now matches them: no extra
   cap beyond .content's own, and .form-grid's auto-fit (below) is what
   actually puts the freed width to use — existing field rows spread out
   to fill it rather than leaving it as dead empty margin. */
#wb-intake-card {
  max-width: 100%;
  margin: 0 0 22px;
}
/* Collapsed once a real estimate is loaded (see setWbIntakeCollapsed() in
   app.js) — the intake form is no longer the technician's focus at that
   point, and leaving it expanded above the Cost Estimate view read as two
   unrelated screens stacked together. Still one click away via the
   card-head. */
#wb-intake-card.wb-intake-collapsed .card-body { display: none; }
#wb-intake-toggle-btn { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; }
#wb-intake-toggle-btn #wb-intake-chev { display: inline-block; transition: transform 0.15s var(--ease); }
#wb-intake-card:not(.wb-intake-collapsed) #wb-intake-toggle-btn #wb-intake-chev { transform: rotate(180deg); }

.tab-panel {
  display: none;
  animation: fadeUp 0.4s var(--ease);
}

.tab-panel.active {
  display: block;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── Settings IA: sidebar of groups + a tile grid per group + drill-in ──
   Replaced the old flat pill-tab subnav (kept in git history if a future
   session ever needs to see the "before") — see CLAUDE.md's Settings
   redesign section for the reasoning. .settings-subview's own show/hide
   contract (display:none / .active{display:block}) is completely
   unchanged; setSettingsTab() in app.js still drives it exactly as
   before, only how you *get to* a subview changed. */
.settings-hybrid {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  min-height: 65vh;
}
.settings-hy-rail { background: var(--bg-2); border-right: 1px solid var(--border); padding: 14px 10px; overflow-y: auto; }
.settings-hy-group-btn {
  display: flex; align-items: center; gap: 9px; width: 100%; text-align: left;
  padding: 11px 12px; border-radius: 9px; font: 600 13px var(--font-ui); color: var(--text-dim);
  background: transparent; border: none; cursor: pointer; margin-bottom: 2px;
}
.settings-hy-group-btn .n { margin-left: auto; font: 700 10px var(--font-mono); color: var(--text-faint); }
.settings-hy-group-btn:hover { background: var(--surface-2); color: var(--text); }
.settings-hy-group-btn.on { background: rgba(var(--accent-rgb),.14); color: var(--accent); }
.settings-hy-group-btn.on .n { color: var(--accent); }
.settings-hy-content { padding: 22px 26px; overflow-y: auto; }
.settings-hy-crumb {
  display: flex; align-items: center; gap: 8px; color: var(--text-dim); font-size: 12.5px;
  margin-bottom: 16px; cursor: pointer; width: fit-content;
}
.settings-hy-crumb:hover { color: var(--accent); }
.settings-hy-group-head { margin-bottom: 4px; }
/* Was var(--font-head) — same narrow/inconsistent look as .section-title/
   .collapsible-head above ("Workshop Identity" etc. are real English
   phrases, not a brand wordmark). */
.settings-hy-group-title { font-family: var(--font-ui); font-size: 18px; font-weight: 700; }
.settings-hy-group-desc { color: var(--text-dim); font-size: 12.5px; margin-bottom: 18px; max-width: 560px; }
.settings-tile-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.settings-tile {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px; cursor: pointer; transition: .15s var(--ease); text-align: left;
  color: var(--text); font-family: inherit;
}
.settings-tile:hover { border-color: var(--border-hi); background: var(--surface-2); transform: translateY(-1px); }
.settings-tile-icon {
  width: 38px; height: 38px; border-radius: 10px; display: flex;
  align-items: center; justify-content: center; font-size: 19px; margin-bottom: 12px;
  background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.16), rgba(var(--accent-rgb), 0.07));
  color: var(--accent);
}
.settings-tile:hover .settings-tile-icon {
  background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.26), rgba(var(--accent-rgb), 0.12));
}
.settings-tile-title { color: var(--text); font-weight: 700; font-size: 13.5px; margin-bottom: 4px; }
.settings-tile-desc { font-size: 11.5px; color: var(--text-dim); line-height: 1.4; }
.settings-tile-badge {
  display: inline-block; margin-top: 8px; font: 700 9.5px var(--font-ui); background: var(--danger);
  color: #2a0a0a; border-radius: 999px; padding: 2px 7px;
}

.settings-subview { display: none; animation: fadeUp 0.3s var(--ease); }
.settings-subview.active { display: block; }

/* ── Cards ───────────────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  margin-bottom: 22px;
  overflow: hidden;
  box-shadow: 0 10px 40px -15px rgba(0, 0, 0, 0.4);
}

.card-head {
  background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.10), rgba(var(--info-rgb), 0.05));
  border-bottom: 1px solid var(--border);
  color: var(--text);
  padding: 15px 22px;
  display: flex;
  align-items: center;
  gap: 10px;
  /* Was --font-head (Big Shoulders Display, a condensed display face) —
     a weight bump alone (600→700) fixed thinness but not the underlying
     complaint: it still reads narrow/cramped at this small a size,
     confirmed via live screenshot comparison. Big Shoulders Display
     stays reserved for genuinely large text (.dash-kpi .val's 26px
     numbers, hero headlines) where its condensed shape reads as
     intentional character rather than a legibility problem — small
     headings switch to the normal-width UI font instead (same fix
     applied to .dash-card-title). */
  font-family: var(--font-ui);
  font-size: 15px;
  font-weight: 600;
}

/* Workshop registration — flat instrument-panel header, not the glossy
   admin-dashboard gradient wash every other card here uses. Scoped to
   this one form deliberately, not a change to .card-head itself (Sign
   In, My Profile, every settings panel all lean on that shared rule). */
#register-workshop-form .card-head {
  background: var(--bg);
  padding: 16px 24px 12px;
  gap: 10px;
  font-size: 15px;
}
#register-workshop-form .card-head .ic {
  font-size: 17px;
}

/* Compact pass, one screen no scroll — this form's own header already
   restates the brand (icon + "Create your Workshop account"), so the
   full-size logo/wordmark/tagline sitting above it on
   #register-workshop-overlay is pure repetition costing real vertical
   space; shrunk to a small mark + name, tagline dropped entirely. Every
   other size below is this same "every row this form doesn't need to
   spend height on" pass — #login-overlay's own sign-in form (3 fields)
   never needed it, scoped here only. Row spacing was tightened further
   than this on a first pass and read as congested — loosened back up a
   notch, still comfortably fits a real 660px-tall viewport with room to
   spare (verified live, not just by eye). */
#register-workshop-overlay { gap: 10px; padding: 10px; }
#register-workshop-overlay .login-brand { gap: 8px; }
#register-workshop-overlay .login-brand-mark { width: 44px; height: 44px; border-radius: 13px; font-size: 20px; }
#register-workshop-overlay .login-brand-name { font-size: 21px; }
#register-workshop-overlay .login-value-prop { display: none; }

#register-workshop-form .card-body { padding: 18px 24px 20px; }
/* auto-fit's own min/max track sizing (the base .form-grid.wide rule)
   was collapsing to a single 420px track in this narrower 680px modal
   instead of the 2 columns there's genuinely room for — a fixed 2-column
   grid is simpler and correct for this form's known, unchanging field
   set (Billing keeps its own grid-column:1/-1 to stay full-width). */
#register-workshop-form .form-grid.wide { grid-template-columns: repeat(2, 1fr); gap: 16px 18px; margin-bottom: 10px; }
#register-workshop-form label { margin-bottom: 5px; }
#register-workshop-form input[type=text],
#register-workshop-form input[type=email],
#register-workshop-form input[type=password],
#register-workshop-form select { height: 38px; }
#register-workshop-form .hint { margin-top: 6px !important; line-height: 1.4; }
#register-workshop-form .btn-group { margin-top: 8px; }
#register-workshop-form .oauth-divider { margin: 12px 0; }

.card-head .ic { font-size: 16px; }

.card-head .method {
  font-size: 10px;
  font-weight: 700;
  border-radius: 5px;
  padding: 3px 9px;
  letter-spacing: 0.5px;
  font-family: var(--font-mono);
}

.m-post {
  background: linear-gradient(135deg, var(--success), #10b981);
  color: #fff;
}

.m-get {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: var(--on-accent);
}

.card-body {
  padding: 22px;
}

/* ── Forms ───────────────────────────────────────────────────────── */
.form-grid {
  display: grid;
  /* auto-fit, not auto-fill — now that the containers this sits in
     (#wb-intake-card, .wiz-card) span far more of the page than the old
     narrow ~700-820px column, auto-fill would compute several extra
     empty tracks that a bare few real fields can't fill (real fields
     bunched left, dead space on the right); auto-fit collapses those.
     A capped max (260px), not 1fr, is the other half of that same fix —
     1fr still stretches every surviving track to fill 100% of whatever
     width auto-fit leaves it, which is exactly what made a lone field
     (e.g. Vehicle Color) balloon to the full column width. Capping the
     max means a two-track row (Mileage + Condition) sizes each field to
     a real, comfortable width and simply leaves calm space beside them
     inside the card, instead of stretching either one — and a
     content-rich row (Claim's 7 fields) still tiles as many
     comfortably-sized columns as fit, just wrapping to a second row
     instead of forcing every field to shrink to fit one. */
  grid-template-columns: repeat(auto-fit, minmax(180px, 260px));
  gap: 14px;
  margin-bottom: 16px;
  align-items: stretch;
}

/* For fields whose content genuinely wants more room than a standard
   260px column (a full address, an inspection-site name, a select with
   its own expanding position-picker beneath it) — same auto-fit
   reasoning, just a taller ceiling. */
.form-grid.wide {
  grid-template-columns: repeat(auto-fit, minmax(260px, 420px));
}

/* A plain, fixed 2-up layout for a dialog's own known, unchanging field
   set (mirrors #register-workshop-form's own scoped override of
   .form-grid.wide — same fix, generalized into a reusable class instead
   of a one-off selector per form) — auto-fit's own minmax track sizing
   can still collapse to a single column at a dialog's actual width
   depending on field count, where a form this small should always just
   show 2 fields per row. A field that should span the full row keeps
   its own `grid-column:1/-1`, same as every other .form-grid usage. */
.form-grid.cols-2 {
  grid-template-columns: repeat(2, 1fr);
}

.pct-adjust-row {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.pct-adjust-row > label { display: block; margin-bottom: 8px; font-weight: 600; font-size: 13px; }
.pct-adjust-controls { display: flex; gap: 8px; align-items: center; }

/* Grid stretches every cell in a row to the tallest cell's height, but a
   two-line label (e.g. "Public Kiosk — Allow Paid Parts Vendor") otherwise
   pushes just its own input down further than a neighbor with a one-line
   label. Pinning each field's content to the bottom of its cell keeps every
   input/select in a row on the same baseline regardless of label length. */
.form-grid > div {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  /* Was --text-dim — technically ~7:1 on white, but at 11px uppercase with
     letter-spacing, thin uppercase strokes read visually lighter than the
     raw hex contrast suggests. Every field label on the page is a
     functional "what is this input" cue, not decorative secondary text,
     so it gets the primary --text color instead. */
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.optional-tag {
  text-transform: none;
  font-weight: 400;
  color: var(--text-faint);
  letter-spacing: 0;
  margin-left: 4px;
}

/* ── Required-field marking + inline validation ── a field's label gets
   a small red asterisk (.required-mark); an invalid field on attempted
   Next gets a red border/glow (.field-invalid, mirrors :focus's own
   border+box-shadow shape but in --danger) plus a short message directly
   under it (.field-error-msg) — same "the message lives at the specific
   element it's about" idiom this app already uses for other inline
   errors (the low-res photo rejection, Make/Model typo notes). Cleared
   the instant the technician actually fixes the field (wizClearFieldError()
   in app.js), never lingers past the problem it explains. ── */
.required-mark { color: var(--danger); margin-left: 2px; font-weight: 700; }
.field-invalid {
  border-color: var(--danger) !important;
  background: rgba(220, 38, 38, 0.05) !important;
}
.field-invalid:focus { box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.18) !important; }
.field-error-msg {
  display: block;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--danger);
  margin-top: 4px;
}
.wiz-step-validation-banner {
  background: rgba(220, 38, 38, 0.08);
  border: 1px solid var(--danger);
  color: var(--danger);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 12.5px;
  font-weight: 600;
  margin-bottom: 14px;
}

input[type=text],
input[type=number],
input[type=email],
input[type=password],
input[type=date],
input[type=tel],
select,
textarea {
  width: 100%;
  height: 40px;
  padding: 0 13px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-family: var(--font-ui);
  color: var(--text);
  /* Was rgba(255,255,255,0.03) + color-scheme:dark — a leftover from the
     old dark theme (a near-invisible white wash only worked because it
     happened to sit on a white card underneath; color-scheme:dark forced
     native control chrome — select panels, date pickers — dark against
     this now-light page). Fixed to genuinely light-theme values, not
     just visually-coincidentally-fine ones. */
  background: var(--surface-2);
  color-scheme: light;
  transition: all 0.15s;
}

textarea {
  height: auto;
  padding: 10px 13px;
}

.password-field {
  position: relative;
}
.password-field input {
  padding-right: 40px;
}
.password-toggle-btn {
  position: absolute;
  top: 0;
  right: 0;
  width: 40px;
  height: 40px;
  border: none;
  background: transparent;
  color: var(--text-faint);
  font-size: 15px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.password-toggle-btn:hover { color: var(--text-dim); }

input::placeholder,
textarea::placeholder {
  color: var(--text-faint);
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: rgba(var(--accent-rgb), 0.05);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

textarea {
  resize: vertical;
  min-height: 72px;
}

/* File inputs default to the browser's own unstyled button ("Choose
   File") which clashes with every other themed button — restyle just
   the button part via ::file-selector-button, keeping the native
   picker/filename text behavior intact. */
input[type="file"] {
  color: var(--text-dim);
  font-size: 12.5px;
  font-family: var(--font-ui);
}
input[type="file"]::file-selector-button {
  background: var(--surface-2);
  border: 1px solid var(--border-hi);
  border-radius: var(--radius-sm);
  /* Was --text-dim — same dull/disabled-looking issue as .icon-btn and
     .btn-ghost above; "Choose File" needs to read as a real button. */
  color: var(--text);
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 12px;
  padding: 6px 13px;
  margin-right: 10px;
  cursor: pointer;
  transition: all 0.15s var(--ease);
}
input[type="file"]::file-selector-button:hover {
  border-color: var(--border-hi);
  color: var(--text);
  background: var(--surface-3);
}

select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%239a9aab' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 13px center;
  padding-right: 34px;
}

select option {
  /* Was #1a1a24 (near-black) — a leftover from the old dark theme that the
     rebrand's literal-color sweep missed (it only targeted the amber/blue
     accent hexes, not this one). var(--text) is now a dark, light-theme
     color, so dark-on-near-black made every option except the one shown in
     the closed box (which uses the select's own light var(--surface-2)
     background, not this rule) effectively invisible until browser/OS
     highlight revealed it. */
  background: var(--surface-2);
  color: var(--text);
}

/* ── Drop zone ───────────────────────────────────────────────────── */
.drop-zone {
  border: 1.5px dashed var(--border-hi);
  border-radius: var(--radius);
  padding: 28px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s var(--ease);
  position: relative;
  background: rgba(255, 255, 255, 0.015);
}

.drop-zone:hover,
.drop-zone.dragover {
  border-color: var(--accent);
  background: rgba(var(--accent-rgb), 0.06);
}

.drop-zone input[type=file] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}

.drop-zone .dz-text {
  color: var(--text-dim);
  font-size: 12.5px;
  margin-top: 6px;
}

/* Low-resolution rejection — lives inside the dropzone itself, not a
   toast/panel elsewhere on the page, so it can't be missed or time out
   before the technician reads it. */
.dz-reject-msg {
  font-size: 12.5px;
  color: var(--warning);
  margin-top: 10px;
  padding: 9px 12px;
  background: rgba(251,191,36,0.1);
  border-radius: 8px;
  border: 1px solid rgba(251,191,36,0.3);
  text-align: left;
}

/* Parts & Materials — advisory note that AI evidence-photo crops can be
   imprecise, pointing at the existing "Replace Photo" flow. Same inline,
   can't-miss-it placement convention as .dz-reject-msg above, info tint
   (not warning) since this isn't flagging an error on this specific
   estimate — it's general guidance shown on every estimate. */
.parts-photo-note {
  font-size: 12.5px;
  color: var(--text-dim);
  margin-bottom: 10px;
  padding: 9px 12px;
  background: rgba(var(--info-rgb), 0.08);
  border-radius: 8px;
  border: 1px solid rgba(var(--info-rgb), 0.25);
  text-align: left;
  line-height: 1.5;
}

.parts-photo-note strong {
  color: var(--info-2);
}

.preview-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.preview-item {
  position: relative;
  width: 94px;
}

.preview-item img {
  width: 94px;
  height: 72px;
  object-fit: cover;
  border-radius: 9px;
  border: 1px solid var(--border);
  display: block;
  background: #000;
}

.remove-img {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--danger);
  color: #fff;
  font-size: 11px;
  border: 2px solid var(--bg);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s;
}

.remove-img:hover {
  transform: scale(1.1);
}

/* ── Buttons ─────────────────────────────────────────────────────── */
.btn {
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  border: none;
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font-ui);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.15s var(--ease);
}

.btn:hover:not(:disabled) {
  transform: translateY(-1px);
}

.btn:active:not(:disabled) {
  transform: translateY(0);
}

.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  box-shadow: 0 6px 20px -6px var(--accent-glow);
}

.btn-primary:hover:not(:disabled) {
  box-shadow: 0 10px 26px -6px var(--accent-glow);
}

.btn-accent {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  box-shadow: 0 6px 20px -6px var(--accent-glow);
}

.btn-success {
  background: linear-gradient(135deg, var(--success), #10b981);
  color: #fff;
  box-shadow: 0 6px 20px -6px rgba(52, 211, 153, 0.4);
}

.btn-danger {
  background: linear-gradient(135deg, var(--danger), #ef4444);
  color: #fff;
  box-shadow: 0 6px 20px -6px rgba(248, 113, 113, 0.4);
}

.btn-ghost {
  background: var(--surface-2);
  border: 1px solid var(--border);
  /* Was --text-dim — same "passes contrast math, still reads dull/flat"
     issue fixed on label/.rate-tbl th/.primary-nav .nav-btn earlier.
     "Replace Photo", "Search Price", and every other secondary action
     button need to read as an actual button, not muted-out text. */
  color: var(--text);
}

.btn-ghost:hover:not(:disabled) {
  border-color: var(--border-hi);
  color: var(--text);
  background: var(--surface-3);
}

.btn-sm {
  padding: 6px 13px;
  font-size: 12px;
}

.btn-group {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 16px;
}

/* ── Result stats ────────────────────────────────────────────────── */
.result-summary,
.cost-summary {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

/* ── Cost Estimate — Option C split view ─────────────────────────────
   .wb-est-layout is now a vertical stack (identity strip, section-nav,
   banners, then the real 3-column split) — the grid itself lives one
   level down, on .est-three-col, so the identity strip/nav/banners can
   run full-width above it. Left rail: status cards only. Center: the
   main scrolling card (Labor/ADAS/Diagram/Parts/etc). Right rail:
   ambient submitted-photo thumbnails + the existing Summary card. Both
   rails are sticky `aside` wrappers, deliberately NOT `.card` elements
   themselves (.card has overflow:hidden, which breaks position:sticky
   on any descendant — confirmed live before; the wrapper stays plain,
   the real .card elements nest inside it). Below the breakpoint
   everything collapses to one stacked column, rails un-stuck. */
.wb-est-layout {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 22px;
}
.est-three-col {
  display: grid;
  grid-template-columns: 220px 1fr 300px;
  gap: 20px;
  align-items: start;
}
.est-left-rail,
.est-right-rail {
  position: sticky;
  /* header height (60px) + breathing room, shifted down whenever either
     banner is also showing — same vars header itself reads, so a rail
     sticks just below header, never under it. */
  top: calc(76px + var(--readiness-banner-h, 0px) + var(--email-verify-banner-h, 0px) + var(--broadcast-banner-h, 0px));
  align-self: start;
  min-width: 0;
}
.est-right-rail {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.wb-est-main-col {
  min-width: 0;
}
.wb-est-main-card {
  margin-bottom: 0;
  min-width: 0;
}
.wb-est-rail .card-body { padding-top: 14px; }
.wb-est-rail .cost-line-table { margin-bottom: 14px; }
.wb-est-rail-actions {
  flex-direction: column;
  align-items: stretch;
  margin-top: 0;
}
.wb-est-rail-actions #review-status-display { text-align: center; }

.est-ambient-photos-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}
.est-ambient-photo {
  position: relative;
  border-radius: 7px;
  overflow: hidden;
  border: 1px solid var(--border);
  height: 62px;
  background: var(--surface-2);
  cursor: pointer;
  padding: 0;
}
.est-ambient-photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.est-ambient-photos-empty { font-size: 11.5px; color: var(--text-faint); font-style: italic; }

@media (max-width: 1300px) {
  .est-three-col { grid-template-columns: 1fr; }
  .est-left-rail,
  .est-right-rail { position: static; }
  .est-right-rail { flex-direction: row; flex-wrap: wrap; }
  .est-right-rail > .card { flex: 1 1 320px; }
}

/* ── Identity strip / status cards / section-nav — sit above the estimate's
   own Total-Loss/edited-state banners, orienting a technician who's just
   opened an unfamiliar estimate before they scroll into the detail below. ── */
.est-identity-strip {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 28px;
  padding: 14px 20px;
  margin-bottom: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
.est-identity-vehicle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-head);
  font-size: 19px;
  font-weight: 700;
  color: var(--accent);
  white-space: nowrap;
}
.est-identity-vehicle svg,
.est-identity-vehicle .ic {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}
.est-identity-fields {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
}
.est-identity-field {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.est-identity-field-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.est-identity-field-info { color: var(--info); }
.est-identity-field-copper { color: var(--copper); }
.est-identity-field-success { color: var(--success); }
.est-identity-field-value {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
}
.est-identity-spacer { flex: 1 1 auto; }
.est-identity-total {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}
.est-identity-total-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-faint);
}
.est-identity-total-value {
  font-family: var(--font-head);
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
}
@media (max-width: 640px) {
  .est-identity-strip { padding: 12px 16px; }
  .est-identity-spacer { display: none; }
  .est-identity-total { align-items: flex-start; }
}

.est-status-cards {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.est-status-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
}
.est-status-card-icon {
  display: flex;
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}
.est-status-card-icon svg { width: 100%; height: 100%; }
.est-status-card-label {
  display: block;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-faint);
}
.est-status-card-value {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}
.est-status-card-danger { border-color: rgba(var(--danger-rgb), 0.4); background: rgba(var(--danger-rgb), 0.06); }
.est-status-card-danger .est-status-card-icon { color: var(--danger); }
.est-status-card-warning { border-color: rgba(184, 98, 46, 0.35); background: rgba(184, 98, 46, 0.06); }
.est-status-card-warning .est-status-card-icon { color: var(--warning); }
.est-status-card-neutral .est-status-card-icon { color: var(--accent-2); }
.est-status-card-clickable { cursor: pointer; transition: transform 0.1s var(--ease), border-color 0.1s var(--ease); }
.est-status-card-clickable:hover { transform: translateY(-1px); border-color: var(--border-hi); }

/* ── Submitted Information card — read-only review + inline-editable
   claim/vehicle/people metadata (see renderEstSubmittedInfo() in app.js).
   Sits at the top of column 2, ahead of Damage & Parts. ── */
.subinfo-card { margin-bottom: 4px; }
.subinfo-group { margin-bottom: 16px; }
.subinfo-group:last-child { margin-bottom: 0; }
.subinfo-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; margin-bottom: 9px;
}
.subinfo-title {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.4px; color: var(--text-dim);
}
.subinfo-title svg, .subinfo-title .ic { width: 13px; height: 13px; flex-shrink: 0; }
.subinfo-edit {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 10.5px; font-weight: 600; color: var(--accent-2); cursor: pointer;
}
.subinfo-edit svg { width: 11px; height: 11px; }
.subinfo-edit:hover { color: var(--accent); }
.subinfo-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px 18px;
}
/* A long vehicle/trim string (real trims run "GLS/GLS Preferred/Limited/Limited Tech
   GS/SE/SE Tech" long) was cramped into the same ~150-190px column as short fields like
   Mileage/Color — read-only, so it can't be its own wider input; give the row the full
   grid width instead so it wraps across real available space, not a narrow slice of it. */
.subinfo-field--wide { grid-column: 1 / -1; }
.subinfo-field .k {
  display: block; font-size: 9px; text-transform: uppercase;
  letter-spacing: 0.4px; color: var(--text-faint); margin-bottom: 3px;
}
.subinfo-field .v { font-size: 12.5px; font-weight: 600; color: var(--text); }
.subinfo-empty { color: var(--text-faint); font-weight: 400; font-style: italic; }
.subinfo-input {
  width: 100%; padding: 5px 8px; border: 1px solid var(--border);
  border-radius: var(--radius-sm); background: var(--surface);
  color: var(--text); font-size: 12.5px; font-family: inherit; font-weight: 600;
}
.subinfo-input:focus { outline: none; border-color: var(--accent-2); }
.subinfo-divider { border-top: 1px solid var(--border); margin: 16px 0; }
.subinfo-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.subinfo-chip {
  font-size: 10.5px; font-weight: 600; padding: 3px 10px; border-radius: 100px;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text-dim);
}
.subinfo-chip-fault {
  font-family: var(--font-mono); color: var(--danger);
  border-color: rgba(var(--danger-rgb), 0.3); background: rgba(var(--danger-rgb), 0.06);
}
.subinfo-people-sub { margin-bottom: 12px; }
.subinfo-people-sub:last-child { margin-bottom: 0; }
.subinfo-people-label {
  font-size: 10px; font-weight: 700; color: var(--text-faint); margin-bottom: 7px;
}
.est-submitted-photos-regen-slot { margin-top: 4px; }
/* The relocated panel (#pl-submitted-photos) is a plain .submitted-photos-block
   from its old home above the intake form — give it the same section-title
   rhythm as everything else on this card now that it lives here. */
.est-submitted-photos-regen-slot .submitted-photos-block { margin-top: 8px; }

/* Lives in the left rail (.est-left-rail) now, not a full-width bar above
   all 3 columns — a horizontal pill row spanning the whole layout read as
   a leftover piece of the old single-column screen, per direct feedback.
   Stacked vertically, full-width buttons, same rail as the status cards
   below it. */
.est-section-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}
.est-section-nav button {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  font-family: var(--font-ui);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-dim);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.15s, color 0.15s;
}
.est-section-nav button:hover {
  color: var(--accent);
  border-color: var(--accent);
}
/* Scroll-spy active state — set by updateEstSectionNavActive() in app.js
   as the corresponding .card scrolls through the viewport. Distinct from
   :hover (stronger fill, not just a border/text color swap) so it reads
   as "you are here" even when the pointer is nowhere near the rail. */
.est-section-nav button.active {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
}
.est-section-nav button svg { width: 13px; height: 13px; flex-shrink: 0; }

/* ── Read-only, disposition-colored damage diagram — same 5-view artwork/
   overlay-SVG layering as the interactive POI picker (.poi-diagram*),
   its own scoped classes since this version has no hit-testing/selection
   state, just a static teal/red fill per part. A view with nothing to
   color is `hidden` by renderEstDamageDiagram() itself. ── */
.est-diagram-legend {
  display: flex;
  gap: 16px;
  margin-bottom: 10px;
}
.est-diagram-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-dim);
}
.est-diagram-swatch {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  display: inline-block;
}
.est-diagram-swatch-repair { background: var(--accent-2); }
.est-diagram-swatch-replace { background: var(--danger); }

.est-diagram-views {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 18px;
}
.est-diagram-view { width: 180px; }
.est-diagram-view-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 10px;
  overflow: hidden;
  background: #f4f6f9;
  border: 1px solid var(--border);
}
.est-diagram-view-img { display: block; width: 100%; height: 100%; object-fit: contain; pointer-events: none; }
.est-diagram-view-svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.est-diagram-view-svg svg { display: block; width: 100%; height: 100%; }
.est-diagram-view-svg [data-part-id] { fill: transparent !important; stroke: none !important; }
.est-diagram-view-svg [data-part-id].est-diagram-part-repair { fill: var(--accent-2) !important; fill-opacity: 0.55 !important; }
.est-diagram-view-svg [data-part-id].est-diagram-part-replace { fill: var(--danger) !important; fill-opacity: 0.55 !important; }
.est-diagram-view-label {
  text-align: center;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-faint);
  margin-top: 4px;
}

.stat-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  text-align: center;
  transition: border-color 0.15s;
}

.stat-box:hover {
  border-color: var(--border-hi);
}

.stat-box .val {
  font-family: var(--font-head);
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  display: block;
}

.stat-box .lbl {
  font-size: 10px;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 4px;
}

.severity-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 100px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.sev-none {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-dim);
}

.sev-minor {
  background: rgba(52, 211, 153, 0.12);
  color: var(--success);
  border: 1px solid rgba(52, 211, 153, 0.3);
}

.sev-moderate {
  background: rgba(251, 191, 36, 0.12);
  color: var(--warning);
  border: 1px solid rgba(251, 191, 36, 0.3);
}

.sev-severe {
  background: rgba(248, 113, 113, 0.12);
  color: var(--danger);
  border: 1px solid rgba(248, 113, 113, 0.3);
}

.sev-total_loss {
  background: var(--danger);
  color: #fff;
}

/* ── Parts table ─────────────────────────────────────────────────── */
.parts-table-wrap {
  overflow-x: auto;
  border-radius: var(--radius);
}

table.parts-tbl {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.parts-tbl th {
  background: var(--surface-3);
  color: var(--text-dim);
  padding: 10px 12px;
  text-align: left;
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 700;
  border-bottom: 1px solid var(--border);
}

.parts-tbl td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}

.parts-tbl tr:last-child td {
  border-bottom: none;
}

.parts-tbl tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.parts-tbl .num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* Disposition/status chips — bumped from 10px to 11.5px (too small to read
   comfortably at a glance) and the padding grown to match. chip-no_work/
   chip-excluded also had rgba(255,255,255,0.06) backgrounds — a leftover
   from the old dark theme (all but invisible on a light card, another
   never-migrated pre-rebrand value, same class of bug as the var(--muted,
   #999) fallbacks fixed earlier) — repointed to a dark-on-light tint. */
.chip-repair {
  background: rgba(var(--info-rgb), 0.12);
  color: var(--accent-2);
  font-size: 11.5px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 100px;
}

.chip-replace {
  background: rgba(248, 113, 113, 0.12);
  color: var(--danger);
  font-size: 11.5px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 100px;
}

.chip-no_work {
  background: rgba(20, 32, 42, 0.06);
  color: var(--text-faint);
  font-size: 11.5px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 100px;
}

.chip-inspect {
  background: rgba(251, 191, 36, 0.14);
  /* var(--warning) (#a9761f) measured 3.68:1 on this tint — fails AA's
     4.5:1 normal-text floor (this pill's 11.5px bold text doesn't meet
     the "large text" 3:1 exception). Own darkened override, same amber
     hue, not touching the shared --warning token used elsewhere. */
  color: #8a6119;
  font-size: 11.5px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 100px;
}

/* Workshop selected-part authority: an Unassessed part (selected by the technician, not
   assessed by the AI) and a possible left/right swap. Same pill shape as .chip-inspect. */
.part-card-flags { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0; }
.chip-unassessed,
.chip-mixup,
.chip-ai-added,
.chip-owner-choice {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11.5px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 100px;
}
.chip-unassessed { background: rgba(20, 32, 42, 0.08); color: #3a4652; border: 1px dashed rgba(20, 32, 42, 0.35); }
.chip-mixup { background: rgba(179, 64, 47, 0.12); color: #8f2f22; }
.chip-ai-added { background: rgba(20, 32, 42, 0.05); color: #5a6672; font-weight: 600; }
.chip-owner-choice { background: rgba(37, 99, 235, 0.10); color: #1d4ed8; }

/* Direct-set disposition toggle — every part-card state selectable in one
   click with the active one visibly filled, replacing a bare ⇄ icon button
   that silently cycled all 4 states with no preview. Same color vocabulary
   as .chip-repair/.chip-replace/.chip-inspect/.chip-no_work above, just
   applied to a real control instead of a read-only badge. */
.disp-toggle {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.disp-btn {
  padding: 5px 11px;
  font-size: 11px;
  font-weight: 700;
  text-transform: capitalize;
  background: var(--surface);
  color: var(--text-dim);
  border: none;
  border-right: 1px solid var(--border);
  cursor: pointer;
}
.disp-btn:last-child { border-right: none; }
.disp-btn:hover:not(.active) { background: var(--surface-2); }
.disp-btn.disp-repair.active { background: rgba(var(--info-rgb), 0.16); color: var(--accent-2); }
.disp-btn.disp-replace.active { background: rgba(248, 113, 113, 0.16); color: var(--danger); }
.disp-btn.disp-inspect.active { background: rgba(251, 191, 36, 0.2); color: #8a6119; }
.disp-btn.disp-no_work.active { background: rgba(20, 32, 42, 0.1); color: var(--text-dim); }
.part-card-disp-row { margin: 6px 0 2px; }

.chip-excluded {
  background: rgba(20, 32, 42, 0.06);
  color: var(--text-faint);
  font-size: 11.5px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 100px;
  margin-right: 4px;
}

.part-card.excluded {
  opacity: 0.65;
}

.chip-rate-override {
  background: rgba(var(--accent-rgb), 0.16);
  color: var(--accent);
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 100px;
  white-space: nowrap;
}

.chip-rate-default {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-faint);
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 100px;
  white-space: nowrap;
}

.chip-manual-op {
  background: rgba(167, 139, 250, 0.14);
  /* #a78bfa measured 2.40:1 on this tint — the same leftover
     dark-theme purple .chip-sourcing's own comment already documents
     fixing (2.7:1 there) — never ported to this sibling chip. Same fix,
     same darkened purple. */
  color: #602ef6;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 100px;
  text-transform: capitalize;
}

/* ADAS line pending technician confirmation — see confirmAdasEquipped() in
   app.js. Present only while advisory===true; its absence IS the confirmed
   state, no separate "confirmed" badge exists. Same darkened amber as
   .chip-inspect (own override, not the shared --warning token — see that
   chip's own comment for why: 3.68:1 measured, fails 4.5:1 normal-text AA). */
.chip-advisory {
  background: rgba(251, 191, 36, 0.14);
  color: #8a6119;
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 100px;
  white-space: nowrap;
}

.adas-advisory-confirm-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 10px 14px;
  margin-top: 6px;
  background: rgba(251, 191, 36, 0.08);
  border: 1px solid rgba(251, 191, 36, 0.3);
  border-radius: var(--radius);
}

/* ── Cost tables ─────────────────────────────────────────────────── */
.cost-line-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 12.5px;
  margin-bottom: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.cost-line-table td {
  padding: 9px 14px;
  border-bottom: 1px solid var(--border);
}

.cost-line-table tr:last-child td {
  border-bottom: none;
}

.cost-line-table thead th {
  background: var(--surface-3);
  color: var(--text-dim);
  padding: 10px 14px;
  font-size: 10.5px;
  text-align: left;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 700;
  border-bottom: 1px solid var(--border);
}

.cost-line-table thead th.num {
  text-align: right;
}

.cost-line-table .num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  /* Tier 2 (computed/result value) — was unset, silently inheriting the
     table's plain dark text and reading as no different from a static
     label. Same teal every other subtotal/line-total on this screen uses. */
  color: var(--accent-2);
  font-weight: 600;
}

.cost-line-table .subtotal td {
  background: rgba(var(--accent-rgb), 0.06);
  font-weight: 600;
  /* "Subtotal (pre-tax)" is a computed value exactly like "Labor Subtotal"/
     "ADAS Subtotal" elsewhere on this screen — same Tier 2 teal, not the
     plain dark text a label gets. Only the true GRAND TOTAL below stays
     Tier 1 (dark, matching the hero stat card at the top of the page). */
  color: var(--accent-2);
}

.cost-line-table .grand-total td {
  background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.18), rgba(var(--info-rgb), 0.1));
  /* Deliberately Tier 1 (dark), not teal — this row mirrors the hero
     "Grand Total" stat card at the top of the page, so it stays in that
     same tier rather than the teal every other row in this table uses. */
  color: var(--text);
  font-weight: 700;
  font-size: 14px;
  font-family: var(--font-head);
}

.tl-banner {
  background: rgba(248, 113, 113, 0.08);
  border: 1px solid rgba(248, 113, 113, 0.3);
  border-radius: var(--radius);
  padding: 12px 16px;
  font-size: 12.5px;
  margin-bottom: 14px;
  display: flex;
  gap: 10px;
  color: var(--text);
}

.tl-banner .icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 1px;
}

.tl-banner strong {
  color: var(--danger);
}

/* Neutral informational note — same structural shape as .tl-banner
   (padding/radius/font-size) but for plain context/explanation text, not
   a warning. .callout--success is the positive-confirmation variant
   (e.g. "totals reconcile"). Was previously only ever used with a full
   set of ad-hoc inline styles at each call site (no real class
   definition at all) — real gap, not a deliberate "make this look like
   a different feature" choice; fixed to match the rest of the app's
   actual banner/notice visual language. */
.callout {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
  font-size: 12.5px;
  margin-bottom: 14px;
  color: var(--text);
}

.callout--success {
  background: rgba(47, 125, 79, 0.08);
  border-color: rgba(47, 125, 79, 0.3);
}

/* ── Rate table ──────────────────────────────────────────────────── */
.rate-search-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
  align-items: flex-end;
}

/* Fix for Estimate Browser search bar - give input reasonable width */
#br-search {
  flex: 0 1 380px;
  min-width: 250px;
}

#br-state {
  flex: 0 1 200px;
  min-width: 150px;
}

/* Same "select falls through to the base input/select rule's width:100%"
   gap #br-state already had to be fixed for — flex-basis (unset here)
   defaults to the width property on a flex item, so with no override this
   select stretched to the whole search bar's width while its own text sat
   tiny and left-aligned inside it. */
#br-review-status {
  flex: 0 1 220px;
  min-width: 190px;
}

/* #br-vin/#br-claim previously fell through to the generic
   ".rate-search-bar input { flex: 1 }" rule below with no min-width, and
   the bar had no flex-wrap — on a typical viewport the two fixed-width
   fields above already claim most of the row, so these two got squeezed
   down to near their content minimum and rendered more like buttons than
   text inputs. flex-wrap above lets the bar drop to a second line instead
   of crushing them once space runs out. */
#br-vin,
#br-claim {
  flex: 0 1 200px;
  min-width: 160px;
}

.rate-search-bar input {
  flex: 1;
}

#rate-table-wrap {
  overflow-x: auto;
  max-height: 560px;
  overflow-y: auto;
  border-radius: var(--radius);
}

/* Estimate Browser and Users tables are the same wide .rate-tbl pattern
   (white-space: nowrap cells) but weren't given a scrolling wrapper, so
   trailing columns — notably the row action button — were clipped off the
   right edge of the card with no way to reach them. */
#br-results-wrap,
#users-table-wrap {
  overflow-x: auto;
  border-radius: var(--radius);
}

table.partners-tbl {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.partners-tbl th {
  background: var(--surface-3);
  color: var(--text);
  padding: 10px 14px;
  text-align: left;
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 700;
}

.partners-tbl td {
  padding: 10px 14px;
  border-top: 1px solid var(--border);
  vertical-align: middle;
}

table.rate-tbl {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 12.5px;
  white-space: nowrap;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.rate-tbl th {
  background: var(--surface-3);
  /* Same reasoning as the global `label` rule above — an uppercase,
     letter-spaced column header at 10.5px needs the primary --text color
     to actually read as bold/scannable, not --text-dim. */
  color: var(--text);
  padding: 10px 14px;
  text-align: left;
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 700;
  position: sticky;
  top: 0;
  z-index: 2;
  border-bottom: 1px solid var(--border);
}

.rate-tbl th.num,
.rate-tbl td.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.rate-tbl td {
  padding: 9px 14px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}

/* Row action column (Open/Delete, Reset PW/Disable/Delete, etc.) pinned to
   the right edge of the scroll container — overflow-x:auto alone leaves the
   actions reachable only by scrolling, with zero visual hint that there's
   more to the right, so in practice they read as "missing" rather than
   "off-screen". Sticky keeps them on screen regardless of scroll position. */
.rate-tbl td.sticky-actions {
  position: sticky;
  right: 0;
  background: var(--surface);
  box-shadow: -8px 0 12px -8px rgba(0, 0, 0, 0.4);
}
.rate-tbl tbody tr:hover td.sticky-actions {
  background: var(--surface-2);
}
.rate-tbl th.sticky-actions {
  position: sticky;
  right: 0;
  z-index: 3; /* above both the plain sticky header (z-index 2) and sticky body cells */
}

.rate-tbl tr:last-child td {
  border-bottom: none;
}

.rate-tbl tbody tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.edit-row-btn {
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 7px;
  border: 1px solid var(--border-hi);
  background: var(--surface-2);
  color: var(--text-dim);
  cursor: pointer;
  font-weight: 600;
  transition: all 0.15s;
}

.edit-row-btn:hover {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  border-color: transparent;
}

/* ── Health ──────────────────────────────────────────────────────── */
.health-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 12px;
}

.health-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  transition: border-color 0.15s;
}

.health-card:hover {
  border-color: var(--border-hi);
}

.health-card .hk {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.health-card .hv {
  font-family: var(--font-head);
  font-size: 14px;
  font-weight: 600;
  margin-top: 6px;
}

.hv.ok {
  color: var(--success);
}

.hv.warn {
  color: var(--warning);
}

.hv.err {
  color: var(--danger);
}

/* ── Toast ───────────────────────────────────────────────────────── */
#toast-wrap {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  /* Was rgba(15,15,23,0.9) — a near-black leftover from this app's old
     dark theme. --text is now a dark navy (#14202a, light-theme value),
     so dark-on-near-black rendered as an essentially invisible message
     inside a plain colored box — exactly the "box with nothing visible
     inside" bug this comment exists to prevent recurring. Fixed to a
     real light-theme surface, matching .error-panel's own already-
     correct light background elsewhere in this file. */
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(20px);
  color: var(--text);
  padding: 12px 18px;
  border-radius: var(--radius);
  font-size: 12.5px;
  max-width: 340px;
  box-shadow: 0 12px 40px -8px rgba(20, 32, 42, 0.25);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  animation: tIn 0.25s var(--ease);
  pointer-events: auto;
}

.toast.ok {
  border-left-color: var(--success);
}

.toast.err {
  border-left-color: var(--danger);
}

.toast.wrn {
  border-left-color: var(--warning);
}

@keyframes tIn {
  from {
    opacity: 0;
    transform: translateX(20px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* ── Misc ────────────────────────────────────────────────────────── */
.section-title {
  /* var(--font-head) (Big Shoulders Display, a condensed display face) was
     designed for large brand/headline text — at 14px (or the 11.5px some
     call sites override down to, e.g. "Point of Impact", "What should the
     AI re-check?") it reads cramped and doesn't match the IBM Plex Sans
     body copy around it. Real English section-heading phrases need a text
     face, not a display face; var(--font-head) stays reserved for actual
     large brand/number display (masthead wordmark, KPI figures, money
     totals) elsewhere in this file. */
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin: 20px 0 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.id-pill {
  display: inline-block;
  background: rgba(var(--accent-rgb), 0.12);
  color: var(--accent-2);
  font-size: 11px;
  font-family: var(--font-mono);
  padding: 3px 10px;
  border-radius: 100px;
  cursor: pointer;
  user-select: all;
  border: 1px solid rgba(var(--accent-rgb), 0.25);
}

.id-pill:hover {
  background: rgba(var(--accent-rgb), 0.2);
}

.spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  vertical-align: middle;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.15);
}

/* ── Mode toggle (Photo Analysis / Fault Codes Only) ─────────────── */
.mode-toggle {
  display: flex;
  gap: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 4px;
  margin-bottom: 20px;
  max-width: 460px;
}

.mode-btn {
  flex: 1;
  padding: 10px 16px;
  border: none;
  background: transparent;
  border-radius: 100px;
  color: var(--text-dim);
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font-ui);
  cursor: pointer;
  transition: all 0.15s var(--ease);
}

.mode-btn:hover { color: var(--text); }

.mode-btn.active {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: var(--on-accent);
  box-shadow: 0 2px 12px var(--accent-glow);
}

/* ── Quick-open-by-ID box (Search view) ──────────────────────────── */
.quick-open-box {
  display: flex;
  gap: 10px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 22px;
  align-items: flex-end;
}

.quick-open-box .field { flex: 1; }
.quick-open-box label { margin-bottom: 6px; }
@media (max-width: 760px) {
  #ci-import-box { flex-direction: column; align-items: stretch; }
  #customer-import-modal .form-grid { grid-template-columns: 1fr; }
}

/* Import a customer's estimate — preview of the match before importing. */
.ci-preview {
  margin: 14px 0 4px;
  padding: 12px 14px;
  background: var(--surface-2, var(--surface));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: grid;
  gap: 4px;
}
.ci-preview-title { font-weight: 700; font-size: 15px; }

/* Which rate card priced the estimate (Summary card), with the shop reprice button. */
.est-rates-line {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  display: grid;
  gap: 4px;
  justify-items: start;
}
.est-rates-line .btn { margin-top: 4px; }
.ci-preview-parts { font-size: 13px; margin-top: 4px; }
.ci-preview-note { font-size: 12px; color: var(--accent); margin-top: 6px; display: flex; gap: 6px; align-items: center; }
.ci-pick-head { font-size: 13px; font-weight: 600; }
.ci-match {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  cursor: pointer;
}
.ci-match input { margin-top: 4px; }
.ci-match-body { display: grid; gap: 4px; min-width: 0; }
.ci-match.is-chosen { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }

/* ── Collapsible damage report (Workbench results) ───────────────── */
.collapsible {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  margin-bottom: 20px;
  overflow: hidden;
}

.collapsible-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  cursor: pointer;
  user-select: none;
  /* Same reasoning as .section-title above — "Vehicle Photos"/"Vehicle
     Information"/"Claim Information"/etc. are real accordion-heading
     phrases, not a brand wordmark; var(--font-head)'s condensed display
     shape read as narrow/inconsistent with the rest of the page. */
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 14px;
}

.collapsible-head .chev {
  margin-left: auto;
  transition: transform 0.2s var(--ease);
  color: var(--text-faint);
  font-size: 12px;
}

/* Direct-child combinators (not descendant) — a .collapsible can nest
   another .collapsible (e.g. "Parts Sourcing" inside "Vehicle Photos"),
   and these must only react to their OWN .open, not an ancestor's. */
.collapsible.open > .collapsible-head .chev { transform: rotate(180deg); }

.collapsible-body {
  display: none;
  padding: 4px 18px 18px;
  border-top: 1px solid var(--border);
}

.collapsible.open > .collapsible-body { display: block; }

/* ── Empty state ──────────────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-faint);
}

.empty-state .es-icon { font-size: 34px; margin-bottom: 10px; opacity: 0.7; }
.empty-state .es-title { font-size: 14px; font-weight: 600; color: var(--text-dim); margin-bottom: 4px; }
.empty-state .es-sub { font-size: 12.5px; }

/* ── Progress track (pipeline SSE) ───────────────────────────────── */
.progress-track {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-bottom: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 12px;
}

.progress-step {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 12px 8px;
  position: relative;
  border-radius: var(--radius);
  transition: background 0.2s;
}

.progress-step:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 23px;
  top: 44px;
  bottom: -4px;
  width: 2px;
  background: var(--border);
}

.progress-step.done::after {
  background: linear-gradient(to bottom, var(--success), rgba(52, 211, 153, 0.3));
}

.progress-step.active::after {
  background: linear-gradient(to bottom, var(--accent), rgba(var(--accent-rgb), 0.3));
}

.step-icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  background: var(--surface-2);
  border: 1.5px solid var(--border);
  z-index: 1;
  transition: all 0.25s var(--ease);
}

.progress-step.done .step-icon {
  background: linear-gradient(135deg, var(--success), #10b981);
  border-color: transparent;
  color: #fff;
}

.progress-step.active .step-icon {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-color: transparent;
  color: #fff;
  animation: pulse 1.4s ease infinite;
}

.progress-step.error .step-icon {
  background: linear-gradient(135deg, var(--danger), #ef4444);
  border-color: transparent;
  color: #fff;
}

@keyframes pulse {

  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(var(--accent-rgb), 0.5);
  }

  50% {
    box-shadow: 0 0 0 8px rgba(var(--accent-rgb), 0);
  }
}

.step-body {
  flex: 1;
  padding-top: 5px;
  min-width: 0;
}

.step-label {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
}

.step-sub {
  font-size: 11.5px;
  color: var(--text-dim);
  margin-top: 3px;
}

.step-elapsed {
  font-size: 10px;
  color: var(--text-faint);
  font-family: var(--font-mono);
  float: right;
}

.progress-step.done .step-label {
  color: var(--success);
}

.progress-step.active .step-label {
  color: var(--accent-2);
}

.progress-step.error .step-label {
  color: var(--danger);
}

/* ── Persistent error panel ──────────────────────────────────────── */
.error-panel {
  background: rgba(248, 113, 113, 0.06);
  border: 1px solid rgba(248, 113, 113, 0.3);
  border-radius: var(--radius);
  margin-bottom: 16px;
  overflow: hidden;
}

.error-panel-head {
  background: linear-gradient(135deg, rgba(248, 113, 113, 0.2), rgba(239, 68, 68, 0.12));
  color: var(--text);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 600;
}

.error-panel-head span:first-child {
  color: var(--danger);
}

.error-dismiss {
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: var(--text);
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s;
}

.error-dismiss:hover {
  background: rgba(255, 255, 255, 0.15);
}

.error-panel-msg {
  padding: 12px 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  word-break: break-word;
}

.error-panel-detail {
  margin: 0 14px 14px;
  padding: 12px 14px;
  background: #0a0a12;
  color: var(--danger);
  font-family: var(--font-mono);
  font-size: 11.5px;
  line-height: 1.55;
  border-radius: 8px;
  border: 1px solid var(--border);
  white-space: pre-wrap;
  word-break: break-all;
  max-height: 320px;
  overflow-y: auto;
  user-select: all;
}

/* ── Editable estimate UI ────────────────────────────────────────── */
.muted-sm {
  /* Explicit font-family, not inherited — .muted-sm is very often nested
     inside a .section-title (font-family: var(--font-head), the bold
     condensed display face meant for headings), and without this it
     silently rendered the display font at 11px for real sentences
     ("auto-triggered from damage zones — adjust hours...", "parts
     inferred from nearby damage but not directly visible..."), which is
     what actually made that text read as narrow/cramped/hard to parse —
     not a font-weight or color problem on its own. */
  font-family: var(--font-ui);
  font-size: 12px;
  color: var(--text-faint);
}

/* Canonical "computed/result value" tier — every priced line total, every
   subtotal (ADAS, Diagnostic Inspection, and any future one), and the one
   money column in a data table (Search results' Grand Total, the Damage
   Report's Part Cost) all resolve to this exact class, exact color/weight —
   no more per-table one-off number styling. */
.num-strong {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--accent-2);
}

/* .rate-tbl td / .parts-tbl td both set their own color: var(--text) at
   higher specificity (class+element vs. .num-strong's single class) — a
   bare .num-strong on a <td> in either table would silently lose to that
   dark default. Compound selectors here win the cascade instead of
   fighting it. */
.rate-tbl td.num-strong,
.parts-tbl td.num-strong {
  color: var(--accent-2);
}

.edited-banner {
  background: rgba(251, 191, 36, 0.08);
  border: 1px solid rgba(251, 191, 36, 0.3);
  border-radius: var(--radius);
  padding: 10px 14px;
  font-size: 12.5px;
  color: var(--text);
  margin-bottom: 14px;
}

.edited-note {
  margin-top: 4px;
  font-style: italic;
  font-size: 11.5px;
  color: var(--warning);
}

/* Labor hours edit rows */
.labor-edit-wrap {
  margin-bottom: 10px;
}

.labor-edit-row {
  display: grid;
  grid-template-columns: 120px 100px 1fr 130px 110px;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.labor-edit-row.subtotal-row {
  border-bottom: none;
  border-top: 1.5px solid var(--border-hi);
  font-weight: 700;
  padding-top: 12px;
  margin-top: 6px;
}

.labor-edit-type {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.labor-edit-hours {
  display: flex;
  align-items: center;
  gap: 6px;
}

.hr-step {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: all 0.15s;
}

.hr-step:hover {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  border-color: transparent;
}

.hr-input {
  width: 68px;
  text-align: center;
  padding: 6px 4px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  /* font-weight matches the row's own label (.labor-edit-type, 600) —
     same color as that label already, but at the default 400 weight the
     thinner glyph strokes read as noticeably lighter/"disabled" even
     though the computed color is identical (verified: both sample to the
     literal same RGB). An editable value the technician is meant to
     actively change needs to read as dark/black, not muted. */
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  background: var(--surface);
  color: var(--text);
}

.hr-unit {
  font-size: 11px;
  color: var(--text-faint);
}

.labor-edit-rate {
  font-size: 12px;
  color: var(--text-dim);
  text-align: right;
}

.labor-edit-subtotal {
  font-family: var(--font-head);
  font-size: 14px;
  font-weight: 700;
  color: var(--accent-2);
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* ADAS read-only rows */
.adas-edit-wrap {
  margin-bottom: 10px;
}

.adas-edit-row {
  display: grid;
  grid-template-columns: 1fr 220px 110px 36px;
  align-items: center;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid var(--border);
  font-size: 12.5px;
}

.adas-edit-row.subtotal-row {
  border-bottom: none;
  border-top: 1.5px solid var(--border-hi);
  font-weight: 700;
  padding-top: 10px;
}

.adas-name-input,
.adas-location-input {
  padding: 5px 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 12.5px;
  background: var(--surface);
  color: var(--text);
}

.adas-name-input {
  font-weight: 700;
  width: 45%;
}

.adas-location-input {
  width: 45%;
  color: var(--text-dim);
}

/* Parts edit list — card-based */
.parts-edit-wrap,
.manual-lines-edit-wrap {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 6px;
}

.part-card {
  display: grid;
  grid-template-columns: 1fr 110px 110px 100px;
  align-items: center;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  transition: all 0.15s;
}

.part-card:hover {
  border-color: var(--border-hi);
  background: var(--surface-2);
}

.part-card.editing {
  display: block;
  background: rgba(var(--accent-rgb), 0.06);
  border-color: var(--accent);
}

.part-card-main {
  min-width: 0;
}

.part-card-name {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
}

.part-card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  flex-wrap: wrap;
}

.part-card-total {
  font-family: var(--font-head);
  font-size: 14px;
  font-weight: 700;
  color: var(--accent-2);
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.part-card-source {
  text-align: center;
}

.part-card-thumb {
  width: 52px;
  height: 42px;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid var(--border);
  flex-shrink: 0;
  background: var(--surface-2);
}

.photo-upload-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}

.photo-upload-row input[type="file"] {
  font-size: 11.5px;
  max-width: 180px;
}

.photo-thumb-preview {
  width: 44px;
  height: 36px;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid var(--border);
}

.intake-photo-thumb {
  position: relative;
  display: inline-block;
}

.intake-photo-thumb img {
  width: 84px;
  height: 64px;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid var(--border);
}

.intake-photo-thumb .icon-btn {
  position: absolute;
  top: -6px;
  right: -6px;
  background: var(--surface);
  border-radius: 50%;
  width: 20px;
  height: 20px;
  font-size: 10px;
  line-height: 1;
  padding: 0;
}

.part-card-actions {
  display: flex;
  gap: 5px;
  justify-content: flex-end;
}

/* Base size for every vendored icons.js <svg class="icon">. Deliberately
   unset color here — an icon inherits `color` from whatever wraps it
   (currentColor), so a status/brand tint is a class on the wrapper, never
   baked into the icon itself. See icons.js's own header comment. */
.icon {
  width: 1em;
  height: 1em;
  flex-shrink: 0;
  vertical-align: -0.15em;
}

.icon-sm { width: 0.85em; height: 0.85em; }
.icon-lg { width: 1.35em; height: 1.35em; }
.icon-xl { width: 1.8em; height: 1.8em; }

.icon-accent { color: var(--accent); }
.icon-success { color: var(--success); }
.icon-warning { color: var(--warning); }
.icon-danger { color: var(--danger); }
.icon-dim { color: var(--text-dim); }

.icon-btn {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 1px solid var(--border-hi);
  background: var(--surface-2);
  cursor: pointer;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  /* Was --text-dim — same "passes contrast math, still reads dull/flat,
     looks disabled" issue .btn-ghost's own comment already documents
     (see above). Camera/edit/remove/restore buttons across the app all
     inherit this rule, so the one fix here covers every one of them. */
  color: var(--text);
  transition: all 0.15s;
}

.icon-btn:hover {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  border-color: transparent;
}

/* Delete/remove is destructive and often irreversible — it needs to read
   as different from edit/swap before the pointer ever gets there, not
   only on hover (which a touch device never shows at all). Same red tint
   pattern the disposition chips already use for --danger. */
.icon-btn.danger {
  background: rgba(var(--danger-rgb), 0.10);
  border-color: rgba(var(--danger-rgb), 0.35);
  color: var(--danger);
}

.icon-btn.danger:hover {
  background: linear-gradient(135deg, var(--danger), #ef4444);
  color: #fff;
  border-color: transparent;
}

.ebay-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--accent-2);
  text-decoration: none;
  padding: 4px 10px;
  border: 1px solid rgba(var(--accent-rgb), 0.3);
  border-radius: 100px;
  white-space: nowrap;
  background: rgba(var(--accent-rgb), 0.08);
  transition: all 0.15s;
}

.ebay-link-btn:hover {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  border-color: transparent;
}

/* Same pill shape/size as .ebay-link-btn, neutral tone — "no listing
   found" is a real, common outcome, not an error; it should read as the
   same KIND of fact as a real Listing chip, not a different visual
   language (plain gray text vs. a real chip). */
.no-link-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--text-faint);
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 100px;
  white-space: nowrap;
  background: var(--surface-2);
}

/* Evidence-photo placeholder — a part with no crop still gets a real,
   sized box explaining why (AI confidence too low), not empty space
   next to the ones that DO have a photo. */
.no-photo-placeholder {
  width: 52px;
  height: 42px;
  border-radius: 4px;
  border: 1px dashed var(--border);
  background: var(--surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-faint);
  flex-shrink: 0;
}

.no-photo-note {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.part-hours-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.phr-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 11px;
  color: var(--text-dim);
}

.phr-field input {
  width: 72px;
  padding: 6px 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 12.5px;
  background: var(--surface);
  color: var(--text);
}

/* Part card — editing mode */
.part-card-edit-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
}

.pce-field label {
  /* This selector's own specificity (.pce-field label) beats the plain
     `label` rule fixed earlier, so the part-edit dialog's field labels
     ("Disposition", "Part Cost ($)", "Part # (MPN)", "Alternative
     Listings", etc.) never actually picked up that fix — still 10px in
     --text-dim. Same treatment: primary --text, and a touch larger. */
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.pce-field input,
.pce-field select {
  width: 100%;
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 12.5px;
  background: var(--surface);
  color: var(--text);
}

.part-card-actions {
  margin-top: 8px;
}

.chip-sourcing {
  /* #a78bfa was 2.7:1 on white — the ("OEM"/"Aftermarket"/etc.) sourcing
     chip was barely readable. Darkened along the same purple hue. */
  background: rgba(167, 139, 250, 0.14);
  color: #602ef6;
  font-size: 11.5px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 100px;
}

.part-search-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.part-search-row select {
  flex: 1;
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 12.5px;
  background: var(--surface);
  color: var(--text);
}

.part-search-row select option:disabled {
  color: var(--text-faint);
}

.parts-edit-subtotal-row {
  display: flex;
  justify-content: space-between;
  padding: 12px 14px;
  margin-top: 6px;
  background: rgba(var(--accent-rgb), 0.06);
  border: 1px solid rgba(var(--accent-rgb), 0.2);
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}

/* Sticky save/discard bar — same near-black-leftover-from-the-old-dark-
   theme bug as .toast above (rgba(15,15,23,...) behind var(--text)'s now-
   dark value), fixed the same way. */
.save-changes-bar {
  position: fixed;
  bottom: 0;
  left: 230px;
  right: 0;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border);
  color: var(--text);
  padding: 14px 28px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: 0 -10px 40px -10px rgba(20, 32, 42, 0.25);
  z-index: 500;
}

.save-changes-msg {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

/* Same fixed-bottom-bar treatment as .save-changes-bar, amber instead of
   the save bar's neutral tone so the two are never mistaken for each
   other — this one means "re-run the AI," not "save a field edit."
   Stacks ABOVE .save-changes-bar when both are visible at once (its
   `bottom` is set from JS in updateStickyBarsLayout(), app.js) rather
   than overlapping it. */
.regen-pending-bar {
  position: fixed;
  bottom: 0;
  left: 230px;
  right: 0;
  background: rgba(255, 250, 235, 0.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid rgba(138, 97, 25, 0.35);
  color: var(--text);
  padding: 14px 28px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: 0 -10px 40px -10px rgba(20, 32, 42, 0.25);
  z-index: 499;
}
.regen-pending-msg {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  color: #8a6119;
  display: flex;
  align-items: center;
  gap: 7px;
  flex: 1;
}
@media (max-width: 900px) {
  .regen-pending-bar { left: 0; flex-wrap: wrap; }
}

.save-note-input {
  flex: 1;
  padding: 9px 14px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 12.5px;
}

.save-note-input::placeholder {
  color: var(--text-faint);
}

.save-note-input:focus {
  outline: none;
  border-color: var(--accent);
  background: rgba(var(--accent-rgb), 0.05);
}

@media (max-width: 900px) {
  .save-changes-bar {
    left: 0;
    flex-wrap: wrap;
  }

  .part-card {
    grid-template-columns: 1fr;
  }

  .part-card-total,
  .part-card-source,
  .part-card-actions {
    text-align: left;
    justify-content: flex-start;
  }
}

/* ── OBD / Fault Code UI ─────────────────────────────────────────── */
.obd-chip-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  min-height: 44px;
  margin-bottom: 10px;
  cursor: text;
  transition: border-color 0.15s;
}

.obd-chip-wrap:focus-within {
  border-color: var(--accent);
  background: rgba(var(--accent-rgb), 0.04);
}

.obd-chip-wrap.obd-required {
  border-color: rgba(var(--accent-rgb), 0.4);
}

.obd-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.obd-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  border-radius: 6px;
  padding: 3px 9px;
  font-size: 12px;
  font-family: var(--font-mono);
  font-weight: 700;
}

.obd-chip.confirmed {
  background: linear-gradient(135deg, var(--success), #22c55e);
}

.obd-chip-confirm-toggle {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.75);
  cursor: pointer;
  font-size: 12px;
  padding: 0;
  line-height: 1;
}

.obd-chip-confirm-toggle:hover {
  color: #fff;
}

.obd-chip.confirmed .obd-chip-confirm-toggle {
  color: #fff;
}

.obd-chip-remove {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  font-size: 13px;
  padding: 0;
  line-height: 1;
}

.obd-chip-remove:hover {
  color: #fff;
}

.obd-chip-input {
  border: none;
  outline: none;
  background: transparent;
  font-size: 13px;
  min-width: 180px;
  flex: 1;
  font-family: var(--font-ui);
  color: var(--text);
}

.obd-chip-input::placeholder {
  color: var(--text-faint);
}

.obd-code-browser {
  margin-bottom: 14px;
}

/* ── Point-of-Impact / Airbag-position multi-select chips ──────────
   Plain toggle pills, deliberately simpler than the self-service wizard's
   own SVG clock wheel (same underlying data, points_of_impact/confirmed
   airbag DTCs — see collectClaimFields()/setAirbagAnswer() in app.js) —
   a functional-parity pass now, visual redesign deferred. */
.poi-chip-wrap {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Front/Right/Rear/Left/Other clusters (matching the 12-position clock
   face — 11/12/1 o'clock = front, etc.) replacing the old flat 14-pill
   wall; renderPOIChips() builds this same markup for both #pl-poi-chips
   and #regen-poi-chips. */
.poi-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
}
.poi-legend-item {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-faint);
}
.poi-cluster-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
}
.poi-cluster-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-dim);
  margin-bottom: 5px;
}
.poi-cluster-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.poi-chip {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-dim);
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 12px;
  font-family: var(--font-ui);
  cursor: pointer;
  transition: all 0.15s;
}

.poi-chip:hover {
  border-color: var(--border-hi);
  color: var(--text);
}

.poi-chip.active {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-color: transparent;
  color: #fff;
  font-weight: 600;
}

.obd-chip-hint {
  font-size: 11px;
  color: var(--text-faint);
  margin: -4px 0 10px;
}

/* Vision cross-reference verdicts shown on the Analyze tab */
.obd-assessment-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.obd-assessment-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 12.5px;
}

.obd-assessment-row.confirmed {
  border-left: 3px solid var(--success);
}

.obd-assessment-row.pending {
  border-left: 3px solid var(--warning);
}

.obd-assessment-code {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--text);
  min-width: 70px;
}

.obd-assessment-body {
  flex: 1;
}

.obd-assessment-reasoning {
  color: var(--text-dim);
  margin-top: 2px;
}

.code-browser-grid {
  margin-top: 8px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 4px;
  max-height: 240px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 8px;
}

.code-suggestion {
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 12.5px;
  transition: all 0.12s;
  color: var(--text-dim);
}

.code-suggestion:hover {
  background: rgba(var(--accent-rgb), 0.1);
  color: var(--text);
}

.code-suggestion strong {
  font-family: var(--font-mono);
  color: var(--accent-2);
}

/* Make/Model dropdown-first pickers (Workbench Vehicle Information) —
   absolutely positioned under the field rather than the OBD picker's
   inline .code-browser-grid, since these live inside a multi-column
   .form-grid and pushing sibling fields down when the list opens would
   be disruptive there. */
.vehicle-suggest-list {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 20;
  margin-top: 2px;
  max-height: 220px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
}

.vehicle-suggest-item {
  padding: 8px 12px;
  cursor: pointer;
  font-size: 12.5px;
  color: var(--text-dim);
}

.vehicle-suggest-item:hover {
  background: rgba(var(--accent-rgb), 0.1);
  color: var(--text);
}

/* OBD fault line cards */
.obd-fault-edit-wrap {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 14px;
}

.obd-fault-row {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 14px 16px;
}

.obd-fault-row.obd-fault-pending {
  border-left-color: var(--warning);
}

.obd-fault-row.obd-fault-confirmed {
  border-left-color: var(--success);
}

.obd-fault-note {
  font-size: 11.5px;
  font-style: italic;
  margin: -2px 0 10px;
  padding: 6px 10px;
  border-radius: 6px;
}

.obd-fault-note.pending {
  color: var(--warning);
  background: rgba(251, 191, 36, 0.08);
}

.obd-fault-note.confirmed {
  color: var(--success);
  background: rgba(52, 211, 153, 0.08);
}

.obd-fault-actions {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.obd-fault-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.obd-fault-code {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 14px;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  padding: 3px 10px;
  border-radius: 7px;
}

.obd-fault-system {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-dim);
  background: var(--surface-3);
  padding: 3px 9px;
  border-radius: 100px;
}

.obd-fault-confidence {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 100px;
  margin-left: auto;
}

.obd-conf-high {
  background: rgba(52, 211, 153, 0.15);
  color: var(--success);
}

.obd-conf-medium {
  background: rgba(251, 191, 36, 0.15);
  color: var(--warning);
}

.obd-conf-low {
  background: rgba(248, 113, 113, 0.15);
  color: var(--danger);
}

.obd-conf-pending_inspection {
  background: rgba(251, 191, 36, 0.15);
  color: var(--warning);
}

.obd-conf-manual {
  background: rgba(var(--info-rgb), 0.15);
  color: var(--accent-2);
}

.obd-fault-desc {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--text);
}

.obd-fault-op {
  font-size: 11.5px;
  color: var(--text-dim);
  margin-bottom: 12px;
}

.obd-fault-fields {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
}

.obd-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.obd-field label {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.obd-field-val {
  font-size: 13px;
  font-weight: 600;
  /* Tier 2 (computed/result value) — "Labor" and "Line Total" (via
     .obd-field-total below) are both priced results, same teal every
     other line total/subtotal on this screen uses. */
  color: var(--accent-2);
}

.obd-field-total {
  font-family: var(--font-head);
  font-size: 14px;
  font-weight: 700;
  color: var(--accent-2);
  min-width: 85px;
}

/* "Rate/hr" is the one .obd-field-val that isn't a computed result — it's
   contextual reference info, Tier 4, same treatment as .labor-edit-rate's
   "$X/hr" text in the Labor Hours section above. */
.obd-field-val.obd-field-rate {
  font-weight: 400;
  font-size: 12px;
  color: var(--text-dim);
}

/* Inline OBD section inside main estimate view */
.obd-inline-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.obd-inline-row {
  display: grid;
  grid-template-columns: 160px 1fr 110px;
  align-items: center;
  gap: 12px;
  padding: 9px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 12.5px;
}

.obd-inline-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.obd-inline-total {
  text-align: right;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  font-family: var(--font-head);
  color: var(--accent-2);
}

/* ── Responsive ──────────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .sidebar {
    width: 200px;
  }

  .save-changes-bar {
    left: 200px;
  }
}

@media (max-width: 900px) {
  .sidebar {
    display: none;
  }

  .save-changes-bar {
    left: 0;
  }

  .content {
    padding: 20px;
  }
}

/* Drop zone visual feedback when images are uploaded */
.dropzone.has-images {
  padding: 18px;
  text-align: left;
  cursor: default;
  background: var(--surface);
  /* Use the theme's surface color */
  border-style: solid;
  border-color: var(--border-hi);
}

.drop-zone.has-images:hover {
  border-color: var(--accent);
  background: var(--surface);
}

/* ── Login overlay ─────────────────────────────────────────────────
   Stays fully opaque so the app-shell underneath (always in the DOM,
   never itself hidden pre-auth) doesn't leak through — but nests its
   own copy of the ambient glow/grid treatment (same classes the main
   shell and Public kiosk hero use) so it isn't a flat, bare screen. ── */
/* #register-workshop-overlay shares this rule verbatim — it's toggled
   with #login-overlay (same full-screen tier, see openRegisterWorkshopModal()
   in app.js), not layered on top of it, so it needs the identical
   fixed/centered/full-bleed treatment. A real bug once, fixed here: this
   new id originally had NO CSS at all (a fresh id, not #login-overlay's),
   so it rendered as a small, left-aligned, normal-document-flow card with
   the always-in-the-DOM app shell showing through below it instead of a
   real full-screen overlay. overflow-y:auto added since the registration
   form is taller than the login form and can exceed a short viewport. */
#login-overlay, #register-workshop-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 26px;
  padding: 20px;
  background: var(--bg);
  overflow-y: auto;
}

.login-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.login-brand-mark {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  font-size: 26px;
  box-shadow: 0 8px 28px var(--accent-glow);
}

.login-brand-name {
  font-family: var(--font-head);
  font-size: 27px;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: var(--text);
}
.login-brand-name strong { color: var(--accent); font-weight: 800; }

.login-value-prop {
  font-size: 13px;
  color: var(--text-dim);
  text-align: center;
  line-height: 1.4;
  white-space: nowrap;
}

.oauth-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 14px 0;
  font-size: 11px;
  color: var(--text-faint);
  text-align: center;
}
.oauth-divider::before,
.oauth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

.login-card {
  width: min(380px, 100%);
}

.login-error {
  margin-top: 10px;
  font-size: 13px;
  color: var(--danger);
}

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9998;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.6);
  padding: 20px;
}

/* ── Popup dialogs — real desktop width, no forced narrow single-column
   stack, per explicit direction to match the workshop registration
   dialog's own layout (a wide card + its own max-height/overflow safety
   net) rather than the old plain .login-card default (380px, borrowed
   from the login form's own 2-field width, which every settings/edit
   dialog inherited regardless of how many fields it actually held).
   Scoped to `.modal-overlay .login-card` specifically — #login-overlay/
   #register-workshop-overlay aren't `.modal-overlay` elements, so the
   sign-in form itself is untouched.
   The max-height + overflow-y:auto pairing is not decoration — without
   it, a card taller than the viewport has no way to reach its own
   bottom buttons at all (`.modal-overlay` centers via flex with no
   overflow handling of its own, so a too-tall child simply overflows
   off-screen unreachably). This is the exact bug the registration
   dialog's own inline override was already written to avoid; every
   other modal had it too, just less visibly since most were short
   enough not to trigger it. ── */
/* max-height/overflow live on the card itself (flex column) so only the
   body scrolls — the title row and its close button stay pinned in view
   the whole time, instead of scrolling out of reach the way a plain
   overflow-y:auto on the whole card would (that was the first version of
   this fix; scrolling down to a long form used to carry the header, and
   the × with it, off the top of the dialog entirely). */
.modal-overlay .card {
  position: relative;
  display: flex;
  flex-direction: column;
  max-height: 92vh;
  overflow: hidden;
}
.modal-overlay .login-card {
  width: min(680px, 94vw);
}
.modal-overlay .card-head {
  padding-right: 52px;
  flex-shrink: 0;
}
.modal-overlay .card-body {
  overflow-y: auto;
}

/* Close (×) button pinned to the dialog's own top-right corner — added
   so leaving a dialog never depends on scrolling down to find a Cancel/
   Close button first, independent of whatever that dialog's own bottom
   button row already does (this is purely a second, always-reachable
   way out, not a replacement for it). */
.modal-close-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--text-dim);
  cursor: pointer;
  z-index: 5;
  transition: all 0.15s;
}
.modal-close-btn:hover {
  background: var(--surface-3);
  color: var(--text);
  border-color: var(--border-hi);
}
.modal-close-btn .icon { width: 15px; height: 15px; }

/* ── Landing page (estigator.com's default, unauthenticated view) ─────────
   Same "always in the DOM, sits above .app-shell" pattern #login-overlay
   already uses — z-index 9000, deliberately below both #login-overlay
   (9999) and .modal-overlay (9998) so a future modal opened from this
   page (there isn't one today, but nothing here should assume that
   stays true forever) would still layer correctly on top. ── */
#landing-page {
  position: fixed;
  inset: 0;
  z-index: 9000;
  overflow-y: auto;
  background: var(--bg);
}

/* Photo band wrapping nav + hero only — same "real photo behind the
   headline, confined to the hero, everything below stays on the flat
   surface" technique customer-portal-web's own landing hero already
   uses (see CLAUDE.md's "Landing hero" section), ported to this app's
   dark/orange theme instead of that one's navy. .landing-nav/.landing-hero
   keep the z-index:1 they already had — that's what lifts them, and the
   band itself, above the page-level fixed .bg-glow/.bg-grid layers (z-index
   0) sitting underneath everything. Internally the photo sits at z-index 0
   and the tint scrim at z-index 1, both *below* nav/hero's z-index 1... */
.landing-hero-band {
  position: relative;
  z-index: 1;
  overflow: hidden;
}

.hero-photo {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: url('marketing/hero-collision-cc0.jpg');
  background-size: cover;
  background-position: center 38%;
  opacity: 0.5;
}

/* Directional scrim, not a flat tint — darkest at the very top (behind
   the nav bar, which has no button/pill backdrop of its own to lean on)
   and fading to fully var(--bg) by the band's bottom edge, so the seam
   into .landing-stats below (flat var(--bg), untouched) is invisible. */
.hero-photo-tint {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    linear-gradient(180deg, rgba(11,12,15,0.78) 0%, rgba(11,12,15,0.55) 38%, rgba(11,12,15,0.82) 78%, var(--bg) 100%);
}

.landing-hero-band .landing-nav,
.landing-hero-band .landing-hero { position: relative; z-index: 1; }

.landing-eyebrow,
.landing-headline,
.landing-subhead {
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.55);
}

/* Grid, not flex space-between -- with 3 flex children, space-between only
   guarantees equal gaps on either side of the middle item, not that the
   middle item's own center lands on the container's true center. The
   brand logo and the Log In button are different widths, so the nav
   links ended up visibly off-axis from the hero content below (which
   centers via a genuine margin:0 auto column) -- a real, noticeable
   misalignment between the nav row and the eyebrow/headline under it.
   1fr auto 1fr guarantees the middle column is always centered on the
   container regardless of how wide the two side items are. */
.landing-nav {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  padding: 20px clamp(20px, 5vw, 64px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.landing-nav > .landing-brand { justify-self: start; }
.landing-nav > .landing-nav-links { justify-self: center; }
.landing-nav > .btn { justify-self: end; }

.landing-brand { display: flex; align-items: center; gap: 12px; }

/* .brand-mark itself is only sized by the `header .brand-mark` rule above
   -- #landing-brand-mark sits in .landing-nav, outside any <header>, so it
   inherited no width/height at all. Invisible with the default <i> icon
   (which sizes itself), but once applyBranding() swaps in a real <img
   style="width:100%;height:100%">, an unconstrained parent lets the image
   render at its natural intrinsic size -- this is what made a custom logo
   blow up to fill the whole landing page instead of sitting in a badge. */
.landing-nav .brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--on-accent);
  font-weight: 700;
  font-size: 17px;
  box-shadow: 0 4px 16px var(--accent-glow);
  flex-shrink: 0;
  overflow: hidden;
}

.landing-brand-name {
  font-family: var(--font-head);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: #fff;
}
.landing-brand-name strong { color: var(--accent-2); font-weight: 800; }

.landing-nav-links {
  display: flex;
  gap: 28px;
  font-size: 13px;
  font-weight: 500;
  /* Sits over the dark hero photo band, independent of the page's own
     light theme below it — literal light values, not var(--text-dim). */
  color: rgba(255, 255, 255, 0.78);
}
.landing-nav-links a { color: inherit; text-decoration: none; transition: color 0.15s var(--ease); }
.landing-nav-links a:hover { color: #fff; }

@media (max-width: 720px) {
  .landing-nav-links { display: none; }
}

.landing-hero {
  position: relative;
  z-index: 1;
  max-width: 820px;
  margin: 0 auto;
  padding: clamp(56px, 10vw, 110px) 24px clamp(40px, 6vw, 64px);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.landing-eyebrow {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 1.2px;
  color: #6ee7db;
  /* A dark teal (var(--accent-2)) directly over the hero photo had no
     reliable contrast -- the photo's own bright highlights (windshield
     glass, chrome) sit right behind this text and the gradient overlay
     is weakest at this exact spot. A translucent pill guarantees a
     consistent dark backdrop regardless of what's in the photo there,
     plus a lighter mint text color instead of the brand's darker teal. */
  background: rgba(10, 14, 13, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.14);
  padding: 5px 12px;
  border-radius: 999px;
  display: inline-block;
}

.landing-headline {
  font-family: var(--font-head);
  font-size: clamp(30px, 5.2vw, 52px);
  line-height: 1.12;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: #fff;
  text-wrap: balance;
}

.landing-subhead {
  font-size: clamp(14.5px, 1.6vw, 16.5px);
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.82);
  max-width: 620px;
}

.landing-cta-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 6px;
}

.btn-lg { padding: 14px 26px; font-size: 14.5px; border-radius: var(--radius); }

.landing-stats {
  position: relative;
  z-index: 1;
  max-width: 960px;
  margin: 0 auto;
  padding: 0 24px 64px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  text-align: center;
}

.landing-stat-num {
  font-family: var(--font-head);
  font-size: 30px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.landing-stat-label {
  margin-top: 6px;
  font-size: 12px;
  line-height: 1.4;
  color: var(--text-dim);
}

@media (max-width: 640px) {
  .landing-stats { grid-template-columns: repeat(2, 1fr); row-gap: 28px; }
}

.landing-section-title {
  /* Was --font-head (Big Shoulders Display) — condensed at the low end
     of this clamp's range, same narrow/cramped issue found and fixed on
     the admin dashboard's own small headings (see .dash-card-title's
     comment). Normal-width UI font + heavier weight instead. */
  font-family: var(--font-ui);
  font-size: clamp(21px, 3vw, 28px);
  font-weight: 700;
  letter-spacing: -0.2px;
  color: var(--text);
  text-align: center;
  max-width: 640px;
  margin: 0 auto 36px;
}

.landing-features, .landing-how, .landing-pricing, .landing-faq {
  position: relative;
  z-index: 1;
  max-width: 1080px;
  margin: 0 auto;
  padding: 56px 24px;
}

.landing-faq-list {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.landing-faq-list details {
  background: var(--surface, #1a1a1a);
  border: 1px solid var(--border, #333);
  border-radius: 10px;
  padding: 14px 18px;
}

.landing-faq-list summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--text);
  list-style: none;
}

.landing-faq-list summary::-webkit-details-marker { display: none; }

.landing-faq-list summary::after {
  content: "+";
  float: right;
  color: var(--text-faint);
}

.landing-faq-list details[open] summary::after {
  content: "–";
}

.landing-faq-more {
  text-align: center;
  margin: 20px 0 0;
}

.landing-faq-list p {
  margin: 10px 0 0;
  color: var(--text-dim);
  font-size: 14.5px;
  line-height: 1.6;
}

.landing-pricing-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
  max-width: 640px;
  margin: 0 auto;
}

@media (max-width: 600px) {
  .landing-pricing-grid { grid-template-columns: 1fr; }
}

.landing-pricing-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 26px 22px;
  text-align: center;
  transition: border-color 0.2s var(--ease), transform 0.2s var(--ease);
}
.landing-pricing-card:hover {
  border-color: var(--border-hi);
  transform: translateY(-2px);
}

/* Subscription is the higher-commitment plan — a subtle accent border,
   not a separate layout, is enough to read as "the other option" next
   to the per-estimate card without implying it's the recommended one
   (this app has no actual "best value" claim to make either way). */
.landing-pricing-featured {
  border-color: rgba(var(--accent-rgb), 0.4);
}

.landing-pricing-card h3 {
  /* Was --font-head + var(--text-dim) — condensed font at a gray on a
     white card is exactly the "narrow + gray, hard to read" combination
     reported elsewhere in the app; this is the plan's actual title, not
     a de-emphasized sublabel, so it should read at full contrast. */
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin: 0 0 10px;
}

.landing-pricing-amount {
  font-family: var(--font-head);
  font-size: clamp(26px, 4vw, 34px);
  font-weight: 700;
  color: var(--text);
  margin-bottom: 10px;
}

.landing-pricing-period {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-dim);
  margin-left: 3px;
}

.landing-pricing-card p {
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--text-dim);
  margin: 0;
}

.landing-pricing-note {
  text-align: center;
  font-size: 12px;
  color: var(--text-faint);
  margin: 22px 0 0;
}

.landing-feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

@media (max-width: 900px) {
  .landing-feature-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .landing-feature-grid { grid-template-columns: 1fr; }
}

.landing-feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px 20px;
  transition: border-color 0.2s var(--ease), transform 0.2s var(--ease);
}
.landing-feature-card:hover {
  border-color: var(--border-hi);
  transform: translateY(-2px);
}

.landing-feature-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 19px;
  background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.16), rgba(var(--info-rgb), 0.1));
  margin-bottom: 12px;
}

.landing-feature-card h3 {
  font-family: var(--font-ui);
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 6px;
}

.landing-feature-card p {
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--text-dim);
  margin: 0;
}

.landing-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

@media (max-width: 760px) {
  .landing-steps { grid-template-columns: repeat(2, 1fr); }
}

.landing-step { text-align: center; }

.landing-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 13px;
  margin-bottom: 10px;
}

.landing-step h4 {
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 4px;
}

.landing-step p {
  font-size: 12px;
  line-height: 1.5;
  color: var(--text-dim);
  margin: 0;
}

.landing-footer {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: 1080px;
  margin: 0 auto;
  padding: 24px 24px 40px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  /* Was --text-faint (#7c8891 on this page's #eef1ef ground) — under
     4.5:1 contrast for 12px text, fails WCAG AA. --text-dim reads
     comfortably at this size without competing with real headings. */
  color: var(--text-dim);
}

.landing-footer-legal-link {
  color: var(--text-dim);
  text-decoration: underline;
}
.landing-footer-legal-link:hover { color: var(--accent); }

@media (max-width: 520px) {
  .landing-footer { flex-direction: column; text-align: center; }
}

/* ── Replace-photo modals (source picker + crop editor) ───────────────
   3 options side by side now that the dialog itself has real desktop
   width to spend — was a vertical stack sized for the old 380px-wide
   default, which left this dialog with unused width and no reason to
   be taller than one row. Falls back to a stack only if the viewport
   itself is too narrow for 3 real columns. */
.photo-source-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.photo-source-btn {
  flex: 1 1 0;
  min-width: 160px;
  flex-direction: column;
  gap: 8px;
  text-align: center;
  justify-content: center;
  padding: 18px 10px;
}
.photo-source-btn .icon { width: 22px; height: 22px; }

.original-photo-grid {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.original-photo-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  width: 92px;
  padding: 6px;
  background: var(--surface-2, rgba(255, 255, 255, 0.06));
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
}

.original-photo-option:hover {
  border-color: var(--accent);
}

.original-photo-option.current {
  border-color: var(--accent);
  background: rgba(var(--accent-rgb), 0.12);
}

.original-photo-option img {
  width: 64px;
  height: 48px;
  object-fit: cover;
  border-radius: 4px;
  background: var(--surface-2);
}

.original-photo-option span {
  font-size: 10px;
  text-align: center;
}

/* Soft-excluded original photo (see app.js's loadSubmittedPhotos()/
   choosePhotoSourceOriginal() — a customer removed it from AI re-analysis
   via the post-payment regenerate flow, without deleting it). Dimmed +
   tagged, never omitted or disabled — still fully clickable in both the
   read-only gallery (zoom) and the crop-source picker (still valid
   evidence for a manual crop, just not fed to the vision model). */
.original-photo-option.excluded-from-analysis img { opacity: 0.4; filter: grayscale(70%); }
.excluded-badge {
  font-size: 8.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--accent);
  background: rgba(var(--accent-rgb), 0.14);
  border: 1px solid rgba(var(--accent-rgb), 0.35);
  border-radius: 3px;
  padding: 1px 4px;
  text-align: center;
}

.submitted-photos-block { margin-bottom: 14px; }
.submitted-photos-label { font-size: 12px; font-weight: 600; margin-bottom: 6px; color: var(--text-faint); text-transform: uppercase; letter-spacing: 0.03em; }
/* Clickable, unlike .original-photo-option's own default cursor:pointer
   crop-source use — same visual language, distinct purpose (open the
   lightbox, not pick a crop source), so no .current/selected state here. */
.submitted-photos-block .original-photo-option { cursor: zoom-in; }

/* ── Update Photos & Point of Impact panel (loadSubmittedPhotos()'s
   editable branch, app.js) — same .original-photo-option card shape as
   the read-only gallery above, widened slightly for the exclude/include
   button each tile now carries. The tile itself isn't a single click
   target any more (the image zooms, the button toggles), so it drops the
   ancestor rule's cursor:zoom-in in favor of a plain default cursor on
   the card and zoom-in on just the image. ── */
.regen-photo-tile { width: 104px; cursor: default; }
.regen-photo-tile img { cursor: zoom-in; }
.regen-toggle-btn {
  width: 100%;
  font-size: 9.5px;
  padding: 2px 4px;
  min-height: unset;
  line-height: 1.4;
}
.regen-photo-new { border-color: var(--success); background: rgba(47, 174, 91, 0.1); }
.new-photo-badge {
  font-size: 8.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--success);
  background: rgba(47, 174, 91, 0.14);
  border: 1px solid rgba(47, 174, 91, 0.35);
  border-radius: 3px;
  padding: 1px 4px;
  text-align: center;
}
.regen-photo-add {
  justify-content: center;
  border-style: dashed;
  color: var(--text-faint);
  min-height: 92px;
}
.regen-photo-add:hover { border-color: var(--accent); color: var(--accent); }
.regen-add-icon { font-size: 20px; line-height: 1; font-weight: 400; }

.photo-lightbox-card { width: min(920px, 94vw); }
.lightbox-img-wrap {
  width: 100%;
  max-height: 75vh;
  overflow: auto;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  text-align: center;
  cursor: zoom-in;
}
.lightbox-img-wrap.zoomed { cursor: zoom-out; text-align: left; }
#photo-lightbox-img {
  max-width: 100%;
  max-height: 75vh;
  display: inline-block;
  user-select: none;
}
.lightbox-img-wrap.zoomed #photo-lightbox-img { max-height: none; }
.lightbox-controls { flex-wrap: wrap; justify-content: center; }

/* Was reusing .login-card (width: min(380px, 100%)) — its own inline
   max-width:640px override was a no-op (max-width only clamps a width
   down, never expands it past a smaller `width`), so the crop image
   rendered far smaller than the source photo regardless of resolution —
   a real problem when cropping a small part like a door handle. This
   dedicated class gives the crop editor real room to work with. */
.photo-crop-card {
  width: min(920px, 94vw);
}

.photo-crop-canvas-wrap {
  position: relative;
  width: 100%;
  max-height: 75vh;
  overflow: hidden;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  touch-action: none;
  cursor: crosshair;
}

#photo-crop-img {
  display: block;
  width: 100%;
  max-height: 75vh;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
}

.photo-crop-selection {
  position: absolute;
  border: 2px dashed var(--accent);
  background: rgba(var(--accent-rgb), 0.2);
  pointer-events: none;
}
/* ── Production readiness banner (top of every Workshop tab) ── */
.readiness-banner {
  position: sticky;
  top: 0;
  z-index: 500;
  background: #7f1d1d;
  color: #fee2e2;
  padding: 10px 20px;
  font-size: 13px;
  line-height: 1.5;
  border-bottom: 2px solid var(--danger);
}
.readiness-banner strong { color: #fff; }
.readiness-banner ul {
  margin: 4px 0 0;
  padding-left: 18px;
}
.readiness-banner li { margin-bottom: 2px; }
.readiness-banner li.warning { color: #fde68a; }

/* ── Email-verify banner (role='workshop' tenants) — amber, not the
   readiness banner's red: this is a normal onboarding step, not an
   operational fault. Shares .readiness-banner's sticky/z-index/padding
   base via the class list on the element itself. ── */
.email-verify-banner {
  background: #78350f;
  color: #fef3c7;
  border-bottom: 2px solid var(--warning);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.email-verify-banner .btn { flex-shrink: 0; }

/* ── Broadcast banner (urgent/maintenance) — Workshop multi-tenancy
   Phase 4. Blue-ish, distinct from both the readiness banner's red and
   the email-verify banner's amber — this isn't an account or system
   fault, just a heads-up. ── */
.broadcast-banner {
  background: #1e3a5f;
  color: #dbeafe;
  border-bottom: 2px solid var(--info);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.broadcast-banner .btn { flex-shrink: 0; }

/* ── Payment incidents list ── */
.incident-row {
  border: 1px solid var(--border);
  border-left: 4px solid var(--danger);
  border-radius: 6px;
  padding: 10px 14px;
  margin-bottom: 10px;
}
.incident-row.resolved { border-left-color: var(--text-faint); opacity: 0.6; }
.incident-row .incident-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.incident-row .incident-type {
  font-family: monospace;
  font-size: 12px;
  color: var(--text-faint);
}
.incident-row .incident-message { margin: 6px 0; }
.incident-row .incident-detail {
  font-family: monospace;
  font-size: 11px;
  color: var(--text-faint);
  white-space: pre-wrap;
  word-break: break-word;
  background: var(--surface-2);
  padding: 8px;
  border-radius: 4px;
  margin-top: 6px;
  max-height: 200px;
  overflow-y: auto;
}

/* ══════════════════════════════════════════════════════════════════
   Dashboard (admin-only landing tab) — see routers/dashboard.py for
   the backing endpoint. Namespaced dash-* throughout to avoid any
   collision with existing .card/.stat-box/etc, which have their own
   established meaning elsewhere in this file.
   ══════════════════════════════════════════════════════════════════ */
.dash-kpi-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 20px; }
.dash-kpi { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; position: relative; overflow: hidden; }
.dash-kpi .lbl { font-size: 11.5px; color: var(--text-dim); font-weight: 600; letter-spacing: .02em; margin-bottom: 8px; }
.dash-kpi .val { font-family: var(--font-head); font-size: 26px; font-weight: 700; letter-spacing: -.01em; }
.dash-kpi .delta { font-size: 12px; font-weight: 600; margin-top: 4px; display: flex; align-items: center; gap: 4px; }
.dash-kpi .delta.up { color: var(--success); } .dash-kpi .delta.down { color: var(--danger); } .dash-kpi .delta.flat { color: var(--text-dim); }
.dash-kpi.warn { border-color: rgba(251,191,36,.4); background: rgba(251,191,36,.06); }
.dash-kpi.warn .val { color: var(--warning); }

.dash-chart-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 14px; margin-bottom: 14px; }
.dash-row2 { display: grid; grid-template-columns: 1fr 1.4fr; gap: 14px; }
.dash-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 18px 14px; }
.dash-card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; flex-wrap: wrap; gap: 8px; }
.dash-card-title { font-family: var(--font-ui); font-weight: 600; font-size: 15px; }
.dash-card-sub { font-size: 11.5px; color: var(--text-faint); margin-top: 2px; font-weight: 400; }
.dash-seg { display: flex; background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; padding: 2px; }
.dash-seg button { font: 600 11.5px var(--font-ui); color: var(--text-dim); background: transparent; border: none; padding: 5px 11px; border-radius: 6px; cursor: pointer; }
.dash-seg button.on { background: var(--accent); color: var(--bg); }
/* Was #1a1d24 (near-black) — the same old-dark-theme leftover as .toast/
   .save-changes-bar above, which left this chart tooltip's own dark-navy
   text (.dash-tt b/.dash-tt-sub, both var(--text)/var(--text-dim)) all
   but invisible against it. */
.dash-tt { position: absolute; pointer-events: none; background: rgba(255, 255, 255, 0.98); border: 1px solid var(--border-hi); border-radius: 8px; padding: 7px 10px; font-size: 11.5px; box-shadow: 0 8px 24px rgba(20, 32, 42, 0.3); opacity: 0; transition: opacity .1s; z-index: 5; white-space: nowrap; }
.dash-tt b { color: var(--text); font-family: var(--font-head); }
.dash-tt .dash-tt-sub { color: var(--text-dim); }
.dash-bar-rect { transition: opacity .1s; }
.dash-bar-rect:hover { opacity: .75; cursor: pointer; }

.dash-src-wrap { display: flex; flex-direction: column; gap: 12px; margin-top: 4px; }
.dash-src-row { display: flex; align-items: center; gap: 10px; }
.dash-src-label { width: 130px; font-size: 12px; color: var(--text-dim); flex-shrink: 0; }
.dash-src-track { flex: 1; height: 20px; background: var(--surface-2); border-radius: 6px; overflow: hidden; }
.dash-src-fill { height: 100%; border-radius: 6px; display: flex; align-items: center; justify-content: flex-end; padding-right: 8px; }
.dash-src-fill span { font: 700 11px var(--font-ui); color: #0b0c0f; }
.dash-src-count { width: 46px; text-align: right; font: 600 12px var(--font-mono); color: var(--text-dim); }

.dash-activity-list { display: flex; flex-direction: column; gap: 2px; max-height: 320px; overflow-y: auto; }
.dash-activity-item { display: flex; align-items: center; gap: 12px; padding: 10px 4px; border-bottom: 1px solid var(--border); cursor: pointer; }
.dash-activity-item:last-child { border-bottom: none; }
.dash-activity-item:hover { background: var(--surface-2); border-radius: 8px; }
.dash-act-icon { width: 32px; height: 32px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 15px; flex-shrink: 0; }
.dash-act-icon.review { background: rgba(251,191,36,.14); color: var(--warning); }
.dash-act-icon.paid { background: rgba(52,211,153,.14); color: var(--success); }
.dash-act-icon.unpaid { background: rgba(var(--info-rgb),.14); color: var(--info); }
.dash-act-icon.incident { background: rgba(248,113,113,.14); color: var(--danger); }
.dash-act-body { flex: 1; min-width: 0; }
.dash-act-title { font-size: 12.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dash-act-meta { font-size: 11px; color: var(--text-faint); margin-top: 1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dash-act-time { font-size: 11px; color: var(--text-faint); flex-shrink: 0; }
.dash-empty { padding: 20px 8px; text-align: center; color: var(--text-faint); font-size: 12.5px; font-style: italic; }

/* ── Workshop multi-tenancy Phase 1 — registration link, "My Workshop"
   modal (branding/billing/subscription), and the pay-per-estimate
   checkout modal. ── */

.hint {
  font-size: 12px;
  line-height: 1.5;
  color: var(--text-faint);
}

.login-alt-action {
  margin-top: 14px;
  text-align: center;
  font-size: 12.5px;
  color: var(--text-faint);
}
.login-alt-action a { color: var(--accent); font-weight: 600; }

.landing-footer-actions {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}
@media (max-width: 520px) {
  .landing-footer-actions { justify-content: center; }
}

.wk-section-title {
  font: 700 12px var(--font-ui, inherit);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--text-dim);
  margin: 18px 0 8px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
.wk-section-title:first-of-type { margin-top: 0; padding-top: 0; border-top: none; }

.wk-logo-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.wk-logo-preview {
  width: 56px;
  height: 56px;
  border-radius: 8px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}
.wk-logo-preview img { max-width: 100%; max-height: 100%; }
.wk-logo-preview #wk-logo-preview-empty { font-size: 10px; color: var(--text-faint); }
.wk-logo-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.wk-logo-actions input[type="file"] { font-size: 11px; max-width: 220px; }

.wk-sub-block { }
.wk-sub-status {
  font-size: 12.5px;
  color: var(--text-dim);
  line-height: 1.5;
  margin-bottom: 10px;
}

.wk-pay-method-toggle {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}
.wk-pay-method-toggle .btn.active {
  background: var(--accent);
  color: #0b0c0f;
  border-color: var(--accent);
}

/* ══════════════════════════════════════════════════════════════════
   New Estimate wizard — replaces the flat New-Estimate accordion as
   the default create flow (laptop/tablet-landscape and up only, see
   the @media block at the end of this section — the phone experience
   is untouched, still the accordion, per this redesign's own explicit
   scope). See tmp/estimatix-workbench-redesign-spec.md.

   Icons throughout this section are the hand-authored <symbol> sprite
   defined once near the top of index.html (#wiz-icon-defs) — no icon
   font/library, matching this app's own existing favicon convention
   (a hand-drawn inline SVG, not an imported glyph). ────────────────── */

.wiz-icon {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 1.7;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  display: block;
  flex: none;
}

.wiz-icon-sm { width: 13px; height: 13px; }

#wiz-root { display: none; }
#wiz-root.wiz-visible { display: block; }

/* Real buttons, not text links — a plain underlined link read as too easy
   to miss (see wiz-change-mode-btn's own comment below), and "Switch to
   Full Form" got upgraded alongside it for a consistent widget, not two
   different affordances doing the same kind of job. Space-between spreads
   them to opposite edges of the card, so "Change Estimate Type" — the one
   that matters most for discoverability — sits on the LEFT, the first
   thing read, rather than buried next to its quieter sibling on the right. */
.wiz-escape-hatch {
  margin: 0 0 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.wiz-escape-hatch-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* The one simple way back to the 4-option mode-select screen from ANY
   wizard step, not just the first one (the header's own back chevron only
   reaches it from step 1 — a technician several steps in otherwise has no
   direct path back short of clicking Back repeatedly, which real feedback
   found genuinely confusing). Accent-tinted so it reads as the more
   important of the two escape hatches, unlike the deliberately plain
   "Switch to Full Form" button next to it — discoverability is the whole
   point here. */
.wiz-change-mode-btn {
  color: var(--accent);
  border-color: var(--accent);
}
.wiz-change-mode-btn:hover:not(:disabled) {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--surface-3);
}

/* Genuinely destructive (wipes every field, photo, and line item entered
   so far — see clearWorkbenchForm()'s own confirm() guard) — a subtle
   danger tint at rest, same red-family treatment as .icon-btn.danger,
   so it doesn't read as just another neutral navigation action sitting
   next to "Change Estimate Type". */
.wiz-clear-btn {
  color: var(--danger);
  border-color: rgba(var(--danger-rgb), 0.35);
}
.wiz-clear-btn:hover:not(:disabled) {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, var(--danger), #ef4444);
}

/* ── Step 0: mode select — no stepper, the literal first decision ── */
.wiz-mode-select {
  max-width: 640px;
  margin: 36px auto;
  text-align: center;
}
.wiz-mode-title {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 30px;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 4px;
}
.wiz-mode-subtitle {
  font-size: 13.5px;
  color: var(--text-dim);
  margin-bottom: 26px;
}
.wiz-mode-pills {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.wiz-mode-pill {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 18px 22px;
  border-radius: var(--radius);
  border: 1.5px solid var(--border);
  background: var(--surface);
  font-family: var(--font-ui);
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: all 0.15s var(--ease);
}
.wiz-mode-pill .wiz-icon { width: 24px; height: 24px; color: var(--accent); }
.wiz-mode-pill:hover {
  border-color: var(--accent);
  box-shadow: 0 6px 20px -8px var(--accent-glow);
  transform: translateY(-1px);
}
.wiz-mode-pill-sub {
  display: block;
  font-size: 12px;
  font-weight: 400;
  color: var(--text-faint);
  margin-top: 2px;
}

/* ── Stepper ─────────────────────────────────────────────────────── */
.wiz-stepper {
  margin: 0 0 14px;
  padding: 4px 4px 0;
}
.wiz-stepper-full {
  display: flex;
  align-items: flex-start;
  position: relative;
}
.wiz-stepper-track {
  position: absolute;
  top: 19px;
  left: calc(100% / 12);
  right: calc(100% / 12);
  height: 2px;
  background: var(--border);
  z-index: 0;
}
.wiz-stepper-track-fill {
  height: 100%;
  background: var(--accent);
  transition: width 0.25s var(--ease);
}
.wiz-step-node {
  flex: 1;
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.wiz-step-node-circle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  border: 1.5px solid var(--border);
  color: var(--text-faint);
  transition: all 0.15s var(--ease);
}
.wiz-step-node[data-state="done"] .wiz-step-node-circle,
.wiz-step-node[data-state="current"] .wiz-step-node-circle {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.wiz-step-node-label {
  font-size: 11px;
  color: var(--text-faint);
  font-weight: 500;
  text-align: center;
}
.wiz-step-node[data-state="current"] .wiz-step-node-label {
  color: var(--text);
  font-weight: 700;
}
.wiz-stepper-compact {
  display: none;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text-dim);
  font-weight: 600;
  padding: 6px 0 2px;
}

/* ── Wizard card: header band + body + footer — one shared shell,
   step content swaps underneath (see spec §11 item 2). Originally a
   fixed ~680px reading column ("extra laptop width buys margin, not
   more panels") — reversed per explicit direction: Dashboard/Search/
   Settings all use the shell's full width, and next to them this read
   as congested rather than deliberately calm. Now spans the same width
   those three do; .form-grid's auto-fit (see Forms above) is what
   actually spreads existing field rows into the freed space rather than
   just enlarging empty margin. ── */
.wiz-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  /* Not overflow:hidden — it clipped absolutely-positioned dropdowns
     (Make/Model/Color suggestion lists) at the card's bottom edge. The
     header band, the only child with its own background, rounds its own
     top corners instead. */
  min-width: 0;
}

/* ── 2-column split: form (left, 1fr) + sticky live-summary rail
   (right, fixed) — same grid shape as .wb-est-layout/.wb-est-rail
   (Cost Estimate view), reused deliberately rather than inventing a
   second pattern for the identical "what to do with extra desktop
   width" question. Collapses to one column at the same breakpoint. ── */
.wiz-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 22px;
  align-items: start;
}
.wiz-rail {
  position: sticky;
  top: 76px;
  align-self: start;
  min-width: 0;
}
.wiz-rail .card-body { padding: 6px 16px 8px; }
@media (max-width: 1100px) {
  .wiz-layout { grid-template-columns: 1fr; }
  .wiz-rail { position: static; }
}
.wiz-step-header {
  border-radius: var(--radius) var(--radius) 0 0;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 22px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}
.wiz-back-circle {
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s var(--ease);
}
.wiz-back-circle:hover:not(:disabled) { border-color: var(--border-hi); color: var(--text); }
.wiz-back-circle:disabled { opacity: 0.35; cursor: not-allowed; }
.wiz-header-icon { color: var(--accent); width: 20px; height: 20px; }
.wiz-step-title {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  color: var(--text);
}

.wiz-step-body-wrap { position: relative; }
.wiz-step-body { display: none; padding: 22px; }
.wiz-step-body.active { display: block; }
.wiz-step-intro {
  font-size: 13.5px;
  color: var(--text-dim);
  margin-bottom: 18px;
}

.wiz-step-footer {
  padding: 6px 22px 18px;
  border-top: 1px solid var(--border);
}
.wiz-skip-row {
  text-align: right;
  padding: 12px 0 0;
  font-size: 12.5px;
}
.wiz-skip-row a { color: var(--accent); font-weight: 600; text-decoration: none; cursor: pointer; }
.wiz-skip-row a:hover { text-decoration: underline; }
.wiz-footer-btns {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 12px;
}
.wiz-autosave-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-size: 11.5px;
  color: var(--text-faint);
  margin-top: 12px;
}

/* ── Reusable question block (Safety's two Yes/No/Not-sure questions,
   and anywhere else a labeled 3-choice question is needed) ────────── */
.wiz-question-block { margin-bottom: 24px; }
.wiz-question-block:last-child { margin-bottom: 0; }
.wiz-question-label { font-weight: 600; font-size: 14px; color: var(--text); margin-bottom: 2px; }
.wiz-question-hint { font-size: 12px; color: var(--text-faint); margin-bottom: 10px; }
.wiz-choice-row { display: flex; gap: 10px; }
.wiz-choice-btn {
  flex: 1;
  padding: 12px 10px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  background: var(--surface);
  font-family: var(--font-ui);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  transition: all 0.15s var(--ease);
}
.wiz-choice-btn:hover:not(.active) { border-color: var(--border-hi); }
.wiz-choice-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.wiz-safety-subpanel {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  margin-top: 12px;
}
.wiz-safety-subpanel-label { font-size: 12px; color: var(--text-dim); margin-bottom: 10px; }
.wiz-pos-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.wiz-pos-grid .wiz-pos-full { grid-column: 1 / -1; }
.wiz-pos-btn {
  text-align: left;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  background: var(--surface);
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  transition: all 0.15s var(--ease);
}
.wiz-pos-btn:hover:not(.active) { border-color: var(--border-hi); }
.wiz-pos-btn.active { background: var(--accent); border-color: var(--accent); color: #fff; }

/* Point of Impact — the V1 12-position clock wheel that used to live here
   (car-silhouette SVG, numbered .poi-dot buttons, .wiz-poi-selected list)
   has been retired — see index.html's #wiz-body-impact comment. The V3.2
   diagram's own CSS (.poi-diagram*, .poi-offwheel-row, .poi-summary-chip,
   etc.) lives further down this file, in the "Point of Impact Interactive
   Vehicle Selector (V3.2)" block. */

/* ── Photo tagging — per-photo Point of Impact tags, matching the
   self-service wizard's own design (customer-portal-web's tagDialogOpen/
   photoTagQueue): a step-through modal, auto-opened right after new
   photos are added, one photo at a time. This pill is now the ONLY
   angle/tag control on a thumbnail (the old separate per-thumbnail
   <select> was removed — it and this pill were showing two
   independently-set, occasionally-disagreeing hints for the same photo)
   — always present, opening/reopening the dialog either way; .untagged
   is a distinct, more muted state for "nothing set yet" vs. the accent
   look once real tags exist. ── */
.photo-tag-btn {
  width: 100%;
  margin-top: 4px;
  font-size: 9.5px;
  font-weight: 600;
  padding: 3px 5px;
  border-radius: 6px;
  border: 1px solid var(--accent);
  background: var(--accent-glow);
  color: var(--accent);
  cursor: pointer;
  font-family: var(--font-ui);
}
.photo-tag-btn:hover { border-color: var(--border-hi); }
.photo-tag-btn.untagged {
  border: 1px dashed var(--border-hi);
  background: var(--surface-2);
  color: var(--text-faint);
}
.photo-tag-btn.untagged:hover { color: var(--text-dim); border-color: var(--accent); }
/* Inline angle-correction control on an already-persisted original photo
   tile (retagOriginalPhoto()) — a real <select> rather than the
   .photo-tag-btn pill above, since this edits a real stored VehicleZone
   value directly (no multi-step clock-position dialog needed). */
.original-photo-angle-select {
  width: 100%;
  margin-top: 4px;
  font-size: 9.5px;
  font-weight: 600;
  padding: 2px 4px;
  border-radius: 6px;
  border: 1px solid var(--border-hi);
  background: var(--surface-2);
  color: var(--text-dim);
  font-family: var(--font-ui);
}
.original-photo-angle-select:hover { border-color: var(--accent); }
/* "Add more" tile — sits in the thumbnail flow itself once at least one
   photo already exists, an explicit hint (matching the self-service
   wizard's own .dz-thumb-add) rather than relying on the dropzone box
   above, which the thumbnail grid otherwise visually buries. */
.preview-item-add {
  width: 94px;
  height: 72px;
  border-radius: 9px;
  border: 1.5px dashed var(--border-hi);
  background: var(--surface-2);
  color: var(--text-dim);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font-ui);
}
.preview-item-add:hover { border-color: var(--accent); color: var(--accent); }
.preview-item-add-icon { font-size: 22px; line-height: 1; font-weight: 400; }
.photo-tag-modal-preview {
  display: block;
  width: 100%;
  max-height: 260px;
  object-fit: contain;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  border: 1px solid var(--border);
}
.photo-tag-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.photo-tag-chip {
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-dim);
  cursor: pointer;
  font-family: var(--font-ui);
  white-space: nowrap;
}
.photo-tag-chip:hover:not(.active) { border-color: var(--border-hi); color: var(--text); }
.photo-tag-chip.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.photo-tag-chip-overview { border-style: dashed; }
.photo-tag-modal-skip-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
}
.photo-tag-modal-skip-row button {
  background: none;
  border: none;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-faint);
  cursor: pointer;
  font-family: var(--font-ui);
  padding: 2px 0;
}
.photo-tag-modal-skip-row button:hover { color: var(--text-dim); text-decoration: underline; }
.photo-tag-modal-count { font-size: 10.5px; color: var(--text-faint); margin-top: 6px; text-align: center; }

/* ── Preview thumbnails (intake, not-yet-submitted) — click to zoom via
   the same shared lightbox #photo-lightbox-modal already used for
   already-submitted photos (openPreviewLightbox(), app.js). ── */
.preview-item img { cursor: zoom-in; }

/* ── Vehicle & Location step: VIN decode banner + collapsed Y/M/M/T,
   and the Location mini-section at the foot ────────────────────────── */
/* Capped, not full-width — a VIN is a fixed 17 characters, stretching
   its input across the whole (now much wider) card looked exactly as
   odd as a lone "Gray" filling a 1400px box; see .form-grid's own
   comment above for the same reasoning applied to grid-based fields. */
.wiz-vin-row { display: flex; gap: 10px; align-items: flex-end; max-width: 520px; }
.wiz-vin-row > div { flex: 1; }
/* .btn-sm has no fixed height of its own (padding + line-height only),
   which left it visibly shorter than the 40px input beside it — pin it
   to match exactly, same box-sizing:border-box every input already uses. */
#btn-scan-vin { height: 40px; flex: none; }
#wiz-zip-input { max-width: 200px; }
.wiz-decode-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(47, 125, 79, 0.1);
  border: 1px solid rgba(47, 125, 79, 0.35);
  color: var(--success);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 500;
  margin-top: 12px;
}
.wiz-decode-banner .wiz-icon { color: var(--success); }
.wiz-decode-banner-edit {
  margin-left: auto;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  cursor: pointer;
  background: none;
  border: none;
  font-family: var(--font-ui);
}
.wiz-ymmt-block { margin-top: 14px; }
.wiz-ymmt-block.wiz-collapsed { display: none; }
.wiz-location-subsection {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.wiz-location-heading {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-dim);
  margin-bottom: 10px;
}
.wiz-location-heading .wiz-icon { width: 14px; height: 14px; color: var(--accent); }

/* ── Claim step: two primary tabs (Claim details / People), People's
   own secondary pill-tab row (Adjuster / Owner contact / Vehicle owner
   / Appraiser) — plus Fault codes / Notes as two more primary tabs
   (folded in rather than separate top-level wizard steps, so the
   6-node stepper above never needs a 7th/8th icon). ────────────────── */
.wiz-tabs {
  display: flex;
  gap: 22px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 18px;
}
.wiz-tab-btn {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 4px 0 10px;
  font-family: var(--font-ui);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-faint);
  cursor: pointer;
}
.wiz-tab-btn:hover { color: var(--text-dim); }
.wiz-tab-btn.active { color: var(--accent); border-bottom-color: var(--accent); }
.wiz-tab-panel { display: none; }
.wiz-tab-panel.active { display: block; }

.wiz-pill-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.wiz-pill-tab {
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-family: var(--font-ui);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-dim);
  cursor: pointer;
}
.wiz-pill-tab:hover:not(.active) { border-color: var(--border-hi); color: var(--text); }
.wiz-pill-tab.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.wiz-people-panel { display: none; }
.wiz-people-panel.active { display: block; }
/* Only shown in the accordion escape hatch (see #grp-people.wiz-people-flat
   below) — the wizard's own pill-tab row already labels each panel, so
   these stay hidden there to avoid a redundant duplicate label. */
.wiz-people-panel-heading { display: none; font-weight: 600; font-size: 13px; color: var(--text); margin: 14px 0 8px; padding-top: 12px; border-top: 1px solid var(--border); }
.wiz-people-panel-heading:first-child { margin-top: 0; padding-top: 0; border-top: none; }
/* Full-form/accordion view: every People sub-panel visible at once (flat
   scroll, no tabs) — matches "today's screen, kept exactly as-is." Higher
   specificity than .wiz-people-panel.active above, no !important needed. */
#grp-people.wiz-people-flat .wiz-people-panel { display: block; }
#grp-people.wiz-people-flat .wiz-people-panel-heading { display: block; }

/* ── Review step ─────────────────────────────────────────────────── */
.wiz-review-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.wiz-review-row:last-child { border-bottom: none; }
.wiz-review-label {
  flex: 0 0 108px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--text-faint);
  padding-top: 1px;
}
.wiz-review-value { flex: 1; font-size: 13.5px; color: var(--text); }
.wiz-review-value.empty { font-style: italic; color: var(--text-faint); }
.wiz-review-link {
  flex: none;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--accent);
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-ui);
}
.wiz-review-link:hover { text-decoration: underline; }

/* ── Sticky rail rows — same label/value data as .wiz-review-row above
   (wizComputeSummaryRows()), stacked instead of side-by-side since this
   column is much narrower, and the whole row is one button (no separate
   Edit/Add link needed — clicking anything on it jumps to that step). ── */
.wiz-rail-row {
  display: block;
  width: 100%;
  text-align: left;
  padding: 9px 0;
  border-bottom: 1px solid var(--border);
  background: none;
  border-left: none;
  border-right: none;
  border-top: none;
  cursor: pointer;
  font-family: var(--font-ui);
}
.wiz-rail-row:last-child { border-bottom: none; }
.wiz-rail-row:hover .wiz-rail-row-label { color: var(--accent); }
.wiz-rail-row.current { position: relative; }
.wiz-rail-row.current::before {
  content: "";
  position: absolute;
  left: -16px;
  top: 6px;
  bottom: 6px;
  width: 3px;
  border-radius: 2px;
  background: var(--accent);
}
.wiz-rail-row-label {
  display: block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 2px;
}
.wiz-rail-row.current .wiz-rail-row-label { color: var(--accent); }
.wiz-rail-row-value {
  display: block;
  font-size: 13px;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.wiz-rail-row-value.empty { font-style: italic; color: var(--text-faint); }

/* ── Phone breakpoint: this redesign is scoped to tablet-landscape and
   up only (spec §12) — below 768px the wizard never renders at all,
   the existing accordion (#wb-intake-card) stays the only experience,
   exactly as it already behaves today. wizInit() (app.js) checks this
   same 768px threshold once, at Workbench-tab entry, and skips
   populating the wizard step bodies entirely on a narrow viewport —
   this @media rule is the visual backstop for that JS decision, not a
   substitute for it (a field must not live only inside a container
   this rule hides, or it would be unreachable on phone). ────────────── */
@media (max-width: 767px) {
  #wiz-root { display: none !important; }
  #wb-intake-card { display: block !important; }
}

@media (max-width: 1023px) {
  .wiz-stepper-full { display: none; }
  .wiz-stepper-compact { display: block; }
}

/* ── Point of Impact Interactive Vehicle Selector (V3.2) ─────────────────
   Shared with customer-portal-web's poi-selector.component.ts — same
   class names/behavior, ported by hand (see poi-selector-render.js's own
   header). Appended here rather than woven into the wizard-step rules
   above so a future full diff against the Angular component's inline
   styles stays easy. ── */
/* Kills the browser's own default tap-flash rectangle on every tappable
   element here (view tabs, off-wheel chips, and — via inheritance — the
   raw injected SVG paths too), matching customer-portal-web's identical
   fix: the native highlight is sized to a tapped element's bounding box,
   not its visible silhouette, and stacks on top of this component's own
   .poi-selected/:active feedback for no benefit. */
.poi-selector { display: flex; flex-direction: column; gap: 4px; -webkit-tap-highlight-color: transparent; }
.poi-selector-intro { margin: 0 0 4px; font-size: 13px; color: var(--text-dim); line-height: 1.45; }
.poi-view-tabs { display: flex; gap: 4px; margin-bottom: 8px; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.poi-view-tab {
  /* A light tint of --accent-2 (Workshop's own teal, #10756b — not a new
     hue) instead of a neutral gray — same fix made on customer-portal-
     web's identical .poi-view-tab (see its own comment): a plain gray
     pill read as a flat label rather than a tappable button, flagged
     directly on a real screenshot. Tinting unselected tabs toward the
     same color the active tab fills solid with reads as "these are all
     one control, one of them is on," not "one teal button among plain
     gray labels." rgba() literals here (not --surface-2/--text-dim)
     since the tint has to track --accent-2's own hue, not a generic
     neutral. */
  flex: 0 0 auto; padding: 7px 14px; border-radius: 999px; border: 1px solid rgba(16, 117, 107, 0.28);
  background: rgba(16, 117, 107, 0.1); color: var(--accent-2); font-size: 12.5px; font-weight: 600;
  cursor: pointer; transition: background 0.15s var(--ease), color 0.15s var(--ease), border-color 0.15s var(--ease);
}
.poi-view-tab.active { background: var(--accent-2); border-color: var(--accent-2); color: #fff; }
.poi-view-tab:not(.active):hover { background: rgba(16, 117, 107, 0.18); border-color: rgba(16, 117, 107, 0.45); }

/* Edit view only (#regen-poi-diagram — see index.html's own comment on why it's a
   byte-identical copy of #pl-poi-diagram) — the vehicle image only, capped smaller
   on purpose. During generation this diagram IS the primary interaction and needs
   its full size for accurate tapping; in an already-generated estimate it's a
   rarely-touched correction tool, and at full width it dominated the edit screen far
   more than its actual role there. #pl-poi-diagram (generation) is untouched — still
   100% width.
   Deliberately scoped to .poi-diagram only, NOT the whole .poi-selector wrapper — an
   earlier pass capped the whole thing and looked worse, not better: .poi-offwheel-row's
   own border-top (a real full-width divider on every other section of this page)
   shrank down to a short underline in the middle of the card, and the intro text/view
   tabs/off-wheel buttons/selected chips all got squeezed into the same narrow column
   with odd side gutters instead of sitting flush with the rest of the edit view. Only
   the image itself needed to shrink — everything else stays full width, matching. */
#regen-poi-diagram .poi-diagram { max-width: 460px; margin: 0 auto; }

.poi-diagram {
  position: relative; width: 100%; border-radius: 10px; overflow: hidden;
  background: #f4f6f9; touch-action: manipulation;
  border: 1px solid var(--border); box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  /* Suppresses the native mobile tap-flash box on the SVG's own
     data-part-id paths — same fix as customer-portal-web's own
     poi-selector.component.ts, ported here for parity. */
  -webkit-tap-highlight-color: transparent;
}
.poi-diagram-png { display: block; width: 100%; height: auto; pointer-events: none; user-select: none; }
.poi-diagram-svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.poi-diagram-svg svg { display: block; width: 100%; height: 100%; }
.poi-diagram-loading-msg { display: none; }
.poi-diagram.poi-loading .poi-diagram-loading-msg {
  display: flex; position: absolute; inset: 0; align-items: center; justify-content: center;
  font-size: 12.5px; color: var(--text-dim); background: rgba(244,246,249,0.7);
}
/* No V1 wheel left to fall back to on an asset load failure (retired) —
   this inline retry is the only recovery path. Same show/hide idiom as
   .poi-diagram-loading-msg above, gated on .poi-load-error instead. */
.poi-diagram-error-msg { display: none; }
.poi-diagram.poi-load-error .poi-diagram-error-msg {
  display: flex; position: absolute; inset: 0; flex-direction: column; gap: 10px;
  align-items: center; justify-content: center; text-align: center; padding: 0 20px;
  font-size: 12.5px; color: var(--text-dim); background: rgba(244,246,249,0.9);
}
.poi-diagram-retry {
  padding: 7px 16px; border-radius: var(--radius-sm); border: 1.5px solid var(--accent);
  background: var(--accent); color: #fff; font-family: var(--font-ui); font-size: 12.5px;
  font-weight: 600; cursor: pointer;
}

/* Prev/next chevrons — deliberately NOT the flush-top-corner treatment
   customer-portal-web's identical component uses (see that file's own
   comment for why the corner placement was needed there: a real
   live-reported overlap with the front/rear bumper/headlight/taillight
   hit targets on the Left/Right profile views at MOBILE viewport width).
   Workshop's diagram renders at a much larger desktop/tablet size, where
   a small corner tab reads as too far from the vehicle artwork to notice
   at a glance and defeats the whole point of the affordance — flagged
   directly as "useless, not clearly visible" on a real screenshot.
   Vertical-center on each side is the more visible placement here, and
   Workshop's larger rendered size gives enough real clearance beside the
   vehicle silhouette that the mobile-width overlap bug doesn't reproduce
   at this size. Fixed dark circle regardless of app theme, since
   .poi-diagram's own background (#f4f6f9) is fixed light too; z-index
   above .poi-diagram-svg's full-bleed overlay so a chevron in the empty
   margin around the vehicle artwork is never shadowed by an irregular
   part hit-region sitting underneath it. */
.poi-diagram-nav {
  /* Tried enlarging this to 44x44 (Apple HIG / Material Design's minimum
     touch-target size) and re-verified via screenshot across all 5 views
     at Workshop's real rendered width -- the Left/Right profile views
     regressed: a 44px circle at this vertical-center position reached far
     enough inward to visibly overlap the front bumper/headlight hit
     target, the exact bug this component's whole prev/next placement
     history has been fixing. Reverted to the empirically-verified-safe
     32x32 size rather than trade a real overlap bug for a touch-target
     nicety -- a correctly-sized-but-conservative tap target beats a
     technically-larger one that occasionally eats a real tap meant for
     the vehicle artwork underneath it. */
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 5;
  width: 32px; height: 32px; padding: 0; border: none; border-radius: 50%;
  background: rgba(17, 20, 26, 0.5); color: #fff; font-size: 20px; line-height: 1;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  transition: background 0.15s ease;
}
.poi-diagram-nav:hover { background: rgba(17, 20, 26, 0.72); }
.poi-diagram-nav:active { background: rgba(17, 20, 26, 0.85); }
.poi-diagram-nav--prev { left: 6px; }
.poi-diagram-nav--next { right: 6px; }

.poi-diagram-svg path[data-part-id] {
  fill: transparent !important;
  stroke: transparent !important;
  stroke-width: 1.4px;
  stroke-linejoin: round;
  stroke-linecap: round;
  cursor: pointer;
  pointer-events: all;
  transition: fill 0.12s var(--ease), stroke 0.12s var(--ease), filter 0.12s var(--ease);
}
.poi-diagram-svg path[data-part-id].poi-hit-target--small { stroke-width: 7px; }
@media (hover: hover) {
  .poi-diagram-svg path[data-part-id]:hover:not(.poi-selected) {
    fill: var(--accent-2) !important;
    fill-opacity: 0.16 !important;
  }
}
/* Workshop-only departure from customer-portal-web's outline treatment,
   per direct request: no drawn boundary line at all here (any stroke,
   however thin, still reads as a hard drawn edge, and a sub-1px stroke
   width also risks a "dashed"-looking anti-aliasing artifact on some
   displays/zoom levels). Selection is communicated purely by a dark
   edge glow (drop-shadow, which only picks up the shape's own alpha —
   never additive with a stroke here since there isn't one) plus the
   existing fill tint — a darkened silhouette instead of a bordered one. */
.poi-diagram-svg path[data-part-id].poi-selected {
  fill: var(--accent-2) !important;
  fill-opacity: 0.34 !important;
  stroke: transparent !important;
  filter: drop-shadow(0 0 2px rgba(0, 0, 0, 0.55)) drop-shadow(0 0 4px rgba(0, 0, 0, 0.3));
}
.poi-diagram-svg path[data-part-id]:focus {
  outline: none;
}
/* Keyboard focus on an UNselected part has no fill/stroke alpha of its
   own to glow from (base rule above is fully transparent) — same root
   cause already documented for the old stroke-based indicator, still
   true now that stroke is gone entirely. First tried as a dark neutral
   fill + dark glow, same color family as .poi-selected's own dark edge
   — confirmed live that tabbing onto an already-selected (green) part
   was nearly invisible, since a dark glow reads as barely more than the
   selected state's own dark edge already provides. Switched to
   --warning (amber), a color already used elsewhere in this app for
   "pay attention here" and nowhere near the selection teal, so a
   focused part reads as genuinely distinct whether or not it's also
   selected. */
.poi-diagram-svg path[data-part-id]:focus-visible {
  outline: none;
  fill: var(--warning) !important;
  fill-opacity: 0.4 !important;
  stroke: transparent !important;
  filter: drop-shadow(0 0 2.5px var(--warning)) drop-shadow(0 0 5px rgba(169, 118, 31, 0.55));
}
.poi-diagram-svg path[data-part-id].poi-selected:focus-visible {
  fill: var(--accent-2) !important;
  fill-opacity: 0.34 !important;
  /* A glow this size/opacity was chosen deliberately stronger than the
     unselected focus state above — confirmed live that the first,
     matching-strength attempt nearly disappeared against the selected
     fill's own green, which was exactly the "doesn't show properly"
     problem being fixed here. */
  filter: drop-shadow(0 0 3px var(--warning)) drop-shadow(0 0 3px var(--warning)) drop-shadow(0 0 7px rgba(169, 118, 31, 0.7));
}
.poi-debug .poi-diagram-svg path[data-part-id] {
  fill: rgba(255, 0, 170, 0.12) !important;
  stroke: rgba(255, 0, 170, 0.65) !important;
}
.poi-debug .poi-diagram-svg path[data-part-id].poi-hit-target--small {
  stroke: rgba(0, 170, 255, 0.75) !important;
}

.poi-offwheel-row { display: flex; gap: 6px; margin: 8px 0; }
.poi-offwheel-chip {
  /* Same --surface -> --surface-2 fix as .poi-view-tab above, same reason. */
  flex: 1; padding: 8px 6px; border-radius: 8px; border: 1px solid var(--border);
  background: var(--surface-2); color: var(--text-dim); font-size: 12px; font-weight: 600; cursor: pointer;
}
.poi-offwheel-chip.selected { background: var(--accent-2); border-color: var(--accent-2); color: #fff; }

.poi-summary { min-height: 34px; }
.poi-summary-empty { font-size: 12px; color: var(--text-faint); }
.poi-summary-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-faint); margin-bottom: 6px; }
.poi-summary-chips { display: flex; flex-wrap: wrap; gap: 6px; }
/* .selected-tone-chip — the shared "this pill represents something
   currently ON/selected" look (solid accent fill, white text/remove
   button), reused by every plain multi-select chip list in the app
   instead of each one redefining its own colors. .poi-summary-chip is
   this diagram widget's own "Selected (N)" list — it used to be one of
   two independent copies of the same concept that had drifted apart
   (its sibling, the V1 wheel's .wiz-poi-selected-chip, is gone along with
   the rest of V1). Add this class to any future selected-chip markup
   rather than hand-picking colors again. */
.selected-tone-chip,
.poi-summary-chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 6px 5px 10px; border-radius: 999px;
  background: var(--accent); border: 1px solid var(--accent); font-size: 12px; font-weight: 600; color: #fff;
}
.selected-tone-chip button,
.poi-summary-chip button {
  border: none; background: rgba(255, 255, 255, 0.25); color: #fff; cursor: pointer; font-size: 13px;
  line-height: 1; width: 16px; height: 16px; border-radius: 50%; padding: 0;
  display: flex; align-items: center; justify-content: center;
}
.selected-tone-chip button:hover,
.poi-summary-chip button:hover { background: rgba(255, 255, 255, 0.4); }
.poi-clear-all {
  margin-top: 8px; border: none; background: transparent; color: var(--accent-2);
  font-size: 12px; font-weight: 700; cursor: pointer; padding: 4px 0;
}

/* ── Estimate audit (openEstimateAudit, Settings → Estimate Audit Rules) ── */
.audit-card { max-width: 640px; width: 100%; max-height: 90vh; display: flex; flex-direction: column; }
.audit-card .card-body { overflow-y: auto; }
.audit-vehicle { margin-left: auto; padding-right: 32px; text-transform: none; font-weight: 400; }
.audit-running, .audit-clean { text-align: center; padding: 24px 8px; }
.audit-running .spinner { margin: 0 auto 12px; }
.audit-clean .icon { width: 36px; height: 36px; color: var(--success); }
.audit-error { color: var(--danger); font-size: 13px; }
.audit-summary { background: var(--surface-2); border-radius: 10px; padding: 12px 14px; margin-bottom: 14px; }
.audit-summary-total { font-size: 28px; font-weight: 700; color: var(--success); line-height: 1.2; }
.audit-group { border-radius: 10px; margin-bottom: 14px; padding: 10px 12px; border-left: 4px solid var(--success); background: rgba(47, 125, 79, 0.07); }
.audit-group.audit-needs-call { border-left-color: var(--warning); background: rgba(169, 118, 31, 0.08); }
.audit-group-head { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.audit-group-title { font-weight: 700; text-transform: uppercase; font-size: 12px; letter-spacing: 0.03em; }
.audit-group-total { margin-left: auto; font-weight: 700; }
.audit-group-blurb { margin: 4px 0 8px 26px; }
.audit-item { background: var(--surface); border-radius: 8px; padding: 8px 10px; margin-top: 6px; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06); }
.audit-item-main { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.audit-item-main, .audit-group-head, .audit-check { text-transform: none; letter-spacing: normal; }
.audit-item-title { font-weight: 600; font-size: 14px; }
.audit-item-amount { margin-left: auto; font-weight: 600; white-space: nowrap; }
.audit-item-meta { margin: 2px 0 0 26px; }
.audit-item-note { margin: 4px 0 0 26px; font-size: 12px; color: var(--warning); }
.audit-why { margin: 4px 0 0 26px; font-size: 12px; }
.audit-why summary { cursor: pointer; color: var(--accent); font-weight: 600; }
.audit-why p { margin: 4px 0 0; color: var(--text-dim); }
.audit-footer { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--surface-3); background: var(--surface); }
.audit-footer .muted-sm { margin-right: auto; }
.audit-guide { background: var(--surface-2); border-radius: 10px; padding: 10px 14px; margin-bottom: 14px; }
.audit-guide summary { cursor: pointer; font-weight: 600; }
.audit-guide-body { font-size: 13px; line-height: 1.5; }
.audit-guide-body code { background: var(--surface-3); border-radius: 4px; padding: 0 4px; }
.audit-rules-toolbar { display: flex; gap: 8px; align-items: center; margin-bottom: 10px; }
.audit-rules-toolbar input { flex: 1; }
.audit-rules-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.audit-rules-table th, .audit-rules-table td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--surface-3); vertical-align: top; }
.audit-rule-off td { opacity: 0.55; }
.audit-rule-actions { white-space: nowrap; }
.audit-pill { display: inline-block; border-radius: 999px; padding: 2px 10px; font-size: 11px; font-weight: 700; color: #fff; }
.audit-pill-required { background: var(--success); }
.audit-pill-call { background: var(--warning); }
.audit-editor { background: var(--surface-2); border-radius: 10px; padding: 12px 14px; margin-bottom: 14px; }
.audit-editor textarea { width: 100%; }
.audit-checks, .audit-equipment { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 8px 0; }
.audit-equipment { max-height: 150px; overflow-y: auto; }
.audit-check { display: inline-flex; align-items: center; gap: 6px; font-weight: 400; text-transform: none; }
.audit-preview { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 10px 0; }
.audit-preview input { flex: 1; min-width: 220px; }
.audit-preview #ar-preview-out { flex-basis: 100%; }
.audit-editor-actions { display: flex; justify-content: flex-end; gap: 8px; }
@media (max-width: 760px) {
  .audit-rules-table thead { display: none; }
  .audit-rules-table td { display: block; border: 0; padding: 2px 6px; }
  .audit-rules-table tr { display: block; border-bottom: 1px solid var(--surface-3); padding: 6px 0; }
}

/* Known issues (suite: Bayscope recalls, bulletins, special coverage for the VIN). */
.chip-known-issue {
  display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 700;
  padding: 3px 9px; border-radius: 100px; cursor: pointer;
  background: rgba(196, 120, 0, 0.14); color: #8a5300;
}
.ki-meta, .ki-coverage { margin: 0 0 8px; text-transform: none; }
.ki-group { margin: 6px 0; }
.ki-group > summary { cursor: pointer; font-weight: 700; padding: 4px 0; }
.ki-list { list-style: none; margin: 4px 0 0; padding: 0; }
.ki-item { padding: 8px 0; border-top: 1px solid rgba(20, 32, 42, 0.08); }
.ki-item-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 3px; }
.ki-kind { font-weight: 700; font-size: 12px; }
.ki-summary, .ki-remedy { font-size: 12.5px; line-height: 1.45; overflow-wrap: anywhere; }
.ki-remedy { margin-top: 3px; color: #3a4652; }
.ki-flag { font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 100px; background: rgba(20, 32, 42, 0.07); color: #3a4652; }
.ki-flag-danger { background: rgba(179, 64, 47, 0.14); color: #8f2f22; }
.ki-flag-match { background: rgba(196, 120, 0, 0.14); color: #8a5300; }

.ki-item { cursor: pointer; }
.ki-item:not(.open) .ki-summary { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.ki-item:not(.open) .ki-remedy { display: none; }
.ki-item a { cursor: pointer; }

/* Account menu "Screens" row: which look is on, as a small two-part pill */
.user-menu-grow { flex: 1; }
.look-pill { display: inline-flex; padding: 2px; border-radius: 999px; background: var(--surface-2); font-size: 11px; font-weight: 600; }
.look-pill span { padding: 2px 8px; border-radius: 999px; color: var(--text-dim); }
.look-pill span.on { background: var(--accent); color: #fff; box-shadow: 0 1px 3px rgba(0,0,0,0.2); }
/* One-time tip pointing at the Screens switch (same bubble as the help assistant's) */
.screens-tip { width: 250px; }
.screens-tip .btn { margin-top: 10px; }
.pinned-on-screen { position: fixed; right: auto; max-width: calc(100vw - 32px); }
.pinned-on-screen::before { display: none; }
