/* ══════════════════════════════════════════════════════════════
   Auth Pages — static/css/pages/auth.css
   Shared styles for login, signup, and OTP verification pages.
   Uses design tokens from root.css. No hardcoded colors.
   ══════════════════════════════════════════════════════════════ */

/* ── Page layout ──────────────────────────────────────────── */
.auth-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary-50) 0%, var(--neutral-50) 50%, var(--accent-light) 100%);
  padding: 2rem 1rem;
}

/* ── Brand header ─────────────────────────────────────────── */
.auth-brand {
  text-align: center;
  margin-bottom: 2rem;
}

.auth-brand-logo {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--primary-dark);
  text-decoration: none;
}

.auth-brand-logo i {
  font-size: 2rem;
  color: var(--accent);
}

.auth-brand-tagline {
  display: block;
  margin-top: .5rem;
  font-size: .9rem;
  color: var(--neutral-600);
}

/* ── Card ─────────────────────────────────────────────────── */
.auth-card {
  width: 100%;
  max-width: 440px;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  box-sizing: border-box;
}

.auth-card *,
.auth-card *::before,
.auth-card *::after {
  box-sizing: border-box;
}

.auth-card-accent {
  height: 4px;
  background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 100%);
}

.auth-card-body {
  padding: 2rem 2rem 1.5rem;
}

.auth-card-footer {
  padding: 1rem 2rem;
  background: var(--neutral-50);
  border-top: 1px solid var(--neutral-200);
  text-align: center;
  font-size: .875rem;
  color: var(--neutral-600);
}

.auth-card-footer a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
}

.auth-card-footer a:hover {
  text-decoration: underline;
}

/* ── Headings ─────────────────────────────────────────────── */
.auth-heading {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--neutral-900);
  margin-bottom: .25rem;
}

.auth-subheading {
  font-size: .925rem;
  color: var(--neutral-600);
  margin-bottom: 1.5rem;
}

/* ── Step indicator ───────────────────────────────────────── */
.auth-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  margin-bottom: 1.75rem;
}

.auth-step {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: .8rem;
  font-weight: 600;
  background: var(--neutral-200);
  color: var(--neutral-600);
  transition: all .2s ease;
}

.auth-step.active {
  background: var(--primary);
  color: var(--white);
}

.auth-step.done {
  background: var(--success);
  color: var(--white);
}

.auth-step-line {
  width: 40px;
  height: 2px;
  background: var(--neutral-200);
}

.auth-step-line.done {
  background: var(--success);
}

/* ── Form controls ────────────────────────────────────────── */
.auth-form {
  display: block;
  width: 100%;
}

.auth-form .mb-3,
.auth-form .mb-4 {
  display: block;
  width: 100%;
}

.auth-form .form-label {
  display: block;
  width: 100%;
  font-size: .875rem;
  font-weight: 600;
  color: var(--neutral-700);
  margin-bottom: .35rem;
}

.auth-form .form-control {
  display: block;
  width: 100%;
  border: 1px solid var(--neutral-200);
  border-radius: var(--radius-sm);
  padding: .625rem .875rem;
  font-size: .95rem;
  box-sizing: border-box;
  transition: border-color .2s, box-shadow .2s;
}

.auth-form .form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(44, 140, 132, .15);
}

.auth-form .form-control[readonly] {
  background: var(--neutral-100);
  color: var(--neutral-600);
  cursor: not-allowed;
}

.auth-form .form-text {
  font-size: .8rem;
  color: var(--neutral-400);
}

/* ── Google button ────────────────────────────────────────── */
.btn-google {
  display: flex !important;
  align-items: center;
  justify-content: center;
  gap: .75rem;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: .75rem 1.25rem;
  text-decoration: none !important;
  background: var(--white);
  border: 1px solid var(--neutral-200);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-weight: 500;
  color: var(--neutral-900);
  cursor: pointer;
  transition: box-shadow .2s, border-color .2s, transform .15s;
}

.btn-google:hover {
  border-color: var(--neutral-400);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
  text-decoration: none !important;
  color: var(--neutral-900);
}

.btn-google:active {
  transform: translateY(0);
  box-shadow: var(--shadow-sm);
}

.btn-google img {
  width: 20px;
  height: 20px;
}

/* ── Primary button: moved to components/buttons.css as .btn-uc-primary ── */

/* ── OTP input ────────────────────────────────────────────── */
.otp-input {
  text-align: center;
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: .75rem;
  padding: .75rem 1rem;
  max-width: 280px;
  margin: 0 auto;
  display: block;
  font-family: 'Courier New', monospace;
  color: var(--primary-dark);
  border: 2px solid var(--neutral-200);
  border-radius: var(--radius-md);
}

.otp-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(44, 140, 132, .15);
  outline: none;
}

.otp-hint {
  text-align: center;
  margin-top: .75rem;
  font-size: .875rem;
  color: var(--neutral-600);
}

.otp-hint i {
  color: var(--primary);
}

.otp-resend {
  text-align: center;
  margin-top: 1rem;
}

.otp-resend a {
  color: var(--primary);
  font-weight: 500;
  font-size: .875rem;
  text-decoration: none;
}

.otp-resend a:hover {
  text-decoration: underline;
}

.otp-resend a.disabled {
  color: var(--neutral-400);
  pointer-events: none;
}

/* ── Divider ──────────────────────────────────────────────── */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1.25rem 0;
  font-size: .8rem;
  color: var(--neutral-400);
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--neutral-200);
}

/* ── Back link ────────────────────────────────────────────── */
.auth-back {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  font-size: .875rem;
  color: var(--neutral-600);
  text-decoration: none;
  margin-bottom: 1.5rem;
}

.auth-back:hover {
  color: var(--primary);
}

/* ── Phone display ────────────────────────────────────────── */
.phone-badge {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .35rem .75rem;
  background: var(--primary-50);
  border: 1px solid var(--primary-light);
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: .95rem;
  color: var(--primary-dark);
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 480px) {
  .auth-card-body {
    padding: 1.5rem 1.25rem 1.25rem;
  }

  .auth-heading {
    font-size: 1.25rem;
  }

  .otp-input {
    font-size: 1.5rem;
    letter-spacing: .5rem;
    max-width: 240px;
  }
}
