:root {
  --green: #38a84a;
  --green-dark: #2e8c3d;
  --blue: #2a66c4;
  --blue-dark: #1f4f9c;
  --yellow: #f4b70c;
  --yellow-dark: #d99e00;
  --bg: #ffffff;
  --bg-soft: #f4f7fb;
  --ink: #1b2430;
  --muted: #5b6472;
  --line: #e3e9f2;
  --radius: 18px;
  --shadow: 0 10px 30px rgba(27, 36, 48, 0.10);
  --shadow-btn: 0 8px 18px rgba(56, 168, 74, 0.35);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg-soft);
  color: var(--ink);
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.app {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 520px;
  margin: 0 auto;
  padding: 14px 16px 32px;
}

/* Topo com logo + progresso */
.topbar {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 6px 2px 12px;
}
.brand {
  display: flex;
  justify-content: center;
}
.brand img {
  height: 54px;
  width: auto;
}
.progress {
  height: 8px;
  width: 100%;
  background: #e7edf6;
  border-radius: 999px;
  overflow: hidden;
}
.progress > span {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--green), var(--blue));
  border-radius: 999px;
  transition: width .45s ease;
}

/* Cartao principal */
.screen {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px 20px 22px;
  animation: pop .32s ease;
}
@keyframes pop {
  from { opacity: 0; transform: translateY(14px) scale(.99); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.kicker {
  display: inline-block;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--green-dark);
  background: rgba(56, 168, 74, .12);
  padding: 6px 12px;
  border-radius: 999px;
  margin-bottom: 14px;
}
.kicker.blue { color: var(--blue); background: rgba(42, 102, 196, .12); }
.kicker.yellow { color: var(--yellow-dark); background: rgba(244, 183, 12, .16); }

h1 {
  font-size: 28px;
  line-height: 1.18;
  margin: 0 0 12px;
  color: var(--blue);
  letter-spacing: -.01em;
}
h1 .hl { color: var(--green); }
h1 .hly { color: var(--yellow-dark); }

p, li { font-size: 17px; line-height: 1.5; color: var(--ink); margin: 0 0 12px; }
p.sub { color: var(--muted); font-size: 15.5px; }
.big { font-size: 20px; font-weight: 700; }

.value {
  font-size: 40px;
  font-weight: 900;
  color: var(--green);
  line-height: 1;
  margin: 6px 0 4px;
}
.value.yellow { color: var(--yellow-dark); }
.value.strike { color: var(--muted); text-decoration: line-through; font-size: 22px; font-weight: 700; }

ul.checks { list-style: none; padding: 0; margin: 10px 0 4px; }
ul.checks li { padding-left: 30px; position: relative; }
ul.checks li::before {
  content: "✓";
  position: absolute; left: 0; top: 1px;
  color: var(--green); font-weight: 900;
}

/* Inputs */
.field { margin: 14px 0 6px; }
label.lbl { display: block; font-weight: 700; margin-bottom: 8px; font-size: 15px; }
input[type="text"], input[type="tel"], input[type="number"], input[type="email"] {
  width: 100%;
  font-size: 18px;
  padding: 15px 16px;
  border: 2px solid var(--line);
  border-radius: 14px;
  outline: none;
  background: #fff;
  color: var(--ink);
  transition: border-color .15s ease, box-shadow .15s ease;
}
input:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 4px rgba(56, 168, 74, .15);
}
.hint { font-size: 13.5px; color: var(--muted); margin-top: 6px; }
.error { color: #d9364c; font-size: 14px; margin-top: 8px; min-height: 18px; }

/* Opcoes (escolha) */
.options { display: flex; flex-direction: column; gap: 12px; margin: 8px 0; }
.opt {
  width: 100%;
  text-align: left;
  font-size: 17px;
  font-weight: 600;
  padding: 16px 16px;
  border: 2px solid var(--line);
  border-radius: 14px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  transition: transform .08s ease, border-color .15s ease, background .15s ease;
}
.opt:hover { border-color: var(--green); }
.opt:active { transform: scale(.99); }
.opt.selected { border-color: var(--green); background: rgba(56, 168, 74, .08); }

/* Botoes */
.btn {
  -webkit-appearance: none;
  appearance: none;
  border: none;
  width: 100%;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: .01em;
  color: #fff;
  background: linear-gradient(180deg, var(--green), var(--green-dark));
  padding: 18px 20px;
  border-radius: 16px;
  box-shadow: var(--shadow-btn);
  cursor: pointer;
  margin-top: 16px;
  transition: transform .08s ease, filter .15s ease;
  text-transform: uppercase;
}
.btn:active { transform: translateY(1px) scale(.995); }
.btn:disabled { filter: grayscale(.4) opacity(.6); cursor: not-allowed; }
.btn.blue { background: linear-gradient(180deg, var(--blue), var(--blue-dark)); box-shadow: 0 8px 18px rgba(42, 102, 196, .35); }
.btn.ghost {
  background: #fff; color: var(--ink);
  border: 2px solid var(--line); box-shadow: none; text-transform: none; font-weight: 700;
}
.btn.small { font-size: 16px; padding: 14px 16px; }

/* Destaques / caixas */
.callout {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-left: 5px solid var(--yellow);
  border-radius: 12px;
  padding: 14px 16px;
  margin: 14px 0;
}
.flow {
  display: flex; flex-direction: column; gap: 6px; align-items: center;
  margin: 14px 0;
}
.flow .step {
  width: 100%; text-align: center; font-weight: 800; font-size: 15px;
  padding: 11px; border-radius: 12px; background: rgba(42,102,196,.08); color: var(--blue);
}
.flow .arrow { color: var(--muted); font-size: 18px; line-height: 1; }
.flow .step.win { background: rgba(56,168,74,.12); color: var(--green-dark); }

/* Loader de "analise" */
.analyzing { text-align: center; padding: 12px 0; }
.spinner {
  width: 58px; height: 58px; margin: 6px auto 16px;
  border: 6px solid #e7edf6; border-top-color: var(--green);
  border-radius: 50%; animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.analyzing .status { font-weight: 700; color: var(--blue); min-height: 24px; }

/* Barra de progresso da analise */
.an-bar {
  height: 12px; background: #e7edf6; border-radius: 999px;
  overflow: hidden; margin: 18px 0 6px; border: 1px solid var(--line);
}
.an-fill {
  height: 100%; width: 0%; border-radius: 999px;
  background: linear-gradient(90deg, var(--green), var(--blue));
  transition: width .12s linear;
}
.an-pct { text-align: center; font-weight: 800; color: var(--blue); margin: 0 0 14px; }

/* Etapas da analise */
.an-steps { list-style: none; padding: 0; margin: 8px 0 0; text-align: left; }
.an-steps li {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 0; font-weight: 600; color: #8b98a9;
  opacity: .55; transition: opacity .3s, color .3s;
}
.an-steps li .an-ico {
  width: 22px; height: 22px; flex: 0 0 22px; border-radius: 50%;
  border: 2px solid #cfd8e6; position: relative; transition: all .3s;
}
.an-steps li.active { opacity: 1; color: var(--blue); }
.an-steps li.active .an-ico {
  border-color: var(--blue);
  border-top-color: transparent; animation: spin .8s linear infinite;
}
.an-steps li.done { opacity: 1; color: var(--ink); }
.an-steps li.done .an-ico {
  background: var(--green); border-color: var(--green);
}
.an-steps li.done .an-ico::after {
  content: ''; position: absolute; left: 6px; top: 2px;
  width: 5px; height: 10px; border: solid #fff;
  border-width: 0 2.5px 2.5px 0; transform: rotate(45deg);
}
.an-final {
  text-align: center; font-weight: 700; margin-top: 16px;
  min-height: 22px; opacity: 0; transform: translateY(6px);
  transition: opacity .4s, transform .4s;
}
.an-final.show { opacity: 1; transform: translateY(0); }

/* ---------- Simulador: card do cliente ---------- */
.client-card {
  display: flex; align-items: center; gap: 12px;
  background: #fff; border: 1px solid var(--line); border-radius: 16px;
  padding: 14px; margin: 16px 0; box-shadow: 0 6px 18px rgba(20,40,80,.06);
  position: relative;
}
.client-avatar {
  width: 48px; height: 48px; flex: 0 0 48px; border-radius: 50%;
  background: linear-gradient(135deg, var(--green), var(--blue));
  color: #fff; font-weight: 800; display: flex; align-items: center; justify-content: center;
}
.client-info { display: flex; flex-direction: column; gap: 2px; }
.client-info strong { font-size: 16px; }
.client-info span { font-size: 13px; color: #6b7890; }
.client-tag { color: var(--blue) !important; font-weight: 700; }
.client-badge {
  position: absolute; top: 12px; right: 12px;
  background: var(--green); color: #fff; font-size: 11px; font-weight: 800;
  padding: 3px 9px; border-radius: 999px; text-transform: uppercase;
}

/* ---------- Simulador: chat estilo WhatsApp ---------- */
.wa {
  border: 1px solid var(--line); border-radius: 16px; overflow: hidden;
  background: #e9e2d8; margin: 12px 0 16px;
  box-shadow: 0 8px 22px rgba(20,40,80,.08);
}
.wa-head {
  display: flex; align-items: center; gap: 10px;
  background: #075e54; color: #fff; padding: 10px 12px;
}
.wa-avatar {
  width: 38px; height: 38px; border-radius: 50%; background: #cfd8dc;
  color: #075e54; font-weight: 800; display: flex; align-items: center; justify-content: center;
}
.wa-meta { display: flex; flex-direction: column; line-height: 1.15; }
.wa-meta strong { font-size: 15px; }
.wa-meta span { font-size: 12px; opacity: .85; }
.wa-body {
  padding: 12px; min-height: 230px; max-height: 340px; overflow-y: auto;
  display: flex; flex-direction: column; gap: 8px;
  background-image: linear-gradient(rgba(233,226,216,.6), rgba(233,226,216,.6));
}
.wa-msg {
  max-width: 82%; padding: 8px 11px; border-radius: 10px; font-size: 14px;
  line-height: 1.35; box-shadow: 0 1px 1px rgba(0,0,0,.08);
  animation: wa-pop .25s ease;
}
.wa-msg s { opacity: .7; }
.wa-in { align-self: flex-start; background: #fff; border-top-left-radius: 2px; }
.wa-out { align-self: flex-end; background: #dcf8c6; border-top-right-radius: 2px; }
@keyframes wa-pop { from { opacity: 0; transform: translateY(6px) scale(.98); } to { opacity: 1; transform: none; } }

/* ---------- Simulador: recompensa ---------- */
.reward { text-align: center; }
.reward-badge {
  font-size: 54px; line-height: 1; margin: 4px 0 6px;
  animation: reward-bounce .7s ease;
}
@keyframes reward-bounce {
  0% { transform: scale(.3); opacity: 0; }
  60% { transform: scale(1.15); }
  100% { transform: scale(1); opacity: 1; }
}
.reward-list { list-style: none; padding: 0; margin: 14px 0 0; text-align: left; }
.reward-list li {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  padding: 12px 14px; margin-bottom: 8px; font-weight: 600;
  opacity: 0; transform: translateX(-10px); transition: opacity .35s, transform .35s;
}
.reward-list li.show { opacity: 1; transform: translateX(0); }
.reward-list li b { font-size: 15px; white-space: nowrap; }
.reward-total {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 6px; padding: 14px; border-radius: 12px;
  background: linear-gradient(135deg, var(--green), var(--blue)); color: #fff;
  font-weight: 800; opacity: 0; transform: translateY(8px); transition: opacity .4s, transform .4s;
}
.reward-total.show { opacity: 1; transform: translateY(0); }
.reward-total b { font-size: 20px; }
.reward-q { font-size: 20px; font-weight: 800; margin-top: 16px; }

/* Total grande com contador */
.reward-total-big {
  text-align: center; margin: 14px 0 4px; padding: 16px;
  border-radius: 16px; color: #fff;
  background: linear-gradient(135deg, var(--green), var(--blue));
  box-shadow: 0 10px 26px rgba(20,120,80,.28);
}
.reward-total-big .rt-label { font-size: 14px; font-weight: 700; opacity: .95; }
.reward-total-big .rt-value {
  font-size: 40px; font-weight: 900; line-height: 1.1; margin-top: 2px;
  text-shadow: 0 2px 8px rgba(0,0,0,.15);
}
.pop { animation: reward-bounce .6s ease; }

/* Conquistas / badges */
.badges { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 14px 0 4px; }
.badge-chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: #fff7e0; border: 1px solid #ffd970; color: #8a6a00;
  font-size: 13px; font-weight: 800; padding: 7px 12px; border-radius: 999px;
  opacity: 0; transform: scale(.5); transition: opacity .3s, transform .3s;
}
.badge-chip.show { opacity: 1; transform: scale(1); animation: chip-pop .4s ease; }
@keyframes chip-pop {
  0% { transform: scale(.5); } 60% { transform: scale(1.12); } 100% { transform: scale(1); }
}

/* Barra de XP / nivel */
.xp {
  margin-top: 16px; background: #fff; border: 1px solid var(--line);
  border-radius: 14px; padding: 12px 14px;
}
.xp-top { display: flex; justify-content: space-between; font-weight: 800; font-size: 13px; color: var(--blue); }
.xp-bar {
  height: 14px; background: #e7edf6; border-radius: 999px; overflow: hidden; margin: 8px 0 8px;
}
.xp-fill {
  height: 100%; width: 8%; border-radius: 999px;
  background: linear-gradient(90deg, #ffc233, #ff9d00);
  transition: width 1.2s cubic-bezier(.2,.8,.2,1);
}
.xp-hint { font-size: 13px; color: var(--muted); margin: 0; }

/* Botao pulsante */
.btn.pulse { animation: btn-pulse 1.5s ease-in-out infinite; }
@keyframes btn-pulse {
  0%, 100% { transform: scale(1); box-shadow: 0 8px 20px rgba(0,184,107,.28); }
  50% { transform: scale(1.03); box-shadow: 0 12px 28px rgba(0,184,107,.42); }
}

/* ---------- Planos (escolha de acesso) ---------- */
.plans { display: flex; flex-direction: column; gap: 12px; margin: 16px 0 6px; }
.plan {
  position: relative; background: #fff; border: 1px solid var(--line);
  border-radius: 16px; padding: 16px; box-shadow: 0 6px 18px rgba(20,40,80,.06);
}
.plan.featured {
  border: 2px solid var(--green); box-shadow: 0 12px 30px rgba(0,184,107,.18);
}
.plan.flash { animation: plan-flash 1s ease 2; }
@keyframes plan-flash {
  0%, 100% { box-shadow: 0 12px 30px rgba(0,184,107,.18); }
  50% { box-shadow: 0 0 0 4px rgba(0,184,107,.35); }
}
.plan-flag {
  position: absolute; top: -11px; left: 50%; transform: translateX(-50%);
  background: var(--green); color: #fff; font-size: 11px; font-weight: 800;
  padding: 4px 12px; border-radius: 999px; letter-spacing: .3px; white-space: nowrap;
}
.plan-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.plan-name { font-size: 17px; font-weight: 800; }
.plan-badge { font-size: 13px; font-weight: 800; padding: 4px 10px; border-radius: 999px; }
.plan-badge.gray { background: #eef2f7; color: #6b7890; }
.plan-badge.green { background: var(--green); color: #fff; }
.plan-desc { margin: 4px 0; font-size: 14.5px; }
.plan-earn { margin: 4px 0 10px; font-weight: 700; font-size: 14px; }
.plan-price {
  font-size: 22px; font-weight: 900; color: var(--ink); margin: 6px 0 10px;
}
.plan-price span { display: block; font-size: 12px; font-weight: 700; color: var(--muted); }
.btn.ghost {
  background: #fff; color: var(--blue); border: 2px solid var(--line);
  box-shadow: none;
}
.plan-warn {
  background: #fff7e0; border: 1px solid #ffd970; border-radius: 14px;
  padding: 14px; margin: 4px 0 8px;
}
.plan-warn p { margin: 0 0 10px; font-size: 14px; color: #6b5500; }
.urgency {
  text-align: center; font-weight: 800; color: var(--red, #ff5470);
  font-size: 16px; margin-top: 12px;
}

/* Confete */
.confetti-layer {
  position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 9998;
}
.confetti-layer .confetti {
  position: absolute; top: -14px; width: 9px; height: 14px; opacity: .95;
  animation-name: confetti-fall; animation-timing-function: linear; animation-fill-mode: forwards;
}
@keyframes confetti-fall {
  0% { top: -14px; opacity: 1; }
  100% { top: 100vh; opacity: .9; transform: translateX(30px) rotate(540deg); }
}

/* Pagamento */
.qr { text-align: center; margin: 8px 0 4px; }
.qr img { width: 240px; max-width: 78%; border-radius: 14px; border: 1px solid var(--line); }
.copy-box {
  display: flex; gap: 8px; margin-top: 12px;
}
.copy-box input { flex: 1; font-size: 13px; }
.pay-status {
  display: flex; align-items: center; gap: 10px; justify-content: center;
  margin-top: 16px; font-weight: 700; color: var(--muted);
}
.dot { width: 12px; height: 12px; border-radius: 50%; background: var(--yellow); animation: pulse 1.1s infinite; }
.pay-status.paid .dot { background: var(--green); animation: none; }
.pay-status.paid { color: var(--green-dark); }
@keyframes pulse { 0%,100%{opacity:.35;} 50%{opacity:1;} }

/* Sucesso */
.success-badge {
  width: 84px; height: 84px; margin: 4px auto 14px;
  border-radius: 50%; background: rgba(56,168,74,.12);
  display: flex; align-items: center; justify-content: center;
  font-size: 44px; color: var(--green);
  animation: pop .4s ease;
}

.footnote { font-size: 12.5px; color: var(--muted); text-align: center; margin-top: 18px; line-height: 1.45; }

.center { text-align: center; }
.mt0 { margin-top: 0; }
.strong { font-weight: 800; }
.tag-green { color: var(--green-dark); font-weight: 800; }
.tag-blue { color: var(--blue); font-weight: 800; }

@media (max-width: 380px) {
  h1 { font-size: 24px; }
  .value { font-size: 34px; }
}
