/* ══════════════════════════════════════════════
   Auth Pages — warm + crafted
   ──────────────────────────────────────────────
   Centered card on cream background, Lora serif
   for headings, Inter for labels and copy, terracotta
   primary CTAs. Each page is a single intentional
   moment.
   ══════════════════════════════════════════════ */

body.auth-body {
  background: var(--mp-color-bg);
  padding-top: 0;
}

.auth-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--mp-color-bg);
}

.auth-topbar {
  padding: 1.75rem 1.75rem 0;
}

.auth-topbar .auth-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 1.125rem;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  text-decoration: none;
}

.auth-topbar .auth-brand svg { color: var(--mp-color-accent); }

.auth-topbar .auth-brand:hover {
  color: var(--mp-color-accent);
  text-decoration: none;
}

.auth-container {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 1.75rem 4rem;
}

.auth-card {
  width: 100%;
  max-width: 440px;
  background: var(--mp-color-surface);
  border: 1px solid var(--mp-color-divider);
  border-radius: 6px;
  padding: 3rem 2.75rem;
  box-shadow:
    0 1px 2px rgba(42, 31, 26, 0.04),
    0 18px 40px -24px rgba(42, 31, 26, 0.18);
}

.auth-header {
  text-align: left;
  margin-bottom: 2rem;
}

.auth-eyebrow {
  font-family: var(--font-sans);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--mp-color-accent);
  font-weight: 600;
  margin: 0 0 0.85rem;
}

.auth-header h1 {
  font-family: var(--font-serif);
  font-size: 1.875rem;
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.018em;
  color: var(--text-primary);
  margin: 0 0 0.55rem;
}

.auth-header h1 em {
  font-style: italic;
  color: var(--mp-color-accent);
  font-weight: 500;
}

.auth-subtitle {
  font-family: var(--font-sans);
  color: var(--text-secondary);
  font-size: 0.9375rem;
  line-height: 1.55;
  margin: 0;
}

/* Notices — warm and recessed, not loud */

.auth-error {
  background: rgba(192, 73, 42, 0.06);
  border: 1px solid rgba(192, 73, 42, 0.30);
  color: var(--color-danger-text);
  padding: 0.75rem 0.95rem;
  border-radius: 4px;
  font-family: var(--font-sans);
  font-size: 0.875rem;
  line-height: 1.5;
  margin-bottom: 1.5rem;
}

.auth-error a {
  color: var(--color-danger-text);
  font-weight: 500;
  text-decoration: underline;
}

.auth-notice {
  background: rgba(107, 143, 92, 0.10);
  border: 1px solid rgba(107, 143, 92, 0.32);
  color: var(--color-success-text);
  padding: 0.75rem 0.95rem;
  border-radius: 4px;
  font-family: var(--font-sans);
  font-size: 0.875rem;
  line-height: 1.5;
  margin-bottom: 1.5rem;
}

.auth-help {
  font-family: var(--font-sans);
  color: var(--text-secondary);
  font-size: 0.9375rem;
  line-height: 1.6;
  margin: 0 0 1.5rem;
}

.auth-help a {
  color: var(--mp-color-accent);
  font-weight: 500;
}

/* Form fields */

.auth-form .form-group {
  margin-bottom: 1.1rem;
}

.auth-form label {
  display: block;
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-primary);
  letter-spacing: 0.02em;
  margin-bottom: 0.45rem;
}

.auth-form input {
  width: 100%;
  padding: 0.75rem 0.95rem;
  border: 1px solid var(--mp-color-divider);
  border-radius: 4px;
  font-size: 0.9375rem;
  font-family: var(--font-sans);
  background: var(--mp-color-surface);
  color: var(--text-primary);
  transition: border-color 180ms ease, box-shadow 180ms ease;
  box-sizing: border-box;
  min-height: 0;
  line-height: 1.5;
}

.auth-form input:hover {
  border-color: var(--border-strong);
}

.auth-form input:focus {
  outline: none;
  border-color: var(--mp-color-accent);
  box-shadow: 0 0 0 3px rgba(181, 87, 58, 0.18);
}

.auth-form input::placeholder {
  color: var(--input-placeholder);
}

.auth-form input[readonly],
.auth-form input[disabled] {
  background: var(--mp-color-surface-warm);
  color: var(--text-secondary);
}

.auth-submit {
  width: 100%;
  margin-top: 1.5rem;
  padding: 0.95rem 1.5rem;
  font-family: var(--font-serif);
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: var(--mp-color-accent);
  color: var(--mp-color-bg);
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background 180ms ease, box-shadow 220ms ease;
  min-height: 0;
  line-height: 1.2;
}

.auth-submit:hover,
.auth-submit:focus-visible {
  background: var(--mp-color-accent-dark);
  color: var(--mp-color-bg);
  outline: none;
  box-shadow: 0 8px 22px -8px rgba(181, 87, 58, 0.45);
}

/* Footer links below the form */

.auth-footer {
  text-align: center;
  margin-top: 1.5rem;
  font-family: var(--font-sans);
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.auth-footer a {
  color: var(--mp-color-accent);
  font-weight: 500;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 160ms ease, color 160ms ease;
}

.auth-footer a:hover {
  color: var(--mp-color-accent-dark);
  border-bottom-color: var(--mp-color-accent-dark);
  text-decoration: none;
}

.auth-invite-only {
  margin-top: 0.6rem;
  color: var(--text-muted);
}

/* Inline action link below an error message (e.g. "Resend confirmation
   email" under an "email not confirmed" error). Tight top margin so it
   reads as part of the error block, not a separate paragraph. */
.auth-error-action {
  margin: 6px 0 0;
}

/* Optional second form on the same card (e.g. resend on check_email) */

.auth-divider {
  border: none;
  border-top: 1px solid var(--mp-color-divider);
  margin: 2rem 0 1.5rem;
}

/* ── Responsive ─────────────────────── */

@media (max-width: 600px) {
  .auth-container { padding: 1.5rem 1rem 3rem; }
  .auth-topbar { padding: 1.25rem 1.25rem 0; }
  .auth-card {
    padding: 2rem 1.75rem;
    box-shadow: none;
    border: 1px solid var(--mp-color-divider);
  }
  .auth-header h1 { font-size: 1.625rem; }
}
