/* KulaCRM public experience — aligned with the landing page visual language.
   Applies only to public/client/document/auth screens; admin workspaces are excluded. */
:root {
  color-scheme: light;
  --kt-page-bg: #f7f8fc;
  --kt-surface: #ffffff;
  --kt-surface-soft: #f4f6fc;
  --kt-ink: #111a2d;
  --kt-muted: #65718a;
  --kt-line: #e7eaf2;
  --kt-blue: #536df5;
  --kt-cyan: #35c7c4;
  --kt-violet: #8b6cf6;
  --kt-gradient: linear-gradient(110deg, #6d83ff, #53d5d0);
  --kt-radius: 16px;
  --kt-radius-lg: 22px;
  --kt-shadow: 0 18px 55px rgba(35, 49, 87, .09);
  --kt-font: Manrope, Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
html:has(body.kt-public-theme) { background: var(--kt-page-bg); }
body.kt-public-theme {
  color: var(--kt-ink);
  background-color: var(--kt-page-bg);
  background-image:
    radial-gradient(ellipse at 75% 8%, rgba(99,120,255,.09), transparent 34%),
    radial-gradient(ellipse at 5% 42%, rgba(53,199,196,.07), transparent 32%);
  font-family: var(--kt-font);
  -webkit-font-smoothing: antialiased;
}
body.kt-public-theme :where(h1,h2,h3,h4,strong,b) { color: var(--kt-ink); }
body.kt-public-theme :where(p,small,.muted,.subtitle,.description,.hint) { color: var(--kt-muted); }
body.kt-public-theme a { color: var(--kt-blue); text-decoration-thickness: 1px; text-underline-offset: 3px; }
body.kt-public-theme a:hover { color: #3f58df; }
body.kt-public-theme :where(button,input,select,textarea) { font-family: var(--kt-font); }
body.kt-public-theme :where(input:not([type=checkbox]):not([type=radio]):not([type=hidden]),select,textarea) {
  color: var(--kt-ink);
  background: #fff;
  border: 1px solid #dfe4ef;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(25,38,70,.025);
}
body.kt-public-theme :where(input,select,textarea):focus {
  border-color: var(--kt-blue);
  outline: 0;
  box-shadow: 0 0 0 4px rgba(83,109,245,.12);
}
body.kt-public-theme :where(input,select,textarea)::placeholder { color: #98a2b5; }
body.kt-public-theme :where(button,.button,.btn,[type=submit]) {
  border-radius: 13px;
  transition: transform .2s, box-shadow .2s, border-color .2s, background .2s;
}
body.kt-public-theme :where(button[type=submit],.button-primary,.submit-btn,.btn-primary,[type=submit]) {
  color: #071326;
  background: var(--kt-gradient);
  border-color: transparent;
  box-shadow: 0 10px 26px rgba(83,109,245,.18);
  font-weight: 800;
}
body.kt-public-theme :where(button[type=submit],.button-primary,.submit-btn,.btn-primary,[type=submit]):hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 34px rgba(83,109,245,.25);
}
body.kt-public-theme :where(.card,.panel,.login-card,.signup-card,.legal-toc,.legal-requisites,.legal-index-card,.tv-card,.help-card,.auth-card) {
  border-color: var(--kt-line);
  border-radius: var(--kt-radius-lg);
  box-shadow: var(--kt-shadow);
}
body.kt-public-theme :where(.login-card,.signup-card,.tv-card,.auth-card) {
  background: rgba(255,255,255,.92);
  color: var(--kt-ink);
  backdrop-filter: blur(18px);
}
body.kt-public-theme :where(.login-title,.signup-title) :where(h1,h2) { letter-spacing: -.045em; }
body.kt-public-theme :where(.login-subtitle,.signup-title p,.field-hint,.legal-meta) { color: var(--kt-muted); }
body.kt-public-theme :where(.field label,.form-label,label) { color: #46536c; font-weight: 750; }
body.kt-public-theme :where(.legal-header,.topbar,.header,.site-header) {
  border-color: rgba(18,28,48,.08);
  background: rgba(247,248,252,.88);
  backdrop-filter: blur(18px);
}
body.kt-public-theme :where(.legal-content,.legal-page) { color: var(--kt-ink); }
body.kt-public-theme .legal-content :where(p,li) { color: #536079; }
body.kt-public-theme .legal-content :where(h1,h2,h3,strong) { color: var(--kt-ink); }
body.kt-public-theme :where(.legal-toc,.legal-requisites,.legal-index-card,.panel,.help-card) {
  background: rgba(255,255,255,.92);
}
body.kt-public-theme :where(.legal-info,.notice,.alert-info) {
  background: #eef2ff;
  border-color: #dce3fb;
  border-radius: 14px;
}
body.kt-public-theme :where(.brand,.logo,.legal-logo,.tv-logo) { color: var(--kt-ink); }
body.kt-public-theme :where(.brand-symbol,.logo__mark,.legal-logo__mark) {
  background: var(--kt-gradient);
  color: #071326;
  box-shadow: 0 7px 20px rgba(83,109,245,.18);
}
body.kt-public-theme :where(.error,.form-error,.alert-danger) {
  border-radius: 12px;
}
body.kt-public-theme :where(.footer,.legal-footer) { color: #8792a7; border-color: var(--kt-line); }
body.kt-public-theme :where(.checkbox,.plan-option) { border-radius: 14px; }
body.kt-public-theme :where(.checkbox:focus-within,.plan-option:focus-within) { outline: 3px solid rgba(53,199,196,.22); outline-offset: 2px; }
body.kt-public-theme :where(.eyebrow,.badge,.step-badge) { letter-spacing: .08em; }
body.kt-public-theme :where(.eyebrow) { color: #5367c9; }
body.kt-public-theme :where(.step-badge) { background: var(--kt-gradient); color: #071326; }
body.kt-public-theme :where(.legal-title,.signup-title h1,.login-title h1) { letter-spacing: -.045em; }
body.kt-public-theme :where(.legal-content a) { color: var(--kt-blue); border-color: rgba(83,109,245,.35); }
body.kt-public-theme :where(.legal-content a:hover) { color: #3f58df; border-color: var(--kt-blue); }
body.kt-public-theme :where(.theme-toggle) { border-color: var(--kt-line); color: var(--kt-muted); }
body.kt-public-theme :where(.theme-toggle:hover) { border-color: var(--kt-blue); color: var(--kt-blue); }
@media (max-width: 640px) {
  body.kt-public-theme :where(.login-card,.signup-card,.tv-card) { border-radius: 18px; }
  body.kt-public-theme :where(.legal-content) { padding-top: 32px; }
}

/* Optional dark appearance retains the landing page's dark navy palette. */
html[data-kt-theme="dark"] body.kt-public-theme,
body.kt-public-theme.dark,
body.kt-public-theme[data-theme="dark"] {
  color-scheme: dark;
  --kt-page-bg: #101827;
  --kt-surface: #151f31;
  --kt-surface-soft: #1c2940;
  --kt-ink: #f3f6ff;
  --kt-muted: #a4b0c5;
  --kt-line: rgba(210,222,245,.13);
  --kt-shadow: 0 20px 60px rgba(0,0,0,.24);
  background-color: var(--kt-page-bg);
  background-image: radial-gradient(ellipse at 75% 8%, rgba(99,120,255,.13), transparent 36%),
                    radial-gradient(ellipse at 5% 42%, rgba(53,199,196,.09), transparent 34%);
}
html[data-kt-theme="dark"] body.kt-public-theme :where(.login-card,.signup-card,.tv-card,.auth-card,.legal-toc,.legal-requisites,.legal-index-card,.panel,.help-card),
body.kt-public-theme.dark :where(.login-card,.signup-card,.tv-card,.auth-card,.legal-toc,.legal-requisites,.legal-index-card,.panel,.help-card),
body.kt-public-theme[data-theme="dark"] :where(.login-card,.signup-card,.tv-card,.auth-card,.legal-toc,.legal-requisites,.legal-index-card,.panel,.help-card) {
  background: rgba(21,31,49,.94);
  border-color: var(--kt-line);
  color: var(--kt-ink);
}
html[data-kt-theme="dark"] body.kt-public-theme :where(h1,h2,h3,h4,strong,b),
body.kt-public-theme.dark :where(h1,h2,h3,h4,strong,b),
body.kt-public-theme[data-theme="dark"] :where(h1,h2,h3,h4,strong,b) { color: var(--kt-ink); }
html[data-kt-theme="dark"] body.kt-public-theme :where(input,select,textarea),
body.kt-public-theme.dark :where(input,select,textarea),
body.kt-public-theme[data-theme="dark"] :where(input,select,textarea) {
  color: var(--kt-ink); background: #101827; border-color: rgba(210,222,245,.2);
}
html[data-kt-theme="dark"] body.kt-public-theme :where(.legal-content p,.legal-content li),
body.kt-public-theme.dark .legal-content :where(p,li),
body.kt-public-theme[data-theme="dark"] .legal-content :where(p,li) { color: #b3bfd2; }


/* Global accessible theme control */
.kt-theme-toggle {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 13px;
  border: 1px solid #dfe4ef;
  border-radius: 12px;
  color: #35425b;
  background: rgba(255,255,255,.88);
  box-shadow: 0 4px 14px rgba(25,38,70,.06);
  font: 750 11px/1 var(--kt-font);
  cursor: pointer;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}
.kt-theme-toggle:hover { border-color: #b8c4f4; transform: translateY(-1px); }
.kt-theme-toggle__icon { font-size: 15px; line-height: 1; }
.kt-theme-toggle:focus-visible { outline: 3px solid var(--kt-cyan); outline-offset: 3px; }
body.kt-public-theme > .kt-theme-toggle {
  position: fixed;
  z-index: 999;
  top: 16px;
  right: 18px;
}
body.kt-public-theme :where(.legal-header__nav,.header-actions,.signup-header,.topbar__right) .kt-theme-toggle {
  position: static;
}
@media (max-width: 640px) {
  .kt-theme-toggle { min-height: 36px; padding: 0 10px; font-size: 10px; }
  body.kt-public-theme > .kt-theme-toggle { top: 10px; right: 10px; }
}

/* Landing-page dark palette: retain its layout and components, switch its tokens. */
html[data-kt-theme="dark"] body:not(.kt-public-theme),
body.kt-theme-dark:not(.kt-public-theme) {
  --bg: #101827;
  --surface: #151f31;
  --ink: #f3f6ff;
  --muted: #a4b0c5;
  --line: rgba(210,222,245,.13);
  --blue: #8298ff;
  --cyan: #6be4e0;
  --dark: #0c1422;
  --dark2: #151f31;
  color-scheme: dark;
  background-color: #101827 !important;
  color: #f3f6ff !important;
}
html[data-kt-theme="dark"] body:not(.kt-public-theme):before,
body.kt-theme-dark:not(.kt-public-theme):before {
  background: radial-gradient(ellipse at 70% 0,rgba(89,110,255,.16),transparent 38%),
              radial-gradient(ellipse at 5% 42%,rgba(53,199,196,.10),transparent 34%);
}
html[data-kt-theme="dark"] body:not(.kt-public-theme) :where(.site-header.scrolled,.site-header),
body.kt-theme-dark:not(.kt-public-theme) :where(.site-header.scrolled,.site-header) {
  background: rgba(16,24,39,.88);
  border-color: rgba(210,222,245,.12);
}
html[data-kt-theme="dark"] body:not(.kt-public-theme) :where(.hero),
body.kt-theme-dark:not(.kt-public-theme) :where(.hero) {
  background: linear-gradient(180deg,#121d30 0%,#101827 100%);
}
html[data-kt-theme="dark"] body:not(.kt-public-theme) :where(.button-secondary,.product-window,.window-topbar),
body.kt-theme-dark:not(.kt-public-theme) :where(.button-secondary,.product-window,.window-topbar) {
  background: #18243a;
  border-color: rgba(210,222,245,.16);
  color: #e9efff;
}
html[data-kt-theme="dark"] body:not(.kt-public-theme) :where(.main-nav,.header-login,.hero-lead,.hero-assurance),
body.kt-theme-dark:not(.kt-public-theme) :where(.main-nav,.header-login,.hero-lead,.hero-assurance) { color: #aab7ce; }
html[data-kt-theme="dark"] body:not(.kt-public-theme) :where(.hero h1,.brand-word,.window-brand),
body.kt-theme-dark:not(.kt-public-theme) :where(.hero h1,.brand-word,.window-brand) { color: #f3f6ff; }
html[data-kt-theme="dark"] body:not(.kt-public-theme) :where(.kt-theme-toggle),
body.kt-theme-dark:not(.kt-public-theme) :where(.kt-theme-toggle) {
  color: #e9efff; background: #18243a; border-color: rgba(210,222,245,.18);
}

/* Dark theme for all non-admin public/client screens. */
html[data-kt-theme="dark"] body.kt-public-theme,
body.kt-public-theme.kt-theme-dark,
body.kt-public-theme[data-kt-theme="dark"] {
  color-scheme: dark;
  --kt-page-bg: #101827;
  --kt-surface: #151f31;
  --kt-surface-soft: #1c2940;
  --kt-ink: #f3f6ff;
  --kt-muted: #a4b0c5;
  --kt-line: rgba(210,222,245,.13);
  --kt-shadow: 0 20px 60px rgba(0,0,0,.24);
  background-color: var(--kt-page-bg) !important;
  background-image: radial-gradient(ellipse at 75% 8%, rgba(99,120,255,.13), transparent 36%),
                    radial-gradient(ellipse at 5% 42%, rgba(53,199,196,.09), transparent 34%);
  color: var(--kt-ink) !important;
}
html[data-kt-theme="dark"] body.kt-public-theme :where(h1,h2,h3,h4,strong,b,label),
body.kt-public-theme.kt-theme-dark :where(h1,h2,h3,h4,strong,b,label),
body.kt-public-theme[data-kt-theme="dark"] :where(h1,h2,h3,h4,strong,b,label) { color: var(--kt-ink); }
html[data-kt-theme="dark"] body.kt-public-theme :where(p,small,.muted,.subtitle,.description,.hint,.legal-content li,.legal-content p),
body.kt-public-theme.kt-theme-dark :where(p,small,.muted,.subtitle,.description,.hint,.legal-content li,.legal-content p),
body.kt-public-theme[data-kt-theme="dark"] :where(p,small,.muted,.subtitle,.description,.hint,.legal-content li,.legal-content p) { color: #b3bfd2; }
html[data-kt-theme="dark"] body.kt-public-theme :where(.login-card,.signup-card,.tv-card,.auth-card,.legal-toc,.legal-requisites,.legal-index-card,.panel,.help-card,.card),
body.kt-public-theme.kt-theme-dark :where(.login-card,.signup-card,.tv-card,.auth-card,.legal-toc,.legal-requisites,.legal-index-card,.panel,.help-card,.card),
body.kt-public-theme[data-kt-theme="dark"] :where(.login-card,.signup-card,.tv-card,.auth-card,.legal-toc,.legal-requisites,.legal-index-card,.panel,.help-card,.card) {
  background: rgba(21,31,49,.94) !important;
  border-color: var(--kt-line) !important;
  color: var(--kt-ink);
  box-shadow: var(--kt-shadow);
}
html[data-kt-theme="dark"] body.kt-public-theme :where(input,select,textarea),
body.kt-public-theme.kt-theme-dark :where(input,select,textarea),
body.kt-public-theme[data-kt-theme="dark"] :where(input,select,textarea) {
  color: var(--kt-ink) !important;
  background: #101827 !important;
  border-color: rgba(210,222,245,.2) !important;
}
html[data-kt-theme="dark"] body.kt-public-theme :where(.legal-header,.topbar,.header,.site-header),
body.kt-public-theme.kt-theme-dark :where(.legal-header,.topbar,.header,.site-header),
body.kt-public-theme[data-kt-theme="dark"] :where(.legal-header,.topbar,.header,.site-header) {
  background: rgba(16,24,39,.9) !important;
  border-color: var(--kt-line) !important;
}
html[data-kt-theme="dark"] body.kt-public-theme :where(.legal-title,.legal-content h1,.legal-content h2,.legal-content h3),
body.kt-public-theme.kt-theme-dark :where(.legal-title,.legal-content h1,.legal-content h2,.legal-content h3),
body.kt-public-theme[data-kt-theme="dark"] :where(.legal-title,.legal-content h1,.legal-content h2,.legal-content h3) { color: #f3f6ff !important; }
html[data-kt-theme="dark"] body.kt-public-theme :where(.kt-theme-toggle,.theme-toggle),
body.kt-public-theme.kt-theme-dark :where(.kt-theme-toggle,.theme-toggle),
body.kt-public-theme[data-kt-theme="dark"] :where(.kt-theme-toggle,.theme-toggle) {
  color: #e9efff !important;
  background: #18243a !important;
  border-color: rgba(210,222,245,.18) !important;
}


/* Stage 5: consistent theme switch and complete legal-page dark surfaces. */
body.kt-public-theme :where(.kt-theme-toggle,.theme-toggle) {
  width: auto !important;
  min-width: 42px;
  min-height: 38px !important;
  height: auto !important;
  padding: 0 13px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  border: 1px solid var(--kt-line) !important;
  border-radius: 12px !important;
  color: var(--kt-ink) !important;
  background: rgba(255,255,255,.82) !important;
  box-shadow: 0 5px 18px rgba(25,38,70,.08) !important;
  font: 750 12px/1.2 var(--kt-font, Manrope, sans-serif) !important;
  cursor: pointer;
  white-space: nowrap;
}
body.kt-public-theme :where(.kt-theme-toggle,.theme-toggle):hover {
  border-color: #8799f5 !important;
  transform: translateY(-1px);
  box-shadow: 0 9px 24px rgba(83,109,245,.15) !important;
}
.kt-theme-toggle__icon { font-size: 15px; line-height: 1; }
.kt-theme-toggle__label { display: inline; }
html[data-kt-theme="dark"] body.kt-public-theme :where(.kt-theme-toggle,.theme-toggle),
body.kt-public-theme.kt-theme-dark :where(.kt-theme-toggle,.theme-toggle),
body.kt-public-theme[data-kt-theme="dark"] :where(.kt-theme-toggle,.theme-toggle) {
  color: #edf2ff !important;
  background: #1b2940 !important;
  border-color: rgba(210,222,245,.2) !important;
  box-shadow: 0 6px 20px rgba(0,0,0,.2) !important;
}
html[data-kt-theme="dark"] body.kt-public-theme :where(.legal-info,.legal-warning,.notice,.alert-info),
body.kt-public-theme.kt-theme-dark :where(.legal-info,.legal-warning,.notice,.alert-info),
body.kt-public-theme[data-kt-theme="dark"] :where(.legal-info,.legal-warning,.notice,.alert-info) {
  color: #c5d0e3 !important;
  background: #1b2940 !important;
  border: 1px solid rgba(129,151,205,.24) !important;
  box-shadow: 0 12px 32px rgba(0,0,0,.12);
}
html[data-kt-theme="dark"] body.kt-public-theme :where(.legal-info strong,.legal-warning strong),
body.kt-public-theme.kt-theme-dark :where(.legal-info strong,.legal-warning strong),
body.kt-public-theme[data-kt-theme="dark"] :where(.legal-info strong,.legal-warning strong) {
  color: #f3f6ff !important;
}
html[data-kt-theme="dark"] body.kt-public-theme :where(.doc-card,.legal-toc a,.legal-requisites),
body.kt-public-theme.kt-theme-dark :where(.doc-card,.legal-toc a,.legal-requisites),
body.kt-public-theme[data-kt-theme="dark"] :where(.doc-card,.legal-toc a,.legal-requisites) {
  color: #edf2ff !important;
  background: rgba(21,31,49,.94) !important;
  border-color: rgba(210,222,245,.14) !important;
}
html[data-kt-theme="dark"] body.kt-public-theme :where(.doc-card__title,.doc-card__desc,.doc-section-title),
body.kt-public-theme.kt-theme-dark :where(.doc-card__title,.doc-card__desc,.doc-section-title),
body.kt-public-theme[data-kt-theme="dark"] :where(.doc-card__title,.doc-card__desc,.doc-section-title) {
  color: #c1cce0 !important;
}
html[data-kt-theme="dark"] body.kt-public-theme :where(.doc-card__title),
body.kt-public-theme.kt-theme-dark :where(.doc-card__title),
body.kt-public-theme[data-kt-theme="dark"] :where(.doc-card__title) { color: #f3f6ff !important; }
@media (max-width: 640px) {
  body.kt-public-theme :where(.kt-theme-toggle,.theme-toggle) { min-height: 36px !important; padding: 0 10px !important; font-size: 11px !important; }
}
