/* Componentes — painéis, botões, hero, formulários */
.muted,
small {
  color: var(--muted);
}

.pill {
  background: var(--pill-bg);
  padding: 8px 12px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-soft);
  white-space: nowrap;
}

/* Hero de saldo / onboarding */
.hero {
  position: relative;
  overflow: hidden;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  background: var(--accent-grad);
  border-radius: var(--radius-lg);
  padding: 30px 24px;
  margin: 10px 0 26px;
  color: #fff;
  box-shadow: var(--shadow);
  isolation: isolate;
}

.hero::before {
  content: "";
  position: absolute;
  inset: -20% -10% auto auto;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  z-index: -1;
  animation: drift 8s ease-in-out infinite alternate;
}

.hero::after {
  content: "";
  position: absolute;
  left: -40px;
  bottom: -60px;
  width: 180px;
  height: 180px;
  border-radius: 40% 60% 55% 45%;
  background: rgba(255, 255, 255, 0.1);
  z-index: -1;
  animation: drift 10s ease-in-out infinite alternate-reverse;
}

.hero .hero-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  opacity: 0.9;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.hero .hero-value,
.hero strong {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 10vw, 3rem);
  font-weight: 800;
  display: block;
  margin: 14px 0 12px;
  letter-spacing: -0.04em;
  line-height: 1;
  animation: balanceIn 0.55s var(--ease);
}

.hero .hero-meta {
  font-size: 14px;
  opacity: 0.92;
}

.hero-art {
  position: absolute;
  right: 12px;
  bottom: 10px;
  width: 88px;
  height: 88px;
  opacity: 0.95;
  pointer-events: none;
}

/* Painel interativo (missão, formulário, ação) */
.card,
.panel {
  background: var(--surface);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 22px;
  margin: 16px 0;
  box-shadow: var(--shadow-soft);
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.panel-quiet {
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
  margin: 18px 0 8px;
}

.flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.btn {
  background: var(--ink);
  color: #fff;
  border: 0;
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  font-weight: 700;
  cursor: pointer;
  width: 100%;
  transition: transform 0.18s var(--ease), background 0.18s var(--ease), opacity 0.18s;
}

.btn:hover {
  background: var(--accent-deep);
}

.btn:active {
  transform: scale(0.98);
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.btn.secondary {
  background: rgba(15, 36, 32, 0.08);
  color: var(--ink);
}

.btn.secondary:hover {
  background: rgba(15, 36, 32, 0.14);
}

.btn.ghost {
  background: transparent;
  border: 1px solid var(--border-soft);
  color: var(--ink-soft);
}

.btn.accent {
  background: var(--accent);
}

.btn.compact {
  width: auto;
  display: inline-flex;
  padding: 10px 14px;
  font-size: 13px;
}

.tag {
  font-size: 12px;
  font-weight: 800;
  color: var(--money);
  white-space: nowrap;
  background: rgba(196, 92, 22, 0.1);
  padding: 6px 10px;
  border-radius: 10px;
}

.stat {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 18px 0 22px;
}

.stat .metric {
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px 16px;
  box-shadow: var(--shadow-soft);
}

.stat .metric small {
  display: block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.stat .metric strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.45rem;
  min-height: 1.2em;
  margin-top: 8px;
  letter-spacing: -0.03em;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-soft);
  margin-top: 6px;
}

input,
textarea,
select {
  width: 100%;
  padding: 15px 16px;
  background: var(--bg-2);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  color: var(--ink);
  margin: 8px 0 14px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(12, 143, 116, 0.15);
}

.notice {
  background: var(--notice-bg);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 13px;
  color: var(--notice-text);
  margin: 12px 0;
  border: 1px solid rgba(12, 143, 116, 0.15);
}

.steps {
  display: flex;
  gap: 8px;
  margin: 18px 0 10px;
}

.step-dot {
  height: 5px;
  flex: 1;
  border-radius: 99px;
  background: rgba(15, 36, 32, 0.12);
  transition: background 0.25s var(--ease), transform 0.25s var(--ease);
}

.step-dot.active {
  background: var(--accent);
  transform: scaleY(1.35);
}

.progress-bar {
  height: 10px;
  background: rgba(15, 36, 32, 0.08);
  border-radius: 99px;
  overflow: hidden;
  margin: 14px 0;
}

.progress-bar > span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-bright));
  width: 0;
  transition: width 0.35s var(--ease);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 96px;
  transform: translateX(-50%) translateY(16px);
  max-width: calc(var(--max-width) - 36px);
  width: calc(100% - 36px);
  background: var(--ink);
  color: #fff;
  padding: 13px 16px;
  border-radius: 16px;
  opacity: 0;
  pointer-events: none;
  transition: 0.28s var(--ease);
  z-index: 40;
  font-weight: 600;
  box-shadow: var(--shadow);
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.history-list {
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 6px 16px;
  box-shadow: var(--shadow-soft);
}

.history-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

.history-row:last-child {
  border-bottom: 0;
}

.history-row .amount-pos {
  color: var(--accent-deep);
}

.history-row .amount-neg {
  color: var(--danger);
}

.quiz-option {
  display: block;
  width: 100%;
  text-align: left;
  margin: 8px 0;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-soft);
  background: var(--bg-2);
  color: var(--ink);
  cursor: pointer;
  font-weight: 600;
  transition: border-color 0.2s, background 0.2s, transform 0.15s;
}

.quiz-option:hover {
  border-color: var(--accent);
}

.quiz-option.selected {
  border-color: var(--accent);
  background: rgba(12, 143, 116, 0.1);
  box-shadow: inset 0 0 0 1px var(--accent);
}

.mission-tile {
  display: grid;
  gap: 14px;
}

.mission-tile .tile-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  min-width: 0;
}

.mission-tile h3 {
  margin: 0;
  font-size: 1.05rem;
  font-family: var(--font-display);
  min-width: 0;
  flex: 1;
  overflow-wrap: anywhere;
}

.mission-tile .tag {
  flex-shrink: 0;
}

.cta-block {
  margin-top: 8px;
}

.cta-block p {
  margin: 0 0 14px;
  color: var(--muted);
}

.code-display {
  font-family: var(--font-display);
  font-size: 1.8rem;
  letter-spacing: 0.06em;
  margin: 8px 0 14px;
}

/* Onboarding full composition */
.onboard {
  display: flex;
  flex-direction: column;
  flex: 1;
  width: 100%;
  max-width: 100%;
  min-height: calc(100dvh - 40px);
  min-width: 0;
}

.onboard-stage {
  position: relative;
  flex: 0 0 auto;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: min(44vh, 340px);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--accent-grad);
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 28px 22px;
  box-shadow: var(--shadow);
  margin-bottom: 20px;
  box-sizing: border-box;
}

.onboard-stage::before {
  content: "";
  position: absolute;
  right: -30%;
  top: -25%;
  width: 70%;
  height: 70%;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  pointer-events: none;
}

.onboard-stage::after {
  content: "";
  position: absolute;
  left: -20%;
  bottom: -35%;
  width: 55%;
  height: 55%;
  border-radius: 40% 60% 55% 45%;
  background: rgba(255, 255, 255, 0.1);
  pointer-events: none;
}

.onboard-stage .brand,
.onboard-stage .tagline,
.onboard-stage p {
  position: relative;
  z-index: 1;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.onboard-stage .brand {
  font-size: clamp(2.2rem, 10vw, 3rem);
  margin: 0 0 12px;
  line-height: 1.05;
  color: #fff;
  letter-spacing: -0.04em;
}

.onboard-stage .tagline {
  margin: 0 0 12px;
  font-size: 1.12rem;
  font-weight: 700;
  line-height: 1.35;
  opacity: 1;
}

.onboard-stage p {
  margin: 0;
  font-size: 1.02rem;
  line-height: 1.45;
  opacity: 0.95;
}

.onboard-visual {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.onboard-actions {
  display: grid;
  gap: 8px;
}

@keyframes drift {
  from {
    transform: translate(0, 0) scale(1);
  }
  to {
    transform: translate(-18px, 12px) scale(1.08);
  }
}

@keyframes balanceIn {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.terms-text {
  white-space: pre-wrap;
  font-family: var(--font);
  font-size: 13px;
  line-height: 1.45;
  color: var(--ink-soft);
  max-height: 40vh;
  overflow: auto;
  margin: 0 0 12px;
}

.video-wrap {
  position: relative;
  width: 100%;
  max-width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #0b1a16;
  margin: 12px 0 14px;
  border: 1px solid var(--border);
}

.video-wrap iframe,
.video-wrap video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  object-fit: contain;
  background: #000;
}

@media (max-width: 420px) {
  .onboard-stage {
    padding: 26px 20px;
    min-height: min(42vh, 300px);
  }

  .hero .hero-value,
  .hero strong {
    font-size: clamp(2.2rem, 11vw, 2.7rem);
  }

  .pill {
    flex-shrink: 0;
  }
}
