/* Shake Evolution POS — línea neón sobre negro, como el logo del bar.
   Diseño para tablet en ambiente nocturno: fondo oscuro, botones grandes, cifras en condensada. */
@font-face { font-family: 'Barlow Condensed'; font-weight: 500; src: url(/vendor/fonts/barlow/files/barlow-condensed-latin-500-normal.woff2) format('woff2'); font-display: swap; }
@font-face { font-family: 'Barlow Condensed'; font-weight: 600; src: url(/vendor/fonts/barlow/files/barlow-condensed-latin-600-normal.woff2) format('woff2'); font-display: swap; }
@font-face { font-family: 'Barlow Condensed'; font-weight: 700; src: url(/vendor/fonts/barlow/files/barlow-condensed-latin-700-normal.woff2) format('woff2'); font-display: swap; }
@font-face { font-family: 'Manrope'; font-weight: 400; src: url(/vendor/fonts/manrope/files/manrope-latin-400-normal.woff2) format('woff2'); font-display: swap; }
@font-face { font-family: 'Manrope'; font-weight: 600; src: url(/vendor/fonts/manrope/files/manrope-latin-600-normal.woff2) format('woff2'); font-display: swap; }
@font-face { font-family: 'Manrope'; font-weight: 700; src: url(/vendor/fonts/manrope/files/manrope-latin-700-normal.woff2) format('woff2'); font-display: swap; }
@font-face { font-family: 'Pacifico'; font-weight: 400; src: url(/vendor/fonts/pacifico/files/pacifico-latin-400-normal.woff2) format('woff2'); font-display: swap; }

:root {
  --ink: #0b090e;
  --s1: #15121a;
  --s2: #1e1a25;
  --s3: #29232f;
  --line: #342d3c;
  --tx: #f3eff7;
  --mut: #9d94a8;
  --neon: #ff3d9a;       /* magenta del borde del logo */
  --neon-d: #ff3d9a26;
  --ice: #46e2f2;        /* cian secundario */
  --ice-d: #46e2f21f;
  --ok: #3ddc84; --ok-d: #3ddc8422;
  --warn: #ffb547; --warn-d: #ffb54724;
  --bad: #ff5c5c; --bad-d: #ff5c5c22;
  --f-num: 'Barlow Condensed', 'Arial Narrow', system-ui, sans-serif;
  --f-tx: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --f-brand: 'Pacifico', cursive;
  --r: 10px;
  color-scheme: dark;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; margin: 0; }
body { background: var(--ink); color: var(--tx); font: 15px/1.45 var(--f-tx); overscroll-behavior: none; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--ice); outline-offset: 2px; }
[hidden] { display: none !important; }
.num { font-family: var(--f-num); font-variant-numeric: tabular-nums; letter-spacing: .01em; }
.mut { color: var(--mut); }
.small { font-size: 13px; }
.lbl { font: 600 12px/1 var(--f-num); letter-spacing: .12em; text-transform: uppercase; color: var(--mut); }
h1, h2, h3 { font-family: var(--f-num); font-weight: 700; letter-spacing: .02em; margin: 0; text-wrap: balance; }
h1 { font-size: 30px; } h2 { font-size: 22px; } h3 { font-size: 17px; letter-spacing: .06em; text-transform: uppercase; }

/* ---------- Estructura ---------- */
#app { height: 100%; display: flex; flex-direction: column; }
.top { display: flex; align-items: center; gap: 14px; padding: 8px max(14px, env(safe-area-inset-right)) 8px max(14px, env(safe-area-inset-left)); padding-top: max(8px, env(safe-area-inset-top)); background: var(--s1); border-bottom: 1px solid var(--line); min-height: 58px; }
.brand { font-family: var(--f-brand); font-size: 22px; line-height: 1; white-space: nowrap; text-shadow: 1.5px 0 var(--neon), -1.5px 0 var(--ice); }
.brand small { display: block; font: 600 9px/1 var(--f-num); letter-spacing: .3em; text-transform: uppercase; color: var(--mut); text-shadow: none; margin-top: 3px; }
.nav { display: flex; gap: 4px; overflow-x: auto; flex: 1; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav button { background: none; border: 0; color: var(--mut); padding: 10px 14px; border-radius: 8px; font: 600 16px/1 var(--f-num); letter-spacing: .05em; text-transform: uppercase; white-space: nowrap; position: relative; }
.nav button.on { color: var(--tx); background: var(--s3); }
.nav button .badge { position: absolute; top: 3px; right: 3px; }
.who { display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.net { width: 10px; height: 10px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 8px var(--ok); }
.net.off { background: var(--bad); box-shadow: 0 0 8px var(--bad); }
.main { flex: 1; min-height: 0; overflow: auto; padding: 16px max(16px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left)); }
.main.flush { padding: 0; overflow: hidden; }
.badge { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--neon); color: #fff; font: 700 12px/1 var(--f-num); }

/* ---------- Controles ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 18px; border-radius: var(--r); border: 1px solid var(--line); background: var(--s2); font-weight: 700; white-space: nowrap; transition: transform .06s, background .15s; touch-action: manipulation; }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .45; pointer-events: none; }
.btn.pri { background: var(--neon); border-color: var(--neon); color: #fff; }
.btn.ice { background: var(--ice); border-color: var(--ice); color: #06181b; }
.btn.ok { background: var(--ok); border-color: var(--ok); color: #04170c; }
.btn.bad { background: transparent; border-color: var(--bad); color: var(--bad); }
.btn.ghost { background: transparent; }
.btn.sm { min-height: 36px; padding: 0 12px; font-size: 13px; }
.btn.lg { min-height: 60px; font-size: 18px; padding: 0 24px; }
.btn.block { width: 100%; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.end { justify-content: flex-end; }
.row.between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > span { font: 600 12px/1 var(--f-num); letter-spacing: .1em; text-transform: uppercase; color: var(--mut); }
.inp, select.inp, textarea.inp { width: 100%; min-height: 46px; padding: 10px 12px; background: var(--ink); border: 1px solid var(--line); border-radius: 8px; }
textarea.inp { min-height: 70px; resize: vertical; }
.inp:focus { border-color: var(--ice); outline: none; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 700px) { .grid2, .grid3 { grid-template-columns: 1fr; } }
.seg { display: inline-flex; background: var(--ink); border: 1px solid var(--line); border-radius: 10px; padding: 3px; gap: 3px; flex-wrap: wrap; }
.seg button { border: 0; background: none; padding: 9px 14px; border-radius: 7px; color: var(--mut); font: 600 14px/1 var(--f-num); letter-spacing: .06em; text-transform: uppercase; }
.seg button.on { background: var(--s3); color: var(--tx); }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 99px; font: 600 12px/1.4 var(--f-num); letter-spacing: .08em; text-transform: uppercase; border: 1px solid currentColor; white-space: nowrap; }
.chip.pendiente { color: var(--warn); } .chip.preparando { color: var(--ice); } .chip.listo { color: var(--ok); }
.chip.entregado, .chip.pagado { color: var(--mut); } .chip.anulado { color: var(--bad); } .chip.credito { color: var(--neon); } .chip.abierto { color: var(--ice); }
.panel { background: var(--s1); border: 1px solid var(--line); border-radius: 12px; padding: 16px; min-width: 0; }
.panel > h3 { margin-bottom: 12px; }
.sect { display: grid; gap: 16px; }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; align-items: start; }
.empty { padding: 40px 16px; text-align: center; color: var(--mut); }
.empty b { display: block; color: var(--tx); font: 700 20px/1.2 var(--f-num); letter-spacing: .04em; margin-bottom: 6px; }

/* Tablas */
.tw { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; }
table.t { width: 100%; border-collapse: collapse; font-size: 14px; }
.t th { text-align: left; font: 600 12px/1 var(--f-num); letter-spacing: .1em; text-transform: uppercase; color: var(--mut); padding: 11px 12px; background: var(--s2); white-space: nowrap; position: sticky; top: 0; }
.t td { padding: 10px 12px; border-top: 1px solid var(--line); vertical-align: middle; }
.t td.n, .t th.n { text-align: right; font-family: var(--f-num); font-variant-numeric: tabular-nums; font-size: 16px; }
.t tr.click { cursor: pointer; }
.t tr.click:hover td { background: var(--s2); }
.t tfoot td { font-weight: 700; background: var(--s2); }

/* KPIs */
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.kpi { background: var(--s1); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; min-width: 0; }
.kpi .v { font: 700 30px/1.05 var(--f-num); font-variant-numeric: tabular-nums; margin-top: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi .s { color: var(--mut); font-size: 12.5px; margin-top: 3px; }
.kpi.pos .v { color: var(--ok); } .kpi.neg .v { color: var(--bad); } .kpi.hot .v { color: var(--neon); } .kpi.cold .v { color: var(--ice); }
.chartbox { position: relative; height: 260px; }

/* ---------- Login ---------- */
.login { min-height: 100%; display: grid; place-items: center; padding: 24px max(16px, env(safe-area-inset-right)) 24px max(16px, env(safe-area-inset-left)); background: radial-gradient(ellipse 60% 50% at 50% 0%, #ff3d9a14, transparent 70%), var(--ink); }
.login-box { width: min(880px, 100%); display: grid; grid-template-columns: 1fr 340px; gap: 28px; align-items: start; }
@media (max-width: 760px) { .login-box { grid-template-columns: 1fr; } }
.logo-big { font-family: var(--f-brand); font-size: 54px; line-height: .95; text-shadow: 2px 0 var(--neon), -2px 0 var(--ice); }
.logo-big small { display: block; font: 600 13px/1 var(--f-num); letter-spacing: .4em; color: var(--mut); text-shadow: none; margin-top: 10px; text-transform: uppercase; }
.users { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; margin-top: 22px; }
.ucard { background: var(--s1); border: 1px solid var(--line); border-radius: 12px; padding: 14px 12px; text-align: left; display: flex; flex-direction: column; gap: 8px; min-height: 96px; }
.ucard.on { border-color: var(--neon); background: var(--neon-d); }
.avatar { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font: 700 16px/1 var(--f-num); background: var(--s3); color: var(--tx); }
.ucard b { font-size: 14px; line-height: 1.2; }
.pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.pad button { height: 64px; border-radius: 12px; border: 1px solid var(--line); background: var(--s2); font: 600 28px/1 var(--f-num); }
.pad button:active { background: var(--s3); }
.dots { display: flex; gap: 12px; justify-content: center; margin: 14px 0 18px; height: 16px; }
.dots i { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--line); }
.dots i.f { background: var(--neon); border-color: var(--neon); box-shadow: 0 0 10px var(--neon); }

/* ---------- POS ---------- */
.posv { display: grid; grid-template-columns: minmax(0, 1fr) 390px; height: 100%; }
@media (max-width: 900px) { .posv { grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr) auto; } }
.pos-menu { display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.cats { display: flex; gap: 6px; padding: 12px 16px; overflow-x: auto; border-bottom: 1px solid var(--line); scrollbar-width: none; flex-shrink: 0; }
.cats button { border: 1px solid var(--line); background: var(--s1); border-radius: 99px; padding: 10px 16px; font: 600 15px/1 var(--f-num); letter-spacing: .05em; text-transform: uppercase; white-space: nowrap; color: var(--mut); }
.cats button.on { color: var(--tx); border-color: var(--neon); background: var(--neon-d); }
.search { padding: 10px 16px 0; flex-shrink: 0; }
.prods { flex: 1; overflow-y: auto; padding: 14px 16px 24px; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; align-content: start; grid-auto-rows: max-content; }
.prod { position: relative; background: var(--s1); border: 1px solid var(--line); border-radius: 12px; padding: 0; text-align: left; overflow: hidden; display: flex; flex-direction: column; transition: transform .06s; }
.prod:active { transform: scale(.97); }
.prod .ph { height: 92px; width: 100%; flex-shrink: 0; background: var(--s2); display: grid; place-items: center; overflow: hidden; }
.prod .ph img { width: 100%; height: 100%; object-fit: cover; }
.prod .ph .mono { font-family: var(--f-brand); font-size: 34px; color: var(--s3); text-shadow: 1px 0 var(--neon-d), -1px 0 var(--ice-d); }
.prod .b { padding: 9px 10px 10px; display: flex; flex-direction: column; gap: 6px; flex: 1; min-height: 72px; }
.prod .b b { font-size: 13.5px; line-height: 1.2; }
.prod .b .p { font: 700 20px/1 var(--f-num); color: var(--ice); margin-top: auto; }
.prod .q { position: absolute; top: 8px; right: 8px; }
.prod.off { opacity: .4; }
.ticket { background: var(--s1); border-left: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
@media (max-width: 900px) { .ticket { border-left: 0; border-top: 1px solid var(--line); max-height: 52vh; } }
.ticket-h { padding: 14px 16px; border-bottom: 1px solid var(--line); display: grid; gap: 10px; }
.ticket-l { flex: 1; overflow-y: auto; padding: 6px 0; min-height: 80px; }
.tl { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 9px 16px; border-bottom: 1px dashed var(--line); }
.tl .qty { display: flex; align-items: center; gap: 2px; }
.tl .qty button { width: 34px; height: 34px; border-radius: 8px; border: 1px solid var(--line); background: var(--s2); font: 700 18px/1 var(--f-num); }
.tl .qty span { width: 28px; text-align: center; font: 700 18px/1 var(--f-num); }
.tl .nm { font-weight: 600; font-size: 14px; line-height: 1.25; }
.tl .nt { font-size: 12px; color: var(--warn); }
.tl .pr { font: 700 18px/1 var(--f-num); }
.ticket-f { padding: 14px 16px; border-top: 1px solid var(--line); display: grid; gap: 10px; padding-bottom: max(14px, env(safe-area-inset-bottom)); }
.tot { display: flex; justify-content: space-between; align-items: baseline; }
.tot b { font: 700 38px/1 var(--f-num); }

/* Cuentas abiertas */
.accts { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.acct { background: var(--s1); border: 1px solid var(--line); border-radius: 12px; padding: 14px; text-align: left; display: grid; gap: 8px; }
.acct .hd { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.acct .mesa { font: 700 22px/1 var(--f-num); letter-spacing: .03em; }
.acct .amt { font: 700 26px/1 var(--f-num); }
.prog { display: flex; height: 6px; border-radius: 3px; overflow: hidden; background: var(--s3); gap: 2px; }
.prog i { display: block; }

/* ---------- Barra (KDS) ---------- */
.kds-top { display: flex; gap: 10px; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.kds { flex: 1; overflow-x: auto; overflow-y: hidden; display: flex; gap: 12px; padding: 14px 16px; align-items: flex-start; height: calc(100% - 66px); }
.kcard { flex: 0 0 270px; max-height: 100%; display: flex; flex-direction: column; background: var(--s1); border: 1px solid var(--line); border-top: 4px solid var(--ice); border-radius: 12px; overflow: hidden; }
.kcard.late { border-top-color: var(--warn); } .kcard.very { border-top-color: var(--bad); animation: pulse 1.6s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 3px var(--bad-d); } }
@media (prefers-reduced-motion: reduce) { .kcard.very { animation: none; } }
.kcard .kh { padding: 12px 14px; display: flex; justify-content: space-between; align-items: baseline; background: var(--s2); }
.kcard .kh b { font: 700 26px/1 var(--f-num); }
.kcard .kh .tm { font: 700 22px/1 var(--f-num); }
.kcard .km { padding: 6px 14px 8px; font-size: 12.5px; color: var(--mut); background: var(--s2); border-bottom: 1px solid var(--line); }
.kcard .ki { overflow-y: auto; }
.kit { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); text-align: left; width: 100%; background: none; border-left: 0; border-right: 0; border-top: 0; }
.kit .kq { font: 700 30px/1 var(--f-num); }
.kit .kn { font: 700 17px/1.15 var(--f-tx); }
.kit .knt { color: var(--warn); font-size: 13px; margin-top: 3px; font-weight: 600; }
.kit.preparando { background: var(--ice-d); }
.kit.listo { background: var(--ok-d); }
.kit.listo .kn { text-decoration: line-through; text-decoration-color: var(--ok); }
.kcard .kf { padding: 10px; }

/* ---------- Modal ---------- */
.ov { position: fixed; inset: 0; background: #000b; display: grid; place-items: center; z-index: 50; padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left)); animation: fade .12s; }
@keyframes fade { from { opacity: 0; } }
.modal { width: min(560px, 100%); max-height: 100%; overflow-y: auto; background: var(--s1); border: 1px solid var(--line); border-radius: 16px; display: flex; flex-direction: column; }
.modal.wide { width: min(880px, 100%); }
.modal .mh { padding: 16px 18px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 10px; position: sticky; top: 0; background: var(--s1); z-index: 2; }
.modal .mb { padding: 18px; display: grid; gap: 14px; }
.modal .mf { padding: 14px 18px; border-top: 1px solid var(--line); display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; position: sticky; bottom: 0; background: var(--s1); }
.x { width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line); background: var(--s2); font-size: 20px; line-height: 1; }

/* Cobro */
.cob-total { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border-radius: 12px; overflow: hidden; }
.cob-total > div { background: var(--s2); padding: 12px 14px; }
.cob-total b { display: block; font: 700 34px/1.05 var(--f-num); margin-top: 4px; }
.bills { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.bills button { min-height: 52px; border-radius: 10px; border: 1px solid var(--line); background: var(--s2); font: 700 20px/1 var(--f-num); }
.bills button.exact { color: var(--ice); }
.change { text-align: center; padding: 18px; border-radius: 12px; background: var(--ok-d); border: 1px solid var(--ok); }
.change b { display: block; font: 700 62px/1 var(--f-num); color: var(--ok); margin-top: 6px; }
.change.short { background: var(--bad-d); border-color: var(--bad); }
.change.short b { color: var(--bad); font-size: 34px; }
.payline { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 10px; background: var(--s2); }
.metodos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.metodos button { min-height: 58px; border-radius: 10px; border: 1px solid var(--line); background: var(--s2); font: 700 16px/1 var(--f-num); letter-spacing: .06em; text-transform: uppercase; }
.metodos button.on { border-color: var(--ice); background: var(--ice-d); color: var(--ice); }

/* Código de autorización */
.code-box { text-align: center; }
.code-box .inp { text-align: center; font: 700 32px/1 var(--f-num); letter-spacing: .5em; }

/* Toast */
.toasts { position: fixed; bottom: max(16px, env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); display: grid; gap: 8px; z-index: 80; width: min(460px, calc(100% - 32px)); }
.toast { background: var(--s3); border: 1px solid var(--line); border-left: 4px solid var(--ok); padding: 12px 14px; border-radius: 10px; font-weight: 600; box-shadow: 0 10px 30px #0008; animation: fade .2s; }
.toast.bad { border-left-color: var(--bad); } .toast.warn { border-left-color: var(--warn); }

/* Barra de sincronización sin conexión */
.offbar { background: var(--warn); color: #241600; padding: 8px 16px; font-weight: 700; font-size: 14px; display: flex; gap: 10px; align-items: center; justify-content: center; }

/* Marcación */
.kiosk { position: fixed; inset: 0; background: #000; z-index: 60; display: grid; grid-template-rows: auto 1fr auto; }
.kiosk .kt { display: flex; justify-content: space-between; align-items: center; padding: max(14px, env(safe-area-inset-top)) max(18px, env(safe-area-inset-right)) 14px max(18px, env(safe-area-inset-left)); }
.kiosk .clock { font: 700 44px/1 var(--f-num); font-variant-numeric: tabular-nums; }
.kiosk .cam { position: relative; display: grid; place-items: center; overflow: hidden; }
.kiosk video { max-width: 100%; max-height: 100%; transform: scaleX(-1); border-radius: 18px; }
.kiosk .ring { position: absolute; width: min(60vw, 360px); aspect-ratio: 3/4; border: 3px solid var(--ice); border-radius: 50%; box-shadow: 0 0 30px var(--ice-d); pointer-events: none; transition: border-color .2s; }
.kiosk .ring.ok { border-color: var(--ok); } .kiosk .ring.bad { border-color: var(--bad); }
.kiosk .kb { padding: 18px max(18px, env(safe-area-inset-right)) max(22px, env(safe-area-inset-bottom)) max(18px, env(safe-area-inset-left)); text-align: center; min-height: 140px; }
.kiosk .res { font: 700 40px/1.1 var(--f-num); }
.kiosk .res.in { color: var(--ok); } .kiosk .res.out { color: var(--neon); }

/* Finanzas */
.gauge { height: 18px; border-radius: 9px; background: var(--s3); overflow: hidden; position: relative; }
.gauge i { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, var(--neon), var(--ice)); border-radius: 9px; }
.gauge.pe::after { content: ''; position: absolute; left: var(--mark, 50%); top: -4px; bottom: -4px; width: 2px; background: var(--tx); }
.formula { font-size: 13px; color: var(--mut); border-left: 2px solid var(--line); padding-left: 10px; }
.thumb { width: 52px; height: 40px; border-radius: 6px; object-fit: cover; background: var(--s3); display: block; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; vertical-align: middle; }
.ready-list { display: grid; gap: 8px; }
.ready { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 14px; background: var(--ok-d); border: 1px solid var(--ok); border-radius: 10px; }

@media (max-width: 700px) {
  .brand small, #me .nm { display: none; }
  .top { gap: 8px; }
  .prods { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
  .prod .ph { height: 70px; }
  .kcard { flex-basis: 240px; }
}
a.btn { text-decoration: none; color: inherit; }
a.btn.pri { color: #fff; }

/* --- Ajustes v1.1 --- */
/* Toques rápidos suman, no hacen zoom (iPhone/Android) */
html, body { touch-action: manipulation; }
button, a, .prod, .inp, select { touch-action: manipulation; }
/* Barra: de quién es el pedido */
.kcard .km { display: grid; gap: 4px; padding: 8px 14px 10px; }
.kcard .kwho { display: flex; flex-direction: column; gap: 2px; color: var(--tx); font-size: 14px; }
.kcard .kwho .kc { font: 700 18px/1.15 var(--f-tx); color: var(--ice); }
.kcard .kwho b { font-weight: 700; }
.kcard .kn2 { font-size: 12.5px; color: var(--mut); }
/* Barra inferior del pedido (solo teléfono/tablet vertical) */
.ticket-top, .mbar { display: none; }
@media (max-width: 900px) {
  .inp, select.inp, textarea.inp { font-size: 16px; }   /* evita el zoom automático de iPhone al escribir */
  .posv { grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr) auto; }
  .ticket { position: fixed; inset: 0; z-index: 45; max-height: none; border: 0; transform: translateY(105%); transition: transform .22s ease; padding-top: env(safe-area-inset-top, 0px); }
  .ticket.open { transform: none; }
  .ticket-top { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--line); }
  .mbar { display: flex; gap: 10px; align-items: center; padding: 10px max(16px, env(safe-area-inset-right, 0px)) max(10px, env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); background: var(--s1); border-top: 1px solid var(--line); }
  .mbar-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; align-items: flex-start; background: none; border: 0; padding: 0; text-align: left; }
  .mbar-info .lbl { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
  .mbar-info b { font-size: 26px; }
  .mbar.bump { animation: bump .25s; }
}
@keyframes bump { 40% { background: var(--neon-d); } }
@media (prefers-reduced-motion: reduce) { .ticket { transition: none; } .mbar.bump { animation: none; } }

/* --- Mesas y QR (v1.2) --- */
.mesas { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.mesas::-webkit-scrollbar { display: none; }
.mesas button { flex: 0 0 44px; height: 40px; border-radius: 8px; border: 1px solid var(--line); background: var(--ink); font: 700 17px/1 var(--f-num); }
.mesas button.on { border-color: var(--ice); background: var(--ice-d); color: var(--ice); }
.qr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; margin-top: 16px; }
.qr-card { background: #fff; color: #0b090e; border-radius: 14px; padding: 14px 14px 16px; text-align: center; break-inside: avoid; }
.qr-card svg { width: 100%; height: auto; display: block; }
.qr-brand { font-family: var(--f-brand); font-size: 22px; color: #0b090e; }
.qr-brand span { font: 700 10px/1 var(--f-num); letter-spacing: .3em; text-transform: uppercase; }
.qr-n { font: 700 30px/1 var(--f-num); margin-top: 6px; letter-spacing: .04em; }
.qr-t { font-size: 12px; color: #555; margin-top: 4px; }
@media print {
  body { background: #fff !important; }
  .top, .offbar, .no-print, .sect > .row, .toasts { display: none !important; }
  .main { padding: 0 !important; overflow: visible !important; }
  .qr-grid { grid-template-columns: repeat(3, 1fr); gap: 8mm; margin: 0; }
  .qr-card { border: 1px dashed #999; }
}

/* --- Ajustes de pantallas pequeñas (v1.2) --- */
/* Las tablas anchas se desplazan dentro de su recuadro, nunca empujan la página */
.sect { grid-template-columns: minmax(0, 1fr); }
.sect > *, .cols > *, .stack > *, .panel > *, #body > * { min-width: 0; }
.cols { grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); }
.kpis { grid-template-columns: repeat(auto-fill, minmax(min(170px, 100%), 1fr)); }
.seg { max-width: 100%; }
.row > .seg, .row > .row { min-width: 0; }
.navbtn { display: none; }
.navgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.navgrid button { min-height: 54px; border-radius: 10px; border: 1px solid var(--line); background: var(--s2); font: 600 16px/1 var(--f-num); letter-spacing: .06em; text-transform: uppercase; display: flex; align-items: center; justify-content: center; gap: 8px; }
.navgrid button.on { border-color: var(--neon); background: var(--neon-d); }
@media (max-width: 700px) {
  .nav { display: none; }
  .navbtn { display: inline-flex; align-items: center; gap: 8px; flex: 1; min-width: 0; min-height: 42px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--s2); font: 700 17px/1 var(--f-num); letter-spacing: .06em; text-transform: uppercase; }
  .navbtn #navcur { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .navbtn > span:last-child { margin-left: auto; color: var(--mut); }
  .row.between > h2 { width: 100%; }
  input[type="date"].inp { flex: 1 1 130px; width: auto !important; min-width: 0; }
  .t td, .t th { padding: 9px 10px; }
  .kpi .v { font-size: 26px; }
}

/* --- Fotos de cócteles (v1.3): recuadro cuadrado para que se vea el trago completo --- */
.prod .ph { height: auto; aspect-ratio: 1 / 1; }
.prod .ph img { object-position: center 60%; }
@media (max-width: 700px) { .prod .ph { height: auto; } }

/* v1.4 · pago combinado: botones largos se ajustan en varias líneas */
.btn.wrapbtn { white-space: normal; height: auto; min-height: 44px; padding-top: 10px; padding-bottom: 10px; line-height: 1.3; text-align: center; }
.modal .metodos, .modal .grid2, .modal .bills { min-width: 0; }

/* v1.5 · llamadas de mesa: aviso a pantalla completa en el celular del mesero */
.callwall { position: fixed; inset: 0; z-index: 900; background: #0b090ef2; display: grid; place-items: center; padding: 18px; animation: fade .2s; }
.cw-box { width: min(480px, 100%); display: grid; gap: 12px; max-height: 100%; overflow: auto; }
.cw-t { font: 700 30px/1 var(--f-num); letter-spacing: .04em; text-transform: uppercase; text-align: center; color: var(--neon); animation: cwp 1.2s infinite; }
@keyframes cwp { 50% { opacity: .55; } }
.cw-card { background: var(--s2); border: 2px solid var(--neon); border-radius: 16px; padding: 16px; display: grid; gap: 10px; }
.cw-card.esc { border-color: var(--warn); }
.cw-mesa { font: 700 48px/1 var(--f-num); text-align: center; }
.cw-mot { text-align: center; color: var(--mut); }
.cw-acts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cw-acts .btn { min-height: 56px; font-size: 17px; }
.cw-otras { text-align: center; color: var(--mut); font-size: 13px; }
#cw-sil { justify-self: center; }
.callbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 850; display: grid; gap: 6px; padding: 8px 10px calc(8px + env(safe-area-inset-bottom)); background: var(--s2); border-top: 2px solid var(--ice); box-shadow: 0 -8px 24px #0008; }
.cb-it { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 14px; }
.cb-it span { color: var(--mut); min-width: 0; } .cb-it b { color: var(--tx); }
.cb-it .btn { flex: none; }

/* v1.6 · personas por cóctel, sillas de barra, separar y unir cuentas */
.mesas.sillas { align-items: center; margin-top: 6px; }
.mesas.sillas .lbl { flex: none; margin-right: 2px; }
.mesas.sillas button { flex-basis: 50px; }
.pers { display: flex; gap: 6px; align-items: center; overflow-x: auto; scrollbar-width: none; padding: 2px 0; }
.pers::-webkit-scrollbar { display: none; }
.pers .lbl { flex: none; }
.pers button { flex: none; height: 36px; padding: 0 12px; border-radius: 18px; border: 1px solid var(--line); background: var(--ink); font: 700 14px/1 var(--f-num); letter-spacing: .03em; }
.pers button.on { border-color: var(--neon); background: #ff3d9a22; color: var(--neon); }
.tlb { min-height: 28px; padding: 0 8px; font-size: 12px; }
.tlb.per, .chip.per { border-color: var(--neon); color: var(--neon); }
.etq { color: var(--neon); font-weight: 700; }
.pertot { display: flex; flex-wrap: wrap; gap: 6px; }
.sepcuentas { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; }
.sepcuentas .sc { display: grid; gap: 4px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--s2); }
.sepcuentas .sc .inp { height: 34px; }
.sepcuentas .sc .num { font-size: 20px; }
.sepl { display: grid; gap: 6px; max-height: 46vh; overflow: auto; }
.su { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); }
.su .dests { grid-column: 1 / -1; display: flex; gap: 6px; flex-wrap: wrap; }
.su .dests button { min-width: 44px; height: 36px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--ink); font: 700 15px/1 var(--f-num); }
.su .dests button.on { border-color: var(--ice); background: var(--ice-d); color: var(--ice); }
.ux { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 10px; border: 1px solid var(--line); border-radius: 10px; }

/* v1.7 · alarmas fuertes y quitar persona */
.pers button.quita { border-color: var(--bad, #ff5a6a); color: var(--bad, #ff5a6a); }
.kaviso { position: fixed; inset: 0; z-index: 950; display: grid; place-content: center; gap: 18px; text-align: center; color: #fff; padding: 24px;
  background: #ff3d9a; animation: kflash .5s steps(1) infinite; font-family: var(--f-num); cursor: pointer; transition: inset .25s ease; }
.kaviso .ka-t { font: 700 clamp(40px, 9vw, 96px)/1 var(--f-num); letter-spacing: .04em; text-shadow: 0 4px 0 #0004; }
.kaviso .ka-l { font: 600 clamp(22px, 4.5vw, 40px)/1.35 var(--f-num); }
.kaviso .ka-l .sep { opacity: .6; }
.kaviso .ka-ok { font: 700 20px/1 'Manrope', sans-serif; padding: 16px 28px; border-radius: 999px; border: 0; color: #fff; background: #000b; justify-self: center; cursor: pointer; }
@keyframes knuevo { 50% { outline-color: #ffd23f; } }
.knew { display: inline-block; padding: 2px 8px; border-radius: 6px; background: #ff3d9a; color: #fff; font-size: .8em; vertical-align: 2px; }
@keyframes kflash { 0% { background: #ff3d9a; } 50% { background: #b3005e; } }
.callwall.alarm { animation: cflash .6s steps(1) infinite; }
@keyframes cflash { 0% { background: #0b090ef2; } 50% { background: #8a0040f2; } }
@media (prefers-reduced-motion: reduce) { .kaviso, .callwall.alarm { animation-duration: 1.6s; } }

.kcard .tm { font-variant-numeric: tabular-nums; min-width: 4ch; text-align: right; }

/* v1.8 · línea del ticket: nombre arriba, controles grandes abajo */
.tl2 { display: grid; gap: 6px; padding: 10px 16px; border-bottom: 1px dashed var(--line); }
.tl2-n { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.tl2-n .nm { font-weight: 700; font-size: 15px; line-height: 1.25; min-width: 0; }
.tl2-n .pr { font: 700 18px/1 var(--f-num); flex: none; }
.tl2 .nt { font-size: 13px; color: var(--warn); }
.tl2-a { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tl2-a .qty { display: flex; align-items: center; gap: 2px; margin-right: 4px; }
.tl2-a .qty button { width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line); background: var(--s2); font: 700 20px/1 var(--f-num); }
.tl2-a .qty span { width: 30px; text-align: center; font: 700 20px/1 var(--f-num); }
.tl2-a .tlb { min-height: 40px; padding: 0 12px; font-size: 13px; }
/* En el celular, todo el panel del pedido se desplaza junto (antes la lista quedaba en una franja pequeña) */
@media (max-width: 900px) {
  .ticket { overflow-y: auto; -webkit-overflow-scrolling: touch; display: block; }
  .ticket-top { position: sticky; top: 0; z-index: 2; background: var(--s1); }
  .ticket-l { overflow: visible; min-height: 0; }
  .ticket-f { position: sticky; bottom: 0; z-index: 2; background: var(--s1); box-shadow: 0 -8px 20px #0006; }
}
.tl2-a { gap: 6px; flex-wrap: nowrap; }
.tl2-a .qty button { width: 38px; height: 40px; }
.tl2-a .qty span { width: 26px; }
.tl2-a .tlb { padding: 0 10px; white-space: nowrap; }

/* v1.9 · marco de color según el tiempo (azul → amarillo a los 6 min → rojo a los 12 min, parpadea);
   pedido nuevo parpadea en rosado hasta que lo empiecen a preparar */
.kcard { border: 4px solid var(--ice); }
.kcard.late { border-color: var(--warn); }
.kcard.very { border-color: var(--bad); animation: krojo 1s steps(1) infinite; }
.kcard.late .kh .tm { color: var(--warn); }
.kcard.very .kh .tm { color: var(--bad); }
@keyframes krojo { 50% { border-color: #ff5a6a33; box-shadow: none; } 0% { box-shadow: 0 0 0 3px #ff5a6a55; } }
.kcard.nuevo { border-color: #ff3d9a; animation: knuevo2 .7s steps(1) infinite; }
@keyframes knuevo2 { 0% { border-color: #ff3d9a; box-shadow: 0 0 22px #ff3d9a99; } 50% { border-color: #ffd23f; box-shadow: 0 0 6px #ffd23f55; } }
@media (prefers-reduced-motion: reduce) { .kcard.very, .kcard.nuevo { animation-duration: 2s; } }
.kpag { display: inline-block; padding: 2px 8px; border-radius: 6px; background: var(--ok); color: #04210f; font: 700 .55em/1.3 var(--f-num); letter-spacing: .06em; vertical-align: 4px; }

/* v1.10 · historial de pedidos, línea de tiempo y empezar desde cero */
.t.hist tbody tr { cursor: pointer; }
.t.hist tbody tr:hover { background: var(--s2); }
.chip.nov-bad { border-color: var(--bad); color: var(--bad); }
.chip.nov-warn { border-color: var(--warn); color: var(--warn); }
.tline { display: grid; gap: 0; }
.te { display: grid; grid-template-columns: 58px 30px minmax(0, 1fr); gap: 8px; align-items: start; padding: 9px 0; border-top: 1px solid var(--line); }
.te .tt { font: 700 17px/1.1 var(--f-num); display: grid; } .te .tt small { font: 500 11px/1.2 var(--f-tx, inherit); color: var(--mut); }
.te .ti { font-size: 18px; line-height: 1.1; text-align: center; }
.te-anulacion .tx b, .te-reverso .tx b { color: var(--bad); }
.te-entregado .tx b, .te-pago .tx b { color: var(--ok); }
.cero-op { display: grid; gap: 8px; }
.cero-op input { width: 22px; height: 22px; flex: none; }
.aviso-viejas { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-top: 8px; padding: 10px 14px; border: 1px solid var(--warn); border-radius: 10px; background: #ffb54714; color: var(--tx); font-size: 14px; }

.cort{display:inline-block;font-size:12px;font-weight:700;color:#ff8ad8;background:rgba(255,80,200,.12);border-radius:8px;padding:2px 6px}
#cf{flex-wrap:wrap;gap:8px}#cf #go{margin-left:auto}
