/* ═══════════════════════════════════════════════════════════════════
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 SelfEstimator'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;

  --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. ── */
.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;
}

.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],
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);
  border-radius: var(--radius-sm);
  color: var(--text-dim);
  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 two-pane layout ──────────────────────────────────
   Main content (Labor/ADAS/Parts/etc, freely scrolls) + a sticky rail
   (bottom-line total, subtotal breakdown, primary actions) — the one
   screen dense enough that the wider desktop shell earns a second
   column, rather than just more margin. Below the breakpoint it
   collapses to a single stacked column, rail un-stuck, same order. */
.wb-est-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 28px;
  align-items: start;
  margin-bottom: 22px;
}
.wb-est-main-card,
.wb-est-rail {
  /* Both sides are full .card elements now (their own card-head/card-body)
     — the grid handles the two-column split, so neither needs the base
     .card's own margin-bottom fighting the grid gap. */
  margin-bottom: 0;
  min-width: 0;
}
.wb-est-rail {
  position: sticky;
  /* header height (60px) + breathing room, shifted down whenever either
     banner is also showing — same vars header itself reads, so the 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;
}
.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; }

@media (max-width: 1100px) {
  .wb-est-layout { grid-template-columns: 1fr; }
  .wb-est-rail { position: static; }
}

.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);
  color: var(--warning);
  font-size: 11.5px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 100px;
}

.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);
  color: #a78bfa;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 100px;
  text-transform: capitalize;
}

/* ── 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;
}

.cost-line-table .subtotal td {
  background: rgba(var(--accent-rgb), 0.06);
  font-weight: 600;
  color: var(--text);
}

.cost-line-table .grand-total td {
  background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.18), rgba(var(--info-rgb), 0.1));
  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);
}

/* ── 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;
}

/* #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.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; }

/* ── 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);
}

.num-strong {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.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: 140px 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-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);
  background: var(--surface-2);
  cursor: pointer;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
  transition: all 0.15s;
}

.icon-btn:hover {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  border-color: transparent;
}

.icon-btn.danger:hover {
  background: linear-gradient(135deg, var(--danger), #ef4444);
}

.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;
}

/* 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;
}

.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-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;
  color: var(--text);
}

.obd-field-total {
  font-family: var(--font-head);
  font-size: 14px;
  font-weight: 700;
  color: var(--accent-2);
  min-width: 85px;
}

/* 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-workshop.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);
}

.landing-nav {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px clamp(20px, 5vw, 64px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.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: var(--accent-2);
}

.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 {
  position: relative;
  z-index: 1;
  max-width: 1080px;
  margin: 0 auto;
  padding: 56px 24px;
}

.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);
}

@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; }

.wiz-escape-hatch {
  margin: 0 0 10px;
  text-align: right;
  font-size: 12.5px;
}
.wiz-escape-hatch a {
  color: var(--text-faint);
  text-decoration: underline;
  cursor: pointer;
}
.wiz-escape-hatch a:hover { color: var(--accent); }

/* ── 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);
  overflow: hidden;
  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 {
  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 — clock-position wheel. Same underlying data/
   toggle logic as the pre-existing flat .poi-chip pills (POI_SELECTED,
   togglePOI() — see app.js), which stay in place, unused visually,
   inside the accordion escape-hatch; this is the on-brand visual port
   the accordion's own CSS comment already flagged as deferred. ────── */
.poi-wheel-front-label {
  text-align: center;
  font-size: 11px;
  letter-spacing: 1.6px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 6px;
}
.poi-wheel-wrap { position: relative; width: 260px; height: 260px; margin: 6px auto 0; }
.poi-wheel-car {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 46px;
  height: 96px;
  background: var(--surface-3);
  border: 1px solid var(--border-hi);
  border-radius: 14px;
}
.poi-wheel-car::before,
.poi-wheel-car::after {
  content: "";
  position: absolute;
  top: 26px;
  width: 6px;
  height: 12px;
  background: var(--border-hi);
  border-radius: 2px;
}
.poi-wheel-car::before { left: -6px; }
.poi-wheel-car::after { right: -6px; }
.poi-dot {
  position: absolute;
  width: 38px;
  height: 38px;
  margin-left: -19px;
  margin-top: -19px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 12.5px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s var(--ease);
}
.poi-dot:hover:not(.active) { border-color: var(--border-hi); color: var(--text); }
.poi-dot.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.poi-wheel-caption {
  text-align: center;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent);
  margin-top: 14px;
  letter-spacing: 0.2px;
}
.poi-offwheel-row { display: flex; gap: 10px; margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--border); }
.poi-off-btn {
  flex: 1;
  padding: 11px 10px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  background: var(--surface);
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dim);
  cursor: pointer;
  transition: all 0.15s var(--ease);
}
.poi-off-btn:hover:not(.active) { border-color: var(--border-hi); color: var(--text); }
.poi-off-btn.active { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ── Impact step: a live, auto-updating list of everything currently
   selected on the wheel/off-wheel row above — the wheel alone only shows
   selection via each dot's own highlight, easy to miss at a glance; this
   makes it an explicit, always-visible summary, with a per-item remove
   (routes straight back through togglePOI, same single source of truth
   as the wheel itself). ── */
.wiz-poi-selected { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--border); }
.wiz-poi-selected-empty { font-size: 12.5px; color: var(--text-faint); }
.wiz-poi-selected-label { font-size: 11px; font-weight: 600; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 8px; }
.wiz-poi-selected-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.wiz-poi-selected-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 6px 5px 10px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
}
.wiz-poi-selected-chip button {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.25);
  color: #fff;
  font-size: 10px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.wiz-poi-selected-chip button:hover { background: rgba(255, 255, 255, 0.4); }

/* ── 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); }
/* "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; }
}
