/* ============================================================
   GRANDI · ADMINISTRACIÓN
   Dirección estética: "LÁMINA 02-09 · REGISTRO DE OFICINA"
   ------------------------------------------------------------
   No es una dirección nueva. Es la MISMA de grandipizzeria.com.ar
   —la carta impresa de dos láminas A3— corrida a un registro de
   oficina, porque una pantalla con 40 facturas y una conciliación
   bancaria no puede tener el aire de una carta de pizzería.

   Lo que se mantiene intacto de la carta:
     · el papel crema #FBF7F3, medido del PDF
     · TODO el texto en verde oliva, nunca en negro
     · el rojo #B51826 solo en título, alerta y filete
     · el filete rojo bajo cada título de sección
     · el isologo arqueado (re-teñido de #000 a oliva: la carta
       está impresa en oliva, y el negro puro está prohibido)
     · Bevan en los rubros, Archivo en el trabajo pesado

   Lo que cambia al pasar a oficina:
     · Yellowtail se retira a UN solo lugar (el nombre de la app).
       Una cursiva inglesa en una tabla de importes es ilegible.
     · el papel se oscurece un paso como fondo de página, para que
       las fichas de papel claro se levanten SIN sombras
     · ritmo denso: la regla de 8rem de padding de sección es para
       una página de venta; acá el aire va afuera y los datos van
       apretados y alineados
     · todos los números en versalitas tabulares, para que las
       columnas de plata se lean de arriba abajo

   SIGNATURE MOVE (del catálogo `componentes/`, re-teñido)
     `14-texto-number-ticker` → .num, aplicado al TOTAL AUTORIZADO
     de la Orden de Pago. La especificación pide que al
     deseleccionar un proveedor "el total autorizado debe
     recalcularse automáticamente"; el ticker hace que ese
     recálculo se VEA pasar en vez de aparecer de golpe. Se copió
     la mecánica (rAF + easeOutCubic) y se le cambió el punto de
     partida: no cuenta desde cero, interpola del valor anterior al
     nuevo, que es lo que corresponde a un total que se corrige.
   ============================================================ */

/* ── Tokens ─────────────────────────────────────────────────── */
:root {
  color-scheme: light;

  /* Papel: los tres cremas de la lámina + uno más oscuro para el
     fondo de página, que en la carta no existe porque la carta ES
     la hoja. Acá necesito dos planos. */
  --papel:      #FBF7F3;   /* fichas, tarjetas, filas             */
  --papel-2:    #F2EDE6;   /* fondo de página                     */
  --papel-3:    #E4DCD1;   /* hairlines                           */
  --papel-4:    #D6CCBE;   /* hairline fuerte, bordes de input    */

  /* Tinta: el verde oliva con el que está impresa la carta */
  --tinta:       #253920;  /* títulos          · 11.7:1 sobre papel */
  --tinta-2:     #314B2C;  /* cuerpo           ·  9.1:1             */
  --tinta-suave: #4A6145;  /* rótulos, meta    ·  6.4:1             */
  --tinta-tenue: #6E8168;  /* deshabilitado    ·  4.6:1  (solo >16px) */

  /* Rojo de la lámina: título, filete, alerta */
  --rojo:       #B51826;   /* 6.3:1 sobre papel */
  --rojo-hondo: #8E1220;   /* hover             */
  --rojo-piel:  #F7E4E3;   /* fondo de alerta   */

  /* Verde "ya salió" — el único verde que no es tinta.
     Medido con canvas 1×1, no estimado: 5.38:1 sobre el papel y
     4.83:1 sobre su propio fondo claro (la pastilla "Pagada"), que
     es el par exigente. El #2F7A3E de la primera pasada daba 4.45
     ahí y no llegaba a AA. */
  --verde:      #2C7439;
  --verde-piel: #E3EFE1;

  /* Ámbar: "pendiente". No está en la carta, pero un circuito de
     pagos necesita un tercer estado y el hue va teñido al oliva. */
  --ambar:      #8A5A0B;   /* 5.6:1 */
  --ambar-piel: #F6EBD6;

  --script:  "Yellowtail", "Brush Script MT", cursive;
  --display: "Bevan", Rockwell, "Times New Roman", serif;
  --sans:    "Archivo", ui-sans-serif, system-ui, -apple-system, sans-serif;

  --suave: cubic-bezier(.16, 1, .3, 1);
  --radio: 2px;         /* la lámina no tiene radio en las listas */
  --radio-caja: 10px;   /* sí en los recuadros macizos de imprenta */

  --barra: 3.75rem;     /* alto del encabezado fijo */
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--papel-2);
  color: var(--tinta-2);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Grano: la carta es una pieza impresa, no una pantalla. Va sobre
   todo el documento, sin capturar el puntero. */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: .035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23g)'/%3E%3C/svg%3E");
}

/* Números: TODA la plata en tabulares. Sin esto una columna de
   importes no se puede leer de arriba abajo. */
.num, .monto, td.n, th.n, input[type="number"], .tabular {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}


/* ── Tipografía ─────────────────────────────────────────────── */
h1, h2, h3, h4 {
  margin: 0;
  color: var(--tinta);
  font-weight: 400;
  letter-spacing: -.015em;   /* tracking negativo en display */
}
h1 { font-family: var(--display); font-size: 1.5rem; line-height: 1.15; }
h2 { font-family: var(--display); font-size: 1.125rem; line-height: 1.2; }
h3 { font-family: var(--sans); font-size: 1rem; font-weight: 700; letter-spacing: -.01em; }

p { margin: 0 0 .75rem; max-width: 62ch; }   /* párrafos a 62ch */

/* Rótulo chico: tracking POSITIVO, como pide la guía */
.rotulo {
  font-family: var(--display);
  font-size: .625rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--tinta-suave);
  line-height: 1.4;
}
.meta { font-size: .8125rem; color: var(--tinta-suave); }
.tenue { color: var(--tinta-tenue); }

/* Filete: la línea roja que la carta pone bajo cada título.
   Es el elemento que más ata esta app a la pieza impresa. */
.filete { position: relative; padding-bottom: .5rem; }
.filete::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 2.25rem; height: 2px;
  background: var(--rojo);
}
.filete--largo::after { width: 100%; height: 1px; }

/* Puntillo: el separador de la carta */
.puntillo {
  height: 1px;
  border: 0;
  margin: 1.25rem 0;
  background-image: radial-gradient(circle, var(--rojo) 1px, transparent 1px);
  background-size: 7px 1px;
  background-repeat: repeat-x;
  opacity: .5;
}


/* ── Estructura ─────────────────────────────────────────────── */
.barra {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--barra);
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0 1.25rem;
  background: var(--tinta);
  color: var(--papel);
  border-bottom: 2px solid var(--rojo);
}
.barra__marca { display: flex; align-items: baseline; gap: .625rem; min-width: 0; }
.barra__iso { height: 1.75rem; width: auto; flex: none; }
/* El único Yellowtail de toda la app */
.barra__nombre {
  font-family: var(--script);
  font-size: 1.375rem;
  line-height: 1;
  color: var(--papel);
  white-space: nowrap;
}
.barra__sep { flex: 1 1 auto; min-width: 0; }   /* min-width:0 o el botón se va de pantalla */
.barra__usuario { font-size: .8125rem; color: #C9D6C3; white-space: nowrap; }
.barra__usuario b { color: var(--papel); font-weight: 600; }
/* En un celular el rol es ruido: el cajero ya sabe quién es. Se
   esconde para que el nombre y el botón de salir respiren. */
@media (max-width: 30rem) {
  .barra__rol { display: none; }
  .barra__nombre { font-size: 1.125rem; }
}

.hoja { max-width: 1360px; margin: 0 auto; padding: 1.75rem 1.25rem 5rem; }
.hoja--angosta { max-width: 620px; }

/* Navegación por pestañas: rubros en Bevan, como los de la carta */
.nav {
  display: flex;
  gap: .125rem;
  overflow-x: auto;
  scrollbar-width: none;
  border-bottom: 1px solid var(--papel-4);
  background: var(--papel-2);
  position: sticky;
  top: var(--barra);
  z-index: 30;
  padding: 0 1.25rem;
}
.nav::-webkit-scrollbar { display: none; }
.nav__t {
  flex: none;
  appearance: none;
  border: 0;
  background: none;
  cursor: pointer;
  font-family: var(--display);
  font-size: .6875rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--tinta-suave);
  padding: .875rem .875rem .75rem;
  border-bottom: 2px solid transparent;
  transition: color .3s var(--suave), border-color .3s var(--suave);
  white-space: nowrap;
}
.nav__t:hover { color: var(--tinta); }
.nav__t[aria-selected="true"] { color: var(--rojo); border-bottom-color: var(--rojo); }
.nav__t .badge { margin-left: .375rem; }


/* ── Ficha (la unidad de superficie) ────────────────────────── */
/* Hairlines en vez de sombras, como pide la guía. La ficha se
   levanta porque es más CLARA que el fondo, no porque flote. */
.ficha {
  background: var(--papel);
  border: 1px solid var(--papel-3);
  border-radius: var(--radio-caja);
  padding: 1.125rem 1.25rem;
}
.ficha--plana { border-radius: var(--radio); }
.ficha__cab {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.grilla { display: grid; gap: 1rem; }
.grilla--2 { grid-template-columns: 1fr; }
.grilla--3 { grid-template-columns: 1fr; }
.grilla--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 720px) {
  .grilla--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grilla--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grilla--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}


/* ── Cifra: el bloque de un número grande ───────────────────── */
.cifra { display: flex; flex-direction: column; gap: .25rem; }
.cifra__valor {
  font-family: var(--sans);
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 700;
  letter-spacing: -.03em;
  line-height: 1;
  color: var(--tinta);
  font-variant-numeric: tabular-nums;
}
.cifra__valor--rojo  { color: var(--rojo); }
.cifra__valor--verde { color: var(--verde); }
.cifra__valor--ambar { color: var(--ambar); }
.cifra__pie { font-size: .75rem; color: var(--tinta-suave); }

/* El total de la OP: la cifra protagonista, con el ticker.
   Asimetría + superposición de la página: el número se sale un
   poco del recuadro y monta sobre el filete de arriba. */
.total-op {
  position: relative;
  background: var(--tinta);
  color: var(--papel);
  border-radius: var(--radio-caja);
  padding: 1.5rem 1.5rem 1.25rem;
  overflow: hidden;
}
.total-op::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--rojo);
}
.total-op .rotulo { color: #A8BCA2; }
.total-op__valor {
  font-family: var(--sans);
  font-weight: 800;
  font-size: clamp(2rem, 7vw, 3.25rem);
  letter-spacing: -.045em;
  line-height: .95;
  color: var(--papel);
  font-variant-numeric: tabular-nums;
  display: block;
  margin: .25rem 0 0 -.06em;   /* la asimetría: sangra a la izquierda */
}
.total-op__delta { font-size: .8125rem; color: #C9D6C3; margin-top: .5rem; }
.total-op__delta b { color: #F0C9AE; font-weight: 600; }


/* ── Pastilla / chip (la cápsula verde de las medidas) ──────── */
.pastilla {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .1875rem .5rem;
  border-radius: 999px;
  font-size: .6875rem;
  font-weight: 600;
  letter-spacing: .02em;
  white-space: nowrap;
  border: 1px solid transparent;
}
.pastilla--tinta  { background: var(--tinta); color: var(--papel); }
.pastilla--linea  { background: none; border-color: var(--papel-4); color: var(--tinta-suave); }
.pastilla--verde  { background: var(--verde-piel); color: var(--verde); border-color: #C3DDC0; }
.pastilla--ambar  { background: var(--ambar-piel); color: var(--ambar); border-color: #E4D0A8; }
.pastilla--rojo   { background: var(--rojo-piel);  color: var(--rojo-hondo); border-color: #E6BFBF; }

.badge {
  display: inline-block;
  min-width: 1.125rem;
  padding: 0 .3rem;
  border-radius: 999px;
  background: var(--rojo);
  color: var(--papel);
  font-size: .625rem;
  font-weight: 700;
  line-height: 1.125rem;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.badge--tenue { background: var(--papel-4); color: var(--tinta-suave); }


/* ── Botones ────────────────────────────────────────────────── */
.btn {
  appearance: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  font-family: var(--sans);
  font-size: .875rem;
  font-weight: 600;
  letter-spacing: -.005em;
  padding: .5625rem .9375rem;
  border-radius: var(--radio-caja);
  border: 1px solid var(--papel-4);
  background: var(--papel);
  color: var(--tinta);
  transition: background .3s var(--suave), border-color .3s var(--suave), color .3s var(--suave);
  text-decoration: none;
  line-height: 1.2;
}
.btn:hover { border-color: var(--tinta-suave); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn--rojo { background: var(--rojo); border-color: var(--rojo); color: var(--papel); }
.btn--rojo:hover { background: var(--rojo-hondo); border-color: var(--rojo-hondo); }
.btn--tinta { background: var(--tinta); border-color: var(--tinta); color: var(--papel); }
.btn--tinta:hover { background: var(--tinta-2); border-color: var(--tinta-2); }
.btn--verde { background: var(--verde); border-color: var(--verde); color: var(--papel); }
.btn--fantasma { background: none; border-color: transparent; color: var(--tinta-suave); }
.btn--fantasma:hover { background: var(--papel-2); color: var(--tinta); }
.btn--bloque { width: 100%; }
.btn--grande { font-size: 1rem; padding: .875rem 1.25rem; }
.btn--chico { font-size: .75rem; padding: .3125rem .5625rem; border-radius: var(--radio); }

.botones { display: flex; flex-wrap: wrap; gap: .5rem; }


/* ── Formularios ────────────────────────────────────────────── */
.campo { display: flex; flex-direction: column; gap: .3125rem; min-width: 0; }
.campo > label { font-family: var(--display); font-size: .625rem; letter-spacing: .12em; text-transform: uppercase; color: var(--tinta-suave); }
.campo > label .req { color: var(--rojo); }

input[type="text"], input[type="number"], input[type="date"],
input[type="password"], input[type="email"], input[type="search"],
select, textarea {
  font-family: var(--sans);
  font-size: .9375rem;
  color: var(--tinta);
  background: var(--papel);
  border: 1px solid var(--papel-4);
  border-radius: var(--radio);
  padding: .5rem .625rem;
  width: 100%;
  min-width: 0;
  transition: border-color .3s var(--suave);
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--tinta-2);
  box-shadow: inset 0 -2px 0 var(--rojo);   /* filete rojo bajo el campo activo */
}
input::placeholder, textarea::placeholder { color: var(--tinta-tenue); }
textarea { resize: vertical; min-height: 4.5rem; line-height: 1.5; }
select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' fill='none' stroke='%234A6145' stroke-width='1.5'%3E%3Cpath d='M1 1l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right .625rem center;
  padding-right: 1.75rem;
}
input[type="date"] { min-height: 2.375rem; }

/* Segmentado: los "botones obligatorios" de la especificación.
   No es un select: el documento pide botones, y en un celular con
   una mano un botón grande se acierta y un desplegable no. */
.seg { display: flex; gap: .375rem; flex-wrap: wrap; }
.seg__b {
  appearance: none;
  cursor: pointer;
  flex: 1 1 auto;
  min-width: 6.5rem;
  font-family: var(--sans);
  font-size: .875rem;
  font-weight: 600;
  padding: .625rem .75rem;
  border-radius: var(--radio-caja);
  border: 1px solid var(--papel-4);
  background: var(--papel);
  color: var(--tinta-suave);
  transition: all .3s var(--suave);
  text-align: center;
}
.seg__b:hover { border-color: var(--tinta-suave); color: var(--tinta); }
.seg__b[aria-pressed="true"] {
  background: var(--tinta);
  border-color: var(--tinta);
  color: var(--papel);
}
.seg--rojo .seg__b[aria-pressed="true"] { background: var(--rojo); border-color: var(--rojo); }
.seg__b.falta { border-color: var(--rojo); border-style: dashed; }


/* ── Tablas ─────────────────────────────────────────────────── */
/* Toda tabla ancha va dentro de .scrollx: el documento nunca
   scrollea en horizontal, la tabla sí. */
.scrollx { overflow-x: auto; -webkit-overflow-scrolling: touch; }

table.t { width: 100%; border-collapse: collapse; font-size: .875rem; }
table.t th {
  text-align: left;
  font-family: var(--display);
  font-size: .5625rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--tinta-suave);
  font-weight: 400;
  padding: .5rem .625rem;
  border-bottom: 1px solid var(--papel-4);
  white-space: nowrap;
  background: var(--papel);
  position: sticky;
  top: 0;
  z-index: 1;
}
table.t td {
  padding: .5625rem .625rem;
  border-bottom: 1px solid var(--papel-3);
  vertical-align: top;
}
table.t tbody tr:hover td { background: var(--papel-2); }
table.t th.n, table.t td.n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.t td.acciones { text-align: right; white-space: nowrap; }
table.t tr.excluida td { opacity: .5; }
table.t tr.excluida td.acciones, table.t tr.excluida td.motivo { opacity: 1; }
table.t tfoot td {
  padding: .75rem .625rem;
  border-top: 2px solid var(--tinta);
  border-bottom: 0;
  font-weight: 700;
  color: var(--tinta);
}

/* Subtotal por proveedor dentro de la OP */
tr.grupo td {
  background: var(--papel-2);
  border-bottom: 1px solid var(--papel-4);
  font-family: var(--display);
  font-size: .625rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--tinta);
  padding: .5rem .625rem;
}

/* Guía punteada: el recurso de la carta que une el plato con el
   precio. Acá une el concepto con el importe. */
.guia { display: flex; align-items: baseline; gap: .5rem; }
.guia__t { flex: 0 1 auto; min-width: 0; }
.guia__p {
  flex: 1 1 auto;
  border-bottom: 1px dotted var(--papel-4);
  transform: translateY(-.2em);
  min-width: 1rem;
}
.guia__v { flex: none; font-variant-numeric: tabular-nums; font-weight: 600; color: var(--tinta); }


/* ── Lista de renglones (móvil: la tabla se vuelve fichas) ──── */
.reng {
  display: grid;
  gap: .125rem .75rem;
  grid-template-columns: 1fr auto;
  padding: .8125rem 0;
  border-bottom: 1px solid var(--papel-3);
}
.reng:last-child { border-bottom: 0; }
.reng__t { color: var(--tinta); font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.reng__v { text-align: right; font-weight: 700; color: var(--tinta); font-variant-numeric: tabular-nums; white-space: nowrap; }
.reng__m { grid-column: 1 / -1; font-size: .75rem; color: var(--tinta-suave); display: flex; flex-wrap: wrap; gap: .375rem .625rem; align-items: center; }
.reng__neg .reng__v { color: var(--rojo); }


/* ── Avisos ─────────────────────────────────────────────────── */
.aviso {
  border-radius: var(--radio-caja);
  padding: .8125rem 1rem;
  font-size: .875rem;
  border: 1px solid;
  display: flex;
  gap: .625rem;
  align-items: flex-start;
}
.aviso b { font-weight: 700; }
.aviso--rojo  { background: var(--rojo-piel);  border-color: #E6BFBF; color: var(--rojo-hondo); }
.aviso--ambar { background: var(--ambar-piel); border-color: #E4D0A8; color: var(--ambar); }
.aviso--verde { background: var(--verde-piel); border-color: #C3DDC0; color: var(--verde); }
.aviso--tinta { background: var(--papel);      border-color: var(--papel-4); color: var(--tinta-2); }
.aviso--pulso { animation: pulso 2.4s var(--suave) infinite; }
@keyframes pulso {
  0%, 100% { border-color: #E6BFBF; }
  50%      { border-color: var(--rojo); }
}

/* Recuadro rojo macizo: el de los destacados de la carta */
.recuadro-rojo {
  background: var(--rojo);
  color: var(--papel);
  border-radius: var(--radio-caja);
  padding: 1rem 1.125rem;
}
.recuadro-rojo .rotulo { color: #F3CFCF; }
.recuadro-rojo b { color: var(--papel); }

.vacio {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--tinta-suave);
}
.vacio__ico { font-size: 1.75rem; display: block; margin-bottom: .5rem; opacity: .6; }


/* ── Modal ──────────────────────────────────────────────────── */
.velo {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(37, 57, 32, .55);
  display: grid;
  place-items: center;
  padding: 1rem;
  overflow-y: auto;
}
.modal {
  background: var(--papel);
  border-radius: var(--radio-caja);
  border: 1px solid var(--papel-4);
  width: 100%;
  max-width: 34rem;
  max-height: calc(100vh - 2rem);
  overflow-y: auto;
}
.modal--ancho { max-width: 56rem; }
.modal__cab {
  position: sticky;
  top: 0;
  background: var(--tinta);
  color: var(--papel);
  padding: .875rem 1.125rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 2px solid var(--rojo);
}
.modal__cab h2, .modal__cab h3 { color: var(--papel); }
.modal__x {
  appearance: none; border: 0; background: none; cursor: pointer;
  color: #C9D6C3; font-size: 1.375rem; line-height: 1; padding: 0 .25rem;
}
.modal__x:hover { color: var(--papel); }
.modal__cuerpo { padding: 1.125rem; display: grid; gap: 1rem; }
.modal__pie {
  position: sticky; bottom: 0;
  background: var(--papel);
  border-top: 1px solid var(--papel-3);
  padding: .875rem 1.125rem;
  display: flex; gap: .5rem; justify-content: flex-end; flex-wrap: wrap;
}

/* Visor de la foto del comprobante */
.visor { position: fixed; inset: 0; z-index: 70; background: rgba(37,57,32,.9); display: grid; place-items: center; padding: 1rem; }
.visor img { max-width: 100%; max-height: 88vh; border-radius: var(--radio); background: var(--papel); }


/* ── Aviso flotante ─────────────────────────────────────────── */
.toast {
  position: fixed;
  left: 50%;
  bottom: 1.25rem;
  transform: translate(-50%, 1rem);
  z-index: 90;
  background: var(--tinta);
  color: var(--papel);
  padding: .75rem 1.125rem;
  border-radius: var(--radio-caja);
  font-size: .875rem;
  font-weight: 600;
  max-width: min(92vw, 32rem);
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s var(--suave), transform .3s var(--suave);
  border-left: 3px solid var(--rojo);
}
.toast.ver { opacity: 1; transform: translate(-50%, 0); }
.toast.ok { border-left-color: var(--verde); }


/* ── Login ──────────────────────────────────────────────────── */
.login {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  background: var(--tinta);
}
.login__ficha {
  background: var(--papel);
  border-radius: var(--radio-caja);
  width: 100%;
  max-width: 24rem;
  padding: 2rem 1.75rem 1.75rem;
  border-top: 3px solid var(--rojo);
}
.login__iso { height: 3.25rem; width: auto; display: block; margin: 0 auto 1rem; }
.login__nombre {
  font-family: var(--script);
  font-size: 1.75rem;
  color: var(--tinta);
  text-align: center;
  line-height: 1;
  margin-bottom: .25rem;
}
.login__sub { text-align: center; margin-bottom: 1.5rem; }
.login__pin { letter-spacing: .5em; text-align: center; font-size: 1.25rem; font-variant-numeric: tabular-nums; }

/* [hidden] tiene que ganarle a cualquier display de clase, o la
   pantalla vieja se queda encima. */
[hidden] { display: none !important; }


/* ── Cargador de comprobantes (pantalla del cajero) ─────────── */
.dropzona {
  border: 2px dashed var(--papel-4);
  border-radius: var(--radio-caja);
  background: var(--papel);
  padding: 2rem 1.25rem;
  text-align: center;
  cursor: pointer;
  transition: border-color .3s var(--suave), background .3s var(--suave);
}
.dropzona:hover, .dropzona.activa { border-color: var(--rojo); background: var(--papel); }
.dropzona__ico { font-size: 2.25rem; display: block; margin-bottom: .5rem; }
.dropzona__t { font-family: var(--display); font-size: 1rem; color: var(--tinta); letter-spacing: -.01em; }

.previo {
  display: flex;
  gap: .875rem;
  align-items: flex-start;
  padding: .875rem;
  background: var(--papel-2);
  border-radius: var(--radio-caja);
  border: 1px solid var(--papel-3);
}
.previo img {
  width: 5rem; height: 6.25rem;
  object-fit: cover;
  border-radius: var(--radio);
  border: 1px solid var(--papel-4);
  cursor: zoom-in;
  flex: none;
  background: var(--papel);
}

/* Barra de progreso de la lectura */
.leyendo { display: flex; align-items: center; gap: .625rem; font-size: .875rem; color: var(--tinta-suave); }
.leyendo__aro {
  width: 1rem; height: 1rem; flex: none;
  border: 2px solid var(--papel-4);
  border-top-color: var(--rojo);
  border-radius: 50%;
  animation: giro .7s linear infinite;
}
@keyframes giro { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .leyendo__aro { animation-duration: 2s; }
  .aviso--pulso { animation: none; }
  * { transition-duration: .01ms !important; }
}


/* ── Impresión de la Orden de Pago ──────────────────────────── */
@media print {
  body { background: #fff; font-size: 11pt; }
  body::after { display: none; }              /* el grano arruina el láser */
  .barra, .nav, .no-imprimir, .toast { display: none !important; }
  .hoja { padding: 0; max-width: none; }
  .ficha { border: 0; padding: 0; }
  .total-op { background: none; color: var(--tinta); border: 2px solid var(--tinta); }
  .total-op__valor, .total-op .rotulo, .total-op__delta { color: var(--tinta); }
  table.t th { background: none; position: static; }
  tr, .reng { break-inside: avoid; }
}
