/* auth.css — FoxMod Painel: login, idioma e troca de senha (§11 / §5.7).
   Aura violeta que respira + malha de linhas + card de vidro — a MESMA composição da demo
   do site (src/demo/demo.css em FoxModLabs), que é a referência aprovada pelo dono.
   Cor = identidade (violeta); verde/âmbar/vermelho seguem sendo só sinal.
   Motion respeita reduced-motion. */

.auth-screen {
  position: fixed;
  inset: 0;
  overflow: hidden; /* clipa a aura/malha (que extrapolam a caixa) */
  background: var(--fg-canvas);
  color: var(--fg-ink);
  font-family: var(--font-display);
}

/* camada de rolagem POR CIMA da aura: em telas baixas o card rola sem cortar (margin:auto) */
.auth-scroll {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 24px 16px;
}

/* ── Fundo: aura + malha, copiados da demo do site ─────────────────
   Antes eram três manchas radiais e uma malha de PONTOS. A demo usa UMA aura redonda que
   respira e uma malha de LINHAS — é o que o dono aprovou, e é o que esta tela passa a ter.

   Viraram elementos de verdade (<span>), não ::before/::after: os pseudo-elementos eram
   filhos da mesma camada do card, e quem tem `backdrop-filter` (o card) precisa que o que
   está atrás dele seja pintado antes. Com <span> a ordem fica explícita. */

.auth-aura {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(820px, 140vw);
  aspect-ratio: 1;
  translate: -50% -50%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(157, 78, 221, 0.35), transparent 68%);
  filter: blur(70px);
  animation: halo-breathe 18s var(--ease) infinite;
  pointer-events: none;
}

.auth-mesh {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(157, 78, 221, 0.09) 1px, transparent 1px),
    linear-gradient(90deg, rgba(157, 78, 221, 0.09) 1px, transparent 1px);
  background-size: 54px 54px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 50%, #000 10%, transparent 72%);
  mask-image: radial-gradient(ellipse 70% 60% at 50% 50%, #000 10%, transparent 72%);
  pointer-events: none;
}

@keyframes halo-breathe {
  0%,
  100% { transform: translate3d(0, 0, 0) scale(1); opacity: 0.45; }
  50%  { transform: translate3d(3%, -4%, 0) scale(1.12); opacity: 0.68; }
}

/* ---------- Card de vidro (medidas da demo) ---------- */
.auth-card {
  position: relative;
  margin: auto; /* centra no flex e permite rolar quando alto demais */
  width: min(340px, 100%);
  padding: 30px 26px 24px;
  background: rgba(20, 12, 38, 0.62);
  border: 1px solid var(--fg-line);
  border-radius: 14px;
  backdrop-filter: blur(18px) saturate(1.3);
  -webkit-backdrop-filter: blur(18px) saturate(1.3);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.6);
  animation: card-in 0.4s var(--ease) both;
}

@keyframes card-in {
  from { opacity: 0; transform: scale(0.96) translateY(8px); }
  to   { opacity: 1; transform: none; }
}

/* ---------- Marca: empilhada e centrada, como na demo ---------- */
.auth-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 22px;
}

.auth-logo {
  display: inline-flex;
  flex: none;
  filter: drop-shadow(0 6px 22px rgba(157, 78, 221, 0.55));
}

.auth-word {
  margin-top: 14px;
  text-align: center;
}

/* a marca aqui é a versão sem raposa (a raposa já está grande logo acima) */
.auth-word .wordmark-text {
  align-items: center;
}
.auth-word .wordmark-name {
  font-size: 22px;
  text-shadow: 0 0 18px rgba(199, 125, 255, 0.35);
}
.auth-word .wordmark-sub {
  font-size: 11px;
  margin-top: 6px;
}

.auth-tag {
  font-size: 12px;
  color: var(--fg-ink-3);
  margin-top: 10px;
  text-align: center;
  max-width: 26ch;
}

/* Seletor de idioma no login. Ficava no canto do card, empurrado por `margin-left:auto`
   numa linha horizontal. Com a marca empilhada não há mais canto: desce centrado. */
.lang-seg {
  margin-top: 16px;
  display: inline-flex;
  gap: 2px;
  padding: 2px;
  border: 1px solid var(--fg-line);
  border-radius: 999px;
  background: rgba(10, 6, 20, 0.4);
}
.lang-seg button {
  border: none;
  background: transparent;
  color: var(--fg-ink-3);
  font: 600 10px/1 var(--font-jbmono);
  letter-spacing: 0.04em;
  padding: 7px 10px;
  border-radius: 999px;
  cursor: pointer;
}
.lang-seg button:hover { color: var(--fg-ink-2); }
.lang-seg button.sel { color: var(--fg-ink); background: var(--brand-wash); }

/* ---------- Títulos das telas idioma/senha ---------- */
.auth-h { font-size: 18px; font-weight: 600; margin-bottom: 6px; color: var(--fg-ink); }
.auth-sub { font-size: 13px; color: var(--fg-ink-2); margin-bottom: 20px; max-width: 34ch; }

/* ---------- Formulário ---------- */
.auth-form { display: flex; flex-direction: column; }

.fg-label {
  font-size: 12px;
  color: var(--fg-ink-2);
  font-weight: 500;
  margin-bottom: 6px;
}
.fg-label + .fg-input { margin-bottom: 14px; }

.fg-input {
  width: 100%;
  height: 40px;
  padding: 0 12px;
  color: var(--fg-ink);
  background: rgba(10, 6, 20, 0.55);
  border: 1px solid var(--fg-line);
  border-radius: 10px;
  font-family: var(--font-display);
  font-size: 14px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.fg-input::placeholder { color: var(--fg-ink-3); }
.fg-input:focus {
  outline: none;
  border-color: var(--brand-hi);
  box-shadow: 0 0 0 3px var(--fg-focus);
}

.fg-err {
  color: var(--fg-deny);
  font-size: 13px;
  margin: 2px 0 12px;
}
.fg-err.ok { color: var(--fg-pass); }

/* dica sob um campo (ex.: recomendação de trocar o usuário no 1º acesso) */
.fg-hint {
  color: var(--fg-ink-3);
  font-size: 12px;
  line-height: 1.45;
  margin: 0 0 14px;
}

/* botão primário violeta */
.fg-btn {
  width: 100%;
  height: 42px;
  margin-top: 6px;
  border: none;
  border-radius: 10px;
  background: var(--brand);
  color: #fff;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, transform 0.06s, box-shadow 0.15s;
  box-shadow: 0 8px 24px -10px rgba(157, 78, 221, 0.8);
}
.fg-btn:hover { background: var(--brand-hi); }
.fg-btn:active { transform: translateY(1px); }
.fg-btn:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--fg-focus); }
.fg-btn[disabled] { opacity: 0.65; cursor: default; box-shadow: none; }

/* ---------- Passo de idioma: opções grandes ---------- */
.lang-options { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
.lang-opt {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 48px;
  padding: 0 14px;
  border: 1px solid var(--fg-line);
  border-radius: 12px;
  background: rgba(10, 6, 20, 0.4);
  color: var(--fg-ink-2);
  font-family: var(--font-display);
  font-size: 14px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.lang-opt:hover { color: var(--fg-ink); border-color: var(--fg-line-strong); }
.lang-opt.sel {
  color: var(--fg-ink);
  border-color: var(--brand);
  background: var(--brand-wash);
}
.lang-opt .lang-code {
  font: 600 11px/1 var(--font-jbmono);
  color: var(--fg-ink-3);
  letter-spacing: 0.06em;
}
.lang-opt.sel .lang-code { color: var(--brand-hi); }

/* link discreto (Sair no passo de idioma) */
.auth-link {
  display: block;
  width: 100%;
  margin-top: 12px;
  border: none;
  background: transparent;
  color: var(--fg-ink-3);
  font-family: var(--font-display);
  font-size: 12px;
  cursor: pointer;
}
.auth-link:hover { color: var(--fg-ink-2); }

/* assinatura da empresa */
.auth-sign {
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid var(--fg-line);
  text-align: center;
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--fg-ink-3);
}

/* brilho pulsante dos olhos da raposa */
.fox-eye { animation: fox-pulse 3.2s ease-in-out infinite; }
@keyframes fox-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.55; }
}

/* telas estreitas: encolhe a marca e garante alvos de toque confortáveis */
@media (max-width: 380px) {
  .auth-word .wordmark-name { font-size: 20px; }
  .auth-logo svg { width: 52px; height: 52px; }
  .lang-opt { height: 46px; }
}

/* telas baixas (paisagem no celular): alinha ao topo p/ não cortar o topo do card */
@media (max-height: 560px) {
  .auth-scroll { padding-top: 16px; padding-bottom: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .auth-aura,
  .auth-mesh,
  .auth-card,
  .fox-eye { animation: none; }
}
