/* ============================================================================
   ASTRUBIA — paginas de autenticacao (/register e /login)
   Apenas layout e composicao de cena; componentes vem do site.css.
   ========================================================================== */

/* ---- cena ------------------------------------------------------------------ */
.auth-hero {
  position: relative;
  overflow: hidden;
  padding-top: clamp(8rem, 14vw, 11rem);
  padding-bottom: clamp(10rem, 22vw, 16rem);
  background:
    radial-gradient(900px 420px at 82% 4%, rgba(88, 165, 204, .06), transparent 65%),
    radial-gradient(1100px 560px at 8% 24%, rgba(122, 90, 30, .12), transparent 70%);
}

.auth-scenery {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-color: var(--ink-850);
  background-image:
    url('/img/art/download-hero.jpg'),
    linear-gradient(to bottom, #2e1e0d, #170e06);
  background-size: cover, auto;
  background-position: center 55%;
}
.auth-scenery::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(70% 80% at 50% 45%, rgba(16, 9, 3, .55), rgba(16, 9, 3, .8)),
    linear-gradient(to bottom, rgba(18, 11, 4, .6), transparent 30%, transparent 60%, var(--ink-900) 98%);
}

.auth-hero > .container { position: relative; z-index: 1; }

/* flutuacao muito sutil das motas douradas */
.auth-motes { animation: auth-mote-drift 9s ease-in-out infinite alternate; }
@keyframes auth-mote-drift {
  from { transform: translateY(0); }
  to { transform: translateY(-8px); }
}
@media (prefers-reduced-motion: reduce) {
  .auth-motes { animation: none; }
}

/* ---- grade: formulario primeiro no mobile, cena/argumento ao lado no desktop */
.auth-grid { display: grid; gap: clamp(2.6rem, 6vw, 5rem); }

.auth-form-col { width: 100%; max-width: 540px; margin-inline: auto; }
.auth-aside {
  max-width: 560px;
  margin-inline: auto;
  display: grid;
  gap: 1.4rem;
  align-content: start;
  justify-items: start;
}

@media (min-width: 1024px) {
  .auth-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: center;
  }
  .auth-aside { order: -1; margin-inline: 0; }
}

/* ---- cabecalho e painel do formulario --------------------------------------- */
.auth-head { display: grid; gap: .55rem; margin-bottom: 1.3rem; justify-items: start; }
.auth-sub { color: var(--text-muted); }

.auth-form { display: grid; gap: 1.15rem; }
.auth-form .form-global-error { margin: 0; }
.auth-form .form-global-error:focus { outline: none; }
.auth-submit { margin-top: .35rem; }

.auth-alt {
  margin-top: 1.15rem;
  padding-top: 1.05rem;
  border-top: 1px solid rgba(238, 192, 106, .16);
  text-align: center;
  color: var(--text-muted);
  font-size: .98rem;
}

.label-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}
.auth-forgot { font-size: .88rem; font-weight: 700; white-space: nowrap; }

/* site.css força svg{display:block}; garante que o olho oculto suma de fato */
.toggle-pass svg[hidden] { display: none; }

/* ---- niveis do indicador de força ------------------------------------------- */
.strength { margin-top: .15rem; }
.strength[data-level="1"] .strength-bar span { width: 25%; background: var(--danger); }
.strength[data-level="2"] .strength-bar span { width: 50%; background: var(--gold-400); }
.strength[data-level="3"] .strength-bar span { width: 75%; background: var(--ok); }
.strength[data-level="4"] .strength-bar span {
  width: 100%;
  background: var(--arcane-400);
  box-shadow: 0 0 10px rgba(88, 165, 204, .45);
}

/* ---- checkbox de aceite (nao existe componente pronto no site.css) ----------- */
.check {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: .7rem;
  cursor: pointer;
  color: var(--text-muted);
  font-weight: 500;
  font-size: .98rem;
  line-height: 1.45;
}
.check input[type="checkbox"] {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  opacity: 0;
}
.check-box {
  flex: none;
  width: 20px;
  height: 20px;
  margin-top: .1rem;
  display: grid;
  place-items: center;
  border-radius: 5px;
  border: 1px solid rgba(238, 192, 106, .45);
  background: rgba(16, 9, 3, .6);
  color: transparent;
  transition: background .2s ease, border-color .2s ease, color .2s ease;
}
.check input:checked + .check-box {
  color: #241a06;
  border-color: var(--gold-600);
  background: linear-gradient(to bottom, var(--gold-300), var(--gold-500));
}
.check input:focus-visible + .check-box {
  outline: 2px solid var(--gold-300);
  outline-offset: 2px;
}
.check input[aria-invalid="true"] + .check-box {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(217, 105, 79, .15);
}

/* ---- pergaminho de sucesso (cadastro) ----------------------------------------- */
.auth-success {
  padding: clamp(1.6rem, 4vw, 2.4rem);
  display: grid;
  gap: 1rem;
  justify-items: start;
  outline: none;
}
.auth-success[hidden] { display: none; }
.auth-success-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.3rem, 3vw, 1.7rem);
  line-height: 1.25;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #4a3413;
}
.auth-success-steps { margin: 0; padding-left: 1.25rem; display: grid; gap: .45rem; }
.auth-success .btn { justify-self: stretch; }
.auth-success-link { font-weight: 700; justify-self: center; }

/* ---- coluna de argumento -------------------------------------------------------- */
.auth-aside .h-section { font-size: clamp(1.55rem, 3vw, 2.2rem); }
.auth-aside .divider-ornament { justify-content: flex-start; margin: 0; }

.auth-points {
  list-style: none;
  margin: .4rem 0 0;
  padding: 0;
  display: grid;
  gap: 1.25rem;
}
.auth-point { display: flex; gap: 1rem; align-items: flex-start; }
.auth-point-icon {
  flex: none;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: var(--gold-300);
  border: 1px solid rgba(238, 192, 106, .38);
  background: linear-gradient(160deg, rgba(238, 192, 106, .14), rgba(23, 14, 6, .5));
  box-shadow: inset 0 1px 0 rgba(248, 223, 160, .14), 0 8px 18px -12px rgba(0, 0, 0, .7);
}
.auth-point-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--gold-300);
}
.auth-point p { color: var(--text-muted); font-size: .98rem; margin-top: .15rem; }

.auth-invite {
  margin-top: .5rem;
  padding-top: 1.3rem;
  border-top: 1px solid rgba(238, 192, 106, .18);
  display: grid;
  gap: .9rem;
  justify-items: start;
}
.auth-invite p { color: var(--text-muted); }

.auth-aside-note {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .7rem 1rem;
  margin-top: .4rem;
  color: var(--text-faint);
  font-size: .92rem;
}

/* ---- cadastro em etapas ------------------------------------------------------------ */
/* .auth-form usa display:grid, o que anula o atributo [hidden] (UA = display:none).
   Reforça o ocultamento das etapas inativas. */
.auth-form[hidden] { display: none; }

.auth-steps {
  display: flex;
  align-items: center;
  gap: .5rem;
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
  flex-wrap: wrap;
}
.auth-step {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  font-size: .9rem;
  font-weight: 600;
  color: var(--text-faint);
}
.auth-step + .auth-step::before {
  content: "";
  width: 18px;
  height: 1px;
  margin-right: .5rem;
  background: rgba(238, 192, 106, .25);
}
.auth-step-num {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid rgba(238, 192, 106, .3);
  background: rgba(16, 9, 3, .5);
  font-size: .82rem;
}
.auth-step.is-current { color: var(--gold-300); }
.auth-step.is-current .auth-step-num {
  border-color: var(--gold-500);
  background: linear-gradient(to bottom, var(--gold-300), var(--gold-500));
  color: #241a06;
}
.auth-step.is-done { color: var(--text-muted); }
.auth-step.is-done .auth-step-num {
  border-color: var(--ok);
  color: var(--ok);
}

.auth-step-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.15rem, 2.6vw, 1.4rem);
}
.auth-verify-intro { display: grid; gap: .4rem; margin-bottom: .3rem; }
.auth-verify-intro p { color: var(--text-muted); }

.auth-code-input {
  font-family: var(--font-display);
  font-size: 1.5rem;
  letter-spacing: .5em;
  text-align: center;
  padding-left: .5em;
}

.link-btn {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  font-weight: 700;
  color: var(--gold-300);
  cursor: pointer;
  text-decoration: underline;
}
.link-btn:hover { color: var(--gold-400); }
.link-btn:disabled { opacity: .5; cursor: default; text-decoration: none; }

.form-global-error.is-info {
  color: var(--ok);
}

.field-optional {
  font-weight: 500;
  color: var(--text-faint);
  font-size: .86em;
}
.auth-doc-row { display: flex; gap: .6rem; }
.auth-doc-row select { flex: none; width: 5.5rem; }
.auth-doc-row input { flex: 1 1 auto; min-width: 0; }

.auth-privacy-note {
  display: flex;
  gap: .7rem;
  align-items: flex-start;
  padding: .9rem 1rem;
  border: 1px solid rgba(238, 192, 106, .22);
  border-radius: 10px;
  background: rgba(88, 165, 204, .07);
  color: var(--text-muted);
  font-size: .9rem;
  line-height: 1.5;
}
.auth-privacy-note svg { flex: none; color: var(--gold-300); margin-top: .1rem; }
.auth-privacy-note strong { color: var(--text); font-weight: 700; }

/* ---- responsivo -------------------------------------------------------------------- */
@media (max-width: 640px) {
  .auth-hero { padding-top: clamp(7.5rem, 24vw, 9rem); }
  .auth-point-icon { width: 40px; height: 40px; border-radius: 10px; }
  .auth-alt { font-size: .94rem; }
  .auth-steps { font-size: .82rem; }
}
