:root {
  --af-leadchip-bg:     #f8fafc;
  --af-leadchip-fg:     #374151;
  --af-leadchip-border: #e5e7eb;
}
html.dark {
  --af-leadchip-bg:     rgba(255,255,255,.06);
  --af-leadchip-fg:     #c7d2fe;
  --af-leadchip-border: rgba(255,255,255,.12);
}

html.dark body,
html.dark body.lead-page,
html.dark body.lead-edit,
html.dark #content,
html.dark #main {
  background: #0b1220 !important;
  color: #e2e8f0 !important;
}

html.dark .lead-edit fieldset.module,
html.dark .form-edit fieldset.module,
html.dark fieldset.module {
  background: #111a2e !important;
  border-color: rgba(255,255,255,.08) !important;
  box-shadow: 0 1px 2px rgba(0,0,0,.4) !important;
}
html.dark fieldset.module > h2 {
  background: #0f1729 !important;
  color: #94a3b8 !important;
  border-bottom-color: rgba(255,255,255,.08) !important;
}
html.dark fieldset.module .form-row {
  border-bottom-color: rgba(255,255,255,.06) !important;
}

html.dark [style*="background:#f8fafc"],
html.dark [style*="background: #f8fafc"],
html.dark [style*="background:#fff"],
html.dark [style*="background: #fff"],
html.dark [style*="background:#FFFFFF"],
html.dark [style*="background: #FFFFFF"],
html.dark [style*="background:#fafafa"],
html.dark [style*="background:#f9fafb"],
html.dark [style*="background-color:#f8fafc"],
html.dark [style*="background-color: #f8fafc"],
html.dark [style*="background-color:#fff"],
html.dark [style*="background-color: #fff"],
html.dark [style*="background-color:#FFFFFF"],
html.dark [style*="background-color:#f1f5f9"] {
  background: #0f1729 !important;
  background-color: #0f1729 !important;
}

html.dark [style*="background:#f1f5f9"],
html.dark [style*="background: #f1f5f9"] {
  background: #111a2e !important;
}

html.dark [style*="border:1px solid #e2e8f0"],
html.dark [style*="border: 1px solid #e2e8f0"],
html.dark [style*="border:1px solid #f1f5f9"],
html.dark [style*="border: 1px solid #f1f5f9"],
html.dark [style*="border-bottom: 1px solid #e2e8f0"],
html.dark [style*="border-bottom:1px solid #e2e8f0"],
html.dark [style*="border-top: 1px solid #e2e8f0"],
html.dark [style*="border-top:1px solid #e2e8f0"],
html.dark [style*="border-color:#e2e8f0"],
html.dark [style*="border-color: #e2e8f0"] {
  border-color: rgba(255,255,255,.10) !important;
}

html.dark [style*="color:#0f172a"],
html.dark [style*="color: #0f172a"],
html.dark [style*="color:#1e293b"],
html.dark [style*="color: #1e293b"],
html.dark [style*="color:#334155"],
html.dark [style*="color: #334155"] {
  color: #e2e8f0 !important;
}
html.dark [style*="color:#475569"],
html.dark [style*="color: #475569"],
html.dark [style*="color:#64748b"],
html.dark [style*="color: #64748b"] {
  color: #94a3b8 !important;
}

html.dark .bg-white {
  background-color: #111a2e !important;
}
html.dark .bg-slate-50,
html.dark .bg-zinc-50,
html.dark .bg-gray-50 {
  background-color: #0b1220 !important;
}
html.dark .bg-slate-100,
html.dark .bg-zinc-100,
html.dark .bg-gray-100 {
  background-color: #111a2e !important;
}
html.dark .bg-slate-200,
html.dark .bg-zinc-200 {
  background-color: #1e293b !important;
}

html.dark .bg-emerald-50, html.dark .bg-green-50  { background-color: rgba(16,185,129,.16) !important; }
html.dark .bg-rose-50,    html.dark .bg-red-50,
html.dark .bg-pink-50                              { background-color: rgba(244,63,94,.16) !important; }
html.dark .bg-amber-50,   html.dark .bg-yellow-50  { background-color: rgba(234,179,8,.16) !important; }
html.dark .bg-violet-50,  html.dark .bg-purple-50,
html.dark .bg-indigo-50                            { background-color: rgba(99,102,241,.18) !important; }
html.dark .bg-sky-50,     html.dark .bg-blue-50,
html.dark .bg-cyan-50                              { background-color: rgba(56,189,248,.16) !important; }
html.dark .bg-orange-50                            { background-color: rgba(249,115,22,.16) !important; }
html.dark .bg-teal-50                              { background-color: rgba(20,184,166,.16) !important; }

html.dark .text-emerald-700, html.dark .text-emerald-800, html.dark .text-emerald-600,
html.dark .text-green-700, html.dark .text-green-800, html.dark .text-green-600  { color: #6ee7b7 !important; }
html.dark .text-rose-700, html.dark .text-rose-800, html.dark .text-rose-600,
html.dark .text-red-700,  html.dark .text-red-800,  html.dark .text-red-600     { color: #fca5a5 !important; }
html.dark .text-amber-700, html.dark .text-amber-800, html.dark .text-amber-600,
html.dark .text-yellow-700, html.dark .text-yellow-800, html.dark .text-yellow-600 { color: #fde68a !important; }
html.dark .text-indigo-700, html.dark .text-indigo-800, html.dark .text-indigo-600,
html.dark .text-violet-700, html.dark .text-violet-800, html.dark .text-violet-600,
html.dark .text-purple-700, html.dark .text-purple-800, html.dark .text-purple-600 { color: #c7d2fe !important; }
html.dark .text-blue-700, html.dark .text-blue-800, html.dark .text-blue-600,
html.dark .text-sky-700, html.dark .text-sky-800, html.dark .text-sky-600,
html.dark .text-cyan-700, html.dark .text-cyan-800, html.dark .text-cyan-600   { color: #93c5fd !important; }
html.dark .text-orange-700, html.dark .text-orange-800, html.dark .text-orange-600 { color: #fdba74 !important; }

html.dark .border-emerald-200, html.dark .border-green-200,
html.dark .border-emerald-100, html.dark .border-green-100   { border-color: rgba(16,185,129,.28) !important; }
html.dark .border-rose-200, html.dark .border-red-200,
html.dark .border-rose-100, html.dark .border-red-100         { border-color: rgba(244,63,94,.28) !important; }
html.dark .border-amber-200, html.dark .border-yellow-200,
html.dark .border-amber-100, html.dark .border-yellow-100     { border-color: rgba(234,179,8,.28) !important; }
html.dark .border-indigo-200, html.dark .border-violet-200,
html.dark .border-purple-200, html.dark .border-indigo-100,
html.dark .border-violet-100, html.dark .border-purple-100   { border-color: rgba(99,102,241,.28) !important; }
html.dark .border-blue-200, html.dark .border-sky-200, html.dark .border-cyan-200 { border-color: rgba(56,189,248,.28) !important; }

html.dark .bg-violet-100, html.dark .bg-indigo-100,
html.dark .bg-purple-100                                         { background-color: rgba(99,102,241,.22) !important; color: #c7d2fe !important; }
html.dark .bg-emerald-100, html.dark .bg-green-100              { background-color: rgba(16,185,129,.22) !important; color: #6ee7b7 !important; }
html.dark .bg-amber-100, html.dark .bg-yellow-100              { background-color: rgba(234,179,8,.22) !important; color: #fde68a !important; }
html.dark .bg-rose-100, html.dark .bg-red-100, html.dark .bg-pink-100 { background-color: rgba(244,63,94,.22) !important; color: #fca5a5 !important; }
html.dark .bg-blue-100, html.dark .bg-sky-100, html.dark .bg-cyan-100 { background-color: rgba(56,189,248,.22) !important; color: #93c5fd !important; }

html.dark .text-slate-900,
html.dark .text-zinc-900,
html.dark .text-gray-900,
html.dark .text-black {
  color: #e2e8f0 !important;
}
html.dark .text-slate-800,
html.dark .text-slate-700,
html.dark .text-zinc-800,
html.dark .text-zinc-700,
html.dark .text-gray-800,
html.dark .text-gray-700 {
  color: #cbd5e1 !important;
}
html.dark .text-slate-600,
html.dark .text-slate-500,
html.dark .text-slate-400,
html.dark .text-zinc-600,
html.dark .text-zinc-500,
html.dark .text-zinc-400,
html.dark .text-gray-600,
html.dark .text-gray-500 {
  color: #94a3b8 !important;
}

html.dark .border-slate-100,
html.dark .border-slate-200,
html.dark .border-slate-300,
html.dark .border-zinc-100,
html.dark .border-zinc-200,
html.dark .border-gray-100,
html.dark .border-gray-200 {
  border-color: rgba(255,255,255,.10) !important;
}

html.dark .shadow-sm,
html.dark .shadow,
html.dark .shadow-md,
html.dark .shadow-lg,
html.dark .shadow-xl,
html.dark .shadow-2xl {
  box-shadow: 0 4px 28px rgba(0,0,0,.55) !important;
}

html.dark hr {
  border-color: rgba(255,255,255,.08) !important;
}

html.dark table {
  color: #e2e8f0 !important;
}
html.dark thead,
html.dark thead th {
  background: #0f1729 !important;
  color: #94a3b8 !important;
  border-bottom-color: rgba(255,255,255,.08) !important;
}
html.dark tbody tr {
  background: transparent !important;
  border-color: rgba(255,255,255,.06) !important;
}
html.dark tbody tr:hover {
  background: rgba(255,255,255,.03) !important;
}
html.dark tbody tr:hover td,
html.dark tbody tr:hover th,
html.dark tbody tr:hover a {
  color: #e2e8f0 !important;
}

html.dark .rx-row:hover,
html.dark tr.rx-row:hover {
  background: rgba(255,255,255,.05) !important;
  color: #e2e8f0 !important;
}
html.dark .rx-row:hover *,
html.dark tr.rx-row:hover * {
  color: inherit !important;
}

html.dark .hover\:bg-slate-50:hover,
html.dark .hover\:bg-zinc-50:hover,
html.dark .hover\:bg-gray-50:hover {
  background-color: #1e293b !important;
  color: #e2e8f0 !important;
}
html.dark .hover\:bg-slate-100:hover,
html.dark .hover\:bg-zinc-100:hover,
html.dark .hover\:bg-gray-100:hover {
  background-color: #334155 !important;
  color: #e2e8f0 !important;
}
html.dark .hover\:bg-white:hover {
  background-color: #1e293b !important;
  color: #e2e8f0 !important;
}
html.dark .hover\:text-slate-900:hover,
html.dark .hover\:text-zinc-900:hover {
  color: #f8fafc !important;
}

body fieldset.module,
body fieldset.aligned,
body .change-form fieldset {
  overflow: hidden !important;
  min-width: 0 !important;
}

body fieldset.module .form-row,
body fieldset.aligned .form-row,
body fieldset.module .field-row,
body .change-form .form-row {
  min-width: 0 !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  word-break: break-word !important;
  overflow-wrap: anywhere !important;
}
body fieldset.module .form-row > div,
body fieldset.module .form-row > p,
body fieldset.module .form-row > .field-box {
  min-width: 0 !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

body fieldset.module input[type="text"],
body fieldset.module input[type="email"],
body fieldset.module input[type="tel"],
body fieldset.module input[type="url"],
body fieldset.module input[type="number"],
body fieldset.module input[type="password"],
body fieldset.module input[type="search"],
body fieldset.module input[type="date"],
body fieldset.module input[type="time"],
body fieldset.module input[type="datetime-local"],
body fieldset.module input[type="month"],
body fieldset.module input[type="week"],
body fieldset.module input[type="color"],
body fieldset.module input:not([type]),
body fieldset.module select,
body fieldset.module textarea,
body fieldset.module .vTextField,
body fieldset.module .vURLField,
body fieldset.module .vEmailField,
body fieldset.module .vIntegerField,
body fieldset.module .vBigIntegerField,
body fieldset.module .vFloatField,
body fieldset.module .vDateField,
body fieldset.module .vTimeField,
body fieldset.module .vDateTimeField,
body fieldset.module .vUUIDField,
body fieldset.module .vSlugField,
body fieldset.module .vForeignKeyRawIdAdminField {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
}

body fieldset.module p.readonly,
body fieldset.module div.readonly,
body fieldset.module .readonly,
body fieldset.module .field-box .readonly {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
  word-break: break-word !important;
  overflow-wrap: anywhere !important;
  white-space: normal !important;
}

body fieldset.module .form-row a,
body fieldset.module .form-row code,
body fieldset.module .form-row .token,
body fieldset.module .form-row .field-box > a {
  display: inline-block;
  max-width: 100% !important;
  word-break: break-all !important;
  overflow-wrap: anywhere !important;
}

body fieldset.module .select2,
body fieldset.module .select2-container,
body fieldset.module .select2-container--default {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

body fieldset.module .selector,
body fieldset.module .selector-available,
body fieldset.module .selector-chosen {
  max-width: 100% !important;
  box-sizing: border-box !important;
}

body fieldset.module .tox.tox-tinymce,
body fieldset.module trix-editor,
body fieldset.module .ProseMirror {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

html.dark .health-card,
html.dark .health-card.bg-white,
html.dark .panel,
html.dark .stat-card,
html.dark .metric-card,
html.dark .info-card {
  background: #111a2e !important;
  border-color: rgba(255,255,255,.10) !important;
  color: #e2e8f0 !important;
}

html.dark .lead-id,
html.dark .lead-pk,
html.dark .lead-uuid,
html.dark code.lead-id,
html.dark a.lead-link {
  color: #cbd5e1 !important;
}
html.dark a.lead-link:hover {
  color: #f8fafc !important;
}

html.dark .funnel-card,
html.dark .delivery-card,
html.dark .funnel-row,
html.dark .delivery-row,
html.dark [data-block="funnel"],
html.dark [data-block="delivery"] {
  background: #111a2e !important;
  border-color: rgba(255,255,255,.10) !important;
  color: #e2e8f0 !important;
}
html.dark .funnel-bar,
html.dark .delivery-bar {
  background: #1e293b !important;
}
html.dark .funnel-bar > span,
html.dark .delivery-bar > span {
  background: #6366f1 !important;
}

html.dark .user-agent,
html.dark pre.user-agent,
html.dark .rendered-html,
html.dark .rendered-body,
html.dark .crm-message,
html.dark .json-viewer,
html.dark .pre-block,
html.dark .text-block,
html.dark pre {
  background: #0b1220 !important;
  color: #e2e8f0 !important;
  border-color: rgba(255,255,255,.10) !important;
}
html.dark .preview-card,
html.dark .preview-html,
html.dark [data-preview="html"] {
  background: #111a2e !important;
  color: #e2e8f0 !important;
}
html.dark .preview-html a { color: #93c5fd !important; }

html.dark .partial-answers-card,
html.dark .answer-row,
html.dark .question-row,
html.dark .session-card {
  background: #111a2e !important;
  border-color: rgba(255,255,255,.10) !important;
  color: #e2e8f0 !important;
}

html.dark .json-viewer {
  background: #0b1220 !important;
  color: #e2e8f0 !important;
  border: 1px solid rgba(255,255,255,.08) !important;
}

html.dark .lead-edit input[type="text"],
html.dark .lead-edit input[type="email"],
html.dark .lead-edit input[type="tel"],
html.dark .lead-edit input[type="number"],
html.dark .lead-edit input[type="url"],
html.dark .lead-edit input[type="date"],
html.dark .form-edit input[type="text"],
html.dark .form-edit input[type="email"] {
  background: #0b1220 !important;
  color: #e2e8f0 !important;
  border-color: rgba(255,255,255,.14) !important;
}

.rx-edit fieldset.module .form-row input[type="text"],
.rx-edit fieldset.module .form-row input[type="email"],
.rx-edit fieldset.module .form-row input[type="tel"],
.rx-edit fieldset.module .form-row input[type="number"],
.rx-edit fieldset.module .form-row input[type="url"],
.rx-edit fieldset.module .form-row input[type="date"],
.rx-edit fieldset.module .form-row input[type="time"],
.rx-edit fieldset.module .form-row input[type="datetime-local"],
.rx-edit fieldset.module .form-row input[type="password"],
.rx-edit fieldset.module .form-row input:not([type]),
.rx-edit fieldset.module .form-row select,
.rx-edit fieldset.module .form-row textarea,
.rx-edit fieldset.module .form-row .select2-container,
.lead-edit fieldset.module .form-row input[type="text"],
.lead-edit fieldset.module .form-row input[type="email"],
.lead-edit fieldset.module .form-row input[type="tel"],
.lead-edit fieldset.module .form-row input[type="number"],
.lead-edit fieldset.module .form-row input[type="url"],
.lead-edit fieldset.module .form-row input[type="date"],
.lead-edit fieldset.module .form-row input[type="time"],
.lead-edit fieldset.module .form-row input[type="datetime-local"],
.lead-edit fieldset.module .form-row input[type="password"],
.lead-edit fieldset.module .form-row select,
.lead-edit fieldset.module .form-row textarea,
.lead-edit fieldset.module .form-row .select2-container {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}
.rx-edit fieldset.module .form-row .readonly,
.lead-edit fieldset.module .form-row .readonly {
  display: inline-block !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  word-break: break-word !important;
}
html.dark .rx-edit fieldset.module .form-row .readonly,
html.dark .lead-edit fieldset.module .form-row .readonly {
  color: #e2e8f0 !important;
}

html.dark [style*="background:#ecfdf5"] { background: rgba(16,185,129,.18) !important; color: #6ee7b7 !important; }
html.dark [style*="background:#fef3c7"] { background: rgba(234,179,8,.18)  !important; color: #fde68a !important; }
html.dark [style*="background:#fef2f2"] { background: rgba(239,68,68,.18)  !important; color: #fca5a5 !important; }
html.dark [style*="background:#eef2ff"] { background: rgba(99,102,241,.18) !important; color: #c7d2fe !important; }

html.dark a.btn,
html.dark button.btn,
html.dark .btn-secondary,
html.dark a.ghost-btn,
html.dark button.ghost-btn {
  border-color: rgba(255,255,255,.14) !important;
  color: #e2e8f0 !important;
  background: transparent !important;
}
html.dark a.btn:hover,
html.dark button.btn:hover,
html.dark .btn-secondary:hover,
html.dark a.ghost-btn:hover,
html.dark button.ghost-btn:hover {
  background: rgba(255,255,255,.06) !important;
}
