:root[data-theme="dark"] {
    color-scheme: dark;
    --ink: #e4eaf2;
    --muted: #9baabd;
    --line: #2c3949;
    --surface: #1b2634;
    --canvas: #111923;
    --blue-soft: #1d3557;
    --platform-ink: #e4eaf2;
    --platform-muted: #9baabd;
    --platform-border: #2c3949;
    --platform-bg: #111923;
    --landing-ink: #e4eaf2;
    --landing-muted: #9baabd;
    --landing-line: #2c3949;
    scrollbar-color: #46566b #17212d;
}

html[data-theme="dark"] body,
html[data-theme="dark"] body.platform-page {
    background: #111923;
    color: #e4eaf2;
}

html[data-theme="dark"] .app-container,
html[data-theme="dark"] .platform-main,
html[data-theme="dark"] .auth-container {
    background-color: #111923;
}

html[data-theme="dark"] .panel,
html[data-theme="dark"] [class*="-card"] {
    background-color: #1b2634;
    border-color: #2c3949;
    color: #e4eaf2;
}

html[data-theme="dark"] .topbar,
html[data-theme="dark"] .platform-topbar,
html[data-theme="dark"] .platform-footer,
html[data-theme="dark"] .panel,
html[data-theme="dark"] .stat-card,
html[data-theme="dark"] .company-card,
html[data-theme="dark"] .form-endpoint-card,
html[data-theme="dark"] .platform-panel,
html[data-theme="dark"] .platform-stats article,
html[data-theme="dark"] .platform-company-card,
html[data-theme="dark"] .platform-record-item,
html[data-theme="dark"] .platform-record-create,
html[data-theme="dark"] .platform-auth-card,
html[data-theme="dark"] .platform-record-delete-company,
html[data-theme="dark"] .platform-record-section,
html[data-theme="dark"] .platform-sidebar {
    background-color: #1b2634;
    border-color: #2c3949;
    color: #e4eaf2;
}

html[data-theme="dark"] .landing-page,
html[data-theme="dark"] .landing-how,
html[data-theme="dark"] .landing-nav,
html[data-theme="dark"] .landing-features,
html[data-theme="dark"] .landing-proof,
html[data-theme="dark"] .landing-security,
html[data-theme="dark"] .landing-footer,
html[data-theme="dark"] .landing-final-cta {
    background-color: #111923;
    color: #e4eaf2;
}

html[data-theme="dark"] .landing-proof,
html[data-theme="dark"] .landing-footer,
html[data-theme="dark"] .landing-how,
html[data-theme="dark"] .landing-final-cta {
    border-color: #2c3949;
}

html[data-theme="dark"] .docs-content,
html[data-theme="dark"] .docs-content section h2,
html[data-theme="dark"] .docs-content h1 {
    color: #e4eaf2;
}

html[data-theme="dark"] .docs-toc,
html[data-theme="dark"] .docs-callout,
html[data-theme="dark"] .code-example,
html[data-theme="dark"] .docs-bottom-cta {
    background: #1b2634;
    border-color: #354458;
    color: #d4dfeb;
}

html[data-theme="dark"] .docs-toc a,
html[data-theme="dark"] .docs-content section > p,
html[data-theme="dark"] .docs-content li,
html[data-theme="dark"] .docs-intro,
html[data-theme="dark"] .docs-bottom-cta span,
html[data-theme="dark"] .docs-callout,
html[data-theme="dark"] .docs-content b {
    color: #aab8c9;
}

html[data-theme="dark"] .docs-content code {
    background: #202c3b;
    border-color: #354458;
    color: #b9d2f2;
}

html[data-theme="dark"] .docs-callout > b,
html[data-theme="dark"] .docs-warning > b,
html[data-theme="dark"] .docs-bottom-cta b {
    color: #dce7f4;
}

html[data-theme="dark"] .landing-brand,
html[data-theme="dark"] .hero-copy h1,
html[data-theme="dark"] .landing-how h2,
html[data-theme="dark"] .landing-features h2,
html[data-theme="dark"] .landing-security h2,
html[data-theme="dark"] .landing-final-cta h2 {
    color: #e4eaf2;
}

html[data-theme="dark"] .landing-nav nav,
html[data-theme="dark"] .hero-copy > p,
html[data-theme="dark"] .hero-secondary,
html[data-theme="dark"] .hero-trust,
html[data-theme="dark"] .landing-proof > span,
html[data-theme="dark"] .landing-proof > div,
html[data-theme="dark"] .landing-how > div:first-child > .muted,
html[data-theme="dark"] .landing-features .feature-heading > p:last-child,
html[data-theme="dark"] .landing-security > div:first-child > p:last-of-type,
html[data-theme="dark"] .landing-final-cta > p,
html[data-theme="dark"] .landing-footer {
    color: #9baabd;
}

html[data-theme="dark"] .how-cards article,
html[data-theme="dark"] .feature-grid article,
html[data-theme="dark"] .security-card,
html[data-theme="dark"] .floating-note,
html[data-theme="dark"] .floating-tag {
    background: #1b2634;
    border-color: #2c3949;
    color: #e4eaf2;
}

html[data-theme="dark"] .how-cards h3,
html[data-theme="dark"] .feature-grid h3,
html[data-theme="dark"] .security-card b,
html[data-theme="dark"] .floating-note b {
    color: #e4eaf2;
}

html[data-theme="dark"] .how-cards p,
html[data-theme="dark"] .feature-grid p,
html[data-theme="dark"] .security-card small,
html[data-theme="dark"] .floating-note small {
    color: #9baabd;
}

html[data-theme="dark"] .preview-window,
html[data-theme="dark"] .preview-main,
html[data-theme="dark"] .preview-stats > div {
    background: #1b2634;
    border-color: #2c3949;
    color: #e4eaf2;
}

html[data-theme="dark"] .preview-row,
html[data-theme="dark"] .preview-leads-head,
html[data-theme="dark"] .preview-top {
    border-color: #2c3949;
    color: #c6d2df;
}

html[data-theme="dark"] .preview-glow {
    opacity: .2;
}

html[data-theme="dark"] .topbar,
html[data-theme="dark"] .platform-topbar,
html[data-theme="dark"] .platform-footer,
html[data-theme="dark"] .panel-heading,
html[data-theme="dark"] .platform-panel-heading,
html[data-theme="dark"] .user-summary,
html[data-theme="dark"] .data-table td,
html[data-theme="dark"] .platform-member-list li,
html[data-theme="dark"] .platform-company-details,
html[data-theme="dark"] .platform-record-audit > div {
    border-color: #2c3949;
}

html[data-theme="dark"] .topbar,
html[data-theme="dark"] .platform-topbar,
html[data-theme="dark"] .platform-footer {
    background-color: #17212d;
}

html[data-theme="dark"] .data-table th,
html[data-theme="dark"] .platform-company-details,
html[data-theme="dark"] .platform-record-create,
html[data-theme="dark"] .advanced-filter-content,
html[data-theme="dark"] .filter-picker-menu,
html[data-theme="dark"] .column-menu-content,
html[data-theme="dark"] .column-menu-heading,
html[data-theme="dark"] .column-menu-heading,
html[data-theme="dark"] .platform-record-item,
html[data-theme="dark"] .platform-company-card {
    background-color: #202c3b;
}

html[data-theme="dark"] .data-table td,
html[data-theme="dark"] .data-table td strong,
html[data-theme="dark"] .lead-primary-link,
html[data-theme="dark"] .topbar-user,
html[data-theme="dark"] .breadcrumb,
html[data-theme="dark"] .platform-brand,
html[data-theme="dark"] .platform-panel-heading h2,
html[data-theme="dark"] .platform-heading h1,
html[data-theme="dark"] .platform-admin-identity,
html[data-theme="dark"] .platform-company-title h3,
html[data-theme="dark"] .platform-company-metrics b,
html[data-theme="dark"] .platform-company-details p b,
html[data-theme="dark"] .platform-member-list li b,
html[data-theme="dark"] .platform-record-item > summary b {
    color: #e4eaf2;
}

html[data-theme="dark"] .muted,
html[data-theme="dark"] .eyebrow,
html[data-theme="dark"] .breadcrumb,
html[data-theme="dark"] .table-hint,
html[data-theme="dark"] .table-toolbar,
html[data-theme="dark"] .platform-muted,
html[data-theme="dark"] .platform-panel-heading p,
html[data-theme="dark"] .platform-heading > div:first-child > p:last-child,
html[data-theme="dark"] .platform-company-title p,
html[data-theme="dark"] .platform-company-metrics,
html[data-theme="dark"] .platform-company-details p,
html[data-theme="dark"] .platform-member-list li small,
html[data-theme="dark"] .platform-footer,
html[data-theme="dark"] .platform-record-audit span {
    color: #9baabd;
}

html[data-theme="dark"] .data-table tbody tr:hover,
html[data-theme="dark"] .picker-option:hover,
html[data-theme="dark"] .column-option:hover,
html[data-theme="dark"] .platform-company-card:hover {
    background-color: #253346;
}

html[data-theme="dark"] input:not([type="checkbox"]):not([type="radio"]),
html[data-theme="dark"] select,
html[data-theme="dark"] textarea,
html[data-theme="dark"] .search-field,
html[data-theme="dark"] .lead-search-input,
html[data-theme="dark"] .filter-picker > summary,
html[data-theme="dark"] .filter-picker-menu,
html[data-theme="dark"] .status-filter-pill,
html[data-theme="dark"] .lead-date-filters input,
html[data-theme="dark"] .field-search-filters input,
html[data-theme="dark"] .field-search-filters select,
html[data-theme="dark"] .platform-search input,
html[data-theme="dark"] .platform-auth-card input,
html[data-theme="dark"] .platform-record-form input,
html[data-theme="dark"] .platform-record-form select,
html[data-theme="dark"] .platform-record-form textarea,
html[data-theme="dark"] .platform-record-actions input {
    background-color: #141e29;
    border-color: #3a485a;
    color: #e4eaf2;
}

html[data-theme="dark"] input::placeholder,
html[data-theme="dark"] textarea::placeholder {
    color: #8392a5;
    opacity: 1;
}

html[data-theme="dark"] .button-secondary,
html[data-theme="dark"] .icon-button,
html[data-theme="dark"] .advanced-filter-panel > summary,
html[data-theme="dark"] .platform-record-actions .platform-form-action,
html[data-theme="dark"] .platform-form-action,
html[data-theme="dark"] .platform-record-actions form input {
    background-color: #253346;
    border-color: #3a485a;
    color: #d9e4f0;
}

html[data-theme="dark"] .advanced-filter-content,
html[data-theme="dark"] .filter-picker-menu {
    border-color: #3a485a;
    box-shadow: 0 18px 52px #0008;
}

html[data-theme="dark"] .lead-filter-form,
html[data-theme="dark"] .lead-date-filters,
html[data-theme="dark"] .field-search-filters,
html[data-theme="dark"] .status-capsule-picker,
html[data-theme="dark"] .advanced-filter-actions,
html[data-theme="dark"] .lead-tabs,
html[data-theme="dark"] .table-toolbar,
html[data-theme="dark"] .form-edit-panel,
html[data-theme="dark"] .integration-guide,
html[data-theme="dark"] .platform-company-details {
    border-color: #2c3949;
}

html[data-theme="dark"] .lead-status-group > strong,
html[data-theme="dark"] .lead-date-filters label,
html[data-theme="dark"] .field-search-filters label,
html[data-theme="dark"] .filter-picker > summary,
html[data-theme="dark"] .picker-option,
html[data-theme="dark"] .status-filter-pill,
html[data-theme="dark"] .advanced-filter-panel > summary,
html[data-theme="dark"] .platform-record-form label,
html[data-theme="dark"] .platform-record-actions label {
    color: #b8c5d5;
}

html[data-theme="dark"] label,
html[data-theme="dark"] .platform-record-form label,
html[data-theme="dark"] .form-create-form > label,
html[data-theme="dark"] .manage-lead-form label,
html[data-theme="dark"] .note-form label {
    color: #bdc9d8;
}

html[data-theme="dark"] .status-filter-pill:has(input:checked),
html[data-theme="dark"] .lead-status-capsule.selected,
html[data-theme="dark"] .lead-tabs a.selected,
html[data-theme="dark"] .platform-sidebar nav a[aria-current="page"] {
    background-color: #203c61;
    border-color: #426894;
    color: #c9ddfb;
}

html[data-theme="dark"] .active-filter-chip,
html[data-theme="dark"] .result-count,
html[data-theme="dark"] .record-tag,
html[data-theme="dark"] .platform-form-row,
html[data-theme="dark"] .platform-record-item,
html[data-theme="dark"] .platform-record-create {
    background-color: #202c3b;
    border-color: #354458;
    color: #c7d3e0;
}

html[data-theme="dark"] .form-endpoint-card .endpoint-label input,
html[data-theme="dark"] .integration-guide textarea,
html[data-theme="dark"] .endpoint-label input,
html[data-theme="dark"] .integration-panel {
    background-color: #141e29;
    color: #c7d6e8;
}

html[data-theme="dark"] .platform-company-overview,
html[data-theme="dark"] .platform-record-item > summary,
html[data-theme="dark"] .platform-record-endpoint,
html[data-theme="dark"] .platform-search,
html[data-theme="dark"] .platform-panel-heading,
html[data-theme="dark"] .form-edit-panel > summary,
html[data-theme="dark"] .integration-guide > summary {
    color: #d4dfeb;
}

html[data-theme="dark"] .subtle-danger,
html[data-theme="dark"] .button-danger {
    background-color: #39272c;
    border-color: #66434b;
    color: #f0b8bd;
}

html[data-theme="dark"] .field-builder-heading,
html[data-theme="dark"] .editor-section-heading,
html[data-theme="dark"] .field-builder-list,
html[data-theme="dark"] .status-editor-list,
html[data-theme="dark"] .field-editor-row,
html[data-theme="dark"] .status-editor-row {
    background-color: #202c3b;
    border-color: #354458;
    color: #d7e1ed;
}

html[data-theme="dark"] .editor-control > span,
html[data-theme="dark"] .editor-required,
html[data-theme="dark"] .editor-section-heading strong,
html[data-theme="dark"] .field-builder-heading strong {
    color: #c7d3e0;
}

html[data-theme="dark"] .platform-company-details p b,
html[data-theme="dark"] .platform-member-list li b {
    color: #dce5ef;
}

html[data-theme="dark"] .landing-security .security-card > div,
html[data-theme="dark"] .platform-company-details,
html[data-theme="dark"] .platform-record-item,
html[data-theme="dark"] .platform-record-create {
    background-color: #202c3b;
}

html[data-theme="dark"] .platform-sidebar {
    box-shadow: 0 3px 10px #0003;
}

html[data-theme="dark"] .platform-sidebar nav a {
    color: #c2cfdd;
}

html[data-theme="dark"] .platform-sidebar nav a:hover,
html[data-theme="dark"] .platform-sidebar nav a:focus-visible {
    background: #25364a;
    color: #e4eaf2;
}

html[data-theme="dark"] .platform-sidebar-label,
html[data-theme="dark"] .platform-sidebar-footnote {
    color: #9baabd;
}

html[data-theme="dark"] .submitted-info-heading {
    border-color: #2c3949;
}

html[data-theme="dark"] .activity-panel-heading,
html[data-theme="dark"] .activity-toolbar,
html[data-theme="dark"] .activity-panel .note-form,
html[data-theme="dark"] .activity-item,
html[data-theme="dark"] .crm-meta > div,
html[data-theme="dark"] .detail-sidebar > .crm-panel > .panel-heading,
html[data-theme="dark"] .detail-sidebar > .submitted-info-panel > .submitted-info-heading {
    border-color: #2c3949;
}

html[data-theme="dark"] .detail-sidebar > .crm-panel > .panel-heading,
html[data-theme="dark"] .detail-sidebar > .submitted-info-panel > .submitted-info-heading {
    background-color: #1b2634;
}

html[data-theme="dark"] .detail-sidebar > .crm-panel,
html[data-theme="dark"] .detail-sidebar > .submitted-info-panel {
    scrollbar-color: #53647a #17212d;
}

html[data-theme="dark"] .detail-sidebar > .crm-panel::-webkit-scrollbar-track,
html[data-theme="dark"] .detail-sidebar > .submitted-info-panel::-webkit-scrollbar-track {
    background: #17212d;
}

html[data-theme="dark"] .detail-sidebar > .crm-panel::-webkit-scrollbar-thumb,
html[data-theme="dark"] .detail-sidebar > .submitted-info-panel::-webkit-scrollbar-thumb {
    border-color: #17212d;
    background: #53647a;
}

html[data-theme="dark"] .detail-sidebar > .crm-panel::-webkit-scrollbar-thumb:hover,
html[data-theme="dark"] .detail-sidebar > .submitted-info-panel::-webkit-scrollbar-thumb:hover {
    background: #7186a0;
}

html[data-theme="dark"] .activity-filters button {
    color: #bdc9d8;
}

html[data-theme="dark"] .activity-filters button.selected {
    border-color: #426894;
    background: #203c61;
    color: #d8e7fa;
}

html[data-theme="dark"] .activity-filters button span,
html[data-theme="dark"] .activity-meta time,
html[data-theme="dark"] .activity-scroll-hint,
html[data-theme="dark"] .note-form-hint {
    color: #9baabd;
}

html[data-theme="dark"] .activity-count {
    background: #20344d;
    color: #c8dcf5;
}

html[data-theme="dark"] .activity-kind {
    background: #2a394b;
    color: #bfccdc;
}

html[data-theme="dark"] .activity-content p {
    color: #c4cfdd;
}

html[data-theme="dark"] .activity-edit > summary,
html[data-theme="dark"] .activity-search label {
    color: #a9c8f0;
}

html[data-theme="dark"] .activity-delete {
    color: #f0a7ae;
}

html[data-theme="dark"] .empty-inline,
html[data-theme="dark"] .activity-no-results {
    color: #aab8c9;
}

html[data-theme="dark"] .crm-meta > div > span {
    color: #aab8c9;
}

html[data-theme="dark"] .crm-meta > div > strong {
    color: #e0e8f2;
}

html[data-theme="dark"] .submitted-info-heading .eyebrow {
    color: #9cb7d8;
}

html[data-theme="dark"] .submitted-info-heading h2,
html[data-theme="dark"] .submitted-field > label {
    color: #e0e8f2;
}

html[data-theme="dark"] .submitted-info-description,
html[data-theme="dark"] .submitted-info-permission {
    color: #a8b6c7;
}

html[data-theme="dark"] .submitted-field-progress {
    border-color: #3a5577;
    background: #20344d;
    color: #c8dcf5;
}

html[data-theme="dark"] .submitted-field input,
html[data-theme="dark"] .submitted-field textarea {
    border-color: #3a485a;
    background: #141e29;
    color: #e4eaf2;
}

html[data-theme="dark"] .submitted-field-readonly {
    border-color: #354458;
    background: #202c3b;
    color: #d1dce9;
}

html[data-theme="dark"] .field-lock-label {
    background: #2a394b;
    color: #b5c4d6;
}

html[data-theme="dark"] .submitted-info-actions,
html[data-theme="dark"] .legacy-submitted-details {
    border-color: #2c3949;
}

html[data-theme="dark"] .legacy-submitted-details > summary {
    color: #c1cede;
}

html[data-theme="dark"] .legacy-submitted-details > summary span {
    color: #9baabd;
}

html[data-theme="dark"] .column-menu-content {
    border-color: #3a485a;
    background-color: #202c3b;
    box-shadow: 0 18px 48px #0009;
}

html[data-theme="dark"] .column-menu-heading {
    border-color: #354458;
    background-color: #202c3b;
    color: #e0e8f2;
}

html[data-theme="dark"] .column-option {
    border-color: #2c3949;
}

html[data-theme="dark"] .column-option label {
    color: #c5d1df;
}

html[data-theme="dark"] .column-order-controls button {
    border-color: #3a485a;
    background-color: #253346;
    color: #d9e4f0;
}

html[data-theme="dark"] .column-order-controls button:hover:not(:disabled) {
    border-color: #5c83b6;
    background-color: #2a3b50;
    color: #e4eaf2;
}

html[data-theme="dark"] .platform-notice.success,
html[data-theme="dark"] .notice-success {
    background-color: #193b32;
    color: #a8ddc3;
}

html[data-theme="dark"] .platform-notice.error,
html[data-theme="dark"] .notice-error {
    background-color: #41282d;
    color: #f0b8bd;
}

html[data-theme="dark"] .advanced-filter-content::-webkit-scrollbar-thumb,
html[data-theme="dark"] .filter-picker-menu::-webkit-scrollbar-thumb {
    border-color: #1b2634;
    background: #53647a;
}

html[data-theme="dark"] .advanced-filter-content::-webkit-scrollbar-track,
html[data-theme="dark"] .filter-picker-menu::-webkit-scrollbar-track {
    background: #202c3b;
}

.theme-toggle {
    min-height: 32px;
    padding: 0 10px;
    border: 1px solid #dfe5ec;
    border-radius: 8px;
    background: #fff;
    color: #465568;
    font-size: 10px;
    font-weight: 700;
    white-space: nowrap;
}

.theme-toggle:hover {
    border-color: #b7c5d5;
    color: #2766d5;
}

.auth-theme-toggle {
    position: fixed;
    z-index: 40;
    top: 16px;
    right: 18px;
}

.platform-topbar .theme-toggle {
    margin-left: auto;
    margin-right: 18px;
}

html[data-theme="dark"] .theme-toggle {
    background: #253346;
    border-color: #3a485a;
    color: #d9e4f0;
}

html[data-theme="dark"] * {
    scrollbar-color: #53647a #17212d;
}

.impersonation-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 18px;
    border-bottom: 1px solid #f2d58a;
    background: #fff7df;
    color: #574114;
    font-size: 12px;
}

.impersonation-banner > span {
    display: grid;
    gap: 2px;
}

.impersonation-banner small {
    color: #795e27;
    font-size: 10px;
}

.impersonation-banner form {
    flex: none;
    margin: 0;
}

.impersonation-banner button {
    min-height: 32px;
    padding: 0 12px;
    border: 1px solid #d4a53e;
    border-radius: 7px;
    background: #fff;
    color: #604715;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

html[data-theme="dark"] .impersonation-banner {
    border-color: #795f2b;
    background: #392f1e;
    color: #f4dfae;
}

html[data-theme="dark"] .impersonation-banner small {
    color: #d4bd84;
}

html[data-theme="dark"] .impersonation-banner button {
    border-color: #9a7838;
    background: #493a20;
    color: #ffedc4;
}

html[data-theme="dark"] .tenant-leads-table thead th,
html[data-theme="dark"] .tenant-leads-table thead th a,
html[data-theme="dark"] .tenant-leads-table .table-sort-link {
    background-color: #202c3b;
    border-color: #354458;
    color: #cbd7e5;
}

html[data-theme="dark"] .tenant-leads-table tbody tr {
    background-color: #1b2634;
    color: #e4eaf2;
}

html[data-theme="dark"] .tenant-leads-table tbody tr:nth-child(even) {
    background-color: #1e2a39;
}

html[data-theme="dark"] .tenant-leads-table tbody tr:hover {
    background-color: #25364a;
}

html[data-theme="dark"] .tenant-leads-table td,
html[data-theme="dark"] .tenant-leads-table td small,
html[data-theme="dark"] .tenant-leads-table td .source-pill,
html[data-theme="dark"] .table-hint,
html[data-theme="dark"] .pagination,
html[data-theme="dark"] .page-size {
    color: #b9c7d7;
}

html[data-theme="dark"] .pagination,
html[data-theme="dark"] .table-toolbar {
    border-color: #2c3949;
    background-color: #17212d;
}

html[data-theme="dark"] .inline-lead-manage select,
html[data-theme="dark"] .page-size select {
    border-color: #3a485a;
    background-color: #141e29;
    color: #e4eaf2;
}

html[data-theme="dark"] .table-save-button {
    border-color: #426894;
    background-color: #203c61;
    color: #d5e5fb;
}

html[data-theme="dark"] .empty-state {
    border-color: #2c3949;
    background-color: #1b2634;
    color: #e4eaf2;
}

html[data-theme="dark"] .empty-state h3,
html[data-theme="dark"] .empty-state p {
    color: #d3deea;
}

html[data-theme="dark"] .lead-filter-section,
html[data-theme="dark"] .lead-status-section {
    border-color: #354458;
    background-color: #1b2634;
}

html[data-theme="dark"] .lead-filter-section > summary,
html[data-theme="dark"] .lead-status-group > strong,
html[data-theme="dark"] .filter-hint,
html[data-theme="dark"] .lead-filter-section > summary span {
    color: #c4d0df;
}

html[data-theme="dark"] .lead-filter-section[open] > summary {
    border-color: #354458;
}

html[data-theme="dark"] .lead-status-capsule,
html[data-theme="dark"] .status-filter-pill {
    border-color: #46566b;
    background-color: #202c3b;
    color: #d3deea;
}

html[data-theme="dark"] .lead-status-capsule:hover,
html[data-theme="dark"] .lead-status-capsule.selected,
html[data-theme="dark"] .status-filter-pill:has(input:checked) {
    border-color: #5c83b6;
    background-color: #203c61;
    color: #e0ecfc;
}

html[data-theme="dark"] .active-filter-chip {
    border-color: #426894;
    background-color: #203c61;
    color: #d8e8fc;
}

html[data-theme="dark"] .filter-picker-menu,
html[data-theme="dark"] .column-menu-content,
html[data-theme="dark"] .export-menu-options {
    background-color: #202c3b;
    color: #d9e4f0;
}

html[data-theme="dark"] .filter-picker-menu button,
html[data-theme="dark"] .export-menu-options a {
    color: #d9e4f0;
}

html[data-theme="dark"] .filter-picker-menu button:hover,
html[data-theme="dark"] .export-menu-options a:hover {
    background-color: #2a3b50;
}

html[data-theme="dark"] .status-badge,
html[data-theme="dark"] .source-pill,
html[data-theme="dark"] .badge {
    border-color: #46566b;
    background-color: #253346;
    color: #d9e4f0;
}

.platform-act-as-form {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 12px;
    padding: 10px;
    border: 1px solid #dce8f7;
    border-radius: 8px;
    background: #f6f9fd;
}

html[data-theme="dark"] .platform-act-as-form {
    border-color: #354458;
    background: #202c3b;
}

.platform-act-as-form small {
    color: #76869a;
    font-size: 10px;
}

html[data-theme="dark"] .platform-act-as-form small {
    color: #aab8c9;
}

.platform-record-section code {
    padding: 2px 5px;
    border-radius: 4px;
    background: #f1f4f8;
    color: #42566d;
}

html[data-theme="dark"] .structured-form .status-builder {
    border: 1px solid #354458;
    border-radius: 9px;
    background: #202c3b;
    color: #d9e4f0;
}

html[data-theme="dark"] .structured-form .status-builder > label {
    color: #c5d1df;
}

html[data-theme="dark"] .structured-form .status-builder select,
html[data-theme="dark"] .copy-statuses-control select {
    border-color: #3a485a;
    background-color: #141e29;
    color: #e4eaf2;
}

html[data-theme="dark"] .structured-form .status-builder select:focus,
html[data-theme="dark"] .copy-statuses-control select:focus {
    border-color: #7199c9;
    outline: 0;
    box-shadow: 0 0 0 3px #4a80bd33;
}

html[data-theme="dark"] .platform-record-section code {
    background: #253346;
    color: #d3e2f3;
}

@media (max-width: 560px) {
    .impersonation-banner {
        align-items: flex-start;
        padding: 10px 12px;
    }

    .impersonation-banner button {
        padding: 0 9px;
        font-size: 10px;
    }
}

@media (max-width: 650px) {
    .topbar-company {
        margin-right: 8px;
    }

    .topbar-company label {
        display: none;
    }

    .topbar-company select {
        max-width: 120px;
    }

    .theme-toggle {
        min-height: 30px;
        padding: 0 8px;
        font-size: 9px;
    }

    .platform-topbar .theme-toggle {
        margin-right: 8px;
    }
}

@media (max-width: 420px) {
    .topbar .breadcrumb {
        display: none;
    }

    .topbar-company select {
        max-width: 96px;
    }

    .platform-topbar {
        padding-right: 12px;
        padding-left: 12px;
    }

    .platform-header-account {
        gap: 8px;
    }

    .platform-header-account > span {
        display: none;
    }
}
