/* ============================================================
   Vortal — Auth Forms
   Requires: components/inputs.css, components/buttons.css

   Covers: login, reset password, set password, reset success.
   Centered card layout, standalone (outside app shell).
   ============================================================ */

/* ── Auth page wrapper ───────────────────────────────────── */
.auth-page {
  min-block-size: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--color-bg);
  padding: var(--space-6);
}

/* ── Auth card ───────────────────────────────────────────── */
.auth-card {
  inline-size: min(100%, 420px);
  background-color: var(--color-surface);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  padding: var(--space-10) var(--space-10);
}

/* ── Auth header ─────────────────────────────────────────── */
.auth-logo {
  display: block;
  margin-inline: auto;
  margin-block-end: var(--space-8);
  max-block-size: 2.5rem;
  inline-size: auto;
}

.auth-title {
  font-family: var(--font-heading);
  font-size: var(--text-2xl);
  font-weight: 700;
  line-height: var(--leading-tight);
  color: var(--color-text);
  text-align: center;
  margin: 0 0 var(--space-2);
}

.auth-subtitle {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  text-align: center;
  line-height: var(--leading-normal);
  margin: 0 0 var(--space-8);
}

/* ── Form ────────────────────────────────────────────────── */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

.auth-form .btn-primary {
  inline-size: 100%;
  justify-content: center;
  margin-block-start: var(--space-2);
}

/* ── Forgot password link ────────────────────────────────── */
.auth-field-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}

.auth-forgot {
  font-size: var(--text-xs);
  color: var(--color-primary);
  text-decoration: none;
}

.auth-forgot:hover {
  text-decoration: underline;
}

/* ── Inline error (invalid credentials, lockout) ─────────── */
.auth-error {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  background-color: oklch(95% 0.06 25);
  color: oklch(36% 0.18 25);
  font-size: var(--text-sm);
  border-inline-start: 3px solid oklch(50% 0.18 25);
}

/* ── Success state (reset password sent, set password done) ─ */
.auth-success {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--space-4);
  padding-block: var(--space-4);
}

.auth-success-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  inline-size: 3rem;
  block-size: 3rem;
  border-radius: var(--radius-full);
  background-color: oklch(94% 0.06 145);
  color: oklch(35% 0.12 145);
}

.auth-success-icon svg {
  inline-size: 1.5rem;
  block-size: 1.5rem;
}

/* ── Footer link (back to login etc.) ────────────────────── */
.auth-footer {
  text-align: center;
  margin-block-start: var(--space-6);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

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

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

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 480px) {
  .auth-card {
    padding: var(--space-8) var(--space-6);
    border-radius: var(--radius-lg);
    box-shadow: none;
    border: 1px solid var(--color-border-light);
  }
}
