:root {
  /* --- Brand Colors --- */
  --shifthub-accent: #28a6bd;
  --shifthub-accent-hover: #1e8aa0;

  /* --- Dimensions --- */
  --sidebar-width: 280px;
  --sidebar-width-collapsed: 80px;
  --topbar-capsule-h: 36px;
  --topbar-capsule-vpad: 4px;

  /* --- Light Theme (Default) --- */
  --bg-body: #f4f6f8;
  --bg-surface: #ffffff;
  --bg-surface-alt: #f8f9fa;
  --bg-surface-highlight: #e9ecef;
  
  --text-main: #23292d;
  --text-secondary: #6c757d;
  --text-muted: #8da0a3;
  --text-inverse: #eaf6f7;
  
  --border-color: #dee2e6;
  --border-light: #e0e0e0;
  
  /* Navbar (Dark by default in light mode as per design) */
  --navbar-bg: #23292d;
  --navbar-text: #eaf6f7;
  --navbar-border: #222;
  --navbar-shadow: 0 2px 8px rgba(0,0,0,0.12);
  
  /* Sidebar */
  --sidebar-bg: #23292d;
  --sidebar-text: #8da0a3;
  
  /* Global Filters / Topbar Elements */
  --gf-bg: #2b3136;
  --gf-border: rgba(40,168,187,0.35);
  --gf-text: #eaf6f7;
  
  /* Dropdowns */
  --dropdown-bg: #f8f9fa;
  --dropdown-text: #23292d;
  --dropdown-border: #e0e0e0;
  --dropdown-hover-bg: #e9ecef;
  --dropdown-header-bg: #f3f3f3;
  
  /* Card */
  --card-bg: #ffffff;
  --card-border: rgba(0,0,0,0.125);
  --card-shadow: 0 2px 4px rgba(0,0,0,0.05);

  /* Modal */
  --modal-bg: #ffffff;
  --modal-header-border: #dee2e6;
}

[data-theme="dark"] {
  /* --- Dark Theme --- */
  --bg-body: #121416;
  --bg-surface: #1e2225;
  --bg-surface-alt: #252a2e;
  --bg-surface-highlight: #2f343a;
  
  --text-main: #eaf6f7;
  --text-secondary: #adb5bd;
  --text-muted: #6c757d;
  --text-inverse: #212529;
  
  --border-color: #2f363a;
  --border-light: #343a40;
  
  /* Navbar */
  --navbar-bg: #1e2225;
  --navbar-text: #eaf6f7;
  --navbar-border: #2f363a;
  --navbar-shadow: 0 2px 8px rgba(0,0,0,0.3);
  
  /* Sidebar */
  --sidebar-bg: #1e2225;
  --sidebar-text: #8da0a3;
  
  /* Global Filters / Topbar Elements */
  --gf-bg: #1e2225;
  --gf-border: rgba(40,168,187,0.25);
  --gf-text: #eaf6f7;
  
  /* Dropdowns */
  --dropdown-bg: #252a2e;
  --dropdown-text: #eaf6f7;
  --dropdown-border: #343a40;
  --dropdown-hover-bg: #2f343a;
  --dropdown-header-bg: #2f343a;
  
  /* Card */
  --card-bg: #1e2225;
  --card-border: #2f363a;
  --card-shadow: none;

  /* Modal */
  --modal-bg: #1e2225;
  --modal-header-border: #2f363a;
}

body {
  background-color: var(--bg-body);
  color: var(--text-main);
  transition: background-color 0.2s ease, color 0.2s ease;
}

/* Bootstrap Component Overrides */
.card {
  background-color: var(--card-bg);
  border-color: var(--card-border);
  color: var(--text-main);
  box-shadow: var(--card-shadow);
}
.card-header, .card-footer {
  background-color: var(--bg-surface-alt);
  border-color: var(--card-border);
  color: var(--text-main);
}

.modal-content {
  background-color: var(--modal-bg);
  color: var(--text-main);
  border-color: var(--border-color);
}
.offcanvas {
  background-color: var(--bg-surface);
  color: var(--text-main);
}
.offcanvas-header {
  border-bottom: 1px solid var(--border-color);
}
.modal-header, .modal-footer {
  border-color: var(--modal-header-border);
}
.btn-close {
  filter: var(--btn-close-filter, none);
}
[data-theme="dark"] .btn-close {
  filter: invert(1) grayscale(100%) brightness(200%);
}

.table {
  color: var(--text-main);
  border-color: var(--border-color);
}
.table > :not(caption) > * > * {
  background-color: transparent;
  border-bottom-color: var(--border-color);
  color: var(--text-main);
}
.table-striped > tbody > tr:nth-of-type(odd) > * {
  box-shadow: inset 0 0 0 9999px var(--bg-surface-alt);
}
.table-hover > tbody > tr:hover > * {
  box-shadow: inset 0 0 0 9999px var(--bg-surface-highlight);
}
/* Ensure dark mode tables don't get forced white text if .table-dark isn't used */
.table-light {
  background-color: var(--bg-surface);
  color: var(--text-main);
}

.form-control, .form-select {
  background-color: var(--bg-surface);
  border-color: var(--border-color);
  color: var(--text-main);
}
.form-control:focus, .form-select:focus {
  background-color: var(--bg-surface);
  border-color: var(--shifthub-accent);
  color: var(--text-main);
}
[data-theme="dark"] .form-control::placeholder {
  color: var(--text-secondary);
}

/* Rounded Border Table Helper */
.table.rounded-border { 
  border-radius: 12px; 
  overflow: hidden; 
  border-collapse: separate; 
  border-spacing: 0; 
} 
.table.rounded-border th:first-child, .table.rounded-border td:first-child { border-top-left-radius: 12px; } 
.table.rounded-border th:last-child, .table.rounded-border td:last-child { border-top-right-radius: 12px; } 
.table.rounded-border tr:last-child td:first-child { border-bottom-left-radius: 12px; } 
.table.rounded-border tr:last-child td:last-child { border-bottom-right-radius: 12px; }

/* TOPBAR / NAVBAR SHIFTHUB */
.navbar-shifthub {
  background: var(--navbar-bg) !important;
  color: var(--navbar-text) !important;
  box-shadow: var(--navbar-shadow);
  width: 100%;
  z-index: 1100;
  min-height: 56px;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  border-bottom: 1px solid var(--navbar-border);
}
.navbar-shifthub .container-fluid {
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}
.navbar-shifthub .navbar-brand,
.navbar-shifthub .nav-link,
.navbar-shifthub .form-check-label,
.navbar-shifthub .text-light {
  color: var(--navbar-text) !important;
}
.navbar-shifthub .navbar-brand i {
  color: var(--shifthub-accent) !important;
}

/* Navbar Dropdowns */
.navbar-shifthub .dropdown-menu {
  background: var(--dropdown-bg) !important;
  color: var(--dropdown-text) !important;
  border: 1px solid var(--dropdown-border);
  box-shadow: 0 2px 8px rgba(0,0,0,0.10);
}
.navbar-shifthub .dropdown-header,
.navbar-shifthub .dropdown-item,
#search-modal-results .dropdown-header,
#search-modal-results .dropdown-item {
  color: var(--dropdown-text) !important;
  font-weight: 500;
}
#search-modal-results .dropdown-header {
  background: var(--dropdown-header-bg) !important;
  color: var(--shifthub-accent) !important;
  font-size: 1em;
  font-weight: 700;
  border-bottom: 1px solid var(--dropdown-border);
}
#search-modal-results .dropdown-item {
  background: var(--dropdown-bg) !important;
}
#search-modal-results .dropdown-item:hover,
.navbar-shifthub .dropdown-item:hover {
  background: var(--dropdown-hover-bg) !important;
  color: var(--shifthub-accent) !important;
}

/* Specific overrides for navbar text inside dropdowns if needed */
/* The original code had specific color behaviors, harmonized here */

/* Sidebar */
#sidebar {
  width: var(--sidebar-width);
  height: calc(100vh - 56px) !important;
  min-height: 0 !important;
  position: fixed;
  top: 56px;
  left: 0;
  z-index: 1039;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background-color: var(--sidebar-bg);
  border-right: 1px solid var(--border-color);
}
#sidebar.collapsed {
  width: var(--sidebar-width-collapsed);
}
#sidebarNav {
  flex: 1 1 auto;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  min-height: 0;
  max-height: 100%;
  padding-top: 0;
  padding-bottom: 0 !important;
  background-color: var(--sidebar-bg) !important; /* Ensure bg matches */
  
  /* Fix layout: ensure items are top-aligned (not spaced out) and full width (stretch) */
  align-items: stretch !important;
  justify-content: flex-start !important;
  flex-wrap: nowrap !important;
}
.sidebar .nav-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-align: left;
  padding-left: 1.5rem;
  margin-left: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--sidebar-text);
  justify-content: flex-start !important;
  /* reduce vertical space per item */
  padding: 0.25rem 0.75rem 0.25rem 1.5rem !important;
  line-height: 1.2 !important;
}
.sidebar .nav-link i {
  width: 2.2em;
  min-width: 2.2em;
  max-width: 2.2em;
  text-align: center;
  margin-right: 0.5rem;
  display: inline-block;
  transform: scale(var(--icon-scale, 1));
  transform-origin: center;
  transition: transform 0.08s ease;
}
.sidebar .sidebar-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between !important;
  width: 100%;
  cursor: pointer;
  text-align: left;
  padding-left: 1.5rem;
  padding-right: 1.5rem; /* Ensure button isn't flushed to the right edge */
  margin-left: 0;
  font-size: 1.12em;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--shifthub-accent);
  margin-bottom: 7px;
}
.sidebar-section,
.sidebar-section > ul,
.sidebar .nav,
.sidebar .nav li {
  margin-left: 0;
  padding-left: 0;
  text-align: left;
}
.sidebar .nav,
.sidebar .nav li,
.sidebar-section > ul { margin-top: 0 !important; }
.sidebar-section { margin-top: 8px; margin-bottom: 0.5rem !important;}
.sidebar-section > ul {
  border-left: none;
  margin-bottom: 12px;
}

/* Collapsed behaviors */
.sidebar.collapsed .nav-link {
  padding-right: 0.75rem;
  font-size: 0; 
}
.sidebar.collapsed .nav-link i {
  font-size: 1.1rem; 
}
/* Collapsed behaviors */
/* When collapsed, we show the section header as a centered icon with separator */
.sidebar.collapsed .sidebar-section-title {
  display: flex !important;
  justify-content: center !important;
  /* Adjust spacing to match expanded mode and prevent vertical jumping */
  /* Expanded: ~24px height + 7px margin-bottom = ~31px total */
  /* Collapsed: 1.2rem(~19px) + 1px border + 4px padding-top + 7px margin-bottom = ~31px total */
  padding: 4px 0 0 0 !important;
  border-top: 1px solid var(--shifthub-accent);
  margin-top: 0 !important;
  margin-bottom: 7px !important;
}
/* Hide separator for the first section to avoid line at the very top */
.sidebar.collapsed .sidebar-section:first-child .sidebar-section-title {
  border-top-color: transparent;
}
/* Hide text and caret button in collapsed mode */
.sidebar.collapsed .sidebar-section-title .title-text,
.sidebar.collapsed .sidebar-section-title .caret-btn {
  display: none;
}
/* Section Icon Styles */
.section-icon {
  display: none; /* Hidden by default in expanded mode */
}
.sidebar.collapsed .section-icon {
  display: block;
  color: var(--shifthub-accent);
  font-size: 1.2rem;
  /* Enable dock effect scaling */
  transform: scale(var(--icon-scale, 1));
  transform-origin: center;
  transition: transform 0.08s ease;
}

/* Remove the old rule that hid the title completely */
/* .sidebar.collapsed .sidebar-section-title { display: none; } replaced above */

.sidebar-section.collapsed > ul {
  display: none !important;
}
.sidebar .sidebar-section-title .caret-btn i {
  transition: transform .2s ease;
}
.sidebar .sidebar-section-title .caret-btn {
  margin-left: 8px;
  padding: 2px 4px;
  line-height: 1;
}
.sidebar-section.collapsed .sidebar-section-title .caret-btn i {
  transform: rotate(-90deg);
}

/* Sidebar Toggle Button */
.sidebar-toggle-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1030;
}
#sidebar.collapsed .sidebar-toggle-btn i {
  transition: transform .15s ease;
  transform: rotate(180deg);
}

/* Tooltip for dock labels */
#sidebar-dock-tooltip {
  position: fixed;
  top: 0;
  left: 0;
  transform: translateY(-8px);
  background: rgba(0, 0, 0, 0.85);
  color: #fff;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 12px;
  line-height: 1.2;
  white-space: nowrap;
  pointer-events: none;
  z-index: 2000;
  display: none;
}

/* App Layout */
#app-root-layout.with-sidebar main {
  margin-left: var(--sidebar-width);
  transition: margin-left .2s ease;
}
#app-root-layout.with-sidebar.with-sidebar-collapsed main {
  margin-left: var(--sidebar-width-collapsed);
}

/* Global Scope Filters (Topbar) */
.navbar-shifthub #global-scope-filters {
  --gf-accent: var(--shifthub-accent);
  background: var(--gf-bg);
  border: 1px solid var(--gf-border);
  border-radius: 10px;
  padding: 0 10px;
  height: auto !important;
  min-height: 34px;
  box-sizing: border-box;
  margin: 0 !important;
  display: flex;
  align-items: center;
  gap: 8px;
  padding-top: 4px;
  padding-bottom: 4px;
}
.navbar-shifthub #global-scope-filters .gf-logo {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: rgba(40,168,187,0.15);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--gf-accent);
  margin-right: 4px;
  flex: 0 0 auto;
}
.navbar-shifthub #global-scope-filters .btn,
.navbar-shifthub #global-scope-filters .dropdown-toggle,
.navbar-shifthub #global-scope-filters .form-select {
  height: auto !important;
  min-height: 32px;
  padding: 4px 10px;
  line-height: 1.25;
  background: var(--gf-bg);
  color: var(--gf-text);
  border: 1px solid var(--gf-accent);
  border-radius: 8px;
}
.navbar-shifthub #global-scope-filters .btn:hover,
.navbar-shifthub #global-scope-filters .dropdown-toggle:hover,
.navbar-shifthub #global-scope-filters .form-select:hover {
  color: var(--gf-accent);
  background: var(--bg-surface-highlight); 
  border-color: var(--gf-accent);
}
.navbar-shifthub #global-scope-filters .dropdown-menu {
  margin-top: .25rem;
  min-width: 220px;
  max-height: 320px;
  overflow: auto;
  background-color: var(--dropdown-bg);
  border-color: var(--dropdown-border);
}
.navbar-shifthub #global-scope-filters .dropdown-item {
  color: var(--dropdown-text);
}
.navbar-shifthub #global-scope-filters .dropdown-item:hover,
.navbar-shifthub #global-scope-filters .dropdown-item:focus {
  background-color: var(--dropdown-hover-bg);
  color: var(--dropdown-text);
}
.navbar-shifthub #global-scope-filters .dropdown-item.active {
  background-color: var(--shifthub-accent);
  color: #fff;
}
.navbar-shifthub #global-scope-filters > div:not(:first-child) {
  border-left: 1px solid var(--border-color);
  padding-left: 8px;
  margin-left: 4px;
}
/* Reset Button */
.navbar-shifthub #global-scope-filters #gf-reset {
  background: var(--gf-bg);
  color: var(--gf-text);
  border-color: var(--gf-accent);
}

/* Topbar Breadcrumb */
.topbar-breadcrumb {
  background: var(--gf-bg);
  color: var(--navbar-text);
  border: 1px solid var(--gf-border);
  border-radius: 10px;
  height: auto !important;
  min-height: 34px;
  padding: 6px 12px;
  box-sizing: border-box;
  margin: 0 !important;
  display: flex;
  align-items: center;
  line-height: 1;
  white-space: nowrap;
  font-size: 0.98rem;
  text-transform: uppercase;
}
.topbar-breadcrumb i {
  color: var(--shifthub-accent) !important;
}
.topbar-breadcrumb .crumb {
  color: var(--navbar-text);
  font-weight: 600;
}
.topbar-breadcrumb .sep {
  color: var(--shifthub-accent);
  opacity: 0.9;
  margin: 0 6px;
}
/* Glue styles */
#gf-breadcrumb-glue { gap: 5px !important; }
.topbar-breadcrumb.glued-left {
  border-top-right-radius: 10px;
  border-bottom-right-radius: 10px;
  border-right: 1px solid var(--gf-border);
  margin-right: 0 !important;
}
.navbar-shifthub #global-scope-filters.glued-right {
  border-top-left-radius: 10px;
  border-bottom-left-radius: 10px;
  border-left: 1px solid var(--gf-border);
  margin-left: 0 !important;
  margin-right: 0 !important;
}

/* Topbar Search */
.navbar-shifthub .input-group {
  min-height: 34px;
  align-items: stretch;
}
.navbar-shifthub .input-group > .input-group-text,
.navbar-shifthub .input-group > .form-control {
  height: auto !important;
  min-height: 32px;
  padding-top: 4px;
  padding-bottom: 4px;
  line-height: 1.25;
}

.navbar-shifthub .input-group-text {
  background-color: var(--bg-surface);
  border-color: var(--border-color);
  color: var(--text-secondary);
}

[data-theme="dark"] .navbar-shifthub .input-group-text {
  color: var(--text-main);
}

/* Topbar Layout Corrections */
.navbar-shifthub .container-fluid > .d-flex.flex-grow-1 {
  justify-content: space-between !important;
  align-items: center !important;
}
.topbar-left-placeholder { flex: 1 1 0; min-width: 1px; }
.topbar-center-group { flex: 0 1 auto; display: flex; align-items: center; gap: 12px; justify-content: center; }
.topbar-actions { flex: 1 1 0; display: flex; align-items: center; justify-content: flex-end; gap: 12px; }

@media (max-width: 1200px) {
  .navbar-shifthub .container-fluid > .d-flex.flex-grow-1 { flex-wrap: wrap; justify-content: center !important; }
  .topbar-center-group { order: 1; width: 100%; justify-content: center; padding: 4px 0; }
  .topbar-left-placeholder, .topbar-actions { order: 2; }
}

/* Custom Timeline Slider */
.custom-timeline-slider .timeline-tick {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 18px;
  height: 18px;
  background: var(--bg-surface);
  border: 2px solid #004478; /* Specific component color, keep or adapt */
  border-radius: 50%;
  cursor: pointer;
  z-index: 10;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
}
.custom-timeline-slider .timeline-tick.selected {
  border-color: #ff4444;
  box-shadow: 0 0 0 3px #ff444455;
}
.custom-timeline-slider .timeline-pointer {
  position: absolute;
  top: 6px;
  width: 2px;
  height: 36px;
  background: #ff4444;
  z-index: 20;
  transition: left 0.2s;
  border-radius: 1px;
}
.custom-timeline-slider .timeline-tooltip {
  position: absolute;
  top: -22px;
  transform: translateX(-50%);
  background: var(--bg-surface);
  color: #004478;
  font-size: 0.85em;
  padding: 2px 8px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  white-space: nowrap;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  z-index: 30;
  pointer-events: none;
  transition: left 0.2s;
}
.custom-timeline-slider .timeline-bar {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--border-light);
  transform: translateY(-50%);
  border-radius: 2px;
  z-index: 5;
}
.custom-timeline-slider .timeline-label {
  position: absolute;
  top: calc(50% + 12px);
  transform: translateX(-50%);
  font-size: 0.75em;
  color: var(--text-secondary);
  white-space: nowrap;
  z-index: 5;
}

/* Custom Timeline Slider Dot */
.custom-timeline-slider .timeline-dot {
  width: 8px;
  height: 8px;
  background: #004478; /* Default light theme color */
  border-radius: 50%;
  display: block;
}

/* Dark Theme Overrides for Timeline Slider */
[data-theme="dark"] .custom-timeline-slider .timeline-tick {
  border-color: var(--shifthub-accent); /* Lighter border in dark mode */
}
[data-theme="dark"] .custom-timeline-slider .timeline-dot {
  background: var(--shifthub-accent); /* Lighter dot in dark mode */
}
[data-theme="dark"] .custom-timeline-slider .timeline-tooltip {
  color: var(--text-main); /* White text in dark mode */
  border-color: var(--border-color);
  background: var(--bg-surface-highlight);
}

/* KPI Cards Compact */
#kpi-cards-container .card {
  padding: 0.6rem 0.9rem !important;
  min-width: 140px !important;
  max-width: 210px;
  border-radius: 10px;
  margin-bottom: 0.5rem;
}
#kpi-cards-container .card-body {
  padding: 0.5rem 0 !important;
  gap: 7px !important;
  min-height: 44px;
}
#kpi-cards-container .card-body i {
  font-size: 1.6em !important;
  min-width: 1.6em;
}
#kpi-cards-container .card-body > div > div:first-child {
  font-size: 1.08em !important;
  font-weight: 600;
  line-height: 1.1;
  color: var(--text-main);
}
#kpi-cards-container .card-body > div > div:last-child {
  font-size: 0.98em !important;
  color: var(--text-secondary);
  line-height: 1.1;
}
#kpi-cards-container .row {
  margin-bottom: 0.3rem !important;
}

/* Modern Table Enhancements */
.table-modern thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--bg-surface-alt);
  box-shadow: inset 0 -1px 0 var(--border-color);
  white-space: nowrap;
}
.table-modern tbody tr:hover {
  background-color: var(--bg-surface-highlight);
}
.table-modern td.text-end,
.table-modern th.text-end {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.table-modern td,
.table-modern th {
  vertical-align: middle;
}
.table-modern {
  border-collapse: separate;
  border-spacing: 0;
}
.table-responsive.table-fixed-height {
  max-height: 65vh;
  overflow-y: auto;
  scrollbar-gutter: stable both-edges;
  padding-right: 10px;
}

/* Pivot Table Sticky Columns */
#opps-pivot-dc thead th:last-child,
#opps-pivot-dc tbody td:last-child,
#opps-pivot-type thead th:last-child,
#opps-pivot-type tbody td:last-child {
  position: sticky;
  right: 0;
  background: var(--bg-surface);
  z-index: 2;
  border-left: 1px solid var(--border-color);
}
[data-theme="dark"] #opps-pivot-dc thead th:last-child,
[data-theme="dark"] #opps-pivot-dc tbody td:last-child,
[data-theme="dark"] #opps-pivot-type thead th:last-child,
[data-theme="dark"] #opps-pivot-type tbody td:last-child {
  background: var(--bg-surface);
}

/* Opportunities table small text */
#opportunities-table tbody td,
#opportunities-table tbody th,
#opportunities-table-cpu tbody td,
#opportunities-table-cpu tbody th,
#opportunities-table-mem tbody td,
#opportunities-table-mem tbody th,
#opportunities-table-sto tbody td,
#opportunities-table-sto tbody th {
  font-size: 0.875rem;
}

/* Chart Container */
.chart-container {
  cursor: pointer;
  position: relative;
}
.chart-center-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--text-main);
}
.risk-chart-details-box {
  position: fixed;
  width: 220px;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  border-radius: 8px;
  padding: 10px;
  z-index: 1050;
  display: none;
  color: var(--text-main);
}
.risk-chart-details-box .details-header {
  font-weight: bold;
  text-align: center;
  margin-bottom: 10px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 5px;
}
.risk-chart-details-box .details-list {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 0.9rem;
}
.risk-chart-details-box .details-list li {
  display: flex;
  align-items: center;
  margin-bottom: 5px;
}
.risk-chart-details-box .color-box {
  width: 12px;
  height: 12px;
  margin-right: 8px;
  display: inline-block;
}
.risk-chart-details-box .percent {
  margin-left: auto;
  font-weight: bold;
}

/* Assistant IA theming */
#mcp-assistant-btn {
  background: var(--shifthub-accent) !important;
  border-color: var(--shifthub-accent) !important;
}
#mcp-assistant-btn:hover,
#mcp-assistant-btn:focus {
  background: var(--shifthub-accent-hover) !important;
  border-color: var(--shifthub-accent-hover) !important;
}
#mcpChatOffcanvas .btn-primary {
  background: var(--shifthub-accent) !important;
  border-color: var(--shifthub-accent) !important;
}
#mcpChatOffcanvas .btn-primary:hover,
#mcpChatOffcanvas .btn-primary:focus {
  background: var(--shifthub-accent-hover) !important;
  border-color: var(--shifthub-accent-hover) !important;
}
#mcpChatOffcanvas .badge.bg-secondary {
  background-color: var(--shifthub-accent) !important;
  color: #fff !important;
}
#mcp-conv-sidebar {
  background: var(--bg-surface-alt) !important;
  border-right: 1px solid var(--border-color) !important;
  color: var(--text-main);
}
#mcp-conv-sidebar .fw-bold {
  color: var(--shifthub-accent) !important;
}
#mcp-conv-list li.active .d-flex,
#mcp-conv-list li.selected .d-flex {
  border-left: 3px solid var(--shifthub-accent);
  background: rgba(40,166,189,0.12);
  border-radius: 6px;
}
#mcp-chat-history {
  background: var(--bg-surface-alt) !important;
  border-color: var(--border-color) !important;
  color: var(--text-main);
}
#mcp-fullscreen-btn {
  background-color: var(--bg-surface) !important;
  border-color: var(--border-color) !important;
  color: var(--text-secondary);
}
#mcp-fullscreen-btn:hover {
  color: var(--shifthub-accent);
  border-color: var(--shifthub-accent) !important;
}
#mcp-conv-list li.selected {
  background-color: rgba(40,166,189,0.15) !important; /* var(--shifthub-accent) with opacity */
  border-radius: 6px;
}
[data-theme="dark"] #mcp-conv-list li.selected {
  background-color: rgba(40,166,189,0.25) !important;
}

/* Wizard Stepper */
.wizard-stepper {
  display: flex;
  justify-content: space-between;
  position: relative;
  margin-bottom: 2rem;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}
.wizard-stepper::before {
  content: "";
  position: absolute;
  top: 15px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--border-light);
  z-index: 0;
}
.wizard-step {
  background: var(--bg-body); 
  padding: 0 10px;
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  cursor: default;
}
.wizard-step-circle {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--bg-surface);
  border: 2px solid var(--border-light);
  color: var(--text-muted);
  font-weight: 600;
  transition: all 0.2s;
}
.wizard-step.active .wizard-step-circle {
  background: var(--shifthub-accent);
  border-color: var(--shifthub-accent);
  color: #fff;
  box-shadow: 0 0 0 4px rgba(40, 166, 189, 0.15);
}
.wizard-step.completed .wizard-step-circle {
  background: #198754;
  border-color: #198754;
  color: #fff;
}
.wizard-step-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
  text-align: center;
}
.wizard-step.active .wizard-step-label {
  color: var(--shifthub-accent);
  font-weight: 700;
}
.wizard-step.completed .wizard-step-label {
  color: #198754;
}

/* Comparison Table */
.solution-compare-table.table-striped > tbody > tr:nth-of-type(odd) > * {
  background-color: rgba(40, 166, 189, 0.05); /* Accent-based stripe */
}
