/* Product + SYSTEM theme preview dark chrome
 * Product: html[data-bomsync-theme="dark"] (Profile dropdown / Default appearance; localStorage bomsync-theme)
 * Preview QA: html[data-bomsync-theme-preview="dark|light"] (ThemePreviewBar) — when present, owns the wash
 *   so Light preview can override a Dark product preference on branding pages.
 * Button intent tokens also use html[data-theme] from bomsync-theme.js / preview.js. */

html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]),
html[data-bomsync-theme-preview="dark"] {
    color-scheme: dark;
    /*
     * Dark page wash — lifted ~8% from #0F1624 so navy page hero (#111B2C family)
     * is not drowned by a near-black background (Geoffrey 2026-10-10).
     * Do not darken the hero; only lift the wash.
     */
    --bomsync-theme-preview-page-bg: #222936;
    --bomsync-theme-preview-page-bg-rgb: 34 41 54;
    /*
     * Dark toasts: soft translucent pastel chrome (not solid opaque Syncfusion blocks).
     * Light Pastel Green / coral kept as the tint family; forest solid (#0f7b4c) rejected.
     */
    --bomsync-toast-success-bg: color-mix(in srgb, #A8D4B8 32%, rgb(26 38 56 / 0.92));
    --bomsync-toast-success-fg: #D5EDE0;
    --bomsync-toast-success-border: color-mix(in srgb, #A8D4B8 55%, #3A4F6A);
    --bomsync-toast-danger-bg: color-mix(in srgb, #E2B0A6 30%, rgb(26 38 56 / 0.92));
    --bomsync-toast-danger-fg: #F0D2CC;
    --bomsync-toast-danger-border: color-mix(in srgb, #E2B0A6 50%, #3A4F6A);
    --bomsync-success: #A8D4B8;
    /* Temperature-aligned text / surface tokens so satellite headers & labels stay on-dark */
    --bomsync-text: #E3EAF2;
    --bomsync-text-primary: #E3EAF2;
    --bomsync-text-secondary: #9DB4CC;
    --bomsync-text-muted: #9DB4CC;
    /* Keep page-bg in sync with the dark wash — components like .home-daily-brief
       paint with var(--bomsync-page-bg); leaving the light :root value made greeting
       text (#E3EAF2) sit on #f4f6fa (illegible on /dashboard/home). */
    --bomsync-page-bg: var(--bomsync-theme-preview-page-bg);
    --bomsync-surface-sunken: #152033;
    --bomsync-satellite-bg: #1A2638;
    --bomsync-satellite-rule: #3A4F6A;
    --bomsync-surface: #152033;
    --bomsync-elevated-surface: #1A2638;
    /* Wells must not stay Light #FCFDFE — satellite header btns used this + on-dark text */
    --bomsync-surface-well: #152033;
    /* Cool navy washes — never leave light cream #eef2f9 on Dark (ActivityFeed shell split). */
    --bomsync-brand-subtle: #1A2638;
    --bomsync-brand-subtle-2: #243247;
    --bomsync-border: #3A4F6A;
    --bomsync-border-strong: #4A6280;
    --bomsync-on-dark-text: #E8EDF5;
}

html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) body,
html[data-bomsync-theme-preview="dark"] body,
html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .bomsync-layout-content-host,
html[data-bomsync-theme-preview="dark"] .bomsync-layout-content-host,
html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .content,
html[data-bomsync-theme-preview="dark"] .content,
html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .content-wrapper,
html[data-bomsync-theme-preview="dark"] .content-wrapper {
    background: var(--bomsync-theme-preview-page-bg) !important;
    color: #E3EAF2;
}

html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .bomsync-copy-lead,
html[data-bomsync-theme-preview="dark"] .bomsync-copy-lead,
html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .text-muted,
html[data-bomsync-theme-preview="dark"] .text-muted {
    color: #9DB4CC !important;
}

html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .bomsync-panel-card,
html[data-bomsync-theme-preview="dark"] .bomsync-panel-card,
html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .bomsync-panel-card.bomsync-panel--work,
html[data-bomsync-theme-preview="dark"] .bomsync-panel-card.bomsync-panel--work,
html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .bomsync-panel-card.bomsync-panel--satellite ,
html[data-bomsync-theme-preview="dark"] .bomsync-panel-card.bomsync-panel--satellite {
    background: #1A2638;
    border-color: #3A4F6A;
    box-shadow: 0 2px 12px rgb(0 0 0 / 0.35);
}

html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .bomsync-panel-card > .bomsync-panel-card__body,
html[data-bomsync-theme-preview="dark"] .bomsync-panel-card > .bomsync-panel-card__body,
html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .bomsync-panel-card.bomsync-panel--work > .bomsync-panel-card__body ,
html[data-bomsync-theme-preview="dark"] .bomsync-panel-card.bomsync-panel--work > .bomsync-panel-card__body {
    background: #152033;
    color: #E3EAF2;
}

html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .bomsync-elevated-surface,
html[data-bomsync-theme-preview="dark"] .bomsync-elevated-surface,
html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .pp-demand-shell,
html[data-bomsync-theme-preview="dark"] .pp-demand-shell,
html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .pp-workspace__toolbar ,
html[data-bomsync-theme-preview="dark"] .pp-workspace__toolbar {
    background: #152033 !important;
    color: #E3EAF2;
}

/* Hero stays navy; lifted wash + edge shadow for clearer separation */
html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .bomsync-page-hero ,
html[data-bomsync-theme-preview="dark"] .bomsync-page-hero {
    box-shadow:
        0 4px 28px rgb(var(--bomsync-theme-preview-page-bg-rgb) / 0.55),
        0 0 0 1px rgb(106 215 255 / 0.14),
        0 1px 0 rgb(106 215 255 / 0.16) inset;
}

/* Coach / Bootstrap info panels — cool navy-teal (no pastel baby-blue wash on Dark) */
html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .bomsync-coach-panel,
html[data-bomsync-theme-preview="dark"] .bomsync-coach-panel,
html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .alert.alert-info ,
html[data-bomsync-theme-preview="dark"] .alert.alert-info {
    background:
        linear-gradient(135deg, rgb(1 95 120 / 0.28) 0%, transparent 50%),
        #152838 !important;
    border-color: #2A4A5C !important;
    color: #E3EAF2 !important;
    box-shadow: inset 3px 0 0 #3A8FA0;
}

/*
 * Embedded success banners (not floating SfToast) — Dark pastel-teal wash.
 * Floating toast keeps Pastel Green (#E5F4EC); embedded needs teal on elevated Dark
 * so light mint + on-dark text never collide (success-toast-pastel + Dark-embedded).
 */
html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .alert.alert-success,
html[data-bomsync-theme-preview="dark"] .alert.alert-success,
html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .bomsync-embedded-success,
html[data-bomsync-theme-preview="dark"] .bomsync-embedded-success {
    background:
        linear-gradient(135deg, rgb(58 155 140 / 0.38) 0%, transparent 55%),
        #152E2C !important;
    border-color: #2A5A52 !important;
    color: #D8F0E8 !important;
    box-shadow: inset 3px 0 0 #3A9B8A;
}

html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .alert.alert-success strong,
html[data-bomsync-theme-preview="dark"] .alert.alert-success strong,
html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .bomsync-embedded-success strong,
html[data-bomsync-theme-preview="dark"] .bomsync-embedded-success strong {
    color: #E5F4EC !important;
}

html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .alert.alert-success .btn-outline-secondary,
html[data-bomsync-theme-preview="dark"] .alert.alert-success .btn-outline-secondary,
html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .bomsync-embedded-success .btn-outline-secondary,
html[data-bomsync-theme-preview="dark"] .bomsync-embedded-success .btn-outline-secondary {
    color: #D8F0E8 !important;
    border-color: #4A8B7E !important;
    background: transparent !important;
}

html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .alert.alert-success .btn-outline-secondary:hover,
html[data-bomsync-theme-preview="dark"] .alert.alert-success .btn-outline-secondary:hover,
html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .bomsync-embedded-success .btn-outline-secondary:hover,
html[data-bomsync-theme-preview="dark"] .bomsync-embedded-success .btn-outline-secondary:hover {
    color: #E5F4EC !important;
    border-color: #6AD7C4 !important;
    background: rgb(58 155 140 / 0.22) !important;
}

/* SfToast on Dark — soft translucent pastel (overrides Syncfusion Fluent solid fills) */
html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .e-toast-container .e-toast.e-toast-success,
html[data-bomsync-theme-preview="dark"] .e-toast-container .e-toast.e-toast-success,
html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .e-toast-container .e-toast.bomsync-toast-success,
html[data-bomsync-theme-preview="dark"] .e-toast-container .e-toast.bomsync-toast-success {
    background-color: var(--bomsync-toast-success-bg) !important;
    background-image: none !important;
    border-color: var(--bomsync-toast-success-border) !important;
    color: var(--bomsync-toast-success-fg) !important;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .e-toast-container .e-toast.e-toast-danger,
html[data-bomsync-theme-preview="dark"] .e-toast-container .e-toast.e-toast-danger,
html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .e-toast-container .e-toast.bomsync-toast-danger,
html[data-bomsync-theme-preview="dark"] .e-toast-container .e-toast.bomsync-toast-danger {
    background-color: var(--bomsync-toast-danger-bg) !important;
    background-image: none !important;
    border-color: var(--bomsync-toast-danger-border) !important;
    color: var(--bomsync-toast-danger-fg) !important;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .e-toast-container .e-toast.e-toast-success .e-toast-title,
html[data-bomsync-theme-preview="dark"] .e-toast-container .e-toast.e-toast-success .e-toast-title,
html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .e-toast-container .e-toast.e-toast-success .e-toast-content,
html[data-bomsync-theme-preview="dark"] .e-toast-container .e-toast.e-toast-success .e-toast-content,
html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .e-toast-container .e-toast.e-toast-success .e-toast-icon,
html[data-bomsync-theme-preview="dark"] .e-toast-container .e-toast.e-toast-success .e-toast-icon,
html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .e-toast-container .e-toast.e-toast-success .e-toast-close-icon,
html[data-bomsync-theme-preview="dark"] .e-toast-container .e-toast.e-toast-success .e-toast-close-icon {
    color: var(--bomsync-toast-success-fg) !important;
}

html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .e-toast-container .e-toast.e-toast-danger .e-toast-title,
html[data-bomsync-theme-preview="dark"] .e-toast-container .e-toast.e-toast-danger .e-toast-title,
html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .e-toast-container .e-toast.e-toast-danger .e-toast-content,
html[data-bomsync-theme-preview="dark"] .e-toast-container .e-toast.e-toast-danger .e-toast-content,
html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .e-toast-container .e-toast.e-toast-danger .e-toast-icon,
html[data-bomsync-theme-preview="dark"] .e-toast-container .e-toast.e-toast-danger .e-toast-icon,
html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .e-toast-container .e-toast.e-toast-danger .e-toast-close-icon,
html[data-bomsync-theme-preview="dark"] .e-toast-container .e-toast.e-toast-danger .e-toast-close-icon {
    color: var(--bomsync-toast-danger-fg) !important;
}

html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .bomsync-coach-panel .text-muted,
html[data-bomsync-theme-preview="dark"] .bomsync-coach-panel .text-muted,
html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .bomsync-coach-panel .form-label,
html[data-bomsync-theme-preview="dark"] .bomsync-coach-panel .form-label,
html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .alert.alert-info .text-muted,
html[data-bomsync-theme-preview="dark"] .alert.alert-info .text-muted,
html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .alert.alert-info .form-label ,
html[data-bomsync-theme-preview="dark"] .alert.alert-info .form-label {
    color: #9DB4CC !important;
}

html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .bomsync-coach-panel .form-select,
html[data-bomsync-theme-preview="dark"] .bomsync-coach-panel .form-select,
html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .alert.alert-info .form-select ,
html[data-bomsync-theme-preview="dark"] .alert.alert-info .form-select {
    background-color: #1A2638;
    border-color: #3A4F6A;
    color: #E3EAF2;
}

/* Blue selection bars — PATH-quality hover edge (cyan family) */
html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .pp-selection-bar ,
html[data-bomsync-theme-preview="dark"] .pp-selection-bar {
    border: 1px solid rgba(106 215 255 / 0.22);
    box-shadow: inset 0 1px 0 rgba(106 215 255 / 0.08);
}

html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .pp-selection-bar__btn:hover:not(:disabled),
html[data-bomsync-theme-preview="dark"] .pp-selection-bar__btn:hover:not(:disabled),
html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .pp-action-rail__btn:hover:not(:disabled) ,
html[data-bomsync-theme-preview="dark"] .pp-action-rail__btn:hover:not(:disabled) {
    border-color: rgba(106 215 255 / 0.85);
    background: rgba(47 102 144 / 0.78);
    box-shadow:
        0 0 0 1px rgba(106 215 255 / 0.35),
        0 0 12px rgba(106 215 255 / 0.18);
}

html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .pp-selection-bar__btn:active:not(:disabled),
html[data-bomsync-theme-preview="dark"] .pp-selection-bar__btn:active:not(:disabled),
html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .pp-action-rail__btn:active:not(:disabled) ,
html[data-bomsync-theme-preview="dark"] .pp-action-rail__btn:active:not(:disabled) {
    border-color: #6ad7ff;
    box-shadow:
        0 0 0 1px rgba(106 215 255 / 0.45),
        0 0 14px rgba(106 215 255 / 0.22);
}

/* Satellite panel headers (e.g. Item Scope magnifier + title) — on-dark, not near-black */
html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .bomsync-panel-card.bomsync-panel--satellite > .bomsync-panel-card__header,
html[data-bomsync-theme-preview="dark"] .bomsync-panel-card.bomsync-panel--satellite > .bomsync-panel-card__header {
    color: var(--bomsync-on-dark-text, #E8EDF5);
    border-bottom-color: #3A4F6A;
}

html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .bomsync-panel-card.bomsync-panel--satellite > .bomsync-panel-card__header .bi,
html[data-bomsync-theme-preview="dark"] .bomsync-panel-card.bomsync-panel--satellite > .bomsync-panel-card__header .bi,
html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .bomsync-panel-card.bomsync-panel--satellite > .bomsync-panel-card__header .e-icons,
html[data-bomsync-theme-preview="dark"] .bomsync-panel-card.bomsync-panel--satellite > .bomsync-panel-card__header .e-icons {
    color: var(--bomsync-on-dark-text, #E8EDF5);
}

html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .bomsync-panel-card.bomsync-panel--satellite > .bomsync-panel-card__body .form-label,
html[data-bomsync-theme-preview="dark"] .bomsync-panel-card.bomsync-panel--satellite > .bomsync-panel-card__body .form-label {
    color: #C9D6E3;
}

/* Item / Resource Workbench — Dark surfaces (left-rail cards, KPI strip, sections) */
html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .spw,
html[data-bomsync-theme-preview="dark"] .spw {
    --spw-ink: #E3EAF2;
    --spw-muted: #B7C9DC;
    --spw-line: #3A4F6A;
    --spw-surface: #152033;
    --spw-ground: #1A2638;
    /* Selected card wash must stay dark — light #e6eff7 brand-soft made price/meta/chips unreadable */
    --spw-brand: #6ad7ff;
    --spw-brand-soft: color-mix(in srgb, #2F6690 34%, #152033);
    --spw-accent: #7ED4E8;
    --spw-ok-bg: color-mix(in srgb, #2a8f6a 30%, #152838);
    --spw-ok-fg: #A8D4B8;
    --spw-section-head-bg: #1A2638;
    --spw-section-head-fg: #E8EDF5;
    --spw-section-head-muted: #9DB4CC;
    --spw-section-head-rule: #3A4F6A;
    --spw-media-head-bg: color-mix(in srgb, #015F78 38%, #152838);
    --spw-media-head-fg: #7ED4E8;
    /* Cool attention — no orange-forward gap/warn chrome */
    --spw-gap-bg: color-mix(in srgb, #2F6690 22%, #152838);
    --spw-gap-fg: #8FB8DE;
}

/* Left SPW cards — primary/secondary text on dark surfaces (selected + idle) */
html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .spw .spw-card,
html[data-bomsync-theme-preview="dark"] .spw .spw-card {
    color: var(--spw-ink);
}

html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .spw .spw-card-vendor,
html[data-bomsync-theme-preview="dark"] .spw .spw-card-vendor,
html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .spw .spw-card-desc,
html[data-bomsync-theme-preview="dark"] .spw .spw-card-desc {
    color: var(--spw-ink);
}

html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .spw .spw-card-from,
html[data-bomsync-theme-preview="dark"] .spw .spw-card-from {
    color: var(--spw-accent);
}

html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .spw .spw-card-meta,
html[data-bomsync-theme-preview="dark"] .spw .spw-card-meta {
    color: var(--spw-muted);
}

/* SfListView active row — keep rail dark (Syncfusion default can wash light) */
html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .spw .spw-listview .e-list-item.e-active,
html[data-bomsync-theme-preview="dark"] .spw .spw-listview .e-list-item.e-active,
html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .spw .spw-listview .e-list-item.e-hover,
html[data-bomsync-theme-preview="dark"] .spw .spw-listview .e-list-item.e-hover {
    background: transparent !important;
}

/* Selected left-rail card — force on-dark primary text on elevated selected surface */
html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .spw .spw-card.is-selected,
html[data-bomsync-theme-preview="dark"] .spw .spw-card.is-selected {
    background: var(--spw-brand-soft) !important;
    color: var(--spw-ink) !important;
    box-shadow: inset 4px 0 0 var(--spw-brand);
}

html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .spw .spw-card.is-selected .spw-card-vendor,
html[data-bomsync-theme-preview="dark"] .spw .spw-card.is-selected .spw-card-vendor,
html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .spw .spw-card.is-selected .spw-card-desc,
html[data-bomsync-theme-preview="dark"] .spw .spw-card.is-selected .spw-card-desc {
    color: var(--spw-ink) !important;
}

html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .spw .spw-card.is-selected .spw-card-meta,
html[data-bomsync-theme-preview="dark"] .spw .spw-card.is-selected .spw-card-meta {
    color: var(--spw-muted) !important;
}

html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .spw .spw-card.is-selected .spw-card-from,
html[data-bomsync-theme-preview="dark"] .spw .spw-card.is-selected .spw-card-from {
    color: var(--spw-accent) !important;
}

/* KPI strip active/hover — no #fff mix (light wash under on-dark labels) */
html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .spw .spw-kpi-btn:hover,
html[data-bomsync-theme-preview="dark"] .spw .spw-kpi-btn:hover {
    background: color-mix(in srgb, var(--spw-accent, #7ED4E8) 14%, var(--spw-surface, #152033));
    border-color: color-mix(in srgb, var(--spw-accent, #7ED4E8) 32%, transparent);
}

html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .spw .spw-kpi-btn.is-on,
html[data-bomsync-theme-preview="dark"] .spw .spw-kpi-btn.is-on {
    background: color-mix(in srgb, var(--spw-accent, #7ED4E8) 18%, var(--spw-ground, #1A2638));
    border-color: color-mix(in srgb, var(--spw-accent, #7ED4E8) 40%, transparent);
    box-shadow: inset 0 -2px 0 var(--spw-brand, #6ad7ff);
    color: var(--spw-ink);
}

html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .spw .spw-kpi-btn.is-on .spw-kpi-label,
html[data-bomsync-theme-preview="dark"] .spw .spw-kpi-btn.is-on .spw-kpi-label {
    color: #C9D6E3;
}

html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .spw .spw-kpi-btn.is-on .spw-kpi-value,
html[data-bomsync-theme-preview="dark"] .spw .spw-kpi-btn.is-on .spw-kpi-value {
    color: var(--spw-ink);
}

html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .spw .spw-tag,
html[data-bomsync-theme-preview="dark"] .spw .spw-tag {
    background: color-mix(in srgb, #2F6690 28%, #152838);
    color: #E3EAF2;
}

html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .spw .spw-tag-strong,
html[data-bomsync-theme-preview="dark"] .spw .spw-tag-strong {
    background: color-mix(in srgb, #015F78 55%, #152838);
    color: #E8EDF5;
}

/* Company link in SPW header — cyan on-dark; popout matches text size */
html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .bomsync-company-link__name,
html[data-bomsync-theme-preview="dark"] .bomsync-company-link__name {
    color: var(--bs-cyan, #6ad7ff);
}

html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .bomsync-company-link__name:hover,
html[data-bomsync-theme-preview="dark"] .bomsync-company-link__name:hover,
html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .bomsync-company-link__name:focus-visible,
html[data-bomsync-theme-preview="dark"] .bomsync-company-link__name:focus-visible {
    color: var(--bomsync-on-dark-text, #E8EDF5);
}

html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .bomsync-company-link__popout,
html[data-bomsync-theme-preview="dark"] .bomsync-company-link__popout {
    color: var(--bomsync-on-dark-text, #E8EDF5);
    border-color: color-mix(in srgb, var(--bs-cyan, #6ad7ff) 35%, transparent);
    background: color-mix(in srgb, var(--bs-cyan, #6ad7ff) 10%, transparent);
}

html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .bomsync-company-link__popout:hover,
html[data-bomsync-theme-preview="dark"] .bomsync-company-link__popout:hover,
html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .bomsync-company-link__popout:focus-visible,
html[data-bomsync-theme-preview="dark"] .bomsync-company-link__popout:focus-visible {
    color: var(--bs-cyan, #6ad7ff);
    border-color: var(--bs-cyan, #6ad7ff);
}

html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .bomsync-company-link--badge,
html[data-bomsync-theme-preview="dark"] .bomsync-company-link--badge {
    border-color: color-mix(in srgb, var(--bs-cyan, #6ad7ff) 40%, #3A4F6A);
    background: color-mix(in srgb, var(--bs-cyan, #6ad7ff) 14%, #1A2638);
}

/* Media / coach icon chrome — Dark glass outline (not dated square defaults) */
html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .item-source-product-media .bomsync-icon-btn,
html[data-bomsync-theme-preview="dark"] .item-source-product-media .bomsync-icon-btn,
html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .isp-coach__toggle,
html[data-bomsync-theme-preview="dark"] .isp-coach__toggle,
html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .item-image-viewer-shell .bomsync-icon-btn,
html[data-bomsync-theme-preview="dark"] .item-image-viewer-shell .bomsync-icon-btn {
    border: 1px solid color-mix(in srgb, var(--bs-cyan, #6ad7ff) 42%, #3A4F6A);
    background: color-mix(in srgb, var(--bs-cyan, #6ad7ff) 12%, #152033);
    color: var(--bomsync-on-dark-text, #E8EDF5);
    border-radius: 8px;
}

html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .item-source-product-media .bomsync-icon-btn:hover,
html[data-bomsync-theme-preview="dark"] .item-source-product-media .bomsync-icon-btn:hover,
html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .isp-coach__toggle:hover,
html[data-bomsync-theme-preview="dark"] .isp-coach__toggle:hover,
html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .item-image-viewer-shell .bomsync-icon-btn:hover,
html[data-bomsync-theme-preview="dark"] .item-image-viewer-shell .bomsync-icon-btn:hover {
    border-color: var(--bs-cyan, #6ad7ff);
    background: color-mix(in srgb, var(--bs-cyan, #6ad7ff) 22%, #152033);
    color: var(--bs-cyan, #6ad7ff);
}

/* Shared-catalog action chips — readable on Dark */
html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .isp-catalog-links__label,
html[data-bomsync-theme-preview="dark"] .isp-catalog-links__label {
    color: var(--bomsync-text-secondary, #9DB4CC);
}

html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .isp-catalog-btn,
html[data-bomsync-theme-preview="dark"] .isp-catalog-btn {
    border-color: color-mix(in srgb, var(--bs-cyan, #6ad7ff) 45%, #3A4F6A) !important;
    color: var(--bomsync-on-dark-text, #E8EDF5) !important;
    background: color-mix(in srgb, var(--bs-cyan, #6ad7ff) 12%, #152033) !important;
}

html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .isp-catalog-btn:hover,
html[data-bomsync-theme-preview="dark"] .isp-catalog-btn:hover,
html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .isp-catalog-btn:focus-visible,
html[data-bomsync-theme-preview="dark"] .isp-catalog-btn:focus-visible {
    border-color: var(--bs-cyan, #6ad7ff) !important;
    color: var(--bs-cyan, #6ad7ff) !important;
    background: color-mix(in srgb, var(--bs-cyan, #6ad7ff) 20%, #152033) !important;
}

/* Confirm Offers — Dark elevated chrome (inbox filter bar, heads, chips) */
html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .confirm-offers-page,
html[data-bomsync-theme-preview="dark"] .confirm-offers-page {
    --co-ink: #E3EAF2;
    --co-muted: #9DB4CC;
    --co-line: #3A4F6A;
    --co-surface: #152033;
    --co-head-bg: #1A2638;
    --co-head-rule: #3A4F6A;
    --co-ok-bg: color-mix(in srgb, #1E7145 28%, #152838);
    --co-ok-fg: #9ED9B5;
    --co-adj-bg: color-mix(in srgb, #2F6690 22%, #152838);
    --co-adj-fg: #8FB8DE;
    --co-sent-bg: color-mix(in srgb, #2F6690 28%, #152838);
    --co-sent-fg: #A8C8E8;
    --co-resp-bg: color-mix(in srgb, #015F78 32%, #152838);
    --co-resp-fg: #7ED4E8;
    --co-warn-bg: color-mix(in srgb, #2F6690 22%, #152838);
    --co-warn-fg: #8FB8DE;
    --co-muted-chip-bg: color-mix(in srgb, #9DB4CC 16%, #152033);
    --co-muted-chip-fg: #C9D6E3;
}

html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .confirm-offers-page .co-inbox__filters,
html[data-bomsync-theme-preview="dark"] .confirm-offers-page .co-inbox__filters {
    background: var(--co-surface);
    border-bottom-color: var(--co-line);
}

html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .confirm-offers-page .co-inbox__count,
html[data-bomsync-theme-preview="dark"] .confirm-offers-page .co-inbox__count {
    background: color-mix(in srgb, #6ad7ff 12%, #1A2638);
    border-color: #3A4F6A;
    color: #E8EDF5;
}

html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .confirm-offers-page .co-inbox__table thead th,
html[data-bomsync-theme-preview="dark"] .confirm-offers-page .co-inbox__table thead th {
    background: color-mix(in srgb, #1A2638 88%, #0F1724);
    color: var(--co-muted);
}

html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .confirm-offers-page .co-inbox__table tbody tr.is-selected,
html[data-bomsync-theme-preview="dark"] .confirm-offers-page .co-inbox__table tbody tr.is-selected {
    background: color-mix(in srgb, #015F78 28%, #152033);
    box-shadow: inset 3px 0 0 #6ad7ff;
}

html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .confirm-offers-page .co-detail__close,
html[data-bomsync-theme-preview="dark"] .confirm-offers-page .co-detail__close {
    background: color-mix(in srgb, #9DB4CC 12%, #1A2638);
    border-color: #3A4F6A;
    color: #E8EDF5;
}

html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .confirm-offers-page .co-detail__close:hover,
html[data-bomsync-theme-preview="dark"] .confirm-offers-page .co-detail__close:hover {
    background: color-mix(in srgb, #6ad7ff 16%, #1A2638);
    border-color: #6ad7ff;
    color: #6ad7ff;
}

html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .confirm-offers-page .co-chip--rejected,
html[data-bomsync-theme-preview="dark"] .confirm-offers-page .co-chip--rejected,
html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .confirm-offers-page .co-chip--discontinued,
html[data-bomsync-theme-preview="dark"] .confirm-offers-page .co-chip--discontinued,
html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .confirm-offers-page .co-chip--unavailable,
html[data-bomsync-theme-preview="dark"] .confirm-offers-page .co-chip--unavailable,
html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .confirm-offers-page .co-chip--expired,
html[data-bomsync-theme-preview="dark"] .confirm-offers-page .co-chip--expired {
    background: color-mix(in srgb, #B42318 22%, #152838);
    color: #F0A8A0;
    border-color: rgb(180 35 24 / 0.35);
}

html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .om-chip-warn,
html[data-bomsync-theme-preview="dark"] .om-chip-warn,
html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .om-dirty,
html[data-bomsync-theme-preview="dark"] .om-dirty,
html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .om-soon,
html[data-bomsync-theme-preview="dark"] .om-soon {
    background: color-mix(in srgb, #2F6690 22%, #152838);
    color: #8FB8DE;
}

html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .isp-card__gap,
html[data-bomsync-theme-preview="dark"] .isp-card__gap {
    background: color-mix(in srgb, #2F6690 22%, #152838) !important;
    color: #8FB8DE !important;
}

html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .om-toolbar,
html[data-bomsync-theme-preview="dark"] .om-toolbar,
html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .om-views,
html[data-bomsync-theme-preview="dark"] .om-views,
html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .om-basis,
html[data-bomsync-theme-preview="dark"] .om-basis {
    background: #152033;
    border-color: #3A4F6A;
    color: #E3EAF2;
}

html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .om-tab,
html[data-bomsync-theme-preview="dark"] .om-tab {
    color: #9DB4CC;
}

html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .om-tab.is-on,
html[data-bomsync-theme-preview="dark"] .om-tab.is-on {
    background: #1A2638;
    color: #E8EDF5;
    box-shadow: inset 0 -3px 0 #6ad7ff;
}

html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .om-seg.e-btn,
html[data-bomsync-theme-preview="dark"] .om-seg.e-btn,
html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .om-seg.e-control.e-btn,
html[data-bomsync-theme-preview="dark"] .om-seg.e-control.e-btn {
    background: #1A2638 !important;
    border-color: #4A6280 !important;
    color: #E3EAF2 !important;
}

html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .om-seg.e-btn.is-on,
html[data-bomsync-theme-preview="dark"] .om-seg.e-btn.is-on {
    background: #2F6690 !important;
    border-color: #2F6690 !important;
    color: #fff !important;
}

.bomsync-theme-preview-bar {
    position: sticky;
    top: 0;
    z-index: 1040;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
    padding: 8px 12px;
    margin: 0 0 10px;
    border-radius: 10px;
    background: #111B2C;
    border: 1px solid rgb(106 215 255 / 0.35);
    color: #E8EDF5;
    box-shadow: 0 4px 16px rgb(17 27 44 / 0.35);
}

.bomsync-theme-preview-bar__label {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #6ad7ff;
}

.bomsync-theme-preview-bar__hint {
    flex: 1 1 12rem;
    font-size: 0.86rem;
    color: #C9D6E3;
    min-width: 10rem;
}

.bomsync-theme-preview-bar__seg {
    display: inline-flex;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgb(255 255 255 / 0.28);
}

.bomsync-theme-preview-bar__btn {
    border: 0;
    background: transparent;
    color: #E8EDF5;
    font-weight: 600;
    font-size: 0.84rem;
    padding: 6px 12px;
    min-height: 32px;
    cursor: pointer;
}

.bomsync-theme-preview-bar__btn.is-active {
    background: #2F6690;
    color: #fff;
}

.bomsync-theme-preview-bar__link {
    color: #6ad7ff;
    font-size: 0.84rem;
    font-weight: 600;
    text-decoration: none;
}

.bomsync-theme-preview-bar__link:hover {
    text-decoration: underline;
}

/* Profile dropdown — readable on dark product / preview wash */
html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .user-menu-dropdown,
html[data-bomsync-theme-preview="dark"] .user-menu-dropdown {
    background: #1A2638;
    border-color: #3A4F6A;
    box-shadow: 0 8px 28px rgb(0 0 0 / 0.45);
}

html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .user-menu-display-name,
html[data-bomsync-theme-preview="dark"] .user-menu-display-name,
html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .user-menu-item,
html[data-bomsync-theme-preview="dark"] .user-menu-item,
html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .user-menu-theme__label,
html[data-bomsync-theme-preview="dark"] .user-menu-theme__label,
html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .user-menu-theme__btn,
html[data-bomsync-theme-preview="dark"] .user-menu-theme__btn {
    color: #E3EAF2;
}

html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .user-menu-divider,
html[data-bomsync-theme-preview="dark"] .user-menu-divider {
    background: #3A4F6A;
}

html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .user-menu-item:hover,
html[data-bomsync-theme-preview="dark"] .user-menu-item:hover,
html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .user-menu-theme__btn:hover,
html[data-bomsync-theme-preview="dark"] .user-menu-theme__btn:hover {
    background: #24344a;
    color: #6ad7ff;
}

html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .user-menu-item i,
html[data-bomsync-theme-preview="dark"] .user-menu-item i,
html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .user-menu-theme__label i,
html[data-bomsync-theme-preview="dark"] .user-menu-theme__label i {
    color: #9DB4CC;
}

html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .user-menu-theme__seg,
html[data-bomsync-theme-preview="dark"] .user-menu-theme__seg {
    border-color: #3A4F6A;
}

html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .user-menu-avatar,
html[data-bomsync-theme-preview="dark"] .user-menu-avatar {
    border-color: #3A4F6A;
}

/* Profile Default appearance segment (same language as preview / dropdown) */
.bomsync-theme-pref-seg {
    display: inline-flex;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--bomsync-border-strong, #ced4da);
}

.bomsync-theme-pref-seg__btn {
    border: 0;
    background: transparent;
    color: var(--bomsync-text-primary, #343a40);
    font-weight: 600;
    font-size: 0.9rem;
    padding: 8px 16px;
    min-height: 36px;
    cursor: pointer;
}

.bomsync-theme-pref-seg__btn.is-active {
    background: #2F6690;
    color: #fff;
}

html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .bomsync-theme-pref-seg,
html[data-bomsync-theme-preview="dark"] .bomsync-theme-pref-seg {
    border-color: #3A4F6A;
}

html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .bomsync-theme-pref-seg__btn,
html[data-bomsync-theme-preview="dark"] .bomsync-theme-pref-seg__btn {
    color: #E3EAF2;
}

/* ===== Catalog dashboards (/dashboard/projects) — Dark contrast =====
 * Status/drawer used light elevated surfaces while Dark forced .bomsync-copy-lead
 * to #9DB4CC (higher specificity than catalog status) → washed text on white.
 * Align elevated + fonts with SfGrid dark pack / lifted wash. */
html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]),
html[data-bomsync-theme-preview="dark"] {
    --bomsync-elevated-surface: #152033;
    --bomsync-brand-subtle: #1A2638;
    --bomsync-brand-subtle-2: #243247;
    --bomsync-text: #E3EAF2;
    --bomsync-text-primary: #E3EAF2;
    --bomsync-text-secondary: #C9D6E3;
    --bomsync-text-muted: #9DB4CC;
    --bomsync-border: #3A4F6A;
    --bomsync-border-muted: #3A4F6A;
    --bomsync-border-strong: #4A6280;
    --text-primary: #E3EAF2;
    --text-secondary: #C9D6E3;
    --text-muted: #9DB4CC;
}

html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .bomsync-catalog-status,
html[data-bomsync-theme-preview="dark"] .bomsync-catalog-status {
    background: #152033;
    border-color: #3A4F6A;
    color: #E3EAF2;
}

html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .bomsync-catalog-status .bomsync-copy-lead,
html[data-bomsync-theme-preview="dark"] .bomsync-catalog-status .bomsync-copy-lead,
html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .bomsync-catalog-status p,
html[data-bomsync-theme-preview="dark"] .bomsync-catalog-status p,
html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .bomsync-catalog-status strong,
html[data-bomsync-theme-preview="dark"] .bomsync-catalog-status strong {
    color: #E3EAF2 !important;
}

html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .bomsync-catalog-drawer,
html[data-bomsync-theme-preview="dark"] .bomsync-catalog-drawer {
    background: #152033;
    border-color: #3A4F6A;
    color: #E3EAF2;
}

html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .bomsync-catalog-drawer__title,
html[data-bomsync-theme-preview="dark"] .bomsync-catalog-drawer__title,
html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .bomsync-catalog-facts dd,
html[data-bomsync-theme-preview="dark"] .bomsync-catalog-facts dd,
html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .bomsync-catalog-att__t,
html[data-bomsync-theme-preview="dark"] .bomsync-catalog-att__t,
html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .bomsync-catalog-att__t strong,
html[data-bomsync-theme-preview="dark"] .bomsync-catalog-att__t strong,
html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .bomsync-catalog-att strong,
html[data-bomsync-theme-preview="dark"] .bomsync-catalog-att strong {
    color: #E3EAF2 !important;
}

html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .bomsync-catalog-drawer__eyebrow,
html[data-bomsync-theme-preview="dark"] .bomsync-catalog-drawer__eyebrow,
html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .bomsync-catalog-facts dt,
html[data-bomsync-theme-preview="dark"] .bomsync-catalog-facts dt,
html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .bomsync-catalog-drawer .mono.sub,
html[data-bomsync-theme-preview="dark"] .bomsync-catalog-drawer .mono.sub,
html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .bomsync-catalog-drawer .text-muted,
html[data-bomsync-theme-preview="dark"] .bomsync-catalog-drawer .text-muted,
html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .bomsync-catalog-att p,
html[data-bomsync-theme-preview="dark"] .bomsync-catalog-att p {
    color: #C9D6E3 !important;
}

html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .bomsync-catalog-facts,
html[data-bomsync-theme-preview="dark"] .bomsync-catalog-facts,
html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .bomsync-catalog-facts > div,
html[data-bomsync-theme-preview="dark"] .bomsync-catalog-facts > div {
    border-color: #3A4F6A;
}

html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .bomsync-catalog-drawer--empty,
html[data-bomsync-theme-preview="dark"] .bomsync-catalog-drawer--empty {
    background: #1A2638;
    border-color: #3A4F6A;
}

html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .bomsync-catalog-drawer__empty p,
html[data-bomsync-theme-preview="dark"] .bomsync-catalog-drawer__empty p {
    color: #C9D6E3 !important;
}

/* ===== Sticky toolbar + Domain/Workspace segment (Dark) =====
 * Geoffrey freeze override 2026-10-11 — stickybar Dark contrast + Domain/Workspace spacing only.
 * Allowed: sticky header / Domain·Workspace chrome / username / section icon / docked menu icon+text contrast.
 * Forbidden: navmenu.module.js, ShellNavMenu lifecycle/SfMenu/SfSidebar params, flyout teardown. */
html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .sticky-toolbar,
html[data-bomsync-theme-preview="dark"] .sticky-toolbar,
html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) #wrapper .sticky-toolbar.e-toolbar,
html[data-bomsync-theme-preview="dark"] #wrapper .sticky-toolbar.e-toolbar {
    background-color: #1A2638 !important;
    background: #1A2638 !important;
    border-bottom: 1px solid #3A4F6A;
    color: var(--bomsync-on-dark-text, #e8edf5);
}

html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .sticky-toolbar .e-toolbar-item .e-tbar-btn,
html[data-bomsync-theme-preview="dark"] .sticky-toolbar .e-toolbar-item .e-tbar-btn,
html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .sticky-toolbar .e-icons,
html[data-bomsync-theme-preview="dark"] .sticky-toolbar .e-icons {
    color: var(--bomsync-on-dark-text, #e8edf5) !important;
}

/* Dark: 1px temperature-white border on sticky Syncfusion icon toolbar buttons */
html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .sticky-toolbar .e-toolbar-item .e-tbar-btn,
html[data-bomsync-theme-preview="dark"] .sticky-toolbar .e-toolbar-item .e-tbar-btn {
    border: 1px solid rgb(232 237 245 / 0.55) !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* 1) 5px gap from hamburger → Domain/Workspace; match hamburger square height (all themes) */
.sticky-toolbar .e-toolbar-items > .e-toolbar-item:has(.e-icons.e-menu) {
    margin-inline-end: 0 !important;
    padding-inline-end: 0 !important;
}

.sticky-toolbar .e-toolbar-items > .e-toolbar-item:has(.nav-mode-segment) {
    margin-inline-start: 5px !important;
    padding-inline-start: 0 !important;
}

.sticky-toolbar .e-toolbar-items > .e-toolbar-item:has(.e-icons.e-menu) .e-tbar-btn,
.sticky-toolbar .nav-mode-segment .e-btn,
.sticky-toolbar .nav-mode-segment .e-control.e-btn {
    box-sizing: border-box !important;
    height: 30px !important;
    min-height: 30px !important;
    max-height: 30px !important;
}

.sticky-toolbar .nav-mode-segment {
    display: inline-flex !important;
    align-items: stretch !important;
    height: 30px !important;
}

.sticky-toolbar .nav-mode-segment .e-btn,
.sticky-toolbar .nav-mode-segment .e-control.e-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    line-height: 1 !important;
    padding-block: 0 !important;
}

html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .nav-mode-segment .e-btn.e-outline,
html[data-bomsync-theme-preview="dark"] .nav-mode-segment .e-btn.e-outline,
html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .nav-mode-segment .e-control.e-btn.e-outline,
html[data-bomsync-theme-preview="dark"] .nav-mode-segment .e-control.e-btn.e-outline {
    color: var(--bomsync-on-dark-text, #e8edf5) !important;
    border-color: #4A6280 !important;
    background: transparent !important;
    background-color: transparent !important;
}

html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .nav-mode-segment .e-btn.e-outline:hover,
html[data-bomsync-theme-preview="dark"] .nav-mode-segment .e-btn.e-outline:hover {
    color: #fff !important;
    border-color: var(--bs-cyan, #6ad7ff) !important;
    background: rgb(106 215 255 / 0.12) !important;
}

html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .nav-mode-segment .e-btn.e-primary,
html[data-bomsync-theme-preview="dark"] .nav-mode-segment .e-btn.e-primary {
    color: #fff !important;
    background: #2F6690 !important;
    border-color: #2F6690 !important;
}

/* 2) Dashboard / section leading icon — cyan on Dark sticky bar (was faint) */
html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .sticky-toolbar .navigation-title,
html[data-bomsync-theme-preview="dark"] .sticky-toolbar .navigation-title {
    color: var(--bomsync-on-dark-text, #e8edf5) !important;
}

html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .sticky-toolbar .navigation-title > i,
html[data-bomsync-theme-preview="dark"] .sticky-toolbar .navigation-title > i,
html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .sticky-toolbar .navigation-title .bi,
html[data-bomsync-theme-preview="dark"] .sticky-toolbar .navigation-title .bi,
html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .sticky-toolbar .navigation-title .e-icons,
html[data-bomsync-theme-preview="dark"] .sticky-toolbar .navigation-title .e-icons {
    color: var(--bs-cyan, #6ad7ff) !important;
    opacity: 1 !important;
}

html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .sticky-toolbar .navigation-title span,
html[data-bomsync-theme-preview="dark"] .sticky-toolbar .navigation-title span {
    color: var(--bs-cyan, #6ad7ff) !important;
}

/* 3) Username on Dark sticky bar — on-dark text (overrides layout.css #333) */
html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .sticky-toolbar .user-name,
html[data-bomsync-theme-preview="dark"] .sticky-toolbar .user-name,
html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .sticky-toolbar .user-menu-trigger,
html[data-bomsync-theme-preview="dark"] .sticky-toolbar .user-menu-trigger,
html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .sticky-toolbar .user-menu-caret,
html[data-bomsync-theme-preview="dark"] .sticky-toolbar .user-menu-caret {
    color: var(--bomsync-on-dark-text, #e8edf5) !important;
}

/* 4) Docked sidebar + portaled menu flyout Dark contrast → sidebar-overrides.css
 * (loads after Fluent2 / this file so contrast wins; keep sticky-only rules here). */

/* Task Management filter/calendar band — kill hard-coded light washes under Dark fonts */
html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .task-management-page .task-mgmt-filter-band,
html[data-bomsync-theme-preview="dark"] .task-management-page .task-mgmt-filter-band,
html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .task-management-page .bg-white,
html[data-bomsync-theme-preview="dark"] .task-management-page .bg-white {
    background: #152033 !important;
    background-color: #152033 !important;
    color: #E3EAF2 !important;
    border-color: #3A4F6A !important;
}

html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .task-management-page .task-mgmt-filter-band h4,
html[data-bomsync-theme-preview="dark"] .task-management-page .task-mgmt-filter-band h4,
html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .task-management-page .task-mgmt-filter-band .form-label,
html[data-bomsync-theme-preview="dark"] .task-management-page .task-mgmt-filter-band .form-label,
html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .task-management-page .task-mgmt-filter-band strong,
html[data-bomsync-theme-preview="dark"] .task-management-page .task-mgmt-filter-band strong {
    color: #E3EAF2 !important;
}

/* Task Management left filter drawer + Unplanned panel — elevated Dark, not Syncfusion white + cyan text */
html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .task-management-page .task-mgmt-flyout-sidebar.e-sidebar,
html[data-bomsync-theme-preview="dark"] .task-management-page .task-mgmt-flyout-sidebar.e-sidebar,
html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .task-management-page .task-mgmt-flyout-sidebar.e-sidebar .e-sidebar-content,
html[data-bomsync-theme-preview="dark"] .task-management-page .task-mgmt-flyout-sidebar.e-sidebar .e-sidebar-content,
html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .task-management-page .task-mgmt-filter-sidebar-inner,
html[data-bomsync-theme-preview="dark"] .task-management-page .task-mgmt-filter-sidebar-inner,
html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .task-management-page .task-mgmt-unplanned-panel,
html[data-bomsync-theme-preview="dark"] .task-management-page .task-mgmt-unplanned-panel {
    background: #152033 !important;
    background-color: #152033 !important;
    color: #E3EAF2 !important;
    border-color: #3A4F6A !important;
}

html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .task-management-page .task-mgmt-filter-sidebar__title,
html[data-bomsync-theme-preview="dark"] .task-management-page .task-mgmt-filter-sidebar__title,
html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .task-management-page .task-mgmt-filter-sidebar__label,
html[data-bomsync-theme-preview="dark"] .task-management-page .task-mgmt-filter-sidebar__label,
html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .task-management-page .task-mgmt-filter-sidebar__label strong,
html[data-bomsync-theme-preview="dark"] .task-management-page .task-mgmt-filter-sidebar__label strong,
html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .task-management-page .task-mgmt-unplanned-panel__title,
html[data-bomsync-theme-preview="dark"] .task-management-page .task-mgmt-unplanned-panel__title,
html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .task-management-page .task-mgmt-filter-sidebar__progress-title,
html[data-bomsync-theme-preview="dark"] .task-management-page .task-mgmt-filter-sidebar__progress-title {
    color: #E3EAF2 !important;
}

/* Left-rail chrome title — ACTIVITY eyebrow cyan (wins over __title white). */
html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .task-management-page .task-mgmt-filter-sidebar__chrome-title,
html[data-bomsync-theme-preview="dark"] .task-management-page .task-mgmt-filter-sidebar__chrome-title {
    color: #6ad7ff !important;
}

/* Left-rail + Task Details close — white X, thin white rounded border, transparent fill. */
html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .task-management-page .task-mgmt-filter-sidebar__close,
html[data-bomsync-theme-preview="dark"] .task-management-page .task-mgmt-filter-sidebar__close,
html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .task-management-page .task-mgmt-detail-close-btn,
html[data-bomsync-theme-preview="dark"] .task-management-page .task-mgmt-detail-close-btn {
    background: transparent !important;
    background-color: transparent !important;
    border: 1px solid #E8EDF5 !important;
    color: #E8EDF5 !important;
    box-shadow: none !important;
}

html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .task-management-page .task-mgmt-filter-sidebar__close:hover,
html[data-bomsync-theme-preview="dark"] .task-management-page .task-mgmt-filter-sidebar__close:hover,
html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .task-management-page .task-mgmt-detail-close-btn:hover,
html[data-bomsync-theme-preview="dark"] .task-management-page .task-mgmt-detail-close-btn:hover {
    background: rgb(106 215 255 / 0.1) !important;
    border-color: #6ad7ff !important;
    color: #E8EDF5 !important;
}

html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .task-management-page .task-mgmt-filter-sidebar__help,
html[data-bomsync-theme-preview="dark"] .task-management-page .task-mgmt-filter-sidebar__help,
html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .task-management-page .task-mgmt-filter-sidebar__coach,
html[data-bomsync-theme-preview="dark"] .task-management-page .task-mgmt-filter-sidebar__coach,
html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .task-management-page .task-mgmt-filter-sidebar__stats-body,
html[data-bomsync-theme-preview="dark"] .task-management-page .task-mgmt-filter-sidebar__stats-body,
html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .task-management-page .task-mgmt-filter-sidebar-inner .bomsync-copy-lead,
html[data-bomsync-theme-preview="dark"] .task-management-page .task-mgmt-filter-sidebar-inner .bomsync-copy-lead {
    color: #C9D6E3 !important;
}

html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .task-management-page .task-mgmt-filter-sidebar__clear.e-outline,
html[data-bomsync-theme-preview="dark"] .task-management-page .task-mgmt-filter-sidebar__clear.e-outline {
    color: #E3EAF2 !important;
    border-color: #6ad7ff !important;
    background: transparent !important;
}

html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .task-management-page .task-mgmt-filter-sidebar__progress,
html[data-bomsync-theme-preview="dark"] .task-management-page .task-mgmt-filter-sidebar__progress {
    background: #1A2638 !important;
    border-color: #3A4F6A !important;
}

/* Left rail continuity — activity slot + Task Progress band stay navy (no white gap above heading). */
html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .task-management-page .task-mgmt-filter-sidebar__activity,
html[data-bomsync-theme-preview="dark"] .task-management-page .task-mgmt-filter-sidebar__activity,
html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .task-management-page .task-mgmt-activity-feed-slot,
html[data-bomsync-theme-preview="dark"] .task-management-page .task-mgmt-activity-feed-slot,
html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .task-management-page .task-mgmt-filter-sidebar__progress-section,
html[data-bomsync-theme-preview="dark"] .task-management-page .task-mgmt-filter-sidebar__progress-section {
    background: #152033 !important;
    background-color: #152033 !important;
    color: #E3EAF2 !important;
}

html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .task-management-page .task-mgmt-filter-sidebar__progress-section .task-mgmt-filter-sidebar__title,
html[data-bomsync-theme-preview="dark"] .task-management-page .task-mgmt-filter-sidebar__progress-section .task-mgmt-filter-sidebar__title {
    color: #E3EAF2 !important;
}

/* Activity feed cards — Dark elevated (never cream fill + soft grey text). */
html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .activity-feed-container,
html[data-bomsync-theme-preview="dark"] .activity-feed-container,
html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .task-management-page .activity-feed-container--compact,
html[data-bomsync-theme-preview="dark"] .task-management-page .activity-feed-container--compact {
    background-color: #152033 !important;
    background-image: linear-gradient(#152033, #152033) !important;
    background-attachment: local !important;
    background-clip: border-box !important;
    border-color: #3A4F6A !important;
    color: #E3EAF2 !important;
    color-scheme: dark;
    scrollbar-gutter: auto !important;
    scrollbar-width: thin;
    scrollbar-color: #4A6280 #152033;
}

/* Filter-rail + feed scroll tracks — kill Fluent2 / OS light gutters (white vertical bars mid-scroll). */
html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .task-management-page .task-mgmt-flyout-sidebar,
html[data-bomsync-theme-preview="dark"] .task-management-page .task-mgmt-flyout-sidebar,
html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .task-management-page .task-mgmt-flyout-sidebar .e-sidebar-content,
html[data-bomsync-theme-preview="dark"] .task-management-page .task-mgmt-flyout-sidebar .e-sidebar-content,
html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .task-management-page .task-mgmt-filter-sidebar-inner,
html[data-bomsync-theme-preview="dark"] .task-management-page .task-mgmt-filter-sidebar-inner {
    color-scheme: dark;
    scrollbar-color: #4A6280 #152033;
}

html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .task-management-page .activity-feed-container--compact::-webkit-scrollbar,
html[data-bomsync-theme-preview="dark"] .task-management-page .activity-feed-container--compact::-webkit-scrollbar,
html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .task-management-page .task-mgmt-flyout-sidebar .e-sidebar-content::-webkit-scrollbar,
html[data-bomsync-theme-preview="dark"] .task-management-page .task-mgmt-flyout-sidebar .e-sidebar-content::-webkit-scrollbar {
    width: 10px;
    height: 10px;
    background: #152033;
}

html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .task-management-page .activity-feed-container--compact::-webkit-scrollbar-track,
html[data-bomsync-theme-preview="dark"] .task-management-page .activity-feed-container--compact::-webkit-scrollbar-track,
html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .task-management-page .task-mgmt-flyout-sidebar .e-sidebar-content::-webkit-scrollbar-track,
html[data-bomsync-theme-preview="dark"] .task-management-page .task-mgmt-flyout-sidebar .e-sidebar-content::-webkit-scrollbar-track,
html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .task-management-page .activity-feed-container--compact::-webkit-scrollbar-corner,
html[data-bomsync-theme-preview="dark"] .task-management-page .activity-feed-container--compact::-webkit-scrollbar-corner {
    background: #152033 !important;
    background-color: #152033 !important;
}

html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .task-management-page .activity-feed-container--compact::-webkit-scrollbar-thumb,
html[data-bomsync-theme-preview="dark"] .task-management-page .activity-feed-container--compact::-webkit-scrollbar-thumb,
html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .task-management-page .task-mgmt-flyout-sidebar .e-sidebar-content::-webkit-scrollbar-thumb,
html[data-bomsync-theme-preview="dark"] .task-management-page .task-mgmt-flyout-sidebar .e-sidebar-content::-webkit-scrollbar-thumb {
    background: #4A6280;
    border-radius: 6px;
    border: 2px solid #152033;
}

html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .activity-feed-list,
html[data-bomsync-theme-preview="dark"] .activity-feed-list,
html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .task-management-page .activity-feed-list,
html[data-bomsync-theme-preview="dark"] .task-management-page .activity-feed-list {
    background-color: #152033 !important;
    min-height: 100%;
}

html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .activity-feed-card,
html[data-bomsync-theme-preview="dark"] .activity-feed-card {
    background: #1A2638 !important;
    background-color: #1A2638 !important;
    border-color: #3A4F6A !important;
    color: #E3EAF2 !important;
}

html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .activity-feed-card:hover,
html[data-bomsync-theme-preview="dark"] .activity-feed-card:hover {
    background-color: #243247 !important;
    box-shadow: 0 1px 4px rgb(0 0 0 / 0.35);
}

html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .activity-feed-card--unread,
html[data-bomsync-theme-preview="dark"] .activity-feed-card--unread {
    /* Cool cyan unread wash — replaces warm cream rgb(255 243 205 / 0.45). */
    background-color: color-mix(in srgb, #6ad7ff 14%, #1A2638) !important;
    border-left-color: #6ad7ff !important;
}

html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .activity-feed-card__who,
html[data-bomsync-theme-preview="dark"] .activity-feed-card__who {
    color: #E3EAF2 !important;
}

html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .activity-feed-card__summary,
html[data-bomsync-theme-preview="dark"] .activity-feed-card__summary {
    color: #C9D6E3 !important;
}

html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .activity-feed-card .text-muted,
html[data-bomsync-theme-preview="dark"] .activity-feed-card .text-muted,
html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .activity-feed-card__when,
html[data-bomsync-theme-preview="dark"] .activity-feed-card__when,
html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .activity-feed-card__stamp,
html[data-bomsync-theme-preview="dark"] .activity-feed-card__stamp,
html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .activity-feed-container .text-muted,
html[data-bomsync-theme-preview="dark"] .activity-feed-container .text-muted {
    color: #C9D6E3 !important;
}

/* Gantt toolbar Reset — not a grey mystery control on Dark. */
html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .task-management-page .task-mgmt-gantt-reset-btn,
html[data-bomsync-theme-preview="dark"] .task-management-page .task-mgmt-gantt-reset-btn {
    background: #1A2638 !important;
    border-color: #6ad7ff !important;
    color: #E3EAF2 !important;
}

html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .task-management-page .task-mgmt-gantt-reset-btn:hover:not(:disabled),
html[data-bomsync-theme-preview="dark"] .task-management-page .task-mgmt-gantt-reset-btn:hover:not(:disabled) {
    background: rgb(106 215 255 / 0.14) !important;
    border-color: #6ad7ff !important;
    color: #E8EDF5 !important;
}

html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .task-management-page .task-mgmt-gantt-reset-btn:disabled,
html[data-bomsync-theme-preview="dark"] .task-management-page .task-mgmt-gantt-reset-btn:disabled {
    background: #152033 !important;
    border-color: #3A4F6A !important;
    color: #9DB4CC !important;
    opacity: 0.7;
}

/* Gantt left-rail View glass stays readable on Dark grid chrome. */
html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .task-management-page .task-mgmt-gantt-view-btn,
html[data-bomsync-theme-preview="dark"] .task-management-page .task-mgmt-gantt-view-btn {
    color: #E3EAF2 !important;
}

/* Kanban: light board headers keep dark navy text (Dark --bomsync-text-primary washes to faint). */
html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .task-management-page .e-kanban .e-header-cells .e-header-text,
html[data-bomsync-theme-preview="dark"] .task-management-page .e-kanban .e-header-cells .e-header-text,
html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .task-management-page .e-kanban .e-header-cells .e-header-title,
html[data-bomsync-theme-preview="dark"] .task-management-page .e-kanban .e-header-cells .e-header-title,
html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .task-management-page .e-kanban .e-header-cells .e-item-count,
html[data-bomsync-theme-preview="dark"] .task-management-page .e-kanban .e-header-cells .e-item-count {
    color: #1b2b4b !important;
}

html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .task-management-page .task-mgmt-kanban-card-title,
html[data-bomsync-theme-preview="dark"] .task-management-page .task-mgmt-kanban-card-title,
html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .task-management-page .task-mgmt-kanban-progress-label,
html[data-bomsync-theme-preview="dark"] .task-management-page .task-mgmt-kanban-progress-label {
    color: #E3EAF2 !important;
}

html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .task-management-page .task-mgmt-kanban-card-desc,
html[data-bomsync-theme-preview="dark"] .task-management-page .task-mgmt-kanban-card-desc,
html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .task-management-page .task-mgmt-kanban-card-meta,
html[data-bomsync-theme-preview="dark"] .task-management-page .task-mgmt-kanban-card-meta {
    color: #C9D6E3 !important;
}

/* Submittal package board (/submittals/packages) — same Kanban contract as Task Management */
html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .swp-package-board .swp-package-kanban .e-header-cells .e-header-text,
html[data-bomsync-theme-preview="dark"] .swp-package-board .swp-package-kanban .e-header-cells .e-header-text,
html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .swp-package-board .swp-package-kanban .e-header-cells .e-header-title,
html[data-bomsync-theme-preview="dark"] .swp-package-board .swp-package-kanban .e-header-cells .e-header-title,
html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .swp-package-board .swp-package-kanban .e-header-cells .e-item-count,
html[data-bomsync-theme-preview="dark"] .swp-package-board .swp-package-kanban .e-header-cells .e-item-count {
    color: #1b2b4b !important;
}

html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .swp-package-board .swp-kanban-card__title,
html[data-bomsync-theme-preview="dark"] .swp-package-board .swp-kanban-card__title {
    color: #E3EAF2 !important;
}

html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .swp-package-board .swp-kanban-card__notes,
html[data-bomsync-theme-preview="dark"] .swp-package-board .swp-kanban-card__notes,
html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .swp-package-board .swp-kanban-card__due,
html[data-bomsync-theme-preview="dark"] .swp-package-board .swp-kanban-card__due {
    color: #C9D6E3 !important;
}

html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .swp-package-board .swp-kanban-card__due--overdue,
html[data-bomsync-theme-preview="dark"] .swp-package-board .swp-kanban-card__due--overdue {
    color: #FFD6DC !important;
}

/* Edit Work Item dialog — elevate Dark chrome; kill light Syncfusion shell + cyan-on-white help */
html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .work-item-add-edit-dialog.e-dialog,
html[data-bomsync-theme-preview="dark"] .work-item-add-edit-dialog.e-dialog,
html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .e-dialog.work-item-add-edit-dialog,
html[data-bomsync-theme-preview="dark"] .e-dialog.work-item-add-edit-dialog {
    background: #152033 !important;
    border-color: #3A4F6A !important;
    color: #E3EAF2 !important;
}

html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .work-item-add-edit-dialog .e-dlg-header,
html[data-bomsync-theme-preview="dark"] .work-item-add-edit-dialog .e-dlg-header,
html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .work-item-add-edit-dialog .e-dlg-content,
html[data-bomsync-theme-preview="dark"] .work-item-add-edit-dialog .e-dlg-content,
html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .work-item-add-edit-dialog .e-footer-content,
html[data-bomsync-theme-preview="dark"] .work-item-add-edit-dialog .e-footer-content,
html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .work-item-add-edit-dialog .work-item-dialog-scroll,
html[data-bomsync-theme-preview="dark"] .work-item-add-edit-dialog .work-item-dialog-scroll {
    background: #152033 !important;
    color: #E3EAF2 !important;
    border-color: #3A4F6A !important;
}

html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .work-item-add-edit-dialog .work-item-dialog-section-title,
html[data-bomsync-theme-preview="dark"] .work-item-add-edit-dialog .work-item-dialog-section-title,
html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .work-item-add-edit-dialog label,
html[data-bomsync-theme-preview="dark"] .work-item-add-edit-dialog label,
html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .work-item-add-edit-dialog label strong,
html[data-bomsync-theme-preview="dark"] .work-item-add-edit-dialog label strong {
    color: #E3EAF2 !important;
}

html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .work-item-add-edit-dialog .work-item-dialog-section-band--muted,
html[data-bomsync-theme-preview="dark"] .work-item-add-edit-dialog .work-item-dialog-section-band--muted,
html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .work-item-add-edit-dialog .work-item-dialog-section-band--warm,
html[data-bomsync-theme-preview="dark"] .work-item-add-edit-dialog .work-item-dialog-section-band--warm {
    background: #1A2638 !important;
    border-color: #3A4F6A !important;
}

html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .work-item-add-edit-dialog .work-item-dialog-help,
html[data-bomsync-theme-preview="dark"] .work-item-add-edit-dialog .work-item-dialog-help,
html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .work-item-add-edit-dialog .text-muted,
html[data-bomsync-theme-preview="dark"] .work-item-add-edit-dialog .text-muted,
html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .work-item-add-edit-dialog .bomsync-copy-lead,
html[data-bomsync-theme-preview="dark"] .work-item-add-edit-dialog .bomsync-copy-lead {
    color: #C9D6E3 !important;
}

html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .work-item-add-edit-dialog .work-item-parent-tree,
html[data-bomsync-theme-preview="dark"] .work-item-add-edit-dialog .work-item-parent-tree {
    background: #1A2638 !important;
    border-color: #3A4F6A !important;
    color: #E3EAF2 !important;
}

html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .work-item-add-edit-dialog .work-item-parent-tree .e-list-text,
html[data-bomsync-theme-preview="dark"] .work-item-add-edit-dialog .work-item-parent-tree .e-list-text,
html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .work-item-add-edit-dialog .work-item-parent-tree .e-text-content,
html[data-bomsync-theme-preview="dark"] .work-item-add-edit-dialog .work-item-parent-tree .e-text-content {
    color: #E3EAF2 !important;
}

html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .work-item-add-edit-dialog .e-footer-content .e-btn:not(.e-primary),
html[data-bomsync-theme-preview="dark"] .work-item-add-edit-dialog .e-footer-content .e-btn:not(.e-primary) {
    color: #E3EAF2 !important;
    border-color: #6ad7ff !important;
    background: transparent !important;
}

/* Edit dialog flag checkboxes — Syncfusion .e-label was near-invisible on Dark navy. */
html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .work-item-add-edit-dialog .work-item-dialog-flags .e-label,
html[data-bomsync-theme-preview="dark"] .work-item-add-edit-dialog .work-item-dialog-flags .e-label,
html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .work-item-add-edit-dialog .work-item-dialog-flags .e-checkbox-wrapper .e-label,
html[data-bomsync-theme-preview="dark"] .work-item-add-edit-dialog .work-item-dialog-flags .e-checkbox-wrapper .e-label,
html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .work-item-add-edit-dialog .e-checkbox-wrapper .e-label,
html[data-bomsync-theme-preview="dark"] .work-item-add-edit-dialog .e-checkbox-wrapper .e-label {
    color: #E3EAF2 !important;
    opacity: 1 !important;
}

html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .work-item-add-edit-dialog .work-item-custom-fields__remove,
html[data-bomsync-theme-preview="dark"] .work-item-add-edit-dialog .work-item-custom-fields__remove {
    color: #E8EDF5 !important;
    border-color: #E8EDF5 !important;
    background: transparent !important;
}

/* Submittals queues / alternates / transmittals — Dark contrast (no orange) */
html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .swp-work-list__head,
html[data-bomsync-theme-preview="dark"] .swp-work-list__head {
    color: #C9D6E3 !important;
    border-bottom-color: #3A4F6A !important;
}

html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .swp-work-list__row,
html[data-bomsync-theme-preview="dark"] .swp-work-list__row {
    color: #E3EAF2 !important;
    background: #1A2638 !important;
    border-bottom-color: #2E3F55 !important;
}

html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .swp-work-list__row:nth-child(even),
html[data-bomsync-theme-preview="dark"] .swp-work-list__row:nth-child(even) {
    background: #182636 !important;
}

html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .swp-work-link,
html[data-bomsync-theme-preview="dark"] .swp-work-link {
    color: #6ad7ff !important;
}

html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .swp-stage-note,
html[data-bomsync-theme-preview="dark"] .swp-stage-note {
    background: color-mix(in oklab, #6ad7ff 12%, #1A2638) !important;
    border-color: #3A4F6A !important;
    border-left-color: #6ad7ff !important;
    color: #C9D6E3 !important;
}

html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .swp-action-btn,
html[data-bomsync-theme-preview="dark"] .swp-action-btn {
    background: #1A2638 !important;
    border-color: #3A4F6A !important;
    color: #E3EAF2 !important;
}

html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .swp-action-btn.swp-action-btn--primary,
html[data-bomsync-theme-preview="dark"] .swp-action-btn.swp-action-btn--primary {
    background: #285F8A !important;
    border-color: #3A7AB0 !important;
    color: #E8EDF5 !important;
}

html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .bomsync-advisory-banner--warning,
html[data-bomsync-theme-preview="dark"] .bomsync-advisory-banner--warning {
    border-left-color: #6ad7ff !important;
    background: color-mix(in oklab, #6ad7ff 14%, #1A2638) !important;
    color: #E3EAF2 !important;
}

html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .bomsync-advisory-banner--info,
html[data-bomsync-theme-preview="dark"] .bomsync-advisory-banner--info {
    border-left-color: #4A7AB0 !important;
    background: color-mix(in oklab, #4A7AB0 16%, #1A2638) !important;
    color: #E3EAF2 !important;
}

html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .bomsync-advisory-banner__text,
html[data-bomsync-theme-preview="dark"] .bomsync-advisory-banner__text,
html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .bomsync-advisory-banner__icon,
html[data-bomsync-theme-preview="dark"] .bomsync-advisory-banner__icon {
    color: #C9D6E3 !important;
}

/* Task Management Calendar (SfSchedule) — Dark day headers + weekend/exception cells */
html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .task-management-page .calendar-container,
html[data-bomsync-theme-preview="dark"] .task-management-page .calendar-container,
html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .task-management-page .e-schedule,
html[data-bomsync-theme-preview="dark"] .task-management-page .e-schedule {
    background: #152033 !important;
    background-color: #152033 !important;
    color: #E3EAF2 !important;
    border-color: #3A4F6A !important;
}

/* SUNDAY–SATURDAY header row: on-dark labels (not medium-grey on navy). */
html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .task-management-page .e-schedule .e-month-view .e-header-cells,
html[data-bomsync-theme-preview="dark"] .task-management-page .e-schedule .e-month-view .e-header-cells,
html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .task-management-page .e-schedule .e-month-agenda-view .e-header-cells,
html[data-bomsync-theme-preview="dark"] .task-management-page .e-schedule .e-month-agenda-view .e-header-cells,
html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .task-management-page .e-schedule .e-date-header-wrap .e-header-cells,
html[data-bomsync-theme-preview="dark"] .task-management-page .e-schedule .e-date-header-wrap .e-header-cells {
    background: #1A2638 !important;
    background-color: #1A2638 !important;
    color: #E8EDF5 !important;
    border-color: #3A4F6A !important;
    font-weight: 700 !important;
}

html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .task-management-page .e-schedule .e-month-view .e-header-cells span,
html[data-bomsync-theme-preview="dark"] .task-management-page .e-schedule .e-month-view .e-header-cells span,
html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .task-management-page .e-schedule .e-date-header-wrap .e-header-cells span,
html[data-bomsync-theme-preview="dark"] .task-management-page .e-schedule .e-date-header-wrap .e-header-cells span {
    color: #E8EDF5 !important;
}

/* Weekday cells — Dark navy */
html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .task-management-page .e-schedule .e-month-view .e-work-cells.e-work-days,
html[data-bomsync-theme-preview="dark"] .task-management-page .e-schedule .e-month-view .e-work-cells.e-work-days,
html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .task-management-page .e-schedule .e-month-agenda-view .e-work-cells.e-work-days,
html[data-bomsync-theme-preview="dark"] .task-management-page .e-schedule .e-month-agenda-view .e-work-cells.e-work-days,
html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .task-management-page .e-schedule .e-timeline-month-view .e-work-cells.e-work-days,
html[data-bomsync-theme-preview="dark"] .task-management-page .e-schedule .e-timeline-month-view .e-work-cells.e-work-days {
    background: #152033 !important;
    background-color: #152033 !important;
    color: #E3EAF2 !important;
    border-color: #3A4F6A !important;
}

/* Weekends + exception / disabled / other-month non-work — dark grey (not solid white) */
html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .task-management-page .e-schedule .e-month-view .e-work-cells:not(.e-work-days),
html[data-bomsync-theme-preview="dark"] .task-management-page .e-schedule .e-month-view .e-work-cells:not(.e-work-days),
html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .task-management-page .e-schedule .e-month-agenda-view .e-work-cells:not(.e-work-days),
html[data-bomsync-theme-preview="dark"] .task-management-page .e-schedule .e-month-agenda-view .e-work-cells:not(.e-work-days),
html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .task-management-page .e-schedule .e-timeline-month-view .e-work-cells:not(.e-work-days),
html[data-bomsync-theme-preview="dark"] .task-management-page .e-schedule .e-timeline-month-view .e-work-cells:not(.e-work-days),
html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .task-management-page .e-schedule .e-month-view .e-work-cells.e-other-month,
html[data-bomsync-theme-preview="dark"] .task-management-page .e-schedule .e-month-view .e-work-cells.e-other-month,
html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .task-management-page .e-schedule .e-month-view .e-other-month,
html[data-bomsync-theme-preview="dark"] .task-management-page .e-schedule .e-month-view .e-other-month,
html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .task-management-page .e-schedule .e-month-view .e-work-cells.e-disable-dates,
html[data-bomsync-theme-preview="dark"] .task-management-page .e-schedule .e-month-view .e-work-cells.e-disable-dates,
html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .task-management-page .e-schedule .e-month-view .e-disable-dates,
html[data-bomsync-theme-preview="dark"] .task-management-page .e-schedule .e-month-view .e-disable-dates {
    background: #2C3340 !important;
    background-color: #2C3340 !important;
    color: #E3EAF2 !important;
    border-color: #3A4F6A !important;
    opacity: 1 !important;
}

/* Date numbers readable on navy and grey cells */
html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .task-management-page .e-schedule .e-month-view .e-work-cells .e-date-header,
html[data-bomsync-theme-preview="dark"] .task-management-page .e-schedule .e-month-view .e-work-cells .e-date-header,
html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .task-management-page .e-schedule .e-month-view .e-date-header,
html[data-bomsync-theme-preview="dark"] .task-management-page .e-schedule .e-month-view .e-date-header,
html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .task-management-page .e-schedule .e-month-view .e-work-cells span.e-date-header,
html[data-bomsync-theme-preview="dark"] .task-management-page .e-schedule .e-month-view .e-work-cells span.e-date-header {
    color: #E8EDF5 !important;
}

html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .task-management-page .e-schedule .e-month-view .e-other-month .e-date-header,
html[data-bomsync-theme-preview="dark"] .task-management-page .e-schedule .e-month-view .e-other-month .e-date-header,
html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .task-management-page .e-schedule .e-month-view .e-work-cells.e-other-month .e-date-header,
html[data-bomsync-theme-preview="dark"] .task-management-page .e-schedule .e-month-view .e-work-cells.e-other-month .e-date-header {
    color: #C9D6E3 !important;
}

/* Calendar filter strip labels on Dark */
html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .task-management-page .calendar-container .form-label,
html[data-bomsync-theme-preview="dark"] .task-management-page .calendar-container .form-label,
html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .task-management-page .calendar-container .form-label strong,
html[data-bomsync-theme-preview="dark"] .task-management-page .calendar-container .form-label strong {
    color: #E3EAF2 !important;
}

/* BIM Hosts & Variants — coach + host-attribute panels (no bg-white; readable checkbox) */
html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .bim-model-host-assignments-panel .bomsync-coach-panel,
html[data-bomsync-theme-preview="dark"] .bim-model-host-assignments-panel .bomsync-coach-panel {
    background:
        linear-gradient(135deg, rgb(106 215 255 / 0.08) 0%, transparent 55%),
        var(--bomsync-elevated-surface, #1A2638);
    border-color: var(--bomsync-border-strong, #4A6280);
    color: #E3EAF2;
    box-shadow: inset 3px 0 0 var(--bs-cyan, #6ad7ff);
}

html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .bim-model-host-assignments-panel .bim-host-assignments-coach__hint,
html[data-bomsync-theme-preview="dark"] .bim-model-host-assignments-panel .bim-host-assignments-coach__hint,
html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .bim-model-host-assignments-panel .bim-host-attr-source-panel__title,
html[data-bomsync-theme-preview="dark"] .bim-model-host-assignments-panel .bim-host-attr-source-panel__title {
    color: #C9D6E3 !important;
}

html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .bim-model-host-assignments-panel .bim-host-attr-source-panel .e-checkbox-wrapper .e-label,
html[data-bomsync-theme-preview="dark"] .bim-model-host-assignments-panel .bim-host-attr-source-panel .e-checkbox-wrapper .e-label,
html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .bim-model-host-assignments-panel .bim-host-attr-source-panel .e-css.e-checkbox-wrapper .e-label,
html[data-bomsync-theme-preview="dark"] .bim-model-host-assignments-panel .bim-host-attr-source-panel .e-css.e-checkbox-wrapper .e-label {
    color: #E3EAF2 !important;
    opacity: 1 !important;
}

html[data-bomsync-theme="dark"]:not([data-bomsync-theme-preview]) .bim-model-host-assignments-panel .bim-host-attr-source-panel .e-checkbox-wrapper .e-frame,
html[data-bomsync-theme-preview="dark"] .bim-model-host-assignments-panel .bim-host-attr-source-panel .e-checkbox-wrapper .e-frame {
    border-color: #6ad7ff !important;
}

