/*
  Telas de conta (F3, 24/10/2026): entrar, criar conta, senhas, ativar, obrigado, Minha conta e o acesso ao painel.
  Referências: web.dev (formulário de login), GOV.UK (senha e erros), Vercel e Linear (coluna única, um verbo por botão).
  Desktop: coluna do formulário à esquerda e, à direita, a tela real do app (telemetria). Celular: só a coluna, 16 px de
  margem, campos de 48 px. Identidade do app: fundo #0F0F11, superfície #1A1A1E, divisória #26262B, azul #2563EB só em
  ação, Inter e Cascadia Mono. Sem degradê, brilho ou card dentro de card. Carrega depois de site.css e ganha dele.
*/
:root {
  --bg: #0F0F11; --sup: #1A1A1E; --realce: #212126; --linha: #26262B; --linha-2: #3A3A40;
  --ink: #F4F4F5; --muted: #A1A1AA; --muted-2: #8B8B94;
  --azul: #2563EB; --azul-hover: #1D4ED8; --foco: #3B82F6; --link: #60A5FA;
  --verde: #22C55E; --ambar: #F5A524; --vermelho: #F87171;
  --fonte: 'Inter', 'Segoe UI Variable Text', 'Segoe UI', system-ui, -apple-system, Roboto, sans-serif;
  --medir: 'Cascadia Mono', 'Cascadia Code', Consolas, ui-monospace, monospace;
  color-scheme: dark;
}
body.auth { display: block; min-height: 100vh; background: var(--bg); font-size: 16px; }
.numero, .num { font-family: var(--medir); font-variant-numeric: tabular-nums; }

/* Composição */
.auth-grade { display: grid; min-height: 100vh; }
.auth-coluna { display: flex; flex-direction: column; min-width: 0; padding: 20px 16px 24px; }
.auth-topo { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.auth-topo .marca { font-size: 16px; }
.auth-topo .marca img { width: 28px; height: 28px; border-radius: 7px; }
.voltar { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; color: var(--muted); font-size: 14px; font-weight: 500; text-decoration: none; }
.voltar:hover { color: var(--ink); }
.voltar svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.auth main { flex: 1; display: flex; align-items: center; padding-block: 32px; }
.auth-rodape { display: flex; flex-wrap: wrap; gap: 8px 20px; color: var(--muted-2); font-size: 13px; }
.auth-rodape a { color: var(--muted); text-decoration: none; }
.auth-rodape a:hover { color: var(--ink); text-decoration: underline; }

/* A coluna do formulário: título, o painel (formulário ou estado) e, por último, as notas de confiança */
.auth .porta { display: flex; flex-direction: column; gap: 24px; width: 100%; max-width: 420px; margin-inline: auto; padding: 0; }
.auth .porta-lado.cabeca { display: contents; }
.auth .cabeca > div:first-child { order: 1; }
.auth .cabeca h1 { max-width: none; font-size: clamp(26px, 5vw, 30px); line-height: 1.2; letter-spacing: -0.015em; font-weight: 650; }
.auth .cabeca .intro { margin-top: 8px; max-width: none; color: var(--muted); font-size: 15px; }
.auth .cabeca .acoes { order: 2; }
.auth .painel { order: 2; padding: 0; border-radius: 0; background: none; }
.auth .painel > h2 { color: var(--muted); font-size: 13px; font-weight: 500; line-height: 1.4; }
.auth .painel > * + * { margin-top: 16px; }
.auth .fatos { order: 3; gap: 10px; max-width: none; padding-top: 20px; border-top: 1px solid var(--linha); color: var(--muted-2); font-size: 13px; }
.auth .fatos svg { color: var(--muted-2); }

/* Campos: rótulo acima, 48 px, erro na linha do campo */
.auth .form { gap: 18px; }
.auth .campo > label, .auth .rotulo label { color: var(--ink); font-size: 14px; }
.auth .rotulo a { font-size: 13px; }
.auth .campo input { height: 48px; padding: 0 14px; border-color: var(--linha-2); border-radius: 8px; background: var(--sup); font-size: 16px; }
.auth .campo input::placeholder { color: var(--muted-2); }
.auth .campo input[aria-invalid="true"] { border-color: var(--vermelho); }
.auth .erro-campo { display: flex; gap: 6px; align-items: flex-start; font-size: 13px; color: var(--vermelho); }
.auth .erro-campo::before { content: "!"; display: grid; place-items: center; flex: none; width: 14px; height: 14px; margin-top: 2px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--vermelho); font: 700 10px/1 var(--fonte); }
.auth .dica { color: var(--muted-2); font-size: 13px; }
.auth .ver-senha { min-width: 76px; font-size: 13px; }
.auth .nota { color: var(--muted-2); font-size: 13px; }
.auth .rodape-form { padding-top: 0; border-top: 0; color: var(--muted); font-size: 14px; text-align: center; }
.auth a { color: var(--link); }
.auth .marca { color: var(--ink); }
.auth a.botao { text-decoration: none; }
.auth a.botao-principal { color: #fff; }
.auth a.botao-linha { color: var(--ink); }
.auth .voltar { color: var(--muted); }
.auth .voltar:hover { color: var(--ink); }
.auth .auth-rodape a { color: var(--muted); }
.auth .auth-rodape a:hover { color: var(--ink); }
.auth .erro-campo:empty { display: none; }
.auth .painel, .auth .form, .auth .campo, .auth .entrada { width: 100%; max-width: none; }

/* Força da senha (auth-ui.js) */
.forca { display: grid; gap: 6px; }
.forca-barras { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.forca-barras i { height: 4px; border-radius: 2px; background: var(--linha); transition: background-color 150ms ease-out; }
.forca[data-nivel="1"] i:nth-child(-n+1) { background: var(--vermelho); }
.forca[data-nivel="2"] i:nth-child(-n+2) { background: var(--ambar); }
.forca[data-nivel="3"] i:nth-child(-n+3) { background: var(--verde); }
.forca[data-nivel="4"] i { background: var(--verde); }
.forca-texto { color: var(--muted); font-size: 13px; }

/* Botões: 48 px, carregando com indicador sem mudar a largura */
.auth .botao { border-radius: 8px; font-weight: 600; }
.auth .botao-grande { min-height: 48px; font-size: 15px; }
.auth .botao[aria-busy="true"] { position: relative; opacity: 1; }
.auth .botao[aria-busy="true"]::before { content: ""; width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(255,255,255,.35); border-top-color: #fff; animation: girar 700ms linear infinite; }
.auth .botao-linha[aria-busy="true"]::before { border-color: var(--linha-2); border-top-color: var(--ink); }
@keyframes girar { to { transform: rotate(360deg); } }

/* Avisos: tom humano, sem cara de alerta de sistema */
.auth .aviso { padding: 14px 16px; border-radius: 10px; background: var(--sup); box-shadow: inset 0 0 0 1px var(--linha); font-size: 14px; }
.auth .aviso-erro { box-shadow: inset 0 0 0 1px rgba(248, 113, 113, .35); }

/* Vitrine do desktop: a tela real do app */
.vitrine { display: none; }
@media (min-width: 1024px) {
  .auth-grade { grid-template-columns: minmax(480px, 1fr) minmax(0, 1.1fr); }
  .auth-coluna { padding: 28px 48px 32px; }
  .vitrine { position: sticky; top: 0; display: flex; flex-direction: column; justify-content: center; gap: 28px; height: 100vh; padding: 48px 0 48px 56px; overflow: hidden; background: #131316; box-shadow: inset 1px 0 0 var(--linha); }
  .vitrine-texto { max-width: 460px; padding-right: 48px; }
  .vitrine-texto p:first-child { color: var(--ink); font-size: 22px; font-weight: 600; line-height: 1.3; letter-spacing: -0.01em; }
  .vitrine-texto p + p { margin-top: 10px; color: var(--muted); font-size: 15px; }
  .vitrine img { width: 900px; max-width: none; border-radius: 10px 0 0 10px; box-shadow: 0 0 0 1px var(--linha); }
  .vitrine ul { display: flex; gap: 28px; margin: 0; padding: 0; list-style: none; color: var(--muted); font-size: 13px; }
  .vitrine ul b { display: block; color: var(--ink); font: 600 20px/1.2 var(--medir); }
}

/* Minha conta: página de quem já entrou, não de login. Sem vitrine; topo de largura total (marca à esquerda, Voltar ao
   site e Sair à direita) e conteúdo centralizado em até 1040 px, com cada seção num cartão: rótulo à esquerda e conteúdo
   à direita a partir de 860 px, empilhado no celular. */
.auth-topo-acoes { display: flex; align-items: center; gap: 16px; }
.auth-topo-acoes .botao-pequeno { min-height: 36px; padding: 0 12px; font-size: 14px; }
.auth-topo-acoes .botao svg { width: 16px; height: 16px; }
.auth-larga .auth-grade { grid-template-columns: minmax(0, 1fr); }
.auth-larga .auth-coluna { width: 100%; max-width: none; margin: 0; padding: 0; }
.auth-larga .auth-topo { width: 100%; padding: 16px max(16px, calc((100% - 1040px) / 2)); box-shadow: inset 0 -1px 0 var(--linha); }
.auth-larga main { display: block; padding: 0 16px 48px; }
.auth-larga main > .wrap { width: 100%; max-width: 1040px; margin-inline: auto; }
.auth-larga .auth-rodape { width: 100%; padding: 24px max(16px, calc((100% - 1040px) / 2)); box-shadow: inset 0 1px 0 var(--linha); }
.auth-larga .conta-topo { padding-block: 40px 24px; }
.auth-larga .conta-topo h1 { font-size: clamp(28px, 4vw, 34px); letter-spacing: -0.015em; }
.auth-larga .conta-topo p { font-family: var(--medir); font-size: 14px; }
.auth-larga [data-conta] { display: grid; gap: 16px; }
.auth-larga [data-conta][hidden] { display: none; }
.auth-larga .linha { grid-template-columns: minmax(0, 1fr); gap: 16px; padding: 24px; border: 0; border-radius: 12px; background: var(--sup); box-shadow: inset 0 0 0 1px var(--linha); }
.auth-larga .linha:last-child { padding-bottom: 24px; }
.auth-larga .linha-titulo h2 { font-size: 17px; }
.auth-larga .linha-titulo p { max-width: none; }
.auth-larga main > .wrap > .aviso { margin-bottom: 16px; }
@media (min-width: 860px) {
  .auth-larga .linha { grid-template-columns: 260px minmax(0, 1fr); gap: 40px; padding: 28px 32px; }
  .auth-larga .linha-titulo p { max-width: 30ch; }
}

@media (prefers-reduced-motion: reduce) {
  .auth .botao[aria-busy="true"]::before { animation-duration: 2s; }
  .forca-barras i { transition: none; }
}

/*
  Porta única (25/10/2026, pedido do Ruã: "tá muito vibe codado"). As telas de entrar, criar conta, senhas, ativar e
  obrigado viram um cartão só no centro, como Linear, Vercel e Clerk: marca em cima, título curto, Google e Apple
  primeiro, "ou com email" e o formulário; as notas de confiança descem para o pé do cartão. Sai a captura gigante do
  lado (a vitrine), que disputava o olho com o formulário. A assinatura da marca fica no fundo: a mesma linha de
  telemetria do app, agitada em cinza e calma em azul, bem apagada. Nada de spinner ao abrir: tudo já vem no HTML.
*/
body.auth:not(.auth-larga) {
  background-color: #0B0B0D;
  background-image: url("/assets/fundo-linha.svg"), url("/assets/fundo-pontos.svg");
  background-repeat: no-repeat, repeat;
  background-position: center bottom 64px, 0 0;
  background-size: 100% 240px, 20px 20px;
}
body.auth:not(.auth-larga) .vitrine { display: none; }
body.auth:not(.auth-larga) .auth-grade { grid-template-columns: minmax(0, 1fr); }
body.auth:not(.auth-larga) .auth-coluna { padding: 20px 24px 24px; }
body.auth:not(.auth-larga) main { align-items: flex-start; padding-block: clamp(24px, 7vh, 72px) 40px; }
body.auth:not(.auth-larga) .auth-rodape { justify-content: center; }

body.auth:not(.auth-larga) .porta {
  max-width: 440px; gap: 20px; padding: 32px; border-radius: 16px; background: #141417;
  box-shadow: inset 0 0 0 1px var(--linha), 0 1px 0 rgba(255, 255, 255, .03) inset, 0 24px 64px rgba(0, 0, 0, .45);
  animation: porta-sobe 360ms cubic-bezier(.2, 0, 0, 1);
}
@keyframes porta-sobe { from { opacity: 0; transform: translateY(8px); } }
body.auth:not(.auth-larga) .cabeca > div:first-child { text-align: center; }
body.auth:not(.auth-larga) .cabeca h1 { font-size: 24px; line-height: 1.25; letter-spacing: -.02em; text-wrap: balance; }
body.auth:not(.auth-larga) .cabeca .intro { font-size: 14px; line-height: 1.5; text-wrap: pretty; }
body.auth:not(.auth-larga) .painel > h2 { display: none; }
body.auth:not(.auth-larga) .fatos { order: 3; margin: 0 -32px -32px; padding: 16px 32px 20px; border-top: 1px solid var(--linha); border-radius: 0 0 16px 16px; background: #111114; font-size: 12.5px; line-height: 1.5; }
body.auth:not(.auth-larga) .fatos svg { width: 15px; height: 15px; }

/* Campos: 44 px, fundo mais fundo que o cartão, anel azul suave no foco. */
body.auth:not(.auth-larga) .form { gap: 16px; }
body.auth:not(.auth-larga) .campo > label, body.auth:not(.auth-larga) .rotulo label { font-size: 13px; font-weight: 500; }
body.auth:not(.auth-larga) .campo input { height: 44px; border-radius: 10px; background: #0E0E10; border-color: var(--linha-2); font-size: 15px; transition: border-color 120ms ease, box-shadow 120ms ease; }
body.auth:not(.auth-larga) .campo input:hover { border-color: #4A4A52; }
body.auth:not(.auth-larga) .campo input:focus { outline: none; border-color: var(--foco); box-shadow: 0 0 0 3px rgba(59, 130, 246, .18); }
body.auth:not(.auth-larga) .campo input[aria-invalid="true"] { border-color: var(--vermelho); animation: campo-nao 320ms cubic-bezier(.2, 0, 0, 1); }
@keyframes campo-nao { 20% { transform: translateX(-4px); } 45% { transform: translateX(4px); } 70% { transform: translateX(-2px); } }
body.auth:not(.auth-larga) .botao-grande { min-height: 44px; border-radius: 10px; font-size: 14px; }
body.auth:not(.auth-larga) .botao-principal { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14); transition: background-color 120ms ease, transform 90ms ease; }
body.auth:not(.auth-larga) .botao-principal:active:not(:disabled) { transform: scale(.985); }
body.auth:not(.auth-larga) .rodape-form { font-size: 13px; }

/* Google e Apple primeiro: neutros, a marca à esquerda e o texto no centro. */
.sociais { display: grid; gap: 8px; }
.sociais[hidden], .ou[hidden], .social[hidden] { display: none; }
.social {
  position: relative; display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 44px; padding: 0 16px;
  border: 1px solid var(--linha-2); border-radius: 10px; background: #1C1C20; color: var(--ink); font: 600 14px/1 var(--fonte); cursor: pointer;
  transition: background-color 120ms ease, border-color 120ms ease, transform 90ms ease;
}
.social:hover { background: #242429; border-color: #4A4A52; }
.social:active:not(:disabled) { transform: scale(.985); }
.social:focus-visible { outline: 2px solid var(--foco); outline-offset: 2px; }
.social img, .social svg { position: absolute; left: 16px; width: 18px; height: 18px; }
.social[aria-busy="true"]::before { position: absolute; left: 16px; content: ""; width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--linha-2); border-top-color: var(--ink); animation: girar 700ms linear infinite; }
.social[aria-busy="true"] img, .social[aria-busy="true"] svg { display: none; }
.ou { display: flex; align-items: center; gap: 12px; margin: 2px 0; color: var(--muted-2); font-size: 12px; }
.ou::before, .ou::after { content: ""; flex: 1; height: 1px; background: var(--linha); }

/* Ativar: as etapas dentro do cartão, mais compactas. */
body.auth:not(.auth-larga) .etapas { gap: 0; }

@media (max-width: 520px) {
  body.auth:not(.auth-larga) .porta { padding: 24px 20px; border-radius: 14px; }
  body.auth:not(.auth-larga) .fatos { margin: 0 -20px -24px; padding: 14px 20px 18px; }
}
@media (prefers-reduced-motion: reduce) {
  body.auth:not(.auth-larga) .porta, body.auth:not(.auth-larga) .campo input[aria-invalid="true"] { animation: none; }
}

/* Pontes do app (/app/entrar e /app/confirmado): um selo, o título e uma frase. */
.ponte { text-align: center; }
.ponte-estado { display: grid; justify-items: center; gap: 10px; width: 100%; margin: 0; text-align: center; }
.ponte-estado[hidden] { display: none; }
.ponte-estado h1 { font-size: 22px; line-height: 1.3; letter-spacing: -.015em; }
.ponte-estado p { color: var(--muted); font-size: 14px; line-height: 1.55; max-width: 34ch; }
.ponte-estado p b { color: var(--ink); }
.ponte-nota { margin-top: 6px; font-size: 13px !important; color: var(--muted-2) !important; }
.ponte-selo { display: grid; place-items: center; width: 56px; height: 56px; margin-bottom: 6px; border-radius: 50%; background: rgba(34, 197, 94, .12); box-shadow: inset 0 0 0 1px rgba(34, 197, 94, .35); }
.ponte-selo.atencao { background: rgba(245, 165, 36, .12); box-shadow: inset 0 0 0 1px rgba(245, 165, 36, .35); }
.ponte-selo svg { width: 26px; height: 26px; fill: none; stroke: var(--verde); stroke-width: 2.25; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 30; stroke-dashoffset: 30; animation: ponte-traco 480ms cubic-bezier(.2, 0, 0, 1) 120ms forwards; }
.ponte-selo.atencao svg { stroke: var(--ambar); }
@keyframes ponte-traco { to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) { .ponte-selo svg { animation: none; stroke-dashoffset: 0; } }
/* "Voltando para o CleanForce…": o foguete com o anel girando enquanto o código vai ao app. */
.ponte-giro { position: relative; display: grid; place-items: center; width: 56px; height: 56px; margin-bottom: 6px; }
.ponte-giro::before { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--linha); border-top-color: var(--azul, #2563EB); animation: ponte-gira 900ms linear infinite; }
.ponte-giro img { width: 26px; height: 26px; border-radius: 6px; }
.ponte-estado .botao { margin-top: 8px; }
@keyframes ponte-gira { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .ponte-giro::before { animation-duration: 2400ms; } }
