/* ============================================================================
   AutoPal Client Portal — layout & components
   Mobile-first. NO literal colors here — everything derives from tokens.css
   (var() or color-mix over vars). Swap tokens.css to re-skin.
   ========================================================================== */

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  background: var(--bone);
  color: var(--text-body);
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }

button {
  font: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
  padding: 0;
}

/* Visible focus ring everywhere (3px brass halo) */
:focus-visible {
  outline: none;
  box-shadow: var(--focus-halo);
  border-radius: var(--radius-field);
}

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

[hidden] { display: none !important; }

@keyframes shimmer { 0% { background-position: -200px 0; } 100% { background-position: 200px 0; } }
@keyframes spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* ---------------------------------------------------------------------------
   Shared atoms
--------------------------------------------------------------------------- */

.mono-label {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: var(--tap-min);
  padding: 0 18px;
  border-radius: var(--radius-btn);
  font-weight: 600;
  font-size: 14px;
}

.btn-primary { background: var(--brass); color: var(--on-brass); font-weight: 700; }
.btn-primary:hover { background: var(--brass-bright); }
.btn-primary[disabled] { opacity: 0.75; cursor: default; }

.btn-dark { background: var(--surface-dark); color: var(--on-dark); }
.btn-warn { background: var(--warn); color: var(--bone); }
.btn-ghost { border: 1px solid var(--line-dim); color: var(--text-mute); background: var(--surface); }
.btn-ghost:hover { background: var(--surface-alt); }

.spinner {
  width: 15px; height: 15px; flex: none;
  border-radius: 50%;
  border: 2px solid color-mix(in srgb, currentColor 35%, transparent);
  border-top-color: currentColor;
  animation: spin 0.7s linear infinite;
}

/* Status chips (wireframe legend) */
.chip {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  padding: 4px 10px;
  border-radius: var(--radius-chip);
  white-space: nowrap;
}
.chip-missing {
  color: var(--warn);
  background: color-mix(in srgb, var(--warn) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--warn) 32%, transparent);
}
.chip-uploaded {
  color: var(--text-mute);
  background: var(--skeleton-hi);
  border: 1px solid var(--line-dim);
}
.chip-verified, .chip-signal {
  color: var(--green);
  background: color-mix(in srgb, var(--green) 13%, transparent);
  border: 1px solid color-mix(in srgb, var(--green) 30%, transparent);
}

/* Skeletons */
.skel {
  border-radius: 6px;
  background: linear-gradient(90deg, var(--skeleton) 0px, var(--skeleton-hi) 60px, var(--skeleton) 120px);
  background-size: 240px 100%;
  animation: shimmer 1.2s linear infinite;
}

/* Generic empty / error module states */
.module-empty, .module-error {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 26px 16px;
}
.module-empty { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-card); }
.module-empty .glyph { width: 32px; height: 32px; border-radius: 8px; background: var(--skeleton-hi); margin-bottom: 11px; }
.module-empty .t { font-weight: 600; font-size: 13px; color: var(--text-mute); }
.module-empty .d { font-size: 11.5px; color: var(--text-ghost); margin-top: 3px; }

.module-error {
  background: var(--surface);
  border: 1px solid color-mix(in srgb, var(--warn) 40%, transparent);
  border-radius: var(--radius-card);
}
.module-error .glyph {
  width: 32px; height: 32px; border-radius: 50%;
  background: color-mix(in srgb, var(--warn) 14%, transparent);
  color: var(--warn); font-weight: 700; font-size: 15px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 11px;
}
.module-error .t { font-weight: 600; font-size: 13px; color: var(--text-body); }
.module-error .btn { margin-top: 12px; min-height: 38px; font-size: 12px; }

/* ---------------------------------------------------------------------------
   LOGIN VIEW — centered card on petrol field; split panel on desktop
--------------------------------------------------------------------------- */

.login-view {
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--petrol);
  display: flex;
  align-items: stretch;
}

.login-brand {
  display: none; /* desktop only */
  width: 44%;
  background: var(--petrol-deep);
  border-right: 1px solid color-mix(in srgb, var(--bone) 8%, transparent);
  padding: 38px 40px;
  flex-direction: column;
  justify-content: space-between;
}
.login-brand .logo { width: 150px; }
.login-brand .tagline {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 27px;
  line-height: 1.15;
  color: var(--bone);
}
.login-brand .brand-art {
  height: 120px;
  border-radius: 10px;
  border: 1px dashed color-mix(in srgb, var(--bone) 16%, transparent);
  background: repeating-linear-gradient(45deg,
    color-mix(in srgb, var(--bone) 5%, transparent),
    color-mix(in srgb, var(--bone) 5%, transparent) 8px,
    transparent 8px, transparent 16px);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-size: 10px; font-weight: 600;
  letter-spacing: 0.05em;
  color: color-mix(in srgb, var(--bone) 40%, transparent);
}

.login-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 26px;
  padding: 32px 20px 44px;
}
.login-main > .logo { width: 132px; }

.auth-card {
  width: 100%;
  max-width: 360px;
  background: var(--surface-dark);
  border: 1px solid color-mix(in srgb, var(--bone) 10%, transparent);
  border-radius: 16px;
  padding: 22px 20px;
  display: flex;
  flex-direction: column;
  gap: 15px;
}
.auth-card h1 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 19px;
  color: var(--bone);
}

/* tabs */
.auth-tabs {
  display: flex;
  border-bottom: 1px solid color-mix(in srgb, var(--bone) 12%, transparent);
}
.auth-tab {
  flex: 1;
  text-align: center;
  padding: 4px 4px 10px;
  min-height: var(--tap-min);
  font-size: 12.5px;
  font-weight: 500;
  color: color-mix(in srgb, var(--bone) 42%, transparent);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.auth-tab[aria-selected="true"] {
  font-weight: 600;
  color: var(--brass-bright);
  border-bottom-color: var(--brass);
}

.field label {
  display: block;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--bone) 50%, transparent);
  margin-bottom: 6px;
}
.field .input-wrap { position: relative; }
.field input {
  width: 100%;
  height: var(--tap-min);
  border: 1.5px solid color-mix(in srgb, var(--bone) 16%, transparent);
  border-radius: var(--radius-field);
  background: color-mix(in srgb, var(--bone) 4%, transparent);
  color: var(--bone);
  font-family: var(--font-ui);
  font-size: 14px;
  padding: 0 12px;
}
.field input.mono { font-family: var(--font-mono); }
.field input::placeholder { color: color-mix(in srgb, var(--bone) 40%, transparent); }
.field input:focus-visible {
  border-color: var(--brass-bright);
  background: color-mix(in srgb, var(--brass-bright) 6%, transparent);
  box-shadow: var(--focus-halo);
}
.field.field-error input { border-color: var(--warn); background: color-mix(in srgb, var(--warn) 8%, transparent); }
.field.field-error label { color: var(--warn-on-dark); }

.pw-toggle {
  position: absolute; top: 0; right: 0;
  height: var(--tap-min); min-width: var(--tap-min);
  padding: 0 12px;
  font-family: var(--font-mono);
  font-size: 10px; font-weight: 600; letter-spacing: 0.05em;
  color: color-mix(in srgb, var(--bone) 45%, transparent);
}
.pw-toggle:hover { color: var(--bone); }

.form-alert {
  display: flex; gap: 9px; align-items: center;
  background: color-mix(in srgb, var(--warn) 18%, transparent);
  border: 1px solid color-mix(in srgb, var(--warn) 50%, transparent);
  border-radius: var(--radius-field);
  padding: 9px 11px;
  font-size: 12.5px; font-weight: 500;
  color: var(--warn-on-dark);
}
.form-alert .glyph {
  width: 17px; height: 17px; flex: none; border-radius: 50%;
  background: var(--warn); color: var(--bone);
  font-weight: 700; font-size: 11px;
  display: flex; align-items: center; justify-content: center;
}
.form-alert.info {
  background: color-mix(in srgb, var(--bone) 6%, transparent);
  border-color: color-mix(in srgb, var(--bone) 18%, transparent);
  color: color-mix(in srgb, var(--bone) 65%, transparent);
}
.form-alert.info .glyph { background: color-mix(in srgb, var(--bone) 30%, transparent); color: var(--surface-dark); }

.auth-foot {
  text-align: center;
  font-size: 12px;
  color: color-mix(in srgb, var(--bone) 50%, transparent);
}
.auth-foot button { min-height: var(--tap-min); padding: 0 10px; color: inherit; }
.auth-foot button:hover { color: var(--bone); }

.demo-hint {
  width: 100%;
  max-width: 360px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  line-height: 1.6;
  color: color-mix(in srgb, var(--bone) 38%, transparent);
  text-align: center;
}
.demo-hint code { color: var(--brass-bright); font-family: inherit; }

@media (min-width: 880px) {
  .login-brand { display: flex; }
  .login-main > .logo { display: none; }
}

/* ---------------------------------------------------------------------------
   DASHBOARD VIEW
--------------------------------------------------------------------------- */

.dash-header {
  background: var(--bone);
  border-bottom: 1px solid var(--line);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.dash-header .logo { width: 96px; }
.dash-header .who { display: flex; align-items: center; gap: 10px; }
.avatar {
  width: 32px; height: 32px; flex: none;
  border-radius: 50%;
  background: var(--skeleton);
  border: 1px solid var(--line-strong);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 600; color: var(--text-mute);
}
.btn-signout {
  min-height: var(--tap-min);
  padding: 0 12px;
  font-size: 12px; font-weight: 600;
  color: var(--text-mute);
  border: 1px solid var(--line-dim);
  border-radius: 8px;
  background: var(--surface);
}
.btn-signout:hover { background: var(--surface-alt); }

.dash-wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 16px 16px 40px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.welcome h1 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 21px;
  color: var(--text);
}
.welcome .app-id {
  font-family: var(--font-mono);
  font-size: 11px; font-weight: 500;
  color: var(--text-faint);
  margin-top: 3px;
  text-transform: uppercase;
}

section.module h2 {
  margin: 0 0 11px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-faint);
}

/* ---- Alerts --------------------------------------------------------------- */

.alert {
  display: flex; gap: 11px; align-items: flex-start;
  border-radius: var(--radius-row);
  padding: 12px 13px;
  width: 100%;
  text-align: left;
}
.alert .glyph {
  width: 20px; height: 20px; flex: none; margin-top: 1px;
  border-radius: 50%;
  font-weight: 700; font-size: 12px;
  display: flex; align-items: center; justify-content: center;
}
.alert .body { flex: 1; }
.alert .t { display: block; font-weight: 600; font-size: 13.5px; color: var(--text-body); }
.alert .d { display: block; font-weight: 500; font-size: 12px; color: var(--text-mute); margin-top: 2px; }
.alert .go { font-weight: 600; font-size: 16px; color: var(--brass-deep); align-self: center; }

.alert-attention {
  background: color-mix(in srgb, var(--brass) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--brass) 40%, transparent);
  border-left: 3px solid var(--brass);
}
.alert-attention .glyph { background: var(--brass); color: var(--on-brass); }
.alert-attention:hover { background: color-mix(in srgb, var(--brass) 16%, transparent); }

.alert-success {
  background: color-mix(in srgb, var(--green) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--green) 40%, transparent);
  border-left: 3px solid var(--green);
  cursor: default;
}
.alert-success .glyph { background: var(--green); color: var(--bone); }

/* ---- Progress -------------------------------------------------------------
   Same DOM renders vertical (mobile) and horizontal (desktop). */

.progress-card { padding: 18px 16px; }

.stage-node {
  width: 26px; height: 26px; flex: none;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700;
  z-index: 1;
  position: relative;
}
.stage .stage-num { font-family: var(--font-mono); font-weight: 600; font-size: 11px; }
.stage-done .stage-node { background: var(--green); color: var(--bone); }
.stage-current .stage-node {
  background: var(--brass); color: var(--on-brass);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brass) 25%, transparent);
}
.stage-upcoming .stage-node {
  border: 1.5px solid var(--line-strong);
  background: var(--surface);
  color: var(--text-ghost);
}
.stage .t { display: block; font-weight: 600; font-size: 13px; color: var(--text-body); }
.stage-current .t { color: var(--brass-deep); }
.stage-upcoming .t { color: var(--text-ghost); }
.stage .d {
  display: block;
  font-family: var(--font-mono);
  font-size: 10.5px; font-weight: 500;
  color: var(--text-faint);
  margin-top: 2px;
  text-transform: uppercase;
}

/* mobile: vertical rail */
.stages { display: flex; flex-direction: column; }
.stage { display: flex; gap: 12px; }
.stage .rail { display: flex; flex-direction: column; align-items: center; }
.stage .connector { width: 2px; flex: 1; min-height: 18px; background: var(--line-strong); }
.stage-done .connector.after-done { background: var(--green); }
.stage .label { padding-bottom: 16px; }
.stage:last-child .label { padding-bottom: 0; }
.stage:last-child .connector { display: none; }

@media (min-width: 880px) {
  .stages { flex-direction: row; align-items: flex-start; }
  .stage { flex: 1; flex-direction: column; align-items: center; gap: 0; position: relative; }
  .stage .rail { flex-direction: row; width: 100%; justify-content: center; }
  .stage .connector {
    position: absolute; top: 12px; left: 50%; right: -50%;
    width: auto; height: 2px; min-height: 0;
  }
  .stage .label { padding: 11px 6px 0; text-align: center; }
}

/* ---- Documents ------------------------------------------------------------ */

.doc-list { display: flex; flex-direction: column; gap: 10px; }

.doc-row {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-row);
  padding: 11px 12px;
}
.doc-row.state-error { border-color: color-mix(in srgb, var(--warn) 40%, transparent); }

.doc-head { display: flex; align-items: center; gap: 11px; }
.doc-icon {
  width: 32px; height: 32px; flex: none;
  border-radius: 7px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px;
}
.doc-icon.i-verified { background: color-mix(in srgb, var(--green) 13%, transparent); color: var(--green); }
.doc-icon.i-uploaded { background: var(--skeleton-hi); color: var(--text-mute); }
.doc-icon.i-missing  { background: color-mix(in srgb, var(--warn) 12%, transparent); color: var(--warn); font-size: 15px; }
.doc-icon.i-error    { background: color-mix(in srgb, var(--warn) 14%, transparent); color: var(--warn); }
.doc-icon.i-busy {
  background: color-mix(in srgb, var(--brass) 14%, transparent);
  color: var(--brass-deep);
}
.doc-icon.i-busy .spinner { border-width: 2px; }

.doc-head .meta { flex: 1; min-width: 0; }
.doc-head .t {
  font-weight: 600; font-size: 13px; color: var(--text-body);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.doc-head .d { font-size: 11px; font-weight: 500; color: var(--text-faint); margin-top: 1px; }
.doc-head .d.warn-text { color: var(--warn); }
.doc-head .d .undo-btn {
  color: var(--brass-deep); font-weight: 600; font-size: 11px;
  min-height: 0; padding: 4px 2px; text-decoration: underline;
}

/* drop zone */
.dropzone {
  display: block;
  width: 100%;
  margin-top: 10px;
  min-height: var(--tap-min);
  border: 1.5px dashed var(--line-strong);
  border-radius: var(--radius-field);
  background: var(--surface-alt);
  padding: 14px;
  text-align: center;
  font-size: 12px; font-weight: 500;
  color: var(--text-faint);
}
.dropzone .accent { color: var(--brass-deep); font-weight: 600; }
.dropzone .constraints {
  font-family: var(--font-mono);
  font-size: 9.5px; font-weight: 500;
  color: var(--text-ghost);
  margin-top: 5px;
}
.dropzone:hover, .dropzone.dragover {
  border-color: var(--brass);
  background: color-mix(in srgb, var(--brass) 12%, transparent);
  color: var(--brass-deep);
  font-weight: 600;
}
.dropzone.dragover { box-shadow: inset 0 0 0 3px color-mix(in srgb, var(--brass) 18%, transparent); }

/* upload progress */
.upload-progress { margin-top: 11px; }
.upload-progress .track {
  height: 6px; border-radius: 4px;
  background: var(--skeleton-hi);
  overflow: hidden;
}
.upload-progress .fill {
  height: 100%; width: 0%;
  background: var(--brass);
  border-radius: 4px;
  transition: width 0.15s linear;
}

.doc-error-actions { display: flex; gap: 8px; margin-top: 10px; }
.doc-error-actions .btn { flex: 1; min-height: 38px; font-size: 12px; }

/* ---- Vehicle --------------------------------------------------------------- */

.vehicle-card { overflow: hidden; }
.vehicle-media {
  height: 150px;
  background: repeating-linear-gradient(45deg,
    color-mix(in srgb, var(--skeleton) 82%, var(--bone)),
    color-mix(in srgb, var(--skeleton) 82%, var(--bone)) 10px,
    var(--skeleton-hi) 10px, var(--skeleton-hi) 20px);
  display: flex; align-items: center; justify-content: center;
}
.vehicle-media .ph {
  font-family: var(--font-mono);
  font-size: 10px; font-weight: 600; letter-spacing: 0.05em;
  color: var(--text-ghost);
}
.vehicle-body { padding: 15px 15px 17px; }
.vehicle-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.vehicle-top .name { font-family: var(--font-display); font-weight: 500; font-size: 18px; color: var(--text); }
.vehicle-top .spec {
  font-family: var(--font-mono);
  font-size: 11px; font-weight: 500;
  color: var(--text-faint);
  margin-top: 2px;
  text-transform: uppercase;
}

.honest-number { display: flex; align-items: baseline; gap: 4px; margin: 14px 0 12px; font-family: var(--font-mono); }
.honest-number .cur { font-weight: 600; font-size: 20px; color: var(--brass); }
.honest-number .amt { font-weight: 600; font-size: 44px; line-height: 0.9; color: var(--brass); }
.honest-number .per { font-weight: 500; font-size: 13px; color: var(--text-faint); }
.honest-number .basis { font-weight: 600; font-size: 10px; color: var(--brass-deep); margin-left: 3px; }

.tax-split {
  display: flex;
  border: 1px solid var(--line);
  border-radius: var(--radius-field);
  overflow: hidden;
  margin-bottom: 12px;
}
.tax-cell { flex: 1; padding: 10px 12px; }
.tax-cell .k {
  font-family: var(--font-mono);
  font-size: 8.5px; font-weight: 600; letter-spacing: 0.05em;
}
.tax-cell .v { font-family: var(--font-mono); font-weight: 600; font-size: 18px; margin-top: 3px; }
.tax-cell.pre { background: var(--surface-dark); }
.tax-cell.pre .k { color: color-mix(in srgb, var(--bone) 55%, transparent); }
.tax-cell.pre .v { color: var(--bone); }
.tax-cell.taxin { background: var(--surface-alt); }
.tax-cell.taxin .k { color: var(--text-faint); }
.tax-cell.taxin .v { color: var(--text-body); }

.fee-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 9px 0;
  border-top: 1px solid var(--skeleton-hi);
  font-size: 12.5px; font-weight: 500;
  color: var(--text-mute);
}
.fee-row .v { font-family: var(--font-mono); font-weight: 600; font-size: 12.5px; color: var(--text-body); }
.fee-row .v.signal { color: var(--green); }

/* ---- Delivery --------------------------------------------------------------- */

.delivery-locked {
  background: var(--surface-dim);
  border: 1.5px dashed var(--line-dim);
  border-radius: var(--radius-card);
  padding: 22px 16px;
  text-align: center;
}
.delivery-locked .glyph {
  width: 32px; height: 32px; margin: 0 auto 9px;
  border-radius: 8px; background: var(--skeleton);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; color: var(--text-ghost);
}
.delivery-locked .t { font-weight: 600; font-size: 13px; color: var(--text-faint); }
.delivery-locked .d { font-size: 11.5px; font-weight: 500; color: var(--text-ghost); margin-top: 3px; }

.delivery-card { padding: 16px; }
.delivery-card .head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px;
}
.delivery-card .head .t { font-family: var(--font-display); font-weight: 500; font-size: 16px; color: var(--text); }
.kv-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 0;
  border-top: 1px solid var(--skeleton-hi);
  font-size: 12.5px; font-weight: 500; color: var(--text-mute);
}
.kv-row .v { font-family: var(--font-mono); font-weight: 600; font-size: 12.5px; color: var(--text-body); text-align: right; }
.delivery-contact {
  display: flex; align-items: center; gap: 10px;
  border-top: 1px solid var(--skeleton-hi);
  margin-top: 2px; padding-top: 10px;
}
.delivery-contact .meta .t { font-weight: 600; font-size: 12px; color: var(--text-body); }
.delivery-contact .links { display: flex; gap: 4px; margin-top: 2px; }
.delivery-contact .links a {
  font-family: var(--font-mono);
  font-size: 10px; font-weight: 600; letter-spacing: 0.04em;
  color: var(--brass-deep);
  text-decoration: none;
  padding: 6px 6px;
  min-height: 0;
}
.delivery-contact .links a:hover { text-decoration: underline; }

/* ---- Quick actions ----------------------------------------------------------- */

.qa-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.qa-btn {
  min-height: var(--tap-min);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-row);
  padding: 13px 12px;
  font-weight: 600; font-size: 12.5px;
  color: var(--text-body);
  text-align: left;
}
.qa-btn:hover { background: var(--surface-alt); border-color: var(--line-strong); }

/* ---- Desktop cockpit reflow ---------------------------------------------------- */

@media (min-width: 880px) {
  .dash-header { padding: 16px 26px; }
  .dash-header .logo { width: 118px; }
  .dash-wrap { padding: 22px 26px 60px; gap: 20px; }
  .welcome h1 { font-size: 24px; }
  .dash-grid {
    display: grid;
    grid-template-columns: 1.15fr 1fr;
    gap: 20px;
    align-items: start;
  }
  .vehicle-media { height: 170px; }
  .honest-number .amt { font-size: 50px; }
}

/* ---------------------------------------------------------------------------
   Modal
--------------------------------------------------------------------------- */

.modal-backdrop {
  position: fixed; inset: 0;
  background: color-mix(in srgb, var(--ink) 55%, transparent);
  display: flex; align-items: center; justify-content: center;
  padding: 18px;
  z-index: 50;
}
.modal {
  width: 100%; max-width: 440px;
  max-height: 84vh;
  overflow: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-card);
  padding: 18px;
}
.modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.modal-head .t { font-family: var(--font-display); font-weight: 500; font-size: 18px; color: var(--text); }
.modal-close {
  width: var(--tap-min); height: var(--tap-min);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; color: var(--text-mute);
  border-radius: 8px;
}
.modal-close:hover { background: var(--surface-alt); }
.modal .kv-row .v { font-family: var(--font-ui); }
.modal .section-label { margin: 14px 0 4px; }
.modal p { font-size: 13px; color: var(--text-mute); margin: 8px 0; }
.modal a { color: var(--brass-deep); font-weight: 600; }
.modal .modal-actions { display: flex; gap: 9px; margin-top: 14px; }
.modal .modal-actions .btn { flex: 1; font-size: 13px; }

.modal .pick-row {
  display: flex; align-items: center; gap: 11px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-row);
  background: var(--surface-alt);
  padding: 11px 12px;
  margin-top: 8px;
  text-align: left;
}
.modal .pick-row:hover { border-color: var(--brass); }
.modal .pick-row .t { flex: 1; font-weight: 600; font-size: 13px; color: var(--text-body); }
