/* User-selectable dark appearance. Keep status colors and product images intact. */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 32px;
  padding: 6px 11px;
  border: 1px solid var(--border-medium);
  border-radius: 9px;
  background: var(--bg-secondary);
  color: var(--text-primary);
  font: 600 11px var(--font-primary);
  white-space: nowrap;
  cursor: pointer;
}
.theme-toggle:hover { border-color: var(--brand-primary); background: var(--bg-tertiary); }
.theme-toggle:focus-visible { outline: 2px solid var(--brand-primary); outline-offset: 2px; }
.theme-toggle i { color: var(--brand-primary-dark); font-size: 13px; }
@media (max-width: 750px) {
  .theme-toggle { width: 34px; min-width: 34px; padding: 6px; }
  .theme-toggle span { display: none; }
}

html[data-theme="dark"] {
  --bg-primary: #171717;
  --bg-secondary: #242424;
  --bg-tertiary: #303030;
  --bg-kpi: #292929;
  --bg-card: #242424;
  --bg-surface: #2c2c2c;
  --bg-subtle: #1c1c1c;
  --bg-input: #303030;
  --bg-main: #171717;
  --bg-hover: #383838;
  --brand-primary: #73bff2;
  --brand-primary-dark: #91d0f7;
  --brand-primary-soft: #304553;
  --brand-secondary: #81b9dd;
  --brand-secondary-dark: #a0ceeb;
  --text-primary: #f2f2f2;
  --text-secondary: #d0d0d0;
  --text-tertiary: #ababab;
  --text-inverse: #ffffff;
  --border-light: #414141;
  --border-medium: #595959;
  --border-color: #414141;
  --shadow-sm: 0 2px 10px rgba(0, 0, 0, .18);
  --shadow-md: 0 10px 26px rgba(0, 0, 0, .25);
  --shadow-lg: 0 20px 45px rgba(0, 0, 0, .35);
  --table-header-bg: #383838;
  --table-header-hover: #444444;
  --table-header-border: #555555;
  --table-header-text: #f2f2f2;
  --table-bg: #242424;
  --table-border-subtle: #3f3f3f;
  --table-row-hover: #383838;
  --table-row-hover-soft: #303030;
  --table-row-zebra: #292929;
  --table-row-selected: #3a4e5b;
  color-scheme: dark;
}

html[data-theme="dark"] body { background: var(--bg-primary); color: var(--text-primary); }
html[data-theme="dark"] .app-header { background: #242424; border-color: var(--border-light); box-shadow: var(--shadow-sm); }
html[data-theme="dark"] .brand-title { background: none; -webkit-text-fill-color: var(--text-primary); color: var(--text-primary); }
html[data-theme="dark"] .brand-subtitle { color: var(--text-tertiary); }
html[data-theme="dark"] .logo-icon-box { background: #2677a8; box-shadow: none; }
html[data-theme="dark"] .theme-toggle { background: #303030; color: var(--text-primary); }
html[data-theme="dark"] .theme-toggle:hover { background: #3c3c3c; }

/* Shared application shells and controls. */
html[data-theme="dark"] :is(.app-sidebar, .sidebar-header, .sidebar-nav-container, .tab-content,
  .table-container, .products-table-container, .admin-modal, .modal-content, .modal-dialog,
  .system-status-popover, .sync-popover, .header-subnav-menu, .current-view-dropdown-menu,
  .stok-table-context-menu, .login-card) {
  background-color: var(--bg-secondary) !important;
  color: var(--text-primary);
  border-color: var(--border-light);
}
html[data-theme="dark"] :is(.sidebar-search-box, .sidebar-nav-item, .sidebar-group-title,
  .sidebar-system-meta, .sidebar-toggle-btn, .current-view-badge, .header-subnav-trigger,
  .sync-status, .system-status-container, .error-indicator-pill, .user-profile-area,
  .search-box, .stok-modern-select, .kpi-card, .stok-kpi-bar .kpi-card,
  .sys-hero-card, .sys-commit-card, .sys-popover-btn) {
  background: var(--bg-tertiary) !important;
  color: var(--text-primary);
  border-color: var(--border-light) !important;
  box-shadow: none;
}
html[data-theme="dark"] :is(.sidebar-nav-item:hover, .sidebar-nav-item.active,
  .header-subnav-item:hover, .header-subnav-item.is-active,
  .current-view-menu-item:hover, .sync-status:hover, .system-status-container:hover) {
  background: #3c3c3c !important;
}
html[data-theme="dark"] :is(.system-status-title, .sys-popover-title-text span,
  .sidebar-brand-title, .nav-title, .current-view-badge, .header-subnav-title,
  .kpi-card .kpi-value) { color: var(--text-primary); }
html[data-theme="dark"] :is(.nav-desc, .sidebar-brand-sub, .sys-popover-title-text small,
  .header-subnav-item-desc, .kpi-card .kpi-label) { color: var(--text-tertiary); }
html[data-theme="dark"] :is(input, select, textarea) {
  background-color: var(--bg-input);
  color: var(--text-primary);
  border-color: var(--border-medium);
}
html[data-theme="dark"] :is(input, textarea)::placeholder { color: var(--text-tertiary); opacity: 1; }
html[data-theme="dark"] :is(input, select, textarea):focus-visible { outline-color: var(--brand-primary); }

/* Dense data views need opaque row and sticky header surfaces. */
html[data-theme="dark"] :is(.data-table, .products-table, .stock-table, .set-analysis-table,
  .set-analysis-kutu-table, .set-analysis-uyum-table, .maliyet-table, .fk-table,
  .report-table, .rev-table, .ut-table) {
  background: var(--table-bg) !important;
  color: var(--text-primary);
}
html[data-theme="dark"] :is(.data-table, .products-table, .stock-table, .set-analysis-table,
  .set-analysis-kutu-table, .set-analysis-uyum-table, .maliyet-table, .fk-table,
  .report-table, .rev-table, .ut-table) th {
  background: var(--table-header-bg) !important;
  color: var(--table-header-text) !important;
  border-color: var(--table-header-border) !important;
}
html[data-theme="dark"] :is(.data-table, .products-table, .stock-table, .set-analysis-table,
  .set-analysis-kutu-table, .set-analysis-uyum-table, .maliyet-table, .fk-table,
  .report-table, .rev-table, .ut-table) tbody td {
  background: var(--table-bg);
  color: var(--text-primary);
  border-color: var(--table-border-subtle);
}
html[data-theme="dark"] :is(.data-table, .products-table, .stock-table, .set-analysis-table,
  .set-analysis-kutu-table, .set-analysis-uyum-table, .maliyet-table, .fk-table,
  .report-table, .rev-table, .ut-table) tbody tr:nth-child(even) td {
  background: var(--table-row-zebra);
}
html[data-theme="dark"] :is(.data-table, .products-table, .stock-table, .set-analysis-table,
  .set-analysis-kutu-table, .set-analysis-uyum-table, .maliyet-table, .fk-table,
  .report-table, .rev-table, .ut-table) tbody tr:hover td {
  background: var(--table-row-hover) !important;
  color: var(--text-primary);
}
html[data-theme="dark"] .products-table td.selected { background: var(--table-row-selected) !important; color: var(--text-primary) !important; }
html[data-theme="dark"] .products-table .product-name-cell { color: var(--text-primary); }
html[data-theme="dark"] .products-table-container { box-shadow: var(--shadow-sm); }

/* Outlook's editable modal follows the app theme; the generated email preview stays as authored. */
html[data-theme="dark"] #modalOutlookMail {
  --om-text: #f2f2f2;
  --om-text-2: #d0d0d0;
  --om-text-3: #ababab;
  --om-border: #414141;
  --om-border-strong: #595959;
  --om-surface: #242424;
  --om-surface-2: #303030;
  --om-surface-3: #383838;
  --om-primary-soft: #304553;
}

/* Modules with their own fixed light palettes. */
html[data-theme="dark"] .sysmon {
  --sm-indigo: #72c4ff;
  --sm-indigo-soft: #304553;
  --sm-border: #414141;
  --sm-border-strong: #595959;
  --sm-text: #f2f2f2;
  --sm-text-2: #d0d0d0;
  --sm-text-3: #ababab;
  --sm-surface: #242424;
  --sm-surface-2: #303030;
}
html[data-theme="dark"] :is(.mr-panel, .mr-view-switch-bar, .mr-view-pill,
  .mr-import-menu, .mr-import-menu-item, .fk-kpi-card, .fk-table-container,
  .fk-table-top-bar, .fk-table-wrapper, .fk-table-bottom-bar,
  .rev-modern-toolbar, .rev-table-container, .sysmon-card,
  .sysmon-kpi, .hareket-modal-footer) {
  background: var(--bg-secondary) !important;
  color: var(--text-primary);
  border-color: var(--border-light) !important;
}
html[data-theme="dark"] :is(.mr-header h2, .mr-panel h3,
  .fk-header h2, .fk-kpi-value, .hareket-form-group label,
  .hareket-delete-msg) { color: var(--text-primary); }
html[data-theme="dark"] :is(.mr-header p, .fk-kpi-label,
  .fk-kpi-hint, .hareket-form-help, .hareket-delete-sub) { color: var(--text-tertiary); }
html[data-theme="dark"] :is(.mr-panel-header-btn, .mr-undo-btn,
  .mr-header-nav-btn, .fk-btn-secondary, .btn-copy-title) {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border-color: var(--border-medium);
}
html[data-theme="dark"] .fk-table td.fk-col-ekforma { background: #403520 !important; color: #ffe2a6; }
html[data-theme="dark"] .fk-table td.fk-col-fatura { background: #1d4037 !important; color: #b9f5d9; }
html[data-theme="dark"] .fk-table td.fk-col-robot { background: #304553 !important; color: #d1edff; }
html[data-theme="dark"] .fk-table tbody tr:hover td.fk-col-ekforma { background: #59472a !important; }
html[data-theme="dark"] .fk-table tbody tr:hover td.fk-col-fatura { background: #285948 !important; }
html[data-theme="dark"] .fk-table tbody tr:hover td.fk-col-robot { background: #3a4e5b !important; }

/* Consistent controls across the app. Search fields share their wrapper surface. */
html[data-theme="dark"] :is(input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="button"]):not([type="submit"]), select, textarea) {
  background: var(--bg-input) !important;
  color: var(--text-primary) !important;
  border-color: var(--border-medium) !important;
  box-shadow: none;
  color-scheme: dark;
}
html[data-theme="dark"] :is(input, textarea)::placeholder { color: #b8b8b8 !important; opacity: 1; }
html[data-theme="dark"] :is(input, select, textarea):focus {
  border-color: var(--brand-primary) !important;
  box-shadow: 0 0 0 2px rgba(115, 191, 242, .22) !important;
}
html[data-theme="dark"] :is(input, select, textarea):disabled {
  background: #272727 !important;
  color: #999999 !important;
  border-color: #424242 !important;
}
html[data-theme="dark"] :is(.search-box, .vitrin-search-box, .ut-search-wrapper,
  .ut-days-select-wrap, .hareket-date-range, .sidebar-search-box) {
  background: var(--bg-input) !important;
  color: var(--text-primary);
  border-color: var(--border-medium) !important;
}
html[data-theme="dark"] :is(.search-box, .vitrin-search-box, .ut-search-wrapper,
  .sidebar-search-box) input:not(:disabled),
html[data-theme="dark"] .hareket-date-range input:not(:disabled),
html[data-theme="dark"] .ut-days-select:not(:disabled) {
  background: transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
}
html[data-theme="dark"] :is(.search-box, .vitrin-search-box, .ut-search-wrapper,
  .sidebar-search-box):focus-within { border-color: var(--brand-primary) !important; }
html[data-theme="dark"] :is(.search-box, .vitrin-search-box, .ut-search-wrapper,
  .sidebar-search-box) i { color: #b8b8b8 !important; }

/* Stock legend and product catalog. */
html[data-theme="dark"] .stok-legend-bar {
  background: var(--bg-card) !important;
  border-color: var(--border-color) !important;
  box-shadow: none;
}
html[data-theme="dark"] :is(.stok-legend-title, .stok-legend-item, .stok-legend-item .legend-text) {
  color: var(--text-primary) !important;
}
html[data-theme="dark"] .products-hero { background: #242424 !important; border-color: var(--border-color) !important; }
html[data-theme="dark"] .products-heading :is(h1, p) { color: var(--text-primary) !important; }
html[data-theme="dark"] .products-kpi { background: #303030 !important; border-color: var(--border-color) !important; color: var(--text-primary) !important; }
html[data-theme="dark"] .products-kpi.active { background: #3a3a3a !important; border-color: var(--brand-primary) !important; }
html[data-theme="dark"] .products-kpi :is(b, small) { color: var(--text-primary) !important; }
html[data-theme="dark"] .products-toolbar { background: #242424 !important; border-color: var(--border-color) !important; }
html[data-theme="dark"] .products-view-tabs { background: #242424 !important; border-color: var(--border-color) !important; }
html[data-theme="dark"] .products-view-tab { color: var(--text-secondary) !important; }
html[data-theme="dark"] .products-view-tab:hover { background: #383838 !important; color: var(--text-primary) !important; }
html[data-theme="dark"] .products-view-tab.active {
  background: #304553 !important;
  color: #a9dcfa !important;
  border-color: #5683a0 !important;
}
html[data-theme="dark"] .products-tab-badge { background: #424242 !important; color: var(--text-primary) !important; }
html[data-theme="dark"] .products-table td:is(.col-adi, .product-name-cell) {
  background: #292929 !important;
  color: #f5f5f5 !important;
  font-weight: 400 !important;
  border-right-color: #555555 !important;
}
html[data-theme="dark"] .products-table tbody tr:nth-child(even) td:is(.col-adi, .product-name-cell) { background: #303030 !important; }
html[data-theme="dark"] .products-table tbody tr:hover td:is(.col-adi, .product-name-cell) { background: #3b3b3b !important; color: #ffffff !important; }
html[data-theme="dark"] .products-table tbody tr td:is(.col-adi, .product-name-cell).selected { background: #3a4e5b !important; color: #ffffff !important; }

/* Product showcase and its menus. */
html[data-theme="dark"] :is(.vitrin-view-container, .hareket-view-container) { background: var(--bg-main) !important; }
html[data-theme="dark"] :is(.vitrin-toolbar, .vitrin-card, .vitrin-pagination-bar,
  .vitrin-sort-dropdown, .vitrin-sort-header, .vitrin-sort-tabs,
  .vitrin-column-filter-dropdown, .vitrin-dropdown-header, .vitrin-sort-rule-row,
  .vitrin-company-selector) {
  background: var(--bg-card) !important;
  color: var(--text-primary) !important;
  border-color: var(--border-color) !important;
}
html[data-theme="dark"] .vitrin-card-image-wrap { background: #303030 !important; border-color: var(--border-color) !important; }
html[data-theme="dark"] :is(.vitrin-filter-btn, .vitrin-company-btn.active, .vitrin-sort-tab.active,
  .vitrin-sort-preset-item, .vitrin-meta-tag, .vitrin-card-id) {
  background: #303030 !important;
  color: var(--text-primary) !important;
  border-color: var(--border-color) !important;
}
html[data-theme="dark"] :is(.vitrin-card-title, .vitrin-sort-header-title, .vitrin-sort-tab,
  .vitrin-chip-info, .vitrin-chip-summary, .vitrin-card-brand, .vitrin-sort-preset-item .preset-icon) {
  color: var(--text-primary) !important;
}
html[data-theme="dark"] :is(.vitrin-filter-btn:hover, .vitrin-sort-preset-item:hover,
  .vitrin-sort-tab:hover) { background: #3b3b3b !important; }
html[data-theme="dark"] :is(.vitrin-filter-btn.is-active, .vitrin-sort-preset-item.is-active,
  .vitrin-filter-chip) { background: #304553 !important; color: #a9dcfa !important; border-color: #5683a0 !important; }

/* Sales and circulation history. */
html[data-theme="dark"] :is(.hareket-compact-header, .hareket-section,
  .hareket-table-wrap, .hareket-table-container, .hareket-kpi-pill,
  .hareket-date-range) {
  background: var(--bg-card) !important;
  border-color: var(--border-color) !important;
  color: var(--text-primary) !important;
}
html[data-theme="dark"] :is(.hareket-compact-title, .hareket-section-title,
  .hareket-section-badge, .hareket-item-count) { color: var(--text-primary) !important; }
html[data-theme="dark"] .hareket-section-badge { background: #343434 !important; }
html[data-theme="dark"] .hareket-kpi-pill.is-opened { color: #9ce2bd !important; }
html[data-theme="dark"] .hareket-kpi-pill.is-closed { color: #f5aaaa !important; }
html[data-theme="dark"] .hareket-kpi-pill.is-retired { color: #a9dcfa !important; }
html[data-theme="dark"] .hareket-kpi-pill.is-retired strong { color: inherit !important; }
html[data-theme="dark"] .hareket-mismatch-toggle { background: #3b3528 !important; color: #f3d28b !important; border-color: #71613c !important; }

/* Box production dialog and production tracking. */
html[data-theme="dark"] #setKutuModal .rev-modal-header {
  background: #2c2c2c !important;
  border-bottom-color: var(--border-color) !important;
}
html[data-theme="dark"] #setKutuModal .rev-modal-header h3 { color: var(--text-primary) !important; }
html[data-theme="dark"] #setKutuModal .rev-modal-subtitle { color: var(--text-secondary) !important; }
html[data-theme="dark"] #setKutuModal .set-kutu-modal-section { background: #2c2c2c !important; border-color: var(--border-color) !important; }
html[data-theme="dark"] :is(.ut-header, .ut-kpi-card, .ut-subtab-bar, .ut-section) {
  background: var(--bg-card) !important;
  border-color: var(--border-color) !important;
  color: var(--text-primary) !important;
}
html[data-theme="dark"] :is(.ut-header-title, .ut-kpi-label, .ut-kpi-val, .ut-kpi-sub) { color: var(--text-primary) !important; }
html[data-theme="dark"] :is(.ut-search-input, .ut-days-select-wrap, .ut-btn-secondary) {
  background: var(--bg-input) !important;
  color: var(--text-primary) !important;
  border-color: var(--border-medium) !important;
}

/* Notifications, including the sync progress panel. */
html[data-theme="dark"] #toastContainer :is(.toast, .sync-progress-toast) {
  background: #2b2b2b !important;
  color: #f2f2f2 !important;
  border-color: #505050;
  box-shadow: 0 10px 28px rgba(0, 0, 0, .35) !important;
}
html[data-theme="dark"] #toastContainer .toast span { color: #f2f2f2 !important; }
html[data-theme="dark"] #toastContainer .sync-progress-toast > div:first-child {
  background: #333333 !important;
  border-bottom-color: #505050 !important;
}
html[data-theme="dark"] #toastContainer .sync-progress-toast .spt-row { border-bottom-color: #454545 !important; }
html[data-theme="dark"] #toastContainer .sync-progress-toast :is(.spt-subtitle, .spt-total-label, .spt-total-count, .spt-status) { color: #c9c9c9 !important; }
html[data-theme="dark"] #toastContainer .sync-progress-toast :is(.spt-row .spt-icon, .spt-row [style*="background:#f1f5f9"], [style*="background:#f1f5f9"]) { background: #414141 !important; }

/* Stock sources use steady charcoal tones; semantic row colors stay visible. */
html[data-theme="dark"] #stokTable th.stock-header-jetstok,
html[data-theme="dark"] #stokTable th.stock-column-header:not(.stock-header-ficommerce) {
  background: #31546a !important; color: #f4faff !important; border-bottom-color: #79c5ee !important;
}
html[data-theme="dark"] #stokTable th.stock-header-ficommerce {
  background: #416269 !important; color: #f4faff !important; border-bottom-color: #8ecbc9 !important;
}
html[data-theme="dark"] #stokTable th:is(.stock-header-jetstok, .stock-header-ficommerce, .stock-column-header) .stock-header-label { color: #f4faff !important; }
html[data-theme="dark"] #stokTable td.stock-cell-jetstok:not(.selected) { background: #303a3e !important; color: #d4eeff !important; }
html[data-theme="dark"] #stokTable td.stock-cell-ficommerce:not(.selected) { background: #343e3f !important; color: #ddf3ee !important; }
html[data-theme="dark"] #stokTable tbody tr:nth-child(even) td.stock-cell-jetstok:not(.selected) { background: #374246 !important; }
html[data-theme="dark"] #stokTable tbody tr:nth-child(even) td.stock-cell-ficommerce:not(.selected) { background: #3b4647 !important; }
html[data-theme="dark"] #stokTable tbody tr.row-red td.stock-column-cell:not(.selected) { background: #482e2e !important; color: #ffe3e3 !important; }
html[data-theme="dark"] #stokTable tbody tr.row-orange td.stock-column-cell:not(.selected) { background: #493b2e !important; color: #ffe8c7 !important; }
html[data-theme="dark"] #stokTable tbody tr.row-yellow td.stock-column-cell:not(.selected) { background: #48442f !important; color: #fff1c2 !important; }
html[data-theme="dark"] #stokTable tbody tr:is(.row-red, .row-orange, .row-yellow, .row-basili-set, .row-kutusuz-set, :nth-child(even), :nth-child(odd))
  td.stock-column-cell:is(.stock-zero-cell, .stock-negative-cell):not(.selected),
html[data-theme="dark"] #stokTable tbody tr td:is(.stock-zero-cell, .stock-negative-cell) {
  background: #ab2828 !important; color: #ffffff !important; font-weight: 750 !important;
}
html[data-theme="dark"] #stokTable td:is(.stock-zero-cell, .stock-negative-cell) * { color: #ffffff !important; }
html[data-theme="dark"] #stokTable th.is-filtered { background: #574722 !important; color: #fff0bd !important; }
html[data-theme="dark"] #stokTable th.is-filtered .stock-header-label { color: #fff0bd !important; }
html[data-theme="dark"] #stokTable .stock-col-source-tag.tag-jet { background: #254355; color: #dcf2ff; border-color: #628daa; }
html[data-theme="dark"] #stokTable .stock-col-source-tag.tag-fic { background: #2d4c4b; color: #def8ef; border-color: #689c96; }

/* System monitoring: panels, tables, status markers, logs, database explorer and filters. */
html[data-theme="dark"] .sysmon {
  --sec: #83cfff; --sec-dark: #d7eeff; --sec-soft: #303a40; --sec-soft-2: #45525a;
  --kpi-bg: #303030; --kpi-bd: #505050; --kpi-dark: #f2f2f2;
}
html[data-theme="dark"] .sysmon :is(#sysmonPanel-jobs, #sysmonPanel-api, #sysmonPanel-logs, #sysmonPanel-db),
html[data-theme="dark"] .sysmon-panel .sysmon-card {
  --sec-dark: #d7eeff; --sec-soft: #303a40; --sec-soft-2: #45525a;
}
html[data-theme="dark"] .sysmon .sysmon-header {
  background: #2a343a !important; border: 1px solid #46545a !important;
  box-shadow: 0 8px 22px rgba(0, 0, 0, .2) !important;
}
html[data-theme="dark"] .sysmon .sysmon-header::before,
html[data-theme="dark"] .sysmon .sysmon-header::after { display: none; }
html[data-theme="dark"] .sysmon .sysmon-header :is(h2, p, .sysmon-updated, .sysmon-autorefresh) { color: #f2f2f2 !important; }
html[data-theme="dark"] .sysmon .sysmon-header .sysmon-btn-primary { background: #365c70 !important; color: #fff !important; }
html[data-theme="dark"] .sysmon :is(.sysmon-kpi, .sysmon-segments, .sysmon-card, .sysmon-proc-hero, .sysmon-proc-tile, .sysmon-proc-note) {
  background: #292929 !important; border-color: #494949 !important; color: #f2f2f2 !important;
}
html[data-theme="dark"] .sysmon .sysmon-kpi:not(.is-loading) { background: #292929 !important; }
html[data-theme="dark"] .sysmon :is(.sysmon-kpi-label, .sysmon-kpi-value, .sysmon-kpi-sub, .sysmon-proc-title, .sysmon-proc-tile-value, .sysmon-proc-note) { color: #f2f2f2 !important; }
html[data-theme="dark"] .sysmon :is(.sysmon-proc-desc, .sysmon-proc-tile-sub, .sysmon-sub, .sysmon-sub-cell, .sysmon-card-head small, .sysmon-kv) { color: #c7c7c7 !important; }
html[data-theme="dark"] .sysmon :is(.sysmon-kpi-icon, .sysmon-card-icon.is-indigo, .sysmon-card-icon.is-violet, .sysmon-proc-hero-icon, .sysmon-proc-tile-icon) {
  background: #365766 !important; color: #b8e5ff !important; border-color: #527486 !important; box-shadow: none;
}
html[data-theme="dark"] .sysmon :is(.sysmon-segment, .sysmon-btn, .sysmon-icon-btn, .sysmon-page-btn, .sysmon-chip, .sysmon-level) {
  background: #303030 !important; color: #e4e4e4 !important; border-color: #505050 !important;
}
html[data-theme="dark"] .sysmon :is(.sysmon-segment.is-active, .sysmon-chip.is-active, .sysmon-level.is-active, .sysmon-btn-primary) {
  background: #365766 !important; color: #fff !important; border-color: #668e9e !important;
}
html[data-theme="dark"] .sysmon .sysmon-panel .sysmon-card-head { background: #303a40 !important; border-color: #46545a !important; }
html[data-theme="dark"] .sysmon .sysmon-panel .sysmon-card-head h3 { color: #f2f2f2 !important; }
html[data-theme="dark"] .sysmon :is(.sysmon-table-wrap, .sysmon-table td) { border-color: #444444 !important; }
html[data-theme="dark"] .sysmon .sysmon-table thead th { background: #343e43 !important; color: #e4f3fa !important; border-color: #505c62 !important; }
html[data-theme="dark"] .sysmon .sysmon-table tbody tr:not(.sysmon-state-row):not(.sysmon-skel-row):hover td,
html[data-theme="dark"] .sysmon .sysmon-db-row:hover td { background: #3a4549 !important; }
html[data-theme="dark"] .sysmon .sysmon-db-row:nth-child(even) td { background: #2d3335 !important; }
html[data-theme="dark"] .sysmon .sysmon-row-highlight td { background: #344149 !important; }
html[data-theme="dark"] .sysmon :is(.sysmon-title, .sysmon-field label, .sysmon-col-name, .sysmon-kv b) { color: #f0f0f0 !important; }
html[data-theme="dark"] .sysmon :is(.sysmon-tag, .sysmon-code, .sysmon-meta-chip, .sysmon-db-hint, .sysmon-log-meta, .sysmon-col-type, .sysmon-db-hint code) {
  background: #343d40 !important; color: #e2f1f6 !important; border-color: #536169 !important;
}
html[data-theme="dark"] .sysmon .sysmon-method { background: #304653 !important; color: #d4edfc !important; border-color: #55798a !important; }
html[data-theme="dark"] .sysmon :is(.sysmon-badge.is-success, .sysmon-bool.is-true, .sysmon-method.is-post) { background: #254338 !important; color: #b9efd4 !important; border-color: #3c705a !important; }
html[data-theme="dark"] .sysmon :is(.sysmon-badge.is-danger, .sysmon-method.is-delete) { background: #4a2b2b !important; color: #ffc5c5 !important; border-color: #865050 !important; }
html[data-theme="dark"] .sysmon :is(.sysmon-badge.is-warn, .sysmon-tag.is-warn, .sysmon-method.is-put, .sysmon-method.is-patch) { background: #493d29 !important; color: #ffe2a7 !important; border-color: #857047 !important; }
html[data-theme="dark"] .sysmon :is(.sysmon-badge.is-info, .sysmon-method.is-get, .sysmon-badge.is-muted, .sysmon-bool.is-false) { background: #304653 !important; color: #d4edfc !important; border-color: #55798a !important; }
html[data-theme="dark"] .sysmon .sysmon-state.is-error { background: #423030 !important; color: #ffd0d0 !important; }
html[data-theme="dark"] .sysmon .sysmon-skel { background: #414141 !important; }
html[data-theme="dark"] .sysmon :is(.sysmon-progress, .sysmon-bars, .sysmon-bars-max) { background: #353535 !important; color: #d0d0d0 !important; }
html[data-theme="dark"] .sysmon .sysmon-console { background: #1d1d1d !important; border-color: #494949 !important; color: #dedede !important; }
html[data-theme="dark"] .sysmon .sysmon-log-ts { color: #b9b9b9 !important; }
html[data-theme="dark"] .sysmon .sysmon-json { color: #aee5cf !important; }
html[data-theme="dark"] .sysmon-row-dl :is(dt, dd) { background: #292929 !important; color: #eeeeee !important; border-color: #444444 !important; }
html[data-theme="dark"] .sysmon-row-dl dt small,
html[data-theme="dark"] .sysmon-row-modal-desc { color: #bdbdbd !important; }
html[data-theme="dark"] .sysmon-pre { background: #1d1d1d !important; color: #eeeeee !important; }
html[data-theme="dark"] .sysmon-filter-dropdown { background: #292929 !important; color: #f2f2f2 !important; border-color: #555555 !important; }
html[data-theme="dark"] .sysmon-fd-head { background: #365766 !important; }
html[data-theme="dark"] .sysmon-filter-dropdown :is(.filter-sort-actions, .column-filter-options, .column-filter-actions, .sysmon-fd-info, .sysmon-fd-locked, .sysmon-fd-state, .sysmon-fd-count) {
  background: #303030 !important; color: #e4e4e4 !important; border-color: #505050 !important;
}
html[data-theme="dark"] .sysmon-filter-dropdown :is(.filter-sort-actions button, .column-filter-options label, .column-filter-actions button) { color: #e4e4e4 !important; }
html[data-theme="dark"] .sysmon-filter-dropdown .filter-sort-actions button.is-active { background: #365766 !important; color: #fff !important; }
html[data-theme="dark"] .sysmon :is(.sysmon-kpi.is-violet, .sysmon-proc-hero.is-violet, .sysmon-proc-tile.is-violet, .sysmon-chip.is-src-memory.is-active) {
  --kpi-c: #78c6ed; --pm: #78c6ed; --pm-2: #a5d7ed; --t: #78c6ed;
  background: #2d3d43 !important; border-color: #567b8b !important;
}
html[data-theme="dark"] .sysmon .sysmon-card-icon.is-violet,
html[data-theme="dark"] .sysmon .sysmon-card-icon.is-indigo { background: #365766 !important; color: #b8e5ff !important; }
html[data-theme="dark"] .sysmon .sysmon-bar-fill { background: #63b9da !important; }
html[data-theme="dark"] .sysmon .sysmon-bar-err { background: #df7777 !important; }
html[data-theme="dark"] .sysmon .sysmon-proc-eyebrow,
html[data-theme="dark"] .sysmon .sysmon-proc-tile-label { color: #a7dcf4 !important; }
