/*
 * Salgadelli — Design System
 * Identidade: warm/apetitoso (laranja/vermelho/creme), inspirado no logo.
 * Tema CLARO/warm pras superfícies do cliente (landing, login, cardápio, kiosk).
 * Escopo ESCURO só pra cozinha (.kitchen) e kiosk fullscreen (.kioskself).
 * CSS puro, sem bundler. Mobile-first.
 *
 *= require_tree .
 *= require_self
 */

/* O atributo [hidden] deve sempre esconder, mesmo quando o elemento tem
   display explícito (ex.: .stack { display:flex }). Sem isto, painéis com
   `hidden` + classe de layout ficam visíveis. */
[hidden] { display: none !important; }

/* ============================================================
   TOKENS
   ============================================================ */
:root {
  /* Paleta da marca */
  --brand-orange: #F2700C;
  --brand-orange-hover: #D85F05;
  --brand-red: #C81E1E;
  --brand-red-hover: #A81717;
  --brand-gold: #F5A623;
  --brand-cream: #FFF6E9;
  --brand-cream-deep: #FCEAD0;
  --brand-brown: #2A1A12;
  --brand-brown-soft: #5A4536;

  /* Cores semânticas */
  --color-primary: var(--brand-orange);
  --color-primary-hover: var(--brand-orange-hover);
  --color-success: #2E7D32;
  --color-success-soft: #E4F3E4;
  --color-danger: #C81E1E;
  --color-danger-soft: #FBE4E4;
  --color-warning: #F5A623;
  --color-info: #2563EB;

  /* Superfícies (tema claro/warm — cliente) */
  --color-bg: var(--brand-cream);
  --color-bg-card: #FFFFFF;
  --color-bg-elevated: #FFFFFF;
  --color-bg-soft: var(--brand-cream-deep);
  --color-bg-hover: rgba(42, 26, 18, 0.04);

  /* Bordas */
  --color-border: rgba(42, 26, 18, 0.12);
  --color-border-strong: rgba(42, 26, 18, 0.22);

  /* Texto */
  --color-text: var(--brand-brown);
  --color-text-muted: var(--brand-brown-soft);
  --color-text-faded: rgba(42, 26, 18, 0.45);
  --color-on-primary: #FFFFFF;

  /* Spacing — base 4px */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;
  --space-4xl: 96px;

  /* Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 28px;
  --radius-full: 9999px;

  /* Shadows (warm) */
  --shadow-sm: 0 1px 3px rgba(42, 26, 18, 0.10);
  --shadow-md: 0 6px 18px rgba(42, 26, 18, 0.12);
  --shadow-lg: 0 16px 40px rgba(42, 26, 18, 0.18);
  --shadow-brand: 0 8px 22px rgba(242, 112, 12, 0.35);

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-normal: 250ms ease;
  --transition-slow: 400ms ease;

  /* Tipografia — system stack robusta; títulos pesados */
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, system-ui, sans-serif;
  --font-display: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Monaco, Consolas, monospace;

  /* Type scale */
  --fs-xs: 0.78rem;
  --fs-sm: 0.88rem;
  --fs-base: 1rem;
  --fs-md: 1.15rem;
  --fs-lg: 1.4rem;
  --fs-xl: 1.85rem;
  --fs-2xl: 2.4rem;
  --fs-3xl: 3.2rem;

  /* Z-index */
  --z-sticky: 50;
  --z-dropdown: 100;
  --z-modal: 200;
  --z-toast: 300;

  /* Container */
  --container-max: 1100px;
  --container-wide: 1280px;
  --container-narrow: 460px;
  --container-pad: var(--space-lg);

  /* Tokens de toque — superfícies touch (kiosk/cozinha/mobile) */
  --touch-min: 44px;
  --touch-comfort: 64px;
  --touch-kiosk: 88px;
  --gap-touch: 16px;
  --fs-kiosk: 24px;
}

/* ============================================================
   RESET MODERNO
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; }
html, body { height: 100%; }
body {
  font-family: var(--font-body);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.55;
  font-size: var(--fs-base);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
img, svg, video, canvas { max-width: 100%; display: block; }
a { color: var(--color-primary); text-decoration: none; }
a:hover { color: var(--color-primary-hover); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: none; }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.15; font-weight: 800; color: var(--color-text); }
h1 { font-size: var(--fs-2xl); }
h2 { font-size: var(--fs-xl); }
h3 { font-size: var(--fs-lg); }
ul, ol { padding-left: 1.2em; }
:focus-visible { outline: 3px solid var(--brand-gold); outline-offset: 2px; border-radius: var(--radius-sm); }

/* ============================================================
   LAYOUT — container REALMENTE centralizado
   ============================================================ */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}
.container--wide { max-width: var(--container-wide); }
.container--narrow { max-width: var(--container-narrow); }

.section { padding-block: var(--space-3xl); }
.section--soft { background: var(--color-bg-soft); }
.section__head { text-align: center; max-width: 640px; margin: 0 auto var(--space-2xl); }
.section__title { font-size: var(--fs-xl); }
.section__sub { color: var(--color-text-muted); margin-top: var(--space-sm); font-size: var(--fs-md); }

/* Grid responsivo genérico */
.grid { display: grid; gap: var(--space-lg); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--auto { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
@media (max-width: 760px) {
  .grid--2, .grid--3 { grid-template-columns: 1fr; }
}

/* ============================================================
   NAV / TOPBAR (cliente)
   ============================================================ */
.nav {
  position: sticky; top: 0; z-index: var(--z-sticky);
  background: rgba(255, 246, 233, 0.92);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--color-border);
}
.nav__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--space-md); min-height: 64px;
}
.nav__brand { display: flex; align-items: center; gap: var(--space-sm); }
.nav__logo { height: 44px; width: auto; }
.nav__brand-text { font-family: var(--font-display); font-weight: 800; font-size: var(--fs-md); color: var(--brand-red); }
.nav__links { display: flex; align-items: center; gap: var(--space-sm); }
.nav__link {
  color: var(--color-text); font-weight: 600; padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-full); min-height: var(--touch-min);
  display: inline-flex; align-items: center;
}
.nav__link:hover { background: var(--color-bg-hover); color: var(--color-text); }
@media (max-width: 560px) {
  .nav__brand-text { display: none; }
  .nav__links .btn span.nav-hide { display: none; }
}

/* ============================================================
   BOTÕES
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-sm);
  padding: 12px 22px;
  min-height: var(--touch-min);
  border-radius: var(--radius-full);
  font-weight: 700; font-size: var(--fs-sm);
  border: 2px solid transparent;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
  text-decoration: none; line-height: 1; white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn--primary {
  background: linear-gradient(135deg, var(--brand-gold), var(--brand-orange) 55%, var(--brand-red));
  color: var(--color-on-primary);
  box-shadow: var(--shadow-brand);
}
.btn--primary:hover { color: var(--color-on-primary); box-shadow: 0 10px 26px rgba(242, 112, 12, 0.45); transform: translateY(-1px); }
.btn--secondary {
  background: var(--brand-brown); color: #fff;
}
.btn--secondary:hover { background: #1c110b; color: #fff; }
.btn--ghost {
  background: transparent; color: var(--color-text); border-color: var(--color-border-strong);
}
.btn--ghost:hover { background: var(--color-bg-hover); color: var(--color-text); }
.btn--danger { background: var(--color-danger); color: #fff; }
.btn--success { background: var(--color-success); color: #fff; }
.btn--block { width: 100%; }
.btn--sm { padding: 8px 14px; font-size: var(--fs-xs); min-height: 36px; }
.btn--lg { padding: 16px 30px; font-size: var(--fs-md); }

/* ============================================================
   CARD
   ============================================================ */
.card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  box-shadow: var(--shadow-sm);
}
.card--interactive { transition: transform var(--transition-fast), box-shadow var(--transition-fast); }
.card--interactive:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.card__header { margin-bottom: var(--space-md); }
.card__title { margin: 0; font-size: var(--fs-md); }
.card__subtitle { margin: var(--space-xs) 0 0; color: var(--color-text-muted); font-size: var(--fs-sm); }
.card__body { color: var(--color-text-muted); }

/* ============================================================
   FORMULÁRIOS — inputs com largura controlada (não full-bleed)
   ============================================================ */
.field { display: flex; flex-direction: column; gap: var(--space-xs); margin-bottom: var(--space-md); }
.field--inline { flex-direction: row; align-items: center; gap: var(--space-sm); }
.field--inline input[type="checkbox"] { width: 20px; height: 20px; accent-color: var(--brand-orange); }
.label, .field label, label { font-size: var(--fs-sm); font-weight: 600; color: var(--color-text); }

.input,
.field input, .field textarea, .field select,
input[type="text"], input[type="email"], input[type="password"],
input[type="tel"], input[type="number"], input[type="search"], textarea, select {
  width: 100%;
  max-width: 100%;
  background: var(--color-bg-elevated);
  border: 1.5px solid var(--color-border-strong);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  font-size: var(--fs-base);
  color: var(--color-text);
  min-height: var(--touch-min);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}
.input:focus,
.field input:focus, .field textarea:focus, .field select:focus,
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--brand-orange);
  box-shadow: 0 0 0 3px rgba(242, 112, 12, 0.18);
}
::placeholder { color: var(--color-text-faded); }

/* Inline number input (cardápio "monte sua caixa") */
.input--qty { max-width: 72px; text-align: center; }

/* Forms que devem ficar estreitos (auth) ficam dentro de .auth__card */

/* ============================================================
   BADGE
   ============================================================ */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: var(--radius-full);
  font-size: var(--fs-xs); font-weight: 700; line-height: 1.4;
  background: var(--color-bg-soft); color: var(--color-text);
}
.badge--primary { background: rgba(242, 112, 12, 0.14); color: var(--brand-orange-hover); }
.badge--ok, .badge--success { background: var(--color-success-soft); color: var(--color-success); }
.badge--warn, .badge--warning { background: rgba(245, 166, 35, 0.18); color: #9a6608; }
.badge--danger { background: var(--color-danger-soft); color: var(--color-danger); }

/* ============================================================
   TABELA
   ============================================================ */
.table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
.table th, .table td { text-align: left; padding: 12px var(--space-md); border-bottom: 1px solid var(--color-border); }
.table th { font-weight: 700; color: var(--color-text-muted); font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: 0.03em; }
.table tbody tr:hover { background: var(--color-bg-hover); }
.table--card { background: var(--color-bg-card); border: 1px solid var(--color-border); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-sm); }

/* ============================================================
   ALERT
   ============================================================ */
.alert {
  padding: var(--space-md); border-radius: var(--radius-md);
  border: 1px solid var(--color-border); background: var(--color-bg-card);
  border-left: 4px solid var(--color-primary);
  font-size: var(--fs-sm);
}
.alert--success { border-left-color: var(--color-success); background: var(--color-success-soft); }
.alert--danger { border-left-color: var(--color-danger); background: var(--color-danger-soft); }
.alert--warning { border-left-color: var(--color-warning); }
.alert ul { margin: var(--space-xs) 0 0; }

/* ============================================================
   EMPTY STATE
   ============================================================ */
.empty {
  text-align: center; padding: var(--space-3xl) var(--space-lg);
  color: var(--color-text-muted);
}
.empty__icon { font-size: 3rem; margin-bottom: var(--space-md); }
.empty__title { margin: 0 0 var(--space-sm); color: var(--color-text); }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  background:
    radial-gradient(1200px 500px at 80% -10%, rgba(245, 166, 35, 0.25), transparent 60%),
    linear-gradient(180deg, var(--brand-cream), var(--brand-cream-deep));
  overflow: hidden;
}
.hero__inner {
  display: grid; grid-template-columns: 1.05fr 0.95fr;
  gap: var(--space-2xl); align-items: center;
  padding-block: var(--space-3xl);
}
.hero__kicker {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--brand-red); color: #fff; font-weight: 800;
  font-size: var(--fs-sm); padding: 6px 14px; border-radius: var(--radius-full);
  text-transform: uppercase; letter-spacing: 0.04em;
}
.hero__title {
  font-size: var(--fs-3xl); margin: var(--space-md) 0 var(--space-sm);
  letter-spacing: -0.02em;
}
.hero__title em { color: var(--brand-red); font-style: normal; }
.hero__lead { font-size: var(--fs-md); color: var(--color-text-muted); max-width: 46ch; }
.hero__actions { display: flex; flex-wrap: wrap; gap: var(--space-md); margin-top: var(--space-xl); }
.hero__media { position: relative; }
.hero__img {
  width: 100%; border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  border: 6px solid #fff;
  object-fit: cover; aspect-ratio: 4 / 3;
}
.hero__badge {
  position: absolute; bottom: -18px; left: -10px;
  background: #fff; box-shadow: var(--shadow-md);
  border-radius: var(--radius-lg); padding: var(--space-sm) var(--space-md);
  font-weight: 800; color: var(--brand-red);
  border: 2px solid var(--brand-gold);
}
@media (max-width: 880px) {
  .hero__inner { grid-template-columns: 1fr; text-align: center; padding-block: var(--space-2xl); }
  .hero__lead { margin-inline: auto; }
  .hero__actions { justify-content: center; }
  .hero__media { order: -1; max-width: 420px; margin-inline: auto; }
  .hero__title { font-size: var(--fs-2xl); }
}

/* ============================================================
   FAIXA PROMO (Copa)
   ============================================================ */
.promo-strip {
  background: linear-gradient(135deg, var(--brand-red), var(--brand-orange));
  color: #fff;
}
.promo-strip__inner {
  display: flex; align-items: center; justify-content: center; flex-wrap: wrap;
  gap: var(--space-md); padding-block: var(--space-md); text-align: center;
}
.promo-strip__tag { background: rgba(255,255,255,0.18); padding: 4px 12px; border-radius: var(--radius-full); font-weight: 800; font-size: var(--fs-sm); }
.promo-strip__text { font-weight: 800; font-size: var(--fs-md); }
.promo-strip__text strong { color: var(--brand-gold); }

/* ============================================================
   CARDS DE PREÇO
   ============================================================ */
.price-card { text-align: center; position: relative; }
.price-card--featured { border: 2px solid var(--brand-orange); box-shadow: var(--shadow-md); }
.price-card__flag {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: var(--brand-red); color: #fff; font-weight: 800; font-size: var(--fs-xs);
  padding: 4px 12px; border-radius: var(--radius-full); white-space: nowrap;
}
.price-card__name { font-size: var(--fs-md); font-weight: 800; }
.price-card__qty { color: var(--color-text-muted); font-size: var(--fs-sm); }
.price-card__price { font-family: var(--font-display); font-size: var(--fs-2xl); font-weight: 800; color: var(--brand-red); margin: var(--space-sm) 0; }
.price-card__price small { font-size: var(--fs-md); color: var(--color-text-muted); font-weight: 700; }

/* ============================================================
   COMO FUNCIONA
   ============================================================ */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-lg); }
.step { text-align: center; }
.step__num {
  width: 56px; height: 56px; margin: 0 auto var(--space-md);
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--brand-gold), var(--brand-orange));
  color: #fff; font-weight: 800; font-size: var(--fs-lg);
  border-radius: var(--radius-full); box-shadow: var(--shadow-brand);
}
.step__title { font-size: var(--fs-md); font-weight: 800; margin-bottom: var(--space-xs); }
.step__text { color: var(--color-text-muted); font-size: var(--fs-sm); }
@media (max-width: 760px) { .steps { grid-template-columns: repeat(2, 1fr); } }

/* ============================================================
   RODAPÉ
   ============================================================ */
.footer { background: var(--brand-brown); color: var(--brand-cream); padding-block: var(--space-2xl); }
.footer a { color: var(--brand-gold); }
.footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: var(--space-xl); }
.footer__brand-logo { height: 56px; width: auto; margin-bottom: var(--space-md); background: #fff; border-radius: var(--radius-md); padding: 6px; }
.footer__title { font-size: var(--fs-sm); text-transform: uppercase; letter-spacing: 0.05em; color: var(--brand-gold); margin-bottom: var(--space-sm); }
.footer__item { color: rgba(255,246,233,0.85); font-size: var(--fs-sm); margin-bottom: 6px; line-height: 1.5; }
.footer__bottom { margin-top: var(--space-xl); padding-top: var(--space-md); border-top: 1px solid rgba(255,255,255,0.12); font-size: var(--fs-xs); color: rgba(255,246,233,0.6); }
@media (max-width: 760px) { .footer__grid { grid-template-columns: 1fr; gap: var(--space-lg); } }

/* ============================================================
   AUTH (Devise) — card centralizado na identidade
   ============================================================ */
body.auth {
  min-height: 100dvh;
  display: flex; align-items: center; justify-content: center;
  padding: var(--space-lg);
  background:
    radial-gradient(900px 500px at 50% -20%, rgba(245, 166, 35, 0.30), transparent 60%),
    linear-gradient(180deg, var(--brand-cream), var(--brand-cream-deep));
}
.auth__card {
  width: 100%; max-width: var(--container-narrow);
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--space-2xl) var(--space-xl);
  box-shadow: var(--shadow-lg);
}
.auth__logo { display: block; height: 72px; width: auto; margin: 0 auto var(--space-md); }
.auth__brand { text-align: center; color: var(--brand-red); margin-bottom: var(--space-xs); font-size: var(--fs-xl); }
.auth__card h2 { text-align: center; font-size: var(--fs-lg); margin-bottom: var(--space-lg); }
.auth__card .btn { width: 100%; margin-top: var(--space-sm); }
.auth__links {
  margin-top: var(--space-lg); padding-top: var(--space-md);
  border-top: 1px solid var(--color-border);
  display: flex; flex-direction: column; gap: var(--space-sm); text-align: center;
}
.auth__links a { color: var(--color-text-muted); font-size: var(--fs-sm); font-weight: 600; }
.auth__links a:hover { color: var(--brand-orange); }

/* ============================================================
   FLASH
   ============================================================ */
.flash {
  position: fixed; top: calc(var(--space-md) + env(safe-area-inset-top)); right: var(--space-md);
  z-index: var(--z-toast); max-width: min(92vw, 380px);
  display: flex; flex-direction: column; gap: var(--space-sm);
}
.flash__item {
  padding: var(--space-md); border-radius: var(--radius-md);
  background: var(--color-bg-card); box-shadow: var(--shadow-lg);
  border-left: 4px solid var(--color-primary);
  animation: slideIn 250ms ease; font-size: var(--fs-sm); font-weight: 600;
}
.flash__item--success { border-left-color: var(--color-success); }
.flash__item--alert { border-left-color: var(--color-danger); }
@keyframes slideIn { from { transform: translateX(120%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* ============================================================
   UTILITÁRIOS
   ============================================================ */
.text-center { text-align: center; }
.text-muted { color: var(--color-text-muted); }
.text-faded { color: var(--color-text-faded); }
.text-brand { color: var(--brand-red); }
.stack { display: flex; flex-direction: column; }
.stack--sm { gap: var(--space-sm); }
.stack--md { gap: var(--space-md); }
.stack--lg { gap: var(--space-lg); }
.row { display: flex; align-items: center; }
.row--between { justify-content: space-between; }
.row--wrap { flex-wrap: wrap; }
.row--gap-sm { gap: var(--space-sm); }
.row--gap-md { gap: var(--space-md); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mb-lg { margin-bottom: var(--space-lg); }
.hidden { display: none !important; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* ============================================================
   ADMIN — shell com topbar + main centralizado
   ============================================================ */
body.admin { background: var(--color-bg-soft); }
.admin__topbar {
  position: sticky; top: 0; z-index: var(--z-sticky);
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap;
  gap: var(--space-md);
  padding: var(--space-sm) var(--space-lg);
  background: var(--brand-brown); color: var(--brand-cream);
  min-height: 60px;
}
.admin__topbar strong { font-family: var(--font-display); color: #fff; font-size: var(--fs-md); }
.admin__nav { display: flex; align-items: center; gap: var(--space-sm); flex-wrap: wrap; }
.admin__nav .btn--ghost { color: var(--brand-cream); border-color: rgba(255,255,255,0.25); }
.admin__nav .btn--ghost:hover { background: rgba(255,255,255,0.1); color: #fff; }
.admin__nav span { color: rgba(255,246,233,0.8); font-size: var(--fs-sm); }
.admin__main { padding-block: var(--space-xl); }

/* Dashboards admin */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: var(--space-md); margin: var(--space-lg) 0; }
.stat { background: var(--color-bg-card); border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: var(--space-md); display: flex; flex-direction: column; gap: 4px; box-shadow: var(--shadow-sm); }
.stat__label { font-size: var(--fs-xs); color: var(--color-text-muted); }
.stat__value { font-size: var(--fs-xl); font-weight: 800; color: var(--brand-red); }
.stat__hint { font-size: var(--fs-xs); color: var(--color-text-muted); }
.dash-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: var(--space-lg); margin: var(--space-lg) 0; }

/* ============================================================
   CARDÁPIO — "monte sua caixa" (cliente)
   ============================================================ */
.menu { padding-block: var(--space-xl); }
.menu__head { margin-bottom: var(--space-lg); }
.menu fieldset {
  border: 1px solid var(--color-border); border-radius: var(--radius-lg);
  padding: var(--space-lg); margin-bottom: var(--space-lg);
  background: var(--color-bg-card); box-shadow: var(--shadow-sm);
}
.menu legend { font-weight: 800; padding-inline: var(--space-sm); color: var(--brand-red); }
.menu .field--inline { margin-bottom: var(--space-sm); }

/* ============================================================
   PWA — toasts / opt-in (tema claro)
   ============================================================ */
.pwa-toast {
  position: fixed; left: 50%; bottom: calc(16px + env(safe-area-inset-bottom));
  transform: translateX(-50%); z-index: var(--z-toast);
  display: flex; gap: var(--space-md); align-items: center;
  background: var(--color-bg-card); color: var(--color-text);
  border: 1px solid var(--color-border-strong); border-radius: var(--radius-md);
  padding: var(--space-sm) var(--space-md); box-shadow: var(--shadow-lg);
}
.pwa-toast button { min-height: var(--touch-min); padding: 0 var(--space-md); background: var(--brand-orange); color: #fff; border-radius: var(--radius-sm); touch-action: manipulation; }
.push-optin, .pwa-install { margin-top: var(--space-lg); }
.push-optin button, .pwa-install button { min-height: var(--touch-comfort); touch-action: manipulation; }
.push-optin__ios { margin-top: var(--space-sm); }

/* ============================================================
   KIOSK autoatendimento (§5.1) — ESCURO, alvos gigantes, fullscreen
   ============================================================ */
body.kioskself {
  margin: 0;
  background: #0f0b08; color: #FFF6E9; overscroll-behavior: none;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}
body.kioskself a { color: var(--brand-gold); }
.kiosk {
  min-height: 100dvh;
  padding: calc(var(--space-lg) + env(safe-area-inset-top)) var(--space-lg) calc(var(--space-lg) + env(safe-area-inset-bottom));
  display: flex; flex-direction: column; gap: var(--space-lg);
  -webkit-tap-highlight-color: transparent; user-select: none;
}
.kiosk__brand { font-size: 28px; font-weight: 800; color: var(--brand-orange); }
.kiosk__brand span { color: rgba(255,246,233,0.7); font-weight: 500; font-size: 18px; margin-left: 8px; }
.kiosk__title { font-size: 32px; margin: 0 0 var(--space-md); color: #fff; }
.kiosk__promo { color: var(--brand-gold); font-weight: 700; font-size: var(--fs-kiosk); }
.kiosk__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--gap-touch); }
.kiosk__bigbtn {
  min-height: var(--touch-kiosk); padding: var(--space-lg);
  display: flex; flex-direction: column; gap: 8px; align-items: center; justify-content: center;
  background: #1c130d; color: #FFF6E9;
  border: 2px solid rgba(255,246,233,0.18); border-radius: var(--radius-lg);
  font-size: var(--fs-kiosk); touch-action: manipulation;
}
.kiosk__bigbtn:active { transform: scale(0.97); }
.kiosk__bigbtn.is-selected { border-color: var(--brand-orange); background: #2a1a10; }
.kiosk__bigbtn-name { font-weight: 700; }
.kiosk__bigbtn-price { color: rgba(255,246,233,0.7); }
.kiosk__voicebtn {
  min-height: var(--touch-kiosk); width: 100%; font-size: var(--fs-kiosk);
  background: var(--brand-red); color: #fff; border-radius: var(--radius-lg); touch-action: manipulation;
}
.kiosk__voicebtn.is-listening { animation: pulse 1s infinite; }
.kiosk__voicehint { font-size: 18px; color: rgba(255,246,233,0.7); margin: var(--space-sm) 0; }
.kiosk__flavors { display: flex; flex-direction: column; gap: var(--gap-touch); }
.kiosk__flavor { display: flex; align-items: center; justify-content: space-between; font-size: var(--fs-kiosk); }
.kiosk__stepper { display: flex; align-items: center; gap: var(--space-md); }
.kiosk__step-btn {
  width: var(--touch-kiosk); height: var(--touch-kiosk); font-size: 36px;
  background: #1c130d; color: #FFF6E9;
  border: 2px solid rgba(255,246,233,0.18); border-radius: var(--radius-md); touch-action: manipulation;
}
.kiosk__step-btn:active { transform: scale(0.94); }
.kiosk__qty { min-width: 48px; text-align: center; font-weight: 800; font-size: 28px; }
.kiosk__summary { font-size: var(--fs-kiosk); }
.kiosk__nav { display: flex; gap: var(--gap-touch); margin-top: auto; }
.kiosk__back, .kiosk__next {
  min-height: var(--touch-kiosk); flex: 1; font-size: var(--fs-kiosk);
  border-radius: var(--radius-lg); touch-action: manipulation;
  display: inline-flex; align-items: center; justify-content: center; text-decoration: none;
}
.kiosk__back { background: #1c130d; color: #FFF6E9; border: 2px solid rgba(255,246,233,0.18); flex: 0 0 30%; }
.kiosk__next { background: var(--brand-red); color: #fff; }
.kiosk__idle { position: fixed; inset: 0; z-index: var(--z-modal); background: rgba(0,0,0,0.85); display: flex; align-items: center; justify-content: center; }
.kiosk__idle-box { text-align: center; padding: var(--space-2xl); }
.kiosk__idle-title { font-size: 36px; font-weight: 800; color: #fff; }
.kiosk__idle-sub { font-size: var(--fs-kiosk); color: rgba(255,246,233,0.7); margin-bottom: var(--space-lg); }
.kiosk--order .kiosk__qr { width: min(70vw, 360px); height: auto; background: #fff; border-radius: var(--radius-md); }
.kiosk__pix-hint, .kiosk__order-total { font-size: var(--fs-kiosk); }
.kiosk input, .kioskself input { font-size: 16px; }

/* ============================================================
   NAV — item ATIVO (helper nav_link_to)
   ============================================================ */
/* O helper adiciona .is-active no item da rota atual (e btn--primary se for .btn).
   Reforço extra pra navs que não são botões e pra garantir contraste no admin escuro. */
.is-active { font-weight: 800; }
.admin__nav .btn--ghost.is-active {
  background: rgba(242, 112, 12, 0.22);
  border-color: var(--brand-orange);
  color: #fff;
}
.nav__link.is-active { background: var(--color-bg-hover); color: var(--brand-red); }

/* ============================================================
   MODAL — <dialog> + <turbo-frame id="modal"> (compartilhado)
   ============================================================ */
.modal {
  border: none; padding: 0; background: transparent;
  max-width: min(92vw, 560px); width: 100%;
  border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
  color: var(--color-text);
}
.modal::backdrop { background: rgba(42, 26, 18, 0.55); backdrop-filter: blur(2px); }
.modal[open] { animation: modalIn 180ms ease; }
.modal__frame { display: block; }
/* Painel do conteúdo do modal — use .modal__panel no markup que a action renderiza. */
.modal__panel {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
}
.modal__head {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--space-md); margin-bottom: var(--space-md);
}
.modal__title { font-size: var(--fs-md); margin: 0; }
.modal__close {
  font-size: var(--fs-lg); line-height: 1; color: var(--color-text-muted);
  padding: var(--space-xs); border-radius: var(--radius-sm); min-height: var(--touch-min);
}
.modal__close:hover { color: var(--color-text); background: var(--color-bg-hover); }
@keyframes modalIn { from { transform: translateY(10px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* ============================================================
   FUNIL — board genérico (sala "geral" no admin, tema claro).
   As salas-TV (atendimento/cozinha/motoboys) reaproveitam estas classes mas
   re-tematizam no body.funnel-room (escuro, alto contraste). NÃO renomear:
   .funnel, .funnel__col, .funnel-card, #funnel-col-*, #funnel-count-*,
   [data-funnel-target], [data-stage] (usados por broadcast + Stimulus).
   ============================================================ */
.funnel { display: flex; flex-direction: column; gap: var(--space-md); }
.funnel__top {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--space-md); flex-wrap: wrap;
}
.funnel__brand { font-size: var(--fs-md); font-weight: 900; display: flex; align-items: center; gap: var(--space-sm); }
.funnel__sub { color: var(--brand-orange); font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; font-size: var(--fs-sm); }
.funnel__tools { display: flex; align-items: center; gap: var(--space-md); }
.funnel__clock { font-weight: 900; font-variant-numeric: tabular-nums; font-size: var(--fs-md); }
.funnel__status { width: 12px; height: 12px; border-radius: 50%; background: var(--color-success); box-shadow: 0 0 8px var(--color-success); }
.funnel__status.is-off { background: var(--color-danger); box-shadow: 0 0 8px var(--color-danger); animation: pulse 1.2s infinite; }

/* Trilha horizontal de colunas — rola no eixo X em telas estreitas. */
.funnel__cols {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(220px, 1fr);
  gap: var(--space-md); overflow-x: auto; align-items: start;
  padding-bottom: var(--space-sm);
}
.funnel__col {
  display: flex; flex-direction: column; min-height: 120px;
  background: var(--color-bg-card); border: 1px solid var(--color-border);
  border-radius: var(--radius-lg); overflow: hidden;
}
.funnel__col-title {
  margin: 0; padding: var(--space-md);
  display: flex; align-items: center; gap: var(--space-sm);
  font-size: var(--fs-sm); font-weight: 900; text-transform: uppercase; letter-spacing: 0.04em;
  border-bottom: 2px solid var(--color-border);
}
.funnel__col-name { flex: 1; }
.funnel__col-count {
  min-width: 26px; height: 26px; padding: 0 8px; border-radius: var(--radius-full);
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--color-bg-soft); font-size: var(--fs-xs); font-weight: 900;
}
.funnel__col-cards {
  flex: 1 1 auto; padding: var(--space-md); display: flex; flex-direction: column;
  gap: var(--space-md); overflow-y: auto;
}
.funnel__col-cards:empty::after {
  content: "— vazio —"; margin: var(--space-lg) auto;
  color: var(--color-text-faded); font-size: var(--fs-sm); font-weight: 700;
}

.funnel-card {
  background: var(--color-bg-card); border: 1px solid var(--color-border);
  border-left: 6px solid var(--brand-orange); border-radius: var(--radius-md);
  padding: var(--space-md); box-shadow: var(--shadow-sm);
}
.funnel-card--conversation { border-left-color: var(--brand-gold); }
.funnel-card__top { display: flex; align-items: center; justify-content: space-between; gap: var(--space-sm); margin-bottom: var(--space-sm); }
.funnel-card__num { font-weight: 900; font-size: var(--fs-md); }
.funnel-card__total { font-weight: 900; color: var(--color-success); }
.funnel-card__items { list-style: none; margin: 0 0 var(--space-sm); padding: 0; }
.funnel-card__items li { font-size: var(--fs-sm); }
.funnel-card__qty { font-weight: 900; color: var(--brand-orange-hover); margin-right: 6px; }
.funnel-card__meta { display: flex; align-items: center; gap: var(--space-sm); flex-wrap: wrap; font-size: var(--fs-xs); }
.funnel-card__fulfill { font-weight: 800; }
.funnel-card__fulfill--delivery { color: var(--color-info); }
.funnel-card__fulfill--pickup { color: var(--color-text-muted); }
.funnel-card__flag { font-size: var(--fs-xs); font-weight: 800; color: var(--brand-red); margin-bottom: var(--space-sm); }
.funnel-card__actions { margin-top: var(--space-md); display: flex; gap: var(--space-sm); }
.funnel-card__advance {
  flex: 1; min-height: var(--touch-comfort); border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--brand-gold), var(--brand-orange));
  color: #fff; font-weight: 900; font-size: var(--fs-base);
}
.funnel-card__advance:active { transform: scale(0.97); }
.funnel-card__advance:disabled { opacity: 0.5; cursor: not-allowed; }

/* --- Salas-TV (escuro, leitura a ~2m, alvos grandes) --- */
body.funnel-room {
  margin: 0; background: #100b08; color: #fbf3e9;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}
body.funnel-room .funnel { height: 100dvh; padding: var(--space-md); }
body.funnel-room .funnel__top { padding: 6px 14px; }
body.funnel-room .funnel__brand { font-size: 26px; }
body.funnel-room .funnel__sub { color: var(--brand-gold); }
body.funnel-room .funnel__clock { font-size: 30px; }
body.funnel-room .funnel__cols { flex: 1 1 auto; min-height: 0; }
body.funnel-room .funnel__col { background: #1a120c; border-color: #3a2b1e; }
body.funnel-room .funnel__col-title { color: #fff; border-bottom-color: #3a2b1e; font-size: var(--fs-md); }
body.funnel-room .funnel__col-count { background: #2e2117; color: #fbf3e9; }
body.funnel-room .funnel__col-cards:empty::after { color: #6f5d4c; }
body.funnel-room .funnel-card { background: #241a12; border-color: #3a2b1e; color: #fbf3e9; box-shadow: 0 3px 10px rgba(0,0,0,.35); }
body.funnel-room .funnel-card__num { font-size: 28px; }
body.funnel-room .funnel-card__items li { font-size: 20px; }
body.funnel-room .funnel-card__total { color: #34d399; }
body.funnel-room .funnel-card__advance { min-height: var(--touch-kiosk); font-size: 22px; color: #1a0f04; }

@media (max-width: 760px) {
  .funnel__cols { grid-auto-columns: minmax(80vw, 1fr); }
}

/* ============================================================
   COZINHA (KDS) — ESCURO, leitura a ~2m (Spec 07 §4)
   ============================================================ */
body.kitchen {
  margin: 0; background: #0a0a0c; color: #f4f4f8;
  font-size: 18px;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}
body.kitchen h1, body.kitchen h2, body.kitchen h3 { color: #fff; }
.kds__reconnecting {
  position: fixed; inset: 0; z-index: var(--z-modal);
  background: rgba(10,10,12,0.6); backdrop-filter: blur(2px);
  display: flex; align-items: center; justify-content: center; text-align: center;
}
.kds__reconnecting[hidden] { display: none; }
.kds__reconnecting-inner p { font-size: 28px; font-weight: 700; margin: var(--space-md) 0 4px; }
.kds__reconnecting-inner small { color: rgba(255,255,255,0.7); }
.kds__spinner {
  width: 48px; height: 48px; margin: 0 auto; border-radius: 50%;
  border: 5px solid rgba(255,255,255,0.2); border-top-color: var(--brand-orange);
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 50% { opacity: 0.6; } }
