/* Capa Taller — hoja única. Mundo visual de la landing de Capa Tek:
   noche y marino, menta para lo resuelto, naranjo para lo que espera a alguien.
   Poppins para todo; Marcellus solo en la marca y en los títulos de página. */

@font-face { font-family: "Poppins"; font-weight: 400; font-style: normal; font-display: swap; src: url("../fonts/poppins-400.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-weight: 500; font-style: normal; font-display: swap; src: url("../fonts/poppins-500.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-weight: 600; font-style: normal; font-display: swap; src: url("../fonts/poppins-600.woff2") format("woff2"); }
@font-face { font-family: "Marcellus"; font-weight: 400; font-style: normal; font-display: swap; src: url("../fonts/marcellus-400.woff2") format("woff2"); }

/* Cambio de página fluido: el contenido se desvanece, el menú no se mueve */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .16s; animation-timing-function: cubic-bezier(.16, 1, .3, 1); }
.lateral { view-transition-name: lateral; }
.barra-inferior { view-transition-name: barra-inferior; }
::view-transition-old(lateral), ::view-transition-new(lateral), ::view-transition-old(barra-inferior), ::view-transition-new(barra-inferior) { animation: none; }

:root {
  --noche: #0f2233;
  --noche-2: #16304a;
  --marino: #17386b;
  --marino-fuerte: #102a52;
  --marino-suave: #e7edf6;
  --menta: #8fd0bc;
  --menta-texto: #1f6a56;
  --menta-suave: #e2f3ed;
  --naranjo: #e8743b;
  --naranjo-texto: #9a4215;
  --naranjo-suave: #fdeee5;
  --rojo: #b3261e;
  --rojo-suave: #fbe9e7;
  --tinta: #1d1d1f;
  --suave: #56606a;
  --claro-noche: #aab8c8;
  --fondo: #eef4f2;
  --fondo-2: #f6f9f8;
  --linea: #cfdcd7;
  --linea-suave: #e1eae6;
  --blanco: #fff;

  --fuente: "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;
  --titulo: "Marcellus", Georgia, serif;

  --r-chico: 6px;
  --r: 10px;
  --r-grande: 14px;
  --sombra: 0 1px 2px rgb(15 34 51 / .06), 0 6px 18px -8px rgb(15 34 51 / .18);
  --sombra-alta: 0 2px 4px rgb(15 34 51 / .08), 0 18px 40px -16px rgb(15 34 51 / .35);
  --suavizado: cubic-bezier(.16, 1, .3, 1);
  --lateral: 244px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 5rem; }
body {
  margin: 0;
  font-family: var(--fuente);
  font-size: .9375rem;
  line-height: 1.5;
  color: var(--tinta);
  background: var(--fondo);
  -webkit-font-smoothing: antialiased;
  accent-color: var(--marino);
  caret-color: var(--marino);
}
::selection { background: var(--menta); color: var(--noche); }
h1, h2, h3, h4, p, figure, ul, ol, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: var(--marino); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--marino-fuerte); }
img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
table { border-collapse: collapse; width: 100%; }
:focus-visible { outline: 2px solid var(--marino); outline-offset: 2px; border-radius: 4px; }
[hidden] { display: none !important; }

h1 { font-family: var(--titulo); font-weight: 400; font-size: 1.875rem; line-height: 1.15; letter-spacing: -.005em; text-wrap: balance; }
h2 { font-size: 1.0625rem; font-weight: 600; line-height: 1.3; }
h3 { font-size: .9375rem; font-weight: 600; }
.suave { color: var(--suave); }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.derecha { text-align: right; }
.fuerte { font-weight: 600; }
.chico { font-size: .8125rem; }
.separa { margin-top: 1.75rem; }
.fila { display: flex; align-items: center; gap: .625rem; flex-wrap: wrap; }
.fila-entre { display: flex; align-items: center; justify-content: space-between; gap: .75rem; flex-wrap: wrap; }
.pila { display: grid; gap: 1rem; grid-template-columns: minmax(0, 1fr); }
.pila > *, .rejilla > *, .dos-columnas > *, .pub-cuerpo > * { min-width: 0; }
.pila-chica { display: grid; gap: .5rem; }
.solo-movil { display: none; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.icono { display: inline-block; vertical-align: -.2em; width: 1.125rem; height: 1.125rem; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.icono-chico { width: .9375rem; height: .9375rem; }
.icono-grande { width: 1.5rem; height: 1.5rem; }

/* ---------- Franja de demostración ---------- */
.franja-demo {
  background: var(--noche); color: var(--claro-noche);
  font-size: .75rem; text-align: center; padding: .3rem 1rem;
  border-bottom: 1px solid var(--noche-2);
}
.franja-demo strong { color: var(--menta); font-weight: 500; }

/* ---------- Estructura del panel ---------- */
.app { display: grid; grid-template-columns: var(--lateral) minmax(0, 1fr); min-height: 100vh; }
.lateral {
  background: var(--noche); color: var(--claro-noche);
  display: flex; flex-direction: column; gap: 1.25rem;
  padding: 1.25rem .875rem 1rem;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  scrollbar-width: thin; scrollbar-color: var(--noche-2) transparent;
}
.marca { display: flex; align-items: center; gap: .625rem; padding: 0 .5rem; color: var(--blanco); text-decoration: none; }
.marca:hover { color: var(--blanco); }
.marca-sello {
  width: 2rem; height: 2rem; border-radius: 9px; background: var(--menta); color: var(--noche);
  display: grid; place-items: center;
}
.marca-nombre { font-family: var(--titulo); font-size: 1.25rem; line-height: 1; }
.marca-taller { display: block; font-family: var(--fuente); font-size: .6875rem; color: var(--claro-noche); margin-top: .2rem; }
.nav-grupo + .nav-grupo { margin-top: 1rem; }
.nav-titulo { font-size: .6875rem; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: #7f93a8; padding: 0 .625rem .375rem; }
.nav-enlace {
  display: flex; align-items: center; gap: .625rem;
  padding: .5rem .625rem; border-radius: 8px;
  color: var(--claro-noche); text-decoration: none; font-weight: 500; font-size: .875rem;
  transition: background .15s, color .15s;
}
.nav-enlace:hover { background: var(--noche-2); color: var(--blanco); }
.nav-enlace.activo { background: var(--menta); color: var(--noche); }
.nav-enlace .cuenta { margin-left: auto; font-size: .6875rem; font-weight: 600; background: var(--naranjo); color: var(--blanco); border-radius: 99px; padding: 0 .4rem; min-width: 1.25rem; text-align: center; line-height: 1.25rem; }
.lateral-pie { margin-top: auto; border-top: 1px solid var(--noche-2); padding: .875rem .5rem 0; display: grid; gap: .5rem; }
.quien { color: var(--blanco); font-size: .8125rem; font-weight: 500; line-height: 1.3; }
.quien small { display: block; color: var(--claro-noche); font-weight: 400; font-size: .75rem; }
.salir { background: none; border: 0; padding: 0; color: var(--claro-noche); cursor: pointer; display: inline-flex; align-items: center; gap: .4rem; font-size: .8125rem; }
.salir:hover { color: var(--blanco); }

.principal { min-width: 0; display: flex; flex-direction: column; }
.barra-movil { display: none; }
.pagina { width: 100%; max-width: 1320px; margin: 0 auto; padding: 1.75rem 2rem 4rem; }
.pagina-cab { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem 1.5rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.pagina-cab .bajada { color: var(--suave); margin-top: .375rem; max-width: 65ch; }
.pagina-acciones { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.volver { display: inline-flex; align-items: center; gap: .25rem; font-size: .8125rem; color: var(--suave); text-decoration: none; margin-bottom: .5rem; }
.volver:hover { color: var(--marino); }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 2.5rem; padding: .45rem .95rem;
  border: 1px solid var(--linea); border-radius: 8px;
  background: var(--blanco); color: var(--tinta);
  font-weight: 500; font-size: .875rem; line-height: 1.2; text-decoration: none; white-space: nowrap;
  cursor: pointer; user-select: none;
  transition: background .15s, border-color .15s, color .15s, transform .15s var(--suavizado), box-shadow .15s;
}
.btn:hover { border-color: #a9bdb6; background: var(--fondo-2); color: var(--tinta); }
.btn:active { transform: translateY(1px); }
.btn-primario { background: var(--marino); border-color: var(--marino); color: var(--blanco); box-shadow: 0 1px 2px rgb(23 56 107 / .25); }
.btn-primario:hover { background: var(--marino-fuerte); border-color: var(--marino-fuerte); color: var(--blanco); }
.btn-fantasma { border-color: transparent; background: transparent; color: var(--marino); }
.btn-fantasma:hover { background: var(--marino-suave); border-color: transparent; color: var(--marino-fuerte); }
.btn-peligro { color: var(--rojo); }
.btn-peligro:hover { background: var(--rojo-suave); border-color: #e3b1ad; color: var(--rojo); }
.btn-chico { min-height: 2rem; padding: .25rem .65rem; font-size: .8125rem; border-radius: 7px; }
.btn-grande { min-height: 3rem; padding: .7rem 1.4rem; font-size: 1rem; border-radius: 10px; }
.btn-bloque { width: 100%; }
.btn[disabled], .btn.inactivo { opacity: .5; cursor: not-allowed; pointer-events: none; }
.btn.enviando { pointer-events: none; opacity: .75; }
.btn.enviando .icono { animation: girar .8s linear infinite; }
@keyframes girar { to { transform: rotate(360deg); } }

/* ---------- Superficies ---------- */
.panel { background: var(--blanco); border: 1px solid var(--linea-suave); border-radius: var(--r-grande); box-shadow: 0 1px 2px rgb(15 34 51 / .04); }
.panel-cab { display: flex; align-items: center; justify-content: space-between; gap: .75rem; flex-wrap: wrap; padding: .95rem 1.25rem; border-bottom: 1px solid var(--linea-suave); }
.panel-cab p { color: var(--suave); font-size: .8125rem; }
.panel-cuerpo { padding: 1.25rem; }
.panel > .tabla-envoltura:last-child { border-radius: 0 0 var(--r-grande) var(--r-grande); }
.panel-pie { padding: .85rem 1.25rem; border-top: 1px solid var(--linea-suave); color: var(--suave); font-size: .8125rem; }

.rejilla { display: grid; gap: 1.25rem; }
.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.dos-columnas { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 1.25rem; align-items: start; }

/* ---------- Tablas ---------- */
.tabla-envoltura { overflow-x: auto; scrollbar-width: thin; scrollbar-color: var(--linea) transparent; }
.tabla th, .tabla td { padding: .7rem .7rem; text-align: left; vertical-align: middle; }
.tabla th:first-child, .tabla td:first-child { padding-left: 1.25rem; }
.tabla td.fuerte, .tabla td time { white-space: nowrap; }
.tabla th:last-child, .tabla td:last-child { padding-right: 1.25rem; }
.tabla td .estado, .tabla td .patente { vertical-align: middle; }
.tabla th { font-size: .75rem; font-weight: 500; color: var(--suave); white-space: nowrap; border-bottom: 1px solid var(--linea-suave); background: var(--fondo-2); }
.tabla td { border-bottom: 1px solid var(--linea-suave); font-variant-numeric: tabular-nums; }
.tabla tbody tr:last-child td { border-bottom: 0; }
.tabla th.num, .tabla td.num { text-align: right; }
.tabla tfoot td { border-top: 1px solid var(--linea); border-bottom: 0; font-weight: 600; background: var(--fondo-2); }
.tabla .fila-enlace { cursor: pointer; transition: background .12s; }
.tabla .fila-enlace:hover { background: var(--fondo-2); }
.tabla td small { display: block; color: var(--suave); font-size: .8125rem; }
.tabla .acciones { text-align: right; white-space: nowrap; }
.tabla tr.atenuada td { color: var(--suave); }

/* ---------- Cifras de resumen: una franja, no tarjetas ---------- */
.cifras { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); background: var(--blanco); border: 1px solid var(--linea-suave); border-radius: var(--r-grande); overflow: hidden; }
.cifra { padding: 1rem 1.25rem; border-left: 1px solid var(--linea-suave); min-width: 0; }
.cifra:first-child { border-left: 0; }
.cifra-rotulo { font-size: .8125rem; color: var(--suave); }
.cifra-valor { font-size: 1.5rem; font-weight: 600; line-height: 1.2; font-variant-numeric: tabular-nums; margin-top: .15rem; white-space: nowrap; }
.cifra-nota { font-size: .75rem; color: var(--suave); margin-top: .15rem; }
.cifra.destacada { background: var(--noche); color: var(--blanco); }
.cifra.destacada .cifra-rotulo, .cifra.destacada .cifra-nota { color: var(--claro-noche); }
.cifra.destacada .cifra-valor { color: var(--menta); }

/* ---------- Pares de datos ---------- */
.datos { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 1rem 1.5rem; }
.dato-rotulo { font-size: .75rem; color: var(--suave); }
.dato-valor { font-weight: 500; overflow-wrap: anywhere; }

/* ---------- Formularios ---------- */
.campos { display: grid; gap: 1rem 1.25rem; }
.campos-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.campos-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.campos-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.campo { display: grid; gap: .3rem; align-content: start; min-width: 0; }
.campo.ancho { grid-column: 1 / -1; }
.campo > label, .campo > .rotulo { font-size: .8125rem; font-weight: 500; }
.campo .opcional { color: var(--suave); font-weight: 400; }
.control, .campo input:not([type=checkbox]):not([type=radio]):not([type=file]), .campo select, .campo textarea {
  width: 100%; min-height: 2.5rem; padding: .45rem .7rem;
  border: 1px solid var(--linea); border-radius: 8px; background: var(--blanco);
  transition: border-color .15s, box-shadow .15s;
}
.campo textarea { resize: vertical; line-height: 1.5; }
.control:hover, .campo input:hover, .campo select:hover, .campo textarea:hover { border-color: #a9bdb6; }
.control:focus, .campo input:focus, .campo select:focus, .campo textarea:focus { outline: 0; border-color: var(--marino); box-shadow: 0 0 0 3px rgb(23 56 107 / .16); }
.campo input::placeholder, .campo textarea::placeholder { color: #6b7780; }
.campo input[disabled], .campo select[disabled] { background: var(--fondo-2); color: var(--suave); }
.campo .ayuda { font-size: .75rem; color: var(--suave); }
.campo .error { font-size: .75rem; color: var(--rojo); font-weight: 500; }
.campo.con-error input, .campo.con-error select, .campo.con-error textarea { border-color: var(--rojo); }
.casilla { display: flex; align-items: center; gap: .5rem; font-size: .875rem; cursor: pointer; }
.casilla input { width: 1.05rem; height: 1.05rem; }
.casillas { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; }
.form-acciones { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; margin-top: 1.25rem; }
.barra-filtros { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; margin-bottom: 1rem; }
.barra-filtros .control { width: auto; min-width: 11rem; }
.buscador { position: relative; flex: 1 1 14rem; max-width: 24rem; }
.buscador .icono { position: absolute; left: .7rem; top: 50%; translate: 0 -50%; color: var(--suave); pointer-events: none; }
.buscador .control { padding-left: 2.2rem; }

.desplegable > summary { list-style: none; }
.desplegable > summary::-webkit-details-marker { display: none; }
.desplegable[open] > summary { background: var(--marino-suave); border-color: transparent; color: var(--marino-fuerte); }
.desplegable-cuerpo { margin-top: .75rem; padding: 1.25rem; background: var(--fondo-2); border: 1px solid var(--linea-suave); border-radius: var(--r); }
.panel-cuerpo > .desplegable + .desplegable { margin-top: .5rem; }

.subida { display: grid; place-items: center; gap: .5rem; text-align: center; padding: 2rem 1.25rem; border: 1.5px dashed #a9bdb6; border-radius: var(--r-grande); background: var(--fondo-2); color: var(--suave); cursor: pointer; transition: border-color .15s, background .15s; }
.subida:hover, .subida.encima { border-color: var(--marino); background: var(--marino-suave); color: var(--marino-fuerte); }
.subida input[type=file] { position: absolute; opacity: 0; width: 1px; height: 1px; }
.subida strong { color: var(--tinta); font-weight: 600; }

/* ---------- Mensajes ---------- */
.aviso { display: flex; gap: .625rem; align-items: flex-start; padding: .75rem 1rem; border-radius: var(--r); background: var(--marino-suave); color: var(--marino-fuerte); font-size: .875rem; }
.aviso .icono { margin-top: .15rem; }
.aviso-ok { background: var(--menta-suave); color: var(--menta-texto); }
.aviso-alerta { background: var(--naranjo-suave); color: var(--naranjo-texto); }
.aviso-peligro { background: var(--rojo-suave); color: var(--rojo); }
.aviso a { color: inherit; font-weight: 500; }
.avisos-flash { display: grid; gap: .5rem; margin-bottom: 1.25rem; }
.avisos-flash .aviso { animation: entrar .35s var(--suavizado); }
@keyframes entrar { from { opacity: 0; translate: 0 -6px; } }

/* ---------- Estados y etiquetas ---------- */
.estado { display: inline-flex; align-items: center; gap: .35rem; padding: .15rem .6rem; border-radius: 99px; font-size: .75rem; font-weight: 500; white-space: nowrap; background: var(--fondo); color: var(--suave); }
.estado::before { content: ""; width: .4rem; height: .4rem; border-radius: 50%; background: currentColor; }
.estado-info { background: var(--marino-suave); color: var(--marino); }
.estado-ok { background: var(--menta-suave); color: var(--menta-texto); }
.estado-alerta { background: var(--naranjo-suave); color: var(--naranjo-texto); }
.estado-peligro { background: var(--rojo-suave); color: var(--rojo); }
.estado-fuerte { background: var(--noche); color: var(--blanco); }
.etiqueta { display: inline-block; padding: .05rem .45rem; border-radius: 5px; font-size: .6875rem; font-weight: 600; letter-spacing: .03em; text-transform: uppercase; border: 1px solid var(--linea); color: var(--suave); background: var(--blanco); }
.etiqueta-original { border-color: var(--marino); color: var(--marino); }
.etiqueta-alternativo { border-color: var(--menta-texto); color: var(--menta-texto); }

.patente {
  display: inline-flex; align-items: center; gap: .2em;
  padding: .1em .5em; border: 1.5px solid var(--tinta); border-radius: 5px;
  background: var(--blanco); color: var(--tinta);
  font-weight: 600; font-size: .8125rem; letter-spacing: .08em; font-variant-numeric: tabular-nums; white-space: nowrap; line-height: 1.5;
}
.patente i { width: .22em; height: .22em; border-radius: 50%; background: currentColor; }
.patente-grande { font-size: 1.125rem; border-width: 2px; border-radius: 7px; }

/* ---------- Pestañas ---------- */
.pestanas { display: flex; gap: .25rem; border-bottom: 1px solid var(--linea); margin-bottom: 1.25rem; overflow-x: auto; scrollbar-width: none; }
.pestana { padding: .6rem .9rem; color: var(--suave); text-decoration: none; font-weight: 500; font-size: .875rem; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.pestana:hover { color: var(--tinta); }
.pestana.activa { color: var(--marino); border-bottom-color: var(--marino); }
.pestana .cuenta { margin-left: .35rem; font-size: .75rem; background: var(--fondo); border-radius: 99px; padding: .05rem .45rem; color: var(--suave); }

/* ---------- Listas ---------- */
.lista-item { display: flex; align-items: center; gap: .875rem; padding: .8rem 1.25rem; border-bottom: 1px solid var(--linea-suave); color: inherit; text-decoration: none; }
.lista-item:last-child { border-bottom: 0; }
a.lista-item:hover { background: var(--fondo-2); color: inherit; }
.lista-cuerpo { min-width: 0; flex: 1; }
.lista-principal { font-weight: 500; }
.lista-secundario { font-size: .8125rem; color: var(--suave); }
.lista-lado { margin-left: auto; text-align: right; flex: none; font-variant-numeric: tabular-nums; }

/* ---------- Estado vacío ---------- */
.vacio { display: grid; justify-items: center; gap: .5rem; text-align: center; padding: 2.75rem 1.5rem; color: var(--suave); }
.vacio .icono { width: 2rem; height: 2rem; color: #8aa39b; stroke-width: 1.5; }
.vacio h3 { color: var(--tinta); font-size: 1rem; }
.vacio p { max-width: 44ch; }
.vacio .btn { margin-top: .5rem; }

/* ---------- El recorrido del vehículo ---------- */
.flujo { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); counter-reset: paso; }
.flujo-paso { position: relative; display: grid; justify-items: center; gap: .4rem; text-align: center; font-size: .75rem; color: var(--suave); padding: 0 .25rem; }
.flujo-paso::before { content: ""; position: absolute; top: .8125rem; right: 50%; width: 100%; height: 2px; background: var(--linea); translate: 0 -50%; }
.flujo-paso:first-child::before { display: none; }
.flujo-punto { position: relative; z-index: 1; width: 1.625rem; height: 1.625rem; border-radius: 50%; display: grid; place-items: center; background: var(--blanco); border: 2px solid var(--linea); color: transparent; }
.flujo-punto .icono { width: .875rem; height: .875rem; stroke-width: 2.5; }
.flujo-paso.hecho { color: var(--menta-texto); }
.flujo-paso.hecho::before, .flujo-paso.actual::before { background: var(--menta); }
.flujo-paso.hecho .flujo-punto { background: var(--menta); border-color: var(--menta); color: var(--noche); }
.flujo-paso.actual { color: var(--tinta); font-weight: 600; }
.flujo-paso.actual .flujo-punto { background: var(--marino); border-color: var(--marino); box-shadow: 0 0 0 4px rgb(23 56 107 / .15); }
.flujo-paso.actual .flujo-punto::after { content: ""; width: .5rem; height: .5rem; border-radius: 50%; background: var(--blanco); }
.flujo-paso.actual.espera .flujo-punto { background: var(--naranjo); border-color: var(--naranjo); box-shadow: 0 0 0 4px rgb(232 116 59 / .2); }
.flujo-paso.actual.fin .flujo-punto { background: var(--menta-texto); border-color: var(--menta-texto); box-shadow: none; color: var(--blanco); }
.flujo-paso.actual.fin .flujo-punto::after { display: none; }

/* ---------- El carril del día ---------- */
.carril { display: grid; grid-template-columns: repeat(5, minmax(172px, 1fr)); gap: .875rem; overflow-x: auto; padding-bottom: .5rem; scroll-snap-type: x proximity; scrollbar-width: thin; scrollbar-color: var(--linea) transparent; }
.carril-col { scroll-snap-align: start; display: grid; gap: .5rem; align-content: start; min-width: 0; }
.carril-cab { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .1rem .25rem .35rem; border-bottom: 2px solid var(--linea); font-weight: 600; font-size: .8125rem; }
.carril-cab .cuenta { font-weight: 500; color: var(--suave); font-variant-numeric: tabular-nums; }
.carril-col.recepcion .carril-cab { border-color: var(--marino); }
.carril-col.espera_cliente .carril-cab { border-color: var(--naranjo); }
.carril-col.trabajo .carril-cab { border-color: var(--noche); }
.carril-col.listo .carril-cab { border-color: var(--menta); }
.carril-col.entregado .carril-cab { border-color: var(--linea); }
.carril-vacio { font-size: .8125rem; color: var(--suave); padding: .75rem .25rem; }
.tarjeta-ot { display: grid; gap: .4rem; padding: .75rem .8rem; background: var(--blanco); border: 1px solid var(--linea-suave); border-radius: var(--r); color: inherit; text-decoration: none; transition: border-color .15s, box-shadow .2s, translate .2s var(--suavizado); }
.tarjeta-ot:hover { border-color: #a9bdb6; box-shadow: var(--sombra); translate: 0 -1px; color: inherit; }
.tarjeta-ot .vehiculo { font-weight: 500; font-size: .875rem; line-height: 1.3; }
.tarjeta-ot .quien-es { font-size: .8125rem; color: var(--suave); }
.tarjeta-ot .pide { display: flex; align-items: center; gap: .35rem; font-size: .75rem; font-weight: 500; color: var(--naranjo-texto); }
.tarjeta-ot .pide.bien { color: var(--menta-texto); }
.tarjeta-ot .pide.calmo { color: var(--suave); font-weight: 400; }

/* ---------- Horario del día ---------- */
.dias { display: flex; gap: .375rem; overflow-x: auto; margin-bottom: 1rem; scrollbar-width: none; }
.dia { display: grid; justify-items: center; min-width: 3.5rem; padding: .45rem .6rem; border: 1px solid var(--linea-suave); border-radius: var(--r); background: var(--blanco); color: var(--suave); text-decoration: none; font-size: .75rem; line-height: 1.25; }
.dia strong { font-size: 1.0625rem; color: var(--tinta); font-weight: 600; }
.dia:hover { border-color: #a9bdb6; }
.dia.activa { background: var(--marino); border-color: var(--marino); color: #c9d6ea; }
.dia.activa strong { color: var(--blanco); }
.dia .punto { width: .3rem; height: .3rem; border-radius: 50%; background: var(--naranjo); margin-top: .15rem; }
.horario-fila { display: grid; grid-template-columns: 4.25rem minmax(0, 1fr) auto; gap: .875rem; align-items: center; padding: .8rem 1.25rem; border-bottom: 1px solid var(--linea-suave); }
.horario-fila:last-child { border-bottom: 0; }
.horario-fila time { font-weight: 600; font-variant-numeric: tabular-nums; font-size: 1rem; }
.horario-fila.pasada time { color: var(--suave); }

/* ---------- Línea de tiempo y mensajes al cliente ---------- */
.linea-tiempo { display: grid; gap: 0; }
.linea-tiempo li { position: relative; padding: 0 0 1rem 1.5rem; font-size: .875rem; }
.linea-tiempo li::before { content: ""; position: absolute; left: .25rem; top: .45rem; width: .5rem; height: .5rem; border-radius: 50%; background: var(--menta); box-shadow: 0 0 0 3px var(--blanco); z-index: 1; }
.linea-tiempo li::after { content: ""; position: absolute; left: .46rem; top: .6rem; bottom: -.4rem; width: 1px; background: var(--linea); }
.linea-tiempo li:last-child { padding-bottom: 0; }
.linea-tiempo li:last-child::after { display: none; }
.linea-tiempo time { display: block; font-size: .75rem; color: var(--suave); }
.mensajes { display: grid; gap: .625rem; }
.mensaje { max-width: 34rem; padding: .6rem .8rem; border-radius: 4px 14px 14px 14px; background: var(--menta-suave); font-size: .875rem; overflow-wrap: anywhere; }
.mensaje-meta { display: flex; align-items: center; gap: .35rem; font-size: .6875rem; color: var(--menta-texto); margin-bottom: .2rem; font-weight: 500; }
.mensaje.correo { background: var(--marino-suave); }
.mensaje.correo .mensaje-meta { color: var(--marino); }

/* ---------- Totales ---------- */
.totales { display: grid; gap: .35rem; font-variant-numeric: tabular-nums; }
.totales-fila { display: flex; justify-content: space-between; gap: 1rem; font-size: .875rem; }
.totales-fila span:first-child { color: var(--suave); }
.totales-fila.final { margin-top: .35rem; padding-top: .6rem; border-top: 1px solid var(--linea); font-size: 1.125rem; font-weight: 600; }
.totales-fila.final span:first-child { color: var(--tinta); }
.totales-fila.saldo span:last-child { color: var(--naranjo-texto); font-weight: 600; }
.totales-fila.pagado span:last-child { color: var(--menta-texto); }

/* ---------- Elegir una opción (original / alternativo, forma de pago) ---------- */
.opciones { display: grid; gap: .625rem; }
.opciones.en-linea { grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); }
.opcion { position: relative; display: block; cursor: pointer; }
.opcion input { position: absolute; opacity: 0; inset: 0; }
.opcion-cuerpo { display: grid; gap: .25rem; padding: .85rem 1rem .85rem 2.75rem; border: 1.5px solid var(--linea); border-radius: var(--r); background: var(--blanco); transition: border-color .15s, background .15s, box-shadow .15s; position: relative; }
.opcion-cuerpo::before { content: ""; position: absolute; left: .95rem; top: 1rem; width: 1.125rem; height: 1.125rem; border-radius: 50%; border: 1.5px solid #a9bdb6; background: var(--blanco); transition: border .15s; }
.opcion:hover .opcion-cuerpo { border-color: #a9bdb6; }
.opcion input:checked + .opcion-cuerpo { border-color: var(--marino); background: #f4f7fc; box-shadow: 0 0 0 3px rgb(23 56 107 / .1); }
.opcion input:checked + .opcion-cuerpo::before { border: .35rem solid var(--marino); }
.opcion input:focus-visible + .opcion-cuerpo { outline: 2px solid var(--marino); outline-offset: 2px; }
.opcion-titulo { display: flex; justify-content: space-between; gap: .75rem; align-items: baseline; font-weight: 600; }
.opcion-precio { font-variant-numeric: tabular-nums; white-space: nowrap; }
.opcion-detalle { font-size: .8125rem; color: var(--suave); }
.opciones.en-linea .opcion-cuerpo { padding: .7rem .75rem; text-align: center; justify-items: center; }
.opciones.en-linea .opcion-cuerpo::before { display: none; }

/* ---------- Barra de avance ---------- */
.barra { height: .5rem; border-radius: 99px; background: var(--fondo); overflow: hidden; }
.barra > span { display: block; height: 100%; border-radius: inherit; background: var(--menta-texto); }
.barra.alerta > span { background: var(--naranjo); }

/* ---------- Diálogo de confirmación ---------- */
.dialogo { border: 0; border-radius: var(--r-grande); padding: 1.5rem; width: min(28rem, calc(100vw - 2rem)); box-shadow: var(--sombra-alta); color: var(--tinta); }
.dialogo::backdrop { background: rgb(15 34 51 / .5); }
.dialogo h2 { margin-bottom: .5rem; }
.dialogo[open] { animation: entrar .25s var(--suavizado); }

/* ---------- Ingreso ---------- */
.ingreso { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }
.ingreso-lado { background: var(--noche); color: var(--claro-noche); padding: 3rem clamp(1.5rem, 5vw, 4.5rem); display: flex; flex-direction: column; gap: 2.5rem; }
.ingreso-lado h1 { color: var(--blanco); font-size: clamp(2rem, 3.2vw, 2.75rem); max-width: 19ch; }
.ingreso-lado h1 em { font-style: normal; color: var(--menta); }
.ingreso-lado > p { max-width: 42ch; font-size: 1rem; }
.recorrido { display: grid; gap: 0; margin-top: auto; }
.recorrido li { position: relative; display: grid; grid-template-columns: 2rem minmax(0, 1fr); gap: .875rem; padding-bottom: 1.1rem; }
.recorrido li:last-child { padding-bottom: 0; }
.recorrido li::after { content: ""; position: absolute; left: calc(1rem - .5px); top: 2rem; bottom: 0; width: 1px; background: var(--noche-2); }
.recorrido li:last-child::after { display: none; }
.recorrido-punto { width: 2rem; height: 2rem; border-radius: 50%; display: grid; place-items: center; background: var(--noche-2); color: var(--menta); }
.recorrido strong { display: block; color: var(--blanco); font-weight: 500; font-size: .9375rem; }
.recorrido span { font-size: .8125rem; }
.ingreso-form { padding: 3rem clamp(1.5rem, 5vw, 4.5rem); display: grid; align-content: center; gap: 1.75rem; background: var(--fondo-2); }
.ingreso-form > * { width: 100%; max-width: 27rem; margin-inline: auto; }
.ingreso-form h2 { font-family: var(--titulo); font-weight: 400; font-size: 1.625rem; }
.cuentas { display: grid; gap: .5rem; }
.cuenta-demo { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: .75rem; align-items: center; width: 100%; text-align: left; padding: .65rem .85rem; border: 1px solid var(--linea); border-radius: var(--r); background: var(--blanco); cursor: pointer; transition: border-color .15s, box-shadow .15s, background .15s; }
.cuenta-demo:hover { border-color: #a9bdb6; }
.cuenta-demo[aria-pressed=true] { border-color: var(--marino); background: #f4f7fc; box-shadow: 0 0 0 3px rgb(23 56 107 / .1); }
.cuenta-demo .inicial { width: 2.125rem; height: 2.125rem; border-radius: 50%; display: grid; place-items: center; background: var(--marino-suave); color: var(--marino); font-weight: 600; font-size: .875rem; }
.cuenta-demo[aria-pressed=true] .inicial { background: var(--marino); color: var(--blanco); }
.cuenta-demo strong { display: block; font-weight: 600; font-size: .875rem; }
.cuenta-demo span.linea { display: block; font-size: .78rem; color: var(--suave); line-height: 1.35; }
.cuenta-demo code { font-family: inherit; font-size: .75rem; font-weight: 500; color: var(--marino); background: var(--marino-suave); border-radius: 5px; padding: .1rem .4rem; }

/* ---------- Páginas públicas (enlace del cliente, reserva) ---------- */
.publico { min-height: 100vh; background: var(--fondo); }
.pub-cab { background: var(--noche); color: var(--blanco); padding: 1.25rem 1.25rem 4.5rem; }
.pub-cab-int, .pub-cuerpo { width: 100%; max-width: 34rem; margin: 0 auto; }
.pub-taller { display: flex; align-items: center; gap: .6rem; font-family: var(--titulo); font-size: 1.125rem; }
.pub-cab h1 { margin-top: 1.5rem; font-size: 1.75rem; }
.pub-cab p { color: var(--claro-noche); margin-top: .4rem; }
.pub-cuerpo { padding: 0 1rem 3rem; margin-top: -3.25rem; display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; }
.pub-cuerpo .panel { box-shadow: var(--sombra); border-color: transparent; }
.pub-pie { text-align: center; font-size: .75rem; color: var(--suave); padding: 0 1rem 2rem; }
.pub-estado { display: flex; align-items: center; gap: .875rem; }
.pub-estado .sello { width: 2.75rem; height: 2.75rem; border-radius: 50%; display: grid; place-items: center; background: var(--marino-suave); color: var(--marino); flex: none; }
.pub-estado.listo .sello { background: var(--menta); color: var(--noche); }
.pub-estado.espera .sello { background: var(--naranjo-suave); color: var(--naranjo-texto); }
.pub-estado h2 { font-size: 1.125rem; }

/* ---------- Documento imprimible ---------- */
.documento { background: var(--blanco); max-width: 46rem; margin: 0 auto; padding: 2.5rem; border: 1px solid var(--linea-suave); border-radius: var(--r); font-size: .875rem; }
.documento-cab { display: flex; justify-content: space-between; gap: 1.5rem; align-items: flex-start; margin-bottom: 1.75rem; }
.documento-recuadro { border: 2px solid var(--rojo); color: var(--rojo); padding: .75rem 1.25rem; text-align: center; font-weight: 600; line-height: 1.5; min-width: 14rem; }
.documento-recuadro.interno { border-color: var(--suave); color: var(--suave); }
.documento-timbre { margin-top: 2rem; display: grid; justify-items: center; gap: .3rem; width: 15rem; font-size: .6875rem; color: var(--suave); text-align: center; }
.documento-timbre .codigo { width: 100%; height: 4.5rem; background: repeating-linear-gradient(90deg, var(--tinta) 0 2px, transparent 2px 3px, var(--tinta) 3px 4px, transparent 4px 7px, var(--tinta) 7px 10px, transparent 10px 12px); opacity: .85; }

/* ---------- Adaptación ---------- */
@media (max-width: 1100px) {
  .dos-columnas { grid-template-columns: minmax(0, 1fr); }
  .cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .lateral { position: fixed; inset: 0 auto 0 0; width: min(17.5rem, 86vw); z-index: 40; translate: -105% 0; transition: translate .28s var(--suavizado); box-shadow: var(--sombra-alta); }
  .menu-abierto .lateral { translate: 0 0; }
  .velo { display: none; position: fixed; inset: 0; z-index: 30; background: rgb(15 34 51 / .5); border: 0; }
  .menu-abierto .velo { display: block; }
  .barra-movil { display: flex; align-items: center; gap: .75rem; position: sticky; top: 0; z-index: 20; background: var(--noche); color: var(--blanco); padding: .6rem 1rem; }
  .barra-movil .marca-nombre { font-size: 1.125rem; }
  .boton-menu { background: none; border: 0; color: inherit; padding: .35rem; margin: -.35rem; cursor: pointer; display: grid; }
  .pagina { padding: 1.25rem 1rem 4rem; }
  h1 { font-size: 1.5rem; }
  .cols-2, .cols-3, .cols-4, .campos-2, .campos-3, .campos-4 { grid-template-columns: minmax(0, 1fr); }
  .cifras { grid-auto-flow: row; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cifra { border-left: 0; border-top: 1px solid var(--linea-suave); }
  .cifra:nth-child(-n+2) { border-top: 0; }
  .cifra:nth-child(even) { border-left: 1px solid var(--linea-suave); }
  .cifra-valor { font-size: 1.25rem; }
  .tabla th, .tabla td { padding: .65rem .875rem; }
  .panel-cab, .panel-cuerpo, .lista-item, .horario-fila { padding-inline: 1rem; }
  .oculto-movil { display: none !important; }
  .solo-movil { display: revert; }
  .pagina-acciones { width: 100%; }
  .pagina-acciones .btn-primario { flex: 1; }
  .carril { grid-template-columns: repeat(5, minmax(78vw, 1fr)); scroll-snap-type: x mandatory; }
  .flujo-paso:not(.actual) span.flujo-texto { display: none; }
  .ingreso { grid-template-columns: minmax(0, 1fr); }
  .ingreso-lado { padding: 2rem 1.25rem; gap: 1.25rem; }
  .ingreso-lado .recorrido { display: none; }
  .ingreso-form { padding: 2rem 1.25rem 3rem; align-content: start; }
  .horario-fila { grid-template-columns: 3.5rem minmax(0, 1fr); }
  .horario-fila > :last-child { grid-column: 2; }
  .documento { padding: 1.25rem; }
  .documento-cab { flex-direction: column; }
}
@media (min-width: 861px) { .velo { display: none; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
@media print {
  .lateral, .barra-movil, .franja-demo, .pagina-cab, .no-imprimir, .avisos-flash { display: none !important; }
  .app { display: block; }
  body { background: #fff; }
  .pagina { padding: 0; max-width: none; }
  .documento { border: 0; padding: 0; }
}

/* Vista del documento subido: no se come la pantalla */
.desplegable-cuerpo img, .panel-cuerpo > img { max-height: 30rem; width: auto; margin-inline: auto; border: 1px solid var(--linea-suave); border-radius: var(--r-chico); }

/* Fotos de repuestos */
.fotos { display: grid; grid-template-columns: repeat(auto-fill, minmax(7.5rem, 1fr)); gap: .625rem; }
.foto { position: relative; display: block; border-radius: var(--r); overflow: hidden; border: 1px solid var(--linea-suave); background: var(--fondo); aspect-ratio: 4 / 3; }
.foto img { width: 100%; height: 100%; object-fit: cover; transition: scale .3s var(--suavizado); }
a.foto:hover img { scale: 1.04; }
.foto figcaption { position: absolute; inset: auto 0 0 0; padding: 1.1rem .5rem .35rem; font-size: .6875rem; line-height: 1.3; color: var(--blanco); background: linear-gradient(transparent, rgb(15 34 51 / .8)); }
.foto-quitar { position: absolute; top: .3rem; right: .3rem; }
.foto-quitar button { width: 1.625rem; height: 1.625rem; display: grid; place-items: center; border: 0; border-radius: 50%; background: rgb(15 34 51 / .7); color: var(--blanco); cursor: pointer; }
.foto-quitar button:hover { background: var(--rojo); }

/* ============================================================
   Recepción: el tablero (combustible y kilometraje) y la placa
   ============================================================ */
.flujo { counter-reset: paso; }
.flujo-paso { counter-increment: paso; }
.flujo-paso:not(.hecho):not(.actual) .flujo-punto { color: var(--suave); font-size: .6875rem; font-weight: 600; }
.flujo-paso:not(.hecho):not(.actual) .flujo-punto::after { content: counter(paso); }

.patente-grande { display: inline-grid; justify-items: center; gap: 0; padding: .3rem .7rem .2rem; border-width: 2px; border-radius: 8px; font-size: 1.375rem; letter-spacing: .14em; line-height: 1.2; box-shadow: inset 0 0 0 2px var(--blanco), inset 0 0 0 3px rgb(29 29 31 / .25); }
.patente-letras { display: inline-flex; align-items: center; gap: .25em; padding-left: .14em; }
.patente-grande small { font-size: .5rem; letter-spacing: .32em; font-weight: 600; padding-left: .32em; }

.ficha-vehiculo { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.ficha-vehiculo strong { display: block; font-size: 1.0625rem; font-weight: 600; line-height: 1.3; }
.ficha-vehiculo span.linea { font-size: .8125rem; color: var(--suave); }

.tablero { background: var(--noche); color: var(--claro-noche); border-radius: var(--r-grande); padding: 1.25rem; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1.5rem; align-items: center; }
.tablero-rotulo { font-size: .6875rem; letter-spacing: .14em; text-transform: uppercase; color: var(--menta); font-weight: 500; text-align: center; margin-bottom: .5rem; }
.medidor { display: grid; justify-items: center; }
.medidor svg { width: min(100%, 15rem); height: auto; overflow: visible; }
.medidor .arco { fill: none; stroke: #2a4560; stroke-width: 10; stroke-linecap: round; }
.medidor .arco-reserva { fill: none; stroke: var(--naranjo); stroke-width: 10; stroke-linecap: round; }
.medidor .arco-lleno { fill: none; stroke: var(--menta); stroke-width: 10; stroke-linecap: round; stroke-dasharray: 251.3; stroke-dashoffset: 251.3; transition: stroke-dashoffset .5s var(--suavizado); }
.medidor .marca { stroke: var(--claro-noche); stroke-width: 2; stroke-linecap: round; }
.medidor text { fill: var(--claro-noche); font-size: 9px; font-weight: 500; text-anchor: middle; font-family: var(--fuente); }
.medidor .aguja { stroke: var(--blanco); stroke-width: 3; stroke-linecap: round; transform-origin: 100px 100px; rotate: -90deg; transition: rotate .5s var(--suavizado); }
.medidor .eje { fill: var(--blanco); }
.tablero:has(input[name=combustible][value="0"]:checked) .aguja { rotate: -90deg; }
.tablero:has(input[name=combustible][value="1"]:checked) .aguja { rotate: -45deg; }
.tablero:has(input[name=combustible][value="2"]:checked) .aguja { rotate: 0deg; }
.tablero:has(input[name=combustible][value="3"]:checked) .aguja { rotate: 45deg; }
.tablero:has(input[name=combustible][value="4"]:checked) .aguja { rotate: 90deg; }
.tablero:has(input[name=combustible][value="0"]:checked) .arco-lleno { stroke-dashoffset: 251.3; }
.tablero:has(input[name=combustible][value="1"]:checked) .arco-lleno { stroke-dashoffset: 188.5; }
.tablero:has(input[name=combustible][value="2"]:checked) .arco-lleno { stroke-dashoffset: 125.7; }
.tablero:has(input[name=combustible][value="3"]:checked) .arco-lleno { stroke-dashoffset: 62.8; }
.tablero:has(input[name=combustible][value="4"]:checked) .arco-lleno { stroke-dashoffset: 0; }
.niveles { display: flex; justify-content: center; gap: .4rem; margin-top: .25rem; }
.nivel { position: relative; cursor: pointer; }
.nivel input { position: absolute; opacity: 0; inset: 0; }
.nivel span { display: grid; place-items: center; min-width: 2.5rem; height: 2.5rem; padding: 0 .4rem; border-radius: 99px; background: var(--noche-2); color: var(--claro-noche); font-size: .8125rem; font-weight: 600; transition: background .15s, color .15s; }
.nivel:hover span { color: var(--blanco); }
.nivel input:checked + span { background: var(--menta); color: var(--noche); }
.nivel input:focus-visible + span { outline: 2px solid var(--menta); outline-offset: 2px; }
.odometro { display: flex; align-items: baseline; gap: .5rem; background: #0a1826; border: 1px solid var(--noche-2); border-radius: var(--r); padding: .5rem .875rem; }
.odometro input { flex: 1; min-width: 0; width: 100%; background: transparent; border: 0; outline: 0; color: var(--menta); font-size: 1.875rem; font-weight: 600; letter-spacing: .16em; font-variant-numeric: tabular-nums; text-align: right; caret-color: var(--menta); appearance: textfield; -moz-appearance: textfield; }
.odometro input::-webkit-outer-spin-button, .odometro input::-webkit-inner-spin-button { appearance: none; margin: 0; }
.odometro input::placeholder { color: #2a4560; }
.odometro:focus-within { border-color: var(--menta); box-shadow: 0 0 0 3px rgb(143 208 188 / .18); }
.odometro span { font-size: .8125rem; color: var(--claro-noche); }
.tablero .ayuda { font-size: .75rem; color: var(--claro-noche); margin-top: .4rem; text-align: center; }
.tablero .error { font-size: .75rem; color: #ffb59a; font-weight: 500; margin-top: .4rem; text-align: center; display: block; }

/* Paso a paso (solo teléfono, lo activa app.js) */
.pasos-cab, .pasos-pie { display: none; }

@media (max-width: 860px) {
  /* Voz del teléfono: títulos firmes, botones de píldora, la acción al pulgar */
  h1 { font-family: var(--fuente); font-weight: 600; font-size: 1.625rem; letter-spacing: -.03em; line-height: 1.1; }
  h2 { letter-spacing: -.01em; }
  .btn { border-radius: 99px; min-height: 2.75rem; }
  .btn-chico { min-height: 2.25rem; padding-inline: .85rem; }
  .btn-primario { background: var(--noche); border-color: var(--noche); }
  .btn-primario:hover { background: var(--noche-2); border-color: var(--noche-2); }
  .panel, .cifras { border-radius: 18px; }

  .pagina { padding-bottom: 7rem; }
  .pagina-acciones:has(*) { position: fixed; inset: auto 0 0 0; z-index: 25; width: auto; padding: .75rem 1rem calc(.75rem + env(safe-area-inset-bottom)); background: rgb(255 255 255 / .92); backdrop-filter: blur(10px); border-top: 1px solid var(--linea-suave); flex-wrap: nowrap; }
  .pagina-acciones > form { display: flex; flex: 1; min-width: 0; }
  .pagina-acciones .btn { flex: 1; min-width: 0; min-height: 3rem; }
  .pagina-acciones .btn:not(.btn-primario) { flex: 0 1 auto; }
  .pagina-acciones > form:has(.btn-primario), .pagina-acciones > .btn-primario { flex: 1 1 60%; }

  .pestanas { border-bottom: 0; gap: .375rem; }
  .pestana { border: 1px solid var(--linea-suave); border-radius: 99px; background: var(--blanco); padding: .4rem .85rem; margin-bottom: 0; }
  .pestana.activa { background: var(--noche); border-color: var(--noche); color: var(--blanco); }
  .pestana.activa .cuenta { background: var(--noche-2); color: var(--menta); }

  /* Las tablas se vuelven tarjetas: una fila, un bloque (app.js copia los rótulos) */
  .tabla-envoltura { overflow: visible; }
  .tabla, .tabla tbody, .tabla tfoot, .tabla tr, .tabla td { display: block; width: 100%; }
  .tabla thead { display: none; }
  .tabla tr { padding: .8rem 1rem; border-bottom: 1px solid var(--linea-suave); }
  .tabla tbody tr:last-child { border-bottom: 0; }
  .tabla td, .tabla td:first-child, .tabla td:last-child { display: flow-root; padding: .2rem 0; border: 0; text-align: right; white-space: normal; background: transparent; }
  .tabla td[data-th]::before { content: attr(data-th); float: left; margin-right: 1rem; font-size: .75rem; line-height: 1.6rem; color: var(--suave); font-weight: 400; }
  .tabla td:first-child { font-weight: 600; font-size: .9375rem; text-align: left; padding-bottom: .3rem; }
  .tabla td:first-child::before { display: none; }
  .tabla td:empty { display: none; }
  .tabla td small { text-align: inherit; }
  .tabla td > .campo, .tabla td > input, .tabla td > select { display: inline-grid; width: 62%; text-align: left; }
  .tabla td .control, .tabla td input:not([type=checkbox]):not([type=radio]), .tabla td select { min-height: 2.5rem; }
  .tabla td.acciones { padding-top: .4rem; }
  .tabla tfoot tr { background: var(--fondo-2); border-top: 1px solid var(--linea); border-bottom: 0; border-radius: 0 0 18px 18px; }

  .tablero { grid-template-columns: minmax(0, 1fr); padding: 1.25rem 1rem; }
  .ficha-vehiculo { gap: .875rem; }

  /* Recepción paso a paso */
  .hiperfoco [data-paso] { display: none; }
  .hiperfoco [data-paso].paso-activo { display: block; animation: paso .35s var(--suavizado); }
  @keyframes paso { from { opacity: 0; translate: 14px 0; } }
  .hiperfoco .pasos-cab { display: grid; gap: .5rem; margin-bottom: .25rem; }
  .pasos-barra { display: flex; gap: .3rem; }
  .pasos-barra i { flex: 1; height: .25rem; border-radius: 99px; background: var(--linea); transition: background .3s; }
  .pasos-barra i.hecho { background: var(--menta); }
  .pasos-barra i.actual { background: var(--noche); }
  .pasos-cuenta { display: inline-flex; align-items: center; gap: .5rem; font-size: .6875rem; letter-spacing: .14em; text-transform: uppercase; color: var(--suave); font-weight: 500; }
  .pasos-cuenta b { background: var(--noche); color: var(--menta); border-radius: 6px; padding: .1rem .45rem; letter-spacing: .08em; font-weight: 600; }
  .hiperfoco [data-paso] > .panel-cab { border-bottom: 0; padding-bottom: 0; }
  .hiperfoco [data-paso] > .panel-cab h2 { font-size: 1.375rem; letter-spacing: -.03em; line-height: 1.15; }
  .hiperfoco .form-acciones { display: none; }
  .hiperfoco .pasos-pie { display: flex; gap: .625rem; position: fixed; inset: auto 0 0 0; z-index: 25; padding: .75rem 1rem calc(.75rem + env(safe-area-inset-bottom)); background: rgb(255 255 255 / .92); backdrop-filter: blur(10px); border-top: 1px solid var(--linea-suave); }
  .pasos-pie .btn { min-height: 3.25rem; }
  .pasos-pie .atras { flex: none; width: 3.25rem; padding: 0; }
  .pasos-pie .sigue { flex: 1; justify-content: space-between; padding-inline: 1.25rem .5rem; font-size: 1rem; font-weight: 600; background: var(--blanco); color: var(--tinta); border: 1.5px solid var(--noche); }
  .pasos-pie .sigue .flecha { width: 2.25rem; height: 2.25rem; border-radius: 12px; display: grid; place-items: center; background: var(--noche); color: var(--blanco); }
  .pasos-pie .sigue.final { background: var(--noche); color: var(--blanco); }
  .pasos-pie .sigue.final .flecha { background: var(--menta); color: var(--noche); }
}
@media (max-width: 860px) {
  body:has(.hiperfoco) .pagina-cab { margin-bottom: .875rem; }
  body:has(.hiperfoco) .pagina-cab .bajada { display: none; }
}

/* Avance de carga: una línea arriba mientras llega la página siguiente */
.cargando::before { content: ""; position: fixed; inset: 0 0 auto 0; height: 3px; z-index: 100; background: var(--menta); transform-origin: left; animation: cargar 1.2s var(--suavizado) forwards; }
@keyframes cargar { from { scale: 0 1; } to { scale: .85 1; } }

/* Teléfono: navegación abajo, como una app */
.barra-inferior { display: none; }
@media (max-width: 860px) {
  .barra-inferior { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); position: fixed; inset: auto 0 0 0; z-index: 24; background: var(--noche); padding: .3rem .25rem calc(.3rem + env(safe-area-inset-bottom)); }
  .barra-inferior a, .barra-inferior button { display: grid; justify-items: center; gap: .1rem; padding: .35rem .2rem; border: 0; background: none; color: var(--claro-noche); font: inherit; font-size: .625rem; font-weight: 500; text-decoration: none; border-radius: 12px; cursor: pointer; }
  .barra-inferior .icono { width: 1.375rem; height: 1.375rem; }
  .barra-inferior a.activo { color: var(--menta); }
  .barra-inferior a:active, .barra-inferior button:active { background: var(--noche-2); }
  .barra-movil { display: none; }
  .con-barra .pagina { padding-bottom: 10.5rem; }
  .con-barra .pagina-acciones:has(*), .con-barra .hiperfoco .pasos-pie { bottom: calc(3.6rem + env(safe-area-inset-bottom)); padding-bottom: .75rem; }
  .franja-demo { position: static; }
}

.mensaje-accion { margin-top: .4rem; padding-top: .4rem; border-top: 1px solid rgb(31 106 86 / .18); }
.mensaje-accion a { display: inline-flex; align-items: center; gap: .35rem; font-size: .75rem; font-weight: 600; color: var(--menta-texto); text-decoration: none; }
.mensaje-accion a:hover { text-decoration: underline; }

/* Buscar por patente, siempre a mano */
.busca-patente { position: relative; margin: 0 .25rem; }
.busca-patente .icono { position: absolute; left: .65rem; top: 50%; translate: 0 -50%; color: #7f93a8; pointer-events: none; }
.busca-patente input { width: 100%; min-height: 2.375rem; padding: .4rem .6rem .4rem 2.1rem; border-radius: 9px; border: 1px solid var(--noche-2); background: #0a1826; color: var(--blanco); font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }
.busca-patente input::placeholder { color: #7f93a8; font-weight: 400; letter-spacing: 0; text-transform: none; }
.busca-patente input:focus { outline: 0; border-color: var(--menta); box-shadow: 0 0 0 3px rgb(143 208 188 / .18); }

/* Semáforo de la inspección */
.semaforo { display: inline-flex; gap: .3rem; }
.semaforo label { position: relative; cursor: pointer; }
.semaforo input { position: absolute; opacity: 0; inset: 0; }
.semaforo span { display: grid; place-items: center; width: 2.25rem; height: 2.25rem; border-radius: 50%; border: 1.5px solid var(--linea); background: var(--blanco); color: transparent; transition: background .15s, border-color .15s, scale .15s var(--suavizado); }
.semaforo span .icono { width: 1rem; height: 1rem; stroke-width: 2.5; }
.semaforo label:hover span { border-color: #a9bdb6; }
.semaforo .verde input:checked + span { background: #2e9e7b; border-color: #2e9e7b; color: var(--blanco); scale: 1.08; }
.semaforo .amarillo input:checked + span { background: #f0b429; border-color: #f0b429; color: var(--noche); scale: 1.08; }
.semaforo .rojo input:checked + span { background: #d64531; border-color: #d64531; color: var(--blanco); scale: 1.08; }
.semaforo input:focus-visible + span { outline: 2px solid var(--marino); outline-offset: 2px; }
.luz { display: inline-block; width: .7rem; height: .7rem; border-radius: 50%; background: var(--linea); flex: none; vertical-align: -.05em; }
.luz.verde { background: #2e9e7b; } .luz.amarillo { background: #f0b429; } .luz.rojo { background: #d64531; }
.resumen-semaforo { display: flex; gap: 1rem; flex-wrap: wrap; font-size: .875rem; font-weight: 500; }
.resumen-semaforo span { display: inline-flex; align-items: center; gap: .4rem; }

/* Diagrama de daños y firma */
.diagrama { position: relative; background: var(--fondo-2); border: 1px solid var(--linea-suave); border-radius: var(--r); touch-action: manipulation; user-select: none; }
.diagrama svg { width: 100%; height: auto; display: block; }
.diagrama .carroceria { fill: var(--blanco); stroke: var(--suave); stroke-width: 1.5; stroke-linejoin: round; }
.diagrama .detalle { fill: none; stroke: #a9bdb6; stroke-width: 1.2; }
.diagrama .vidrio { fill: var(--marino-suave); stroke: #a9bdb6; stroke-width: 1; }
.marca-dano { position: absolute; width: 1.5rem; height: 1.5rem; margin: -.75rem 0 0 -.75rem; border-radius: 50%; display: grid; place-items: center; background: var(--naranjo); color: var(--blanco); font-size: .6875rem; font-weight: 600; border: 2px solid var(--blanco); box-shadow: 0 1px 3px rgb(15 34 51 / .35); cursor: pointer; }
.firma { border: 1.5px dashed #a9bdb6; border-radius: var(--r); background: var(--blanco); touch-action: none; width: 100%; height: 10rem; display: block; }
.firma-img { max-height: 6rem; width: auto; }

/* Indicadores: una frase, una cifra, una acción */
.indicadores { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: .875rem; }
.indicador { display: grid; gap: .3rem; align-content: start; padding: 1rem 1.1rem; background: var(--blanco); border: 1px solid var(--linea-suave); border-radius: var(--r-grande); color: inherit; text-decoration: none; transition: border-color .15s, box-shadow .2s, translate .2s var(--suavizado); }
a.indicador:hover { border-color: #a9bdb6; box-shadow: var(--sombra); translate: 0 -1px; color: inherit; }
.indicador-cifra { font-size: 1.625rem; font-weight: 600; line-height: 1.15; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.indicador-texto { font-size: .875rem; }
.indicador-accion { font-size: .8125rem; font-weight: 500; color: var(--marino); margin-top: .2rem; }
.estrellas { display: inline-flex; gap: .15rem; color: #f0b429; }
.estrellas .icono { fill: currentColor; }
.estrellas .vacia { color: var(--linea); }
.estrellas-elegir { display: flex; flex-direction: row-reverse; justify-content: center; gap: .35rem; }
.estrellas-elegir input { position: absolute; opacity: 0; }
.estrellas-elegir label { cursor: pointer; color: var(--linea); transition: color .12s, scale .15s var(--suavizado); }
.estrellas-elegir label .icono { width: 2.5rem; height: 2.5rem; fill: currentColor; stroke: none; }
.estrellas-elegir label:hover, .estrellas-elegir label:hover ~ label, .estrellas-elegir input:checked ~ label { color: #f0b429; }
.estrellas-elegir label:active { scale: .9; }

h2 + .indicadores { margin-top: .75rem; }
.desplegable > summary + :not(.desplegable-cuerpo) { margin-top: .5rem; }
@media (max-width: 860px) {
  .semaforo { gap: .4rem; }
  .semaforo span { width: 2.75rem; height: 2.75rem; }
}
@media (max-width: 860px) {
  .pagina-acciones:has(*) { flex-wrap: wrap; }
  .pagina-acciones .btn:not(.btn-primario) { flex: 1 1 auto; white-space: normal; text-align: center; line-height: 1.2; }
  .pagina-acciones > form:has(.btn-primario), .pagina-acciones > .btn-primario { flex: 1 1 100%; order: 9; }
  .pagina-acciones > form:not(:has(.btn-primario)) { flex: 1 1 auto; }
  .con-barra .pagina { padding-bottom: 13rem; }
  .indicadores { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 78%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin-inline: -1rem; padding-inline: 1rem; scroll-padding-inline: 1rem; }
  .indicador { scroll-snap-align: start; }
}
@media (max-width: 860px) { .cifra-valor { white-space: normal; overflow-wrap: anywhere; } }
