/* DocRep · frontal del taller. Móvil primero: una mano, un pulgar, mucha luz. */
:root {
    --bg: oklch(96.5% 0.008 35); --surface: oklch(99.4% 0.004 35); --line: oklch(89% 0.012 35); --line-strong: oklch(82% 0.015 35); --field-line: oklch(62% 0.015 30);
    --ink: oklch(22% 0.018 30); --muted: oklch(46% 0.02 30);
    --brand: oklch(44% 0.12 28); --brand-ink: oklch(36% 0.11 28); --brand-soft: oklch(94% 0.03 28);
    --ok: oklch(46% 0.12 150); --ok-soft: oklch(94% 0.04 150);
    --warn: oklch(58% 0.13 70); --warn-ink: oklch(42% 0.1 65); --warn-soft: oklch(95% 0.05 85);
    --danger: oklch(50% 0.16 18); --danger-soft: oklch(95% 0.03 18);
    /* Matrícula europea: blanco, tinta, banda azul con estrellas amarillas. */
    --eu: oklch(42% 0.17 262); --eu-star: oklch(86% 0.17 95); --plate-white: oklch(99.5% 0 0); --plate-ink: oklch(18% 0.01 260);
    --plate-font: "Bahnschrift", "DIN Alternate", "DIN Condensed", "Roboto Condensed", "sans-serif-condensed", "Arial Narrow", system-ui, sans-serif;
    --radius: 10px; --ease: cubic-bezier(.25, 1, .5, 1);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
body { margin: 0; min-height: 100dvh; display: flex; flex-direction: column; font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; background: var(--bg); color: var(--ink); }
a { color: var(--brand); }
h1, h2 { margin: 0 0 12px; line-height: 1.2; letter-spacing: -0.01em; }
h1 { font-size: 26px; } h2 { font-size: 19px; }

/* Cabecera: fina y fija, para que el contenido mande. */
.topbar { position: sticky; top: 0; z-index: 15; background: color-mix(in oklch, var(--surface) 92%, transparent); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.topbar-in { max-width: 960px; margin: 0 auto; padding: 6px 8px 6px 16px; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.topbar img { height: 28px; width: auto; display: block; }
.who { display: flex; align-items: center; gap: 2px; font-size: 15px; color: var(--muted); }
.who > span { margin-right: 8px; }
.topbar-btn { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; min-width: 52px; min-height: 48px; padding: 4px 8px; border: 0; border-radius: 12px; background: transparent; color: var(--muted); font-size: 12px; font-weight: 650; text-decoration: none; }
.topbar-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.topbar-btn:hover, .topbar-btn[aria-current="page"] { background: var(--brand-soft); color: var(--brand-ink); }

main { flex: 1; width: 100%; max-width: 960px; margin: 0 auto; padding: 16px 16px 32px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-content: start; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 18px; }

/* Formularios */
input, select, textarea, button { font: inherit; color: inherit; }
input, select, textarea { width: 100%; min-height: 48px; padding: 10px 12px; border: 1px solid var(--field-line); border-radius: var(--radius); background: var(--surface); }
input[type=file] { padding: 8px; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; border-color: var(--brand); }
label { display: block; font-size: 14px; font-weight: 600; color: var(--muted); margin: 12px 0 6px; }

/* Botones: uno principal por pantalla; el resto, borde o tinta. */
button, .btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; border: 1px solid transparent; border-radius: 12px; padding: 10px 18px; background: var(--brand); color: var(--surface); cursor: pointer; text-decoration: none; font-weight: 650; transition: background-color .18s var(--ease), transform .12s var(--ease); touch-action: manipulation; }
button:hover, .btn:hover { background: var(--brand-ink); }
button:active, .btn:active { transform: scale(.98); }
button:focus-visible, .btn:focus-visible, a:focus-visible, summary:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
.btn-warn { background: var(--warn); color: var(--ink); } .btn-warn:hover { background: oklch(53% 0.13 70); }
.btn-ok { background: var(--ok); } .btn-ok:hover { background: oklch(40% 0.12 150); }
.btn-dark { background: var(--ink); } .btn-dark:hover { background: oklch(30% 0.02 30); }
.btn-ghost { background: transparent; color: var(--brand); border-color: var(--line-strong); min-height: 40px; padding: 6px 14px; }
.btn-ghost:hover { background: var(--brand-soft); }
.btn-line { background: var(--surface); color: var(--brand-ink); border-color: var(--brand); }
.btn-line:hover { background: var(--brand-soft); }
.btn-block { width: 100%; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; } .row > * { flex: 1; min-width: 140px; }
.grid2 { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); }

/* Matrícula: la identidad de cada trabajo, dibujada como la placa de verdad. */
.plate { display: inline-flex; align-items: stretch; vertical-align: middle; background: var(--plate-white); border: .085em solid var(--plate-ink); border-radius: .2em; overflow: hidden; font-size: 24px; line-height: 1; box-shadow: inset 0 0 0 .04em var(--plate-white), 0 .05em .12em oklch(22% 0.02 30 / .12); }
.plate-eu { display: flex; flex-direction: column; align-items: center; justify-content: space-between; gap: .06em; width: .82em; padding: .12em 0 .1em; background: var(--eu); color: var(--eu-star); }
.plate-eu svg { width: .62em; height: .62em; display: block; }
.plate-eu span { color: var(--plate-white); font: 700 .4em/1 system-ui, sans-serif; }
.plate-num { padding: .14em .42em .1em .36em; font: 700 1em/1.1 var(--plate-font); font-stretch: semi-condensed; letter-spacing: .05em; color: var(--plate-ink); white-space: nowrap; }
.plate-sm { font-size: 17px; }
.plate-xl { font-size: clamp(38px, 12.5vw, 60px); }

/* Bloque protagonista: matrícula, quién y cuánto tiempo. */
.hero { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 22px 18px 18px; display: grid; justify-items: center; gap: 10px; text-align: center; }
.hero-meta { margin: 0; color: var(--muted); font-size: 15px; }
.hero-data { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 16px; margin: 0; font-size: 15px; color: var(--muted); }
.hero .top-actions { width: 100%; margin-top: 6px; }
.timer { font: 700 44px/1 var(--plate-font); font-variant-numeric: tabular-nums; letter-spacing: .01em; }
.timer-xl { font-size: clamp(54px, 18vw, 76px); }
.status { display: inline-flex; align-items: center; gap: 6px; }
.status-dot { width: 9px; height: 9px; border-radius: 50%; background: currentColor; }
.badge-ok .status-dot { animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; } }

/* Volver: un enlace de pulgar, no un bloque. */
.back { display: inline-flex; align-items: center; gap: 2px; justify-self: start; min-height: 44px; margin: -6px 0 -10px -8px; padding: 0 10px 0 4px; border-radius: 10px; color: var(--brand); font-weight: 650; text-decoration: none; }
.back svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.back:hover { background: var(--brand-soft); }

/* Listas agrupadas: filas enteras pulsables, como los ajustes del móvil. */
.section-title { margin: 6px 4px -8px; font-size: 15px; font-weight: 650; color: var(--muted); }
.group { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.group > * + * { border-top: 1px solid var(--line); }
.group-row { display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 10px 12px 10px 16px; color: var(--ink); text-decoration: none; font-weight: 600; }
a.group-row:active, summary.group-row:active { background: var(--brand-soft); }
.group-row .grow { flex: 1; min-width: 0; }
.group-row small { display: block; font-size: 14px; font-weight: 500; color: var(--muted); }
.group-icon { width: 36px; height: 36px; flex: none; display: grid; place-items: center; border-radius: 10px; background: var(--brand-soft); color: var(--brand); }
.group-icon svg, .chev { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.chev { flex: none; color: var(--line-strong); }
details.group-item > summary { list-style: none; }
details.group-item > summary::-webkit-details-marker { display: none; }
details.group-item[open] > summary .chev { transform: rotate(90deg); }
details.group-item .chev { transition: transform .18s var(--ease); }
.group-body { padding: 4px 16px 16px; }

/* Lista de trabajos */
.job-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 4px 12px; min-height: 72px; padding: 12px 10px 12px 14px; color: var(--ink); text-decoration: none; }
.job-row:active { background: var(--brand-soft); }
.job-when { font-weight: 650; }
.job-when small { display: block; margin-top: 2px; font-size: 14px; font-weight: 500; color: var(--muted); }
.job-time { font: 700 17px/1 var(--plate-font); font-variant-numeric: tabular-nums; color: var(--ink); white-space: nowrap; }

.muted { color: var(--muted); font-size: 15px; }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 13px; font-weight: 650; background: var(--bg); color: var(--muted); border: 1px solid var(--line); }
.badge-ok { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.badge-warn { background: var(--warn-soft); color: var(--warn-ink); border-color: transparent; }
.badge-bad { background: var(--danger-soft); color: var(--danger); border-color: transparent; }
.badge-brand { background: var(--brand-soft); color: var(--brand-ink); border-color: transparent; }
.flash, .error { border-radius: 12px; padding: 12px 14px; font-weight: 550; }
.flash { background: var(--ok-soft); color: oklch(35% 0.1 150); }
.error { background: var(--danger-soft); color: var(--danger); border: 1px solid oklch(85% 0.06 18); }
ul.list { list-style: none; margin: 0; padding: 0; } ul.list li { padding: 12px 0; border-bottom: 1px solid var(--line); } ul.list li:last-child { border: 0; padding-bottom: 0; }
.media { display: grid; gap: 6px; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); }
.media img, .media video { width: 100%; border-radius: 10px; aspect-ratio: 1; object-fit: cover; background: var(--ink); display: block; }
.media audio { width: 100%; grid-column: 1 / -1; }
details summary { cursor: pointer; font-weight: 650; color: var(--brand); min-height: 44px; display: flex; align-items: center; }
details.group-item summary { color: var(--ink); }
.credit { border-top: 1px solid var(--line); background: var(--surface); }
.credit-in { max-width: 960px; margin: 0 auto; padding: 14px 16px; display: flex; align-items: center; justify-content: center; gap: 10px; font-size: 13px; color: var(--muted); flex-wrap: wrap; }
.credit img { height: 26px; width: auto; display: block; }
.credit a { color: var(--muted); }
body.has-bar .credit { display: none; }
[hidden] { display: none !important; }
body.no-scroll { overflow: hidden; }

/* Panel: escanear es la acción; escribir, la alternativa. */
.btn-xl { width: 100%; min-height: 64px; font-size: 19px; border-radius: 16px; }
.btn-xl svg { width: 26px; height: 26px; }
.scan-cta { flex-direction: column; gap: 10px; min-height: 148px; padding: 18px; border-radius: 22px; font-size: 21px; box-shadow: 0 10px 24px -14px oklch(44% 0.12 28 / .7); }
.scan-cta small { font-size: 15px; font-weight: 500; opacity: .85; }
.scan-frame-icon { width: 120px; height: 34px; border: 2.5px dashed oklch(100% 0 0 / .75); border-radius: 7px; display: grid; place-items: center; }
.scan-frame-icon svg { width: 22px; height: 22px; }
.or { display: flex; align-items: center; gap: 12px; margin: 2px 0 -4px; color: var(--muted); font-size: 14px; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line-strong); }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.chip { min-height: 40px; padding: 4px 12px; background: var(--plate-white); color: var(--plate-ink); border: 2px solid var(--plate-ink); border-radius: 6px; font: 700 17px var(--plate-font); letter-spacing: .05em; }
.chip:hover { background: var(--brand-soft); }
.plate-input { text-transform: uppercase; font: 700 30px/1 var(--plate-font) !important; letter-spacing: .08em; text-align: center; min-height: 64px; border: 3px solid var(--plate-ink) !important; border-radius: 8px !important; background: var(--plate-white) !important; padding-left: 52px !important; color: var(--plate-ink); }
.plate-input::placeholder { color: oklch(60% 0.01 260); }
.plate-input:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
.open-hint { margin: 10px 2px 12px; }
.open-hint:empty { display: none; }
.active-job { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px 14px; padding: 16px; border: 2px solid var(--ok); border-radius: 20px; background: var(--ok-soft); color: var(--ink); text-decoration: none; }
.active-job .timer { font-size: 30px; }
.active-job .btn { grid-column: 1 / -1; }

/* Visor de cámara */
.scanner { position: fixed; inset: 0; z-index: 50; background: oklch(12% 0.01 30); color: var(--surface); display: flex; flex-direction: column; }
.scanner video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.scan-frame { position: absolute; left: 8%; right: 8%; top: 40%; aspect-ratio: 4.2 / 1; transform: translateY(-50%); border: 3px solid var(--surface); border-radius: 10px; box-shadow: 0 0 0 100vmax oklch(12% 0.01 30 / .55); }
.scan-top, .scan-bottom { position: relative; z-index: 1; padding: 16px; display: flex; gap: 10px; align-items: center; }
.scan-top { justify-content: space-between; padding-top: max(16px, env(safe-area-inset-top)); }
.scan-bottom { margin-top: auto; flex-direction: column; padding-bottom: max(20px, env(safe-area-inset-bottom)); }
.scan-status { min-height: 48px; text-align: center; font-weight: 600; margin: 0; text-shadow: 0 1px 2px oklch(0% 0 0 / .6); }
.scan-status.is-error { color: oklch(85% 0.09 70); }
.shutter { width: 100%; max-width: 360px; min-height: 64px; font-size: 19px; border-radius: 14px; background: var(--surface); color: var(--ink); }
.shutter:hover { background: oklch(92% 0.01 35); }
.btn-on-dark { background: oklch(12% 0.01 30 / .72); color: var(--surface); border-color: oklch(100% 0 0 / .35); }
.btn-on-dark:hover { background: oklch(100% 0 0 / .24); }
/* Barra de captura de la sesión */
body.has-bar main { padding-bottom: calc(108px + env(safe-area-inset-bottom)); }
.capture-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: var(--surface); border-top: 1px solid var(--line); box-shadow: 0 -6px 20px oklch(22% 0.02 30 / .08); padding: 8px 10px calc(8px + env(safe-area-inset-bottom)); }
.capture-bar-in { max-width: 960px; margin: 0 auto; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.capture-bar button { flex-direction: column; gap: 2px; min-height: 64px; padding: 6px 4px; font-size: 13px; background: var(--brand-soft); color: var(--brand-ink); }
.capture-bar button:hover { background: oklch(90% 0.045 28); }
.capture-bar button.is-primary { background: var(--brand); color: var(--surface); }
.capture-bar svg { width: 26px; height: 26px; }
.recorder { position: fixed; left: 10px; right: 10px; bottom: calc(92px + env(safe-area-inset-bottom)); z-index: 21; max-width: 520px; margin: 0 auto; background: var(--ink); color: var(--surface); border-radius: 16px; padding: 16px; display: grid; gap: 12px; text-align: center; }
.recorder .timer { font-size: 36px; }
.recorder.is-live .timer::before { content: ""; display: inline-block; width: 12px; height: 12px; margin-right: 10px; border-radius: 50%; background: oklch(62% 0.2 25); vertical-align: middle; animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: .2; } }
.photo-menu { position: fixed; left: 10px; right: 10px; bottom: calc(92px + env(safe-area-inset-bottom)); z-index: 21; max-width: 420px; margin: 0 auto; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 12px 32px oklch(22% 0.02 30 / .18); padding: 8px; display: grid; gap: 6px; }
.photo-menu button { justify-content: flex-start; gap: 14px; min-height: 60px; padding: 8px 14px; background: var(--brand-soft); color: var(--brand-ink); text-align: left; font-size: 17px; }
.photo-menu button:hover { background: oklch(90% 0.045 28); }
.photo-menu svg { width: 26px; height: 26px; flex: none; }
.photo-menu small { display: block; font-size: 13px; font-weight: 500; color: var(--muted); }
.shot { margin: 0; display: grid; gap: 6px; align-content: start; }
.shot figcaption { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 14px; }
.reading { font: 700 15px ui-monospace, Consolas, monospace; letter-spacing: 1px; overflow-wrap: anywhere; }
.vehicle-data { display: flex; flex-wrap: wrap; gap: 8px 24px; align-items: center; }
.uploads { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.upload { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; display: grid; grid-template-columns: 1fr auto; gap: 6px 10px; align-items: center; }
.upload-title { font-weight: 650; } .upload-state { font-size: 13px; color: var(--muted); }
.upload .meter { grid-column: 1 / -1; height: 6px; border-radius: 3px; background: var(--bg); overflow: hidden; }
.upload .meter span { display: block; height: 100%; width: 0; background: var(--brand); transition: width .2s var(--ease); }
.upload.is-done .meter span { background: var(--ok); width: 100%; } .upload.is-done .upload-state { color: var(--ok); }
.upload.is-error { border-color: oklch(85% 0.06 18); } .upload.is-error .upload-state { color: var(--danger); grid-column: 1 / -1; }

/* Pestañas y cronología */
.tabs { display: flex; gap: 4px; padding: 4px; background: oklch(93% 0.012 35); border-radius: 14px; }
.tabs a { flex: 1; text-align: center; min-height: 44px; display: flex; align-items: center; justify-content: center; border-radius: 11px; text-decoration: none; color: var(--muted); font-weight: 650; }
.tabs a[aria-current="page"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px oklch(22% 0.02 30 / .14); }
.stat { font: 700 34px/1.05 var(--plate-font); font-variant-numeric: tabular-nums; }
.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.timeline li { display: grid; grid-template-columns: 50px 1fr; gap: 12px; position: relative; padding-bottom: 18px; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before { content: ""; position: absolute; left: 62px; top: 8px; bottom: 0; width: 2px; background: var(--line); }
.timeline li:last-child::before { display: none; }
.timeline li > div { position: relative; padding-left: 14px; min-width: 0; }
.timeline li > div::before { content: ""; position: absolute; left: -7px; top: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--surface); border: 2px solid var(--brand); }
.timeline time { font: 700 15px var(--plate-font); font-variant-numeric: tabular-nums; color: var(--muted); padding-top: 1px; }
.timeline img, .timeline video { width: 100%; max-width: 360px; border-radius: 12px; display: block; }
.day-link { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 4px 12px; padding: 14px 10px 14px 16px; text-decoration: none; color: inherit; }
.day-link:active { background: var(--brand-soft); }
.day-link strong { font-size: 17px; }
.day-link .muted { grid-column: 1 / 2; font-size: 14px; }
.day-link .stat { font-size: 19px; grid-row: 1 / 3; grid-column: 2; }
.day-link .chev { grid-row: 1 / 3; grid-column: 3; }
.counts { display: flex; flex-wrap: wrap; gap: 2px 12px; margin-top: 4px; font-size: 14px; font-weight: 600; color: var(--muted); }
.counts > span { display: inline-flex; align-items: center; gap: 4px; }
.counts svg { width: 16px; height: 16px; color: var(--brand); }
.top-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.top-actions button { width: 100%; min-height: 56px; font-size: 17px; border-radius: 14px; }
.top-actions form { margin: 0; }
@media (max-width: 440px) { .who > span { display: none; } }
.password-field { position: relative; display: block; }
.password-field input { padding-right: 52px; }
.show-password { position: absolute; top: 0; right: 0; width: 48px; min-height: 44px; height: 100%; padding: 0; background: transparent; color: var(--muted); border-radius: 0 var(--radius) var(--radius) 0; }
.show-password:hover, .show-password.is-visible { background: transparent; color: var(--brand); }
.show-password svg { width: 22px; height: 22px; }
.show-password .eye-closed, .show-password.is-visible .eye-open { display: none; }
.show-password.is-visible .eye-closed { display: block; }

/* Datos del taller */
.form-grid { display: grid; gap: 0 16px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.form-grid .span-all { grid-column: 1 / -1; }
input[aria-invalid="true"] { border-color: var(--danger); background: var(--danger-soft); }
input.readonly { background: var(--bg); color: var(--muted); }
.checks { border: 0; margin: 16px 0 0; padding: 0; }
.checks legend { font-size: 13px; font-weight: 600; color: var(--muted); padding: 0; margin-bottom: 4px; }
.check { display: flex; gap: 10px; align-items: flex-start; margin: 0; padding: 8px 0; font-size: 15px; font-weight: 400; color: var(--ink); cursor: pointer; }
.check input { width: 22px; height: 22px; min-height: 0; margin: 1px 0 0; flex: none; accent-color: var(--brand); }
.placa-icon { width: 22px; height: 22px; flex: none; color: oklch(33% 0.13 268); margin-top: 1px; }
.placa-grid { display: grid; gap: 20px 32px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 760px) { .placa-grid { grid-template-columns: 17rem minmax(0, 1fr); align-items: start; } .placa-marco { position: sticky; top: 16px; } }
.placa-marco { margin: 0; max-width: 17rem; }
.placa-marco figcaption { margin-top: 8px; }
.placa { --placa-azul: oklch(33% 0.13 268); --placa-blanco: oklch(98.5% 0.003 268); aspect-ratio: 1; display: grid; grid-template-rows: 1.9fr 1.3fr .8fr; gap: 5%; padding: 7%; background: var(--placa-azul); border-radius: 9%; box-shadow: inset 0 0 0 3px oklch(85% 0.01 268); color: var(--placa-azul); }
.placa .ramas { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5%; }
.placa .medio { display: grid; grid-template-columns: 1fr 1fr; gap: 5%; }
.placa .hueco, .placa .especialidades, .placa .registro { background: var(--placa-blanco); border-radius: 2px; }
.placa .hueco { display: grid; place-items: center; }
.placa .hueco svg { width: 90%; height: 90%; }
.placa .hueco:not(.ocupado) svg { visibility: hidden; }
.placa .especialidades { display: grid; grid-template-columns: repeat(4, 1fr); grid-template-rows: repeat(2, 1fr); }
.placa .celda { display: grid; place-items: center; border-right: 1px solid var(--placa-azul); border-bottom: 1px solid var(--placa-azul); }
.placa .celda:nth-child(4n) { border-right: 0; }
.placa .celda:nth-child(n+5) { border-bottom: 0; }
.placa .celda svg { width: 75%; height: 75%; }
.placa-asoreca { margin-top: 16px; aspect-ratio: 2 / 1; display: grid; place-items: center; align-content: center; gap: 10px; padding: 8%; background: var(--surface); border: 3px solid var(--brand); border-radius: 9%; box-shadow: inset 0 0 0 4px var(--surface), inset 0 0 0 6px var(--brand-soft); }
.placa-asoreca img { width: 82%; height: auto; }
.placa-asoreca span { width: 100%; padding: 6px 0; text-align: center; background: var(--brand); color: var(--surface); border-radius: 4px; font: 700 15px/1.2 system-ui, sans-serif; letter-spacing: .14em; text-transform: uppercase; }
.verified { display: flex; align-items: center; gap: 8px; margin: 12px 0 0; color: var(--ok); font-weight: 700; }
.verified svg { width: 24px; height: 24px; flex: none; }
.placa .registro { display: grid; place-items: center; font: 600 clamp(18px, 6vw, 26px)/1 system-ui, sans-serif; letter-spacing: .04em; color: oklch(20% 0.01 268); font-variant-numeric: tabular-nums; }
@media (prefers-reduced-motion: reduce) { *, *::before { transition: none !important; animation: none !important; } }

/* Ajustes del rediseño móvil */
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hero-data { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px 18px; font-size: 15px; }
.hero-data > span { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: center; }
.vehicle-data { display: flex; flex-wrap: wrap; gap: 8px 24px; align-items: center; padding: 14px 16px; }
.vehicle-data > span { display: inline-flex; align-items: center; gap: 6px; }
.plate-field { position: relative; display: block; }
.plate-field .plate-eu { position: absolute; left: 3px; top: 3px; bottom: 3px; width: auto; padding: 6px 7px 5px; font-size: 36px; border-radius: 5px 0 0 5px; pointer-events: none; }
.scan-cta-compact { flex-direction: row; min-height: 64px; padding: 10px 18px; border-radius: 16px; font-size: 18px; background: var(--surface); color: var(--brand-ink); border-color: var(--brand); box-shadow: none; }
.scan-cta-compact:hover { background: var(--brand-soft); }
.scan-cta-compact .scan-frame-icon { width: 52px; height: 30px; border-color: currentColor; border-width: 2px; }
/* Formularios largos: guardar siempre a mano. */
.save-bar { position: sticky; bottom: 0; z-index: 5; display: grid; gap: 6px; justify-items: center; margin: 0 -16px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: color-mix(in oklch, var(--bg) 92%, transparent); backdrop-filter: blur(8px); border-top: 1px solid var(--line); }
.save-bar .muted { font-size: 13px; }
/* Accesibilidad: foco visible dentro de las listas y sin quedar tapado por las barras fijas. */
html { scroll-padding: 72px 0 120px; }
.group :is(a, summary):focus-visible { outline-offset: -3px; background: var(--brand-soft); }
.btn-finish { background: var(--surface); color: var(--ink); border: 2px solid var(--ink); }
.btn-finish:hover { background: oklch(93% 0.01 30); }
.top-actions { grid-template-columns: 1.3fr 1fr; gap: 14px; }
/* Con el teclado abierto (nota, material) la barra de captura solo estorba. */
body:has(main input:focus, main textarea:focus, main select:focus) .capture-bar { display: none; }
.job-time .unit { font: 600 13px system-ui, sans-serif; color: var(--muted); }
