/* Tela de entrada: malha com o logo ao fundo, em movimento lento e contínuo. Tudo é decorativo e some com "reduzir movimento". */
.auth { position: relative; overflow: hidden; isolation: isolate; background: var(--bg); }

.auth-stage { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }

/* malha: o logo repetido, na cor de destaque do tema, deslizando na diagonal sem emenda (um ladrilho a cada ciclo) */
.mesh { position: absolute; inset: -120px; background: var(--accent); opacity: .13;
  -webkit-mask: url(/mesh.svg) 0 0 / 96px 96px repeat; mask: url(/mesh.svg) 0 0 / 96px 96px repeat;
  animation: mesh-drift 48s linear infinite; will-change: transform; }

/* facho de luz: uma faixa suave que passa por cima da malha e a deixa mais nítida por onde passa */
.sweep { position: absolute; inset: 0;
  -webkit-mask: radial-gradient(closest-side, #000 25%, transparent) no-repeat; mask: radial-gradient(closest-side, #000 25%, transparent) no-repeat;
  -webkit-mask-size: 70vmax 70vmax; mask-size: 70vmax 70vmax;
  animation: sweep 22s cubic-bezier(.45, .05, .55, .95) infinite; }
.sweep .mesh { opacity: .62; background: linear-gradient(120deg, var(--accent), var(--ok)); }

/* luzes de fundo, bem difusas */
.glow { position: absolute; width: 62vmax; height: 62vmax; border-radius: 50%; filter: blur(80px); opacity: .28; will-change: transform; }
.glow.a { top: -22vmax; left: -18vmax; background: radial-gradient(circle, var(--accent), transparent 66%); animation: glow-a 30s ease-in-out infinite alternate; }
.glow.b { right: -24vmax; bottom: -26vmax; background: radial-gradient(circle, var(--ok), transparent 66%); animation: glow-b 36s ease-in-out infinite alternate; }

/* bordas escurecidas: a malha fica discreta nos cantos e o foco vai para o cartão */
.vignette { position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 45%, transparent 28%, color-mix(in srgb, var(--bg) 78%, transparent) 100%); }

@keyframes mesh-drift { to { transform: translate3d(96px, 96px, 0); } }
@keyframes sweep {
  0% { -webkit-mask-position: -45% 120%; mask-position: -45% 120%; }
  100% { -webkit-mask-position: 145% -20%; mask-position: 145% -20%; }
}
@keyframes glow-a { to { transform: translate3d(14vmax, 10vmax, 0) scale(1.12); } }
@keyframes glow-b { to { transform: translate3d(-12vmax, -9vmax, 0) scale(1.1); } }
@keyframes rise { from { opacity: 0; transform: translateY(14px) scale(.985); } to { opacity: 1; transform: none; } }

.auth-card { position: relative; animation: rise .9s cubic-bezier(.2, .7, .2, 1) both; }
.auth-card .card { background: color-mix(in srgb, var(--surface) 86%, transparent); backdrop-filter: blur(16px) saturate(1.2); -webkit-backdrop-filter: blur(16px) saturate(1.2);
  border-color: color-mix(in srgb, var(--border-strong) 70%, transparent); box-shadow: 0 1px 2px rgba(17, 22, 43, .08), 0 24px 60px rgba(17, 22, 43, .16); }
.auth-card .brand .logo { width: 42px; height: 42px; border-radius: 12px; box-shadow: 0 6px 20px color-mix(in srgb, var(--accent) 45%, transparent); }
.auth-card .brand .logo .icon { width: 24px; height: 24px; }
.auth-card .brand { font-size: 1.25rem; }

@media (prefers-reduced-motion: reduce) {
  .mesh, .sweep, .glow, .auth-card { animation: none; }
  .sweep { display: none; }
}
@media (max-width: 560px) {
  .mesh { opacity: .1; }
  .glow { filter: blur(60px); }
}
