/* ============================================================
   VIN Intel — dark product theme.
   A deliberate single dark look for screens; print flips to a
   light report layout. Chart series colors are the validated
   dark-surface palette steps (see charts.js / dataviz method).
   ============================================================ */
:root {
  --page: #0a0b0f;
  --surface-1: #14161c;      /* cards, chart surface */
  --surface-2: #1a1d24;      /* nested tiles, inputs */
  --surface-3: #21252e;      /* hover states */
  --text-primary: #f2f4f8;
  --text-secondary: #b7bdc9;
  --text-muted: #7e8595;
  --gridline: #262a33;
  --baseline: #3a3f4b;
  --border: rgba(255, 255, 255, 0.07);
  --border-strong: rgba(255, 255, 255, 0.13);
  --series-1: #3987e5;       /* active comparables (validated on dark surface) */
  --series-2: #199e70;       /* sold comparables */
  --series-accent: #d95926;  /* subject vehicle */
  --band: #262a33;           /* neutral band fill */
  --status-good: #0ca30c;
  --status-warning: #fab219;
  --status-serious: #ec835a;
  --status-critical: #d03b3b;
  --good-text: #35c06a;
  --accent-ui: #3987e5;
  --accent-soft: rgba(57, 135, 229, 0.14);
  --grad: linear-gradient(120deg, #4f9cf7 0%, #7b6cf6 100%);
  --shadow-card: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 10px 30px -18px rgba(0, 0, 0, 0.8);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { color-scheme: dark; }
html, body { margin: 0; padding: 0; }
body {
  background:
    radial-gradient(900px 420px at 15% -8%, rgba(57, 135, 229, 0.13), transparent 60%),
    radial-gradient(800px 400px at 90% -12%, rgba(123, 108, 246, 0.10), transparent 60%),
    var(--page);
  color: var(--text-primary);
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }

::selection { background: rgba(57, 135, 229, 0.35); }

/* Thin dark scrollbars */
* { scrollbar-width: thin; scrollbar-color: var(--baseline) transparent; }
*::-webkit-scrollbar { height: 8px; width: 8px; }
*::-webkit-scrollbar-thumb { background: var(--baseline); border-radius: 4px; }

/* ---------- Top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: rgba(10, 11, 15, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.topbar-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 13px 24px; flex-wrap: wrap;
  max-width: 1120px; margin: 0 auto;
}
.brand { font-weight: 750; font-size: 19px; letter-spacing: -0.01em; display: flex; align-items: center; gap: 8px; color: var(--text-primary); text-decoration: none; }
.brand:hover { text-decoration: none; }
.nav { display: flex; gap: 2px; flex-wrap: wrap; }
.nav a {
  color: var(--text-secondary); font-size: 13.5px; font-weight: 550;
  padding: 6px 13px; border-radius: 8px; text-decoration: none;
}
.nav a:hover { color: var(--text-primary); background: var(--surface-2); text-decoration: none; }
.nav a.active { color: var(--text-primary); background: var(--surface-3); }
.brand-mark {
  background: var(--grad); color: #fff; border-radius: 7px;
  padding: 3px 8px; font-size: 13px; letter-spacing: 0.06em;
  box-shadow: 0 4px 14px -4px rgba(79, 156, 247, 0.55);
}
.tagline { margin: 0; color: var(--text-muted); font-size: 13px; letter-spacing: 0.01em; }
.foot { padding: 28px 24px 48px; color: var(--text-muted); font-size: 12.5px; }
.version-line { margin-top: 10px; font-size: 11.5px; letter-spacing: 0.04em; }

/* ---------- Hero entry ---------- */
.hero-entry { padding: 58px 0 10px; max-width: 720px; }
.hero-entry.compact { padding: 34px 0 4px; }
.hero-entry.compact h1 { font-size: clamp(26px, 3.5vw, 34px); }
.hero-entry h1 {
  font-size: clamp(30px, 4.5vw, 42px); line-height: 1.12;
  letter-spacing: -0.025em; margin: 0 0 10px; font-weight: 750;
}
.grad {
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.hero-entry .hint { font-size: 16px; color: var(--text-secondary); margin: 0 0 22px; max-width: 58ch; }

.vin-row { display: flex; gap: 10px; flex-wrap: wrap; }
#vin-input {
  flex: 1 1 340px; font-size: 17px; letter-spacing: 0.09em; text-transform: uppercase;
  padding: 13px 16px; border: 1px solid var(--border-strong); border-radius: 11px;
  background: var(--surface-2); color: var(--text-primary);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  transition: border-color 0.15s, box-shadow 0.15s;
}
#vin-input::placeholder { text-transform: none; letter-spacing: 0.01em; color: var(--text-muted); font-family: system-ui, sans-serif; }
#vin-input:focus {
  outline: none; border-color: var(--accent-ui);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

button {
  font: inherit; font-weight: 650; border-radius: 11px; cursor: pointer;
  border: 1px solid transparent; padding: 12px 26px;
  background: var(--grad); color: #fff; letter-spacing: 0.01em;
  box-shadow: 0 6px 20px -8px rgba(79, 156, 247, 0.65);
  transition: transform 0.12s, box-shadow 0.15s, filter 0.15s;
}
button:hover { filter: brightness(1.1); box-shadow: 0 8px 24px -8px rgba(79, 156, 247, 0.8); }
button:active { transform: translateY(1px); }
button.ghost {
  background: transparent; color: var(--text-secondary); border-color: var(--border-strong);
  padding: 8px 15px; font-weight: 550; box-shadow: none;
}
button.ghost:hover { background: var(--surface-3); color: var(--text-primary); filter: none; box-shadow: none; }

.vin-feedback { min-height: 1.2em; margin: 10px 2px 0; font-size: 13px; color: var(--text-muted); }
.vin-feedback.bad { color: var(--status-critical); }
.vin-feedback.warn { color: var(--status-warning); }

.samples { margin-top: 18px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.samples-label { color: var(--text-muted); font-size: 13px; margin-right: 2px; }
.chip {
  background: var(--surface-2); color: var(--text-secondary); border: 1px solid var(--border);
  border-radius: 999px; padding: 5px 14px; font-size: 12.5px; font-weight: 500;
  box-shadow: none;
}
.chip:hover {
  background: var(--surface-3); color: var(--text-primary);
  border-color: var(--border-strong); filter: none; box-shadow: none;
}

/* ---------- Cards ---------- */
.card {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px 26px;
  margin: 22px 0;
  box-shadow: var(--shadow-card);
}
.card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
h2 { font-size: 19px; margin: 0 0 2px; letter-spacing: -0.01em; font-weight: 700; }
h3 {
  font-size: 12.5px; margin: 20px 0 10px; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.08em; font-weight: 650;
}
.sub { color: var(--text-muted); margin: 0; font-size: 13px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: 0.05em; }
.hint { color: var(--text-secondary); }

.sources-note { margin: 0; font-size: 12px; color: var(--text-muted); }
.src-live { color: var(--good-text); font-weight: 600; }
.src-sample { color: var(--text-muted); font-weight: 600; border-bottom: 1px dotted var(--baseline); cursor: help; }

/* ---------- Loading / error ---------- */
.loading { display: flex; align-items: center; gap: 12px; color: var(--text-secondary); margin: 28px 4px; }
.spinner {
  width: 18px; height: 18px; border-radius: 50%;
  border: 3px solid var(--gridline); border-top-color: var(--accent-ui);
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.error-box { border-color: rgba(208, 59, 59, 0.5); }

/* ---------- Badges (decode source) ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11.5px; font-weight: 600; letter-spacing: 0.03em;
  border: 1px solid var(--border-strong); color: var(--text-secondary);
  border-radius: 999px; padding: 3px 11px; white-space: nowrap;
  background: var(--surface-2);
}
.badge-live { border-color: rgba(12, 163, 12, 0.5); color: var(--good-text); }
.badge-demo { color: var(--text-muted); }

/* ---------- Spec grid ---------- */
.spec-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(175px, 1fr));
  gap: 0; margin: 18px 0 0; border-top: 1px solid var(--gridline);
}
.spec-grid > div { padding: 12px 14px 12px 0; border-bottom: 1px solid var(--gridline); }
.spec-grid dt { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.07em; }
.spec-grid dd { margin: 3px 0 0; font-weight: 600; font-size: 14.5px; }

/* ---------- History ---------- */
.history-summary { display: flex; gap: 10px; flex-wrap: wrap; margin: 16px 0 6px; }
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid var(--border); border-radius: 11px;
  padding: 9px 15px; font-size: 13.5px; background: var(--surface-2);
}
.pill .dot { width: 8px; height: 8px; border-radius: 50%; flex: none; box-shadow: 0 0 8px currentColor; }
.pill strong { font-weight: 650; }
.history-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 36px; }
@media (max-width: 720px) { .history-cols { grid-template-columns: 1fr; } }
.owners, .accidents, .recalls, .sales { margin: 0; padding-left: 20px; }
.owners li, .accidents li, .recalls li, .sales li { margin: 7px 0; color: var(--text-secondary); font-size: 13.5px; }
.owners li strong, .accidents li strong, .recalls li strong, .sales li strong { color: var(--text-primary); }
.owners li::marker, .accidents li::marker, .recalls li::marker, .sales li::marker { color: var(--text-muted); }
.recall-status { font-size: 12px; white-space: nowrap; }
.recall-status.open { color: var(--status-critical); font-weight: 600; }
.recall-status.closed { color: var(--good-text); }
.none-note { color: var(--text-muted); font-style: italic; list-style: none; margin-left: -20px; }
.service summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 6px; }
.service summary::before { content: "▸"; color: var(--text-muted); transition: transform 0.15s; margin-top: 9px; }
.service[open] summary::before { transform: rotate(90deg); }
.service summary h3 { display: inline; }
.count { color: var(--text-muted); font-weight: 500; text-transform: none; letter-spacing: 0; }

/* ---------- Tables ---------- */
.table-scroll { overflow-x: auto; border: 1px solid var(--gridline); border-radius: 12px; }
table { border-collapse: collapse; width: 100%; font-size: 13.5px; }
th, td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--gridline); }
tbody tr:last-child td { border-bottom: none; }
thead th { background: var(--surface-2); position: sticky; top: 0; }
th {
  color: var(--text-muted); font-size: 11.5px; text-transform: uppercase;
  letter-spacing: 0.06em; font-weight: 650; white-space: nowrap;
}
th.num, td.num { text-align: right; font-variant-numeric: tabular-nums; }
th[data-sort] { cursor: pointer; user-select: none; }
th[data-sort]:hover { color: var(--text-primary); }
th .arrow { font-size: 10px; color: var(--accent-ui); }
tbody tr { transition: background 0.1s; }
tbody tr:hover { background: var(--surface-2); }
.comps-table td:last-child { white-space: nowrap; }
.sold-badge {
  font-size: 11px; font-weight: 700; color: var(--good-text);
  border: 1px solid rgba(12, 163, 12, 0.5); border-radius: 999px;
  padding: 2px 9px; letter-spacing: 0.04em; white-space: nowrap;
}
.cpo {
  font-size: 10px; font-weight: 700; color: var(--good-text);
  border: 1px solid rgba(12, 163, 12, 0.5); border-radius: 5px;
  padding: 1px 5px; margin-left: 7px; letter-spacing: 0.04em;
}
a { color: #6aa9f0; text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- Filters ---------- */
.filters {
  display: flex; gap: 16px; flex-wrap: wrap; align-items: flex-end;
  padding: 16px 0 18px; border-bottom: 1px solid var(--gridline); margin-bottom: 20px;
}
.filters label {
  display: flex; flex-direction: column; gap: 5px; font-size: 11px;
  color: var(--text-muted); font-weight: 650; text-transform: uppercase; letter-spacing: 0.07em;
}
.filters select, .filters input {
  font: inherit; font-size: 13.5px; color: var(--text-primary);
  background: var(--surface-2); border: 1px solid var(--border-strong); border-radius: 9px;
  padding: 7px 10px; min-width: 84px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.filters select:focus, .filters input:focus {
  outline: none; border-color: var(--accent-ui); box-shadow: 0 0 0 3px var(--accent-soft);
}
.filters .pair { display: flex; align-items: center; gap: 6px; color: var(--text-muted); }
.filters input[type="number"] { width: 92px; }

/* ---------- Market: hero + KPIs ---------- */
#market-body.refreshing { opacity: 0.55; transition: opacity 0.15s; }
.hero-block { margin: 6px 0 22px; }
.hero-label { margin: 0; color: var(--text-muted); font-size: 12.5px; text-transform: uppercase; letter-spacing: 0.08em; font-weight: 650; }
.hero-figure {
  margin: 4px 0 0; font-size: 56px; font-weight: 750; letter-spacing: -0.03em; line-height: 1.08;
}
.hero-range { margin: 4px 0 10px; color: var(--text-secondary); font-size: 14px; }
.adjustments { margin: 0; padding-left: 20px; color: var(--text-secondary); font-size: 13px; }
.adjustments li { margin: 3px 0; }
.adjustments li::marker { color: var(--text-muted); }

.kpi-row {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px; margin-bottom: 22px;
}
.tile {
  border: 1px solid var(--border); border-radius: 13px;
  padding: 14px 16px; background: var(--surface-2);
  position: relative; overflow: hidden;
}
.tile::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 2px;
  background: var(--grad); opacity: 0.5;
}
.tile .t-label { font-size: 11.5px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; font-weight: 650; }
.tile .t-value { font-size: 22px; font-weight: 700; margin-top: 3px; letter-spacing: -0.01em; }
.tile .t-note { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.tile svg { display: block; margin-top: 8px; }

/* ---------- Chart ---------- */
.chart-card {
  border: 1px solid var(--border); border-radius: 13px;
  padding: 16px 18px 10px; background: var(--surface-1); margin-bottom: 24px;
}
.chart-head { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 8px; }
.chart-head h3 { margin: 0; }
.legend { display: flex; gap: 18px; font-size: 12.5px; color: var(--text-secondary); }
.legend .key { display: inline-flex; align-items: center; gap: 7px; }
.legend .swatch { width: 9px; height: 9px; border-radius: 50%; }
.chart-body { width: 100%; }
.chart-body svg { display: block; width: 100%; height: auto; }
.axis-label { fill: var(--text-muted); font-size: 11px; }
.direct-label { fill: var(--text-secondary); font-size: 11.5px; font-weight: 600; }

.tooltip {
  position: fixed; z-index: 30; pointer-events: none;
  background: var(--surface-3); border: 1px solid var(--border-strong);
  border-radius: 10px; padding: 9px 12px; font-size: 12.5px;
  box-shadow: 0 10px 30px -8px rgba(0, 0, 0, 0.7); max-width: 270px;
}
.tooltip .tt-value { font-size: 15.5px; font-weight: 700; color: var(--text-primary); }
.tooltip .tt-line { color: var(--text-secondary); display: flex; align-items: center; gap: 6px; }
.tooltip .tt-key { width: 10px; height: 3px; border-radius: 2px; display: inline-block; flex: none; }

/* ---------- Comps head / export ---------- */
.comps-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.comps-head h3 { margin: 0; }
.export-btns { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- Recommendation / verdicts ---------- */
.head-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.verdict {
  font-weight: 750; font-size: 14px; letter-spacing: 0.05em;
  border-radius: 9px; padding: 6px 14px; border: 1px solid transparent;
}
.verdict.small { font-size: 11.5px; padding: 3px 9px; }
.verdict-buy { color: var(--good-text); border-color: rgba(12, 163, 12, 0.5); background: rgba(12, 163, 12, 0.09); }
.verdict-caution { color: var(--status-warning); border-color: rgba(250, 178, 25, 0.45); background: rgba(250, 178, 25, 0.08); }
.verdict-pass { color: var(--status-critical); border-color: rgba(208, 59, 59, 0.5); background: rgba(208, 59, 59, 0.09); }
.verdict-no-data { color: var(--text-muted); border-color: var(--baseline); background: var(--surface-2); }
.rec-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px; margin: 16px 0 12px;
}
.rec-reasons { margin: 0 0 6px; padding-left: 20px; color: var(--text-secondary); font-size: 13.5px; }
.rec-reasons li { margin: 4px 0; }
#btn-save.saved { color: var(--status-warning); border-color: rgba(250, 178, 25, 0.5); }
.save-row {
  display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap;
  padding-top: 14px; margin-top: 8px; border-top: 1px solid var(--gridline);
}
.save-row label { display: flex; flex-direction: column; gap: 4px; font-size: 11px; color: var(--text-muted); font-weight: 650; text-transform: uppercase; letter-spacing: 0.06em; }
.save-row select, .save-row input {
  font: inherit; font-size: 13.5px; color: var(--text-primary);
  background: var(--surface-2); border: 1px solid var(--border-strong); border-radius: 9px;
  padding: 7px 10px;
}
.save-row input { flex: 1 1 220px; }
.tag {
  font: inherit; font-size: 12px; font-weight: 600; cursor: pointer;
  color: var(--text-secondary); background: var(--surface-3);
  border: 1px solid var(--border-strong); border-radius: 999px; padding: 3px 10px;
  box-shadow: none;
}
.tag:hover { color: var(--status-critical); filter: none; box-shadow: none; }
.tag.static { cursor: default; }
.tag.static:hover { color: var(--text-secondary); }
.tag-list { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.notes-list { margin: 10px 0 0; padding-left: 20px; color: var(--text-secondary); font-size: 13px; }
.notes-list li { margin: 5px 0; }
.notes-list strong { color: var(--text-primary); }
.note-when { color: var(--text-muted); font-size: 11.5px; }

/* ---------- Dashboard ---------- */
.dash-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 860px) { .dash-grid { grid-template-columns: 1fr; } }
.dash-grid .card { margin: 0; }
.see-all { font-size: 13px; }
.dash-list { margin: 6px 0 0; padding: 0; list-style: none; }
.dash-list li { padding: 8px 2px; border-bottom: 1px solid var(--gridline); font-size: 13.5px; }
.dash-list li:last-child { border-bottom: none; }
.li-meta { color: var(--text-muted); font-size: 12.5px; }
.li-meta.warn { color: var(--status-warning); }
.li-meta.up { color: var(--good-text); }
.li-meta.down { color: var(--status-critical); }
.pipeline { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-top: 14px; }
.stage { text-align: center; border: 1px solid var(--border); border-radius: 10px; padding: 10px 4px; background: var(--surface-2); }
.stage.empty { opacity: 0.45; }
.stage-count { font-size: 20px; font-weight: 700; }
.stage-label { font-size: 10.5px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; margin-top: 2px; }

/* ---------- Inventory page ---------- */
.tabs { display: flex; gap: 6px; margin: 18px 0 4px; border-bottom: 1px solid var(--gridline); }
.tab {
  background: transparent; border: none; box-shadow: none; color: var(--text-muted);
  font-weight: 600; font-size: 14px; padding: 10px 16px; border-radius: 8px 8px 0 0;
  border-bottom: 2px solid transparent;
}
.tab:hover { color: var(--text-primary); filter: none; box-shadow: none; background: var(--surface-2); }
.tab.active { color: var(--text-primary); border-bottom-color: var(--accent-ui); }
.saved-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 16px; margin-top: 16px; }
.saved-grid .card { margin: 0; }
.saved-title { font-weight: 700; font-size: 15.5px; }
.saved-numbers { color: var(--text-secondary); font-size: 13px; margin: 8px 0 0; }
.saved-meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 10px; }
.saved-meta select {
  font: inherit; font-size: 12.5px; color: var(--text-primary);
  background: var(--surface-2); border: 1px solid var(--border-strong); border-radius: 8px; padding: 4px 8px;
}
.saved-actions { display: flex; gap: 8px; margin-top: 12px; }
.btn-link { display: inline-flex; align-items: center; text-decoration: none; }
.btn-link:hover { text-decoration: none; }
button.danger { color: var(--status-critical); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; letter-spacing: 0.04em; }

/* ---------- Team management (Billing page) ---------- */
.team-list { list-style: none; margin: 0 0 14px; padding: 0; }
.team-list li {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 9px 2px; border-bottom: 1px solid var(--border-subtle);
  font-size: 14px;
}
.team-list li span { color: var(--text-secondary); }
.team-list li button { margin-left: auto; }
.team-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.team-row input {
  font: inherit; font-size: 14px; color: var(--text-primary);
  background: var(--surface-2); border: 1px solid var(--border-strong);
  border-radius: 9px; padding: 9px 12px; min-width: 180px;
}
.team-row input:focus { outline: none; border-color: var(--accent-ui); box-shadow: 0 0 0 3px var(--accent-soft); }

/* ---------- Entry/plate status line (Evaluate page) ---------- */
.scan-status { color: var(--text-secondary); font-size: 13px; min-height: 1.2em; margin: 8px 2px 0; }
.plate-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 12px; }
.plate-row input, .plate-row select {
  font: inherit; font-size: 15px; color: var(--text-primary);
  background: var(--surface-2); border: 1px solid var(--border-strong);
  border-radius: 9px; padding: 9px 12px;
}
.plate-row input { width: 180px; text-transform: uppercase; letter-spacing: 0.06em; }
.plate-row input:focus, .plate-row select:focus { outline: none; border-color: var(--accent-ui); box-shadow: 0 0 0 3px var(--accent-soft); }

/* ---------- Landing page ---------- */
.land-hero { padding: 84px 0 30px; max-width: 780px; }
.land-hero h1 { font-size: clamp(34px, 5.5vw, 52px); line-height: 1.1; letter-spacing: -0.03em; margin: 0 0 16px; font-weight: 750; }
.land-hero .hint { font-size: 17px; max-width: 62ch; }
.land-cta { display: flex; gap: 14px; align-items: center; margin: 26px 0 10px; flex-wrap: wrap; }
.btn-primary {
  display: inline-block; font-weight: 650; border-radius: 11px; text-decoration: none;
  padding: 13px 28px; background: var(--grad); color: #fff;
  box-shadow: 0 6px 20px -8px rgba(79, 156, 247, 0.65);
}
.btn-primary:hover { filter: brightness(1.1); text-decoration: none; }
.land-note { color: var(--text-muted); font-size: 13px; margin: 6px 0 0; }
.land-section { padding: 44px 0 8px; }
.land-section h2 { font-size: 26px; letter-spacing: -0.02em; margin: 0 0 22px; }
.land-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 16px; }
.land-card {
  border: 1px solid var(--border); border-radius: 14px; background: var(--surface-1);
  padding: 20px 22px; box-shadow: var(--shadow-card);
}
.land-card h3 { margin: 0 0 8px; font-size: 15px; color: var(--text-primary); text-transform: none; letter-spacing: 0; }
.land-card p { margin: 0; color: var(--text-secondary); font-size: 14px; }
.land-steps { margin: 0; padding-left: 22px; max-width: 640px; }
.land-steps li { margin: 12px 0; color: var(--text-secondary); font-size: 15px; }
.land-steps strong { color: var(--text-primary); }
.pricing-card {
  border: 1px solid var(--border-strong); border-radius: 16px; background: var(--surface-1);
  padding: 30px 34px; max-width: 430px; box-shadow: var(--shadow-card);
  position: relative; overflow: hidden;
}
.pricing-card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--grad); }
.pricing-plan { margin: 0; color: var(--text-muted); font-size: 12.5px; text-transform: uppercase; letter-spacing: 0.08em; font-weight: 650; }
.pricing-price { margin: 6px 0 14px; font-size: 46px; font-weight: 750; letter-spacing: -0.02em; }
.pricing-price span { font-size: 17px; font-weight: 500; color: var(--text-muted); }
.pricing-list { margin: 0 0 22px; padding-left: 20px; color: var(--text-secondary); font-size: 14px; }
.pricing-list li { margin: 7px 0; }
.land-foot { border-top: 1px solid var(--border); margin-top: 50px; padding-top: 22px; }

/* ---------- Billing ---------- */
.billing-card { max-width: 640px; }
.bill-status { color: var(--text-secondary); margin: 14px 0; font-size: 14.5px; }

/* ---------- Login ---------- */
.login-body { display: flex; min-height: 100vh; align-items: center; justify-content: center; }
.login-wrap { width: min(430px, calc(100vw - 40px)); padding: 40px 0; }
.login-brand { justify-content: center; margin-bottom: 18px; font-size: 24px; }
.login-card { margin: 0; padding: 28px; }
.login-card h1 { font-size: 21px; margin: 0 0 4px; letter-spacing: -0.01em; }
.login-fields { display: grid; gap: 14px; margin: 18px 0 4px; }
.login-fields label {
  display: flex; flex-direction: column; gap: 5px; font-size: 11px;
  color: var(--text-muted); font-weight: 650; text-transform: uppercase; letter-spacing: 0.07em;
}
.login-fields input {
  font: inherit; font-size: 15px; color: var(--text-primary);
  background: var(--surface-2); border: 1px solid var(--border-strong);
  border-radius: 9px; padding: 10px 12px;
}
.login-fields input:focus { outline: none; border-color: var(--accent-ui); box-shadow: 0 0 0 3px var(--accent-soft); }
#auth-submit { width: 100%; margin-top: 6px; }
.login-switch { text-align: center; margin: 18px 0 0; color: var(--text-muted); font-size: 13.5px; }
.login-foot { text-align: center; padding: 18px 0 0; font-size: 12px; }

/* ---------- Finance calculators ---------- */
.calc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 18px; }
@media (max-width: 860px) { .calc-grid { grid-template-columns: 1fr; } }
.calc-grid .card { margin: 0; }
.calc-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 14px 0 16px; }
.calc-fields label { display: flex; flex-direction: column; gap: 5px; font-size: 11px; color: var(--text-muted); font-weight: 650; text-transform: uppercase; letter-spacing: 0.06em; }
.calc-fields input, .calc-fields select {
  font: inherit; font-size: 14px; color: var(--text-primary);
  background: var(--surface-2); border: 1px solid var(--border-strong); border-radius: 9px; padding: 8px 10px;
}
.calc-fields input:focus, .calc-fields select:focus { outline: none; border-color: var(--accent-ui); box-shadow: 0 0 0 3px var(--accent-soft); }
.calc-out { border-top: 1px solid var(--gridline); padding-top: 6px; }
.calc-row { display: flex; justify-content: space-between; padding: 7px 0; font-size: 13.5px; color: var(--text-secondary); }
.calc-row .calc-value { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--text-primary); }
.calc-row.big { font-size: 15px; }
.calc-row.big .calc-value { font-size: 24px; font-weight: 750; }
.calc-out.negative .calc-row.big .calc-value { color: var(--status-critical); }
.hint.small { font-size: 12.5px; margin-top: 12px; }

/* ---------- Print (appraisal report — light) ---------- */
@media print {
  :root {
    --page: #fff; --surface-1: #fff; --surface-2: #fff; --surface-3: #fff;
    --text-primary: #000; --text-secondary: #333; --text-muted: #666;
    --gridline: #ddd; --baseline: #aaa; --border: #ccc; --border-strong: #bbb;
    --band: #eee; --series-1: #2a78d6; --series-2: #1baf7a; --series-accent: #eb6834;
    --good-text: #006300; --shadow-card: none; --grad: none;
  }
  html { color-scheme: light; }
  body { background: #fff; color: #000; font-size: 12px; }
  .topbar, .hero-entry, .filters, .export-btns, .foot, #loading { display: none !important; }
  .card, .chart-card, .tile { border: 1px solid #ccc; break-inside: avoid; box-shadow: none; }
  .tile::before { display: none; }
  a { color: #000; }
  .hero-figure { font-size: 34px; }
  .table-scroll { border-color: #ccc; }
}
