/* Modernized auth UI (scoped by .auth-modern on <body>) */

.auth-modern.authentication-bg {
  background:
    radial-gradient(
      1200px circle at 10% 0%,
      rgba(var(--bs-primary-rgb), 0.18),
      transparent 55%
    ),
    radial-gradient(
      900px circle at 90% 100%,
      rgba(var(--bs-primary-rgb), 0.12),
      transparent 55%
    ),
    var(--bs-body-bg);
}

.auth-modern .account-pages {
  min-height: 100vh;
  display: flex;
  align-items: center;
}

/* Matches the flat card used across the app shell (theme-refresh.css):
   hairline border, 6px radius, no shadow. The blur went with the shadow —
   there is nothing translucent left for it to blur. */
.auth-modern .auth-card {
  border-radius: 6px;
  /* #e6e8eb is theme-refresh.css's --acy-line, written out because the auth
     pages do not load that stylesheet. A step darker than the shell's card
     border so the edges still read against the near-white gradient here. */
  border: 1px solid #e6e8eb;
  box-shadow: none;
  overflow: hidden;
}

.auth-modern .auth-card .card-body {
  padding: 1.75rem;
}

.auth-modern .auth-logo img {
  height: 34px;
}

.auth-modern .auth-title {
  letter-spacing: -0.02em;
}

.auth-modern .authentication-form .form-label {
  font-weight: 600;
  color: var(--bs-body-color);
  margin-bottom: 0.5rem;
}

.auth-modern .authentication-form .form-control {
  border-radius: 0.9rem;
  border: 1px solid rgba(var(--bs-body-color-rgb), 0.14);
  background: rgba(var(--bs-body-bg-rgb), 0.85);
  transition:
    box-shadow 160ms ease,
    border-color 160ms ease,
    background-color 160ms ease;
}

.auth-modern .authentication-form .form-control::placeholder {
  color: rgba(var(--bs-body-color-rgb), 0.55);
}

.auth-modern .authentication-form .form-control:focus {
  border-color: rgba(var(--bs-primary-rgb), 0.55);
  box-shadow: 0 0 0 0.25rem rgba(var(--bs-primary-rgb), 0.15);
  background: rgba(var(--bs-body-bg-rgb), 0.95);
}

.auth-modern .authentication-form .form-control.form-control-lg {
  padding-top: 0.85rem;
  padding-bottom: 0.85rem;
}

.auth-modern .auth-field-icon {
  pointer-events: none;
  opacity: 0.75;
}

.auth-modern .js-password-toggle {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.auth-modern .js-password-toggle:focus-visible {
  outline: none;
  box-shadow: 0 0 0 0.25rem rgba(var(--bs-primary-rgb), 0.15);
}

.auth-modern .form-check-input {
  border-radius: 0.45rem;
}

.auth-modern .btn-auth-primary {
  border-radius: 0.95rem;
  padding: 0.85rem 1rem;
}

.auth-modern .auth-links {
  font-weight: 600;
}

/* Small legal notice (e.g., login consent links) */
.auth-modern .legal-consent {
  font-size: 0.85rem;
  color: rgba(var(--bs-body-color-rgb), 0.65);
}

.auth-modern .legal-consent a {
  color: inherit;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: rgba(var(--bs-body-color-rgb), 0.35);
  text-underline-offset: 2px;
}

.auth-modern .legal-consent a:hover,
.auth-modern .legal-consent a:focus {
  color: rgba(var(--bs-primary-rgb), 1);
  text-decoration-color: rgba(var(--bs-primary-rgb), 0.55);
}

.auth-modern .otp-wrapper {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
}

.auth-modern .otp-input {
  width: 48px;
  height: 58px;
  font-size: 24px;
  text-align: center;
  border: 1px solid rgba(var(--bs-body-color-rgb), 0.18);
  border-radius: 0.9rem;
  font-weight: 700;
  background: rgba(var(--bs-body-bg-rgb), 0.85);
  transition:
    box-shadow 160ms ease,
    border-color 160ms ease,
    background-color 160ms ease;
}

.auth-modern .otp-input:focus {
  outline: none;
  border-color: rgba(var(--bs-primary-rgb), 0.55);
  box-shadow: 0 0 0 0.25rem rgba(var(--bs-primary-rgb), 0.15);
  background: rgba(var(--bs-body-bg-rgb), 0.95);
}

.auth-modern .cursor-pointer {
  cursor: pointer;
}

@media (max-width: 575.98px) {
  .auth-modern .auth-card .card-body {
    padding: 1.25rem;
  }
}

/* "Trusted by" strip of onboarded schools, pinned to the bottom of the auth
   screens and scrolling left like a TV news ticker. Markup comes from
   includes/auth_schools_ticker.php: two identical lists side by side, so
   sliding the track by exactly half loops without a seam. */
.auth-modern .auth-ticker {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10;
  display: flex;
  align-items: stretch;
  height: 2.5rem;
  background: var(--bs-body-bg);
  border-top: 1px solid #e6e8eb;
  font-size: 0.8rem;
}

.auth-modern .auth-ticker-label {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  padding: 0 1rem;
  background: var(--bs-primary);
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.auth-modern .auth-ticker-viewport {
  flex: 1 1 auto;
  overflow: hidden;
  display: flex;
  align-items: center;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 2rem, #000 calc(100% - 2rem), transparent);
  mask-image: linear-gradient(to right, transparent, #000 2rem, #000 calc(100% - 2rem), transparent);
}

.auth-modern .auth-ticker-track {
  display: flex;
  width: max-content;
  animation: auth-ticker-scroll var(--auth-ticker-duration, 40s) linear infinite;
}

.auth-modern .auth-ticker:hover .auth-ticker-track {
  animation-play-state: paused;
}

.auth-modern .auth-ticker-list {
  display: flex;
  margin: 0;
  padding: 0;
  list-style: none;
}

.auth-modern .auth-ticker-item {
  display: flex;
  align-items: center;
  white-space: nowrap;
  padding: 0 1.25rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: rgba(var(--bs-body-color-rgb), 0.8);
}

.auth-modern .auth-ticker-item::after {
  content: "";
  width: 5px;
  height: 5px;
  margin-left: 2.5rem;
  border-radius: 50%;
  background: var(--bs-primary);
}

@keyframes auth-ticker-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  .auth-modern .auth-ticker-track {
    animation-duration: calc(var(--auth-ticker-duration, 40s) * 3);
  }
}

/* Keep the card clear of the fixed strip on short screens. */
.auth-modern:has(.auth-ticker) .account-pages {
  padding-bottom: 3.5rem !important;
}

[data-bs-theme="dark"] .auth-modern .auth-ticker {
  border-top-color: rgba(255, 255, 255, 0.08);
}
