/* ═══════════════════════════════════════════════
   TerraNutri B2B — Design System
   Fiel ao mock Claude Design (bg0SSNTlgaG7FVws9Bb8Mw):
   verde #1E4D3D · laranja #E94F1D · creme #FAF7F2
   Inter (UI) + Space Grotesk (números)
   ═══════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Space+Grotesk:wght@500;600;700&display=swap');

:root {
  /* Verde (principal) */
  --primary:       #1E4D3D;
  --primary-dark:  #133528;
  --primary-light: #E8F0EC;   /* greenSoft */
  --primary-tint:  #F3F8F5;   /* greenTint */

  /* Laranja (accent) */
  --accent:        #E94F1D;
  --accent-dark:   #C13F12;
  --accent-light:  #FEEEE6;   /* orangeSoft */

  /* Base */
  --cream:         #FAF7F2;
  --paper:         #FFFFFF;
  --ink:           #1A1F1D;
  --ink-soft:      #4A524E;
  --muted:         #8B918E;
  --line:          #E6E8E4;
  --line-soft:     #F1F2EE;

  /* Semânticos */
  --success:       #2E8B57;
  --success-bg:    #E0F0E6;
  --success-ink:   #1F6B3D;
  --warning:       #E8A020;
  --warning-bg:    #FDF1DC;
  --warning-ink:   #8A6512;
  --danger:        #D43F2A;
  --danger-bg:     #FCE6E3;

  /* Aliases legados (não remover — usados pelo JS) */
  --gray-50:       #FAF7F2;
  --gray-100:      #F1F2EE;
  --gray-200:      #E6E8E4;
  --gray-400:      #8B918E;
  --gray-600:      #4A524E;
  --gray-800:      #1A1F1D;

  /* Raios */
  --radius-sm:     8px;
  --radius:        12px;
  --radius-lg:     16px;
  --radius-xl:     20px;

  /* Sombras */
  --shadow:        0 1px 2px rgba(20,40,30,.05), 0 1px 3px rgba(20,40,30,.06);
  --shadow-md:     0 4px 12px rgba(20,40,30,.08), 0 2px 4px rgba(20,40,30,.05);
  --shadow-lg:     0 8px 24px rgba(20,40,30,.12);

  /* Layout */
  --topbar-h:      56px;
  --bottomnav-h:   68px;

  /* Transições */
  --transition:    .18s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; }

body {
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  background: var(--cream);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Números e preços: Space Grotesk com numerais tabulares */
.price-row .value,
.totals-row .value,
.totals-row span:last-child,
[id^="pf-"], [id^="st-"],
#subtotal-val, #desc-geral-val, #total-val,
.hist-total, .preco-b2b {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

#app {
  display: flex;
  flex-direction: column;
  height: 100dvh;
  max-width: 480px;
  margin: 0 auto;
  position: relative;
  background: var(--cream);
}

/* Efeito de toque global para elementos interativos */
.btn, .nav-item, .filter-tab, .admin-tab, .desc-faixa-btn,
.cart-item-remove, .qty-stepper button,
.card[onclick], .hist-card[onclick] {
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  transition: transform .12s ease, opacity .12s ease, background var(--transition), color var(--transition), border-color var(--transition);
}
.btn:active, .nav-item:active, .filter-tab:active,
.admin-tab:active, .desc-faixa-btn:active,
.qty-stepper button:active {
  transform: scale(.98);
  opacity: .92;
}

/* ── Topbar (branca minimalista, estilo TopHeader do design) ─ */
#topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--topbar-h);
  background: #fff;
  color: var(--ink);
  padding: 0 18px;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid var(--line-soft);
}
.topbar-brand {
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--primary);
}
.topbar-brand img { height: 32px; width: auto; display: block; }
.topbar-brand span {
  font-family: 'Inter', sans-serif;
  font-weight: 800;
  color: var(--primary);
}
/* Sobrescreve .btn-ghost-sm para o topbar branco */
#topbar .btn-ghost-sm {
  color: var(--ink-soft);
  padding: 6px 12px;
  border-radius: 10px;
}
#topbar .btn-ghost-sm:hover {
  background: var(--line-soft);
  color: var(--ink);
}

/* ── Main / Screens ────────────────────────── */
#main { flex: 1; overflow-y: auto; background: var(--cream); }
.screen { min-height: 100%; }

/* ── Bottom nav (pill ativa atrás do ícone) ── */
#bottom-nav {
  display: flex;
  background: #fff;
  border-top: 1px solid var(--line);
  height: var(--bottomnav-h);
  padding: 6px 4px 4px;
  flex-shrink: 0;
}
.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 4px 4px;
  text-decoration: none;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .01em;
  position: relative;
}
.nav-item .nav-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 18px;
  border-radius: 18px;
  background: transparent;
  transition: background var(--transition);
  position: relative;
  color: inherit;
}
.nav-item .nav-icon svg { display: block; }
.nav-item.active { color: var(--primary); }
.nav-item.active .nav-icon { background: var(--primary-light); }
.nav-badge {
  position: absolute;
  top: -3px;
  right: 4px;
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  min-width: 16px;
  height: 16px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  border: 2px solid #fff;
  box-shadow: 0 1px 2px rgba(0,0,0,.08);
  line-height: 1;
}

/* ── Login ─────────────────────────────────── */
#screen-login {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100dvh;
  padding: 32px 24px;
  background:
    radial-gradient(circle at 20% 15%, rgba(255,255,255,.06) 0, transparent 50%),
    radial-gradient(circle at 85% 85%, rgba(233,79,29,.08) 0, transparent 50%),
    var(--primary);
}
.login-logo {
  display: block;
  margin: 0 auto 24px;
  max-width: 210px;
  width: 64%;
  height: auto;
  background: #fff;
  padding: 18px 22px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}
.login-title { color: #fff; font-size: 26px; font-weight: 800; margin-bottom: 4px; letter-spacing: -0.01em; }
.login-sub { color: rgba(255,255,255,.72); margin-bottom: 32px; font-size: 14px; }
.login-card {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  width: 100%;
  max-width: 360px;
  box-shadow: var(--shadow-md);
}
.login-card h2 { font-size: 18px; margin-bottom: 20px; color: var(--primary); font-weight: 700; }

/* ── Cards (padrão do design: borda + sombra leve) ─ */
.card {
  background: #fff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  padding: 14px 16px;
  margin-bottom: 10px;
  box-shadow: var(--shadow);
}
.card-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.card-title { font-weight: 700; font-size: 13px; color: var(--ink); letter-spacing: -0.005em; }
.card-subtitle { font-size: 12px; color: var(--ink-soft); margin-top: 1px; }

/* ── Page header (subtler, mais espaçado) ─── */
.page-header {
  background: #fff;
  padding: 14px 18px 14px;
  border-bottom: 1px solid var(--line-soft);
  position: sticky;
  top: 0;
  z-index: 5;
}
.page-header h2 { font-size: 18px; font-weight: 700; color: var(--ink); letter-spacing: -0.01em; }
.page-header p { font-size: 12.5px; color: var(--ink-soft); margin-top: 2px; }

/* ── Search bar ────────────────────────────── */
.search-bar {
  display: flex;
  gap: 8px;
  padding: 10px 14px;
  background: #fff;
  border-bottom: 1px solid var(--line-soft);
  position: sticky;
  top: 0;
  z-index: 5;
}
.search-input {
  flex: 1;
  border: 1.5px solid transparent;
  border-radius: var(--radius);
  padding: 11px 14px;
  font-size: 15px;
  outline: none;
  transition: border-color var(--transition), background var(--transition);
  background: var(--line-soft);
}
.search-input:focus { border-color: var(--primary); background: #fff; }

/* ── Produto card ──────────────────────────── */
.produto-list { padding: 12px 14px; }
.produto-card { margin-bottom: 10px; }
.produto-codigo {
  font-size: 10.5px;
  color: var(--muted);
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.produto-descricao { font-weight: 600; margin: 4px 0 2px; font-size: 14px; line-height: 1.3; }
.produto-marca { font-size: 12px; color: var(--ink-soft); }
.produto-preco-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 10px 0 8px;
  flex-wrap: wrap;
}
.preco-b2b { font-size: 22px; font-weight: 800; color: var(--primary); }
.preco-tag {
  font-size: 11px;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: 6px;
  padding: 3px 8px;
  font-weight: 600;
}
.estoque-tag { font-size: 12px; color: var(--ink-soft); }
.produto-indisponivel { opacity: 0.55; filter: grayscale(0.6); }
.badge-indisponivel {
  background: var(--ink); color: #fff;
  font-size: 11px; padding: 3px 8px; border-radius: 100px;
  font-weight: 600; letter-spacing: .02em;
}
.produto-actions { display: flex; gap: 8px; align-items: center; margin-top: 8px; }
.qty-input {
  width: 68px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 9px;
  text-align: center;
  font-size: 15px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* ── Badges / Tags (pills) ─────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 100px;
  letter-spacing: .01em;
}
.badge-warning { background: var(--warning-bg); color: var(--warning-ink); }
.badge-danger  { background: var(--danger-bg);  color: var(--danger); }
.badge-success { background: var(--success-bg); color: var(--success-ink); }
.badge-info    { background: var(--primary-light); color: var(--primary); }
.badge-gray    { background: var(--line-soft); color: var(--ink-soft); }

/* ── Status badge (orçamentos) ─────────────── */
.status-rascunho           { background: var(--line-soft); color: var(--ink-soft); }
.status-pendente_aprovacao { background: var(--warning-bg); color: var(--warning-ink); }
.status-enviado            { background: var(--primary-light); color: var(--primary); }
.status-aprovado_cliente   { background: var(--success-bg); color: var(--success-ink); }
.status-convertido         { background: var(--success-bg); color: var(--success-ink); }
.status-cancelado          { background: var(--danger-bg); color: var(--danger); }

/* ── Buttons ───────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: none;
  border-radius: var(--radius);
  padding: 12px 18px;
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: -0.005em;
  cursor: pointer;
  min-height: 48px;
  text-decoration: none;
  white-space: nowrap;
}
.btn-primary  { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-accent   { background: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent-dark); }
.btn-success  { background: var(--success); color: #fff; }
.btn-danger   { background: var(--danger);  color: #fff; }
.btn-outline  { background: #fff; border: 1.5px solid var(--line); color: var(--primary); }
.btn-outline:hover { border-color: var(--primary); }
.btn-outline-danger { background: #fff; border: 1.5px solid var(--line); color: var(--danger); }
.btn-outline-danger:hover { border-color: var(--danger); }
.btn-soft     { background: var(--primary-light); color: var(--primary); }
.btn-ghost    { background: transparent; color: var(--primary); }
.btn-sm       { padding: 8px 14px; font-size: 13px; min-height: 36px; }
.btn-lg       { padding: 14px 20px; font-size: 15px; min-height: 52px; }
.btn-full     { width: 100%; }
.btn-icon     { background: var(--line-soft); color: var(--ink); padding: 10px 12px; }
.btn-ghost-sm { background: transparent; color: rgba(255,255,255,.9); border: none; cursor: pointer; font-size: 13px; font-weight: 600; padding: 6px 10px; border-radius: 8px; }
.btn-ghost-sm:hover { background: rgba(255,255,255,.1); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn:disabled:active { transform: none; }

/* ── Forms ──────────────────────────────────── */
.form-group { margin-bottom: 14px; }
label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-soft);
  margin-bottom: 5px;
  letter-spacing: .005em;
}
input[type=text], input[type=password], input[type=email], input[type=number],
input[type=date], input[type=tel], textarea, select {
  width: 100%;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 11px 12px;
  font-size: 15px;
  color: var(--ink);
  background: #fff;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
  font-family: inherit;
}
input:focus, textarea:focus, select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(30,77,61,.08);
}
textarea { resize: vertical; min-height: 80px; }
.form-error { color: var(--danger); font-size: 13px; margin-top: 6px; }

/* ── Range slider ───────────────────────────── */
input[type=range] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: var(--line);
  outline: none;
  border: none;
  padding: 0;
}
input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--primary);
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0,0,0,.2);
}

/* ── Cart item ──────────────────────────────── */
.cart-item {
  background: #fff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  padding: 14px 16px;
  margin-bottom: 10px;
  box-shadow: var(--shadow);
}
.cart-item-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.cart-item-desc { font-weight: 600; font-size: 13.5px; flex: 1; line-height: 1.3; }
.cart-item-remove {
  color: var(--muted);
  font-size: 20px;
  cursor: pointer;
  padding: 4px 6px;
  line-height: 1;
  border-radius: 8px;
  transition: background var(--transition), color var(--transition);
}
.cart-item-remove:hover { background: var(--danger-bg); color: var(--danger); }
.cart-item-code {
  font-size: 10.5px;
  color: var(--muted);
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  margin-top: 2px;
}
.qty-row { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.qty-stepper {
  display: flex;
  align-items: center;
  gap: 0;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}
.qty-stepper button {
  background: var(--line-soft);
  border: none;
  width: 36px;
  height: 36px;
  font-size: 18px;
  cursor: pointer;
  font-weight: 700;
  color: var(--ink);
}
.qty-stepper button:hover { background: var(--line); }
.qty-stepper span {
  width: 44px;
  text-align: center;
  font-weight: 700;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}
.discount-row { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line); }
.discount-label { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--ink-soft); margin-bottom: 6px; font-weight: 600; }
.price-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line-soft);
}
.price-row .label { font-size: 12px; color: var(--ink-soft); }
.price-row .value { font-size: 16px; font-weight: 800; color: var(--primary); }

/* ── Totals card (sticky no rodapé, fiel ao design) ── */
.totals-card {
  background: var(--primary);
  color: #fff;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  padding: 14px 18px 16px;
  margin: 0 -14px;
  box-shadow: 0 -8px 20px rgba(0,0,0,.12);
  position: sticky;
  bottom: 0;
  z-index: 6;
  overflow: hidden;
}
.totals-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 85% 0%, rgba(233,79,29,.22) 0, transparent 55%);
  pointer-events: none;
}
.totals-row {
  display: flex;
  justify-content: space-between;
  font-size: 12.5px;
  margin-bottom: 4px;
  opacity: .82;
  position: relative;
}
.totals-row.desc-geral-row { color: var(--accent-light); opacity: 1; }
.totals-row.total {
  margin-bottom: 0;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(255,255,255,.22);
  opacity: 1;
  align-items: center;
  gap: 12px;
}
.totals-row.total .total-label-block { flex: 1; min-width: 0; }
.totals-row.total .total-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  opacity: .72;
  display: block;
  margin-bottom: 2px;
}
.totals-row.total .total-value {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-variant-numeric: tabular-nums;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.05;
  display: block;
}
.totals-row.total .total-economia {
  font-size: 10.5px;
  color: #FFD8C6;
  margin-top: 3px;
  display: block;
}
.totals-card .btn {
  background: var(--accent);
  color: #fff;
  min-height: 52px;
  min-width: 128px;
  padding: 0 18px;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(233,79,29,.35);
}
.totals-card .btn:hover { background: var(--accent-dark); }
.totals-card .btn:disabled { background: rgba(255,255,255,.2); color: rgba(255,255,255,.6); box-shadow: none; }

/* ── Histórico card ─────────────────────────── */
.hist-card {
  background: #fff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  padding: 14px 16px;
  margin-bottom: 10px;
  box-shadow: var(--shadow);
}
.hist-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.hist-numero { font-weight: 700; font-size: 14.5px; letter-spacing: -0.005em; }
.hist-cliente { font-size: 12.5px; color: var(--ink-soft); margin-top: 3px; }
.hist-total { font-size: 20px; font-weight: 800; color: var(--primary); margin-top: 6px; }
.hist-actions { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.hist-items { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line-soft); }
.hist-item-row { display: flex; justify-content: space-between; font-size: 13px; padding: 3px 0; }

/* ── Filter tabs ────────────────────────────── */
.filter-tabs {
  display: flex;
  gap: 6px;
  padding: 10px 14px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  background: #fff;
  border-bottom: 1px solid var(--line-soft);
}
.filter-tab {
  border: 1.5px solid var(--line);
  border-radius: 100px;
  padding: 6px 14px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  background: #fff;
  color: var(--ink-soft);
  white-space: nowrap;
}
.filter-tab:hover { border-color: var(--muted); }
.filter-tab.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ── Admin tabs ─────────────────────────────── */
.admin-tabs {
  display: flex;
  border-bottom: 2px solid var(--line);
  background: #fff;
  overflow-x: auto;
}
.admin-tab {
  padding: 12px 18px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  white-space: nowrap;
  letter-spacing: -0.005em;
}
.admin-tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.admin-content { padding: 16px 14px; }

/* ── Tabelas ────────────────────────────────── */
.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--line); }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th {
  background: var(--primary);
  color: #fff;
  padding: 10px 12px;
  text-align: left;
  font-weight: 600;
  white-space: nowrap;
  letter-spacing: .01em;
}
td { padding: 9px 12px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--primary-tint); }

/* ── Section ────────────────────────────────── */
.section-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 10px;
  letter-spacing: .01em;
  text-transform: uppercase;
}
.section-divider { height: 1px; background: var(--line); margin: 16px 0; }

/* ── Camera (scanner EAN) ───────────────────── */
#camera-wrap { padding: 10px 12px; background: #000; position: relative; }
#camera-video {
  width: 100%;
  max-height: 240px;
  object-fit: cover;
  border-radius: var(--radius);
  display: block;
}
.camera-stop { position: absolute; top: 18px; right: 20px; }

/* ── Toast ──────────────────────────────────── */
#toast {
  position: fixed;
  bottom: calc(var(--bottomnav-h) + 16px);
  left: 50%;
  transform: translateX(-50%);
  max-width: calc(100vw - 32px);
  background: var(--ink);
  color: #fff;
  padding: 13px 20px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  z-index: 999;
  opacity: 0;
  transition: opacity .25s ease, transform .25s ease;
  pointer-events: none;
  text-align: center;
  box-shadow: var(--shadow-lg);
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
#toast.toast-error { background: var(--danger); }
#toast.toast-success { background: var(--success); }
#toast.toast-warning { background: var(--warning); color: var(--ink); }

/* `hidden` sempre vence qualquer display abaixo */
[hidden] { display: none !important; }

/* ── Spinner ────────────────────────────────── */
#spinner {
  position: fixed;
  inset: 0;
  background: rgba(255,255,255,.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  backdrop-filter: blur(2px);
}
.spinner-ring {
  width: 44px; height: 44px;
  border: 4px solid var(--line);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Utilidades ─────────────────────────────── */
.empty-state { text-align: center; padding: 48px 24px; color: var(--muted); }
.empty-state .empty-icon { font-size: 48px; margin-bottom: 12px; }
.empty-state p { font-size: 15px; }
.padding-page { padding: 14px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mb-3 { margin-bottom: 12px; }
.text-sm { font-size: 13px; }
.text-gray { color: var(--ink-soft); }
.bold { font-weight: 700; }

/* ── Desconto geral: botões por faixa ──────── */
.desc-faixa-btn {
  flex: 1 1 80px;
  padding: 12px 10px;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink-soft);
  cursor: pointer;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
}
.desc-faixa-btn.ativa {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
}
.desc-faixa-btn.ativa.selecionado {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 2px 6px rgba(30,77,61,.25);
}
.desc-faixa-btn.desativa {
  opacity: .4;
  cursor: not-allowed;
  background: var(--line-soft);
}

/* ── Promoções ─────────────────────────────── */
.promo-card {
  border: 2px solid var(--accent);
  position: relative;
  overflow: hidden;
}
.promo-card::before {
  content: '🎯 OFERTA';
  position: absolute; top: 10px; right: -28px;
  background: var(--accent); color: #fff;
  font-size: 10px; font-weight: 700;
  padding: 3px 30px; transform: rotate(35deg);
  letter-spacing: .5px;
  box-shadow: 0 2px 4px rgba(0,0,0,.15);
}
