/* Diamantes — sistema visual "oscuro gamer" compartido por las 3 apps */
:root {
  --fondo: #070F14;
  --sup: #0E1A21;
  --sup2: #14242D;
  --linea: #213844;
  --borde-input: #2E5260;
  --nav: #0B161C;
  --nav-borde: #1A2D36;
  --texto: #ECF6F4;
  --tenue: #9DB4B9;
  --suave: #C9DADD;
  --placeholder: #7F9AA0;
  --verde: #2BE5A0;
  --verde-claro: #8DF7CF;
  --sobre-verde: #062016;
  --naranja: #FF9F43;
  --sobre-naranja: #1F1206;
  --naranja-texto: #FFB86B;
  --hl: #10282B;
  --hl-borde: #1F5A4B;
  --pendiente: #3A5561;
  --amarillo: #FFE27A;
  --display: 'Chakra Petch', 'Barlow', system-ui, sans-serif;
  --cuerpo: 'Barlow', 'Segoe UI', system-ui, sans-serif;
  --chaflan: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
  --chaflan-chico: polygon(5px 0, 100% 0, calc(100% - 5px) 100%, 0 100%);
  --ancho: 520px;
  --seguro-abajo: env(safe-area-inset-bottom, 0px);
  --seguro-arriba: env(safe-area-inset-top, 0px);
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
/* Sin zoom en ninguna app: ni con dos dedos ni con doble toque (el iPhone usa "manipulation"; Chrome, "pan-x pan-y"). */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; touch-action: manipulation; touch-action: pan-x pan-y; }
body {
  margin: 0;
  background: var(--fondo);
  color: var(--texto);
  font-family: var(--cuerpo);
  font-size: 16px;
  line-height: 1.4;
  -webkit-tap-highlight-color: transparent;
}
a { color: var(--verde); text-decoration: none; }
a:hover { color: var(--verde-claro); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: 0.5; }
input::placeholder, textarea::placeholder { color: var(--placeholder); }
img { max-width: 100%; display: block; }
:focus-visible { outline: 2px solid var(--verde); outline-offset: 2px; }
h1, h2, h3 { font-family: var(--display); margin: 0; line-height: 1.15; }
h1 { font-size: 20px; font-weight: 700; }
h2 { font-size: 18px; font-weight: 700; }
h3 { font-size: 16px; font-weight: 700; }
p { margin: 0; }
.oculto-lector { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.app { max-width: var(--ancho); margin: 0 auto; min-height: 100vh; min-height: 100dvh; position: relative; }
.pantalla { display: flex; flex-direction: column; gap: 16px; padding: 16px; }
.pantalla.con-nav { padding-bottom: calc(100px + var(--seguro-abajo)); }
.pantalla.con-accion { padding-bottom: calc(110px + var(--seguro-abajo)); }
.pila { display: flex; flex-direction: column; gap: 12px; }
.pila-8 { display: flex; flex-direction: column; gap: 8px; }
.pila-4 { display: flex; flex-direction: column; gap: 4px; }
.fila-flex { display: flex; align-items: center; gap: 12px; }
.entre { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.rejilla-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.rejilla-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.crece { flex: 1; min-width: 0; }
.centro { text-align: center; }

/* Encabezados */
.barra {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 8px;
  min-height: calc(64px + var(--seguro-arriba)); padding: var(--seguro-arriba) 12px 0 4px;
  background: var(--fondo); border-bottom: 1px solid var(--nav-borde);
}
.barra.sin-atras { padding-left: 16px; }
.barra .titulos { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.barra .titulos h1 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.marca { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; }
.marca .nombre { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--display); font-size: 19px; font-weight: 700; letter-spacing: 2px; }
.etiqueta-admin {
  display: inline-flex; align-items: center; height: 22px; padding: 0 8px;
  background: var(--naranja); color: var(--sobre-naranja); font-size: 11px; font-weight: 800; letter-spacing: 1px;
  clip-path: var(--chaflan-chico);
}

/* Textos */
.tenue { color: var(--tenue); }
.suave { color: var(--suave); }
.chico { font-size: 13px; }
.mini { font-size: 12px; }
.fuerte { font-weight: 700; }
.display { font-family: var(--display); font-weight: 700; }
.verde { color: var(--verde); }
.naranja { color: var(--naranja-texto); }
.monto-xl { font-family: var(--display); font-weight: 700; font-size: 40px; line-height: 1; color: var(--verde); }
.monto-l { font-family: var(--display); font-weight: 700; font-size: 24px; line-height: 1.1; }
.folio-xl { font-family: var(--display); font-weight: 700; font-size: 34px; letter-spacing: 4px; }
.ayuda { font-size: 13px; line-height: 1.45; color: var(--tenue); }
.error-texto { font-size: 13px; color: var(--naranja-texto); }

/* Tarjetas */
.tarjeta { display: flex; flex-direction: column; gap: 12px; padding: 14px; border-radius: 16px; background: var(--sup); border: 1px solid var(--linea); }
.tarjeta.destacada { background: var(--hl); border-color: var(--hl-borde); }
.tarjeta.alerta { border-color: var(--naranja); }
.tarjeta.punteada { background: var(--sup2); border: 1px dashed var(--borde-input); }
.tarjeta-enlace { color: var(--texto); }
.tarjeta-enlace:hover { color: var(--texto); border-color: var(--borde-input); }

/* Botones */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 0 20px; border: 0;
  background: var(--verde); color: var(--sobre-verde); font-weight: 700; font-size: 16px;
  clip-path: var(--chaflan); text-align: center;
}
.btn:hover { color: var(--sobre-verde); filter: brightness(1.06); }
.btn.mediano { min-height: 48px; font-size: 15px; }
.btn.ancho { width: 100%; }
.btn.naranja { background: var(--naranja); color: var(--sobre-naranja); }
.btn-sec {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 16px; border-radius: 12px;
  border: 1px solid var(--borde-input); background: transparent; color: var(--texto); font-weight: 700; font-size: 15px;
}
.btn-sec:hover { color: var(--texto); border-color: var(--suave); }
.btn-sec.ancho { width: 100%; }
.btn-texto { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 8px; border: 0; background: transparent; font-weight: 700; font-size: 15px; color: var(--verde); }
.btn-texto.naranja { color: var(--naranja-texto); }
.btn-icono {
  flex: none; position: relative; width: 44px; height: 44px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 12px; border: 0; background: transparent; color: var(--texto);
}
.btn-icono.redondo { border-radius: 999px; border: 1px solid var(--linea); background: var(--sup); }
.punto { position: absolute; top: 9px; right: 10px; width: 9px; height: 9px; border-radius: 50%; background: var(--naranja); border: 2px solid var(--sup); }
.contador {
  position: absolute; top: -6px; right: -11px; min-width: 18px; height: 18px; padding: 0 5px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 999px; border: 2px solid var(--nav); background: var(--naranja); color: var(--sobre-naranja);
  font-size: 11px; font-weight: 800; line-height: 1;
}
.btn .giro, .btn-sec .giro { width: 18px; height: 18px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: giro 0.8s linear infinite; }
@keyframes giro { to { transform: rotate(360deg); } }

/* Chips */
.chip { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 12px; border-radius: 999px; font-size: 13px; font-weight: 700; white-space: nowrap; }
.chip.chico { height: 22px; padding: 0 8px; font-size: 11px; }
.chip-ok { background: var(--verde); color: var(--sobre-verde); }
.chip-pend { background: var(--naranja); color: var(--sobre-naranja); }
.chip-neutro { background: var(--sup2); border: 1px solid var(--borde-input); color: var(--suave); }
.chip-aviso { border: 1px solid var(--naranja); color: var(--naranja-texto); }
.chip-marca { background: var(--sup2); border: 1px solid var(--hl-borde); color: var(--verde); }
.filtros { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.filtros::-webkit-scrollbar { display: none; }
.filtro { flex: none; height: 44px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--borde-input); background: transparent; color: var(--suave); font-weight: 600; font-size: 14px; }
.filtro[aria-pressed="true"] { border-color: var(--verde); background: var(--hl); color: var(--verde); font-weight: 700; }

/* Formularios */
.campo { display: flex; flex-direction: column; gap: 8px; }
.campo > label, .etiqueta { font-size: 14px; font-weight: 600; }
.input, .select, .area {
  width: 100%; min-height: 48px; padding: 0 14px; border-radius: 12px;
  border: 1px solid var(--borde-input); background: var(--sup2); color: var(--texto); font-size: 16px; outline: none;
}
.area { min-height: 120px; padding: 12px 14px; resize: vertical; line-height: 1.45; }
.input:focus, .select:focus, .area:focus { border-color: var(--verde); }
.input.grande { font-family: var(--display); font-size: 20px; letter-spacing: 1px; }
.input-con-boton { display: flex; gap: 10px; }
/* Atajo para buscar (Panel del admin): se ve como un campo y lleva a la pantalla de búsqueda. */
.buscador { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--borde-input); background: var(--sup2); color: var(--placeholder); font-size: 16px; }
.buscador:hover { color: var(--suave); border-color: var(--suave); }
.input-con-boton .input { flex: 1; min-width: 0; }
.casilla { display: flex; align-items: flex-start; gap: 12px; font-size: 14px; line-height: 1.45; color: var(--suave); }
.casilla input { flex: none; width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--verde); }

/* Control segmentado */
.seg { display: grid; grid-template-columns: repeat(var(--n, 2), minmax(0, 1fr)); gap: 4px; padding: 4px; border-radius: 14px; background: var(--sup); border: 1px solid var(--linea); }
.seg button { min-height: 44px; border: 0; border-radius: 10px; background: transparent; color: var(--suave); font-weight: 700; font-size: 15px; }
.seg button[aria-pressed="true"] { background: var(--verde); color: var(--sobre-verde); }

/* Interruptor */
.switch { flex: none; position: relative; width: 52px; height: 44px; padding: 0; border: 0; background: transparent; }
.switch::before { content: ''; position: absolute; left: 0; top: 8px; width: 52px; height: 28px; border-radius: 999px; background: var(--borde-input); transition: background 0.15s; }
.switch::after { content: ''; position: absolute; top: 11px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,0.4); transition: left 0.15s; }
.switch[aria-checked="true"]::before { background: var(--verde); }
.switch[aria-checked="true"]::after { left: 27px; }

/* Listas */
.lista { display: flex; flex-direction: column; border-radius: 16px; background: var(--sup); border: 1px solid var(--linea); overflow: hidden; }
.fila { display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 9px 14px; border-bottom: 1px solid var(--nav-borde); color: var(--texto); background: transparent; border-left: 0; border-right: 0; border-top: 0; text-align: left; width: 100%; }
.fila:last-child { border-bottom: 0; }
a.fila:hover, button.fila:hover { color: var(--texto); background: rgba(255,255,255,0.02); }
.fila .textos { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.fila .textos .t1 { font-weight: 700; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fila .textos .t2 { font-size: 13px; color: var(--tenue); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fila .lado { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.icono-caja { flex: none; width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; border-radius: 10px; background: var(--sup2); color: var(--verde); }
.icono-caja.redondo { border-radius: 50%; }
.icono-caja.grande { width: 44px; height: 44px; border-radius: 12px; }
.icono-caja.verde { background: var(--verde); color: var(--sobre-verde); }
.icono-caja.naranja { background: var(--sup2); color: var(--naranja-texto); }
.desglose { display: flex; flex-direction: column; padding-top: 4px; border-top: 1px solid var(--nav-borde); }
.desglose .renglon { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 36px; font-size: 14px; color: var(--suave); }
.desglose .renglon .valor { font-family: var(--display); font-weight: 700; font-size: 15px; color: var(--texto); }
.desglose .renglon.total { font-size: 15px; font-weight: 600; color: var(--texto); }
.desglose .renglon.total .valor { font-size: 20px; color: var(--verde); }

/* Navegación inferior */
.nav {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); z-index: 30;
  width: 100%; max-width: var(--ancho);
  display: grid; grid-template-columns: repeat(var(--n, 4), minmax(0, 1fr)); gap: 2px;
  padding: 8px 6px calc(12px + var(--seguro-abajo)); background: var(--nav); border-top: 1px solid var(--nav-borde);
}
.nav a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 52px; color: var(--tenue); font-size: 12px; font-weight: 600; }
.nav a[aria-current="page"] { color: var(--verde); font-weight: 700; }
.nav .icono-nav { position: relative; display: flex; }

/* Barra de acción inferior */
.accion {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); z-index: 30;
  width: 100%; max-width: var(--ancho);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 16px calc(16px + var(--seguro-abajo)); background: var(--nav); border-top: 1px solid var(--nav-borde);
}
.accion .resumen { display: flex; flex-direction: column; gap: 2px; min-width: 0; }

/* Tarjetas de paquete (estilo tienda de juegos) */
.paquetes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.paquete { position: relative; display: flex; flex-direction: column; padding: 0; overflow: hidden; text-align: left; border-radius: 16px; border: 1px solid var(--linea); background: var(--sup); color: var(--texto); }
.paquete:hover { color: var(--texto); }
.paquete.elegible { border-width: 2px; }
.paquete[aria-pressed="true"] { border-color: var(--verde); }
.paquete .arte { position: relative; display: block; height: 112px; overflow: hidden; }
.paquete.compacto .arte { height: 96px; }
.paquete .arte img.foto { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.paquete .arte svg { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
/* Imagen subida: PNG transparente a la derecha sobre el color; foto normal con sombra abajo para leer el número. */
.paquete .arte img.foto.recorte { inset: 8px 6px 8px auto; width: 60%; height: calc(100% - 16px); object-fit: contain; object-position: right center; }
.paquete .arte .sombra { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0) 30%, rgba(0,0,0,0.72) 100%); pointer-events: none; }
.paquete .bono { position: absolute; top: 10px; left: 10px; padding: 4px 8px; background: var(--verde); color: var(--sobre-verde); font-size: 12px; font-weight: 800; letter-spacing: 0.3px; clip-path: polygon(6px 0, 100% 0, calc(100% - 6px) 100%, 0 100%); }
.paquete .cantidad { position: absolute; left: 12px; bottom: 10px; display: flex; flex-direction: column; text-shadow: 0 1px 8px rgba(0,0,0,0.4); }
.paquete .cantidad .num { display: flex; align-items: baseline; gap: 4px; }
.paquete .cantidad .num b { font-family: var(--display); font-size: 30px; font-weight: 700; line-height: 1; color: #fff; }
.paquete .cantidad .num i { font-style: normal; font-family: var(--display); font-size: 16px; font-weight: 700; line-height: 1; color: var(--amarillo); }
.paquete .cantidad small { margin-top: 3px; font-size: 10px; font-weight: 800; letter-spacing: 1.5px; color: #fff; }
.paquete .palomita { position: absolute; top: 8px; right: 8px; width: 24px; height: 24px; display: none; align-items: center; justify-content: center; border-radius: 50%; background: var(--verde); color: var(--sobre-verde); box-shadow: 0 0 0 2px var(--fondo); }
.paquete[aria-pressed="true"] .palomita { display: flex; }
.paquete .cuerpo { display: flex; flex-direction: column; gap: 8px; padding: 10px 12px 12px; }
.paquete .titulo { font-size: 13px; font-weight: 700; line-height: 1.3; }
.precios { display: flex; align-items: center; gap: 8px; min-height: 34px; }
.precios .desc { flex: none; display: flex; align-items: center; height: 34px; padding: 0 7px; background: var(--naranja); color: var(--sobre-naranja); font-family: var(--display); font-size: 14px; font-weight: 700; clip-path: var(--chaflan-chico); }
.precios .antes { font-size: 12px; color: var(--tenue); text-decoration: line-through; }
.precios .ahora { font-family: var(--display); font-size: 15px; font-weight: 700; }
.reloj { display: flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; color: var(--naranja-texto); }
.boton-comprar { display: flex; align-items: center; justify-content: center; min-height: 42px; background: var(--verde); color: var(--sobre-verde); font-weight: 700; font-size: 15px; clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px); }

/* Opciones elegibles (tarjetas de radio) */
.opcion { display: flex; align-items: flex-start; gap: 12px; width: 100%; padding: 12px 14px; border-radius: 14px; border: 2px solid var(--linea); background: var(--sup); color: var(--texto); text-align: left; }
.opcion[aria-pressed="true"] { border-color: var(--verde); background: var(--hl); }
.opcion .radio { flex: none; margin-top: 1px; width: 20px; height: 20px; display: flex; align-items: center; justify-content: center; border-radius: 50%; border: 2px solid var(--pendiente); }
.opcion[aria-pressed="true"] .radio { border-color: var(--verde); }
.opcion[aria-pressed="true"] .radio::after { content: ''; width: 10px; height: 10px; border-radius: 50%; background: var(--verde); }

/* Línea de tiempo del pedido */
.pasos { display: flex; flex-direction: column; padding: 6px 14px; border-radius: 16px; background: var(--sup); border: 1px solid var(--linea); }
.paso { display: flex; align-items: center; gap: 12px; min-height: 40px; font-size: 15px; color: var(--tenue); }
.paso .bolita { flex: none; width: 22px; height: 22px; display: flex; align-items: center; justify-content: center; border-radius: 50%; border: 2px solid var(--pendiente); }
.paso.hecho { color: var(--texto); font-weight: 600; }
.paso.hecho .bolita { background: var(--verde); border-color: var(--verde); color: var(--sobre-verde); }
.paso.actual { color: var(--naranja-texto); font-weight: 700; }
.paso.actual .bolita { border-color: var(--naranja); }
.paso.actual .bolita::after { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--naranja); }
.pasos.reglas { padding: 0; background: transparent; border: 0; gap: 8px; }
.pasos.reglas .paso { align-items: flex-start; min-height: 0; font-size: 14px; color: var(--suave); }
.pasos.reglas .bolita { background: var(--verde); border-color: var(--verde); color: var(--sobre-verde); font-size: 12px; font-weight: 700; }

/* Barras de ventas */
.barra-dato { display: block; height: 8px; border-radius: 999px; background: var(--sup2); overflow: hidden; }
.barra-dato > span { display: block; height: 100%; border-radius: 999px; background: var(--verde); }

/* Comprobante / imagen */
.comprobante { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 120px; border-radius: 12px; border: 1px dashed var(--borde-input); background: var(--sup2); color: var(--tenue); overflow: hidden; }
.comprobante img { width: 100%; max-height: 420px; object-fit: contain; background: #000; }
.banner { position: relative; min-height: 150px; border-radius: 16px; overflow: hidden; background: var(--sup); border: 1px solid var(--linea); }
/* El banner siempre se ve en proporción 12:5 (1200 × 500): si la imagen es de otra medida, se recorta parejo sin dejar huecos. */
.banner.con-imagen { min-height: 0; aspect-ratio: 12 / 5; }
.banner.con-imagen img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; }
@supports not (aspect-ratio: 1) { .banner.con-imagen img { position: static; height: auto; } }

/* Logos subidos desde el admin */
.logo-producto { flex: none; width: 44px; height: 44px; border-radius: 12px; object-fit: contain; background: var(--sup2); border: 1px solid var(--linea); }
.logo-producto.chico { width: 36px; height: 36px; border-radius: 10px; }
/* Un logo ancho se encoge para que nunca empuje los botones ni haga scroll de lado. */
.logo-marca { flex: 0 1 auto; min-width: 0; display: block; height: 36px; width: auto; max-width: 170px; object-fit: contain; object-position: left center; }
.bienvenida .logo .logo-marca { height: 72px; max-width: 100%; }

/* Botones flotantes: soporte por WhatsApp e "Instalar app" (siempre arriba de la barra de abajo) */
#flotantes { position: fixed; z-index: 40; right: max(16px, calc((100vw - var(--ancho)) / 2 + 16px)); bottom: calc(16px + var(--seguro-abajo));
  display: flex; align-items: center; gap: 10px; pointer-events: none; }
#flotantes > * { pointer-events: auto; }
.fab-soporte { flex: none; width: 56px; height: 56px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: #25D366; color: #FFFFFF; box-shadow: 0 6px 18px rgba(0,0,0,0.45); }
.fab-soporte:hover, .fab-soporte:active { color: #FFFFFF; filter: brightness(1.06); }
.fab-instalar { display: flex; align-items: center; height: 46px; border-radius: 999px; background: var(--sup2); border: 1px solid var(--hl-borde);
  box-shadow: 0 6px 18px rgba(0,0,0,0.45); overflow: hidden; }
.fab-instalar-boton { display: flex; align-items: center; gap: 8px; height: 100%; padding: 0 4px 0 16px; border: 0; background: transparent;
  color: var(--verde); font-weight: 700; font-size: 15px; white-space: nowrap; }
.fab-instalar-cerrar { width: 44px; height: 100%; display: flex; align-items: center; justify-content: center; border: 0; background: transparent; color: var(--tenue); }
body.con-flotantes .pantalla { padding-bottom: calc(84px + var(--seguro-abajo)); }
body.con-flotantes .pantalla.con-nav { padding-bottom: calc(168px + var(--seguro-abajo)); }
body.con-flotantes .pantalla.con-accion { padding-bottom: calc(178px + var(--seguro-abajo)); }
body.con-flotantes #toasts { bottom: calc(172px + var(--seguro-abajo)); }

/* Avisos emergentes y diálogos */
#toasts { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(100px + var(--seguro-abajo)); z-index: 100; width: calc(100% - 32px); max-width: 488px; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.toast { padding: 12px 14px; border-radius: 12px; background: var(--sup2); border: 1px solid var(--borde-input); color: var(--texto); font-size: 14px; font-weight: 600; box-shadow: 0 8px 24px rgba(0,0,0,0.45); pointer-events: auto; animation: entra 0.18s ease-out; }
.toast.ok { border-color: var(--hl-borde); background: var(--hl); }
.toast.error { border-color: var(--naranja); }
@keyframes entra { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }
.velo { position: fixed; inset: 0; z-index: 90; display: flex; align-items: flex-end; justify-content: center; background: rgba(3,7,10,0.72); padding: 16px; }
.dialogo { width: 100%; max-width: 488px; max-height: 88vh; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; padding: 18px 16px calc(18px + var(--seguro-abajo)); border-radius: 18px; background: var(--sup); border: 1px solid var(--linea); animation: entra 0.18s ease-out; }
@media (min-width: 600px) { .velo { align-items: center; } }

/* Estados vacíos y carga */
.vacio { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 28px 16px; text-align: center; color: var(--tenue); font-size: 14px; }
.esqueleto { border-radius: 16px; background: linear-gradient(90deg, var(--sup) 0%, var(--sup2) 50%, var(--sup) 100%); background-size: 200% 100%; animation: brillo 1.2s ease-in-out infinite; }
@keyframes brillo { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.cargando-pantalla { display: flex; min-height: 70vh; align-items: center; justify-content: center; }
.giro-grande { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--linea); border-top-color: var(--verde); animation: giro 0.8s linear infinite; }

/* Bienvenida / inicio de sesión */
.bienvenida { display: flex; flex-direction: column; gap: 18px; padding: calc(40px + var(--seguro-arriba)) 20px 32px; min-height: 100dvh; }
.bienvenida .logo { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.bienvenida .logo b { font-family: var(--display); font-size: 26px; letter-spacing: 3px; }
.separador { display: flex; align-items: center; gap: 12px; color: var(--tenue); font-size: 13px; }
.separador::before, .separador::after { content: ''; flex: 1; height: 1px; background: var(--linea); }
.btn-google { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; border-radius: 12px; border: 1px solid var(--borde-input); background: #fff; color: #1f1f1f; font-weight: 700; font-size: 16px; }

.texto-largo { white-space: pre-wrap; font-size: 14px; line-height: 1.55; color: var(--suave); }
.decoracion { position: absolute; top: -70px; right: -90px; opacity: 0.08; pointer-events: none; }

/* QR del folio y escáner de la tienda */
.qr-caja { display: flex; align-items: center; justify-content: center; min-width: 212px; min-height: 212px; padding: 14px; border-radius: 14px; background: #FFFFFF; line-height: 0; }
.qr-caja .giro-grande { border-color: #D7E2E4; border-top-color: #0E7C86; }
.escaner { position: fixed; inset: 0; z-index: 95; display: flex; flex-direction: column; background: #000; }
.escaner video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.escaner .marco { position: absolute; left: 50%; top: 42%; width: 240px; height: 240px; transform: translate(-50%, -50%); border-radius: 18px; border: 3px solid var(--verde); box-shadow: 0 0 0 9999px rgba(0,0,0,0.45); }
.escaner .abajo { position: absolute; left: 0; right: 0; bottom: 0; display: flex; flex-direction: column; gap: 12px; padding: 18px 16px calc(20px + var(--seguro-abajo)); background: linear-gradient(transparent, rgba(0,0,0,0.85) 30%); }
.escaner .estado { color: #fff; font-weight: 600; text-align: center; }
