/* Color-only overlay. Uses tokens so a body/html theme class recolors every chrome surface. */

html[class*="ui-theme-"]:not(.ui-theme-blue-gray):not(.ui-theme-two-tone-blue),
body[class*="ui-theme-"]:not(.ui-theme-blue-gray):not(.ui-theme-two-tone-blue){
  background: var(--bg-body) !important;
  background-color: var(--bg-body) !important;
  color: var(--text-primary) !important;
}
html[class*="ui-theme-"]:not(.ui-theme-blue-gray):not(.ui-theme-two-tone-blue) body{
  background: var(--bg-body) !important;
  background-color: var(--bg-body) !important;
  color: var(--text-primary) !important;
}

html[class*="ui-theme-"]:not(.ui-theme-blue-gray):not(.ui-theme-two-tone-blue) #container,
html[class*="ui-theme-"]:not(.ui-theme-blue-gray):not(.ui-theme-two-tone-blue) #content,
html[class*="ui-theme-"]:not(.ui-theme-blue-gray):not(.ui-theme-two-tone-blue) #content-main,
html[class*="ui-theme-"]:not(.ui-theme-blue-gray):not(.ui-theme-two-tone-blue) #content-related {
  background: transparent;
  color: var(--text-primary) !important;
}

html[class*="ui-theme-"]:not(.ui-theme-blue-gray):not(.ui-theme-two-tone-blue) #main-nav {
  background-color: var(--bg-sidebar) !important;
  color: var(--text-primary) !important;
}

html[class*="ui-theme-"]:not(.ui-theme-blue-gray):not(.ui-theme-two-tone-blue) #top-nav {
  background-color: var(--bg-topnav) !important;
  color: var(--text-muted) !important;
  border-color: var(--border) !important;
}

html[class*="ui-theme-"]:not(.ui-theme-blue-gray):not(.ui-theme-two-tone-blue) .breadcrumbs,
html[class*="ui-theme-"]:not(.ui-theme-blue-gray):not(.ui-theme-two-tone-blue) .user-links,
html[class*="ui-theme-"]:not(.ui-theme-blue-gray):not(.ui-theme-two-tone-blue) #username,
html[class*="ui-theme-"]:not(.ui-theme-blue-gray):not(.ui-theme-two-tone-blue) #top-nav a {
  color: var(--text-muted) !important;
}

html[class*="ui-theme-"]:not(.ui-theme-blue-gray):not(.ui-theme-two-tone-blue) #top-nav a:hover,
html[class*="ui-theme-"]:not(.ui-theme-blue-gray):not(.ui-theme-two-tone-blue) .breadcrumbs a:hover {
  color: var(--accent) !important;
}

html[class*="ui-theme-"]:not(.ui-theme-blue-gray):not(.ui-theme-two-tone-blue) .main-menu a,
html[class*="ui-theme-"]:not(.ui-theme-blue-gray):not(.ui-theme-two-tone-blue) .main-menu .material-icons {
  color: var(--text-muted) !important;
}

html[class*="ui-theme-"]:not(.ui-theme-blue-gray):not(.ui-theme-two-tone-blue) .main-menu a:hover,
html[class*="ui-theme-"]:not(.ui-theme-blue-gray):not(.ui-theme-two-tone-blue) .main-menu li:hover .material-icons {
  background-color: var(--bg-hover) !important;
  color: var(--text-primary) !important;
}

html[class*="ui-theme-"]:not(.ui-theme-blue-gray):not(.ui-theme-two-tone-blue) .main-menu li:hover {
  border-color: var(--accent) !important;
}

/* Panels / cards */
html[class*="ui-theme-"]:not(.ui-theme-blue-gray):not(.ui-theme-two-tone-blue) .section,
html[class*="ui-theme-"]:not(.ui-theme-blue-gray):not(.ui-theme-two-tone-blue) fieldset,
html[class*="ui-theme-"]:not(.ui-theme-blue-gray):not(.ui-theme-two-tone-blue) .extras,
html[class*="ui-theme-"]:not(.ui-theme-blue-gray):not(.ui-theme-two-tone-blue) .module,
html[class*="ui-theme-"]:not(.ui-theme-blue-gray):not(.ui-theme-two-tone-blue) .statistic,
html[class*="ui-theme-"]:not(.ui-theme-blue-gray):not(.ui-theme-two-tone-blue) body .statistic.section,
html[class*="ui-theme-"]:not(.ui-theme-blue-gray):not(.ui-theme-two-tone-blue) .quick-stats .statistic,
html[class*="ui-theme-"]:not(.ui-theme-blue-gray):not(.ui-theme-two-tone-blue) .wt-card,
html[class*="ui-theme-"]:not(.ui-theme-blue-gray):not(.ui-theme-two-tone-blue) .wt-panel,
html[class*="ui-theme-"]:not(.ui-theme-blue-gray):not(.ui-theme-two-tone-blue) .wt-kpi,
html[class*="ui-theme-"]:not(.ui-theme-blue-gray):not(.ui-theme-two-tone-blue) .ai-sa-group,
html[class*="ui-theme-"]:not(.ui-theme-blue-gray):not(.ui-theme-two-tone-blue) .ai-sa-locked {
  background: var(--bg-panel) !important;
  background-color: var(--bg-panel) !important;
  color: var(--text-primary) !important;
  border-color: var(--border) !important;
}

html[class*="ui-theme-"]:not(.ui-theme-blue-gray):not(.ui-theme-two-tone-blue) .statistic:nth-child(n) {
  background-color: var(--bg-card) !important;
}

html[class*="ui-theme-"]:not(.ui-theme-blue-gray):not(.ui-theme-two-tone-blue) .statistic .number,
html[class*="ui-theme-"]:not(.ui-theme-blue-gray):not(.ui-theme-two-tone-blue) .quick-stats .number {
  color: var(--accent) !important;
}

html[class*="ui-theme-"]:not(.ui-theme-blue-gray):not(.ui-theme-two-tone-blue) .statistic .title,
html[class*="ui-theme-"]:not(.ui-theme-blue-gray):not(.ui-theme-two-tone-blue) .statistic p,
html[class*="ui-theme-"]:not(.ui-theme-blue-gray):not(.ui-theme-two-tone-blue) .quick-stats .title {
  color: var(--text-muted) !important;
}

/* Data grids / tables — the leak source */
html[class*="ui-theme-"]:not(.ui-theme-blue-gray):not(.ui-theme-two-tone-blue) table,
html[class*="ui-theme-"]:not(.ui-theme-blue-gray):not(.ui-theme-two-tone-blue) #content table,
html[class*="ui-theme-"]:not(.ui-theme-blue-gray):not(.ui-theme-two-tone-blue) #content-main table,
html[class*="ui-theme-"]:not(.ui-theme-blue-gray):not(.ui-theme-two-tone-blue) .module table,
html[class*="ui-theme-"]:not(.ui-theme-blue-gray):not(.ui-theme-two-tone-blue) .results,
html[class*="ui-theme-"]:not(.ui-theme-blue-gray):not(.ui-theme-two-tone-blue) .results table,
html[class*="ui-theme-"]:not(.ui-theme-blue-gray):not(.ui-theme-two-tone-blue) #changelist,
html[class*="ui-theme-"]:not(.ui-theme-blue-gray):not(.ui-theme-two-tone-blue) #changelist-form,
html[class*="ui-theme-"]:not(.ui-theme-blue-gray):not(.ui-theme-two-tone-blue) #changelist table,
html[class*="ui-theme-"]:not(.ui-theme-blue-gray):not(.ui-theme-two-tone-blue) #changelist .results,
html[class*="ui-theme-"]:not(.ui-theme-blue-gray):not(.ui-theme-two-tone-blue) #result_list,
html[class*="ui-theme-"]:not(.ui-theme-blue-gray):not(.ui-theme-two-tone-blue) table#result_list,
html[class*="ui-theme-"]:not(.ui-theme-blue-gray):not(.ui-theme-two-tone-blue) .change-list #result_list,
html[class*="ui-theme-"]:not(.ui-theme-blue-gray):not(.ui-theme-two-tone-blue) .change-list #content-main,
html[class*="ui-theme-"]:not(.ui-theme-blue-gray):not(.ui-theme-two-tone-blue) .homepage table,
html[class*="ui-theme-"]:not(.ui-theme-blue-gray):not(.ui-theme-two-tone-blue) .homepage .projects,
html[class*="ui-theme-"]:not(.ui-theme-blue-gray):not(.ui-theme-two-tone-blue) .homepage .projects table,
html[class*="ui-theme-"]:not(.ui-theme-blue-gray):not(.ui-theme-two-tone-blue) .homepage .projects .scroll-wrapper,
html[class*="ui-theme-"]:not(.ui-theme-blue-gray):not(.ui-theme-two-tone-blue) .homepage .safety,
html[class*="ui-theme-"]:not(.ui-theme-blue-gray):not(.ui-theme-two-tone-blue) .homepage .safety table,
html[class*="ui-theme-"]:not(.ui-theme-blue-gray):not(.ui-theme-two-tone-blue) .homepage .safety .scroll-wrapper,
html[class*="ui-theme-"]:not(.ui-theme-blue-gray):not(.ui-theme-two-tone-blue) .homepage .payroll table,
html[class*="ui-theme-"]:not(.ui-theme-blue-gray):not(.ui-theme-two-tone-blue) .homepage .human-resources table,
html[class*="ui-theme-"]:not(.ui-theme-blue-gray):not(.ui-theme-two-tone-blue) .homepage .holidays table,
html[class*="ui-theme-"]:not(.ui-theme-blue-gray):not(.ui-theme-two-tone-blue) .homepage .services,
html[class*="ui-theme-"]:not(.ui-theme-blue-gray):not(.ui-theme-two-tone-blue) .homepage .repairs,
html[class*="ui-theme-"]:not(.ui-theme-blue-gray):not(.ui-theme-two-tone-blue) .report table,
html[class*="ui-theme-"]:not(.ui-theme-blue-gray):not(.ui-theme-two-tone-blue) .google-visualization-table-table,
html[class*="ui-theme-"]:not(.ui-theme-blue-gray):not(.ui-theme-two-tone-blue) .wt-table-wrap {
  background: var(--bg-grid) !important;
  background-color: var(--bg-grid) !important;
  color: var(--text-primary) !important;
  border-color: var(--border-grid) !important;
}

html[class*="ui-theme-"]:not(.ui-theme-blue-gray):not(.ui-theme-two-tone-blue) table thead th,
html[class*="ui-theme-"]:not(.ui-theme-blue-gray):not(.ui-theme-two-tone-blue) #content table thead th,
html[class*="ui-theme-"]:not(.ui-theme-blue-gray):not(.ui-theme-two-tone-blue) #changelist table thead th,
html[class*="ui-theme-"]:not(.ui-theme-blue-gray):not(.ui-theme-two-tone-blue) #result_list thead th,
html[class*="ui-theme-"]:not(.ui-theme-blue-gray):not(.ui-theme-two-tone-blue) table#result_list thead th,
html[class*="ui-theme-"]:not(.ui-theme-blue-gray):not(.ui-theme-two-tone-blue) .homepage table thead th,
html[class*="ui-theme-"]:not(.ui-theme-blue-gray):not(.ui-theme-two-tone-blue) .homepage .projects table th,
html[class*="ui-theme-"]:not(.ui-theme-blue-gray):not(.ui-theme-two-tone-blue) .homepage .safety table th,
html[class*="ui-theme-"]:not(.ui-theme-blue-gray):not(.ui-theme-two-tone-blue) .homepage .safety table tr:first-child,
html[class*="ui-theme-"]:not(.ui-theme-blue-gray):not(.ui-theme-two-tone-blue) th,
html[class*="ui-theme-"]:not(.ui-theme-blue-gray):not(.ui-theme-two-tone-blue) .wt-table th {
  background: var(--bg-grid-head) !important;
  background-color: var(--bg-grid-head) !important;
  color: var(--text-muted) !important;
  border-color: var(--border-grid) !important;
}

html[class*="ui-theme-"]:not(.ui-theme-blue-gray):not(.ui-theme-two-tone-blue) table tbody tr,
html[class*="ui-theme-"]:not(.ui-theme-blue-gray):not(.ui-theme-two-tone-blue) #content table tbody tr,
html[class*="ui-theme-"]:not(.ui-theme-blue-gray):not(.ui-theme-two-tone-blue) #changelist table tbody tr,
html[class*="ui-theme-"]:not(.ui-theme-blue-gray):not(.ui-theme-two-tone-blue) #result_list tbody tr,
html[class*="ui-theme-"]:not(.ui-theme-blue-gray):not(.ui-theme-two-tone-blue) #result_list tr,
html[class*="ui-theme-"]:not(.ui-theme-blue-gray):not(.ui-theme-two-tone-blue) .module table tbody tr,
html[class*="ui-theme-"]:not(.ui-theme-blue-gray):not(.ui-theme-two-tone-blue) .homepage table tbody tr,
html[class*="ui-theme-"]:not(.ui-theme-blue-gray):not(.ui-theme-two-tone-blue) .homepage .projects table tr,
html[class*="ui-theme-"]:not(.ui-theme-blue-gray):not(.ui-theme-two-tone-blue) .homepage .projects table tr:first-child,
html[class*="ui-theme-"]:not(.ui-theme-blue-gray):not(.ui-theme-two-tone-blue) .homepage .projects table tr:nth-child(even),
html[class*="ui-theme-"]:not(.ui-theme-blue-gray):not(.ui-theme-two-tone-blue) .homepage .safety table tr,
html[class*="ui-theme-"]:not(.ui-theme-blue-gray):not(.ui-theme-two-tone-blue) .report-row,
html[class*="ui-theme-"]:not(.ui-theme-blue-gray):not(.ui-theme-two-tone-blue) .report-row:nth-child(even),
html[class*="ui-theme-"]:not(.ui-theme-blue-gray):not(.ui-theme-two-tone-blue) .google-visualization-table-tr-even,
html[class*="ui-theme-"]:not(.ui-theme-blue-gray):not(.ui-theme-two-tone-blue) .list-striped li,
html[class*="ui-theme-"]:not(.ui-theme-blue-gray):not(.ui-theme-two-tone-blue) .wt-table td {
  background: var(--bg-grid) !important;
  background-color: var(--bg-grid) !important;
  color: var(--text-primary) !important;
}

html[class*="ui-theme-"]:not(.ui-theme-blue-gray):not(.ui-theme-two-tone-blue) table tbody tr:nth-child(even),
html[class*="ui-theme-"]:not(.ui-theme-blue-gray):not(.ui-theme-two-tone-blue) #content table tbody tr:nth-child(even),
html[class*="ui-theme-"]:not(.ui-theme-blue-gray):not(.ui-theme-two-tone-blue) #changelist table tbody tr:nth-child(even),
html[class*="ui-theme-"]:not(.ui-theme-blue-gray):not(.ui-theme-two-tone-blue) #result_list tbody tr:nth-child(even),
html[class*="ui-theme-"]:not(.ui-theme-blue-gray):not(.ui-theme-two-tone-blue) #result_list tr:nth-child(even),
html[class*="ui-theme-"]:not(.ui-theme-blue-gray):not(.ui-theme-two-tone-blue) .module table tbody tr:nth-child(even),
html[class*="ui-theme-"]:not(.ui-theme-blue-gray):not(.ui-theme-two-tone-blue) .homepage table tbody tr:nth-child(even),
html[class*="ui-theme-"]:not(.ui-theme-blue-gray):not(.ui-theme-two-tone-blue) .homepage .projects table tbody tr:nth-child(even),
html[class*="ui-theme-"]:not(.ui-theme-blue-gray):not(.ui-theme-two-tone-blue) .homepage .safety table tbody tr:nth-child(even),
html[class*="ui-theme-"]:not(.ui-theme-blue-gray):not(.ui-theme-two-tone-blue) .homepage .safety table tr:nth-child(even),
html[class*="ui-theme-"]:not(.ui-theme-blue-gray):not(.ui-theme-two-tone-blue) .list-striped li:nth-child(even),
html[class*="ui-theme-"]:not(.ui-theme-blue-gray):not(.ui-theme-two-tone-blue) tr:nth-child(even) {
  background: var(--bg-grid-alt) !important;
  background-color: var(--bg-grid-alt) !important;
}

html[class*="ui-theme-"]:not(.ui-theme-blue-gray):not(.ui-theme-two-tone-blue) table td,
html[class*="ui-theme-"]:not(.ui-theme-blue-gray):not(.ui-theme-two-tone-blue) table th,
html[class*="ui-theme-"]:not(.ui-theme-blue-gray):not(.ui-theme-two-tone-blue) #content table td,
html[class*="ui-theme-"]:not(.ui-theme-blue-gray):not(.ui-theme-two-tone-blue) #changelist table td,
html[class*="ui-theme-"]:not(.ui-theme-blue-gray):not(.ui-theme-two-tone-blue) #result_list td,
html[class*="ui-theme-"]:not(.ui-theme-blue-gray):not(.ui-theme-two-tone-blue) #result_list th {
  color: var(--text-primary) !important;
  border-color: var(--border-grid) !important;
}

html[class*="ui-theme-"]:not(.ui-theme-blue-gray):not(.ui-theme-two-tone-blue) table tbody tr:hover,
html[class*="ui-theme-"]:not(.ui-theme-blue-gray):not(.ui-theme-two-tone-blue) table tbody tr:hover td,
html[class*="ui-theme-"]:not(.ui-theme-blue-gray):not(.ui-theme-two-tone-blue) #changelist table tbody tr:hover,
html[class*="ui-theme-"]:not(.ui-theme-blue-gray):not(.ui-theme-two-tone-blue) #result_list tbody tr:hover,
html[class*="ui-theme-"]:not(.ui-theme-blue-gray):not(.ui-theme-two-tone-blue) .homepage table tbody tr:hover td {
  background: var(--bg-hover) !important;
  background-color: var(--bg-hover) !important;
}

html[class*="ui-theme-"]:not(.ui-theme-blue-gray):not(.ui-theme-two-tone-blue) #content a,
html[class*="ui-theme-"]:not(.ui-theme-blue-gray):not(.ui-theme-two-tone-blue) table a,
html[class*="ui-theme-"]:not(.ui-theme-blue-gray):not(.ui-theme-two-tone-blue) #changelist table a,
html[class*="ui-theme-"]:not(.ui-theme-blue-gray):not(.ui-theme-two-tone-blue) #result_list a {
  color: var(--text-link) !important;
}

/* Filter / toolbar / sidebar cards */
html[class*="ui-theme-"]:not(.ui-theme-blue-gray):not(.ui-theme-two-tone-blue) #changelist-filter,
html[class*="ui-theme-"]:not(.ui-theme-blue-gray):not(.ui-theme-two-tone-blue) #changelist #toolbar,
html[class*="ui-theme-"]:not(.ui-theme-blue-gray):not(.ui-theme-two-tone-blue) .actions,
html[class*="ui-theme-"]:not(.ui-theme-blue-gray):not(.ui-theme-two-tone-blue) .paginator,
html[class*="ui-theme-"]:not(.ui-theme-blue-gray):not(.ui-theme-two-tone-blue) #content-related .module {
  background: var(--bg-filter) !important;
  background-color: var(--bg-filter) !important;
  color: var(--text-primary) !important;
  border-color: var(--border-grid) !important;
}

html[class*="ui-theme-"]:not(.ui-theme-blue-gray):not(.ui-theme-two-tone-blue) #changelist-filter h2,
html[class*="ui-theme-"]:not(.ui-theme-blue-gray):not(.ui-theme-two-tone-blue) #changelist-filter h3,
html[class*="ui-theme-"]:not(.ui-theme-blue-gray):not(.ui-theme-two-tone-blue) #changelist-filter a,
html[class*="ui-theme-"]:not(.ui-theme-blue-gray):not(.ui-theme-two-tone-blue) #changelist-filter li {
  color: var(--text-muted) !important;
  background: transparent !important;
}

/* Inputs */
html[class*="ui-theme-"]:not(.ui-theme-blue-gray):not(.ui-theme-two-tone-blue) input[type="text"],
html[class*="ui-theme-"]:not(.ui-theme-blue-gray):not(.ui-theme-two-tone-blue) input[type="password"],
html[class*="ui-theme-"]:not(.ui-theme-blue-gray):not(.ui-theme-two-tone-blue) input[type="email"],
html[class*="ui-theme-"]:not(.ui-theme-blue-gray):not(.ui-theme-two-tone-blue) input[type="search"],
html[class*="ui-theme-"]:not(.ui-theme-blue-gray):not(.ui-theme-two-tone-blue) input[type="number"],
html[class*="ui-theme-"]:not(.ui-theme-blue-gray):not(.ui-theme-two-tone-blue) textarea,
html[class*="ui-theme-"]:not(.ui-theme-blue-gray):not(.ui-theme-two-tone-blue) select,
html[class*="ui-theme-"]:not(.ui-theme-blue-gray):not(.ui-theme-two-tone-blue) .vTextField,
html[class*="ui-theme-"]:not(.ui-theme-blue-gray):not(.ui-theme-two-tone-blue) .select2-container--default .select2-selection--single {
  background: var(--bg-input) !important;
  background-color: var(--bg-input) !important;
  color: var(--text-primary) !important;
  border-color: var(--border-grid) !important;
}

/* Buttons keep accent; Dark uses hairline red via kcl-ai-theme-dark.css */
html[class*="ui-theme-"]:not(.ui-theme-blue-gray):not(.ui-theme-two-tone-blue) .button,
html[class*="ui-theme-"]:not(.ui-theme-blue-gray):not(.ui-theme-two-tone-blue) input[type="submit"]:not(.title),
html[class*="ui-theme-"]:not(.ui-theme-blue-gray):not(.ui-theme-two-tone-blue) input[type="button"],
html[class*="ui-theme-"]:not(.ui-theme-blue-gray):not(.ui-theme-two-tone-blue) .object-tools a,
html[class*="ui-theme-"]:not(.ui-theme-blue-gray):not(.ui-theme-two-tone-blue) .add-row a {
  background: var(--bg-button) !important;
  color: var(--text-button) !important;
  border-color: var(--accent-red) !important;
}

html[class*="ui-theme-"]:not(.ui-theme-blue-gray):not(.ui-theme-two-tone-blue) .button:hover,
html[class*="ui-theme-"]:not(.ui-theme-blue-gray):not(.ui-theme-two-tone-blue) input[type="submit"]:not(.title):hover,
html[class*="ui-theme-"]:not(.ui-theme-blue-gray):not(.ui-theme-two-tone-blue) .object-tools a:hover {
  background: var(--bg-button-hover) !important;
}

/* Watchtower maps onto the same tokens */
html[class*="ui-theme-"]:not(.ui-theme-blue-gray):not(.ui-theme-two-tone-blue) .wt {
  --wt-bg: var(--bg-body);
  --wt-panel: var(--bg-panel);
  --wt-panel-2: var(--bg-panel-2);
  --wt-line: var(--border-grid);
  --wt-red: var(--accent-red);
  --wt-text: var(--text-primary);
  --wt-muted: var(--text-muted);
}
