.auth-modern-shell {
  position: relative;
  display: grid;
  align-items: center;
  min-height: calc(100vh - 8.5rem);
  padding: 0.4rem 0 1.5rem;
}

.auth-modern-shell::before,
.auth-modern-shell::after {
  content: '';
  position: absolute;
  inset: auto;
  border-radius: 999px;
  pointer-events: none;
  filter: blur(0);
  opacity: 0.85;
}

.auth-modern-shell::before {
  top: 1rem;
  right: 7%;
  width: 14rem;
  height: 14rem;
  background:
    radial-gradient(circle at 35% 35%, rgba(0, 183, 255, 0.22), transparent 58%),
    radial-gradient(circle at 70% 65%, rgba(75, 233, 255, 0.14), transparent 64%);
  filter: blur(12px);
}

.auth-modern-shell::after {
  left: 4%;
  bottom: 1rem;
  width: 18rem;
  height: 18rem;
  background:
    radial-gradient(circle at 50% 50%, rgba(65, 223, 158, 0.08), transparent 58%),
    radial-gradient(circle at 30% 30%, rgba(12, 96, 248, 0.14), transparent 62%);
  filter: blur(18px);
}

.auth-modern-card {
  position: relative;
  z-index: 1;
  width: min(640px, calc(100vw - 2rem));
  margin: 0 auto;
  padding: 1.1rem;
  border-radius: 28px;
  border: 1px solid color-mix(in srgb, var(--border) 86%, transparent);
  background:
    linear-gradient(180deg, rgba(14, 22, 37, 0.96), rgba(9, 15, 27, 0.98));
  backdrop-filter: blur(18px);
  box-shadow:
    0 28px 80px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.03);
  overflow: hidden;
  animation: auth-rise 560ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.auth-modern-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(120deg, rgba(0, 183, 255, 0.08), transparent 30%),
    linear-gradient(300deg, rgba(75, 233, 255, 0.04), transparent 26%);
  pointer-events: none;
}

.auth-modern-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 0.36fr);
  gap: 0.9rem;
  align-items: start;
}

.auth-modern-copy {
  display: grid;
  gap: 0.4rem;
  max-width: 42ch;
}

.auth-modern-eyebrow {
  margin: 0;
  letter-spacing: 0.18em;
}

.auth-modern-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

.auth-modern-title-row h1 {
  margin: 0;
  font-size: clamp(1.9rem, 3.4vw, 2.65rem);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.auth-modern-mode-tag {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  padding: 0.34rem 0.72rem;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--border) 82%, transparent);
  background: color-mix(in srgb, var(--surface) 76%, transparent);
  color: color-mix(in srgb, var(--text-muted) 72%, var(--text));
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.auth-modern-copy p:last-child {
  margin: 0;
  max-width: 36ch;
  color: color-mix(in srgb, var(--text-muted) 88%, transparent);
  font-size: 0.9rem;
  line-height: 1.45;
}

.auth-modern-highlights {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
  margin-top: 1rem;
}

.auth-modern-highlights:empty {
  display: none;
}

.auth-modern-highlight {
  display: grid;
  gap: 0.32rem;
  min-height: 112px;
  padding: 0.95rem 0.98rem;
  border-radius: 20px;
  border: 1px solid color-mix(in srgb, var(--border) 84%, transparent);
  background:
    linear-gradient(180deg, rgba(15, 24, 39, 0.92), rgba(10, 16, 28, 0.96));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
  animation: auth-rise 620ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.auth-modern-highlight strong {
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--accent-2) 52%, var(--text));
}

.auth-modern-highlight span {
  color: color-mix(in srgb, var(--text-muted) 90%, transparent);
  font-size: 0.86rem;
  line-height: 1.55;
}

.auth-modern-form {
  margin-top: 0.9rem;
  display: grid;
  gap: 0.8rem;
}

.auth-modern-form .form-grid {
  gap: 0.88rem;
}

.auth-modern-form-grid-single {
  grid-template-columns: 1fr;
}

.auth-modern-field {
  gap: 0.5rem;
}

.auth-modern-field label {
  color: color-mix(in srgb, var(--text-muted) 88%, var(--text));
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.auth-modern-field input {
  min-height: 3rem;
  border-radius: 16px;
  border: 1px solid color-mix(in srgb, var(--border) 78%, transparent);
  background:
    linear-gradient(180deg, rgba(15, 24, 39, 0.92), rgba(12, 19, 32, 0.96));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.02),
    0 1px 0 rgba(255, 255, 255, 0.01);
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease,
    background 180ms ease;
}

.auth-modern-field input::placeholder {
  color: color-mix(in srgb, var(--text-muted) 88%, transparent);
}

.auth-modern-field input:hover {
  border-color: color-mix(in srgb, var(--accent) 24%, var(--border));
}

.auth-modern-field input:focus,
.auth-modern-field input:focus-visible {
  border-color: color-mix(in srgb, var(--accent) 68%, var(--border));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent);
  transform: translateY(-1px);
}

.auth-modern-legal {
  padding: 0.85rem 0.95rem;
  border-radius: 18px;
  border: 1px solid color-mix(in srgb, var(--border) 80%, transparent);
  background: color-mix(in srgb, var(--surface-2) 68%, transparent);
}

.auth-modern-legal .auth-legal-consent {
  margin-top: 0;
  padding: 0;
  align-items: flex-start;
  gap: 0.7rem;
}

.auth-modern-legal .auth-legal-consent input[type='checkbox'] {
  margin-top: 0.15rem;
  accent-color: var(--accent);
}

.auth-modern-primary {
  display: grid;
  gap: 0.65rem;
  margin-top: 0.2rem;
}

.auth-modern-primary .btn.primary,
.auth-modern-primary .auth-google-btn {
  min-height: 3rem;
  width: 100%;
}

.auth-modern-primary .btn.primary {
  box-shadow: 0 16px 28px rgba(0, 183, 255, 0.18);
}

.auth-google-btn {
  justify-content: center;
  gap: 0.7rem;
  border-color: rgba(255, 255, 255, 0.16);
  background: #0b1018;
  color: #f8fafc;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.auth-google-btn:hover,
.auth-google-btn:focus-visible {
  border-color: color-mix(in srgb, var(--accent) 50%, var(--border));
  background: #0f1724;
}

.auth-google-mark {
  display: inline-grid;
  width: 1.8rem;
  height: 1.8rem;
  place-items: center;
  border-radius: 0.42rem;
  background: #242424;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
  flex: 0 0 auto;
  overflow: hidden;
}

.auth-google-mark img {
  display: block;
  width: 1.48rem;
  height: 1.48rem;
}

.auth-modern-secondary-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.auth-modern-secondary-actions .btn {
  min-height: 2.9rem;
  padding-inline: 0.95rem;
}

.auth-modern-secondary-actions .btn.secondary,
.auth-modern-secondary-actions .btn.ghost {
  background: transparent;
  box-shadow: none;
}

.auth-modern-secondary-actions .btn.ghost {
  color: color-mix(in srgb, var(--text-muted) 88%, var(--text));
}

.auth-reset-banner {
  display: grid;
  grid-template-columns: auto auto 1fr;
  align-items: center;
  gap: 0.7rem;
  padding: 0.8rem 0.95rem;
  border-radius: 16px;
  border: 1px solid color-mix(in srgb, var(--accent) 38%, var(--border));
  background: linear-gradient(180deg, rgba(14, 24, 39, 0.92), rgba(10, 18, 31, 0.96));
}

.auth-reset-banner-label {
  color: color-mix(in srgb, var(--accent) 72%, var(--text));
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.auth-reset-banner strong {
  font-size: 1rem;
  letter-spacing: -0.02em;
}

.auth-reset-banner code {
  font-family: inherit;
}

.auth-reset-banner small {
  color: color-mix(in srgb, var(--text-muted) 88%, transparent);
  font-size: 0.82rem;
  justify-self: end;
}

.auth-mode-reset-confirm .auth-modern-hero,
.auth-mode-reset-request .auth-modern-hero {
  grid-template-columns: 1fr;
}

.auth-mode-reset-confirm .auth-modern-copy,
.auth-mode-reset-request .auth-modern-copy {
  max-width: 34ch;
}

.auth-mode-reset-confirm .auth-modern-title-row h1,
.auth-mode-reset-request .auth-modern-title-row h1 {
  font-size: clamp(1.75rem, 2.7vw, 2.1rem);
}

.auth-modern-card .coach-note.warning {
  border-radius: 16px;
}

.auth-loading-shell {
  min-height: min(720px, calc(100vh - 180px));
  display: grid;
  place-items: center;
}

.auth-loading-card {
  width: min(360px, 100%);
  display: grid;
  justify-items: center;
  gap: 1rem;
  padding: 2rem;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.76);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.24);
}

.auth-loading-logo {
  width: min(190px, 72%);
  height: auto;
  object-fit: contain;
}

.auth-loading-pulse {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 3px solid rgba(56, 189, 248, 0.18);
  border-top-color: rgba(56, 189, 248, 0.96);
  animation: auth-loading-spin 850ms linear infinite;
}

.auth-loading-card p {
  margin: 0;
  color: var(--text-muted);
  font-weight: 700;
}

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

@keyframes auth-rise {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 940px) {
  .auth-modern-card {
    width: min(640px, calc(100vw - 1.4rem));
    padding: 1rem;
  }

  .auth-modern-hero {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .auth-modern-shell {
    min-height: auto;
    padding: 0.2rem 0 1rem;
  }

  .auth-modern-card {
    width: min(100%, calc(100vw - 1rem));
    border-radius: 24px;
    padding: 0.85rem;
  }

  .auth-modern-title-row {
    gap: 0.55rem;
  }

  .auth-modern-title-row h1 {
    font-size: clamp(1.7rem, 8vw, 2.2rem);
  }

  .auth-modern-legal,
  .auth-reset-banner {
    border-radius: 16px;
  }

  .auth-modern-secondary-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .auth-modern-secondary-actions .btn,
  .auth-modern-primary .btn {
    width: 100%;
  }

  .auth-reset-banner {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }

  .auth-reset-banner small {
    justify-self: start;
  }
}

@media (prefers-reduced-motion: reduce) {
  .auth-modern-card,
  .auth-modern-highlight {
    animation: none;
  }

  .auth-modern-field input {
    transition: none;
  }
}
