/* ═══════════════════════════════════════════════════════════════════
 *  ANI — TELAS DE LOGIN (Painel e Área de Membros) · estilo + animação (v1.9.8)
 *  As duas telas têm a mesma estrutura (marca à esquerda, formulário à direita),
 *  com prefixos diferentes: .login-* (painel) e .membros-* (membros).
 *  Azul institucional, claro/escuro. Animações desligam com "reduzir movimento".
 * ═══════════════════════════════════════════════════════════════════ */

html {
  --lg-azul: #2c3896;
  --lg-azul-2: #3F4DB8;
  --lg-azul-escuro: #1e2870;
  --lg-titulo: #11163A;
  --lg-texto: #3B4256;
  --lg-suave: #6B7280;
  --lg-borda: #DDE2EE;
  --lg-cartao: rgba(255, 255, 255, .92);
  --lg-campo: #fff;
  --lg-fundo: #F3F5FB;
}
html[data-tema="escuro"] {
  --lg-azul: #8C97E8;
  --lg-titulo: #F3F4F8;
  --lg-texto: #C9CEDA;
  --lg-suave: #8D95A7;
  --lg-borda: #2A3040;
  --lg-cartao: rgba(18, 21, 29, .9);
  --lg-campo: #0E1118;
  --lg-fundo: #0A0C12;
}

/* ═══════════ LADO DA MARCA ═══════════ */
:is(.login-brand, .membros-brand) {
  background:
    repeating-linear-gradient(135deg, rgba(255,255,255,.03) 0 2px, transparent 2px 16px),
    radial-gradient(900px 500px at 0% 100%, rgba(91, 103, 208, .45), transparent 60%),
    linear-gradient(135deg, #2c3896 0%, #222c80 40%, #141b55 100%);
  isolation: isolate;
}
/* Auroras que flutuam devagar */
:is(.login-brand, .membros-brand)::before {
  width: 520px; height: 520px; right: -170px; top: -170px;
  background: radial-gradient(circle, rgba(140, 151, 232, .45), rgba(140, 151, 232, 0) 65%);
  animation: lg-aurora-a 16s ease-in-out infinite alternate;
}
:is(.login-brand, .membros-brand)::after {
  width: 460px; height: 460px; left: -150px; bottom: -150px;
  background: radial-gradient(circle, rgba(255, 255, 255, .16), rgba(255, 255, 255, 0) 65%);
  animation: lg-aurora-b 19s ease-in-out infinite alternate;
}
@keyframes lg-aurora-a { to { transform: translate(-60px, 80px) scale(1.15); } }
@keyframes lg-aurora-b { to { transform: translate(70px, -60px) scale(1.1); } }

/* Logo grande ao fundo (criada pelo script) */
.lg-marca {
  position: absolute !important; z-index: 0 !important; right: -60px; bottom: -40px;
  width: min(460px, 60%); aspect-ratio: 1; object-fit: contain; pointer-events: none;
  opacity: .07; filter: grayscale(1) brightness(6);
  animation: lg-gira 120s linear infinite;
}
@keyframes lg-gira { to { transform: rotate(360deg); } }

/* Partículas que sobem (criadas pelo script) */
.lg-particulas { position: absolute !important; inset: 0; z-index: 0 !important; overflow: hidden; pointer-events: none; }
.lg-particulas i {
  position: absolute; bottom: -10px; left: var(--x); width: var(--t); height: var(--t); border-radius: 50%;
  background: rgba(255, 255, 255, .7); box-shadow: 0 0 8px rgba(255, 255, 255, .6);
  opacity: 0; animation: lg-sobe var(--d) linear infinite; animation-delay: var(--a);
}
@keyframes lg-sobe {
  0% { transform: translateY(0) translateX(0); opacity: 0; }
  10% { opacity: var(--o); }
  90% { opacity: var(--o); }
  100% { transform: translateY(-105vh) translateX(var(--v)); opacity: 0; }
}

/* Logo, selo, título e lista */
:is(.login-brand-logo, .membros-brand-logo) img {
  box-shadow: 0 0 0 4px rgba(255,255,255,.14), 0 10px 26px rgba(0,0,0,.3);
  animation: lg-halo 3.2s ease-in-out infinite;
}
@keyframes lg-halo { 50% { box-shadow: 0 0 0 9px rgba(255,255,255,.06), 0 10px 26px rgba(0,0,0,.3); } }
:is(.login-brand-logo, .membros-brand-logo) strong { letter-spacing: .16em; }
:is(.login-brand-tag, .membros-brand-tag) {
  display: inline-flex; align-items: center; gap: .45rem;
  border-radius: 999px; border: 1px solid rgba(255,255,255,.22);
  background: rgba(255,255,255,.1); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
:is(.login-brand-tag, .membros-brand-tag)::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%; background: #4ADE80;
  box-shadow: 0 0 0 0 rgba(74, 222, 128, .6); animation: lg-ponto 2s ease-out infinite;
}
@keyframes lg-ponto { 70%, 100% { box-shadow: 0 0 0 8px rgba(74, 222, 128, 0); } }
:is(.login-brand-miolo, .membros-brand-miolo) h1 {
  font-size: clamp(2.2rem, 3.4vw, 3.1rem);
  background: linear-gradient(90deg, #fff 0%, #fff 40%, #C7CCFF 50%, #fff 60%, #fff 100%);
  background-size: 250% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: lg-reflexo 6s 1.4s ease-in-out infinite;
}
@keyframes lg-reflexo { 0% { background-position: 100% 0; } 40%, 100% { background-position: -50% 0; } }
:is(.login-brand-recursos, .membros-brand-recursos) li {
  padding: .65rem .85rem; border-radius: 12px;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  transition: background .2s, transform .2s;
}
:is(.login-brand-recursos, .membros-brand-recursos) li:hover { background: rgba(255,255,255,.11); transform: translateX(4px); }
:is(.login-brand-recursos, .membros-brand-recursos) i {
  width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 8px; background: rgba(74, 222, 128, .16);
}

/* Entrada do lado da marca */
.lg-fx :is(.login-brand-logo, .membros-brand-logo) { animation: lg-desce .7s .1s cubic-bezier(.2,.75,.25,1) both; }
.lg-fx :is(.login-brand-tag, .membros-brand-tag) { animation: lg-sobe-entra .6s .25s cubic-bezier(.2,.75,.25,1) both; }
.lg-fx :is(.login-brand-miolo, .membros-brand-miolo) h1 { animation: lg-sobe-entra .7s .35s cubic-bezier(.2,.75,.25,1) both, lg-reflexo 6s 1.4s ease-in-out infinite; }
.lg-fx :is(.login-brand-miolo, .membros-brand-miolo) > p { animation: lg-sobe-entra .7s .48s cubic-bezier(.2,.75,.25,1) both; }
.lg-fx :is(.login-brand-recursos, .membros-brand-recursos) li { animation: lg-desliza .55s cubic-bezier(.2,.75,.25,1) both; }
.lg-fx :is(.login-brand-recursos, .membros-brand-recursos) li:nth-child(1) { animation-delay: .6s; }
.lg-fx :is(.login-brand-recursos, .membros-brand-recursos) li:nth-child(2) { animation-delay: .7s; }
.lg-fx :is(.login-brand-recursos, .membros-brand-recursos) li:nth-child(3) { animation-delay: .8s; }
.lg-fx :is(.login-brand-recursos, .membros-brand-recursos) li:nth-child(4) { animation-delay: .9s; }
.lg-fx :is(.login-brand-recursos, .membros-brand-recursos) li i { animation: lg-pop .5s cubic-bezier(.3,1.6,.5,1) both; animation-delay: inherit; }
.lg-fx :is(.login-brand-rodape, .membros-brand-rodape) { animation: lg-fade 1s 1s both; }
@keyframes lg-desce { from { opacity: 0; transform: translateY(-14px); } }
@keyframes lg-sobe-entra { from { opacity: 0; transform: translateY(18px); } }
@keyframes lg-desliza { from { opacity: 0; transform: translateX(-16px); } }
@keyframes lg-pop { from { transform: scale(0) rotate(-30deg); } }
@keyframes lg-fade { from { opacity: 0; } }

/* ═══════════ LADO DO FORMULÁRIO ═══════════ */
:is(.login-form-wrap, .membros-form-wrap) {
  position: relative; overflow: hidden;
  background:
    radial-gradient(rgba(44, 56, 150, .09) 1px, transparent 1.4px) 0 0 / 22px 22px,
    radial-gradient(700px 420px at 100% 0%, rgba(44, 56, 150, .1), transparent 60%),
    var(--lg-fundo);
}
html[data-tema="escuro"] :is(.login-form-wrap, .membros-form-wrap) {
  background:
    radial-gradient(rgba(140, 151, 232, .08) 1px, transparent 1.4px) 0 0 / 22px 22px,
    radial-gradient(700px 420px at 100% 0%, rgba(140, 151, 232, .08), transparent 60%),
    var(--lg-fundo);
}
:is(.login-form-inner, .membros-form-inner) {
  position: relative; z-index: 1;
  max-width: 460px;
  padding: 2rem 2.1rem 1.6rem;
  border-radius: 22px;
  background: var(--lg-cartao);
  border: 1px solid var(--lg-borda);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  box-shadow: 0 2px 6px rgba(17, 22, 58, .04), 0 24px 60px rgba(17, 22, 58, .12);
}
html[data-tema="escuro"] :is(.login-form-inner, .membros-form-inner) { box-shadow: 0 24px 60px rgba(0, 0, 0, .55); }
:is(.login-form-inner, .membros-form-inner)::before {
  content: ""; position: absolute; left: 24px; right: 24px; top: -1px; height: 3px; border-radius: 0 0 4px 4px;
  background: linear-gradient(90deg, transparent, #3F4DB8, #8C97E8, #3F4DB8, transparent);
}
.lg-fx :is(.login-form-inner, .membros-form-inner) { animation: lg-cartao .8s .15s cubic-bezier(.2,.75,.25,1) both; }
@keyframes lg-cartao { from { opacity: 0; transform: translateY(26px) scale(.97); } }

/* Topo do cartão */
:is(.login-voltar, .membros-voltar) { border-radius: 999px; padding: .4rem .8rem; transition: background .2s, color .2s, gap .2s; }
:is(.login-voltar, .membros-voltar):hover { background: rgba(44, 56, 150, .08); gap: .6rem; }
:is(.login-form-topo, .membros-form-topo) .tema-toggle { border-radius: 10px; border: 1px solid var(--lg-borda); }
.lg-fx :is(.login-form-topo, .membros-form-topo) .tema-toggle i { transition: transform .5s cubic-bezier(.3,1.5,.5,1); }
.lg-fx :is(.login-form-topo, .membros-form-topo) .tema-toggle:hover i { transform: rotate(35deg) scale(1.1); }

/* Ícone do cabeçalho com anel girando */
:is(.login-form-avatar, .membros-form-avatar) {
  position: relative; isolation: isolate;
  background: linear-gradient(135deg, #3F4DB8, #1e2870) !important;
  color: #fff !important;
  box-shadow: 0 12px 28px rgba(30, 40, 112, .35);
}
:is(.login-form-avatar, .membros-form-avatar)::before {
  content: ""; position: absolute; inset: -6px; border-radius: inherit; z-index: -1;
  background: conic-gradient(from 0deg, transparent 0 55%, rgba(63, 77, 184, .9) 75%, #8C97E8 85%, transparent 100%);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2px));
  animation: lg-gira 2.6s linear infinite;
}
.lg-fx :is(.login-form-avatar, .membros-form-avatar) { animation: lg-pop .7s .35s cubic-bezier(.3,1.5,.5,1) both; }
.lg-fx :is(.login-form-avatar, .membros-form-avatar) i { animation: lg-balanca 4s 1.2s ease-in-out infinite; display: inline-block; }
@keyframes lg-balanca { 0%, 70%, 100% { transform: rotate(0); } 75% { transform: rotate(-10deg); } 85% { transform: rotate(8deg); } 92% { transform: rotate(-4deg); } }
:is(.login-form-header, .membros-form-header) h2 { color: var(--lg-titulo); letter-spacing: -.02em; }
.lg-fx :is(.login-form-header, .membros-form-header) h2 { animation: lg-sobe-entra .6s .45s cubic-bezier(.2,.75,.25,1) both; }
.lg-fx :is(.login-form-header, .membros-form-header) p { animation: lg-sobe-entra .6s .55s cubic-bezier(.2,.75,.25,1) both; }

/* Campos */
.lg-fx :is(.login-campo, .membros-campo, .login-linha-extra, .membros-linha-extra, .login-btn-entrar, .membros-btn-entrar, .login-divisor, .membros-divisor, .login-btn-secundario, .membros-btn-secundario, .membros-aviso, .login-form-rodape, .membros-form-rodape) {
  animation: lg-sobe-entra .55s cubic-bezier(.2,.75,.25,1) both; animation-delay: var(--lg-atraso, .6s);
}
:is(.login-campo, .membros-campo) label { transition: color .2s; }
:is(.login-campo, .membros-campo) label i { transition: transform .3s cubic-bezier(.3,1.6,.5,1), color .2s; }
:is(.login-campo, .membros-campo):focus-within label { color: #2c3896; }
html[data-tema="escuro"] :is(.login-campo, .membros-campo):focus-within label { color: #A9B2F2; }
:is(.login-campo, .membros-campo):focus-within label i { transform: scale(1.2) rotate(-8deg); }
:is(.login-campo, .membros-campo) input {
  border-radius: 12px !important; border: 1px solid var(--lg-borda) !important;
  background: var(--lg-campo) !important; color: var(--lg-titulo) !important;
  transition: border-color .2s, box-shadow .25s, transform .2s !important;
}
:is(.login-campo, .membros-campo) input:hover { border-color: #B9C1DA !important; }
:is(.login-campo, .membros-campo) input:focus {
  outline: none; border-color: #2c3896 !important;
  box-shadow: 0 0 0 4px rgba(44, 56, 150, .14), 0 8px 20px rgba(44, 56, 150, .1) !important;
  transform: translateY(-1px);
}
html[data-tema="escuro"] :is(.login-campo, .membros-campo) input:focus { border-color: #8C97E8 !important; box-shadow: 0 0 0 4px rgba(140, 151, 232, .18) !important; }
:is(.login-senha-toggle, .membros-senha-toggle) { border-radius: 9px; transition: background .2s, color .2s, transform .2s; }
:is(.login-senha-toggle, .membros-senha-toggle):hover { transform: scale(1.08); }

/* Aviso de Caps Lock (criado pelo script) */
.lg-caps { display: flex; align-items: center; gap: .4rem; margin-top: .45rem; font-size: .78rem; font-weight: 700; color: #B45309; }
.lg-caps[hidden] { display: none; }
html[data-tema="escuro"] .lg-caps { color: #FBBF24; }
.lg-fx .lg-caps:not([hidden]) { animation: lg-sobe-entra .3s both; }

/* Botão principal */
:is(.login-btn-entrar, .membros-btn-entrar) {
  position: relative; overflow: hidden; justify-content: center;
  border-radius: 12px !important; border: 0 !important;
  background: linear-gradient(135deg, #3F4DB8 0%, #2c3896 45%, #1e2870 100%) !important;
  background-size: 200% 100% !important;
  box-shadow: 0 1px 0 rgba(255,255,255,.2) inset, 0 10px 24px rgba(44, 56, 150, .35) !important;
  transition: background-position .5s, box-shadow .25s, transform .15s !important;
}
:is(.login-btn-entrar, .membros-btn-entrar):hover { background-position: 100% 0 !important; transform: translateY(-2px); box-shadow: 0 1px 0 rgba(255,255,255,.2) inset, 0 14px 30px rgba(44, 56, 150, .45) !important; }
:is(.login-btn-entrar, .membros-btn-entrar):active { transform: translateY(1px) scale(.99); }
:is(.login-btn-entrar, .membros-btn-entrar)::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: 40%; left: -60%; pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.35), transparent); transform: skewX(-20deg);
  animation: lg-brilho-btn 4.5s 2s ease-in-out infinite;
}
@keyframes lg-brilho-btn { 0% { left: -60%; } 30%, 100% { left: 140%; } }
:is(.login-btn-entrar, .membros-btn-entrar) i { transition: transform .25s; }
:is(.login-btn-entrar, .membros-btn-entrar):hover i { transform: translateX(4px); }
.lg-onda { position: absolute; border-radius: 50%; transform: scale(0); background: #fff; opacity: .3; pointer-events: none; animation: lg-onda .6s ease-out forwards; }
@keyframes lg-onda { to { transform: scale(2.6); opacity: 0; } }

/* Divisor e botão secundário */
:is(.login-divisor, .membros-divisor)::before, :is(.login-divisor, .membros-divisor)::after { background: linear-gradient(90deg, transparent, var(--lg-borda)) !important; }
:is(.login-divisor, .membros-divisor)::after { background: linear-gradient(90deg, var(--lg-borda), transparent) !important; }
:is(.login-btn-secundario, .membros-btn-secundario) {
  border-radius: 12px !important; border: 1px solid var(--lg-borda) !important;
  background: transparent !important; transition: background .2s, border-color .2s, transform .2s, color .2s !important;
}
:is(.login-btn-secundario, .membros-btn-secundario):hover { border-color: #2c3896 !important; background: rgba(44, 56, 150, .06) !important; transform: translateY(-1px); }
.membros-aviso { border-radius: 12px; }

/* Avisos de erro/sucesso que aparecem no topo */
.lg-fx #ani-aviso { animation: lg-aviso .5s cubic-bezier(.3,1.4,.5,1) both; }
@keyframes lg-aviso { from { opacity: 0; transform: translate(-50%, -20px); } }
.lg-erro :is(.login-form-inner, .membros-form-inner) { animation: lg-treme .45s .2s both !important; }
@keyframes lg-treme { 20%, 60% { transform: translateX(-7px); } 40%, 80% { transform: translateX(7px); } }

/* ═══════════ CELULAR ═══════════ */
@media (max-width: 992px) {
  :is(.login-form-inner, .membros-form-inner) { padding: 1.6rem 1.3rem 1.3rem; border-radius: 18px; }
  .lg-marca { width: 240px; right: -50px; bottom: -60px; }
  :is(.login-brand-miolo, .membros-brand-miolo) h1 { font-size: 1.8rem; }
}
@media (max-width: 480px) {
  :is(.login-form-wrap, .membros-form-wrap) { padding: 1.25rem .85rem !important; }
}

/* ═══════════ MOVIMENTO REDUZIDO ═══════════ */
@media (prefers-reduced-motion: reduce) {
  html body *, html body *::before, html body *::after { animation: none !important; transition: none !important; }
  .lg-particulas { display: none; }
  :is(.login-brand-miolo, .membros-brand-miolo) h1 { color: #fff; background: none; }
}
