/**
 * Auth experience — forest green frame, orange gradient sheet, white wave hero, glass form card.
 * Desktop: split panel (image or gradient fallback) | form. Theme: APP_THEME_PRIMARY / APP_AUTH_PAGE_BG.
 * body.auth-mobile-premium + $authMobileHero in form_popup.php
 */

/* Kill design-system .form-page flex center + .form-popup-overlay max-width:420px (breaks desktop split) */
html:has(body.form-page.auth-mobile-premium:not(.page-privacy-policy)) {
  height: auto;
  min-height: 100%;
  overflow-x: hidden;
}

/* :has() fallback — same intent when unsupported */
body.form-page.auth-mobile-premium:not(.page-privacy-policy) {
  display: block;
  padding: 0;
  align-items: initial;
  justify-content: initial;
  background: var(--auth-page-bg, #2d3328);
  min-height: 100vh;
  min-height: 100dvh;
  min-height: -webkit-fill-available;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
}

body.auth-mobile-premium:not(.page-privacy-policy) .form-popup-overlay {
  max-width: none !important;
  width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

/* OTP toggle — readable on orange (not orange-on-orange) */
body.auth-mobile-premium:not(.page-privacy-policy) .auth-link-otp {
  display: inline-block;
  margin-top: 6px;
  padding: 10px 18px;
  border-radius: 999px;
  font-weight: 800 !important;
  font-size: 0.8125rem !important;
  line-height: 1.3 !important;
  color: #0f172a !important;
  background: rgba(255, 255, 255, 0.96) !important;
  border: 1px solid rgba(15, 23, 42, 0.1);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
  text-decoration: none !important;
}

body.auth-mobile-premium:not(.page-privacy-policy) .auth-link-otp:hover {
  background: #fff !important;
}

/* Footer links under form — high contrast on orange / dark */
body.auth-mobile-premium:not(.page-privacy-policy) .form-popup .form-footer {
  color: rgba(255, 255, 255, 0.95) !important;
}

body.auth-mobile-premium:not(.page-privacy-policy) .form-popup .form-footer a {
  color: #fff !important;
  font-weight: 800 !important;
  text-decoration: underline !important;
  text-underline-offset: 3px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}

/* Privacy Policy link in checkbox row */
body.auth-mobile-premium:not(.page-privacy-policy) .auth-privacy-text a {
  color: #fff !important;
  font-weight: 800 !important;
  text-decoration: underline !important;
  text-underline-offset: 3px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
}

/* App-style Sign up / Login (hero top-right) — pill button, always readable */
.auth-xp-topbar-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  min-height: 44px;
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-decoration: none !important;
  color: var(--primary) !important;
  background: #fff;
  border: 2px solid rgba(250, 88, 7, 0.2);
  box-shadow:
    0 4px 16px rgba(0, 0, 0, 0.08),
    0 0 0 1px rgba(250, 88, 7, 0.08);
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}

.auth-xp-topbar-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(250, 88, 7, 0.22);
}

/* Login gateway — role row text + links (desktop + mobile; fixes black text on dark) */
body.page-login-gateway.auth-mobile-premium .login-gateway-title,
body.page-login-gateway.auth-mobile-premium .login-gateway-card,
body.page-login-gateway.auth-mobile-premium .login-gateway-card:visited {
  color: #fff !important;
}

body.page-login-gateway.auth-mobile-premium .login-gateway-card:hover {
  background: rgba(255, 255, 255, 0.12) !important;
  border-color: rgba(255, 255, 255, 0.22) !important;
}

body.page-login-gateway.auth-mobile-premium .login-gateway-footer {
  padding-bottom: max(20px, env(safe-area-inset-bottom, 0px));
}

body.page-login-gateway.auth-mobile-premium .login-gateway-register {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 0.9375rem;
  color: var(--primary) !important;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.2);
  text-decoration: none !important;
}

body.page-login-gateway.auth-mobile-premium .login-gateway-register:hover {
  background: #fff !important;
}

body.page-login-gateway.auth-mobile-premium .login-gateway-register-more {
  color: rgba(255, 255, 255, 0.85) !important;
}

body.page-login-gateway.auth-mobile-premium .login-gateway-register-more a {
  color: #fff !important;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Social row on dark auth — icons visible */
body.auth-mobile-premium:not(.page-privacy-policy) .auth-social-label {
  color: rgba(255, 255, 255, 0.55) !important;
}

body.auth-mobile-premium:not(.page-privacy-policy) .auth-social-btn {
  background: rgba(255, 255, 255, 0.1) !important;
  color: #fff !important;
  border: 1px solid rgba(255, 255, 255, 0.14);
}

body.auth-mobile-premium:not(.page-privacy-policy) .auth-social-btn:hover {
  background: rgba(255, 255, 255, 0.2) !important;
  color: #fff !important;
  border-color: rgba(255, 255, 255, 0.25);
}

/* ----- Privacy policy: full-width desktop, app-style mobile ----- */
body.page-privacy-policy {
  background: #e4e6ed;
}

body.page-privacy-policy .form-popup-overlay {
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 16px;
  max-width: none !important;
  width: 100% !important;
  margin: 0 auto !important;
  background: linear-gradient(180deg, #eef2f7 0%, #e4e6ed 100%);
}

body.page-privacy-policy .form-popup {
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  background: #fff;
  border-radius: 20px;
  box-shadow:
    0 4px 6px rgba(15, 23, 42, 0.04),
    0 24px 48px rgba(15, 23, 42, 0.1);
  overflow: hidden;
}

body.page-privacy-policy .form-popup-inner {
  padding: 28px 24px 40px;
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-gutter: stable;
}

body.page-privacy-policy .form-brand {
  margin-bottom: 12px;
}

body.page-privacy-policy .form-brand-logo {
  color: var(--primary) !important;
  font-size: 1.25rem !important;
  font-weight: 800;
  letter-spacing: -0.03em;
}

body.page-privacy-policy .form-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fff !important;
  color: var(--gray-700) !important;
  border: 1px solid var(--gray-200) !important;
  border-radius: 999px;
  padding: 10px 18px;
  font-weight: 600;
  font-size: 0.875rem;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
  margin-bottom: 20px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

body.page-privacy-policy .form-back:hover {
  border-color: rgb(var(--primary-rgb, 250 88 7) / 0.35);
  color: var(--primary) !important;
}

body.page-privacy-policy .form-title {
  color: #0a0a0a !important;
  font-size: 1.5rem !important;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 12px;
}

body.page-privacy-policy .auth-legal-prose {
  color: var(--gray-700);
}

@media (min-width: 768px) {
  body.page-privacy-policy .form-popup-overlay {
    padding: 0;
    align-items: stretch;
    min-height: 100vh;
    max-height: none;
  }

  body.page-privacy-policy .form-popup {
    max-width: none;
    width: 100%;
    min-height: 100vh;
    border-radius: 0;
    box-shadow: none;
  }

  body.page-privacy-policy .form-popup-inner {
    max-width: 920px;
    margin: 0 auto;
    padding: calc(40px + env(safe-area-inset-top, 0px)) 48px 72px;
    max-height: none;
    min-height: 100vh;
  }

  body.page-privacy-policy .form-title {
    font-size: 2rem !important;
    margin-bottom: 20px !important;
  }
}

@media (max-width: 767px) {
  body.page-privacy-policy .form-popup {
    max-width: 100%;
    min-height: calc(100dvh - 24px);
    border-radius: 18px;
  }

  body.page-privacy-policy .form-popup-inner {
    padding: calc(28px + env(safe-area-inset-top, 0px)) 20px 32px;
  }
}

/* ----- Premium auth: app-style mobile (green frame + orange sheet + glass) ----- */
@media (max-width: 767px) {
  /* design-system .form-popup-inner max-height — let page/body scroll so short phones never clip */
  body.auth-mobile-premium:not(.page-privacy-policy) .form-popup .form-popup-inner {
    max-height: none !important;
    overflow: visible !important;
  }

  .auth-split-pane--visual {
    display: none !important;
  }

  body.form-page.auth-mobile-premium:not(.page-privacy-policy) {
    overflow-x: hidden;
    overscroll-behavior-x: none;
    background: var(--auth-page-bg, #2d3328);
  }

  body.auth-mobile-premium:not(.page-privacy-policy) .form-popup-overlay {
    align-items: flex-start;
    justify-content: flex-start;
    padding: 0;
    padding-top: max(12px, env(safe-area-inset-top, 0px));
    width: 100%;
    max-width: 100%;
    min-height: 100dvh;
    min-height: 100svh;
    min-height: 100vh;
    max-height: none;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior-y: contain;
    -webkit-overflow-scrolling: touch;
    background: var(--auth-page-bg, #2d3328);
  }

  body.auth-mobile-premium:not(.page-privacy-policy) .form-popup {
    width: 100%;
    max-width: 100%;
    min-height: min-content;
    margin: 0;
    border-radius: 0;
    box-shadow: none;
    background: linear-gradient(180deg, #f97316 0%, #ea580c 38%, #c2410c 100%);
    overflow: visible;
  }

  body.auth-mobile-premium:not(.page-privacy-policy) .form-popup .form-popup-inner {
    padding: 0;
    padding-bottom: max(28px, calc(12px + env(safe-area-inset-bottom, 0px)));
    max-height: none !important;
    min-height: 0;
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    overflow: visible !important;
  }

  /* White wave hero — safe top inset + breathing room (short phones) */
  body.auth-mobile-premium:not(.page-privacy-policy) .auth-mobile-hero {
    flex-shrink: 0;
    position: relative;
    padding: calc(28px + env(safe-area-inset-top, 0px)) 20px 48px;
    background: #ffffff;
    border-radius: 0 0 0 0;
    clip-path: ellipse(130% 100% at 50% 0%);
    animation: auth-xp-wave-in 0.65s cubic-bezier(0.22, 1, 0.36, 1) both;
  }

  @keyframes auth-xp-wave-in {
    from {
      opacity: 0.92;
      transform: translateY(-12px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  .auth-xp-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
  }

  .auth-xp-topbar-brand {
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #0a0a0a !important;
    text-decoration: none;
  }

  .auth-xp-topbar-cta {
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--primary) !important;
    text-decoration: none;
  }

  .auth-xp-eyebrow {
    margin: 0 0 6px;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--gray-500);
    text-align: center;
  }

  body.auth-mobile-premium:not(.page-privacy-policy) .auth-xp-title {
    margin: 0;
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1.1;
    color: #0a0a0a;
    text-align: center;
  }

  body.auth-mobile-premium:not(.page-privacy-policy) .auth-mobile-hero-line {
    margin: 10px 0 0;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--gray-600);
    text-align: center;
    line-height: 1.4;
  }

  body.auth-mobile-premium:not(.page-privacy-policy) .auth-mobile-hero-line--gateway {
    font-size: 1.125rem;
    font-weight: 700;
    color: #111827;
    max-width: 280px;
    margin-left: auto;
    margin-right: auto;
  }

  body.auth-mobile-premium:not(.page-privacy-policy) .auth-mobile-card {
    margin: -42px 0 0;
    padding: 22px 18px calc(28px + env(safe-area-inset-bottom, 0px));
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 0;
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.22);
    box-shadow: none;
    flex: 1 1 auto;
    min-height: 0;
    max-height: none;
    overflow: visible;
    animation: auth-xp-card-in 0.5s ease 0.1s both;
  }

  @keyframes auth-xp-card-in {
    from {
      opacity: 0;
      transform: translateY(16px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  body.auth-mobile-premium:not(.page-privacy-policy) .form-brand {
    text-align: center;
    margin-bottom: 10px;
  }

  body.auth-mobile-premium:not(.page-privacy-policy) .form-brand-logo {
    font-size: 0.9375rem;
    font-weight: 800;
    color: var(--primary);
  }

  body.auth-mobile-premium:not(.page-privacy-policy) .form-brand-tag {
    display: none;
  }

  body.auth-mobile-premium:not(.page-privacy-policy) .form-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8125rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.75);
    margin-bottom: 14px;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-decoration: none;
  }

  body.auth-mobile-premium:not(.page-privacy-policy) .form-title {
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: #fff;
    margin-bottom: 6px;
  }

  body.auth-mobile-premium:not(.page-privacy-policy) .form-subtitle {
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.875rem;
  }

  body.auth-mobile-premium:not(.page-privacy-policy) .form-group {
    margin-bottom: 18px;
  }

  body.auth-mobile-premium:not(.page-privacy-policy) .form-group .label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.55);
    margin-bottom: 10px;
    text-transform: capitalize;
    letter-spacing: 0.03em;
    text-align: center;
  }

  body.auth-mobile-premium:not(.page-privacy-policy) .input {
    border-radius: 50px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    padding: 16px 20px;
    font-size: 0.9375rem;
    background: #ffffff !important;
    color: #111827 !important;
    text-align: center;
    transition: border-color 0.2s, box-shadow 0.2s;
  }

  body.auth-mobile-premium:not(.page-privacy-policy) .input::placeholder {
    color: rgba(0, 0, 0, 0.38);
  }

  body.auth-mobile-premium:not(.page-privacy-policy) .input:focus {
    outline: none;
    border-color: rgb(var(--primary-rgb, 250 88 7) / 0.55);
    box-shadow: 0 0 0 3px rgb(var(--primary-rgb, 250 88 7) / 0.2);
    background: #fff !important;
  }

  body.auth-mobile-premium:not(.page-privacy-policy) .input-password-wrap {
    border-radius: 50px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    background: #fff;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  }

  body.auth-mobile-premium:not(.page-privacy-policy) .input-password-wrap .input {
    text-align: left;
    border-radius: 0;
    border: none !important;
    box-shadow: none !important;
  }

  body.auth-mobile-premium:not(.page-privacy-policy) .input-password-wrap:focus-within {
    border-color: rgb(var(--primary-rgb, 250 88 7) / 0.45);
    box-shadow: 0 0 0 3px rgb(var(--primary-rgb, 250 88 7) / 0.15);
  }

  body.auth-mobile-premium:not(.page-privacy-policy) .input-password-toggle--eye {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 48px;
    padding: 0 12px;
    border: none;
    background: transparent;
    cursor: pointer;
    color: var(--primary);
  }

  body.auth-mobile-premium:not(.page-privacy-policy) .input-password-toggle--eye:hover {
    color: var(--primary-dark);
  }

  body.auth-mobile-premium:not(.page-privacy-policy) .input-password-toggle--eye:focus {
    outline: none;
  }

  body.auth-mobile-premium:not(.page-privacy-policy) .input-password-toggle--eye .input-password-toggle__ico svg {
    display: block;
  }

  /* Gradient border primary button */
  body.auth-mobile-premium:not(.page-privacy-policy) form .btn-primary,
  body.auth-mobile-premium:not(.page-privacy-policy) .reg-wizard-actions .btn-primary {
    width: 100%;
    margin-top: 8px;
    padding: 16px 24px;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    color: #fff;
    border: 2px solid transparent;
    background:
      linear-gradient(#0a0a0a, #0a0a0a) padding-box,
      linear-gradient(135deg, #a855f7 0%, var(--primary) 50%, #f97316 100%) border-box;
    box-shadow: 0 8px 28px rgb(var(--primary-rgb, 250 88 7) / 0.25);
    transition: transform 0.15s ease, box-shadow 0.2s ease, opacity 0.2s ease;
  }

  body.auth-mobile-premium:not(.page-privacy-policy) form .btn-primary:hover:not(:disabled),
  body.auth-mobile-premium:not(.page-privacy-policy) .reg-wizard-actions .btn-primary:hover:not(:disabled) {
    box-shadow: 0 12px 32px rgb(var(--primary-rgb, 250 88 7) / 0.35);
  }

  body.auth-mobile-premium:not(.page-privacy-policy) .btn-primary:disabled,
  body.auth-mobile-premium:not(.page-privacy-policy) .btn-auth-gated:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
  }

  body.auth-mobile-premium:not(.page-privacy-policy) .btn.btn-secondary {
    border-radius: 50px;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.12);
  }

  .auth-privacy-row {
    margin: 14px 0 18px;
  }

  .auth-privacy-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.8125rem;
    line-height: 1.45;
    color: rgba(255, 255, 255, 0.92);
    cursor: pointer;
  }

  body.page-privacy-policy .auth-privacy-label {
    color: var(--gray-600);
  }

  .auth-privacy-checkbox {
    margin-top: 2px;
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
    flex-shrink: 0;
  }

  .auth-privacy-text a {
    color: #fff !important;
    font-weight: 800;
    text-decoration: underline !important;
    text-underline-offset: 3px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
  }

  .auth-social-footer {
    margin-top: 24px;
    margin-bottom: 4px;
    padding-top: 20px;
    padding-bottom: max(12px, env(safe-area-inset-bottom, 0px));
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    text-align: center;
  }

  body.page-privacy-policy .auth-social-footer {
    border-top-color: var(--gray-200);
  }

  .auth-social-label {
    margin: 0 0 14px;
    font-size: 0.75rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.4);
  }

  body.page-privacy-policy .auth-social-label {
    color: var(--gray-500);
  }

  .auth-social-icons {
    display: flex;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
  }

  .auth-social-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #252528;
    color: #fff;
    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
  }

  body.page-privacy-policy .auth-social-btn {
    background: var(--gray-100);
    color: var(--gray-700);
  }

  .auth-social-btn:hover {
    background: #2e2e32;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
  }

  body.page-privacy-policy .auth-social-btn:hover {
    background: rgb(var(--primary-rgb, 250 88 7) / 0.12);
    color: var(--primary);
  }

  .auth-legal-prose {
    font-size: 0.875rem;
    line-height: 1.6;
    color: var(--gray-700);
  }

  .auth-legal-lead {
    margin: 0 0 16px;
    font-size: 0.9375rem;
    color: var(--gray-600);
  }

  .auth-legal-h2 {
    margin: 20px 0 8px;
    font-size: 0.9375rem;
    font-weight: 800;
    color: var(--gray-900);
  }

  .auth-legal-prose p {
    margin: 0 0 10px;
  }

  body.auth-mobile-premium:not(.page-privacy-policy) .form-footer {
    text-align: center;
    margin-top: 20px;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.45);
  }

  body.auth-mobile-premium:not(.page-privacy-policy) .form-footer a {
    font-weight: 700;
    color: var(--primary);
  }

  body.auth-mobile-premium:not(.page-privacy-policy) .form-error {
    border-radius: 14px;
    margin-bottom: 12px;
    font-size: 0.8125rem;
    background: rgba(220, 38, 38, 0.15);
    border: 1px solid rgba(220, 38, 38, 0.35);
    color: #fecaca;
  }

  body.auth-mobile-premium:not(.page-privacy-policy) .reg-wizard-steps {
    justify-content: center;
    margin-bottom: 14px !important;
    gap: 8px !important;
  }

  body.auth-mobile-premium:not(.page-privacy-policy) .reg-wizard-steps span[style*='border-radius:50%'] {
    width: 32px !important;
    height: 32px !important;
    font-size: 0.6875rem !important;
    font-weight: 800 !important;
  }

  body.auth-mobile-premium:not(.page-privacy-policy) .reg-wizard-actions {
    flex-direction: column;
    gap: 10px !important;
  }

  body.auth-mobile-premium:not(.page-privacy-policy) .reg-wizard-actions .btn {
    width: 100%;
    border-radius: 50px;
    padding: 14px;
    font-weight: 800;
  }

  body.auth-mobile-premium:not(.page-privacy-policy) .btn.btn-ghost {
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.85);
    background: transparent;
  }

  body.auth-mobile-premium:not(.page-privacy-policy) .text-sm.text-gray-500,
  body.auth-mobile-premium:not(.page-privacy-policy) p.text-sm {
    font-size: 0.75rem !important;
    line-height: 1.45;
    color: rgba(255, 255, 255, 0.45) !important;
  }

  /* Login gateway cards on dark */
  body.page-login-gateway.auth-mobile-premium .login-gateway-footer {
    position: relative;
    z-index: 4;
    padding-top: 8px;
  }

  body.page-login-gateway.auth-mobile-premium .login-gateway-register-more {
    margin: 12px 0 0;
    font-size: 0.8125rem;
    line-height: 1.55;
  }

  @keyframes login-gateway-card-in {
    from {
      opacity: 0;
      transform: translateY(14px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  body.page-login-gateway.auth-mobile-premium .login-gateway-card {
    animation: login-gateway-card-in 0.45s cubic-bezier(0.22, 1, 0.36, 1) backwards;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    background: rgba(255, 255, 255, 0.04) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    backdrop-filter: blur(10px);
  }

  body.page-login-gateway.auth-mobile-premium .login-gateway-card:nth-child(1) {
    animation-delay: 0.06s;
  }

  body.page-login-gateway.auth-mobile-premium .login-gateway-card:nth-child(2) {
    animation-delay: 0.12s;
  }

  body.page-login-gateway.auth-mobile-premium .login-gateway-card:nth-child(3) {
    animation-delay: 0.18s;
  }

  body.page-login-gateway.auth-mobile-premium .login-gateway-title {
    color: #fff !important;
  }

  body.page-login-gateway.auth-mobile-premium .login-gateway-desc {
    color: rgba(255, 255, 255, 0.45) !important;
  }
}

/* ----- Desktop: full-height split (image | form) or centered card ----- */
@media (min-width: 768px) {
  body.auth-mobile-premium:not(.page-privacy-policy) {
    background: var(--auth-page-bg, #2d3328);
  }

  body.auth-mobile-premium:not(.page-privacy-policy) .form-popup-overlay {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    justify-content: center;
    min-height: 100vh;
    min-height: 100dvh;
    max-height: none;
    padding: 0;
    overflow-x: hidden;
    overflow-y: auto;
    background: linear-gradient(100deg, var(--auth-page-bg, #2d3328) 0%, #0f0f10 45%, #0a0a0a 100%);
  }

  body.auth-mobile-premium:not(.page-privacy-policy) .form-popup-overlay--split .auth-split-pane--visual {
    display: block !important;
    flex: 1 1 50%;
    min-width: min(420px, 42vw);
    min-height: 100vh;
    min-height: 100dvh;
    position: relative;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: #1a1a1e;
  }

  /* No JPG yet: branded gradient + subtle pattern (desktop web) */
  .auth-split-pane--fallback {
    background-image: none !important;
    background: radial-gradient(ellipse 90% 70% at 75% 15%, rgba(255, 255, 255, 0.14) 0%, transparent 48%),
      radial-gradient(circle at 15% 75%, rgba(251, 191, 36, 0.4) 0%, transparent 40%),
      linear-gradient(148deg, #7c2d12 0%, #ea580c 35%, #f59e0b 68%, #fbbf24 100%) !important;
  }

  .auth-split-pane--fallback::after {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0.35;
    pointer-events: none;
    background: url("data:image/svg+xml,%3Csvg width='72' height='72' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23ffffff' fill-opacity='0.06'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/svg%3E");
  }

  body.auth-mobile-premium:not(.page-privacy-policy) .form-popup-overlay--split {
    justify-content: flex-start;
    padding: 0;
  }

  body.auth-mobile-premium:not(.page-privacy-policy) .form-popup-overlay--split .form-popup {
    flex: 1 1 50%;
    min-width: min(360px, 92vw);
    width: auto;
    max-width: min(560px, 50vw);
    min-height: 100vh;
    min-height: 100dvh;
    max-height: none;
    margin: 0;
    border-radius: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow:
      -20px 0 60px rgba(0, 0, 0, 0.5),
      0 0 0 1px rgba(255, 255, 255, 0.07);
    background: linear-gradient(180deg, #121214 0%, #080809 55%, #050505 100%);
  }

  body.auth-mobile-premium:not(.page-privacy-policy) .form-popup-overlay--split .form-popup .form-popup-inner {
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
    max-height: none;
    padding: 0;
  }

  body.auth-mobile-premium:not(.page-privacy-policy) .form-popup-overlay:not(.form-popup-overlay--split) {
    align-items: center;
    padding: 40px 24px;
    overflow-y: auto;
    max-height: none;
    min-height: 100vh;
  }

  body.auth-mobile-premium:not(.page-privacy-policy) .form-popup-overlay:not(.form-popup-overlay--split) .form-popup {
    width: 100%;
    max-width: 440px;
    border-radius: 28px;
    min-height: auto;
    max-height: calc(100vh - 80px);
    overflow: hidden;
    display: block;
    box-shadow:
      0 0 0 1px rgba(255, 255, 255, 0.06),
      0 32px 64px rgba(0, 0, 0, 0.55);
    background: #050505;
  }

  body.auth-mobile-premium:not(.page-privacy-policy) .form-popup-overlay:not(.form-popup-overlay--split) .form-popup .form-popup-inner {
    max-height: calc(100vh - 80px);
    overflow-y: auto;
    padding: 0;
  }

  body.auth-mobile-premium:not(.page-privacy-policy) .auth-mobile-hero {
    clip-path: ellipse(120% 100% at 50% 0%);
    padding: calc(28px + env(safe-area-inset-top, 0px)) 32px 52px;
    background: #fff;
  }

  body.auth-mobile-premium:not(.page-privacy-policy) .auth-mobile-card {
    margin: -40px 0 0;
    padding: 22px 32px 44px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0 0 20px 20px;
  }

  body.auth-mobile-premium:not(.page-privacy-policy) .form-popup-overlay--split .auth-mobile-card {
    padding-bottom: max(44px, env(safe-area-inset-bottom));
  }

  body.page-login-gateway.auth-mobile-premium .auth-mobile-card {
    padding-top: 28px;
  }

  body.page-login-gateway.auth-mobile-premium .form-back {
    margin-bottom: 20px;
  }

  body.auth-mobile-premium:not(.page-privacy-policy) .auth-xp-title {
    font-size: 2.25rem;
  }

  /* Desktop: same white pill fields + eye toggle as mobile */
  body.auth-mobile-premium:not(.page-privacy-policy) .form-group .label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.55);
    margin-bottom: 10px;
    text-transform: capitalize;
    letter-spacing: 0.03em;
    text-align: center;
  }

  body.auth-mobile-premium:not(.page-privacy-policy) .input {
    border-radius: 50px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    padding: 16px 20px;
    font-size: 0.9375rem;
    background: #ffffff !important;
    color: #111827 !important;
    text-align: center;
    transition: border-color 0.2s, box-shadow 0.2s;
  }

  body.auth-mobile-premium:not(.page-privacy-policy) .input::placeholder {
    color: rgba(0, 0, 0, 0.38);
  }

  body.auth-mobile-premium:not(.page-privacy-policy) .input:focus {
    outline: none;
    border-color: rgb(var(--primary-rgb, 250 88 7) / 0.55);
    box-shadow: 0 0 0 3px rgb(var(--primary-rgb, 250 88 7) / 0.2);
    background: #fff !important;
  }

  body.auth-mobile-premium:not(.page-privacy-policy) .input-password-wrap {
    position: relative;
    border-radius: 50px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    background: #fff;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  }

  body.auth-mobile-premium:not(.page-privacy-policy) .input-password-wrap .input {
    text-align: left;
    border-radius: 0;
    border: none !important;
    box-shadow: none !important;
    padding-right: 52px;
  }

  body.auth-mobile-premium:not(.page-privacy-policy) .input-password-wrap:focus-within {
    border-color: rgb(var(--primary-rgb, 250 88 7) / 0.45);
    box-shadow: 0 0 0 3px rgb(var(--primary-rgb, 250 88 7) / 0.15);
  }

  body.auth-mobile-premium:not(.page-privacy-policy) .input-password-toggle--eye {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    padding: 0;
    border: none;
    background: transparent;
    cursor: pointer;
    color: var(--primary);
  }

  body.auth-mobile-premium:not(.page-privacy-policy) .input-password-toggle--eye:hover {
    color: var(--primary-dark);
  }

  body.auth-mobile-premium:not(.page-privacy-policy) .input-password-toggle--eye .input-password-toggle__ico svg {
    display: block;
  }

  body.page-login-gateway.auth-mobile-premium .form-popup-overlay--split .form-popup {
    max-width: min(560px, 52vw);
    background: linear-gradient(180deg, #131316 0%, #0b0b0d 45%, #050506 100%);
  }

  /* Gateway desktop: no white “wave” strip — one dark panel, readable hierarchy */
  body.page-login-gateway.auth-mobile-premium .auth-mobile-hero {
    clip-path: none !important;
    background: transparent !important;
    padding: 24px 28px 8px !important;
  }

  body.page-login-gateway.auth-mobile-premium .auth-xp-topbar-brand {
    color: #fff !important;
  }

  body.page-login-gateway.auth-mobile-premium .auth-mobile-hero-line--gateway {
    color: rgba(255, 255, 255, 0.92) !important;
    font-size: 1.35rem !important;
    font-weight: 700;
    max-width: none !important;
  }

  body.page-login-gateway.auth-mobile-premium .auth-mobile-card {
    margin-top: 0 !important;
    padding-top: 4px !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
  }

  body.page-login-gateway.auth-mobile-premium .login-gateway-cards {
    margin-top: 8px;
  }
}

/* ----- Login gateway: layout + chevron (works with mobile-app-pages) ----- */
.page-login-gateway .login-gateway-cards {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 8px;
}

body.page-login-gateway.auth-mobile-premium .login-gateway-cards {
  margin-top: 18px;
}

.page-login-gateway .login-gateway-card {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 14px;
  padding: 16px;
  min-height: 72px;
  border-radius: 18px;
  text-decoration: none;
  color: inherit;
  position: relative;
}

.page-login-gateway .login-gateway-badge {
  display: none;
}

.page-login-gateway .login-gateway-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  margin: 0;
  border-radius: 16px;
  flex-shrink: 0;
}

.page-login-gateway .login-gateway-icon svg {
  width: 26px;
  height: 26px;
}

.page-login-gateway .login-gateway-title {
  font-size: 1.05rem;
  font-weight: 800;
  margin: 0;
  flex: 1;
  min-width: 0;
}

.page-login-gateway .login-gateway-desc {
  display: none;
}

.page-login-gateway .login-gateway-card::after {
  content: '';
  width: 8px;
  height: 8px;
  border-right: 2px solid rgba(255, 255, 255, 0.35);
  border-bottom: 2px solid rgba(255, 255, 255, 0.35);
  transform: rotate(-45deg);
  flex-shrink: 0;
  opacity: 0.8;
}

body.page-login-gateway.auth-mobile-premium .form-title {
  color: #fff !important;
}

body.page-login-gateway.auth-mobile-premium .form-back {
  background: rgba(255, 255, 255, 0.06) !important;
  color: rgba(255, 255, 255, 0.8) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
}

.page-login-gateway .login-gateway-card--customer .login-gateway-icon {
  background: rgb(var(--primary-rgb, 250 88 7) / 0.28);
  color: #ffedd5;
}

.page-login-gateway .login-gateway-card--vendor .login-gateway-icon {
  background: rgba(34, 197, 94, 0.28);
  color: #bbf7d0;
}

.page-login-gateway .login-gateway-card--technician .login-gateway-icon {
  background: rgba(59, 130, 246, 0.28);
  color: #93c5fd;
}

body.page-login-gateway.auth-mobile-premium .login-gateway-icon {
  border: 1px solid rgba(255, 255, 255, 0.14);
}
