/* ============================================================
   SaudiOne Login Page
   ============================================================ */

/* Prevent horizontal scrollbar on auth pages */
html:has(.so-login-page),
body:has(.so-login-page) {
  overflow-x: hidden;
}

/* Simplified header on auth pages — no main nav */
.so-header--auth .so-header__inner {
  justify-content: space-between;
}
.so-header--auth .so-nav {
  display: none;
}
.so-header--auth .so-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Full-page layout */
.so-login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 8rem);
  padding: 2rem 1rem;
  background:
    radial-gradient(ellipse at 30% 20%, rgba(8,127,114, 0.06) 0%, transparent 50%),
    radial-gradient(ellipse at 70% 80%, rgba(255,114,94, 0.04) 0%, transparent 50%),
    var(--so-body-bg, #f8f9fa);
}

.so-login-wrapper {
  width: 100%;
  max-width: 28rem;
}
/* Messages sit above the card: exactly the card's width and edges (the shared
   .lb-ui-alerts is page-wide and centred, which left it narrower and offset). */
.so-login-wrapper > .lb-ui-alerts {
  inline-size: auto;
  margin-inline: 0;
  margin-block: 0 var(--lb-ui-space-4, 1rem);
}

/* ---- Card ---- */
.so-login-card {
  background: var(--lbayk-theme-surface, #fff);
  border-radius: var(--so-radius-lg, 0.75rem);
  box-shadow:
    0 1px 3px rgba(0, 0, 0, 0.06),
    0 8px 32px rgba(0, 0, 0, 0.08);
  padding: 2.5rem 2rem 2rem;
  border: 1px solid rgba(0, 0, 0, 0.06);
}

/* ---- Brand header ---- */
.so-login-card__header {
  text-align: center;
  margin-bottom: 2rem;
}
.so-login-card__logo {
  display: inline-block;
  margin-bottom: 0.75rem;
  border: 0;
  outline: 0;
  box-shadow: none;
  background: transparent;
}
.so-login-card__logo svg { display: block; border: 0; box-shadow: none; }
.so-login-card__title {
  font-size: 1.75rem;
  font-weight: 800;
  font-family: var(--so-font-heading);
  letter-spacing: -0.02em;
  margin: 0 0 0.25rem;
  line-height: 1.2;
}
.so-login-card__brand-saudi {
  color: var(--so-primary, #087F72);
}
.so-login-card__brand-one {
  color: var(--so-secondary, #FF725E);
}
.so-login-card__subtitle {
  font-size: 0.875rem;
  color: var(--so-stone, #6b7280);
  margin: 0;
}

/* ---- Drupal login form styling ---- */
.so-login-card__form .form-item {
  margin-bottom: 1rem;
}
.so-login-card__form .form-item label {
  display: block;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--so-charcoal, #374151);
  margin-bottom: 0.375rem;
}
.so-login-card__form .form-item .form-text,
.so-login-card__form .form-item .form-email,
.so-login-card__form .form-item input[type="text"],
.so-login-card__form .form-item input[type="password"] {
  width: 100%;
  padding: 0.625rem 0.875rem;
  min-block-size: var(--lb-ui-control-h, 48px);
  font-size: var(--lb-ui-text-md, 1rem);
  font-family: inherit;
  color: var(--so-charcoal, #374151);
  background: var(--so-cloud, #f9fafb);
  border: 1.5px solid var(--so-ash, #d1d5db);
  border-radius: var(--so-radius-md, 0.5rem);
  transition: border-color 0.15s, box-shadow 0.15s;
  box-sizing: border-box;
}
.so-login-card__form .form-item input:focus {
  outline: none;
  border-color: var(--so-primary, #087F72);
  box-shadow: 0 0 0 3px rgba(8,127,114, 0.1);
}

.so-login-card__form .form-item .description {
  font-size: var(--lb-ui-text-sm, 0.875rem);
  line-height: 1.6;
  color: var(--lb-ui-text-muted, #5f6b66);
  margin-top: 0.25rem;
}

.so-login-card__form .form-actions {
  margin-top: 1.25rem;
}
.so-login-card__form .form-actions .form-submit,
.so-login-card__form .form-actions input[type="submit"] {
  width: 100%;
  min-block-size: var(--lb-ui-control-h, 48px);
  padding: 0.6875rem 1.5rem;
  font-size: var(--lb-ui-text-md, 1rem);
  font-weight: 600;
  font-family: inherit;
  color: #fff;
  background: var(--so-primary, #087F72);
  border: none;
  border-radius: var(--so-radius-md, 0.5rem);
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
}
.so-login-card__form .form-actions .form-submit:hover,
.so-login-card__form .form-actions input[type="submit"]:hover {
  background: var(--so-primary-dark, #06584f);
}
.so-login-card__form .form-actions .form-submit:active,
.so-login-card__form .form-actions input[type="submit"]:active {
  transform: scale(0.98);
}
.so-login-card__form .form-actions .form-submit:focus-visible,
.so-login-card__form .form-actions input[type="submit"]:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(8,127,114, 0.25);
}

/* Hide unwanted elements on login form */
.so-login-card__form .item-list,
.so-login-card__form h1 {
  display: none;
}

/* ---- Forgot password ---- */
.so-login-card__forgot {
  text-align: end;
  margin-top: -0.5rem;
  margin-bottom: 1.25rem;
}
.so-login-card__forgot a {
  font-size: var(--lb-ui-text-sm, 0.875rem);
  color: var(--so-primary, #087F72);
  text-decoration: none;
  font-weight: 500;
}
.so-login-card__forgot a:hover {
  text-decoration: underline;
}

/* ---- Divider ---- */
.so-login-card__divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1.5rem 0;
}
.so-login-card__divider::before,
.so-login-card__divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--so-ash, #e5e7eb);
}
.so-login-card__divider span {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--so-stone, #9ca3af);
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ---- Social auth buttons ---- */
.so-login-card__social {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

.so-login-social {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
  padding: 0.625rem 1rem;
  font-size: 0.8125rem;
  font-weight: 600;
  font-family: inherit;
  text-decoration: none;
  border-radius: var(--so-radius-md, 0.5rem);
  border: 1.5px solid;
  cursor: pointer;
  transition: all 0.15s;
  line-height: 1;
}
.so-login-social:active {
  transform: scale(0.98);
}
.so-login-social:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.1);
}

.so-login-social__icon {
  flex-shrink: 0;
}

/* Google */
.so-login-social--google {
  color: var(--lbayk-dk-ink, #374151);
  background: var(--lbayk-theme-surface, #fff);
  border-color: var(--lbayk-dk-line, #d1d5db);
}
.so-login-social--google:hover {
  background: var(--lbayk-dk-raised, #f9fafb);
  border-color: #9ca3af;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

/* Facebook */
.so-login-social--facebook {
  color: #fff;
  background: #1877F2;
  border-color: #1877F2;
}
.so-login-social--facebook:hover {
  background: #166fe5;
  border-color: #166fe5;
  box-shadow: 0 2px 8px rgba(24, 119, 242, 0.3);
}

/* Apple */
.so-login-social--apple {
  color: #fff;
  background: #000;
  border-color: #000;
}
.so-login-social--apple:hover {
  background: #1a1a1a;
  border-color: #333;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

/* Nafath (Saudi National Digital ID) */
.so-login-social--nafath {
  color: #fff;
  background: #2D6936;
  border-color: #2D6936;
}
.so-login-social--nafath:hover {
  background: #245a2d;
  border-color: #245a2d;
  box-shadow: 0 2px 8px rgba(45, 105, 54, 0.3);
}

/* ---- Register link ---- */
.so-login-card__register {
  text-align: center;
  margin-top: 1.5rem;
  font-size: var(--lb-ui-text-sm, 0.875rem);
  color: var(--so-stone, #6b7280);
}
.so-login-card__register a {
  color: var(--so-primary, #087F72);
  font-weight: 600;
  text-decoration: none;
  margin-inline-start: 0.25rem;
}
.so-login-card__register a:hover {
  text-decoration: underline;
}

/* ---- Login footer ---- */
.so-login-footer {
  text-align: center;
  padding: 1.5rem 1rem;
  font-size: var(--lb-ui-text-xs, 0.8125rem);
  color: var(--so-stone, #6b7280);
}

/* ---- RTL Support ---- */
.so-login-card__form .form-item label {
  text-align: start;
}
[dir="rtl"] .so-login-social {
  flex-direction: row-reverse;
}

/* ---- Responsive ---- */
@media (max-width: 480px) {
  .so-login-page {
    padding: 1rem 0.75rem;
    min-height: calc(100vh - 6rem);
  }
  .so-login-card {
    padding: 2rem 1.25rem 1.5rem;
  }
  .so-login-card__header {
    margin-bottom: 1.5rem;
  }
  .so-login-card__title {
    font-size: 1.5rem;
  }
}

/* ---- Dark mode follows the global website preference ---- */
html[data-theme="dark"] .so-login-page {
    background:
      radial-gradient(ellipse at 30% 20%, rgba(8,127,114, 0.08) 0%, transparent 50%),
      radial-gradient(ellipse at 70% 80%, rgba(255,114,94, 0.05) 0%, transparent 50%),
      #0f1729;
  }
html[data-theme="dark"] .so-login-card {
    background: #1a2332;
    border-color: rgba(255, 255, 255, 0.06);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  }
html[data-theme="dark"] .so-login-card__subtitle {
    color: rgba(255, 255, 255, 0.5);
  }
html[data-theme="dark"] .so-login-card__form .form-item label {
    color: rgba(255, 255, 255, 0.8);
  }
html[data-theme="dark"] .so-login-card__form .form-item input[type="text"],
  html[data-theme="dark"] .so-login-card__form .form-item input[type="password"] {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.9);
  }
html[data-theme="dark"] .so-login-card__form .form-item input:focus {
    border-color: var(--so-primary, #10A899);
    box-shadow: 0 0 0 3px rgba(16,168,153, 0.15);
  }
html[data-theme="dark"] .so-login-card__divider::before,
  html[data-theme="dark"] .so-login-card__divider::after {
    background: rgba(255, 255, 255, 0.1);
  }
html[data-theme="dark"] .so-login-card__divider span {
    color: rgba(255, 255, 255, 0.4);
  }
html[data-theme="dark"] .so-login-card__register {
    color: rgba(255, 255, 255, 0.5);
  }
html[data-theme="dark"] .so-login-card__register a {
    color: var(--so-primary-light, #10A899);
  }
html[data-theme="dark"] .so-login-card__forgot a {
    color: var(--so-primary-light, #10A899);
  }
html[data-theme="dark"] .so-login-social--google {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.85);
  }
html[data-theme="dark"] .so-login-social--google:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
  }
html[data-theme="dark"] .so-login-footer {
    color: rgba(255, 255, 255, 0.35);
  }

/* Lbayk consumer auth: the same account signs in or registers through contrib. */
.lb-auth-header{display:flex;align-items:center;justify-content:space-between;gap:1rem;max-width:1120px;margin:auto;padding:1.1rem 1.25rem}.lb-auth-brand{font-size:1.9rem;font-weight:850;color:var(--lbayk-dk-text-teal, #087f72);text-decoration:none}.lb-auth-header .lb-auth-explore{color:var(--lbayk-dk-text-teal, #05635a);font-weight:650}.lb-auth-page{background:radial-gradient(circle at 8% 15%,#ffdfb7 0,transparent 30%),radial-gradient(circle at 90% 80%,#cdeee3 0,transparent 35%),var(--lbayk-dk-raised, #fafbf7);min-height:calc(100svh - 140px);padding:2rem 1rem}.lb-auth-symbol{display:inline-flex;align-items:center;justify-content:center;width:62px;height:62px;background:#087f72;color:#fff;border-radius:22px 22px 6px 22px;font-size:2rem;font-weight:800;margin-bottom:1rem}.lb-auth-social{display:grid;gap:.75rem;margin-top:1.5rem}.lb-auth-social .so-login-social{min-height:52px;justify-content:center;font:inherit;font-weight:700;width:100%;gap:.85rem}.lb-auth-social .so-login-social--google{border:2px solid #087f72;background:var(--lbayk-theme-surface, #fff);color:var(--lbayk-dk-ink, #162b3a)}.lb-auth-help{font-size:var(--lb-ui-text-sm,.875rem);line-height:1.7;color:var(--lbayk-dk-muted, #4b6059);margin:1rem 0}.lb-auth-fallback{margin-top:1.25rem;border-top:1px solid var(--lbayk-dk-line, #d9e5df);padding-top:1rem}.lb-auth-fallback summary{cursor:pointer;font-weight:700;color:var(--lbayk-dk-text-teal, #05635a);min-height:44px;display:list-item}.lb-auth-fallback .form-item input{min-height:48px;width:100%;font:inherit}.lb-auth-fallback input[type=submit]{min-height:48px;width:100%;background:#087f72;color:white;border-radius:10px;border:0;cursor:pointer}.lb-auth-back{text-align:center}.lb-auth-header a:focus-visible,.lb-auth-page a:focus-visible,.lb-auth-page summary:focus-visible{outline:3px solid #087f72;outline-offset:4px;border-radius:4px}.lb-auth-page .tabs,.lb-auth-page .block-local-tasks-block{display:none}@media(max-width:480px){.lb-auth-page .so-login-card{padding:1.4rem}.lb-auth-header{padding:.8rem 1rem}}

/* Auth page polish: keep the compact header from colliding on small screens and
   use the site's self-hosted Arabic typeface throughout the flow. */
.lb-auth-header {
  box-sizing: border-box;
  width: min(100%, 1120px);
  min-width: 0;
  font-family: var(--lb-font, 'IBM Plex Sans Arabic', system-ui, sans-serif);
}
.lb-auth-brand {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  min-width: 0;
  white-space: nowrap;
  line-height: 1.25;
}
.lb-auth-brand .lb-eg-brand__mark {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
}
.lb-auth-brand .lb-eg-brand__mark svg { display: block; width: 100%; height: 100%; }
.lb-auth-brand .lb-wordmark-ar { font-size: 1.7rem; }
.lb-auth-header .lb-auth-explore {
  max-width: 11rem;
  min-width: 0;
  line-height: 1.5;
  text-align: end;
  overflow-wrap: anywhere;
}
.lb-auth-header .lb-eg-lang{display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:8px 12px;border:1.5px solid var(--lbayk-dk-line, #cbd9d3);border-radius:10px;background:var(--lbayk-theme-surface, #fff);color:var(--lbayk-dk-text-teal, #075f55);font-weight:700;text-decoration:none;white-space:nowrap}
.lb-auth-page,
.lb-auth-page button,
.lb-auth-page input,
.lb-auth-page summary,
.lb-auth-page a,
.so-login-footer {
  font-family: var(--lb-font, 'IBM Plex Sans Arabic', system-ui, sans-serif);
}
.lb-auth-page .so-login-wrapper { width: min(100%, 30rem); }
.lb-auth-page .so-login-card { box-sizing: border-box; padding: clamp(1.4rem, 5vw, 2.25rem); }
.lb-auth-page .so-login-card__header { margin-bottom: 1.25rem; }
.lb-auth-page .so-login-card__title { font-size: clamp(1.45rem, 5vw, 1.8rem); line-height: 1.45; letter-spacing: 0; }
.lb-auth-page .so-login-card__subtitle,
.lb-auth-help { line-height: 1.8; }
.lb-auth-page .so-login-card__form .form-item label { line-height: 1.7; }
.lb-auth-page .so-login-card__form input { min-height: 48px; }
.lb-auth-page .lb-auth-fallback summary { line-height: 1.65; }

/* Login palette: quiet sage canvas, clear ink, and one confident Lbayk teal. */
.lb-auth-page {
  color-scheme: light;
  color: var(--lbayk-dk-ink, #162b3a);
  background: var(--lbayk-dk-raised, #f1f6f3);
}
.lb-auth-page .so-login-card {
  background: var(--lbayk-theme-surface, #fff);
  border: 1px solid var(--lbayk-dk-line, #dce8e2);
  box-shadow: 0 20px 56px rgba(22, 43, 58, 0.11);
}
.lb-auth-page .so-login-card__title { color: var(--lbayk-dk-ink, #162b3a); }
.lb-auth-page .so-login-card__subtitle,
.lb-auth-page .lb-auth-help { color: var(--lbayk-dk-muted, #526a63); }
.lb-auth-page .so-login-card__form .form-item label { color: var(--lbayk-dk-ink, #274c46); }
.lb-auth-page .so-login-card__form .form-item input {
  color: var(--lbayk-dk-ink, #162b3a);
  background: var(--lbayk-dk-raised, #fbfdfc);
  border-color: var(--lbayk-dk-line, #cbd9d3);
}
.lb-auth-page .so-login-card__form .form-item input:focus {
  border-color: #087f72;
  box-shadow: 0 0 0 3px rgba(8, 127, 114, 0.14);
}
.lb-auth-page .so-login-card__form .form-item input:focus-visible {
  outline: 2px solid #087f72;
  outline-offset: 2px;
}
.lb-auth-page .lb-auth-fallback { border-color: var(--lbayk-dk-line, #dce8e2); }
.lb-auth-page .lb-auth-fallback summary {
  color: var(--lbayk-dk-text-teal, #075f55);
  background: var(--lbayk-dk-raised, #edf6f3);
  border-radius: 10px;
  padding: 0.7rem 0.85rem;
}
.lb-auth-page .lb-auth-fallback summary:hover,
.lb-auth-page .lb-auth-fallback[open] summary { background: var(--lbayk-dk-tint-green, #e3f1ec); }
.lb-auth-page .so-login-card__forgot a,
.lb-auth-page .so-login-card__register a { color: var(--lbayk-dk-text-teal, #075f55); }
.lb-auth-page .so-login-card__register { color: var(--lbayk-dk-muted, #526a63); }

@media (max-width: 540px) {
  .lb-auth-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    gap: .5rem;
    padding: .75rem 1rem;
  }
  .lb-auth-brand { gap: .35rem; font-size: clamp(1.35rem, 6vw, 1.7rem); }
  .lb-auth-brand .lb-wordmark-ar { font-size: clamp(1.35rem, 6vw, 1.65rem); }
  .lb-auth-brand .lb-trial-badge { font-size: 12px; }
  .lb-auth-header .lb-auth-explore { max-width: 7.5rem; font-size: var(--lb-ui-text-sm, .875rem); }
  .lb-auth-header .lb-eg-lang { padding: 6px 9px; font-size: var(--lb-ui-text-sm, .875rem); }
  .lb-auth-page { min-height: calc(100svh - 90px); padding: 1.1rem .75rem 1.5rem; }
  .lb-auth-page .so-login-card { padding: 1.35rem 1rem 1.2rem; border-radius: 18px; }
  .lb-auth-page .so-login-card__header { margin-bottom: 1rem; }
  .lb-auth-page .so-login-card__subtitle { font-size: .92rem; }
  .lb-auth-page .so-login-card__social { gap: .55rem; margin-top: 1rem; }
  .lb-auth-page .so-login-card__social .so-login-social { min-height: 48px; padding: .65rem .75rem; }
  .lb-auth-page .lb-auth-fallback { margin-top: 1rem; }
  .so-login-footer { padding: 1rem .75rem; }
}

/* Quick signup: the expanded register form reads as the primary action. */
.lb-auth-fallback[open] summary{margin-bottom:.4rem}
.lb-auth-fallback .form-item{margin:0 0 1rem}
.lb-auth-fallback .form-type-password-confirm{margin:0 0 1rem}
.lb-auth-fallback .form-type-password-confirm .form-item{margin:0 0 1rem}
.lb-auth-fallback .password-strength,.lb-auth-fallback .password-confirm-feedback,.lb-auth-fallback .form-item--error-message{font-size:.85rem;margin-top:.35rem}
.lb-auth-fallback .form-item--error-message{color:var(--lbayk-dk-text-red, #b93a27);font-weight:600}
.lb-auth-fallback summary::-webkit-details-marker{color:var(--lbayk-dk-text-teal, #087f72)}
.lb-auth-fallback input[type=email]{min-height:48px}

/* Show/hide eye inside password fields (top right of the field). */
.lb-pw{display:grid;grid-template-columns:minmax(0,1fr);width:100%;min-width:0}
.lb-pw input[type="password"],.lb-pw input[type="text"]{box-sizing:border-box;display:block;grid-column:1;grid-row:1;width:100%;min-width:0;margin:0;padding-inline-start:.9rem;padding-inline-end:3.25rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.so-login-card__form .form-item .lb-pw input[type="password"],.so-login-card__form .form-item .lb-pw input[type="text"]{padding-inline-start:.9rem;padding-inline-end:3.25rem}
.lb-pw__toggle{align-self:center;display:grid;grid-column:1;grid-row:1;justify-self:end;place-items:center;width:44px;height:44px;margin-inline-end:.2rem;padding:0;border:0;border-radius:10px;background:transparent;color:var(--lbayk-dk-ink, #4b5563);cursor:pointer;z-index:1}
.lb-pw > :not(input):not(button){grid-column:1;grid-row:auto}
.lb-pw__toggle:hover{color:var(--lbayk-dk-text-teal, #087F72)}
.lb-pw__toggle:focus-visible{outline:3px solid #087F72;outline-offset:1px}

.lb-auth-validation { color: var(--lbayk-dk-text-red, #9b2525); border-inline-start: 3px solid currentColor; padding: .65rem; }
.lb-auth-page [aria-invalid="true"] { border-color: #9b2525; }
.lb-auth-page .form-item--error-message { color: var(--lbayk-dk-text-red, #9b2525); }
.lb-auth-page [hidden] { display: none !important; }
.lb-auth-symbol,
.lb-auth-symbol svg { border: 0; outline: 0; box-shadow: none; }
.lb-auth-symbol svg { display: block; background: transparent; }

/* Give the brand lockup and service-discovery link clear, separate surfaces. */
.lb-auth-header {
  background: var(--lbayk-theme-surface, #fff);
  border: 1px solid var(--lbayk-dk-line, #d5e4de);
  border-radius: 14px;
  box-shadow: 0 4px 16px rgba(22, 43, 58, .08);
  margin-block: 1rem;
}
.lb-auth-brand {
  padding: .4rem .7rem;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--lbayk-dk-ink, #162b3a);
  box-shadow: none;
}
.lb-auth-brand .lb-eg-brand__mark {
  width: 44px;
  height: 44px;
  flex-basis: 44px;
}
.lb-auth-brand .lb-wordmark-ar { color: var(--lbayk-dk-ink, #162b3a); }
.lb-auth-header .lb-auth-explore {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: .55rem .9rem;
  border: 2px solid #05635a;
  border-radius: 10px;
  background: #05635a;
  color: #fff;
  font-weight: 700;
  text-decoration: none;
}
.lb-auth-header .lb-auth-explore:hover {
  background: #044d47;
  border-color: #044d47;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.lb-auth-header .lb-auth-explore:focus-visible {
  outline: 3px solid #175cd3;
  outline-offset: 3px;
}

/* Keep the auth header in step with the global website theme. */
html[data-theme="dark"] .lb-auth-header {
    background: #162b3a;
    border-color: #294354;
    box-shadow: 0 4px 16px rgba(0, 0, 0, .24);
  }
html[data-theme="dark"] .lb-auth-header .lb-auth-brand,
  html[data-theme="dark"] .lb-auth-brand .lb-wordmark-ar {
    color: #f4f8f6;
  }
html[data-theme="dark"] .lb-auth-header .lb-eg-lang {
    background: #203b4b;
    border-color: #557264;
    color: #e8f5f0;
  }

/* Keep authentication screens on one canvas; only the form remains elevated. */
.lb-eg-main:has(.lb-auth-page) {
  background: var(--lbayk-dk-raised, #f1f6f3);
}
html:has(.lb-auth-page),
body:has(.lb-auth-page) {
  background: var(--lbayk-dk-raised, #f1f6f3);
}
.lb-auth-header {
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  margin-block: 0;
}
.lb-auth-page,
.so-login-footer {
  background: var(--lbayk-dk-raised, #f1f6f3);
}
.lb-auth-header .lb-eg-lang {
  background: transparent;
}
html[data-theme="dark"]:has(.lb-auth-page),
  html[data-theme="dark"] body:has(.lb-auth-page) {
    background: #0f1d27;
  }
html[data-theme="dark"] .lb-eg-main:has(.lb-auth-page),
  html[data-theme="dark"] .lb-auth-header,
  html[data-theme="dark"] .lb-auth-page,
  html[data-theme="dark"] .so-login-footer {
    background: #0f1d27;
  }
html[data-theme="dark"] .lb-auth-header { border: 0; box-shadow: none; }
html[data-theme="dark"] .lb-auth-header .lb-eg-lang { background: transparent; }

/* Keep the authentication card in the dark palette instead of leaving a bright
   white panel against the dark page canvas. */
html[data-theme="dark"] .lb-auth-page {
    color-scheme: dark;
  }
html[data-theme="dark"] .lb-auth-page .so-login-card {
    color: #edf5f2;
    background: #172a35;
    border-color: #314854;
    box-shadow: 0 18px 48px rgba(0, 0, 0, .32);
  }
html[data-theme="dark"] .lb-auth-page .so-login-card__title { color: #f3f8f6; }
html[data-theme="dark"] .lb-auth-page .so-login-card__subtitle,
  html[data-theme="dark"] .lb-auth-page .lb-auth-help,
  html[data-theme="dark"] .lb-auth-page .so-login-card__register { color: #b5c7c1; }
html[data-theme="dark"] .lb-auth-page .so-login-card__form .form-item label { color: #d8e6e1; }
html[data-theme="dark"] .lb-auth-page .so-login-card__form .form-item input {
    color: #f3f8f6;
    background: #203944;
    border-color: #49636d;
    color-scheme: dark;
  }
html[data-theme="dark"] .lb-auth-page .so-login-card__form .form-item input::placeholder { color: #a8bab5; }
html[data-theme="dark"] .lb-auth-page .so-login-card__form .form-item input:focus,
  html[data-theme="dark"] .lb-auth-page .so-login-card__form .form-item input:focus-visible {
    border-color: #58c8b4;
    outline-color: #58c8b4;
    box-shadow: 0 0 0 3px rgba(88, 200, 180, .2);
  }
html[data-theme="dark"] .lb-auth-page .lb-auth-fallback { border-color: #314854; }
html[data-theme="dark"] .lb-auth-page .lb-auth-fallback summary,
  html[data-theme="dark"] .lb-auth-page .lb-auth-fallback summary:hover,
  html[data-theme="dark"] .lb-auth-page .lb-auth-fallback[open] summary {
    color: #d9f5ed;
    background: #203c46;
  }
html[data-theme="dark"] .lb-auth-page .so-login-card__forgot a,
  html[data-theme="dark"] .lb-auth-page .so-login-card__register a { color: #75d8c5; }
html[data-theme="dark"] .lb-auth-page .lb-auth-social .so-login-social--google {
    color: #ecf4f1;
    background: #203944;
    border-color: #49636d;
  }

/* Links around the form are real tap targets, centred, with room between them (C22, C27). */
.lb-auth-page .so-login-card__forgot a,
.lb-auth-page .so-login-card__register a,
.lb-auth-page .lb-auth-help a { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding-inline: 6px; }
.lb-auth-page .so-login-wrapper > .lb-auth-help { display: flex; justify-content: center; margin-block: 0; text-align: center; }
.lb-auth-page .so-login-card__forgot,
.lb-auth-page .so-login-card__register { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 2px 6px; }

/* Phones (C27): the header keeps brand + language; the "explore" button would crowd the Trial badge, and the brand already leads to the service list.
   The floating display/accessibility buttons get their own room under the form instead of covering the last links. */
@media (max-width: 480px) {
  .lb-auth-header .lb-auth-explore { display: none; }
  .lb-auth-page { padding-block-end: 84px; }
}


/* ==== Auth and onboarding (brief C) ==== */
/* The arrow after "explore services" is CSS, so it mirrors in RTL. */
.lb-auth-explore__arrow { display: inline-block; inline-size: .5em; block-size: .5em; margin-inline-start: .5em; border-block-start: 2px solid currentColor; border-inline-end: 2px solid currentColor; transform: rotate(45deg); }
[dir="rtl"] .lb-auth-explore__arrow { transform: rotate(-45deg); }

/* Phones: the in-card brand mark repeats the header, so the form moves up into the first screen. */
@media (max-width: 480px) {
  .lb-auth-page .lb-auth-symbol { display: none; }
  .lb-auth-page .so-login-card__header { margin-bottom: .75rem; }
}

/* Links on tinted backgrounds use the darker teal (4.5:1 and up). */
.lb-auth-page .lb-auth-help a,
.lb-auth-page .lb-auth-consent a,
.lb-auth-page .lb-auth-sent a:not(.lb-ui-btn) { color: var(--lbayk-dk-text-teal, #05635a); text-decoration: underline; text-underline-offset: 3px; }
.lb-auth-page .lb-auth-help a:hover,
.lb-auth-page .lb-auth-consent a:hover { text-decoration-thickness: 2px; }

/* The form is a static section (no folding <details> repeating the heading). */
.lb-auth-fallback--static { margin-block-start: 1rem; }
.lb-auth-page .lb-auth-fallback--static > .lb-auth-help:first-child { margin-block-start: 0; }
.lb-auth-fallback .form-item { margin-block-end: var(--lb-ui-space-4, 1rem); }
.lb-auth-fallback input[type="text"],
.lb-auth-fallback input[type="email"],
.lb-auth-fallback input[type="password"] { font-size: var(--lb-ui-text-md, 1rem); }
.lb-auth-fallback input[type="submit"] { font-size: var(--lb-ui-text-md, 1rem); min-block-size: var(--lb-ui-control-h, 48px); }
.lb-auth-page .lb-auth-fallback input[type="submit"]:focus-visible { outline: 3px solid var(--lb-ui-focus, #175cd3); outline-offset: 3px; }
.lb-auth-page input::placeholder { color: var(--lb-ui-text-muted, #5f6b66); opacity: 1; }
.lb-auth-page .lb-auth-fallback input:placeholder-shown[name="name"] { direction: ltr; text-align: start; }

/* Provider flow: the first choice is the big button, the account form folds under "I already have an account". */
.lb-auth-choice { margin-block: var(--lb-ui-space-4, 1rem); }
.lb-auth-fallback--have-account { margin-block-start: var(--lb-ui-space-3, .75rem); border-block-start: 0; padding-block-start: 0; }
.lb-auth-page .lb-auth-fallback--have-account summary.lb-ui-btn { display: flex; list-style: none; background: var(--lb-ui-surface, #fff); padding: 0 var(--lb-ui-space-6, 1.5rem); color: var(--lb-ui-accent-text, #05635a); border-radius: var(--lb-ui-radius-control, 12px); }
.lb-auth-fallback--have-account summary::-webkit-details-marker { display: none; }
.lb-auth-fallback--have-account[open] summary { margin-block-end: var(--lb-ui-space-4, 1rem); }
.lb-auth-steps { margin-block: var(--lb-ui-space-4, 1rem); padding: var(--lb-ui-space-4, 1rem); border: 1px solid var(--lb-ui-line, #d9e5df); border-radius: var(--lb-ui-radius-control, 12px); background: var(--lb-ui-accent-soft, #e3f1ec); }
.lb-auth-steps__title { margin: 0 0 var(--lb-ui-space-2, .5rem); font-size: var(--lb-ui-text-md, 1rem); color: var(--lb-ui-ink, #162b3a); }
.lb-auth-steps__list { display: grid; gap: var(--lb-ui-space-2, .5rem); margin: 0; padding: 0; list-style: none; }
.lb-auth-steps__list li { display: flex; align-items: flex-start; gap: var(--lb-ui-space-3, .75rem); font-size: var(--lb-ui-text-sm, .875rem); line-height: 1.7; color: var(--lb-ui-text, #1a1a18); }
.lb-auth-steps__n { flex: 0 0 auto; display: inline-grid; place-items: center; inline-size: 24px; block-size: 24px; border-radius: 50%; background: var(--lb-ui-accent, #087f72); color: var(--lb-ui-accent-contrast, #fff); font-size: var(--lb-ui-text-xs, .8125rem); font-weight: 700; }

/* Reason contexts: sign-in and "create account" have the same weight. */
.lb-auth-page .lb-signin-notice { margin: 0 0 var(--lb-ui-space-4, 1rem); }
.so-login-card__register--button { display: grid; gap: var(--lb-ui-space-2, .5rem); margin-block-start: var(--lb-ui-space-4, 1rem); }
.so-login-card__register--button .lb-auth-or { color: var(--lb-ui-text-muted, #5f6b66); font-size: var(--lb-ui-text-sm, .875rem); text-align: center; }
.so-login-card__register--button a.lb-ui-btn { margin-inline-start: 0; text-decoration: none; }

/* Consent under the sign-up button. */
.lb-auth-consent { margin: var(--lb-ui-space-3, .75rem) 0 0; font-size: var(--lb-ui-text-sm, .875rem); line-height: 1.8; color: var(--lb-ui-text-muted, #5f6b66); text-align: center; }

/* Register: one rule for the password, no empty strength strip, no bare "match: no". */
/* Core shows this box with an inline "display: block" and its first line is English, so only !important hides it; the one rule is printed under the field. */
.lb-auth-page .password-suggestions { display: none !important; }
.lb-auth-page .form-type-password-confirm .password-strength { display: none; }
.lb-auth-page .form-type-password-confirm.lb-pw-has-first .password-strength { display: block; }
.lb-auth-page .password-strength__title,
.lb-auth-page .password-strength__text { font-size: var(--lb-ui-text-sm, .875rem); font-weight: 600; }
.lb-auth-page .password-confirm-message { display: none; font-size: var(--lb-ui-text-sm, .875rem); font-weight: 600; margin-block-start: var(--lb-ui-space-1, .25rem); }
.lb-auth-page .form-type-password-confirm.lb-pw-has-second .password-confirm-message { display: block; }
.lb-auth-page .password-confirm-message .ok { color: var(--lb-ui-success-fg, #0b5a3b); }
.lb-auth-page .password-confirm-message .ok::before { content: ""; display: inline-block; inline-size: .35em; block-size: .65em; margin-inline-end: .4em; border-block-end: 2px solid currentColor; border-inline-end: 2px solid currentColor; transform: rotate(45deg) translateY(-.1em); }
.lb-auth-page .password-confirm-message .error { color: var(--lb-ui-error-fg, #9b2525); }

/* The page-level message when a client check stops the form. */
.lb-auth-validation { font-size: var(--lb-ui-text-sm, .875rem); margin-block: 0 var(--lb-ui-space-3, .75rem); }

/* A password reset request: the notice and the panel stay on the page. */
.lb-auth-notices { margin-block-end: var(--lb-ui-space-4, 1rem); }
.lb-auth-notice { display: flex; align-items: flex-start; gap: var(--lb-ui-space-3, .75rem); padding: var(--lb-ui-space-4, 1rem); border: 1px solid var(--lb-ui-success-line, #9ad3b8); border-inline-start-width: 4px; border-radius: var(--lb-ui-radius-control, 12px); background: var(--lb-ui-success-bg, #e6f5ee); color: var(--lb-ui-success-fg, #0b5a3b); }
.lb-auth-notice__icon { flex: 0 0 auto; display: inline-flex; }
.lb-auth-notice__body { font-size: var(--lb-ui-text-md, 1rem); line-height: 1.8; }
.lb-auth-notice__body bdi { font-weight: 700; unicode-bidi: isolate; }
.lb-auth-sent__text { margin: 0 0 var(--lb-ui-space-3, .75rem); line-height: 1.8; }
.lb-auth-sent__tips { margin: 0 0 var(--lb-ui-space-4, 1rem); padding-inline-start: 1.25rem; font-size: var(--lb-ui-text-sm, .875rem); line-height: 1.8; color: var(--lb-ui-text-muted, #5f6b66); }
.lb-auth-sent__actions { display: grid; gap: var(--lb-ui-space-3, .75rem); }

/* Footer legal links. */
.lb-auth-legal { display: flex; justify-content: center; flex-wrap: wrap; gap: 0 var(--lb-ui-space-2, .5rem); margin-block-start: var(--lb-ui-space-1, .25rem); }
.lb-auth-legal a { display: inline-flex; align-items: center; min-block-size: 44px; padding-inline: var(--lb-ui-space-3, .75rem); color: var(--lbayk-dk-text-teal, #05635a); text-decoration: underline; text-underline-offset: 3px; }

/* Desktop: a side panel with the benefits and a trust line next to the form. */
.lb-auth-aside { display: none; }
@media (min-width: 1024px) {
  .lb-auth-page .so-login-wrapper.lb-auth-layout { width: min(100%, 62rem); max-width: 62rem; display: grid; grid-template-columns: minmax(0, 30rem) minmax(0, 1fr); gap: var(--lb-ui-space-8, 2rem); align-items: start; }
  [dir="rtl"] .lb-auth-page .so-login-wrapper.lb-auth-layout { direction: ltr; }
  [dir="rtl"] .lb-auth-page .so-login-wrapper.lb-auth-layout > .lb-auth-main,
  [dir="rtl"] .lb-auth-page .so-login-wrapper.lb-auth-layout > .lb-auth-aside { direction: rtl; }
  .lb-auth-aside { display: block; position: sticky; inset-block-start: var(--lb-ui-space-6, 1.5rem); padding: var(--lb-ui-space-6, 1.5rem); border: 1px solid var(--lb-ui-line, #d9e5df); border-radius: var(--lb-ui-radius-card, 20px); background: var(--lb-ui-surface, #fff); }
  .lb-auth-aside__title { margin: 0 0 var(--lb-ui-space-4, 1rem); font-size: var(--lb-ui-text-xl, 1.375rem); line-height: 1.5; color: var(--lb-ui-ink, #162b3a); }
  .lb-auth-aside__list { display: grid; gap: var(--lb-ui-space-3, .75rem); margin: 0 0 var(--lb-ui-space-5, 1.25rem); padding: 0; list-style: none; }
  .lb-auth-aside__list li { display: flex; align-items: center; gap: var(--lb-ui-space-3, .75rem); font-size: var(--lb-ui-text-md, 1rem); color: var(--lb-ui-text, #1a1a18); }
  .lb-auth-aside__tick { flex: 0 0 auto; display: inline-grid; place-items: center; inline-size: 24px; block-size: 24px; border-radius: 50%; background: var(--lb-ui-accent-soft, #e3f1ec); }
  .lb-auth-aside__tick::after { content: "✓"; inline-size: auto; block-size: auto; margin: 0; border: 0; transform: none; color: var(--lb-ui-accent-text, #05635a); font-size: 16px; font-weight: 800; line-height: 1; }
  .lb-auth-aside__trust { margin: 0; padding-block-start: var(--lb-ui-space-4, 1rem); border-block-start: 1px solid var(--lb-ui-line, #d9e5df); font-size: var(--lb-ui-text-sm, .875rem); line-height: 1.8; color: var(--lb-ui-text-muted, #5f6b66); }
}

/* Dark mode: theme-preference.css gives every input a dark fill and wins on specificity, which left the submit button dark on dark. */
html[data-theme="dark"] .so-login-card__form .form-actions :is(input[type="submit"], button[type="submit"]) {
  background-color: var(--lb-btn-bg, #80d9ca);
  border-color: var(--lb-btn-bg, #80d9ca);
  color: var(--lb-btn-fg, #062a26);
}
html[data-theme="dark"] .so-login-card__form .form-actions :is(input[type="submit"], button[type="submit"]):hover {
  background-color: var(--lb-btn-bg-hover, #a6e8dd);
}
