/* ============================================
   AUTH & SUB-PAGE STYLES
   Loaded only on customer auth pages.
   Tokens: Outfit/Manrope vars from landing.css
   Mini-hero: ../img/auth-mini-hero.png
   ============================================ */

body.rg-auth,
body.rg-auth * ,
body.rg-auth *::before,
body.rg-auth *::after {
  box-sizing: border-box;
}

body.rg-auth {
  margin: 0;
  padding: 0;
  font-family: var(--font-body, 'Manrope', sans-serif);
  font-size: 16px;
  line-height: 24px;
  color: var(--body-text, #475569);
  -webkit-font-smoothing: antialiased;
  background: #EDF0F5;
}

body.rg-auth a {
  color: inherit;
}

body.rg-auth img {
  max-width: 100%;
  display: block;
}

/* Color aliases matching the Figma CSS token names */
body.rg-auth {
  --color-navy-dark: var(--navy-dark, #0A1628);
  --color-navy-blue: var(--navy-blue, #0D47A1);
  --color-lavender: var(--lavender, #A3B3E5);
  --color-red: var(--red, #C62828);
  --color-text-primary: var(--heading-dark, #1A1A2E);
  --color-text-body: var(--body-text, #475569);
  --color-text-muted: var(--muted, #9CA3AF);
}

/* ----- Mini Hero (sub-page header strip) -----
   Intentionally NOT redefined here: landing.css owns `.mini-hero*` and is always
   loaded first on auth pages, so auth and public sub-pages stay pixel-identical. */

/* ----- Auth Page Layout ----- */
.auth-page {
  min-height: 100vh;
  background-color: #EDF0F5;
  display: flex;
  flex-direction: column;
}

.auth-page__content {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 48px 20px 80px;
}

/* ----- Auth Card ----- */
.auth-card {
  width: 100%;
  max-width: 560px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 24px rgba(10, 22, 40, 0.08);
  overflow: hidden;
}

.auth-card--wide {
  max-width: 640px;
}

.auth-card__header {
  background: var(--color-navy-dark);
  padding: 28px 40px;
  border-radius: 12px 12px 0 0;
}

.auth-card__heading {
  font-family: 'Outfit', sans-serif;
  font-size: 24px;
  font-weight: 800;
  color: #fff;
  margin: 0 0 6px;
}

.auth-card__subtitle {
  font-family: 'Manrope', sans-serif;
  font-size: 14px;
  font-weight: 400;
  color: var(--color-lavender);
  margin: 0;
  line-height: 20px;
}

.auth-card__body {
  padding: 32px 40px 40px;
}

.auth-card__body--center {
  text-align: center;
}

/* ----- Progress Stepper (Register page) ----- */
.progress-stepper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 24px 40px;
  border-bottom: 1px solid #E5E7EB;
}

.progress-stepper__step {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'Manrope', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-muted);
}

.progress-stepper__step.is-active {
  color: var(--color-navy-dark);
  font-weight: 800;
}

.progress-stepper__step.is-done {
  color: var(--color-navy-dark);
}

.progress-stepper__number {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #E5E7EB;
  color: var(--color-text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}

.progress-stepper__step.is-active .progress-stepper__number,
.progress-stepper__step.is-done .progress-stepper__number {
  background: var(--color-navy-dark);
  color: #fff;
}

.progress-stepper__line {
  width: 40px;
  height: 2px;
  background: #E5E7EB;
  margin: 0 12px;
  flex-shrink: 0;
}

/* ----- Form Elements ----- */
.form-section__title {
  font-family: 'Outfit', sans-serif;
  font-size: 18px;
  font-weight: 800;
  color: var(--color-text-primary);
  text-transform: uppercase;
  margin: 32px 0 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid #E5E7EB;
}

.form-section__title:first-child {
  margin-top: 0;
}

.auth-page .form-group {
  margin-bottom: 20px;
}

.auth-page .form-group__label {
  display: block;
  font-family: 'Manrope', sans-serif;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--color-text-primary);
  margin-bottom: 6px;
}

.auth-page .form-group__input,
.auth-page .form-group__select {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  border: 1px solid #D1D5DB;
  border-radius: 8px;
  font-family: 'Manrope', sans-serif;
  font-size: 14px;
  color: var(--color-text-primary);
  background: #fff;
  transition: border-color 0.2s;
  appearance: none;
  -webkit-appearance: none;
}

.auth-page .form-group__select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%239CA3AF' d='M1.41 0L6 4.58 10.59 0 12 1.41l-6 6-6-6z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

.auth-page .form-group__input::placeholder {
  color: #9CA3AF;
}

.auth-page .form-group__input:focus,
.auth-page .form-group__select:focus {
  outline: none;
  border-color: var(--color-navy-blue);
  box-shadow: 0 0 0 3px rgba(13, 71, 161, 0.1);
}

.auth-page .form-group__helper {
  font-family: 'Manrope', sans-serif;
  font-size: 12px;
  color: var(--color-text-muted);
  margin-top: 4px;
  display: block;
}

.auth-page .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* ----- Consent Checkboxes ----- */
.consent-group {
  margin-top: 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.consent-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.consent-item input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  flex-shrink: 0;
  accent-color: var(--color-navy-dark);
}

.consent-item__text {
  font-family: 'Manrope', sans-serif;
  font-size: 13px;
  line-height: 18px;
  color: var(--color-text-body);
}

/* ----- OTP Code Input ----- */
.otp-group {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 24px 0;
}

.otp-group__input {
  width: 48px;
  height: 56px;
  border: 2px solid var(--color-navy-dark);
  border-radius: 10px;
  font-family: 'Outfit', sans-serif;
  font-size: 24px;
  font-weight: 700;
  text-align: center;
  color: var(--color-navy-dark);
  background: #fff;
}

.otp-group__input:focus {
  outline: none;
  border-color: var(--color-navy-blue);
  box-shadow: 0 0 0 3px rgba(13, 71, 161, 0.15);
}

.otp-timer {
  text-align: center;
  font-family: 'Manrope', sans-serif;
  font-size: 13px;
  color: var(--color-red);
  font-weight: 600;
  margin-bottom: 24px;
}

/* ----- Password Strength Checklist ----- */
.password-checklist {
  list-style: none;
  padding: 16px 20px;
  margin: 16px 0;
  background: #F9FAFB;
  border-radius: 8px;
}

.password-checklist li {
  font-family: 'Manrope', sans-serif;
  font-size: 13px;
  line-height: 28px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--color-text-muted);
}

.password-checklist li::before {
  content: '○';
  font-size: 12px;
}

.password-checklist li.is-valid {
  color: #16A34A;
}

.password-checklist li.is-valid::before {
  content: '✓';
}

.password-checklist li.is-invalid {
  color: var(--color-red);
}

.password-checklist li.is-invalid::before {
  content: '✕';
}

/* ----- Auth Buttons ----- */
.btn--auth-primary {
  display: block;
  width: 100%;
  height: 48px;
  background: var(--color-navy-dark);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-family: 'Manrope', sans-serif;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s;
  text-align: center;
  text-decoration: none;
  line-height: 48px;
  padding: 0;
}

.btn--auth-primary:hover {
  background: #0D1B2A;
  color: #fff;
}

.btn--auth-outline {
  display: block;
  width: 100%;
  height: 48px;
  background: #fff;
  color: var(--color-navy-dark);
  border: 1.5px solid var(--color-navy-dark);
  border-radius: 8px;
  font-family: 'Manrope', sans-serif;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
  text-decoration: none;
  line-height: 48px;
  padding: 0;
  box-sizing: border-box;
}

.btn--auth-outline:hover {
  background: var(--color-navy-dark);
  color: #fff;
}

button.btn--auth-primary,
button.btn--auth-outline {
  line-height: normal;
}

/* ----- Auth Links & Dividers ----- */
.auth-link {
  display: block;
  text-align: center;
  font-family: 'Manrope', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: var(--color-navy-blue);
  text-decoration: underline;
  margin-top: 16px;
  background: none;
  border: none;
  cursor: pointer;
  width: 100%;
  padding: 0;
}

.auth-link:hover {
  color: var(--color-navy-dark);
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 20px 0;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #E5E7EB;
}

.auth-divider span {
  font-family: 'Manrope', sans-serif;
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
}

.auth-helper {
  text-align: center;
  font-family: 'Manrope', sans-serif;
  font-size: 13px;
  color: var(--color-text-body);
  margin-top: 16px;
}

.auth-helper a {
  color: var(--color-navy-blue);
  font-weight: 600;
  text-decoration: underline;
}

/* ----- Auth alerts ----- */
.auth-alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 8px;
  font-family: 'Manrope', sans-serif;
  font-size: 14px;
  line-height: 1.4;
  margin-bottom: 20px;
}

.auth-alert--danger {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.auth-alert--success {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.auth-alert--info {
  background: #e0f2fe;
  color: #0369a1;
  border: 1px solid #bae6fd;
}

.auth-alert--dev {
  background: #fff3cd;
  border: 2px dashed #f59e0b;
  color: #78350f;
  text-align: center;
  display: block;
}

.auth-alert--dev code {
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: 4px;
  color: #b45309;
}

.auth-status-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #dcfce7;
  color: #166534;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  font-size: 1.8rem;
}

/* ----- Auth Page Nav -----
   Height, gutters and logo sizing come from `.rg-nav` / `.brand-logo` in
   landing.css so the auth header is the same lockup as the public header.
   Only the nav content differs (no marketing links). */
.nav-header--auth .rg-nav-link-back {
  font-family: 'Manrope', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: var(--color-lavender);
  text-decoration: none;
  white-space: nowrap;
}

.nav-header--auth .rg-nav-link-back:hover {
  color: #fff;
}

/* ----- Responsive ----- */
@media (max-width: 768px) {
  .auth-card__body {
    padding: 24px 20px 32px;
  }

  .auth-card__header {
    padding: 20px;
  }

  .progress-stepper {
    padding: 20px;
    flex-wrap: wrap;
    gap: 8px;
  }

  .progress-stepper__line {
    width: 24px;
    margin: 0 8px;
  }

  .progress-stepper__step {
    font-size: 12px;
  }

  .auth-page .form-row {
    grid-template-columns: 1fr;
  }

  .otp-group__input {
    width: 40px;
    height: 48px;
    font-size: 20px;
  }

  .otp-group {
    gap: 6px;
  }
}
