/*
 * Entrar e Criar conta (/usuarios/login/ e /usuarios/registro/).
 * Clareza Acadêmica, conforme mockup/login-registro/. Uma casca só para as
 * duas páginas (templates/registration/auth_base.html), sem Bootstrap e sem
 * animação de entrada: a página aparece pronta.
 */
.auth-clareza {
  --primary: #667eea; --primary-hover: #545fcb; --primary-soft: #f0f1ff;
  --canvas: #f6f7fb; --surface: #fff; --alt: #fbfbfc; --ink: #1f2937; --muted: #6b7280; --subtle: #9ca3af;
  --border: #e5e7eb; --border-strong: #d8dce5; --line: #f1f2f5;
  --green: #10b981; --green-ink: #047857; --green-soft: #ecfdf5;
  --amber: #f59e0b; --amber-ink: #92400e; --amber-soft: #fef6e7;
  --red: #ef4444; --red-ink: #b91c1c; --red-soft: #fef2f2;
  --sky-ink: #0369a1; --sky-soft: #eef7fd;
  margin: 0; background: var(--canvas); color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: .92rem; line-height: 1.5;
  -webkit-text-size-adjust: 100%;
}
.auth-clareza *, .auth-clareza *::before, .auth-clareza *::after { box-sizing: border-box; }
.auth-clareza h1, .auth-clareza h2, .auth-clareza p, .auth-clareza ul { margin: 0; padding: 0; }
.auth-clareza ul { list-style: none; }
.auth-clareza button, .auth-clareza input { font: inherit; color: inherit; }
.auth-clareza a { color: var(--primary-hover); text-decoration: none; }
.auth-clareza a:hover { text-decoration: underline; }
.auth-clareza :focus-visible { outline: 3px solid rgba(102, 126, 234, .55); outline-offset: 2px; }
.auth-clareza [hidden] { display: none !important; }
.registration-honeypot { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Casca ---------- */
.auth { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-rows: auto 1fr auto; }
.auth-topo { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 1.5rem; }
.auth-marca { display: inline-flex; align-items: center; gap: .55rem; color: var(--ink) !important; font-weight: 700; }
.auth-marca:hover { text-decoration: none !important; }
.auth-marca-selo { width: 34px; height: 34px; border-radius: 10px; background: var(--primary); color: #fff; display: grid; place-items: center; font-size: .66rem; font-weight: 800; letter-spacing: -.02em; }
.auth-topo-link { color: var(--muted); font-size: .84rem; }
.auth-topo-link a { font-weight: 600; }
.auth-meio { display: grid; place-items: start center; padding: 1.5rem 1.25rem 2rem; }
.auth-rodape { display: flex; justify-content: center; flex-wrap: wrap; gap: .3rem 1.1rem; padding: 1rem 1.25rem 1.4rem; color: var(--subtle); font-size: .76rem; }
.auth-rodape a { color: var(--muted) !important; }

.auth-cartao { width: 100%; max-width: 440px; background: var(--surface); border: 1px solid var(--border); border-radius: 18px; box-shadow: 0 1px 2px rgba(31, 41, 55, .04), 0 12px 32px -12px rgba(31, 41, 55, .12); padding: 1.75rem 1.75rem 1.5rem; }
.auth-dupla { width: 100%; max-width: 940px; display: grid; grid-template-columns: 1fr 440px; gap: 2.5rem; align-items: start; }
.auth-dupla .auth-cartao { max-width: none; }

/* ---------- Abas ---------- */
.auth-abas { display: grid; grid-template-columns: 1fr 1fr; padding: 4px; background: #f1f2f6; border-radius: 11px; margin-bottom: 1.35rem; }
.auth-abas a { padding: .5rem; border-radius: 8px; font-weight: 600; color: var(--muted) !important; font-size: .88rem; text-align: center; }
.auth-abas a:hover { text-decoration: none !important; color: var(--ink) !important; }
.auth-abas a.on { background: #fff; color: var(--ink) !important; box-shadow: 0 1px 3px rgba(31, 41, 55, .12); }

.auth-cab { margin-bottom: 1.15rem; }
.auth-cab h1 { font-size: 1.42rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.25; }
.auth-cab p { color: var(--muted); margin-top: .2rem; font-size: .9rem; }

/* ---------- Botões ---------- */
.auth-btn { display: inline-flex; align-items: center; justify-content: center; gap: .55rem; width: 100%; min-height: 46px; border-radius: 11px; font-weight: 700; font-size: .93rem; border: 0; cursor: pointer; transition: background .15s, border-color .15s; }
.auth-btn:hover { text-decoration: none !important; }
.auth-btn-pri { background: var(--primary); color: #fff; }
.auth-btn-pri:hover { background: var(--primary-hover); }
.auth-btn-pri[aria-busy="true"] { opacity: .85; cursor: progress; }
.auth-btn-google { background: #fff; border: 1px solid var(--border-strong); color: var(--ink) !important; }
.auth-btn-google:hover { background: var(--alt); border-color: #c3c8d4; }

.auth-ou { display: flex; align-items: center; gap: .75rem; color: var(--subtle); font-size: .76rem; margin: 1.05rem 0; }
.auth-ou::before, .auth-ou::after { content: ""; flex: 1; height: 1px; background: var(--border); }

/* ---------- Campos ---------- */
.auth-campo { margin-bottom: 1rem; }
.auth-rot { display: flex; align-items: baseline; justify-content: space-between; gap: .5rem; margin-bottom: .35rem; }
.auth-rot label { font-weight: 600; font-size: .86rem; }
.auth-rot a { font-size: .8rem; font-weight: 600; }
.auth-caixa { position: relative; display: flex; align-items: center; background: #fff; border: 1px solid var(--border-strong); border-radius: 10px; transition: border-color .15s, box-shadow .15s; }
.auth-caixa:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(102, 126, 234, .18); }
.auth-caixa input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; padding: .72rem .85rem; font-size: 1rem; }
.auth-caixa input::placeholder { color: var(--subtle); }
.auth-pre { padding-left: .85rem; color: var(--subtle); font-weight: 600; }
.auth-pre + input { padding-left: .15rem; }
.auth-ver { flex: none; margin-right: .35rem; padding: .3rem .55rem; border: 0; border-radius: 7px; background: none; cursor: pointer; font-size: .78rem; font-weight: 600; color: var(--muted); }
.auth-ver:hover { background: #f3f4f6; color: var(--ink); }
.auth-campo.erro .auth-caixa { border-color: var(--red); }
.auth-campo.erro .auth-caixa:focus-within { box-shadow: 0 0 0 3px rgba(239, 68, 68, .15); }
.auth-campo.ok .auth-caixa { border-color: #8fd9bd; }
.auth-dica { margin-top: .35rem; font-size: .78rem; color: var(--muted); display: flex; gap: .4rem; align-items: flex-start; }
.auth-dica i { margin-top: .22rem; font-size: .72rem; }
.auth-dica.err { color: var(--red-ink); }
.auth-dica.bom { color: var(--green-ink); }
.auth-dica.aviso { color: var(--amber-ink); }
.auth-dica a { color: inherit; font-weight: 700; text-decoration: underline; }
.auth-sugestoes { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; margin-top: .4rem; font-size: .78rem; color: var(--muted); }
.auth-sugestoes button { font-size: .78rem; font-weight: 600; padding: .2rem .55rem; border: 0; border-radius: 99px; background: var(--primary-soft); color: var(--primary-hover); cursor: pointer; }
.auth-sugestoes button:hover { background: #e3e6ff; }

.auth-forca { margin-top: .5rem; }
.auth-forca-barra { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.auth-forca-barra i { height: 4px; border-radius: 99px; background: #e5e7eb; transition: background .2s; }
.auth-forca[data-n="1"] .auth-forca-barra i:nth-child(-n+1) { background: var(--red); }
.auth-forca[data-n="2"] .auth-forca-barra i:nth-child(-n+2) { background: var(--amber); }
.auth-forca[data-n="3"] .auth-forca-barra i:nth-child(-n+3) { background: #4fb88f; }
.auth-forca[data-n="4"] .auth-forca-barra i { background: var(--green); }

.auth-opcoes { margin: -.15rem 0 1.1rem; }
.auth-check { display: flex; align-items: flex-start; gap: .55rem; font-size: .85rem; color: #374151; cursor: pointer; }
.auth-check input { width: 18px; height: 18px; margin: .1rem 0 0; accent-color: var(--primary); flex: none; }
.auth-check.err span { color: var(--red-ink); }
.auth-aceites { display: grid; gap: .6rem; margin-bottom: 1.1rem; }
.auth-aceites .auth-dica { margin: -.35rem 0 0 1.7rem; }

.auth-humano { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; padding: .6rem .75rem; border: 1px solid var(--border); border-radius: 10px; background: var(--alt); margin-bottom: 1rem; font-size: .85rem; }
.auth-humano > i { color: var(--primary); }
.auth-humano label { flex: 1 1 180px; }
.auth-humano b { font-variant-numeric: tabular-nums; white-space: nowrap; }
.auth-humano input { width: 64px; padding: .4rem .5rem; border: 1px solid var(--border-strong); border-radius: 8px; text-align: center; font-size: 1rem; background: #fff; }
.auth-humano input:focus { outline: 0; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(102, 126, 234, .18); }
.auth-humano.erro { border-color: var(--red); background: var(--red-soft); }
.auth-humano .auth-dica { flex-basis: 100%; margin-top: 0; }

/* ---------- Avisos ---------- */
.auth-alerta { display: flex; gap: .65rem; align-items: flex-start; padding: .75rem .85rem; border-radius: 10px; font-size: .85rem; margin-bottom: 1rem; }
.auth-alerta > i { margin-top: .2rem; }
.auth-alerta.err { background: var(--red-soft); color: var(--red-ink); border: 1px solid #fbd5d5; }
.auth-alerta.info { background: var(--sky-soft); color: var(--sky-ink); border: 1px solid #cfe7f7; }
.auth-alerta.ok { background: var(--green-soft); color: var(--green-ink); border: 1px solid #c4eedd; }
.auth-alerta.aviso { background: var(--amber-soft); color: var(--amber-ink); border: 1px solid #f8e1b5; }
.auth-alerta ul { list-style: disc; padding-left: 1.05rem; margin-top: .25rem; }
.auth-alerta a { color: inherit; font-weight: 700; text-decoration: underline; }

.auth-depois { text-align: center; color: var(--muted); font-size: .79rem; margin-top: .7rem !important; }
.auth-troca { text-align: center; margin-top: 1.2rem !important; padding-top: 1.1rem; border-top: 1px solid var(--line); font-size: .87rem; color: var(--muted); }
.auth-troca a { font-weight: 700; }

/* ---------- Apresentação (só no Criar conta, só em tela larga) ---------- */
.auth-lado { padding-top: 2.6rem; }
.auth-lado h2 { font-size: 1.7rem; font-weight: 800; letter-spacing: -.025em; line-height: 1.2; }
.auth-lado > p { color: var(--muted); margin-top: .6rem; max-width: 44ch; }
.auth-ganhos { display: grid; gap: .9rem; margin-top: 1.6rem !important; }
.auth-ganhos li { display: grid; grid-template-columns: 38px 1fr; gap: .75rem; align-items: start; }
.auth-ganho-ic { width: 38px; height: 38px; border-radius: 11px; background: var(--primary-soft); color: var(--primary-hover); display: grid; place-items: center; }
.auth-ganhos b { display: block; font-size: .92rem; }
.auth-ganhos span { color: var(--muted); font-size: .84rem; }
.auth-prova { margin-top: 1.6rem !important; display: flex; align-items: center; gap: .6rem; color: var(--muted); font-size: .82rem; }
.auth-prova i { color: var(--green); }
.auth-selos { display: none; }

@media (max-width: 860px) {
  .auth-dupla { grid-template-columns: 1fr; max-width: 440px; gap: 0; }
  .auth-lado { display: none; }
  .auth-selos { display: flex; gap: .45rem; flex-wrap: wrap; margin: -.4rem 0 1rem; }
  .auth-selos span { font-size: .74rem; font-weight: 600; color: var(--primary-hover); background: var(--primary-soft); border-radius: 99px; padding: .15rem .55rem; }
}
@media (max-width: 520px) {
  .auth-topo { padding: .85rem 1rem; }
  .auth-topo-link { display: none; }
  .auth-meio { padding: .25rem 1rem 1.5rem; }
  .auth-cartao { border: 0; box-shadow: none; background: transparent; padding: .25rem 0 0; }
  .auth-cab h1 { font-size: 1.3rem; }
}
@media (prefers-reduced-motion: reduce) {
  .auth-clareza * { transition: none !important; }
}
