/* ══════════════════════════════════════════════════════════════════════════
   FOUNDRY — auth pages
   Styles the platform's `auth-*` class vocabulary in the Foundry look. The
   custom Foundry auth views reuse these class names, and any auth view that
   falls back to the default theme (e.g. the 2FA challenge) inherits the look.
   ══════════════════════════════════════════════════════════════════════════ */

.fd-auth-body { background: var(--fd-cream); }

.auth-split { display: grid; grid-template-columns: 1fr 1fr; min-height: 100vh; }

/* ── Left brand panel ────────────────────────────────────────────────────── */
.auth-brand {
  background: linear-gradient(160deg, var(--fd-deep), var(--fd-deep-2));
  color: #fff; padding: 46px 52px; display: flex; flex-direction: column;
  position: relative; overflow: hidden;
}
.auth-brand::after {
  content: ''; position: absolute; right: -80px; bottom: -100px;
  width: 320px; height: 320px; border-radius: 50%; background: rgba(255,255,255,.05);
}
.auth-brand-logo { position: relative; z-index: 1; }
.auth-brand-logo a { display: inline-flex; align-items: center; gap: 11px; }
.auth-logo-img { height: 34px; width: auto; }
.auth-logo-mark { width: 38px; height: 38px; border-radius: 12px; background: rgba(255,255,255,.14); display: grid; place-items: center; color: #fff; font-size: 1rem; }
.auth-logo-name { font-family: 'Bricolage Grotesque', sans-serif; font-weight: 800; font-size: 1.34rem; letter-spacing: -.03em; }
.auth-brand-body { position: relative; z-index: 1; margin: auto 0; }
.auth-brand-pill {
  display: inline-flex; align-items: center; gap: 9px; background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.16); border-radius: 100px; padding: 7px 15px;
  font-size: .8rem; font-weight: 600; margin-bottom: 22px;
}
.auth-brand-headline { font-family: 'Bricolage Grotesque', sans-serif; font-size: clamp(2rem, 3.4vw, 2.9rem); font-weight: 800; line-height: 1.08; letter-spacing: -.03em; }
.auth-brand-headline em { font-style: normal; color: #d7ece0; }
.auth-brand-desc { color: #c3d6cb; margin-top: 18px; font-size: 1.02rem; line-height: 1.7; max-width: 30em; }
.auth-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 30px 0; }
.auth-stat-box { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12); border-radius: 14px; padding: 15px 12px; text-align: center; }
.auth-stat-val { font-family: 'Bricolage Grotesque', sans-serif; font-size: 1.3rem; font-weight: 800; letter-spacing: -.02em; }
.auth-stat-lbl { font-size: .68rem; color: #a9c2b3; margin-top: 5px; }
.auth-trust-list { display: flex; flex-direction: column; gap: 11px; }
.auth-trust-row { display: flex; align-items: center; gap: 11px; font-size: .88rem; color: #d7ece0; }
.auth-trust-row i { color: #a8d8bb; width: 18px; text-align: center; }
.auth-brand-foot { position: relative; z-index: 1; margin-top: 34px; }
.auth-back-home { display: inline-flex; align-items: center; gap: 9px; color: #c3d6cb; font-size: .86rem; }
.auth-back-home:hover { color: #fff; }

/* ── Right form panel ────────────────────────────────────────────────────── */
.auth-form-panel { display: flex; align-items: center; justify-content: center; padding: 46px 40px; position: relative; background: var(--fd-cream); }
.auth-theme-btn { position: absolute; top: 24px; right: 28px; }
.auth-card { width: 100%; max-width: 440px; }
.auth-card-badge {
  display: inline-flex; align-items: center; gap: 8px; background: var(--fd-sage-lt);
  color: var(--fd-sage-dk); border-radius: 100px; padding: 7px 15px; font-size: .78rem; font-weight: 600; margin-bottom: 18px;
}
.auth-card-title { font-family: 'Bricolage Grotesque', sans-serif; font-size: clamp(1.7rem, 3vw, 2.15rem); font-weight: 800; letter-spacing: -.03em; line-height: 1.12; color: var(--fd-ink); }
.auth-card-sub { color: var(--fd-ink-2); margin-top: 10px; font-size: .95rem; }
.auth-ref-banner {
  display: flex; gap: 11px; align-items: center; background: var(--fd-clay-lt); border: 1px solid #f0d5c6;
  border-radius: 12px; padding: 13px 15px; font-size: .84rem; color: #8a4227; margin: 18px 0 4px;
}
.auth-ref-banner i { color: var(--fd-clay); }

.auth-fields { margin-top: 22px; display: flex; flex-direction: column; gap: 16px; }
.auth-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.auth-field { display: flex; flex-direction: column; }
.auth-lbl { font-size: .8rem; font-weight: 600; color: var(--fd-ink-2); margin-bottom: 7px; }
.auth-lbl span { color: var(--fd-ink-3); font-weight: 400; }
.auth-input-wrap { position: relative; display: flex; align-items: center; }
.auth-input-icon { position: absolute; left: 14px; color: var(--fd-ink-3); font-size: .9rem; pointer-events: none; }
.auth-input {
  width: 100%; background: var(--fd-card); border: 1px solid var(--fd-line); border-radius: var(--fd-r-sm);
  padding: 13px 15px 13px 40px; font-size: .92rem; color: var(--fd-ink); font-family: 'Inter', sans-serif;
  outline: none; transition: border-color .18s, box-shadow .18s;
}
.auth-input.has-toggle { padding-right: 44px; }
.auth-input::placeholder { color: var(--fd-ink-3); }
.auth-input:focus { border-color: var(--fd-sage); box-shadow: 0 0 0 3px rgba(74,124,98,.12); }
.auth-eye { position: absolute; right: 8px; background: none; border: none; cursor: pointer; color: var(--fd-ink-3); padding: 8px; font-size: .9rem; }
.auth-eye:hover { color: var(--fd-sage); }

/* Password strength meter */
.pwd-meter { display: flex; gap: 5px; margin-top: 9px; }
.pwd-meter-bar { flex: 1; height: 4px; border-radius: 2px; background: var(--fd-line); transition: background .2s; }
.pwd-meter-bar.weak { background: var(--red); }
.pwd-meter-bar.fair { background: #d99a2b; }
.pwd-meter-bar.good { background: var(--fd-clay); }
.pwd-meter-bar.strong { background: var(--fd-sage); }
.pwd-strength-label { font-size: .72rem; margin-top: 6px; font-weight: 500; }

.auth-terms { display: flex; gap: 10px; align-items: flex-start; font-size: .82rem; color: var(--fd-ink-2); }
.auth-terms input { margin-top: 3px; }
.auth-terms a { color: var(--fd-sage); font-weight: 600; }

.auth-submit {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px; width: 100%;
  background: var(--fd-sage); color: #fff; border: 2px solid var(--fd-sage); border-radius: 100px;
  padding: 15px 24px; font-size: .95rem; font-weight: 600; font-family: 'Inter', sans-serif; cursor: pointer;
  transition: .18s; margin-top: 4px;
}
.auth-submit:hover { background: var(--fd-sage-hover); border-color: var(--fd-sage-hover); transform: translateY(-2px); }
.auth-captcha-note { font-size: .72rem; color: var(--fd-ink-3); text-align: center; margin-top: 4px; }
.auth-captcha-note a { color: var(--fd-sage); }
.auth-card-foot { margin-top: 22px; font-size: .88rem; color: var(--fd-ink-2); text-align: center; }
.auth-card-foot a { color: var(--fd-sage); font-weight: 600; }

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .auth-split { grid-template-columns: 1fr; }
  .auth-brand { display: none; }
  .auth-form-panel { padding: 40px 22px; min-height: 100vh; }
}
@media (max-width: 480px) {
  .auth-field-row { grid-template-columns: 1fr; }
}
