/* LmAtende web layer — the design system's component CSS transcribed for the
 * SPA. Every colour, radius, space, and type size is a `var(--token)` from
 * design-system/tokens.css; no literal brand value is repeated here. The
 * class names and rules mirror design-system/components.html and the
 * prototype chrome so both surfaces stay the same product.
 *
 * The prototype device frame (notch, 390px canvas) is presentation-only and
 * deliberately absent — the real app renders edge to edge. */

/* ── Reset / base ─────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
[hidden] { display: none !important; }
:where(p, h1, h2, h3, h4, li, label, span, td, th, dt, dd) { overflow-wrap: anywhere; }

body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: var(--text-body);
  line-height: var(--leading-base);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "tnum" 1, "lnum" 1;
}

h3 { font-size: var(--text-h3); font-weight: 600; margin: 0 0 var(--space-3); letter-spacing: var(--tracking-h1); }
h4 { font-size: var(--text-h2); font-weight: 700; margin: 0 0 var(--space-4); letter-spacing: var(--tracking-h1); }

/* ── Typography helpers ───────────────────────────────────────────────── */
.ty-display-l { font-size: var(--text-display-l); font-weight: 700; letter-spacing: var(--tracking-display); line-height: var(--leading-tight); }
.ty-display-m { font-size: var(--text-display-m); font-weight: 700; letter-spacing: var(--tracking-display); line-height: var(--leading-display); }
.ty-h1 { font-size: var(--text-h1); font-weight: 700; letter-spacing: var(--tracking-h1); line-height: var(--leading-snug); }
.ty-h2 { font-size: var(--text-h2); font-weight: 700; letter-spacing: var(--tracking-h1); line-height: var(--leading-snug); }
.ty-h3 { font-size: var(--text-h3); font-weight: 600; }
.ty-caption { font-size: var(--text-caption); color: var(--muted); }
.ty-micro {
  font-size: var(--text-micro); font-weight: 600; text-transform: uppercase;
  letter-spacing: var(--tracking-uppercase); color: var(--muted);
}
.ty-numeric { font-family: var(--font-numeric); font-size: var(--text-numeric); font-weight: 700; letter-spacing: var(--tracking-h1); font-variant-numeric: tabular-nums; }
.ty-numeric-l { font-family: var(--font-numeric); font-size: 28px; font-weight: 700; letter-spacing: var(--tracking-display); font-variant-numeric: tabular-nums; }
.tabular-nums { font-variant-numeric: tabular-nums; font-family: var(--font-numeric); }

/* ── Layout primitives ────────────────────────────────────────────────── */
.stack > * + * { margin-top: var(--space-3); }
.stack-lg > * + * { margin-top: var(--space-6); }
.row { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); }
.row-tight { display: flex; align-items: center; gap: var(--space-2); }
.grow { flex: 1; min-width: 0; }
.muted { color: var(--muted); }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ── Buttons ──────────────────────────────────────────────────────────── */
.btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  min-height: 44px; padding: 0 var(--space-4);
  border-radius: var(--radius-md); border: 1px solid transparent;
  font-family: inherit; font-size: var(--text-body-sm); font-weight: 500;
  letter-spacing: var(--tracking-h1);
  cursor: pointer;
  transition: background-color var(--motion-fast) var(--ease-standard),
              border-color var(--motion-fast) var(--ease-standard),
              color var(--motion-fast) var(--ease-standard),
              transform var(--motion-fast) var(--ease-standard),
              box-shadow var(--motion-fast) var(--ease-standard);
}
.btn:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.btn:disabled { cursor: not-allowed; }
.btn--primary { background: var(--accent); color: var(--accent-on); }
.btn--primary:hover:not(:disabled) { background: var(--accent-hover); transform: translateY(-1px); box-shadow: var(--elev-card-hover); }
.btn--primary:active:not(:disabled) { background: var(--accent-active); transform: translateY(0); }
.btn--primary:disabled { background: var(--accent); opacity: 0.45; transform: none; box-shadow: none; }
.btn--secondary { background: var(--bg); color: var(--accent); border-color: var(--accent); }
.btn--secondary:hover:not(:disabled) { background: var(--accent-50); }
.btn--secondary:disabled { color: var(--disabled); border-color: var(--border); background: var(--bg); }
.btn--ghost { background: transparent; color: var(--fg-soft); }
.btn--ghost:hover:not(:disabled) { background: var(--surface); }
.btn--ghost:disabled { color: var(--disabled); }
.btn--danger { background: var(--danger); color: var(--accent-on); }
.btn--danger:hover:not(:disabled) { background: color-mix(in oklab, var(--danger), black 8%); }
.btn--pill { border-radius: var(--radius-pill); }
.btn--lg { min-height: 56px; padding: 0 var(--space-6); font-size: var(--text-body); }
.btn--sm { min-height: 36px; padding: 0 var(--space-3); font-size: var(--text-caption); }
.btn--icon { min-width: 44px; padding: 0; }
.btn--block { width: 100%; }
.btn[aria-busy="true"] { color: transparent; }
.btn[aria-busy="true"]::after {
  content: ""; width: 16px; height: 16px; position: absolute;
  border: 2px solid currentColor; border-right-color: transparent;
  border-radius: 50%; animation: spin 720ms linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.icon-btn {
  width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center;
  border: 0; background: transparent; border-radius: var(--radius-md);
  cursor: pointer; color: var(--fg);
}
.icon-btn:hover { background: var(--surface); }

.icon { width: 18px; height: 18px; stroke: currentColor; stroke-width: 1.6; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.icon-sm { width: 14px; height: 14px; }
.icon-lg { width: 22px; height: 22px; }

/* ── Form fields ──────────────────────────────────────────────────────── */
.field { display: grid; gap: var(--space-2); }
.field > label { color: var(--fg-soft); font-size: var(--text-body-sm); font-weight: 500; }
.field .helper { font-size: var(--text-caption); color: var(--muted); }
.field .helper.error { color: var(--danger); }

.input, .select, .textarea {
  width: 100%; background: var(--bg); color: var(--fg);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 12px 14px; font-family: inherit; font-size: var(--text-body);
  transition: border-color var(--motion-fast) var(--ease-standard), box-shadow var(--motion-fast) var(--ease-standard);
}
.input::placeholder, .textarea::placeholder { color: var(--muted); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--accent); box-shadow: var(--focus-ring); }
.input:disabled, .select:disabled, .textarea:disabled { background: var(--surface); color: var(--muted); cursor: not-allowed; }
.input[aria-invalid="true"] { border-color: var(--danger); box-shadow: var(--focus-ring-danger); }
.select {
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%234a5260' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
  background-repeat: no-repeat; background-position: right 14px center; padding-right: 40px;
}

/* Phone entry with the fixed +55 country-code prefix */
.phone { display: flex; align-items: stretch; }
.phone-cc {
  display: inline-flex; align-items: center; padding: 0 14px;
  border: 1px solid var(--border); border-right: 0;
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
  background: var(--surface); color: var(--fg-soft);
  font-size: var(--text-body); font-weight: 500;
  white-space: nowrap; flex-shrink: 0;
}
.phone .input { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }

/* Prefixed / suffixed field row (R$ · kg · un) */
.field-row { display: grid; grid-template-columns: 90px 1fr; gap: var(--space-2); align-items: stretch; }
.field-row--suffix { grid-template-columns: 1fr 110px; }
.field-row .input { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.field-row--suffix .input { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.field-row .cc {
  display: inline-flex; align-items: center; padding: 0 12px;
  background: var(--surface); border: 1px solid var(--border); border-right: 0;
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
  color: var(--fg-soft); font-size: var(--text-body); font-weight: 500;
}
.field-row--suffix .cc { border-left: 0; border-right: 1px solid var(--border); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }

/* OTP cells */
.otp { display: flex; gap: 10px; }
.otp-cell {
  width: 44px; height: 56px;
  border: 1px solid var(--border); border-radius: var(--radius-md);
  background: var(--bg); color: var(--fg); text-align: center;
  font-family: var(--font-numeric); font-size: 22px; font-weight: 600;
}
.otp-cell:focus { outline: none; border-color: var(--accent); box-shadow: var(--focus-ring); }
.otp-cell--filled { border-color: var(--accent); color: var(--accent); }

/* Quantity stepper */
.stepper { display: inline-flex; align-items: stretch; border: 1px solid var(--border); border-radius: var(--radius-md); overflow: hidden; background: var(--bg); }
.stepper button {
  min-width: 40px; height: 40px; background: transparent; border: 0;
  cursor: pointer; color: var(--fg); font-size: 18px;
  display: inline-flex; align-items: center; justify-content: center;
}
.stepper button:disabled { color: var(--disabled); cursor: not-allowed; }
.stepper button:hover:not(:disabled) { background: var(--surface); }
.stepper .value {
  min-width: 64px; display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-numeric); font-weight: 600; font-size: var(--text-body-sm);
  font-variant-numeric: tabular-nums;
  border-left: 1px solid var(--border); border-right: 1px solid var(--border);
  padding: 0 var(--space-2);
}

/* Choice card (radio rendered as a card) */
.choice {
  display: flex; gap: var(--space-4); padding: var(--space-4);
  border: 1px solid var(--border); border-radius: var(--radius-md);
  background: var(--bg); cursor: pointer; align-items: flex-start;
  width: 100%; text-align: left;
}
.choice:hover { border-color: var(--accent); }
.choice.active { border-color: var(--accent); background: var(--accent-50); }
.choice input { margin-top: 4px; }
.choice .body { flex: 1; }
.choice .body strong { display: block; font-weight: 600; }
.choice .body span { display: block; color: var(--fg-soft); font-size: var(--text-body-sm); margin-top: 4px; line-height: var(--leading-base); }
.choice .body em { display: block; color: var(--muted); font-style: normal; font-size: var(--text-caption); margin-top: 4px; }

.radio { appearance: none; width: 18px; height: 18px; border: 2px solid var(--fg-soft); border-radius: 50%; background: var(--bg); cursor: pointer; position: relative; flex-shrink: 0; }
.radio:checked { border-color: var(--accent); }
.radio:checked::after { content: ""; position: absolute; inset: 3px; background: var(--accent); border-radius: 50%; }

.checkbox { appearance: none; width: 18px; height: 18px; border: 2px solid var(--fg-soft); border-radius: 4px; background: var(--bg); cursor: pointer; position: relative; flex-shrink: 0; }
.checkbox:checked { background: var(--accent); border-color: var(--accent); }
.checkbox:checked::after { content: ""; position: absolute; left: 5px; top: 1px; width: 5px; height: 10px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }

.toggle { appearance: none; width: 40px; height: 24px; background: var(--border); border-radius: var(--radius-pill); cursor: pointer; position: relative; transition: background-color var(--motion-fast) var(--ease-standard); flex-shrink: 0; }
.toggle::after { content: ""; position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50%; background: var(--bg); transition: transform var(--motion-fast) var(--ease-standard); }
.toggle:checked { background: var(--accent); }
.toggle:checked::after { transform: translateX(16px); }

/* ── Chips, badges, tags ──────────────────────────────────────────────── */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; font-size: var(--text-caption); font-weight: 600;
  border-radius: var(--radius-pill); white-space: nowrap;
}
.chip::before { content: ""; width: 6px; height: 6px; border-radius: var(--radius-pill); background: currentColor; }
.chip-aguardando { background: var(--status-aguardando-bg); color: var(--status-aguardando-text); }
.chip-pago { background: var(--status-pago-bg); color: var(--status-pago-text); }
.chip-preparacao { background: var(--status-preparacao-bg); color: var(--status-preparacao-text); }
.chip-entrega { background: var(--status-entrega-bg); color: var(--status-entrega-text); }
.chip-pronto { background: var(--status-pronto-bg); color: var(--status-pronto-text); }
.chip-entregue { background: var(--status-pago-bg); color: var(--status-entregue); }
.chip-cancelado { background: var(--status-cancelado-bg); color: var(--status-cancelado-text); }
.chip-expirado { background: var(--status-aguardando-bg); color: var(--status-aguardando-text); }

.pix-badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px;
  background: var(--accent-hover); color: var(--accent-on);
  font-size: var(--text-micro); font-weight: 700; letter-spacing: 0.04em;
  border-radius: var(--radius-pill); white-space: nowrap; flex-shrink: 0;
}
.pix-badge::before { content: "✦"; font-size: 12px; }

.stock-tag {
  display: inline-flex; align-items: center; gap: 6px; padding: 2px 8px;
  font-size: var(--text-micro); font-weight: 600; letter-spacing: var(--tracking-uppercase);
  border: 1px solid var(--border); border-radius: var(--radius-pill);
  background: var(--bg); color: var(--fg-soft);
}
.stock-tag--out { border-color: var(--status-cancelado-bg); color: var(--status-cancelado-text); background: var(--status-cancelado-bg); }

.hours-tag { font-size: var(--text-micro); font-weight: 600; letter-spacing: var(--tracking-uppercase); }
.hours-tag.open { color: var(--status-pago-text); }
.hours-tag.closed { color: var(--status-cancelado-text); }
.hours-tag::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: currentColor; margin-right: 6px; vertical-align: 1px; }

.tag { display: inline-flex; padding: 2px 8px; background: var(--surface); border-radius: var(--radius-pill); font-size: var(--text-micro); font-weight: 600; letter-spacing: var(--tracking-uppercase); color: var(--fg-soft); }

/* ── Cards ────────────────────────────────────────────────────────────── */
.card-section { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-xl); padding: var(--space-6); box-shadow: var(--elev-card); }
.card-inline { background: var(--bg); border: 1px solid var(--border-soft); border-radius: var(--radius-md); padding: var(--space-4); }

.card-product {
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-lg);
  overflow: hidden; box-shadow: var(--elev-card); display: flex; flex-direction: column;
  transition: transform var(--motion-base) var(--ease-standard), box-shadow var(--motion-base) var(--ease-standard);
}
.card-product:hover { transform: translateY(-4px); box-shadow: var(--elev-card-hover); }
.card-product .image { aspect-ratio: 16 / 12; background: var(--surface); position: relative; display: flex; align-items: center; justify-content: center; }
.card-product .image img { width: 80%; height: 80%; object-fit: contain; }
.card-product .badges { position: absolute; top: var(--space-3); left: var(--space-3); display: flex; gap: 6px; }
.card-product .body { padding: var(--space-4); display: flex; flex-direction: column; flex: 1; }
.card-product .name { font-size: var(--text-h3); font-weight: 600; margin: 0; }
.card-product .desc { font-size: var(--text-caption); color: var(--muted); margin: 4px 0 var(--space-3); }
.card-product .row { display: flex; align-items: baseline; justify-content: space-between; }
.card-product .price { font-family: var(--font-numeric); font-size: var(--text-numeric); font-weight: 700; letter-spacing: var(--tracking-h1); }
.card-product .price sup { font-size: 0.6em; color: var(--muted); margin-left: 4px; font-weight: 500; }
.card-product .cta { margin-top: var(--space-3); }
.card-product .cta .btn { width: 100%; }

/* ── Price display ────────────────────────────────────────────────────── */
.price-unit sup { font-size: 0.6em; color: var(--muted); margin-left: 4px; font-weight: 500; }
.price-big { font-family: var(--font-numeric); font-size: 28px; font-weight: 700; letter-spacing: var(--tracking-display); font-variant-numeric: tabular-nums; }
.price-discount { display: inline-flex; flex-direction: column; padding: var(--space-2) var(--space-3); background: var(--accent-50); border-radius: var(--radius-md); }
.price-discount .strike { color: var(--muted); text-decoration: line-through; font-family: var(--font-numeric); font-weight: 500; font-size: var(--text-body-sm); font-variant-numeric: tabular-nums; }
.price-discount .now { color: var(--accent); font-family: var(--font-numeric); font-weight: 700; font-size: var(--text-h2); letter-spacing: var(--tracking-h1); font-variant-numeric: tabular-nums; }

/* ── Steps indicator ──────────────────────────────────────────────────── */
.steps { display: flex; align-items: center; gap: var(--space-2); padding: var(--space-4) 0; }
.step { display: flex; flex-direction: column; align-items: center; gap: var(--space-1); flex: 1; }
.step-circle {
  width: 28px; height: 28px; flex-shrink: 0; border-radius: 50%;
  border: 1px solid var(--border); background: var(--bg);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 600; color: var(--muted);
}
.step.done .step-circle, .step.active .step-circle { background: var(--accent); border-color: var(--accent); color: var(--accent-on); }
/* Mobile: the label sits under its circle at 11px micro (DESIGN.md §4
 * "Steps indicator"), so long pt-BR step names never break mid-word. */
.step-label { font-size: var(--text-micro); color: var(--muted); font-weight: 600; letter-spacing: var(--tracking-uppercase); text-transform: uppercase; white-space: nowrap; text-align: center; }
.step.done .step-label, .step.active .step-label { color: var(--fg); }
.step-connector { flex: 1; height: 1px; background: var(--border); }
.step.done + .step-connector, .step.active + .step-connector { background: var(--accent); }

/* ── Timeline ─────────────────────────────────────────────────────────── */
.timeline { position: relative; padding-left: 28px; }
.timeline::before {
  content: ""; position: absolute; left: 11px; top: 12px; bottom: 12px; width: 2px;
  background: repeating-linear-gradient(to bottom, var(--accent) 0 6px, var(--border) 6px 12px);
}
.timeline-item { position: relative; padding-bottom: var(--space-6); }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-dot { position: absolute; left: -22px; top: 6px; width: 12px; height: 12px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--focus-ring); }
.timeline-dot.muted { background: var(--muted); box-shadow: 0 0 0 4px var(--elev-backdrop); }
.timeline-dot.warn { background: var(--status-preparacao); }
.timeline-dot.info { background: var(--status-entrega); }
.timeline-dot.success { background: var(--status-entregue); }
.timeline-dot.danger { background: var(--status-cancelado); }
.timeline-title { font-size: var(--text-h3); font-weight: 600; margin: 0; }
.timeline-meta { font-size: var(--text-body-sm); color: var(--muted); margin-top: 4px; }

/* ── Tables ───────────────────────────────────────────────────────────── */
.table-wrap { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
table.data { width: 100%; border-collapse: collapse; font-size: var(--text-body-sm); }
table.data thead th {
  background: var(--surface); color: var(--muted);
  font-size: var(--text-micro); font-weight: 600; text-transform: uppercase; letter-spacing: var(--tracking-uppercase);
  padding: var(--space-3) var(--space-4); text-align: left; border-bottom: 1px solid var(--border); white-space: nowrap;
}
table.data tbody td { padding: var(--space-4); border-bottom: 1px solid var(--border-soft); vertical-align: middle; }
table.data tbody tr:last-child td { border-bottom: 0; }
table.data tbody tr:hover { background: var(--surface); }
table.data td.num, table.data th.num { text-align: right; font-variant-numeric: tabular-nums; font-family: var(--font-numeric); }
table.data a.row-link { color: inherit; text-decoration: none; display: block; }
.order-num, .mono { font-family: var(--font-mono); font-size: var(--text-body-sm); }
.empty-table { padding: 48px; text-align: center; color: var(--muted); }

/* ── Tabs ─────────────────────────────────────────────────────────────── */
.tabs { display: flex; gap: var(--space-6); border-bottom: 1px solid var(--border); overflow-x: auto; }
.tab { padding: var(--space-3) 4px; font-size: var(--text-body-sm); font-weight: 500; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; background: none; border-top: 0; border-left: 0; border-right: 0; white-space: nowrap; }
.tab.active { color: var(--fg); border-bottom-color: var(--accent); }

/* ── Empty state ──────────────────────────────────────────────────────── */
.empty {
  display: flex; flex-direction: column; align-items: center; gap: var(--space-2);
  padding: var(--space-8); text-align: center;
  border: 1px dashed var(--border-soft); border-radius: var(--radius-lg); background: var(--surface);
}
.empty .icon-lg { color: var(--muted); }
.empty h3 { margin: var(--space-2) 0 0; }
.empty p { margin: 0 0 var(--space-4); color: var(--muted); font-size: var(--text-body-sm); max-width: 320px; }

/* ── Toast ────────────────────────────────────────────────────────────── */
.toast {
  display: inline-flex; align-items: center; gap: var(--space-3);
  background: var(--fg); color: var(--accent-on);
  padding: var(--space-3) var(--space-4); border-radius: var(--radius-md);
  box-shadow: var(--elev-floating); font-size: var(--text-body-sm);
}

/* ── Alerts ───────────────────────────────────────────────────────────── */
.alert { display: flex; gap: var(--space-3); padding: var(--space-3) var(--space-4); border-radius: var(--radius-md); font-size: var(--text-body-sm); }
.alert--error { background: var(--status-cancelado-bg); color: var(--status-cancelado-text); }
.alert--info { background: var(--status-entrega-bg); color: var(--status-entrega-text); }
.alert--success { background: var(--status-pago-bg); color: var(--status-pago-text); }
.alert--warn { background: var(--status-preparacao-bg); color: var(--status-preparacao-text); }

/* ── Buyer layout ─────────────────────────────────────────────────────── */
.buyer-shell { min-height: 100vh; display: flex; flex-direction: column; background: var(--bg); }
/* The sticky conversion bar floats over the page, so the content column
 * reserves its height — otherwise the last row (a cart summary total, a
 * payment CTA) is never reachable by scrolling. */
.buyer-main { flex: 1; width: 100%; max-width: 480px; margin-inline: auto; padding-bottom: 84px; }

.topbar {
  height: 56px; background: var(--bg); border-bottom: 1px solid var(--border);
  display: flex; align-items: center; padding: 0 var(--space-4); gap: var(--space-3);
  position: sticky; top: 0; z-index: 10;
}
.topbar .title { font-size: var(--text-h3); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .left { flex: 1; min-width: 0; display: flex; align-items: center; gap: var(--space-3); }
.topbar .right { display: flex; align-items: center; gap: var(--space-3); }

.page-body { padding: var(--space-4) var(--space-5) var(--space-6); }
.page-body h2 { font-size: var(--text-h1); font-weight: 700; margin: 0 0 var(--space-3); letter-spacing: var(--tracking-h1); }

.bottom-action {
  position: sticky; bottom: 0; background: var(--bg);
  border-top: 1px solid var(--border); box-shadow: var(--elev-sticky);
  padding: var(--space-3) var(--space-4);
  display: flex; align-items: center; gap: var(--space-4);
}
.bottom-action .totals { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.bottom-action .totals span { font-size: var(--text-caption); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bottom-action .totals strong { font-family: var(--font-numeric); font-size: 22px; font-weight: 700; letter-spacing: var(--tracking-h1); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Non-money label in the same slot (the auth screens have no total): the
 * prototype drops these to body-sm so the phrase is not clipped. */
.bottom-action .totals .label { font-family: var(--font-body); font-size: var(--text-body-sm); font-weight: 600; letter-spacing: 0; }
.bottom-action .cta { flex: 1.4; min-width: 0; }

.cart-line { display: flex; gap: var(--space-3); padding: var(--space-4) 0; border-bottom: 1px solid var(--border-soft); }
.cart-line .thumb { width: 64px; height: 64px; flex-shrink: 0; border-radius: var(--radius-md); background: var(--surface); overflow: hidden; }
.cart-line .thumb img { width: 100%; height: 100%; object-fit: cover; }
.cart-line .meta { flex: 1; min-width: 0; }
.cart-line .name { font-size: var(--text-body-sm); font-weight: 600; margin: 0 0 4px; }
.cart-line .meta-row { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-2); }
.cart-line .unit { font-size: var(--text-caption); color: var(--muted); }
.cart-line .subtotal { font-family: var(--font-numeric); font-weight: 700; font-variant-numeric: tabular-nums; }
.cart-line .qty-row { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); margin-top: var(--space-2); }
.cart-line .remove { display: inline-flex; align-items: center; gap: 6px; background: none; border: 0; color: var(--muted); font-size: var(--text-caption); cursor: pointer; padding: var(--space-1); }
.cart-line .remove:hover { color: var(--danger); }

.summary { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: var(--space-4); }
.summary .row { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-3); padding: var(--space-1) 0; font-size: var(--text-body-sm); }
.summary .row strong { font-family: var(--font-numeric); font-variant-numeric: tabular-nums; }
.summary .row.total { border-top: 1px solid var(--border); margin-top: var(--space-2); padding-top: var(--space-3); font-size: var(--text-body); font-weight: 600; }
.summary .pix-hint { display: flex; align-items: center; gap: var(--space-2); margin-top: var(--space-3); padding: var(--space-3); background: var(--accent-50); border-radius: var(--radius-md); font-size: var(--text-caption); color: var(--accent-hover); }

.carousel { display: flex; gap: var(--space-3); overflow-x: auto; padding-bottom: var(--space-2); scroll-snap-type: x mandatory; }
.carousel > * { flex: 0 0 168px; scroll-snap-align: start; }

.qr-panel { display: flex; flex-direction: column; align-items: center; gap: var(--space-4); padding: var(--space-6); background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-xl); box-shadow: var(--elev-floating); }
.qr-panel .qr { width: 220px; height: 220px; border-radius: var(--radius-md); overflow: hidden; background: var(--bg); }
.qr-panel .qr img { width: 100%; height: 100%; object-fit: contain; }
.copy-box { width: 100%; display: grid; gap: var(--space-2); padding: var(--space-4); background: var(--surface); border-radius: var(--radius-md); }
.copy-box .code { margin: 0; font-family: var(--font-mono); font-size: var(--text-caption); color: var(--fg-soft); word-break: break-all; max-height: 88px; overflow: hidden; }
.timer { display: inline-flex; align-items: center; gap: var(--space-2); padding: var(--space-2) 14px; background: var(--accent-50); border-radius: var(--radius-pill); font-size: var(--text-caption); color: var(--accent-hover); font-weight: 600; }
.timer .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); animation: pulse 1.5s var(--ease-standard) infinite; }
@keyframes pulse { 50% { opacity: 0.5; } }

/* ── Seller layout ────────────────────────────────────────────────────── */
.admin-shell { display: flex; min-height: 100vh; background: var(--bg); }
.sidebar {
  width: 240px; flex-shrink: 0; background: var(--surface);
  border-right: 1px solid var(--border); padding: var(--space-6) 0;
  position: sticky; top: 0; align-self: flex-start; height: 100vh;
  display: flex; flex-direction: column;
}
.sidebar .brand { padding: 0 var(--space-6) var(--space-6); display: flex; align-items: center; gap: 10px; font-size: var(--text-h2); font-weight: 700; color: var(--fg); text-decoration: none; }
.sidebar .brand .mark { width: 28px; height: 28px; border-radius: var(--radius-sm); background: var(--accent); display: inline-flex; align-items: center; justify-content: center; color: var(--accent-on); }
.sidebar .group { padding: var(--space-2) var(--space-3); }
.sidebar .group-title { font-size: var(--text-micro); font-weight: 600; text-transform: uppercase; letter-spacing: var(--tracking-uppercase); color: var(--muted); padding: var(--space-2) var(--space-3); }
.sidebar .nav-item {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 14px; border-radius: var(--radius-md);
  font-size: var(--text-body-sm); font-weight: 500; color: var(--fg-soft);
  cursor: pointer; text-decoration: none; border-left: 3px solid transparent;
}
.sidebar .nav-item:hover { background: rgba(14, 17, 22, 0.04); }
.sidebar .nav-item.active { background: var(--accent-50); color: var(--fg); border-left-color: var(--accent); padding-left: 11px; }
.sidebar .nav-item .badge-new { background: var(--danger); color: var(--accent-on); font-size: 11px; font-weight: 700; padding: 1px 6px; border-radius: var(--radius-pill); }
.sidebar .footer { padding: var(--space-4) var(--space-6); margin-top: auto; border-top: 1px solid var(--border); }
.sidebar .user-card { display: flex; align-items: center; gap: var(--space-2); }
.sidebar .user-card .avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--accent); color: var(--accent-on); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: var(--text-body-sm); flex-shrink: 0; }
.sidebar .user-card .info { min-width: 0; }
.sidebar .user-card strong { display: block; font-weight: 600; font-size: var(--text-body-sm); }
.sidebar .user-card span { display: block; font-size: var(--text-caption); color: var(--muted); }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.main > .content { padding: var(--space-6) var(--space-8); flex: 1; max-width: var(--container-max); width: 100%; }

.topbar-admin {
  height: 64px; background: var(--bg); border-bottom: 1px solid var(--border);
  display: flex; align-items: center; padding: 0 var(--space-6); gap: var(--space-4);
  position: sticky; top: 0; z-index: 10;
}
.topbar-admin .breadcrumbs { display: flex; align-items: center; gap: var(--space-2); font-size: var(--text-body-sm); color: var(--muted); }
.topbar-admin .breadcrumbs strong { color: var(--fg); font-weight: 600; }
.topbar-admin .right { display: flex; align-items: center; gap: var(--space-3); margin-left: auto; }

.metric-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: var(--space-4); }
.metric { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-xl); padding: var(--space-5); box-shadow: var(--elev-card); }
.metric .label { font-size: var(--text-micro); font-weight: 600; text-transform: uppercase; letter-spacing: var(--tracking-uppercase); color: var(--muted); }
.metric .value { font-family: var(--font-numeric); font-size: 28px; font-weight: 700; letter-spacing: var(--tracking-display); font-variant-numeric: tabular-nums; margin-top: var(--space-2); }
.metric .hint { font-size: var(--text-caption); color: var(--muted); margin-top: var(--space-1); }

.toolbar { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: center; margin-bottom: var(--space-4); }
.toolbar .input, .toolbar .select { width: auto; }
/* Enough room for the pt-BR placeholder — a clipped hint reads as a bug. */
.toolbar .input[type="search"] { min-width: 280px; }
.toolbar .select { min-width: 200px; }

@media (max-width: 960px) {
  .sidebar { display: none; }
  .main > .content { padding: var(--space-4); }
}
