/* Telas do onboarding (confirmar e-mail, perguntas, link de verificação,
   pós-pagamento). Mesmo sistema do login/cadastro: tokens, fonte Geist (via
   _font.j2), input e botão do login. Carregar ANTES do auth-layout.css, que
   monta o split com as fotos a partir de 900px. Abaixo disso a página fica só
   com o conteúdo, como no login. */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
    --bg: oklch(0.06 0.005 250);
    --text: oklch(0.93 0 0); --text2: oklch(0.62 0 0); --text3: oklch(0.55 0 0); --text4: oklch(0.48 0 0);
    --line: oklch(1 0 0 / 0.1); --line-strong: oklch(1 0 0 / 0.2);
    --fill: oklch(1 0 0 / 0.03); --fill-hover: oklch(1 0 0 / 0.055);
    --found: #a3e635; --danger: #ef4444;
    --fd: 'Space Grotesk', sans-serif; --fb: 'Inter', system-ui, sans-serif;
}
html { min-height: 100%; overflow-x: clip; }
body {
    font-family: var(--fb); background: var(--bg); color: var(--text);
    min-height: 100vh; display: flex; flex-direction: column;
    padding: 4.5rem 1.25rem 2.5rem; -webkit-font-smoothing: antialiased; overflow-x: clip;
}
.auth-split, .auth-pane-form { display: block; width: 100%; }
.auth-card { width: 100%; max-width: 460px; margin: 0 auto; text-align: left; }
.auth-lang { position: absolute; top: 1rem; right: 1rem; z-index: 10; }

.auth-logo { display: inline-flex; align-items: center; gap: 0.5rem; margin-bottom: 2.25rem; font-weight: 700; font-size: 1.125rem; color: var(--text); text-decoration: none; }
.auth-title { font-size: clamp(1.75rem, 6vw, 2.25rem); line-height: 1.08; text-wrap: balance; font-weight: 700; letter-spacing: -0.025em; margin-bottom: 0.75rem; }
.auth-subtitle { color: var(--text2); font-size: 0.9375rem; line-height: 1.55; margin-bottom: 2rem; }
.nw { white-space: nowrap; }
.auth-subtitle strong { color: var(--text); font-weight: 600; overflow-wrap: anywhere; }

.auth-input {
    width: 100%; padding: 12px 14px; min-height: 48px;
    background: var(--fill); border: 1px solid var(--line); border-radius: 9px;
    color: var(--text); font: inherit; font-size: 0.9375rem;
    outline: 2px solid transparent; outline-offset: 2px;
    transition: border-color 150ms, outline-color 150ms, background 150ms;
}
.auth-input:hover { border-color: var(--line-strong); background: var(--fill-hover); }
.auth-input:focus-visible { border-color: var(--found); outline-color: var(--found); }
.auth-input::placeholder { color: var(--text4); }
.auth-input.code { font-family: 'Geist Mono', ui-monospace, monospace; font-size: 1.375rem; font-weight: 600; letter-spacing: 0.4em; text-align: center; }
.auth-input.code::placeholder { font-family: var(--fb); font-size: 0.9375rem; font-weight: 400; letter-spacing: normal; }

.auth-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    width: 100%; min-height: 48px; padding: 0 18px; margin-top: 0.75rem;
    background: var(--found); color: #0b0b0d; border: 1px solid var(--found); border-radius: 9px;
    font: inherit; font-size: 0.9375rem; font-weight: 600; text-decoration: none; cursor: pointer;
    transition: transform 150ms, opacity 150ms, border-color 150ms, color 150ms;
}
.auth-btn:hover { transform: translateY(-1px); }
.auth-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.auth-btn.ghost { background: transparent; color: var(--text2); border-color: var(--line); }
.auth-btn.ghost:hover { color: var(--text); border-color: var(--line-strong); }
.auth-btn:focus-visible, .auth-link:focus-visible, .opt:focus-visible, .back-btn:focus-visible { outline: 2px solid var(--found); outline-offset: 3px; }

.auth-status { min-height: 1.3em; margin-top: 0.9rem; font-size: 0.8125rem; color: var(--text2); }
.auth-status.err { color: var(--danger); }
.auth-footer { margin-top: 2rem; font-size: 0.875rem; color: var(--text3); line-height: 1.6; }
.auth-link { background: none; border: none; padding: 0; font: inherit; color: var(--text); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.auth-link:hover { color: #fff; }

/* Progresso das perguntas: texto + linha fina, sem pílula. */
.progress { display: flex; align-items: center; gap: 12px; margin-bottom: 1.75rem; font-size: 0.8125rem; color: var(--text3); font-variant-numeric: tabular-nums; }
.progress-bar { flex: 1; height: 2px; background: var(--line); border-radius: 2px; overflow: hidden; }
.progress-fill { height: 100%; width: 25%; background: var(--text); transition: width 300ms ease; }

.step { display: none; }
.step.on { display: block; animation: step-in 280ms ease both; }
@keyframes step-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* Opções no estilo dos cartões de login (Google / GitHub / e-mail). */
.opts { display: grid; gap: 8px; grid-template-columns: 1fr; }
.opts.grid3 { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 520px) { .opts.grid3 { grid-template-columns: repeat(3, 1fr); } .opts.grid2 { grid-template-columns: repeat(2, 1fr); } }
.opt {
    display: flex; align-items: center; gap: 12px; width: 100%; min-height: 52px; padding: 12px 14px;
    background: var(--fill); border: 1px solid var(--line); border-radius: 12px;
    color: var(--text); font: inherit; font-size: 0.9375rem; font-weight: 500; text-align: left; cursor: pointer;
    transition: background 150ms, border-color 150ms, transform 150ms;
}
.opt:hover { background: var(--fill-hover); border-color: var(--line-strong); transform: translateY(-1px); }
.opt.selected { border-color: var(--found); background: oklch(1 0 0 / 0.06); }
.opt .logo-icon { width: 20px; height: 20px; flex: 0 0 auto; }
.opt .label { flex: 1; line-height: 1.25; }
.opts:not(.grid3) .opt::after { content: "\2192"; color: var(--text4); font-size: 1rem; }

.nav { display: flex; align-items: center; justify-content: space-between; min-height: 44px; margin-top: 1.25rem; }
.back-btn { display: inline-flex; align-items: center; gap: 6px; padding: 10px 2px; background: none; border: none; color: var(--text3); font: inherit; font-size: 0.875rem; cursor: pointer; }
.back-btn:hover { color: var(--text); }
.save-status { font-size: 0.8125rem; color: var(--text3); }

/* Estado com ícone (pós-pagamento, link de verificação). */
.state-icon { width: 44px; height: 44px; display: grid; place-items: center; margin-bottom: 1.5rem; border-radius: 50%; border: 1px solid var(--line-strong); color: var(--text); }
.state-icon svg { width: 22px; height: 22px; }
.state-icon.ok { color: var(--found); border-color: oklch(0.85 0.2 125 / 0.45); }
.state-icon.bad { color: var(--danger); border-color: rgba(220, 38, 38, 0.45); }
.spin { animation: spin 900ms linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.state { display: none; }
.state.on { display: block; }

@media (min-width: 900px) {
    /* O auth-layout.css esconde logo/subtítulo/voltar do formulário (vão pra foto).
       Aqui o subtítulo carrega a informação da tela, então volta. */
    .auth-pane-form .auth-card .auth-subtitle { display: block; }
    .auth-split .auth-pane-form .auth-card { max-width: 480px; }
    /* Perguntas: título um pouco menor que o do login, pra caber em 2 linhas. */
    .auth-pane-form .step .auth-title { font-size: clamp(1.875rem, 2.5vw, 2.375rem); }
}
@media (prefers-reduced-motion: reduce) {
    .step.on, .spin { animation: none; }
    .auth-btn, .opt, .progress-fill { transition: none; }
    .auth-btn:hover, .opt:hover { transform: none; }
}
