.auth-main {
  position: relative;
  overflow: hidden;
  min-height: 100vh;
}

.auth-motion {
  display: block;
  position: absolute;
  inset: -28%;
  z-index: 0;
  pointer-events: none;
  background: url('../../images/login-abstract.jpg') center / cover no-repeat;
  transform: scale(1.14) translate(-3.5%, -2%);
  will-change: transform;
  animation: auth-art-drift 36s ease-in-out infinite alternate;
}

.auth-motion-scrim {
  display: none;
}

.auth-main .auth-wrapper.v2 {
  position: relative;
  z-index: 1;
  min-height: 100vh;
}

@keyframes auth-art-drift {
  0% { transform: scale(1.14) translate(-3.5%, -2%); }
  50% { transform: scale(1.22) translate(3.5%, 2.5%); }
  100% { transform: scale(1.17) translate(1%, -2.5%); }
}

@media (min-width: 1200px) {
  .auth-motion {
    animation-duration: 52s;
  }

  .auth-main .auth-wrapper.v2 .auth-sidecontent {
    position: relative;
    min-height: 100vh;
    text-align: center;
    background: linear-gradient(
      160deg,
      rgba(29, 38, 48, 0.78) 0%,
      rgba(29, 38, 48, 0.58) 100%
    );
  }

  .auth-main .auth-wrapper.v2 .auth-sidecontent .col-md-8 {
    width: min(34rem, 78%);
    max-width: 34rem;
    margin-inline: auto;
    text-align: center;
  }

  .auth-main .auth-wrapper.v2 .auth-sidecontent.auth-sidecontent-balanced {
    display: flex;
    align-items: center;
  }

  .auth-side-title {
    margin: 0 0 1.15rem;
    font-weight: 600;
    letter-spacing: 0.015em;
    line-height: 1.15;
    text-shadow: 0 1px 14px rgba(15, 23, 42, 0.28);
  }

  .auth-side-lead {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 500;
    line-height: 1.65;
    letter-spacing: 0.01em;
    color: rgba(255, 255, 255, 0.9);
  }
}

@media (max-width: 1199.98px) {
  .auth-motion-scrim {
    display: block;
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
      linear-gradient(
        180deg,
        rgba(29, 38, 48, 0.55) 0%,
        rgba(244, 247, 250, 0.72) 42%,
        rgba(244, 247, 250, 0.88) 100%
      );
  }

  .auth-main .auth-wrapper.v2 .auth-form {
    background: transparent;
  }

  .auth-main .auth-wrapper.v2 .auth-form .card {
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.55);
    box-shadow: 0 18px 40px rgba(29, 38, 48, 0.22);
    backdrop-filter: blur(10px);
  }

  .auth-main.auth-login-stage {
    height: 100vh;
    height: 100dvh;
  }

  .auth-main.auth-login-stage .auth-motion-scrim {
    background:
      linear-gradient(
        180deg,
        rgba(15, 23, 42, 0.2) 0%,
        rgba(15, 23, 42, 0.08) 50%,
        rgba(15, 23, 42, 0.24) 100%
      );
  }

  .auth-main.auth-login-stage .auth-wrapper.v2 {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 100%;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .auth-main.auth-login-stage .auth-wrapper.v2 .auth-form {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: min(23.75rem, calc(100% - 2rem));
    min-height: 0;
    height: auto;
    margin: auto;
    padding: 1.25rem 0;
    box-sizing: border-box;
  }

  .auth-main.auth-login-stage .auth-wrapper.v2 .auth-form .position-relative,
  .auth-main.auth-login-stage .auth-wrapper.v2 .auth-form .card {
    width: 100%;
  }
}

.auth-main .form-check.form-switch .form-check-input {
  --bs-form-check-bg: var(--bs-gray-300);
  background-color: var(--bs-gray-300);
  border-color: color-mix(in srgb, #1d2630 16%, var(--bs-gray-300));
  --bs-form-switch-bg: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%231d2630'/%3e%3c/svg%3e");
}

.auth-main .form-check.form-switch .form-check-input:focus {
  border-color: #1d2630;
  box-shadow: 0 0 0 0.2rem rgba(29, 38, 48, 0.2);
  --bs-form-switch-bg: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%231d2630'/%3e%3c/svg%3e");
}

.auth-main .form-check.form-switch .form-check-input.input-primary:checked,
.auth-main .form-check.form-switch .form-check-input:checked {
  --bs-form-check-bg: var(--bs-gray-300);
  background-color: var(--bs-gray-300);
  border-color: color-mix(in srgb, #1d2630 16%, var(--bs-gray-300));
  --bs-form-switch-bg: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%231d2630'/%3e%3c/svg%3e");
}

@media (prefers-reduced-motion: reduce) {
  .auth-motion {
    animation: none !important;
    transform: scale(1.16) !important;
  }
}
