/* ParkGO — sistema visual base.
   Referencia: interfaces de Apple (iOS/macOS, apple.com) y One UI. Tipografía
   protagonista (Inter), mucho aire, superficies en capas en vez de bordes, color
   con moderación: el azul de marca es el acento; el amarillo, sólo un detalle.
   Reglas para las pantallas: docs/diseno.md. */

/* ---------- tipografía (Inter, OFL, autoalojada) ---------- */
@font-face {
  font-family: "Inter";
  src: url("/fuentes/inter-latin-opsz-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* ---------- tokens ---------- */
:root {
  /* PALETA «SEÑAL VIAL» (20-oct-2026): pensada para leerse AL SOL. Texto casi negro
     (18.7:1), secundario 9.6:1, botones con texto blanco ≥ 5.4:1, tarjetas con filo
     visible. Colores de la señalización de parqueo: azul «P», amarillo de seguridad,
     verde de pago, rojo de alto. El modo oscuro ya NO es automático (al sol se lee
     peor): sólo con <html data-tema="oscuro">. */
  /* marca */
  --marca: #0047cc;
  --marca-oscura: #003399;
  --amarillo: #ffc20e;

  /* superficies (claro: gris iOS + tarjetas blancas) */
  --fondo: #eef2f7;
  --superficie: #ffffff;
  --superficie-2: #eef2f7;          /* relleno de campos y filas dentro de una tarjeta */
  --superficie-elevada: #ffffff;    /* modales, menús */
  --relleno: rgb(11 18 32 / .07);   /* botón gris, segmentado, pista */
  --relleno-hover: rgb(11 18 32 / .12);
  --vidrio: rgb(255 255 255 / .98);    /* barras translúcidas */
  --superficie-menu: #ffffff;
  --separador: #c9d1dc;
  --borde: #c9d1dc;        /* alias histórico de --separador */

  /* texto */
  --texto: #0b1220;
  --texto-2: #3b4558;
  --texto-3: #5b6577;               /* sólo marcadores de posición e iconos inactivos */
  --texto-sobre-acento: #ffffff;

  /* acento y estados (verdes/rojos sistema, versión legible como texto) */
  --acento: #0047cc;
  --acento-hover: #003db0;
  --acento-relleno: #0047cc;        /* fondo de botón primario e ítem activo (texto blanco ≥ 4.5:1) */
  --acento-suave: rgb(0 71 204 / .1);
  --ok: #0a7a3d;
  --ok-solido: #12a150;
  --ok-relleno: #0a7a3d;            /* fondo de botón «cobrar» (texto blanco ≥ 4.5:1) */
  --ok-suave: rgb(10 122 61 / .12);
  --peligro: #b3141b;
  --peligro-solido: #d92d20;
  --peligro-suave: rgb(179 20 27 / .08);
  --aviso: #7a4d00;
  --aviso-suave: rgb(255 194 14 / .24);

  /* tipografía */
  --fuente: "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  /* placas y códigos: Inter con cifras tabulares y cero con barra (0 ≠ O) */
  --placa: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  --rasgos-placa: "tnum" 1, "zero" 1, "ss02" 1;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", "Roboto Mono", Menlo, Consolas, monospace;
  --t-xs: .75rem;    /* 12 etiquetas, ejes */
  --t-s: .8125rem;   /* 13 rótulos de campo, notas */
  --t-m: .9375rem;   /* 15 texto secundario, tablas */
  --t-base: 1rem;    /* 16 cuerpo */
  --t-l: 1.0625rem;  /* 17 título de tarjeta */
  --t-xl: 1.375rem;  /* 22 título de sección / modal */
  --t-titulo: 2rem;  /* 32 título de página (28 en móvil) */
  --t-cifra: 1.875rem;   /* 30 cifra de tarjeta */
  --t-enorme: 3.5rem;    /* 56 total a cobrar */

  /* espaciado (base 4) */
  --e-1: 4px; --e-2: 8px; --e-3: 12px; --e-4: 16px; --e-5: 20px;
  --e-6: 24px; --e-7: 32px; --e-8: 40px; --e-9: 56px;

  /* radios */
  --radio-xs: 8px;
  --radio-s: 12px;    /* campos y botones no píldora */
  --radio: 24px;      /* tarjetas (rounded-3xl) */
  --radio-l: 28px;    /* modales, login */
  --pildora: 999px;

  /* sombras: difusas, casi invisibles */
  --sombra-s: 0 0 0 1px #c9d1dc;
  --sombra: 0 0 0 1px #c9d1dc, 0 1px 3px rgb(11 18 32 / .08);
  --sombra-l: 0 0 0 1px #b8c2cf, 0 24px 60px rgb(11 18 32 / .18);
  --anillo: 0 0 0 4px rgb(0 71 204 / .35);

  /* movimiento (curva tipo iOS) */
  --curva: cubic-bezier(.25, .1, .25, 1);
  --curva-hoja: cubic-bezier(.32, .72, 0, 1);
  --rapido: 150ms;
  --normal: 220ms;

  /* armazón */
  --alto-barra: 56px;
  --ancho-menu: 232px;

  /* nombres antiguos que aún usan algunas pantallas */
  --azul-900: #0b1f3a;
  --azul-600: var(--marca);
  --azul-500: #4d82ff;
  --azul-100: var(--acento-suave);
  --amarillo-osc: var(--aviso);
  --radio-s-old: 10px;

  color-scheme: light;
}

/* Modo oscuro opcional: no se activa solo. */
:root[data-tema="oscuro"] {
  :root {
    --fondo: #000000;
    --superficie: #1c1c1e;
    --superficie-2: #2c2c2e;
    --superficie-elevada: #1c1c1e;
    --relleno: rgb(118 118 128 / .24);
    --relleno-hover: rgb(118 118 128 / .32);
    --vidrio: rgb(22 22 24 / .72);
    --superficie-menu: #0d0d0f;
    --separador: rgb(84 84 88 / .55);
    --borde: rgb(84 84 88 / .55);

    --texto: #f5f5f7;
    --texto-2: #98989f;
    --texto-3: #6e6e73;

    --acento: #5b8cff;
    --acento-hover: #2f6bff;
    --acento-relleno: #2a63ff;
    --acento-suave: rgb(77 130 255 / .18);
    --ok: #30d158;
    --ok-solido: #30d158;
    --ok-relleno: #248a3d;
    --ok-suave: rgb(48 209 88 / .16);
    --peligro: #ff453a;
    --peligro-solido: #ff453a;
    --peligro-suave: rgb(255 69 58 / .16);
    --aviso: #ffd60a;
    --aviso-suave: rgb(255 194 26 / .14);

    --sombra-s: none;
    --sombra: none;
    --sombra-l: 0 24px 60px rgb(0 0 0 / .6);
    --anillo: 0 0 0 4px rgb(77 130 255 / .4);
    color-scheme: dark;
  }
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--fondo);
  color: var(--texto);
  font-family: var(--fuente);
  font-size: var(--t-base);
  line-height: 1.5;
  letter-spacing: -.011em;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
  text-rendering: optimizeLegibility;
}
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
img { max-width: 100%; display: block; }
h1, h2, h3 { margin: 0; line-height: 1.2; font-weight: 650; }
h1 { font-size: var(--t-titulo); font-weight: 700; letter-spacing: -.028em; line-height: 1.1; }
h2 { font-size: var(--t-xl); letter-spacing: -.02em; }
h3 { font-size: var(--t-l); letter-spacing: -.015em; }
p { margin: 0; }
a { color: var(--acento); }
::selection { background: var(--acento-suave); }
:focus-visible { outline: 2px solid var(--acento); outline-offset: 2px; }
:focus:not(:focus-visible) { outline: none; }

/* iconos Tabler a trazo fino */
.ico { width: 1.25em; height: 1.25em; flex: none; }
.ico * { stroke-width: 1.75; }
.ico-s { width: 16px; height: 16px; }
.ico-l { width: 28px; height: 28px; }
.ico-xl { width: 44px; height: 44px; }

/* ---------- marca, carga y login ---------- */
.sello {
  display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; flex: none;
  background: linear-gradient(160deg, #3d74ff, var(--marca) 55%, var(--marca-oscura));
  color: #fff; font-weight: 800; font-size: 26px; letter-spacing: -.02em; position: relative;
  box-shadow: inset 0 0 0 .5px rgb(255 255 255 / .25), 0 1px 2px rgb(0 0 0 / .12);
}
.sello::after {
  content: ""; position: absolute; right: -3px; bottom: -3px; width: 12px; height: 12px;
  border-radius: 50%; background: var(--amarillo); box-shadow: 0 0 0 2.5px var(--superficie);
}

.cargando-app { min-height: 100vh; display: grid; place-items: center; background: var(--fondo); }
.marca-carga .sello { width: 64px; height: 64px; font-size: 38px; border-radius: 18px; animation: latido 1.4s var(--curva) infinite; }
.marca-carga .sello::after { width: 16px; height: 16px; box-shadow: 0 0 0 3px var(--fondo); }
@keyframes latido { 50% { transform: scale(.94); opacity: .75; } }

.login {
  min-height: 100vh; display: grid; place-items: center; padding: var(--e-6) var(--e-4);
  background:
    radial-gradient(900px 480px at 50% -12%, rgb(0 71 204 / .14), transparent 70%),
    var(--fondo);
}
.login-caja {
  width: 100%; max-width: 400px; background: var(--superficie); border-radius: var(--radio-l);
  padding: var(--e-8) var(--e-7) var(--e-7); box-shadow: var(--sombra-l);
}
.login-caja > * + * { margin-top: var(--e-4); }
.login-marca { display: grid; justify-items: center; text-align: center; gap: var(--e-4); margin-bottom: var(--e-7); }
.login-marca .sello { width: 64px; height: 64px; font-size: 38px; border-radius: 18px; }
.login-marca .sello::after { width: 16px; height: 16px; box-shadow: 0 0 0 3px var(--superficie); }
.login-marca b { display: block; font-size: var(--t-titulo); font-weight: 700; letter-spacing: -.03em; line-height: 1.1; }
.login-marca small { display: block; color: var(--texto-2); font-size: var(--t-m); margin-top: var(--e-1); }
.login-caja .btn { margin-top: var(--e-6); }
.login-pie { text-align: center; color: var(--texto-3); font-size: var(--t-xs); margin-top: var(--e-6) !important; }
@media (max-width: 480px) {
  .login { place-items: start center; padding-top: 12vh; }
  .login-caja { padding: var(--e-7) var(--e-5) var(--e-6); }
}

/* ---------- armazón ---------- */
.armazon { min-height: 100vh; display: grid; grid-template-rows: auto 1fr auto; grid-template-columns: minmax(0, 1fr); }
.armazon > .contenido { grid-row: 2; min-width: 0; }
.armazon > .navegacion { grid-row: 3; }

/* barra superior translúcida */
.barra {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: var(--e-3);
  min-height: var(--alto-barra); padding: 8px var(--e-4); padding-top: max(8px, env(safe-area-inset-top));
  background: var(--vidrio); color: var(--texto);
  -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  border-bottom: .5px solid var(--separador);
}
.barra .sello { width: 32px; height: 32px; font-size: 19px; border-radius: 9px; }
.barra .sello::after { width: 9px; height: 9px; right: -2px; bottom: -2px; box-shadow: 0 0 0 2px var(--superficie); }
.barra-titulo { min-width: 0; flex: 1; line-height: 1.25; }
.barra-titulo b { display: block; font-size: var(--t-m); font-weight: 650; letter-spacing: -.015em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.barra-titulo small { display: block; color: var(--texto-2); font-size: var(--t-xs); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.reloj-barra { font-variant-numeric: tabular-nums; color: var(--texto-2); font-weight: 550; font-size: var(--t-s); white-space: nowrap; }
.btn-barra {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 36px; min-width: 36px;
  border: 0; background: var(--relleno); color: var(--texto); border-radius: var(--pildora);
  padding: 0 14px; cursor: pointer; font-size: var(--t-s); font-weight: 550; white-space: nowrap;
  transition: background var(--rapido) var(--curva), transform var(--rapido) var(--curva);
}
.btn-barra .ico { width: 18px; height: 18px; }
.btn-barra:hover { background: var(--relleno-hover); }
.btn-barra:active { transform: scale(.96); }

/* selector del parqueo activo: píldora gris */
.barra-parqueo { display: inline-flex; align-items: center; gap: 6px; color: var(--texto); font-weight: 550; font-size: var(--t-s); min-width: 0; position: relative; }
.barra-parqueo > .ico { width: 18px; height: 18px; color: var(--acento); }
span.barra-parqueo { background: var(--relleno); border-radius: var(--pildora); padding: 0 14px; min-height: 36px; }
.barra-parqueo select {
  appearance: none; -webkit-appearance: none; cursor: pointer;
  background: var(--relleno) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238e8e93' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9l6 6l6-6'/%3E%3C/svg%3E") no-repeat right 10px center / 14px;
  color: var(--texto); border: 0; border-radius: var(--pildora);
  min-height: 36px; padding: 0 32px 0 14px; max-width: 46vw; font-weight: 550; font-size: var(--t-s);
  transition: background-color var(--rapido) var(--curva);
}
.barra-parqueo select:hover { background-color: var(--relleno-hover); }
.barra-parqueo select option { color: #111; background: #fff; }

/* navegación: tab bar de iOS en móvil, barra lateral en escritorio */
.navegacion {
  position: sticky; bottom: 0; z-index: 20; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  background: var(--vidrio);
  -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  border-top: .5px solid var(--separador);
  padding: 4px 4px env(safe-area-inset-bottom);
}
.navegacion a {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  min-height: 52px; padding: 6px 2px 4px;
  color: var(--texto-3); text-decoration: none; font-size: .6875rem; font-weight: 550; letter-spacing: 0;
  transition: color var(--rapido) var(--curva), background var(--rapido) var(--curva);
}
.navegacion a .ico { width: 26px; height: 26px; }
.navegacion a span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.navegacion a:hover { color: var(--texto-2); }
.navegacion a.activa { color: var(--acento); }
.navegacion a.activa .ico * { stroke-width: 2.1; }

.contenido { position: relative; width: 100%; max-width: 1180px; margin: 0 auto; padding: var(--e-6) var(--e-4) var(--e-8); }

@media (min-width: 900px) {
  .armazon {
    grid-template-columns: var(--ancho-menu) minmax(0, 1fr); grid-template-rows: auto 1fr;
    /* el fondo de la columna del menú llega hasta el final aunque la página sea larga */
    background: linear-gradient(to right, var(--superficie-menu) calc(var(--ancho-menu) - .5px), var(--separador) 0, var(--separador) var(--ancho-menu), transparent 0);
  }
  .barra { grid-column: 1 / -1; padding-left: var(--e-5); padding-right: var(--e-5); }
  .armazon > .navegacion { grid-row: 2; grid-column: 1; }
  .armazon > .contenido { grid-row: 2; grid-column: 2; }
  .navegacion {
    position: sticky; top: var(--alto-barra); align-self: start; height: calc(100vh - var(--alto-barra));
    grid-auto-flow: row; grid-auto-rows: max-content; gap: 2px; padding: var(--e-5) var(--e-3);
    background: transparent; -webkit-backdrop-filter: none; backdrop-filter: none;
    border-top: 0;
  }
  .navegacion a {
    flex-direction: row; justify-content: flex-start; gap: var(--e-3); min-height: 40px; padding: 8px 12px;
    border-radius: var(--pildora); font-size: var(--t-m); font-weight: 550; color: var(--texto); letter-spacing: -.011em;
  }
  .navegacion a .ico { width: 20px; height: 20px; color: var(--texto-2); }
  .navegacion a:hover { background: var(--relleno); color: var(--texto); }
  .navegacion a:hover .ico { color: var(--texto); }
  .navegacion a.activa { background: var(--acento-relleno); color: #fff; box-shadow: 0 4px 12px rgb(0 71 204 / .25); }
  .navegacion a.activa .ico, .navegacion a.activa:hover .ico { color: #fff; }
  .contenido { padding: var(--e-7) var(--e-8) var(--e-9); }
}

/* ---------- maquetación ---------- */
.encabezado { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--e-4); margin-bottom: var(--e-6); flex-wrap: wrap; }
.encabezado > div:first-child { min-width: 0; }
.encabezado h1 + .sub, .encabezado h1 + p { margin-top: 6px; }
.sub { color: var(--texto-2); font-size: var(--t-m); }
.pila > * + * { margin-top: var(--e-3); }
.fila { display: flex; gap: var(--e-2); align-items: center; flex-wrap: wrap; }
.columnas { display: grid; gap: var(--e-5); }
@media (min-width: 820px) { .columnas { grid-template-columns: 1.1fr 1fr; align-items: start; } }
.rejilla-2 { display: grid; gap: var(--e-3) var(--e-4); grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.seccion { margin-top: var(--e-7); }
.seccion > h2, .seccion > h3, .tarjeta > h3, .tarjeta > h2 { margin-bottom: var(--e-3); display: flex; align-items: center; gap: var(--e-2); }

/* ---------- tarjeta: superficie sin borde ---------- */
.tarjeta {
  background: var(--superficie); border: 0; border-radius: var(--radio);
  padding: var(--e-5); box-shadow: var(--sombra);
}
.tarjeta + .tarjeta { margin-top: var(--e-4); }
.columnas > .tarjeta + .tarjeta, .rejilla-2 > .tarjeta + .tarjeta { margin-top: 0; }
@media (min-width: 900px) { .tarjeta { padding: var(--e-6); } }

/* ---------- botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px;
  padding: 0 var(--e-5); border-radius: var(--pildora); border: 0;
  background: var(--relleno); color: var(--acento); font-weight: 600; font-size: var(--t-m);
  letter-spacing: -.011em; line-height: 1.2; cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background-color var(--rapido) var(--curva), color var(--rapido) var(--curva),
    transform var(--rapido) var(--curva), box-shadow var(--rapido) var(--curva), opacity var(--rapido) var(--curva);
}
.btn .ico { width: 20px; height: 20px; }
.btn:hover { background: var(--relleno-hover); }
.btn:active { transform: scale(.97); }
.btn:focus-visible { outline: none; box-shadow: var(--anillo); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .4; cursor: not-allowed; transform: none; }
.btn-primario { background: var(--acento-relleno); color: var(--texto-sobre-acento); }
.btn-primario:hover { background: var(--acento-hover); }
.btn-ok { background: var(--ok-relleno); color: #fff; }
.btn-ok:hover { background: var(--ok-relleno); filter: brightness(1.08); }
.btn-peligro { background: var(--peligro-suave); color: var(--peligro); }
.btn-peligro:hover { background: var(--peligro-suave); filter: brightness(.97); }
.btn-texto { background: transparent; padding: 0 var(--e-2); }
.btn-texto:hover { background: var(--relleno); }
.btn-grande { min-height: 56px; font-size: var(--t-l); padding: 0 var(--e-7); }
.btn-grande .ico { width: 22px; height: 22px; }
.btn-ancho { width: 100%; }
.btn-chico { min-height: 34px; padding: 0 var(--e-4); font-size: var(--t-s); }
.btn-chico .ico { width: 17px; height: 17px; }
.btn-icono { min-height: 40px; width: 40px; padding: 0; border-radius: 50%; color: var(--texto-2); }
.btn-icono .ico { width: 20px; height: 20px; }
@media (pointer: coarse) {
  .btn-chico { min-height: 44px; }
  .btn-icono { min-height: 44px; width: 44px; }
  .btn-barra { min-height: 40px; min-width: 40px; }
}

/* ---------- campos ---------- */
label.campo { display: block; min-width: 0; }
label.campo > span { display: block; font-size: var(--t-s); font-weight: 550; color: var(--texto-2); margin: 0 0 6px 4px; }
.entrada, select.entrada, textarea.entrada {
  width: 100%; min-height: 48px; padding: 12px 14px; border-radius: var(--radio-s);
  border: 1px solid var(--separador); background: var(--superficie); color: var(--texto); outline: none;
  box-shadow: var(--sombra-s);
  font-size: var(--t-base);
  transition: border-color var(--rapido) var(--curva), box-shadow var(--rapido) var(--curva), background-color var(--rapido) var(--curva);
}
/* dentro de una tarjeta o un modal (superficie blanca) el campo es gris y sin borde */
.tarjeta .entrada, .modal .entrada, .cifra .entrada, .login-caja .entrada { background-color: var(--superficie-2); border-color: transparent; box-shadow: none; }
.entrada::placeholder { color: var(--texto-3); }
.tarjeta .entrada:hover, .modal .entrada:hover { border-color: var(--separador); }
.entrada:focus { border-color: var(--acento); box-shadow: var(--anillo); background-color: var(--superficie); }
.entrada:disabled { opacity: .5; cursor: not-allowed; }
textarea.entrada { min-height: 96px; resize: vertical; line-height: 1.45; }
select.entrada {
  appearance: none; -webkit-appearance: none; cursor: pointer; padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238e8e93' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9l6 6l6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; background-size: 16px;
}
input[type="date"].entrada, input[type="time"].entrada { font-variant-numeric: tabular-nums; }
.ayuda { font-size: var(--t-s); color: var(--texto-2); margin-top: 6px; line-height: 1.45; }

/* casilla = interruptor estilo iOS (sigue siendo un checkbox) */
.casilla { display: flex; align-items: center; gap: var(--e-3); min-height: 44px; cursor: pointer; line-height: 1.35; }
.casilla input[type="checkbox"] {
  appearance: none; -webkit-appearance: none; flex: none; margin: 0; cursor: pointer;
  width: 46px; height: 28px; border-radius: var(--pildora); background: var(--relleno-hover); position: relative;
  transition: background-color var(--normal) var(--curva);
}
.casilla input[type="checkbox"]::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 24px; height: 24px; border-radius: 50%;
  background: #fff; box-shadow: 0 2px 6px rgb(0 0 0 / .18), 0 0 0 .5px rgb(0 0 0 / .04);
  transition: transform var(--normal) var(--curva-hoja);
}
.casilla input[type="checkbox"]:checked { background: var(--ok-solido); }
.casilla input[type="checkbox"]:checked::after { transform: translateX(18px); }
.casilla input[type="checkbox"]:focus-visible { outline: none; box-shadow: var(--anillo); }
.casilla input[type="checkbox"]:disabled { opacity: .45; cursor: not-allowed; }
.casilla input[type="radio"] { width: 20px; height: 20px; accent-color: var(--acento); }

/* placa: imita la placa física, igual en claro y oscuro */
.entrada-placa {
  width: 100%; text-align: center; font: 800 2.5rem/1 var(--placa); font-feature-settings: var(--rasgos-placa); letter-spacing: .08em; text-transform: uppercase;
  padding: 16px 12px; border-radius: 14px; border: 2.5px solid #0b1220; background: #fff; color: #111;
  outline: none; box-shadow: var(--sombra-s);
  transition: border-color var(--rapido) var(--curva), box-shadow var(--rapido) var(--curva);
}
.entrada-placa:focus { border-color: var(--acento); box-shadow: var(--anillo); }
.entrada-placa::placeholder { color: #c7c7cc; }

/* ---------- chips (opciones grandes: tipo de vehículo, forma de pago) ---------- */
.chips { display: flex; flex-wrap: wrap; gap: var(--e-2); }
.chip {
  display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 var(--e-5); border-radius: var(--pildora);
  border: 0; background: var(--relleno); color: var(--texto); font-weight: 600; font-size: var(--t-m); cursor: pointer;
  transition: background-color var(--rapido) var(--curva), color var(--rapido) var(--curva), box-shadow var(--rapido) var(--curva), transform var(--rapido) var(--curva);
}
.chip .ico { width: 22px; height: 22px; }
.chip:hover { background: var(--relleno-hover); }
.chip:active { transform: scale(.97); }
.chip:focus-visible { outline: none; box-shadow: var(--anillo); }
.chip[aria-pressed="true"] { background: var(--acento-suave); color: var(--acento); box-shadow: inset 0 0 0 2px var(--acento); }

/* ---------- segmentado (UISegmentedControl) ---------- */
.segmentos {
  display: inline-flex; gap: 2px; max-width: 100%; overflow-x: auto; scrollbar-width: none;
  background: var(--relleno); border: 0; border-radius: 10px; padding: 2px;
}
.segmentos::-webkit-scrollbar { display: none; }
.segmentos button {
  flex: 1 0 auto; border: 0; background: none; min-height: 34px; padding: 0 var(--e-4); border-radius: 8px;
  font-weight: 550; font-size: var(--t-s); color: var(--texto); cursor: pointer; white-space: nowrap;
  transition: background-color var(--normal) var(--curva), box-shadow var(--normal) var(--curva);
}
.segmentos button:hover:not([aria-pressed="true"]) { background: rgb(118 118 128 / .08); }
.segmentos button[aria-pressed="true"] {
  background: var(--superficie); font-weight: 650;
  box-shadow: 0 3px 8px rgb(0 0 0 / .12), 0 3px 1px rgb(0 0 0 / .04);
}
.segmentos button:focus-visible { outline: none; box-shadow: var(--anillo); }
:root[data-tema="oscuro"] .segmentos button[aria-pressed="true"] { background: #636366; }
@media (max-width: 640px) {
  .encabezado > .segmentos { width: 100%; }
  .segmentos button { min-height: 36px; padding: 0 var(--e-3); }
}

/* ---------- cifras (indicadores) ---------- */
.cifras { display: flex; flex-wrap: wrap; gap: var(--e-3); }
.cifras > .cifra { flex: 1 1 160px; }
@media (min-width: 641px) { .cifras > .cifra:not(.destacada) { max-width: calc(50% - var(--e-2)); } }
.cifras > .cifra.destacada { flex: 2 1 300px; }
.cifra {
  background: var(--superficie); border: 0; border-radius: var(--radio); padding: var(--e-4) var(--e-5) var(--e-5);
  box-shadow: var(--sombra); min-width: 0;
}
.cifra small { display: block; color: var(--texto-2); font-weight: 550; font-size: var(--t-s); }
.cifra b {
  display: block; font-size: var(--t-cifra); font-weight: 700; letter-spacing: -.03em; line-height: 1.1;
  font-variant-numeric: tabular-nums; margin-top: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cifra.destacada { padding: var(--e-5) var(--e-6) var(--e-6); }
.cifra.destacada b { font-size: 3rem; letter-spacing: -.045em; margin-top: var(--e-2); }
.cifra.destacada small, .cifra.destacada .cifra-nota { color: var(--texto-2); }
/* moneda más chica y gris delante de una cifra grande: <b><span class="moneda">L</span> 2,475.00</b> */
.moneda { font-size: .55em; font-weight: 600; color: var(--texto-2); letter-spacing: 0; margin-right: .08em; vertical-align: .12em; }
.cifra-nota { color: rgb(255 255 255 / .78); }
.cifra-nota { display: block; font-size: var(--t-s); color: var(--texto-2); margin-top: 6px; font-variant-numeric: tabular-nums; }
.cifra-de { font-size: var(--t-l); color: var(--texto-2); font-weight: 550; letter-spacing: -.01em; }
.cifra-alerta { background: var(--aviso-suave); box-shadow: inset 0 0 0 1px rgb(255 194 26 / .55); }
@media (max-width: 640px) {
  .cifras > .cifra { flex: 1 1 calc(50% - var(--e-3)); }
  .cifras > .cifra.destacada { flex-basis: 100%; padding: var(--e-5); }
  .cifras > .cifra.destacada b { font-size: 2.625rem; }
  .cifra { padding: var(--e-4); }
  .cifra b { font-size: 1.625rem; }
}

/* cifras de dinero grandes */
.hora-grande { font-size: 2.25rem; font-weight: 700; line-height: 1.05; font-variant-numeric: tabular-nums; letter-spacing: -.03em; }
.total-grande { font-size: var(--t-enorme); font-weight: 700; letter-spacing: -.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.vuelto { font-size: 1.75rem; font-weight: 700; letter-spacing: -.025em; color: var(--ok); font-variant-numeric: tabular-nums; }
@media (max-width: 640px) { .total-grande { font-size: 3rem; } }

/* ---------- datos y desglose ---------- */
.datos { display: grid; grid-template-columns: auto 1fr; gap: var(--e-2) var(--e-4); margin: 0; }
.datos dt { color: var(--texto-2); font-size: var(--t-m); }
.datos dd { margin: 0; font-weight: 550; text-align: right; font-variant-numeric: tabular-nums; min-width: 0; overflow-wrap: anywhere; }
.desglose { list-style: none; margin: 0; padding: 0; }
.desglose li { display: flex; justify-content: space-between; gap: var(--e-3); padding: 10px 0; border-bottom: .5px solid var(--separador); font-variant-numeric: tabular-nums; }
.desglose li:last-child { border-bottom: 0; }
.placa-sello {
  display: inline-block; font: 800 1.5rem/1 var(--placa); font-feature-settings: var(--rasgos-placa); letter-spacing: .08em; padding: 9px 14px;
  border: 2.5px solid #0b1220; border-radius: 10px; background: #fff; color: #111;
}
.mono { font-family: var(--placa); font-feature-settings: var(--rasgos-placa); letter-spacing: 0; font-weight: 550; }
.separador-o { display: flex; align-items: center; gap: var(--e-3); color: var(--texto-3); font-size: var(--t-s); }
.separador-o::before, .separador-o::after { content: ""; flex: 1; height: .5px; background: var(--separador); }

/* ---------- bandas (mensajes en línea) ---------- */
.banda { padding: 14px var(--e-4); border-radius: 14px; font-weight: 500; font-size: var(--t-m); display: flex; gap: var(--e-3); align-items: flex-start; line-height: 1.45; }
.banda > .ico { width: 20px; height: 20px; margin-top: 1px; }
.banda-aviso { background: var(--aviso-suave); color: var(--texto); }
.banda-aviso > .ico { color: var(--aviso); }
.banda-peligro { background: var(--peligro-suave); color: var(--peligro); }
.banda-ok { background: var(--ok-suave); color: var(--ok); }
.banda-info { background: var(--acento-suave); color: var(--texto); }
.banda-info > .ico { color: var(--acento); }
.texto-aviso { color: var(--aviso); }
.texto-ok { color: var(--ok); }
.texto-peligro { color: var(--peligro); }

/* ---------- etiquetas (estado) ---------- */
.etiqueta {
  display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: var(--pildora);
  font-size: var(--t-xs); font-weight: 600; line-height: 1.5; letter-spacing: 0; white-space: nowrap; vertical-align: middle;
  background: var(--relleno); color: var(--texto-2);
}
.etiqueta.dentro { background: var(--acento-suave); color: var(--acento); }
.etiqueta.pagado { background: var(--ok-suave); color: var(--ok); }
.etiqueta.anulado { background: var(--peligro-suave); color: var(--peligro); }

/* ---------- cámara ---------- */
.visor {
  position: relative; aspect-ratio: 4 / 3; border-radius: 16px; overflow: hidden;
  background: #111114; display: grid; place-items: center; color: #aeaeb2;
}
.visor video, .visor img { width: 100%; height: 100%; object-fit: cover; }
.visor-vacio { display: grid; justify-items: center; gap: var(--e-3); text-align: center; padding: var(--e-5); font-size: var(--t-m); }
.visor-vacio > .ico { width: 52px; height: 52px; opacity: .6; }
.visor-marco { position: absolute; inset: 22% 12%; border: 3px solid var(--amarillo); border-radius: 14px; box-shadow: 0 0 0 9999px rgb(0 0 0 / .28); pointer-events: none; }
.visor-qr .visor-marco { inset: 15% 22%; }
.visor-acciones { position: absolute; left: 0; right: 0; bottom: 14px; display: flex; justify-content: center; gap: var(--e-3); }
.disparador {
  width: 70px; height: 70px; border-radius: 50%; border: 4px solid #fff; background: rgb(255 255 255 / .28);
  cursor: pointer; box-shadow: 0 4px 16px rgb(0 0 0 / .35); transition: transform var(--rapido) var(--curva);
}
.disparador:active { transform: scale(.92); background: #fff; }
.visor-sello {
  position: absolute; left: 10px; top: 10px; background: rgb(0 0 0 / .55); color: #fff; padding: 4px 10px;
  border-radius: 8px; font: 600 .8125rem/1.4 var(--mono);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}

/* ---------- listas ---------- */
.lista-vehiculos { display: grid; gap: var(--e-2); }
.vehiculo {
  display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: var(--e-3) var(--e-4); align-items: center;
  padding: var(--e-3) var(--e-4) var(--e-3) var(--e-3); width: 100%; min-height: 64px;
  background: var(--superficie); border: 0; border-radius: 16px; box-shadow: var(--sombra);
  cursor: pointer; text-align: left; font: inherit; color: inherit;
  transition: background-color var(--rapido) var(--curva), transform var(--rapido) var(--curva);
}
.vehiculo:hover { background: color-mix(in srgb, var(--superficie) 94%, var(--texto)); }
.vehiculo:active { transform: scale(.99); }
.vehiculo:focus-visible { outline: none; box-shadow: var(--anillo); }
.vehiculo b { font-family: var(--placa); font-feature-settings: var(--rasgos-placa); font-size: 1.0625rem; letter-spacing: .02em; font-weight: 700; }
.vehiculo .monto { font-weight: 700; font-size: var(--t-l); letter-spacing: -.02em; font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.vehiculo .sub { font-size: var(--t-s); }
.miniatura {
  width: 56px; height: 44px; border-radius: 10px; object-fit: cover; background: var(--superficie-2);
  display: grid; place-items: center; color: var(--texto-2);
}
.miniatura .ico { width: 22px; height: 22px; }

.lista-simple { list-style: none; margin: 0; padding: 0; }
.lista-simple li { display: flex; align-items: center; gap: var(--e-3); padding: var(--e-3) 0; min-height: 52px; border-bottom: .5px solid var(--separador); }
.lista-simple li:last-child { border-bottom: 0; }
.punto { width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--texto-3); }
.punto.ok { background: var(--ok-solido); }
.punto.apagado { background: var(--peligro-solido); }
.punto.pendiente { background: var(--relleno-hover); }
.punto.alerta { background: var(--amarillo); }

/* lista de opciones tipo iOS (elegir parqueo) */
.lista-opciones { display: grid; background: var(--superficie-2); border-radius: 16px; overflow: hidden; text-align: left; }
.opcion {
  display: flex; align-items: center; gap: var(--e-3); width: 100%; min-height: 56px; padding: 0 var(--e-4);
  border: 0; background: transparent; color: var(--texto); font: inherit; font-weight: 550; cursor: pointer; text-align: left;
  transition: background-color var(--rapido) var(--curva);
}
.opcion + .opcion { box-shadow: inset 0 .5px 0 var(--separador); }
.opcion:hover { background: var(--relleno); }
.opcion:focus-visible { outline: none; box-shadow: inset 0 0 0 2px var(--acento); }
.opcion > span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.opcion > .ico { color: var(--acento); }
.opcion > .ico:last-child { color: var(--texto-3); width: 18px; height: 18px; }

/* ---------- tabla ---------- */
.tabla-envoltura { overflow-x: auto; margin: 0 calc(-1 * var(--e-5)); padding: 0 var(--e-5); }
@media (min-width: 900px) { .tarjeta .tabla-envoltura { margin: 0 calc(-1 * var(--e-6)); padding: 0 var(--e-6); } }
table.tabla { width: 100%; border-collapse: collapse; font-size: var(--t-m); }
.tabla th {
  text-align: left; font-size: var(--t-xs); font-weight: 600; letter-spacing: .02em; color: var(--texto-2);
  padding: 0 12px 10px; border-bottom: .5px solid var(--separador); white-space: nowrap;
}
.tabla td { padding: 12px; border-bottom: .5px solid var(--separador); white-space: nowrap; font-variant-numeric: tabular-nums; }
.tabla th:first-child, .tabla td:first-child { padding-left: 0; }
.tabla th:last-child, .tabla td:last-child { padding-right: 0; }
.tabla td.num, .tabla th.num { text-align: right; }
.tabla td.num { font-weight: 550; }
.tabla tbody tr { transition: background-color var(--rapido) var(--curva); }
.tabla tbody tr:hover td { background: color-mix(in srgb, var(--superficie) 96%, var(--texto)); }
.tabla tr:last-child td { border-bottom: 0; }
.tabla td.vacio { padding: var(--e-8) var(--e-3); }

/* ---------- estados: vacío y carga ---------- */
.vacio { text-align: center; color: var(--texto-2); padding: var(--e-8) var(--e-4); font-size: var(--t-m); }
.vacio > .ico { display: block; width: 44px; height: 44px; margin: 0 auto var(--e-3); color: var(--texto-3); }
.vacio h2, .vacio h3 { color: var(--texto); }
.vacio h2 + p, .vacio h3 + p { margin: 6px auto 0; max-width: 44ch; }
.cargando { color: var(--texto-3); }
.esqueleto {
  border-radius: var(--radio-xs); min-height: 1em;
  background: linear-gradient(90deg, var(--relleno) 0%, var(--relleno-hover) 50%, var(--relleno) 100%) 0 0 / 200% 100%;
  animation: brillo 1.4s linear infinite;
}
@keyframes brillo { to { background-position: -200% 0; } }

/* tarjeta de elección (pantalla «¿En qué parqueo está trabajando?») */
.eleccion { max-width: 460px; margin: var(--e-8) auto; text-align: center; padding: var(--e-7) var(--e-6) var(--e-6) !important; }
.eleccion-icono { display: inline-grid; place-items: center; width: 64px; height: 64px; border-radius: 18px; background: var(--acento-suave); color: var(--acento); margin-bottom: var(--e-4); }
.eleccion-icono .ico { width: 32px; height: 32px; }
.eleccion h2 { font-size: var(--t-xl); }
.eleccion .sub { margin: var(--e-2) 0 var(--e-6); }

/* ---------- medidor ---------- */
.medidor { height: 6px; border-radius: var(--pildora); background: var(--relleno); overflow: hidden; border: 0; }
.medidor i { display: block; height: 100%; border-radius: var(--pildora); background: var(--acento); transition: width var(--normal) var(--curva); }
.medidor i.lleno { background: var(--peligro-solido); }

/* ---------- modal: hoja desde abajo en móvil, centrado en escritorio ---------- */
.capa {
  position: fixed; inset: 0; z-index: 50; background: rgb(0 0 0 / .32);
  display: grid; place-items: end center; padding: 0; animation: aparecer var(--normal) var(--curva);
}
.modal {
  width: 100%; max-width: 560px; max-height: 92vh; overflow: auto; overscroll-behavior: contain;
  background: var(--superficie-elevada); color: var(--texto);
  border-radius: var(--radio-l) var(--radio-l) 0 0;
  padding: var(--e-3) var(--e-5) calc(var(--e-6) + env(safe-area-inset-bottom));
  box-shadow: var(--sombra-l); animation: hoja 280ms var(--curva-hoja);
}
.modal::before { content: ""; display: block; width: 36px; height: 5px; border-radius: 3px; background: var(--relleno-hover); margin: 0 auto var(--e-3); }
.modal-cabeza { display: flex; justify-content: space-between; align-items: center; gap: var(--e-3); margin-bottom: var(--e-5); }
.modal-cabeza h2 { font-size: var(--t-xl); font-weight: 700; letter-spacing: -.022em; min-width: 0; }
.modal-cabeza .btn-icono { min-height: 32px; width: 32px; flex: none; background: var(--relleno); color: var(--texto-2); }
.modal-cabeza .btn-icono .ico { width: 18px; height: 18px; }
.modal-cabeza .btn-icono .ico * { stroke-width: 2.2; }
@media (pointer: coarse) { .modal-cabeza .btn-icono { min-height: 36px; width: 36px; } }
.modal .tarjeta { box-shadow: none; background: var(--superficie-2); }
@media (min-width: 640px) {
  .capa { place-items: center; padding: var(--e-6); }
  .modal { border-radius: var(--radio-l); padding: var(--e-6) var(--e-7) var(--e-7); animation: emerger var(--normal) var(--curva); }
  .modal::before { display: none; }
}
@keyframes aparecer { from { opacity: 0; } }
@keyframes hoja { from { transform: translateY(100%); } }
@keyframes emerger { from { opacity: 0; transform: scale(.96) translateY(8px); } }

/* ---------- vista previa del ticket en pantalla (no rediseñar) ---------- */
.papel {
  background: #fff; color: #111; margin: 0 auto; padding: 14px 12px; border-radius: 4px;
  box-shadow: 0 2px 12px rgb(0 0 0 / .15); font: 13px/1.35 var(--mono); letter-spacing: 0;
  background-image: linear-gradient(135deg, transparent 6px, #fff 0), linear-gradient(225deg, transparent 6px, #fff 0);
}
.papel-80 { width: 300px; max-width: 100%; }
.papel-58 { width: 220px; font-size: 11.5px; }

/* ---------- avisos flotantes ---------- */
#avisos {
  position: fixed; left: 50%; bottom: calc(76px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 70;
  display: grid; justify-items: center; gap: var(--e-2); width: min(calc(100vw - 32px), 440px); pointer-events: none;
}
@media (min-width: 900px) { #avisos { bottom: var(--e-6); left: calc(50% + var(--ancho-menu) / 2); } }
.aviso {
  display: flex; align-items: center; gap: 10px; max-width: 100%;
  background: rgb(29 29 31 / .92); color: #fff; padding: 12px 18px; border-radius: var(--pildora);
  -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  box-shadow: 0 10px 30px rgb(0 0 0 / .22); font-weight: 550; font-size: var(--t-m); line-height: 1.35;
  animation: subir 260ms var(--curva-hoja);
}
.aviso::before { content: ""; width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--acento); }
.aviso.error::before { background: var(--peligro-solido); }
.aviso.ok::before { background: var(--ok-solido); }
:root[data-tema="oscuro"] .aviso { background: rgb(58 58 60 / .92); }
@keyframes subir { from { transform: translateY(12px) scale(.98); opacity: 0; } }

/* ---------- tablero (piezas compartidas) ---------- */
.en-vivo { display: inline-flex; align-items: center; gap: 8px; font-size: var(--t-s); font-weight: 600; color: var(--ok); }
.en-vivo i { width: 8px; height: 8px; border-radius: 50%; background: var(--ok-solido); animation: pulso 2s infinite; }
.en-vivo.caido { color: var(--texto-2); }
.en-vivo.caido i { background: var(--texto-3); animation: none; }
@keyframes pulso { 0% { box-shadow: 0 0 0 0 rgb(52 199 89 / .5); } 70% { box-shadow: 0 0 0 8px rgb(52 199 89 / 0); } 100% { box-shadow: 0 0 0 0 rgb(52 199 89 / 0); } }
.rejilla-parqueos { display: grid; gap: var(--e-3); grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); margin-top: var(--e-3); }
.tarjeta-parqueo { text-align: left; cursor: pointer; margin: 0 !important; display: grid; gap: var(--e-2); font: inherit; color: inherit; border: 0;
  transition: transform var(--rapido) var(--curva), box-shadow var(--rapido) var(--curva); }
.tarjeta-parqueo:hover { box-shadow: var(--sombra), 0 0 0 1.5px var(--acento); }
.tarjeta-parqueo:active { transform: scale(.99); }
.rejilla-graficos { display: grid; gap: var(--e-4); margin-top: var(--e-4); }
.rejilla-graficos > .tarjeta { margin: 0; min-width: 0; }
@media (min-width: 900px) { .rejilla-graficos { grid-template-columns: 1fr 1fr; } }
.grafico { width: 100%; height: auto; display: block; overflow: visible; }
.barra-svg { fill: var(--acento); }
.eje-svg { fill: var(--texto-3); font-size: 11px; font-family: var(--fuente); font-variant-numeric: tabular-nums; }
.rejilla-svg { stroke: var(--separador); stroke-width: 1; stroke-dasharray: 2 4; }
.base-svg { stroke: var(--separador); stroke-width: 1; }
[data-detalle]:hover { fill: rgb(127 127 127 / .08); }
.globo {
  position: absolute; z-index: 30; pointer-events: none; background: rgb(29 29 31 / .94); color: #fff; font-size: var(--t-s);
  font-weight: 550; padding: 6px 10px; border-radius: 10px; box-shadow: 0 8px 24px rgb(0 0 0 / .22); white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.lista-barras { display: grid; gap: var(--e-4); }
.barra-h .medidor { margin-top: 6px; }
.codigo-vinculo { font: 700 2rem/1 var(--placa); font-feature-settings: var(--rasgos-placa); letter-spacing: .12em; text-align: center; padding: var(--e-4); background: var(--superficie-2); border-radius: 14px; }

/* ---------- ticket impreso (impresión térmica: no rediseñar) ---------- */
.ticket { color: #000; background: #fff; font: 12px/1.3 "Courier New", Courier, monospace; letter-spacing: 0; }
.ticket .t-titulo { text-align: center; font-weight: 800; font-size: 18px; margin-bottom: 2px; font-family: Arial, sans-serif; }
.ticket .t-centro, .ticket .t-pie { text-align: center; }
.ticket .t-pie { font-size: 11px; margin-top: 3px; }
.ticket .t-grande { text-align: center; font-weight: 800; font-size: 26px; letter-spacing: 2px; margin: 6px 0 2px; font-family: Arial, sans-serif; }
.ticket .t-par { display: flex; justify-content: space-between; gap: 8px; }
.ticket .t-par span:last-child { text-align: right; white-space: nowrap; flex: none; }
/* El concepto largo («Dentro del tiempo de gracia (10 min)») baja de renglón en vez de montarse sobre el monto. */
.ticket .t-par span:first-child { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.ticket .t-total { display: flex; justify-content: space-between; font-weight: 800; font-size: 17px; margin: 2px 0; }
.ticket .t-sep { border-top: 1px dashed #000; margin: 6px 0; }
.ticket .t-qr { display: flex; justify-content: center; margin: 8px 0 2px; }
.ticket .t-qr img { width: 62%; image-rendering: pixelated; }

#zona-impresion { display: none; }
@media print {
  body.imprimiendo > *:not(#zona-impresion) { display: none !important; }
  body.imprimiendo { background: #fff; }
  body.imprimiendo #zona-impresion { display: block; }
  #zona-impresion .ticket { padding: 0 2mm; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ---------- utilidades ---------- */
[hidden] { display: none !important; }
.oculto-movil { display: none; }
@media (min-width: 640px) { .oculto-movil { display: inline; } }
.num, .tabular { font-variant-numeric: tabular-nums; }

/* barra superior en pantallas angostas: nada se parte ni desborda */
@media (max-width: 640px) {
  :root { --t-titulo: 1.75rem; --radio: 20px; }
  .barra { gap: var(--e-2); padding-left: var(--e-4); padding-right: var(--e-3); }
  .barra .sello { display: none; }
  .barra-parqueo > .ico { display: none; }
  .barra-parqueo select { max-width: 40vw; }
  .btn-barra { padding: 0; width: 40px; }
  .contenido { padding-top: var(--e-5); }
  .encabezado { margin-bottom: var(--e-5); }
  .tarjeta { padding: var(--e-4); }
  .tabla-envoltura { margin: 0 calc(-1 * var(--e-4)); padding: 0 var(--e-4); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
