/**
 * Login page — supplemental styles only (loads after styles.css)
 * Matches Figma node 315:28 (Expr3ss! Service file).
 *
 * Layout: full-bleed two-pane on desktop — white content column on the
 * left, decorative geometric pattern panel on the right (~30% width).
 * The right panel collapses below 992px.
 *
 * Reused from styles.css:
 *  - tokens (--color-*, --font-*, --shadow-card)
 *  - .search-field   (used as the input shell, with .login-modern__input modifier)
 *  - .visually-hidden (Bootstrap)
 */

/* Full-viewport shell (login is full-bleed; no .page max-width here) */
.login-modern-body {
  margin: 0;
  background: var(--color-white);
}

.login-modern {
  position: relative;
  min-height: 100vh;
  width: 100%;
  background: var(--color-white);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* ---------- Decorative right-side pattern (desktop ≥ 992px) ---------- */
.login-modern__decor {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 30%;
  max-width: 571px;
  min-width: 320px;
  background: #ebe294; /* matches Figma swatch behind the pattern */
  pointer-events: none;
}

.login-modern__decor img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: left center;
  display: block;
}

/* ---------- Content column ----------
 * NOTE: deliberately NO z-index here. Adding z-index would create a new
 * stacking context that traps any descendant popup/modal (e.g. the legacy
 * Popup.panelOpen / panelConfirmOpen / alertOpen overlays appended to the
 * form) below #dimOverlay (z:1900), making them visually visible but
 * unclickable. Vertical stacking against .login-modern__decor is handled by
 * DOM order (content comes after decor) and by the fact that they occupy
 * non-overlapping horizontal regions on desktop (decor is right:0 / 30%). */
.login-modern__content {
  position: relative;
  display: flex;
  flex-direction: column;
  flex: 1 0 auto;
  /* Reserve room for the decor panel on desktop (matches its 30% / 571px) */
  width: 70%;
  min-width: 0;
  min-height: 100vh;
  padding: 64px 56px 24px;
}

/* ---------- Top bar (logo + help) ---------- */
.login-modern__topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
}

.login-modern__brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.login-modern__brand img {
  display: block;
  width: 94px;
  height: 66px;
  object-fit: contain;
}

.login-modern__help {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--color-white);
  border-radius: 6px;
  font-family: var(--font-dm);
  font-size: 16px;
  font-weight: 800;
  line-height: 1;
  color: var(--color-black);
  text-decoration: none;
}

.login-modern__help:hover {
  text-decoration: underline;
}

.login-modern__help .ph {
  font-size: 24px;
  flex-shrink: 0;
}

/* ---------- Main (centered form) ---------- */
.login-modern__main {
  flex: 1 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 64px 0;
}

.login-modern__form-wrap {
  width: 100%;
  max-width: 387px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 32px;
}

.login-modern__title {
  margin: 0;
  font-family: var(--font-dm);
  font-size: 32px;
  font-weight: 700;
  line-height: 1;
  text-align: center;
  color: var(--color-black);
}

.login-modern__form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
}

.login-modern__fields {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
}

/* Modifier on the shared .search-field so we can drop the leading icon
 * and keep the same height/border/typography from styles.css. */
.search-field.login-modern__input {
  width: 100%;
  padding: 14px 16px;
}

.search-field.login-modern__input input {
  width: 100%;
  font-family: var(--font-dm);
  font-size: 16px;
  font-weight: 400;
  line-height: 26px;
  letter-spacing: 0.032px;
  color: var(--color-black);
}

.search-field.login-modern__input input::placeholder {
  color: var(--color-neutral-400);
}

/* Remember-me + Forgot password row */
.login-modern__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
}

.login-modern__check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 8px 8px 8px 0;
  cursor: pointer;
  font-family: var(--font-dm);
  font-size: 16px;
  font-weight: 400;
  line-height: 26px;
  letter-spacing: 0.032px;
  color: var(--color-black);
  user-select: none;
}

.login-modern__check input[type="checkbox"] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.login-modern__check-box {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 1px solid #ccccca; /* Neutral/300 from Figma */
  border-radius: 2px;
  background: var(--color-white);
  flex-shrink: 0;
  position: relative;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.login-modern__check input[type="checkbox"]:checked + .login-modern__check-box {
  background: var(--color-black);
  border-color: var(--color-black);
}

.login-modern__check input[type="checkbox"]:checked + .login-modern__check-box::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 0px;
  width: 5px;
  height: 10px;
  border: solid var(--color-white);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.login-modern__check input[type="checkbox"]:focus-visible + .login-modern__check-box {
  outline: 2px solid var(--color-black);
  outline-offset: 2px;
}

.login-modern__forgot {
  font-family: var(--font-dm);
  font-size: 16px;
  font-weight: 400;
  line-height: 26px;
  letter-spacing: 0.032px;
  color: var(--color-black);
  text-decoration: none;
  white-space: nowrap;
}

.login-modern__forgot:hover {
  text-decoration: underline;
}

/* Primary submit — orange "Login" button */
.login-modern__submit {
  display: block;
  width: 100%;
  padding: 16px 24px;
  border: none;
  border-radius: 6px;
  background: #ff6c3d; /* Orange from Figma */
  font-family: var(--font-dm);
  font-size: 16px;
  font-weight: 600;
  line-height: 18px;
  color: var(--color-black);
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.login-modern__submit:hover,
.login-modern__submit:focus-visible {
  background: #d65127; /* Orange 600 from Figma */
  outline: none;
}

.login-modern__submit:disabled {
  background: var(--color-neutral-200);
  color: var(--color-neutral-400);
  cursor: not-allowed;
}

.login-modern__sso {
  margin: 0;
  text-align: center;
  font-family: var(--font-dm);
  font-size: 16px;
  font-weight: 400;
  line-height: 26px;
  letter-spacing: 0.032px;
  color: var(--color-black);
}

.login-modern__sso-button {
  display: block;
  width: 100%;
  margin: 0;
  padding: 14px 24px;
  border: 1px solid var(--color-black);
  border-radius: 6px;
  background: var(--color-white);
  font-family: var(--font-dm);
  font-size: 16px;
  font-weight: 600;
  line-height: 18px;
  color: var(--color-black);
  cursor: pointer;
  text-align: center;
  box-sizing: border-box;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.login-modern__sso-button:hover {
  background: var(--color-neutral-25);
}

.login-modern__sso.login-modern__sso--with-form {
  margin-top: 16px;
}

.login-modern__sso-button:focus-visible {
  outline: 2px solid var(--color-black);
  outline-offset: 2px;
}

/* SSO-only customers: single action matches primary Login styling */
.login-modern__sso-button.login-modern__sso-button--primary {
  padding: 16px 24px;
  border: none;
  background: #ff6c3d;
  transition: background-color 0.15s ease;
}

.login-modern__sso-button.login-modern__sso-button--primary:hover {
  background: #d65127;
}

.login-modern__sso-button.login-modern__sso-button--primary:focus-visible {
  outline: none;
  background: #d65127;
}

.login-modern__sso a {
  color: var(--color-black);
  text-decoration: none;
}

.login-modern__sso a:hover {
  text-decoration: underline;
}

.login-modern__sso strong {
  font-weight: 700;
}

/* ---------- Trailing-icon helpers inside .search-field inputs ---------- */
/* Legacy login.inc.php uses class="noShow" to toggle visibility via Core.removeClass.
   We honour the same convention so users.lib.js and Core helpers keep working. */
.login-modern .noShow {
  display: none !important;
}

.login-modern__email-ok {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  font-size: 20px;
  line-height: 1;
  color: #0a7d42; /* hero green from styles.css token */
}

.login-modern__pwd-toggle {
  flex-shrink: 0;
  font-size: 20px;
  color: var(--color-neutral-400);
  cursor: pointer;
  user-select: none;
  line-height: 1;
}

.login-modern__pwd-toggle:hover {
  color: var(--color-neutral-900);
}

.login-modern__pwd-toggle:focus-visible {
  outline: 2px solid var(--color-black);
  outline-offset: 2px;
  border-radius: 2px;
}

.login-modern__caps-alert {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 6px;
  background: var(--color-neutral-50);
  font-family: var(--font-dm);
  font-size: 14px;
  font-weight: 600;
  line-height: 22px;
  color: var(--color-black);
}

.login-modern__caps-alert .ph {
  font-size: 18px;
}

/* Inline group inside the remember-me / forgot-password row.
   Lets each cell pair its label with its drawHelpLink('?') icon. */
.login-modern__row-cell {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  min-width: 0;
}

.login-modern__row-cell .helpLink {
  display: inline-flex;
  align-items: center;
}

.login-modern__row-cell .helpLink img {
  width: 16px;
  height: 16px;
  vertical-align: middle;
}

/* ---------- Browser autofill (Chrome/Edge) ---------- */
/* Suppress the bright yellow autofill background on email/password inputs.
 * Keep the modern white shell + black text via an inset shadow trick. */
.login-modern .search-field input:-webkit-autofill,
.login-modern .search-field input:-webkit-autofill:hover,
.login-modern .search-field input:-webkit-autofill:focus,
.login-modern .search-field input:-webkit-autofill:active,
.login-modern__form-wrap input:-webkit-autofill,
.login-modern__form-wrap input:-webkit-autofill:hover,
.login-modern__form-wrap input:-webkit-autofill:focus,
.login-modern__form-wrap input:-webkit-autofill:active {
  -webkit-text-fill-color: var(--color-black);
  -webkit-box-shadow: 0 0 0 1000px var(--color-white) inset;
  box-shadow: 0 0 0 1000px var(--color-white) inset;
  caret-color: var(--color-black);
  transition: background-color 600000s 0s, color 600000s 0s;
}

/* Firefox autofill */
.login-modern__form-wrap input:autofill {
  background: var(--color-white) !important;
  color: var(--color-black) !important;
}

/* =============================================================
 * Legacy class overrides for content rendered inside the form
 * ============================================================
 * The 2FA AJAX flow (Popup.panelOpenAjax → ajax/panelLoad.ajax.php
 * "twoFactorAuthenticate") injects markup into #loginPanel that uses
 * legacy class names: .ourGreenPanel, .ourOrangePanel, .ourRedPanel,
 * .fancyButton, .defaultLoginButton, .link, .header etc. We don't load
 * the legacy microsite.css here, so we provide modernised versions of
 * those rules — scoped under .login-modern__form-wrap so we never bleed
 * outside the login page. Same applies to the bad-login + suspended
 * popups that surface earlier on the page.
 * ============================================================= */

/* Coloured info panels */
.login-modern__form-wrap .ourGreenPanel,
.login-modern__form-wrap .ourOrangePanel,
.login-modern__form-wrap .ourRedPanel {
  font-family: var(--font-dm);
  font-size: 14px;
  line-height: 22px;
  border-radius: 8px;
  padding: 16px 18px;
  margin: 0 0 16px;
  border: 1px solid transparent;
}

.login-modern__form-wrap .ourGreenPanel {
  background: rgba(10, 125, 66, 0.06);
  border-color: rgba(10, 125, 66, 0.18);
  color: var(--color-black);
}

.login-modern__form-wrap .ourOrangePanel {
  background: #fff3ec;
  border-color: rgba(255, 108, 61, 0.32);
  color: var(--color-black);
}

.login-modern__form-wrap .ourRedPanel {
  background: #fdecea;
  border-color: rgba(193, 39, 45, 0.28);
  color: var(--color-black);
}

/* Legacy colour helper spans/icons */
.login-modern__form-wrap .ourGreen { color: #0a7d42 !important; }
.login-modern__form-wrap .ourOrange { color: #d65127 !important; }
.login-modern__form-wrap .ourRed { color: #c1272d !important; }

/* Headings + paragraph styles inside the form column (used by 2FA panel) */
.login-modern__form-wrap h2,
.login-modern__form-wrap h3,
.login-modern__form-wrap h4 {
  margin: 0 0 12px;
  font-family: var(--font-dm);
  font-weight: 700;
  color: var(--color-black);
  line-height: 1.35;
}

.login-modern__form-wrap h2 { font-size: 22px; }
.login-modern__form-wrap h3 { font-size: 18px; }
.login-modern__form-wrap h4 { font-size: 16px; font-weight: 600; }

.login-modern__form-wrap h4:last-child {
  margin-bottom: 0;
}

.login-modern__form-wrap .ourGreenPanel h4,
.login-modern__form-wrap .ourOrangePanel h4,
.login-modern__form-wrap .ourRedPanel h4 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 8px;
}

.login-modern__form-wrap .ourGreenPanel h4 + h4,
.login-modern__form-wrap .ourOrangePanel h4 + h4,
.login-modern__form-wrap .ourRedPanel h4 + h4 {
  margin-top: 6px;
}

.login-modern__form-wrap p.header {
  margin: 8px 0;
  font-family: var(--font-dm);
  font-size: 14px;
  line-height: 22px;
  color: var(--color-black);
}

/* Resize legacy fa-2x icons inside the form column so they don't dwarf the
 * compact modern layout (legacy used 2x relative to a larger base font). */
.login-modern__form-wrap .fa.fa-2x {
  font-size: 22px;
  line-height: 1;
}

.login-modern__form-wrap .fa.fa-3x {
  font-size: 28px;
  line-height: 1;
}

/* "Use Mobile" / Send Again / inline icon-button links */
.login-modern__form-wrap .link,
.login-modern__form-wrap a.link,
.login-modern__form-wrap p.link,
.login-modern__form-wrap i.link {
  cursor: pointer;
  color: var(--color-black);
  text-decoration: none;
}

.login-modern__form-wrap .link:hover,
.login-modern__form-wrap a.link:hover,
.login-modern__form-wrap p.link:hover {
  text-decoration: underline;
}

.login-modern__form-wrap #twoFactorUseMobile {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 12px 0 0;
  font-family: var(--font-dm);
  font-size: 14px;
  font-weight: 600;
  color: var(--color-black);
}

.login-modern__form-wrap #twoFactorUseMobile u {
  text-decoration: underline;
}

/* Two-factor "Trust this device" radio buttons (drawRadioButtons output:
 * <span class="radiobuttonWrapper"><input type="radio" class="fancyButton small">
 *  <label class="fancyButton small" for="..."></label></span>) */
.login-modern__form-wrap .radiobuttonWrapper {
  display: inline-flex;
  align-items: center;
  margin-right: 8px;
}

.login-modern__form-wrap .radiobuttonWrapper input[type="radio"].fancyButton {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.login-modern__form-wrap label.fancyButton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 56px;
  height: 32px;
  padding: 0 14px;
  border: 1px solid var(--color-neutral-200);
  border-radius: 6px;
  background: var(--color-white);
  font-family: var(--font-dm);
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  color: var(--color-black);
  cursor: pointer;
  user-select: none;
  transition: background-color 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}

.login-modern__form-wrap label.fancyButton.small {
  min-width: 44px;
  height: 28px;
  padding: 0 10px;
  font-size: 13px;
}

.login-modern__form-wrap label.fancyButton:hover {
  border-color: var(--color-neutral-400);
  background: var(--color-neutral-25);
}

.login-modern__form-wrap input[type="radio"].fancyButton:checked + label.fancyButton {
  background: var(--color-black);
  border-color: var(--color-black);
  color: var(--color-white);
}

.login-modern__form-wrap input[type="radio"].fancyButton:focus-visible + label.fancyButton {
  outline: 2px solid var(--color-black);
  outline-offset: 2px;
}

/* Two-factor authentication code input (#twoFactorAuthCode) — legacy emits
 * a bare <input type="text" style="width:170px">; render it with the same
 * pill style as the email/password fields and override the inline width. */
.login-modern__form-wrap #twoFactorAuthCode {
  display: inline-block;
  width: 220px !important;
  height: 46px;
  padding: 12px 16px;
  margin-right: 8px;
  border: 1px solid var(--color-neutral-200);
  border-radius: 6px;
  background: var(--color-white);
  font-family: var(--font-dm);
  font-size: 16px;
  font-weight: 400;
  line-height: 22px;
  letter-spacing: 0.032px;
  color: var(--color-black);
  outline: none;
  vertical-align: middle;
}

.login-modern__form-wrap #twoFactorAuthCode::placeholder {
  color: var(--color-neutral-400);
}

.login-modern__form-wrap #twoFactorAuthCode:focus {
  border-color: var(--color-black);
}

/* "Authenticate with Yubikey" button (legacy renders #loginStaticButton
 * + .defaultLoginButton.link nested div). Style as a primary modern button. */
.login-modern__form-wrap #loginStaticButton .defaultLoginButton,
.login-modern__form-wrap .defaultLoginButton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto !important;
  min-width: 200px;
  padding: 14px 24px;
  margin-top: 12px;
  border: none;
  border-radius: 6px;
  background: #ff6c3d;
  font-family: var(--font-dm);
  font-size: 16px;
  font-weight: 600;
  line-height: 18px;
  color: var(--color-black);
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.login-modern__form-wrap #loginStaticButton .defaultLoginButton:hover,
.login-modern__form-wrap .defaultLoginButton:hover {
  background: #d65127;
  color: var(--color-black);
}

.login-modern__form-wrap #loginStaticButton {
  display: inline-block;
}

/* reCAPTCHA v2 challenge (ajax/panelLoad.ajax.php): Login sits below #verifyAgain */
.login-modern__form-wrap #verifyAgain + #loginStaticButton {
  display: block;
  width: 100%;
  margin-top: 12px;
}

.login-modern__form-wrap #verifyAgain + #loginStaticButton .defaultLoginButton {
  display: flex;
  width: 100% !important;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  padding: 16px 24px;
  margin-top: 0;
}

/* Legacy "small" inline buttons (e.g. "Try Again with another Code") */
.login-modern__form-wrap input[type="button"].small,
.login-modern__form-wrap input[type="submit"].small {
  display: inline-block;
  padding: 6px 12px;
  margin-left: 8px;
  border: 1px solid var(--color-black);
  border-radius: 6px;
  background: var(--color-white);
  font-family: var(--font-dm);
  font-size: 13px;
  font-weight: 600;
  color: var(--color-black);
  cursor: pointer;
}

.login-modern__form-wrap input[type="button"].small:hover {
  background: var(--color-neutral-25);
}

/* Two-factor wrapper inserted by Popup.panelOpenAjax — give it breathing room */
.login-modern__form-wrap #loginPanel .ourGreenPanel {
  margin-top: 16px;
}

/* Deferred 2FA mobile capture (ajax/panelLoad.ajax.php #setUpNow): dial code +
 * number must stay inside the narrow login column; native select uses the
 * same shell + Phosphor caret pattern as .modern-native-select-shell in
 * modern/jobApplicationModern.css. */
.login-modern__form-wrap #setUpNow .two-factor-mobile-row {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 8px 10px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin: 4px 0 14px;
  box-sizing: border-box;
}

.login-modern__form-wrap #setUpNow .two-factor-mobile-row__icon {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  line-height: 1;
  align-self: center;
}

.login-modern__form-wrap #setUpNow .login-modern__2fa-country {
  position: relative;
  flex: 1 1 140px;
  max-width: 210px;
  min-width: 0;
  box-sizing: border-box;
}

.login-modern__form-wrap #setUpNow .login-modern__2fa-country select#mobileCountryCode {
  display: block;
  width: 100%;
  max-width: 100%;
  min-height: 46px;
  height: auto;
  padding: 10px 44px 10px 16px;
  border: 1px solid var(--color-neutral-200);
  border-radius: 6px;
  background: var(--color-white);
  background-image: none;
  font-family: var(--font-dm);
  font-size: 16px;
  font-weight: 400;
  line-height: 26px;
  white-space: normal;
  overflow-wrap: anywhere;
  letter-spacing: 0.032px;
  color: var(--color-black);
  appearance: none;
  -webkit-appearance: none;
  outline: none;
  cursor: pointer;
  box-sizing: border-box;
}

.login-modern__form-wrap #setUpNow .login-modern__2fa-country select#mobileCountryCode:focus {
  border-color: var(--color-neutral-400);
}

.login-modern__form-wrap #setUpNow .login-modern__2fa-country.modern-custom-select.is-open::after {
  transform: translate3d(0, -50%, 0) rotate(180deg);
}

.login-modern__form-wrap #setUpNow .login-modern__2fa-country::after {
  content: "\e136";
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translate3d(0, -50%, 0) rotate(0deg);
  transform-origin: 50% 50%;
  transition: var(--modern-caret-rotate-transition, transform 0.32s cubic-bezier(0.33, 1, 0.68, 1));
  backface-visibility: hidden;
  font-family: "Phosphor";
  font-size: 24px;
  color: var(--color-black);
  pointer-events: none;
}

.login-modern__form-wrap #setUpNow .two-factor-mobile-row #two_factor_mobile {
  flex: 1 1 120px;
  min-width: 0;
  width: 100%;
  max-width: 100%;
  height: 46px;
  padding: 0 16px;
  border: 1px solid var(--color-neutral-200);
  border-radius: 6px;
  background: var(--color-white);
  font-family: var(--font-dm);
  font-size: 16px;
  font-weight: 400;
  line-height: 44px;
  letter-spacing: 0.032px;
  color: var(--color-black);
  box-sizing: border-box;
  outline: none;
}

.login-modern__form-wrap #setUpNow .two-factor-mobile-row #two_factor_mobile::placeholder {
  color: var(--color-neutral-400);
}

.login-modern__form-wrap #setUpNow .two-factor-mobile-row #two_factor_mobile:focus {
  border-color: var(--color-black);
}

.login-modern__form-wrap #setUpNow #sendSMSButton.big,
.login-modern__form-wrap .two-factor-post-panel #sendSMSButton.big {
  display: block;
  width: 100%;
  margin-top: 2px;
  padding: 14px 24px;
  border: none;
  border-radius: 6px;
  background: #ff6c3d;
  font-family: var(--font-dm);
  font-size: 16px;
  font-weight: 600;
  line-height: 18px;
  color: var(--color-black);
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.login-modern__form-wrap #setUpNow #sendSMSButton.big:hover:not(:disabled),
.login-modern__form-wrap .two-factor-post-panel #sendSMSButton.big:hover:not(:disabled) {
  background: #d65127;
}

.login-modern__form-wrap #setUpNow #sendSMSButton.big:disabled,
.login-modern__form-wrap .two-factor-post-panel #sendSMSButton.big:disabled {
  background: var(--color-neutral-200);
  color: var(--color-neutral-400);
  cursor: not-allowed;
}

/* 2FA: actions + SMS follow-up sit below the green info card (see ajax/panelLoad.ajax.php) */
.login-modern__form-wrap .two-factor-post-panel {
  width: 100%;
  max-width: 100%;
  margin-top: 12px;
  box-sizing: border-box;
}

.login-modern__form-wrap .two-factor-post-panel .two-factor-code-target {
  display: block;
  margin: 0;
}

.login-modern__form-wrap .two-factor-post-panel .two-factor-sms-status {
  margin: 0 0 10px;
  font-family: var(--font-dm);
  font-size: 14px;
  font-weight: 600;
  line-height: 22px;
  color: var(--color-black);
}

/* Local-only SMS notice (smartSms on LOCALSERVER); not a second green card */
.login-modern__form-wrap .local-sms-debug-banner {
  margin: 0 0 12px;
  padding: 12px 14px;
  border: 1px solid var(--color-neutral-200);
  border-radius: 6px;
  background: var(--color-neutral-25, #f8f9fa);
  font-family: var(--font-dm);
  font-size: 13px;
  font-weight: 400;
  line-height: 20px;
  color: var(--color-neutral-700, #4a4a4a);
  text-align: left;
}

.login-modern__form-wrap .local-sms-debug-banner strong {
  font-weight: 600;
  color: var(--color-black);
}

/* 2FA SMS code entry (replaces .huge.ghost inside modern login column) */
.login-modern__form-wrap #two_factor_code_in.two-factor-code-in,
.login-modern__form-wrap #two_factor_code_in {
  display: block;
  width: 100%;
  max-width: 100%;
  height: 46px;
  margin: 0;
  padding: 0 16px;
  border: 1px solid var(--color-neutral-200);
  border-radius: 6px;
  background: var(--color-white);
  font-family: var(--font-dm);
  font-size: 16px;
  font-weight: 400;
  line-height: 44px;
  letter-spacing: 0.032px;
  color: var(--color-black);
  box-sizing: border-box;
  outline: none;
}

.login-modern__form-wrap #two_factor_code_in.two-factor-code-in::placeholder,
.login-modern__form-wrap #two_factor_code_in::placeholder {
  color: var(--color-neutral-400);
}

.login-modern__form-wrap #two_factor_code_in.two-factor-code-in:focus,
.login-modern__form-wrap #two_factor_code_in:focus {
  border-color: var(--color-black);
}

/* 2FA success: trust device block (ajax/panelLoad.ajax.php twoFactorValidate) */
.login-modern__form-wrap .two-factor-trust-section {
  margin: 12px 0;
  padding: 16px 18px;
  border-radius: 8px;
  border: 1px solid rgba(10, 125, 66, 0.18);
  background: rgba(10, 125, 66, 0.06);
  box-sizing: border-box;
}

.login-modern__form-wrap .two-factor-trust-section > h4 {
  margin: 0;
  font-family: var(--font-dm);
  font-weight: 600;
  font-size: 16px;
  line-height: 1.35;
  color: var(--color-black);
}

.login-modern__form-wrap .two-factor-trust-section .two-factor-trust-section__actions {
  margin: 0 0 12px;
}

.login-modern__form-wrap #trustButton.two-factor-trust-button,
.login-modern__form-wrap #trustButton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  width: 100%;
  min-height: 48px;
  padding: 12px 20px;
  border: 1px solid var(--color-black);
  border-radius: 6px;
  background: var(--color-white);
  font-family: var(--font-dm);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.25;
  color: var(--color-black);
  cursor: pointer;
  box-sizing: border-box;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.login-modern__form-wrap #trustButton.two-factor-trust-button .fa,
.login-modern__form-wrap #trustButton .fa {
  font-size: 20px;
  line-height: 1;
}

.login-modern__form-wrap #trustButton.two-factor-trust-button:hover,
.login-modern__form-wrap #trustButton:hover {
  background: var(--color-neutral-25);
}

.login-modern__form-wrap #trustButton.two-factor-trust-button:focus-visible,
.login-modern__form-wrap #trustButton:focus-visible {
  outline: 2px solid var(--color-black);
  outline-offset: 2px;
}

.login-modern__form-wrap #trustButton.ourGreen {
  border-color: #0a7d42;
  background: rgba(10, 125, 66, 0.12);
  color: var(--color-black);
  cursor: default;
}

.login-modern__form-wrap .two-factor-trust-section__advisory {
  margin: 0;
  font-family: var(--font-dm);
  font-size: 14px;
  font-weight: 400;
  line-height: 22px;
  color: var(--color-neutral-700, #4a4a4a);
}

.login-modern__form-wrap #completeLoginButton.two-factor-complete-login,
.login-modern__form-wrap #completeLoginButton {
  display: block;
  width: 100%;
  margin: 16px 0 0;
  padding: 16px 24px;
  border: none;
  border-radius: 6px;
  background: #ff6c3d;
  font-family: var(--font-dm);
  font-size: 16px;
  font-weight: 600;
  line-height: 18px;
  color: var(--color-black);
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.login-modern__form-wrap #completeLoginButton.two-factor-complete-login:hover,
.login-modern__form-wrap #completeLoginButton:hover {
  background: #d65127;
}

/* Optional Google Authenticator accordion (ajax twoFactorValidate success) */
.login-modern__form-wrap .two-factor-google-panel.ourGreenPanel {
  margin: 12px 0 0;
  padding: 0;
  overflow: hidden;
}

.login-modern__form-wrap .two-factor-google-panel > .two-factor-google-panel__header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  padding: 14px 16px;
  margin: 0;
  cursor: pointer;
  font-family: var(--font-dm);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--color-black);
}

.login-modern__form-wrap .two-factor-google-panel__title {
  display: inline-flex;
  align-items: center;
  flex: 1 1 auto;
  min-width: 0;
}

.login-modern__form-wrap .two-factor-google-panel__chev {
  display: inline-block;
  margin-right: 4px;
  transition: transform 0.25s ease;
  transform: rotate(0deg);
}

.login-modern__form-wrap #googleAuthenticatorSection.is-open .two-factor-google-panel__chev {
  transform: rotate(180deg);
}

.login-modern__form-wrap .two-factor-google-panel__body {
  padding: 0 16px 16px;
  border-top: 1px solid rgba(10, 125, 66, 0.15);
  box-sizing: border-box;
}

.login-modern__form-wrap .two-factor-google-panel__lead {
  margin: 14px 0 12px;
  font-family: var(--font-dm);
  font-size: 14px;
  font-weight: 400;
  line-height: 22px;
  color: var(--color-neutral-700, #4a4a4a);
}

.login-modern__form-wrap .two-factor-google-panel__qr {
  margin: 0 auto 14px;
  max-width: 220px;
  text-align: center;
}

.login-modern__form-wrap .two-factor-google-panel__qr img {
  display: block;
  width: 100%;
  max-width: 220px;
  height: auto;
  margin: 0 auto;
}

.login-modern__form-wrap #google_auth_setup_in.two-factor-google-setup-input,
.login-modern__form-wrap #google_auth_setup_in {
  display: block;
  width: 100%;
  max-width: 100%;
  height: 46px;
  margin: 0 0 10px;
  padding: 0 16px;
  border: 1px solid var(--color-neutral-200);
  border-radius: 6px;
  background: var(--color-white);
  font-family: var(--font-dm);
  font-size: 16px;
  font-weight: 400;
  line-height: 44px;
  letter-spacing: 0.032px;
  color: var(--color-black);
  box-sizing: border-box;
  outline: none;
}

.login-modern__form-wrap #google_auth_setup_in::placeholder {
  color: var(--color-neutral-400);
}

.login-modern__form-wrap #google_auth_setup_in:focus {
  border-color: var(--color-black);
}

.login-modern__form-wrap .two-factor-google-panel__response {
  margin: 0;
}

.login-modern__form-wrap .two-factor-google-panel__response > .ourGreenPanel,
.login-modern__form-wrap .two-factor-google-panel__response > .ourOrangePanel {
  margin: 4px 0 0;
}

/* "noWrap" helper used in the 2FA layout */
.login-modern__form-wrap p.noWrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin: 12px 0 0;
}

/* =============================================================
 * resetPassword.php — overrides for the shared legacy
 * passwordInputPanel.inc.php markup (also used by addUser.php /
 * changeLogin.php, so the include itself must not be modified). The
 * legacy panel emits two <p class="input"><input class="userInput">
 * password fields with an inline eye icon, plus #passwordStrengthMeter,
 * #passwordMatchMsg, #passwordBlocked / Weak / Variety hints, and a
 * "Generate a Strong Random Password" button.
 * ============================================================= */

/* Helper text paragraphs — used on both the reset flow and other modern login
   sub-pages. Safe to scope under .login-modern__form-wrap. */
.login-modern__form-wrap .login-modern__help-text {
  font-family: var(--font-dm);
  font-size: 14px;
  line-height: 22px;
  color: var(--color-neutral-700, #4a4a4a);
  margin: 0 0 12px;
}

/* All rules below are scoped under .login-modern__reset-form so they NEVER
   leak onto inc/login.inc.php (which also lives under .login-modern__form-wrap
   and uses the same #passwordVisibliltyIcon id for its own — quite different —
   eye toggle, plus its own primary submit button styling). */

.login-modern__reset-form {
  margin-top: 4px;
}

.login-modern__reset-actions {
  margin: 4px 0 0;
}

/* Each <p class="input"> becomes a stack: input row + label row */
.login-modern__reset-form p.input {
  position: relative; /* anchors the absolutely-placed eye icon */
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  margin: 0 0 14px;
  font-family: var(--font-dm);
  font-size: 14px;
  color: var(--color-black);
}

/* Pill-style password inputs (legacy "userInput" class) */
.login-modern__reset-form input.userInput,
.login-modern__reset-form input#passwordInput,
.login-modern__reset-form input#passwordCheck {
  flex: 1 1 100%;
  width: 100% !important;
  margin: 0 !important;
  height: 46px;
  padding: 12px 44px 12px 16px; /* room for the eye icon on the right */
  border: 1px solid var(--color-neutral-200);
  border-radius: 6px;
  background: var(--color-white);
  font-family: var(--font-dm);
  font-size: 16px;
  font-weight: 400;
  line-height: 22px;
  color: var(--color-black);
  outline: none;
  box-sizing: border-box;
}

.login-modern__reset-form input.userInput::placeholder {
  color: var(--color-neutral-400);
}

.login-modern__reset-form input.userInput:focus,
.login-modern__reset-form input#passwordInput:focus,
.login-modern__reset-form input#passwordCheck:focus {
  border-color: var(--color-black);
}

/* Password visibility eye icon (#passwordVisibliltyIcon — legacy spelling).
   Scoped to the reset form so it doesn't fight with the login page's icon. */
.login-modern__reset-form #passwordVisibliltyIcon {
  position: absolute;
  margin-left: -38px;
  margin-top: 14px;
  font-size: 18px;
  color: var(--color-neutral-700, #4a4a4a);
  cursor: pointer;
  z-index: 2;
}

/* Legacy label spans next to the inputs (e.g. "Password [Min 12 chars]") */
.login-modern__reset-form #p1,
.login-modern__reset-form span.small,
.login-modern__reset-form span.nowrap {
  font-size: 13px;
  color: var(--color-neutral-700, #4a4a4a);
}

.login-modern__reset-form #passwordMatchMsg {
  display: inline-block;
  margin: 4px 0 0;
  padding: 6px 10px;
  font-size: 12px;
  border-radius: 6px;
}

/* Password strength meter (#passwordStrengthMeter is a <table>). Override to
   a clean 6px bar. The legacy JS toggles a #strength <td> width to indicate
   strength — preserve the width-based mechanic but restyle the visual. */
.login-modern__reset-form #addUserPanel.addUser {
  margin: 0 0 12px;
}

.login-modern__reset-form table#passwordStrengthMeter {
  display: block;
  width: 100%;
  margin: 0 0 8px;
}

.login-modern__reset-form table#passwordStrengthMeter tbody {
  display: block;
  width: 100%;
}

/* Render the single meter row with flexbox so the legacy JS inline pixel
   widths (it sets #strength + #strengthInv to sum to 3 * gaugeWidth = 600px)
   become flex bases that shrink to the width of the form column rather than
   forcing the table ~700px wide and overflowing the card. Both cells shrink
   in proportion, so the orange-to-grey strength ratio is preserved. */
.login-modern__reset-form table#passwordStrengthMeter tr {
  display: flex;
  align-items: center;
  width: 100%;
}

.login-modern__reset-form table#passwordStrengthMeter td.labels {
  display: block;
  flex: 0 0 auto;
  width: auto;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--color-neutral-700, #4a4a4a);
  padding: 0 8px;
}

.login-modern__reset-form table#passwordStrengthMeter td#strength,
.login-modern__reset-form table#passwordStrengthMeter td#strengthInv {
  display: block;
  flex: 0 1 auto;
  min-width: 0;
  height: 6px;
  border-radius: 3px;
  padding: 0;
}

.login-modern__reset-form table#passwordStrengthMeter td#strength {
  background: #ff6c3d; /* modern orange — JS sets width inline */
}

.login-modern__reset-form table#passwordStrengthMeter td#strengthInv {
  background: var(--color-neutral-200);
}

/* Password rule warnings */
.login-modern__reset-form h5#passwordBlocked,
.login-modern__reset-form h5#passwordWeak,
.login-modern__reset-form h5#passwordVariety {
  margin: 6px 0;
  padding: 10px 14px;
  border-radius: 6px;
  font-family: var(--font-dm);
  font-size: 13px;
  font-weight: 500;
  background: #fff3ec;
  border: 1px solid rgba(255, 108, 61, 0.32);
  color: var(--color-black);
}

/* "Generate a Strong Random Password" button (legacy class="medium") */
.login-modern__reset-form #passwordMaker {
  margin: 4px 0 16px;
}

.login-modern__reset-form #passwordMaker p {
  margin: 0;
}

.login-modern__reset-form #passwordMaker input[type="button"].medium {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 38px;
  padding: 0 16px;
  border: 1px solid var(--color-black);
  border-radius: 6px;
  background: var(--color-white);
  font-family: var(--font-dm);
  font-size: 13px;
  font-weight: 600;
  color: var(--color-black);
  cursor: pointer;
}

.login-modern__reset-form #passwordMaker input[type="button"].medium:hover {
  background: var(--color-neutral-25);
}

/* Reset / "Set Upgraded Password" button — keep modern primary look but
   support the icon prefix that the legacy PHP renders inside the button. */
.login-modern__reset-form button#resetPasswordButton.login-modern__submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  gap: 8px;
}

.login-modern__reset-form button#resetPasswordButton.login-modern__submit[disabled],
.login-modern__reset-form button#resetPasswordButton.login-modern__submit.ghost {
  background: #ffd6c5;
  cursor: not-allowed;
}

/* =============================================================
 * Popup overlays (bad-login, suspended, forgot-password, alert)
 * ============================================================
 * Popup.panelOpen / panelConfirmOpen / alertOpen append <div id="…Overlay">
 * directly under <body>. They reference legacy classes (.fa fa-times,
 * .floatRight, .helloHead, .right, .center, .new). We don't load the
 * legacy microsite.css here so we provide a minimal modern modal shell —
 * scoped under body.login-modern-body so other pages keep their legacy
 * styling untouched.
 * ============================================================= */

body.login-modern-body #dimOverlay {
  position: fixed;
  inset: 0;
  z-index: 1900;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0;
  color: transparent;
}

/* Form.safeSubmit() injects legacy "Thinking this through..." copy and a
   Font Awesome cog. Hide that markup and show a centered Phosphor spinner
   instead (microsite.css is not loaded on the modern login page). */
body.login-modern-body #dimOverlay .fa,
body.login-modern-body #dimOverlay #safeSubmitSubmitMsg {
  display: none !important;
}

body.login-modern-body #dimOverlay::before {
  content: "\eb44";
  display: inline-block;
  font-family: "Phosphor", system-ui, sans-serif;
  font-style: normal;
  font-weight: 400;
  font-size: 32px;
  line-height: 1;
  color: var(--color-white);
  animation: login-modern-dim-spin 0.9s linear infinite;
  transform-origin: 50% 50%;
}

@keyframes login-modern-dim-spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* Inline AJAX wait spinner — legacy Ajax.waitPanel() inserts
   <div class="ajaxWaitPanel"> as a sibling before #loginPanel with inline
   position:absolute / width / height / fontSize / padding. Without legacy
   microsite.css this looked like raw oversized text overlapping the form.
   Override the inline styles and render a centered spinner card over the
   login panel area while the 2FA AJAX request is in flight. */
body.login-modern-body .login-modern__form {
  position: relative;
}

body.login-modern-body .ajaxWaitPanel {
  position: absolute !important;
  top: 50% !important;
  left: 50% !important;
  right: auto !important;
  bottom: auto !important;
  transform: translate(-50%, -50%);
  inset: auto !important;
  width: auto !important;
  max-width: calc(100% - 32px);
  height: auto !important;
  margin: 0 !important;
  padding: 12px 18px !important;
  border: 1px solid var(--color-neutral-200) !important;
  border-radius: 999px;
  z-index: 2100;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--color-white);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
  font-family: var(--font-dm), "DM Sans", sans-serif !important;
  font-size: 14px !important;
  line-height: 1.4 !important;
  font-weight: 500;
  color: var(--color-black);
  text-align: center;
  white-space: nowrap;
  pointer-events: none;
}

body.login-modern-body .ajaxWaitPanel .fa.fa-cog,
body.login-modern-body .ajaxWaitPanel .fa-cog {
  font-size: 18px !important;
  color: var(--color-orange);
}

/* Hide the empty modal artifacts that Popup.panelOpenAjax creates while the
   2FA AJAX response is in flight. Its content is actually injected into
   #two_factor_target inline, not into #popupAjaxOverlay, so the overlay stays
   empty until the ~300ms Ajax.wait poll cleans it up. The MutationObserver in
   inc/login.inc.php tears these down the moment 2FA content arrives, but
   while that's happening keep them visually invisible so users don't see a
   dim flash over an inline 2FA panel. */
body.login-modern-body #popupAjaxOverlay:empty,
body.login-modern-body #popupAjaxOverlay:has(> :empty:only-child) {
  display: none !important;
}

body.login-modern-body #ajaxPanelUnderlay {
  background: transparent;
  pointer-events: none;
}

/* Backdrop behind 2FA AJAX popup (Popup.panelOpenAjax appends this div) */
body.login-modern-body #ajaxPanelUnderlay {
  position: fixed;
  inset: 0;
  z-index: 1900;
  background: rgba(0, 0, 0, 0.45);
}

body.login-modern-body #popupPanelOverlay,
body.login-modern-body #popupAlertOverlay,
body.login-modern-body #popupAjaxOverlay {
  position: fixed !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%);
  width: min(560px, calc(100% - 32px));
  max-height: calc(100vh - 64px);
  overflow: auto;
  z-index: 2000;
  padding: 24px 28px 20px;
  background: var(--color-white);
  color: var(--color-black);
  border: 1px solid var(--color-neutral-200);
  border-radius: 12px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.25);
  font-family: var(--font-dm);
  font-size: 15px;
  line-height: 22px;
}

/* Hide the legacy mascot image; modern modals don't use it. */
body.login-modern-body #popupPanelOverlay .helloHead,
body.login-modern-body #popupAlertOverlay .helloHead,
body.login-modern-body #popupAjaxOverlay .helloHead {
  display: none !important;
}

/* Floats inside the popup: legacy uses .right + .floatRight + .clearRight.
 * The "X" close button sits in #popupPanelCloseLink inside .right wrapper. */
body.login-modern-body #popupPanelOverlay .right,
body.login-modern-body #popupPanelOverlay .floatRight,
body.login-modern-body #popupAlertOverlay .floatRight {
  float: none;
}

body.login-modern-body #popupPanelCloseLink {
  position: absolute;
  top: 12px;
  right: 16px;
  z-index: 1;
  font-size: 22px;
  line-height: 1;
}

body.login-modern-body #popupPanelCloseLink .fa.fa-times {
  cursor: pointer;
  color: var(--color-neutral-400);
  transition: color 0.15s ease;
}

body.login-modern-body #popupPanelCloseLink .fa.fa-times:hover {
  color: var(--color-black);
}

/* alertOpen() has no #popupPanelCloseLink wrapper -- its close "X" is a bare
   <div class="floatRight"><i class="fa fa-times"></i></div> at the top of the
   markup. Pin it to the top-right corner and style it like the panel close
   link so the alert modal no longer shows the X stranded at the top-left. */
body.login-modern-body #popupAlertOverlay .floatRight:not(.clearRight) {
  position: absolute;
  top: 12px;
  right: 16px;
  z-index: 1;
  margin: 0;
  line-height: 1;
}

body.login-modern-body #popupAlertOverlay .floatRight:not(.clearRight) .fa.fa-times {
  cursor: pointer;
  font-size: 22px;
  color: var(--color-neutral-400);
  transition: color 0.15s ease;
}

body.login-modern-body #popupAlertOverlay .floatRight:not(.clearRight) .fa.fa-times:hover {
  color: var(--color-black);
}

/* Reserve headroom at the top of the alert modal so the first content block
   (often a coloured .ourGreenPanel / .ourOrangePanel) clears the
   absolutely-positioned close "X" instead of overlapping it. */
body.login-modern-body #popupAlertOverlay {
  padding-top: 44px;
}

/* Headings + paragraphs inside the popups */
body.login-modern-body #popupPanelOverlay h2,
body.login-modern-body #popupAlertOverlay h2 {
  margin: 0 0 12px;
  font-family: var(--font-dm);
  font-size: 22px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--color-black);
}

body.login-modern-body #popupPanelOverlay h3,
body.login-modern-body #popupAlertOverlay h3 {
  margin: 0 0 10px;
  font-family: var(--font-dm);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--color-black);
}

body.login-modern-body #popupPanelOverlay h4,
body.login-modern-body #popupAlertOverlay h4 {
  margin: 0 0 10px;
  font-family: var(--font-dm);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.5;
  color: var(--color-black);
}

body.login-modern-body #popupPanelOverlay p,
body.login-modern-body #popupAlertOverlay p {
  margin: 8px 0;
}

body.login-modern-body #popupPanelOverlay .header,
body.login-modern-body #popupAlertOverlay .header {
  font-family: var(--font-dm);
  font-size: 14px;
  line-height: 22px;
  color: var(--color-black);
}

/* Coloured info panels rendered inside the popups (e.g. bad-login uses
 * .ourOrangePanel, prettyIndent.trimRight in the alert). Unset float, give
 * them the same modern look as the in-form panels. */
body.login-modern-body #popupPanelOverlay .ourGreenPanel,
body.login-modern-body #popupPanelOverlay .ourOrangePanel,
body.login-modern-body #popupPanelOverlay .ourRedPanel,
body.login-modern-body #popupAlertOverlay .ourGreenPanel,
body.login-modern-body #popupAlertOverlay .ourOrangePanel,
body.login-modern-body #popupAlertOverlay .ourRedPanel {
  margin: 0 0 12px;
  padding: 14px 16px;
  border-radius: 8px;
  font-family: var(--font-dm);
  font-size: 14px;
  line-height: 22px;
  border: 1px solid transparent;
  color: var(--color-black);
}

body.login-modern-body #popupPanelOverlay .ourGreenPanel,
body.login-modern-body #popupAlertOverlay .ourGreenPanel {
  background: rgba(10, 125, 66, 0.06);
  border-color: rgba(10, 125, 66, 0.18);
}

body.login-modern-body #popupPanelOverlay .ourOrangePanel,
body.login-modern-body #popupAlertOverlay .ourOrangePanel {
  background: #fff3ec;
  border-color: rgba(255, 108, 61, 0.32);
}

body.login-modern-body #popupPanelOverlay .ourRedPanel,
body.login-modern-body #popupAlertOverlay .ourRedPanel {
  background: #fdecea;
  border-color: rgba(193, 39, 45, 0.28);
}

body.login-modern-body #popupPanelOverlay .ourGreen,
body.login-modern-body #popupAlertOverlay .ourGreen { color: #0a7d42 !important; }
body.login-modern-body #popupPanelOverlay .ourOrange,
body.login-modern-body #popupAlertOverlay .ourOrange { color: #d65127 !important; }
body.login-modern-body #popupPanelOverlay .ourRed,
body.login-modern-body #popupAlertOverlay .ourRed { color: #c1272d !important; }

body.login-modern-body #popupPanelOverlay .fa.fa-2x,
body.login-modern-body #popupAlertOverlay .fa.fa-2x {
  font-size: 22px;
  line-height: 1;
}

/* Confirm / Cancel buttons emitted by Popup.panelConfirmOpen
 * (forgot-password modal). Legacy uses class="new" on <button>. */
body.login-modern-body #popupPanelOverlay button.new {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  margin: 4px 6px 0 0;
  border: 1px solid var(--color-black);
  border-radius: 6px;
  background: var(--color-white);
  font-family: var(--font-dm);
  font-size: 14px;
  font-weight: 600;
  color: var(--color-black);
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

body.login-modern-body #popupPanelOverlay button.new:first-of-type {
  background: var(--color-black);
  color: var(--color-white);
}

body.login-modern-body #popupPanelOverlay button.new:hover {
  background: var(--color-neutral-25);
  color: var(--color-black);
}

body.login-modern-body #popupPanelOverlay button.new:first-of-type:hover {
  background: #1a1a1a;
  color: var(--color-white);
}

/* "Click anywhere within to close" footer text inside alertOpen */
body.login-modern-body #popupAlertOverlay .center,
body.login-modern-body #popupAlertOverlay small {
  display: block;
  text-align: center;
  font-size: 12px;
  color: var(--color-neutral-400);
  margin-top: 8px;
}

/* "helpLink" inline icon (drawHelpLink output) — small (i) info circle
 * that, when clicked, fires the legacy Help.init() popup. Style as a
 * subtle inline icon. The standalone helpLink span emitted next to the
 * badlogin popup (drawHelpLink('loginUnsuccessful')) is hidden because
 * its peer element is inside the popup, not on the page. */
body.login-modern-body .helpLink {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.15s ease;
}

body.login-modern-body .helpLink:hover {
  opacity: 1;
}

body.login-modern-body .helpLink img {
  display: block;
  width: 16px;
  height: 16px;
}

/* Standalone helpLink emitted at body level (not inside a row/popup) is
 * an anchor for Help.init() — keep it in the DOM but hide visually. */
body.login-modern-body > .helpLink,
body.login-modern-body > script + .helpLink {
  display: none !important;
}

/* Hide legacy "noShow" helper anywhere it might leak in (e.g. badlogin
 * popup also injects <span id='loginUnsuccessful' class='helpLink noPrint'>) */
body.login-modern-body .noShow {
  display: none !important;
}

/* ---------- Footer line ---------- */
.login-modern__footer {
  width: 100%;
  padding-top: 24px;
}

.login-modern__footer p {
  margin: 0;
  text-align: center;
  font-family: var(--font-dm);
  font-size: 14px;
  font-weight: 400;
  line-height: 22px;
  letter-spacing: 0.028px;
  color: var(--color-black);
}

.login-modern__footer a {
  color: var(--color-black);
  text-decoration: none;
}

.login-modern__footer a:hover {
  text-decoration: underline;
}

.login-modern__footer a + a {
  margin-left: 4px;
}

/* ---------- Responsive ---------- */
@media (max-width: 991.98px) {
  /* Hide decorative panel; content takes full width */
  .login-modern__decor {
    display: none;
  }

  .login-modern__content {
    width: 100%;
    padding: 40px 32px 24px;
  }

  .login-modern__main {
    padding: 48px 0;
  }
}

@media (max-width: 575.98px) {
  .login-modern__content {
    padding: 24px 20px 20px;
  }

  .login-modern__brand img {
    width: 78px;
    height: auto;
  }

  .login-modern__help {
    padding: 8px 12px;
  }

  .login-modern__help span {
    /* Keep label visible on mobile (Figma still shows it) */
    display: inline;
  }

  .login-modern__main {
    padding: 32px 0;
  }

  .login-modern__title {
    font-size: 28px;
  }

  .login-modern__row {
    /* Keep one row on small screens but allow wrap if very narrow */
    flex-wrap: wrap;
    row-gap: 8px;
  }
}
