/* Bootstrap — AppStack look copied from AIMS /home/aims-dev (crm.css).
   Light body #F7F9FC, sidebar #293042, primary #3F80EA, Inter 0.825rem.
   Covers the whole Django admin chrome, changelists, forms, and nested
   inner tables (django-nested-inline tabular + stacked). */

html.ui-theme-bootstrap {
  --bg-body: #f7f9fc;
  --bg-sidebar: #293042;
  --bg-topnav: #ffffff;
  --bg-panel: #ffffff;
  --bg-panel-2: #f8f9fa;
  --bg-grid: #ffffff;
  --bg-grid-alt: #f8fafc;
  --bg-grid-head: #f1f4f8;
  --bg-card: #ffffff;
  --bg-input: #ffffff;
  --bg-hover: #eef4fc;
  --bg-button: #3f80ea;
  --bg-button-hover: #2c6ad4;
  --bg-filter: #ffffff;
  --text-primary: #495057;
  --text-muted: #6c757d;
  --text-link: #3f80ea;
  --text-button: #ffffff;
  --accent: #3f80ea;
  --accent-red: #3f80ea;
  --accent-dim: #2c6ad4;
  --border: #e2e8ee;
  --border-grid: #e2e8ee;
  --kcl-bg: #f7f9fc;
  --kcl-bg-2: #ffffff;
  --kcl-panel: #ffffff;
  --kcl-panel-2: #f8f9fa;
  --kcl-line: #e2e8ee;
  --kcl-lime: #3f80ea;
  --kcl-lime-dim: #2c6ad4;
  --kcl-text: #495057;
  --kcl-muted: #6c757d;
  --kcl-sidebar: #293042;
  --kcl-hover: #eef4fc;
  --kcl-accent: #3f80ea;
  --kcl-accent-dim: #2c6ad4;
  --grid-bg: #ffffff;
  --grid-row: #ffffff;
  --grid-alt: #f8fafc;
  --grid-head: #f1f4f8;
  --grid-line: #e2e8ee;
  --bs-primary: #3f80ea;
  --bs-sidebar: #293042;
  --bs-sidebar-link: rgba(226, 232, 238, 0.5);
  --bs-sidebar-link-hover: rgba(226, 232, 238, 0.75);
  --bs-sidebar-link-active: #e2e8ee;
  --bs-sidebar-child: #adb5bd;
  --bs-nested-indent: #edf2f7;
  --bs-nested-2: #e8eef6;
}

html.ui-theme-bootstrap,
html.ui-theme-bootstrap body {
  min-height: 100%;
  background: #f7f9fc !important;
  background-color: #f7f9fc !important;
  color: #6c757d !important;
  font-family: Inter, "Open Sans", ui-sans-serif, system-ui, sans-serif !important;
  font-size: 0.825rem !important;
  line-height: 1.625 !important;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  padding-top: 0 !important;
}

html.ui-theme-bootstrap #staging-banner,
body.ui-theme-bootstrap #staging-banner {
  display: none !important;
}

html.ui-theme-bootstrap h1,
html.ui-theme-bootstrap h2,
html.ui-theme-bootstrap h3,
html.ui-theme-bootstrap h4,
html.ui-theme-bootstrap .pc-title {
  color: #495057 !important;
  font-weight: 500 !important;
}

html.ui-theme-bootstrap a {
  color: #3f80ea !important;
  text-decoration: none !important;
}
html.ui-theme-bootstrap a:hover {
  color: #2c6ad4 !important;
  text-decoration: underline !important;
}

html.ui-theme-bootstrap #container {
  background: #f7f9fc !important;
  min-height: 100vh;
}

/* Sidebar — AppStack 260px #293042 */
html.ui-theme-bootstrap #main-nav {
  background: #293042 !important;
  background-color: #293042 !important;
  color: #fff !important;
  border-right: 0 !important;
  min-width: 260px;
  width: 260px;
}

html.ui-theme-bootstrap #branding {
  margin-bottom: 0 !important;
  padding: 1.15rem 1.5rem !important;
  border-bottom: 1px solid rgba(226, 232, 238, 0.08) !important;
  text-align: center;
}

html.ui-theme-bootstrap #branding a.logo {
  display: block;
  text-decoration: none !important;
}
html.ui-theme-bootstrap #branding a.logo img {
  display: block !important;
  width: 210px;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
}

html.ui-theme-bootstrap .main-menu {
  padding: 1rem 0 1.5rem;
  list-style: none;
}

html.ui-theme-bootstrap .main-menu li {
  border-right: 0 !important;
  border-left: 0 !important;
  margin: 0;
  border-radius: 0;
}

html.ui-theme-bootstrap .main-menu a {
  color: var(--bs-sidebar-link) !important;
  font-size: 0.825rem !important;
  font-weight: 400 !important;
  padding: 0.625rem 1.625rem !important;
  margin-bottom: 0 !important;
  border-radius: 0;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none !important;
}

html.ui-theme-bootstrap .main-menu a:hover {
  background: transparent !important;
  color: var(--bs-sidebar-link-hover) !important;
  text-decoration: none !important;
}

html.ui-theme-bootstrap .main-menu li:hover {
  border-color: transparent !important;
}

html.ui-theme-bootstrap .main-menu .material-icons {
  color: var(--bs-sidebar-link) !important;
  font-size: 18px;
  margin-right: 0;
}

html.ui-theme-bootstrap .main-menu a:hover .material-icons,
html.ui-theme-bootstrap .main-menu li:hover .material-icons {
  color: var(--bs-sidebar-link-hover) !important;
}

html.ui-theme-bootstrap .main-menu .menu-sub {
  list-style: none;
  margin: 0;
  padding: 0;
}
html.ui-theme-bootstrap .main-menu .menu-sub a {
  padding: 0.55rem 1.5rem 0.55rem 3.4rem !important;
  color: var(--bs-sidebar-child) !important;
  font-size: 90% !important;
}
html.ui-theme-bootstrap .main-menu .menu-sub a:hover {
  color: #e2e8ee !important;
}

html.ui-theme-bootstrap #notifications {
  color: #e2e8ee;
}

/* Top bar — white AppStack navbar */
html.ui-theme-bootstrap #top-nav {
  background: #ffffff !important;
  background-color: #ffffff !important;
  border-bottom: 0 !important;
  border-top: 0 !important;
  box-shadow: 0 0 2rem 0 rgba(41, 48, 66, 0.1);
  color: #6c757d !important;
  padding: 0.875rem 1.25rem !important;
}

html.ui-theme-bootstrap #top-nav a,
html.ui-theme-bootstrap .breadcrumbs,
html.ui-theme-bootstrap .user-links,
html.ui-theme-bootstrap #username {
  color: #6c757d !important;
}

html.ui-theme-bootstrap #top-nav a {
  color: #3f80ea !important;
  font-weight: 500 !important;
}
html.ui-theme-bootstrap #top-nav a:hover {
  color: #2c6ad4 !important;
}

html.ui-theme-bootstrap .breadcrumbs {
  font-size: 0.825rem;
  background: transparent !important;
}

html.ui-theme-bootstrap .ui-theme-switcher label {
  color: #6c757d !important;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: none;
}

html.ui-theme-bootstrap .ui-theme-switcher select {
  background-color: #ffffff !important;
  color: #495057 !important;
  border: 1px solid #e2e8ee !important;
  border-radius: 0.2rem;
  font: 500 12px Inter, "Open Sans", sans-serif;
  padding: 0.25rem 0.5rem;
}
html.ui-theme-bootstrap .ui-theme-switcher select:focus {
  outline: 1px solid #3f80ea;
  outline-offset: 1px;
}

html.ui-theme-bootstrap #top-nav .search input[type="search"],
html.ui-theme-bootstrap #top-nav .search input[type="text"] {
  background: #ffffff !important;
  color: #495057 !important;
  border: 1px solid #e2e8ee !important;
  border-radius: 0.2rem;
}
html.ui-theme-bootstrap #top-nav .search input[type="submit"] {
  background: #3f80ea !important;
  color: #ffffff !important;
  border: 0 !important;
}

/* Content */
html.ui-theme-bootstrap #content,
html.ui-theme-bootstrap #content-main {
  color: #495057 !important;
}

html.ui-theme-bootstrap #content a,
html.ui-theme-bootstrap #content-main a {
  color: #3f80ea !important;
}

/* Cards / modules / fieldsets */
html.ui-theme-bootstrap .section:not(.statistic),
html.ui-theme-bootstrap fieldset,
html.ui-theme-bootstrap .extras,
html.ui-theme-bootstrap .module,
html.ui-theme-bootstrap .notices,
html.ui-theme-bootstrap .ov-card,
html.ui-theme-bootstrap .ov-where,
html.ui-theme-bootstrap .homepage .projects,
html.ui-theme-bootstrap .homepage .safety,
html.ui-theme-bootstrap .homepage .payroll,
html.ui-theme-bootstrap .homepage .human-resources,
html.ui-theme-bootstrap .homepage .holidays,
html.ui-theme-bootstrap .homepage .services,
html.ui-theme-bootstrap .homepage .repairs,
html.ui-theme-bootstrap .homepage .notices,
html.ui-theme-bootstrap .report.module,
html.ui-theme-bootstrap #content-related .module,
html.ui-theme-bootstrap #content-related .section {
  background: #ffffff !important;
  background-color: #ffffff !important;
  border: 0 !important;
  border-radius: 0.2rem !important;
  box-shadow: 0 0.1rem 0.2rem rgba(0, 0, 0, 0.05) !important;
  color: #495057 !important;
}

html.ui-theme-bootstrap .section h2,
html.ui-theme-bootstrap fieldset h2,
html.ui-theme-bootstrap .module h2,
html.ui-theme-bootstrap .inline-group h2,
html.ui-theme-bootstrap .inline-related h3 {
  color: #495057 !important;
  font-size: 0.95rem !important;
  font-weight: 500 !important;
  background: #ffffff !important;
  border-bottom: 1px solid #e2e8ee !important;
  padding: 0.85rem 1.1rem 0.7rem !important;
  margin: 0 0 0.5rem !important;
}

html.ui-theme-bootstrap .inline-related h3 {
  background: #f8f9fa !important;
  color: #495057 !important;
  font-size: 0.8rem !important;
}

/* KPI tiles — white AppStack stat cards */
html.ui-theme-bootstrap .quick-stats .statistic,
html.ui-theme-bootstrap .statistic,
html.ui-theme-bootstrap .quick-stats > .section.statistic,
html.ui-theme-bootstrap #content-main .quick-stats > .section.statistic,
html.ui-theme-bootstrap .safety .quick-stats div {
  background: #ffffff !important;
  background-color: #ffffff !important;
  border: 0 !important;
  border-radius: 0.2rem !important;
  box-shadow: 0 0.1rem 0.2rem rgba(0, 0, 0, 0.05) !important;
  color: #495057 !important;
}

html.ui-theme-bootstrap .quick-stats .number,
html.ui-theme-bootstrap .statistic .number,
html.ui-theme-bootstrap .safety .quick-stats .days {
  color: #3f80ea !important;
  font-weight: 500 !important;
}

html.ui-theme-bootstrap .quick-stats .title,
html.ui-theme-bootstrap .statistic .title {
  color: #adb5bd !important;
  font-size: 0.75rem !important;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 500 !important;
}

/* Charts stay readable on light panels */
html.ui-theme-bootstrap #content-main .donut-chart,
html.ui-theme-bootstrap #content-main .chart,
html.ui-theme-bootstrap #content-main .bar-chart,
html.ui-theme-bootstrap #content-main .line-chart,
html.ui-theme-bootstrap #content .donut-chart,
html.ui-theme-bootstrap #content .chart {
  background: #ffffff !important;
  border-radius: 0.2rem;
  box-shadow: 0 0.1rem 0.2rem rgba(0, 0, 0, 0.05);
}

/* Buttons */
html.ui-theme-bootstrap .button,
html.ui-theme-bootstrap input[type="submit"]:not(.title),
html.ui-theme-bootstrap input[type="button"],
html.ui-theme-bootstrap .object-tools a,
html.ui-theme-bootstrap .add-row a,
html.ui-theme-bootstrap .go-link,
html.ui-theme-bootstrap .wt-btn {
  background: #3f80ea !important;
  background-image: none !important;
  color: #ffffff !important;
  border: 0 !important;
  border-radius: 0.2rem !important;
  font-weight: 500 !important;
  box-shadow: none !important;
}
html.ui-theme-bootstrap .button:hover,
html.ui-theme-bootstrap input[type="submit"]:not(.title):hover,
html.ui-theme-bootstrap .object-tools a:hover,
html.ui-theme-bootstrap .add-row a:hover {
  background: #2c6ad4 !important;
  color: #ffffff !important;
}
html.ui-theme-bootstrap .deletelink,
html.ui-theme-bootstrap .button.red {
  background: #d9534f !important;
  color: #ffffff !important;
}
html.ui-theme-bootstrap .button.grey {
  background: #6c757d !important;
  color: #ffffff !important;
}

/* Inputs */
html.ui-theme-bootstrap input[type="text"],
html.ui-theme-bootstrap input[type="password"],
html.ui-theme-bootstrap input[type="email"],
html.ui-theme-bootstrap input[type="search"],
html.ui-theme-bootstrap input[type="number"],
html.ui-theme-bootstrap input[type="date"],
html.ui-theme-bootstrap input[type="time"],
html.ui-theme-bootstrap input[type="url"],
html.ui-theme-bootstrap textarea,
html.ui-theme-bootstrap select,
html.ui-theme-bootstrap .vTextField,
html.ui-theme-bootstrap .vLargeTextField,
html.ui-theme-bootstrap .select2-container--default .select2-selection--single {
  background: #ffffff !important;
  background-color: #ffffff !important;
  color: #495057 !important;
  border: 1px solid #ced4da !important;
  border-radius: 0.2rem !important;
  font-family: Inter, "Open Sans", sans-serif !important;
}

html.ui-theme-bootstrap input:focus,
html.ui-theme-bootstrap textarea:focus,
html.ui-theme-bootstrap select:focus {
  border-color: #3f80ea !important;
  outline: 0;
  box-shadow: 0 0 0 0.15rem rgba(63, 128, 234, 0.25);
}

html.ui-theme-bootstrap label,
html.ui-theme-bootstrap .aligned label,
html.ui-theme-bootstrap th,
html.ui-theme-bootstrap .help,
html.ui-theme-bootstrap .help-text {
  color: #6c757d !important;
}

/* ==========================================================================
   Tables — outer changelist + every nested inner table
   ========================================================================== */

html.ui-theme-bootstrap table,
html.ui-theme-bootstrap #content table,
html.ui-theme-bootstrap #content-main table,
html.ui-theme-bootstrap .module table,
html.ui-theme-bootstrap .results table,
html.ui-theme-bootstrap #changelist,
html.ui-theme-bootstrap #changelist-form,
html.ui-theme-bootstrap #changelist table,
html.ui-theme-bootstrap #changelist .results,
html.ui-theme-bootstrap #result_list,
html.ui-theme-bootstrap table#result_list,
html.ui-theme-bootstrap .change-list #result_list,
html.ui-theme-bootstrap .homepage table,
html.ui-theme-bootstrap .homepage .projects table,
html.ui-theme-bootstrap .homepage .safety table,
html.ui-theme-bootstrap .homepage .payroll table,
html.ui-theme-bootstrap .homepage .human-resources table,
html.ui-theme-bootstrap .report table,
html.ui-theme-bootstrap .google-visualization-table-table,
html.ui-theme-bootstrap .wt-table-wrap,
html.ui-theme-bootstrap .inline-group table,
html.ui-theme-bootstrap .inline-related table,
html.ui-theme-bootstrap .tabular table,
html.ui-theme-bootstrap .nested-inline table,
html.ui-theme-bootstrap table table {
  background: #ffffff !important;
  background-color: #ffffff !important;
  color: #495057 !important;
  border-color: #e2e8ee !important;
  border-collapse: collapse;
}

html.ui-theme-bootstrap table thead th,
html.ui-theme-bootstrap #content table thead th,
html.ui-theme-bootstrap #changelist table thead th,
html.ui-theme-bootstrap #result_list thead th,
html.ui-theme-bootstrap table#result_list thead th,
html.ui-theme-bootstrap .homepage table thead th,
html.ui-theme-bootstrap .homepage .projects table th,
html.ui-theme-bootstrap .homepage .projects table tr:first-child,
html.ui-theme-bootstrap .homepage .safety table th,
html.ui-theme-bootstrap .homepage .safety table tr:first-child,
html.ui-theme-bootstrap .wt-table th,
html.ui-theme-bootstrap .inline-group table thead th,
html.ui-theme-bootstrap .nested-inline table thead th,
html.ui-theme-bootstrap table table thead th {
  background: #f1f4f8 !important;
  background-color: #f1f4f8 !important;
  color: #495057 !important;
  border-bottom: 1px solid #e2e8ee !important;
  border-color: #e2e8ee !important;
  font-weight: 600 !important;
  font-size: 0.75rem;
  text-transform: none;
}

html.ui-theme-bootstrap table thead th a,
html.ui-theme-bootstrap #result_list thead th a,
html.ui-theme-bootstrap .nested-inline table thead th a {
  color: #495057 !important;
}

html.ui-theme-bootstrap table tbody tr,
html.ui-theme-bootstrap #content table tbody tr,
html.ui-theme-bootstrap #changelist table tbody tr,
html.ui-theme-bootstrap #result_list tbody tr,
html.ui-theme-bootstrap #result_list tr,
html.ui-theme-bootstrap .module table tbody tr,
html.ui-theme-bootstrap .homepage table tbody tr,
html.ui-theme-bootstrap .homepage .projects table tr,
html.ui-theme-bootstrap .homepage .safety table tr,
html.ui-theme-bootstrap .report-row,
html.ui-theme-bootstrap .inline-group table tbody tr,
html.ui-theme-bootstrap .nested-inline table tbody tr,
html.ui-theme-bootstrap table table tbody tr,
html.ui-theme-bootstrap tr.row1,
html.ui-theme-bootstrap tr.form-row.row1 {
  background: #ffffff !important;
  background-color: #ffffff !important;
  color: #495057 !important;
}

html.ui-theme-bootstrap table tbody tr:nth-child(even),
html.ui-theme-bootstrap #content table tbody tr:nth-child(even),
html.ui-theme-bootstrap #changelist table tbody tr:nth-child(even),
html.ui-theme-bootstrap #result_list tbody tr:nth-child(even),
html.ui-theme-bootstrap #result_list tr:nth-child(even),
html.ui-theme-bootstrap .module table tbody tr:nth-child(even),
html.ui-theme-bootstrap .homepage table tbody tr:nth-child(even),
html.ui-theme-bootstrap .inline-group table tbody tr:nth-child(even),
html.ui-theme-bootstrap .nested-inline table tbody tr:nth-child(even),
html.ui-theme-bootstrap table table tbody tr:nth-child(even),
html.ui-theme-bootstrap tr.row2,
html.ui-theme-bootstrap tr.form-row.row2,
html.ui-theme-bootstrap tr:nth-child(even) {
  background: #f8fafc !important;
  background-color: #f8fafc !important;
}

html.ui-theme-bootstrap table td,
html.ui-theme-bootstrap table th,
html.ui-theme-bootstrap #content table td,
html.ui-theme-bootstrap #changelist table td,
html.ui-theme-bootstrap #result_list td,
html.ui-theme-bootstrap #result_list th,
html.ui-theme-bootstrap .nested-inline table td,
html.ui-theme-bootstrap .nested-inline table th,
html.ui-theme-bootstrap .inline-group table td,
html.ui-theme-bootstrap table table td,
html.ui-theme-bootstrap table table th {
  color: #495057 !important;
  border-color: #e2e8ee !important;
  border-bottom: 1px solid #e2e8ee !important;
}

html.ui-theme-bootstrap table tbody tr:hover,
html.ui-theme-bootstrap table tbody tr:hover td,
html.ui-theme-bootstrap #changelist table tbody tr:hover,
html.ui-theme-bootstrap #result_list tbody tr:hover,
html.ui-theme-bootstrap .homepage table tbody tr:hover td,
html.ui-theme-bootstrap .nested-inline table tbody tr:hover,
html.ui-theme-bootstrap .nested-inline table tbody tr:hover td,
html.ui-theme-bootstrap table table tbody tr:hover td {
  background: #eef4fc !important;
  background-color: #eef4fc !important;
}

html.ui-theme-bootstrap table a,
html.ui-theme-bootstrap #changelist table a,
html.ui-theme-bootstrap #result_list a,
html.ui-theme-bootstrap .module table a,
html.ui-theme-bootstrap .nested-inline table a {
  color: #3f80ea !important;
}

/* Nested inline groups (django-nested-inline) */
html.ui-theme-bootstrap .inline-group,
html.ui-theme-bootstrap .nested-inline,
html.ui-theme-bootstrap .tabular.inline-related,
html.ui-theme-bootstrap .inline-related {
  background: #ffffff !important;
  border: 1px solid #e2e8ee !important;
  border-radius: 0.2rem;
  box-shadow: 0 0.1rem 0.2rem rgba(0, 0, 0, 0.04);
  margin: 0.75rem 0 !important;
  overflow: hidden;
}

html.ui-theme-bootstrap .nested-inline-row > td,
html.ui-theme-bootstrap tr.nested-inline-row > td {
  background: var(--bs-nested-indent) !important;
  background-color: var(--bs-nested-indent) !important;
  padding: 0.65rem 0.65rem 0.65rem 1.1rem !important;
  border-bottom: 1px solid #e2e8ee !important;
  border-left: 3px solid #3f80ea !important;
}

html.ui-theme-bootstrap .nested-inline-row .nested-inline,
html.ui-theme-bootstrap td > .nested-inline,
html.ui-theme-bootstrap .nested-inline .nested-inline {
  margin: 0.15rem 0 0.35rem !important;
  box-shadow: none !important;
  border: 1px solid #d7e0ea !important;
  background: #ffffff !important;
}

html.ui-theme-bootstrap .nested-inline .nested-inline .nested-inline-row > td,
html.ui-theme-bootstrap .nested-inline .nested-inline-row .nested-inline-row > td {
  background: var(--bs-nested-2) !important;
  background-color: var(--bs-nested-2) !important;
  border-left-color: #5b96ed !important;
}

html.ui-theme-bootstrap .nested-inline-bottom-border {
  border-bottom: 1px solid #e2e8ee !important;
}

html.ui-theme-bootstrap .no-bottom-border.row1 > td,
html.ui-theme-bootstrap .no-bottom-border.row2 > td {
  border-bottom: 1px solid #e2e8ee !important;
}

html.ui-theme-bootstrap .inline-group .tabular tr.has_original td {
  background-clip: padding-box;
}

html.ui-theme-bootstrap .inline-group ul.tools,
html.ui-theme-bootstrap .inline-group div.add-row,
html.ui-theme-bootstrap .inline-group .tabular tr.add-row td {
  background: #f1f4f8 !important;
  color: #6c757d !important;
  border-color: #e2e8ee !important;
}

html.ui-theme-bootstrap .inline-group div.add-row a,
html.ui-theme-bootstrap .inline-group .tabular tr.add-row td a {
  color: #3f80ea !important;
  background-color: transparent !important;
}

html.ui-theme-bootstrap .inline-related fieldset.module h3,
html.ui-theme-bootstrap .inline-related fieldset {
  background: #ffffff !important;
  border: none !important;
  box-shadow: none !important;
}

html.ui-theme-bootstrap .form-row {
  background: transparent !important;
  border-bottom: 1px solid #e2e8ee !important;
  color: #495057 !important;
}

html.ui-theme-bootstrap .submit-row {
  background: #f8f9fa !important;
  border: 1px solid #e2e8ee !important;
  border-radius: 0.2rem;
  box-shadow: none !important;
}

/* Changelist chrome */
html.ui-theme-bootstrap #changelist-filter,
html.ui-theme-bootstrap #changelist #toolbar,
html.ui-theme-bootstrap .actions,
html.ui-theme-bootstrap .paginator {
  background: #ffffff !important;
  color: #495057 !important;
  border-color: #e2e8ee !important;
  box-shadow: 0 0.1rem 0.2rem rgba(0, 0, 0, 0.05);
}

html.ui-theme-bootstrap #changelist-filter h2,
html.ui-theme-bootstrap #changelist-filter h3,
html.ui-theme-bootstrap #changelist-filter a,
html.ui-theme-bootstrap #changelist-filter li {
  color: #6c757d !important;
  background: transparent !important;
}
html.ui-theme-bootstrap #changelist-filter a:hover,
html.ui-theme-bootstrap #changelist-filter li.selected a {
  color: #3f80ea !important;
}

html.ui-theme-bootstrap .paginator a,
html.ui-theme-bootstrap .paginator .this-page {
  background: #3f80ea !important;
  color: #ffffff !important;
  border-radius: 0.2rem;
}

html.ui-theme-bootstrap .object-tools {
  padding: 0;
}

html.ui-theme-bootstrap .messagelist li {
  background: #e8f0fe !important;
  color: #495057 !important;
  border-left: 3px solid #3f80ea;
}
html.ui-theme-bootstrap .messagelist li.error {
  background: #fdecea !important;
  border-left-color: #d9534f;
}
html.ui-theme-bootstrap .errorlist,
html.ui-theme-bootstrap .errornote {
  color: #d9534f !important;
}

/* Login — AppStack card on light canvas */
html.ui-theme-bootstrap body.login,
html.ui-theme-bootstrap body.login #container,
html.ui-theme-bootstrap body.login #content {
  background: #f7f9fc !important;
}
html.ui-theme-bootstrap body.login .section {
  background: #ffffff !important;
  box-shadow: 0 0.1rem 0.2rem rgba(0, 0, 0, 0.05) !important;
  border-radius: 0.2rem !important;
}
html.ui-theme-bootstrap body.login .branding {
  background: #293042 !important;
}

/* Watchtower */
html.ui-theme-bootstrap .wt {
  --wt-bg: #f7f9fc;
  --wt-panel: #ffffff;
  --wt-panel-2: #f8f9fa;
  --wt-line: #e2e8ee;
  --wt-red: #3f80ea;
  --wt-text: #495057;
  --wt-muted: #6c757d;
}
html.ui-theme-bootstrap .wt-card,
html.ui-theme-bootstrap .wt-panel,
html.ui-theme-bootstrap .wt-table-wrap,
html.ui-theme-bootstrap .wt-empty {
  background: #ffffff !important;
  border-color: #e2e8ee !important;
  color: #495057 !important;
}
html.ui-theme-bootstrap .wt-table th {
  background: #f1f4f8 !important;
  color: #495057 !important;
}
html.ui-theme-bootstrap .wt-section h2::after,
html.ui-theme-bootstrap .wt-bar > span,
html.ui-theme-bootstrap .wt-dot.on {
  background: #3f80ea !important;
  color: #3f80ea !important;
  border-color: #3f80ea !important;
}

/* Calendar / datepicker widgets */
html.ui-theme-bootstrap .calendarbox,
html.ui-theme-bootstrap .clockbox,
html.ui-theme-bootstrap .ui-datepicker,
html.ui-theme-bootstrap .ui-widget-content {
  background: #ffffff !important;
  color: #495057 !important;
  border: 1px solid #e2e8ee !important;
}

/* Related widget / popup leftovers */
html.ui-theme-bootstrap body.popup,
html.ui-theme-bootstrap body.popup #container,
html.ui-theme-bootstrap body.popup #content {
  background: #f7f9fc !important;
  color: #495057 !important;
}

html.ui-theme-bootstrap .text-button {
  color: #3f80ea !important;
}

html.ui-theme-bootstrap #ewo-ai-tab {
  background: #3f80ea !important;
  color: #ffffff !important;
}

/* Select2 dropdown (admin autocomplete). Match Bootstrap inputs and the blue highlight. */
html.ui-theme-bootstrap .select2-container--default .select2-selection--single,
html.ui-theme-bootstrap .select2-container--default .select2-selection--multiple,
html.ui-theme-bootstrap .select2-dropdown,
html.ui-theme-bootstrap .select2-container--default .select2-search--dropdown .select2-search__field {
  background: #ffffff !important;
  background-color: #ffffff !important;
  color: #495057 !important;
  border-color: #ced4da !important;
  border-radius: 0.2rem !important;
}
html.ui-theme-bootstrap .select2-container--default.select2-container--focus .select2-selection--single,
html.ui-theme-bootstrap .select2-container--default.select2-container--open .select2-selection--single {
  border-color: #3f80ea !important;
  box-shadow: 0 0 0 0.15rem rgba(63, 128, 234, 0.25);
}
html.ui-theme-bootstrap .select2-container--default .select2-results__option--highlighted,
html.ui-theme-bootstrap .select2-container--default .select2-results__option--highlighted[aria-selected] {
  background: #3f80ea !important;
  background-color: #3f80ea !important;
  color: #ffffff !important;
}
html.ui-theme-bootstrap .select2-container--default .select2-selection--multiple .select2-selection__choice {
  background: #eef4fc !important;
  background-color: #eef4fc !important;
  border-color: #ced4da !important;
  color: #495057 !important;
}


html.ui-theme-bootstrap table.kcl-nested-table,
html.ui-theme-bootstrap .nested-inline table.kcl-nested-table,
html.ui-theme-bootstrap .nested-inline-row table.kcl-nested-table,
html.ui-theme-bootstrap .nested-inline .nested-inline table.kcl-nested-table {
  width: 100% !important;
  background: #ffffff !important;
  border: 1px solid #e2e8ee !important;
  border-radius: 0.2rem;
}
html.ui-theme-bootstrap table.kcl-nested-table thead th {
  background: #eef2f7 !important;
  color: #495057 !important;
}
html.ui-theme-bootstrap table.kcl-nested-table tbody tr.form-row td,
html.ui-theme-bootstrap table.kcl-nested-table tbody td.inline-field {
  background: inherit !important;
  color: #495057 !important;
  vertical-align: middle;
}
html.ui-theme-bootstrap table.kcl-nested-table input,
html.ui-theme-bootstrap table.kcl-nested-table select,
html.ui-theme-bootstrap table.kcl-nested-table textarea {
  background: #ffffff !important;
  color: #495057 !important;
  border: 1px solid #ced4da !important;
}


/* Job/person custom nested tables (not django-nested-inline defaults) */
html.ui-theme-bootstrap table.custom-field-table,
html.ui-theme-bootstrap table.custom-field-table-links,
html.ui-theme-bootstrap table.resource,
html.ui-theme-bootstrap .form-row table,
html.ui-theme-bootstrap .fieldset-group table,
html.ui-theme-bootstrap fieldset table,
html.ui-theme-bootstrap .module table,
html.ui-theme-bootstrap .qmreq-expand table,
html.ui-theme-bootstrap table[width],
html.ui-theme-bootstrap table[width="100%"],
html.ui-theme-bootstrap table[width="100"] {
  background: #ffffff !important;
  color: #495057 !important;
  border: 1px solid #e2e8ee !important;
  border-collapse: collapse;
}
html.ui-theme-bootstrap table.custom-field-table td,
html.ui-theme-bootstrap table.custom-field-table-links td,
html.ui-theme-bootstrap table.resource td,
html.ui-theme-bootstrap .form-row table td,
html.ui-theme-bootstrap .qmreq-expand table td,
html.ui-theme-bootstrap fieldset table td {
  color: #495057 !important;
  border-color: #e2e8ee !important;
  background: transparent !important;
  padding: 0.45rem 0.65rem !important;
}
html.ui-theme-bootstrap table.custom-field-table a,
html.ui-theme-bootstrap table.custom-field-table-links a,
html.ui-theme-bootstrap table.resource a,
html.ui-theme-bootstrap .form-row table a,
html.ui-theme-bootstrap fieldset table a {
  color: #3f80ea !important;
}
html.ui-theme-bootstrap .module.category-pdfupload,
html.ui-theme-bootstrap fieldset.collapse,
html.ui-theme-bootstrap fieldset.collapsed {
  background: #ffffff !important;
  border: 1px solid #e2e8ee !important;
  box-shadow: 0 0.1rem 0.2rem rgba(0, 0, 0, 0.05) !important;
}
html.ui-theme-bootstrap fieldset.collapse h2,
html.ui-theme-bootstrap fieldset.collapsed h2 {
  background: #f1f4f8 !important;
  color: #495057 !important;
  border-bottom: 1px solid #e2e8ee !important;
}


html.ui-theme-bootstrap #ewo-ai-tab,
html.ui-theme-bootstrap #ewo-train-tab {
  background: #3f80ea !important;
  color: #ffffff !important;
}
html.ui-theme-bootstrap #ewo-ai-tab:hover,
html.ui-theme-bootstrap #ewo-train-tab:hover {
  background: #2c6ad4 !important;
}

/* ==========================================================================
   Charts, KPI overlays, legends, dashboard tables, Google Visualization
   ========================================================================== */

html.ui-theme-bootstrap .donut-chart .label-overlay,
html.ui-theme-bootstrap .label-overlay,
html.ui-theme-bootstrap #labelOverlay {
  color: #3f80ea !important;
}

html.ui-theme-bootstrap .legend,
html.ui-theme-bootstrap .legend li,
html.ui-theme-bootstrap .chart-units {
  color: #495057 !important;
}

html.ui-theme-bootstrap .legend li:hover {
  background: #eef4fc !important;
  outline: 1px solid #3f80ea;
}

html.ui-theme-bootstrap .legend li .box {
  outline: 1px solid #e2e8ee;
}

html.ui-theme-bootstrap #content-main .donut-chart,
html.ui-theme-bootstrap #content-main .chart,
html.ui-theme-bootstrap #content-main .bar-chart,
html.ui-theme-bootstrap #content-main .line-chart,
html.ui-theme-bootstrap #content .donut-chart,
html.ui-theme-bootstrap #content .chart,
html.ui-theme-bootstrap #content .bar-chart,
html.ui-theme-bootstrap #content .line-chart,
html.ui-theme-bootstrap .donut-chart,
html.ui-theme-bootstrap .bar-chart,
html.ui-theme-bootstrap .line-chart,
html.ui-theme-bootstrap .chart-display,
html.ui-theme-bootstrap [id$="_chart_div"] {
  background: #ffffff !important;
  background-color: #ffffff !important;
  color: #495057 !important;
}

html.ui-theme-bootstrap .donut-chart svg,
html.ui-theme-bootstrap .bar-chart svg,
html.ui-theme-bootstrap .line-chart svg,
html.ui-theme-bootstrap .chart-display svg {
  background: #ffffff !important;
}

html.ui-theme-bootstrap table.projects-table,
html.ui-theme-bootstrap .section.projects-list table,
html.ui-theme-bootstrap .projects-list table {
  background: #ffffff !important;
  background-color: #ffffff !important;
  color: #495057 !important;
  border: 1px solid #e2e8ee !important;
}

html.ui-theme-bootstrap table.projects-table thead th,
html.ui-theme-bootstrap table.projects-table th,
html.ui-theme-bootstrap .projects-list table thead th {
  background: #f1f4f8 !important;
  color: #495057 !important;
  border-bottom: 1px solid #e2e8ee !important;
}

html.ui-theme-bootstrap table.projects-table tbody tr,
html.ui-theme-bootstrap table.projects-table td {
  background: #ffffff !important;
  color: #495057 !important;
  border-color: #e2e8ee !important;
}

html.ui-theme-bootstrap table.projects-table tbody tr:nth-child(even),
html.ui-theme-bootstrap table.projects-table tbody tr:nth-child(even) td {
  background: #f8fafc !important;
}

html.ui-theme-bootstrap table.projects-table tbody tr:hover,
html.ui-theme-bootstrap table.projects-table tbody tr:hover td {
  background: #eef4fc !important;
}

html.ui-theme-bootstrap .google-visualization-table,
html.ui-theme-bootstrap .google-visualization-table-div-page,
html.ui-theme-bootstrap .google-visualization-table-table,
html.ui-theme-bootstrap .google-visualization-table-table td,
html.ui-theme-bootstrap .google-visualization-table-table th,
html.ui-theme-bootstrap .google-visualization-table-tr-head,
html.ui-theme-bootstrap .google-visualization-table-tr-even,
html.ui-theme-bootstrap .google-visualization-table-tr-odd,
html.ui-theme-bootstrap #table_vacations .google-visualization-table-table,
html.ui-theme-bootstrap #table_vacations .google-visualization-table-table th,
html.ui-theme-bootstrap #table_vacations .google-visualization-table-table td {
  background: #ffffff !important;
  background-color: #ffffff !important;
  color: #495057 !important;
  border-color: #e2e8ee !important;
}

html.ui-theme-bootstrap .google-visualization-table-tr-head,
html.ui-theme-bootstrap .google-visualization-table-th,
html.ui-theme-bootstrap #table_vacations .google-visualization-table-tr-head {
  background: #f1f4f8 !important;
  background-color: #f1f4f8 !important;
  color: #495057 !important;
}

html.ui-theme-bootstrap .google-visualization-table-tr-even,
html.ui-theme-bootstrap #table_vacations .google-visualization-table-tr-even,
html.ui-theme-bootstrap #table_vacations .google-visualization-table-tr-even:nth-child(even) {
  background: #f8fafc !important;
  background-color: #f8fafc !important;
  color: #495057 !important;
}

html.ui-theme-bootstrap .google-visualization-table-tr-odd {
  background: #ffffff !important;
  color: #495057 !important;
}

html.ui-theme-bootstrap .google-visualization-table .gradient {
  background-image: none !important;
}

html.ui-theme-bootstrap .list-striped li {
  background-color: #ffffff !important;
  border-top-color: #e2e8ee !important;
  color: #495057 !important;
}
html.ui-theme-bootstrap .list-striped li:nth-child(even) {
  background-color: #f8fafc !important;
}

html.ui-theme-bootstrap ul.btn-group-vertical {
  background-color: #ffffff !important;
  border-color: #e2e8ee !important;
  color: #495057 !important;
}
html.ui-theme-bootstrap ul.btn-group-vertical a {
  border-top-color: #e2e8ee !important;
  color: #3f80ea !important;
}

html.ui-theme-bootstrap .job-cost,
html.ui-theme-bootstrap .job-cost tr,
html.ui-theme-bootstrap .job-cost td {
  color: #495057 !important;
}

html.ui-theme-bootstrap span.kcl-spin.kcl-spin {
  color: #3f80ea !important;
}
html.ui-theme-bootstrap span.kcl-spin.kcl-spin:hover {
  color: #2c6ad4 !important;
}

html.ui-theme-bootstrap .ov,
html.ui-theme-bootstrap .ov h1,
html.ui-theme-bootstrap .ov h2,
html.ui-theme-bootstrap .ov h3,
html.ui-theme-bootstrap .ov strong,
html.ui-theme-bootstrap .ov-dl dt {
  color: #495057 !important;
}
html.ui-theme-bootstrap .ov h2 {
  border-bottom-color: #3f80ea !important;
}
html.ui-theme-bootstrap .ov-card,
html.ui-theme-bootstrap .ov-where {
  background: #ffffff !important;
  border-color: #e2e8ee !important;
  color: #6c757d !important;
}
html.ui-theme-bootstrap .ov-where {
  border-left-color: #3f80ea !important;
}

html.ui-theme-bootstrap .wt {
  --wt-bg: #f7f9fc;
  --wt-panel: #ffffff;
  --wt-panel-2: #f8f9fa;
  --wt-line: #e2e8ee;
  --wt-red: #3f80ea;
  --wt-text: #495057;
  --wt-muted: #6c757d;
  color: #495057;
}
html.ui-theme-bootstrap .wt-table th {
  background: #f1f4f8 !important;
  color: #495057 !important;
}
html.ui-theme-bootstrap .wt-table td {
  color: #495057 !important;
  border-bottom-color: #e2e8ee !important;
}
html.ui-theme-bootstrap .wt-btn {
  background: #3f80ea !important;
  color: #ffffff !important;
}

html.ui-theme-bootstrap .kcl-mail-compose textarea,
html.ui-theme-bootstrap .kcl-mail-compose input {
  background: #ffffff !important;
  color: #495057 !important;
  border-color: #ced4da !important;
}
