:root {
  --bg: #02030a;
  --accent: #8fb6ff;
  --accent-warm: #ffb05a;
  --accent-cyan: #6ad4ff;
  --gold: #ffd58a;
  --text: #e6ecf5;
  --text-dim: #8a96ad;
  --panel-bg: rgba(8, 12, 22, 0.62);
  --panel-border: rgba(143, 182, 255, 0.20);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  min-height: 100vh;
  width: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ─────────────── Backgrounds em camadas ─────────────── */
.bg-earth {
  position: fixed;
  inset: -10%;
  background:
    radial-gradient(circle at 32% 48%, rgba(40, 90, 160, 0.35) 0%, transparent 55%),
    url("planets/textures/1k_earth_daymap.jpg") no-repeat center / cover;
  filter: blur(40px) brightness(0.42) saturate(1.15);
  transform: scale(1.18);
  z-index: -3;
}

.bg-stars {
  position: fixed;
  inset: 0;
  background-image:
    radial-gradient(1.4px 1.4px at 12% 24%, rgba(255,255,255,0.9), transparent 60%),
    radial-gradient(1px 1px at 78% 8%, rgba(255,255,255,0.7), transparent 60%),
    radial-gradient(1.6px 1.6px at 45% 18%, rgba(255,255,255,0.85), transparent 60%),
    radial-gradient(1px 1px at 20% 70%, rgba(255,255,255,0.6), transparent 60%),
    radial-gradient(1.2px 1.2px at 88% 55%, rgba(143,182,255,0.7), transparent 60%),
    radial-gradient(1px 1px at 62% 82%, rgba(255,213,138,0.6), transparent 60%),
    radial-gradient(1.4px 1.4px at 8% 90%, rgba(255,255,255,0.7), transparent 60%),
    radial-gradient(1px 1px at 92% 92%, rgba(106,212,255,0.6), transparent 60%),
    radial-gradient(1.2px 1.2px at 30% 38%, rgba(255,255,255,0.55), transparent 60%),
    radial-gradient(1px 1px at 70% 45%, rgba(255,255,255,0.6), transparent 60%);
  z-index: -2;
  opacity: 0.85;
  animation: stars-drift 90s linear infinite;
}

@keyframes stars-drift {
  from { transform: translate(0, 0); }
  to   { transform: translate(-2%, -2%); }
}

.bg-darken {
  position: fixed;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(2, 3, 10, 0.55) 0%, rgba(2, 3, 10, 0.25) 40%, rgba(2, 3, 10, 0.75) 100%);
  z-index: -1;
}

/* ─────────────── Header ─────────────── */
.su-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 5;
  padding: 1.1rem 1.8rem;
  display: flex;
  align-items: flex-start;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(2,3,10,0.55) 0%, transparent 100%);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.8rem;
  letter-spacing: 0.28em;
  color: var(--text);
  text-decoration: none;   /* .brand agora é link (volta ao índice) */
  cursor: pointer;
  padding-top: 0.35rem;
}
.brand-mark {
  color: var(--accent-warm);
  font-size: 1rem;
  text-shadow: 0 0 12px rgba(255, 176, 90, 0.6);
}
.brand-sep, .brand-section { color: var(--text-dim); }

/* ─────────────── Main / Card ─────────────── */
.su-main {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6rem 1.4rem 4rem;
}

.su-card {
  width: 100%;
  max-width: 540px;
  background: rgba(248, 250, 255, 0.97);
  border: 1px solid rgba(180, 195, 220, 0.55);
  border-radius: 8px;
  backdrop-filter: blur(18px) saturate(1.05);
  -webkit-backdrop-filter: blur(18px) saturate(1.05);
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(255, 255, 255, 0.6) inset;
  padding: 2.6rem 2.4rem 2.4rem;
  color: #1a2030;
  animation: card-rise 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.su-card[hidden] { display: none; }

@keyframes card-rise {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.su-tag {
  display: inline-block;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.66rem;
  letter-spacing: 0.28em;
  color: #1e6ba0;
  padding: 0.35rem 0.7rem;
  background: rgba(106, 212, 255, 0.14);
  border: 1px solid rgba(30, 107, 160, 0.35);
  border-radius: 3px;
  margin-bottom: 1.2rem;
}
.su-tag.warn {
  color: #a05a14;
  background: rgba(255, 176, 90, 0.14);
  border-color: rgba(160, 90, 20, 0.35);
}

.su-title {
  font-family: "Chakra Petch", sans-serif;
  font-weight: 700;
  font-size: clamp(1.7rem, 3.5vw, 2.2rem);
  letter-spacing: 0.02em;
  color: #1a2030;
  line-height: 1.15;
  margin-bottom: 0.9rem;
}

.su-sub {
  font-size: 0.95rem;
  line-height: 1.65;
  color: rgba(40, 50, 75, 0.72);
  margin-bottom: 1.8rem;
}

/* Pílula do email verificado */
.su-email-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.45rem 0.85rem;
  background: rgba(74, 222, 128, 0.14);
  border: 1px solid rgba(30, 138, 70, 0.4);
  border-radius: 100px;
  margin-bottom: 1.3rem;
  font-size: 0.8rem;
  max-width: 100%;
}
.pill-label {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #1a8a45;
}
.pill-value {
  color: #1a2030;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 240px;
}
.pill-check {
  color: #1a8a45;
  font-size: 0.95rem;
}

/* ─────────────── Form ─────────────── */
.su-form {
  display: flex;
  flex-direction: column;
  gap: 1.3rem;
}

.su-field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.su-field-label {
  display: block;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.62rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #2d4070;
  line-height: 1.4;
}

/* Aviso de segunda linha — destaque âmbar, menor que o label */
.su-field-warn {
  display: block;
  margin-top: 0.35rem;
  font-family: "Inter", sans-serif;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: none;
  color: #a05a14;
  line-height: 1.4;
}
.su-field-warn::before {
  content: "⚠ ";
  font-size: 0.85rem;
  margin-right: 0.15rem;
}

.su-input {
  width: 100%;
  padding: 0.85rem 1rem;
  background: #ffffff;
  border: 1px solid rgba(60, 80, 120, 0.25);
  border-radius: 4px;
  color: #1a2030;
  font-family: "Inter", sans-serif;
  font-size: 1rem;
  outline: none;
  transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.su-input::placeholder { color: rgba(60, 80, 120, 0.42); }

.su-input:focus {
  background: #ffffff;
  border-color: rgba(180, 128, 50, 0.6);
  box-shadow: 0 0 0 3px rgba(255, 176, 90, 0.18);
}

/* date picker — indicador escuro padrão funciona bem em fundo branco */
.su-input[type="date"]::-webkit-calendar-picker-indicator {
  opacity: 0.55;
  cursor: pointer;
}

/* select de sexo — remove a aparência nativa e adiciona uma seta própria */
select.su-select {
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  padding-right: 2.4rem;
  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 d='M1 1l5 5 5-5' fill='none' stroke='%232d4070' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
}

/* enquanto nada foi escolhido (option vazia), o texto aparece como placeholder */
select.su-select:has(option[value=""]:checked) {
  color: rgba(60, 80, 120, 0.42);
}

.su-field-hint {
  font-size: 0.78rem;
  color: rgba(40, 50, 75, 0.6);
  line-height: 1.45;
  font-style: italic;
}

/* ─── Steps do wizard ─── */
.su-step[hidden] { display: none; }
.su-step:not([hidden]) {
  animation: step-in 0.4s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
@keyframes step-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ─── Tela de confirmação ─── */
.su-confirm {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-bottom: 1.8rem;
}
.confirm-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: 0.95rem 1.1rem;
  background: rgba(143, 182, 255, 0.08);
  border: 1px solid rgba(143, 182, 255, 0.22);
  border-radius: 4px;
}
.confirm-row dt {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.62rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #2d4070;
}
.confirm-row dd {
  font-family: "Inter", sans-serif;
  font-size: 1rem;
  font-weight: 500;
  color: #1a2030;
  text-align: right;
  max-width: 60%;
  word-break: break-word;
}

/* ─── Grupo de botões (Editar | Confirmar) ─── */
.su-btn-row {
  display: flex;
  gap: 0.8rem;
}
.su-btn-row .su-btn {
  flex: 1;
  margin-top: 0;
}

/* Variante ghost (secundária — Editar) */
.su-btn.ghost {
  background: transparent;
  border: 1px solid rgba(60, 80, 120, 0.4);
  color: #2d4070;
  box-shadow: none;
}
.su-btn.ghost:hover {
  background: rgba(143, 182, 255, 0.1);
  border-color: rgba(60, 80, 120, 0.6);
  filter: none;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
}
.su-btn-arrow.back { transition: transform 0.2s; }
.su-btn.ghost:hover .su-btn-arrow.back { transform: translateX(-3px); }

/* ─── Erro de validação (senha) ─── */
.su-field-error {
  font-size: 0.78rem;
  color: #c84545;
  line-height: 1.4;
  font-weight: 500;
}
.su-field-error[hidden] { display: none; }
.su-field-error::before {
  content: "✕ ";
  font-weight: 700;
}

@media (max-width: 540px) {
  .su-btn-row { flex-direction: column-reverse; }   /* Confirmar fica em cima */
  .confirm-row dd { max-width: 50%; font-size: 0.92rem; }
}

/* Botão Avançar — estilo CTA dourado */
.su-btn {
  margin-top: 0.6rem;
  align-self: stretch;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  padding: 1.05rem 1.4rem;
  background: linear-gradient(135deg, #ffd58a 0%, #ffb05a 100%);
  border: 1px solid rgba(255, 213, 138, 0.5);
  border-radius: 4px;
  color: #1a1408;
  font-family: "Chakra Petch", sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  box-shadow:
    0 12px 32px rgba(255, 176, 90, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
  transition: transform 0.15s, box-shadow 0.2s, filter 0.2s;
}

.su-btn:hover {
  filter: brightness(1.08);
  box-shadow:
    0 16px 42px rgba(255, 176, 90, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.4);
  transform: translateY(-1px);
}
.su-btn:active { transform: translateY(0); }

.su-btn-arrow {
  font-size: 1.1rem;
  line-height: 1;
  transition: transform 0.2s;
}
.su-btn:hover .su-btn-arrow { transform: translateX(3px); }

/* ─────────────── Erro / link expirado ─────────────── */
.error-card {
  text-align: center;
}
.error-card .su-btn {
  margin-top: 1.5rem;
  display: inline-flex;
  align-self: center;
}

/* ─────────────── Mobile ─────────────── */
@media (max-width: 540px) {
  .su-card { padding: 2rem 1.5rem 1.8rem; }
  .su-header { padding: 0.9rem 1.2rem; }
  .brand { font-size: 0.7rem; letter-spacing: 0.22em; }
  .pill-value { max-width: 160px; }
}

/* ===== Checkbox de termos + modal ===== */
.su-terms { display: flex; align-items: flex-start; gap: 0.6rem; font-size: 0.85rem; color: #3a4762; line-height: 1.45; cursor: pointer; }
.su-terms input { width: 18px; height: 18px; margin-top: 1px; accent-color: #ffb05a; flex-shrink: 0; cursor: pointer; }
.su-terms-link { color: #1e6ba0; text-decoration: underline; cursor: pointer; }
.su-terms-link:hover { color: #155a8a; }

/* Captcha (Turnstile) — abaixo dos termos, antes do botão */
.su-captcha { margin: 0.1rem 0; min-height: 65px; }

.terms-overlay { position: fixed; inset: 0; z-index: 80; display: flex; align-items: center; justify-content: center; padding: 1.2rem; }
.terms-overlay[hidden] { display: none; }
.terms-backdrop { position: absolute; inset: 0; background: rgba(10, 14, 24, 0.6); backdrop-filter: blur(2px); }
.terms-modal { position: relative; width: min(560px, 100%); max-height: 85vh; overflow-y: auto; padding: 1.9rem 1.8rem 1.6rem; background: #fff; border-radius: 14px; box-shadow: 0 30px 80px rgba(0,0,0,0.4); color: #1a2030; }
.terms-close { position: absolute; top: 1rem; right: 1rem; width: 30px; height: 30px; display: flex; align-items: center; justify-content: center; background: transparent; border: 1px solid rgba(60,80,120,0.25); border-radius: 50%; color: #2d4070; cursor: pointer; }
.terms-close:hover { background: rgba(143,182,255,0.14); }
.terms-title { margin: 0 0 1.1rem; font-family: "Chakra Petch","Inter",sans-serif; font-size: 1.3rem; color: #1a2030; }
.terms-body { font-size: 0.9rem; line-height: 1.6; color: #3a4762; }
.terms-body p { margin: 0 0 0.85rem; }
.terms-body strong { color: #1a2030; }
.terms-note { font-style: italic; color: #8a93ab; }
