.auth-page {
  position: relative;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  background:
    radial-gradient(circle at top right, rgba(0, 106, 226, 0.12), transparent 40%),
    radial-gradient(circle at bottom left, rgba(24, 25, 55, 0.08), transparent 35%),
    var(--color-bg);
}

.auth-card {
  width: min(22.5rem, 100%);
  background: var(--color-white);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 2.5rem 1.55rem 2.35rem;
  animation: auth-card-in 0.45s ease both;
}

@keyframes auth-card-in {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.auth-page.is-leaving .auth-card {
  animation: auth-card-out 0.4s ease forwards;
}

@keyframes auth-card-out {
  to {
    opacity: 0;
    transform: translateY(-8px) scale(0.97);
  }
}

.auth-card .brand {
  margin-bottom: 1.75rem;
}

.auth-card .brand img {
  width: 100%;
  max-width: 19.4rem;
  height: auto;
  display: block;
  margin-inline: auto;
}

.auth-card form {
  display: grid;
  gap: 1.2rem;
}

.auth-card .btn {
  width: 100%;
  margin-top: 0.55rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.auth-card .btn.is-loading {
  transform: scale(0.99);
}

.auth-overlay {
  position: fixed;
  inset: 0;
  z-index: 4000;
  display: grid;
  place-items: center;
  background: rgba(235, 241, 245, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

.auth-overlay.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.auth-overlay[hidden] {
  display: none;
}

.auth-overlay.is-visible[hidden] {
  display: grid;
}

.auth-overlay-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
  text-align: center;
  animation: auth-overlay-in 0.4s ease both 0.1s;
}

@keyframes auth-overlay-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.auth-overlay-inner img {
  width: min(28rem, 82vw);
  height: auto;
}

.auth-overlay-inner p {
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--fs-lg);
  font-weight: 600;
  color: var(--color-navy);
}

.auth-spinner {
  width: 1.5rem;
  height: 1.5rem;
  border: 2px solid rgba(0, 106, 226, 0.2);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: auth-spin 0.7s linear infinite;
}

@keyframes auth-spin {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .auth-card,
  .auth-page.is-leaving .auth-card,
  .auth-overlay,
  .auth-overlay-inner,
  .auth-spinner {
    animation: none !important;
    transition: none !important;
  }
}
