/* css/styles.css — Lorencini's Pizza V2
   Aesthetic: wood-fired / warm dark. Charcoal base, tomato-ember accent,
   cream text. Fraunces (display) + Manrope (body). Mobile-first. */

:root {
  --bg:        #131010;
  --bg-2:      #1d1715;
  --ember:     #ff6a3d;   /* tomato ember accent */
  --ember-dim: #d84b23;
  --cream:     #f7f1e6;
  --muted:     #a89a88;
  --line:      rgba(247, 241, 230, 0.08);
  --danger:    #ff8a6b;
  --radius:    16px;
  --shadow:    0 24px 60px -20px rgba(0, 0, 0, 0.7);
  --font-disp: "Fraunces", Georgia, serif;
  --font-body: "Manrope", system-ui, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: var(--font-body);
  color: var(--cream);
  background:
    radial-gradient(120% 90% at 50% -10%, rgba(255, 106, 61, 0.18), transparent 60%),
    radial-gradient(80% 60% at 90% 110%, rgba(255, 106, 61, 0.08), transparent 55%),
    var(--bg);
  -webkit-font-smoothing: antialiased;
}

/* ---------- Brand ---------- */
.brand { text-align: center; margin-bottom: 1.75rem; }
.brand__mark {
  display: inline-block;
  color: var(--ember);
  font-size: 0.8rem;
  margin-bottom: 0.5rem;
  filter: drop-shadow(0 0 10px rgba(255, 106, 61, 0.6));
}
.brand__name {
  font-family: var(--font-disp);
  font-weight: 600;
  font-size: 1.9rem;
  line-height: 1.05;
  margin: 0;
  letter-spacing: -0.01em;
}
.brand__name em { color: var(--ember); font-style: italic; }
.brand__tag {
  margin: 0.4rem 0 0;
  color: var(--muted);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.brand--inline { display: flex; align-items: center; gap: 0.55rem; margin: 0; }
.brand--inline .brand__mark { margin: 0; }
.brand--inline em { color: var(--ember); font-style: italic; }
.brand--inline strong { font-family: var(--font-disp); font-weight: 600; font-size: 1.15rem; }

/* ---------- Auth layout ---------- */
.auth {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  grid-template-rows: 1fr auto;
}
.auth__card {
  width: 100%;
  max-width: 380px;
  align-self: center;
  background: linear-gradient(180deg, var(--bg-2), #19130f);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 2rem 1.6rem 1.8rem;
  animation: rise 0.5s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.auth__error {
  margin: 0 0 0.9rem;
  color: var(--danger);
  font-size: 0.88rem;
  background: rgba(255, 138, 107, 0.08);
  border: 1px solid rgba(255, 138, 107, 0.25);
  border-radius: 10px;
  padding: 0.6rem 0.75rem;
}
.auth__foot {
  align-self: end;
  text-align: center;
  color: var(--muted);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  margin: 1.5rem 0 0;
}

/* ---------- Fields ---------- */
.field { margin-bottom: 1rem; }
.field label {
  display: block;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.4rem;
}
.field input {
  width: 100%;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--cream);
  background: #120e0b;
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 0.8rem 0.9rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field input::placeholder { color: #6f6253; }
.field input:focus {
  outline: none;
  border-color: var(--ember-dim);
  box-shadow: 0 0 0 3px rgba(255, 106, 61, 0.18);
}

/* ---------- Buttons ---------- */
.btn {
  width: 100%;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  border: none;
  border-radius: 11px;
  padding: 0.85rem 1rem;
  cursor: pointer;
  transition: transform 0.08s ease, filter 0.2s, background 0.2s;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.6; cursor: default; }
.btn--primary {
  color: #fff;
  background: linear-gradient(180deg, var(--ember), var(--ember-dim));
  box-shadow: 0 10px 24px -10px rgba(255, 106, 61, 0.7);
}
.btn--primary:hover:not(:disabled) { filter: brightness(1.05); }
.btn--ghost {
  width: auto;
  color: var(--cream);
  background: transparent;
  border: 1px solid var(--line);
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
}
.btn--ghost:hover { border-color: var(--ember-dim); color: var(--ember); }

/* ---------- App shell (placeholder admin) ---------- */
.shell { min-height: 100dvh; padding: 1.25rem; max-width: 720px; margin: 0 auto; }
.shell__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 1.1rem;
  border-bottom: 1px solid var(--line);
}
.panel {
  margin-top: 1.5rem;
  background: linear-gradient(180deg, var(--bg-2), #19130f);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.6rem;
  animation: rise 0.5s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.panel h2 { font-family: var(--font-disp); font-weight: 600; margin: 0 0 0.4rem; }
.meta { display: grid; grid-template-columns: auto 1fr; gap: 0.4rem 1rem; margin: 1.2rem 0; }
.meta dt { color: var(--muted); font-size: 0.85rem; }
.meta dd { margin: 0; font-weight: 600; }
.muted { color: var(--muted); font-size: 0.9rem; }

@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; }
}

/* ====================== Fase 2 — Admin read-only ====================== */
.layout { min-height: 100dvh; max-width: 980px; margin: 0 auto; padding: 1rem 1rem 3rem; }

@media (min-width: 1360px) {
  .layout { max-width: 1320px; }
}
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding-bottom: 0.9rem; border-bottom: 1px solid var(--line);
}
.tabs { display: flex; gap: 0.3rem; overflow-x: auto; padding: 0.8rem 0; border-bottom: 1px solid var(--line); }
.tab {
  flex: 0 0 auto; text-decoration: none; color: var(--muted);
  font-weight: 600; font-size: 0.92rem; padding: 0.5rem 0.9rem; border-radius: 999px;
  border: 1px solid transparent; transition: color .2s, border-color .2s, background .2s;
}
.tab:hover { color: var(--cream); }
.tab--active { color: #fff; background: rgba(255,106,61,0.14); border-color: var(--ember-dim); }
.view { padding-top: 1.2rem; }
.page-title { font-family: var(--font-disp); font-weight: 600; font-size: 1.5rem; margin: 0 0 1rem; }
.hint { margin-top: 1rem; font-size: 0.8rem; }
.hint code { color: var(--ember); }

/* Cards do dashboard */
.cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.8rem; }
@media (min-width: 720px) { .cards { grid-template-columns: repeat(4, 1fr); } }
.card {
  background: linear-gradient(180deg, var(--bg-2), #19130f);
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.1rem; display: flex; flex-direction: column; gap: 0.25rem;
  animation: rise .4s ease both;
}
.card__label { color: var(--muted); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.06em; }
.card__value { font-family: var(--font-disp); font-size: 1.7rem; line-height: 1; }
.card__sub { color: var(--muted); font-size: 0.8rem; }

/* Toolbar / inputs */
.toolbar { display: flex; gap: 0.6rem; margin-bottom: 1rem; flex-wrap: wrap; }
.search, .select {
  font-family: var(--font-body); font-size: 0.95rem; color: var(--cream);
  background: #120e0b; border: 1px solid var(--line); border-radius: 11px; padding: 0.65rem 0.8rem;
}
.search { flex: 1 1 220px; }
.search:focus, .select:focus { outline: none; border-color: var(--ember-dim); box-shadow: 0 0 0 3px rgba(255,106,61,0.18); }

/* Listas / linhas */
.list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.5rem; }
.row {
  display: flex; align-items: center; justify-content: space-between; gap: 0.8rem;
  background: linear-gradient(180deg, var(--bg-2), #19130f);
  border: 1px solid var(--line); border-radius: 12px; padding: 0.8rem 0.95rem;
}
.row--clickable { cursor: pointer; transition: border-color .15s, transform .08s; }
.row--clickable:hover { border-color: var(--ember-dim); }
.row--clickable:active { transform: translateY(1px); }
.row__main { display: flex; flex-direction: column; gap: 0.15rem; min-width: 0; }
.row__main strong { font-size: 0.98rem; }
.row__sub { color: var(--muted); font-size: 0.85rem; }
.row__meta { display: flex; flex-direction: column; align-items: flex-end; gap: 0.2rem; text-align: right; font-size: 0.85rem; white-space: nowrap; }
.menu-thumb {
  width: 58px; height: 58px; flex: 0 0 58px; object-fit: cover;
  border-radius: 10px; border: 1px solid var(--line); background: #120e0b;
}
.menu-preview {
  width: 180px; max-width: 100%; aspect-ratio: 4 / 3; object-fit: cover;
  border-radius: 12px; border: 1px solid var(--line); background: #120e0b;
}

/* Badges de status */
.badge { font-size: 0.72rem; padding: 0.15rem 0.5rem; border-radius: 999px; border: 1px solid var(--line); color: var(--cream); }
.badge--pending, .badge--novo { background: rgba(255,106,61,0.16); border-color: var(--ember-dim); }
.badge--delivered, .badge--entregue { background: rgba(120,200,120,0.14); border-color: rgba(120,200,120,0.4); }
.badge--cancelled, .badge--cancelado { background: rgba(255,138,107,0.12); border-color: rgba(255,138,107,0.35); }

/* Paginação */
.pager { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; margin-top: 1rem; }
.pager__info { color: var(--muted); font-size: 0.82rem; text-align: center; }

/* Estados */
.state { text-align: center; color: var(--muted); padding: 2.5rem 1rem; }
.state__detail { font-size: 0.78rem; opacity: 0.7; margin-top: 0.4rem; }
.state--error { color: var(--danger); }
.spinner {
  display: inline-block; width: 22px; height: 22px; border-radius: 50%;
  border: 2px solid var(--line); border-top-color: var(--ember);
  animation: spin .8s linear infinite; margin-bottom: 0.6rem;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Kanban */
.kanban-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.rt { font-size: 0.78rem; }
.rt--connecting { color: var(--muted); }
.rt--on { color: #7fd18a; }
.rt--off { color: var(--danger); }
.kanban { display: flex; gap: 0.8rem; overflow-x: auto; padding-bottom: 0.5rem; }
.col { flex: 0 0 240px; background: rgba(255,255,255,0.02); border: 1px solid var(--line); border-radius: 12px; }
.col__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.7rem 0.85rem; font-weight: 600; font-size: 0.85rem;
  border-bottom: 1px solid var(--line); text-transform: capitalize;
}
.col__count { color: var(--muted); font-size: 0.8rem; }
.col__body { padding: 0.6rem; display: flex; flex-direction: column; gap: 0.5rem; max-height: 65dvh; overflow-y: auto; }
.kcard { background: linear-gradient(180deg, var(--bg-2), #19130f); border: 1px solid var(--line); border-radius: 10px; padding: 0.6rem 0.7rem; }
.kcard__top { font-weight: 700; font-size: 0.85rem; color: var(--ember); }
.kcard__name { font-size: 0.92rem; margin-top: 0.1rem; }
.kcard__sub { color: var(--muted); font-size: 0.8rem; }
.kcard__time { color: var(--muted); font-size: 0.72rem; margin-top: 0.25rem; }

/* Modal / sheet de detalhe */
.overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.55); display: grid; place-items: end center; z-index: 50; backdrop-filter: blur(2px); }
.sheet {
  width: 100%; max-width: 520px; max-height: 88dvh; overflow-y: auto;
  background: var(--bg-2); border: 1px solid var(--line);
  border-radius: 18px 18px 0 0; padding: 1.2rem 1.2rem 2rem;
  animation: rise .25s ease both;
}
@media (min-width: 600px) { .overlay { place-items: center; } .sheet { border-radius: 18px; } }
.sheet__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.8rem; }
.sheet__head h2 { font-family: var(--font-disp); margin: 0; }
.detail { display: grid; grid-template-columns: auto 1fr; gap: 0.5rem 1rem; }
.detail dt { color: var(--muted); font-size: 0.82rem; }
.detail dd { margin: 0; }

/* ====================== Fase 3 — CRUD ====================== */
.actions { display: flex; gap: 0.6rem; margin-top: 1.2rem; flex-wrap: wrap; }
.actions--end { justify-content: flex-end; }
.actions .btn { width: auto; flex: 1 1 160px; }
.actions--end .btn { flex: 0 0 auto; }
.btn--auto { width: auto; }
.btn--danger { color: #fff; background: linear-gradient(180deg, #c0392b, #962d22); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 0.7rem; }
@media (max-width: 460px) { .grid2 { grid-template-columns: 1fr; } }

.toggle { display: inline-flex; align-items: center; gap: 0.5rem; margin: 0.6rem 0; font-size: 0.92rem; color: var(--cream); cursor: pointer; }
.toggle input { width: 18px; height: 18px; accent-color: var(--ember); }
.toggle--sm { font-size: 0.82rem; color: var(--muted); margin: 0; }

textarea.search { resize: vertical; font-family: var(--font-body); }

.cat-title { font-family: var(--font-disp); font-weight: 600; font-size: 1.05rem; margin: 1.4rem 0 0.6rem; color: var(--cream); }
.row--off { opacity: 0.55; }

.fs { border-top: 1px solid var(--line); padding-top: 0.4rem; margin-top: 1rem; }
.fs:first-of-type { border-top: none; }

.hours { display: flex; flex-direction: column; gap: 0.5rem; }
.hours__row { display: grid; grid-template-columns: 42px auto 1fr 1fr; align-items: center; gap: 0.5rem; }
.hours__day { font-weight: 600; font-size: 0.85rem; }
.hours .search { padding: 0.45rem 0.5rem; }

.status-actions { display: flex; flex-direction: column; gap: 0.5rem; margin-top: 1rem; }
.status-actions .btn { width: 100%; }

/* Kanban DnD */
.kcard { cursor: pointer; }
.kcard.drag { opacity: 0.5; }
.col--over { outline: 2px dashed var(--ember-dim); outline-offset: -4px; }

/* Toast */
#toast-host { position: fixed; left: 0; right: 0; bottom: 1rem; display: flex; flex-direction: column; align-items: center; gap: 0.4rem; z-index: 80; pointer-events: none; }
.toast { background: #2a201a; color: var(--cream); border: 1px solid var(--line); border-radius: 999px; padding: 0.55rem 1rem; font-size: 0.88rem; box-shadow: var(--shadow); transition: opacity .3s, transform .3s; }
.toast--err { border-color: rgba(255,138,107,0.5); color: var(--danger); }
.toast--out { opacity: 0; transform: translateY(8px); }

/* ====================== Fase 4 — Storefront público ====================== */
.hidden { display: none !important; }
.sf { max-width: 560px; margin: 0 auto; padding: 1.2rem 1rem 3rem; }
.sf__brand { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 0.5rem 0 1.2rem; }
.sf__brand-title { grid-column: 2; display: flex; align-items: center; gap: 0.5rem; justify-content: center; }
.sf__brand .brand__name { font-size: 1.6rem; }
.sf__lang { grid-column: 3; display: flex; align-items: center; gap: 0.15rem; justify-self: end; }
.sf__lang-sep { color: var(--muted); font-size: 0.75rem; user-select: none; }
.sf__lang-btn {
  background: none; border: 1px solid transparent; border-radius: 4px;
  padding: 0.2rem 0.4rem; font-family: var(--font-body); font-size: 0.75rem;
  font-weight: 600; color: var(--muted); cursor: pointer;
  min-width: 36px; min-height: 36px;
  display: flex; align-items: center; justify-content: center;
  transition: color 0.15s, border-color 0.15s;
}
.sf__lang-btn:focus-visible { outline: 2px solid var(--ember); outline-offset: 2px; }
.sf__lang-btn--active { color: var(--ember); border-color: var(--ember); cursor: default; }
@media (max-width: 479px) {
  .sf__brand { grid-template-columns: 1fr; justify-items: center; gap: 0.3rem; }
  .sf__brand-title { grid-column: 1; }
  .sf__lang { grid-column: 1; justify-self: center; }
}
.sf__sec { padding-top: 1rem; margin-top: 1rem; }
.sf__sec h3 { font-family: var(--font-disp); font-weight: 600; font-size: 1.1rem; margin: 0 0 0.7rem; }
.sf__menu { display: grid; grid-template-columns: 1fr; gap: 0.5rem; margin-bottom: 0.6rem; }
@media (min-width: 680px) { .sf__menu { grid-template-columns: 1fr 1fr; } }
.sf__item {
  display: grid; grid-template-columns: 76px 1fr; align-items: stretch; gap: 0.65rem;
  min-height: 88px; text-align: left; cursor: pointer; overflow: hidden;
  background: linear-gradient(180deg, var(--bg-2), #19130f);
  border: 1px solid var(--line); border-radius: 12px; padding: 0.55rem;
  color: var(--cream); font-family: var(--font-body); transition: border-color .15s, transform .08s;
}
.sf__item:not(.sf__item--has-img) { grid-template-columns: 1fr; }
.sf__item:hover { border-color: var(--ember-dim); }
.sf__item:active { transform: translateY(1px); }
.sf__item--on { border-color: var(--ember); background: rgba(255,106,61,0.14); }
.sf__item-img {
  width: 76px; height: 76px; object-fit: cover; align-self: center;
  border-radius: 10px; border: 1px solid var(--line); background: #120e0b;
}
.sf__item-body { display: flex; flex-direction: column; justify-content: center; gap: 0.24rem; min-width: 0; }
.sf__item-name { font-weight: 600; font-size: 1rem; }
.sf__item-desc { color: var(--muted); font-size: 0.82rem; line-height: 1.35; }
.sf__item-price { color: var(--ember); font-size: 0.92rem; font-weight: 600; }

.sf__summary { border-top: 1px solid var(--line); margin-top: 1.2rem; padding-top: 1rem; }
.sf__line { display: flex; justify-content: space-between; padding: 0.25rem 0; color: var(--muted); }
.sf__line strong { color: var(--cream); }
.sf__line--total { font-size: 1.15rem; padding-top: 0.5rem; margin-top: 0.3rem; border-top: 1px dashed var(--line); }
.sf__line--total span, .sf__line--total strong { color: var(--cream); }
.sf__warn { color: var(--danger); font-size: 0.85rem; margin: 0.5rem 0 0; }
.sf__pickup-only {
  border: 1px solid rgba(255, 106, 61, 0.55);
  background: rgba(255, 106, 61, 0.10);
  border-radius: var(--radius);
  padding: 0.9rem 1rem;
  margin: 0.75rem 0 1.1rem;
}
.sf__pickup-only-title {
  display: block;
  font-weight: 800;
  color: var(--cream);
  font-size: 1rem;
}
.sf__pickup-only-body {
  margin: 0.25rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.4;
}
.sf__link-btn {
  display: inline-block;
  background: none;
  border: none;
  padding: 0.3rem 0;
  margin-top: 0.4rem;
  color: var(--ember);
  font-size: 0.85rem;
  text-decoration: underline;
  cursor: pointer;
}
.sf__link-btn:hover { color: var(--ember-dim); }
.sf #sf-submit { margin-top: 1.2rem; }
.sf__step-indicator { text-align: center; margin: 0 0 0.4rem; }
.sf__progress {
  height: 4px;
  border-radius: 999px;
  background: var(--line);
  overflow: hidden;
  margin: 0 0 0.9rem;
}
.sf__progress-fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--ember-dim), var(--ember));
  transition: width 0.3s ease;
}
.wizard-nav { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; margin-top: 1.4rem; }
.wizard-nav .btn--primary { flex: 1 1 auto; }
.wizard-nav .btn--ghost { flex: 0 0 auto; }
.wizard-nav #sf-submit { margin-top: 0; margin-left: auto; }
.sf__admin { text-align: center; margin-top: 1.6rem; }
.sf__admin a { color: var(--muted); font-size: 0.8rem; text-decoration: none; }
.sf__admin a:hover { color: var(--ember); }
.sf__closed, .sf__done { text-align: center; padding: 2.5rem 1rem; }
.sf__closed h2, .sf__done h2 { font-family: var(--font-disp); }

/* WhatsApp confirmation intermediate screen */
.sf__whatsapp-confirm { padding: 1.5rem 0; }
.sf__whatsapp-card {
  background: linear-gradient(180deg, var(--bg-2), #19130f);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.8rem 1.4rem;
  text-align: center;
  animation: rise 0.5s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.sf__whatsapp-title {
  font-family: var(--font-disp);
  font-weight: 600;
  font-size: 1.5rem;
  margin: 0 0 0.4rem;
  color: var(--cream);
}
.sf__whatsapp-subtitle {
  font-size: 1.05rem;
  color: var(--ember);
  font-weight: 600;
  margin: 0 0 1rem;
}
.sf__whatsapp-text {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.5;
  margin: 0 0 1.4rem;
}
.sf__whatsapp-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.sf__whatsapp-primary {
  font-size: 1.05rem;
  padding: 1rem 1.2rem;
}
.sf__whatsapp-secondary {
  font-size: 0.95rem;
}
.sf__whatsapp-help {
  color: var(--muted);
  font-size: 0.82rem;
  margin: 0.5rem 0 0;
  line-height: 1.4;
}

/* Half-and-half guide (Step 2) */
.sf__half-guide {
  margin-bottom: 1rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255,255,255,0.025);
}
.sf__half-guide-title {
  font-family: var(--font-disp);
  font-weight: 600;
  font-size: 1.05rem;
  margin: 0 0 0.6rem;
  text-align: center;
  color: var(--cream);
}
.sf__half-guide-sub {
  color: var(--muted);
  font-size: 0.85rem;
  text-align: center;
  margin: 0.6rem 0 0;
  line-height: 1.4;
}
.sf__half-slots {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
}
.sf__half-slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  padding: 0.7rem 0.5rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255,255,255,0.02);
  text-align: center;
  cursor: pointer;
  font-family: inherit;
  color: inherit;
  appearance: none;
  width: 100%;
  transition: border-color 0.15s, background 0.15s;
}
.sf__half-slot:disabled {
  cursor: not-allowed;
}
.sf__half-slot:focus-visible {
  outline: 2px solid var(--ember);
  outline-offset: 2px;
}
.sf__half-slot--active {
  border-color: var(--ember);
  background: rgba(255, 106, 61, 0.10);
  box-shadow: 0 0 0 2px rgba(255, 106, 61, 0.12);
}
.sf__half-slot--done {
  border-color: rgba(120, 200, 120, 0.4);
  background: rgba(120, 200, 120, 0.06);
}
.sf__half-slot--pending {
  opacity: 0.5;
}
.sf__half-slot-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}
.sf__half-slot--active .sf__half-slot-label { color: var(--ember); }
.sf__half-slot--done .sf__half-slot-label { color: rgba(120, 200, 120, 0.85); }
.sf__half-slot-name {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--cream);
}
.sf__half-slot--pending .sf__half-slot-name { color: var(--muted); }
.sf__half-summary {
  text-align: center;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ember);
  margin: 0.6rem 0 0;
}

/* Ingredient removal pills (Step 3) */
.sf__ing-title {
  font-family: var(--font-disp);
  font-weight: 600;
  font-size: clamp(1.35rem, 4vw, 1.6rem);
  line-height: 1.2;
  margin: 0 0 0.35rem;
  color: var(--cream);
}
.sf__ing-sub {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.45;
  margin: 0 0 0.8rem;
}
.sf__ing-grid {
  display: grid;
  gap: 0.5rem;
  grid-template-columns: 1fr;
}
.sf__ing-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255,255,255,0.03);
  cursor: pointer;
  font-family: inherit;
  color: inherit;
  appearance: none;
  width: 100%;
  transition: border-color 0.15s, background 0.15s, opacity 0.15s;
}
.sf__ing-pill:hover {
  border-color: var(--ember-dim);
  background: rgba(255, 106, 61, 0.06);
}
.sf__ing-pill:focus-visible {
  outline: 2px solid var(--ember);
  outline-offset: 2px;
}
.sf__ing-pill--removed {
  opacity: 0.55;
  background: rgba(255,255,255,0.01);
  border-color: rgba(244, 236, 225, 0.06);
}
.sf__ing-pill--removed:hover {
  opacity: 0.75;
  border-color: var(--line);
}
.sf__ing-pill-name {
  font-weight: 600;
  font-size: 0.92rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
.sf__ing-pill--removed .sf__ing-pill-name {
  text-decoration: line-through;
  color: var(--muted);
}
.sf__ing-pill-status {
  font-size: 0.78rem;
  color: var(--muted);
  white-space: nowrap;
  flex-shrink: 0;
}
.sf__ing-half-block {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255,255,255,0.025);
  padding: 1rem;
  margin-bottom: 0.75rem;
}
.sf__ing-half-header {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  padding-left: 0.75rem;
  border-left: 3px solid var(--ember);
  margin-bottom: 0.75rem;
}
.sf__ing-half-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}
.sf__ing-half-flavor {
  font-family: var(--font-disp);
  font-weight: 600;
  font-size: 1rem;
  color: var(--cream);
}

.sf__tbc { font-style: italic; color: var(--muted); font-weight: 500; }
.review-block { margin-top: 1rem; padding-top: 0.8rem; border-top: 1px solid var(--line); }
.review-block__title { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); margin: 0 0 0.35rem; }
.sf__line--sub { padding-left: 1rem; font-size: 0.88em; }
.sf__recognition { margin-top: 1rem; margin-bottom: 0.5rem; padding: 0.9rem 1rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-2); }
.sf__recognition p { margin: 0 0 0.5rem; color: var(--cream); }
.sf__recognition ul { margin: 0 0 0.75rem; padding-left: 1.2rem; color: var(--muted); font-size: 0.9rem; }
.sf__recognition-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }

/* ---- Welcome gate (CLIENTE-1D) ---- */
.sf__welcome {
  padding: 1.5rem 0;
  animation: rise 0.5s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.sf__welcome-title {
  font-family: var(--font-disp);
  font-weight: 600;
  font-size: 1.5rem;
  margin: 0 0 0.5rem;
  color: var(--cream);
  text-align: center;
}
.sf__welcome-text {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.5;
  margin: 0 0 1rem;
  text-align: center;
}
.sf__welcome-feedback {
  min-height: 1.4em;
}
.sf__welcome-err {
  color: var(--danger);
  font-size: 0.88rem;
  margin: 0;
  line-height: 1.4;
}
.sf__welcome-order {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.9rem 1rem;
  margin-bottom: 1rem;
}
.sf__welcome-order-label {
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 0.4rem;
}
.sf__welcome-order ul {
  margin: 0;
  padding-left: 1.2rem;
  color: var(--cream);
  font-size: 0.9rem;
  line-height: 1.55;
}
.sf__welcome-order-type {
  color: var(--muted);
  font-size: 0.82rem;
  margin: 0.5rem 0 0;
}
.sf__welcome-actions {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-top: 1rem;
}

/* Pedido manual */
.kanban-actions { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 620px) {
  .kanban-head { align-items: flex-start; flex-direction: column; }
  .kanban-actions { width: 100%; justify-content: space-between; }
}

/* Alerta de novo pedido */
.new-order-alert {
  margin: 0.75rem 0 1rem;
  padding: 0.75rem 0.9rem;
  border-radius: 14px;
  border: 1px solid rgba(255,106,61,0.45);
  background: rgba(255,106,61,0.16);
  color: var(--cream);
  box-shadow: var(--shadow);
}
.kcard--new {
  border-color: var(--ember) !important;
  box-shadow: 0 0 0 2px rgba(255,106,61,0.25), var(--shadow);
  animation: newOrderPulse 1.2s ease-in-out infinite;
}
@keyframes newOrderPulse {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-2px); }
}

.danger-zone {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255,255,255,.12);
  display: flex;
  gap: .6rem;
  flex-wrap: wrap;
}
.btn--danger {
  background: #7f1d1d;
  color: #fff;
  border-color: #991b1b;
}
.btn--danger:hover { filter: brightness(1.08); }

/* ====================== Dashboard gerencial ====================== */
.section-title {
  font-family: var(--font-disp);
  font-weight: 600;
  font-size: 1.15rem;
  margin: 1.35rem 0 0.75rem;
}
.section-title--inside { margin-top: 0; }
.cards--wide { margin-bottom: 0.6rem; }
.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.9rem;
  margin-top: 1rem;
}
@media (min-width: 860px) {
  .dashboard-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .panel--span { grid-column: 1 / -1; }
}
.panel--compact { padding: 1.1rem; }
.metric-big {
  font-family: var(--font-disp);
  font-size: 2.1rem;
  line-height: 1;
  margin: 0.2rem 0 0.55rem;
}
.monthly-bars { display: grid; gap: 0.55rem; }
.month-row {
  display: grid;
  grid-template-columns: 4.6rem 1fr 6.5rem;
  gap: 0.65rem;
  align-items: center;
  font-size: 0.82rem;
}
.month-row__label { color: var(--muted); text-transform: capitalize; }
.month-row__bar {
  height: 0.65rem;
  background: rgba(244, 236, 225, 0.08);
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
}
.month-row__bar span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--ember-dim), var(--ember));
  border-radius: inherit;
}
.month-row__value { text-align: right; color: var(--cream); font-weight: 700; }
.ranking {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.5rem;
  counter-reset: rank;
}
.ranking__item {
  counter-increment: rank;
  display: grid;
  grid-template-columns: 2rem 1fr;
  gap: 0.65rem;
  align-items: start;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--line);
}
.ranking__item:last-child { border-bottom: none; }
.ranking__item::before {
  content: counter(rank);
  display: grid;
  place-items: center;
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 999px;
  background: rgba(255, 106, 61, 0.16);
  border: 1px solid var(--ember-dim);
  color: var(--cream);
  font-weight: 800;
  font-size: 0.78rem;
}
.ranking__item strong { display: block; font-size: 0.95rem; }
.ranking__item span { display: block; color: var(--muted); font-size: 0.82rem; margin-top: 0.1rem; }
@media (max-width: 520px) {
  .month-row { grid-template-columns: 3.8rem 1fr; }
  .month-row__value { grid-column: 2; text-align: left; font-size: 0.78rem; color: var(--muted); }
}


/* ---------- Operational sprint: checkout choices + extras ---------- */
.removable-half-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0.6rem 0 0.4rem;
}
.choice-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: 1fr;
  margin: 0.75rem 0 0;
}
@media (min-width: 560px) {
  .choice-grid { grid-template-columns: 1fr 1fr; }
}
.choice-card {
  display: grid;
  gap: 0.2rem;
  padding: 0.9rem 1rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255,255,255,0.025);
  cursor: pointer;
}
.choice-card input { display: none; }
.choice-card strong { color: var(--cream); }
.choice-card span { color: var(--muted); font-size: 0.88rem; }
.choice-card--on {
  border-color: var(--ember-dim);
  box-shadow: 0 0 0 3px rgba(255, 106, 61, 0.12);
}

.half-choice-grid {
  margin-top: 0.5rem;
  margin-bottom: 0.9rem;
}
.half-choice-card {
  padding: 1.1rem 1.2rem;
  border-width: 2px;
  border-radius: 18px;
  text-align: center;
  justify-items: center;
  gap: 0.3rem;
}
.half-choice-card strong {
  font-size: 1.15rem;
}
.half-choice-card span {
  font-size: 0.92rem;
}
.half-choice-card.choice-card--on {
  border-color: var(--ember);
  box-shadow: 0 0 0 4px rgba(255, 106, 61, 0.16);
  background: rgba(255, 106, 61, 0.08);
}

.extras-grid {
  display: grid;
  gap: 0.65rem;
  grid-template-columns: 1fr;
  margin-bottom: 0.85rem;
}
@media (min-width: 560px) {
  .extras-grid { grid-template-columns: 1fr 1fr; }
}
.extra-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255,255,255,0.025);
  cursor: pointer;
}
.extra-pill input { display: none; }
.extra-pill span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.extra-pill strong { color: var(--ember); font-size: 0.9rem; }
.extra-pill--on {
  border-color: var(--ember-dim);
  background: rgba(255, 106, 61, 0.10);
}

.extras-placement-list { margin-top: 0.6rem; display: flex; flex-direction: column; gap: 0.5rem; }
.extra-placement-row { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; font-size: 0.88rem; }
.extra-placement-row__name { color: var(--muted); min-width: 5rem; }
.placement-opt {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  cursor: pointer;
  padding: 0.25rem 0.6rem;
  border: 1px solid var(--line);
  border-radius: 999px;
}
.placement-opt input { display: none; }
.placement-opt--on { border-color: var(--ember-dim); background: rgba(255, 106, 61, 0.10); }
.pay-note {
  margin: 0.65rem 0 1rem;
  color: var(--muted);
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.025);
  border-radius: 12px;
  padding: 0.7rem 0.8rem;
  font-size: 0.9rem;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.extra-admin-row {
  display: grid;
  gap: 0.65rem;
  grid-template-columns: 1fr;
  align-items: center;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--line);
}
.extra-admin-row:last-child { border-bottom: none; }
@media (min-width: 720px) {
  .extra-admin-row {
    grid-template-columns: minmax(140px, 1fr) minmax(140px, 1fr) 110px auto auto;
  }
}

.ingredient-admin-row {
  display: grid;
  gap: 0.65rem;
  grid-template-columns: 1fr;
  align-items: center;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--line);
}
.ingredient-admin-row:last-child { border-bottom: none; }
@media (min-width: 720px) {
  .ingredient-admin-row {
    grid-template-columns: minmax(140px, 1fr) minmax(140px, 1fr) auto auto;
  }
}

/* Step 5 — cart summary cards */
.sf__cart-card {
  margin-bottom: 0;
}
.sf__cart-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}
.sf__cart-card-head strong {
  font-family: var(--font-disp);
  font-size: 1.1rem;
  color: var(--ember);
  flex-shrink: 0;
  white-space: nowrap;
}
.sf__cart-card-flavors {
  font-weight: 600;
  font-size: 1.05rem;
  margin: 0 0 0.4rem;
  color: var(--cream);
}
.sf__cart-card-detail {
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.4;
  margin: 0.2rem 0;
}
.sf__cart-card-detail-label {
  font-weight: 600;
  color: var(--muted);
}
.sf__cart-card-detail-note {
  font-size: 0.78rem;
  opacity: 0.75;
}
.sf__cart-card-remove {
  display: block;
  margin-top: 0.6rem;
  padding: 0;
  background: none;
  border: none;
  color: var(--muted);
  font-family: inherit;
  font-size: 0.8rem;
  cursor: pointer;
  text-decoration: underline;
  opacity: 0.7;
  transition: opacity 0.15s, color 0.15s;
}
.sf__cart-card-remove:hover {
  opacity: 1;
  color: var(--cream);
}
.sf__cart-card-remove:focus-visible {
  outline: 2px solid var(--ember);
  outline-offset: 2px;
}

/* Multi-pizza checkout/manual order */
.multi-pizza-list { display: grid; gap: 1rem; }
.pizza-box { border: 1px solid rgba(255,255,255,0.12); background: rgba(255,255,255,0.035); border-radius: 16px; padding: 1rem; margin-bottom: 1rem; }
.pizza-box__head { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; margin-bottom: 0.75rem; }
.pizza-box__head h4 { margin: 0; }
.pizza-extras { margin-top: 0.75rem; }

.profit-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}
.profit-table th {
  color: var(--muted);
  font-weight: 500;
  text-align: right;
  padding: 0 0.4rem 0.5rem;
  border-bottom: 1px solid var(--line);
}
.profit-table th:first-child { text-align: left; }
.profit-table td {
  text-align: right;
  padding: 0.45rem 0.4rem;
  border-bottom: 1px solid var(--line);
}
.profit-table td:first-child {
  text-align: left;
  color: var(--muted);
  text-transform: capitalize;
}
.profit-table tr:last-child td { border-bottom: none; }
.profit-table td.hi { color: var(--ember); font-weight: 700; }

/* ---------- Comanda de impressão (térmica 80mm) — P1: base isolada, sem botão ainda ---------- */
#print-ticket {
  display: none;
}

.ticket {
  font-family: 'Courier New', Courier, monospace;
  font-size: 15px;
  line-height: 1.35;
  width: 80mm;
}

.ticket,
.ticket * {
  color: #000;
}

.ticket__center {
  text-align: center;
}

.ticket__title {
  font-size: 20px;
  font-weight: 700;
}

.ticket__line {
  white-space: pre-wrap;
  word-break: break-word;
}

.ticket__hr {
  border-top: 1px dashed #000;
  margin: 4px 0;
}

.ticket__sep {
  border-top: 1px dotted #000;
  margin: 4px 0;
}

.sf__pay-options {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}
.sf__pay-card {
  flex: 1 1 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  padding: 0.8rem 0.6rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-2);
  color: var(--cream);
  cursor: pointer;
  font-size: 0.9rem;
  text-align: center;
  transition: border-color 0.15s, background 0.15s;
}
.sf__pay-card:hover {
  border-color: var(--ember-dim);
  background: rgba(255, 106, 61, 0.07);
}
.sf__pay-card--selected {
  border-color: var(--ember-dim);
  background: rgba(255, 106, 61, 0.13);
}
.sf__pay-icon {
  font-size: 1.5rem;
  line-height: 1;
}
.sf__pay-sub {
  color: var(--muted);
  font-size: 0.78rem;
}
.sf__pay-card:focus-visible {
  outline: 2px solid var(--ember-dim);
  outline-offset: 2px;
}

/* ====================== Conversas (WhatsApp inbox W1) ====================== */
.conversas-layout {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-height: 60dvh;
}
.conversas-sidebar {
  flex: 0 0 auto;
}
.conversas-main {
  flex: 1 1 auto;
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem;
  min-height: 300px;
}
.conv-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding-bottom: 0.8rem;
  margin-bottom: 0.8rem;
  border-bottom: 1px solid var(--line);
}
.conv-context {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-2);
  padding: 0.8rem 0.95rem;
  margin-bottom: 0.8rem;
}
.conv-context__head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
}
.conv-context__head strong {
  color: var(--cream);
  font-size: 1rem;
}
.conv-context__line {
  margin: 0.15rem 0;
  font-size: 0.88rem;
  color: var(--cream);
}
.conv-context__line.muted {
  color: var(--muted);
}
.conv-context__notes {
  margin: 0.4rem 0 0.2rem;
  padding: 0.4rem 0.6rem;
  border-left: 2px solid var(--ember-dim);
  background: rgba(255, 106, 61, 0.06);
  color: var(--cream);
  font-size: 0.85rem;
  border-radius: 0 8px 8px 0;
}
.conv-context__orders {
  list-style: none;
  margin: 0.5rem 0 0;
  padding: 0;
}
.conv-context__order {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.6rem;
  padding: 0.3rem 0;
  border-top: 1px solid var(--line);
  font-size: 0.85rem;
  color: var(--muted);
}
.conv-context__hint {
  font-size: 0.8rem;
  margin: 0.4rem 0 0;
}
.conv-context__empty {
  font-size: 0.85rem;
  margin: 0.4rem 0 0;
}
.conv-quick-replies {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-2);
  padding: 0.7rem 0.85rem;
  margin: 0.8rem 0;
}
.conv-quick-replies__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  margin-bottom: 0.5rem;
}
.conv-quick-replies__title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}
.conv-quick-replies__langs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}
.conv-quick-reply-lang {
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.25rem 0.55rem;
  cursor: pointer;
}
.conv-quick-reply-lang--active {
  color: var(--ember);
  border-color: var(--ember-dim);
  cursor: default;
}
.conv-quick-replies__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.conv-quick-reply {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--cream);
  font-family: var(--font-body);
  font-size: 0.82rem;
  padding: 0.35rem 0.7rem;
  max-width: 100%;
  overflow-wrap: anywhere;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.conv-quick-reply:hover {
  border-color: var(--ember-dim);
  background: rgba(255, 106, 61, 0.08);
}
.conv-quick-reply-preview {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin-top: 0.6rem;
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--cream);
  background: #120e0b;
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 0.6rem 0.7rem;
  resize: vertical;
}
.conv-quick-reply-preview:focus {
  outline: none;
  border-color: var(--ember-dim);
  box-shadow: 0 0 0 3px rgba(255, 106, 61, 0.18);
}
.conv-quick-reply-copy {
  margin-top: 0.5rem;
  width: auto;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--cream);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.5rem 1rem;
  cursor: pointer;
}
.conv-quick-reply-copy:hover:not(:disabled) {
  border-color: var(--ember-dim);
  color: var(--ember);
}
.conv-quick-reply-copy:disabled {
  opacity: 0.5;
  cursor: default;
}
@media (max-width: 479px) {
  .conv-quick-replies__head {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4rem;
  }
  .conv-quick-reply-copy {
    width: 100%;
    padding: 0.65rem 1rem;
  }
}
.conv-timeline {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  max-height: 55dvh;
  overflow-y: auto;
  padding: 0.4rem 0;
}
.conv-msg {
  max-width: 75%;
  padding: 0.55rem 0.75rem;
  border-radius: 12px;
  border: 1px solid var(--line);
}
.conv-msg--in {
  align-self: flex-start;
  background: rgba(255,255,255,0.04);
}
.conv-msg--out {
  align-self: flex-end;
  background: rgba(255,106,61,0.10);
  border-color: var(--ember-dim);
}
.conv-msg__sender {
  font-size: 0.7rem;
  color: var(--muted);
  margin-bottom: 0.15rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.conv-msg__body {
  font-size: 0.9rem;
  line-height: 1.4;
  white-space: pre-wrap;
  word-break: break-word;
}
.conv-msg__time {
  font-size: 0.68rem;
  color: var(--muted);
  margin-top: 0.2rem;
  text-align: right;
}
@media (min-width: 720px) {
  .conversas-layout {
    flex-direction: row;
  }
  .conversas-sidebar {
    flex: 0 0 320px;
    max-height: 75dvh;
    overflow-y: auto;
  }
  .conversas-main {
    min-height: 0;
    max-height: 75dvh;
    overflow-y: auto;
  }
}
.conv-msg--queued {
  opacity: 0.6;
}
.conv-msg__status {
  font-size: 0.68rem;
  color: var(--muted);
  margin-top: 0.15rem;
  font-style: italic;
}
.badge--sandbox {
  background: rgba(255,200,0,0.12);
  border-color: rgba(255,200,0,0.35);
  color: #d4a800;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.conv-compose {
  margin-top: 1rem;
  padding-top: 0.8rem;
  border-top: 1px solid var(--line);
}
.conv-compose__textarea {
  width: 100%;
  min-height: 72px;
  max-height: 200px;
  resize: vertical;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--cream);
  font-family: inherit;
  font-size: 0.9rem;
  padding: 0.5rem 0.7rem;
  box-sizing: border-box;
}
.conv-compose__textarea:focus {
  outline: none;
  border-color: var(--ember-dim);
}
.conv-compose__footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.5rem;
  gap: 0.5rem;
}
.conv-compose__counter {
  font-size: 0.72rem;
  color: var(--muted);
}
.conv-compose__counter--over {
  color: rgba(255,100,100,0.9);
}
.conv-compose__feedback {
  font-size: 0.82rem;
  margin-top: 0.5rem;
  padding: 0.35rem 0.7rem;
  border-radius: var(--radius);
  display: none;
}
.conv-compose__feedback--warning {
  display: block;
  background: rgba(255,106,61,0.12);
  border: 1px solid var(--ember-dim);
  color: var(--cream);
}
.conv-compose__feedback--error {
  display: block;
  background: rgba(255,80,80,0.10);
  border: 1px solid rgba(255,80,80,0.3);
  color: var(--cream);
}

@media print {
  body.print-ticket-mode * {
    visibility: hidden;
  }

  body.print-ticket-mode #print-ticket,
  body.print-ticket-mode #print-ticket * {
    visibility: visible;
    color: #000 !important;
    background: #fff !important;
    opacity: 1 !important;
    text-shadow: none !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  body.print-ticket-mode #print-ticket {
    display: block;
    position: absolute;
    left: 0;
    top: 0;
    width: 80mm;
  }

  body.print-ticket-mode .ticket {
    font-weight: 600;
  }

  body.print-ticket-mode .ticket__title {
    font-weight: 800;
  }
}

/* ============ Cozinha — tabelas de serviço (OPS-TIME-1C4V) ============ */
/* Escopo exclusivo de /cozinha. Herdam o tema escuro/ember; sem cores novas.
   Sem redesign de cards ou navegação. */

/* Rolagem horizontal isolada: o corpo da página nunca rola de lado. */
.cap-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 0 0.6rem;
}

.cap-table {
  width: 100%;
  min-width: 460px;               /* impede colisão de texto no mobile */
  border-collapse: collapse;
  font-size: 0.85rem;
  font-variant-numeric: tabular-nums;
}

/* Cabeçalho nitidamente mais forte que o corpo. */
.cap-table thead th {
  background: var(--bg-2);
  color: var(--muted);
  font-weight: 600;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-align: left;
  padding: 0.55rem 0.7rem;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

/* Espaçamento de coluna + separação visível entre linhas. */
.cap-table td {
  padding: 0.5rem 0.7rem;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.cap-table tbody tr:last-child td { border-bottom: none; }
.cap-table tbody tr:nth-child(even) td { background: rgba(255, 255, 255, 0.02); }

/* Colunas numéricas alinhadas à direita
   (slots: Capacidade/Comprometido/Livre = 2–4; pedidos: Pizzas/Pontos = 3–4). */
.cap-table--slots th:nth-child(2),
.cap-table--slots th:nth-child(3),
.cap-table--slots th:nth-child(4),
.cap-table--slots td:nth-child(2),
.cap-table--slots td:nth-child(3),
.cap-table--slots td:nth-child(4),
.cap-table--orders th:nth-child(3),
.cap-table--orders th:nth-child(4),
.cap-table--orders td:nth-child(3),
.cap-table--orders td:nth-child(4) {
  text-align: right;
}

/* Coluna Motivo (slots, última): fácil de identificar — discreta e quebra linha. */
.cap-table--slots th:nth-child(5),
.cap-table--slots td:nth-child(5) {
  color: var(--muted);
  white-space: normal;
  min-width: 8rem;
}

/* Slot fechado legível num relance (usa --danger existente; specificity vence o zebra). */
.cap-table tbody tr.is-closed td {
  background: rgba(255, 138, 107, 0.08);
  color: var(--danger);
}
.cap-table tbody tr.is-closed td:nth-child(2) { font-weight: 700; }

/* ===== Cozinha — coluna Ações + editor de ajuste (OPS-TIME-1C5A-7) ===== */
/* Escopo exclusivo da tabela de slots e do editor (#cap-ed-* / #cap-cl-*).
   Herdam o tema/ember; nao alteram .field, .toggle, .search, .actions,
   .btn ou .auth__error globais. */

/* Coluna Ações (6a): encolhe ao conteudo e centraliza. */
.cap-table--slots th:nth-child(6),
.cap-table--slots td:nth-child(6) {
  width: 1%;
  white-space: nowrap;
  text-align: center;
}

/* Botao Editar compacto — nao estica a linha. */
.cap-slot-edit {
  padding: 0.3rem 0.6rem;
  font-size: 0.8rem;
  line-height: 1.1;
}

/* Capacidade nao precisa ser larga como os demais campos. */
#cap-ed-capacity { max-width: 8rem; }

/* Motivo legivel: ocupa a largura e tem altura minima confortavel. */
#cap-ed-reason { width: 100%; min-height: 3.4rem; box-sizing: border-box; }

/* Contador 0/200 alinhado a direita, logo abaixo do textarea. */
#cap-ed-count { display: block; text-align: right; margin-top: 0.25rem; }

/* ===== Storefront — agendamento de retirada (OPS-TIME-1D-A7-2) ===== */
/* Escopo exclusivo .sf__schedule*; segue o sistema visual do storefront
   (ember/cream/line). Dormant enquanto PICKUP_SCHEDULING_ENABLED=false. */
.sf__schedule { margin-top: 0.9rem; }
.sf__schedule-title { font-weight: 600; margin-bottom: 0.5rem; }
.sf__schedule-modes,
.sf__schedule-dates {
  display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 0.7rem;
}
.sf__schedule-mode,
.sf__schedule-date,
.sf__schedule-slot {
  font: inherit;
  color: var(--cream);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.5rem 0.8rem;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.sf__schedule-mode:hover,
.sf__schedule-date:hover,
.sf__schedule-slot:hover { border-color: var(--ember-dim); }
.sf__schedule-mode--on,
.sf__schedule-date--on,
.sf__schedule-slot--on {
  color: #fff;
  background: rgba(255, 106, 61, 0.14);
  border-color: var(--ember-dim);
}
.sf__schedule-slots {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(4.5rem, 1fr));
  gap: 0.5rem;
}
.sf__schedule-slot { text-align: center; }
.sf__schedule-mode:disabled,
.sf__schedule-slot:disabled { opacity: 0.5; cursor: not-allowed; }
.sf__schedule-error { color: var(--danger); font-size: 0.85rem; margin: 0; }
@media (max-width: 479px) {
  .sf__schedule-slots { grid-template-columns: repeat(auto-fill, minmax(4rem, 1fr)); }
}
