:root {
  --blue: #2176f3;
  --blue-dark: #1967d2;
  --blue-glow: rgba(33, 118, 243, 0.25);
  --blue-glow-strong: rgba(33, 118, 243, 0.45);
  --bg: #151b24;
  --graphite: #1d2530;
  --graphite-dark: #121820;
  --graphite-deeper: #171e27;
  --card-border: rgba(255, 255, 255, 0.08);
  --white-pure: #ffffff;
  --gray-light: #e1e4e7;
  --gray: #8c95a1;
  --radius-sm: 8px;
  --radius-md: 16px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  background-color: var(--bg);
  color: var(--gray-light);
  font-family: 'Plus Jakarta Sans', sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.quiz-wrapper {
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ── Logo ── */
.logo-bar {
  padding: 28px 0 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
}
.logo-bar img { height: 42px; width: auto; }
.logo-bar.has-dual-logos img { height: 34px; }
.logo-bar .logo-divider { font-family: 'Bebas Neue', sans-serif; font-size: 16px; color: var(--blue); }

/* ── Progress ── */
.progress-section { margin-bottom: 20px; }
.progress-info { display: flex; justify-content: space-between; font-size: 11px; color: var(--gray); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 6px; font-weight: 700; }
.progress-track { height: 4px; background: var(--graphite); border-radius: 2px; overflow: hidden; }
.progress-fill { height: 100%; background: linear-gradient(90deg, var(--blue), #4285f4); width: 25%; transition: width .4s cubic-bezier(.4, 0, .2, 1); }

/* ── Card ── */
.quiz-card {
  background: var(--graphite);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
  overflow: hidden;
  margin-bottom: 20px;
}
.card-inner { padding: 32px 28px 24px; }

/* ── Steps ── */
.step { display: none; }
.step.active { display: block; animation: stepIn .3s ease; }
@keyframes stepIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

.step-tag { display: inline-block; font-size: 10px; font-weight: 800; color: var(--blue); text-transform: uppercase; letter-spacing: 1.5px; margin-bottom: 8px; }
.step-title { font-family: 'Bebas Neue', sans-serif; font-size: 28px; letter-spacing: 1px; color: var(--white-pure); margin-bottom: 4px; line-height: 1.1; }
.step-sub { font-size: 13px; color: var(--gray); margin-bottom: 20px; line-height: 1.5; }

/* ── Inputs ── */
.input-group { margin-bottom: 20px; }
.input-group label { display: block; font-size: 11px; font-weight: 700; color: var(--gray-light); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 6px; }
.input-group input {
  width: 100%; padding: 16px 18px; font-size: 15px; font-family: inherit; font-weight: 600;
  color: var(--white-pure); background: var(--graphite-deeper);
  border: 1.5px solid var(--card-border); border-radius: var(--radius-sm); outline: none;
  transition: all .2s ease;
}
.input-group input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-glow); }
.input-group input.error { border-color: #ff5252; box-shadow: 0 0 0 3px rgba(255, 82, 82, 0.2); }
.error-msg { font-size: 11px; color: #ff5252; margin-top: 6px; display: none; }
.error-msg.show { display: block; animation: stepIn .25s ease; }

/* ── Options ── */
.options-grid { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }
.option-btn {
  width: 100%; padding: 16px 18px; font-size: 14px; font-family: inherit; font-weight: 600;
  color: var(--gray-light); background: var(--graphite-deeper);
  border: 1.5px solid var(--card-border); border-radius: var(--radius-sm);
  cursor: pointer; display: flex; align-items: center; gap: 14px; transition: all .2s ease; text-align: left;
}
.option-btn:hover { border-color: rgba(66, 133, 244, .4); background: rgba(66, 133, 244, .05); color: var(--white-pure); }
.option-btn.selected { border-color: var(--blue); background: rgba(66, 133, 244, .08); color: var(--white-pure); box-shadow: 0 0 0 3px var(--blue-glow); }
.option-radio {
  width: 20px; height: 20px; min-width: 20px; border-radius: 50%;
  border: 2px solid var(--card-border); display: flex; align-items: center; justify-content: center; transition: all .2s ease;
}
.option-radio::after { content: ''; width: 9px; height: 9px; border-radius: 50%; background: var(--blue); transform: scale(0); transition: transform .2s ease; }
.option-btn.selected .option-radio { border-color: var(--blue); }
.option-btn.selected .option-radio::after { transform: scale(1); }
.option-label-wrap { display: flex; flex-direction: column; }
.option-label { font-weight: 700; font-size: 14px; }
.option-desc { font-size: 11px; color: var(--gray); margin-top: 2px; }
.selector-block { margin-bottom: 18px; }
.selector-title { font-size: 11px; font-weight: 800; color: var(--gray-light); text-transform: uppercase; letter-spacing: 1px; line-height: 1.45; margin-bottom: 8px; }
.regional-select {
  width: 100%; padding: 16px 18px; font-size: 14px; font-family: inherit; font-weight: 600;
  color: var(--white-pure); background: var(--graphite-deeper);
  border: 1.5px solid var(--card-border); border-radius: var(--radius-sm); outline: none;
  cursor: pointer; transition: all .2s ease;
}
.regional-select:focus { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-glow); }
.regional-select.error { border-color: #ff5252; box-shadow: 0 0 0 3px rgba(255, 82, 82, 0.2); }
.regional-select option { color: #20252d; background: #ffffff; }
.consent-block { margin-top: 4px; }
.privacy-consent {
  display: flex; align-items: flex-start; gap: 10px; margin: 18px 0 4px;
  color: var(--gray-light); font-size: 11px; line-height: 1.55; cursor: pointer;
}
.privacy-consent input { width: 18px; height: 18px; min-width: 18px; margin-top: 1px; accent-color: var(--blue); }
.privacy-consent a { color: #72a9ff; }
.privacy-consent.error { padding: 10px; border: 1px solid #ff5252; border-radius: var(--radius-sm); background: rgba(255,82,82,.07); }
.submission-error { display: none; margin: 12px 0; padding: 11px 13px; color: #ffb0b0; background: rgba(255,82,82,.1); border: 1px solid rgba(255,82,82,.25); border-radius: var(--radius-sm); font-size: 11px; line-height: 1.5; }
.submission-error.show { display: block; }

/* ── Buttons ── */
.btn-primary {
  width: 100%; padding: 16px; font-size: 14px; font-family: inherit; font-weight: 700;
  color: var(--white-pure); background: linear-gradient(135deg, var(--blue-dark), var(--blue));
  border: none; border-radius: var(--radius-sm); cursor: pointer;
  letter-spacing: .4px; text-transform: uppercase;
  transition: transform .2s, box-shadow .2s, opacity .2s;
  box-shadow: 0 4px 18px var(--blue-glow); position: relative; overflow: hidden;
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 8px 28px var(--blue-glow-strong); }
.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled { opacity: .35; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-primary::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .12), transparent);
  transform: translateX(-100%);
}
.btn-primary:not(:disabled):hover::after { animation: shimmer .7s ease; }
@keyframes shimmer { 0% { transform: translateX(-100%) } 100% { transform: translateX(100%) } }

/* ── WhatsApp Button ── */
.btn-whatsapp {
  width: 100%; padding: 20px; font-size: 16px; font-family: inherit; font-weight: 800;
  color: var(--white-pure); background: linear-gradient(135deg, #25D366, #1da851);
  border: none; border-radius: var(--radius-sm); cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 12px;
  transition: transform .2s, box-shadow .2s;
  box-shadow: 0 4px 24px rgba(37, 211, 102, .25);
  text-decoration: none; animation: wpPulse 2.5s ease-in-out infinite;
}
@keyframes wpPulse { 0%, 100% { box-shadow: 0 4px 24px rgba(37, 211, 102, .25) } 50% { box-shadow: 0 4px 40px rgba(37, 211, 102, .45) } }
.btn-whatsapp:hover { transform: translateY(-2px) scale(1.01); }
.btn-whatsapp svg { width: 22px; height: 22px; flex-shrink: 0; }
.btn-decree-download {
  width: 100%; margin-top: 12px; padding: 20px; box-sizing: border-box;
  display: flex; align-items: center; justify-content: center;
  border: none; border-radius: var(--radius-sm);
  color: var(--white-pure); background: linear-gradient(135deg, var(--blue-dark), var(--blue));
  font: 800 16px/1.2 inherit; letter-spacing: normal; text-transform: none;
  text-decoration: none; transition: transform .2s, box-shadow .2s;
  box-shadow: 0 4px 24px var(--blue-glow); animation: decreePulse 2.5s ease-in-out infinite;
}
.btn-decree-download:hover { transform: translateY(-2px) scale(1.01); }
@keyframes decreePulse { 0%, 100% { box-shadow: 0 4px 24px var(--blue-glow); } 50% { box-shadow: 0 4px 40px var(--blue-glow-strong); } }
.availability-status { display: inline-flex; align-items: center; gap: 8px; margin: 4px auto 22px; color: #9ff0ba; font-size: 12px; font-weight: 800; letter-spacing: .3px; text-transform: uppercase; }
.availability-dot { width: 10px; height: 10px; border-radius: 50%; background: #25D366; box-shadow: 0 0 0 0 rgba(37,211,102,.7); animation: availabilityPulse 1.2s ease-in-out infinite; }
@keyframes availabilityPulse { 0%, 100% { transform: translateY(0); box-shadow: 0 0 0 0 rgba(37,211,102,.7); } 50% { transform: translateY(-4px); box-shadow: 0 0 0 9px rgba(37,211,102,0); } }

/* ── Final Screens ── */
.final-check {
  width: 64px; height: 64px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; margin: 0 auto 18px;
}
.final-check.success {
  background: linear-gradient(135deg, rgba(37, 211, 102, .15), rgba(37, 211, 102, .05));
  border: 1.5px solid rgba(37, 211, 102, .25);
}
.final-check.waiting {
  background: linear-gradient(135deg, rgba(66, 133, 244, .15), rgba(66, 133, 244, .05));
  border: 1.5px solid rgba(66, 133, 244, .25);
}
.final-check svg { width: 30px; height: 30px; }
.final-title { font-family: 'Bebas Neue', sans-serif; font-size: 30px; letter-spacing: 1.5px; color: var(--white-pure); margin-bottom: 6px; }
.final-sub { font-size: 13px; color: var(--gray); line-height: 1.6; margin-bottom: 24px; }

/* ── Waiting animation dots ── */
.waiting-dots { display: flex; justify-content: center; gap: 8px; margin-bottom: 24px; }
.waiting-dots span {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--blue); opacity: .3;
  animation: dotPulse 1.4s ease-in-out infinite;
}
.waiting-dots span:nth-child(2) { animation-delay: .2s; }
.waiting-dots span:nth-child(3) { animation-delay: .4s; }
@keyframes dotPulse { 0%, 80%, 100% { opacity: .3; transform: scale(1) } 40% { opacity: 1; transform: scale(1.3) } }

/* ── Consulta de CPF (Boa Vista) ── */
.cpf-lookup-content { min-height: 300px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 18px 0; }
.cpf-lookup-spinner {
  width: 78px; height: 78px; margin-bottom: 24px; border-radius: 50%; position: relative;
  background: conic-gradient(from 0deg, transparent 0 18%, var(--blue) 45%, #72a9ff 72%, transparent 92%);
  animation: cpfLookupSpin 1.15s linear infinite;
  box-shadow: 0 0 34px rgba(33, 118, 243, .22);
}
.cpf-lookup-spinner::before { content: ''; position: absolute; inset: 6px; border-radius: 50%; background: var(--graphite); }
.cpf-lookup-spinner span { position: absolute; inset: 25px; z-index: 1; border-radius: 50%; background: var(--blue); opacity: .8; animation: cpfCorePulse 1.15s ease-in-out infinite; }
.cpf-lookup-message { min-height: 34px; margin: 4px 0 8px; }
.cpf-lookup-message.pulse { animation: cpfMessagePulse 1.6s ease-in-out; }
.cpf-lookup-content .step-sub { max-width: 330px; margin-bottom: 22px; }
.cpf-lookup-dots { display: flex; gap: 8px; }
.cpf-lookup-dots span { width: 8px; height: 8px; border-radius: 50%; background: var(--blue); animation: dotPulse 1.4s ease-in-out infinite; }
.cpf-lookup-dots span:nth-child(2) { animation-delay: .2s; }
.cpf-lookup-dots span:nth-child(3) { animation-delay: .4s; }
@keyframes cpfLookupSpin { to { transform: rotate(360deg); } }
@keyframes cpfCorePulse { 0%, 100% { transform: scale(.65); opacity: .35; } 50% { transform: scale(1); opacity: .9; } }
@keyframes cpfMessagePulse { 0% { opacity: 0; transform: translateY(7px); } 25%, 75% { opacity: 1; transform: translateY(0); } 100% { opacity: .8; } }
.cpf-lookup-result .cpf-lookup-content { min-height: 360px; }
.cpf-result-icon { width: 62px; height: 62px; display: flex; align-items: center; justify-content: center; margin-bottom: 18px; border-radius: 50%; color: #72a9ff; background: rgba(114,169,255,.12); border: 1.5px solid rgba(114,169,255,.3); font-size: 28px; font-weight: 800; animation: cpfResultPulse 1.8s ease-in-out infinite; }
.cpf-result-icon.positive { color: #5ee38c; background: rgba(37,211,102,.14); border-color: rgba(37,211,102,.35); box-shadow: 0 0 36px rgba(37,211,102,.25); }
.cpf-estimate-grid { width: min(100%, 560px); display: grid; grid-template-columns: 1fr; gap: 10px; margin: 2px auto 18px; }
.cpf-estimate-grid.hidden { display: none; }
.cpf-estimate-card { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 16px 18px; border: 1px solid rgba(114,169,255,.25); border-radius: 14px; background: linear-gradient(112deg, rgba(33,118,243,.15), rgba(23,31,42,.55)); box-shadow: inset 0 1px 0 rgba(255,255,255,.04), 0 10px 22px rgba(0,0,0,.12); text-align: left; }
.cpf-estimate-card[hidden] { display: none; }
.cpf-credit-info { display: flex; flex: 1 1 auto; align-items: center; gap: 12px; min-width: 0; }
.cpf-credit-icon { width: 36px; height: 36px; flex: 0 0 36px; display: grid; place-items: center; border-radius: 10px; color: #a7c9ff; background: rgba(33,118,243,.2); border: 1px solid rgba(114,169,255,.27); font-size: 17px; font-weight: 900; }
.cpf-credit-title, .cpf-credit-description, .cpf-credit-value span, .cpf-credit-margin { display: block; }
.cpf-credit-title { color: var(--white-pure); font-size: 13px; font-weight: 800; line-height: 1.25; }
.cpf-credit-description { margin-top: 3px; color: var(--gray); font-size: 10px; line-height: 1.3; }
.cpf-credit-value { flex: 0 0 150px; text-align: right; }
.cpf-credit-value span { color: #9bb3d8; font-size: 9px; font-weight: 800; letter-spacing: .55px; text-transform: uppercase; }
.cpf-credit-value strong { display: block; margin-top: 3px; color: #7ef0a6; font-size: 21px; letter-spacing: -.45px; line-height: 1.1; white-space: nowrap; }
.cpf-credit-margin { margin-top: 5px; color: #9bb3d8; font-size: 12px; font-weight: 700; letter-spacing: 0; line-height: 1.35; white-space: nowrap; }
.cpf-credit-beneficio { border-color: rgba(144,115,255,.28); background: linear-gradient(112deg, rgba(105,70,220,.17), rgba(23,31,42,.55)); }
.cpf-credit-beneficio .cpf-credit-icon { color: #d0c0ff; background: rgba(121,83,237,.2); border-color: rgba(180,153,255,.3); }
.cpf-credit-cartao { border-color: rgba(37,211,102,.26); background: linear-gradient(112deg, rgba(23,143,84,.16), rgba(23,31,42,.55)); }
.cpf-credit-cartao .cpf-credit-icon { color: #9ff0ba; background: rgba(37,211,102,.15); border-color: rgba(94,227,140,.3); }
.cpf-disclaimer { max-width: 360px; margin: 0 auto 18px; color: var(--gray); font-size: 10px; line-height: 1.45; }
@keyframes cpfResultPulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.06); } }
.dispatch-celebration-emoji { margin: 4px 0 6px; font-size: 30px; line-height: 1; animation: dispatchCelebration 1.25s ease-in-out infinite; }
.dispatch-attendance-cta { animation: dispatchCtaPulse 1.6s ease-in-out infinite; }
.dispatch-confetti-layer { position: fixed; inset: 0; z-index: 1000; overflow: hidden; pointer-events: none; }
.dispatch-confetti-piece { position: absolute; top: -18px; width: 9px; height: 15px; border-radius: 2px; opacity: 0; animation-name: dispatchConfettiFall; animation-timing-function: cubic-bezier(.15,.7,.2,1); animation-fill-mode: forwards; }
@keyframes dispatchCelebration { 0%, 100% { transform: translateY(0) rotate(-7deg) scale(1); } 50% { transform: translateY(-5px) rotate(7deg) scale(1.14); } }
@keyframes dispatchCtaPulse { 0%, 100% { transform: scale(1); box-shadow: 0 7px 23px rgba(33,118,243,.28); } 50% { transform: scale(1.025); box-shadow: 0 10px 36px rgba(76,143,255,.64); } }
@keyframes dispatchConfettiFall { 0% { opacity: 0; translate: 0 -24px; } 10% { opacity: 1; } 100% { opacity: 0; translate: calc((var(--drift, 0) - .5) * 180px) 108vh; rotate: 680deg; } }

@media (prefers-reduced-motion: reduce) {
  .dispatch-celebration-emoji, .dispatch-attendance-cta { animation: none; }
}

/* ── Info card inside waiting screen ── */
.info-card {
  background: var(--graphite-deeper); border: 1px solid var(--card-border);
  border-radius: var(--radius-sm); padding: 18px 20px;
  display: flex; align-items: flex-start; gap: 14px; margin-bottom: 20px; text-align: left;
}
.info-card svg { width: 20px; height: 20px; min-width: 20px; stroke: var(--blue); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; margin-top: 1px; }
.info-card p { font-size: 12px; color: var(--gray-light); line-height: 1.55; }
.info-card p strong { color: var(--white-pure); }

/* ── Social Proof ── */
.social-proof { margin-top: 24px; }
.proof-divider { height: 1px; background: linear-gradient(90deg, transparent, var(--card-border), transparent); margin-bottom: 20px; }
.proof-title { font-size: 10px; font-weight: 700; color: var(--gray); text-transform: uppercase; letter-spacing: 2px; margin-bottom: 14px; text-align: center; }
.proof-stats { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; margin-bottom: 16px; }
.proof-stat { text-align: center; background: var(--graphite-deeper); border: 1px solid var(--card-border); border-radius: var(--radius-sm); padding: 14px 6px; }
.proof-stat .num { font-family: 'Bebas Neue', sans-serif; font-size: 22px; color: var(--blue); letter-spacing: 1px; }
.proof-stat .lbl { font-size: 9px; color: var(--gray); text-transform: uppercase; letter-spacing: .5px; margin-top: 2px; font-weight: 700; }

.reviews { display: flex; flex-direction: column; gap: 8px; }
.review-card { background: var(--graphite-deeper); border: 1px solid var(--card-border); border-radius: var(--radius-sm); padding: 14px 16px; display: flex; gap: 12px; }
.review-avatar {
  width: 36px; height: 36px; min-width: 36px; border-radius: 50%;
  background: linear-gradient(135deg, var(--graphite), var(--graphite-dark));
  border: 1.5px solid var(--card-border);
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 14px; color: var(--blue);
}
.review-body { flex: 1; }
.review-name { font-size: 12px; font-weight: 700; color: var(--white-pure); }
.review-stars { margin: 3px 0; display: flex; gap: 1px; }
.review-stars svg { width: 12px; height: 12px; fill: #f4b740; }
.review-text { font-size: 11px; color: var(--gray); line-height: 1.5; }

/* ── Bank Marquee ── */
.marquee-section { padding: 20px 0 16px; flex-shrink: 0; overflow: hidden; position: relative; }
.marquee-section::before, .marquee-section::after { content: ''; position: absolute; top: 0; bottom: 0; width: 50px; z-index: 2; pointer-events: none; }
.marquee-section::before { left: 0; background: linear-gradient(90deg, var(--bg), transparent); }
.marquee-section::after { right: 0; background: linear-gradient(-90deg, var(--bg), transparent); }
.marquee-label { font-size: 9px; font-weight: 700; color: var(--gray); text-transform: uppercase; letter-spacing: 2.5px; text-align: center; margin-bottom: 14px; }
.marquee-track { display: flex; width: max-content; animation: marquee 35s linear infinite; }
@keyframes marquee { 0% { transform: translateX(0) } 100% { transform: translateX(-50%) } }
.marquee-item {
  flex-shrink: 0; height: 44px; width: 110px; margin: 0 18px;
  display: flex; align-items: center; justify-content: center;
  opacity: .4; transition: opacity .3s;
}
.marquee-item:hover { opacity: .7; }
.marquee-item img {
  max-height: 36px; max-width: 100px; width: auto; height: auto;
  object-fit: contain;
  filter: grayscale(100%) brightness(1.8);
  transition: filter .3s;
}
.marquee-item:hover img { filter: grayscale(50%) brightness(1.5); }

.footer { padding: 12px 0 22px; text-align: center; flex-shrink: 0; }
.footer p { font-size: 10px; color: var(--gray); opacity: .6; }
.lgpd-text { max-width: 480px; margin: 6px auto 0; font-size: 9px; line-height: 1.5; opacity: .5; }
.thank-you-wrapper { justify-content: flex-start; }
.thank-you-card { margin-top: 12px; }
.thank-you-content { text-align: center; padding-top: 38px; }
.thank-you-content .info-card { margin-top: 8px; }
.thank-you-back { display: inline-block; margin-top: 20px; color: #72a9ff; font-size: 12px; font-weight: 700; text-decoration: none; }

@media(max-width: 480px) {
  .quiz-wrapper { padding: 0 16px; }
  .card-inner { padding: 26px 18px 22px; }
  .step-title { font-size: 23px; }
  .logo-bar img { height: 36px; }
  .logo-bar.has-dual-logos img { height: 28px; }
  .logo-bar .logo-divider { font-size: 12px; }
  .cpf-estimate-card { align-items: flex-start; flex-direction: column; gap: 12px; padding: 15px; }
  .cpf-credit-value { width: 100%; flex-basis: auto; text-align: left; padding-left: 48px; }
  .cpf-credit-value strong { font-size: 20px; }
  .cpf-credit-margin { font-size: 12px; }
}
