/* POS PRD — estilos */
:root {
  --bg: #f5f3ef;
  --surface: #ffffff;
  --surface-2: #faf8f5;
  --ink: #1c1917;
  --ink-2: #44403c;
  --muted: #78716c;
  --line: #e7e2da;
  --line-2: #d6cfc4;
  --side: #1c1917;
  --side-ink: #e7e5e4;
  --accent: #c2410c;
  --accent-ink: #ffffff;
  --accent-soft: #fff1e8;
  --good: #15803d;
  --good-soft: #e8f6ec;
  --warn: #b45309;
  --warn-soft: #fef5e2;
  --bad: #b91c1c;
  --bad-soft: #fdecec;
  --info: #1d4ed8;
  --info-soft: #e8eefd;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(28, 25, 23, .06), 0 2px 8px rgba(28, 25, 23, .04);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font: 15px/1.45 var(--font); color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0 0 .5rem; line-height: 1.2; }
h3 { font-size: 1rem; }
h4 { font-size: .9rem; margin-top: .25rem; }
code { background: var(--surface-2); border: 1px solid var(--line); border-radius: 5px; padding: 0 .3em; font-size: .9em; }
[hidden] { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.mt { margin-top: 1rem; }
.pad { padding: .75rem 1rem; margin: 0; }
.center { text-align: center; align-items: center; }
.txt-bad { color: var(--bad); font-weight: 600; }
.txt-good { color: var(--good); }
.push { margin-left: auto; }

/* ---------- Estructura ---------- */
.app { display: flex; min-height: 100vh; }
.side {
  width: 232px; flex: none; background: var(--side); color: var(--side-ink);
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.brand { display: flex; align-items: center; gap: .6rem; padding: 1.1rem 1rem; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 9px; background: var(--accent); color: #fff;
  display: grid; place-items: center; font-weight: 800; flex: none;
}
.brand-name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side nav { display: flex; flex-direction: column; padding: .25rem .5rem; gap: 1px; flex: 1; }
.side nav a { color: #d6d3d1; padding: .55rem .75rem; border-radius: var(--radius-sm); text-decoration: none; font-size: .93rem; }
.side nav a:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.side nav a.on { background: rgba(255, 255, 255, .1); color: #fff; font-weight: 600; box-shadow: inset 3px 0 0 var(--accent); }
.side-foot { padding: 1rem; border-top: 1px solid rgba(255, 255, 255, .08); display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.who { font-size: .9rem; line-height: 1.2; }
.who small { display: block; color: #a8a29e; }
.side-foot .btn, .side-foot .btn.ghost { color: #e7e5e4; border-color: rgba(255, 255, 255, .2); }
.side-foot .btn:hover { background: rgba(255, 255, 255, .08); }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.top {
  display: flex; align-items: center; gap: .75rem; padding: .9rem 1.5rem;
  background: var(--bg); position: sticky; top: 0; z-index: 5; border-bottom: 1px solid var(--line);
}
.top h1 { font-size: 1.25rem; margin: 0; }
.top-actions { margin-left: auto; display: flex; gap: .5rem; flex-wrap: wrap; justify-content: flex-end; }
.menu-btn { display: none; background: none; border: 0; font-size: 1.4rem; padding: .25rem .5rem; cursor: pointer; color: var(--ink); }
.content { padding: 1.25rem 1.5rem 3rem; }
.scrim { display: none; }
.sa-banner { background: var(--info); color: #fff; padding: .45rem 1rem; font-size: .9rem; text-align: center; }
.sa-banner .link { color: #fff; text-decoration: underline; background: none; border: 0; cursor: pointer; font: inherit; }

/* ---------- Componentes ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.2rem; box-shadow: var(--shadow); margin-bottom: 1rem; }
.card.flush { padding: 0; overflow-x: auto; }
.card-head { display: flex; align-items: center; justify-content: space-between; padding: .9rem 1rem .4rem; }
.card-head h3 { margin: 0; }
.card.narrow { max-width: 420px; }
.card.narrow-lg { max-width: 760px; }
details.card summary { cursor: pointer; list-style: none; }
details.card summary::-webkit-details-marker { display: none; }
details.card summary::before { content: '＋ '; color: var(--accent); }
details.card[open] summary::before { content: '－ '; }
.section { font-size: 1.05rem; margin: 1.5rem 0 .6rem; }
.empty { color: var(--muted); text-align: center; padding: 1.25rem; }
.empty-state { text-align: center; padding: 2rem; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .35rem;
  padding: .55rem .95rem; border-radius: var(--radius-sm); border: 1px solid var(--line-2);
  background: var(--surface); color: var(--ink); font: inherit; font-weight: 600; cursor: pointer;
  text-decoration: none; white-space: nowrap; min-height: 40px; transition: background .12s, border-color .12s, transform .06s;
}
.btn:hover { background: var(--surface-2); border-color: var(--muted); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { background: #9a3412; border-color: #9a3412; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--ink-2); }
.btn.ghost:hover { background: rgba(0, 0, 0, .05); }
.btn.danger { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn.danger-ghost { background: transparent; border-color: transparent; color: var(--bad); }
.btn.danger-ghost:hover { background: var(--bad-soft); }
.btn.sm { padding: .3rem .65rem; min-height: 32px; font-size: .85rem; }
.btn.big { min-height: 52px; font-size: 1.05rem; padding: .7rem 1.4rem; }
.btn.block { width: 100%; }
.btn.on { background: var(--info-soft); border-color: var(--info); color: var(--info); }
form.inline { display: inline; }

.badge {
  display: inline-block; padding: .1rem .5rem; border-radius: 999px; font-size: .75rem; font-weight: 600;
  background: var(--surface-2); border: 1px solid var(--line); color: var(--ink-2); white-space: nowrap;
}
.badge.good { background: var(--good-soft); border-color: transparent; color: var(--good); }
.badge.warn { background: var(--warn-soft); border-color: transparent; color: var(--warn); }
.badge.bad { background: var(--bad-soft); border-color: transparent; color: var(--bad); }
.badge.acc { background: var(--accent-soft); border-color: transparent; color: var(--accent); }
.badge.e-pendiente { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.badge.e-preparando { background: var(--info-soft); color: var(--info); border-color: transparent; }
.badge.e-listo { background: var(--good-soft); color: var(--good); border-color: transparent; }
.badge.e-en_camino { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.tag { font-size: .7rem; color: var(--accent); background: var(--accent-soft); padding: 0 .35rem; border-radius: 4px; }

.alert { padding: .7rem 1rem; border-radius: var(--radius-sm); margin-bottom: 1rem; border: 1px solid transparent; }
.alert.ok { background: var(--good-soft); color: #14532d; }
.alert.error { background: var(--bad-soft); color: #7f1d1d; }
.alert.warn { background: var(--warn-soft); color: #78350f; }

/* Formularios */
label { display: flex; flex-direction: column; gap: .3rem; font-size: .85rem; font-weight: 600; color: var(--ink-2); }
input, select, textarea {
  font: inherit; font-weight: 400; color: var(--ink); background: var(--surface);
  border: 1px solid var(--line-2); border-radius: var(--radius-sm); padding: .55rem .7rem; min-height: 40px; width: 100%;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: var(--accent); }
input:disabled { background: var(--surface-2); color: var(--muted); }
input[type=checkbox] { width: 18px; height: 18px; min-height: 0; accent-color: var(--accent); flex: none; }
input.money { text-align: right; font-variant-numeric: tabular-nums; }
.w-xs { width: 80px; } .w-sm { width: 120px; } .w-md { width: 200px; }
label.check { flex-direction: row; align-items: flex-start; gap: .6rem; font-weight: 400; color: var(--ink); cursor: pointer; }
label.check input { margin-top: .15rem; }
.inline-label { flex-direction: row; align-items: center; gap: .4rem; font-weight: 600; }
.inline-label input { width: auto; }
fieldset.opts { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .8rem 1rem 1rem; display: flex; flex-direction: column; gap: .8rem; margin: 0; }
fieldset.opts legend { font-weight: 700; font-size: .85rem; padding: 0 .3rem; color: var(--muted); }
.indent { margin-left: 1.9rem; }
.stack { display: flex; flex-direction: column; gap: .8rem; }
.row { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.row.nowrap { flex-wrap: nowrap; }
.row input { width: auto; flex: 1; min-width: 80px; }
.row.nowrap input.w-xs { flex: none; width: 80px; }
.row.nowrap select { width: auto; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem 1rem; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .8rem 1rem; }
.al-top { align-items: start; }
.span2 { grid-column: span 2; }
.filters { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; margin-bottom: 1rem; }
.filters select, .filters input[type=search] { width: auto; min-width: 180px; }
.danger-zone { border-top: 1px dashed var(--line-2); padding-top: .8rem; }

/* Tablas */
.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th { text-align: left; font-size: .75rem; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); font-weight: 700; padding: .65rem .8rem; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.table td { padding: .6rem .8rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table.compact td, .table.compact th { padding: .45rem .7rem; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table .actions { text-align: right; white-space: nowrap; }
.table .actions > * { margin-left: .2rem; }
.table tr.inactive td { color: var(--muted); }
.table tr.detail > td { background: var(--surface-2); padding: 1rem; }
.table.lines input { min-height: 36px; }

/* KPIs */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: .75rem; margin-bottom: 1rem; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: .85rem 1rem; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: .15rem; }
.kpi span { font-size: .78rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .03em; }
.kpi b { font-size: 1.35rem; font-variant-numeric: tabular-nums; }
.kpi small { color: var(--muted); font-size: .8rem; }
.kpi.main { background: var(--side); color: #fff; border-color: var(--side); }
.kpi.main span, .kpi.main small { color: #a8a29e; }
.onboarding ol { margin: 0; padding-left: 1.2rem; display: grid; gap: .35rem; }
.onboarding li.done { color: var(--muted); text-decoration: line-through; }

.bars { display: flex; flex-direction: column; gap: .35rem; }
.bar-row { display: grid; grid-template-columns: 48px 1fr 100px; align-items: center; gap: .5rem; font-size: .85rem; }
.bar { background: var(--surface-2); border-radius: 4px; height: 14px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--accent); border-radius: 4px; }
.bar-v { text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- Mesas ---------- */
.legend { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; margin-bottom: 1rem; font-size: .88rem; color: var(--ink-2); }
.legend span { display: inline-flex; align-items: center; gap: .35rem; }
.legend-link { margin-left: auto; }
.dot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }
.dot.libre { background: var(--surface); border: 2px solid var(--line-2); }
.dot.ocupada { background: var(--accent); }
.dot.cuenta { background: var(--info); }
.zona h2 { font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 1rem 0 .5rem; }
.mesas { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: .65rem; }
.mesa {
  aspect-ratio: 1 / .82; border-radius: var(--radius); border: 2px solid var(--line); background: var(--surface);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .15rem;
  font: inherit; color: var(--ink); cursor: pointer; padding: .5rem; box-shadow: var(--shadow); transition: transform .08s, border-color .12s;
}
.mesa:hover { border-color: var(--line-2); }
.mesa:active { transform: scale(.97); }
.mesa-n { font-size: 1.6rem; font-weight: 800; line-height: 1; }
.mesa-total { font-weight: 700; font-variant-numeric: tabular-nums; }
.mesa-info { font-size: .75rem; color: var(--muted); }
.mesa.ocupada { background: var(--accent); border-color: var(--accent); color: #fff; }
.mesa.ocupada .mesa-info { color: #ffe4d6; }
.mesa.cuenta { background: var(--info); border-color: var(--info); color: #fff; }
.mesa.cuenta .mesa-info { color: #dbe5ff; }

/* Tablero llevar/delivery */
.board { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: .8rem; }
.order { margin: 0; display: flex; flex-direction: column; gap: .6rem; }
.order header { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; }
.order-cli { font-weight: 600; }
.order-tot { margin-top: .3rem; display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.order footer { margin-top: auto; }

/* ---------- POS ---------- */
.pos-body .content { padding: 0; }
.pos-body .top { display: none; }
.pos { display: grid; grid-template-columns: minmax(0, 1fr) 380px; height: 100vh; }
.pos.busy { cursor: progress; }
.pos-cat { display: flex; flex-direction: column; min-height: 0; padding: .9rem 1rem 0; }
.pos-tools { display: flex; gap: .5rem; align-items: center; margin-bottom: .6rem; }
.pos-tools input { flex: 1; }
.tabs { display: flex; gap: .4rem; overflow-x: auto; padding-bottom: .6rem; scrollbar-width: thin; flex: none; }
.tab {
  flex: none; border: 1px solid var(--line-2); background: var(--surface); border-radius: 999px;
  padding: .5rem 1rem; font: inherit; font-weight: 600; cursor: pointer; color: var(--ink-2); min-height: 42px;
}
.tab.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.tab.menu { border-color: var(--accent); color: var(--accent); }
.tab.menu.on { background: var(--accent); color: #fff; }
.prods { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .55rem; overflow-y: auto; padding-bottom: 1rem; align-content: start; flex: 1; }
.prod {
  text-align: left; border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius);
  padding: .7rem .75rem; font: inherit; cursor: pointer; display: flex; flex-direction: column; gap: .25rem;
  min-height: 86px; box-shadow: var(--shadow); color: var(--ink); transition: transform .08s, border-color .12s, background .12s;
}
.prod:hover { border-color: var(--line-2); }
.prod:active, .prod.tap { transform: scale(.97); background: var(--accent-soft); border-color: var(--accent); }
.prod-n { font-weight: 600; line-height: 1.25; }
.prod-p { font-variant-numeric: tabular-nums; color: var(--ink-2); margin-top: auto; }
.prod-b { display: flex; gap: .25rem; flex-wrap: wrap; }
.pb { font-size: .68rem; background: var(--surface-2); border: 1px solid var(--line); border-radius: 4px; padding: 0 .3rem; color: var(--muted); }
.pb.warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.pb.bad { background: var(--bad-soft); color: var(--bad); border-color: transparent; }
.prod.agotado { opacity: .5; cursor: not-allowed; }

.pos-ticket { background: var(--surface); border-left: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
.tk-head { display: flex; align-items: flex-start; gap: .5rem; padding: 1rem 1rem .7rem; border-bottom: 1px solid var(--line); }
.tk-head > div { flex: 1; min-width: 0; }
.tk-title { font-size: 1.2rem; font-weight: 800; }
.tk-sub { font-size: .82rem; color: var(--muted); }
.tk-items { flex: 1; overflow-y: auto; padding: .3rem 0; }
.it { padding: .55rem 1rem; border-bottom: 1px solid var(--line); }
.it-main { display: grid; grid-template-columns: auto 1fr auto; gap: .6rem; align-items: start; }
.it-qty { display: flex; align-items: center; border: 1px solid var(--line-2); border-radius: var(--radius-sm); overflow: hidden; }
.it-qty button { width: 32px; height: 32px; border: 0; background: var(--surface-2); font-size: 1.1rem; cursor: pointer; color: var(--ink); }
.it-qty button:active { background: var(--line); }
.it-qty span { min-width: 28px; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }
.it-name { font-weight: 600; line-height: 1.3; padding-top: .3rem; }
.it-sub { font-weight: 400; color: var(--ink-2); font-size: .88rem; }
.it-nota { font-weight: 400; color: var(--accent); font-size: .85rem; font-style: italic; }
.it-tot { font-weight: 700; font-variant-numeric: tabular-nums; padding-top: .3rem; }
.it-acts { display: flex; gap: .8rem; padding-left: calc(94px + .6rem); margin-top: .1rem; }
.it-acts button { background: none; border: 0; padding: .1rem 0; font: inherit; font-size: .8rem; color: var(--muted); cursor: pointer; }
.it-acts button:hover { color: var(--ink); text-decoration: underline; }
.tk-tot { padding: .7rem 1rem; border-top: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.tk-tot > div { display: flex; justify-content: space-between; font-size: .92rem; color: var(--ink-2); }
.tk-tot .grand { font-size: 1.35rem; font-weight: 800; color: var(--ink); margin-top: .2rem; }
.tk-actions { display: grid; grid-template-columns: repeat(2, 1fr); gap: .45rem; padding: 0 1rem 1rem; }
.tk-actions .big { grid-column: 1 / -1; }
.tk-bar { display: none; }

/* Modales */
dialog.modal {
  border: 0; border-radius: 16px; padding: 0; width: min(520px, calc(100vw - 24px)); max-height: calc(100vh - 24px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, .25); color: var(--ink); background: var(--surface);
}
dialog.modal::backdrop { background: rgba(28, 25, 23, .5); }
dialog.modal > form, dialog.modal > div { padding: 1.1rem 1.2rem 1.2rem; }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.modal-head h3 { margin: 0; font-size: 1.1rem; }
.x { background: none; border: 0; font-size: 1.6rem; line-height: 1; cursor: pointer; color: var(--muted); padding: 0 .25rem; }
.modal-foot { display: flex; justify-content: flex-end; gap: .5rem; margin-top: .3rem; }
.modal-foot.center { justify-content: center; }
.chips { display: flex; flex-wrap: wrap; gap: .45rem; }
.chip {
  border: 1px solid var(--line-2); background: var(--surface); border-radius: 999px; padding: .5rem .95rem;
  font: inherit; cursor: pointer; min-height: 42px; color: var(--ink);
}
.chip.on { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
.chip.dim { opacity: .6; }
.qty { display: flex; flex-direction: row; gap: 0; max-width: 180px; }
.qty button { width: 44px; border: 1px solid var(--line-2); background: var(--surface-2); font-size: 1.2rem; cursor: pointer; }
.qty button:first-child { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.qty button:last-child { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.qty input { border-radius: 0; text-align: center; border-left: 0; border-right: 0; }

.cobro-total { font-size: 1rem; color: var(--muted); display: flex; justify-content: space-between; align-items: baseline; }
.cobro-total b { font-size: 1.8rem; color: var(--ink); font-variant-numeric: tabular-nums; }
.formas { display: flex; flex-direction: column; gap: .45rem; }
.forma { display: grid; grid-template-columns: 140px 1fr; gap: .45rem; align-items: center; }
.forma .ref { grid-column: 2; min-height: 34px; font-size: .85rem; display: none; }
.forma.on .ref { display: block; }
.forma-btn { border: 1px solid var(--line-2); background: var(--surface-2); border-radius: var(--radius-sm); min-height: 44px; font: inherit; font-weight: 600; cursor: pointer; color: var(--ink); }
.forma.on .forma-btn { background: var(--ink); color: #fff; border-color: var(--ink); }
.forma input.money { font-size: 1.1rem; min-height: 44px; }
.billetes { display: flex; gap: .4rem; flex-wrap: wrap; }
.cobro-res { display: flex; justify-content: space-between; gap: .5rem; padding: .7rem .8rem; background: var(--surface-2); border-radius: var(--radius-sm); font-variant-numeric: tabular-nums; flex-wrap: wrap; }
.cobro-res .bad { color: var(--bad); }
.ok-icon { width: 64px; height: 64px; border-radius: 50%; background: var(--good-soft); color: var(--good); display: grid; place-items: center; font-size: 2rem; margin: .5rem auto 0; }
.vuelto-big { font-size: 1.5rem; font-weight: 800; margin: 0; }

#toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  background: var(--ink); color: #fff; padding: .7rem 1.1rem; border-radius: 10px; font-weight: 600; z-index: 100;
  transition: opacity .18s, transform .18s; max-width: calc(100vw - 32px); box-shadow: 0 8px 24px rgba(0, 0, 0, .2);
}
#toast.show { opacity: 1; transform: translate(-50%, 0); }
#toast.error { background: var(--bad); }

/* ---------- Login ---------- */
.login-body { background: var(--side); min-height: 100vh; }
.login { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 1.5rem; }
.login-card { background: var(--surface); border-radius: 18px; padding: 1.8rem; width: min(400px, 100%); box-shadow: 0 20px 60px rgba(0, 0, 0, .3); }
.login-card.wide { width: min(620px, 100%); }
.login-card h3 { margin-top: .5rem; font-size: .95rem; }
.brand.big { padding: 0 0 .5rem; }
.brand.big .brand-name { font-size: 1.3rem; }
.login-foot { color: #78716c; font-size: .8rem; margin-top: 1.2rem; }

/* ---------- Ticket ---------- */
.ticket-body { background: #e7e5e4; }
.ticket-bar { display: flex; gap: .5rem; justify-content: center; padding: 1rem; }
.ticket {
  width: 80mm; margin: 0 auto 2rem; background: #fff; padding: 4mm 4mm 6mm; color: #000;
  font: 12px/1.35 "Courier New", ui-monospace, monospace; box-shadow: var(--shadow);
}
.ticket hr { border: 0; border-top: 1px dashed #000; margin: 2mm 0; }
.t-center { text-align: center; }
.t-big { font-size: 15px; font-weight: 700; }
.t-row { display: flex; justify-content: space-between; gap: 2mm; }
.t-row span:last-child { white-space: nowrap; }
.t-sub { padding-left: 4mm; }
.t-nota { font-weight: 700; }
.ticket.comanda { font-size: 14px; }
.ticket.comanda .t-item { font-size: 15px; margin-top: 1.5mm; }

@media print {
  @page { size: 80mm auto; margin: 0; }
  body, .ticket-body { background: #fff; }
  .no-print { display: none !important; }
  .ticket { box-shadow: none; margin: 0; width: 100%; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .grid3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pos { grid-template-columns: minmax(0, 1fr) 340px; }
}
@media (max-width: 860px) {
  .side { position: fixed; left: 0; top: 0; z-index: 30; transform: translateX(-100%); transition: transform .2s; }
  body.nav-open .side { transform: none; box-shadow: 0 0 40px rgba(0, 0, 0, .3); }
  body.nav-open .scrim { display: block; position: fixed; inset: 0; background: rgba(0, 0, 0, .4); z-index: 20; }
  .menu-btn { display: block; }
  .top { padding: .7rem 1rem; flex-wrap: wrap; }
  .content { padding: 1rem 1rem 3rem; }
  .grid2, .grid3 { grid-template-columns: minmax(0, 1fr); }
  .span2 { grid-column: auto; }
  .filters select, .filters input[type=search] { min-width: 0; flex: 1; }
  .table { font-size: .86rem; }
  .w-md { width: 140px; }

  /* POS en celular: catálogo a pantalla completa y ticket deslizable */
  .pos { display: block; height: auto; min-height: 100vh; padding-bottom: 72px; }
  .pos-cat { padding: .7rem .75rem 0; }
  .prods { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); overflow: visible; }
  .pos-ticket {
    position: fixed; inset: auto 0 0 0; height: 88vh; z-index: 25; border-left: 0; border-radius: 18px 18px 0 0;
    transform: translateY(100%); transition: transform .22s; box-shadow: 0 -10px 40px rgba(0, 0, 0, .25);
  }
  .pos.show-ticket .pos-ticket { transform: none; }
  .tk-bar {
    display: flex; position: fixed; left: .6rem; right: .6rem; bottom: .6rem; z-index: 26; align-items: center; gap: .75rem;
    background: var(--ink); color: #fff; border: 0; border-radius: 14px; padding: .9rem 1rem; font: inherit; cursor: pointer;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .3);
  }
  .tk-bar b { margin-left: auto; font-size: 1.05rem; }
  .tk-bar span:last-child { font-size: .8rem; color: #d6d3d1; }
  .pos.show-ticket .tk-bar span:last-child { visibility: hidden; }
  .pos.show-ticket .tk-bar { bottom: auto; top: calc(12vh - 64px); left: auto; right: .6rem; padding: .5rem .9rem; }
  .pos.show-ticket .tk-bar span:first-child, .pos.show-ticket .tk-bar b { display: none; }
  .pos.show-ticket .tk-bar::after { content: 'Cerrar ✕'; }
  .forma { grid-template-columns: 110px 1fr; }
  .pos-body #toast { bottom: 92px; }
}
@media (max-width: 480px) {
  .mesas { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); }
  .mesa-n { font-size: 1.35rem; }
  .top h1 { font-size: 1.1rem; }
  .top-actions .btn { padding: .45rem .7rem; font-size: .88rem; }
}
