

body.login-page.login-animated-bg-enabled {
  min-height: 100vh;
  overflow: hidden;
  background: #020617 !important;
}

body.login-page.login-animated-bg-enabled::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 22%, rgba(0, 121, 255, .16), transparent 34%),
    radial-gradient(circle at 16% 78%, rgba(251, 196, 4, .12), transparent 30%),
    radial-gradient(circle at 84% 76%, rgba(0, 158, 255, .14), transparent 32%),
    linear-gradient(135deg, #020617 0%, #030712 50%, #000000 100%);
}

.login-animated-background {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background: transparent;
}

.login-animated-background span {
  width: 18vmin;
  height: 18vmin;
  border-radius: 999px;
  backface-visibility: hidden;
  position: absolute;
  animation-name: login-bg-move;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
  filter: blur(.2px);
  opacity: .86;
  will-change: transform;
}

.login-animated-background span:nth-child(1) {
  color: #0079ff;
  top: 42%;
  left: 69%;
  animation-duration: 13.8s;
  animation-delay: -6.7s;
  transform-origin: -23vw 16vh;
  box-shadow: 40vmin 0 6.4vmin currentColor;
}

.login-animated-background span:nth-child(2) {
  color: #009eff;
  top: 78%;
  left: 19%;
  animation-duration: 10.2s;
  animation-delay: -12.2s;
  transform-origin: 12vw -15vh;
  box-shadow: -40vmin 0 9.4vmin currentColor;
}

.login-animated-background span:nth-child(3) {
  color: #fbc404;
  top: 5%;
  left: 61%;
  animation-duration: 13.4s;
  animation-delay: -4.1s;
  transform-origin: 24vw 5vh;
  box-shadow: -40vmin 0 14.2vmin currentColor;
}

.login-animated-background span:nth-child(4) {
  color: #0079ff;
  top: 18%;
  left: 24%;
  animation-duration: 13.8s;
  animation-delay: -5.5s;
  transform-origin: -8vw 20vh;
  box-shadow: -40vmin 0 13.3vmin currentColor;
}

.login-animated-background span:nth-child(5) {
  color: #009eff;
  top: 17%;
  left: 54%;
  animation-duration: 12.7s;
  animation-delay: -1.5s;
  transform-origin: -17vw -20vh;
  box-shadow: 40vmin 0 8.3vmin currentColor;
}

.login-animated-background span:nth-child(6) {
  color: #fbc404;
  top: 45%;
  left: 43%;
  animation-duration: 13.7s;
  animation-delay: -7.4s;
  transform-origin: -14vw -8vh;
  box-shadow: 40vmin 0 6.1vmin currentColor;
}

.login-animated-background span:nth-child(7) {
  color: #6d5dfc;
  top: 59%;
  left: 81%;
  animation-duration: 13.4s;
  animation-delay: -10.5s;
  transform-origin: 3vw 3vh;
  box-shadow: -40vmin 0 9.5vmin currentColor;
}

.login-animated-background span:nth-child(8) {
  color: #38bdf8;
  top: 12%;
  left: 29%;
  animation-duration: 12.1s;
  animation-delay: -1.7s;
  transform-origin: -23vw -14vh;
  box-shadow: -40vmin 0 11.7vmin currentColor;
}

.login-animated-background span:nth-child(9) {
  color: #0079ff;
  top: 64%;
  left: 21%;
  animation-duration: 13.6s;
  animation-delay: -14.3s;
  transform-origin: -12vw 16vh;
  box-shadow: -40vmin 0 12.7vmin currentColor;
}

.login-animated-background span:nth-child(10) {
  color: #1d4ed8;
  top: 18%;
  left: 66%;
  animation-duration: 10.3s;
  animation-delay: -4.1s;
  transform-origin: -11vw -12vh;
  box-shadow: -40vmin 0 10.3vmin currentColor;
}

.login-animated-background span:nth-child(11) {
  color: #009eff;
  top: 64%;
  left: 86%;
  animation-duration: 11.4s;
  animation-delay: -8s;
  transform-origin: 23vw 22vh;
  box-shadow: -40vmin 0 6.1vmin currentColor;
}

.login-animated-background span:nth-child(12) {
  color: #fbc404;
  top: 85%;
  left: 46%;
  animation-duration: 13.6s;
  animation-delay: -10.2s;
  transform-origin: -3vw -11vh;
  box-shadow: -40vmin 0 5.2vmin currentColor;
}

.login-animated-background span:nth-child(13) {
  color: #2563eb;
  top: 35%;
  left: 19%;
  animation-duration: 11.4s;
  animation-delay: -7.6s;
  transform-origin: -22vw 5vh;
  box-shadow: 40vmin 0 9.7vmin currentColor;
}

.login-animated-background span:nth-child(14) {
  color: #60a5fa;
  top: 68%;
  left: 77%;
  animation-duration: 12.6s;
  animation-delay: -1.5s;
  transform-origin: 20vw -8vh;
  box-shadow: -40vmin 0 9.1vmin currentColor;
}

.login-animated-background span:nth-child(15) {
  color: #fbc404;
  top: 83%;
  left: 66%;
  animation-duration: 14.6s;
  animation-delay: -8.3s;
  transform-origin: 7vw 7vh;
  box-shadow: -40vmin 0 13.2vmin currentColor;
}

.login-animated-background span:nth-child(16) {
  color: #0079ff;
  top: 17%;
  left: 12%;
  animation-duration: 12.6s;
  animation-delay: -2.1s;
  transform-origin: 14vw -7vh;
  box-shadow: 40vmin 0 11.2vmin currentColor;
}

.login-animated-background span:nth-child(17) {
  color: #009eff;
  top: 47%;
  left: 50%;
  animation-duration: 13.6s;
  animation-delay: -9.6s;
  transform-origin: 9vw -15vh;
  box-shadow: 40vmin 0 14.4vmin currentColor;
}

.login-animated-background span:nth-child(18) {
  color: #fbc404;
  top: 74%;
  left: 25%;
  animation-duration: 10.9s;
  animation-delay: -3.1s;
  transform-origin: -2vw -2vh;
  box-shadow: 40vmin 0 7.8vmin currentColor;
}

.login-animated-background span:nth-child(19) {
  color: #38bdf8;
  top: 3%;
  left: 38%;
  animation-duration: 10.2s;
  animation-delay: -4.5s;
  transform-origin: 9vw 14vh;
  box-shadow: 40vmin 0 14.5vmin currentColor;
}

.login-animated-background span:nth-child(20) {
  color: #1e40af;
  top: 62%;
  left: 67%;
  animation-duration: 13.5s;
  animation-delay: -3.4s;
  transform-origin: -22vw -13vh;
  box-shadow: -40vmin 0 10vmin currentColor;
}

body.login-page.login-animated-bg-enabled .login-box,
body.login-page.login-animated-bg-enabled .login-container,
body.login-page.login-animated-bg-enabled main,
body.login-page.login-animated-bg-enabled form,
body.login-page.login-animated-bg-enabled .card,
body.login-page.login-animated-bg-enabled .auth-card {
  position: relative;
  z-index: 1;
}

@keyframes login-bg-move {
  100% {
    transform: translate3d(0, 0, 1px) rotate(360deg);
  }
}

@media (max-width: 600px) {
  .login-animated-background span {
    width: 22vmin;
    height: 22vmin;
    opacity: .72;
  }
}

@media (prefers-reduced-motion: reduce) {
  .login-animated-background span {
    animation: none !important;
  }
}





/*
  Il background animato resta sotto.
  Tutto il contenuto reale del login viene portato sopra.
*/
body.login-page.login-animated-bg-enabled {
  position: relative;
  isolation: isolate;
}

body.login-page.login-animated-bg-enabled::before {
  z-index: -3 !important;
}

body.login-page.login-animated-bg-enabled .login-animated-background {
  z-index: -2 !important;
}

body.login-page.login-animated-bg-enabled .login-animated-background span {
  z-index: -1 !important;
}

/* Qualsiasi elemento diretto della pagina login resta sopra lo sfondo */
body.login-page.login-animated-bg-enabled > :not(.login-animated-background) {
  position: relative;
  z-index: 5;
}

/* Protezione esplicita per card, form e campi */
body.login-page.login-animated-bg-enabled .login-box,
body.login-page.login-animated-bg-enabled .login-card,
body.login-page.login-animated-bg-enabled .auth-card,
body.login-page.login-animated-bg-enabled .login-container,
body.login-page.login-animated-bg-enabled form,
body.login-page.login-animated-bg-enabled input,
body.login-page.login-animated-bg-enabled button,
body.login-page.login-animated-bg-enabled select,
body.login-page.login-animated-bg-enabled textarea,
body.login-page.login-animated-bg-enabled label {
  position: relative;
  z-index: 10;
}

/* Il background non deve mai catturare click o stare sopra */
body.login-page.login-animated-bg-enabled .login-animated-background,
body.login-page.login-animated-bg-enabled .login-animated-background * {
  pointer-events: none !important;
}





@media (max-width: 900px) {
  body.login-page.login-animated-bg-enabled {
    min-height: 100dvh !important;
    width: 100% !important;
    box-sizing: border-box !important;

    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;

    padding: clamp(18px, 4dvh, 32px) 14px !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
  }

  body.login-page.login-animated-bg-enabled .login-card {
    width: min(100%, 420px) !important;
    max-width: calc(100vw - 28px) !important;
    margin: 0 auto !important;
    flex: 0 0 auto !important;
  }

  body.login-page.login-animated-bg-enabled .login-lang-switcher {
    width: min(100%, 420px) !important;
    max-width: calc(100vw - 28px) !important;
    margin: 14px auto 0 !important;
    text-align: center !important;
    flex: 0 0 auto !important;
  }
}

@media (max-width: 900px) and (max-height: 640px) {
  body.login-page.login-animated-bg-enabled {
    justify-content: flex-start !important;
    padding-top: 22px !important;
    padding-bottom: 22px !important;
  }
}


