/* ═══════════════════════════════════════════════════════════════════════
   AUTH PAGES — Login / Register / OTP / Forgot Password / Reset Password
   Loaded on all five auth templates so every one of them shares this
   single .auth-card shell (width, padding, radius, border/shadow,
   spacing, RTL/LTR, dark mode). Reuses the same tokens and card shape
   as .contact-form-card. OTP additionally loads otp.css right after
   this file for its couple of extra bits (resend row, code input).
═══════════════════════════════════════════════════════════════════════ */

/* Auth page titles: override the sitewide .section spacing (--sp-16)
   with the tighter --sp-10 token for the intro/title block only. Both
   are existing fluid tokens from base/variables.css — no new value
   introduced. Applies to Login / Register / OTP / Forgot / Reset. */
.auth-page-intro {
  padding: var(--sp-10) 0;
}

.auth-page-body {
  padding-top: 0;
}

.auth-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: clamp(1.5rem, 1.2rem + 1.5vw, 2.25rem);
}

.auth-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.auth-card__head h2 {
  font-size: var(--heading-h4);
  margin: 0;
}
.auth-card__head .fc-ic {
  width: 46px;
  height: 46px;
  font-size: var(--text-md);
}

.auth-card .form-control {
  margin-bottom: 1rem;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-xs);
}

.auth-card .form-label {
  display: block;
  margin-top: 0.25rem;
}

/* ── Password field with show/hide eye toggle ─────────────────────────
   Wrapper only adds positioning context; the input keeps the exact
   .form-control styling/behavior used everywhere else. Logical
   properties (inset-inline-end / padding-inline-end) mean the icon
   sits correctly for both RTL (ar) and LTR (en) automatically. */
.password-field {
  position: relative;
}

.password-field .form-control {
  padding-inline-end: 2.75rem;
}

.password-toggle {
  position: absolute;
  inset-inline-end: 0.9rem;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  padding: 0;
  border: none;
  background: none;
  color: var(--muted);
  font-size: var(--text-sm);
  cursor: pointer;
  transition: color var(--t-fast);
}

.password-toggle:hover,
.password-toggle:focus-visible {
  color: var(--blue);
}

.password-toggle:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
  border-radius: var(--radius-xs);
}

.auth-hint {
  display: block;
  color: var(--muted);
  font-size: var(--text-xs);
  margin: -0.6rem 0 1rem;
}

.auth-card .btn-cta {
  margin-top: 0.4rem;
}

.auth-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}
.auth-label-row .form-label {
  margin-top: 0;
}

/* Secondary link to the password-reset flow. */
.auth-forgot-link {
  font-size: var(--text-xs);
  color: var(--muted);
  text-decoration: none;
}
.auth-forgot-link:hover {
  color: var(--blue);
  text-decoration: underline;
}

.auth-switch {
  text-align: center;
  margin: 1.5rem 0 0;
  font-size: var(--text-sm);
  color: var(--muted);
}
.auth-switch a {
  color: var(--blue);
  font-weight: 600;
  margin-inline-start: 0.35rem;
}
.auth-switch a:hover {
  text-decoration: underline;
}

@media (max-width: 575px) {
  .auth-card {
    padding: 1.35rem 1.15rem 1.5rem;
  }
}
