/* =========================================================
   Optiact client portal sign-in
   Matches the pricing-page visual system: cream, navy, blue and orange.
   ========================================================= */
body.auth-page {
  --auth-navy: #102f45;
  --auth-blue: #0d5f96;
  --auth-bright-blue: #3f97ff;
  --auth-orange: #ff5a1f;
  --auth-cream: #f3efe7;
  --auth-muted: #607486;
  min-width: 320px;
  color: var(--auth-navy);
  background: var(--auth-cream);
}

.auth-page .auth-page-shell {
  background: var(--auth-cream);
}

.auth-page .nav-utility[href$="sign-in.html"] .nav-icon {
  filter: brightness(0) saturate(100%);
}

.auth-page .auth-section {
  width: 100%;
  min-height: calc(100svh - var(--nav-height));
  padding: 0;
  border: 0;
  background: var(--auth-cream);
}

.auth-layout {
  min-height: calc(100svh - var(--nav-height));
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(430px, 0.92fr);
}

.auth-story {
  position: relative;
  min-width: 0;
  padding: clamp(64px, 8vw, 128px) clamp(28px, 6vw, 92px);
  overflow: hidden;
  isolation: isolate;
  color: #ffffff;
  background:
    radial-gradient(circle at 10% 8%, rgba(255, 90, 31, 0.28), transparent 25%),
    radial-gradient(circle at 90% 88%, rgba(255, 255, 255, 0.16), transparent 30%),
    linear-gradient(145deg, var(--auth-blue) 0%, #247fdc 100%);
  display: flex;
  align-items: center;
}

.auth-story::before,
.auth-story::after {
  content: "";
  position: absolute;
  z-index: -1;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  pointer-events: none;
}

.auth-story::before {
  width: clamp(280px, 35vw, 620px);
  aspect-ratio: 1;
  top: -18%;
  right: -19%;
  box-shadow:
    0 0 0 54px rgba(255, 255, 255, 0.035),
    0 0 0 112px rgba(255, 255, 255, 0.025);
}

.auth-story::after {
  width: clamp(160px, 22vw, 360px);
  aspect-ratio: 1;
  left: -12%;
  bottom: -15%;
  border-color: rgba(255, 90, 31, 0.35);
  box-shadow: 0 0 0 44px rgba(255, 90, 31, 0.06);
}

.auth-story__grid {
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0.14;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.16) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.16) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(145deg, #000 0%, transparent 72%);
}

.auth-story__content {
  width: min(100%, 760px);
  position: relative;
  z-index: 1;
}

.auth-kicker,
.signin-card .eyebrow {
  margin: 0 0 15px;
  color: var(--auth-orange);
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.18em;
  line-height: 1.35;
  text-transform: uppercase;
}

.auth-story h1 {
  max-width: 10ch;
  margin: 0 0 24px;
  color: #ffffff;
  font-size: clamp(3rem, 6.5vw, 7rem);
  font-weight: 800;
  line-height: 0.92;
  letter-spacing: -0.06em;
}

.auth-story__intro {
  max-width: 650px;
  margin: 0;
  color: rgba(255, 255, 255, 0.84);
  font-size: clamp(1rem, 1.25vw, 1.17rem);
  line-height: 1.68;
}

.auth-story__features {
  margin-top: clamp(36px, 5vw, 62px);
  border-top: 1px solid rgba(255, 255, 255, 0.24);
}

.auth-story__feature {
  min-height: 88px;
  padding: 20px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  column-gap: 16px;
  align-items: start;
}

.auth-story__feature > span {
  grid-row: 1 / span 2;
  color: var(--auth-orange);
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.1em;
}

.auth-story__feature strong {
  color: #ffffff;
  font-size: 0.98rem;
  line-height: 1.35;
}

.auth-story__feature small {
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.83rem;
  line-height: 1.55;
}

.auth-story__note {
  margin: 24px 0 0;
  color: rgba(255, 255, 255, 0.78);
  display: flex;
  align-items: flex-start;
  gap: 11px;
  font-size: 0.82rem;
  line-height: 1.55;
}

.auth-story__note span {
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.13);
  color: #ffffff;
  display: grid;
  place-items: center;
  font-weight: 900;
}

.signin-panel {
  min-width: 0;
  padding: clamp(38px, 6vw, 94px) clamp(22px, 5vw, 76px);
  background:
    radial-gradient(circle at 92% 8%, rgba(255, 90, 31, 0.1), transparent 24%),
    var(--auth-cream);
  display: grid;
  place-items: center;
}

.signin-shell {
  width: min(100%, 560px);
}

.auth-back-link {
  width: max-content;
  margin: 0 0 24px;
  color: var(--auth-blue);
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 0.82rem;
  font-weight: 800;
  transition: transform 160ms ease, color 160ms ease;
}

.auth-back-link:hover,
.auth-back-link:focus-visible {
  color: var(--auth-orange);
  transform: translateX(-2px);
}

.signin-card {
  position: relative;
  padding: clamp(30px, 4.5vw, 54px);
  border: 1px solid rgba(16, 47, 69, 0.17);
  border-radius: 0;
  overflow: hidden;
  background: #ffffff;
  box-shadow: 0 26px 58px rgba(16, 47, 69, 0.13);
}

.signin-card__accent {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 7px;
  background: linear-gradient(90deg, var(--auth-orange) 0 32%, var(--auth-blue) 32% 100%);
}

.signin-card__heading h2 {
  max-width: 10ch;
  margin: 0 0 16px;
  color: var(--auth-navy);
  font-size: clamp(2.45rem, 4.6vw, 4.6rem);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.055em;
}

.signin-card .intro {
  max-width: 470px;
  margin: 0;
  color: var(--auth-muted);
  font-size: 0.96rem;
  line-height: 1.68;
}

.auth-page #signinForm {
  margin-top: 32px;
  display: grid;
  gap: 20px;
}

.auth-page .field {
  display: grid;
  gap: 9px;
}

.auth-page .field label {
  color: var(--auth-navy);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.015em;
}

.auth-page .field input {
  width: 100%;
  min-height: 56px;
  padding: 0 16px;
  border: 1.5px solid rgba(16, 47, 69, 0.24);
  border-radius: 7px;
  outline: 0;
  background: #f9fbfc;
  color: var(--auth-navy);
  font-size: 1rem;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.auth-page .field input:hover {
  border-color: rgba(13, 95, 150, 0.48);
}

.auth-page .field input:focus {
  border-color: var(--auth-blue);
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(63, 151, 255, 0.16);
}

.auth-page .field input:disabled {
  cursor: not-allowed;
  background: #edf1f3;
  color: #7a8790;
}

.signin-submit {
  width: 100%;
  min-height: 58px;
  margin-top: 4px;
  padding: 8px 18px 8px 9px;
  border: 0;
  border-radius: 7px;
  background: var(--auth-navy);
  color: #ffffff;
  box-shadow: 0 7px 0 rgba(16, 47, 69, 0.17);
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 16px;
  font-size: 0.95rem;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.signin-submit > span {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  border-radius: 5px;
  background: var(--auth-orange);
  color: #ffffff;
  display: grid;
  place-items: center;
  font-size: 1.25rem;
}

.signin-submit strong {
  font-weight: 800;
}

.signin-submit:hover,
.signin-submit:focus-visible {
  background: var(--auth-blue);
  transform: translateY(-2px);
  box-shadow: 0 10px 0 rgba(16, 47, 69, 0.12);
}

.signin-submit:focus-visible,
.auth-back-link:focus-visible,
.signin-support a:focus-visible {
  outline: 3px solid rgba(255, 90, 31, 0.36);
  outline-offset: 3px;
}

.signin-submit:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  transform: none;
  box-shadow: none;
}

.auth-page .message {
  display: none;
  margin: 0;
  padding: 13px 15px;
  border-left: 4px solid var(--auth-orange);
  background: rgba(255, 90, 31, 0.08);
  color: #863111;
  font-size: 0.82rem;
  line-height: 1.55;
}

.auth-page .message.is-visible {
  display: block;
}

.auth-page .message.locked {
  border-left-color: var(--auth-navy);
  background: rgba(16, 47, 69, 0.08);
  color: var(--auth-navy);
}

.auth-page .attempts {
  margin: -8px 0 0;
  color: var(--auth-muted);
  font-size: 0.75rem;
  line-height: 1.5;
}

.signin-support {
  margin-top: 30px;
  padding-top: 24px;
  border-top: 1px solid rgba(16, 47, 69, 0.15);
}

.signin-support p {
  margin: 0 0 7px;
  color: var(--auth-navy);
  font-size: 0.83rem;
  line-height: 1.5;
}

.signin-support a {
  width: max-content;
  max-width: 100%;
  color: var(--auth-blue);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  font-weight: 800;
  transition: color 160ms ease, gap 160ms ease;
}

.signin-support a:hover,
.signin-support a:focus-visible {
  color: var(--auth-orange);
  gap: 11px;
}

.auth-privacy {
  max-width: 460px;
  margin: 20px auto 0;
  color: var(--auth-muted);
  font-size: 0.73rem;
  line-height: 1.55;
  text-align: center;
}

@media (max-width: 1020px) {
  .auth-layout {
    grid-template-columns: 1fr;
  }

  .auth-story {
    min-height: auto;
    padding-block: clamp(54px, 8vw, 88px);
  }

  .auth-story h1 {
    max-width: 12ch;
    font-size: clamp(3rem, 8vw, 5.8rem);
  }

  .auth-story__features {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border-top: 0;
    gap: 12px;
  }

  .auth-story__feature {
    min-height: 170px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.07);
    grid-template-columns: 1fr;
  }

  .auth-story__feature > span {
    grid-row: auto;
  }

  .signin-panel {
    padding-block: clamp(48px, 7vw, 76px);
  }
}

@media (max-width: 680px) {
  .auth-page .auth-section {
    min-height: 0;
  }

  .auth-layout {
    min-height: 0;
  }

  .auth-story {
    padding: 52px 20px 44px;
  }

  .auth-story h1 {
    max-width: 10ch;
    font-size: clamp(2.8rem, 14vw, 4.4rem);
  }

  .auth-story__intro {
    font-size: 0.96rem;
  }

  .auth-story__features {
    grid-template-columns: 1fr;
    gap: 10px;
    margin-top: 34px;
  }

  .auth-story__feature {
    min-height: 0;
    padding: 17px;
    grid-template-columns: 36px minmax(0, 1fr);
  }

  .auth-story__feature > span {
    grid-row: 1 / span 2;
  }

  .signin-panel {
    padding: 38px 14px 52px;
  }

  .auth-back-link {
    margin-left: 4px;
  }

  .signin-card {
    padding: 34px 22px 28px;
  }

  .signin-card__heading h2 {
    font-size: clamp(2.6rem, 13vw, 3.8rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  .auth-back-link,
  .signin-submit,
  .signin-support a,
  .auth-page .field input {
    transition: none;
  }
}

/* =========================================================
   Compact client-portal typography and vertical rhythm — v2
   ========================================================= */
.auth-story {
  padding-block: clamp(48px, 6vw, 78px);
}

.auth-kicker,
.signin-card .eyebrow {
  margin-bottom: 10px;
  font-size: 0.66rem;
}

.auth-story h1 {
  margin-bottom: 15px;
  font-size: clamp(2.1rem, 4.2vw, 4.15rem);
  line-height: 0.98;
}

.auth-story__intro {
  font-size: 0.86rem;
  line-height: 1.58;
}

.auth-story__features {
  margin-top: 24px;
}

.auth-story__feature {
  padding-block: 13px;
}

.auth-story__feature strong {
  font-size: 0.86rem;
}

.auth-story__feature small,
.auth-story__note {
  font-size: 0.74rem;
  line-height: 1.45;
}

.signin-panel {
  padding-block: clamp(32px, 4.5vw, 58px);
}

.signin-card {
  padding-block: clamp(26px, 3.2vw, 38px);
}

.signin-card h2 {
  margin-bottom: 10px;
  font-size: clamp(1.75rem, 3vw, 2.8rem);
  line-height: 1.02;
}

.signin-card .intro,
.signin-card label,
.signin-card input,
.signin-card button,
.auth-back-link,
.signin-card__help,
.signin-card__notice {
  font-size: 0.8rem;
  line-height: 1.5;
}

.signin-card input,
.signin-card button {
  min-height: 44px;
}

@media (max-width: 700px) {
  .auth-story {
    padding-block: 44px 50px;
  }

  .auth-story h1 {
    font-size: clamp(1.9rem, 10vw, 3rem);
  }
}

/* =========================================================
   Optiact brand palette — client portal
   ========================================================= */
body.auth-page {
  --auth-navy: #0B1620;
  --auth-blue: #0F84FF;
  --auth-bright-blue: #0F84FF;
  --auth-orange: #FF6500;
  --auth-cream: #F5F7FA;
  --auth-muted: #5E6B78;
  color: #0B1620;
  background: #F5F7FA;
}
.auth-page .auth-page-shell,
.auth-page .auth-section { background: #F5F7FA !important; }
.auth-story {
  background: #518EEE !important;
  color: #FFFFFF;
}
.auth-story::before,
.auth-story::after { display: none !important; }
.auth-story__grid { opacity: .11; }
.auth-kicker,
.signin-card .eyebrow { color: #FF6500 !important; }
.auth-story h1 { color: #FFFFFF !important; }
.auth-story__intro { color: #0B1620 !important; font-weight: 650; }
.auth-story__feature strong { color: #FFFFFF !important; }
.auth-story__feature small,
.auth-story__note { color: rgba(11,22,32,.78) !important; }
.signin-panel { background: #F5F7FA !important; }
.signin-card {
  border-color: #DFE5EC !important;
  border-radius: 14px !important;
  background: #FFFFFF !important;
  box-shadow: none !important;
}
.signin-submit {
  background: #FF6500 !important;
  border-color: #FF6500 !important;
  color: #0B1620 !important;
}
.signin-submit:hover,
.signin-submit:focus-visible {
  background: #0B1620 !important;
  border-color: #0B1620 !important;
  color: #FFFFFF !important;
}


/* Small portal text on the editorial blue uses navy for accessible contrast. */
.auth-story__feature strong { color: #0B1620 !important; }


/* ===== Editorial client portal override — 2026-08-14 ===== */
body.auth-page,
.auth-page .auth-page-shell,
.auth-page .auth-section { background: transparent !important; color: var(--editorial-ink) !important; }
.auth-layout { background: rgba(251,250,247,.94) !important; }
.auth-story {
  padding: clamp(62px, 7vw, 108px) clamp(28px, 6vw, 90px) !important;
  background: var(--editorial-paper-2) !important;
  color: var(--editorial-ink) !important;
  border-right: 1px solid var(--editorial-line) !important;
}
.auth-story::before,
.auth-story::after { display: none !important; }
.auth-story__grid { opacity: .35 !important; background-image: linear-gradient(var(--editorial-grid) 1px, transparent 1px), linear-gradient(90deg,var(--editorial-grid) 1px,transparent 1px) !important; background-size: 48px 48px !important; }
.auth-kicker,
.signin-card .eyebrow { color: var(--editorial-orange) !important; }
.auth-story h1 { color: var(--editorial-ink) !important; font-size: clamp(3rem, 5.6vw, 6rem) !important; line-height: .98 !important; }
.auth-story__intro,
.auth-story__feature small,
.auth-story__note { color: var(--editorial-muted) !important; font-weight: 450 !important; }
.auth-story__feature {
  border-top: 1px solid var(--editorial-line) !important;
  border-radius: 0 !important;
  background: transparent !important;
}
.auth-story__feature > span { color: var(--editorial-blue) !important; }
.auth-story__feature strong { color: var(--editorial-ink) !important; }
.signin-panel { background: rgba(251,250,247,.94) !important; }
.signin-card {
  border: 1px solid var(--editorial-line) !important;
  border-radius: 0 !important;
  background: #fff !important;
  box-shadow: none !important;
}
.signin-card__accent { height: 2px !important; background: var(--editorial-orange) !important; }
.signin-card__heading h2 { color: var(--editorial-ink) !important; }
.signin-card .intro,
.signin-support p { color: var(--editorial-muted) !important; }
.auth-page .field input {
  border-radius: 0 !important;
  border-color: var(--editorial-line-strong) !important;
  box-shadow: none !important;
}
.signin-submit {
  border-radius: 0 !important;
  background: var(--editorial-blue) !important;
  border-color: var(--editorial-blue) !important;
  color: #fff !important;
  box-shadow: none !important;
}
.signin-submit:hover,
.signin-submit:focus-visible { background: var(--editorial-ink) !important; border-color: var(--editorial-ink) !important; }
.auth-back-link,
.signin-support a { color: var(--editorial-blue) !important; }
