/* Layout: columna de app tipo delivery (máx 720px) con header pegajoso, barra de carrito y navegación inferior; el panel se abre a 1040px. */
:root {
  --bg: #f7f6f1;
  --surface: #ffffff;
  --sunk: #efede5;
  --ink: #2f2f2c;         /* grafito del logo */
  --muted: #76726a;
  --line: #e4e1d7;
  --accent: #645416;      /* oliva del logo */
  --accent-ink: #ffffff;
  --accent-soft: #eeebd8;
  --caramel: #a36d12;     /* dorado: puntos */
  --caramel-soft: #f6ecd8;
  --ok: #2f7d4f; --ok-soft: #e1f2e7;
  --warn: #9a6a00; --warn-soft: #fdf1cf;
  --bad: #b3261e; --bad-soft: #fbe2df;
  --info: #3b5ea8; --info-soft: #e3eaf8;
  --shadow: 0 6px 24px rgba(40, 36, 20, .12);
  --f-display: "Marcellus", "Cormorant Garamond", Georgia, serif;
  --f-body: "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --logo-light: block; --logo-dark: none;
  --r: 14px;
  --tint-s: 32%; --tint-l: 91%;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #191916; --surface: #23221e; --sunk: #2d2b26; --ink: #f0ece2; --muted: #aca595; --line: #38352e;
    --accent: #cdb76a; --accent-ink: #1d1a10; --accent-soft: #3a3420;
    --caramel: #e2b25e; --caramel-soft: #3b2f1a;
    --ok: #6fd39a; --ok-soft: #1c3527; --warn: #f0c35a; --warn-soft: #3b3017; --bad: #ff8a80; --bad-soft: #43201d; --info: #9db7f2; --info-soft: #1f2a42;
    --shadow: 0 6px 24px rgba(0,0,0,.45); --tint-s: 18%; --tint-l: 22%;
    --logo-light: none; --logo-dark: block;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #191916; --surface: #23221e; --sunk: #2d2b26; --ink: #f0ece2; --muted: #aca595; --line: #38352e;
  --accent: #cdb76a; --accent-ink: #1d1a10; --accent-soft: #3a3420;
  --caramel: #e2b25e; --caramel-soft: #3b2f1a;
  --ok: #6fd39a; --ok-soft: #1c3527; --warn: #f0c35a; --warn-soft: #3b3017; --bad: #ff8a80; --bad-soft: #43201d; --info: #9db7f2; --info-soft: #1f2a42;
  --shadow: 0 6px 24px rgba(0,0,0,.45); --tint-s: 18%; --tint-l: 22%;
  --logo-light: none; --logo-dark: block;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font: 15px/1.45 var(--f-body); -webkit-tap-highlight-color: transparent; }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 30; background: var(--surface); }
.chip.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
h1, h2, h3 { margin: 0; text-wrap: balance; line-height: 1.2; }
p { margin: 0; }
.num { font-variant-numeric: tabular-nums; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }

.wrap { max-width: 720px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.wrap.wide { max-width: 1040px; }
main { padding-bottom: calc(150px + env(safe-area-inset-bottom, 0px)); }

/* Header */
.top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: var(--surface); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; gap: 12px; padding-block: 10px; }
.brand { display: flex; align-items: baseline; gap: 6px; text-decoration: none; color: var(--ink); }
.brand b { font-family: var(--f-display); font-weight: 400; font-size: 25px; color: var(--accent); letter-spacing: .08em; line-height: 1; }
.brand { align-items: center; gap: 8px; }
.brand .dog { width: 46px; height: auto; }
.brand .txt { display: grid; gap: 1px; }
.brand small { font-size: 9px !important; letter-spacing: .22em !important; }
.lg-l { display: var(--logo-light); } .lg-d { display: var(--logo-dark); }
.hero-logo { width: min(260px, 70%); height: auto; margin: 4px auto 6px; }
.hero { text-align: center; justify-items: center; }
.hero .meta { justify-content: center; }
.hero h1 { font-weight: 400; letter-spacing: .01em; }
.brand small { font-size: 11px; text-transform: uppercase; letter-spacing: .18em; color: var(--muted); font-weight: 700; }
.top .spacer { flex: 1; }
.pts-chip { display: inline-flex; align-items: center; gap: 6px; border: 0; background: var(--caramel-soft); color: var(--caramel); font-weight: 800; border-radius: 999px; padding: 6px 12px; text-decoration: none; font-size: 14px; white-space: nowrap; }

.status-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; }
.status-pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }

/* Hero */
.hero { padding-block: 18px 6px; display: grid; gap: 4px; }
.hero h1 { font-family: var(--f-display); font-weight: 400; font-size: clamp(26px, 6vw, 36px); letter-spacing: .3px; }
.hero p { color: var(--muted); }
.hero .meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.closed-banner { margin-top: 12px; background: var(--warn-soft); color: var(--warn); padding: 10px 14px; border-radius: var(--r); font-weight: 600; }

.search { margin-top: 14px; position: relative; }
.search input { width: 100%; border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 12px 16px 12px 42px; font-size: 15px; }
.search svg { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: var(--muted); }

.chips { display: flex; gap: 8px; overflow-x: auto; padding-block: 14px 6px; scrollbar-width: none; position: sticky; top: calc(env(safe-area-inset-top, 0px) + 57px); background: var(--bg); z-index: 10; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; border: 1px solid var(--line); background: var(--surface); padding: 7px 14px; border-radius: 999px; font-weight: 600; font-size: 14px; white-space: nowrap; }
.chip.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }

/* Productos */
.cat { padding-top: 18px; scroll-margin-top: 120px; }
.cat h2 { font-family: var(--f-display); font-weight: 400; font-size: 23px; letter-spacing: .02em; margin-bottom: 4px; }
.prod { display: grid; grid-template-columns: 1fr auto; gap: 14px; align-items: center; padding-block: 14px; border-bottom: 1px solid var(--line); background: none; border-left: 0; border-right: 0; border-top: 0; width: 100%; text-align: left; }
.prod > div:first-child { min-width: 0; display: grid; gap: 4px; }
.prod h3 { font-size: 16px; font-weight: 700; }
.prod .desc { color: var(--muted); font-size: 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.prod .price { font-weight: 800; }
.prod.off { opacity: .5; }
.tag { display: inline-block; font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 6px; }
.tag.low { background: var(--warn-soft); color: var(--warn); }
.tag.out { background: var(--sunk); color: var(--muted); }
.thumb { position: relative; width: 120px; height: 120px; border-radius: 12px; display: grid; place-items: center; font-size: 52px; overflow: hidden; flex: none; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb .add { position: absolute; right: 6px; bottom: 6px; width: 32px; height: 32px; border-radius: 50%; background: var(--surface); color: var(--accent); display: grid; place-items: center; font-size: 22px; font-weight: 800; box-shadow: var(--shadow); line-height: 1; }
.thumb .qty { position: absolute; left: 6px; top: 6px; min-width: 24px; height: 24px; border-radius: 12px; background: var(--accent); color: var(--accent-ink); font-size: 13px; font-weight: 800; display: grid; place-items: center; padding: 0 6px; }
.empty { text-align: center; color: var(--muted); padding-block: 40px; display: grid; gap: 10px; justify-items: center; }

.admin-link { display: block; text-align: center; color: var(--muted); margin-top: 28px; font-size: 13px; }

/* Barra de carrito + nav */
.dock { position: fixed; left: 0; right: 0; bottom: 0; z-index: 25; pointer-events: none; }
.dock > * { pointer-events: auto; }
.cartbar { max-width: 688px; margin: 0 auto 10px; width: calc(100% - 32px); display: flex; align-items: center; gap: 12px; background: var(--accent); color: var(--accent-ink); border: 0; border-radius: 14px; padding: 14px 16px; font-weight: 800; box-shadow: var(--shadow); text-decoration: none; }
.cartbar .count { background: rgba(255,255,255,.22); border-radius: 8px; padding: 2px 9px; }
.cartbar .spacer { flex: 1; }
.nav { background: var(--surface); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom, 0px); padding-left: env(safe-area-inset-left, 0px); padding-right: env(safe-area-inset-right, 0px); }
.nav .wrap { display: grid; grid-template-columns: repeat(4, 1fr); padding-left: 0; padding-right: 0; }
.nav a { display: grid; justify-items: center; gap: 2px; padding-block: 8px 10px; text-decoration: none; color: var(--muted); font-size: 12px; font-weight: 700; position: relative; }
.nav a.on { color: var(--accent); }
.nav .badge { position: absolute; top: 4px; left: calc(50% + 6px); background: var(--accent); color: var(--accent-ink); font-size: 11px; border-radius: 9px; min-width: 18px; height: 18px; display: grid; place-items: center; padding: 0 5px; }

/* Bloques genéricos */
.page-title { padding-block: 20px 8px; display: flex; align-items: center; gap: 10px; }
.page-title h1 { font-family: var(--f-display); font-size: 27px; font-weight: 400; letter-spacing: .02em; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; display: grid; gap: 12px; }
.stack { display: grid; gap: 14px; }
.row { display: flex; align-items: center; gap: 10px; }
.row.between { justify-content: space-between; }
.row.wrapit { flex-wrap: wrap; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.strong { font-weight: 800; }
.label { font-size: 12px; text-transform: uppercase; letter-spacing: .1em; font-weight: 800; color: var(--muted); }
hr { border: 0; border-top: 1px solid var(--line); margin: 0; width: 100%; }

.btn { border: 0; border-radius: 12px; padding: 12px 18px; font-weight: 800; background: var(--sunk); color: var(--ink); display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; }
.btn.primary { background: var(--accent); color: var(--accent-ink); }
.btn.gold { background: var(--caramel); color: #fff; }
.btn.ghost { background: none; border: 1px solid var(--line); }
.btn.danger { background: var(--bad-soft); color: var(--bad); }
.btn.block { width: 100%; }
.btn.sm { padding: 7px 12px; font-size: 13px; border-radius: 10px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }

.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); }
.stepper button { width: 34px; height: 34px; border: 0; background: none; font-size: 18px; font-weight: 800; color: var(--accent); }
.stepper span { min-width: 26px; text-align: center; font-weight: 800; }

.field { display: grid; gap: 6px; }
.field > span { font-size: 13px; font-weight: 700; }
.field input, .field select, .field textarea { width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px; background: var(--surface); font-size: 15px; }
.field textarea { resize: vertical; min-height: 64px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 460px) { .grid2 { grid-template-columns: 1fr; } }

.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.seg label { border: 1.5px solid var(--line); border-radius: 12px; padding: 12px; display: grid; gap: 2px; cursor: pointer; background: var(--surface); }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.seg label:has(input:focus-visible) { outline: 3px solid var(--accent); outline-offset: 2px; }
.seg b { font-size: 15px; }
.seg small { color: var(--muted); }

.line-item { display: grid; grid-template-columns: 48px 1fr auto; gap: 12px; align-items: center; }
.line-item .mini { width: 48px; height: 48px; border-radius: 10px; display: grid; place-items: center; font-size: 26px; overflow: hidden; }
.line-item .mini img { width: 100%; height: 100%; object-fit: cover; }
.line-item > div:nth-child(2) { min-width: 0; }
.totals { display: grid; gap: 6px; }
.totals .row { justify-content: space-between; }
.totals .grand { font-size: 18px; font-weight: 800; }
.earn { background: var(--caramel-soft); color: var(--caramel); border-radius: 10px; padding: 10px 12px; font-weight: 700; font-size: 14px; }

/* Seguimiento */
.track { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.track div { display: grid; gap: 6px; font-size: 12px; font-weight: 700; color: var(--muted); }
.track div::before { content: ""; height: 6px; border-radius: 3px; background: var(--sunk); }
.track div.done { color: var(--ink); }
.track div.done::before { background: var(--accent); }

.st { display: inline-block; font-size: 12px; font-weight: 800; padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.st.warn { background: var(--warn-soft); color: var(--warn); }
.st.info { background: var(--info-soft); color: var(--info); }
.st.ok { background: var(--ok-soft); color: var(--ok); }
.st.done { background: var(--sunk); color: var(--muted); }
.st.bad { background: var(--bad-soft); color: var(--bad); }
.st.gold { background: var(--caramel-soft); color: var(--caramel); }

.order-link { text-align: left; width: 100%; color: inherit; }

/* Puntos */
.wallet { background: var(--ink); color: var(--bg); border-radius: 18px; padding: 20px; display: grid; gap: 6px; position: relative; overflow: hidden; }
.wallet::after { content: ""; position: absolute; right: -40px; top: -40px; width: 160px; height: 160px; border-radius: 50%; border: 22px solid var(--caramel); opacity: .35; }
.wallet .big { font-family: var(--f-display); letter-spacing: .02em; font-weight: 400; font-size: 46px; line-height: 1; color: var(--caramel); }
.wallet .muted { color: inherit; opacity: .7; }
.progress { height: 8px; background: rgba(127,127,127,.3); border-radius: 4px; overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--caramel); border-radius: 4px; }
.rewards { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.reward { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; display: grid; grid-template-rows: auto 1fr; }
.reward .pic { height: 96px; display: grid; place-items: center; font-size: 46px; }
.reward .pic img { width: 100%; height: 100%; object-fit: cover; }
.reward .body { padding: 12px; display: grid; gap: 6px; align-content: start; }
.reward h3 { font-size: 15px; font-weight: 700; }
.reward .cost { color: var(--caramel); font-weight: 800; }
.code { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 26px; font-weight: 800; letter-spacing: .2em; background: var(--sunk); border-radius: 10px; padding: 10px; text-align: center; }
.mov { display: grid; grid-template-columns: 1fr auto; gap: 8px; padding-block: 10px; border-bottom: 1px solid var(--line); }
.mov:last-child { border-bottom: 0; }
.plus { color: var(--ok); font-weight: 800; }
.minus { color: var(--bad); font-weight: 800; }

/* Sheet */
.scrim { position: fixed; inset: 0; background: rgba(20, 8, 12, .5); z-index: 40; display: flex; align-items: flex-end; justify-content: center; animation: fade .15s ease; }
.sheet { background: var(--surface); width: 100%; max-width: 560px; max-height: 92vh; overflow: hidden; border-radius: 20px 20px 0 0; display: flex; flex-direction: column; animation: up .2s ease; }
.sheet-body { overflow: auto; min-height: 0; padding: 20px max(16px, env(safe-area-inset-right, 0px)) calc(20px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); display: grid; gap: 14px; }
.sheet-body:has(+ .sheet-actions) { padding-bottom: 16px; }
@media (min-width: 700px) { .scrim { align-items: center; } .sheet { border-radius: 20px; } }
.sheet .hero-pic { height: 200px; border-radius: 14px; display: grid; place-items: center; font-size: 96px; overflow: hidden; }
.sheet .hero-pic img { width: 100%; height: 100%; object-fit: cover; }
.sheet-head { display: flex; align-items: flex-start; gap: 10px; }
.sheet-head h2 { flex: 1; font-size: 21px; font-weight: 800; }
.x { border: 0; background: var(--sunk); width: 34px; height: 34px; border-radius: 50%; font-size: 18px; flex: none; }
.demo-note { background: var(--info-soft); color: var(--info); border-radius: 10px; padding: 10px 12px; font-size: 13px; font-weight: 600; }
@keyframes up { from { transform: translateY(30px); opacity: 0; } }
@keyframes fade { from { opacity: 0; } }

.toast { position: fixed; left: 50%; bottom: calc(140px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 10px 18px; border-radius: 999px; font-weight: 700; z-index: 60; box-shadow: var(--shadow); max-width: calc(100% - 32px); text-align: center; animation: up .2s ease; }

/* Panel */
.admin-top .wrap { flex-wrap: nowrap; }
.tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; padding-block: 12px 4px; }
.tabs button { flex: none; border: 0; background: none; padding: 9px 14px; border-radius: 10px; font-weight: 700; color: var(--muted); display: inline-flex; gap: 6px; align-items: center; }
.tabs button.on { background: var(--accent); color: var(--accent-ink); }
.tabs .n { background: var(--accent); color: var(--accent-ink); border-radius: 9px; font-size: 11px; padding: 1px 6px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; display: grid; gap: 2px; }
.kpi b { font-size: 22px; font-variant-numeric: tabular-nums; }
.orders-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; align-items: start; }
.ocard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; display: grid; gap: 10px; border-top: 4px solid var(--line); }
.ocard.s-pago_pendiente { border-top-color: var(--warn); }
.ocard.s-confirmado { border-top-color: var(--accent); }
.ocard.s-preparando { border-top-color: var(--info); }
.ocard.s-listo { border-top-color: var(--ok); }
.ocard ul { margin: 0; padding-left: 18px; font-size: 14px; }
.ocard .actions { display: flex; gap: 8px; flex-wrap: wrap; }

.ptable { display: grid; gap: 8px; }
.prow { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; display: grid; grid-template-columns: 52px minmax(0, 1fr) auto auto; gap: 12px; align-items: center; }
.prow.paused { opacity: .6; }
.prow .mini { width: 52px; height: 52px; border-radius: 10px; display: grid; place-items: center; font-size: 28px; overflow: hidden; }
.prow .mini img { width: 100%; height: 100%; object-fit: cover; }
.prow .info { min-width: 0; display: grid; gap: 2px; text-align: left; background: none; border: 0; padding: 0; }
.prow .info b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stock { display: grid; justify-items: center; gap: 2px; }
.stock input { width: 64px; text-align: center; border: 1px solid var(--line); border-radius: 8px; padding: 6px; background: var(--surface); font-weight: 800; }
.stock small { font-size: 11px; color: var(--muted); }
@media (max-width: 520px) {
  .prow { grid-template-columns: 44px minmax(0, 1fr) auto; }
  .prow .mini { width: 44px; height: 44px; }
  .prow .stock { grid-column: 2; display: flex; justify-content: flex-start; align-items: center; gap: 8px; }
  .prow .switch { grid-row: 1; grid-column: 3; }
}

.switch { position: relative; width: 50px; height: 30px; flex: none; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch i { position: absolute; inset: 0; border-radius: 15px; background: var(--line); transition: background .15s; }
.switch i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: transform .15s; }
.switch input:checked + i { background: var(--ok); }
.switch input:checked + i::after { transform: translateX(20px); }
.switch input:focus-visible + i { outline: 3px solid var(--accent); outline-offset: 2px; }

.setting { display: flex; align-items: center; gap: 12px; justify-content: space-between; padding-block: 12px; border-bottom: 1px solid var(--line); }
.setting:last-child { border-bottom: 0; }
.setting > div { min-width: 0; }
.setting input[type="number"], .setting input[type="text"] { width: 120px; border: 1px solid var(--line); border-radius: 8px; padding: 8px; background: var(--surface); text-align: right; }

.pin { max-width: 340px; margin: 40px auto 0; }
.pin .hero-logo { width: 200px; }
.pin input { text-align: center; font-size: 28px; letter-spacing: .5em; }
.upload { display: flex; align-items: center; gap: 12px; }
.upload .mini { width: 64px; height: 64px; border-radius: 12px; display: grid; place-items: center; font-size: 34px; overflow: hidden; }
.upload .mini img { width: 100%; height: 100%; object-fit: cover; }

/* Precios, promos y ahorro */
.was { color: var(--muted); font-size: 13px; }
.pct-off { background: var(--ok); color: var(--surface); font-size: 12px; font-weight: 800; padding: 1px 6px; border-radius: 6px; }
.vsapp { font-size: 12px; color: var(--ok); font-weight: 700; }
.savebox { background: var(--ok-soft); color: var(--ok); border-radius: 10px; padding: 10px 12px; display: grid; gap: 1px; font-size: 13px; }
.savebox b { font-size: 16px; }
.thumb.is-promo { outline: 3px solid var(--ok); outline-offset: -3px; }

.banners { display: grid; grid-auto-flow: column; grid-auto-columns: min(86%, 420px); gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; margin-top: 14px; padding-bottom: 4px; scrollbar-width: none; }
.banners::-webkit-scrollbar { display: none; }
.banner { scroll-snap-align: start; position: relative; aspect-ratio: 16 / 8; max-width: 100%; border: 0; border-radius: 18px; overflow: hidden; padding: 0; text-align: left; color: #fff;
  background: linear-gradient(135deg, hsl(var(--h) 38% 36%), hsl(calc(var(--h) - 15) 40% 20%)); }
.banner img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.banner::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(20,8,12,.72), rgba(20,8,12,.05) 75%); }
.banner .bemoji { position: absolute; right: 6%; top: 50%; transform: translateY(-50%) rotate(-8deg); font-size: clamp(64px, 18vw, 110px); }
.banner .btext { position: absolute; left: 0; bottom: 0; z-index: 1; padding: 16px 18px; display: grid; gap: 3px; max-width: 72%; }
.banner .btext b { font-family: var(--f-display); font-weight: 400; font-size: clamp(20px, 5vw, 26px); line-height: 1.05; }
.banner .btext > span:last-child { font-size: 13px; opacity: .92; }
.banner .btag { justify-self: start; background: #fff; color: #2a1b20; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; padding: 2px 8px; border-radius: 6px; }
.banner.paused { opacity: .45; }

.offers { display: grid; grid-auto-flow: column; grid-auto-columns: 168px; gap: 12px; overflow-x: auto; padding-block: 6px 4px; scrollbar-width: none; }
.offers::-webkit-scrollbar { display: none; }
.offer { border: 1px solid var(--line); background: var(--surface); border-radius: var(--r); padding: 0; overflow: hidden; text-align: left; display: grid; }
.ophoto { position: relative; height: 128px; display: grid; place-items: center; font-size: 60px; overflow: hidden; }
.ophoto img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ribbon { position: absolute; left: 8px; top: 8px; background: var(--ok); color: var(--surface); font-weight: 800; font-size: 13px; padding: 3px 8px; border-radius: 8px; }
.obody { padding: 10px 12px 12px; display: grid; gap: 4px; }
.obody b { font-size: 14px; line-height: 1.25; }
.save { font-size: 12px; font-weight: 800; color: var(--ok); }
.sheet .hero-pic { height: 260px; }

.sheet-actions { flex: none; background: var(--surface); padding: 12px max(16px, env(safe-area-inset-right, 0px)) calc(14px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); border-top: 1px solid var(--line); }
@media (max-width: 420px) {
  .brand small { display: none; }
  .sheet .hero-pic { height: 200px; }
  .thumb { width: 104px; height: 104px; }
}
@media (max-width: 420px) { .admin-top .brand small { display: none; } .admin-top .wrap { gap: 8px; } }
.card { min-width: 0; grid-template-columns: minmax(0, 1fr); }
.setting { gap: 8px; }
@media (max-width: 460px) { .setting input[type="number"] { width: 90px; } }

/* Avisos push */
.bell { position: relative; border: 0; background: none; width: 38px; height: 38px; display: grid; place-items: center; color: var(--ink); border-radius: 50%; }
.bell .dot { position: absolute; top: 2px; right: 0; background: var(--accent); color: var(--accent-ink); font-size: 10px; font-weight: 800; min-width: 17px; height: 17px; border-radius: 9px; display: grid; place-items: center; padding: 0 4px; }
.optin { margin-top: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px 12px; align-items: center; }
.optin > .row, .optin > .btn { grid-column: 1 / -1; }
.optin-ic { font-size: 28px; }
.push { position: fixed; z-index: 70; top: calc(env(safe-area-inset-top, 0px) + 10px); left: 50%; transform: translateX(-50%); width: min(420px, calc(100% - 20px)); display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 12px; align-items: start; text-align: left;
  background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border: 1px solid var(--line); border-radius: 18px; padding: 12px 14px; box-shadow: var(--shadow); color: var(--ink); animation: drop .35s cubic-bezier(.2, .9, .3, 1.2); }
.push.static { position: static; transform: none; width: 100%; animation: none; box-shadow: 0 2px 10px rgba(0,0,0,.18); }
.push-ic { width: 40px; height: 40px; border-radius: 10px; background: #faf8f2; display: grid; place-items: center; overflow: hidden; }
.push-ic img { width: 34px; height: auto; }
.push-ic b { font-family: var(--f-display); font-weight: 400; color: #fff; font-size: 22px; }
.push-tx { display: grid; gap: 1px; min-width: 0; font-size: 14px; }
.push-tx b { font-size: 15px; }
.push-app { font-size: 11px; letter-spacing: .06em; color: var(--muted); font-weight: 700; }
@keyframes drop { from { transform: translate(-50%, -120%); } }
.composer { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 18px; align-items: start; }
@media (max-width: 760px) { .composer { grid-template-columns: minmax(0, 1fr); } }
.phone { border-radius: 28px; padding: 14px 12px 60px; background: linear-gradient(160deg, #5c5220, #26241c); display: grid; gap: 10px; }
.phone-time { color: #fff; text-align: center; font-size: 34px; font-weight: 300; padding-block: 8px 6px; }
.tpls { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.tpls::-webkit-scrollbar { display: none; }
@media (max-width: 420px) {
  .brand .dog { width: 36px; }
  .brand b { font-size: 21px; }
  .top .status-pill { font-size: 0; padding: 5px; gap: 0; }
  .top .status-pill::before { width: 9px; height: 9px; }
  .pts-chip { padding: 6px 10px; font-size: 13px; }
  .top .wrap { gap: 8px; }
}

/* Sucursales */
.branch-pill { border: 0; cursor: pointer; }
.branch-bar { margin-top: 14px; width: 100%; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; text-align: left;
  background: var(--surface); border: 1.5px solid var(--accent); border-radius: var(--r); padding: 12px 14px; color: var(--ink); }
.branch-bar > span:nth-child(2) { display: grid; gap: 1px; min-width: 0; }
.branch-bar small { color: var(--muted); font-size: 12px; }
.branch-bar b { font-size: 16px; }
.branch-bar .chev { color: var(--accent); font-weight: 800; font-size: 14px; }
.branch-bar.pick { background: var(--accent-soft); }
.branch-bar.pick .chev { font-size: 26px; }
.pin-ic { font-size: 22px; }
.branch-opt { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center; border: 1.5px solid var(--line); border-radius: var(--r); padding: 14px; }
.branch-opt > div { display: grid; gap: 4px; min-width: 0; }
.branch-opt.on { border-color: var(--accent); background: var(--accent-soft); }
.branch-switch { display: flex; gap: 6px; padding-top: 10px; flex-wrap: wrap; }
.branch-switch button { border: 1.5px solid var(--line); background: var(--surface); border-radius: 999px; padding: 7px 14px; font-weight: 800; color: var(--ink); display: inline-flex; gap: 6px; align-items: center; }
.branch-switch button.on { border-color: var(--accent); background: var(--accent); color: var(--accent-ink); }
.branch-switch .n { background: var(--accent-soft); color: var(--accent); border-radius: 9px; font-size: 11px; padding: 1px 6px; }
.branch-switch button.on .n { background: var(--accent-ink); color: var(--accent); }
@media (max-width: 420px) { .top .branch-pill { font-size: 12px; padding: 4px 9px; } .top .branch-pill::before { display: none; } }
.admin-top .wrap + .wrap { display: block; padding-block: 0; }
.status-pill, .branch-switch button, .branch-pill { white-space: nowrap; }
@media (max-width: 420px) {
  .admin-top .brand .txt { display: none; }
  .admin-top .wrap:first-child { gap: 6px; }
  .admin-top .btn.sm { padding: 7px 10px; }
}
.reward .pic { position: relative; overflow: hidden; height: 140px; }
.reward .pic img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* Estados nuevos */
.ocard.s-reparto_solicitado { border-top-color: var(--info); }
.ocard.s-en_camino { border-top-color: var(--ok); }
.track div { font-size: 11px; }

/* Comanda (ticket de 80 mm) */
.comanda { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 13px; line-height: 1.35; background: #fff; color: #000;
  width: 100%; max-width: 302px; margin: 0 auto; padding: 14px 12px; border: 1px dashed #bbb; display: grid; gap: 4px; }
.comanda .c-center { text-align: center; }
.comanda .c-big { font-size: 15px; font-weight: 800; }
.comanda .c-huge { font-size: 30px; font-weight: 900; letter-spacing: .04em; }
.comanda .c-box { border: 2px solid #000; padding: 3px 6px; font-weight: 800; }
.comanda .c-line { border-top: 1px dashed #000; margin: 4px 0; }
.comanda .c-item { display: grid; grid-template-columns: 34px 1fr; gap: 4px; font-size: 15px; }
.comanda .c-row { display: flex; justify-content: space-between; }
@media print {
  @page { size: 80mm auto; margin: 0; }
  body.printing * { visibility: hidden !important; }
  body.printing .comanda, body.printing .comanda * { visibility: visible !important; }
  body.printing .comanda { position: absolute; left: 0; top: 0; width: 72mm; max-width: none; border: 0; padding: 2mm; }
  body.printing .scrim { background: none; position: static; }
}
.chips .chip.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.sheet .hero-pic { position: relative; overflow: hidden; height: auto; aspect-ratio: 4 / 3; max-height: 340px; max-width: 100%; }
.sheet .hero-pic img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.thumb, .line-item .mini, .prow .mini, .upload .mini { position: relative; }
.thumb img, .line-item .mini img, .prow .mini img, .upload .mini img { position: absolute; inset: 0; object-position: center; }
.sheet .hero-pic { width: 100%; aspect-ratio: auto; height: min(320px, 72vw); max-height: none; }

.saved-data { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; background: var(--sunk); border-radius: 10px; padding: 10px 12px; }
.saved-data b { font-size: 16px; }
.pay-mp { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; align-items: center; border: 1.5px solid var(--accent); background: var(--accent-soft); border-radius: 12px; padding: 12px; }
.pay-mp > div { display: grid; gap: 2px; }
.mp-ic { font-size: 26px; }
.fee-note { display: grid; gap: 4px; background: var(--warn-soft); color: var(--ink); border-radius: 10px; padding: 10px 12px; font-size: 14px; }
.fee-note > b { color: var(--warn); }
.boot { min-height: 70vh; display: grid; place-content: center; justify-items: center; gap: 12px; color: var(--muted); }
body.busy { cursor: progress; }
body.busy button[type=submit], body.busy .btn.primary { opacity: .6; pointer-events: none; }
