:root {
  --fondo: #F7F3EC;
  --tarjeta: #FFFFFF;
  --tinta: #1D1B18;
  --suave: #6B655C;
  --linea: #E3DCCF;
  --verde: #1F3D2B;
  --verde-claro: #E3EEE6;
  --rojo: #B5362A;
  --rojo-claro: #F8E1DD;
  --ambar: #9A6A00;
  --ambar-claro: #FBF0D4;
  --azul: #1F4E9A;
  --radio: 12px;
  --toque: 48px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; background: var(--fondo); color: var(--tinta);
  font: 16px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; -webkit-text-size-adjust: 100%; }
body { padding-bottom: env(safe-area-inset-bottom); }

/* ---- encabezado ---- */
.top { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 8px;
  background: var(--verde); color: #fff; padding: calc(10px + env(safe-area-inset-top)) 12px 10px; }
.top h1 { flex: 1; margin: 0; font-size: 19px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.icon-btn { width: 40px; height: 40px; border: 0; border-radius: 10px; background: rgba(255,255,255,.12);
  color: #fff; font-size: 24px; line-height: 1; cursor: pointer; }

main { max-width: 860px; margin: 0 auto; padding: 14px 14px 90px; }
.cargando { color: var(--suave); text-align: center; padding: 40px 0; }

h2 { font-size: 21px; font-weight: 800; margin: 28px 0 10px; padding-bottom: 6px; border-bottom: 3px solid var(--verde); color: var(--verde); letter-spacing: -.2px; }
.tarjeta h2 { border-bottom: none; padding-bottom: 0; margin-top: 4px; }
h3 { font-size: 16px; font-weight: 800; margin: 16px 0 8px; color: var(--verde); text-transform: uppercase; letter-spacing: .04em; }
p { margin: 6px 0; }
.suave { color: var(--suave); font-size: 14px; }
.chico { font-size: 13px; }

/* ---- inicio ---- */
.saludo { margin: 4px 0 14px; }
.mosaico { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.mosaico a { display: flex; flex-direction: column; gap: 4px; min-height: 96px; padding: 14px;
  background: var(--tarjeta); border: 1px solid var(--linea); border-radius: var(--radio);
  color: var(--tinta); text-decoration: none; }
.mosaico a b { font-size: 16px; }
.mosaico a span { font-size: 13px; color: var(--suave); }
.mosaico a .ico { font-size: 22px; }
.mosaico a .badge { color: #fff; }
.mosaico a.destacado { background: var(--verde); color: #fff; border-color: var(--verde); }
.mosaico a.destacado span { color: #DDE8E0; }
.mosaico a.pedir .ico { font-size: 40px; line-height: 1.1; }
.mosaico a.pedir b { font-size: 18px; letter-spacing: .03em; }
.mosaico a.reposicion { background: #2F4E6B; color: #fff; border-color: #2F4E6B; }
.mosaico a.reposicion span { color: #D6E2EE; }
.mosaico a.reposicion .badge { color: #fff; }
.mosaico a.produccion { background: #9A4A24; color: #fff; border-color: #9A4A24; }
.mosaico a.produccion span { color: #F3DCCF; }
.badge { display: inline-block; min-width: 22px; padding: 1px 7px; border-radius: 99px; background: var(--rojo);
  color: #fff; font-size: 12px; font-weight: 700; text-align: center; }

/* ---- tarjetas y listas ---- */
.tarjeta { background: var(--tarjeta); border: 1px solid var(--linea); border-radius: var(--radio); padding: 12px; margin: 10px 0; }
.tarjeta > h2:first-child, .tarjeta > h3:first-child { margin-top: 0; }
.fila { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--linea); }
.fila:last-child { border-bottom: 0; }
.fila .nombre { flex: 1; min-width: 0; }
.fila .nombre b { font-weight: 600; display: block; overflow-wrap: anywhere; }
.fila .nombre small { color: var(--suave); font-size: 13px; }
.fila.nuevo { background: var(--ambar-claro); margin: 0 -12px; padding-left: 12px; padding-right: 12px; }
.fila.bajo .stock { color: var(--rojo); font-weight: 700; }
.etiqueta { display: inline-block; padding: 1px 7px; border-radius: 6px; font-size: 12px; font-weight: 700; vertical-align: 1px; }
.etiqueta.nuevo { background: var(--ambar); color: #fff; }
.etiqueta.rojo { background: var(--rojo-claro); color: var(--rojo); }
.etiqueta.verde { background: var(--verde-claro); color: var(--verde); }
.etiqueta.gris { background: #EEE9E0; color: var(--suave); }
.vacio { text-align: center; color: var(--suave); padding: 22px 8px; }

/* ---- formularios ---- */
label { display: block; font-size: 14px; color: var(--suave); margin: 10px 0 4px; }
input, select, textarea { width: 100%; min-height: var(--toque); padding: 10px 12px; font: inherit; color: inherit;
  background: #fff; border: 1px solid #CFC6B6; border-radius: 10px; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--verde); outline-offset: 1px; }
input[type=checkbox] { width: 22px; height: 22px; min-height: 0; accent-color: var(--verde); }
.check { display: flex; align-items: center; gap: 8px; color: var(--tinta); font-size: 15px; margin: 8px 0; }
.dos { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.buscar { position: sticky; top: 64px; z-index: 5; background: var(--fondo); padding: 6px 0 8px; }

button, .boton { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: var(--toque);
  padding: 10px 16px; font: inherit; font-weight: 600; border-radius: 10px; border: 1px solid var(--verde);
  background: var(--verde); color: #fff; cursor: pointer; text-decoration: none; }
button.sec, .boton.sec { background: #fff; color: var(--verde); }
button.peligro { background: #fff; color: var(--rojo); border-color: var(--rojo); }
button.mini { min-height: 36px; padding: 6px 10px; font-size: 14px; }
button.whats { background: #1E8E4E; border-color: #1E8E4E; }
button:disabled { opacity: .5; cursor: default; }
.acciones { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.acciones.fijas { position: fixed; left: 0; right: 0; bottom: 0; z-index: 9; margin: 0; padding: 10px 14px calc(66px + env(safe-area-inset-bottom));
  background: rgba(247,243,236,.96); border-top: 1px solid var(--linea); justify-content: center; }
.acciones.fijas button { flex: 1; max-width: 420px; }

/* ---- contador ---- */
.contador { display: flex; align-items: center; gap: 4px; }
.contador button { width: 44px; min-height: 44px; padding: 0; font-size: 22px; background: #fff; color: var(--verde); }
.contador input { width: 64px; min-height: 44px; padding: 6px 4px; text-align: center; font-weight: 700; }
.contador input.con-valor { background: var(--verde-claro); border-color: var(--verde); }
input.cant { width: 82px; text-align: center; font-weight: 700; padding: 6px; min-height: 44px; }

/* ---- chips ---- */
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 8px; }
.chips button { flex: none; min-height: 40px; background: #fff; color: var(--tinta); border-color: var(--linea); font-weight: 600; }
.chips button.activo { background: var(--verde); color: #fff; border-color: var(--verde); }

/* ---- tablas ---- */
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 7px 6px; border-bottom: 1px solid var(--linea); vertical-align: top; }
th { color: var(--suave); font-weight: 600; font-size: 13px; }
td.num, th.num { text-align: right; white-space: nowrap; }
.total td { font-weight: 700; border-top: 2px solid var(--tinta); }

/* ---- aviso flotante ---- */
.aviso { position: fixed; left: 50%; bottom: calc(84px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 50;
  max-width: calc(100% - 28px); padding: 12px 16px; border-radius: 10px; background: var(--tinta); color: #fff;
  box-shadow: 0 6px 24px rgba(0,0,0,.2); font-size: 15px; }
.aviso.error { background: var(--rojo); }

/* ---- login ---- */
.login { max-width: 380px; margin: 30px auto; }
.login .logo { text-align: center; margin-bottom: 10px; }
.login .logo img { width: 84px; height: 84px; border-radius: 18px; }

/* ---- entrada ---- */
.renglon { border: 1px solid var(--linea); border-radius: 10px; padding: 10px; margin: 8px 0; background: #fff; }
.renglon.sin-producto { border-color: var(--ambar); background: var(--ambar-claro); }
.renglon.fuera { background: #F1EEE8; border-style: dashed; }
.renglon .ticket { font-family: ui-monospace, Menlo, monospace; font-size: 13px; color: var(--suave); }
.renglon .grid { display: grid; grid-template-columns: 1fr 180px 120px; gap: 8px; align-items: end; }
/* 25/10: la cantidad no se veía (quedaba aplastada junto al selector pza/caja) */
.renglon .grid input[data-campo="cantidad"] { min-width: 70px; flex: 1; font-size: 18px; text-align: center; }
.renglon .pzcaja { display: flex; gap: 4px; margin-top: 4px; }
.renglon .pzcaja button { flex: 1; padding: 8px 4px; font-size: 15px; font-weight: 700; background: #fff; color: var(--verde, #1F3A2E); border: 2px solid var(--linea, #ccc); border-radius: 8px; min-height: 40px; }
.renglon .pzcaja button.activo { background: var(--verde, #1F3A2E); color: #fff; border-color: var(--verde, #1F3A2E); }
.vista-ticket { max-width: 100%; max-height: 340px; display: block; margin: 8px auto; border-radius: 8px; border: 1px solid var(--linea); }

@media (max-width: 520px) {
  .renglon .grid { grid-template-columns: 1fr 1fr; }
  .renglon .grid > :first-child { grid-column: 1 / -1; }
  .dos { grid-template-columns: 1fr; }
}

/* ---- buscador de productos ---- */
.buscador { position: relative; flex: 1; }
.sugerencias { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 30; max-height: 300px; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; touch-action: pan-y;
  background: #fff; border: 1px solid #CFC6B6; border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.15); }
.sugerencias button { display: block; width: 100%; min-height: 48px; text-align: left; padding: 8px 12px; border: 0; border-bottom: 1px solid var(--linea);
  border-radius: 0; background: #fff; color: var(--tinta); font-weight: 400; }
.sugerencias button:active, .sugerencias button:hover { background: var(--verde-claro); }
.sugerencias button b { display: block; font-weight: 600; }
.sugerencias button small { color: var(--suave); font-size: 12px; }
.sugerencias .sin { padding: 12px; color: var(--suave); }

/* ---- caja / arqueo ---- */
a.fila.enlace { color: inherit; text-decoration: none; }
.boton { text-decoration: none; }
a.boton.peligro { background: #fff; color: var(--rojo); border-color: var(--rojo); }
table.arqueo td { padding: 4px 4px; vertical-align: middle; }
table.arqueo td:first-child { font-weight: 600; white-space: nowrap; }
table.arqueo input { width: 100%; min-width: 70px; text-align: center; font-size: 18px; }
.resultado { border-radius: var(--radio); padding: 18px 16px; margin-bottom: 12px; text-align: center; border: 2px solid; }
.resultado b { display: block; font-size: 28px; }
.resultado span { font-size: 14px; }
.resultado.verde { background: var(--verde-claro); color: var(--verde); }
.resultado.rojo { background: var(--rojo-claro); color: var(--rojo); }
.resultado.ambar { background: var(--ambar-claro); color: var(--ambar); }
.resultado.gris, .resultado.anulado { background: #EEE9E0; color: var(--suave); }
.etiqueta.ambar { background: var(--ambar-claro); color: var(--ambar); }

/* ---- dictado en pedidos ---- */
#barra-voz { position: sticky; top: 64px; z-index: 8; max-width: 860px; margin: 0 auto; padding: 8px 14px; background: var(--fondo); border-bottom: 1px solid var(--linea); }
#sel-prov { width: 100%; margin-bottom: 6px; font-size: 16px; font-weight: 600; }
.barra-dictado { display: flex; align-items: center; gap: 8px; }
.barra-dictado .rec { font-weight: 700; color: var(--rojo); min-width: 64px; }
.fila.dictado { background: var(--verde-claro); margin: 0 -12px; padding-left: 12px; padding-right: 12px; }
.fila.dictado.dudoso { background: var(--ambar-claro); }

/* el cartel de Netlify tapa la parte de abajo: las barras fijas dejan espacio y el contenido también */
main#app, #app { padding-bottom: 80px; }
.grupo-repo { margin: 14px 0 4px; padding: 6px 10px; background: var(--fondo); border-left: 4px solid var(--verde, #1e3a2b); border-radius: 6px; }

/* ---- guía paso a paso ---- */
.guia { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; padding: 0 10px calc(74px + env(safe-area-inset-bottom)); pointer-events: none; }
.guia-caja { pointer-events: auto; max-width: 560px; margin: 0 auto; background: #fff; border: 2px solid var(--verde); border-radius: 14px;
  box-shadow: 0 10px 30px rgba(0,0,0,.25); padding: 12px 14px; animation: guia-sube .25s ease-out; }
@keyframes guia-sube { from { transform: translateY(20px); opacity: 0 } to { transform: none; opacity: 1 } }
.guia-cab { display: flex; align-items: center; gap: 10px; font-size: 16px; }
.guia-cab b { flex: 1; }
.guia-n { background: var(--verde); color: #fff; border-radius: 999px; padding: 2px 9px; font-size: 12px; font-weight: 700; }
.guia-x { background: none; border: 0; color: var(--suave); font-size: 20px; min-height: 36px; padding: 0 6px; }
.guia-caja p { margin: 8px 0 10px; font-size: 15px; line-height: 1.4; }
.guia-pie { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.guia-resalte { outline: 4px solid var(--rojo) !important; outline-offset: 3px; border-radius: 10px; box-shadow: 0 0 0 9px rgba(181,54,42,.18) !important; transition: outline .2s; }
.aviso-limpieza { background: #FFF6E0; border-color: #E8C979; }

.ico-svg { display: block; filter: drop-shadow(0 1px 1px rgba(0,0,0,.15)); }
.mosaico a.destacado .ico-svg { filter: none; }
.enlace-mini { background: none; border: none; color: var(--verde); text-decoration: underline; padding: 2px 0; font-size: 13px; min-height: 0; width: auto; box-shadow: none; }

.ya-mandado { background: var(--ambar-claro, #FFF6DB); border-radius: 10px; padding: 10px 12px; margin-bottom: 10px; }

/* ===== 11 oct: estilo Trattoria — toques de rojo vino, botones con relieve ===== */
:root { --vino: #6E1F2A; --vino-claro: #F3E3E5; }
/* logo siempre presente en el encabezado */
.logo-top { width: 38px; height: 38px; border-radius: 50%; flex: none; box-shadow: 0 0 0 2px rgba(255,255,255,.35); }
.top { border-bottom: 4px solid var(--vino); }
h2 { border-bottom-color: var(--vino); }
/* mosaico: títulos en MAYÚSCULAS, subtítulo en negrita, íconos más grandes, relieve */
.mosaico a { border: 2px solid var(--vino); border-bottom-width: 5px; border-radius: 16px;
  box-shadow: 0 3px 0 rgba(110,31,42,.18), 0 6px 14px rgba(29,27,24,.10);
  transition: transform .08s, box-shadow .08s, border-bottom-width .08s; }
.mosaico a:active { transform: translateY(3px); border-bottom-width: 2px; box-shadow: 0 1px 0 rgba(110,31,42,.18); }
.mosaico a b { font-size: 15px; text-transform: uppercase; letter-spacing: .04em; font-weight: 800; }
.mosaico a span:not(.ico):not(.badge) { font-weight: 700; }
.mosaico a .ico { font-size: 34px; line-height: 1.1; }
.mosaico a .ico .ico-svg { width: 56px; height: 42px; }
.mosaico a.pedir .ico { font-size: 52px; }
.mosaico a.pedir b { font-size: 19px; }
.mosaico a.destacado { border-color: var(--vino); border-top-color: var(--verde); border-left-color: var(--verde); border-right-color: var(--verde); }
.mosaico a.reposicion { border-color: #1E3550; border-bottom-color: var(--vino); }
.mosaico a.produccion { border-color: #7A3518; border-bottom-color: var(--vino); }
/* todos los botones con borde y relieve */
button, .boton { border-width: 2px; border-bottom-width: 4px; border-bottom-color: rgba(0,0,0,.35);
  box-shadow: 0 2px 6px rgba(29,27,24,.12); transition: transform .08s, border-bottom-width .08s; }
button.sec, .boton.sec { border-color: var(--verde); border-bottom-color: var(--vino); }
button:active:not(:disabled), .boton:active { transform: translateY(2px); border-bottom-width: 2px; }
.chips button { border: 2px solid var(--linea); border-bottom: 4px solid var(--vino); box-shadow: 0 2px 4px rgba(29,27,24,.08); }
.chips button.activo { border-bottom-color: var(--vino); }
.icon-btn { border: 0; border-bottom: 3px solid rgba(0,0,0,.25); box-shadow: none; }
.guia-x { border: 0 !important; box-shadow: none !important; }
/* guía paso a paso con Alessandro */
.guia-caja { border-color: var(--vino); }
.guia-cuerpo { display: flex; gap: 10px; align-items: flex-end; }
.guia-cuerpo p { flex: 1; }
.guia-ale { width: 84px; height: 96px; object-fit: contain; object-position: bottom; flex: none; margin: 4px 0 -2px -4px;
  filter: drop-shadow(0 3px 3px rgba(0,0,0,.18)); animation: guia-entra .25s ease-out; }
@keyframes guia-entra { from { transform: translateY(8px) scale(.92); opacity: 0; } to { transform: none; opacity: 1; } }
/* ver foto en grande */
.foto-grande { position: fixed; inset: 0; z-index: 80; background: rgba(15,12,10,.92); display: flex; align-items: center; justify-content: center; }
.foto-grande img { max-width: 100%; max-height: 100%; object-fit: contain; touch-action: pinch-zoom; }
.foto-grande button { position: fixed; top: calc(12px + env(safe-area-inset-top)); right: 12px; }
img.ampliable { cursor: zoom-in; }
.sugerencias button { border: 0 !important; border-bottom: 1px solid var(--linea) !important; box-shadow: none !important; border-radius: 0; transform: none !important; }
.contador button { border-color: var(--verde); border-bottom-color: var(--vino); }
.top { top: 0; }

/* ===== chat de ayuda ===== */
.chat-fondo { position: fixed; inset: 0; z-index: 70; background: rgba(15,12,10,.45); display: flex; align-items: flex-end; justify-content: center; }
.chat-caja { width: 100%; max-width: 560px; height: min(78vh, 640px); background: var(--fondo); border: 2px solid var(--vino); border-bottom: 0;
  border-radius: 18px 18px 0 0; display: flex; flex-direction: column; box-shadow: 0 -6px 24px rgba(0,0,0,.25); padding-bottom: env(safe-area-inset-bottom); }
.chat-cab { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: var(--verde); color: #fff; border-radius: 16px 16px 0 0; border-bottom: 3px solid var(--vino); }
.chat-cab small { display: block; color: #DDE8E0; font-size: 12px; }
.chat-cab .guia-x { color: #fff; }
.chat-ale { width: 44px; height: 50px; object-fit: contain; object-position: bottom; }
.chat-msgs { flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.chat-m { max-width: 86%; padding: 9px 12px; border-radius: 14px; font-size: 15px; line-height: 1.4; }
.chat-m.bot { background: #fff; border: 1px solid var(--linea); align-self: flex-start; border-bottom-left-radius: 4px; }
.chat-m.bot.sin { border-color: var(--ambar); background: var(--ambar-claro); }
.chat-m.yo { background: var(--verde); color: #fff; align-self: flex-end; border-bottom-right-radius: 4px; }
.chat-m.pensando { color: var(--suave); font-style: italic; }
.chat-pie { display: flex; gap: 8px; padding: 8px 10px 0; }
.chat-pie input { flex: 1; }
.chat-pie button { min-width: 52px; }
.chat-quien { display: flex; gap: 8px; align-items: center; }
.chat-quien select { flex: 1; min-height: 48px; font-size: 16px; }
.icon-btn.btn-chat { width: auto; display: inline-flex; align-items: center; gap: 6px; padding: 0 10px 0 5px; }
.btn-chat img { border-radius: 50%; display: block; flex: none; }
.btn-chat span { font-size: 11px; line-height: 1.15; font-weight: 700; text-align: left; white-space: nowrap; }
@media (max-width: 360px) { .btn-chat span { display: none; } }

/* Pedidos a proveedores: resto de la ficha del proveedor (lo que hoy no hace falta pedir) */
.resto-prov { margin: 10px 0 4px; border-top: 2px dashed var(--linea); padding-top: 8px; }
.resto-prov summary { cursor: pointer; font-weight: 600; color: var(--suave); padding: 6px 0; }
.fila.resto { background: #f1efe9; border-radius: 8px; padding: 8px; margin: 4px 0; border-bottom: 0; }
.fila.resto .nombre b { font-weight: 500; color: #555; }
.fila.resto.elegido { background: #e3f1e5; outline: 2px solid var(--verde); }
.fila.resto.elegido .nombre b { color: inherit; font-weight: 700; }

/* Proveedor ya mandado: una sola línea, se abre tocándola */
.prov-mandado { margin: 10px 0; }
.prov-mandado > summary { list-style: none; cursor: pointer; background: #e3f1e5; border: 2px solid var(--verde); border-radius: 12px; padding: 12px 14px; font-size: 16px; }
.prov-mandado > summary::-webkit-details-marker { display: none; }
.prov-mandado > summary::after { content: "▸"; float: right; }
.prov-mandado[open] > summary::after { content: "▾"; }
.prov-mandado[open] > .tarjeta { margin-top: 6px; }

/* Buscador de proveedores (Pedidos a proveedores) */
.buscar-prov { position: relative; margin-bottom: 8px; }
.buscar-prov input { width: 100%; box-sizing: border-box; }
.res-prov { position: absolute; left: 0; right: 0; top: 100%; z-index: 30; background: #fff; border-radius: 10px; box-shadow: 0 6px 18px rgba(0,0,0,.18); display: flex; flex-direction: column; }
.res-prov:empty { display: none; }
.res-prov button { margin: 4px 6px; text-align: left; }

/* Pedidos a proveedores: cada proveedor es un renglón que se abre */
.prov-fila { margin: 8px 0; }
.prov-fila > summary { list-style: none; cursor: pointer; border-radius: 12px; padding: 14px; font-size: 16px; border: 2px solid var(--linea); background: #fff; }
.prov-fila > summary::-webkit-details-marker { display: none; }
.prov-fila > summary::after { content: "▸"; float: right; font-size: 18px; }
.prov-fila[open] > summary::after { content: "▾"; }
.prov-fila[open] > .tarjeta { margin-top: 6px; }
.prov-fila.p-mandado > summary { background: #e3f1e5; border-color: var(--verde); }
.prov-fila.p-borrador > summary { background: #fff4d6; border-color: #d9a400; }
.prov-fila.p-pedir > summary { background: #fff; border-color: var(--rojo); }
.prov-fila.p-nada > summary { background: #f1efe9; color: #666; }
.etiqueta-pedir { display: inline-block; background: var(--rojo); color: #fff; border-radius: 99px; padding: 1px 9px; font-size: 13px; font-weight: 700; }
.pasos-pedido ol { margin: 6px 0 6px 18px; padding: 0; }
.pasos-pedido li { margin: 3px 0; }

/* Botones de horario: naranja y latiendo hasta que se marca */
.mosaico a.horario { background: #e8590c; border-color: #b8460a; color: #fff; }
.mosaico a.horario span, .mosaico a.horario b { color: #fff; }
.pulsa { animation: pulsa 1.1s ease-in-out infinite; }
@keyframes pulsa {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(232, 89, 12, .7); }
  50% { transform: scale(1.04); box-shadow: 0 0 0 12px rgba(232, 89, 12, 0); }
}
#entrada.pulsa { background: #e8590c !important; }
@media (prefers-reduced-motion: reduce) { .pulsa { animation: none; outline: 4px solid #e8590c; } }
.prov-fila .total-ped { color: #1E3A2B; white-space: nowrap; }
.prov-fila.p-nollego > summary { background: #ffe8cc; border-color: #e07b00; }
.etiqueta-pedir.gris { background: #9a948a; }
/* Cuadre de masa */
.chips.personas { flex-wrap: wrap; overflow: visible; margin: 6px 0 10px; }
.chips.envolver { flex-wrap: wrap; overflow: visible; }
.chip { display: inline-flex; align-items: center; gap: 6px; border: 2px solid #d8d2c4; border-radius: 99px; padding: 6px 12px; background: #fff; font-weight: 600; cursor: pointer; }
.chip:has(input:checked) { border-color: var(--verde); background: #e3f1e5; }

/* ===== 15 oct: inicio por secciones de colores ===== */
.seccion { --sec: var(--verde); margin-top: 22px; }
.sec-tit { display: flex; align-items: center; gap: 10px; border-bottom: 0; padding: 8px 12px; margin: 0 0 10px;
  background: var(--sec); color: #fff; border-radius: 12px; font-size: 18px; letter-spacing: .02em; }
.sec-tit span { font-size: 22px; line-height: 1; }
.seccion .mosaico a { border-color: var(--sec); }
.seccion .mosaico a:not(.destacado):not(.grande) .ico { color: var(--sec); }
/* Alessandro: botones compactos, 3 por fila en el celular, ícono grande y nombre corto */
.mosaico.compacto { grid-template-columns: repeat(auto-fill, minmax(102px, 1fr)); gap: 8px; }
.mosaico.compacto a { min-height: 92px; padding: 10px 6px 8px; align-items: center; justify-content: center; text-align: center; gap: 6px; }
.mosaico.compacto a .ico { font-size: 32px; display: flex; justify-content: center; }
.mosaico.compacto a .ico .ico-svg { width: 44px; height: 33px; }
.mosaico.compacto a b { font-size: 12.5px; letter-spacing: .02em; line-height: 1.15; }
.mosaico.compacto a.destacado { background: var(--sec); border-color: var(--sec); color: #fff; }
/* Personal: botones grandes, de color, fáciles de reconocer */
.mosaico a.grande { min-height: 132px; color: #fff; border-color: rgba(0,0,0,.25); border-bottom-color: var(--vino); }
.mosaico a.grande .ico { font-size: 52px; }
.mosaico a.grande .ico .ico-svg { width: 64px; height: 48px; }
.mosaico a.grande b { font-size: 18px; }
.mosaico a.grande span:not(.ico):not(.badge) { color: rgba(255,255,255,.88); }
.mosaico a.area-cocina { background: #1F3D2B; }
.mosaico a.area-barra { background: #6E1F2A; }
.mosaico a.area-salon { background: #1F4E9A; }
.mosaico a.masa { background: #C2410C; }
.mosaico a.reporte { background: #2F6B3A; }
.mosaico a.sobre { background: #8A6400; }
.mosaico a.grande.corte { background: #4A3B8F; }
.mosaico a.grande.reposicion { background: #2F4E6B; }
.mosaico a.grande.produccion { background: #9A4A24; }
.mosaico a.grande.fidel { background: #0E7C7B; }
.mosaico a.grande.reservas { background: #6E1F2A; }
.mosaico a.grande.premios { background: #B7791F; }
.alerta-amarilla { border: 3px solid #e5b92e; background: #fff8e1; }
.ajustes summary { cursor: pointer; padding: 4px 0; }
@media (min-width: 640px) { .mosaico.compacto { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); } }

/* Mapa del salón */
.plano-wrap { background: #fff; border: 1px solid var(--linea); border-radius: 14px; padding: 4px; }
.plano-svg { display: block; width: 100%; height: auto; font-family: inherit; }
.plano-svg .pm.ocupada { cursor: pointer; }
.kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 10px; }
.kpis > div { background: #fff; border: 1px solid var(--linea); border-radius: 12px; padding: 8px 10px; }
.kpis b { display: block; font-size: 1.25em; }
.kpis small { color: var(--suave, #6b645a); }
.chip-mesero { color: #fff; border-radius: 999px; padding: 4px 10px; font-size: .85em; font-weight: 700; white-space: nowrap; }
.mini-tabla { width: 100%; border-collapse: collapse; font-size: .9em; margin-top: 6px; }
.mini-tabla td { padding: 3px 0; border-bottom: 1px solid var(--linea); }
details.cerrada > summary { list-style: none; cursor: pointer; }
details.cerrada > summary::-webkit-details-marker { display: none; }

/* Inicio de Alessandro: mapa arriba, grande; secciones de 4 en dos columnas, ícono al costado */
.mosaico.hero { grid-template-columns: 1fr; margin-top: 4px; }
.mosaico.hero a.mapa-hero { background: linear-gradient(135deg, #1f4d3a, #2E6B4F); color: #fff; border-color: #163828; border-bottom-color: var(--vino);
  flex-direction: row; align-items: center; gap: 14px; min-height: 84px; padding: 14px 16px; flex-wrap: wrap; }
.mosaico.hero a.mapa-hero .ico { font-size: 42px; }
.mosaico.hero a.mapa-hero b { font-size: 19px; color: #fff; }
.mosaico.hero a.mapa-hero span:not(.ico) { color: #DDE8E0; flex-basis: 100%; margin-top: -8px; font-size: 13px; }
.mosaico.compacto.dos { grid-template-columns: 1fr 1fr; }
.mosaico.compacto.dos a { flex-direction: row; justify-content: flex-start; text-align: left; min-height: 64px; padding: 10px 12px; gap: 10px; }
.mosaico.compacto.dos a .ico { font-size: 28px; flex: none; }
.mosaico.compacto.dos a .ico .ico-svg { width: 36px; height: 27px; }

/* Horario de la semana */
.dia-hor { border-top: 1px solid var(--linea); padding: 10px 0 6px; }
.dia-hor.hoy { background: #fbf6ec; margin: 0 -10px; padding: 10px 10px 6px; border-radius: 10px; }
.dia-hor .dia-tit { margin-bottom: 4px; }
.dia-hor textarea { width: 100%; margin: 2px 0 6px; font-size: 15px; }

/* Opiniones del WhatsApp: conversación */
.hilo { display: flex; flex-direction: column; gap: 6px; margin: 10px 0; }
.burbuja { align-self: flex-start; max-width: 88%; background: #f1ede4; border-radius: 12px 12px 12px 4px; padding: 8px 10px; white-space: pre-wrap; font-size: 15px; }
.burbuja.yo { align-self: flex-end; background: #dcf3e3; border-radius: 12px 12px 4px 12px; }
.burbuja small { display: block; color: var(--suave, #6b645a); font-size: 11px; margin-top: 3px; }

/* Traducción automática */
.burbuja .trad { margin-top: 6px; padding-top: 6px; border-top: 1px dashed #cfc6b4; color: #3b3a36; font-size: 14px; }
.trad-caja { background: #eef4ea; border-radius: 10px; padding: 10px 12px; margin: 0 0 12px; }

/* Modo Fidelización (compus de caja): solo la pantalla de canjear; sin menú, guía ni chat */
.modo-fid #btn-atras, .modo-fid #btn-menu, .modo-fid #btn-guia, .modo-fid #btn-chat { display: none !important; }
.modo-fid header.top { background: #1F4E9A; }
.modo-fid #quien { font-size: 20px; padding: 12px; border: 3px solid #1F4E9A; }
.modo-fid main { zoom: 1.2; }   /* compus touch de caja: todo un poco más grande para el dedo */

/* Guía (20/10): letra grande, sin foto, manito que señala el botón */
.guia-caja { border-width: 3px; box-shadow: 0 10px 30px rgba(0,0,0,.25); }
.guia-cab { font-size: 19px; }
.guia-n { font-size: 14px; padding: 3px 10px; }
.guia-caja p, .guia-cuerpo p { font-size: 19px; line-height: 1.45; }
.guia-mano { position: absolute; z-index: 60; pointer-events: none; display: flex; flex-direction: column; align-items: flex-start; transform: translateX(-22px); }
.guia-dedo { font-size: 46px; line-height: 1; animation: guia-toque 1s ease-in-out infinite; filter: drop-shadow(0 3px 4px rgba(0,0,0,.35)); }
.guia-letrero { margin-top: 2px; background: #B42318; color: #fff; font-weight: 800; font-size: 17px; padding: 6px 12px; border-radius: 10px; white-space: nowrap; box-shadow: 0 4px 12px rgba(0,0,0,.25); }
@keyframes guia-toque { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
.guia-paso { outline: 4px solid #B42318 !important; outline-offset: 3px; border-radius: 10px; animation: guia-pulso 1.4s ease-in-out infinite; }
@keyframes guia-pulso { 0%, 100% { box-shadow: 0 0 0 0 rgba(180,35,24,.45); } 50% { box-shadow: 0 0 0 10px rgba(180,35,24,0); } }

/* 22/10: nube amarilla al lado de la manito con el texto del paso (letra gruesa, para que la lean sí o sí) */
.guia-nube { position: absolute; z-index: 61; pointer-events: auto; cursor: pointer; width: max-content; max-width: min(88vw, 420px); background: #FFE45C; color: #1B1B1B;
  border: 3px solid #B42318; border-radius: 16px; padding: 10px 14px; box-shadow: 0 10px 26px rgba(0,0,0,.32); animation: guia-entra .25s ease-out; }
.guia-nube::before { content: ""; position: absolute; top: -12px; left: calc(var(--fx, 40px) - 11px); border: 11px solid transparent; border-top: 0; border-bottom: 12px solid #B42318; }
.guia-nube.arriba::before { top: auto; bottom: -12px; border-bottom: 0; border-top: 12px solid #B42318; }
.guia-nube-t { display: block; font-size: 15px; font-weight: 900; text-transform: uppercase; letter-spacing: .02em; color: #B42318; margin-bottom: 3px; }
.guia-nube-x { display: block; font-size: 20px; line-height: 1.35; font-weight: 700; }
.guia-nube-x b { font-weight: 900; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }
.guia-mano.al-reves { flex-direction: column-reverse; }
.guia-caja.chica { padding: 8px 12px; }
.guia-caja.chica .guia-cab { font-size: 16px; margin-bottom: 6px; }
body.con-guia { padding-bottom: 55vh; }
/* 22/10: los pasos sin botón señalado también van en "nube" amarilla (la ventanita de abajo), con letra gruesa */
.guia-caja:not(.chica) { background: #FFE45C; border-color: #B42318; border-width: 3px; }
.guia-caja:not(.chica) .guia-cab b { color: #B42318; text-transform: uppercase; font-weight: 900; letter-spacing: .02em; }
.guia-caja:not(.chica) .guia-cuerpo p { font-weight: 700; color: #1B1B1B; }
.guia-caja:not(.chica) .guia-cuerpo p b { font-weight: 900; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }
.guia-caja:not(.chica) .guia-x { color: #6B1D16; }

/* 22/10: turnos del horario con nombres en "chips" y desplegable para agregar */
.turno-hor { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 4px 0 10px; }
.chip-hor { display: inline-flex; align-items: center; gap: 4px; background: #E9F2EC; color: #1B4D31; border: 1px solid #B9D3C2; border-radius: 999px; padding: 4px 4px 4px 12px; font-size: 15px; font-weight: 600; }
.chip-hor.duda { background: #FFF3D6; color: #7A4B00; border-color: #E8C979; }
.chip-hor button { border: 0 !important; box-shadow: none !important; background: transparent; color: inherit; min-height: 30px; min-width: 30px; padding: 0 6px; font-size: 14px; }
.turno-hor select { flex: 1 1 140px; min-height: 40px; font-size: 15px; }

/* Recordatorios y reservas sin el cartelito (22/10) */
@keyframes parpadea { 0%, 100% { box-shadow: 0 0 0 0 rgba(180, 35, 24, 0); } 50% { box-shadow: 0 0 0 6px rgba(180, 35, 24, .85); background-color: #ffe3e0; } }
.parpadea { animation: parpadea 1.2s ease-in-out infinite; }
@keyframes parpadea-rojo { 0%, 100% { background: #B42318; } 50% { background: #E8590C; } }
body.reservas-pendientes #aviso-reservas { animation: parpadea-rojo 1s steps(2, jump-none) infinite; }
@media (prefers-reduced-motion: reduce) { .parpadea, body.reservas-pendientes #aviso-reservas { animation: none; outline: 4px solid #B42318; } }

/* Fidelización: elegir la mesa con un toque (22/10) */
.mesas-pick { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 8px; }
.mesas-pick button { min-width: 48px; padding: 10px 8px; font-size: 17px; font-weight: 700; background: #fff; color: var(--texto, #1f2a24); border: 2px solid var(--linea, #d8d2c4); box-shadow: none; }
.mesas-pick button.activo { background: var(--verde, #1F7A3E); color: #fff; border-color: var(--verde, #1F7A3E); }
.mesas-pick input { width: 90px; padding: 10px 8px; font-size: 16px; }

/* Horario: rol de cada persona en el turno (22/10) */
.chip-hor select[data-rol] { border: 0; background: rgba(255,255,255,.7); border-radius: 999px; padding: 2px 6px; font-size: 13px; font-weight: 600; width: auto; min-height: 28px; margin: 0; }
.chip-hor.otro-rol { background: #EFE7FB; color: #4B2A7A; border-color: #CDB8EE; }

/* Sorteo de zonas (22/10) */
.sorteo-cartas { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; perspective: 800px; }
.sorteo-carta { position: relative; height: 120px; transform-style: preserve-3d; transition: transform .6s ease; }
.sorteo-carta .cara { position: absolute; inset: 0; border-radius: 14px; display: flex; flex-direction: column; align-items: center; justify-content: center; backface-visibility: hidden; }
.sorteo-carta .atras { background: #B7791F; font-size: 44px; border: 3px solid #FFE45C; }
.sorteo-carta .frente { background: #FFF6E0; color: #1F3A2E; transform: rotateY(180deg); border: 3px solid #FFE45C; }
.sorteo-carta .frente small { font-size: 18px; font-weight: 700; }
.sorteo-carta .frente b { font-size: 26px; color: #B42318; }
.sorteo-carta.vuelta { transform: rotateY(180deg); }
.sorteo-carta.mezcla { animation: mezcla .3s ease-in-out infinite alternate; }
@keyframes mezcla { from { transform: translateX(-6px) rotate(-3deg); } to { transform: translateX(6px) rotate(3deg); } }
@media (prefers-reduced-motion: reduce) { .sorteo-carta { transition: none; } .sorteo-carta.mezcla { animation: none; } }

/* Archivo: foto de cada nota al lado (22/10, Jessica) */
.arch-fila { align-items: center; gap: 10px; }
.arch-mini { flex: 0 0 auto; width: 64px; height: 64px; padding: 0; border-radius: 10px; overflow: hidden; border: 1px solid #ddd; background: #f3efe7; display: flex; align-items: center; justify-content: center; font-size: 11px; line-height: 1.1; text-align: center; color: #555; cursor: pointer; }
.arch-mini img { width: 100%; height: 100%; object-fit: cover; display: block; }
.arch-mini.sin { color: #B4232C; font-weight: 700; background: #fdeeee; border-color: #f2c4c4; cursor: default; }
.arch-mini.pdf { font-size: 18px; }

/* Panel del dueño (22/10): listas limpias por zona, sin íconos */
.ptareas { background: #fff; border: 1px solid var(--linea); border-left: 5px solid var(--rojo); border-radius: 14px; padding: 6px 14px 8px; margin: 10px 0 16px; }
.ptareas h2, .pgrupo summary { font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--suave); margin: 8px 0 4px; font-weight: 700; }
.pvacio { margin: 6px 0 8px; color: var(--verde); font-weight: 600; }
.pgrupo { background: #fff; border: 1px solid var(--linea); border-radius: 14px; margin: 0 0 10px; overflow: hidden; }
.pgrupo summary { list-style: none; cursor: pointer; padding: 12px 14px; margin: 0; display: flex; justify-content: space-between; align-items: center; color: var(--tinta); font-size: 14px; }
.pgrupo summary::-webkit-details-marker { display: none; }
.pgrupo summary::after { content: "\203A"; font-size: 22px; line-height: 1; transform: rotate(90deg); transition: transform .15s; color: var(--suave); }
.pgrupo[open] summary::after { transform: rotate(-90deg); }
.pgrupo summary span { margin-left: auto; margin-right: 10px; font-weight: 600; color: var(--suave); font-size: 12px; }
.plista { display: grid; grid-template-columns: 1fr; border-top: 1px solid var(--linea); }
@media (min-width: 700px) { .plista { grid-template-columns: 1fr 1fr; } .plista .pfila:nth-child(odd) { border-right: 1px solid var(--linea); } }
.pfila { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--linea); color: inherit; text-decoration: none; min-height: 48px; }
.ptareas .pfila { padding: 10px 0; }
.ptareas .pfila:last-child { border-bottom: 0; }
.pfila span { flex: 1; min-width: 0; }
.pfila b { display: block; font-size: 16px; font-weight: 600; }
.pfila small { display: block; color: var(--suave); font-size: 13px; margin-top: 1px; }
.pfila em { font-style: normal; background: var(--rojo); color: #fff; border-radius: 999px; padding: 2px 9px; font-size: 13px; font-weight: 700; }
.pfila i { font-style: normal; color: var(--suave); font-size: 22px; }
.pfila:active { background: #f6f2ea; }

/* Mini app "Asistente WhatsApp" del dueño (24/10): una sola pantalla, verde */
.modo-asis #btn-atras, .modo-asis #btn-menu, .modo-asis #btn-guia, .modo-asis #btn-chat { display: none !important; }
.modo-asis header.top { background: #0E6B4E; }
