/* Food Flow · sistema visual blanco y plata (METIS Labs).
   Marca: azul #0B2D6B · naranja #E86A00 · amarillo #FFC107. Fondo gris plata muy claro, tarjetas blancas
   con profundidad sutil. El naranja de los botones es más oscuro (#C2410C) para que el texto blanco se lea. */
:root {
  --azul: #0B2D6B; --naranja: #E86A00; --naranja-boton: #C2410C; --amarillo: #FFC107;
  --fondo: #F5F6F8; --blanco: #FFFFFF; --plata: #E6E9EF; --plata-2: #D5DAE3; --suave: #F1F3F7;
  --texto-2: #4A5578; --verde: #187A42; --rojo: #C62828; --mostaza-texto: #8A5A00;
  --sombra: 0 1px 2px rgba(11, 45, 107, .06), 0 4px 14px rgba(11, 45, 107, .07);
  --radio: 18px;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--fondo); color: var(--azul);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
body { max-width: 480px; margin: 0 auto; min-height: 100dvh; padding-bottom: env(safe-area-inset-bottom); }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { opacity: .45; cursor: default; }

/* ── Encabezado ───────────────────────────────────────────────── */
.marca { display: flex; align-items: center; gap: 10px; padding: 12px 16px 10px; background: var(--blanco);
  border-bottom: 1px solid var(--plata); position: sticky; top: 0; z-index: 5; }
.marca img { filter: drop-shadow(0 1px 2px rgba(11, 45, 107, .15)); }
.marca-texto { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.marca-nombre { font-size: 21px; font-weight: 800; font-style: italic; line-height: 1; letter-spacing: -.01em; }
.food { color: var(--azul); } .flow { color: var(--naranja); }
.marca-lema { font-size: 11px; font-weight: 600; font-style: italic; color: var(--texto-2); }
.estado-cab { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.insignia, .red { font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
.insignia.abierta { background: #DDF3E6; color: #145C34; }
.insignia.cerrada { background: #FFF1C2; color: #7A5600; }
.insignia.no_abrio { background: #FDE2E0; color: #A12020; }
.red { display: inline-flex; align-items: center; gap: 5px; background: var(--suave); color: var(--texto-2); }
.red::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.red.ok { background: #E3F4EA; color: #145C34; }
.red.sin { background: #FFF1C2; color: #7A5600; }
.aviso-red { margin: 10px 16px 0; padding: 9px 12px; border-radius: 12px; background: #FFF1C2; color: #7A5600;
  font-size: 14px; font-weight: 600; }

/* ── Base ─────────────────────────────────────────────────────── */
main { padding: 14px 16px 28px; display: flex; flex-direction: column; gap: 14px; }
h1 { margin: 2px 0 0; font-size: 26px; font-weight: 800; line-height: 1.15; letter-spacing: -.01em; }
h2 { margin: 0; font-size: 17px; font-weight: 800; }
p { margin: 0; }
.sub { color: var(--texto-2); font-size: 15px; }
.chico { color: var(--texto-2); font-size: 13px; }
.tarjeta { background: var(--blanco); border: 1px solid var(--plata); border-radius: var(--radio); padding: 14px 16px;
  display: flex; flex-direction: column; gap: 10px; box-shadow: var(--sombra); }
.fila { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.grande { font-size: 26px; font-weight: 800; letter-spacing: -.01em; }
.verde { color: var(--verde); } .rojo { color: var(--rojo); } .mostaza { color: var(--mostaza-texto); }
hr { border: none; border-top: 1px solid var(--plata); margin: 2px 0; width: 100%; }

label { font-size: 15px; font-weight: 600; display: flex; flex-direction: column; gap: 6px; }
input[type=text], input[type=password], input[type=number], input[type=time], input[inputmode] {
  min-height: 52px; border-radius: 14px; border: 1px solid var(--plata-2); background: var(--blanco);
  padding: 0 14px; font-size: 18px; width: 100%; box-shadow: inset 0 1px 2px rgba(11, 45, 107, .04); }
input:focus-visible, button:focus-visible { outline: 3px solid var(--naranja); outline-offset: 2px; }

/* ── Botones ──────────────────────────────────────────────────── */
.btn { min-height: 56px; border-radius: 16px; border: none; font-size: 18px; font-weight: 800; padding: 0 16px; }
.btn-principal { background: var(--azul); color: #FFFFFF; box-shadow: 0 2px 8px rgba(11, 45, 107, .25); }
.btn-verde, .btn-amarillo { background: var(--naranja-boton); color: #FFFFFF; box-shadow: 0 3px 10px rgba(194, 65, 12, .3); }
.btn-verde { min-height: 64px; font-size: 20px; }
.btn-borde { background: var(--blanco); border: 1px solid var(--plata-2); color: var(--azul); font-weight: 700; }
.btn-texto { background: transparent; border: none; color: var(--texto-2); font-weight: 700; min-height: 44px; }
.btn-peligro { background: var(--blanco); border: 1px solid #F3B5B5; color: var(--rojo); font-weight: 700; }
.dos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.tres { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.chip { min-height: 48px; border-radius: 12px; border: 1px solid var(--plata-2); background: var(--blanco);
  font-size: 15px; font-weight: 700; padding: 4px; }
.chip[aria-pressed=true] { background: var(--amarillo); border-color: var(--amarillo); color: var(--azul); }

/* ── Barra de tiempo ──────────────────────────────────────────── */
.tiempo { border: 1px solid var(--plata); background: var(--blanco); border-radius: 14px; padding: 10px 12px;
  display: flex; flex-direction: column; gap: 7px; box-shadow: var(--sombra); }
.barra { height: 8px; border-radius: 4px; background: var(--suave); overflow: hidden; }
.barra > div { height: 8px; border-radius: 4px; }

/* ── Botones de producto: un toque = una venta ────────────────── */
.productos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.prod { --c: #FFC107; min-height: 152px; border-radius: 22px; padding: 12px 10px;
  background: #FFFFFF; background: color-mix(in srgb, var(--c) 16%, #FFFFFF);
  border: 2px solid var(--c); border: 2px solid color-mix(in srgb, var(--c) 60%, #FFFFFF);
  color: var(--azul); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  touch-action: manipulation; transition: transform .08s; box-shadow: var(--sombra);
  user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.prod:active { transform: scale(.97); }
.prod .ico { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
  font-size: 18px; font-weight: 800; box-shadow: 0 2px 6px rgba(11, 45, 107, .18); }
.prod .n { font-size: 17px; font-weight: 800; text-align: center; line-height: 1.15; }
.prod .mas { font-size: 34px; font-weight: 800; line-height: 1; }
.prod .c { font-size: 14px; font-weight: 700; background: var(--blanco); border-radius: 999px; padding: 3px 10px;
  border: 1px solid var(--plata); }

/* ── Avisos ───────────────────────────────────────────────────── */
.aviso { border-radius: 16px; padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; font-weight: 600; }
.aviso.rojo-fondo { background: var(--rojo); color: #FFFFFF; }
.aviso.info { background: #E8EEF8; color: var(--azul); border: 1px solid #CBD7EC; }
.aviso.atencion { background: #FFF6D6; color: #6E4A00; border: 1px solid #F4DE95; }

.stepper { display: flex; align-items: center; gap: 14px; }
.stepper button { width: 56px; height: 56px; border-radius: 14px; border: 1px solid var(--plata-2);
  background: var(--blanco); font-size: 26px; font-weight: 700; box-shadow: var(--sombra); }
.stepper span { font-size: 30px; font-weight: 800; min-width: 40px; text-align: center; }

.producto-fila { display: grid; grid-template-columns: minmax(0, 1fr) 110px 44px; gap: 8px; align-items: end; }
.quitar { width: 44px; height: 52px; border-radius: 12px; border: 1px solid var(--plata-2); background: var(--blanco);
  font-size: 20px; font-weight: 700; }
.error { color: var(--rojo); font-weight: 700; font-size: 15px; }
.lista { display: flex; flex-direction: column; gap: 6px; font-size: 15px; }

/* ── Cierre ───────────────────────────────────────────────────── */
.renglon { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 9px 0;
  border-bottom: 1px solid var(--plata); font-size: 15px; }
.renglon:last-child { border-bottom: none; }
.renglon span { color: var(--texto-2); }
.total { background: #FFF6D6; border-radius: 12px; padding: 10px 12px; display: flex; justify-content: space-between;
  font-weight: 800; font-size: 16px; }

/* ── Productos (tabla) ────────────────────────────────────────── */
.tabla { display: flex; flex-direction: column; }
.tabla .cab, .tabla .renglon-p { display: grid; grid-template-columns: minmax(0, 1fr) 62px 62px 46px 52px; gap: 6px;
  align-items: center; }
.tabla .cab { font-size: 12px; font-weight: 700; color: var(--texto-2); padding: 0 0 8px; border-bottom: 1px solid var(--plata); }
.tabla .renglon-p { padding: 10px 0; border-bottom: 1px solid var(--plata); font-size: 14px; }
.tabla .renglon-p:last-child { border-bottom: none; }
.tabla .nombre { background: none; border: none; padding: 0; text-align: left; font-weight: 700; color: var(--azul);
  display: flex; align-items: center; gap: 8px; min-height: 40px; min-width: 0; font-size: 14px; overflow-wrap: anywhere;
  hyphens: auto; }
.tabla .punto { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; }
.tabla .der { text-align: right; }
.tabla .pausado { opacity: .5; }
.interruptor { width: 48px; height: 28px; border-radius: 999px; border: none; background: var(--plata-2); position: relative;
  justify-self: end; }
.interruptor::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%;
  background: #FFFFFF; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: left .15s; }
.interruptor[aria-checked=true] { background: var(--verde); }
.interruptor[aria-checked=true]::after { left: 23px; }
.edicion { background: var(--suave); border-radius: 14px; padding: 12px; display: flex; flex-direction: column; gap: 10px; }

/* ── Menú de medio de pago (mantener apretado) ────────────────── */
.velo { position: fixed; inset: 0; background: rgba(11, 45, 107, .35); z-index: 10; }
.hoja { position: fixed; left: 50%; bottom: 0; transform: translateX(-50%); width: 100%; max-width: 480px; z-index: 11;
  background: var(--blanco); border-radius: 22px 22px 0 0; padding: 18px 16px calc(18px + env(safe-area-inset-bottom));
  display: flex; flex-direction: column; gap: 12px; box-shadow: 0 -8px 30px rgba(11, 45, 107, .2); }
.hoja .btn-borde { min-height: 64px; font-size: 15px; padding: 0 6px; }

.rech { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 6px; align-items: center; font-size: 14px; }
.rech .chip { min-height: 40px; padding: 0 8px; }

/* ── Calendario ───────────────────────────────────────────────── */
.cal-cab { align-items: center; }
.cal-cab .chip { width: 48px; font-size: 22px; }
.cal-sem, .cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 5px; }
.cal-sem span { text-align: center; font-size: 12px; font-weight: 700; color: var(--texto-2); }
.dia { aspect-ratio: 1 / 1.1; border-radius: 10px; border: 1px solid var(--plata); background: var(--blanco);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; padding: 2px; }
.dia .num { font-size: 15px; font-weight: 700; }
.dia .monto { font-size: 10px; font-weight: 700; }
.dia.cerrada, .dia.abierta, .leyenda i.cerrada { background: #CDEFD9; border-color: #8FD3A8; }
.dia.no_abrio, .leyenda i.no_abrio { background: #FFF3C4; border-color: #F2D77A; }
.dia.sin_cerrar, .leyenda i.sin_cerrar { background: #FFE0C2; border-color: #F5B27A; }
.dia.futuro { opacity: .45; }
.dia.hoy { outline: 3px solid var(--azul); outline-offset: -1px; }
.dia.sel { box-shadow: 0 0 0 3px var(--naranja); }
.leyenda { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; color: var(--texto-2); }
.leyenda span { display: inline-flex; align-items: center; gap: 6px; }
.leyenda i { width: 14px; height: 14px; border-radius: 4px; border: 1px solid var(--plata-2); background: var(--blanco); display: inline-block; }

/* Dona de medios de pago del mes */
.medios { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 14px; align-items: center; }
.dona { width: 120px; height: 120px; border-radius: 50%; position: relative; }
.dona span { position: absolute; inset: 20px; border-radius: 50%; background: var(--blanco); display: grid;
  place-items: center; font-size: 12px; font-weight: 800; text-align: center; line-height: 1.15; padding: 4px; }
.dona small { font-weight: 600; color: var(--texto-2); }
.medio { display: grid; grid-template-columns: 12px minmax(0, 1fr) auto; gap: 8px; align-items: center; font-size: 14px;
  padding: 4px 0; }
.medio i { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }
.medio strong { white-space: nowrap; }

/* ── Análisis ─────────────────────────────────────────────────── */
.tag { font-size: 11px; font-weight: 800; letter-spacing: .02em; padding: 3px 8px; border-radius: 999px; white-space: nowrap; }
.tag.real { background: #E3F4EA; color: #145C34; }
.tag.calculado { background: #E8EEF8; color: var(--azul); }
.tag.estimado { background: #FFF1C2; color: #7A5600; }
.tag.historial { background: #EFE7FB; color: #4B2A86; }
.barras { display: flex; align-items: flex-end; gap: 6px; height: 110px; }
.barra-h { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 4px; }
.barra-h > div { width: 100%; background: var(--azul); border-radius: 6px 6px 2px 2px; min-height: 3px; }
.barra-h .n, .barra-h .h { font-size: 11px; font-weight: 700; color: var(--texto-2); }
.rot { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 4px 8px; align-items: center; padding: 6px 0;
  border-bottom: 1px solid var(--plata); }
.rot:last-child { border-bottom: none; }
.rot .pos { width: 22px; height: 22px; border-radius: 50%; background: var(--amarillo); color: var(--azul); font-size: 12px;
  font-weight: 800; display: grid; place-items: center; }
.rot .part { grid-column: 2 / 3; height: 6px; background: var(--suave); border-radius: 3px; overflow: hidden; }
.rot .part > div { height: 6px; background: var(--naranja); border-radius: 3px; }
.rot .chico { grid-column: 3 / 4; text-align: right; }
#barra { cursor: pointer; }

/* ── ¿Cuánto calentar? ────────────────────────────────────────── */
.calentar-aviso { background: #FFF1E6; border: 1px solid #F5B27A; color: var(--azul); }
.calentar-aviso strong { color: #8A3A00; }
.cal-sug { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 15px; font-weight: 700; }
.cal-sug.sin { font-weight: 500; color: var(--texto-2); }
.conf { font-size: 11px; font-weight: 800; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.conf.alta { background: #E3F4EA; color: #145C34; }
.conf.media { background: #FFF1C2; color: #7A5600; }

/* ── Cierre guiado (1C) ───────────────────────────────────────── */
.g-barra { height: 6px; border-radius: 999px; background: var(--plata); overflow: hidden; }
.g-barra i { display: block; height: 100%; background: var(--naranja); border-radius: 999px; transition: width .2s; }
.g-pregunta { gap: 14px; }
.g-q { font-size: 22px; font-weight: 800; color: var(--azul); line-height: 1.25; margin: 0; }
.g-centro { display: flex; justify-content: center; }
.g-stepper span { font-size: 44px; min-width: 70px; }
.g-stepper button { width: 64px; height: 64px; font-size: 30px; }
.g-linea .g-stepper span, .g-medios .g-stepper span { font-size: 24px; min-width: 34px; }
.g-linea .g-stepper button, .g-medios .g-stepper button { width: 44px; height: 44px; font-size: 22px; }
.g-linea .g-stepper, .g-medios .g-stepper { gap: 8px; }
.g-escribir { font-size: 13px; color: var(--texto-2); }
.g-monto { font-size: 28px; font-weight: 800; text-align: center; }
.g-medios-cab, .g-medios { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; align-items: center; }
.g-medios-cab span { font-size: 12px; font-weight: 700; color: var(--texto-2); text-align: center; }
.g-medios + .g-medios { border-top: 1px solid var(--plata); padding-top: 8px; }
.g-medios > span:first-child { font-weight: 700; font-size: 14px; }
.g-fiado { background: var(--suave); border-radius: 12px; padding: 8px 10px; }
.bal { display: flex; flex-direction: column; gap: 6px; }
.bal .fila strong.verde { font-size: 18px; }
.aviso.caja-pend { background: #FFF1E6; border: 1px solid #F5B27A; color: #8A3A00; }
.aviso.caja-pend input { margin-top: 6px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.dia.caja_pendiente { box-shadow: inset 0 0 0 3px #F59E0B; }
.leyenda i.caja_pendiente { background: transparent; box-shadow: inset 0 0 0 2px #F59E0B; }
.g-prod { display: block; font-size: 15px; font-weight: 800; color: var(--naranja-boton); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 4px; }
