/* ==========================================================================
   MESA 12 — sistema visual
   Salón nocturno + papel de comanda. Sin fuentes externas: Bahnschrift para
   letrero, Trebuchet para interfaz, Cascadia Mono para datos y comandas.
   ========================================================================== */

:root {
  --night: #0c0909;
  --ink-1: #140e10;
  --ink-2: #1d1618;
  --ink-3: #271e20;
  --ink-4: #33272a;
  --line: #3a2c2c;
  --line-2: #4e3a38;
  --cream: #f3e8d6;
  --dim: #a89189;
  --dim-2: #6f5b56;
  --paper: #f1e4cd;
  --paper-2: #e4d3b6;
  --paper-ink: #2a1e17;
  --paper-dim: #7c6753;
  --mustard: #e9b44c;
  --tomato: #e0573f;
  --pink: #f5789f;
  --mint: #8ad9ae;
  --sky: #7fb6e0;
  --teal: #2f7e78;

  --font-display: "Bahnschrift SemiCondensed", "Bahnschrift", "Franklin Gothic Medium", "Arial Narrow", sans-serif;
  --font-ui: "Trebuchet MS", "Segoe UI", system-ui, sans-serif;
  --font-mono: "Cascadia Mono", "Cascadia Code", "Consolas", "Courier New", monospace;

  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 18px;
  --shadow-panel: 0 24px 48px -34px #000, inset 0 1px 0 rgba(255, 255, 255, .045);
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  color: var(--cream);
  font-family: var(--font-ui);
  font-size: calc(15px * var(--fs));
  line-height: 1.4;
  background:
    radial-gradient(1200px 760px at 12% -14%, #2c1a1d 0%, transparent 58%),
    radial-gradient(1000px 640px at 92% -6%, #2a2118 0%, transparent 52%),
    radial-gradient(900px 700px at 50% 120%, #1a1114 0%, transparent 60%),
    var(--night);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: .045;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}

button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }

:focus-visible {
  outline: 2px solid var(--pink);
  outline-offset: 2px;
}

h1, h2, h3, p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }

/* ---------------------------------------------------------------- app shell */

.app {
  position: relative;
  z-index: 2;
  height: 100dvh;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 620px;
}

/* ------------------------------------------------------------------- topbar */

.topbar {
  display: flex;
  align-items: center;
  gap: 26px;
  padding: 12px 22px 12px;
}

.brand { min-width: 0; overflow: hidden; }

.brand__mark {
  font-family: var(--font-display);
  font-size: calc(30px * var(--fs));
  font-weight: 700;
  letter-spacing: .035em;
  line-height: .9;
  text-transform: uppercase;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}


.brand__num {
  color: var(--pink);
  text-shadow: 0 0 18px rgba(245, 120, 159, .55), 0 0 3px rgba(245, 120, 159, .8);
}

.brand__sub {
  margin-top: 5px;
  font-family: var(--font-mono);
  font-size: calc(9px * var(--fs));
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--dim-2);
  white-space: nowrap;
}

.shift {
  width: 210px;
  flex: 0 0 auto;
}

.shift__row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-family: var(--font-mono);
  font-size: calc(10px * var(--fs));
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--dim);
}

.shift__label b { color: var(--cream); }

.shift__time {
  font-size: calc(15px * var(--fs));
  letter-spacing: .06em;
  color: var(--cream);
  font-variant-numeric: tabular-nums;
  transition: color .3s;
}

.shift__time.is-low { color: var(--tomato); animation: blink 1s steps(2) infinite; }

.shift__bar {
  margin-top: 6px;
  height: 5px;
  border-radius: 99px;
  background: #241a1c;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, .7);
  overflow: hidden;
}

.shift__bar i {
  display: block;
  height: 100%;
  width: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--mustard), #f0cd86);
  transition: width .4s linear;
}

.shift__hint {
  display: block;
  margin-top: 5px;
  font-size: calc(10.5px * var(--fs));
  color: var(--dim-2);
  letter-spacing: .03em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.shift__hint[data-wave="3"], .shift__hint[data-wave="4"], .shift__hint[data-wave="5"] {
  color: var(--tomato);
}

.meters {
  display: flex;
  align-items: stretch;
  gap: 10px;
  margin-left: auto;
}

.meter {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1px;
  padding: 6px 13px 7px;
  min-width: 78px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: linear-gradient(180deg, #221a1c, #1a1315);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04);
}

.meter__k {
  font-family: var(--font-mono);
  font-size: calc(8.5px * var(--fs));
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--dim-2);
}

.meter__k b { color: var(--cream); font-weight: 700; }

.meter__v {
  font-family: var(--font-mono);
  font-size: calc(21px * var(--fs));
  font-weight: 700;
  letter-spacing: .06em;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
  color: var(--cream);
}

.meter--score .meter__v { color: var(--mustard); }

.meter--combo { min-width: 66px; transition: border-color .2s, box-shadow .2s; }
.meter--combo .meter__v { color: var(--dim); }
.meter--combo.is-hot { border-color: rgba(233, 180, 76, .55); }
.meter--combo.is-hot .meter__v { color: var(--mustard); }
.meter--combo.is-blazing {
  border-color: var(--mustard);
  box-shadow: 0 0 22px -6px rgba(233, 180, 76, .45), inset 0 1px 0 rgba(255, 255, 255, .05);
}
.meter--combo.is-blazing .meter__v { color: #ffd98a; }

.meter--level { min-width: 86px; }

.xp {
  display: block;
  margin-top: 3px;
  height: 3px;
  border-radius: 99px;
  background: #231a1c;
  overflow: hidden;
}

.xp i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--sky), #a8d3f0);
  transition: width .45s ease;
}

.hearts {
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 0 4px 0 8px;
}

.heart {
  font-style: normal;
  font-size: calc(14px * var(--fs));
  line-height: 1;
  color: #392a2b;
  transition: color .25s, transform .25s;
  transform: scale(.94);
}

.heart::before { content: "♥"; }

.heart.is-on { color: var(--tomato); transform: scale(1); }
.heart.is-last.is-on { animation: pulse 1.2s ease-in-out infinite; }

.tools { display: flex; align-items: center; gap: 8px; }

.pos-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 34px;
  padding: 0 11px;
  border-radius: 99px;
  border: 1px solid var(--line);
  background: #1b1416;
  color: var(--dim);
  font-family: var(--font-mono);
  font-size: calc(9.5px * var(--fs));
  letter-spacing: .1em;
  text-transform: uppercase;
  transition: border-color .2s, color .2s;
}

.pos-chip:hover { border-color: var(--line-2); color: var(--cream); }

.pos-chip__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--mustard);
  box-shadow: 0 0 0 3px rgba(233, 180, 76, .12);
}

.pos-chip__dot.is-live {
  background: var(--mint);
  box-shadow: 0 0 0 3px rgba(138, 217, 174, .16), 0 0 12px rgba(138, 217, 174, .6);
  animation: pulse 2.4s ease-in-out infinite;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 36px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, #2a2022, #221a1c);
  color: var(--cream);
  font-size: calc(12.5px * var(--fs));
  font-weight: 600;
  letter-spacing: .02em;
  text-decoration: none;
  white-space: nowrap;
  transition: transform .12s ease, border-color .2s, background .2s, box-shadow .2s;
}

.btn:hover { border-color: var(--line-2); background: linear-gradient(180deg, #322629, #271e20); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn--primary {
  background: linear-gradient(180deg, #ef6a4e, var(--tomato));
  border-color: #f8856c;
  color: #1c0f0b;
  font-weight: 700;
  box-shadow: 0 10px 24px -12px rgba(224, 87, 63, .9);
}

.btn--primary:hover { background: linear-gradient(180deg, #ff7d5f, #e8604364); background-color: #ef6a4e; transform: translateY(-1px); }

.btn--ghost { background: transparent; }
.btn--ghost:hover { background: #241b1d; }

.btn--icon { width: 36px; padding: 0; font-size: calc(15px * var(--fs)); }

.btn--lg { height: 48px; padding: 0 26px; font-size: calc(14.5px * var(--fs)); border-radius: 12px; }

.btn.is-active { border-color: var(--mustard); color: var(--mustard); }

/* -------------------------------------------------------------------- stage */

.stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 384px;
  gap: 16px;
  padding: 0 22px 20px;
  min-height: 0;
}

/* -------------------------------------------------------------------- salón */

.floor {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 0;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: linear-gradient(180deg, #1a1315, #120d0f);
  box-shadow: var(--shadow-panel);
  overflow: hidden;
}

.floor__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 16px 9px;
  border-bottom: 1px solid rgba(255, 255, 255, .035);
  background: linear-gradient(180deg, rgba(255, 255, 255, .025), transparent);
}

.zones { display: flex; gap: 6px; }

.zone {
  font-family: var(--font-mono);
  font-size: calc(8.5px * var(--fs));
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--dim-2);
  border: 1px solid var(--line);
  border-radius: 99px;
  padding: 3px 8px;
}

.hint {
  font-size: calc(12px * var(--fs));
  color: var(--dim);
  text-align: right;
  transition: color .2s;
}

.hint.is-active { color: var(--mustard); }

.scene {
  position: relative;
  flex: 1;
  min-height: 0;
  background:
    radial-gradient(70% 80% at 50% 40%, #241819 0%, #150f11 70%),
    #120d0f;
}

.scene__svg {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
  user-select: none;
}

.scene.is-pointing { cursor: pointer; }

.floor__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 16px;
  border-top: 1px solid rgba(255, 255, 255, .035);
  font-family: var(--font-mono);
  font-size: calc(9.5px * var(--fs));
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--dim-2);
  background: rgba(0, 0, 0, .18);
}

.legend { display: flex; gap: 14px; flex-wrap: wrap; }

.legend__item { display: inline-flex; align-items: center; gap: 6px; }

.dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.dot.is-queued { background: var(--mustard); }
.dot.is-waiting { background: var(--sky); }
.dot.is-ready { background: var(--mint); box-shadow: 0 0 8px rgba(138, 217, 174, .8); }
.dot.is-eating { background: var(--teal); }
.dot.is-paying { background: #e3c983; }

.counts { display: flex; gap: 16px; white-space: nowrap; }
.counts b { color: var(--cream); font-weight: 700; }

/* --------------------------------------------------------------------- rail */

.rail {
  display: flex;
  flex-direction: column;
  gap: 11px;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 3px;
  scrollbar-width: thin;
  scrollbar-color: #3a2c2c transparent;
}

.rail::-webkit-scrollbar { width: 8px; }
.rail::-webkit-scrollbar-thumb { background: #33272a; border-radius: 99px; }

.panel {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 11px 12px 13px;
  background: linear-gradient(180deg, #1f1719, #191214);
  box-shadow: var(--shadow-panel);
}

.rail > .panel { flex: 0 0 auto; }

.panel__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 9px;
}

.panel__head h2 {
  font-family: var(--font-mono);
  font-size: calc(9.5px * var(--fs));
  font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--dim);
}

.panel__meta {
  font-family: var(--font-mono);
  font-size: calc(9px * var(--fs));
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--dim-2);
}

.panel--pass { position: relative; }
.panel--pass::before {
  content: "";
  position: absolute;
  top: 30px;
  left: 10px;
  right: 10px;
  height: 2px;
  background: linear-gradient(90deg, transparent, #55403a 12%, #55403a 88%, transparent);
  border-radius: 2px;
}

.pass-rail {
  display: flex;
  flex-direction: column;
  gap: 9px;
  max-height: 214px;
  overflow-y: auto;
  padding: 6px 2px 2px;
  scrollbar-width: thin;
  scrollbar-color: #3a2c2c transparent;
}

.pass-rail::-webkit-scrollbar { width: 6px; }
.pass-rail::-webkit-scrollbar-thumb { background: #3a2c2c; border-radius: 99px; }

.comanda {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1px;
  width: 100%;
  text-align: left;
  padding: 12px 12px 10px;
  border: 0;
  border-radius: 3px;
  background: linear-gradient(180deg, #f7ecd9, #eadbc1);
  color: var(--paper-ink);
  transform: rotate(var(--tilt, 0deg));
  box-shadow: 0 14px 20px -16px rgba(0, 0, 0, .95), inset 0 0 0 1px rgba(0, 0, 0, .05);
  transition: transform .16s ease, box-shadow .16s ease;
}

.comanda:hover {
  transform: rotate(0) translateY(-2px);
  box-shadow: 0 18px 26px -16px rgba(0, 0, 0, 1), inset 0 0 0 1px rgba(0, 0, 0, .06);
}

.comanda__clip {
  position: absolute;
  top: -7px;
  left: 50%;
  width: 26px;
  height: 11px;
  margin-left: -13px;
  border-radius: 3px;
  background: linear-gradient(180deg, #b5a58a, #8c7a5f);
  box-shadow: 0 2px 4px rgba(0, 0, 0, .35);
}

.comanda__clip::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 3px;
  width: 10px;
  height: 4px;
  margin-left: -5px;
  border-radius: 2px;
  background: #4a3d2c;
}

.comanda__row { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }

.comanda__tag {
  font-family: var(--font-mono);
  font-size: calc(14px * var(--fs));
  font-weight: 700;
  letter-spacing: .03em;
}

.comanda__table {
  font-family: var(--font-mono);
  font-size: calc(8.5px * var(--fs));
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--paper-dim);
}

.comanda__name { font-size: calc(13px * var(--fs)); font-weight: 700; line-height: 1.2; margin-top: 1px; }

.comanda__items {
  font-size: calc(11px * var(--fs));
  color: #5f4c3a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ficha ---------------------------------------------------------------- */

.guest-slot { min-height: 132px; }

.empty {
  margin: 0;
  font-size: calc(12px * var(--fs));
  line-height: 1.5;
  color: var(--dim-2);
}

.empty--tight { padding: 8px 2px; }

.ticket {
  position: relative;
  border-radius: 4px;
  padding: 13px 13px 12px;
  background: linear-gradient(180deg, #f6ebd8, #e9dabf);
  color: var(--paper-ink);
  box-shadow: 0 16px 26px -18px rgba(0, 0, 0, .95);
}

.ticket__head { display: flex; align-items: center; gap: 7px; }

.ticket__cust {
  font-family: var(--font-mono);
  font-size: calc(8.5px * var(--fs));
  letter-spacing: .06em;
  color: var(--dim-2);
  margin-right: auto;
}

.ticket__id {
  font-family: var(--font-mono);
  font-size: calc(15px * var(--fs));
  font-weight: 700;
  letter-spacing: .02em;
}

.ticket__pos {
  font-family: var(--font-mono);
  font-size: calc(7.5px * var(--fs));
  letter-spacing: .14em;
  color: #8a6f52;
  border: 1px solid rgba(42, 30, 23, .3);
  border-radius: 3px;
  padding: 1px 3px;
  line-height: 1;
}

.ticket__state {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: calc(8px * var(--fs));
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 99px;
  background: #d9c8ab;
  color: #4a3a2a;
}

.ticket__state.state--paying { background: #f0d79a; color: #4a3510; }
.ticket__state.state--eating { background: #b9d9c9; color: #23402f; }
.ticket__state.state--waiting { background: #c8d8e2; color: #263a45; }

.ticket__name {
  margin-top: 4px;
  font-size: calc(17px * var(--fs));
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -.01em;
}

.ticket__meta {
  display: flex;
  gap: 5px;
  align-items: baseline;
  margin-top: 2px;
  font-size: calc(10.5px * var(--fs));
  color: var(--paper-dim);
  text-transform: uppercase;
  letter-spacing: .06em;
}

.ticket__lines { margin: 10px 0 8px; display: flex; flex-direction: column; gap: 3px; }

.ticket__line {
  display: grid;
  grid-template-columns: 26px 1fr auto;
  gap: 6px;
  align-items: baseline;
  font-size: calc(12.5px * var(--fs));
}

.ticket__qty { font-family: var(--font-mono); font-size: calc(11px * var(--fs)); color: #8a6f52; }
.ticket__dish { font-weight: 600; }
.ticket__price { font-family: var(--font-mono); font-size: calc(10.5px * var(--fs)); color: #5f4c3a; }

.ticket__patience {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 10px;
}

.ticket__patience .bar {
  flex: 1;
  height: 4px;
  border-radius: 99px;
  background: rgba(42, 30, 23, .16);
  overflow: hidden;
}

.ticket__patience .bar i {
  display: block;
  height: 100%;
  border-radius: 99px;
  background: #4f7d5f;
  transition: width .25s linear;
}

.ticket__patience .bar i.is-low { background: var(--tomato); }

.ticket__patience span {
  font-family: var(--font-mono);
  font-size: calc(9px * var(--fs));
  color: var(--paper-dim);
  min-width: 30px;
  text-align: right;
}

.ticket__foot {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-top: 10px;
  border-top: 1px dashed rgba(42, 30, 23, .28);
  font-size: calc(10px * var(--fs));
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--paper-dim);
}

.ticket__foot b { font-family: var(--font-mono); font-size: calc(14px * var(--fs)); color: var(--paper-ink); }

.ticket__actions { margin-top: 11px; display: flex; flex-direction: column; gap: 6px; }
.ticket__actions .btn { height: 36px; font-size: calc(12px * var(--fs)); }
.ticket__actions .micro { color: var(--paper-dim); font-size: calc(11px * var(--fs)); }

/* fila ------------------------------------------------------------------ */

.queue-list { display: flex; flex-direction: column; gap: 4px; max-height: 170px; overflow-y: auto; scrollbar-width: thin; }
.queue-list::-webkit-scrollbar { width: 6px; }
.queue-list::-webkit-scrollbar-thumb { background: #3a2c2c; border-radius: 99px; }

.queue-row {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-areas: "tag name meta" "pat pat pat";
  gap: 2px 8px;
  padding: 7px 8px 8px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: rgba(255, 255, 255, .022);
  text-align: left;
  transition: background .15s, border-color .15s;
}

.queue-row:hover { background: rgba(255, 255, 255, .05); border-color: var(--line); }

.queue-row__tag {
  grid-area: tag;
  font-family: var(--font-mono);
  font-size: calc(11px * var(--fs));
  font-weight: 700;
  color: var(--mustard);
}

.queue-row__name {
  grid-area: name;
  font-size: calc(12px * var(--fs));
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--cream);
}

.queue-row__meta {
  grid-area: meta;
  font-family: var(--font-mono);
  font-size: calc(9px * var(--fs));
  color: var(--dim-2);
  white-space: nowrap;
}

.queue-row__pat {
  grid-area: pat;
  display: block;
  height: 2px;
  margin-top: 3px;
  border-radius: 99px;
  background: rgba(255, 255, 255, .06);
  overflow: hidden;
}

.queue-row__pat i {
  display: block;
  height: 100%;
  background: var(--mint);
  border-radius: 99px;
  transition: width .3s linear;
}

.queue-row.is-late .queue-row__tag { color: var(--tomato); }
.queue-row.is-late .queue-row__pat i { background: var(--tomato); }

/* stats ----------------------------------------------------------------- */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.stat {
  padding: 7px 8px 6px;
  border-radius: 8px;
  background: rgba(255, 255, 255, .022);
  border: 1px solid rgba(255, 255, 255, .03);
}

.stat b {
  display: block;
  font-family: var(--font-mono);
  font-size: calc(15px * var(--fs));
  font-weight: 700;
  letter-spacing: .02em;
  color: var(--cream);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stat span {
  display: block;
  font-size: calc(8px * var(--fs));
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--dim-2);
  white-space: nowrap;
}

.stat--bad b { color: var(--tomato); }

/* ------------------------------------------------------------------ tooltip */

.tip {
  position: fixed;
  z-index: 45;
  width: 248px;
  padding: 11px 12px 10px;
  border-radius: 5px;
  background: linear-gradient(180deg, #f8eeda, #eaddc2);
  color: var(--paper-ink);
  box-shadow: 0 22px 40px -20px rgba(0, 0, 0, .95), 0 0 0 1px rgba(0, 0, 0, .28);
  transform: rotate(-.7deg);
  pointer-events: none;
  animation: tipIn .14s ease-out;
}

.tip[hidden] { display: none; }

.tip::before {
  content: "";
  position: absolute;
  top: -5px;
  left: 50%;
  width: 40px;
  height: 9px;
  margin-left: -20px;
  background: rgba(0, 0, 0, .18);
  border-radius: 2px;
  filter: blur(2px);
}

.tip__head { display: flex; justify-content: space-between; align-items: baseline; }

.tip__id {
  font-family: var(--font-mono);
  font-size: calc(15px * var(--fs));
  font-weight: 700;
  letter-spacing: .02em;
}

.tip__party {
  font-family: var(--font-mono);
  font-size: calc(8.5px * var(--fs));
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--paper-dim);
}

.tip__name { font-size: calc(14px * var(--fs)); font-weight: 700; line-height: 1.2; margin-top: 1px; }

.tip__state {
  font-family: var(--font-mono);
  font-size: calc(8.5px * var(--fs));
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--paper-dim);
  margin-top: 2px;
}

.tip__items {
  margin: 8px 0 8px;
  padding: 7px 0 6px;
  border-top: 1px dashed rgba(42, 30, 23, .25);
  border-bottom: 1px dashed rgba(42, 30, 23, .25);
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: calc(12px * var(--fs));
}

.tip__items span { font-family: var(--font-mono); font-size: calc(10.5px * var(--fs)); color: #8a6f52; margin-right: 3px; }

.tip__pat {
  height: 3px;
  border-radius: 99px;
  background: rgba(42, 30, 23, .16);
  overflow: hidden;
  margin-bottom: 7px;
}

.tip__pat i { display: block; height: 100%; background: #4f7d5f; border-radius: 99px; }
.tip__pat i.is-low { background: var(--tomato); }

.tip__foot {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: calc(11px * var(--fs));
}

.tip__hint { font-size: calc(8.5px * var(--fs)); letter-spacing: .06em; text-transform: uppercase; color: var(--paper-dim); text-align: right; }

/* ------------------------------------------------------------------ overlays */

.overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 26px;
  background: rgba(8, 6, 6, .68);
  backdrop-filter: blur(7px) saturate(.9);
  animation: fadeIn .22s ease-out;
}

.overlay[hidden] { display: none; }

.overlay--intro {
  background:
    radial-gradient(900px 600px at 50% 30%, rgba(60, 28, 30, .35), transparent 70%),
    rgba(8, 6, 6, .52);
  backdrop-filter: blur(3px) saturate(.95);
}

.intro {
  width: min(660px, 100%);
  padding: 34px 38px 30px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .035), transparent 40%),
    linear-gradient(180deg, #1e1618, #150f11);
  box-shadow: 0 60px 90px -50px #000, inset 0 1px 0 rgba(255, 255, 255, .06);
  animation: riseIn .3s cubic-bezier(.2, .8, .2, 1);
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: calc(9.5px * var(--fs));
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--pink);
}

.intro h1 {
  margin-top: 10px;
  font-family: var(--font-display);
  font-size: calc(clamp(38px, 5.2vw, 60px) * var(--fs));
  font-weight: 700;
  letter-spacing: -.005em;
  line-height: .92;
  text-transform: uppercase;
}

.intro h1 em {
  font-style: normal;
  color: var(--mustard);
  text-shadow: 0 0 30px rgba(233, 180, 76, .25);
}

.intro__lead {
  margin-top: 14px;
  max-width: 46ch;
  font-size: calc(15px * var(--fs));
  line-height: 1.5;
  color: #d9c9b8;
}

.steps {
  margin-top: 22px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.steps li {
  display: flex;
  gap: 14px;
  padding: 11px 0;
  border-top: 1px dashed rgba(243, 232, 214, .12);
}

.steps li:last-child { border-bottom: 1px dashed rgba(243, 232, 214, .12); }

.steps span {
  font-family: var(--font-mono);
  font-size: calc(10px * var(--fs));
  color: var(--mustard);
  padding-top: 3px;
  letter-spacing: .1em;
}

.steps b { display: block; font-size: calc(14px * var(--fs)); letter-spacing: .01em; }
.steps div { font-size: calc(13px * var(--fs)); color: var(--dim); line-height: 1.45; }
.steps b { color: var(--cream); }

.intro__cta { display: flex; gap: 10px; margin-top: 22px; flex-wrap: wrap; }

.micro {
  margin-top: 14px;
  font-size: calc(10.5px * var(--fs));
  letter-spacing: .03em;
  color: var(--dim-2);
  line-height: 1.5;
}

.micro b { color: var(--dim); }

kbd {
  font-family: var(--font-mono);
  font-size: calc(9px * var(--fs));
  padding: 1px 4px;
  border-radius: 3px;
  border: 1px solid var(--line);
  background: #241b1d;
  color: var(--cream);
}

/* recibo --------------------------------------------------------------- */

.receipt {
  position: relative;
  width: min(398px, 100%);
  padding: 30px 28px 46px;
  border-radius: 4px;
  background: var(--paper);
  color: var(--paper-ink);
  font-family: var(--font-mono);
  box-shadow: 0 50px 80px -46px #000;
  animation: riseIn .32s cubic-bezier(.2, .8, .2, 1);
}

.receipt::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 4px;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .08);
  pointer-events: none;
}

.receipt__brand {
  font-family: var(--font-display);
  font-size: calc(30px * var(--fs));
  font-weight: 700;
  letter-spacing: .1em;
  text-align: center;
  line-height: 1;
}

.receipt__meta {
  margin-top: 5px;
  text-align: center;
  font-size: calc(9px * var(--fs));
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--paper-dim);
}

.receipt__stars {
  margin-top: 12px;
  text-align: center;
  font-size: calc(22px * var(--fs));
  letter-spacing: .22em;
  color: #b98a2c;
}

.receipt__rows {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px dashed rgba(42, 30, 23, .35);
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.receipt__row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: calc(11px * var(--fs));
  letter-spacing: .04em;
  color: #4c3b2b;
}

.receipt__row span:last-child { color: var(--paper-ink); font-weight: 700; }

.receipt__total {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 2px solid rgba(42, 30, 23, .6);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: calc(11px * var(--fs));
  letter-spacing: .14em;
  text-transform: uppercase;
}

.receipt__total b { font-size: calc(26px * var(--fs)); letter-spacing: 0; }

.receipt__actions { display: flex; gap: 8px; margin-top: 20px; }
.receipt__actions .btn { flex: 1; height: 40px; }

.receipt__actions .btn--ghost { color: var(--paper-ink); border-color: rgba(42, 30, 23, .3); }
.receipt__actions .btn--ghost:hover { background: rgba(42, 30, 23, .07); }

.receipt__barcode {
  position: absolute;
  left: 28px;
  right: 28px;
  bottom: 18px;
  height: 18px;
  background: repeating-linear-gradient(90deg, #2a1e17 0 2px, transparent 2px 4px, #2a1e17 4px 5px, transparent 5px 9px, #2a1e17 9px 12px, transparent 12px 14px);
  opacity: .55;
}

.receipt::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 12px;
  background:
    linear-gradient(-45deg, transparent 8px, var(--paper) 0) 0 0 / 16px 16px repeat-x,
    linear-gradient(45deg, transparent 8px, var(--paper) 0) 8px 0 / 16px 16px repeat-x;
  transform: translateY(11px);
}

/* modal ---------------------------------------------------------------- */

.modal {
  width: min(600px, 100%);
  max-height: calc(100dvh - 60px);
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(180deg, #1f1719, #161011);
  box-shadow: 0 60px 90px -50px #000, inset 0 1px 0 rgba(255, 255, 255, .05);
  animation: riseIn .26s cubic-bezier(.2, .8, .2, 1);
  overflow: hidden;
}

.modal--new { width: min(560px, 100%); }
.modal--pos { width: min(520px, 100%); }

.modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, .05);
}

.modal__head h2 {
  font-family: var(--font-display);
  font-size: calc(24px * var(--fs));
  font-weight: 700;
  letter-spacing: .02em;
  text-transform: uppercase;
}

.modal__body {
  padding: 16px 18px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 13px;
}

.modal__foot {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  padding: 12px 18px 16px;
  border-top: 1px solid rgba(255, 255, 255, .05);
  background: rgba(0, 0, 0, .16);
  flex-wrap: wrap;
}

.modal__foot .btn { min-width: 0; flex-shrink: 0; }
.modal__foot .btn--primary { flex: 1 1 auto; }

.rules { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.rules article {
  padding: 11px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .02);
}

.rules h3 { font-size: calc(12.5px * var(--fs)); letter-spacing: .02em; color: var(--mustard); }
.rules p { margin-top: 4px; font-size: calc(11.5px * var(--fs)); line-height: 1.45; color: var(--dim); }

.score-table { width: 100%; border-collapse: collapse; font-size: calc(11.5px * var(--fs)); }
.score-table td { padding: 6px 4px; border-bottom: 1px dashed rgba(255, 255, 255, .08); color: var(--dim); }
.score-table td:last-child { text-align: right; font-family: var(--font-mono); font-size: calc(10.5px * var(--fs)); color: var(--cream); white-space: nowrap; }

/* formulario ----------------------------------------------------------- */

.field { display: flex; flex-direction: column; gap: 5px; flex: 1; }

.field > span {
  font-family: var(--font-mono);
  font-size: calc(8.5px * var(--fs));
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--dim-2);
}

.field-row { display: flex; gap: 10px; }
.field--small { flex: 0 0 96px; }

.field input, .field select {
  height: 38px;
  padding: 0 10px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: #1a1315;
  color: var(--cream);
  font-size: calc(13px * var(--fs));
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}

.field input:focus, .field select:focus {
  border-color: var(--mustard);
  box-shadow: 0 0 0 3px rgba(233, 180, 76, .12);
}

.field input::placeholder { color: #5d4b45; }

.segmented {
  display: inline-flex;
  padding: 3px;
  gap: 3px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #1a1315;
  width: fit-content;
}

.segmented button {
  height: 28px;
  padding: 0 16px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--dim);
  font-size: calc(12px * var(--fs));
  font-weight: 600;
}

.segmented button.is-active { background: var(--mustard); color: #221607; }

.menu-picks {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  max-height: 238px;
  overflow-y: auto;
  padding-right: 2px;
  scrollbar-width: thin;
}

.pick {
  position: relative;
  display: flex;
  align-items: baseline;
  gap: 6px;
  padding: 8px 9px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .022);
  color: var(--cream);
  text-align: left;
  transition: border-color .14s, background .14s;
}

.pick:hover { border-color: var(--line-2); background: rgba(255, 255, 255, .05); }
.pick.is-on { border-color: var(--mustard); background: rgba(233, 180, 76, .1); }

.pick__name { font-size: calc(11.5px * var(--fs)); line-height: 1.25; flex: 1; }
.pick__price { font-family: var(--font-mono); font-size: calc(9.5px * var(--fs)); color: var(--dim-2); }

.pick__qty {
  font-family: var(--font-mono);
  font-size: calc(10px * var(--fs));
  font-weight: 700;
  color: var(--dim-2);
  min-width: 16px;
  text-align: center;
}

.pick.is-on .pick__qty {
  color: #2a1c06;
  background: var(--mustard);
  border-radius: 4px;
  padding: 1px 3px;
}

/* POS ------------------------------------------------------------------ */

.pos-state {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .022);
}

.pos-state__dot {
  width: 9px;
  height: 9px;
  margin-top: 4px;
  border-radius: 50%;
  background: var(--mustard);
  box-shadow: 0 0 0 4px rgba(233, 180, 76, .12);
  flex: 0 0 auto;
}

.pos-state__dot.is-live { background: var(--mint); box-shadow: 0 0 0 4px rgba(138, 217, 174, .14); }

.pos-state b { font-size: calc(13px * var(--fs)); }
.pos-state p { margin-top: 2px; font-size: calc(11.5px * var(--fs)); color: var(--dim); }

.endpoint {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #120d0e;
  font-family: var(--font-mono);
  font-size: calc(10.5px * var(--fs));
}

.endpoint span {
  font-size: calc(8px * var(--fs));
  letter-spacing: .1em;
  padding: 2px 5px;
  border-radius: 3px;
  background: rgba(127, 182, 224, .14);
  color: var(--sky);
}

.endpoint code { color: var(--dim); }

.pos-log {
  display: flex;
  flex-direction: column;
  gap: 3px;
  max-height: 150px;
  overflow-y: auto;
  font-family: var(--font-mono);
  font-size: calc(10px * var(--fs));
  color: var(--dim);
}

.pos-log__row { display: grid; grid-template-columns: 58px 92px 1fr; gap: 8px; padding: 3px 0; border-bottom: 1px dashed rgba(255, 255, 255, .06); }
.pos-log__row b { color: var(--sky); font-weight: 600; }

/* toasts --------------------------------------------------------------- */

.toasts {
  position: fixed;
  left: 50%;
  bottom: 56px;
  transform: translateX(-50%);
  z-index: 70;
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
  gap: 7px;
  pointer-events: none;
  max-width: min(560px, calc(100vw - 48px));
}

.toast {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 13px 9px 11px;
  border-radius: 10px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--dim-2);
  background: linear-gradient(180deg, #241b1d, #1a1315);
  box-shadow: 0 18px 30px -20px #000;
  font-size: calc(12.5px * var(--fs));
  line-height: 1.3;
  color: var(--cream);
  animation: toastIn .24s cubic-bezier(.2, .8, .2, 1);
}

.toast.is-out { animation: toastOut .3s ease-in forwards; }

.toast__icon {
  font-family: var(--font-mono);
  font-size: calc(11px * var(--fs));
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, .06);
  color: var(--cream);
}

.toast--ok { border-left-color: var(--mint); }
.toast--ok .toast__icon { color: var(--mint); }
.toast--score { border-left-color: var(--mustard); }
.toast--score .toast__icon { color: var(--mustard); }
.toast--warn { border-left-color: var(--mustard); }
.toast--bad { border-left-color: var(--tomato); }
.toast--bad .toast__icon { color: var(--tomato); }
.toast--level { border-left-color: var(--pink); }
.toast--level .toast__icon { color: var(--pink); }
.toast--pos { border-left-color: var(--sky); }
.toast--pos .toast__icon { color: var(--sky); }

/* ==========================================================================
   SVG del salón
   ========================================================================== */

.scene__svg text { font-family: var(--font-ui); fill: var(--cream); }
.scene__svg .hit { fill: transparent; cursor: pointer; }

.signboard__title { font-family: var(--font-display); font-size: calc(15px * var(--fs)); font-weight: 700; letter-spacing: .14em; fill: #f0e0c4; }
.signboard__sub { font-size: calc(6px * var(--fs)); letter-spacing: .12em; fill: #b09a7c; text-transform: uppercase; }
.signboard__open { font-family: var(--font-mono); font-size: calc(6px * var(--fs)); letter-spacing: .3em; fill: var(--pink); }
.queue-decal { font-family: var(--font-mono); font-size: calc(9px * var(--fs)); letter-spacing: .4em; fill: #6e5a4e; }
.door-mat { font-family: var(--font-mono); font-size: calc(5.5px * var(--fs)); letter-spacing: .16em; fill: #c9a97a; opacity: .8; }
.neon__text { font-family: var(--font-display); font-size: calc(11px * var(--fs)); font-weight: 700; letter-spacing: .18em; fill: #ffaec6; filter: drop-shadow(0 0 4px rgba(245, 120, 159, .9)); }

.pass__label { font-family: var(--font-mono); font-size: calc(7.5px * var(--fs)); letter-spacing: .2em; fill: #d6b48c; }
.pass__hint { font-family: var(--font-mono); font-size: calc(6px * var(--fs)); letter-spacing: .1em; fill: #8a715a; }
.bar__label { font-family: var(--font-mono); font-size: calc(8px * var(--fs)); letter-spacing: .24em; fill: #E2C79B; opacity: .78; }
.bar__screen { font-family: var(--font-mono); font-size: calc(6px * var(--fs)); font-weight: 700; fill: var(--mint); letter-spacing: .02em; }
.host__label { font-family: var(--font-mono); font-size: calc(5.5px * var(--fs)); letter-spacing: .18em; fill: #a08a74; }
.menu-board__title { font-family: var(--font-display); font-size: calc(11px * var(--fs)); font-weight: 700; letter-spacing: .22em; fill: #cfe0d6; }
.menu-board__line { font-size: calc(5.4px * var(--fs)); letter-spacing: .04em; fill: #93a89c; }

.unit__id { font-family: var(--font-mono); font-size: calc(8.5px * var(--fs)); font-weight: 700; fill: #d9cbb2; letter-spacing: .02em; }
.unit__badge rect { transition: fill .2s; }
.unit:hover .unit__badge rect { fill: #3a2c1c; }
.unit.is-target .hit { fill: rgba(138, 217, 174, .07); stroke: var(--mint); stroke-width: 2; stroke-dasharray: 7 7; animation: dash 1.4s linear infinite; }
.unit.is-target .unit__badge rect { fill: #1e3a2c; }
.unit.is-target .unit__id { fill: var(--mint); }

.unit .decor--occupied, .unit .decor--dirty, .unit .decor--cleaning { display: none; }
.unit.is-occupied .decor--occupied { display: block; }
.unit.is-dirty .decor--dirty, .unit.needs-clean .decor--dirty { display: block; }
.unit.is-cleaning .decor--cleaning { display: block; }
.unit.is-dirty .unit__badge rect { fill: rgba(224, 87, 63, .8); }
.unit.is-dirty .unit__id { fill: #ffe1d8; }
.unit.is-dirty .hit { cursor: pointer; }
.unit.is-cleaning .spark { animation: sparkle .9s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }

.unit--mesa .place-settings { opacity: .22; transition: opacity .3s; }
.unit--mesa.is-occupied .place-settings { opacity: 1; }
.unit--barra .unit__badge { transition: opacity .2s; }
.unit--barra.is-occupied .unit__badge { opacity: 0; }

.unit { transition: opacity .18s ease; }
.scene__svg.is-seating .unit:not(.is-target) { opacity: .32; }
.scene__svg.is-delivering .unit:not(.is-target) { opacity: .62; }
.scene__svg.is-seating .unit.is-target, .scene__svg.is-delivering .unit.is-target { opacity: 1; }

.chair rect { transition: fill .2s; }

/* clientes ------------------------------------------------------------- */

.guest { cursor: default; }
.guest__shadow { fill: #000; opacity: .34; }

.guest__tag rect { fill: #14100f; stroke: rgba(243, 232, 214, .28); stroke-width: 1; }
.guest__num { font-family: var(--font-mono); font-size: calc(9.4px * var(--fs)); font-weight: 700; fill: #f3e8d6; letter-spacing: .02em; }
.guest__dot { fill: var(--mustard); transition: fill .2s; }
.guest__dot.is-waiting { fill: var(--sky); }
.guest__dot.is-ready { fill: var(--mint); }
.guest__dot.is-eating { fill: #4fb39f; }
.guest__dot.is-seated { fill: #d8cbb2; }
.guest__dot.is-paying { fill: #f0d79a; }
.guest__dot.is-angry { fill: var(--tomato); }

.guest__ring { opacity: 0; }
.guest.is-hover .guest__tag rect { stroke: var(--cream); }
.guest.is-hover .guest__tag { filter: drop-shadow(0 0 7px rgba(243, 232, 214, .45)); }

.ring__track { fill: none; stroke: rgba(0, 0, 0, .5); stroke-width: 3.2; }
.ring__fill { fill: none; stroke: var(--mint); stroke-width: 3.2; stroke-linecap: round; transition: stroke-dashoffset .15s linear; }
.ring__fill.is-mid { stroke: var(--mustard); }
.ring__fill.is-low { stroke: var(--tomato); animation: pulse2 1s ease-in-out infinite; }

.guest.is-walking .guest__bob { animation: bob .34s ease-in-out infinite alternate; }
.guest.is-walking .guest__shadow { animation: shadowPulse .34s ease-in-out infinite alternate; }
.guest.is-sat .guest__legs { display: none; }
.guest.is-sat .guest__shadow { opacity: .22; }
.guest.is-ready .guest__tag rect { stroke: var(--mint); stroke-width: 1.6; }
.guest.is-ready .guest__tag { filter: drop-shadow(0 0 6px rgba(138, 217, 174, .65)); }
.guest.is-angry .guest__tag rect { stroke: var(--tomato); }

.companion { opacity: .96; }
.companions { pointer-events: none; }

/* platos del pase ------------------------------------------------------ */

.plate { cursor: pointer; }
.plate:hover .plate__glow { opacity: .42; }
.plate__glow { fill: var(--mint); opacity: .18; transition: opacity .2s; }
.plate__dish { fill: #f3e8d6; stroke: #c9b79b; stroke-width: 1.4; }
.plate__food { fill: #c98b52; }
.plate__steam { fill: none; stroke: rgba(243, 232, 214, .5); stroke-width: 1.6; stroke-linecap: round; animation: steam 2.2s ease-in-out infinite; }
.plate__tag rect { fill: #14100f; stroke: rgba(243, 232, 214, .3); stroke-width: .8; }
.plate__tag text { fill: #f3e8d6; font-family: var(--font-mono); font-size: calc(8px * var(--fs)); font-weight: 700; }

/* efectos -------------------------------------------------------------- */

.floater text {
  font-family: var(--font-display);
  font-size: calc(22px * var(--fs));
  font-weight: 700;
  fill: var(--mint);
  paint-order: stroke;
  stroke: rgba(0, 0, 0, .55);
  stroke-width: 3px;
  animation: floatUp 1s cubic-bezier(.2, .7, .3, 1) forwards;
}

.floater.is-mult text { font-size: calc(14px * var(--fs)); fill: var(--mustard); }
.floater.is-money text { fill: var(--mustard); }
.floater.is-bad text { fill: var(--tomato); }
.floater.is-clean text { fill: var(--sky); font-size: calc(13px * var(--fs)); }

.burst circle { fill: var(--mint); animation: spark .65s ease-out forwards; }

/* ==========================================================================
   Animaciones
   ========================================================================== */

@keyframes bob { from { transform: translateY(0); } to { transform: translateY(-3px); } }
@keyframes shadowPulse { from { transform: scale(1); opacity: .34; } to { transform: scale(.86); opacity: .26; } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }
@keyframes pulse2 { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@keyframes dash { to { stroke-dashoffset: -28; } }
@keyframes sparkle { 0%, 100% { opacity: .3; transform: scale(.7); } 50% { opacity: 1; transform: scale(1.15); } }
@keyframes steam { 0% { opacity: 0; transform: translateY(2px); } 40% { opacity: .8; } 100% { opacity: 0; transform: translateY(-7px); } }
@keyframes floatUp {
  0% { opacity: 0; transform: translateY(6px) scale(.94); }
  18% { opacity: 1; transform: translateY(0) scale(1); }
  70% { opacity: 1; transform: translateY(-26px); }
  100% { opacity: 0; transform: translateY(-44px); }
}
@keyframes spark { to { transform: translate(var(--dx), var(--dy)); opacity: 0; } }
@keyframes blink { 50% { opacity: .35; } }
@keyframes tipIn { from { opacity: 0; transform: rotate(-.7deg) translateY(4px) scale(.98); } to { opacity: 1; transform: rotate(-.7deg) translateY(0) scale(1); } }
@keyframes riseIn { from { opacity: 0; transform: translateY(14px) scale(.985); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes toastIn { from { opacity: 0; transform: translateX(-14px); } to { opacity: 1; transform: translateX(0); } }
@keyframes toastOut { to { opacity: 0; transform: translateX(-14px); } }

/* ==========================================================================
   Adaptación
   ========================================================================== */

@media (max-width: 1280px) {
  .stage { grid-template-columns: minmax(0, 1fr) 344px; }
  .brand { min-width: 0; }
  .brand__sub { display: none; }
  .meters { gap: 7px; }
  .meter { min-width: 68px; padding: 5px 10px 6px; }
  .meter__v { font-size: calc(18px * var(--fs)); }
}

@media (max-width: 1080px) {
  .topbar { gap: 14px; }
  .shift { width: 168px; }
  .stage { grid-template-columns: minmax(0, 1fr) 310px; }
  .floor__foot .legend__item:nth-child(n + 4) { display: none; }
}

@media (max-width: 880px) {
  .topbar { flex-wrap: wrap; padding: 12px 14px; gap: 12px; }
  .brand { flex: 1 1 auto; }
  .shift { flex: 1 1 150px; width: auto; }
  .intro { padding: 26px 22px 22px; }
}

@media (max-width: 880px) and (orientation: portrait) {
  body { overflow: auto; }
  .app { height: auto; min-height: 100dvh; }
  .meters { order: 4; width: 100%; margin-left: 0; }
  .tools { order: 3; }
  .stage {
    grid-template-columns: 1fr;
    padding: 0 14px 16px;
    height: auto;
  }
  .floor { min-height: 56vh; }
  .rail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    overflow: visible;
    padding-right: 0;
  }
  .panel--pass, .panel--guest { grid-column: span 1; }
  .panel--queue, .panel--stats { grid-column: span 1; }
  .pass-rail { max-height: 150px; }
  .scene { min-height: 44vh; }
}

@media (max-width: 620px) {
  .brand__mark { font-size: calc(24px * var(--fs)); }
  .meter--level, .hearts { display: none; }
  .rail { grid-template-columns: 1fr; }
  .floor__head { flex-direction: column; align-items: flex-start; gap: 6px; }
  .hint { text-align: left; font-size: calc(11px * var(--fs)); }
  .floor__foot { flex-direction: column; align-items: flex-start; gap: 6px; }
  .counts { gap: 10px; }
  .intro h1 { font-size: calc(34px * var(--fs)); }
  .rules { grid-template-columns: 1fr; }
  .menu-picks { grid-template-columns: 1fr; }
  .field-row { flex-direction: column; }
  .field--small { flex: 0 0 auto; }
  .modal__foot { flex-direction: column-reverse; }
  .modal__foot .btn { width: 100%; }
  .toasts { left: 12px; right: 12px; bottom: 12px; max-width: none; transform: none; align-items: stretch; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .guest.is-walking .guest__bob { animation: none; }
}

/* ==========================================================================
   POS · comanda editable
   ========================================================================== */

.panel--ticket { display: flex; flex-direction: column; min-height: 0; max-height: 60vh; }
#ticket-body {
  min-height: 0;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #3a2c2c transparent;
  padding-right: 2px;
}
#ticket-body::-webkit-scrollbar { width: 6px; }
#ticket-body::-webkit-scrollbar-thumb { background: #3a2c2c; border-radius: 99px; }

.ticket-empty {
  padding: 18px 6px 10px;
  text-align: center;
}
.ticket-empty .micro { margin-top: 8px; }

.ticket__lines {
  margin: 10px 0 8px;
  display: flex;
  flex-direction: column;
}

.line {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto 18px;
  grid-template-areas:
    "qty name price x"
    "qty chip chip chip";
  align-items: center;
  gap: 1px 6px;
  padding: 6px 0;
  border-bottom: 1px dashed rgba(42, 30, 23, .16);
}

.line:last-child { border-bottom: 0; }

.line__qty {
  grid-area: qty;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-family: var(--font-mono);
  font-size: calc(11px * var(--fs));
  color: #5f4c3a;
}

.line__qty--fixed { min-width: 26px; }

.line__qty button {
  width: 23px;
  height: 23px;
  border-radius: 5px;
  border: 1px solid rgba(42, 30, 23, .3);
  background: rgba(255, 255, 255, .35);
  color: var(--paper-ink);
  font-size: calc(14px * var(--fs));
  line-height: 1;
  padding: 0;
  display: grid;
  place-items: center;
}

.line__qty button:hover { background: #fff; }

.line__qty b { min-width: 14px; text-align: center; font-size: calc(12px * var(--fs)); }

.line__name {
  grid-area: name;
  font-size: calc(12.5px * var(--fs));
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.line__price {
  grid-area: price;
  font-family: var(--font-mono);
  font-size: calc(10.5px * var(--fs));
  color: #5f4c3a;
}

.line__x {
  grid-area: x;
  border: 0;
  background: none;
  color: rgba(42, 30, 23, .45);
  font-size: calc(15px * var(--fs));
  line-height: 1;
  padding: 0;
}

.line__x:hover { color: var(--tomato); }

.line__chip-wrap { grid-area: chip; }

.line--served .line__name { opacity: .55; text-decoration: line-through; text-decoration-color: rgba(42,30,23,.3); }

.lchip {
  font-style: normal;
  font-family: var(--font-mono);
  font-size: calc(7.5px * var(--fs));
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: 1px 5px;
  border-radius: 99px;
  background: rgba(42, 30, 23, .1);
  color: #6a5744;
  white-space: nowrap;
}

.lchip--pending { background: rgba(180, 130, 40, .18); color: #7a5410; }
.lchip--cook { background: rgba(60, 110, 140, .14); color: #35596b; }
.lchip--ready { background: #2f7e78; color: #eafff7; }
.lchip--served { background: rgba(42, 30, 23, .08); color: #8a7864; }

.ticket__empty-line {
  padding: 10px 0;
  font-size: calc(12px * var(--fs));
  color: var(--paper-dim);
  border-bottom: 1px dashed rgba(42, 30, 23, .18);
}

.ticket__total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-top: 8px;
  border-top: 1px dashed rgba(42, 30, 23, .28);
  font-size: calc(10px * var(--fs));
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--paper-dim);
}

.ticket__total b { font-family: var(--font-mono); font-size: calc(17px * var(--fs)); letter-spacing: 0; color: var(--paper-ink); }

.ticket__note {
  margin-top: 6px;
  font-size: calc(10.5px * var(--fs));
  color: var(--paper-dim);
  min-height: 14px;
}

.ticket__actions { margin-top: 9px; display: flex; flex-direction: column; gap: 6px; }
.ticket__actions .btn { height: 38px; font-size: calc(12.5px * var(--fs)); border-radius: 9px; }
.ticket__actions .btn b { font-family: var(--font-mono); font-size: calc(10px * var(--fs)); padding: 1px 5px; border-radius: 99px; background: rgba(0,0,0,.18); }

.btn--send { background: linear-gradient(180deg, #d8f7ea, #a9e6cf); border-color: #bdf0dc; color: #123328; font-weight: 700; }
.btn--send:hover { background: linear-gradient(180deg, #e6fff5, #b6efd9); }
.btn--serve { background: linear-gradient(180deg, #b9dff5, #8ec6e6); border-color: #c9e8f8; color: #0d2634; font-weight: 700; }
.btn--serve:hover { background: linear-gradient(180deg, #cdeaff, #9ed0ec); }
.btn--pay { background: linear-gradient(180deg, #f3cd74, #e0a83c); border-color: #f7d992; color: #271a05; font-weight: 700; }
.btn--pay:hover { background: linear-gradient(180deg, #ffdb8a, #e9b34a); }

.ticket__state.state--ordering { background: #e7d7b4; color: #4a3a1c; }
.ticket__state.state--waiting { background: #c8d8e2; color: #263a45; }
.ticket__state.state--eating { background: #b9d9c9; color: #23402f; }
.ticket__state.state--paying { background: #f0d79a; color: #4a3510; }

/* ------------------------------------------------------------------ caja mini */

.cash-mini { display: flex; flex-direction: column; gap: 2px; }

.cash-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  padding: 4px 0;
  font-size: calc(11px * var(--fs));
  color: var(--dim);
  border-bottom: 1px dashed rgba(255, 255, 255, .05);
}

.cash-row b { font-family: var(--font-mono); font-size: calc(11.5px * var(--fs)); color: var(--cream); }

.challenges { margin-top: 10px; display: flex; flex-direction: column; gap: 7px; }

.challenge { font-size: calc(10px * var(--fs)); color: var(--dim); }

.challenge__row { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 3px; }
.challenge__row b { font-family: var(--font-mono); font-size: calc(9px * var(--fs)); color: var(--dim); }
.challenge.is-done { color: var(--mint); }
.challenge.is-done .challenge__row b { color: var(--mint); }

.challenge .bar { height: 3px; border-radius: 99px; background: rgba(255, 255, 255, .07); overflow: hidden; }
.challenge .bar i { display: block; height: 100%; background: var(--mustard); border-radius: 99px; transition: width .4s ease; }
.challenge.is-done .bar i { background: var(--mint); }

/* ==========================================================================
   POS · selector de ítems
   ========================================================================== */

.drawer { position: fixed; inset: 0; z-index: 42; }
.drawer[hidden] { display: none; }

.drawer__scrim {
  position: absolute;
  inset: 0;
  background: rgba(8, 6, 6, .58);
  backdrop-filter: blur(3px);
  animation: fadeIn .18s ease-out;
}

.drawer__panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(452px, 100%);
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, #201719, #150f11);
  border-left: 1px solid var(--line);
  box-shadow: -40px 0 80px -40px #000;
  animation: slideIn .24s cubic-bezier(.2, .8, .2, 1);
}

@keyframes slideIn { from { transform: translateX(30px); opacity: .4; } to { transform: translateX(0); opacity: 1; } }

.drawer__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 18px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, .05);
}

.drawer__head h2 {
  font-family: var(--font-display);
  font-size: calc(25px * var(--fs));
  font-weight: 700;
  letter-spacing: .01em;
  line-height: 1.05;
  text-transform: uppercase;
}

.drawer__head .eyebrow { margin-bottom: 4px; }

.drawer__tools { padding: 12px 18px 8px; }

.search {
  width: 100%;
  height: 38px;
  padding: 0 12px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: #1a1315;
  color: var(--cream);
  font-size: calc(13px * var(--fs));
  outline: none;
}

.search:focus { border-color: var(--mustard); box-shadow: 0 0 0 3px rgba(233, 180, 76, .12); }
.search::placeholder { color: #5d4b45; }

.cats {
  display: flex;
  gap: 6px;
  padding: 4px 18px 10px;
  overflow-x: auto;
  scrollbar-width: none;
}

.cats::-webkit-scrollbar { display: none; }

.cats button {
  flex: 0 0 auto;
  height: 28px;
  padding: 0 12px;
  border-radius: 99px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--dim);
  font-size: calc(11px * var(--fs));
  font-weight: 600;
  letter-spacing: .01em;
}

.cats button.is-active { background: var(--cream); border-color: var(--cream); color: #241a12; }

.menu-grid {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 4px 18px 18px;
  align-content: start;
  scrollbar-width: thin;
  scrollbar-color: #3a2c2c transparent;
}

.menu-grid::-webkit-scrollbar { width: 7px; }
.menu-grid::-webkit-scrollbar-thumb { background: #3a2c2c; border-radius: 99px; }

.menu-item {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 11px 9px;
  min-height: 86px;
  text-align: left;
  border-radius: 11px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, #271d20, #201719);
  color: var(--cream);
  transition: transform .12s ease, border-color .15s, background .15s;
}

.menu-item:hover { transform: translateY(-2px); border-color: var(--line-2); background: linear-gradient(180deg, #2f2326, #251b1e); }
.menu-item.has-qty { border-color: rgba(138, 217, 174, .45); }

.menu-item__main {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  text-align: left;
}

.menu-item__name { font-size: calc(13px * var(--fs)); font-weight: 700; line-height: 1.15; }
.menu-item__meta { font-family: var(--font-mono); font-size: calc(9px * var(--fs)); color: var(--dim-2); letter-spacing: .04em; }

.menu-item__stepper {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
}

.menu-item__stepper button {
  width: 26px;
  height: 24px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .05);
  color: var(--cream);
  font-size: calc(15px * var(--fs));
  line-height: 1;
  padding: 0;
  display: grid;
  place-items: center;
}

.menu-item__stepper button:hover { border-color: var(--mint); color: var(--mint); }
.menu-item__stepper button:disabled { opacity: .3; cursor: default; }
.menu-item__stepper button:disabled:hover { border-color: var(--line); color: var(--cream); }
.menu-item__stepper b { min-width: 16px; text-align: center; font-family: var(--font-mono); font-size: calc(12px * var(--fs)); color: var(--cream); }

.drawer__foot {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px 16px;
  border-top: 1px solid rgba(255, 255, 255, .06);
  background: rgba(0, 0, 0, .2);
}

.drawer__sum { flex: 1; display: flex; flex-direction: column; gap: 1px; }
.drawer__sum b { font-size: calc(12px * var(--fs)); }
.drawer__sum span { font-family: var(--font-mono); font-size: calc(15px * var(--fs)); color: var(--mustard); }
.drawer__foot .btn { min-width: 120px; height: 40px; }

/* ==========================================================================
   POS · cobro y caja
   ========================================================================== */

.modal--pay, .modal--cash { width: min(520px, 100%); }

.pay-lines {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, .03);
  border: 1px solid rgba(255, 255, 255, .05);
  max-height: 170px;
  overflow-y: auto;
}

.pay-lines li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: calc(12px * var(--fs));
  color: var(--dim);
}

.pay-lines li b { font-family: var(--font-mono); font-size: calc(11px * var(--fs)); color: var(--cream); }

.pay-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 4px 2px;
  font-size: calc(11px * var(--fs));
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--dim-2);
}

.pay-row b { font-family: var(--font-mono); font-size: calc(14px * var(--fs)); color: var(--cream); letter-spacing: 0; }
.pay-row--sub { border-bottom: 1px dashed rgba(255, 255, 255, .1); padding-bottom: 8px; }
.pay-row--total {
  margin-top: 4px;
  padding-top: 10px;
  border-top: 2px solid rgba(255, 255, 255, .12);
  color: var(--cream);
}
.pay-row--total b { font-size: calc(24px * var(--fs)); color: var(--mustard); }

.pay-change {
  font-family: var(--font-mono);
  font-size: calc(12px * var(--fs));
  color: var(--mint);
  padding-top: 2px;
}

.pay-change.is-short { color: var(--tomato); }

.field--cash[hidden] { display: none; }

.cash-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 18px;
  padding: 6px 0 2px;
}

.cash-grid .cash-row { padding: 6px 0; }

.cash-diff {
  display: flex;
  align-items: center;
  height: 38px;
  padding: 0 10px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: #1a1315;
  font-family: var(--font-mono);
  font-size: calc(13px * var(--fs));
  color: var(--dim);
}

.cash-diff.is-good { color: var(--mint); border-color: rgba(138, 217, 174, .4); }
.cash-diff.is-bad { color: var(--tomato); border-color: rgba(224, 87, 63, .4); }

/* ------------------------------------------------------------------ unidades en el salón */

.unit.is-selected .unit__badge rect { fill: rgba(245, 120, 159, .9); }
.unit.is-selected .unit__id { fill: #2a0f18; }
.unit.is-ready .unit__badge rect { fill: rgba(138, 217, 174, .92); }
.unit.is-ready .unit__id { fill: #0f2a1f; }
.unit.is-pay .unit__badge rect { fill: rgba(233, 180, 76, .92); }
.unit.is-pay .unit__id { fill: #2a1c04; }
.unit.is-ready { animation: tableReady 1.6s ease-in-out infinite; }

@keyframes tableReady {
  0%, 100% { filter: drop-shadow(0 0 0 rgba(138, 217, 174, 0)); }
  50% { filter: drop-shadow(0 0 10px rgba(138, 217, 174, .45)); }
}

.dot.is-free { background: #6f5b56; }
.dot.is-open { background: var(--sky); }
.dot.is-pay { background: var(--mustard); }
.dot.is-dirty { background: var(--tomato); }

/* ------------------------------------------------------------------ responsive POS */

@media (max-width: 1280px) {
  .menu-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 880px) {
  .drawer__panel { width: 100%; border-left: 0; }
  .rail { display: flex; flex-direction: column; }
  .panel--ticket { min-height: 320px; }
  .ticket__lines { max-height: 260px; overflow-y: auto; }
  .cash-grid { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .menu-grid { grid-template-columns: 1fr; }
  .line { grid-template-columns: 58px minmax(0, 1fr) auto 16px; }
  .ticket__name { font-size: calc(16px * var(--fs)); }
}

/* ==========================================================================
   POS v2 · pipeline, editor de ítems y drag & drop
   ========================================================================== */

.ticket__state.stage--fila { background: #d9c8ab; color: #4a3a2a; }
.ticket__state.stage--barra { background: #c8d8e2; color: #263a45; }
.ticket__state.stage--mesa { background: #b9d9c9; color: #23402f; }
.ticket__state.stage--salio { background: #8ad9ae; color: #123326; }
.ticket__state.stage--terminado { background: #e9b44c; color: #2a1c04; }

.lchip--sent { background: rgba(60, 110, 140, .14); color: #35596b; }

.qsent {
  font-style: normal;
  font-family: var(--font-mono);
  font-size: calc(7.5px * var(--fs));
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--sky);
  margin-left: 3px;
}

.btn--sm { height: 30px; padding: 0 10px; font-size: calc(11px * var(--fs)); border-radius: 8px; }

.drawer__head-actions { display: flex; align-items: flex-start; gap: 6px; }

/* historial de terminados */

.queue-done {
  margin-top: 10px;
  padding-top: 9px;
  border-top: 1px dashed rgba(255, 255, 255, .09);
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.queue-done[hidden] { display: none; }

.queue-done__title {
  font-family: var(--font-mono);
  font-size: calc(8px * var(--fs));
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--dim-2);
}

.queue-done__row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto auto;
  gap: 6px;
  align-items: baseline;
  font-size: calc(10.5px * var(--fs));
  color: var(--dim);
}

.queue-done__tag { font-family: var(--font-mono); font-size: calc(9px * var(--fs)); color: var(--mint); }
.queue-done__name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.queue-done__method {
  font-family: var(--font-mono);
  font-size: calc(7.5px * var(--fs));
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--dim-2);
}
.queue-done__row b { font-family: var(--font-mono); font-size: calc(9.5px * var(--fs)); color: var(--cream); }

/* drag & drop */

.guest { cursor: grab; }
.scene__svg.is-dragging { cursor: grabbing; }
.guest.is-dragging { filter: drop-shadow(0 10px 12px rgba(0, 0, 0, .65)); pointer-events: none; }
.guest.is-dragging .hit { pointer-events: none; }
.scene__svg.is-dragging .guest:not(.is-dragging) .hit { pointer-events: none; }

.scene__svg.is-dragging .unit:not(.is-droppable) { opacity: .38; }
.scene__svg.is-dragging .unit.is-droppable { opacity: 1; }
.unit.is-droppable .hit {
  stroke: rgba(138, 217, 174, .85);
  stroke-width: 2;
  stroke-dasharray: 5 7;
  fill: rgba(138, 217, 174, .05);
  animation: dash 1.6s linear infinite;
}
.unit.is-drop-hover .hit {
  stroke: var(--mint);
  stroke-width: 3.5;
  fill: rgba(138, 217, 174, .2);
}

/* zona de salida: solo activa mientras se arrastra */

.exit-zone { opacity: 0; pointer-events: none; transition: opacity .15s ease; }
.scene__svg.is-dragging .exit-zone { opacity: 1; pointer-events: all; }

.exit-zone__rect {
  fill: rgba(224, 87, 63, .1);
  stroke: var(--tomato);
  stroke-width: 2;
  stroke-dasharray: 7 6;
}

.exit-zone__label {
  font-family: var(--font-mono);
  font-size: calc(10px * var(--fs));
  letter-spacing: .24em;
  fill: var(--tomato);
}

.exit-zone__sub {
  font-family: var(--font-mono);
  font-size: calc(7px * var(--fs));
  letter-spacing: .08em;
  fill: rgba(224, 87, 63, .8);
}

/* ==========================================================================
   Cocina: comandas que se encienden y detalle con botón "listo"
   ========================================================================== */

.kitchen-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 164px;
  overflow-y: auto;
  scrollbar-width: thin;
}

.kitchen-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-areas:
    "tag who state"
    "items items items";
  gap: 2px 8px;
  padding: 7px 8px;
  border-radius: 8px;
  border: 1px solid rgba(233, 180, 76, .28);
  background: rgba(233, 180, 76, .06);
  text-align: left;
  transition: border-color .15s, background .15s;
}

.kitchen-row:hover { border-color: var(--mustard); background: rgba(233, 180, 76, .12); }
.kitchen-row.is-ready { border-color: rgba(138, 217, 174, .45); background: rgba(138, 217, 174, .08); }

.kitchen-row__tag {
  grid-area: tag;
  font-family: var(--font-mono);
  font-size: calc(10.5px * var(--fs));
  font-weight: 700;
  color: var(--mustard);
}

.kitchen-row__who {
  grid-area: who;
  font-size: calc(11px * var(--fs));
  color: var(--cream);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.kitchen-row__state {
  grid-area: state;
  font-family: var(--font-mono);
  font-size: calc(7.5px * var(--fs));
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--mustard);
  white-space: nowrap;
}

.kitchen-row.is-ready .kitchen-row__state { color: var(--mint); }
.kitchen-row.is-ready .kitchen-row__tag { color: var(--mint); }

.kitchen-row__items {
  grid-area: items;
  font-size: calc(9.5px * var(--fs));
  color: var(--dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* tarjetas de comanda en el pase */

.kt { cursor: pointer; }
.kt rect:first-child {
  fill: #F6EBD8;
  stroke: rgba(42, 30, 23, .4);
  stroke-width: 1;
  filter: drop-shadow(0 3px 4px rgba(0, 0, 0, .45));
  transition: fill .2s, stroke .2s;
}
.kt:hover rect:first-child { stroke: var(--mustard); }
.kt--empty { pointer-events: none; opacity: .18; }
.kt--empty rect:first-child { fill: #E8DCC2; stroke: rgba(232, 220, 194, .3); filter: none; }
.kt.is-ready rect:first-child { fill: #DFF3E6; stroke: var(--mint); }
.kt__clip { fill: #8C7A5F; }
.kt__dot { fill: var(--mustard); }
.kt.is-ready .kt__dot { fill: var(--mint); }
.scene__svg .kt__tag { font-family: var(--font-mono); font-size: calc(7.8px * var(--fs)); font-weight: 700; fill: #2A1E17; letter-spacing: -.01em; }
.scene__svg .kt__sub { font-family: var(--font-mono); font-size: calc(6px * var(--fs)); fill: #7C6753; letter-spacing: .02em; }
.scene__svg .kt.is-ready .kt__tag { fill: #14503A; }
.scene__svg .kt.is-ready .kt__sub { fill: #2F7E78; }
.kt__more { font-family: var(--font-mono); font-size: calc(6px * var(--fs)); fill: var(--dim); }

/* detalle de la comanda de cocina */

.kcard {
  position: fixed;
  z-index: 46;
  width: 360px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(180deg, #241B1D, #170F11);
  box-shadow: 0 30px 60px -30px #000, inset 0 1px 0 rgba(255, 255, 255, .05);
  animation: riseIn .18s ease-out;
}

.kcard[hidden] { display: none; }

.kcard__head { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.kcard__head .btn { margin-left: auto; }

.kcard__id {
  font-family: var(--font-mono);
  font-size: calc(17px * var(--fs));
  font-weight: 700;
  color: var(--mustard);
  letter-spacing: .02em;
}

.kcard__state {
  font-family: var(--font-mono);
  font-size: calc(7.5px * var(--fs));
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 99px;
  background: rgba(233, 180, 76, .15);
  color: var(--mustard);
}

.kcard__state.is-ready { background: rgba(138, 217, 174, .16); color: var(--mint); }

.kcard__who { font-size: calc(12px * var(--fs)); color: var(--dim); margin-bottom: 9px; }

.kcard__items {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 9px 0;
  border-top: 1px dashed rgba(255, 255, 255, .1);
  border-bottom: 1px dashed rgba(255, 255, 255, .1);
  margin-bottom: 9px;
}

.kcard__items li { display: flex; align-items: baseline; gap: 6px; font-size: calc(12.5px * var(--fs)); color: var(--cream); }
.kcard__items li span { font-family: var(--font-mono); font-size: calc(10px * var(--fs)); color: var(--dim-2); }
.kcard__items li em {
  margin-left: auto;
  font-style: normal;
  font-family: var(--font-mono);
  font-size: calc(7.5px * var(--fs));
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--dim-2);
}

.kcard__meta { font-family: var(--font-mono); font-size: calc(9px * var(--fs)); color: var(--dim-2); margin-bottom: 10px; }
.kcard__ready { width: 100%; height: 38px; font-size: calc(12.5px * var(--fs)); }
.kcard__ready[hidden] { display: none !important; }

.scene__svg.is-dragging .exit-zone:hover .exit-zone__rect {
  fill: rgba(224, 87, 63, .22);
}

/* editor de ítems */

.modal--editor { width: min(660px, 100%); }

.editor__list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 236px;
  overflow-y: auto;
  padding-right: 2px;
  scrollbar-width: thin;
}

.editor-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, .022);
}

.editor-row__main b { display: block; font-size: calc(12.5px * var(--fs)); }
.editor-row__main span {
  display: block;
  font-family: var(--font-mono);
  font-size: calc(8px * var(--fs));
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--dim-2);
}

.editor-row__price { font-family: var(--font-mono); font-size: calc(11px * var(--fs)); color: var(--mustard); }
.editor-row__actions { display: flex; gap: 4px; }

.mini-btn {
  height: 25px;
  padding: 0 9px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: #241b1d;
  color: var(--cream);
  font-size: calc(10px * var(--fs));
}

.mini-btn:hover { border-color: var(--line-2); }
.mini-btn--danger:hover { border-color: var(--tomato); color: var(--tomato); }

.editor__form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px dashed rgba(255, 255, 255, .09);
}

.editor__actions { display: flex; justify-content: flex-end; gap: 8px; }

/* número de pedido T{torre}-{piso}-{apto} */

.order-no {
  display: flex;
  align-items: center;
  gap: 7px;
}

.order-no__fixed {
  font-family: var(--font-mono);
  font-size: calc(18px * var(--fs));
  font-weight: 700;
  color: var(--mustard);
  padding-right: 1px;
}

.order-no select,
.order-no input {
  height: 40px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: #1a1315;
  color: var(--cream);
  font-family: var(--font-mono);
  text-align: center;
  outline: none;
}

.order-no select { width: 62px; padding: 0 8px; }
.order-no input { flex: 1; min-width: 0; padding: 0 8px; font-size: calc(14px * var(--fs)); }
.order-no input::placeholder { color: #5d4b45; font-size: calc(10px * var(--fs)); letter-spacing: .06em; text-transform: uppercase; }
.order-no select:focus, .order-no input:focus { border-color: var(--mustard); box-shadow: 0 0 0 3px rgba(233, 180, 76, .12); }

.order-no__sep { color: var(--dim-2); font-family: var(--font-mono); }

.order-no__preview {
  margin-top: 7px;
  font-family: var(--font-mono);
  font-size: calc(11px * var(--fs));
  letter-spacing: .06em;
  color: var(--dim-2);
}

.order-no__preview b { color: var(--mustard); font-size: calc(14px * var(--fs)); letter-spacing: .02em; text-decoration: none; }
.order-no__preview b.is-taken { color: var(--tomato); }









.unit.is-off { display: none; }


/* salón configurable */
.room-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px dashed rgba(255,255,255,.08); }
.room-row:last-of-type { border-bottom: 0; }
.room-row b { display: block; font-size: calc(13px * var(--fs)); color: var(--cream); }
.room-row small { display: block; font-family: var(--font-mono); font-size: calc(8.5px * var(--fs)); letter-spacing: .04em; color: var(--dim-2); margin-top: 2px; }
.stepper--lg { gap: 4px; }
.stepper--lg button { width: 30px; height: 30px; font-size: calc(16px * var(--fs)); }
.stepper--lg b { min-width: 30px; font-family: var(--font-mono); font-size: calc(15px * var(--fs)); text-align: center; color: var(--mustard); }
.stepper--lg button:disabled { opacity: .3; cursor: not-allowed; }

.stepper--lg {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.stepper--lg button {
  appearance: none;
  -webkit-appearance: none;
  width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, .05);
  color: var(--cream);
  font-size: calc(16px * var(--fs));
  line-height: 1;
  cursor: pointer;
}
.stepper--lg button:hover:not(:disabled) { border-color: var(--mustard); color: var(--mustard); }
.stepper--lg button:disabled { opacity: .3; cursor: not-allowed; }
.stepper--lg b { min-width: 28px; text-align: center; font-family: var(--font-mono); font-size: calc(15px * var(--fs)); color: var(--mustard); }

/* tiempos reales por etapa */
.times { margin: 10px 0 4px; padding: 9px 0 4px; border-top: 1px dashed rgba(42, 30, 23, .14); }
.times__head { display: flex; justify-content: space-between; font-family: var(--font-mono); font-size: calc(8px * var(--fs)); letter-spacing: .1em; text-transform: uppercase; color: var(--dim-2); margin-bottom: 6px; }
.times__head b { color: #2A1E17; font-size: calc(10.5px * var(--fs)); letter-spacing: .04em; }
.times__row { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 6px; margin-bottom: 4px; }
.times__label { display: flex; align-items: center; gap: 5px; font-size: calc(10.5px * var(--fs)); color: #7C6753; }
.times__row b { font-family: var(--font-mono); font-size: calc(10px * var(--fs)); color: #7C6753; }
.times__row.is-active .times__label { color: #2A1E17; font-weight: 600; }
.times__row.is-active b { color: #A66A12; }
.times__dot { width: 5px; height: 5px; border-radius: 50%; background: var(--mustard); animation: pulse 1.4s ease-in-out infinite; }
.times__bar { grid-column: 1 / -1; height: 4px; border-radius: 99px; background: rgba(42, 30, 23, .1); overflow: hidden; }
.times__bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--mint), var(--mustard)); transition: width .25s linear; }
.times__row.is-active .times__bar i { background: linear-gradient(90deg, var(--mustard), var(--tomato)); }


@media (max-width: 880px) and (orientation: portrait) {
  .floor { min-height: 0; }
  .scene { min-height: 0; aspect-ratio: 1280 / 760; }
}



/* nombre del restaurante configurable */
.room-row--name { align-items: flex-start; }
.room-input {
  width: 190px;
  height: 38px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #1a1315;
  color: var(--cream);
  font-family: var(--font-mono);
  font-size: calc(12px * var(--fs));
  letter-spacing: .04em;
  text-transform: uppercase;
  outline: none;
}
.room-input:focus { border-color: var(--mustard); box-shadow: 0 0 0 3px rgba(233, 180, 76, .12); }
.brand-sizes { display: inline-flex; gap: 4px; }
.brand-sizes button {
  appearance: none;
  -webkit-appearance: none;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, .04);
  color: var(--dim);
  font-family: var(--font-mono);
  font-size: calc(9px * var(--fs));
  letter-spacing: .04em;
  cursor: pointer;
}
.brand-sizes button.is-active {
  border-color: var(--mustard);
  color: var(--mustard);
  background: rgba(233, 180, 76, .1);
}

/* registro de turnos */
.shift-log { margin-top: 12px; padding-top: 10px; border-top: 1px dashed rgba(255, 255, 255, .1); }
.shift-log__title {
  display: block;
  margin-bottom: 6px;
  font-family: var(--font-mono);
  font-size: calc(8px * var(--fs));
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--dim-2);
}
.shift-log__row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 4px 0;
  border-bottom: 1px dashed rgba(255, 255, 255, .05);
}
.shift-log__when { font-family: var(--font-mono); font-size: calc(9px * var(--fs)); color: var(--cream); }
.shift-log__meta { font-family: var(--font-mono); font-size: calc(9px * var(--fs)); color: var(--dim); text-align: right; }

/* horizontal obligatorio en tablet/celular */
.rotate-guard { display: none; }
@media (orientation: portrait) and (max-width: 1100px) {
  .rotate-guard {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 24px;
    text-align: center;
    background: radial-gradient(60% 60% at 50% 40%, #241819, #120d0f 72%);
  }
  .rotate-guard__icon { font-size: calc(54px * var(--fs)); color: var(--mustard); animation: rotateHint 2.4s ease-in-out infinite; }
  .rotate-guard h2 { font-family: var(--font-display); font-size: calc(26px * var(--fs)); color: var(--cream); }
  .rotate-guard p {
    font-family: var(--font-mono);
    font-size: calc(11px * var(--fs));
    letter-spacing: .08em;
    color: var(--dim);
  }
}
@keyframes rotateHint {
  0%, 100% { transform: rotate(0); }
  50% { transform: rotate(90deg); }
}

@media (orientation: landscape) and (max-height: 540px) {
  .app { min-height: 0; }
  .topbar { padding: 8px 12px; gap: 14px; }
  .brand__mark { font-size: calc(26px * var(--fs)); }
  .brand__sub { display: none; }
  .meters { display: none; }
  .shift { width: 150px; }
  .tools { margin-left: auto; }
  .floor, .scene { min-height: 0; }
  .floor__foot { padding: 6px 12px; }
  .panel--ticket { min-height: 0; }
}


/* escala global de tipografía (Salón → Tamaño de fuente) */
:root { --fs: 1; }
html[data-ui-size="md"] { --fs: 1.12; }
html[data-ui-size="lg"] { --fs: 1.25; }
.scene__svg { --fs: 1; }

.credit-link {
  color: var(--mustard);
  text-decoration: none;
  border-bottom: 1px dotted rgba(233, 180, 76, .5);
}
.credit-link:hover { color: var(--pink); border-bottom-color: var(--pink); }

/* estado de la base de datos */
.sync-state {
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: calc(9px * var(--fs));
  letter-spacing: .04em;
  color: var(--mint);
}
.sync-state.is-off { color: var(--tomato); }
.sync-state.is-pending { color: var(--mustard); }
