:root {
  --auth-primary: #155dfc;
  --auth-primary-dark: #1d4ed8;
  --auth-surface: #ffffff;
  --auth-border: #dbe3f0;
  --auth-text: #0f172a;
  --auth-muted: #64748b;
  --auth-bg: linear-gradient(135deg, #dbeafe 0%, #eff6ff 45%, #f8fafc 100%);
}
body.leadgen-app[data-theme="dark"] .auth-form .form-check-input[type=checkbox],
body.auth-page[data-theme="dark"] .auth-form .form-check-input[type=checkbox],
body.marketing-home[data-theme="dark"] .auth-page-modal-shell .auth-form .form-check-input[type=checkbox] {
  border-radius: .25em;
  background-color: #000;
  border-color: #3b4a67;
}
body.leadgen-app[data-theme="dark"] .auth-form .form-check-input[type=checkbox]:checked,
body.auth-page[data-theme="dark"] .auth-form .form-check-input[type=checkbox]:checked,
body.marketing-home[data-theme="dark"] .auth-page-modal-shell .auth-form .form-check-input[type=checkbox]:checked {
  background-color: #2563eb;
  border-color: #2563eb;
}
body.leadgen-app:not([data-theme="dark"]) .auth-form .form-check-input[type=checkbox],
body.auth-page:not([data-theme="dark"]) .auth-form .form-check-input[type=checkbox],
body.marketing-home:not([data-theme="dark"]) .auth-page-modal-shell .auth-form .form-check-input[type=checkbox] {
  border-radius: .25em;
  background-color: #ffffff;
  border-color: var(--auth-border);
}
body.leadgen-app:not([data-theme="dark"]) .auth-form .form-check-input[type=checkbox]:checked,
body.auth-page:not([data-theme="dark"]) .auth-form .form-check-input[type=checkbox]:checked,
body.marketing-home:not([data-theme="dark"]) .auth-page-modal-shell .auth-form .form-check-input[type=checkbox]:checked {
  background-color: var(--auth-primary);
  border-color: var(--auth-primary);
}
body.leadgen-app[data-theme="dark"] .modern-prospect-table .sel[type=checkbox],
body.auth-page[data-theme="dark"] .modern-prospect-table .sel[type=checkbox],
body.marketing-home[data-theme="dark"] .auth-page-modal-shell .modern-prospect-table .sel[type=checkbox] {
  border-radius: .25em;
  background-color: #000;
  border-color: #3b4a67;
}
body.auth-page {
  min-height: 100vh;
  margin: 0;
  font-family: 'Poppins', 'Segoe UI', Tahoma, sans-serif;
  background: var(--auth-bg);
  color: var(--auth-text);
}

body.auth-page.auth-page--embedded {
  min-height: auto;
  background: #ffffff;
  overflow-y: auto;
  scrollbar-width: none;
}

.auth-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.auth-shell.auth-shell--embedded {
  min-height: auto;
  padding: 0;
  overflow: hidden;
}

body.auth-page.auth-page--embedded::-webkit-scrollbar,
.auth-shell.auth-shell--embedded::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

.auth-card {
  width: min(760px, 100%);
  background: var(--auth-surface);
  color: var(--auth-text);
  border: 1px solid rgba(219, 227, 240, 0.8);
  border-radius: 24px;
  box-shadow: 0 30px 80px rgba(15, 23, 42, 0.14);
  overflow: hidden;
}

.auth-card.auth-card--embedded {
  width: 100%;
  min-height: auto;
  border: 0;
  box-shadow: none;
}

.auth-card--login-only {
  display: block;
}

.auth-card--login-only .auth-form-panel {
  padding:2rem;
}

.auth-card--wide {
  width: min(1040px, 100%);
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(350px,450px);
}

.auth-card--register {
  width: min(900px, 100%);
  overflow: visible;
}

.auth-copy {
  position: relative;
  background: linear-gradient(145deg, #1d4ed8 0%, #2563eb 60%, #3b82f6 100%);
  color: #fff;
  padding: 3rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.auth-embedded-back {
  min-height: 2.55rem;
  padding: 0.55rem 0.95rem;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius:12px;
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 650;
  letter-spacing: -0.01em;
  backdrop-filter: blur(12px);
  box-shadow: 0 14px 30px rgba(8, 17, 43, 0.18);
  cursor: pointer;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.auth-embedded-back:hover,
.auth-embedded-back:focus-visible {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.4);
  transform: translateY(-1px);
  box-shadow: 0 18px 36px rgba(8, 17, 43, 0.24);
  outline: none;
}

.auth-embedded-back-arrow {
  font-size: 1rem;
  line-height: 1;
}

.auth-copy h1 {
  font-size: clamp(2rem, 4vw, 2.5rem);
  font-weight: 650;
  margin-bottom: 0.85rem;
}

.auth-copy p {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1rem;
  margin-bottom: 1.5rem;
}

.auth-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.78rem;
  font-weight: 650;
  margin-bottom: 0rem;
  color: rgba(255, 255, 255, 0.78);
}

.auth-benefits {
  padding-left: 1.1rem;
  margin: 0;
}

.auth-benefits li {
  margin-bottom: 0.8rem;
  color: rgba(255, 255, 255, 0.92);
}

.auth-form-panel {
  background: var(--auth-surface);
  color: var(--auth-text);
  padding: 3rem;
}

.auth-form-panel--full {
  position: relative;
  background: var(--auth-surface);
  color: var(--auth-text);
  padding: 3rem;
}

.auth-card--register .auth-form-panel--full {
  padding: 2.25rem;
}

body.auth-page.auth-page--embedded .auth-form-panel--full {
  padding-top: 5rem;
}

body.auth-page.auth-page--embedded .auth-card--register .auth-form-panel--full {
  padding: 4.5rem 2.25rem 2.25rem;
}

.auth-embedded-back--panel {
  border-color: rgba(37, 99, 235, 0.14);
  background: rgba(37, 99, 235, 0.06);
  color: #1d4ed8;
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.12);
}

.auth-embedded-back--panel:hover,
.auth-embedded-back--panel:focus-visible {
  background: rgba(37, 99, 235, 0.1);
  border-color: rgba(37, 99, 235, 0.24);
  box-shadow: 0 16px 32px rgba(37, 99, 235, 0.16);
}

.auth-form-header h1,
.auth-form-header h2 {
  font-size: 1.85rem;
  font-weight: 650;
  margin-bottom: 1rem;
}

.auth-form-header p {
  color: var(--auth-muted);
  margin-bottom: 1.5rem;
  font-size: 0.875rem;
}

.auth-inline-message {
  margin-bottom: 1rem;
  padding: 0.95rem 1rem;
  border-radius: 14px;
  font-size: 0.98rem;
  line-height: 1.5;
}

.auth-inline-message--session {
  background: linear-gradient(180deg, #f4f8ff 0%, #eaf2ff 100%);
  border: 1px solid #c7d8ff;
  color: #31558f;
}

.auth-form .form-label {
  font-weight: 500;
  margin-bottom: 0.45rem;
  font-size: 0.875rem;
  color:#101828;
}

.auth-form .form-control {
  min-height: 48px;
  border-radius: 12px;
  border: 1px solid var(--auth-border);
  padding: 0.75rem 0.95rem;
  box-shadow: none;
  background:#fbf9fa;
}

.auth-form .form-control:focus {
  border-color: rgba(37, 99, 235, 0.55);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.14);
  background: transparent;
}

.auth-form .input-group .form-control {
  border-right: 0;
}

.auth-form .input-group .btn-outline-secondary {
  min-height: 48px;
  border-color: var(--auth-border);
  color: var(--auth-muted);
  background: #fff;
  border-top-right-radius: 12px;
  border-bottom-right-radius: 12px;
}

.auth-form .input-group .btn-outline-secondary:hover,
.auth-form .input-group .btn-outline-secondary:focus,
.auth-form .input-group .btn-outline-secondary:active {
  border-color: rgba(37, 99, 235, 0.55);
  color: var(--auth-primary);
  background: #fff;
  box-shadow: none;
}

.auth-form-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.auth-link {
  color: var(--auth-primary);
  font-weight: 600;
  text-decoration: none;
  font-size: 0.875rem;
}

/* .auth-link:hover {
  text-decoration: underline;
} */
.form-control::placeholder {
  font-size: 14px;
}
.password-guidance,.sa-password-guidance {
  display: none;
  margin-top: 6px;
}
.password-guidance,.sa-password-guidance {
  position: absolute;
  top: calc(100% - 22px);
  left: 0;
  right: 0;
  z-index: 200;
  background: #fff;
  border: 1px solid #dee2e6;
  border-radius: 6px;
  padding: 10px 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  font-size: 0.8rem;
}

.password-guidance.is-visible,.sa-password-guidance.is-visible {
  display: block;
}

.strength-wrap {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 6px;
  margin-bottom: 8px;
}

.strength-seg {
  flex: 1;
  height: 4px;
  border-radius: 2px;
  background: #e9ecef;
  transition: background 0.3s;
}

.strength-label {
  margin-left: 4px;
  font-size: 0.75rem;
  font-weight: 500;
  white-space: nowrap;
}

.password-rules {
  display: grid;
  gap: 2px;
}

.rule-item {
  color: var(--auth-muted);
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  margin-bottom: 2px;
  transition: color 0.2s;
}

.rule-item.valid {
  color: #198754;
}

.rule-item.invalid {
  color: #64748b;
}

.rule-icon {
  display: inline-block;
  width: 14px;
  font-size: 0.75rem;
  font-weight: 400;
  text-align: center;
}

.auth-submit-btn {
  width: 100%;
  min-height: 48px;
  border-radius: 12px;
  background: var(--auth-primary);
  border-color: var(--auth-primary);
  font-weight: 600;
  font-size:0.875rem;
}

.auth-submit-btn:hover,
.auth-submit-btn:focus {
  background: var(--auth-primary-dark);
  border-color: var(--auth-primary-dark);
}

.auth-footer-text {
  margin-top: 1.25rem;
  color: var(--auth-muted);
}

.auth-footer-text a {
  color: var(--auth-primary);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  font-size:0.875rem;
}

.auth-footer-text a:hover {
  text-decoration: underline;
}

.auth-toast {
  border-radius: 14px;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.18);
}

body.auth-page[data-theme="dark"],
body.auth-page.auth-page--dark {
  --auth-surface: transparent;
  --auth-border: #6b85b5;
  --auth-text: #eaf1ff;
  --auth-muted: #b8c4d4;
  --auth-bg:
    radial-gradient(circle at top left, rgba(79, 120, 218, 0.12), transparent 30%),
    linear-gradient(180deg, #1e2b40 0%, #1d2a3d 54%, #111a2c 100%);
  background: #09101d;
}

body.auth-page[data-theme="dark"] .auth-card,
body.auth-page.auth-page--dark .auth-card,
body.marketing-home[data-theme="dark"] .auth-page-modal-shell .auth-card {
  background:
    radial-gradient(circle at top left, rgba(79, 120, 218, 0.12), transparent 30%),
    linear-gradient(180deg, #1e2b40 0%, #1d2a3d 54%, #111a2c 100%);
  border: 1px solid #6b85b5;
  color: #eaf1ff;
  box-shadow: 0 30px 74px rgba(0, 0, 0, 0.46);
}

body.auth-page[data-theme="dark"] .auth-copy,
body.auth-page[data-theme="dark"] .auth-form-panel,
body.auth-page[data-theme="dark"] .auth-form-panel--full,
body.auth-page.auth-page--dark .auth-copy,
body.auth-page.auth-page--dark .auth-form-panel,
body.auth-page.auth-page--dark .auth-form-panel--full,
body.marketing-home[data-theme="dark"] .auth-page-modal-shell .auth-copy,
body.marketing-home[data-theme="dark"] .auth-page-modal-shell .auth-form-panel,
body.marketing-home[data-theme="dark"] .auth-page-modal-shell .auth-form-panel--full {
  background: transparent;
  color: #eaf1ff;
}

body.auth-page[data-theme="dark"] .auth-copy,
body.auth-page.auth-page--dark .auth-copy,
body.marketing-home[data-theme="dark"] .auth-page-modal-shell .auth-copy {
  background: linear-gradient(120deg, #25409b 0%, #312884 100%);
  border-right: 1px solid #4a5d7a;
}

body.auth-page[data-theme="dark"] .auth-form-header h1,
body.auth-page[data-theme="dark"] .auth-form-header h2,
body.auth-page[data-theme="dark"] .auth-form .form-label,
body.auth-page[data-theme="dark"] .form-check-label,
body.auth-page.auth-page--dark .auth-form-header h1,
body.auth-page.auth-page--dark .auth-form-header h2,
body.auth-page.auth-page--dark .auth-form .form-label,
body.auth-page.auth-page--dark .form-check-label,
body.marketing-home[data-theme="dark"] .auth-page-modal-shell .auth-form-header h1,
body.marketing-home[data-theme="dark"] .auth-page-modal-shell .auth-form-header h2,
body.marketing-home[data-theme="dark"] .auth-page-modal-shell .auth-form .form-label,
body.marketing-home[data-theme="dark"] .auth-page-modal-shell .form-check-label {
  color: #f4f7ff;
}

body.auth-page[data-theme="dark"] .auth-form-header p,
body.auth-page[data-theme="dark"] .auth-footer-text,
body.auth-page[data-theme="dark"] .auth-copy p,
body.auth-page[data-theme="dark"] .auth-benefits li,
body.auth-page.auth-page--dark .auth-form-header p,
body.auth-page.auth-page--dark .auth-footer-text,
body.auth-page.auth-page--dark .auth-copy p,
body.auth-page.auth-page--dark .auth-benefits li,
body.marketing-home[data-theme="dark"] .auth-page-modal-shell .auth-form-header p,
body.marketing-home[data-theme="dark"] .auth-page-modal-shell .auth-footer-text,
body.marketing-home[data-theme="dark"] .auth-page-modal-shell .auth-copy p,
body.marketing-home[data-theme="dark"] .auth-page-modal-shell .auth-benefits li {
  color: #b8c4d4;
}

body.auth-page[data-theme="dark"] .auth-form .form-control,
body.auth-page[data-theme="dark"] .auth-form .input-group .btn-outline-secondary,
body.auth-page.auth-page--dark .auth-form .form-control,
body.auth-page.auth-page--dark .auth-form .input-group .btn-outline-secondary,
body.marketing-home[data-theme="dark"] .auth-page-modal-shell .auth-form .form-control,
body.marketing-home[data-theme="dark"] .auth-page-modal-shell .auth-form .input-group .btn-outline-secondary {
  background: #34455f !important;
  border-color: #6b85b5 !important;
  color: #f2f6ff !important;
  box-shadow: none !important;
}

body.auth-page[data-theme="dark"] .auth-form .form-control::placeholder,
body.auth-page.auth-page--dark .auth-form .form-control::placeholder,
body.marketing-home[data-theme="dark"] .auth-page-modal-shell .auth-form .form-control::placeholder {
  color: #b7c4d7 !important;
  opacity: 1;
}

body.auth-page[data-theme="dark"] .auth-form .form-control:focus,
body.auth-page.auth-page--dark .auth-form .form-control:focus,
body.marketing-home[data-theme="dark"] .auth-page-modal-shell .auth-form .form-control:focus {
  border-color: #7f9cf5 !important;
  box-shadow: 0 0 0 4px rgba(91, 110, 245, 0.22) !important;
}

body.auth-page[data-theme="dark"] .auth-form .form-control:-webkit-autofill,
body.auth-page[data-theme="dark"] .auth-form .form-control:-webkit-autofill:hover,
body.auth-page[data-theme="dark"] .auth-form .form-control:-webkit-autofill:focus,
body.auth-page.auth-page--dark .auth-form .form-control:-webkit-autofill,
body.auth-page.auth-page--dark .auth-form .form-control:-webkit-autofill:hover,
body.auth-page.auth-page--dark .auth-form .form-control:-webkit-autofill:focus,
body.marketing-home[data-theme="dark"] .auth-page-modal-shell .auth-form .form-control:-webkit-autofill,
body.marketing-home[data-theme="dark"] .auth-page-modal-shell .auth-form .form-control:-webkit-autofill:hover,
body.marketing-home[data-theme="dark"] .auth-page-modal-shell .auth-form .form-control:-webkit-autofill:focus {
  -webkit-text-fill-color: #f2f6ff !important;
  caret-color: #f2f6ff;
  box-shadow: 0 0 0 1000px #000 inset !important;
  transition: background-color 9999s ease-out, color 9999s ease-out;
}

body.auth-page[data-theme="dark"] .auth-password-toggle,
body.auth-page.auth-page--dark .auth-password-toggle,
body.marketing-home[data-theme="dark"] .auth-page-modal-shell .auth-password-toggle {
  color: #c7d2e8;
}

body.auth-page[data-theme="dark"] .auth-embedded-back--panel,
body.auth-page.auth-page--dark .auth-embedded-back--panel,
body.marketing-home[data-theme="dark"] .auth-page-modal-shell .auth-embedded-back--panel {
  background:#000;
  border: 1px solid #6b85b5;
  color: #f2f6ff;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.22);
}

body.auth-page[data-theme="dark"] .password-guidance,
body.auth-page[data-theme="dark"] .sa-password-guidance,
body.auth-page.auth-page--dark .password-guidance,
body.auth-page.auth-page--dark .sa-password-guidance,
body.marketing-home[data-theme="dark"] .auth-page-modal-shell .password-guidance,
body.marketing-home[data-theme="dark"] .auth-page-modal-shell .sa-password-guidance {
  background: #1c2942;
  border-color: #3b4a67;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.35);
}

body.auth-page[data-theme="dark"] .strength-seg,
body.auth-page.auth-page--dark .strength-seg,
body.marketing-home[data-theme="dark"] .auth-page-modal-shell .strength-seg {
  background: #3b4a67;
}

body.auth-page[data-theme="dark"] .rule-item.invalid,
body.auth-page.auth-page--dark .rule-item.invalid,
body.marketing-home[data-theme="dark"] .auth-page-modal-shell .rule-item.invalid {
  color: #8da2c3;
}

body.auth-page[data-theme="dark"] .rule-item.valid,
body.auth-page.auth-page--dark .rule-item.valid,
body.marketing-home[data-theme="dark"] .auth-page-modal-shell .rule-item.valid {
  color: #4ade80;
}

body.auth-page[data-theme="dark"] .otp-panel,
body.auth-page.auth-page--dark .otp-panel,
body.marketing-home[data-theme="dark"] .auth-page-modal-shell .otp-panel {
  background: rgba(52, 69, 95, 0.58);
  border-color: #6b85b5;
  box-shadow: none;
}

@media (max-width: 900px) {
  .auth-card--wide {
    grid-template-columns: 1fr;
  }

  .auth-copy,
  .auth-form-panel,
  .auth-form-panel--full {
    padding: 2rem;
  }

  .auth-card--register {
    width: min(760px, 100%);
  }

  .auth-card--register .auth-form-panel--full {
    padding: 2rem;
  }

  body.auth-page.auth-page--embedded .auth-form-panel--full {
    padding-top: 4.5rem;
  }

  body.auth-page.auth-page--embedded .auth-card--register .auth-form-panel--full {
    padding: 4.25rem 2rem 2rem;
  }

  .auth-copy {
    padding-top: 4.8rem;
  }

  .auth-embedded-back {
    top: 1rem;
    left: 1rem;
    min-height: 2.35rem;
    padding: 0.5rem 0.82rem;
    font-size: 0.88rem;
  }

  body.auth-page[data-theme="dark"] .auth-copy,
  body.auth-page.auth-page--dark .auth-copy,
  body.marketing-home[data-theme="dark"] .auth-page-modal-shell .auth-copy {
    border-right: 0;
    border-bottom: 1px solid #4a5d7a;
  }
}
