/* YardaFleet · base común (concepto A «Yarda de noche»; nota de diseño research_notes/2026-11-13-yardafleet/diseno-wow.md).
   Tokens con light-dark(): oscuro de cine (asfalto y luz de sodio) y un modo claro diseñado aparte, no invertido.
   Contrastes medidos con src/color.js (texto ≥ 4,5:1; bordes de campos ≥ 3:1). Letras servidas por nosotros (OFL). */

@font-face { font-family: 'Barlow Condensed'; font-weight: 700; font-style: normal; font-display: swap; src: url('/fonts/barlow-condensed-700.woff2') format('woff2'); }
@font-face { font-family: 'Barlow Condensed'; font-weight: 800; font-style: normal; font-display: swap; src: url('/fonts/barlow-condensed-800.woff2') format('woff2'); }
@font-face { font-family: 'Barlow'; font-weight: 400; font-style: normal; font-display: swap; src: url('/fonts/barlow-400.woff2') format('woff2'); }
@font-face { font-family: 'Barlow'; font-weight: 600; font-style: normal; font-display: swap; src: url('/fonts/barlow-600.woff2') format('woff2'); }

:root {
  color-scheme: dark light;
  --fuente: 'Barlow', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --fuente-titulo: 'Barlow Condensed', 'Arial Narrow', ui-sans-serif, system-ui, sans-serif;
  --fondo: light-dark(#f5f6f8, #0a0e13);
  --superficie: light-dark(#ffffff, #121821);
  --superficie-alta: light-dark(#ffffff, #1a2230);
  --texto: light-dark(#0e141b, #eef2f6);
  --texto-2: light-dark(#4a5565, #a9b4c2);
  --texto-3: light-dark(#667085, #8794a5);
  --borde: light-dark(#dfe3e9, #222c3a);
  --borde-campo: light-dark(#7a8494, #5b6b80);
  --sombra: light-dark(rgb(16 24 40 / .10), rgb(0 0 0 / .55));
  --acento: #ffb020;
  --acento-tinta: #0a0e13;
  --acento-texto: light-dark(#966813, #ffb020);
  --acento-oscuro: #ffb020;
  --al-dia: light-dark(#006300, #3ddc84);
  --pronto: light-dark(#8a5a00, #fab219);
  --vencido: light-dark(#b42318, #ff6b6b);
  --info: light-dark(#0b6e99, #4cc9f0);
  --radio: 14px;
  --gutter: 16px;
}
/* Navegadores sin light-dark() (≈ 8 %): el oscuro de siempre */
@supports not (color: light-dark(#000, #fff)) {
  :root {
    --fondo: #0a0e13; --superficie: #121821; --superficie-alta: #1a2230; --texto: #eef2f6; --texto-2: #a9b4c2;
    --texto-3: #8794a5; --borde: #222c3a; --borde-campo: #5b6b80; --sombra: rgb(0 0 0 / .55); --acento-texto: #ffb020;
    --al-dia: #3ddc84; --pronto: #fab219; --vencido: #ff6b6b; --info: #4cc9f0;
  }
}
/* Preparado para el interruptor de «Mi cuenta» (M1): forzar un modo */
:root[data-tema='claro'] { color-scheme: light; }
:root[data-tema='oscuro'] { color-scheme: dark; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 16px; scroll-padding-bottom: 96px; }
body {
  margin: 0; min-height: 100vh; min-height: 100svh;
  background: var(--fondo); color: var(--texto);
  font-family: var(--fuente); font-size: 1.0625rem; line-height: 1.55;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: var(--fuente-titulo); font-weight: 800; line-height: 1.05; letter-spacing: .01em; margin: 0; text-wrap: balance; }
p { margin: 0; }
a { color: var(--acento-texto); text-underline-offset: .18em; }
img, svg { max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--acento-texto); outline-offset: 3px; border-radius: 4px; }

.sr { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.saltar { position: absolute; left: 12px; top: -100px; z-index: 100; padding: 12px 18px; border-radius: 10px; background: var(--acento); color: var(--acento-tinta); font-weight: 600; text-decoration: none; }
.saltar:focus { top: 12px; }

/* Cinta del entorno de pruebas */
.cinta-pruebas { margin: 0; padding: 6px var(--gutter); background: #fab219; color: #0a0e13; font-weight: 600; font-size: .875rem; text-align: center; letter-spacing: .02em; }

/* Cambiar de idioma */
.idioma { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border: 1px solid var(--borde-campo); border-radius: 999px; color: var(--texto); font-weight: 600; font-size: .9375rem; text-decoration: none; }
.idioma:hover { border-color: var(--acento-texto); color: var(--acento-texto); }

/* Estados con forma, palabra y color: ● al día, ◆ pronto, ⬣ vencido, ▢ sin fecha */
.estado { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: .8125rem; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; }
.estado__forma { width: 15px; height: 15px; flex: none; }
.estado--al_dia { color: var(--al-dia); }
.estado--pronto { color: var(--pronto); }
.estado--vencido { color: var(--vencido); }
/* M3: ▢ sin fecha (cuadrado hueco con su punto): la app no puede avisar */
.estado--falta { color: var(--info); }

/* Botones (el principal, con el brillo ámbar de la plantilla, como mucho 3 veces) */
.boton { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 24px; border-radius: 999px; border: 2px solid transparent; font-weight: 600; font-size: 1.0625rem; text-decoration: none; cursor: pointer; transition: transform .15s ease, box-shadow .2s ease, background-color .2s ease; }
.boton--principal { background: var(--acento); color: var(--acento-tinta); box-shadow: 0 10px 30px rgb(255 176 32 / .28); }
.boton--principal:hover { transform: translateY(-1px); box-shadow: 0 14px 38px rgb(255 176 32 / .42); }
.boton--secundario { background: transparent; color: var(--texto); border-color: var(--borde-campo); }
.boton--secundario:hover { border-color: var(--acento-texto); color: var(--acento-texto); }
@media (prefers-reduced-motion: no-preference) {
  .boton--brillo { animation: brillo 1.6s ease-in-out 3; }
}
@keyframes brillo { 0%, 100% { box-shadow: 0 10px 30px rgb(255 176 32 / .28); } 50% { box-shadow: 0 10px 46px rgb(255 176 32 / .65); } }

/* 404 */
.no-existe { display: grid; place-content: center; justify-items: start; gap: 14px; min-height: 80vh; padding: 48px var(--gutter); max-width: 640px; margin: 0 auto; }
.no-existe__codigo { font-family: var(--fuente-titulo); font-weight: 800; font-size: clamp(5rem, 22vw, 9rem); line-height: .9; color: var(--acento-texto); }
.no-existe h1 { font-size: clamp(2rem, 6vw, 3rem); }
.no-existe p { color: var(--texto-2); }
.no-existe .logo--horizontal { width: 200px; }

/* Transiciones de vista entre páginas: QUITADAS en M1 (14-11). Con los formularios de entrar (POST → 303), Chrome en el
   móvil abortaba la transición y lo anotaba como error de consola («Transition was aborted… opt-in disabled»). Pendiente:
   volver a ponerlas solo entre pantallas de lectura, con pageswap/pagereveal en un JS propio */

/* Alto contraste de Windows: colores del sistema */
@media (forced-colors: active) {
  .estado, .boton { forced-color-adjust: auto; }
  .boton { border-color: ButtonText; }
}

/* «Reducir movimiento»: todo quieto y entero */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
