/* Identidade visual das telas de acesso (/login e /redefinir-senha).
   Rolamento desenhado só com CSS: gradientes cônicos/radiais, esferas com brilho
   e rotação lenta (desligada em prefers-reduced-motion). Sem imagens externas. */

:root {
  --bg: #09090b;
  --bg-elev: #14151a;
  --bg-field: #0d0e12;
  --gold: #FFC800;
  --gold-soft: rgba(255, 200, 0, .28);
  --text: #f4f4f5;
  --muted: #a1a1aa;
  --line: rgba(255, 255, 255, .10);
  --danger: #ff6b6b;
  --ok: #4ade80;
  --f-title: 'Archivo', system-ui, sans-serif;
  --f-body: 'Geist', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --f-mono: 'JetBrains Mono', ui-monospace, Consolas, monospace;
}

* { box-sizing: border-box; }
html { background: var(--bg); }
body {
  margin: 0; min-height: 100vh; min-height: 100dvh;
  display: flex; align-items: center; justify-content: center; padding: 24px 16px;
  background: var(--bg); color: var(--text); font-family: var(--f-body);
  overflow-x: hidden; -webkit-font-smoothing: antialiased;
}

/* ---------- Cenário: rolamento ---------- */
.stage { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none;
  background:
    radial-gradient(ellipse 70% 55% at 50% 42%, rgba(255, 200, 0, .09), transparent 70%),
    radial-gradient(ellipse 120% 90% at 50% 120%, rgba(255, 200, 0, .05), transparent 60%),
    var(--bg); }
.stage::after { content: ""; position: absolute; inset: 0;
  background: radial-gradient(ellipse 75% 70% at 50% 50%, transparent 40%, rgba(9, 9, 11, .85) 100%); }

.bearing { --bw: clamp(660px, 130vmin, 1300px);
  position: absolute; left: 50%; top: 50%; width: var(--bw); aspect-ratio: 1;
  transform: translate(-50%, -50%); opacity: .95; }
.bearing > * { position: absolute; border-radius: 50%; }

/* aro externo: filete dourado com varredura cônica */
.b-edge { inset: 0;
  background: conic-gradient(from 20deg, rgba(255,200,0,0) 0deg, rgba(255,200,0,.75) 55deg, rgba(255,200,0,0) 150deg,
    rgba(255,200,0,.30) 225deg, rgba(255,200,0,0) 300deg, rgba(255,200,0,.75) 360deg);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 2px), #000 calc(100% - 1px));
          mask: radial-gradient(farthest-side, transparent calc(100% - 2px), #000 calc(100% - 1px)); }

/* pista externa: aço escovado (conic metálico) */
.b-race-out { inset: 3%;
  background: conic-gradient(from 0deg, #1b1c22, #3b3d48 10%, #15161b 22%, #2d2f38 36%, #14151a 52%, #3b3d48 68%, #16171c 84%, #1b1c22);
  -webkit-mask: radial-gradient(farthest-side, transparent 85.5%, #000 86%);
          mask: radial-gradient(farthest-side, transparent 85.5%, #000 86%);
  opacity: .85; }
.b-hair-out { inset: 3%; border: 1px solid rgba(255, 255, 255, .08); }
.b-hair-mid { inset: 9.6%; border: 1px solid rgba(255, 200, 0, .22); box-shadow: 0 0 40px rgba(255, 200, 0, .08); }

/* gaiola com esferas */
.b-cage { inset: 0; }
.b-cage i { position: absolute; left: 50%; top: 50%; width: 9%; aspect-ratio: 1; margin: -4.5% 0 0 -4.5%;
  transform: rotate(calc(var(--i) * 25.714deg)) translateY(-380%); }
.b-cage b { display: block; width: 100%; height: 100%; border-radius: 50%;
  rotate: calc(var(--i) * -25.714deg);
  background:
    radial-gradient(circle at 31% 27%, rgba(255,255,255,.62) 0, rgba(255,255,255,.18) 9%, transparent 22%),
    radial-gradient(circle at 50% 50%, #565965 0, #31333c 42%, #121318 78%, #0b0b0e 100%);
  box-shadow: inset -10px -12px 24px rgba(0,0,0,.65), inset 2px 2px 6px rgba(255,255,255,.07),
    0 0 0 1px rgba(255, 200, 0, .10), 0 24px 40px -10px rgba(0, 0, 0, .8); }

/* pista interna */
.b-race-in { inset: 22%;
  background: conic-gradient(from 90deg, #1d1e25, #43454f 12%, #17181d 26%, #343640 42%, #15161b 58%, #43454f 74%, #1a1b21 88%, #1d1e25);
  -webkit-mask: radial-gradient(farthest-side, transparent 81%, #000 81.6%);
          mask: radial-gradient(farthest-side, transparent 81%, #000 81.6%);
  opacity: .9; }
.b-hair-in { inset: 22%; border: 1px solid rgba(255, 255, 255, .10); }
.b-hair-bore { inset: 27.2%; border: 1px solid rgba(255, 200, 0, .42); box-shadow: 0 0 28px rgba(255, 200, 0, .14), inset 0 0 40px rgba(0, 0, 0, .6); }

@media (prefers-reduced-motion: no-preference) {
  .b-edge, .b-race-out { animation: spin 160s linear infinite; }
  .b-race-in { animation: spin 110s linear infinite reverse; }
  .b-cage { animation: spin 90s linear infinite; }
  .b-cage b { animation: spin-back 90s linear infinite; }
  .card { animation: rise .7s cubic-bezier(.2, .8, .2, 1) both; }
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes spin-back { to { transform: rotate(-360deg); } }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ---------- Cartão ---------- */
.card { position: relative; z-index: 1; width: 100%; max-width: 420px; margin: auto;
  padding: 34px 30px 26px; border-radius: 20px;
  background: linear-gradient(180deg, rgba(30, 31, 38, .74), rgba(20, 21, 26, .80));
  border: 1px solid var(--line);
  -webkit-backdrop-filter: blur(22px) saturate(140%); backdrop-filter: blur(22px) saturate(140%);
  box-shadow: 0 50px 90px -34px rgba(0, 0, 0, .95), 0 0 0 1px rgba(255, 200, 0, .05), inset 0 1px 0 rgba(255, 255, 255, .07); }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .card { background: var(--bg-elev); }
}
.card::before { content: ""; position: absolute; top: -1px; left: 14%; right: 14%; height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent); }

.brand { display: flex; justify-content: center; margin: 0 0 22px; }
.brand img { display: block; height: 62px; width: auto; max-width: 100%;
  filter: drop-shadow(0 6px 18px rgba(255, 200, 0, .18)); }

.eyebrow { display: flex; align-items: center; gap: 8px; margin: 0 0 8px;
  font-family: var(--f-mono); font-size: 11px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); }
.eyebrow::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 10px var(--gold); flex: none; }
h1 { margin: 0 0 8px; font-family: var(--f-title); font-weight: 800; font-size: 28px; line-height: 1.05; letter-spacing: -.01em; }
p.sub { margin: 0 0 18px; font-size: 14px; line-height: 1.5; color: var(--muted); }

label { display: block; margin: 16px 0 6px; font-family: var(--f-mono); font-size: 11px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: #c4c4cc; }
input { width: 100%; min-height: 48px; padding: 12px 14px; font: inherit; font-size: 16px; color: var(--text);
  background: var(--bg-field); border: 1px solid var(--line); border-radius: 10px; outline: none;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, .5); transition: border-color .15s, box-shadow .15s, background .15s; }
input:hover { border-color: rgba(255, 255, 255, .2); }
input:focus { border-color: var(--gold); background: #101116; box-shadow: 0 0 0 3px rgba(255, 200, 0, .22); }
input:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

button { position: relative; overflow: hidden; width: 100%; min-height: 50px; margin-top: 22px; padding: 14px 16px; cursor: pointer;
  font-family: var(--f-title); font-weight: 800; font-size: 14px; letter-spacing: .08em; text-transform: uppercase;
  color: #09090b; border: 0; border-radius: 10px;
  background: linear-gradient(180deg, #FFD83A 0%, #FFC800 55%, #E8B400 100%);
  box-shadow: 0 10px 28px -10px rgba(255, 200, 0, .55), inset 0 1px 0 rgba(255, 255, 255, .45), inset 0 -2px 0 rgba(0, 0, 0, .12);
  transition: transform .15s, box-shadow .15s, filter .15s; }
button::after { content: ""; position: absolute; top: 0; bottom: 0; left: -60%; width: 40%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .45), transparent); transform: skewX(-18deg); transition: left .6s; }
button:hover { transform: translateY(-1px); box-shadow: 0 14px 32px -10px rgba(255, 200, 0, .7), inset 0 1px 0 rgba(255, 255, 255, .5), inset 0 -2px 0 rgba(0, 0, 0, .12); }
button:hover::after { left: 120%; }
button:active { transform: translateY(0); filter: brightness(.96); }
button:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
button[disabled] { opacity: .55; cursor: wait; transform: none; }
@media (prefers-reduced-motion: reduce) { button, input, button::after { transition: none; } button:hover { transform: none; } }

.err, .ok { display: none; margin-top: 16px; padding: 11px 13px; border-radius: 10px; font-size: 13.5px; line-height: 1.45; }
.err { border: 1px solid rgba(255, 107, 107, .35); border-left: 3px solid var(--danger); background: rgba(255, 107, 107, .09); color: #ffc2c2; }
.ok { border: 1px solid rgba(74, 222, 128, .30); border-left: 3px solid var(--ok); background: rgba(74, 222, 128, .08); color: #b7f5cd; }
.err.show, .ok.show { display: block; }
.hint { margin: 8px 0 0; font-size: 12px; line-height: 1.45; color: var(--muted); }

.forgot { display: flex; align-items: center; justify-content: center; min-height: 44px; margin-top: 8px; padding: 10px 0;
  font-size: 13.5px; color: var(--muted); text-decoration: underline; text-decoration-color: rgba(255, 255, 255, .25); text-underline-offset: 4px; border-radius: 8px; }
.forgot:visited { color: var(--muted); }
.forgot:hover { color: var(--gold); text-decoration-color: var(--gold); }
.forgot:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; color: var(--gold); }

.foot { margin: 14px 0 0; padding-top: 14px; border-top: 1px solid var(--line); text-align: center;
  font-family: var(--f-mono); font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: #8b8b95; }

.step { display: none; }
.step.on { display: block; }

@media (max-width: 480px) {
  .card { padding: 28px 20px 22px; border-radius: 18px; }
  .brand img { height: 54px; }
  h1 { font-size: 25px; }
}
