/* ===================================================================
   Design System — Checkout (linguagem Cursor)
   Canvas creme #f7f7f4 · laranja #f54e00 escasso · Inter + JetBrains Mono
   Profundidade só por hairlines (sem sombras). Fonte da verdade: DESIGN.md
   =================================================================== */

/* ---------- Fontes (self-hosted) ---------- */
@font-face {
  font-family: "Inter";
  src: url("/fonts/inter-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  src: url("/fonts/inter-latin-ext-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("/fonts/jetbrains-mono-latin-500-normal.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  /* marca */
  --primary: #f54e00;
  --primary-active: #d04200;
  --on-primary: #ffffff;
  /* texto */
  --ink: #26251e;
  --body: #5a5852;
  --muted: #807d72;
  --muted-soft: #a09c92;
  /* superfícies */
  --canvas: #f7f7f4;
  --canvas-soft: #fafaf7;
  --surface-card: #ffffff;
  --surface-strong: #e6e5e0;
  /* hairlines */
  --hairline: #e6e5e0;
  --hairline-soft: #efeee8;
  --hairline-strong: #cfcdc4;
  /* semânticos */
  --success: #1f8a65;
  --error: #cf2d56;
  /* raios */
  --r-sm: 6px;
  --r-md: 8px;
  --r-lg: 12px;
  --r-pill: 9999px;
  /* fontes */
  --font-sans: "Inter", system-ui, "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-mono: "JetBrains Mono", "Fira Code", ui-monospace, monospace;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  color: var(--body);
  background: var(--canvas);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Display: peso 400, tracking negativo (voz editorial, nunca bold) */
h1, h2, h3 {
  color: var(--ink);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin: 0 0 0.5rem;
}
h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1rem; }
a { color: inherit; }

.mono { font-family: var(--font-mono); font-weight: 500; font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.small { font-size: 0.8125rem; }
.center { text-align: center; }

/* ---------- Layout ---------- */
.page {
  max-width: 1240px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
}

.page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}
.page-head h1 { margin: 0; }

/* ---------- Cabeçalho do admin ---------- */
.admin-header {
  background: var(--canvas);
  border-bottom: 1px solid var(--hairline);
}
.admin-header-inner {
  max-width: 1240px;
  margin: 0 auto;
  height: 64px;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.01em;
}
.brand-accent { color: var(--primary); }
.brand-sub { color: var(--muted); font-weight: 500; }
.admin-nav { display: flex; align-items: center; gap: 1.5rem; }
.admin-nav a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
}
.admin-nav a:hover { color: var(--ink); }

/* ---------- Cards ---------- */
.card {
  background: var(--surface-card);
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

/* ---------- Botões ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: var(--primary);
  color: var(--on-primary);
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1;
  height: 40px;
  padding: 0 1.125rem;
  border: 1px solid transparent;
  border-radius: var(--r-md);
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s;
}
.btn:hover { background: var(--primary-active); }
.btn:active { background: var(--primary-active); }
.btn.full { width: 100%; }

/* Botão secundário: branco com hairline (não usa laranja) */
.btn-secondary {
  background: var(--surface-card);
  color: var(--ink);
  border: 1px solid var(--hairline-strong);
}
.btn-secondary:hover { background: var(--canvas-soft); }

/* Links e botões-texto (tinta, não laranja) */
.link {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--hairline-strong);
  padding-bottom: 1px;
}
.link:hover { border-bottom-color: var(--ink); }
.link-btn {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ink);
  cursor: pointer;
}
.link-btn:hover { text-decoration: underline; }
.link-btn.danger { color: var(--error); }
.inline { display: inline; }

/* ---------- Badges ---------- */
.badge {
  display: inline-block;
  background: var(--surface-strong);
  color: var(--ink);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.25rem 0.625rem;
  border-radius: var(--r-pill);
}
.badge.ok { background: rgba(31, 138, 101, 0.12); color: var(--success); }
.badge.off { background: var(--surface-strong); color: var(--muted); }

/* ---------- Tabelas ---------- */
.table-wrap { overflow-x: auto; padding: 0; }
table { width: 100%; border-collapse: collapse; }
th, td {
  text-align: left;
  padding: 0.875rem 1rem;
  border-bottom: 1px solid var(--hairline);
  vertical-align: top;
}
th {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}
tbody tr:hover { background: var(--canvas-soft); }
tr:last-child td { border-bottom: none; }
td strong { color: var(--ink); font-weight: 600; }
td.actions { white-space: nowrap; text-align: right; }
td.actions form { margin-left: 0.875rem; }

/* ---------- Formulários ---------- */
.form { display: flex; flex-direction: column; gap: 1.125rem; text-align: left; }
.form label {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ink);
}
.form input[type="text"],
.form input[type="email"],
.form input[type="password"],
.form input[type="number"],
.form select,
.form textarea {
  background: var(--surface-card);
  border: 1px solid var(--hairline);
  border-radius: var(--r-md);
  padding: 0.75rem 1rem;
  min-height: 44px;
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 400;
}
.form textarea { min-height: auto; resize: vertical; }
.form select {
  appearance: none;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23807d72' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}
.form input:focus, .form select:focus, .form textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 1px var(--primary);
}
.gw-fields { display: flex; flex-direction: column; gap: 1.125rem; padding: 1rem; background: var(--canvas-soft); border: 1px solid var(--hairline); border-radius: var(--r-md); }
.form input::placeholder, .form textarea::placeholder { color: var(--muted-soft); }
.form .hint { font-weight: 400; font-size: 0.8125rem; color: var(--muted); }
.form input.invalid { border-color: var(--error); box-shadow: 0 0 0 1px var(--error); }
.field-error { font-weight: 400; font-size: 0.8125rem; color: var(--error); }
.form label.checkbox { flex-direction: row; align-items: center; gap: 0.5rem; font-weight: 400; color: var(--body); }
.form label.checkbox input { accent-color: var(--primary); width: 16px; height: 16px; }
.form-actions { display: flex; align-items: center; gap: 1rem; margin-top: 0.25rem; }

.login-card { max-width: 400px; margin: 3.5rem auto; }

/* ---------- Flash / mensagens ---------- */
.flash {
  padding: 0.75rem 1rem;
  border-radius: var(--r-md);
  margin-bottom: 1.25rem;
  font-size: 0.875rem;
  border: 1px solid transparent;
}
.flash-ok {
  background: rgba(31, 138, 101, 0.1);
  color: var(--success);
  border-color: rgba(31, 138, 101, 0.25);
}
.flash-error {
  background: rgba(207, 45, 86, 0.1);
  color: var(--error);
  border-color: rgba(207, 45, 86, 0.25);
}

/* ---------- Painel de pedidos ---------- */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.kpi {
  background: var(--surface-card);
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}
.kpi-label {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}
.kpi-value { font-size: 1.5rem; color: var(--ink); font-weight: 400; letter-spacing: -0.02em; }

/* Chips de filtro */
.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.25rem; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.875rem;
  border: 1px solid var(--hairline-strong);
  border-radius: var(--r-pill);
  background: var(--surface-card);
  color: var(--body);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
}
.chip:hover { border-color: var(--ink); color: var(--ink); }
.chip.active { background: var(--ink); border-color: var(--ink); color: var(--canvas); }
.chip-count {
  font-size: 0.75rem;
  padding: 0.05rem 0.4rem;
  border-radius: var(--r-pill);
  background: var(--surface-strong);
  color: var(--muted);
}
.chip.active .chip-count { background: rgba(255, 255, 255, 0.18); color: var(--canvas); }

/* Badges de estágio (paleta de funil do design system) */
.stage {
  display: inline-block;
  padding: 0.2rem 0.625rem;
  border-radius: var(--r-pill);
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}
.stage-approved { background: rgba(31, 138, 101, 0.14); color: var(--success); }
.stage-declined { background: rgba(207, 45, 86, 0.12); color: var(--error); }
.stage-abandoned { background: rgba(223, 168, 143, 0.28); color: #9a5b3f; }
.stage-pending { background: rgba(192, 168, 221, 0.28); color: #6b4e9e; }
.stage-started { background: rgba(159, 187, 224, 0.28); color: #3f6aa0; }
.stage-chargeback { background: rgba(207, 45, 86, 0.18); color: #8f1f3c; }
.stage-refunded { background: rgba(192, 133, 50, 0.2); color: #8a5c1d; }
.stage-shipped { background: rgba(31, 125, 138, 0.16); color: #1f7d8a; }

.pagination { display: flex; align-items: center; justify-content: center; gap: 1.5rem; margin-top: 1.25rem; }

/* Detalhe do pedido */
.order-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.order-head h1 { margin: 0; }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.detail-title { font-size: 1rem; font-weight: 600; letter-spacing: 0; margin-bottom: 1rem; }
.detail-list { display: grid; grid-template-columns: 130px 1fr; gap: 0.5rem 1rem; margin: 0; }
.detail-list dt { color: var(--muted); font-size: 0.875rem; }
.detail-list dd { margin: 0; color: var(--ink); font-size: 0.9375rem; }
.select-all { user-select: all; word-break: break-all; }

/* ---------- Imagens ---------- */
/* Miniatura em tabelas (produtos, pedidos) */
.thumb-cell { width: 56px; }
.thumb {
  display: block;
  width: 44px;
  height: 44px;
  border-radius: var(--r-sm);
  object-fit: cover;
  background: var(--canvas-soft);
  border: 1px solid var(--hairline);
}
.thumb-empty { background: var(--canvas-soft); }

/* Preview no form de produto */
.img-preview {
  display: block;
  max-width: 160px;
  max-height: 160px;
  margin-top: 0.5rem;
  border-radius: var(--r-md);
  border: 1px solid var(--hairline);
  object-fit: cover;
}
.img-preview-sm {
  width: 40px;
  height: 40px;
  border-radius: var(--r-sm);
  object-fit: cover;
  border: 1px solid var(--hairline);
}
.axis-images { display: flex; flex-direction: column; gap: 0.75rem; }
.img-row { display: flex; align-items: center; gap: 0.75rem; }
.img-row-label { min-width: 100px; font-weight: 600; color: var(--ink); font-size: 0.9375rem; }

/* Imagem no resumo do checkout */
.summary-image {
  display: block;
  width: 100%;
  max-height: 200px;
  object-fit: cover;
  border-radius: var(--r-md);
  border: 1px solid var(--hairline);
  margin: 0.75rem 0;
}

/* Imagem no detalhe do pedido */
.order-head-main { display: flex; align-items: center; gap: 1rem; }
.order-image {
  width: 64px;
  height: 64px;
  border-radius: var(--r-md);
  object-fit: cover;
  border: 1px solid var(--hairline);
}

/* ---------- Checkout público ---------- */
.checkout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 2rem;
  align-items: start;
}
.checkout-main { min-width: 0; }
.co-brand {
  display: inline-block;
  margin-bottom: 1.25rem;
  font-size: 1.0625rem;
}
.checkout-main > h1 { margin-bottom: 1.5rem; }

.co-section {
  background: var(--surface-card);
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  padding: 1.5rem;
  margin-bottom: 1.25rem;
}
.co-section h2 {
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: 0;
  margin-bottom: 1rem;
}

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.grid-cep { max-width: 220px; }
.grid-city { display: grid; grid-template-columns: 1fr 90px; gap: 1rem; }

/* Método de pagamento */
.pay-method { margin-bottom: 1.25rem; display: flex; flex-direction: column; gap: 0.625rem; }
.method-option {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.875rem 1rem;
  border: 1px solid var(--hairline-strong);
  border-radius: var(--r-md);
  cursor: pointer;
}
.method-option.selected { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary); }
.method-option.disabled { opacity: 0.55; cursor: not-allowed; border-style: dashed; }
.method-option input { accent-color: var(--primary); }
.method-label { font-weight: 600; color: var(--ink); font-size: 0.9375rem; }
.method-option .badge { margin-left: auto; }

/* Campos montados pelo SDK do gateway (SmartFields) */
.sf-input {
  background: var(--surface-card);
  border: 1px solid var(--hairline);
  border-radius: var(--r-md);
  padding: 0.75rem 1rem;
  min-height: 44px;
}
.sf-input iframe { width: 100%; }

/* Bloco de introdução do Pix (no seletor de método) */
.pix-intro {
  margin: 0;
  padding: 1rem;
  background: var(--canvas-soft);
  border: 1px solid var(--hairline);
  border-radius: var(--r-md);
  font-size: 0.9375rem;
}

/* Página do Pix */
.pix-page { max-width: 460px; margin: 3rem auto; }
.pix-card { padding: 2rem; }
.pix-qr {
  display: inline-block;
  padding: 0.75rem;
  background: #fff;
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  margin: 1.25rem 0 0.5rem;
}
.pix-qr img { display: block; max-width: 100%; height: auto; }
.pix-copy { display: flex; gap: 0.5rem; margin: 1rem 0; }
.pix-copy input {
  flex: 1;
  min-width: 0;
  background: var(--surface-card);
  border: 1px solid var(--hairline);
  border-radius: var(--r-md);
  padding: 0.65rem 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--ink);
}
.pix-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--hairline);
  color: var(--muted);
  font-size: 0.9375rem;
}
.pix-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid var(--hairline-strong);
  border-top-color: var(--primary);
  border-radius: var(--r-pill);
  animation: pix-spin 0.8s linear infinite;
}
@keyframes pix-spin { to { transform: rotate(360deg); } }

/* Campo com bandeira do cartão */
.input-with-brand { position: relative; display: block; }
.input-with-brand input { width: 100%; padding-right: 5rem; }
.card-brand {
  position: absolute;
  right: 0.875rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.sandbox-note { margin: 0.25rem 0 0; }

.co-submit { height: 52px; font-size: 1rem; margin-top: 0.5rem; }

/* Resumo do pedido */
.checkout-summary { position: sticky; top: 2rem; }
.summary-card {
  background: var(--surface-card);
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  padding: 1.5rem;
}
.summary-product { margin: 0.75rem 0 0.25rem; font-size: 1.125rem; font-weight: 600; letter-spacing: 0; }
.summary-variant { margin: 0 0 0.5rem; font-size: 0.875rem; font-weight: 600; color: var(--primary); }

/* Variações no form de produto */
.variations {
  border: 1px solid var(--hairline);
  border-radius: var(--r-md);
  padding: 1rem 1.25rem 1.25rem;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.variations legend { padding: 0 0.5rem; font-weight: 600; color: var(--ink); font-size: 0.9375rem; }
.price-input {
  width: 110px;
  background: var(--surface-card);
  border: 1px solid var(--hairline);
  border-radius: var(--r-sm);
  padding: 0.4rem 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--ink);
}
.summary-desc { margin-bottom: 1rem; }
.summary-line {
  display: flex;
  justify-content: space-between;
  padding: 0.625rem 0;
  border-top: 1px solid var(--hairline);
  color: var(--body);
  font-size: 0.9375rem;
}
.summary-line.total { color: var(--ink); font-weight: 600; font-size: 1.0625rem; }
.summary-line.total .mono { font-size: 1.0625rem; }

/* ---------- Página de obrigado ---------- */
.thankyou { max-width: 480px; margin: 3rem auto; }
.thankyou-card { padding: 2.5rem 2rem; }
.check-mark {
  width: 56px;
  height: 56px;
  margin: 0 auto 1.25rem;
  border-radius: var(--r-pill);
  background: rgba(31, 138, 101, 0.12);
  color: var(--success);
  display: flex;
  align-items: center;
  justify-content: center;
}
.thankyou-card h1 { margin: 0.75rem 0 0.5rem; }
.check-mark.analysis { background: rgba(192, 168, 221, 0.25); color: #6b4e9e; }
.badge.analysis-badge { background: rgba(192, 168, 221, 0.28); color: #6b4e9e; }
.receipt {
  text-align: left;
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  padding: 0.5rem 1.25rem;
  margin: 1.5rem 0;
}
.receipt-line {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--hairline);
  font-size: 0.9375rem;
}
.receipt-line:last-child { border-bottom: none; }
.receipt-line.total { color: var(--ink); font-weight: 600; }

/* ---------- Responsivo ---------- */
@media (max-width: 860px) {
  .checkout { grid-template-columns: 1fr; }
  .checkout-summary { position: static; order: -1; }
}
@media (max-width: 640px) {
  h1 { font-size: 1.625rem; }
  .page { padding: 1.5rem 1rem; }
  .admin-nav { gap: 1rem; }
  td.actions { text-align: left; }
  .grid-2, .grid-city { grid-template-columns: 1fr; }
  .kpi-grid { grid-template-columns: 1fr 1fr; }
  .detail-grid { grid-template-columns: 1fr; }
}

/* Galeria de pré-visualização (admin) */
.preview-list { display: flex; flex-direction: column; gap: 0.25rem; margin-top: 0.5rem; }
.preview-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 0;
  border-top: 1px solid var(--hairline);
}
.preview-row:first-child { border-top: none; }
.preview-row .btn { flex-shrink: 0; }

/* ===== Tonalidades por status (compartilhadas entre chips e timeline) ===== */
.tone-started    { --tone: #3f6aa0; --tone-bg: rgba(159, 187, 224, 0.28); }
.tone-abandoned  { --tone: #9a5b3f; --tone-bg: rgba(223, 168, 143, 0.28); }
.tone-pending    { --tone: #6b4e9e; --tone-bg: rgba(192, 168, 221, 0.28); }
.tone-approved   { --tone: #1f8a65; --tone-bg: rgba(31, 138, 101, 0.14); }
.tone-shipped    { --tone: #1f7d8a; --tone-bg: rgba(31, 125, 138, 0.16); }
.tone-declined   { --tone: #cf2d56; --tone-bg: rgba(207, 45, 86, 0.12); }
.tone-chargeback { --tone: #8f1f3c; --tone-bg: rgba(207, 45, 86, 0.18); }
.tone-refunded   { --tone: #8a5c1d; --tone-bg: rgba(192, 133, 50, 0.2); }

/* Chips coloridos por status: ponto colorido + preenchimento tonal quando ativo */
.chip .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--tone, var(--muted-soft)); flex: none;
}
.chip.active[class*="tone-"] {
  background: var(--tone-bg);
  border-color: var(--tone);
  color: var(--tone);
}
.chip.active[class*="tone-"] .chip-count { background: rgba(0, 0, 0, 0.07); color: var(--tone); }

/* ===== Linha do tempo do pedido (histórico) ===== */
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline-item { position: relative; padding: 0 0 1rem 1.5rem; }
.timeline-item::before {
  content: ""; position: absolute; left: 5px; top: 1.1rem; bottom: -0.15rem;
  width: 2px; background: var(--hairline-strong);
}
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item:last-child::before { display: none; }
.timeline-dot {
  position: absolute; left: 0; top: 4px;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--tone, var(--muted-soft));
  box-shadow: 0 0 0 3px var(--surface-card);
}
.timeline-head { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.timeline-note { margin: 0.25rem 0 0; word-break: break-word; }

/* ===== Rastreio ===== */
.tracking-form { margin-top: 0.5rem; }
.track-cell { white-space: nowrap; }
.track-code { display: inline-block; max-width: 130px; overflow: hidden; text-overflow: ellipsis; vertical-align: bottom; }
.track-quick { display: flex; gap: 0.35rem; align-items: center; }
.track-quick input[type="text"] {
  width: 118px; height: 32px; padding: 0 0.5rem;
  border: 1px solid var(--hairline-strong); border-radius: var(--r-sm);
  font-size: 0.8125rem; font-family: var(--font-mono); background: var(--surface-card); color: var(--ink);
}
.btn-track {
  height: 32px; padding: 0 0.7rem; flex: none;
  background: var(--primary); color: var(--on-primary);
  border: 1px solid transparent; border-radius: var(--r-sm);
  font-size: 0.8125rem; font-weight: 500; cursor: pointer;
}
.btn-track:hover { background: var(--primary-active); }

/* ===== Busca de pedidos (compacta e discreta) ===== */
.search-bar { display: flex; gap: 0.375rem; align-items: center; margin-bottom: 1rem; max-width: 360px; }
.search-bar input[type="search"] {
  flex: 1 1 auto; min-width: 0; height: 34px; padding: 0 0.625rem;
  border: 1px solid var(--hairline); border-radius: var(--r-sm);
  background: var(--canvas-soft); color: var(--ink);
  font-family: var(--font-sans); font-size: 0.8125rem;
}
.search-bar input[type="search"]:focus {
  outline: none; border-color: var(--hairline-strong); background: var(--surface-card);
}
.search-bar input[type="search"]::placeholder { color: var(--muted-soft); }
.btn-search {
  flex: none; height: 34px; padding: 0 0.75rem;
  background: var(--surface-card); color: var(--muted);
  border: 1px solid var(--hairline); border-radius: var(--r-sm);
  font-family: var(--font-sans); font-size: 0.8125rem; font-weight: 500; cursor: pointer;
}
.btn-search:hover { color: var(--ink); border-color: var(--hairline-strong); }
.search-clear { font-size: 0.8125rem; }
.search-info { margin: -0.25rem 0 1rem; }
