/* Carcasa y controles compartidos por la tableta de inicio y el TPV ampliado. */
:root {
  --fondo: #271b2e;
  --fondo-2: #201426;
  --panel: #35263e;
  --panel-2: #48334f;
  --texto: #fff0df;
  --suave: #dcc9d9;
  --borde: #f1c9dc30;
  --amarillo: #ffc51b;
  --amarillo-luz: #ffdf59;
  --papel: #fff2d8;
  --tinta: #2d1e32;
  --tinta-2: #675265;
  --carcasa: linear-gradient(142deg, #76566b 0%, #4d354d 49%, #382439 100%);
  --reflejo-carcasa: #edccaf73;
  --marco-cristal: #1a0f20;
}

.mostrador {
  max-width: 1440px;
  padding: 0 clamp(22px, 4.8vw, 72px) 50px;
  column-gap: clamp(16px, 2vw, 32px);
  overflow: visible;
}

.mostrador:not([data-section="inicio"]) {
  grid-template-columns: minmax(0, 1fr) clamp(205px, 19vw, 261px);
  grid-template-areas: "titulo titulo" "tpv lateral";
  grid-template-rows: min-content 1fr;
}

.titulo-pared {
  min-height: 82px;
  padding-block: 12px;
  margin: 0 0 clamp(18px, 3vh, 30px);
  border-bottom: 1px solid #fbe3c846;
}

.titulo-pared > svg {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  filter: drop-shadow(0 0 5px #ffd34a9e) drop-shadow(0 0 13px #ffad3266) drop-shadow(0 2px 4px #1a0c15a3);
}

.titulo-pared .neon {
  color: #fff7dc;
  font-size: clamp(29px, 3.6vw, 38px);
  white-space: nowrap;
  text-shadow: 0 0 2px #fff4d6, 0 0 9px #ffc943ad, 0 0 23px #ff9e3687, 0 2px 4px #201021;
  animation: none;
}

@media (prefers-reduced-motion: no-preference) {
  .titulo-pared .neon { animation: encender-rotulo 820ms ease-out; }
}

@keyframes encender-rotulo {
  from { text-shadow: 0 2px 4px #201021; }
  58% { text-shadow: 0 0 3px #fff6da, 0 0 12px #ffd36bdd, 0 0 29px #ffab42a8, 0 2px 4px #201021; }
}

.titulo-pared p { color: #f2e0d4; }

.tpv { perspective: none; min-width: 0; z-index: 2; }

.monitor {
  padding: 11px 11px 33px;
  border: 1px solid #aa8299;
  border-radius: 23px;
  background: var(--carcasa);
  box-shadow:
    inset 0 1px 2px var(--reflejo-carcasa),
    inset 0 -3px #24142892,
    inset 0 0 0 4px #eecfc318,
    0 4px 0 #28192b,
    0 10px 13px #200e1a73,
    0 27px 46px #190c17b3;
  transform: none;
  transform-origin: center;
}

.monitor::after { content: none; }

.barbilla { bottom: 6px; gap: 5px; }
.barbilla svg { width: 17px; height: 17px; }
.barbilla span { font-size: 17px; line-height: 1.25; color: #efd7aa; }

.led-enc {
  right: 21px;
  bottom: 14px;
  width: 6px;
  height: 6px;
  background: #a9ead2;
  box-shadow: 0 0 8px #b2f9dcb3;
}

.pantalla {
  height: auto;
  min-height: 0;
  border: 1px solid #604962;
  border-radius: 13px;
  background: var(--fondo);
  box-shadow: 0 0 0 3px var(--marco-cristal), 0 0 0 4px #f1d8e026;
}

.mostrador:not([data-section="inicio"]) .pantalla {
  height: clamp(540px, calc(100svh - 177px), 825px);
}

.pantalla::after { background: linear-gradient(122deg, #fbe4e010, transparent 31%); }

.pantalla.cambia .vista { animation: encender-vista .28s ease-out both; }
@keyframes encender-vista { from { opacity: .56; } to { opacity: 1; } }

.peana {
  width: 43%;
  height: 23px;
  margin-top: 0;
  clip-path: polygon(8% 0, 92% 0, 100% 100%, 0 100%);
  border-radius: 0 0 8px 8px;
  background: linear-gradient(180deg, #251523, #5e4054 31%, #392739 81%, #21121c);
  box-shadow: inset 0 -2px #b18a952c;
}

.mostrador[data-section="inicio"] .peana { display: none; }

.app-barra {
  flex: none;
  min-height: 43px;
  gap: 9px;
  padding: 7px 13px;
  border-bottom: 1px solid #e8c6d53d;
  background: linear-gradient(100deg, #422a48, #312236);
  color: #e6d3dd;
}

.app-barra svg { width: 24px; height: 24px; }
.app-barra .seccion { font-size: 16px; }
.app-barra .der { gap: 12px; }
.app-barra .red { font-size: 13px; font-weight: 650; white-space: nowrap; }
.app-barra .red i { width: 6px; height: 6px; background: #95dcbe; }
.app-barra .reloj-txt { font: 650 12px var(--mono); color: #ecd3e5; }

/* Relieve corto del teclado y recorrido visible al pulsar una tecla. */
.teclado {
  flex: none;
  margin: 0;
  padding: 8px 9px 9px;
  border: 0;
  border-bottom: 1px solid #e7c0ca38;
  border-radius: 0;
  transform: none;
  background: linear-gradient(180deg, #38273d, #2b2032);
  box-shadow: inset 0 1px #e8c7d516, inset 0 -2px #1c132548;
  z-index: 6;
}

.teclado .rejilla { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 7px; }
.teclado .ayuda, .teclado .bajar { display: none; }

.tecla {
  width: 100%;
  min-width: 0;
  height: 53px;
  border-radius: 7px;
  isolation: isolate;
  color: #ffeede;
}

.tecla .base {
  inset: 3px 0 0;
  border-radius: 7px;
  background: #1b1022;
  box-shadow: 0 1px 3px #160c1a9c;
}

.tecla .cap {
  inset: 0 0 4px;
  flex-direction: row;
  gap: 6px;
  padding: 3px 8px;
  border: 1px solid #aa819b8a;
  border-radius: 7px;
  color: inherit;
  font-size: clamp(12px, 1.22vw, 15px);
  line-height: 1.12;
  background: linear-gradient(172deg, #654c68, #46314d 78%);
  box-shadow: inset 0 1px #edccdd24, inset 0 -2px #271b2e73, 0 2px #2a1b32;
  transition: transform .09s ease, box-shadow .09s ease, filter .12s ease;
}

.tecla .cap .ico { flex: none; font-size: 16px; line-height: 1; filter: none; }
.tecla .cap .ico svg {
  display: block;
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.tecla .cap kbd { top: 3px; left: 5px; font: 600 9px var(--mono); opacity: .65; }

.tecla[aria-current="page"] { color: #2b1629; }
.tecla[aria-current="page"] .cap {
  border-color: #ffe68d;
  background: linear-gradient(170deg, var(--amarillo-luz), var(--amarillo));
  box-shadow: inset 0 1px #fff4bca6, inset 0 -2px #a6602059, 0 2px #7f481f, 0 0 10px #ffbd182c;
}
.tecla[aria-current="page"] .cap::after { content: none; }
.tecla:hover .cap { filter: brightness(1.13); }
.tecla:active .cap, .tecla.pulsada .cap {
  transform: translateY(3px);
  box-shadow: inset 0 1px 2px #180e2469, 0 1px #1c1025;
}
.tecla:focus-visible { outline-offset: 1px; border-radius: 8px; }

.mostrador[data-section="inicio"] .teclado { padding: 5px 6px 6px; }
.mostrador[data-section="inicio"] .teclado .rejilla { gap: 4px; }
.mostrador[data-section="inicio"] .tecla { height: 41px; }
.mostrador[data-section="inicio"] .tecla .cap { gap: 3px; padding-inline: 3px; font-size: 11px; }
.mostrador[data-section="inicio"] .tecla .cap .ico { font-size: 12px; }
.mostrador[data-section="inicio"] .tecla .cap .ico svg { width: 12px; height: 12px; }
.mostrador[data-section="inicio"] .tecla .cap kbd { display: none; }

#principal { min-width: 0; }
.mostrador:not([data-section="inicio"]) .vista { padding: clamp(16px, 2.3vw, 30px); }
.vista h2 { color: #fff2dc; }
.vista h3 { line-height: 1.22; }
.vista .detalle h3, .vista .pack h3, .vista .ticket-pant h3 { color: var(--tinta); }
.vista .sb { font-weight: 750; }
.detalle { box-shadow: 0 8px 20px #180d2457; }
.carta button { min-height: 68px; }
.ticket-pant { min-height: 145px; }

/* Pantalla de cocina, visor de cliente y salida del ticket de cobro. */
.mostrador[data-section="inicio"] .lateral { display: none; }

.lateral {
  width: 100%;
  gap: 15px;
  align-content: start;
  padding: 0 0 22px;
  margin: 0;
  justify-items: stretch;
}
.lateral [hidden] { display: none; }

.visor { max-width: none; }
.visor .caja-visor {
  padding: 8px;
  border: 1px solid #aa8299;
  border-radius: 12px;
  background: var(--carcasa);
  box-shadow: inset 0 1px var(--reflejo-carcasa), 0 7px 14px #14091485;
}
.visor .vfd {
  min-height: 59px;
  padding: 10px;
  font-size: clamp(11px, 1vw, 15px);
  font-variant-numeric: tabular-nums;
  letter-spacing: .024em;
}
.visor .poste { width: 23px; height: 13px; }

.visor-cocina {
  min-width: 0;
  padding: 8px;
  border: 1px solid #9f7b90;
  border-radius: 13px;
  background: var(--carcasa);
  box-shadow: inset 0 1px var(--reflejo-carcasa), 0 9px 20px #190919a3;
}
.visor-cocina[hidden] { display: none; }

.cocina-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 7px;
  padding: 8px 10px;
  border: 1px solid #100a13;
  border-radius: 7px 7px 0 0;
  background: #291931;
  color: var(--texto);
  font-size: 14px;
  font-weight: 750;
}
.cocina-bar h2 { font-size: 15px; line-height: 1.16; }
.cocina-bar small { display: block; margin-bottom: 3px; font-size: 10px; color: var(--suave); }

.cocina-live {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: #a9e2c2;
  white-space: nowrap;
}
.cocina-live::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }

.cocina-feed {
  display: grid;
  align-content: start;
  gap: 7px;
  min-height: 108px;
  max-height: 352px;
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--panel-2) transparent;
  padding: 8px;
  border: 1px solid #100a13;
  border-top: 0;
  border-radius: 0 0 7px 7px;
  background: #1d1424;
  color: var(--suave);
  font-size: 13px;
  line-height: 1.3;
}
.cocina-vacia { align-self: start; margin: auto 0; padding: 7px 3px; }

.cocina-comanda {
  display: grid;
  gap: 6px;
  padding: 8px 9px;
  border: 1px solid #8f633b;
  border-left: 3px solid var(--amarillo);
  border-radius: 5px;
  background: #3c293d;
  color: #fff0de;
}
.cocina-comanda header { display: flex; align-items: start; justify-content: space-between; gap: 4px; }
.cocina-comanda header small { display: block; color: var(--suave); font-size: 11px; }
.cocina-comanda header strong { font-size: 16px; }
.cocina-comanda ul { list-style: none; margin: 0; padding: 5px 0 0; border-top: 1px solid #e5c3ba33; }
.cocina-comanda li + li { margin-top: 3px; }
.cocina-estado {
  border-radius: 4px;
  padding: 3px 4px;
  background: #5a4138;
  color: #ffda82;
  font-size: 10px;
  font-weight: 750;
}
.cocina-comanda[data-estado="1"] { border-left-color: #d6b4e3; }
.cocina-comanda[data-estado="1"] .cocina-estado { color: #f5d5ff; background: #5f4470; }
.cocina-comanda[data-estado="2"] { border-left-color: #9bdebd; }
.cocina-comanda[data-estado="2"] .cocina-estado { color: #bdf9d7; background: #365247; }
.cocina-accion {
  justify-self: start;
  padding: 5px 9px;
  min-height: 36px;
  border: 1px solid #ffdc6b;
  border-radius: 5px;
  background: var(--amarillo);
  color: #342139;
  font-weight: 750;
}
.cocina-accion:hover { background: var(--amarillo-luz); }

.impresora {
  display: grid;
  width: min(100%, 215px);
  margin: 0 auto;
  isolation: isolate;
}
.papel-salida {
  position: relative;
  inset: auto;
  z-index: 2;
  width: calc(100% - 36px);
  margin: 0 auto -4px;
}
.papel-salida:empty { margin-bottom: 0; }
.impresora .tapa {
  height: 44px;
  padding-inline: 12px;
  border-radius: 13px 13px 4px 4px;
  border: 1px solid #9a7285;
  background: linear-gradient(#755668, #533950);
  color: #fff0dc;
  box-shadow: inset 0 1px var(--reflejo-carcasa), 0 2px #1f1425;
}
.impresora .tapa .luz { width: 6px; height: 6px; flex: none; }
.impresora .cuerpo-imp {
  height: 57px;
  border-radius: 3px 3px 12px 12px;
  background: linear-gradient(#4d354b, #3b293c);
  box-shadow: 0 8px 15px #14091488;
}
.impresora .ranura { top: auto; bottom: 54px; height: 5px; }

.cajon { width: min(100%, 205px); height: 53px; margin-inline: auto; }
.cajon.abierto { margin-bottom: 30px; }
.cajon .frente { background: linear-gradient(#66506a, #44304a); }
.cajon .frente::before { width: 44px; height: 6px; }
.cajon.abierto .frente { transform: translateY(28px) scale(1.02); }
.lateral .rotulo { margin-top: -3px; font-size: 12px; text-align: center; }

@media (max-width: 1060px) {
  .mostrador:not([data-section="inicio"]) {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "titulo" "tpv" "lateral";
    grid-template-rows: min-content auto auto;
  }

  .lateral { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 20px; }
  .visor { grid-column: auto; }
  .visor .vfd { font-size: clamp(12px, 2vw, 15px); }
  .lateral .rotulo { grid-column: 1 / -1; }
}

@media (max-width: 720px) {
  .mostrador { padding: 0 clamp(10px, 3vw, 20px) 29px; }
  .titulo-pared { min-height: 66px; margin-bottom: 17px; gap: 9px; }
  .titulo-pared > svg { width: 37px; height: 37px; }
  .monitor { padding: 7px 7px 28px; border-radius: 17px; }
  .pantalla { border-radius: 9px; overflow: clip; }
  .mostrador:not([data-section="inicio"]) .pantalla { height: auto; }
  .teclado { position: sticky; top: 0; padding: 6px; box-shadow: 0 3px 6px #1e132669; }
  .teclado .rejilla, .mostrador[data-section="inicio"] .teclado .rejilla {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 5px;
  }
  .tecla, .mostrador[data-section="inicio"] .tecla { height: 45px; }
  .tecla .cap, .mostrador[data-section="inicio"] .tecla .cap { font-size: 13px; }
  .tecla .cap .ico { font-size: 13px; }
  .mostrador:not([data-section="inicio"]) .vista { padding: 15px 12px 18px; }
  .vista h2 { font-size: clamp(21px, 6.4vw, 29px); }
  .app-barra .red { font-size: 12px; }
  .barbilla { bottom: 4px; }
  .barbilla span { font-size: 15px; }
  .barbilla svg { width: 15px; height: 15px; }
  .led-enc { bottom: 11px; right: 14px; }
  .lateral { grid-template-columns: minmax(0, 1fr); gap: 13px; align-items: start; }
  .visor { width: min(245px, 100%); margin-inline: auto; }
}

@media (max-width: 370px) {
  .tecla .cap, .mostrador[data-section="inicio"] .tecla .cap { gap: 3px; font-size: 12px; }
  .tecla .cap .ico { display: none; }
  .vista .planes { grid-template-columns: minmax(0, 1fr); }
  .planes:has(> :only-child) .plan ul { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .pantalla.cambia .vista { animation: none; }
  .tecla .cap { transition: none; }
}
