/* Auth & account-adjacent pages (sign in, forgot/reset password, sign up,
   support, email verification). Semantic, token-driven classes that own the
   full page structure so the markup carries no utility classes. */

/* ---------- Page shell ---------- */
.auth-page {
  display: flex;
  align-items: center;
  justify-content: center;
  padding-inline: var(--space-4);
}

.auth-panel {
  width: 100%;
  max-width: 28rem;            /* narrow column (was max-w-md) */
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
}
.auth-panel--wide { max-width: 36rem; }        /* support (was max-w-xl) */
.auth-panel--spaced { margin-block: var(--space-4); }
.auth-panel--roomy { margin-block: var(--space-12); }

/* ---------- Header ---------- */
.auth-header {
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.auth-header--spaced { margin-bottom: var(--space-6); }

.auth-title {
  font-size: var(--txt-2xl);
  font-weight: var(--weight-black);
  letter-spacing: var(--tracking-tight);
  color: var(--txt);
}
.auth-title--large { font-size: var(--txt-3xl); }

.auth-subtitle {
  font-size: var(--txt-sm);
  color: var(--txt-subtle);
}

/* ---------- Card + form ---------- */
/* Doubled selector beats the base .card padding regardless of file order. */
.card.auth-card { padding: var(--space-8); }

.auth-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.auth-label {
  display: block;
  margin-bottom: var(--space-2);
  font-size: var(--txt-sm);
  font-weight: var(--weight-medium);
  color: var(--txt-subtle);
}

/* Field helper text: below the field (hint) or between label and field (note). */
.auth-hint {
  display: block;
  margin-top: var(--space-1);
  font-size: var(--txt-xs);
  line-height: var(--leading-xs);
  color: var(--txt-subtle);
}
.auth-note {
  display: block;
  margin-bottom: var(--space-2);
  font-size: var(--txt-xs);
  line-height: var(--leading-xs);
  color: var(--txt-subtle);
}

/* ---------- Fields ---------- */
.auth-field {
  display: block;
  width: 100%;
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  color: var(--txt);
  font-size: var(--txt-sm);
  transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}
.auth-field--with-affix { padding-right: var(--space-12); }
.auth-field:focus {
  outline: none;
  border-color: var(--border-strong);
}
.auth-field::placeholder {
  color: var(--txt-subtle);
}

/* Password field's show/hide toggle, pinned to the field's trailing edge. */
.auth-password { position: relative; }
.auth-password__toggle {
  position: absolute;
  inset-block: 0;
  right: 0;
  display: flex;
  align-items: center;
  padding-right: var(--space-3);
  color: var(--txt-subtle);
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
  cursor: pointer;
}
.auth-password__toggle:hover { opacity: 0.8; }
.auth-password__toggle:focus { outline: none; }

/* Terms/consent checkbox row. */
.auth-checkbox {
  margin-top: var(--space-1);
  width: var(--space-4);
  height: var(--space-4);
  border-radius: var(--radius);
  accent-color: var(--accent);
}
.auth-consent {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
}
.auth-consent__label {
  font-size: var(--txt-sm);
  color: var(--txt-subtle);
}

/* ---------- Submit ---------- */
/* Layout only; colour comes from .btn-accent in components.css. */
.auth-submit {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-full);
  font-size: var(--txt-sm);
  font-weight: var(--weight-bold);
  cursor: pointer;
}
.auth-submit:focus { outline: none; }

.auth-fineprint {
  text-align: center;
  font-size: var(--txt-xs);
  line-height: var(--leading-xs);
  color: var(--txt-subtle);
}

/* ---------- Links, errors, footer ---------- */
.auth-link {
  color: var(--accent-strong);
  font-weight: var(--weight-semibold);
}
.auth-link:hover { opacity: 0.8; }
.auth-link--underline { text-decoration: underline; }

.auth-error {
  display: block;
  margin-top: var(--space-1);
  font-size: var(--txt-sm);
  color: var(--neg);
}

/* Divider + cross-flow link at the foot of the form card. */
.auth-footer {
  text-align: center;
  padding-top: var(--space-4);
  border-top: 1px solid var(--border);
}
.auth-footer-text {
  font-size: var(--txt-sm);
  color: var(--txt-subtle);
}
