/*
 * Sign-in and forgot-password pages: a split layout with a form column on a light
 * grey ground (logo, bordered white card, full-width blue button, links, footer) and
 * a brand panel on the right from 992px up. Loaded only by login.html and
 * forgot-password.html; everything is scoped under .auth-page.
 */
.auth-page {
  --au-ground: #f3f3f3;
  --au-card-border: #dddbda;
  --au-input-border: #c9c9c9;
  --au-label: #3e3e3c;
  --au-muted: #706e6b;
  --au-blue: #0176d3;
  --au-blue-dark: #014486;
  --au-blue-focus: #1b96ff;
  --au-error: #ba0517;
  --au-navy: var(--sx-navy, #123a5e);
  --au-navy-dark: var(--sx-navy-dark, #0d2b46);
  --au-accent: var(--sx-accent, #c8873b);

  margin: 0;
  min-height: 100vh;
  background: var(--au-ground);
  color: var(--au-label);
  font-size: .875rem;
}

.auth-shell {
  display: grid;
  grid-template-columns: 1fr;
  min-height: 100vh;
}
@media (min-width: 992px) {
  .auth-shell { grid-template-columns: minmax(440px, 40%) 1fr; }
}

/* ── Form column ─────────────────────────────────────────────────────────── */
.auth-main {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40px 16px 20px;
  background: var(--au-ground);
}
.auth-column {
  width: 100%;
  max-width: 380px;
  margin: auto 0;       /* centred vertically when there is room, top-aligned when not */
}

.auth-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
  color: var(--au-navy);
  text-decoration: none;
}
.auth-logo img { width: 64px; height: 64px; }
.auth-logo span {
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.25;
  text-align: center;
}
.auth-logo:hover span,
.auth-logo:focus span { text-decoration: underline; }

.auth-card {
  background: #fff;
  border: 1px solid var(--au-card-border);
  border-radius: 4px;
  padding: 20px 24px 24px;
}
@media (max-width: 380px) {
  .auth-card { padding: 20px 16px; }
}

.auth-card h1 {
  font-size: 1.125rem;
  font-weight: 600;
  color: #181818;
  margin: 0 0 6px;
}
.auth-intro {
  color: var(--au-muted);
  font-size: .8125rem;
  margin: 0 0 18px;
}

/* Fields */
.auth-field { margin-bottom: 16px; }
.auth-card .form-label {
  font-size: .8125rem;
  color: var(--au-label);
  margin-bottom: 4px;
}
.auth-card .form-control {
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--au-input-border);
  border-radius: 4px;
  font-size: .875rem;
  color: #181818;
}
.auth-card .form-control:focus {
  border-color: var(--au-blue-focus);
  box-shadow: 0 0 3px var(--au-blue);
}
.auth-card .form-control.is-invalid,
.auth-card .form-control.is-invalid:focus {
  border-color: var(--au-error);
  box-shadow: 0 0 0 1px var(--au-error) inset;
  background-image: none;
  padding-right: 12px;
}
.auth-card .invalid-feedback { color: var(--au-error); font-size: .75rem; }

/* The code field on the emailed-code step is larger and centred. */
.auth-card .form-control.auth-code {
  height: 48px;
  font-size: 1.375rem;
  letter-spacing: .3em;
  text-align: center;
}

/* Password with a Show/Hide button inside the field. The button is pinned to the
   input's height, not the wrapper's, so an error message below does not move it. */
.auth-password { position: relative; }
.auth-password .form-control,
.auth-password .form-control.is-invalid { padding-right: 64px; }
.auth-password .auth-reveal {
  position: absolute;
  top: 0;
  right: 0;
  height: 40px;
  padding: 0 12px;
  border: 0;
  background: none;
  color: var(--au-blue);
  font-size: .8125rem;
}
.auth-password .auth-reveal:hover { color: var(--au-blue-dark); text-decoration: underline; }
.auth-password .auth-reveal:focus-visible { outline: 2px solid var(--au-blue-focus); outline-offset: -2px; border-radius: 4px; }

/* Buttons */
.auth-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 44px;
  border-radius: 4px;
  font-size: .9375rem;
  font-weight: 600;
}
.auth-btn-primary {
  background: var(--au-blue);
  border: 1px solid var(--au-blue);
  color: #fff;
}
.auth-btn-primary:hover,
.auth-btn-primary:focus-visible { background: var(--au-blue-dark); border-color: var(--au-blue-dark); color: #fff; }
.auth-btn-primary:focus-visible { box-shadow: 0 0 0 3px rgba(1, 118, 211, .35); }
.auth-btn-primary:disabled { background: var(--au-blue); border-color: var(--au-blue); color: #fff; opacity: .65; }
.auth-btn-secondary {
  margin-top: 10px;
  background: #fff;
  border: 1px solid var(--au-card-border);
  color: var(--au-blue);
  text-decoration: none;
}
.auth-btn-secondary:hover,
.auth-btn-secondary:focus-visible { background: #f3f3f3; color: var(--au-blue-dark); }

/* Links and small actions under the button */
.auth-page a:not(.auth-btn):not(.auth-logo) { color: var(--au-blue); text-decoration: none; }
.auth-page a:not(.auth-btn):not(.auth-logo):hover,
.auth-page a:not(.auth-btn):not(.auth-logo):focus-visible { color: var(--au-blue-dark); text-decoration: underline; }
.auth-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 16px;
  margin-top: 16px;
  font-size: .8125rem;
}
.auth-link-btn {
  padding: 0;
  border: 0;
  background: none;
  color: var(--au-blue);
  font-size: .8125rem;
}
.auth-link-btn:hover:not(:disabled) { color: var(--au-blue-dark); text-decoration: underline; }
.auth-link-btn:disabled { color: var(--au-muted); }

/* Error box at the top of the card */
.auth-card .alert {
  font-size: .8125rem;
  padding: 10px 12px;
  margin-bottom: 16px;
  border-radius: 4px;
}
.auth-card .alert-danger { color: var(--au-error); background: #fef1ee; border: 1px solid #fddde3; border-left: 4px solid var(--au-error); }
.auth-card .alert-success { color: #194e31; background: #ebf7e6; border: 1px solid #cdefc4; border-left: 4px solid #2e844a; }

.auth-below {
  margin: 20px 0 0;
  text-align: center;
  color: var(--au-muted);
  font-size: .8125rem;
}

.auth-footer {
  width: 100%;
  max-width: 380px;
  margin-top: 32px;
  text-align: center;
  color: var(--au-muted);
  font-size: .75rem;
}
.auth-footer a { margin: 0 4px; }

/* ── Brand panel (desktop only) ──────────────────────────────────────────── */
.auth-aside { display: none; }
@media (min-width: 992px) {
  .auth-aside {
    display: flex;
    align-items: center;
    padding: 64px clamp(48px, 7vw, 120px);
    color: #fff;
    background:
      radial-gradient(circle at 85% 12%, rgba(200, 135, 59, .30) 0, rgba(200, 135, 59, 0) 32%),
      radial-gradient(circle at 10% 95%, rgba(1, 118, 211, .45) 0, rgba(1, 118, 211, 0) 45%),
      radial-gradient(rgba(255, 255, 255, .07) 1px, transparent 1px) 0 0 / 22px 22px,
      linear-gradient(150deg, var(--au-navy) 0%, var(--au-navy-dark) 100%);
  }
}
.auth-aside-inner { max-width: 520px; }
.auth-eyebrow {
  display: inline-block;
  margin-bottom: 20px;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .12);
  color: #f5d7b2;
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.auth-aside h2 {
  font-size: clamp(2rem, 3vw, 2.75rem);
  font-weight: 700;
  line-height: 1.15;
  margin: 0 0 16px;
  text-wrap: balance;
}
.auth-aside p {
  font-size: 1.0625rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, .82);
  margin: 0 0 32px;
}
.auth-features {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.auth-features li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 8px;
  background: rgba(255, 255, 255, .06);
  font-weight: 600;
}
.auth-features li::before {
  content: "";
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--au-accent);
}
