/* ==========================================================================
   CHURRASCARIA CANAÃ — BASE VISUAL (cliente e painel)
   Modelo 3 · App: Bricolage Grotesque + Caveat, vinho, vinho-noite e dourado,
   formas arredondadas e botões em pílula.
   ========================================================================== */
:root {
  --wine: #870107; --wine-d: #650005; --wine-dd: #3b0204; --wine-soft: #f9eceb; --wine-tint: #fff8f7;
  --night: #2b0b0d; --night-2: #4a2a2c; --night-txt: #d6c8c3; --night-mute: #b9a8a4;
  --gold: #e8b21c; --gold-d: #c18a06; --gold-ink: #6b4b00; --gold-soft: #fbf2d9; --cream: #f7ebd3;
  --ink: #1d1716; --ink-2: #5a4f4b; --muted: #6f6460; --line: #e3d9d4; --line-2: #f1ebe8;
  --paper: #f7f2ef; --card: #ffffff; --char: #2b0b0d; --char-2: #3a1a1c;
  --ok: #17643b; --ok-soft: #e4f3ea; --warn: #b26600; --warn-soft: #fcefd9;
  --danger: #bf2229; --danger-soft: #fce7e7; --info: #1d5bb8; --info-soft: #e5edfa;
  --purple: #6a3dbf; --purple-soft: #eee7fa; --indigo: #34479f; --indigo-soft: #e7e9f7;
  --amber: #a86e00; --amber-soft: #fdf3d6; --orange: #c4560c; --orange-soft: #fdeadc;
  --wa: #1f8f4e;
  --f-display: 'Bricolage Grotesque', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --f-body: 'Bricolage Grotesque', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --f-hand: 'Caveat', 'Bricolage Grotesque', cursive;
  --r-sm: 12px; --r: 20px; --r-lg: 24px;
  --sh-1: 0 1px 2px rgba(29, 23, 22, .05);
  --sh-card: 0 10px 24px -14px rgba(29, 23, 22, .4);
  --sh-2: 0 10px 28px -12px rgba(29, 23, 22, .28);
  --sh-3: 0 24px 60px -20px rgba(29, 23, 22, .45);
  --ease: cubic-bezier(.2, .8, .2, 1);
  color-scheme: light;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 15px/1.45 var(--f-body); -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
}
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
h1, h2, h3, h4 { margin: 0; line-height: 1.12; text-wrap: balance; }
p { margin: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 10px; }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.num { font-variant-numeric: tabular-nums; }

/* Ícones */
.i { width: 1.25em; height: 1.25em; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: -.25em; }
.i-fill { fill: currentColor; }
.i-sm { width: 1em; height: 1em; }
.i-lg { width: 1.6em; height: 1.6em; }

/* Tipografia */
.display { font-family: var(--f-display); font-weight: 800; letter-spacing: -.015em; }
.hand { font-family: var(--f-hand); font-weight: 700; line-height: 1; letter-spacing: 0; }
.eyebrow { font-size: 11.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--gold-ink); }
.muted { color: var(--muted); }
.price { font-weight: 800; font-variant-numeric: tabular-nums; color: var(--wine); }

/* Botões (pílula) */
.btn {
  --bg: var(--card); --fg: var(--ink); --bd: var(--line);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 10px 20px;
  border-radius: 99px; border: 1.5px solid var(--bd); background: var(--bg); color: var(--fg);
  font-weight: 700; font-size: 15px; line-height: 1.1; text-decoration: none; white-space: nowrap;
  transition: transform .15s var(--ease), background .2s, box-shadow .2s, opacity .2s;
}
.btn:active { transform: scale(.97); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .45; pointer-events: none; }
.btn-primary { --bg: var(--wine); --fg: #fff; --bd: var(--wine); box-shadow: 0 10px 22px -12px rgba(135, 1, 7, .85); }
.btn-primary:hover { --bg: var(--wine-d); --bd: var(--wine-d); }
.btn-gold { --bg: var(--gold); --fg: var(--wine-dd); --bd: var(--gold); box-shadow: 0 10px 22px -12px rgba(120, 80, 0, .85); }
.btn-gold:hover { --bg: #f0bf2f; }
.btn-dark { --bg: var(--night); --fg: #fff; --bd: var(--night); }
.btn-ghost { --bg: transparent; --bd: transparent; --fg: var(--ink-2); }
.btn-ghost:hover { --bg: var(--line-2); }
.btn-outline { --bg: var(--card); --bd: var(--line); }
.btn-outline:hover { --bd: #d3c6c0; }
.btn-danger { --bg: var(--danger); --fg: #fff; --bd: var(--danger); }
.btn-ok { --bg: var(--ok); --fg: #fff; --bd: var(--ok); }
.btn-wa { --bg: var(--wa); --fg: #fff; --bd: var(--wa); box-shadow: 0 10px 22px -12px rgba(23, 100, 59, .8); }
.btn-wa-o { --bg: var(--card); --fg: var(--ok); --bd: var(--wa); border-width: 2px; }
.btn-block { width: 100%; }
.btn-lg { min-height: 54px; font-size: 16px; padding: 14px 24px; }
.btn-sm { min-height: 36px; padding: 7px 14px; font-size: 13.5px; }
.icon-btn {
  display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; border: 0;
  background: transparent; color: var(--ink-2); position: relative; flex: none; text-decoration: none;
}
.icon-btn:hover { background: var(--line-2); }
.icon-btn .i { width: 22px; height: 22px; }

/* Botão redondo (cabeçalhos) */
.rbtn { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--paper); color: var(--ink); flex: none; position: relative; text-decoration: none; }
.rbtn .i { width: 22px; height: 22px; stroke-width: 2.2; }
.rbtn.wine { background: var(--wine); color: #fff; }
.rbtn.gold { background: var(--gold); color: var(--wine-dd); }
.rbtn.soft { background: var(--gold-soft); color: var(--wine); }
.rbtn .rb-badge { position: absolute; top: -3px; right: -3px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 99px; background: var(--wine); color: #fff; font-size: 11px; font-weight: 800; display: grid; place-items: center; border: 2px solid #fff; }
.rbtn.wine .rb-badge { background: var(--gold); color: var(--wine-dd); }

/* Pílula de ação com círculo dourado */
.cta {
  display: inline-flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 54px; padding: 6px 6px 6px 22px;
  border-radius: 99px; border: 0; background: var(--wine); color: #fff; text-decoration: none; font-weight: 800; font-size: 16px; line-height: 1.15;
  box-shadow: 0 12px 26px -12px rgba(135, 1, 7, .9); transition: transform .15s var(--ease), opacity .2s; text-align: left;
}
.cta:active { transform: scale(.98); }
.cta .cta-ic { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--gold); color: var(--wine-dd); flex: none; }
.cta .cta-ic .i { width: 20px; height: 20px; stroke-width: 2.6; }
.cta .cta-chip { padding: 8px 14px; border-radius: 99px; background: var(--gold); color: var(--wine-dd); font-weight: 800; white-space: nowrap; font-variant-numeric: tabular-nums; }
.cta-block { display: flex; width: 100%; }
.cta[aria-disabled="true"], .cta:disabled { opacity: .5; pointer-events: none; box-shadow: none; }
.cta.dark { background: var(--night); box-shadow: 0 12px 26px -14px rgba(43, 11, 13, .9); }

/* Seletor de quantidade − 1 + */
.stepper { display: inline-flex; align-items: center; gap: 4px; padding: 3px; border-radius: 99px; background: var(--paper); }
.stepper button { width: 34px; height: 34px; border-radius: 50%; border: 0; display: grid; place-items: center; background: #fff; color: var(--wine); box-shadow: var(--sh-1); }
.stepper button .i { width: 16px; height: 16px; stroke-width: 2.6; }
.stepper button:last-child { background: var(--wine); color: #fff; }
.stepper button:disabled { color: #c9bfbb; background: #fff; box-shadow: none; }
.stepper button:last-child:disabled { background: #d9cfcb; color: #fff; }
.stepper output { min-width: 22px; text-align: center; font-weight: 800; font-variant-numeric: tabular-nums; }
.stepper.lg { padding: 4px; }
.stepper.lg button { width: 40px; height: 40px; }
.stepper.lg output { min-width: 24px; font-size: 17px; }

/* Formulários */
.fld { display: grid; gap: 6px; min-width: 0; }
.fld > span { font-size: 13px; font-weight: 700; color: var(--ink-2); }
.fld > small { color: var(--muted); font-size: 12.5px; }
.inp, .fld input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), .fld select, .fld textarea {
  width: 100%; min-height: 48px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line);
  background: var(--card); font-size: 16px; transition: border-color .15s, box-shadow .15s;
}
.fld textarea { min-height: 76px; resize: vertical; line-height: 1.4; border-radius: 16px; }
.inp:focus, .fld input:focus, .fld select:focus, .fld textarea:focus { outline: none; border-color: var(--gold-d); box-shadow: 0 0 0 4px var(--gold-soft); }
.fld.err input, .fld.err select, .fld.err textarea { border-color: var(--danger); box-shadow: 0 0 0 4px var(--danger-soft); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.grid-3 { display: grid; grid-template-columns: 2fr 1fr; gap: 10px; }
@media (max-width: 380px) { .grid-2 { grid-template-columns: 1fr; } }

/* Interruptor */
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; }
.switch input { appearance: none; width: 46px; height: 28px; border-radius: 99px; background: #d9cfcb; position: relative; transition: background .2s; flex: none; margin: 0; cursor: pointer; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: var(--sh-1); transition: transform .2s var(--ease); }
.switch input:checked { background: var(--ok); }
.switch input:checked::after { transform: translateX(18px); }
.switch input:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

/* Selos e chips */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 99px; font-size: 11.5px; font-weight: 800; letter-spacing: .01em; white-space: nowrap; background: var(--line-2); color: var(--ink-2); }
.badge .i { width: 13px; height: 13px; }
.badge-gold { background: var(--gold-soft); color: var(--gold-ink); }
.badge-red { background: var(--danger-soft); color: var(--danger); }
.badge-ok { background: var(--ok-soft); color: var(--ok); }
.badge-wine { background: var(--wine-soft); color: var(--wine); }
.badge-ex { background: var(--night); color: var(--gold); border-radius: 8px; }
.tone-amber { background: var(--amber-soft); color: var(--amber); }
.tone-blue { background: var(--info-soft); color: var(--info); }
.tone-orange { background: var(--orange-soft); color: var(--orange); }
.tone-purple { background: var(--purple-soft); color: var(--purple); }
.tone-indigo { background: var(--indigo-soft); color: var(--indigo); }
.tone-green { background: var(--ok-soft); color: var(--ok); }
.tone-red { background: var(--danger-soft); color: var(--danger); }

.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px 0; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  display: inline-flex; align-items: center; gap: 7px; flex: none; min-height: 40px; padding: 8px 14px; border-radius: 99px;
  border: 1px solid var(--line); background: var(--card); font-weight: 700; font-size: 14px; color: var(--ink-2); white-space: nowrap; text-decoration: none;
}
.chip .i { width: 17px; height: 17px; }
.chip[aria-pressed="true"] { background: var(--night); border-color: var(--night); color: #fff; }
.chip[aria-pressed="true"] .i { color: var(--gold); }
.chip .count { font-size: 12px; opacity: .65; font-variant-numeric: tabular-nums; }

/* Miniatura de produto / prato (com foto ou arte de prato) */
.thumb { position: relative; overflow: hidden; border-radius: 16px; background: var(--line-2); aspect-ratio: 1; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.ph { display: grid; place-items: center; width: 100%; height: 100%; color: var(--wine);
  background: radial-gradient(circle at 50% 54%, #fff 0 30%, rgba(255, 255, 255, .6) 30.5% 39%, transparent 39.5%), var(--ph, var(--cream)); }
.ph .i { width: 34%; height: 34%; stroke-width: 1.6; }
.ph[data-t="carnes"], .ph[data-t="pratos-do-dia"] { --ph: #f6e3e0; color: var(--wine); }
.ph[data-t="saladas"] { --ph: #e4eedd; color: #3f7a2e; }
.ph[data-t="acompanhamentos"], .ph[data-t="massas"] { --ph: #f7ebd3; color: #9a6a00; }
.ph[data-t="sucos"] { --ph: #fbe6c8; color: #b35f00; }
.ph[data-t="refrigerantes"] { --ph: #f3dcdc; color: var(--wine); }
.ph[data-t="aguas"] { --ph: #dcebf5; color: #1f6f9e; }
.ph[data-t="outras-bebidas"] { --ph: #e9e2f3; color: #6a3dbf; }
.ph[data-t="prato"] { --ph: #f7ebd3; color: var(--wine); }
.thumb.r { border-radius: 50%; }
.thumb.r .ph { background: radial-gradient(circle, #fff 0 44%, var(--ph, var(--cream)) 45%); }
.thumb.r .ph .i { width: 44%; height: 44%; stroke-width: 1.7; }

/* Toast */
#toasts { position: fixed; z-index: 90; left: 50%; transform: translateX(-50%); top: calc(env(safe-area-inset-top, 0px) + 12px); display: grid; gap: 8px; width: min(440px, calc(100% - 32px)); pointer-events: none; }
.toast { display: flex; align-items: flex-start; gap: 10px; padding: 12px 16px; border-radius: 18px; background: var(--night); color: #fff; box-shadow: var(--sh-3); font-weight: 600; font-size: 14.5px; opacity: 0; transform: translateY(-10px); transition: opacity .25s, transform .25s var(--ease); }
.toast.in { opacity: 1; transform: none; }
.toast .i { color: var(--gold); margin-top: 1px; }
.toast-ok .i { color: #6fd39b; }
.toast-err { background: var(--danger); }
.toast-err .i { color: #fff; }

/* Diálogo */
.dlg-wrap { position: fixed; inset: 0; z-index: 95; display: grid; place-items: center; padding: 16px; background: rgba(43, 11, 13, .5); opacity: 0; transition: opacity .2s; }
.dlg-wrap.in { opacity: 1; }
.dlg { width: min(420px, 100%); background: var(--card); border-radius: var(--r-lg); padding: 22px; box-shadow: var(--sh-3); display: grid; gap: 12px; transform: translateY(8px) scale(.98); transition: transform .25s var(--ease); }
.dlg-wrap.in .dlg { transform: none; }
.dlg h3 { font: 800 21px/1.2 var(--f-display); letter-spacing: -.01em; }
.dlg p { color: var(--ink-2); }
.dlg-act { display: flex; gap: 10px; justify-content: flex-end; margin-top: 6px; flex-wrap: wrap; }

/* Folhas (bottom sheet) */
.sheet-wrap { position: fixed; inset: 0; z-index: 80; background: rgba(43, 11, 13, .48); display: flex; align-items: flex-end; justify-content: center; opacity: 0; transition: opacity .22s; }
.sheet-wrap.in { opacity: 1; }
.sheet { width: min(640px, 100%); max-height: 92%; background: var(--paper); border-radius: 26px 26px 0 0; display: flex; flex-direction: column; transform: translateY(40px); transition: transform .3s var(--ease); box-shadow: var(--sh-3); overflow: hidden; }
.sheet-wrap.in .sheet { transform: none; }
.sheet.full { height: 100%; max-height: 100%; border-radius: 0; }
@media (min-width: 700px) { .sheet-wrap { align-items: center; padding: 24px; } .sheet { border-radius: 26px; max-height: 88%; } .sheet.full { height: auto; max-height: 92%; border-radius: 26px; } }
.sheet-head { display: flex; align-items: center; gap: 12px; padding: 14px 16px 12px; background: var(--card); border-radius: 0 0 24px 24px; box-shadow: 0 8px 20px -16px rgba(29, 23, 22, .5); position: relative; z-index: 1; padding-top: max(14px, env(safe-area-inset-top, 0px)); }
.sheet-head .sh-t { flex: 1; min-width: 0; display: grid; line-height: 1.1; }
.sheet-head .sh-t .hand { font-size: 20px; color: var(--wine); }
.sheet-head h3 { font: 800 20px/1.15 var(--f-display); letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sheet-body { overflow-y: auto; padding: 16px 14px; display: grid; grid-auto-rows: max-content; gap: 16px; align-content: start; flex: 1; overscroll-behavior: contain; }
.sheet-foot { padding: 12px 14px; padding-bottom: calc(14px + env(safe-area-inset-bottom, 0px)); background: var(--card); border-radius: 24px 24px 0 0; box-shadow: 0 -10px 30px -18px rgba(29, 23, 22, .45); display: flex; gap: 10px; align-items: center; position: relative; z-index: 1; }

/* Seletor segmentado e opções em cartão (cliente e painel) */
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: 99px; background: var(--line-2); }
.seg button { min-height: 42px; border: 0; border-radius: 99px; background: transparent; font-weight: 800; font-size: 15px; color: var(--ink-2); display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.seg button[aria-pressed="true"] { background: var(--wine); color: #fff; box-shadow: 0 8px 16px -10px rgba(135, 1, 7, .9); }
.choice2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.opt-list { display: grid; gap: 8px; }
.opt {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 16px; border: 2px solid var(--line-2);
  background: var(--card); text-align: left; width: 100%; font-weight: 700; min-height: 58px;
}
.opt .oi { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: var(--paper); color: var(--ink-2); flex: none; }
.opt div { flex: 1; min-width: 0; }
.opt small { display: block; color: var(--muted); font-weight: 500; font-size: 12.5px; }
.opt .radio { width: 22px; height: 22px; border-radius: 50%; border: 2px solid #d4c8c3; flex: none; }
.opt[aria-pressed="true"] { border-color: var(--wine); background: var(--wine-tint); }
.opt[aria-pressed="true"] .oi { background: var(--wine); color: #fff; }
.opt[aria-pressed="true"] .radio { border: 7px solid var(--wine); }

/* Estados vazios */
.empty { display: grid; justify-items: center; text-align: center; gap: 10px; padding: 32px 20px; color: var(--muted); }
.empty > .i { width: 64px; height: 64px; padding: 15px; border-radius: 50%; background: var(--gold-soft); color: var(--wine); stroke-width: 1.7; }
.empty h3 { font: 800 19px/1.25 var(--f-display); color: var(--ink); letter-spacing: -.01em; }
.empty p { max-width: 34ch; }

.skel { background: linear-gradient(90deg, var(--line-2), #fff, var(--line-2)); background-size: 200% 100%; animation: sk 1.2s infinite linear; border-radius: 20px; }
@keyframes sk { to { background-position: -200% 0; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
