/* IVSB GASTRO — design tokens e componentes.
   Tokens do restaurante (--brand-*) são injetados por BrandTheme::css() em cada página. */
:root {
  --font: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --bg: #F7F7F5; --surface: #FFFFFF; --surface-2: #F1F1EE; --text: #17191C; --muted: #5E656D; --border: #E2E2DD;
  --ivsb: #C2452D; --ivsb-ink: #A63A25; --on-ivsb: #FFFFFF; --chrome: #15181C; --on-chrome: #ECEDEA; --chrome-muted: #9AA1A9;
  --brand-primary: #1F6F5C; --brand-on-primary: #FFFFFF; --brand-primary-ink: #1F6F5C;
  --brand-secondary: #24323D; --brand-on-secondary: #FFFFFF; --brand-accent: #E2A13B; --brand-on-accent: #111418; --brand-accent-ink: #8A5A12;
  --ok: #1E7A46; --ok-bg: #E7F4EC; --warn: #8A5A00; --warn-bg: #FFF4DC; --err: #B42318; --err-bg: #FDECEA; --info: #1D5FA8; --info-bg: #E8F0FB;
  --radius: 10px; --radius-sm: 6px; --shadow: 0 1px 2px rgba(16,24,40,.06), 0 1px 3px rgba(16,24,40,.08);
  --focus: 0 0 0 3px color-mix(in srgb, var(--brand-primary) 35%, transparent);
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 15px; line-height: 1.5; color: var(--text); background: var(--bg); }
img { max-width: 100%; display: block; }
a { color: var(--brand-primary-ink); text-underline-offset: 2px; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 var(--s3); letter-spacing: -0.01em; }
h1 { font-size: 1.6rem; } h2 { font-size: 1.15rem; } h3 { font-size: 1rem; }
p { margin: 0 0 var(--s3); }
.muted { color: var(--muted); } .small { font-size: .86rem; } .mono { font-family: var(--mono); font-size: .88em; }
.num { font-variant-numeric: tabular-nums; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 12px; z-index: 50; border-radius: var(--radius-sm); }
.skip:focus { left: 8px; }
.icon { width: 20px; height: 20px; flex: none; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: var(--radius-sm); }

/* Botões */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: var(--radius-sm);
  border: 1px solid transparent; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; transition: background .15s, border-color .15s, transform .05s; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand-primary); color: var(--brand-on-primary); }
.btn-primary:hover { background: color-mix(in srgb, var(--brand-primary) 88%, #000); }
.btn-ivsb { background: var(--ivsb); color: var(--on-ivsb); } .btn-ivsb:hover { background: var(--ivsb-ink); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border); } .btn-ghost:hover { background: var(--surface-2); }
.btn-danger { background: var(--surface); color: var(--err); border-color: color-mix(in srgb, var(--err) 40%, var(--border)); }
.btn-danger:hover { background: var(--err-bg); }
.btn-sm { min-height: 34px; padding: 0 12px; font-size: .88rem; }
.btn-block { width: 100%; }
.btn[disabled], .btn.is-loading { opacity: .6; pointer-events: none; }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: var(--brand-primary-ink); cursor: pointer; text-decoration: underline; }

/* Formulários */
.field { display: grid; gap: 6px; margin-bottom: var(--s4); }
.field > label, .label { font-weight: 600; font-size: .9rem; }
.hint { font-size: .84rem; color: var(--muted); }
.input, select.input, textarea.input { width: 100%; min-height: 44px; padding: 10px 12px; font: inherit; color: var(--text); background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius-sm); }
textarea.input { min-height: 88px; resize: vertical; }
.input:focus { outline: none; border-color: var(--brand-primary); box-shadow: var(--focus); }
.field.has-error .input { border-color: var(--err); }
.error-text { color: var(--err); font-size: .86rem; display: flex; gap: 6px; align-items: flex-start; }
.grid-2 { display: grid; gap: 0 var(--s4); grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { display: grid; gap: 0 var(--s4); grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 720px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }
.check { display: flex; gap: 10px; align-items: flex-start; min-height: 32px; cursor: pointer; }
.check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--brand-primary); }
.color-row { display: flex; gap: 8px; align-items: center; }
.color-row input[type=color] { width: 48px; height: 44px; padding: 2px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); }
fieldset { border: 0; padding: 0; margin: 0 0 var(--s4); }
legend { font-weight: 700; margin-bottom: var(--s3); }

/* Avisos */
.alert { display: flex; gap: 10px; padding: 12px 14px; border-radius: var(--radius-sm); margin-bottom: var(--s4); border: 1px solid transparent; }
.alert-success { background: var(--ok-bg); color: var(--ok); border-color: color-mix(in srgb, var(--ok) 25%, transparent); }
.alert-error { background: var(--err-bg); color: var(--err); border-color: color-mix(in srgb, var(--err) 25%, transparent); }
.alert-warning { background: var(--warn-bg); color: var(--warn); border-color: color-mix(in srgb, var(--warn) 25%, transparent); }
.alert-info { background: var(--info-bg); color: var(--info); border-color: color-mix(in srgb, var(--info) 25%, transparent); }
.alert p:last-child { margin: 0; }
.sim-tag { display: inline-block; font-size: .72rem; font-weight: 800; letter-spacing: .06em; padding: 2px 6px; border-radius: 4px; background: #3B2F00; color: #FFE08A; }

/* Status (texto + ícone/forma, nunca só cor) */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px; border-radius: 999px; font-size: .8rem; font-weight: 600; white-space: nowrap;
  background: var(--surface-2); color: var(--muted); border: 1px solid var(--border); }
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.badge-ok { background: var(--ok-bg); color: var(--ok); border-color: transparent; }
.badge-warn { background: var(--warn-bg); color: var(--warn); border-color: transparent; }
.badge-err { background: var(--err-bg); color: var(--err); border-color: transparent; }
.badge-info { background: var(--info-bg); color: var(--info); border-color: transparent; }
.badge-err::before { border-radius: 1px; transform: rotate(45deg); }
.badge-warn::before { border-radius: 0; clip-path: polygon(50% 0, 100% 100%, 0 100%); }

/* Painéis, tabelas */
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: var(--s5); margin-bottom: var(--s5); }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); margin-bottom: var(--s4); flex-wrap: wrap; }
.panel-head h2 { margin: 0; }
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
table.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th { text-align: left; font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 700; background: var(--surface-2); }
.table th, .table td { padding: 11px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table td.actions { text-align: right; white-space: nowrap; }
.empty { text-align: center; padding: var(--s7) var(--s4); color: var(--muted); }
.empty .icon { width: 32px; height: 32px; margin: 0 auto var(--s3); }
.toolbar { display: flex; gap: var(--s2); flex-wrap: wrap; align-items: center; margin-bottom: var(--s4); }
.toolbar .input { max-width: 280px; }
.pagination { display: flex; gap: 6px; align-items: center; justify-content: space-between; padding: var(--s3) 0; font-size: .88rem; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; margin: 0; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; }
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: var(--s3); margin-bottom: var(--s5); }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: var(--s4); }
.stat .v { font-size: 1.6rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.stat .l { color: var(--muted); font-size: .85rem; }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); margin-bottom: var(--s4); overflow-x: auto; }
.tabs a { padding: 10px 14px; text-decoration: none; color: var(--muted); border-bottom: 2px solid transparent; white-space: nowrap; font-weight: 600; }
.tabs a[aria-current=page] { color: var(--text); border-bottom-color: var(--brand-primary); }
details.disclosure > summary { cursor: pointer; font-weight: 600; min-height: 36px; display: flex; align-items: center; }

/* Layout administrativo (restaurante e plataforma) */
.shell { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; }
.shell > div { min-width: 0; }
.sidebar { background: var(--chrome); color: var(--on-chrome); padding: var(--s4) var(--s3); display: flex; flex-direction: column; gap: var(--s4); position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.sidebar .brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 12px; border-bottom: 1px solid #2A2F35; }
.sidebar .brand img, .sidebar .brand .mono-logo { width: 36px; height: 36px; border-radius: 8px; object-fit: cover; background: var(--brand-primary); color: var(--brand-on-primary); display: grid; place-items: center; font-weight: 800; }
.sidebar .brand strong { display: block; font-size: .95rem; line-height: 1.2; }
.sidebar .brand span { font-size: .75rem; color: var(--chrome-muted); }
.nav-group { display: grid; gap: 2px; }
.nav-group .nav-title { font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: var(--chrome-muted); padding: 8px 10px 4px; }
.nav-link { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; color: var(--on-chrome); text-decoration: none; font-size: .93rem; min-height: 40px; }
.nav-link:hover { background: #23282E; }
.nav-link[aria-current=page] { background: #2A3037; box-shadow: inset 3px 0 0 var(--brand-primary); }
.nav-link .soon { margin-left: auto; font-size: .68rem; color: var(--chrome-muted); border: 1px solid #3A4048; border-radius: 4px; padding: 0 5px; }
.nav-link.disabled { opacity: .55; pointer-events: none; }
.sidebar .foot { margin-top: auto; font-size: .75rem; color: var(--chrome-muted); padding: 8px 10px; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); padding: 12px var(--s5); background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 10; }
.topbar .ctx { display: flex; align-items: center; gap: 10px; min-width: 0; }
.topbar .ctx strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .user { display: flex; align-items: center; gap: 10px; font-size: .9rem; flex: none; }
.topbar .ctx .badge { flex: none; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--surface-2); display: grid; place-items: center; font-weight: 700; font-size: .8rem; border: 1px solid var(--border); }
main.content { padding: var(--s5); max-width: 1180px; width: 100%; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--s3); margin-bottom: var(--s5); flex-wrap: wrap; }
.page-head h1 { margin: 0; } .page-head p { margin: 4px 0 0; }
.menu-toggle { display: none; }
.banner { padding: 10px var(--s5); font-size: .9rem; display: flex; gap: 8px; align-items: center; }
.banner-warn { background: var(--warn-bg); color: var(--warn); } .banner-err { background: var(--err-bg); color: var(--err); }
@media (max-width: 960px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; inset: 0 auto 0 0; width: 272px; transform: translateX(-100%); transition: transform .2s ease; z-index: 40; }
  .sidebar.open { transform: none; box-shadow: 0 0 0 100vmax rgba(0,0,0,.35); }
  .menu-toggle { display: inline-flex; }
  main.content { padding: var(--s4); }
  .topbar { padding: 10px var(--s4); }
}
@media (max-width: 560px) { .topbar .user .who { display: none; } }

/* Onboarding */
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 2px; }
.steps li { display: flex; align-items: center; gap: 12px; padding: 10px 4px; border-bottom: 1px solid var(--border); }
.steps li:last-child { border-bottom: 0; }
.step-dot { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; border: 2px solid var(--border); flex: none; color: var(--muted); font-size: .8rem; font-weight: 700; }
.steps li.done .step-dot { background: var(--ok); border-color: var(--ok); color: #fff; }
.progress { height: 8px; background: var(--surface-2); border-radius: 999px; overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--brand-primary); }

/* Telas de autenticação */
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: var(--s4); }
.auth-card { width: 100%; max-width: 420px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: var(--s6); box-shadow: var(--shadow); }
.auth-card .logo { display: flex; align-items: center; gap: 10px; margin-bottom: var(--s5); }
.wordmark { font-weight: 900; letter-spacing: .04em; } .wordmark b { color: var(--ivsb); }
.secret { font-family: var(--mono); font-size: 1rem; letter-spacing: .08em; background: var(--surface-2); padding: 10px 12px; border-radius: var(--radius-sm); word-break: break-all; user-select: all; }
.code-input { font-family: var(--mono); font-size: 1.4rem; letter-spacing: .3em; text-align: center; }

/* Página pública do restaurante */
.pub { max-width: 640px; margin: 0 auto; min-height: 100vh; background: var(--bg); }
.pub-cover { height: 180px; background: linear-gradient(135deg, var(--brand-primary), var(--brand-secondary)); background-size: cover; background-position: center; }
.pub-head { padding: 0 var(--s4) var(--s4); margin-top: -40px; display: flex; gap: var(--s3); align-items: flex-end; }
.pub-logo { width: 84px; height: 84px; border-radius: 18px; background: var(--surface); border: 3px solid var(--bg); object-fit: cover; box-shadow: var(--shadow); display: grid; place-items: center; font-size: 1.8rem; font-weight: 800; color: var(--brand-primary-ink); }
.pub-title { padding-top: 48px; min-width: 0; }
.pub-title h1 { margin: 0; font-size: 1.4rem; }
.pub-section { padding: var(--s4); border-top: 1px solid var(--border); }
.open-state { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: .9rem; }
.open-state.is-open { color: var(--ok); } .open-state.is-closed { color: var(--err); }
.pub-cta { position: sticky; bottom: 0; padding: var(--s3) var(--s4) calc(var(--s3) + env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(6px); border-top: 1px solid var(--border); }
.hours { width: 100%; border-collapse: collapse; font-size: .92rem; }
.hours td { padding: 6px 0; border-bottom: 1px dashed var(--border); } .hours tr.today td { font-weight: 700; }
.chip-row { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { display: inline-flex; gap: 6px; align-items: center; padding: 8px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); color: var(--text); text-decoration: none; font-size: .9rem; min-height: 40px; }
.pub-foot { text-align: center; padding: var(--s5) var(--s4); font-size: .78rem; color: var(--muted); }
.closed-img { border-radius: var(--radius); margin-top: var(--s3); }

/* Pré-visualização da marca */
.brand-preview { border: 1px solid var(--border); border-radius: 14px; overflow: hidden; background: var(--p-bg, #fff); color: var(--p-text, #17191C); max-width: 360px; }
.brand-preview .pv-cover { height: 90px; background: linear-gradient(135deg, var(--p-primary), var(--p-secondary)); }
.brand-preview .pv-body { padding: 14px; }
.brand-preview .pv-btn { display: block; text-align: center; padding: 11px; border-radius: 8px; font-weight: 700; background: var(--p-primary); color: var(--p-on-primary); margin-top: 10px; }
.brand-preview .pv-tag { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: .75rem; font-weight: 700; background: var(--p-accent); color: var(--p-on-accent); }
.brand-preview .pv-link { color: var(--p-primary-ink); font-weight: 600; }
.img-slot { display: flex; gap: var(--s3); align-items: center; }
.img-slot .thumb { width: 72px; height: 72px; border-radius: 10px; border: 1px dashed var(--border); background: var(--surface-2) center/cover no-repeat; flex: none; display: grid; place-items: center; color: var(--muted); }
.split { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: var(--s5); align-items: start; }
@media (max-width: 1100px) { .split { grid-template-columns: 1fr; } }
.sticky { position: sticky; top: 76px; }

/* Site institucional */
.site { max-width: 1040px; margin: 0 auto; padding: var(--s6) var(--s4); }
.site-hero h1 { font-size: clamp(1.9rem, 4.6vw, 3rem); max-width: 18ch; letter-spacing: -0.02em; }
.site-hero p { font-size: 1.1rem; color: var(--muted); max-width: 56ch; }
.site-features { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--s5); margin-top: var(--s7); }
.site-features h3 { display: flex; gap: 8px; align-items: center; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* ===== Etapa 2: cliente ===== */
.pub-bar { position: sticky; top: 0; z-index: 20; display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 12px; max-width: 640px; margin: 0 auto;
  background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border); }
.pub-bar-home { font-weight: 800; color: var(--text); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pub-bar-actions { display: flex; gap: 4px; }
.pub-icon { position: relative; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; color: var(--text); }
.pub-icon:hover { background: var(--surface-2); }
.pub-count { position: absolute; top: 2px; right: 0; min-width: 20px; height: 20px; border-radius: 999px; background: var(--brand-primary); color: var(--brand-on-primary); font-size: .72rem; font-weight: 800; display: grid; place-items: center; padding: 0 5px; }
.pub-flash { max-width: 640px; margin: 8px auto 0; padding: 0 16px; }
.table-chip { display: inline-flex; gap: 8px; align-items: center; padding: 8px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); color: var(--text); text-decoration: none; min-height: 40px; margin: 0; }
.table-chip-row { padding-top: 8px; border-top: 0; }
.cat-nav { position: sticky; top: 61px; z-index: 10; display: flex; gap: 6px; overflow-x: auto; padding: 10px 16px; background: var(--bg); border-bottom: 1px solid var(--border); scrollbar-width: none; }
.cat-nav a { flex: none; padding: 8px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); color: var(--text); text-decoration: none; font-weight: 600; font-size: .9rem; min-height: 40px; display: inline-flex; align-items: center; }
[id^="cat-"] { scroll-margin-top: 120px; }
.feat-row { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 6px; scroll-snap-type: x mandatory; }
.feat { flex: none; width: 150px; scroll-snap-align: start; text-decoration: none; color: var(--text); display: grid; gap: 4px; }
.feat img, .feat-ph { width: 150px; height: 110px; border-radius: 12px; object-fit: cover; background: var(--surface-2); display: grid; place-items: center; font-weight: 800; color: var(--brand-primary-ink); }
.feat strong { font-size: .92rem; line-height: 1.25; }
.feat .num { font-size: .88rem; color: var(--muted); }
.prod-list { list-style: none; margin: 0; padding: 0; }
.prod { display: flex; gap: 12px; justify-content: space-between; padding: 14px 0; border-bottom: 1px solid var(--border); text-decoration: none; color: var(--text); min-height: 64px; }
.prod-list li:last-child .prod { border-bottom: 0; }
.prod.is-off { opacity: .6; }
.prod-text { min-width: 0; }
.prod-text p { margin: 4px 0; }
.prod-img { width: 96px; height: 96px; border-radius: 12px; object-fit: cover; flex: none; }
.prod-meta { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-top: 6px; }
.prod-price { font-weight: 700; }
.tag { display: inline-flex; gap: 4px; align-items: center; font-size: .75rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: color-mix(in srgb, var(--brand-accent) 22%, var(--surface)); color: var(--text); border: 1px solid color-mix(in srgb, var(--brand-accent) 50%, var(--border)); }
.tag .icon { width: 14px; height: 14px; }
.prod-hero { width: 100%; max-height: 300px; object-fit: cover; }
.allergen { display: flex; gap: 8px; align-items: flex-start; background: var(--warn-bg); color: var(--warn); padding: 10px 12px; border-radius: var(--radius-sm); }
.opt-group { border: 1px solid var(--border); border-radius: var(--radius); padding: 0; margin: 0 0 16px; overflow: hidden; background: var(--surface); }
.opt-group legend { display: flex; justify-content: space-between; gap: 8px; width: 100%; padding: 12px 14px; background: var(--surface-2); font-weight: 700; float: left; }
.opt-group legend + * { clear: both; }
.opt-group .hint { padding: 8px 14px 0; margin: 0; clear: both; }
.req { font-size: .8rem; font-weight: 600; color: var(--muted); }
.opt { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-top: 1px solid var(--border); min-height: 52px; cursor: pointer; clear: both; }
.opt input { width: 20px; height: 20px; accent-color: var(--brand-primary); flex: none; }
.opt > span:nth-child(2) { flex: 1; }
.opt.is-off { opacity: .55; cursor: not-allowed; }
.add-bar { display: flex; gap: 10px; align-items: center; margin: 16px -16px 0; }
.stepper { display: inline-flex; align-items: center; gap: 4px; }
.stepper .btn { min-width: 40px; padding: 0; }
.stepper > span { min-width: 24px; text-align: center; font-weight: 700; }
.cart-lines { list-style: none; margin: 0; padding: 0; }
.cart-line { display: flex; gap: 12px; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--border); }
.cart-line.has-error { background: var(--err-bg); margin: 0 -8px; padding: 12px 8px; border-radius: 8px; }
.cart-main { min-width: 0; flex: 1; }
.cart-side { display: grid; justify-items: end; gap: 6px; flex: none; }
.cart-total { display: flex; justify-content: space-between; font-size: 1.1rem; margin: 12px 0 4px; }
.order-link { color: var(--text); text-decoration: none; }
.track-now { font-size: 1.1rem; }
.track-steps { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 0; }
.track-steps li { display: flex; gap: 12px; align-items: center; padding: 8px 0; color: var(--muted); position: relative; }
.track-steps .dot { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--border); background: var(--surface); flex: none; }
.track-steps li.done { color: var(--text); font-weight: 600; }
.track-steps li.done .dot { background: var(--brand-primary); border-color: var(--brand-primary); }
.track-steps li[aria-current=step] { color: var(--brand-primary-ink); }

/* ===== Etapa 2: salão ===== */
.floor-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; margin-bottom: 24px; }
.table-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; display: flex; flex-direction: column; gap: 8px; min-height: 130px; }
.table-card header { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.table-card .table-label { font-size: 1.3rem; }
.table-card.is-open { border-color: color-mix(in srgb, var(--warn) 40%, var(--border)); box-shadow: inset 4px 0 0 var(--warn); }
.table-card.is-blocked { opacity: .7; border-style: dashed; }

/* ===== Etapa 2: impressão de QR ===== */
.print-body { background: #fff; }
.print-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--border); position: sticky; top: 0; background: #fff; flex-wrap: wrap; }
.qr-sheet { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; padding: 16px; }
.qr-card { border: 1px solid #DDD; border-radius: 14px; padding: 18px; text-align: center; break-inside: avoid; page-break-inside: avoid; color: #111; background: #fff; }
.qr-card header { display: flex; justify-content: center; align-items: center; gap: 10px; font-size: 1.1rem; }
.qr-logo { width: 40px; height: 40px; border-radius: 8px; object-fit: cover; }
.qr-table { font-size: 1rem; margin: 10px 0 0; text-transform: uppercase; letter-spacing: .1em; color: #444; }
.qr-table span { display: block; font-size: 2.4rem; font-weight: 900; letter-spacing: 0; color: var(--brand-primary-ink); text-transform: none; }
.qr-area { margin: 0; color: #555; }
.qr-code { width: 62%; margin: 10px auto; }
.qr-code svg { width: 100%; height: auto; display: block; }
.qr-steps { text-align: left; font-size: .85rem; margin: 6px auto; max-width: 260px; padding-left: 18px; color: #222; }
.qr-url { font-size: .72rem; color: #444; word-break: break-all; margin: 6px 0 0; }
@media print {
  @page { size: A4; margin: 10mm; }
  .no-print { display: none !important; }
  .qr-sheet { grid-template-columns: 1fr 1fr; gap: 8mm; padding: 0; }
  .qr-card { height: 132mm; border-color: #999; }
}
.opt:has(input:disabled) { opacity: .5; cursor: not-allowed; }
.add-bar .btn-primary { white-space: nowrap; }

/* ===== Etapa 3 ===== */
.call-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.cart-line.is-cancelled { opacity: .6; }
.cart-line.is-cancelled strong { text-decoration: line-through; }
.pos { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 16px; align-items: start; }
@media (max-width: 1000px) { .pos { grid-template-columns: 1fr; } }
.pos-cart { position: sticky; top: 76px; }
.pos-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.pos-item { display: grid; gap: 4px; text-align: left; min-height: 84px; padding: 12px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); font: inherit; color: var(--text); cursor: pointer; }
.pos-item:hover { border-color: var(--brand-primary); }
.pos-item[disabled] { opacity: .5; cursor: not-allowed; }
.chip.is-active, .chip:has(input:checked) { background: var(--brand-primary); color: var(--brand-on-primary); border-color: var(--brand-primary); }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip { position: relative; cursor: pointer; font: inherit; }
.pos-dialog { border: 0; border-radius: 14px; padding: 20px; width: min(520px, 94vw); max-height: 90vh; overflow: auto; box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.pos-dialog::backdrop { background: rgba(0,0,0,.4); }
.receipt { max-width: 340px; margin: 16px auto; font-family: var(--mono); font-size: 13px; color: #000; background: #fff; padding: 12px; }
.receipt header { text-align: center; margin-bottom: 8px; }
.receipt header strong { font-size: 15px; }
.receipt table { width: 100%; border-collapse: collapse; margin: 8px 0; }
.receipt td { padding: 3px 0; vertical-align: top; border-bottom: 1px dashed #bbb; }
.receipt td.num { text-align: right; white-space: nowrap; padding-left: 8px; }
.receipt-warn { text-align: center; font-weight: 800; border: 1px solid #000; padding: 4px; }
.receipt-foot { text-align: center; margin-top: 10px; }
@media print { .receipt { margin: 0; max-width: 80mm; } }

/* ===== Etapa 4 ===== */
.hours-chart { display: flex; align-items: flex-end; gap: 4px; height: 180px; padding-top: 18px; overflow-x: auto; }
.hc-col { flex: 1 0 22px; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; position: relative; }
.hc-bar { width: 100%; min-height: 2px; background: var(--brand-primary); border-radius: 4px 4px 0 0; }
.hc-label { font-size: .7rem; color: var(--muted); margin-top: 4px; }
.hc-val { position: absolute; top: -16px; font-size: .7rem; color: var(--muted); }
.stat .hint { margin: 6px 0 0; font-size: .78rem; }

/* ===== Etapa 5 ===== */
.pix-box { text-align: center; display: grid; gap: 10px; justify-items: center; }
.pix-amount { font-size: 1.8rem; font-weight: 800; margin: 0; }
.pix-qr { width: 240px; max-width: 80vw; background: #fff; padding: 8px; border-radius: 12px; }
.pix-qr svg, .pix-qr img { width: 100%; height: auto; display: block; }
.pix-box .color-row { width: 100%; }
