/* ==========================================================================
   Auth Pages — Login, Signup, Forgot Password, Role Picker
   ========================================================================== */

/* --- Page background with subtle pattern --- */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: var(--surface);
  position: relative;
  overflow: hidden;
}

/* Subtle radial color washes */
.auth-page::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 600px 600px at 15% 50%, rgba(37,99,235,.04) 0%, transparent 70%),
    radial-gradient(ellipse 400px 400px at 85% 15%, rgba(37,99,235,.03) 0%, transparent 70%);
  pointer-events: none;
}

/* Grid pattern overlay */
.auth-page::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(226,232,240,.3) 1px, transparent 1px),
    linear-gradient(90deg, rgba(226,232,240,.3) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
}

/* --- Auth container --- */
.auth-wrap {
  width: 100%;
  max-width: 420px;
  position: relative;
  z-index: 1;
}

/* --- Auth card --- */
.auth-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  padding: 2rem;
  animation: revealScale .45s ease-out both;
  animation-delay: 150ms;
}
@media (min-width: 640px) {
  .auth-card {
    padding: 2.5rem;
  }
}

/* --- Logo block --- */
.auth-logo {
  text-align: center;
  margin-bottom: var(--sp-xl);
  animation: revealUp .5s ease-out both;
}
.auth-logo-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 2rem;
  color: var(--navy);
  letter-spacing: -.02em;
  margin-bottom: .25rem;
  text-decoration: none;
  display: inline-block;
}
.auth-logo-title:hover {
  color: var(--navy);
}
.auth-logo-sub {
  font-size: .8125rem;
  color: var(--text-secondary);
}

/* --- Auth footer links --- */
.auth-footer {
  text-align: center;
  margin-top: var(--sp-xl);
  animation: fadeIn .5s ease-out both;
  animation-delay: 300ms;
}
.auth-footer a {
  color: var(--text-secondary);
  transition: color var(--ease);
}
.auth-footer a:hover {
  color: var(--sapphire);
}

/* --- App download buttons row --- */
.auth-apps {
  display: flex;
  justify-content: center;
  gap: var(--sp-sm);
  margin-bottom: var(--sp-lg);
}

/* --- Legal bar --- */
.auth-legal {
  color: var(--text-secondary);
  font-size: .8125rem;
}
.auth-legal a {
  color: var(--text-secondary);
}
.auth-legal a:hover {
  color: var(--sapphire);
}

/* --- Social login buttons --- */
.social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  width: 100%;
  padding: .6875rem 1rem;
  font-size: .9375rem;
  font-weight: 500;
  color: var(--navy);
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--ease);
  text-decoration: none;
}
.social-btn:hover {
  background: var(--surface);
  border-color: #CBD5E1;
  transform: translateY(-1px);
  box-shadow: var(--shadow);
  color: var(--navy);
}

/* --- Role picker card --- */
.role-card {
  display: flex;
  align-items: center;
  gap: var(--sp-lg);
  padding: var(--sp-lg);
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  text-decoration: none;
  color: var(--text);
  transition: all var(--ease);
  cursor: pointer;
}
.role-card:hover {
  border-color: var(--sapphire);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  color: var(--text);
}
.role-card-arrow {
  color: var(--text-secondary);
  font-size: 20px;
  transition: all var(--ease);
  margin-left: auto;
}
.role-card:hover .role-card-arrow {
  color: var(--sapphire);
  transform: translateX(3px);
}
.role-card-title {
  font-weight: 700;
  font-size: .875rem;
  color: var(--navy);
  margin-bottom: .125rem;
}
.role-card-subtitle {
  font-size: .875rem;
  color: var(--text-secondary);
}

/* Stagger animation for role cards */
.role-list .role-card:nth-child(1) { animation: revealUp .4s ease-out both; animation-delay: 200ms; }
.role-list .role-card:nth-child(2) { animation: revealUp .4s ease-out both; animation-delay: 280ms; }
.role-list .role-card:nth-child(3) { animation: revealUp .4s ease-out both; animation-delay: 360ms; }
.role-list .role-card:nth-child(4) { animation: revealUp .4s ease-out both; animation-delay: 440ms; }
.role-list .role-card:nth-child(5) { animation: revealUp .4s ease-out both; animation-delay: 520ms; }

/* Heading of a centred auth card (verify-email page). */
.auth-card-title {
  font-size: 1.25rem;
}
