/* ============================================================
   LLK Enterprise — shared auth-page shell (Navy & Gold).

   The login page (index.html) carries this layout inline as the
   owner-approved "Option B2 Statement Panel". The shell-less auth
   pages that sit BESIDE it — forgot password, forgot username,
   reset password, signed out — used to fall back to the legacy
   styles.css look and read as a different product.

   This sheet is that same layout extracted so those pages share
   one source. Values are copied from index.html unchanged; the
   only edit is that the colours resolve through css/tokens.css
   variables instead of index.html's local aliases, so there is a
   single gold in the system (--gold #D4A94E, never #c9a76c).

   Load order on a page that keeps the legacy sheet:
     styles.css  ->  tokens.css  ->  auth.css
   styles.css MUST be first: it shares class names with the newer
   sheets and the last sheet wins (tests/shell-stylesheet-order).
   ============================================================ */

/* ---------- Page ground ---------- */
body.dark {
  background: var(--ink);
  color: var(--txt);
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  letter-spacing: -0.006em;
  min-height: 100vh;
  margin: 0;
}

/* min-height, never height: styles.css's .centered-card pins 100vh,
   which clips a tall card on a phone instead of letting it scroll. */
.auth-viewport {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 36px 20px 56px;
}
.auth-split {
  width: 100%;
  max-width: 1040px;
  display: grid;
  grid-template-columns: 420px minmax(0, 1fr);
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  min-height: 540px;
  box-shadow: 0 24px 60px -24px rgba(0,0,0,0.8);
  background: var(--panel);
}

/* ---------- Left: brand statement panel with ring motif ---------- */
.brandside {
  background: linear-gradient(160deg, #132039 0%, #0b1120 70%);
  padding: 42px 40px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}
.brandside::before {
  content: '';
  position: absolute;
  right: -70px; bottom: -70px;
  width: 240px; height: 240px;
  border-radius: 50%;
  /* The token gold at decorative alpha — same #D4A94E, deliberately
     fainter than --gold-line (0.32) so the rings stay background. */
  border: 1px solid rgba(212,169,78,0.20);
}
.brandside::after {
  content: '';
  position: absolute;
  right: -120px; bottom: -120px;
  width: 340px; height: 340px;
  border-radius: 50%;
  border: 1px solid rgba(212,169,78,0.14);
}
.brand-mini { display: flex; align-items: center; gap: 13px; }
.brand-mini img { width: 46px; height: 46px; display: block; }
.brand-mini .word {
  font-size: 12.5px; font-weight: 600; letter-spacing: 5px; color: var(--gold);
}
.brand-statement { position: relative; z-index: 1; }
.bigword {
  font-size: 33px; font-weight: 800; letter-spacing: -0.02em;
  color: #fff; line-height: 1.22;
}
.bigword i { font-style: normal; color: var(--gold); }
.statrow { display: flex; gap: 26px; margin-top: 22px; }
.stat b { display: block; font-size: 21px; font-weight: 800; color: var(--gold); }
.stat span { font-size: 11.5px; color: var(--faint); }
.brand-foot { font-size: 11.5px; color: var(--faint); position: relative; z-index: 1; }

/* ---------- Right: form column hosting every stage ---------- */
.formside {
  background: var(--panel);
  padding: 42px 44px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}
.formside .auth-stage { width: 100%; }
.formside h1, .formside h2, .formside h3 {
  text-transform: none; letter-spacing: -0.01em;
}
.stage-title { margin: 0 0 4px; font-size: 19px; font-weight: 700; color: #fff; }
.stage-sub { color: var(--faint); font-size: 13px; margin: 0 0 20px; line-height: 1.6; }
.formside p { color: var(--txt-2); }

/* Inputs / labels / buttons — Inter + tokens, overriding the
   platform-wide Poppins styles from styles.css. */
.formside label {
  font-size: 12.5px; font-weight: 600; color: var(--muted);
  margin: 0 0 6px; display: block; opacity: 1;
}
.formside input, .formside select {
  width: 100%;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  color: var(--txt);
  font-family: inherit;
  font-size: 14.5px;
  outline: none;
  box-sizing: border-box;
  margin-bottom: 14px;
  transition: border .15s;
}
/* Focus indicators use SOLID --gold, never --gold-line: at 0.32 alpha the
   ring composites to ~1.85:1 and fails WCAG 2.2 SC 1.4.11 (3:1). #D4A94E
   measures 8.39:1 against --panel-2.
   !important is required, not decorative: styles.css:19-22 sets a global
   `:focus-visible{outline:2px solid #c9a76c!important}` in the OLD gold,
   and only a more specific !important rule restores the new palette. */
.formside input:focus, .formside select:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-soft);
}
.formside input:focus-visible, .formside select:focus-visible,
.formside button:focus-visible, .formside a:focus-visible {
  outline: 2px solid var(--gold) !important;
  outline-offset: 1px !important;
  box-shadow: 0 0 0 3px var(--gold-soft) !important;
}
.formside input:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 60px var(--panel-2) inset;
  -webkit-text-fill-color: var(--txt);
  caret-color: var(--txt);
}
.formside .field { margin-bottom: 2px; }
.formside .field input { margin-bottom: 14px; }

/* !important where styles.css's high-specificity customer-CTA rule
   (body[data-app="customer"] button:not(...)) would otherwise win. */
.btn-auth {
  width: 100%;
  border: none;
  border-radius: 10px;
  padding: 13px !important;
  font-family: inherit;
  font-size: 15px !important;
  font-weight: 700;
  background: linear-gradient(135deg, var(--gold), var(--gold-hover));
  color: var(--ink);
  cursor: pointer;
  box-shadow: 0 6px 18px -8px rgba(212,169,78,0.55) !important;
  letter-spacing: 0;
  transition: filter .13s;
}
.btn-auth:hover { filter: brightness(1.05); transform: none; box-shadow: 0 6px 18px -8px rgba(212,169,78,0.55) !important; }

.f-links { display: flex; justify-content: space-between; gap: 14px; font-size: 13px; margin-top: 14px; }
.f-links a { color: var(--muted); text-decoration: none; }
.f-links a:hover { color: var(--gold); }
.f-create {
  margin-top: 18px; padding-top: 16px;
  border-top: 1px solid var(--line-soft);
  text-align: center; font-size: 13px; color: var(--faint);
}
.f-create a { color: var(--gold); font-weight: 600; text-decoration: none; }
.formside .link-gold, a.link-gold { color: var(--gold); }
.formside .link-gold:hover { text-decoration: underline; }
.auth-foot {
  margin-top: 20px; text-align: center;
  font-size: 11px; color: var(--faint);
}

/* ---------- Password fields ----------
   common.js:309 setupPasswordToggles() injects a `.pw-toggle` button into a
   `.pw-wrap` for every password input on the page. Unstyled it inherits
   styles.css's full gold pill (and goes 100% wide under 720px on a customer
   page), so give it the login page's compact inline treatment. The toggle is
   created by shared JS and its behaviour is deliberately untouched here. */
.formside .pw-wrap { position: relative; display: block; width: 100%; }
.formside .pw-wrap input { padding-right: 46px !important; margin-bottom: 0; }
.formside .pw-field, .formside .pw-wrap { margin-bottom: 14px; }
.formside .pw-toggle {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  width: 34px !important; height: 34px !important;
  min-width: 0 !important; min-height: 0 !important;
  border: none !important;
  background: transparent !important;
  border-radius: 8px; display: grid; place-items: center; cursor: pointer;
  color: var(--faint); padding: 0 !important;
  font-size: 15px !important; line-height: 1 !important;
  box-shadow: none !important;
}
.formside .pw-toggle:hover {
  background: rgba(148,163,184,0.10) !important;
  transform: translateY(-50%); box-shadow: none !important; filter: none;
}
.formside .pw-toggle:focus-visible {
  outline: 2px solid var(--gold) !important; outline-offset: 1px !important;
  box-shadow: none !important;
}

/* ---------- Notice panels (status / security callouts) ---------- */
.auth-note {
  border-radius: 12px; padding: 13px 15px; font-size: 12.5px;
  line-height: 1.6; border: 1px solid var(--line); background: var(--panel-2);
  color: var(--txt-2);
}
.auth-note strong { color: var(--txt); }
.auth-note.warn { background: var(--amber-bg); border-color: var(--amber-line); color: var(--txt-2); }
.auth-note.warn strong { color: var(--amber); }
.auth-note.gold { background: var(--gold-soft); border-color: var(--gold-line); }
.auth-note.gold strong { color: var(--gold); }

/* ---------- Status medallion (signed out / sent / done) ---------- */
.auth-medallion {
  width: 56px; height: 56px; margin: 0 auto 14px; border-radius: 50%;
  background: var(--gold-soft); border: 1.5px solid var(--gold-line);
  color: var(--gold); display: flex; align-items: center; justify-content: center;
}
.auth-medallion svg { width: 28px; height: 28px; }
.auth-medallion.ok { background: var(--green-bg); border-color: var(--green-line); color: var(--green); }
.auth-medallion.alert { background: var(--red-bg); border-color: var(--red-line); color: var(--red); }

/* ---------- Checkbox row ---------- */
.formside .checkbox-group {
  display: flex; align-items: flex-start; gap: 10px;
  margin: 14px 0 4px; padding: 12px 14px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  transition: border-color .2s;
}
.formside .checkbox-group:hover { border-color: var(--gold-line); }
.formside .checkbox-group input[type="checkbox"] {
  width: 18px; height: 18px; margin: 2px 0 0; flex-shrink: 0;
  cursor: pointer; accent-color: var(--gold);
}
.formside .checkbox-group label {
  margin: 0; cursor: pointer; font-size: 13px; font-weight: 500;
  color: var(--txt-2); line-height: 1.5;
}

/* ---------- Mobile: compact brand strip + form ---------- */
@media (max-width: 900px) {
  .auth-viewport { padding: 0 0 40px; align-items: flex-start; }
  .auth-split {
    grid-template-columns: 1fr;
    border: none; border-radius: 0; min-height: 0;
    box-shadow: none; background: transparent;
  }
  .brandside {
    flex-direction: row; align-items: center; gap: 14px;
    padding: 16px 22px;
    border-bottom: 1px solid var(--line-soft);
  }
  .brandside::before, .brandside::after { display: none; }
  .brand-mini img { width: 34px; height: 34px; }
  .brand-mini .word { font-size: 10.5px; letter-spacing: 4px; }
  .brand-statement { display: none; }
  .brand-foot { display: none; }
  .formside { padding: 26px 22px 34px; justify-content: flex-start; }
}
