/* ---------- Design system ---------- */
:root {
  --ink: #070a14;
  --ink-2: #0d1222;
  --surface: #121a2e;
  --surface-2: #18223c;
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.16);
  --text: #eef2ff;
  --muted: #98a4c4;
  --muted-2: #6f7d9f;

  --accent: #ffc247;
  --accent-ink: #22190a;
  --d: #ff5f57;
  --i: #ffc247;
  --s: #3ddc97;
  --c: #5aa9ff;

  --radius: 16px;
  --radius-sm: 10px;
  --maxw: 1080px;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(760px 420px at 12% -8%, rgba(255, 194, 71, 0.13), transparent 62%),
    radial-gradient(680px 420px at 92% 4%, rgba(90, 169, 255, 0.12), transparent 60%);
}

.wrap { position: relative; z-index: 1; width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.wrap-narrow { max-width: 760px; }

h1, h2, h3, h4 { line-height: 1.18; margin: 0 0 14px; letter-spacing: -0.02em; font-weight: 700; }
h1 { font-size: clamp(2rem, 5.2vw, 3.3rem); }
h2 { font-size: clamp(1.5rem, 3.6vw, 2.25rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 16px; color: var(--muted); }
strong { color: var(--text); font-weight: 650; }
a { color: var(--accent); }

.lead { font-size: 1.12rem; color: #c3cce6; }
.small { font-size: 0.86rem; }
.muted { color: var(--muted); }
.center { text-align: center; }
.hl { color: var(--accent); }
.nowrap { white-space: nowrap; }

section { position: relative; z-index: 1; padding: 72px 0; }
section.tight { padding: 48px 0; }

/* ---------- Topbar ---------- */
.topbar {
  position: relative; z-index: 3;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 18px 0;
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: -0.02em; color: var(--text); text-decoration: none; }
.brand-mark {
  width: 30px; height: 30px; border-radius: 9px; flex: none;
  background: linear-gradient(140deg, var(--accent), #ff8a3d);
  display: grid; place-items: center; color: var(--accent-ink); font-size: 15px; font-weight: 800;
}
.topbar .small { color: var(--muted-2); }

/* ---------- Badges / pills ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 14px; border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.04);
  font-size: 0.8rem; font-weight: 600; letter-spacing: 0.02em;
  color: #cdd6ef; margin-bottom: 20px;
}
.badge .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--s); box-shadow: 0 0 0 4px rgba(61, 220, 151, 0.18); }
.pill { display: inline-block; padding: 4px 11px; border-radius: 999px; font-size: 0.74rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.pill-accent { background: rgba(255, 194, 71, 0.15); color: var(--accent); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; text-align: center;
  padding: 15px 28px; border-radius: 12px; border: 1px solid transparent;
  font: inherit; font-weight: 700; font-size: 1rem;
  cursor: pointer; text-decoration: none; transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn-primary {
  background: linear-gradient(135deg, #ffd06a, #ffab2e);
  color: var(--accent-ink);
  box-shadow: 0 12px 30px rgba(255, 176, 52, 0.28);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 18px 38px rgba(255, 176, 52, 0.36); }
.btn-ghost { background: rgba(255, 255, 255, 0.05); border-color: var(--line-strong); color: var(--text); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.1); }
.btn-lg { padding: 18px 36px; font-size: 1.08rem; width: 100%; max-width: 460px; }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

/* ---------- Cards ---------- */
.card {
  background: linear-gradient(180deg, var(--surface), var(--ink-2));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
}
.card-flat { background: rgba(255, 255, 255, 0.035); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.step-num {
  width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center;
  background: rgba(255, 194, 71, 0.13); color: var(--accent); font-weight: 800; margin-bottom: 14px;
}

/* ---------- Hero ---------- */
.hero { padding: 56px 0 24px; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 48px; align-items: center; }
.hero h1 span { color: var(--accent); }

.proof { display: flex; flex-wrap: wrap; gap: 26px; margin-top: 30px; padding-top: 24px; border-top: 1px solid var(--line); }
.proof-item strong { display: block; font-size: 1.4rem; letter-spacing: -0.02em; }
.proof-item span { font-size: 0.82rem; color: var(--muted-2); }

/* ---------- Form ---------- */
.form-card { box-shadow: var(--shadow); }
.field { margin-bottom: 15px; }
.field label { display: block; font-size: 0.83rem; font-weight: 600; color: #c3cce6; margin-bottom: 7px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 13px 15px; font: inherit; font-size: 0.97rem;
  color: var(--text); background: rgba(255, 255, 255, 0.045);
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  transition: border-color .15s ease, background .15s ease;
}
.field input::placeholder { color: var(--muted-2); }
.field input:focus, .field select:focus {
  outline: none; border-color: var(--accent); background: rgba(255, 194, 71, 0.06);
}
.field select option { background: var(--ink-2); color: var(--text); }
.field.invalid input, .field.invalid select { border-color: var(--d); }
.field .err { display: none; color: #ff8a84; font-size: 0.78rem; margin-top: 6px; }
.field.invalid .err { display: block; }

.check { display: flex; gap: 10px; align-items: flex-start; margin: 16px 0 20px; font-size: 0.82rem; color: var(--muted); }
.check input { margin-top: 3px; width: 16px; height: 16px; accent-color: var(--accent); flex: none; }

/* ---------- Quiz ---------- */
.quiz-shell { min-height: 100vh; display: flex; flex-direction: column; }
.progress { height: 4px; background: rgba(255, 255, 255, 0.07); border-radius: 999px; overflow: hidden; }
.progress > i { display: block; height: 100%; width: 0%; background: linear-gradient(90deg, var(--accent), #ff8a3d); transition: width .35s cubic-bezier(.4,0,.2,1); }
.quiz-meta { display: flex; justify-content: space-between; font-size: 0.8rem; color: var(--muted-2); margin-bottom: 10px; letter-spacing: 0.02em; }

.q-stage { flex: 1; display: flex; align-items: center; padding: 40px 0 64px; }
.q-card { width: 100%; }
.q-title { font-size: clamp(1.35rem, 3.2vw, 1.9rem); margin-bottom: 26px; }
.q-tag { font-size: 0.76rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); font-weight: 700; margin-bottom: 10px; display: block; }

.opts { display: grid; gap: 11px; }
.opt {
  display: flex; align-items: flex-start; gap: 14px; text-align: left;
  padding: 17px 19px; border-radius: 13px; cursor: pointer;
  background: rgba(255, 255, 255, 0.035); border: 1px solid var(--line-strong);
  color: var(--text); font: inherit; font-size: 1rem; line-height: 1.45;
  transition: border-color .12s ease, background .12s ease, transform .12s ease;
}
.opt:hover { border-color: rgba(255, 194, 71, 0.55); background: rgba(255, 194, 71, 0.06); transform: translateX(3px); }
.opt.sel { border-color: var(--accent); background: rgba(255, 194, 71, 0.12); }
.opt-key {
  flex: none; width: 27px; height: 27px; border-radius: 8px; display: grid; place-items: center;
  background: rgba(255, 255, 255, 0.08); font-size: 0.78rem; font-weight: 700; color: var(--muted);
}
.opt.sel .opt-key, .opt:hover .opt-key { background: var(--accent); color: var(--accent-ink); }
.quiz-foot { display: flex; justify-content: space-between; align-items: center; padding: 18px 0 30px; border-top: 1px solid var(--line); }
.linkbtn { background: none; border: none; color: var(--muted); font: inherit; font-size: 0.9rem; cursor: pointer; padding: 8px 0; }
.linkbtn:hover { color: var(--text); }
.linkbtn:disabled { opacity: .3; cursor: not-allowed; }

/* ---------- Loader ---------- */
.loader-screen { min-height: 100vh; display: grid; place-items: center; text-align: center; }
.spinner { width: 46px; height: 46px; border-radius: 50%; border: 3px solid rgba(255,255,255,.12); border-top-color: var(--accent); animation: spin 0.9s linear infinite; margin: 0 auto 22px; }
@keyframes spin { to { transform: rotate(360deg); } }
.loader-steps { list-style: none; padding: 0; margin: 26px auto 0; max-width: 340px; text-align: left; }
.loader-steps li { color: var(--muted-2); font-size: 0.92rem; padding: 7px 0; opacity: .35; transition: opacity .3s ease, color .3s ease; }
.loader-steps li.on { opacity: 1; color: var(--text); }
.loader-steps li.on::before { content: "✓ "; color: var(--s); font-weight: 700; }

/* ---------- Resultado ---------- */
.result-hero { display: grid; grid-template-columns: 1fr 340px; gap: 40px; align-items: center; }
.type-code {
  font-size: clamp(3.4rem, 11vw, 6rem); font-weight: 800; letter-spacing: -0.05em; line-height: 1;
  background: linear-gradient(135deg, #fff, var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.bars { display: grid; gap: 13px; }
.bar-row { display: grid; grid-template-columns: 116px 1fr 46px; align-items: center; gap: 12px; font-size: 0.86rem; }
.bar-track { height: 9px; border-radius: 999px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.bar-fill { display: block; height: 100%; border-radius: 999px; width: 0; transition: width .9s cubic-bezier(.4,0,.2,1); }
.bar-val { text-align: right; font-variant-numeric: tabular-nums; color: var(--muted); }
.bar-lab { color: #c3cce6; font-weight: 600; }

.comp-list { display: grid; gap: 14px; }
.comp { display: grid; gap: 7px; }
.comp-head { display: flex; justify-content: space-between; align-items: baseline; font-size: 0.9rem; }
.comp-head b { font-weight: 600; }
.comp-head span { font-variant-numeric: tabular-nums; color: var(--accent); font-weight: 700; }

.tick { display: flex; gap: 11px; align-items: flex-start; margin-bottom: 11px; font-size: 0.97rem; color: #c3cce6; }
.tick i { flex: none; width: 20px; height: 20px; border-radius: 6px; display: grid; place-items: center; font-style: normal; font-size: 0.7rem; font-weight: 800; margin-top: 2px; }
.tick-ok i { background: rgba(61, 220, 151, 0.16); color: var(--s); }
.tick-warn i { background: rgba(255, 95, 87, 0.16); color: var(--d); }

.alert {
  border-radius: var(--radius); padding: 24px 26px;
  border: 1px solid rgba(255, 95, 87, 0.35);
  background: linear-gradient(180deg, rgba(255, 95, 87, 0.11), rgba(255, 95, 87, 0.03));
}
.alert h3 { color: #ffb3ae; }

/* ---------- Oferta ---------- */
.offer {
  border: 1px solid rgba(255, 194, 71, 0.4);
  background: linear-gradient(180deg, rgba(255, 194, 71, 0.09), rgba(255, 194, 71, 0.02));
  border-radius: 20px; padding: 34px; text-align: center; box-shadow: var(--shadow);
}
.price { display: flex; align-items: baseline; justify-content: center; gap: 12px; margin: 10px 0 6px; }
.price .old { color: var(--muted-2); text-decoration: line-through; font-size: 1.05rem; }
.price .now { font-size: 3.3rem; font-weight: 800; letter-spacing: -0.04em; }
.price .cur { font-size: 1.3rem; font-weight: 700; align-self: flex-start; margin-top: 8px; }

.stack { list-style: none; padding: 0; margin: 0 0 22px; text-align: left; }
.stack li { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px dashed var(--line); font-size: 0.94rem; }
.stack li:last-child { border-bottom: none; }
.stack li span { color: var(--muted-2); white-space: nowrap; }
.stack li b { font-weight: 600; color: #dde4f7; }

.vp-card { border: 1px solid rgba(90, 169, 255, 0.35); background: linear-gradient(180deg, rgba(90, 169, 255, 0.1), transparent); }

.agenda { list-style: none; padding: 0; margin: 0; counter-reset: ag; }
.agenda li { position: relative; padding: 0 0 22px 46px; counter-increment: ag; border-left: 1px solid var(--line); margin-left: 14px; }
.agenda li:last-child { border-left-color: transparent; padding-bottom: 0; }
.agenda li::before {
  content: counter(ag); position: absolute; left: -14px; top: 0;
  width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  background: var(--surface-2); border: 1px solid var(--line-strong);
  font-size: 0.78rem; font-weight: 700; color: var(--accent);
}
.agenda li b { display: block; margin-bottom: 4px; }
.agenda li p { margin: 0; font-size: 0.92rem; }

details.faq { border-bottom: 1px solid var(--line); padding: 16px 0; }
details.faq summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after { content: "+"; color: var(--accent); font-size: 1.3rem; line-height: 1; }
details.faq[open] summary::after { content: "−"; }
details.faq p { margin: 12px 0 0; font-size: 0.94rem; }

.sticky-cta {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  background: rgba(7, 10, 20, 0.93); backdrop-filter: blur(12px);
  border-top: 1px solid var(--line); padding: 12px 20px;
  display: none; align-items: center; justify-content: space-between; gap: 14px;
}
.sticky-cta.on { display: flex; }
.sticky-cta .btn { padding: 12px 22px; }
.sticky-cta .small { margin: 0; }

/* ---------- Tabela admin ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; font-size: 0.87rem; }
th, td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { background: rgba(255, 255, 255, 0.04); font-size: 0.75rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted-2); }
td { color: #c8d0e6; }
tbody tr:hover td { background: rgba(255, 255, 255, 0.03); }

/* ---------- App de aquecimento ---------- */
.app-head { display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center; }
.contador { display: flex; gap: 10px; }
.contador div {
  min-width: 62px; padding: 10px 8px; border-radius: 12px; text-align: center;
  background: rgba(255, 255, 255, 0.05); border: 1px solid var(--line);
}
.contador b { display: block; font-size: 1.5rem; letter-spacing: -0.03em; line-height: 1.1; }
.contador span { font-size: 0.68rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted-2); }

.painel { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.painel .card-flat { text-align: center; padding: 18px 14px; }
.painel b { display: block; font-size: 1.7rem; font-weight: 800; letter-spacing: -0.03em; }
.painel span { font-size: 0.76rem; color: var(--muted-2); }

.missao {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.03); margin-bottom: 12px; overflow: hidden;
  transition: border-color .15s ease;
}
.missao.aberta { border-color: rgba(255, 194, 71, 0.45); background: linear-gradient(180deg, var(--surface), var(--ink-2)); }
.missao.feita { border-color: rgba(61, 220, 151, 0.3); }
.missao.travada { opacity: .5; }

.missao-topo {
  display: grid; grid-template-columns: 42px 1fr auto; gap: 14px; align-items: center;
  padding: 16px 20px; cursor: pointer; text-align: left; width: 100%;
  background: none; border: none; color: inherit; font: inherit;
}
.missao.travada .missao-topo { cursor: not-allowed; }
.missao-dia {
  width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center;
  background: rgba(255, 255, 255, 0.06); font-weight: 800; font-size: 0.92rem; color: var(--muted);
}
.missao.aberta .missao-dia { background: rgba(255, 194, 71, 0.15); color: var(--accent); }
.missao.feita .missao-dia { background: rgba(61, 220, 151, 0.16); color: var(--s); }
.missao-tit { display: block; font-weight: 650; font-size: 1.02rem; }
.missao-sub { display: block; font-size: 0.78rem; color: var(--muted-2); margin-top: 2px; }
.missao-estado { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted-2); }
.missao.feita .missao-estado { color: var(--s); }
.missao.aberta .missao-estado { color: var(--accent); }

.missao-corpo { padding: 0 20px 20px; border-top: 1px solid var(--line); margin-top: 2px; padding-top: 18px; }
.missao-corpo h4 { font-size: 0.74rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted-2); margin: 0 0 8px; }
.missao-corpo p { font-size: 0.95rem; }
.missao-nota {
  border-left: 2px solid var(--accent); padding: 2px 0 2px 14px;
  font-size: 0.92rem; color: #cdd6ef; margin: 16px 0;
}
.missao-corpo textarea {
  width: 100%; min-height: 120px; resize: vertical; padding: 13px 15px;
  font: inherit; font-size: 0.95rem; line-height: 1.55; color: var(--text);
  background: rgba(255, 255, 255, 0.045); border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
}
.missao-corpo textarea:focus { outline: none; border-color: var(--accent); }
.missao-acoes { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 14px; }
.missao-acoes .btn { padding: 12px 22px; font-size: 0.94rem; }
.salvo { font-size: 0.8rem; color: var(--s); opacity: 0; transition: opacity .2s ease; }
.salvo.on { opacity: 1; }

/* ---------- Footer ---------- */
footer { border-top: 1px solid var(--line); padding: 34px 0; color: var(--muted-2); font-size: 0.83rem; position: relative; z-index: 1; }

/* ---------- Utilidades ---------- */
.mb-0 { margin-bottom: 0; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mt-40 { margin-top: 40px; }
.hidden { display: none !important; }
.fade-in { animation: fade .4s ease both; }
@keyframes fade { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

@media (max-width: 900px) {
  .hero-grid, .result-hero { grid-template-columns: 1fr; gap: 32px; }
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .app-head { grid-template-columns: 1fr; gap: 28px; }
}
@media (max-width: 620px) {
  body { font-size: 16px; }
  section { padding: 52px 0; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .painel { grid-template-columns: 1fr; gap: 10px; }
  .painel .card-flat { display: grid; grid-template-columns: 64px 1fr; gap: 12px; align-items: center; text-align: left; padding: 14px 18px; }
  .contador div { flex: 1; min-width: 0; }
  .missao-topo { grid-template-columns: 38px 1fr; padding: 15px 16px; }
  .missao-estado { grid-column: 2; font-size: 0.68rem; }
  .missao-dia { grid-row: span 2; width: 38px; height: 38px; }
  .missao-corpo { padding-left: 16px; padding-right: 16px; }
  .missao-acoes .btn { width: 100%; }
  .card, .offer { padding: 22px; }
  .bar-row { grid-template-columns: 92px 1fr 40px; }
  .topbar .small { display: none; }
  .sticky-cta .small { display: none; }
  .sticky-cta .btn { width: 100%; }
  .proof { gap: 18px; }
}
