:root {
  --bg: #070714;
  --bg-2: #0d0d28;
  --text: #eeeeff;
  --muted: #9898b8;
  --gold: #FFD60A;
  --gold-2: #F59E0B;
  --purple: #8B5CF6;
  --purple-2: #A78BFA;
  --cyan: #06B6D4;
  --cyan-2: #22D3EE;
  --green: #10B981;
  --red: #EF4444;
  --red-text: #FCA5A5;
  --glass: rgba(255, 255, 255, .055);
  --glass-2: rgba(255, 255, 255, .08);
  --glass-border: rgba(255, 255, 255, .12);
  --radius: 20px;
  --radius-sm: 12px;
  --font-display: 'Outfit', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --mini-h: 64px;
  --cartbar-h: 0px;
  color-scheme: dark;
}

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

html { -webkit-text-size-adjust: 100%; font-size: 106.25%; }
@media (min-width: 1024px) { html { font-size: 112.5%; } }
html.sheet-open { overflow: hidden; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.55;
}
main { overflow-x: clip; }

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(60rem 40rem at 0% -10%, rgba(139, 92, 246, .16), transparent 60%),
    radial-gradient(40rem 30rem at 100% 0%, rgba(255, 214, 10, .07), transparent 60%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 65%, var(--bg) 100%);
}

img { display: block; max-width: 100%; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
p, h1, h2, h3, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
[hidden] { display: none !important; }

:focus { outline: none; }
:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}
[tabindex="-1"]:focus-visible { outline: none; }

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute;
  left: 16px; top: -100px;
  z-index: 100;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  background: var(--gold);
  color: var(--bg);
  font-weight: 700;
  text-decoration: none;
}
.skip-link:focus { top: 12px; }

.wrap {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 16px;
}

.gold-text {
  background: linear-gradient(100deg, var(--gold), var(--gold-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- Topo fixo: faixa demo + HUD compacto ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
}

/* Faixa fixa no rodapé: aparece depois do /api/config sem empurrar a página (CLS). */
:root { --demo-h: 0px; }
body:has(#demo-banner:not([hidden])) { --demo-h: 46px; }
@media (min-width: 720px) { body:has(#demo-banner:not([hidden])) { --demo-h: 32px; } }
body { padding-bottom: var(--demo-h); }

.demo-banner {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 35;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: var(--demo-h);
  margin: 0;
  padding: 4px 16px calc(4px + env(safe-area-inset-bottom));
  background: var(--gold);
  color: #1a1400;
  font-size: .8125rem;
  font-weight: 600;
  line-height: 1.35;
  text-align: center;
}

.hud-mini {
  position: absolute;
  left: 0; right: 0; top: 100%;
  background: rgba(7, 7, 20, .9);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--glass-border);
  transform: translateY(-8px);
  opacity: 0;
  visibility: hidden;
  transition: transform .25s var(--ease), opacity .2s ease, visibility 0s linear .25s;
}
.hud-mini.is-visible {
  transform: none;
  opacity: 1;
  visibility: visible;
  transition: transform .25s var(--ease), opacity .2s ease, visibility 0s;
}
.hud-mini-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 8px 16px 10px;
}
.hud-mini-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 6px;
}
.hud-mini-unit {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: .9375rem;
  color: var(--muted);
}
.hud-mini-free {
  flex: none;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .9375rem;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
}
.hud-mini-free.is-over { color: var(--red-text); }

/* ---------- Cabeçalho ---------- */
.site-header { padding: 14px 0 6px; }
body[data-screen="inicio"] .site-header { display: none; }
.site-header-inner { display: flex; align-items: center; gap: 10px; }
.site-logo {
  width: 44px; height: 44px;
  filter: drop-shadow(0 0 10px rgba(255, 214, 10, .28));
}
.site-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1rem;
}
.site-title span { color: var(--muted); font-weight: 600; }

body[data-screen="confirmacao"] .site-header { padding-top: calc(var(--mini-h) + 14px); }

/* ---------- Componentes base ---------- */
.panel {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 20px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 20px;
  border: 1px solid transparent;
  border-radius: 14px;
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  transition: transform .12s ease, filter .15s ease, background-color .15s ease, opacity .15s ease;
  -webkit-tap-highlight-color: transparent;
}
.btn:active:not(:disabled) { transform: translateY(1px) scale(.99); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-block { width: 100%; }
.btn-lg { min-height: 56px; font-size: 1.0625rem; }

.btn-primary {
  background: linear-gradient(100deg, var(--gold), var(--gold-2));
  color: #1a1400;
  box-shadow: 0 6px 24px -8px rgba(255, 214, 10, .55);
}
.btn-primary:hover:not(:disabled) { filter: brightness(1.06); }
.btn-primary:disabled {
  opacity: 1;
  background: var(--glass-2);
  border-color: var(--glass-border);
  color: var(--muted);
  box-shadow: none;
}

.btn-ghost {
  background: var(--glass-2);
  border-color: var(--glass-border);
  color: var(--text);
}
.btn-ghost:hover:not(:disabled) { background: rgba(255, 255, 255, .12); }

.btn.is-busy { position: relative; color: transparent !important; }
.btn.is-busy::after {
  content: attr(data-busy);
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #1a1400;
}

.btn-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 4px;
  border: 0;
  background: none;
  color: var(--purple-2);
  font-weight: 600;
  font-size: .9375rem;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}
.btn-link:hover { color: #c4b5fd; }

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  background: var(--glass);
  color: var(--text);
}

.input {
  display: block;
  width: 100%;
  min-height: 52px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: var(--radius-sm);
  font-size: 1.0625rem;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.input::placeholder { color: #6e6e8e; }
.input:focus-visible {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(255, 214, 10, .28);
}
.input[aria-invalid="true"] { border-color: var(--red); }
select.input {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='none' stroke='%239898b8' stroke-width='2' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}
select.input option { background: var(--bg-2); color: var(--text); }

.field-label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  font-size: .9375rem;
}
.optional { color: var(--muted); font-weight: 400; }

.alert {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: rgba(239, 68, 68, .12);
  border: 1px solid rgba(239, 68, 68, .4);
  color: #fecaca;
  font-size: .9375rem;
}
.alert-block { margin: 16px 0 0; }

.notice {
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: rgba(139, 92, 246, .12);
  border: 1px solid rgba(139, 92, 246, .35);
  font-size: .9375rem;
}

/* ---------- 1. Início ---------- */
.home {
  max-width: 560px;
}
@media (min-width: 1024px) { .home { max-width: 700px; } .success { max-width: 760px; } }
.home {
  padding-top: 28px;
  padding-bottom: 48px;
  text-align: center;
}
.home-logo {
  width: 104px;
  height: 104px;
  margin: 0 auto 12px;
  filter: drop-shadow(0 0 22px rgba(255, 214, 10, .32));
}
.home-title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(2.1rem, 9.5vw, 3.4rem);
  line-height: 1.02;
  letter-spacing: -.02em;
  text-wrap: balance;
}
.home-sub {
  margin: 14px auto 24px;
  max-width: 30rem;
  color: var(--muted);
  font-size: 1.0625rem;
  text-wrap: pretty;
}
.home .panel { text-align: left; }
.input-cnpj {
  font-size: 1.25rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: .02em;
  min-height: 56px;
}
#form-consulta .btn { margin-top: 14px; }
.rule {
  margin-top: 14px;
  color: var(--muted);
  font-size: .875rem;
}

.panel-closed { text-align: center !important; padding: 28px 20px; }
.closed-icon { margin: 0 auto 10px; color: var(--gold); }
.closed-text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  line-height: 1.3;
}
.panel-error { display: grid; gap: 12px; text-align: left; }

.countdown { margin-top: 28px; }
.countdown-title {
  color: var(--muted);
  font-size: .9375rem;
  margin-bottom: 10px;
}
.countdown-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
.cd-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 4px 10px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 14px;
}
.cd-num {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.5rem, 7vw, 2rem);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.cd-label {
  margin-top: 6px;
  color: var(--muted);
  font-size: .875rem;
}
.countdown-date { margin-top: 12px; font-size: .9375rem; color: var(--muted); }
.countdown-date strong { color: var(--text); }

.preview {
  display: grid;
  gap: 10px;
  margin-top: 32px;
  text-align: left;
}
.preview li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: 14px;
  background: rgba(255, 255, 255, .03);
  border: 1px solid rgba(255, 255, 255, .07);
  font-size: .875rem;
  color: var(--muted);
}
.preview img {
  flex: none;
  width: 56px; height: 56px;
  border-radius: 10px;
  object-fit: cover;
}
.preview img.on-white { background: #fff; object-fit: contain; padding: 3px; }
.preview strong {
  display: block;
  color: var(--text);
  font-size: .9375rem;
}

.preview li > span { flex: 1; min-width: 0; }
.preview-value { flex: none; display: grid; justify-items: end; font-family: var(--font-display); font-size: 1.125rem; font-weight: 900; color: var(--text); line-height: 1.05; }
.preview-value small { font-family: var(--font-main, Inter, sans-serif); font-size: .9375rem; font-weight: 600; color: var(--muted); }

.limit-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px 6px 10px;
  border-radius: 999px;
  background: rgba(7, 7, 20, .74);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 214, 10, .45);
  color: #FFD60A;
  font-size: .875rem;
  font-weight: 700;
  line-height: 1.2;
  max-width: calc(100% - 24px);
}
.limit-badge::before {
  content: "";
  flex: none;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #FFD60A;
  box-shadow: 0 0 8px rgba(255, 214, 10, .8);
}
.limit-badge.is-inline {
  position: static;
  display: flex;
  margin-bottom: 4px;
  padding: 0;
  background: none;
  border: 0;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  font-style: normal;
  white-space: normal;
}

.reward[data-reward="bags"] .value-seal { top: auto; bottom: 12px; }

/* ---------- HUD (elemento-assinatura) ---------- */
.hud {
  position: relative;
  overflow: hidden;
  margin-top: 8px;
  padding: 18px 18px 16px;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, .14);
  background:
    radial-gradient(28rem 14rem at 100% 0%, rgba(255, 214, 10, .14), transparent 70%),
    linear-gradient(160deg, rgba(139, 92, 246, .16), rgba(255, 255, 255, .035) 55%);
  box-shadow: 0 20px 60px -30px rgba(139, 92, 246, .55), inset 0 1px 0 rgba(255, 255, 255, .08);
}
.hud-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}
.hud-id { min-width: 0; }
.hud-unit {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.125rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
}
[data-hud-cnpj] { white-space: nowrap; }
.hud-cnpj {
  color: var(--muted);
  font-size: .875rem;
  font-variant-numeric: tabular-nums;
}
.hud-head .btn-link { flex: none; margin-top: -10px; margin-right: -4px; font-size: .875rem; }

.hud-score {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 12px;
  margin-top: 10px;
}
.hud-number {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(3.4rem, 17vw, 5.75rem);
  line-height: .95;
  letter-spacing: -.03em;
  font-variant-numeric: tabular-nums;
  background: linear-gradient(180deg, #fff3a8 0%, var(--gold) 45%, var(--gold-2) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 22px rgba(255, 214, 10, .28));
}
.hud-score-label {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.0625rem;
  color: var(--text);
}
.hud-total { margin-top: 4px; color: var(--muted); font-size: .875rem; }

.energy { margin-top: 16px; }
.energy-track {
  position: relative;
  display: flex;
  height: 34px;
  overflow: hidden;
  border-radius: 10px;
  background: rgba(0, 0, 0, .35);
  border: 1px solid rgba(255, 255, 255, .14);
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, .5);
}
.energy-track::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: repeating-linear-gradient(90deg,
    transparent 0, transparent calc(5% - 2px),
    rgba(7, 7, 20, .9) calc(5% - 2px), rgba(7, 7, 20, .9) 5%);
}
.seg {
  flex: 0 0 0%;
  min-width: 0;
  height: 100%;
  transition: flex-basis .6s var(--ease), filter .3s ease;
}
.seg-bags {
  background: linear-gradient(180deg, var(--purple-2), #7C3AED);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35);
}
.seg-higiepro {
  background: linear-gradient(180deg, var(--cyan-2), #0891B2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35);
}
.seg-shoole {
  background: linear-gradient(180deg, var(--gold), var(--gold-2));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45);
}
.seg.is-flash { animation: seg-flash .7s ease-out; }
@keyframes seg-flash {
  0% { filter: brightness(1.8) saturate(1.2); }
  100% { filter: none; }
}
.energy-free {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: repeating-linear-gradient(135deg, rgba(255, 255, 255, .035) 0 6px, transparent 6px 12px);
}
.energy-free-label {
  position: relative;
  z-index: 2;
  padding: 0 8px;
  white-space: nowrap;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .9375rem;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .8);
}
.energy-free-out {
  display: none;
  margin-top: 6px;
  text-align: right;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .9375rem;
}
.energy-full.is-tight .energy-free-label { display: none; }
.energy-full.is-tight .energy-free-out { display: block; }
.energy.is-over .energy-free-out,
.energy.is-over .energy-free-label { color: var(--red-text); }
.energy.is-over .energy-track { border-color: rgba(239, 68, 68, .6); }

.energy-mini { margin-top: 0; }
.energy-mini .energy-track { height: 10px; border-radius: 5px; }
.energy-mini .energy-track::after {
  background: repeating-linear-gradient(90deg,
    transparent 0, transparent calc(5% - 1px),
    rgba(7, 7, 20, .9) calc(5% - 1px), rgba(7, 7, 20, .9) 5%);
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin-top: 12px;
  font-size: .875rem;
  color: var(--muted);
}
.legend li { display: inline-flex; align-items: center; gap: 6px; }
.legend strong { color: var(--text); font-variant-numeric: tabular-nums; }
.legend li.is-zero strong { color: var(--muted); font-weight: 500; }
.dot { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.dot-bags { background: var(--purple); }
.dot-higiepro { background: var(--cyan); }
.dot-shoole { background: var(--gold); }

/* ---------- Resgates anteriores ---------- */
.history {
  margin-top: 14px;
  padding: 16px 18px;
  border-radius: var(--radius);
  background: rgba(6, 182, 212, .07);
  border: 1px solid rgba(6, 182, 212, .3);
}
.history-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.0625rem;
}
.history-list { display: grid; gap: 12px; margin-top: 10px; }
.history-order {
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, .08);
}
.history-order:first-child { padding-top: 0; border-top: 0; }
.history-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 10px;
  font-size: .875rem;
  color: var(--muted);
}
.history-meta strong { color: var(--text); font-variant-numeric: tabular-nums; }
.history-items { display: grid; gap: 4px; margin-top: 6px; font-size: .9375rem; }
.history-items li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
}
.status {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: .9375rem;
  font-weight: 600;
  background: rgba(255, 255, 255, .08);
  color: var(--text);
}
.status-wait { background: rgba(245, 158, 11, .16); color: #fcd34d; }
.status-ok { background: rgba(16, 185, 129, .16); color: #6ee7b7; }
.status-off { background: rgba(255, 255, 255, .06); color: var(--muted); }

.empty-balance { margin-top: 14px; display: grid; gap: 14px; justify-items: start; }
.empty-balance-text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  line-height: 1.3;
}

/* ---------- 2. Recompensas ---------- */
.section-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.5rem, 6vw, 2.125rem);
  line-height: 1.12;
  letter-spacing: -.01em;
  text-wrap: balance;
}
.section-sub { margin-top: 8px; color: var(--muted); }

.rewards-layout { display: grid; gap: 24px; margin-top: 28px; padding-bottom: 40px; }
.rewards-main { min-width: 0; }
.rewards { display: grid; gap: 16px; margin-top: 18px; }

.reward {
  --accent: var(--purple);
  --accent-2: var(--purple-2);
  --accent-soft: rgba(139, 92, 246, .14);
  scroll-margin-top: calc(var(--mini-h) + 16px);
  display: grid;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--glass);
  border: 1px solid var(--glass-border);
}
.reward[data-reward="higiepro"] { --accent: var(--cyan); --accent-2: var(--cyan-2); --accent-soft: rgba(6, 182, 212, .13); }
.reward[data-reward="shoole"] { --accent: var(--gold-2); --accent-2: var(--gold); --accent-soft: rgba(255, 214, 10, .11); }
.reward.in-cart { border-color: color-mix(in srgb, var(--accent) 55%, transparent); }
.reward.reward-featured {
  border: 1.5px solid rgba(167, 139, 250, .75);
  background:
    radial-gradient(28rem 14rem at 0% 100%, rgba(139, 92, 246, .18), transparent 70%),
    var(--glass);
  box-shadow: 0 0 0 4px rgba(139, 92, 246, .14), 0 18px 48px -16px rgba(139, 92, 246, .75);
}

.reward-media {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--bg-2);
  overflow: hidden;
}
.value-seal {
  --seal-bg: linear-gradient(135deg, #7C3AED, var(--purple));
  --seal-text: #fff;
  position: absolute;
  top: 12px;
  left: 12px;
  display: flex;
  align-items: baseline;
  gap: 6px;
  padding: 7px 14px 8px;
  border-radius: 999px;
  background: var(--seal-bg);
  color: var(--seal-text);
  border: 1.5px solid rgba(255, 255, 255, .45);
  box-shadow: 0 8px 22px -6px rgba(0, 0, 0, .55);
  font-size: .875rem;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
}
.value-seal strong { font-family: var(--font-display); font-size: 1.25rem; font-weight: 900; letter-spacing: .01em; }
.reward[data-reward="higiepro"] .value-seal {
  --seal-bg: linear-gradient(135deg, var(--cyan-2), var(--cyan));
  --seal-text: #03262d;
  border-color: rgba(255, 255, 255, .7);
  top: auto;
  bottom: 12px;
}
.reward.is-soldout .value-seal { opacity: .6; }
.reward-media img { width: 100%; height: 100%; object-fit: cover; }
.reward-media.media-white { background: #fff; }
.reward-media.media-white img { object-fit: contain; padding: 8px; }
.reward.is-soldout .reward-media img { filter: grayscale(1) brightness(.6); }

.reward-body { padding: 16px 16px 18px; display: grid; gap: 10px; align-content: start; }
.reward-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.reward-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.375rem;
  line-height: 1.15;
}
.badge-soldout {
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(239, 68, 68, .16);
  border: 1px solid rgba(239, 68, 68, .45);
  color: var(--red-text);
  font-size: .9375rem;
  font-weight: 700;
}
.reward-desc { color: var(--muted); }
.reward-rule {
  justify-self: start;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent);
  font-size: .9375rem;
}
.reward-rule strong { color: var(--accent-2); }
.reward-fine { font-size: .9375rem; color: var(--muted); }
.reward-condition { font-size: .875rem; color: var(--text); background: rgba(139, 92, 246, .14); border-left: 3px solid #8B5CF6; border-radius: 8px; padding: 8px 12px; }
.limit { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; padding: 10px 12px; border-radius: 12px; background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .14); font-size: 1rem; color: var(--text); }
.limit [data-limit-max] { font-weight: 800; }
.limit-left { color: var(--text); font-weight: 600; }
.limit-left:empty { display: none; }
.limit.is-reached .limit-left { color: #fcd34d; }
.reward.is-locked .reward-media img { filter: grayscale(.85) brightness(.6); }

.stock {
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, .22);
  border: 1px solid rgba(255, 255, 255, .08);
  font-size: .875rem;
}
.stock-meter {
  height: 6px;
  margin: 8px 0 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, .08);
  overflow: hidden;
}
.stock-meter span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--purple), var(--purple-2));
}
.stock-left { color: var(--muted); font-size: .9375rem; font-variant-numeric: tabular-nums; }

.picker { display: grid; gap: 10px; margin-top: 4px; }
.picker-label { font-weight: 600; font-size: .9375rem; margin: 0; }
.stepper, .counter {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) 56px;
  gap: 8px;
  align-items: stretch;
}
.step-btn {
  min-height: 52px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--glass-border);
  background: var(--glass-2);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.0625rem;
  transition: background-color .15s ease;
}
.step-btn:hover:not(:disabled) { background: rgba(255, 255, 255, .13); }
.step-btn:disabled { opacity: .35; cursor: not-allowed; }
.input-amount {
  text-align: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.375rem;
  font-variant-numeric: tabular-nums;
  -moz-appearance: textfield;
}
.input-amount::-webkit-outer-spin-button,
.input-amount::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.counter-value {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, .25);
  border: 1px solid rgba(255, 255, 255, .1);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.5rem;
  font-variant-numeric: tabular-nums;
}

.range {
  --fill: 0%;
  width: 100%;
  height: 44px;
  margin: 0;
  background: transparent;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
}
.range:disabled { opacity: .4; cursor: not-allowed; }
.range::-webkit-slider-runnable-track {
  height: 8px;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--accent) 0 var(--fill), rgba(255, 255, 255, .12) var(--fill) 100%);
}
.range::-moz-range-track { height: 8px; border-radius: 4px; background: rgba(255, 255, 255, .12); }
.range::-moz-range-progress { height: 8px; border-radius: 4px; background: var(--accent); }
.range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 28px; height: 28px;
  margin-top: -10px;
  border-radius: 50%;
  background: #fff;
  border: 4px solid var(--accent);
  box-shadow: 0 2px 10px rgba(0, 0, 0, .5);
}
.range::-moz-range-thumb {
  width: 20px; height: 20px;
  border-radius: 50%;
  background: #fff;
  border: 4px solid var(--accent);
}
.range:focus-visible { outline: none; }
.range:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 4px rgba(255, 214, 10, .6); }
.range:focus-visible::-moz-range-thumb { box-shadow: 0 0 0 4px rgba(255, 214, 10, .6); }

.presets { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-btn {
  flex: 1 1 auto;
  min-height: 44px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--glass-border);
  background: transparent;
  font-weight: 600;
  font-size: .9375rem;
}
.chip-btn:hover:not(:disabled) { background: var(--glass-2); }
.chip-btn:disabled { opacity: .35; cursor: not-allowed; }

.result {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.result .muted { color: var(--muted); font-weight: 600; font-size: 1rem; }
.reward-note { font-size: .9375rem; color: var(--muted); }
.reward-note.is-warn { color: #fcd34d; }

/* ---------- Carrinho ---------- */
.cart-aside { display: none; }
.cart-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.25rem;
}
.cart-empty { color: var(--muted); font-size: .9375rem; margin-top: 8px; }
.cart-list { display: grid; gap: 10px; margin-top: 12px; }
.cart-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 4px 10px;
  align-items: center;
  padding: 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(255, 255, 255, .08);
}
.cart-item .dot { align-self: start; margin-top: 7px; }
.cart-item-name { font-weight: 700; }
.cart-item-detail { color: var(--muted); font-size: .875rem; }
.cart-item-pts {
  font-family: var(--font-display);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  text-align: right;
  white-space: nowrap;
}
.cart-item-actions {
  grid-column: 2 / -1;
  display: flex;
  gap: 4px 16px;
  margin-top: -4px;
}
.cart-item-actions .btn-link { font-size: .875rem; }
.cart-item-actions .btn-link.danger { color: var(--red-text); }

.totals { display: grid; gap: 6px; margin: 16px 0; font-size: .9375rem; }
.totals div { display: flex; justify-content: space-between; gap: 12px; }
.totals dt { color: var(--muted); }
.totals dd { margin: 0; font-weight: 700; font-variant-numeric: tabular-nums; }
.totals .total-free { padding-top: 8px; border-top: 1px solid rgba(255, 255, 255, .1); }
.totals .total-free dd { color: var(--gold); font-family: var(--font-display); font-size: 1.125rem; }
.totals .total-free.is-over dd { color: var(--red-text); }
.cart-warn { margin: -4px 0 12px; color: var(--red-text); font-size: .875rem; }

.cartbar-wrap {
  position: fixed;
  left: 0; right: 0; bottom: var(--demo-h);
  z-index: 30;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  background: rgba(7, 7, 20, .92);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-top: 1px solid var(--glass-border);
}
.cartbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  min-height: 52px;
  padding: 10px 16px;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(100deg, var(--gold), var(--gold-2));
  color: #1a1400;
  font-size: .9375rem;
  text-align: left;
}
.cartbar.is-bump { animation: bump .35s var(--ease); }
@keyframes bump { 40% { transform: scale(1.03); } }
.cartbar-cta {
  flex: none;
  padding: 6px 12px;
  border-radius: 10px;
  background: rgba(26, 20, 0, .14);
  font-weight: 700;
}

.sheet {
  position: fixed;
  inset: auto 0 0 0;
  width: 100%;
  max-width: 100%;
  height: auto;
  max-height: min(88dvh, 760px);
  margin: 0;
  padding: 0;
  overflow: auto;
  overscroll-behavior: contain;
  border: 1px solid var(--glass-border);
  border-bottom: 0;
  border-radius: 22px 22px 0 0;
  background: var(--bg-2);
  color: var(--text);
  box-shadow: 0 -20px 60px rgba(0, 0, 0, .6);
}
.sheet[open] { animation: sheet-up .32s var(--ease); }
.sheet::backdrop { background: rgba(3, 3, 10, .72); }
@keyframes sheet-up { from { transform: translateY(40px); opacity: 0; } }
.sheet-head {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 16px 10px;
  background: var(--bg-2);
}
.sheet-grip {
  position: absolute;
  top: 7px; left: 50%;
  width: 40px; height: 4px;
  margin-left: -20px;
  border-radius: 2px;
  background: rgba(255, 255, 255, .2);
}
.sheet-body { padding: 0 16px calc(20px + env(safe-area-inset-bottom)); }
.sheet-body .cart-list { margin-top: 4px; }

/* ---------- 4. Confirmação ---------- */
.btn-back { margin: 4px 0 4px -4px; text-decoration: none; }
.confirm-grid { display: grid; gap: 16px; margin-top: 20px; padding-bottom: 48px; }
.summary-unit { display: grid; margin: 6px 0 4px; font-size: .9375rem; }
.summary-unit > span { color: var(--muted); font-size: .875rem; }
.summary .totals { margin-bottom: 0; }

fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
fieldset + fieldset { margin-top: 24px; }
legend {
  padding: 0;
  margin-bottom: 14px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.1875rem;
}
.field { margin-bottom: 14px; min-width: 0; }
.field-error { margin-top: 6px; color: var(--red-text); font-size: .875rem; }
.field-error:empty { display: none; }
.field-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); column-gap: 12px; }
.field-grid .field { grid-column: span 6; }
.field-grid .f-cep { grid-column: span 6; }
.field-grid .f-numero { grid-column: span 2; }
.field-grid .f-complemento { grid-column: span 4; }
.field-grid .f-cidade { grid-column: span 4; }
.field-grid .f-uf { grid-column: span 2; }
.confirm-form .btn-lg { margin-top: 20px; }

/* ---------- 5. Sucesso ---------- */
.success { max-width: 640px; padding-top: 24px; padding-bottom: 56px; }
.success-badge {
  display: flex;
  justify-content: center;
  color: var(--green);
  margin-bottom: 12px;
}
.check-path { stroke-dasharray: 40; stroke-dashoffset: 0; }
.success.is-new .check-path { animation: draw .6s .1s var(--ease) both; }
@keyframes draw { from { stroke-dashoffset: 40; } }
.success-title { text-align: center; }
.order-box {
  margin: 20px 0;
  padding: 20px;
  text-align: center;
  border-radius: 24px;
  border: 1px solid rgba(255, 214, 10, .35);
  background:
    radial-gradient(24rem 10rem at 50% 0%, rgba(255, 214, 10, .14), transparent 70%),
    var(--glass);
}
.order-label { color: var(--muted); font-size: .9375rem; }
.order-number {
  margin: 4px 0 2px;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(2.25rem, 12vw, 3.5rem);
  line-height: 1.05;
  letter-spacing: .03em;
  overflow-wrap: anywhere;
  background: linear-gradient(180deg, #fff3a8, var(--gold) 50%, var(--gold-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.success.is-new .order-number { animation: pop .5s .15s var(--ease) both; }
@keyframes pop { from { transform: scale(.85); opacity: 0; } }
.order-meta { margin-top: 4px; color: var(--muted); font-size: .875rem; }

.bags-cta {
  display: grid;
  gap: 10px;
  margin-bottom: 24px;
  padding: 16px;
  border-radius: var(--radius);
  background: rgba(139, 92, 246, .12);
  border: 1px solid rgba(139, 92, 246, .4);
}
.bags-cta p { font-size: .9375rem; }

.success-items { display: grid; gap: 10px; margin: 12px 0 16px; }
.success-item {
  padding: 14px 14px 14px 16px;
  border-radius: 14px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-left: 4px solid var(--purple);
}
.success-item[data-id="higiepro"] { border-left-color: var(--cyan); }
.success-item[data-id="shoole"] { border-left-color: var(--gold); }
.success-item-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 12px; }
.success-item-name { font-weight: 700; }
.success-item-code {
  font-family: ui-monospace, 'SFMono-Regular', Consolas, monospace;
  font-size: .875rem;
  color: var(--muted);
}
.success-item-detail { margin-top: 2px; font-size: .9375rem; }
.success-item-next { margin-top: 6px; color: var(--muted); font-size: .9375rem; }

.voucher {
  display: grid;
  gap: 6px;
  margin-top: 12px;
  padding: 16px 14px 14px;
  text-align: center;
  border-radius: var(--radius-sm);
  border: 1.5px dashed rgba(167, 139, 250, .6);
  background:
    radial-gradient(18rem 7rem at 50% 0%, rgba(139, 92, 246, .22), transparent 70%),
    rgba(139, 92, 246, .08);
}
.voucher-label { color: var(--purple-2); font-size: .9375rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.voucher-code {
  font-family: ui-monospace, 'SFMono-Regular', Consolas, monospace;
  font-weight: 700;
  font-size: clamp(1.125rem, 5.4vw, 1.75rem);
  line-height: 1.2;
  letter-spacing: .1em;
  color: #fff;
  user-select: all;
}
.success.is-new .voucher-code { animation: pop .5s .25s var(--ease) both; }
.voucher-help { font-size: .9375rem; }
.voucher-copy { margin-top: 6px; }
.order-totals { margin-bottom: 24px; color: var(--muted); font-size: .9375rem; }
.order-totals strong { color: var(--text); }

/* ---------- Telas maiores ---------- */
@media (min-width: 640px) {
  .preview { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .preview li { flex-direction: column; align-items: flex-start; }
  .preview img { width: 100%; height: auto; aspect-ratio: 4 / 3; }

  .hud { padding: 24px 26px 20px; }
  .reward { grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); }
  .reward-media { aspect-ratio: auto; min-height: 100%; }
  .reward-body { padding: 20px 22px 22px; }
  .field-grid .f-cep { grid-column: span 2; }
  .field-grid .f-rua { grid-column: span 4; }
  .field-grid .f-numero { grid-column: span 2; }
  .field-grid .f-complemento { grid-column: span 4; }
  .field-grid .f-bairro { grid-column: span 2; }
  .field-grid .f-cidade { grid-column: span 3; }
  .field-grid .f-uf { grid-column: span 1; }
}

@media (max-width: 380px) {
  .cartbar { padding: 10px 12px; gap: 8px; }
  .cartbar-text { font-size: .875rem; }
  .cartbar-cta { padding: 6px 10px; font-size: .875rem; }
}

@media (max-width: 1023.98px) {
  body.has-cartbar { padding-bottom: calc(80px + var(--demo-h) + env(safe-area-inset-bottom)); }
}

@media (min-width: 1024px) {
  .cartbar-wrap { display: none !important; }
  .rewards-layout { grid-template-columns: minmax(0, 1fr) 340px; align-items: start; }
  .cart-aside {
    display: block;
    position: sticky;
    top: calc(var(--mini-h) + 24px);
    margin-top: 56px;
    padding: 20px;
    border-radius: var(--radius);
    background: var(--glass);
    border: 1px solid var(--glass-border);
  }
  .confirm-grid {
    grid-template-columns: minmax(0, 1fr) 360px;
    grid-template-areas: "form summary";
    align-items: start;
  }
  .confirm-form { grid-area: form; padding: 28px; }
  .summary { grid-area: summary; position: sticky; top: calc(var(--mini-h) + 24px); }
  .hud { padding: 28px 32px 24px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- Suporte no WhatsApp ---------- */
.wa-help {
  position: fixed;
  right: 16px;
  bottom: calc(16px + var(--demo-h) + env(safe-area-inset-bottom));
  z-index: 40;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 52px;
  padding: 0 16px 0 12px;
  border-radius: 999px;
  background: #0B7A3B;
  color: #fff;
  font-weight: 700;
  font-size: .9375rem;
  text-decoration: none;
  box-shadow: 0 10px 26px -8px rgba(0, 0, 0, .65);
  transition: transform .15s ease;
}
.wa-help:hover { transform: translateY(-2px); }
.wa-help:focus-visible { outline: 3px solid #FFD60A; outline-offset: 3px; }
body:has(#cartbar-wrap:not([hidden])) .wa-help { bottom: calc(92px + var(--demo-h) + env(safe-area-inset-bottom)); }
@media (min-width: 1024px) { body:has(#cartbar-wrap:not([hidden])) .wa-help { bottom: calc(24px + var(--demo-h)); } }
@media (prefers-reduced-motion: reduce) { .wa-help { transition: none; } }

/* ---------- Aviso: pontos por CNPJ ---------- */
.cnpj-notice {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin: 0 0 20px;
  padding: 18px 18px 18px 16px;
  border-radius: 18px;
  background: rgba(255, 214, 10, .1);
  border: 2px solid rgba(255, 214, 10, .65);
  color: var(--text);
  text-align: left;
  font-size: 1.0625rem;
  line-height: 1.45;
}
.cnpj-notice svg { flex: none; color: #FFD60A; margin-top: 2px; }
.cnpj-notice p { margin: 0; }
.cnpj-notice strong {
  display: block;
  margin-bottom: 4px;
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 900;
  line-height: 1.15;
  color: #FFD60A;
}
.cnpj-notice.is-rewards { margin: 20px 0 8px; }

.preview-limit { display: block; margin-top: 3px; color: var(--text); font-weight: 700; font-size: .875rem; }
.preview-link { display: inline-flex; align-items: center; min-height: 44px; color: var(--purple-2); font-weight: 600; font-size: .875rem; text-decoration: underline; text-underline-offset: 3px; }
.preview-link:hover { color: #c4b5fd; }
