/* Caja rápida para comida rápida · estilos (marca Ricono: morado y amarillo) */

:root {
  --morado: #5B2DB5;
  --morado-osc: #3F1D86;
  --noche: #2A1458;
  --lila: #EFE8FB;
  --lila-2: #F5F3FA;
  --amarillo: #F7C51E;
  --tinta: #18181B;
  --tinta-2: #3F3F46;
  --gris: #57534E;
  --borde: #E7E5E4;
  --borde-2: #D6D3D1;
  --fondo: #F5F5F4;
  --blanco: #FFFFFF;
  --verde: #166534;
  --verde-claro: #E8F5EE;
  --verde-tinta: #14532D;
  --ambar: #FEF3C7;
  --ambar-tinta: #78350F;
  --rojo: #991B1B;
  --rojo-claro: #FEE2E2;
  --radio: 18px;
  --nav-alto: 68px;
  --safe-b: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, sans-serif;
  color: var(--tinta);
  background: var(--fondo);
  -webkit-tap-highlight-color: transparent;
}
h1, h2 { font-family: 'Inter Tight', Inter, sans-serif; margin: 0; letter-spacing: -0.02em; }
h1 { font-size: 24px; font-weight: 800; }
h2 { font-size: 17px; font-weight: 800; }
a { color: var(--morado); }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .45; }
:focus-visible { outline: 3px solid var(--amarillo); outline-offset: 2px; }
.oculto { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.sub { margin: 2px 0 0; color: var(--gris); font-size: 14px; }
.sub.chico, .chico { font-size: 13px; }
.cargando, .vacio { color: var(--gris); padding: 24px; text-align: center; }
.ico { flex-shrink: 0; }

/* ---------- Marco y navegación ---------- */
.contenido { padding-bottom: calc(var(--nav-alto) + var(--safe-b)); min-height: 100vh; }
.sin-nav .contenido { padding-bottom: 0; }
.nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  height: calc(var(--nav-alto) + var(--safe-b)); padding-bottom: var(--safe-b);
  background: var(--blanco); border-top: 1px solid var(--borde);
  display: flex;
}
.nav-marca { display: none; }
.nav a {
  flex: 1 1 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  text-decoration: none; color: var(--gris); font-size: 12px; font-weight: 600; min-height: 48px;
}
.nav a.on { color: var(--morado); font-weight: 800; }

.pantalla { max-width: 1180px; margin: 0 auto; padding: 18px 16px 24px; display: flex; flex-direction: column; gap: 14px; }
.cab { display: flex; align-items: center; gap: 12px; }
.cab > div { flex-grow: 1; }
.subtitulo { margin-top: 8px; }

/* ---------- Botones ---------- */
.btn-principal, .btn-sec, .btn-blanco, .btn-wa, .btn-peligro {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 18px; border-radius: 14px; font-weight: 700; font-size: 15px;
  text-decoration: none; border: none;
}
.btn-principal { background: var(--morado); color: var(--blanco); }
.btn-principal:hover:not(:disabled) { background: var(--morado-osc); }
.btn-principal.grande, .btn-blanco.grande { min-height: 60px; font-size: 17px; border-radius: 18px; width: 100%; }
.btn-sec { background: var(--blanco); color: var(--tinta); border: 1px solid var(--borde-2); }
.btn-sec.chico { min-height: 44px; padding: 0 12px; font-size: 13px; }
.btn-sec.alto, .btn-wa.alto { min-height: 56px; }
.btn-wa { background: var(--verde); color: var(--blanco); }
.btn-wa.deshabilitado { opacity: .5; }
.btn-blanco { background: var(--blanco); color: var(--verde); font-weight: 800; }
.btn-peligro { background: var(--blanco); color: var(--rojo); border: 1px solid #FCA5A5; }
.btn-texto { background: none; border: none; color: var(--gris); font-weight: 600; min-height: 44px; padding: 0 8px; }
.btn-icono {
  width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--borde); background: var(--blanco);
  display: inline-flex; align-items: center; justify-content: center; color: var(--tinta); flex-shrink: 0;
}
.dos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }

/* ---------- Campos ---------- */
.campo { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--tinta-2); }
.campo input, .fila-form input, .campo-linea input {
  height: 48px; border-radius: 12px; border: 1px solid var(--borde-2); padding: 0 14px; font-size: 16px; background: var(--blanco); color: var(--tinta);
}
.input-grande { height: 64px !important; font-family: 'Inter Tight', sans-serif; font-size: 30px !important; font-weight: 800; border: 2px solid var(--morado) !important; }
.fila-form { display: flex; gap: 8px; }
.fila-form input { flex-grow: 1; min-width: 0; }
.fila-check { display: flex; align-items: center; gap: 10px; min-height: 48px; font-weight: 600; font-size: 14px; }
.fila-check input { width: 22px; height: 22px; accent-color: var(--morado); }

/* ---------- Tarjetas y piezas comunes ---------- */
.tarjeta { background: var(--blanco); border: 1px solid var(--borde); border-radius: 20px; padding: 18px; display: flex; flex-direction: column; gap: 10px; }
.segmento { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 4px; border-radius: 14px; background: var(--borde); }
.segmento button { min-height: 44px; border: none; border-radius: 10px; background: transparent; font-weight: 600; color: var(--tinta-2); }
.segmento button.on { background: var(--blanco); color: var(--tinta); font-weight: 800; box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.rapidos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.rapidos.cuatro { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.chip-monto { min-height: 52px; border-radius: 14px; border: 1px solid var(--borde); background: var(--blanco); font-weight: 800; font-size: 16px; }
.chip-monto.activo { background: var(--tinta); color: var(--blanco); border-color: var(--tinta); }
.nota-ok { display: flex; gap: 8px; align-items: center; margin: 0; padding: 12px 14px; border-radius: 14px; background: var(--verde-claro); color: var(--verde-tinta); font-size: 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { padding: 6px 10px; border-radius: 999px; background: var(--lila); color: var(--morado-osc); font-size: 13px; font-weight: 600; }
.stepper { display: flex; align-items: center; gap: 2px; background: var(--fondo); border-radius: 14px; padding: 2px; }
.stepper button { width: 44px; height: 44px; border: none; border-radius: 12px; background: transparent; display: flex; align-items: center; justify-content: center; }
.stepper span, .stepper input { width: 32px; text-align: center; font-weight: 800; font-size: 16px; border: none; background: transparent; }
.stepper.grande button { width: 52px; height: 52px; }
.fila { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.fila-total { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-weight: 700; }
.fila-total b { font-family: 'Inter Tight', sans-serif; font-size: 24px; font-weight: 800; }
.punto { display: inline-block; width: 8px; height: 8px; border-radius: 4px; margin-right: 6px; }
.punto.ok { background: #1F7A4D; }
.lista { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.item-lista { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: var(--blanco); border: 1px solid var(--borde); border-radius: 16px; }
.item-lista > div { flex-grow: 1; display: flex; flex-direction: column; min-width: 0; }
.estado { padding: 4px 10px; border-radius: 999px; font-size: 13px; font-weight: 700; white-space: nowrap; }
.estado.cuadra { background: var(--verde-claro); color: var(--verde-tinta); }
.estado.falta { background: var(--ambar); color: var(--ambar-tinta); }
.estado.sobra { background: #DBEAFE; color: #1E3A8A; }
.sin-foto { display: block; width: 100%; aspect-ratio: 1; border-radius: 12px; background: var(--lila-2); }
.sin-foto.chica { width: 52px; height: 52px; }

/* ---------- Apertura ---------- */
.apertura { max-width: 480px; min-height: calc(100vh - var(--nav-alto)); }
.apertura .tarjeta { gap: 14px; }

/* ---------- Venta ---------- */
.top-venta { display: flex; align-items: center; gap: 10px; }
.top-venta .logo, .nav-marca img { border-radius: 50%; object-fit: cover; }
.top-texto { flex-grow: 1; min-width: 0; }
.top-nombre { font-family: 'Inter Tight', sans-serif; font-weight: 800; font-size: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-sub { font-size: 13px; color: var(--gris); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-venta .btn-sec span { white-space: nowrap; }
.productos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding-bottom: 150px; }
.producto {
  position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left;
  padding: 8px 8px 12px; border-radius: 18px; border: 1px solid var(--borde); background: var(--blanco); color: var(--tinta);
  transition: transform .08s ease;
}
.producto:active { transform: scale(.97); }
.producto.elegido { border: 2px solid var(--morado); padding: 7px 7px 11px; }
.producto img { width: 100%; aspect-ratio: 1.15; object-fit: cover; border-radius: 12px; margin-bottom: 6px; }
.p-nombre { font-weight: 800; font-size: 15px; padding: 0 4px; }
.p-precio { font-size: 14px; color: var(--gris); padding: 0 4px; }
.insignia {
  position: absolute; top: 12px; right: 12px; min-width: 32px; height: 32px; padding: 0 8px; border-radius: 16px;
  background: var(--morado); color: var(--blanco); font-weight: 800; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 0 3px var(--blanco);
}
.pedido {
  position: fixed; left: 0; right: 0; bottom: calc(var(--nav-alto) + var(--safe-b)); z-index: 15;
  background: var(--blanco); border-top: 1px solid var(--borde); padding: 10px 16px 12px;
  display: flex; flex-direction: column; gap: 8px; box-shadow: 0 -8px 24px rgba(24,24,27,.06);
}
.pedido-detalle summary { list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 10px; min-height: 36px; font-size: 14px; color: var(--tinta-2); cursor: pointer; }
.pedido-detalle summary::-webkit-details-marker { display: none; }
.pedido-detalle summary > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pedido-detalle .ver { color: var(--morado); font-weight: 700; flex-shrink: 0; }
.pedido-detalle[open] .ver::after { content: ' ▾'; }
.lineas { list-style: none; margin: 0; padding: 0; max-height: 40vh; overflow-y: auto; }
.linea { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--borde); }
.l-texto { flex-grow: 1; display: flex; flex-direction: column; min-width: 0; font-size: 14px; }
.l-texto span { color: var(--gris); font-size: 13px; }
.l-texto .l-precio { color: var(--tinta); font-weight: 600; }
.btn-cobrar {
  min-height: 62px; border-radius: 18px; border: none; background: var(--morado); color: var(--blanco);
  display: flex; align-items: center; justify-content: space-between; padding: 0 22px; font-weight: 800; font-size: 18px;
}
.btn-cobrar .monto { font-family: 'Inter Tight', sans-serif; font-size: 24px; }
.btn-cobrar:not(:disabled) { box-shadow: 0 6px 18px rgba(91,45,181,.32); }
.vacio-pedido .btn-cobrar { background: var(--borde-2); }
.salta { animation: salta .35s ease-out; display: inline-block; }
@keyframes salta { 0% { transform: scale(1); } 40% { transform: scale(1.18); } 100% { transform: scale(1); } }

/* ---------- Hoja inferior ---------- */
#modal-root { display: none; }
#modal-root.abierto { display: block; }
.hoja-fondo { position: fixed; inset: 0; background: rgba(24,24,27,.45); z-index: 40; }
.hoja {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 41; max-height: 92vh; overflow-y: auto;
  background: var(--blanco); border-radius: 26px 26px 0 0; padding: 18px 16px calc(18px + var(--safe-b));
  display: flex; flex-direction: column; gap: 14px; animation: sube .2s ease-out;
}
@keyframes sube { from { transform: translateY(30px); opacity: .6; } to { transform: none; opacity: 1; } }
.hoja-cab { display: flex; align-items: center; gap: 12px; }
.hoja-cab > div { flex-grow: 1; }
.hoja-cab img { border-radius: 14px; object-fit: cover; }
.salsas { display: flex; flex-wrap: wrap; gap: 8px; }
.salsa { min-height: 46px; padding: 0 14px; border-radius: 23px; border: 1px solid var(--borde); background: var(--blanco); font-weight: 600; font-size: 15px; display: inline-flex; align-items: center; gap: 6px; color: var(--tinta-2); }
.salsa.on { border: 2px solid var(--morado); background: var(--lila); color: var(--morado-osc); padding: 0 13px; }
.hoja-pie { display: flex; gap: 10px; align-items: center; }
.hoja-pie .btn-principal { flex-grow: 1; min-height: 56px; font-size: 16px; }
.cobro-total { text-align: center; font-family: 'Inter Tight', sans-serif; font-size: 44px; font-weight: 800; letter-spacing: -0.03em; }
.cambio { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; border-radius: 16px; background: var(--verde-claro); color: var(--verde-tinta); font-weight: 700; }
.cambio b { font-family: 'Inter Tight', sans-serif; font-size: 28px; }
.cambio.falta { background: var(--ambar); color: var(--ambar-tinta); }
.qr-cobro { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.qr-cobro img { border-radius: 16px; border: 1px solid var(--borde); }

/* ---------- Venta completada ---------- */
.listo { background: var(--verde); color: var(--blanco); min-height: 100vh; max-width: none; align-items: center; justify-content: center; text-align: center; padding: 28px 20px calc(28px + var(--safe-b)); }
.listo > * { width: 100%; max-width: 440px; }
.listo h1 { font-size: 40px; }
.listo-sub { margin: 0; color: #DCFCE7; font-size: 17px; }
.check-pop { width: 120px !important; height: 120px; border-radius: 60px; background: var(--blanco); color: var(--verde); display: flex; align-items: center; justify-content: center; animation: pop .6s ease-out both; }
.check-pop.morado { color: var(--morado); background: var(--lila); width: 96px !important; height: 96px; }
@keyframes pop { 0% { transform: scale(.5); opacity: 0; } 60% { transform: scale(1.1); opacity: 1; } 100% { transform: scale(1); } }
.cambio-grande { border-radius: 22px; background: rgba(255,255,255,.14); padding: 16px; }
.cambio-grande span { display: block; color: #DCFCE7; font-size: 15px; }
.cambio-grande b { font-family: 'Inter Tight', sans-serif; font-size: 52px; letter-spacing: -0.02em; }
.ticket-opciones { background: var(--blanco); color: var(--tinta); border-radius: 22px; padding: 16px; display: flex; flex-direction: column; gap: 12px; text-align: left; }
.tel { display: flex; gap: 8px; }
.tel .prefijo { height: 48px; padding: 0 12px; border-radius: 12px; background: var(--fondo); display: flex; align-items: center; font-weight: 800; color: var(--tinta); }
.tel input { flex-grow: 1; min-width: 0; font-size: 18px !important; font-weight: 700; }

/* ---------- Cierre ---------- */
.pasos { display: flex; gap: 6px; }
.pasos span { flex: 1 1 0; height: 6px; border-radius: 3px; background: var(--borde); }
.pasos span.on { background: var(--morado); }
.explica { margin: 0; font-size: 14px; color: var(--tinta-2); line-height: 1.45; }
.cortes { display: flex; flex-direction: column; gap: 8px; padding-bottom: 150px; }
.corte { display: flex; align-items: center; gap: 12px; padding: 8px 8px 8px 16px; border-radius: 16px; background: var(--blanco); border: 1px solid var(--borde); }
.c-valor { width: 84px; font-family: 'Inter Tight', sans-serif; font-weight: 800; font-size: 18px; flex-shrink: 0; }
.c-sub { flex-grow: 1; text-align: right; font-weight: 600; color: var(--tinta-2); }
.corte .monedas { margin-left: auto; width: 120px; height: 44px; border-radius: 12px; border: 1px solid var(--borde-2); text-align: right; padding: 0 12px; font-size: 16px; }
.barra-fija {
  position: fixed; left: 0; right: 0; bottom: calc(var(--nav-alto) + var(--safe-b)); z-index: 15;
  background: var(--blanco); border-top: 1px solid var(--borde); padding: 12px 16px; display: flex; flex-direction: column; gap: 10px;
}
.cuadre { border-radius: 20px; padding: 16px 18px; display: flex; flex-direction: column; gap: 8px; }
.cuadre.cuadra { background: var(--verde-claro); color: var(--verde-tinta); }
.cuadre.falta { background: var(--ambar); color: var(--ambar-tinta); }
.cuadre.sobra { background: #DBEAFE; color: #1E3A8A; }
.cuadre .campo { color: inherit; }
.cuadre small { font-size: 12px; opacity: .85; }
.campo-linea { align-items: center; font-weight: 600; }
.campo-linea input { width: 120px; text-align: right; }
.listo-cierre { align-items: center; text-align: center; max-width: 480px; }
.listo-cierre .btn-wa, .listo-cierre .btn-principal { width: 100%; }

/* ---------- Reportes ---------- */
.kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.kpi { background: var(--blanco); border: 1px solid var(--borde); border-radius: 18px; padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; }
.kpi span { font-size: 13px; color: var(--gris); font-weight: 600; }
.kpi b { font-family: 'Inter Tight', sans-serif; font-size: 24px; }
.barras { display: flex; align-items: flex-end; gap: 4px; height: 160px; border-bottom: 1px solid var(--borde-2); padding-top: 8px; }
.barra { flex: 1 1 0; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; min-width: 0; }
.b-fill { width: 100%; max-width: 32px; min-height: 2px; border-radius: 4px 4px 0 0; background: var(--morado); }
.b-fill.pico { background: var(--morado-osc); }
.barra span { font-size: 11px; color: var(--gris); margin-bottom: -20px; }
.barras { margin-bottom: 20px; }
.por-producto { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.por-producto li { display: flex; align-items: center; gap: 12px; }
.por-producto img { border-radius: 10px; object-fit: cover; }
.pp-texto { flex-grow: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pp-barra { height: 8px; border-radius: 4px; background: var(--fondo); }
.pp-barra div { height: 8px; border-radius: 4px; background: var(--morado); }

/* ---------- Menú y ajustes ---------- */
.producto-fila img { border-radius: 12px; object-fit: cover; }
.pf-texto { flex-grow: 1; display: flex; flex-direction: column; min-width: 0; }
.producto-fila.pausado { opacity: .6; }
.chips.grandes { gap: 8px; }
.chip-salsa { display: inline-flex; align-items: center; border-radius: 22px; background: var(--lila); color: var(--morado-osc); }
.chip-salsa button { border: none; background: transparent; min-height: 44px; padding: 0 6px 0 14px; font-weight: 600; color: inherit; }
.chip-salsa .x { padding: 0 12px 0 6px; display: flex; align-items: center; }
.chip-salsa.off { background: var(--borde); color: var(--gris); }
.chip-salsa.off button:first-child { text-decoration: line-through; }
.form { display: flex; flex-direction: column; gap: 12px; }
.foto-editor { display: flex; align-items: center; gap: 14px; }
.foto-editor img { border-radius: 14px; object-fit: cover; }
.foto-editor .sin-foto { width: 96px; height: 96px; }
.redondo { border-radius: 50% !important; }

/* ---------- Avisos ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(var(--nav-alto) + 90px + var(--safe-b)); transform: translate(-50%, 20px);
  background: var(--tinta); color: var(--blanco); padding: 12px 18px; border-radius: 14px; font-weight: 600; font-size: 14px;
  opacity: 0; pointer-events: none; transition: all .2s ease; z-index: 60; max-width: calc(100vw - 32px); text-align: center;
}
.toast.visible { opacity: 1; transform: translate(-50%, 0); }
.toast.error { background: var(--rojo); }

/* ---------- Tablet y computadora ---------- */
@media (min-width: 900px) {
  :root { --nav-alto: 0px; }
  #app:not(.sin-nav) { display: flex; }
  .nav {
    position: sticky; top: 0; bottom: auto; height: 100vh; width: 96px; flex-direction: column; justify-content: flex-start;
    gap: 6px; padding: 18px 8px; border-top: none; border-right: 1px solid var(--borde); background: var(--noche);
  }
  .nav-marca { display: flex; justify-content: center; margin-bottom: 12px; }
  .nav a { flex: 0 0 auto; min-height: 64px; border-radius: 16px; color: #C9BCEB; }
  .nav a.on { background: rgba(255,255,255,.12); color: var(--blanco); }
  .contenido { flex-grow: 1; padding-bottom: 0; }
  .venta-cuerpo { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 18px; align-items: start; }
  .productos { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); padding-bottom: 0; }
  .pedido { position: sticky; top: 18px; left: auto; right: auto; bottom: auto; border: 1px solid var(--borde); border-radius: 22px; box-shadow: none; padding: 16px; }
  .pedido-detalle { display: block; }
  .lineas { max-height: 55vh; }
  .hoja { left: 50%; right: auto; width: 560px; bottom: 50%; transform: translate(-50%, 50%); border-radius: 26px; animation: none; }
  .kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .kpis.dos { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .barra-fija { position: static; border: 1px solid var(--borde); border-radius: 20px; }
  .cortes { padding-bottom: 0; }
  .toast { bottom: 32px; }
}

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

/* ======================================================================
   v0.2 · Inicio, venta más moderna, salsas en pastillas, menú y ticket
   ====================================================================== */

/* ---------- Inicio ---------- */
.inicio { min-height: 100vh; display: flex; flex-direction: column; background: var(--noche); }
.inicio-hero { position: relative; overflow: hidden; color: var(--blanco); padding: 18px 20px 34px; display: flex; flex-direction: column; align-items: center; text-align: center; }
.hero-burbuja { position: absolute; border-radius: 50%; }
.hero-burbuja.b1 { width: 320px; height: 320px; background: #3A1F73; right: -120px; top: -90px; }
.hero-burbuja.b2 { width: 70px; height: 70px; background: var(--amarillo); left: -30px; top: 96px; }
.hero-top { position: relative; width: 100%; display: flex; justify-content: space-between; align-items: center; }
.estado-caja { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 999px; background: rgba(255,255,255,.12); font-size: 13px; font-weight: 600; }
.estado-caja i { width: 9px; height: 9px; border-radius: 50%; background: var(--amarillo); }
.estado-caja.abierta i { background: #4ADE80; box-shadow: 0 0 0 4px rgba(74,222,128,.25); }
.btn-hero { width: 44px; height: 44px; border-radius: 14px; background: rgba(255,255,255,.12); color: var(--blanco); display: flex; align-items: center; justify-content: center; }
.hero-logo { position: relative; width: 128px; height: 128px; border-radius: 50%; object-fit: cover; margin-top: 10px; box-shadow: 0 0 0 8px rgba(255,255,255,.08); animation: pop .6s ease-out both; }
.hero-saludo { position: relative; margin: 14px 0 0; color: #D9CCF5; font-weight: 600; }
.hero-nombre { position: relative; font-size: 44px; line-height: 1.05; margin-top: 2px; }
.hero-sub { position: relative; margin: 6px 0 0; color: #D9CCF5; font-size: 14px; }
.cap { text-transform: capitalize; }
.hero-fotos { position: relative; display: flex; margin-top: 18px; }
.hero-fotos img { width: 58px; height: 58px; border-radius: 50%; object-fit: cover; border: 3px solid var(--noche); margin-left: -12px; }
.hero-fotos img:first-child { margin-left: 0; }
.inicio-panel { flex-grow: 1; background: var(--fondo); border-radius: 28px 28px 0 0; padding: 22px 16px 24px; display: flex; flex-direction: column; gap: 14px; max-width: 760px; width: 100%; margin: 0 auto; }
.bienvenida h2 { font-size: 22px; }
.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.stat { background: var(--blanco); border: 1px solid var(--borde); border-radius: 18px; padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; }
.stat span { font-size: 13px; color: var(--gris); font-weight: 600; }
.stat b { font-family: 'Inter Tight', sans-serif; font-size: 22px; font-weight: 800; }
.stat small { color: var(--gris); font-size: 12px; }
.stat.grande { grid-column: 1 / -1; background: var(--morado); border-color: var(--morado); color: var(--blanco); }
.stat.grande span, .stat.grande small { color: #E4DAF7; }
.stat.grande b { font-size: 36px; }
.stat.top { flex-direction: row; align-items: center; gap: 10px; }
.stat.top > div { display: flex; flex-direction: column; min-width: 0; }
.stat.top img { width: 44px; height: 44px; border-radius: 12px; object-fit: cover; flex-shrink: 0; }
.stat.top b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat.top b { font-size: 17px; }
.btn-amarillo { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 64px; border-radius: 20px; background: var(--amarillo); color: var(--noche); font-weight: 800; font-size: 18px; text-decoration: none; box-shadow: 0 8px 22px rgba(247,197,30,.35); }
.accesos { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.acceso { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 76px; border-radius: 18px; background: var(--blanco); border: 1px solid var(--borde); color: var(--tinta); text-decoration: none; font-size: 12px; font-weight: 700; }
.acceso .ico { color: var(--morado); }
.lema { text-align: center; color: var(--gris); font-size: 13px; margin: 4px 0 0; }

/* ---------- Venta ---------- */
.top-venta { background: var(--noche); color: var(--blanco); margin: -18px -16px 0; padding: 14px 16px 16px; border-radius: 0 0 24px 24px; }
.top-venta .top-sub { color: #D9CCF5; }
.top-venta .btn-sec { background: rgba(255,255,255,.12); border-color: transparent; color: var(--blanco); }
.producto { padding: 6px 6px 10px; border-radius: 20px; box-shadow: 0 2px 8px rgba(24,24,27,.05); }
.producto.elegido { padding: 5px 5px 9px; }
.p-foto { position: relative; display: block; width: 100%; margin-bottom: 8px; }
.p-foto img { display: block; width: 100%; aspect-ratio: 1.05; object-fit: cover; border-radius: 15px; margin: 0; }
.p-precio { position: absolute; left: 8px; bottom: 8px; padding: 5px 10px; border-radius: 999px; background: var(--blanco); color: var(--tinta); font-weight: 800; font-size: 13px; box-shadow: 0 2px 6px rgba(0,0,0,.15); }
.p-nombre { font-size: 16px; padding: 0 6px; }
.p-mas { position: absolute; right: 12px; bottom: 10px; width: 30px; height: 30px; border-radius: 10px; background: var(--lila); color: var(--morado); display: flex; align-items: center; justify-content: center; }
.producto.elegido .p-mas { background: var(--morado); color: var(--blanco); }
.mini-salsas { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.mini-salsa { display: inline-flex; align-items: center; gap: 5px; padding: 3px 8px; border-radius: 999px; background: var(--lila-2); color: var(--tinta-2); font-size: 12px; font-weight: 600; }
.mini-salsa i { width: 8px; height: 8px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0,0,0,.15); }
.mini-salsa.vacia { background: var(--fondo); color: var(--gris); }
.l-texto b { display: flex; justify-content: space-between; gap: 8px; }

/* ---------- Hoja de salsas ---------- */
.hoja-producto { display: flex; align-items: center; gap: 14px; }
.hoja-producto img { width: 76px; height: 76px; border-radius: 18px; object-fit: cover; }
.hp-texto { flex-grow: 1; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.hp-texto h2 { font-size: 22px; }
.precio-pill { padding: 4px 12px; border-radius: 999px; background: var(--lila); color: var(--morado-osc); font-weight: 800; font-size: 14px; }
.salsas-cab { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; padding-top: 12px; border-top: 1px solid var(--borde); }
.salsas-cab h3 { margin: 0; font-family: 'Inter Tight', sans-serif; font-size: 18px; }
.salsas-cab .btn-texto { color: var(--morado); }
.salsas { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.salsa { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 12px; border-radius: 16px; border: 1.5px solid var(--borde); background: var(--blanco); font-weight: 700; font-size: 15px; color: var(--tinta); text-align: left; }
.salsa .gota { width: 18px; height: 18px; border-radius: 50%; flex-shrink: 0; box-shadow: inset 0 0 0 1.5px rgba(0,0,0,.12); }
.salsa .s-nombre { flex-grow: 1; }
.salsa .s-check { width: 24px; height: 24px; border-radius: 8px; border: 1.5px solid var(--borde-2); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.salsa.on { border: 2px solid var(--morado); background: var(--lila); padding: 0 11.5px; color: var(--morado-osc); }
.salsa.on .s-check { background: var(--morado); border-color: var(--morado); color: var(--blanco); }

/* ---------- Menú ---------- */
.producto-fila { gap: 12px; }
.producto-fila img { width: 56px; height: 56px; }
.pf-texto b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.switch { position: relative; display: inline-flex; flex-shrink: 0; width: 52px; height: 32px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.switch .riel { width: 52px; height: 32px; border-radius: 16px; background: var(--borde-2); transition: background .15s; position: relative; }
.switch .riel::after { content: ''; position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%; background: var(--blanco); box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .15s; }
.switch input:checked + .riel { background: var(--morado); }
.switch input:checked + .riel::after { transform: translateX(20px); }
.switch input:focus-visible + .riel { outline: 3px solid var(--amarillo); outline-offset: 2px; }
.salsas-admin { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.salsas-admin .chip-salsa { justify-content: space-between; border-radius: 14px; background: var(--blanco); border: 1px solid var(--borde); color: var(--tinta); }
.salsas-admin .chip-salsa button:first-child { display: flex; align-items: center; gap: 8px; flex-grow: 1; text-align: left; }
.salsas-admin .gota { width: 14px; height: 14px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0,0,0,.12); }
.salsas-admin .chip-salsa.off { background: var(--fondo); color: var(--gris); }

@media (min-width: 900px) {
  .inicio { flex-direction: row; }
  .inicio-hero { width: 44%; justify-content: center; padding: 40px; }
  .inicio-panel { border-radius: 0; justify-content: center; padding: 40px; }
  .top-venta { margin: 0; border-radius: 22px; }
  .salsas { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .salsas-admin { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* ---------- Ticket (vista previa y papel 58 / 80 mm) ---------- */
.ticket { display: none; font-family: 'Courier New', ui-monospace, monospace; color: #000; background: #FFF; text-align: center; line-height: 1.35; }
.ticket.en-pantalla { display: block; width: 240px; margin: 8px auto 0; padding: 16px 12px 18px; font-size: 12px; box-shadow: 0 6px 18px rgba(0,0,0,.12); border-radius: 4px; }
.ticket-muestra { background: var(--fondo); border-radius: 16px; padding: 12px; text-align: center; }
.t-logo { width: 58px; height: 58px; border-radius: 50%; object-fit: cover; filter: grayscale(1) contrast(1.35); }
.t-nombre { font-family: 'Inter Tight', Arial, sans-serif; font-size: 22px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; margin-top: 2px; }
.t-suc { font-size: 11px; }
.t-pedido { margin: 8px 0; padding: 6px 4px; background: #000; color: #FFF; border-radius: 8px; display: flex; flex-direction: column; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.t-pedido span { font-size: 9px; letter-spacing: .25em; }
.t-pedido b { font-family: 'Inter Tight', Arial, sans-serif; font-size: 40px; line-height: 1.05; }
.t-pedido small { font-size: 10px; }
.t-items { display: flex; flex-direction: column; gap: 6px; text-align: left; }
.t-fila { display: flex; justify-content: space-between; gap: 6px; }
.t-salsas { display: flex; flex-wrap: wrap; gap: 2px 8px; padding-left: 10px; font-size: .92em; }
.t-total { display: flex; justify-content: space-between; align-items: baseline; margin: 8px 0 4px; padding: 5px 0; border-top: 2px solid #000; border-bottom: 2px solid #000; font-weight: 700; }
.t-total b { font-size: 18px; }
.t-pago { font-size: .95em; }
.t-deco { margin: 8px 0 2px; letter-spacing: .3em; }
.t-gracias { font-family: 'Inter Tight', Arial, sans-serif; font-weight: 800; font-size: 15px; text-transform: uppercase; }
.t-lema { font-size: .92em; margin-top: 2px; }
.t-qr { display: flex; align-items: center; gap: 8px; margin-top: 8px; padding-top: 8px; border-top: 1px dashed #000; text-align: left; }
.t-qr-img { width: 64px; height: 64px; flex-shrink: 0; }
.t-qr-img svg { width: 100%; height: 100%; display: block; }
.t-qr-txt { font-weight: 700; font-size: .95em; }
.t-legal { margin-top: 8px; font-size: 9px; }

@media print {
  @page { margin: 0; }
  body { background: #FFFFFF; }
  body * { visibility: hidden; }
  .toast, .nav { display: none !important; }
  #area-impresion, #area-impresion * { visibility: visible; }
  #area-impresion { display: block; position: absolute; left: 0; top: 0; padding: 3mm 2.5mm; font-size: 11px; box-shadow: none; }
  #area-impresion.ancho-58 { width: 58mm; }
  #area-impresion.ancho-80 { width: 80mm; font-size: 13px; }
}

/* ======================================================================
   v0.3 · Impacto: degradados de marca, botones con brillo, splash,
   categorías, para llevar, confeti
   ====================================================================== */
:root {
  --grad-morado: linear-gradient(135deg, #7C4DDB 0%, #5B2DB5 45%, #2A1458 100%);
  --grad-noche: linear-gradient(160deg, #3A1F73 0%, #2A1458 55%, #1A0B3B 100%);
  --grad-amarillo: linear-gradient(135deg, #FFE066 0%, #F7C51E 50%, #F59E0B 100%);
  --grad-verde: linear-gradient(160deg, #22A35A 0%, #166534 100%);
  --sombra-morada: 0 10px 24px -6px rgba(91,45,181,.55);
  --sombra-amarilla: 0 10px 24px -6px rgba(245,158,11,.55);
}

/* ---------- Pantalla de carga ---------- */
.splash {
  position: fixed; inset: 0; z-index: 100; background: var(--grad-noche); color: #FFF;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; overflow: hidden;
  transition: opacity .4s ease, transform .4s ease;
}
.splash.fuera { opacity: 0; transform: scale(1.06); pointer-events: none; }
.sp-burbuja { position: absolute; border-radius: 50%; }
.sp-burbuja.s1 { width: 420px; height: 420px; right: -160px; top: -140px; background: radial-gradient(circle at 30% 30%, #7C4DDB, #3A1F73 70%); animation: flota 6s ease-in-out infinite; }
.sp-burbuja.s2 { width: 160px; height: 160px; left: -50px; bottom: 90px; background: var(--grad-amarillo); animation: flota 5s ease-in-out infinite reverse; }
.sp-burbuja.s3 { width: 60px; height: 60px; right: 40px; bottom: 180px; background: #F97316; opacity: .85; animation: flota 4s ease-in-out infinite; }
@keyframes flota { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-16px); } }
.sp-anillo { position: relative; width: 168px; height: 168px; border-radius: 50%; padding: 6px; background: conic-gradient(#F7C51E, #F97316, #7C4DDB, #F7C51E); animation: entra .7s cubic-bezier(.2,1.4,.4,1) both, gira 3s linear infinite .7s; }
.sp-logo { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; border: 5px solid #2A1458; animation: contragira 3s linear infinite .7s; }
@keyframes entra { from { transform: scale(.3) rotate(-30deg); opacity: 0; } to { transform: scale(1) rotate(0); opacity: 1; } }
@keyframes gira { to { transform: rotate(360deg); } }
@keyframes contragira { to { transform: rotate(-360deg); } }
.sp-nombre { position: relative; font-family: 'Inter Tight', sans-serif; font-weight: 800; font-size: 46px; letter-spacing: -.02em; margin-top: 14px; animation: sube-texto .6s ease-out .35s both; }
.sp-lema { position: relative; color: #E4DAF7; font-weight: 600; font-size: 15px; animation: sube-texto .6s ease-out .55s both; }
@keyframes sube-texto { from { transform: translateY(14px); opacity: 0; } to { transform: none; opacity: 1; } }
.sp-barra { position: relative; width: 160px; height: 6px; border-radius: 3px; background: rgba(255,255,255,.18); overflow: hidden; margin-top: 18px; }
.sp-barra i { position: absolute; inset: 0; width: 0; border-radius: 3px; background: var(--grad-amarillo); animation: carga 1.8s ease-in-out forwards; }
@keyframes carga { to { width: 100%; } }

/* ---------- Botones con brillo ---------- */
.btn-principal, .btn-cobrar { background: var(--grad-morado); box-shadow: var(--sombra-morada); position: relative; overflow: hidden; }
.btn-principal:hover:not(:disabled) { background: var(--grad-morado); filter: brightness(1.08); }
.btn-principal::after, .btn-cobrar::after, .btn-amarillo::after {
  content: ''; position: absolute; top: 0; left: -60%; width: 40%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.35), transparent); transform: skewX(-20deg);
}
.btn-cobrar:not(:disabled)::after, .btn-amarillo::after { animation: brillo 3.2s ease-in-out infinite; }
@keyframes brillo { 0%, 60% { left: -60%; } 100% { left: 130%; } }
.btn-principal:active:not(:disabled), .btn-cobrar:active:not(:disabled), .btn-amarillo:active { transform: scale(.98); }
.btn-amarillo { background: var(--grad-amarillo); box-shadow: var(--sombra-amarilla); position: relative; overflow: hidden; color: #2A1458; }
.btn-wa { background: linear-gradient(135deg, #25D366, #128C4A); box-shadow: 0 10px 22px -8px rgba(18,140,74,.6); }
.btn-sec { box-shadow: 0 2px 6px rgba(24,24,27,.06); }
.vacio-pedido .btn-cobrar { background: var(--borde-2); box-shadow: none; }
.btn-cobrar { border-radius: 20px; }

/* ---------- Menús con degradado ---------- */
.inicio, .inicio-hero { background: var(--grad-noche); }
.hero-burbuja.b1 { background: radial-gradient(circle at 30% 30%, #7C4DDB, #3A1F73 70%); }
.hero-burbuja.b2 { background: var(--grad-amarillo); }
.top-venta { background: var(--grad-noche); box-shadow: 0 12px 24px -12px rgba(42,20,88,.6); }
.stat.grande { background: var(--grad-morado); box-shadow: var(--sombra-morada); border: none; }
.nav { box-shadow: 0 -6px 20px rgba(24,24,27,.06); }
.nav a.on { position: relative; }
.nav a.on .ico { background: var(--lila); border-radius: 12px; padding: 4px 14px; width: auto; height: 30px; box-sizing: content-box; margin: -4px 0; }
@media (min-width: 900px) {
  .nav { background: var(--grad-noche); }
  .nav a.on { background: linear-gradient(135deg, rgba(124,77,219,.55), rgba(124,77,219,.15)); }
  .nav a.on .ico { background: none; padding: 0; height: auto; margin: 0; }
}
.acceso { background: linear-gradient(160deg, #FFFFFF, #F7F3FF); box-shadow: 0 4px 12px -6px rgba(91,45,181,.35); border-color: #EDE6FA; }
.acceso .ico { padding: 8px; border-radius: 12px; background: var(--grad-morado); color: #FFF; box-sizing: content-box; }
.listo { background: var(--grad-verde); position: relative; overflow: hidden; }
.hoja { box-shadow: 0 -10px 30px rgba(24,24,27,.18); }
.segmento { background: #ECE7F7; }
.segmento button.on { background: var(--grad-morado); color: #FFF; box-shadow: var(--sombra-morada); }
.chip-monto.activo { background: var(--grad-noche); border-color: transparent; }
.salsa.on { background: linear-gradient(135deg, #F3EDFF, #E4DAF7); }
.salsa.on .s-check { background: var(--grad-morado); }

/* ---------- Categorías ---------- */
.categorias { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 6px; scrollbar-width: none; }
.cat { flex-shrink: 0; display: inline-flex; align-items: center; gap: 8px; min-height: 46px; padding: 0 20px; border-radius: 23px; border: 1px solid var(--borde); background: #FFF; font-weight: 800; font-size: 15px; color: var(--tinta-2); }
.cat.on { background: var(--grad-morado); color: #FFF; border-color: transparent; box-shadow: var(--sombra-morada); }
.cat-n { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--amarillo); color: var(--noche); font-size: 12px; display: inline-flex; align-items: center; justify-content: center; }
.p-tag { position: absolute; top: 12px; left: 12px; padding: 3px 8px; border-radius: 999px; background: rgba(42,20,88,.82); color: #FFF; font-size: 11px; font-weight: 700; }
.insignia { background: var(--grad-amarillo); color: var(--noche); }
.insignia.rebota { animation: rebota .45s cubic-bezier(.2,1.6,.4,1); }
@keyframes rebota { 0% { transform: scale(.4); } 100% { transform: scale(1); } }

/* ---------- Para llevar / Comer aquí ---------- */
.tipo { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: 14px; background: #ECE7F7; }
.tipo button { min-height: 40px; border: none; border-radius: 10px; background: transparent; font-weight: 700; font-size: 14px; color: var(--tinta-2); }
.tipo button.on { background: #FFF; color: var(--morado-osc); box-shadow: 0 2px 6px rgba(91,45,181,.25); }
.tipo-pill { display: inline-block; width: auto !important; padding: 6px 14px; border-radius: 999px; background: var(--grad-amarillo); color: var(--noche); font-weight: 800; font-size: 14px; }
.t-pedido em { font-style: normal; font-weight: 700; font-size: 10px; letter-spacing: .15em; border: 1px solid #FFF; border-radius: 4px; padding: 1px 6px; align-self: center; margin: 2px 0; }

/* ---------- Confeti ---------- */
.confeti { position: absolute; inset: 0; pointer-events: none; overflow: hidden; max-width: none !important; }
.confeti i { position: absolute; top: -20px; width: 10px; height: 16px; border-radius: 3px; animation: cae 2.4s ease-in forwards; }
@keyframes cae { 0% { top: -20px; opacity: 1; } 100% { top: 105%; opacity: .2; transform: rotate(720deg) translateX(30px); } }
.listo > :not(.confeti) { position: relative; }
.check-pop { box-shadow: 0 0 0 12px rgba(255,255,255,.15), 0 0 0 26px rgba(255,255,255,.07); }

@media (prefers-reduced-motion: reduce) {
  .splash *, .confeti i, .btn-cobrar::after, .btn-amarillo::after { animation: none !important; }
  .sp-barra i { width: 100%; }
}
.p-nombre { padding-right: 40px; line-height: 1.2; min-height: 2.4em; display: flex; align-items: center; }

/* ======================================================================
   v0.4 · Botones más sobrios, inicio útil, delivery y entregas
   ====================================================================== */
/* Botones: color sólido de marca, sin destello */
.btn-principal::after, .btn-cobrar::after, .btn-amarillo::after { display: none; }
.btn-principal, .btn-cobrar { background: var(--morado); box-shadow: 0 6px 16px -8px rgba(91,45,181,.6); }
.btn-principal:hover:not(:disabled) { background: var(--morado-osc); filter: none; }
.btn-amarillo { background: var(--amarillo); box-shadow: 0 6px 16px -8px rgba(245,158,11,.6); }
.btn-wa { background: #1F9D55; box-shadow: none; }
.segmento button.on, .cat.on { background: var(--morado); box-shadow: none; }
.chip-monto.activo { background: var(--tinta); }
.btn-principal.chico { min-height: 44px; padding: 0 14px; font-size: 14px; border-radius: 12px; }
.btn-principal.verde { background: #1F7A4D; box-shadow: none; }
.btn-blanco { min-height: 48px; border-radius: 14px; font-size: 15px; }

/* Tipo de pedido: tres opciones */
.tipo.tres { grid-template-columns: repeat(3, 1fr); }

/* Hoja de delivery */
.frecuente { display: flex; align-items: center; gap: 8px; margin: 0; padding: 10px 12px; border-radius: 12px; background: var(--verde-claro); color: var(--verde-tinta); font-size: 14px; font-weight: 600; }
.fila-envio { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-weight: 700; font-size: 15px; }
.fila-envio input { width: 56px; text-align: center; font-weight: 800; font-size: 16px; border: none; background: transparent; }
.aviso-campo { margin: 0; min-height: 18px; color: var(--rojo); font-size: 13px; font-weight: 600; }
.resumen-entrega { padding: 12px 14px; border-radius: 14px; background: var(--lila-2); font-size: 14px; display: flex; flex-wrap: wrap; gap: 4px 6px; }
.resumen-entrega span { margin-left: auto; font-weight: 700; color: var(--morado-osc); }

/* Inicio: entregas y últimas ventas */
.aviso-entregas { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 18px; background: #FFF7E0; border: 1px solid #F7E2A1; color: var(--tinta); text-decoration: none; }
.ae-n { min-width: 40px; height: 40px; border-radius: 12px; background: var(--amarillo); color: var(--noche); font-family: 'Inter Tight', sans-serif; font-weight: 800; font-size: 20px; display: flex; align-items: center; justify-content: center; }
.aviso-entregas > span:nth-child(2) { flex-grow: 1; display: flex; flex-direction: column; min-width: 0; }
.aviso-entregas small { color: var(--gris); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ae-ir { color: var(--morado); font-weight: 800; }
.ultimas { background: #FFF; border: 1px solid var(--borde); border-radius: 20px; padding: 14px 14px 6px; }
.ult-cab { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 4px; }
.ult-cab a { font-weight: 700; font-size: 14px; }
.ultimas ul { list-style: none; margin: 0; padding: 0; }
.ultimas li a { display: flex; align-items: center; gap: 12px; padding: 10px 2px; border-top: 1px solid var(--borde); color: var(--tinta); text-decoration: none; }
.ultimas li:first-child a { border-top: none; }
.u-num { width: 40px; height: 40px; flex-shrink: 0; border-radius: 12px; background: var(--lila); color: var(--morado-osc); font-weight: 800; font-size: 13px; display: flex; align-items: center; justify-content: center; }
.u-txt { flex-grow: 1; min-width: 0; display: flex; flex-direction: column; }
.u-txt b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.u-txt small, .u-total small { color: var(--gris); font-size: 12px; }
.u-total { display: flex; flex-direction: column; align-items: flex-end; font-weight: 800; font-size: 15px; }
.u-total .metodo.qr { color: #1E3A8A; }

/* Pantalla final: delivery */
.delivery-listo { background: rgba(255,255,255,.14); border-radius: 20px; padding: 14px; display: flex; flex-direction: column; gap: 10px; text-align: left; font-size: 14px; }
.delivery-listo a:not(.btn-blanco) { color: #FFF; font-weight: 700; }
.delivery-listo .btn-blanco { min-height: 46px; font-size: 14px; }

/* Entregas */
.entrega { background: #FFF; border: 1px solid var(--borde); border-left: 5px solid var(--amarillo); border-radius: 18px; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.entrega.camino { border-left-color: var(--morado); }
.entrega.ok { border-left-color: #1F7A4D; opacity: .8; }
.en-cab { display: flex; align-items: center; gap: 10px; }
.en-num { font-family: 'Inter Tight', sans-serif; font-weight: 800; font-size: 20px; }
.en-cliente { flex-grow: 1; min-width: 0; display: flex; flex-direction: column; }
.en-cliente .sub { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.en-estado { padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 800; background: #FEF3C7; color: var(--ambar-tinta); white-space: nowrap; }
.entrega.camino .en-estado { background: var(--lila); color: var(--morado-osc); }
.entrega.ok .en-estado { background: var(--verde-claro); color: var(--verde-tinta); }
.en-dir { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; background: var(--fondo); color: var(--tinta); text-decoration: none; font-size: 14px; }
.en-dir span:nth-child(2) { flex-grow: 1; }
.en-dir small { color: var(--gris); }
.en-mapa { color: var(--morado); font-weight: 800; font-size: 13px; }
.en-pie { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.en-total { font-weight: 700; font-size: 14px; }
.vacio-bonito { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 40px 20px; text-align: center; color: var(--gris); background: #FFF; border: 1px dashed var(--borde-2); border-radius: 20px; }
.vacio-bonito .ico { color: #1F7A4D; }

/* Ticket: datos de entrega */
.t-entrega { margin-top: 8px; padding: 6px; border: 2px solid #000; border-radius: 6px; display: flex; flex-direction: column; text-align: left; }

/* ======================================================================
   v0.5 · Contraste, línea de tiempo del delivery, impresión exacta
   ====================================================================== */
:root { --gris: #4F4A45; --borde: #E2DDD8; --borde-2: #C9C3BD; }
.sp-barra i { animation-duration: 3.3s; }

/* Contraste: textos y bordes más firmes */
body { color: #141416; }
.sub, .top-sub, .kpi span, .stat span, .stat small, .u-txt small, .u-total small, .p-precio + *, .l-texto span { color: var(--gris); }
.tarjeta, .kpi, .stat, .item-lista, .producto, .ultimas, .entrega, .corte, .ticket-opciones { border-color: var(--borde); box-shadow: 0 1px 2px rgba(20,20,22,.04), 0 4px 14px -8px rgba(20,20,22,.12); }
.producto .p-nombre { color: #141416; }
.salsa { border-color: var(--borde-2); }
.salsa .s-check { border-color: #A8A29E; }
.nav a { color: #4F4A45; }
.segmento { background: #E6E0F2; }
.segmento button { color: #3F3A45; }
.tipo { background: #E6E0F2; }
.tipo button { color: #3F3A45; }
.cat { border-color: var(--borde-2); color: #2E2A33; }
.p-tag { background: rgba(26,11,59,.88); }
button:disabled { opacity: 1; }
.btn-principal:disabled, .btn-cobrar:disabled { background: #E7E3DF; color: #6B655F; box-shadow: none; }
.vacio-pedido .btn-cobrar { background: #E7E3DF; color: #6B655F; }
.btn-wa.deshabilitado { opacity: 1; background: #DDE7E1; color: #3F5F4C; }
.listo { background: linear-gradient(160deg, #15803D 0%, #14532D 100%); }
.listo-sub, .cambio-grande span { color: #F0FDF4; }
.hero-saludo, .hero-sub, .sp-lema, .top-venta .top-sub { color: #EDE7FB; }
.estado-caja { background: rgba(255,255,255,.16); }
.input-grande, .campo input, .tel input { color: #141416; }
.campo input::placeholder, .tel input::placeholder { color: #8A847E; }
.chip-salsa.off { color: #6B655F; }
.toast { background: #141416; box-shadow: 0 8px 24px rgba(0,0,0,.25); }

/* Línea de tiempo del delivery */
.linea-tiempo { display: flex; flex-direction: column; gap: 6px; }
.linea-tiempo ol { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); position: relative; }
.linea-tiempo ol::before { content: ''; position: absolute; top: 9px; left: 16.6%; right: 16.6%; height: 4px; border-radius: 2px; background: #E2DDD8; }
.linea-tiempo li { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; }
.linea-tiempo li + li::before { content: ''; position: absolute; top: 9px; right: 50%; width: 100%; height: 4px; background: transparent; z-index: 0; }
.linea-tiempo li.hecho + li.hecho::before { background: var(--morado); }
.lt-punto { position: relative; z-index: 1; width: 22px; height: 22px; border-radius: 50%; background: #FFF; border: 4px solid #C9C3BD; box-sizing: border-box; }
.linea-tiempo li.hecho .lt-punto { border-color: var(--morado); background: var(--morado); box-shadow: inset 0 0 0 3px #FFF; }
.linea-tiempo li.actual .lt-punto { animation: latido 1.6s ease-out infinite; }
@keyframes latido { 0% { box-shadow: inset 0 0 0 3px #FFF, 0 0 0 0 rgba(91,45,181,.55); } 70% { box-shadow: inset 0 0 0 3px #FFF, 0 0 0 10px rgba(91,45,181,0); } 100% { box-shadow: inset 0 0 0 3px #FFF, 0 0 0 0 rgba(91,45,181,0); } }
.lt-nombre { font-size: 12px; font-weight: 700; color: #3F3A45; }
.linea-tiempo li.hecho .lt-nombre { color: #141416; }
.lt-hora { font-size: 12px; color: var(--gris); font-variant-numeric: tabular-nums; }
.lt-resumen { margin: 0; text-align: center; font-size: 13px; font-weight: 700; color: var(--morado-osc); }
.lt-resumen.tarde { color: #9A3412; }
.entrega.ok .lt-resumen { color: #14532D; }
.delivery-listo .linea-tiempo { background: #FFF; border-radius: 14px; padding: 12px 8px 10px; color: #141416; }

/* Ticket: montos alineados en columna */
.ticket { font-variant-numeric: tabular-nums; }
.t-fila > :last-child, .t-total b { text-align: right; white-space: nowrap; min-width: 9ch; }
.t-fila > :first-child { flex: 1 1 auto; min-width: 0; }
.ticket.en-pantalla { width: 220px; }

/* Impresión: solo el ticket, al ancho y largo exactos del papel */
#print-root { position: fixed; left: -10000px; top: 0; }
#print-root .ticket { display: block; margin: 0 auto; padding: 3mm 2.5mm 4mm; box-sizing: border-box; font-size: 11px; }
#print-root .ancho-58 { width: 58mm; }
#print-root .ancho-80 { width: 80mm; font-size: 13px; }
@media print {
  body.imprimiendo > :not(#print-root) { display: none !important; }
  body.imprimiendo, body.imprimiendo #print-root, body.imprimiendo #print-root * { visibility: visible !important; }
  body.imprimiendo { margin: 0; background: #FFF; }
  body.imprimiendo #print-root { position: static; left: auto; display: block; width: 100%; }
  body.imprimiendo #print-root .ticket { box-shadow: none; border-radius: 0; }
}
