/* vantage-auth-form.css — THE sign-in form.
 *
 * Why this file exists
 * ────────────────────
 * Vantage signs a user in from two surfaces:
 *
 *   1. login.html            — the full sign-in page (the reference design).
 *   2. vantage-session-guard.js — the in-page "Sign Back In" modal shown when a
 *      session dies, so nothing on screen is lost to a navigation.
 *
 * They were built independently and drifted: different label case, field height,
 * type scale, and two different social-button treatments (filled vs outlined).
 * Nate, 2026-08-03: "the sign back in modal needs to match the main page sign in
 * modal. its very different."
 *
 * Per the governing objective in AGENTS.md, the fix is not to restyle one to
 * imitate the other — it is ONE primitive both consume. This is that primitive.
 * Editing a value here changes both sign-in surfaces at once; there is nowhere
 * else that the sign-in form's presentation is defined.
 *
 * Scope
 * ─────
 * The FORM only: heading rhythm is page identity and stays with each host
 * (login.html's masthead / the modal's canonical .modal-header).
 *
 * Tokens
 * ──────
 * Every color routes through the facelift variable with the tenant brand var as
 * its fallback — `var(--vf-x, var(--brand-x))` — the same contract
 * vantage-buttons.css uses. login.html loads vantage-brand.js but not the
 * facelift sheet, so it lands on the brand fallbacks; app pages resolve --vf-*.
 * Neither surface may hardcode a color.
 *
 * Typography is canon: weight ceiling 500 (C22), sentence-case labels (C3b).
 *
 * Load
 * ────
 *   <link rel="stylesheet" href="/vantage-auth-form.css">
 * (the session guard injects it itself — it renders on pages it does not own).
 */

/* ── Field ─────────────────────────────────────────────────────────────────── */
.v-auth-field { margin-bottom: 18px; }

.v-auth-label {
  display: block;
  margin-bottom: 8px;
  color: var(--vf-text-muted, var(--muted, var(--gold-dim)));
  font-family: var(--font);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: none;
}

.v-auth-input {
  box-sizing: border-box;
  width: 100%;
  min-height: 44px;
  padding: 12px 16px;
  border: 1px solid var(--vf-line, rgba(var(--gold-rgb), 0.16));
  border-radius: var(--vf-r-sm, 8px);
  background-color: var(--bg-light);
  color: var(--vf-text, var(--gold-light));
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.4;
  outline: none;
  transition: border-color 0.16s, box-shadow 0.16s;
}
.v-auth-input:focus {
  border-color: var(--vf-accent, var(--gold));
  box-shadow: 0 0 0 3px rgba(var(--gold-rgb), 0.10);
}
.v-auth-input::placeholder {
  color: var(--vf-text-muted, var(--muted, var(--gold-dim)));
  opacity: 0.5;
}
.v-auth-input:disabled { opacity: 0.5; cursor: not-allowed; }

/* ── Actions ───────────────────────────────────────────────────────────────
   The auth CTA is its own component category, not a .v-btn-* instance: it is
   full-bleed and 44px so it reads as the page's single commitment, where the
   canonical roles are inline 32px toolbar/modal-footer actions. It is defined
   ONCE, here, and both sign-in surfaces use it — the thing C6 exists to
   prevent (a page hand-rolling its own button) cannot happen from one shared
   definition. Radius, weight, and family stay on the canonical tokens. */
.v-auth-submit,
.v-auth-social {
  box-sizing: border-box;
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 16px;
  border-radius: var(--vf-r-sm, 8px);
  font-family: var(--font);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: none;
  cursor: pointer;
  transition: background 0.16s, border-color 0.16s, color 0.16s, box-shadow 0.16s;
}
.v-auth-submit:disabled,
.v-auth-social:disabled { opacity: 0.45; cursor: not-allowed; box-shadow: none; }
.v-auth-submit svg,
.v-auth-social svg { flex-shrink: 0; }

.v-auth-submit {
  margin-top: 8px;
  border: 1px solid var(--vf-accent, var(--gold));
  background: var(--vf-accent, var(--gold));
  color: var(--vf-on-accent, var(--bg));
}
.v-auth-submit:not(:disabled):hover {
  box-shadow: 0 4px 18px rgba(var(--gold-rgb), 0.18);
}

.v-auth-social {
  border: 1px solid var(--vf-line, rgba(var(--gold-rgb), 0.16));
  background: var(--bg-light);
  color: var(--vf-text, var(--gold-light));
}
.v-auth-social:not(:disabled):hover {
  border-color: var(--vf-accent, var(--gold));
  background: var(--vf-accent-soft, rgba(var(--gold-rgb), 0.08));
}
.v-auth-socials { display: flex; flex-direction: column; gap: 10px; }

/* ── Divider ───────────────────────────────────────────────────────────────── */
.v-auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 24px 0 16px;
  color: var(--vf-text-muted, var(--muted, var(--gold-dim)));
  font-family: var(--font);
  font-size: 12px;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.v-auth-divider::before,
.v-auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--vf-line-soft, rgba(var(--gold-rgb), 0.14));
}

/* ── Messages ──────────────────────────────────────────────────────────────── */
.v-auth-msg {
  display: none;
  margin-top: 16px;
  padding: 12px 14px;
  border: 1px solid transparent;
  border-radius: var(--vf-r-sm, 8px);
  font-family: var(--font);
  font-size: 13px;
  line-height: 1.5;
}
.v-auth-msg.show { display: block; }
/* Tint derived FROM the danger color, never a fixed red: --vf-danger is
   tenant-derived (a white-brand tenant resolves it to #ebebeb), and a hardcoded
   red wash under white text reads as two different error states at once. */
.v-auth-msg.v-auth-msg-error {
  border-color: var(--vf-danger, var(--red, #e74c3c));
  background: color-mix(in srgb, var(--vf-danger, var(--red, #e74c3c)) 12%, transparent);
  color: var(--vf-danger, var(--red, #e74c3c));
}
.v-auth-msg.v-auth-msg-ok {
  border-color: var(--vf-line, rgba(var(--gold-rgb), 0.16));
  background: var(--vf-accent-soft, rgba(var(--gold-rgb), 0.08));
  color: var(--vf-text, var(--gold-light));
}

/* ── Tertiary text actions (forgot password / full sign-in page) ───────────── */
.v-auth-link {
  display: block;
  width: 100%;
  margin-top: 14px;
  padding: 0;
  border: none;
  background: none;
  color: var(--vf-text-muted, var(--muted, var(--gold-dim)));
  font-family: var(--font);
  font-size: 12px;
  font-weight: 500;
  text-align: center;
  text-decoration: underline;
  cursor: pointer;
}
.v-auth-link:hover { color: var(--vf-text, var(--gold-light)); }
.v-auth-link.v-auth-link-end { text-align: right; }

/* ── Hint line under the social block ──────────────────────────────────────── */
.v-auth-hint {
  margin-top: 12px;
  color: var(--vf-text-muted, var(--muted, var(--gold-dim)));
  font-family: var(--font);
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
}
