/* Venta del auto — misma familia visual que la app Auto, en azul. */
:root {
  color-scheme: light;
  --bg: #f3f4f7; --surface: #fff; --surface-2: #eceef3; --ink: #14171f; --ink-2: #4a5060; --muted: #858b99;
  --line: #e3e6ec; --border: rgba(20, 23, 31, .08);
  --accent: #1f5fbf; --accent-ink: #184c99; --accent-soft: rgba(31, 95, 191, .1);
  --good: #1a9d55; --good-ink: #127a41; --good-soft: rgba(26, 157, 85, .12);
  --warn: #c98a0c; --warn-soft: rgba(232, 163, 23, .14);
  --bad: #d23c3c; --bad-ink: #b02a2a; --bad-soft: rgba(210, 60, 60, .1);
  --shadow: 0 1px 2px rgba(20, 23, 31, .05), 0 6px 20px rgba(20, 23, 31, .05);
  --radius: 18px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark; --bg: #0f1115; --surface: #191c22; --surface-2: #232730; --ink: #eef0f4; --ink-2: #c3c8d2; --muted: #8b91a0;
    --line: #2a2e37; --border: rgba(255,255,255,.08); --accent: #4d8ef0; --accent-ink: #8db6f7; --accent-soft: rgba(77,142,240,.16);
    --good-ink: #3ccb7f; --good-soft: rgba(60,203,127,.14); --bad-ink: #ef7676; --bad-soft: rgba(239,118,118,.14); --shadow: none;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark; --bg: #0f1115; --surface: #191c22; --surface-2: #232730; --ink: #eef0f4; --ink-2: #c3c8d2; --muted: #8b91a0;
  --line: #2a2e37; --border: rgba(255,255,255,.08); --accent: #4d8ef0; --accent-ink: #8db6f7; --accent-soft: rgba(77,142,240,.16);
  --good-ink: #3ccb7f; --good-soft: rgba(60,203,127,.14); --bad-ink: #ef7676; --bad-soft: rgba(239,118,118,.14); --shadow: none;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font: 15px/1.45 Manrope, system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
h1, h2 { margin: 0; line-height: 1.2; letter-spacing: -.01em; }
h1 { font-size: 24px; font-weight: 800; }
h2 { font-size: 16px; font-weight: 800; }
p { margin: 0; }
button, input, select { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.neg { color: var(--bad-ink); }
.pos { color: var(--good-ink); }
main { max-width: 640px; margin: 0 auto; padding: 18px 16px calc(96px + env(safe-area-inset-bottom)); }
.top { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.top p { margin-top: 2px; color: var(--muted); font-size: 13px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.card + .card, .card + .sec, .sec + .card, .sec + .sec { margin-top: 14px; }
.hero { background: var(--accent); color: #fff; border: 0; }
.hero .label { font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; opacity: .85; }
.hero .big { margin: 4px 0 2px; font-size: 36px; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1.1; }
.hero .sub { font-size: 13px; opacity: .88; }
.hero-fila { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 14px; padding-top: 12px; border-top: 1px solid rgba(255,255,255,.25); }
.hero-fila span { display: block; font-size: 12px; opacity: .85; }
.hero-fila b { font-size: 17px; font-variant-numeric: tabular-nums; }
.sec { margin-top: 18px; }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin: 0 4px 8px; }
.fila { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.fila:last-child { border-bottom: 0; }
.fila small { display: block; color: var(--muted); font-size: 12px; }
.fila b { flex: none; font-variant-numeric: tabular-nums; white-space: nowrap; }
.fila.total { font-weight: 800; font-size: 16px; }
.item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 0; border: 0; border-bottom: 1px solid var(--line); background: none; text-align: left; cursor: pointer; }
.item:last-child { border-bottom: 0; }
.item .txt { flex: 1; min-width: 0; }
.item .t { font-weight: 700; }
.item .s { color: var(--muted); font-size: 12.5px; }
.item b { flex: none; font-variant-numeric: tabular-nums; }
.estado { flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--good); }
.estado.falta { background: var(--bad); }
.estado.presu { background: var(--warn); }
.revisar { display: inline-block; margin-left: 4px; padding: 1px 7px; border-radius: 99px; background: var(--warn-soft); color: #8a5c00; font-size: 11px; font-weight: 700; }
.esc { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); text-align: left; cursor: pointer; }
.esc + .esc { margin-top: 8px; }
.esc.on { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.esc .txt { flex: 1; min-width: 0; }
.esc .t { font-weight: 700; font-size: 14px; }
.esc .s { color: var(--muted); font-size: 12px; }
.esc b { flex: none; font-variant-numeric: tabular-nums; }
.paso { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.paso:last-child { border-bottom: 0; }
.paso input { width: 22px; height: 22px; flex: none; accent-color: var(--good); }
.paso.ok span { color: var(--muted); text-decoration: line-through; }
.field { display: grid; gap: 6px; margin-bottom: 12px; }
.field label { font-size: 13px; font-weight: 700; }
.field input, .field select { width: 100%; min-height: 46px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); font-size: 16px; }
.dos { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 10px 16px; border: 0; border-radius: 12px; background: var(--accent); color: #fff; font-weight: 800; cursor: pointer; text-decoration: none; }
.btn.ghost { background: var(--surface-2); color: var(--ink); }
.btn.danger { background: var(--bad-soft); color: var(--bad-ink); }
.btn.block { width: 100%; }
.acciones { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.link { color: var(--accent-ink); font-weight: 700; text-decoration: none; }
.tabbar { position: fixed; inset: auto 0 0; z-index: 10; background: var(--surface); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
.tabbar nav { display: grid; grid-template-columns: repeat(4, 1fr); max-width: 640px; margin: 0 auto; }
.tabbar a { display: grid; justify-items: center; gap: 2px; padding: 10px 4px 9px; color: var(--muted); font-size: 12px; font-weight: 700; text-decoration: none; }
.tabbar a i { font-size: 19px; font-style: normal; line-height: 1; }
.tabbar a.on { color: var(--accent); }
.fondo { position: fixed; inset: 0; z-index: 20; display: grid; align-items: end; background: rgba(10, 12, 18, .45); }
.hoja { width: 100%; max-width: 640px; max-height: 92vh; margin: 0 auto; overflow: auto; padding: 18px 16px calc(18px + env(safe-area-inset-bottom)); border-radius: 22px 22px 0 0; background: var(--bg); }
.hoja h2 { margin-bottom: 14px; }
.toast { position: fixed; left: 50%; bottom: calc(84px + env(safe-area-inset-bottom)); z-index: 30; transform: translateX(-50%); padding: 10px 16px; border-radius: 99px; background: var(--ink); color: var(--bg); font-size: 14px; font-weight: 700; opacity: 0; transition: opacity .2s; pointer-events: none; }
.toast.on { opacity: 1; }

.tipos { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 10px; }
.tipos span { display: block; color: var(--muted); font-size: 12px; }
.tipos b { font-size: 15px; font-variant-numeric: tabular-nums; }
