:root {
  --ink: #16202e;
  --ink-2: #566071;
  --line: #e4e2dc;
  --bg: #f6f5f1;
  --surface: #fff;
  --brand: #f59a23;
  --brand-strong: #b35c00;
  --brand-soft: #fff1dd;
  --ok: #0e7a57;
  --ok-soft: #dcf3ea;
  --bad: #c0352b;
  --bad-soft: #fde8e6;
  --warn: #b45f06;
  --night: #0f1724;
  --night-2: #182335;
  --night-3: #24324a;
  --night-ink: #edf1f7;
  --night-mute: #9dabc0;
  --radius: 12px;
  --ticket-width: 74mm;
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { background: var(--bg); color: var(--ink); font-size: 15px; -webkit-tap-highlight-color: transparent; }
#app { height: 100dvh; display: flex; flex-direction: column; }
#app.dark { background: var(--night); color: var(--night-ink); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; touch-action: manipulation; }
button:disabled { cursor: not-allowed; }
[hidden] { display: none !important; }
svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
h1, h2, h3, p { margin: 0; }
.muted { color: var(--ink-2); }
.small { font-size: 13px; }
.empty { color: var(--ink-2); text-align: center; padding: 32px 12px; margin: 0; }

input, select, textarea {
  width: 100%; min-height: 44px; padding: 9px 12px; border: 1px solid var(--line);
  border-radius: 10px; background: var(--surface);
}
input[type=checkbox] { width: 20px; height: 20px; min-height: 0; accent-color: var(--brand-strong); }
textarea { resize: vertical; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 42px;
  padding: 8px 14px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--surface); color: var(--ink); font-weight: 600; text-decoration: none;
}
.btn:hover { border-color: #c8c4b9; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #1f1204; }
.btn.ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn.danger { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn.subtle { border-color: transparent; background: transparent; color: var(--bad); }
.btn.big { min-height: 52px; font-size: 16px; width: 100%; }
.btn:disabled { opacity: .55; }
.push { margin-left: auto; }
.push-left { margin-right: auto; }
.icon-btn {
  display: inline-grid; place-items: center; width: 42px; height: 42px; border: 0;
  border-radius: 10px; background: transparent; color: inherit;
}
.icon-btn:hover:not(:disabled) { background: rgb(127 127 127 / .16); }
.icon-btn:disabled { opacity: .3; }
.link { border: 0; background: none; color: var(--bad); font-weight: 600; padding: 6px; }

/* Barra superior */
.topbar {
  flex: none; display: flex; align-items: center; gap: 10px; min-height: 58px;
  padding: 8px 14px; padding-top: max(8px, env(safe-area-inset-top));
  background: var(--night); color: var(--night-ink);
}
.topbar .logo { border-radius: 9px; }
.brand { font-weight: 700; font-size: 17px; white-space: nowrap; }
.topbar nav { display: flex; gap: 4px; margin-left: 10px; }
.topbar nav a { padding: 9px 13px; border-radius: 9px; color: var(--night-mute); text-decoration: none; font-weight: 600; }
.topbar nav a.on { background: var(--night-3); color: #fff; }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.topbar .btn { background: var(--night-3); border-color: var(--night-3); color: #fff; }
.net { background: var(--bad); color: #fff; padding: 5px 10px; border-radius: 8px; font-weight: 700; font-size: 13px; white-space: nowrap; }
.clock { font-variant-numeric: tabular-nums; font-weight: 700; font-size: 18px; }
.count { min-width: 22px; padding: 1px 7px; border-radius: 99px; background: var(--brand); color: #1f1204; font-size: 13px; }
.count.ok { background: #36c893; color: #05251a; }
#view { flex: 1; min-height: 0; display: flex; flex-direction: column; }

/* Acceso */
.auth { min-height: 100%; display: grid; place-items: center; padding: 16px; overflow: auto; flex: 1; }
.auth-card {
  width: min(380px, 100%); display: grid; gap: 14px; padding: 28px; border-radius: 18px;
  background: var(--night-2); text-align: center; justify-items: center;
}
.auth-card img { border-radius: 16px; }
.auth-card h1 { font-size: 23px; }
.auth-card label { width: 100%; text-align: left; display: grid; gap: 5px; color: var(--night-mute); font-weight: 600; }
.auth-card input { background: var(--night); border-color: var(--night-3); color: #fff; }
.hint { color: var(--night-mute); }
.install-btn { width: 100%; background: transparent; border-color: var(--night-3); color: var(--night-ink); }
.install-btn:hover { border-color: var(--night-mute); }
.form-error { color: var(--bad); font-weight: 600; min-height: 1.2em; }
.auth .form-error { color: #ff9c92; }

/* Caja */
.pos { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 380px; }
.pos-menu { min-height: 0; display: flex; flex-direction: column; }
.pos-tools { padding: 12px 14px 8px; display: grid; gap: 9px; }
.chips { display: flex; gap: 7px; overflow-x: auto; scrollbar-width: none; padding: 2px; }
.chips.wrap { flex-wrap: wrap; overflow: visible; }
.chip {
  flex: none; min-height: 42px; padding: 7px 15px; border-radius: 99px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink); font-weight: 600; white-space: nowrap;
}
.chip.on { background: var(--brand); border-color: var(--brand); color: #1f1204; }
.grid {
  flex: 1; min-height: 0; overflow-y: auto; padding: 4px 14px 16px; display: grid; align-content: start;
  gap: 10px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); grid-auto-rows: max-content;
}
.pcard {
  position: relative; display: flex; flex-direction: column; text-align: left; padding: 0; overflow: hidden;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--ink);
  transition: transform .08s;
}
.pcard:active:not(:disabled) { transform: scale(.97); border-color: var(--brand); }
.pcard.off { opacity: .5; }
.pimg { flex: none; width: 100%; height: 96px; display: grid; place-items: center; background: var(--brand-soft); font-size: 42px; overflow: hidden; }
.pimg img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pname { padding: 8px 10px 0; font-weight: 600; line-height: 1.2; min-height: 2.5em; }
.pprice { padding: 2px 10px 9px; font-weight: 700; font-variant-numeric: tabular-nums; }
.pcount {
  position: absolute; top: 7px; right: 7px; min-width: 28px; height: 28px; display: grid; place-items: center;
  padding: 0 7px; border-radius: 99px; background: var(--night); color: #fff; font-size: 14px;
}

.pos-order {
  min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 9px; padding: 12px 14px 14px;
  background: var(--surface); border-left: 1px solid var(--line);
}
.order-head { display: flex; align-items: center; justify-content: space-between; min-height: 34px; }
.order-head h2 { font-size: 18px; margin-right: auto; }
.only-mobile { display: none; }
.seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; padding: 3px; background: var(--bg); border-radius: 11px; }
.seg.two { grid-template-columns: 1fr 1fr; }
.seg button { min-height: 40px; border: 0; border-radius: 9px; background: transparent; font-weight: 600; color: var(--ink-2); }
.seg button.on { background: var(--night); color: #fff; }
.lines { flex: 1; min-height: 60px; overflow-y: auto; }
.line { padding: 9px 0; border-bottom: 1px solid var(--line); }
.line-main { display: flex; justify-content: space-between; gap: 10px; font-weight: 600; }
.line-price { font-variant-numeric: tabular-nums; white-space: nowrap; }
.line-note { color: var(--brand-strong); font-weight: 600; font-size: 14px; margin-top: 2px; }
.line-tools { display: flex; align-items: center; justify-content: space-between; margin-top: 4px; }
.note-btn { display: inline-flex; gap: 5px; align-items: center; min-height: 38px; padding: 0 4px; border: 0; background: none; color: var(--ink-2); font-size: 14px; }
.note-btn svg { width: 15px; height: 15px; }
.stepper { display: flex; align-items: center; gap: 2px; }
.stepper b { min-width: 28px; text-align: center; font-variant-numeric: tabular-nums; }
.stepper button { width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); }
.note-link { border: 0; background: none; color: var(--ink-2); text-align: left; padding: 3px 0; overflow-wrap: anywhere; }
.total { display: flex; justify-content: space-between; align-items: baseline; font-size: 17px; font-weight: 600; }
.total strong { font-size: 25px; font-variant-numeric: tabular-nums; }
.send {
  min-height: 64px; border: 0; border-radius: var(--radius); background: var(--brand); color: #1f1204;
  font-size: 19px; font-weight: 800; letter-spacing: .02em;
}
.send:active:not(:disabled) { background: #e68a12; }
.send:disabled { background: var(--line); color: var(--ink-2); }
.cart-bar { display: none; }

.fee-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-weight: 600; }
.fee-row input { max-width: 150px; text-align: right; }
.rate { display: grid; grid-template-columns: 1fr 1fr 42px; gap: 8px; align-items: end; margin-bottom: 8px; }
.field-hint { margin-top: -5px; font-size: 13px; color: var(--ink-2); }
.field-hint.bad { color: var(--bad); font-weight: 600; }
.qr-box { background: #fff; padding: 8px; border-radius: 10px; }
.qr-box svg { display: block; stroke: none; width: min(280px, 100%); height: auto; margin: 0 auto; shape-rendering: crispEdges; }

/* Diálogos */
dialog {
  width: min(460px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); border: 0; border-radius: 16px;
  padding: 0; background: var(--surface); color: var(--ink); box-shadow: 0 20px 60px rgb(0 0 0 / .3);
}
dialog.wide { width: min(620px, calc(100vw - 24px)); }
dialog::backdrop { background: rgb(10 16 26 / .55); }
.dlg-body { display: grid; gap: 13px; padding: 20px; }
.dlg-body h2, .dlg-head h2 { font-size: 19px; }
.dlg-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 12px 4px 20px; }
.dlg-actions { display: flex; justify-content: flex-end; gap: 9px; flex-wrap: wrap; }
.dlg-body label, .settings label, .filters label { display: grid; gap: 4px; font-weight: 600; font-size: 14px; }
label.check { display: flex; align-items: center; gap: 9px; font-weight: 500; min-height: 32px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.form-row > label { min-width: 0; }
fieldset { border: 1px solid var(--line); border-radius: 10px; padding: 6px 12px 8px; margin: 0; }
legend { font-weight: 600; font-size: 14px; padding: 0 4px; }

dialog.drawer { margin: 0 0 0 auto; height: 100dvh; max-height: 100dvh; width: min(480px, 100vw); border-radius: 0; }
.drawer-list { padding: 8px 14px 18px; display: grid; gap: 10px; }
.o-row { padding: 12px; border: 1px solid var(--line); border-left-width: 5px; border-radius: 10px; display: grid; gap: 4px; }
.o-row.st-listo { border-left-color: var(--ok); background: var(--ok-soft); }
.o-row.st-preparando { border-left-color: var(--brand); }
.o-top { display: flex; align-items: center; gap: 9px; }
.o-top .muted { margin-left: auto; font-size: 13px; }
.o-num { font-size: 19px; }
.o-items { font-size: 14px; }
.o-actions { display: flex; gap: 7px; margin-top: 5px; flex-wrap: wrap; }
.tag { padding: 2px 9px; border-radius: 99px; font-size: 13px; font-weight: 700; white-space: nowrap; background: var(--bg); }
.tag.st-nuevo { background: var(--brand-soft); color: var(--brand-strong); }
.tag.st-preparando { background: #e7ecf8; color: #2c4a8c; }
.tag.st-listo, .tag.st-entregado { background: var(--ok-soft); color: var(--ok); }
.tag.st-cancelado { background: var(--bad-soft); color: var(--bad); }

/* Avisos */
#toasts {
  position: fixed; z-index: 50; top: 66px; right: 12px; display: grid; gap: 8px;
  width: min(330px, calc(100vw - 24px));
}
.toast { padding: 12px 15px; border-radius: 11px; background: var(--night-3); color: #fff; box-shadow: 0 8px 24px rgb(0 0 0 / .25); cursor: pointer; }
.toast.ok { background: var(--ok); }
.toast.bad { background: var(--bad); }
.toast.ready { background: var(--ok); font-size: 17px; animation: pop .3s ease; }
@keyframes pop { from { transform: scale(.9); opacity: 0; } }

/* Cocina */
.sound-gate {
  flex: none; display: flex; justify-content: center; align-items: center; gap: 10px; min-height: 58px; margin: 0 14px 10px;
  border: 0; border-radius: 11px; background: var(--brand); color: #1f1204; font-size: 18px; font-weight: 700;
}
.sound-gate svg { width: 22px; height: 22px; }
.board { flex: 1; min-height: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; padding: 0 14px 14px; }
.col { min-height: 0; display: flex; flex-direction: column; background: var(--night-2); border-radius: 14px; }
.col h2 { flex: none; display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; font-size: 17px; text-transform: uppercase; letter-spacing: .03em; }
.col h2 b { min-width: 30px; height: 30px; display: grid; place-items: center; border-radius: 99px; background: var(--night-3); font-size: 15px; }
.col-nuevo h2 b { background: var(--brand); color: #1f1204; }
.col-listo h2 b { background: #36c893; color: #05251a; }
.col-list { flex: 1; min-height: 0; overflow: hidden auto; padding: 4px 10px 10px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; align-content: start; scrollbar-color: var(--night-3) transparent; }
.col-empty { color: var(--night-mute); text-align: center; padding: 28px 0; }
.ticket-card {
  display: grid; gap: 7px; padding: 12px 13px; border-radius: 11px; background: var(--surface); color: var(--ink);
  border-left: 7px solid var(--line);
}
.ticket-card.st-nuevo { border-left-color: var(--brand); }
.ticket-card.st-preparando { border-left-color: #3f6fd8; }
.ticket-card.st-listo { border-left-color: var(--ok); background: #e9f6f1; }
.ticket-card header { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.kds-num { font-size: 26px; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1; }
.kds-table { padding: 2px 9px; border-radius: 7px; background: var(--night); color: #fff; font-size: 16px; font-weight: 800; white-space: nowrap; }
.badge-new { display: none; padding: 2px 8px; border-radius: 6px; background: var(--bad); color: #fff; font-size: 12px; font-weight: 800; }
.fresh .badge-new { display: inline; }
.ticket-card.fresh { animation: flash 1.1s ease-in-out infinite alternate; }
@keyframes flash { from { box-shadow: 0 0 0 3px var(--brand); } to { box-shadow: 0 0 0 7px rgb(245 154 35 / .25); } }
.age { margin-left: auto; padding: 2px 9px; border-radius: 99px; background: var(--bg); font-size: 14px; font-weight: 700; white-space: nowrap; }
.warn .age { background: var(--brand-soft); color: var(--warn); }
.late .age { background: var(--bad); color: #fff; }
.meta { color: var(--ink-2); font-weight: 600; }
.ticket-card ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px; font-size: 18px; line-height: 1.25; }
.ticket-card li { display: grid; grid-template-columns: 28px minmax(0, 1fr); }
.ticket-card em { grid-column: 2; font-style: normal; font-weight: 700; font-size: 15px; color: var(--bad); }
.obs { padding: 6px 9px; border-radius: 7px; background: var(--brand-soft); color: #7a3e00; font-weight: 700; }
.ticket-card footer { display: flex; gap: 7px; align-items: center; flex-wrap: wrap; }
.done {
  flex: 1 1 100%; min-height: 50px; display: inline-flex; justify-content: center; align-items: center; gap: 7px;
  border: 0; border-radius: 9px; background: var(--ok); color: #fff; font-weight: 800; font-size: 15px;
}
.dark-btn { background: var(--surface); flex: 1; }

/* Repartidor */
.rep { flex: 1; min-height: 0; overflow-y: auto; width: 100%; max-width: 620px; margin-inline: auto; padding: 12px 16px 28px; }
.rep .sound-gate { width: 100%; margin: 0 0 12px; }
.rep section { display: grid; gap: 10px; margin-bottom: 18px; }
.rep h2 { display: flex; justify-content: space-between; align-items: center; font-size: 16px; }
.rep h2 b { min-width: 28px; height: 28px; display: grid; place-items: center; border-radius: 99px; background: var(--night); color: #fff; font-size: 14px; }
.rep-card { display: grid; gap: 9px; padding: 13px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.rep-card header { display: flex; justify-content: space-between; align-items: center; }
.rep-card ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 3px; }
.rep-card li { display: grid; grid-template-columns: 26px minmax(0, 1fr); }
.rep-card em { display: block; font-style: normal; font-weight: 700; font-size: 14px; color: var(--bad); }
.rep-who { font-size: 18px; font-weight: 700; }
.rep-address { font-size: 16px; overflow-wrap: anywhere; }
.rep-actions { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.rep-actions .btn { flex: 1 1 130px; text-decoration: none; }
.rep-card .done { width: 100%; }
.pay { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 9px 12px; border-radius: 9px; font-weight: 700; }
.pay strong { font-size: 21px; font-variant-numeric: tabular-nums; }
.pay.due { background: var(--bad-soft); color: var(--bad); }
.pay.paid { background: var(--ok-soft); color: var(--ok); justify-content: flex-start; }
.pay.paid strong { font-size: 17px; }

/* Administración */
.admin { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.admin-tabs { flex: none; display: flex; gap: 3px; overflow-x: auto; padding: 8px 14px 0; background: var(--surface); border-bottom: 1px solid var(--line); scrollbar-width: none; }
.admin-tabs button { flex: none; min-height: 44px; padding: 8px 14px; border: 0; border-bottom: 3px solid transparent; background: none; font-weight: 600; color: var(--ink-2); }
.admin-tabs button.on { color: var(--ink); border-bottom-color: var(--brand); }
.admin-body { flex: 1; min-height: 0; overflow-y: auto; padding: 16px 14px 32px; display: flex; flex-direction: column; gap: 14px; }
.admin-body > *, #report > * { width: 100%; max-width: 1180px; margin-inline: auto; }
#report { display: flex; flex-direction: column; gap: 14px; }
.filters { display: flex; align-items: flex-end; gap: 8px; flex-wrap: wrap; }
.filters input, .filters select { min-width: 140px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; display: grid; gap: 11px; min-width: 0; }
.card h3 { font-size: 16px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(135px, 1fr)); gap: 10px; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 13px 15px; display: grid; gap: 4px; }
.tile span { color: var(--ink-2); font-size: 14px; }
.tile strong { font-size: 22px; font-variant-numeric: tabular-nums; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 13px; color: var(--ink-2); font-weight: 600; white-space: nowrap; }
th, td { padding: 9px 10px; border-bottom: 1px solid var(--line); }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
tr.click { cursor: pointer; }
tr.click:hover { background: var(--bg); }
.bulk { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 8px 10px; border-radius: 10px; background: var(--bad-soft); font-weight: 600; }
.sel { width: 42px; }
.thumb { width: 52px; font-size: 24px; text-align: center; }
.thumb img { width: 40px; height: 40px; object-fit: cover; border-radius: 8px; display: block; }
.order-btns { white-space: nowrap; }
.switch { position: relative; display: inline-block; width: 44px; height: 26px; }
.switch input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; margin: 0; cursor: pointer; }
.switch i { position: absolute; inset: 0; border-radius: 99px; background: #c8c9c4; pointer-events: none; transition: background .15s; }
.switch i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .15s; }
.switch input:checked + i { background: var(--ok); }
.switch input:checked + i::after { transform: translateX(18px); }
.switch input:focus-visible + i { outline: 3px solid var(--brand); outline-offset: 2px; }

.bars { display: flex; align-items: flex-end; gap: 2px; height: 180px; border-bottom: 1px solid var(--line); }
.bar { position: relative; flex: 1 1 0; min-width: 0; max-width: 60px; height: 100%; display: flex; align-items: flex-end; justify-content: center; }
.bar i { display: block; width: 100%; max-width: 34px; background: var(--brand); border-radius: 4px 4px 0 0; }
.bar:hover i, .bar:focus i { background: var(--brand-strong); }
.tip {
  display: none; position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%); z-index: 3; margin-bottom: -40px;
  padding: 6px 9px; border-radius: 8px; background: var(--night); color: #fff; font-size: 13px; white-space: nowrap; pointer-events: none;
}
.bar:hover .tip, .bar:focus .tip { display: block; }
.hbar { display: grid; grid-template-columns: 1fr auto; gap: 3px 10px; font-size: 14px; }
.hbar b { font-variant-numeric: tabular-nums; }
.track { grid-column: 1 / -1; }
.track i { display: block; height: 8px; min-width: 2px; background: var(--brand); border-radius: 0 4px 4px 0; }
.settings { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 14px; }
.settings-save { grid-column: 1 / -1; max-width: 340px; }

/* Tablet y celular */
@media (max-width: 1000px) {
  .pos { grid-template-columns: minmax(0, 1fr) 330px; }
  .brand { display: none; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
}

@media (max-width: 760px) {
  .topbar { padding-inline: 16px; gap: 6px; flex-wrap: wrap; }
  .brand { display: inline; overflow: hidden; text-overflow: ellipsis; min-width: 0; flex: 0 1 auto; }
  .topbar nav { order: 5; flex: 1 0 100%; margin-left: 0; overflow-x: auto; scrollbar-width: none; }
  .topbar nav:empty { display: none; }
  .topbar nav a { padding: 7px 7px; font-size: 14px; flex: none; }
  .top-actions .btn span { display: none; }
  #fullscreen { display: none; }
  .pos { grid-template-columns: minmax(0, 1fr); padding-bottom: 72px; position: relative; }
  .grid { padding-inline: 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pos-tools { padding-inline: 16px; }
  .pos-order {
    position: fixed; inset: 0; z-index: 20; border: 0; padding: 12px 16px 16px;
    padding-bottom: max(16px, env(safe-area-inset-bottom)); transform: translateY(100%); transition: transform .2s; visibility: hidden;
  }
  .pos-order.open { transform: none; visibility: visible; }
  .only-mobile { display: inline-grid; }
  .cart-bar {
    position: fixed; left: 16px; right: 16px; bottom: max(12px, env(safe-area-inset-bottom)); z-index: 10;
    display: flex; justify-content: space-between; align-items: center; min-height: 54px; padding: 0 16px;
    border: 0; border-radius: var(--radius); background: var(--night); color: #fff; font-weight: 700;
  }
  .cart-bar.has { background: var(--brand); color: #1f1204; }
  .board { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; padding-inline: 16px; }
  .col { flex: 0 0 88%; scroll-snap-align: center; }
  .sound-gate { margin-inline: 16px; font-size: 16px; }
  .two-col, .form-row { grid-template-columns: 1fr; }
  .admin-body { padding-inline: 16px; }
  .admin-tabs { padding-inline: 16px; }
  .settings { grid-template-columns: minmax(0, 1fr); }
  #toasts { top: auto; bottom: 80px; right: 12px; }
}

@media (max-width: 420px) {
  .brand { display: none; }
}

/* Ticket impreso */
#print-root { display: none; }
@media print {
  html, body { height: auto; background: #fff; }
  #app, #toasts, dialog { display: none !important; }
  #print-root { display: block; }
  .ticket { width: var(--ticket-width); color: #000; font: 12px/1.3 "Courier New", monospace; }
  .ticket hr { border: 0; border-top: 1px dashed #000; }
  .t-center { text-align: center; }
  .t-strong { font-weight: 700; }
  .t-number { text-align: center; font-size: 30px; font-weight: 700; }
  .t-line { display: flex; justify-content: space-between; gap: 8px; }
  .t-note { padding-left: 10px; font-weight: 700; }
  .t-foot { margin-top: 8px; }
  .t-pay { margin-top: 4px; }
  .t-qr { margin-top: 6px; text-align: center; font-weight: 700; }
  .t-qr svg { display: block; stroke: none; width: min(60mm, 100%); height: auto; margin: 0 auto; shape-rendering: crispEdges; }
}
