/* ==========================================================================
   SUNVERRA DESIGN SYSTEM — single source of truth for Admin, Field, AI, CRM,
   reports and customer-facing screens. Screens use these tokens and component
   classes only; no screen defines its own colours.

   Brand colours are sampled from the official logo (public/brand/sunverra-logo.jpg):
     Sunverra Orange  #FD4A02   (mean of the logo's orange pixels)
     Sunverra Black   #000000
   Accessibility (WCAG 2.1, verified by test/unit/theme.test.ts):
     #FD4A02 on white = 3.4:1  → brand accents, icons, indicators, borders, large text only
     white on #D93F00 ≥ 4.5:1  → primary button fill (the "action" orange)
     #B33500 on white ≥ 4.5:1  → orange text/links on light backgrounds
   ========================================================================== */

:root {
  /* ── brand ── */
  --sv-orange: #FD4A02;
  --sv-orange-action: #D93F00;
  --sv-orange-action-hover: #B83500;
  --sv-orange-text: #B33500;
  --sv-orange-tint: #FFF1EA;
  --sv-orange-tint-strong: #FFDCCB;
  --sv-black: #000000;

  /* ── neutrals ── */
  --sv-ink: #111111;            /* headings, important text */
  --sv-text: #2B2B2B;           /* body */
  --sv-text-muted: #5E5E5E;     /* secondary (≥ 4.5:1 on white and on --sv-bg) */
  --sv-bg: #F7F7F5;             /* app background */
  --sv-surface: #FFFFFF;        /* cards, forms, tables */
  --sv-surface-sunken: #F1F1EE;
  --sv-border: #E3E3DF;
  --sv-border-strong: #C9C9C3;
  --sv-nav-bg: #111111;         /* admin sidebar */
  --sv-nav-text: #E8E8E6;
  --sv-nav-muted: #A3A3A0;

  /* ── semantic ── */
  --sv-success: #1E7B3C;  --sv-success-bg: #E7F5EC;
  --sv-warning: #8A5A00;  --sv-warning-bg: #FFF4DB;
  --sv-danger:  #B42318;  --sv-danger-bg:  #FDECEA;
  --sv-info:    #1F5A99;  --sv-info-bg:    #E8F0FA;

  /* ── typography ── */
  --sv-font: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, "Noto Sans", Arial, sans-serif;
  --sv-font-mono: ui-monospace, "SF Mono", Consolas, monospace;
  --sv-fs-xs: 0.75rem; --sv-fs-sm: 0.875rem; --sv-fs-md: 1rem; --sv-fs-lg: 1.125rem;
  --sv-fs-xl: 1.375rem; --sv-fs-2xl: 1.75rem;
  --sv-fw-regular: 400; --sv-fw-medium: 500; --sv-fw-semibold: 600; --sv-fw-bold: 700;
  --sv-lh: 1.5;

  /* ── spacing (4px grid) ── */
  --sv-space-1: 4px; --sv-space-2: 8px; --sv-space-3: 12px; --sv-space-4: 16px;
  --sv-space-5: 20px; --sv-space-6: 24px; --sv-space-8: 32px; --sv-space-10: 40px;

  /* ── shape & depth ── */
  --sv-radius-sm: 6px; --sv-radius-md: 10px; --sv-radius-lg: 14px; --sv-radius-pill: 999px;
  --sv-shadow-sm: 0 1px 2px rgba(17, 17, 17, 0.06);
  --sv-shadow-md: 0 4px 14px rgba(17, 17, 17, 0.08);
  --sv-shadow-lg: 0 12px 32px rgba(17, 17, 17, 0.12);
  --sv-focus: 0 0 0 3px rgba(253, 74, 2, 0.35);

  /* ── sizing ── */
  --sv-touch: 48px;             /* minimum touch target in the field app */
  --sv-control-h: 40px;
  --sv-sidebar-w: 248px;
}

/* ── base ── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--sv-font); font-size: var(--sv-fs-md); line-height: var(--sv-lh); color: var(--sv-text); background: var(--sv-bg); }
h1, h2, h3, h4 { color: var(--sv-ink); margin: 0 0 var(--sv-space-3); line-height: 1.25; font-weight: var(--sv-fw-bold); }
h1 { font-size: var(--sv-fs-2xl); } h2 { font-size: var(--sv-fs-xl); } h3 { font-size: var(--sv-fs-lg); }
a { color: var(--sv-orange-text); }
:focus-visible { outline: none; box-shadow: var(--sv-focus); border-radius: var(--sv-radius-sm); }
.sv-muted { color: var(--sv-text-muted); }
.sv-mono { font-family: var(--sv-font-mono); font-size: 0.92em; }
.sv-hidden { display: none !important; }
.sv-sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ── logo (official artwork only; aspect ratio always preserved) ── */
.sv-logo { display: block; height: auto; max-width: 100%; object-fit: contain; }
.sv-logo--full { width: 220px; }
.sv-logo--mark { width: 40px; height: 40px; }
/* Logo artwork has a white background: on dark surfaces it sits on a white plate, never recoloured. */
.sv-logo-plate { background: #FFFFFF; border-radius: var(--sv-radius-md); padding: var(--sv-space-1); display: inline-flex; }
.sv-brandline { font-size: var(--sv-fs-xs); letter-spacing: 0.12em; text-transform: uppercase; color: var(--sv-text-muted); }

/* ── buttons ── */
.sv-btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--sv-space-2); min-height: var(--sv-control-h); padding: 0 var(--sv-space-4); border-radius: var(--sv-radius-md); border: 1px solid transparent; font: inherit; font-weight: var(--sv-fw-semibold); font-size: var(--sv-fs-sm); cursor: pointer; text-decoration: none; transition: background 0.15s, border-color 0.15s; }
.sv-btn:disabled { opacity: 0.55; cursor: not-allowed; }
.sv-btn--primary { background: var(--sv-orange-action); color: #FFFFFF; }
.sv-btn--primary:hover:not(:disabled) { background: var(--sv-orange-action-hover); }
.sv-btn--secondary { background: var(--sv-surface); color: var(--sv-ink); border-color: var(--sv-border-strong); }
.sv-btn--secondary:hover:not(:disabled) { border-color: var(--sv-ink); }
.sv-btn--dark { background: var(--sv-ink); color: #FFFFFF; }
.sv-btn--danger { background: var(--sv-surface); color: var(--sv-danger); border-color: var(--sv-danger); }
.sv-btn--ghost { background: transparent; color: var(--sv-ink); }
.sv-btn--block { width: 100%; }
.sv-btn--lg { min-height: var(--sv-touch); font-size: var(--sv-fs-md); padding: 0 var(--sv-space-5); }

/* ── forms ── */
.sv-field { display: flex; flex-direction: column; gap: var(--sv-space-1); margin-bottom: var(--sv-space-4); }
.sv-label { font-size: var(--sv-fs-sm); font-weight: var(--sv-fw-semibold); color: var(--sv-ink); }
.sv-hint { font-size: var(--sv-fs-xs); color: var(--sv-text-muted); }
.sv-input, .sv-select, .sv-textarea { width: 100%; min-height: var(--sv-control-h); padding: var(--sv-space-2) var(--sv-space-3); border: 1px solid var(--sv-border-strong); border-radius: var(--sv-radius-sm); background: var(--sv-surface); color: var(--sv-ink); font: inherit; }
.sv-textarea { min-height: 88px; resize: vertical; }
.sv-input:focus, .sv-select:focus, .sv-textarea:focus { outline: none; border-color: var(--sv-orange); box-shadow: var(--sv-focus); }
.sv-input[aria-invalid="true"] { border-color: var(--sv-danger); }
.sv-check { display: flex; align-items: center; gap: var(--sv-space-2); font-size: var(--sv-fs-sm); }

/* ── cards ── */
.sv-card { background: var(--sv-surface); border: 1px solid var(--sv-border); border-radius: var(--sv-radius-lg); box-shadow: var(--sv-shadow-sm); padding: var(--sv-space-5); }
.sv-card__title { font-size: var(--sv-fs-md); font-weight: var(--sv-fw-bold); color: var(--sv-ink); margin: 0 0 var(--sv-space-3); }
.sv-stat { display: flex; flex-direction: column; gap: var(--sv-space-1); border-top: 3px solid var(--sv-orange); }
.sv-stat__value { font-size: var(--sv-fs-2xl); font-weight: var(--sv-fw-bold); color: var(--sv-ink); }
.sv-stat__label { font-size: var(--sv-fs-sm); color: var(--sv-text-muted); }

/* ── tables ── */
.sv-table-wrap { overflow-x: auto; border: 1px solid var(--sv-border); border-radius: var(--sv-radius-lg); background: var(--sv-surface); }
.sv-table { width: 100%; border-collapse: collapse; font-size: var(--sv-fs-sm); }
.sv-table th { text-align: left; font-weight: var(--sv-fw-semibold); color: var(--sv-text-muted); background: var(--sv-surface-sunken); padding: var(--sv-space-3) var(--sv-space-4); border-bottom: 1px solid var(--sv-border); white-space: nowrap; }
.sv-table td { padding: var(--sv-space-3) var(--sv-space-4); border-bottom: 1px solid var(--sv-border); color: var(--sv-text); vertical-align: top; }
.sv-table tr:last-child td { border-bottom: none; }
.sv-table tbody tr:hover { background: var(--sv-orange-tint); }
.sv-table .sv-row-link { cursor: pointer; }

/* ── badges & status ── */
.sv-badge { display: inline-flex; align-items: center; gap: var(--sv-space-1); padding: 2px var(--sv-space-2); border-radius: var(--sv-radius-pill); font-size: var(--sv-fs-xs); font-weight: var(--sv-fw-semibold); background: var(--sv-surface-sunken); color: var(--sv-text); white-space: nowrap; }
.sv-badge--brand { background: var(--sv-orange-tint); color: var(--sv-orange-text); }
.sv-badge--success { background: var(--sv-success-bg); color: var(--sv-success); }
.sv-badge--warning { background: var(--sv-warning-bg); color: var(--sv-warning); }
.sv-badge--danger { background: var(--sv-danger-bg); color: var(--sv-danger); }
.sv-badge--info { background: var(--sv-info-bg); color: var(--sv-info); }
.sv-dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; display: inline-block; }
/* task status → badge variant is mapped in shared/ui.js (statusVariant) */

/* ── progress (lifecycle) ── */
.sv-progress { height: 6px; background: var(--sv-surface-sunken); border-radius: var(--sv-radius-pill); overflow: hidden; }
.sv-progress__bar { height: 100%; background: var(--sv-orange); }
.sv-stepper { display: flex; flex-wrap: wrap; gap: var(--sv-space-1); }
.sv-step { font-size: var(--sv-fs-xs); padding: 2px var(--sv-space-2); border-radius: var(--sv-radius-pill); border: 1px solid var(--sv-border); color: var(--sv-text-muted); }
.sv-step--done { border-color: var(--sv-orange-tint-strong); background: var(--sv-orange-tint); color: var(--sv-orange-text); }
.sv-step--current { border-color: var(--sv-orange); background: var(--sv-orange); color: var(--sv-black); font-weight: var(--sv-fw-bold); }

/* ── timeline ── */
.sv-timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.sv-timeline::before { content: ""; position: absolute; left: 7px; top: 4px; bottom: 4px; width: 2px; background: var(--sv-border); }
.sv-timeline__item { position: relative; padding: 0 0 var(--sv-space-4) var(--sv-space-8); }
.sv-timeline__item::before { content: ""; position: absolute; left: 1px; top: 5px; width: 14px; height: 14px; border-radius: 50%; background: var(--sv-surface); border: 3px solid var(--sv-orange); }
.sv-timeline__time { font-size: var(--sv-fs-xs); color: var(--sv-text-muted); }
.sv-timeline__title { font-weight: var(--sv-fw-semibold); color: var(--sv-ink); }

/* ── alerts ── */
.sv-alert { padding: var(--sv-space-3) var(--sv-space-4); border-radius: var(--sv-radius-md); font-size: var(--sv-fs-sm); border: 1px solid transparent; margin-bottom: var(--sv-space-4); white-space: pre-line; }
.sv-alert--error { background: var(--sv-danger-bg); color: var(--sv-danger); border-color: #F5C2BE; }
.sv-alert--success { background: var(--sv-success-bg); color: var(--sv-success); border-color: #BFE3CB; }
.sv-alert--warning { background: var(--sv-warning-bg); color: var(--sv-warning); border-color: #F2DDA4; }
.sv-alert--info { background: var(--sv-info-bg); color: var(--sv-info); border-color: #C5D8EF; }

/* ── navigation: admin sidebar ── */
.sv-shell { display: grid; grid-template-columns: var(--sv-sidebar-w) 1fr; min-height: 100vh; }
.sv-sidebar { background: var(--sv-nav-bg); color: var(--sv-nav-text); display: flex; flex-direction: column; padding: var(--sv-space-4); gap: var(--sv-space-4); position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.sv-sidebar__brand { display: flex; align-items: center; gap: var(--sv-space-3); padding-bottom: var(--sv-space-4); border-bottom: 1px solid #2A2A2A; }
.sv-sidebar__name { font-weight: var(--sv-fw-bold); letter-spacing: 0.04em; color: #FFFFFF; font-size: var(--sv-fs-sm); }
.sv-sidebar__sub { font-size: var(--sv-fs-xs); color: var(--sv-nav-muted); }
.sv-nav { display: flex; flex-direction: column; gap: 2px; }
.sv-nav__item { display: flex; align-items: center; gap: var(--sv-space-3); padding: var(--sv-space-2) var(--sv-space-3); border-radius: var(--sv-radius-sm); color: var(--sv-nav-text); text-decoration: none; font-size: var(--sv-fs-sm); font-weight: var(--sv-fw-medium); border-left: 3px solid transparent; background: none; border-top: 0; border-right: 0; border-bottom: 0; cursor: pointer; text-align: left; font-family: inherit; }
.sv-nav__item:hover { background: #1E1E1E; }
.sv-nav__item[aria-current="page"] { background: #1E1E1E; border-left-color: var(--sv-orange); color: #FFFFFF; }
.sv-nav__item[aria-current="page"] .sv-icon { color: var(--sv-orange); }
.sv-main { padding: var(--sv-space-6) var(--sv-space-8); min-width: 0; }
.sv-topbar { display: flex; align-items: center; justify-content: space-between; gap: var(--sv-space-4); margin-bottom: var(--sv-space-6); }

/* ── navigation: field app ── */
.sv-appbar { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: var(--sv-space-3); padding: var(--sv-space-2) var(--sv-space-4); background: var(--sv-surface); border-bottom: 1px solid var(--sv-border); min-height: 56px; }
.sv-appbar__title { font-weight: var(--sv-fw-bold); color: var(--sv-ink); flex: 1; font-size: var(--sv-fs-md); }
.sv-tabbar { position: fixed; bottom: 0; left: 0; right: 0; display: grid; grid-template-columns: repeat(3, 1fr); background: var(--sv-surface); border-top: 1px solid var(--sv-border); padding-bottom: env(safe-area-inset-bottom); z-index: 10; }
.sv-tabbar__item { min-height: 56px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: var(--sv-fs-xs); color: var(--sv-text-muted); background: none; border: 0; border-top: 3px solid transparent; font-family: inherit; cursor: pointer; }
.sv-tabbar__item[aria-current="page"] { color: var(--sv-ink); border-top-color: var(--sv-orange); font-weight: var(--sv-fw-semibold); }
.sv-tabbar__item[aria-current="page"] .sv-icon { color: var(--sv-orange); }
.sv-field-main { padding: var(--sv-space-4); padding-bottom: 96px; max-width: 720px; margin: 0 auto; }
.sv-task-card { display: block; width: 100%; text-align: left; font: inherit; color: inherit; cursor: pointer; margin-bottom: var(--sv-space-3); border-left: 4px solid var(--sv-orange); }
.sv-banner { padding: var(--sv-space-2) var(--sv-space-4); font-size: var(--sv-fs-sm); text-align: center; }
.sv-banner--offline { background: var(--sv-ink); color: #FFFFFF; }
.sv-banner--sync { background: var(--sv-orange-tint); color: var(--sv-orange-text); }

/* ── icons (inline SVG via shared/ui.js icon()) ── */
.sv-icon { width: 20px; height: 20px; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ── layout helpers ── */
.sv-grid { display: grid; gap: var(--sv-space-4); }
.sv-grid--stats { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.sv-grid--2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.sv-row { display: flex; align-items: center; gap: var(--sv-space-3); flex-wrap: wrap; }
.sv-spread { display: flex; align-items: center; justify-content: space-between; gap: var(--sv-space-3); flex-wrap: wrap; }
.sv-stack > * + * { margin-top: var(--sv-space-3); }
.sv-dl { display: grid; grid-template-columns: max-content 1fr; gap: var(--sv-space-2) var(--sv-space-4); margin: 0; font-size: var(--sv-fs-sm); }
.sv-dl dt { color: var(--sv-text-muted); } .sv-dl dd { margin: 0; color: var(--sv-ink); }

/* ── dialog ── */
.sv-dialog { border: none; border-radius: var(--sv-radius-lg); box-shadow: var(--sv-shadow-lg); padding: var(--sv-space-6); width: min(560px, calc(100vw - 32px)); }
.sv-dialog::backdrop { background: rgba(17, 17, 17, 0.45); }

/* ── auth screens (both apps) ── */
.sv-auth { min-height: 100vh; display: grid; place-items: center; padding: var(--sv-space-4); background: var(--sv-bg); }
.sv-auth__card { width: min(420px, 100%); }
.sv-auth__logo { width: 200px; margin: 0 auto var(--sv-space-4); }
.sv-tabs { display: flex; gap: var(--sv-space-1); border-bottom: 1px solid var(--sv-border); margin-bottom: var(--sv-space-4); }
.sv-tab { padding: var(--sv-space-2) var(--sv-space-3); border: 0; background: none; font: inherit; font-size: var(--sv-fs-sm); color: var(--sv-text-muted); border-bottom: 3px solid transparent; cursor: pointer; }
.sv-tab[aria-selected="true"] { color: var(--sv-ink); border-bottom-color: var(--sv-orange); font-weight: var(--sv-fw-semibold); }

/* ── responsive ── */
@media (max-width: 900px) {
  .sv-shell { grid-template-columns: 1fr; }
  .sv-sidebar { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; }
  .sv-sidebar__brand { border-bottom: 0; padding-bottom: 0; }
  .sv-nav { flex-direction: row; flex-wrap: wrap; }
  .sv-main { padding: var(--sv-space-4); }
}

/* ── print (reports & customer documents) ── */
@media print {
  body { background: #FFFFFF; }
  .sv-sidebar, .sv-tabbar, .sv-appbar .sv-btn, .sv-no-print { display: none !important; }
  .sv-shell { display: block; }
  .sv-card { box-shadow: none; }
}

/* ── small utilities used by the apps ── */
.sv-dialog-actions { justify-content: flex-end; margin-top: var(--sv-space-5); }
.sv-auth__app { text-align: center; margin: 0 0 var(--sv-space-4); }
.sv-section { margin-bottom: var(--sv-space-6); }
.sv-empty { padding: var(--sv-space-6); text-align: center; color: var(--sv-text-muted); font-size: var(--sv-fs-sm); }
.sv-feed { list-style: none; margin: 0; padding: 0; font-size: var(--sv-fs-sm); max-height: 360px; overflow: auto; }
.sv-feed li { padding: var(--sv-space-2) 0; border-bottom: 1px solid var(--sv-border); }
.sv-feed li:last-child { border-bottom: 0; }
.sv-matrix td, .sv-matrix th { text-align: center; }
.sv-matrix td:first-child, .sv-matrix th:first-child { text-align: left; }
.sv-toggle { min-width: 64px; }
.sv-kv { font-size: var(--sv-fs-sm); }
.sv-page-title { display: flex; align-items: center; gap: var(--sv-space-3); }
.sv-page-title .sv-logo--mark { width: 32px; height: 32px; }
.sv-pre { white-space: pre-wrap; word-break: break-word; font-family: var(--sv-font-mono); font-size: var(--sv-fs-xs); color: var(--sv-text-muted); margin: 0; }
.sv-grow { flex: 1; }
.sv-search { max-width: 280px; }
.sv-action-bar { position: sticky; bottom: 64px; display: grid; gap: var(--sv-space-2); padding: var(--sv-space-3) 0; background: linear-gradient(transparent, var(--sv-bg) 20%); }

/* ── link-cards: whole card is the link, no underline ── */
a.sv-card, a.sv-task-card, a.sv-stat, .sv-tabbar__item, .sv-nav__item { text-decoration: none; color: inherit; }
a.sv-card:hover { border-color: var(--sv-border-strong); box-shadow: var(--sv-shadow-md); }
.sv-task-card h3 { margin: var(--sv-space-1) 0 var(--sv-space-2); }
@media (max-width: 600px) {
  .sv-grid--stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sv-stat { padding: var(--sv-space-4); }
  .sv-stat__value { font-size: var(--sv-fs-xl); }
}
@media (min-width: 901px) {
  .sv-shell { background: linear-gradient(to right, var(--sv-nav-bg) var(--sv-sidebar-w), var(--sv-bg) var(--sv-sidebar-w)); }
}
.sv-matrix td { vertical-align: middle; }

/* ── Phase 2B: Configuration Center ── */
.sv-config-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: var(--sv-space-4); }
.sv-config-card { display: flex; flex-direction: column; gap: var(--sv-space-2); text-decoration: none; color: inherit; }
.sv-config-card:hover { border-color: var(--sv-orange); }
.sv-rows { display: flex; flex-direction: column; gap: var(--sv-space-3); }
.sv-rows__row { border: 1px solid var(--sv-border); border-radius: var(--sv-radius-md); padding: var(--sv-space-3); display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: var(--sv-space-3); align-items: end; background: var(--sv-surface-sunken); }
.sv-swatch { width: 28px; height: 28px; border: 1px solid var(--sv-border-strong); border-radius: var(--sv-radius-sm); flex: none; }
.sv-diff { font-size: var(--sv-fs-sm); }
.sv-diff del { color: var(--sv-danger); text-decoration: line-through; }
.sv-diff ins { color: var(--sv-success); text-decoration: none; }
.sv-logo-preview { max-width: 220px; height: auto; border: 1px solid var(--sv-border); border-radius: var(--sv-radius-md); background: #FFFFFF; padding: var(--sv-space-2); }
.sv-dialog--wide { width: min(920px, 96vw); }

/* Phase 2B step 3: right-aligned amounts */
.sv-num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* Phase 2B step 6: AI workforce and knowledge base */
.sv-fieldset { border: 1px solid var(--sv-border); border-radius: var(--sv-radius-md); padding: var(--sv-space-3); margin: var(--sv-space-3) 0; }
.sv-fieldset > legend { padding: 0 var(--sv-space-2); font-weight: var(--sv-fw-semibold); }
.sv-prewrap { white-space: pre-wrap; overflow-wrap: anywhere; }

/* Phase 2C: report charts (horizontal bars; the value is always printed next to the bar) */
.sv-bars { display: flex; flex-direction: column; gap: var(--sv-space-1); }
.sv-bars__row { display: grid; grid-template-columns: minmax(90px, 28%) 1fr minmax(90px, auto); gap: var(--sv-space-2); align-items: center; font-size: var(--sv-fs-sm); }
.sv-bars__label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sv-bars__track { background: var(--sv-border); border-radius: var(--sv-radius-sm); height: 12px; overflow: hidden; }
.sv-bars__bar { display: block; height: 100%; background: var(--sv-orange); border-radius: var(--sv-radius-sm); }
.sv-bars__value { text-align: right; white-space: nowrap; }
.sv-text-danger { color: var(--sv-danger); }

/* Phase 5 — field evidence and checklists */
.sv-thumb { display: block; width: 96px; height: 96px; object-fit: cover; border-radius: var(--sv-radius-md); border: 1px solid var(--sv-border); margin-bottom: var(--sv-space-2); }
.sv-checklist { list-style: none; margin: 0; padding: 0; }
.sv-checklist li { padding: var(--sv-space-3) 0; border-bottom: 1px solid var(--sv-border); display: grid; gap: var(--sv-space-2); }
.sv-checklist li:last-child { border-bottom: 0; }
.sv-checklist li[data-done="1"] > .sv-spread > span:first-child::before { content: "✓ "; color: var(--sv-success); font-weight: 600; }

/* location master / conversations / marketing */
.sv-table--compact th, .sv-table--compact td { padding: var(--sv-space-1) var(--sv-space-2); }
.sv-feed li.sv-out { padding-left: var(--sv-space-4); border-left: 3px solid var(--sv-orange); }
.sv-indent-0 { padding-left: var(--sv-space-3); } .sv-indent-1 { padding-left: calc(var(--sv-space-3) + 1.25rem); }
.sv-indent-2 { padding-left: calc(var(--sv-space-3) + 2.5rem); } .sv-indent-3 { padding-left: calc(var(--sv-space-3) + 3.75rem); }
.sv-post-img { max-width: 100%; border-radius: 8px; }
