/*
 * Login — CR-A116-16 (login-r1.html). Cognito email + password only, split
 * composition: navy brand panel left, form card right. Rules copied verbatim
 * from login-r1.html's <style> block (brand lockup + Powered-by are the SAME
 * classes dashboard-r1 uses — shared, not redeclared with different values).
 * Requires tokens.css + shell.css (.powered-by, .brand-badge-york family).
 */

.login-page-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: var(--sp-6); }
.login-page-inner { width: 100%; max-width: 1000px; }

.login-shell {
  display: flex; border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-pop);
  overflow: hidden; min-height: 680px; background: var(--bg);
}

.login-brand {
  flex: 0 0 44%; position: relative; background: var(--navy); color: #fff; overflow: hidden;
  display: flex; flex-direction: column; justify-content: space-between; padding: var(--sp-12) var(--sp-8);
}
.login-brand-motif { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .5; pointer-events: none; }
.login-brand-motif-mobile { display: none; }
.login-brand-top, .login-brand-mid, .login-brand-foot { position: relative; z-index: 1; }
.login-brand-mid { max-width: 360px; }
.login-brand-mid h2 { font-size: 26px; font-weight: 700; line-height: 1.35; margin: 0; letter-spacing: -.01em; color: #fff; }
.login-brand-mid h2 b { color: #8FA3E0; }
.login-brand-foot { font-size: 11.5px; color: rgba(255, 255, 255, .55); font-family: var(--mono); line-height: 1.7; }
.login-brand-foot .ln { display: block; width: 28px; height: 1px; background: rgba(255, 255, 255, .25); margin-bottom: 10px; }

.login-brand .brand-name-york { font-weight: 800; font-size: 22px; color: #fff; line-height: 1.15; letter-spacing: .01em; }
.login-brand .brand-sub-york { font-size: 11.5px; color: rgba(255, 255, 255, .65); font-weight: 600; letter-spacing: .03em; }
.login-brand .brand-badge-york { width: 44px; height: 44px; }
.login-brand .brand-badge-york .yk { font-size: 19px; }
/* shell.css's `.brand`/`.powered-by` give both a universal `padding: 0
   var(--sp-2)` for the sidebar nav context — bleeds onto the login page
   (measured: 0px card vs 8px built — CR-A116-integration-pixel-report
   §3.4). The login page draws its own lockup with zero inset. `.brand`
   lives in `.login-brand` (the navy panel); `.powered-by` lives in
   `.login-form-side` (the white panel) — two different ancestors. */
.login-brand .brand,
.login-form-side .powered-by { padding: 0; }
.login-brand .powered-by { justify-content: flex-start; margin-top: 22px; }
.login-brand-tagline-mobile { display: none; }

.login-form-side { flex: 1; display: flex; align-items: center; justify-content: center; padding: var(--sp-8); background: var(--bg); }
.login-card { width: 380px; max-width: 100%; }
.login-card .eyebrow { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 0 0 8px; }
.login-card h1 { font-size: 24px; font-weight: 800; color: var(--ink); margin: 0 0 6px; letter-spacing: -.01em; }
.login-card .sub { font-size: 13px; color: var(--muted); margin: 0 0 28px; }
.login-card .powered-by { justify-content: center; margin-top: 22px; }

.lf-field { margin-bottom: 18px; }
.lf-field label { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; display: block; }
.lf-input {
  width: 100%; min-height: 44px; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: var(--r-md);
  background: var(--field); font-size: 14px; color: var(--ink); font-family: var(--font);
}
.lf-input::placeholder { color: var(--faint); }
.lf-input:focus-visible { outline: none; border-color: var(--blue); background: #fff; box-shadow: 0 0 0 3px var(--blue-soft); }
.lf-input-wrap { position: relative; }
.lf-input-wrap .lf-input { padding-right: 48px; }
.lf-eye {
  position: absolute; top: 0; right: 0; width: 44px; height: 100%; min-height: 44px; border: none; background: none;
  display: flex; align-items: center; justify-content: center; color: var(--muted); cursor: pointer;
}
.lf-eye:focus-visible { outline: 2px solid var(--blue); outline-offset: -2px; border-radius: var(--r-sm); }

/* Self-found systemic sweep (pixel-round2 lane D, not named in the r2
   report): the login page's OWN submit button — the first thing a York
   customer's cursor ever lands on (INV-9/PRJ-A116 "first impression") — had
   no font-family declared either. Same UA leak shape as every other fixed
   class in this program. */
.lf-submit {
  width: 100%; height: 48px; border: none; border-radius: var(--r-md); background: var(--blue); color: #fff;
  font-size: 14px; font-weight: 700; font-family: var(--font); cursor: pointer; margin-top: 6px; display: flex; align-items: center; justify-content: center; gap: 8px;
}
.lf-submit:disabled { background: var(--line-soft); color: var(--faint); cursor: not-allowed; }
.lf-submit:focus-visible { outline: 2px solid var(--blue-deep); outline-offset: 2px; }
.lf-foot-row { display: flex; justify-content: flex-end; margin-top: 14px; }
.lf-forgot { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; line-height: 1.45; text-align: inherit; font-weight: 600; color: var(--blue-deep); text-decoration: none; min-height: 44px; background: none; border: none; cursor: pointer; padding: 0; font-family: var(--font); }
.lf-forgot:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

.ico-svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: stroke var(--dur-2) var(--ease); flex-shrink: 0; }
.ico-svg .mv { transition: transform var(--dur-2) var(--ease), opacity var(--dur-2) var(--ease); transform-box: fill-box; }
.lf-eye:hover .mv { transform: translateY(-1px); }
.lf-forgot:hover .icon .mv { transform: translateX(2px); }
.lf-forgot:hover { color: var(--blue); }

.banner { border-radius: var(--r-md); padding: 12px 14px; display: flex; gap: 10px; align-items: flex-start; font-size: 12.5px; line-height: 1.5; margin-bottom: 16px; }
.banner .icon { margin-top: 1px; }
.banner.danger { background: var(--danger-soft); border: 1px solid #FCA5A5; color: #991B1B; }
.banner.danger .icon { color: var(--danger); }
.banner.amber { background: var(--amber-soft); border: 1px solid #FCD34D; color: #92400E; }
.banner.amber .icon { color: var(--amber); }
.banner.success { background: #ECFDF5; border: 1px solid #A7F3D0; color: #065F46; }
.banner.success .icon { color: #059669; }
.banner b { display: block; margin-bottom: 2px; font-weight: 700; }
.banner .cd { font-family: var(--mono); font-variant-numeric: tabular-nums; font-weight: 700; }

.spinner { width: 15px; height: 15px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .4); border-top-color: #fff; animation: spin .7s linear infinite; flex-shrink: 0; }
@keyframes spin { to { transform: rotate(360deg); } }

/* login-r1.html §2 "Forgot password — sent" — expiry line under the banner */
.env-inline { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--ink-soft); margin-bottom: 16px; }
.env-inline .icon { color: #059669; }

/* ---------- narrow reflow (~390px) ---------- */
@media (max-width: 700px) {
  .login-page-wrap { padding: 0; align-items: stretch; }
  .login-page-inner { max-width: none; }
  .login-shell { flex-direction: column; min-height: 100vh; border-radius: 0; border: none; box-shadow: none; }
  .login-brand { flex: 0 0 auto; padding: var(--sp-6) var(--sp-5); align-items: center; text-align: center; gap: var(--sp-3); }
  .login-brand-mid, .login-brand-foot { display: none; }
  .login-brand-tagline-mobile {
    display: block; position: relative; z-index: 1; margin: 0;
    font-size: 12px; color: rgba(255, 255, 255, .75); max-width: 260px; line-height: 1.5;
  }
  .login-brand-motif-desktop { display: none; }
  .login-brand-motif-mobile { display: block; }
  .login-form-side { padding: var(--sp-6) var(--sp-5); }
  .login-card { width: 100%; }
  .lf-foot-row { justify-content: center; margin-top: 18px; }
}

/* ---------------------------------------------------------------------
   Set-password screen (Cognito NEW_PASSWORD_REQUIRED challenge).
   No ratified card exists for this screen — login-r1's own scope note
   covers SSO/magic-link only, not the temp-password flow. Built using
   ONLY login-r1's existing form primitives above (.lf-field/.lf-input/
   .lf-submit/.banner) so nothing new is visually invented; flagged in the
   forge report as unratified and a candidate for its own design round.
   --------------------------------------------------------------------- */
.setpw-card .eyebrow { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 0 0 8px; }
.setpw-card h1 { font-size: 24px; font-weight: 800; color: var(--ink); margin: 0 0 6px; letter-spacing: -.01em; }
.setpw-card .sub { font-size: 13px; color: var(--muted); margin: 0 0 28px; }
.setpw-hint { font-size: 12px; color: var(--muted); margin: -10px 0 18px; }
