/* Global Bootstrap overrides */
html, body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    overflow-x: hidden; /* Prevent horizontal scrolling */
}

/* Fixed navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1030;
}

/* Enable scrolling on body */
body {
    padding-top: 56px; /* For navbar */
    overflow-y: auto; /* Enable vertical scrolling */
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Make main content expand to fill available space */
main,
.content-wrapper {
    flex: 1 0 auto; /* This makes the content area expand */
}

/* Pulsing button animation */
.btn-pulsing {
    animation: pulse 2s infinite;
}
  
@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}
  
/* Footer stays at bottom of content, not fixed */
footer {
    flex-shrink: 0;
    width: 100%; /* Use 100% to match parent container */
    background-color: var(--bs-body-bg, #fff);
    border-top: 1px solid rgba(0,0,0,0.1);
    position: relative;
    z-index: 1025; /* Above sidebar */
    height: auto; /* Allow natural height */
    min-height: 40px;
    padding: 0px 0;
    box-sizing: border-box;
}

/* For dark mode support */
[data-bs-theme="dark"] footer {
    background-color: var(--bs-dark-bg-subtle, #212529);
    border-top-color: rgba(255,255,255,0.1);
}

/* Fix dropdown menus globally */
.dropdown-menu {
    position: absolute;
    z-index: 1000;
    display: none;
    min-width: 160px;
    padding: 0.5rem 0;
    margin: 0.125rem 0 0;
    background-color: white;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
}

.dropdown-menu.show {
    display: block;
}

/* Fix z-index conflicts */
.dropdown,
.dropdown-center,
.dropend,
.dropstart,
.dropup,
.dropup-center {
    position: relative !important;
}

/* === DASHBOARD STYLES === */

/* Card Panel Styles */
.card-panel {
  border: 1px solid #d1d5db;
  border-radius: 8px;
  padding: 1.25rem;
  margin-bottom: 1.5rem;
  background-color: white;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.panel-header {
  font-size: 1.1rem;
  font-weight: 500;
  margin-bottom: 1rem;
  color: #0f1b2a;
  position: relative;
}

/* Data Table Styles */
.data-table-container {
  margin-top: 1.5rem;
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background-color: white;
  border: 1px solid #e9ebed;
  border-radius: 4px;
}

.data-table th {
  background-color: #f9f9f9;
  color: #16191f;
  font-weight: 600;
  text-align: left;
  padding: 0.75rem;
  border-bottom: 1px solid #e9ebed;
  position: relative;
  user-select: none;
}

.data-table td {
  padding: 0.75rem;
  border-bottom: 1px solid #e9ebed;
  color: #16191f;
}

.data-table tr:last-child td {
  border-bottom: none;
}

.data-table tbody tr:hover {
  background-color: #f5f8fa;
}

.data-table tbody tr.selected {
  background-color: #e1f5fe;
}

/* Progress Ring Styles */
.progress-ring-container {
  width: 100px;
  height: 100px;
  position: relative;
  margin: 0 auto;
}

.progress-ring {
  transform: rotate(-90deg);
}

.progress-ring circle {
    transition: stroke-dashoffset 0.5s ease-in-out;
}

.progress-ring-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 0.9rem;
  font-weight: 600;
}

.progress-ring-text {
    font-weight: bold;
    font-size: 14px;
}

/* Highlight and Metric Styles */
.highlight-card {
  border-left: 4px solid #0a58ca; /* Changed from #ffc107 to blue */
}

.metric-value {
  font-size: 1.5rem;
  font-weight: 600;
  color: #0a58ca; /* Changed from #ffc107 to blue */
  margin: 0;
  line-height: 1.2;
  text-align: center;
  align-self: end;
}

.metric-label {
  font-size: 0.9rem;
  color: #5f6b7a;
}

/* Chart Container Styles */
.chart-container {
  background-color: white;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  padding: 1rem;
  height: 100%;
}

/* Rank List Styles */
.rank-list {
  list-style: none;
  padding: 0;
  margin: 0;
  max-height: 300px;
  overflow-y: auto;
}

.rank-item {
  display: flex;
  padding: 0.5rem;
  border-bottom: 1px solid #e9ebed;
  align-items: center;
}

.rank-item.current-user {
  background-color: #e1f5fe;
  font-weight: 600;
}

.rank-position {
  width: 30px;
  text-align: center;
  font-weight: 600;
}

.rank-username {
  flex: 1;
  margin: 0 0.5rem;
}

.rank-score {
  font-weight: 600;
  margin-right: 0.5rem;
}

.rank-change {
  width: 25px;
  text-align: center;
}

.rank-change.up {
  color: #36a15d;
}

.rank-change.down {
  color: #d13212;
}

/* Flip Card Effect */
.flip-container {
  perspective: 1000px;
  position: relative;
  height: 100px;
  margin-bottom: 1rem;
}

.flipper {
  transition: 0.6s;
  transform-style: preserve-3d;
  position: relative;
  width: 100%;
  height: 100%;
}

.front,
.back {
  backface-visibility: hidden;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.front {
  z-index: 2;
  transform: rotateY(0deg);
}

.back {
  transform: rotateY(180deg);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem;
}

.flip-container.flip .flipper {
  transform: rotateY(180deg);
}

/* Custom button style to match dashboard */
.action-button {
  border: 1px solid #d1d5db;
  background-color: white;
  color: #16191f;
  padding: 0.375rem 0.75rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.2s;
}

.action-button:hover {
  background-color: #f5f8fa;
}

.action-button.active {
  background-color: #0a58ca; /* Changed from #ffc107 to blue */
  color: #ffffff; /* White text for better contrast on blue */
  border-color: #0a58ca; /* Changed from #ffc107 to blue */
}

/* Three Dots Menu (commonly used in dashboards) */
.three-dots {
  position: absolute;
  top: 50%;
  right: 0;
  transform: translateY(-50%);
  cursor: pointer;
  font-size: 1.2rem;
  color: #5f6b7a;
}

/* Ensure dropdown menus work properly */
.dropdown-menu {
  position: absolute;
  z-index: 1000;
  display: none;
  min-width: 160px;
  padding: 0.5rem 0;
  margin: 0.125rem 0 0;
  background-color: white;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
}

.dropdown-menu.show {
  display: block;
}

/* Date range container styling */
.date-range-container {
  display: none;
  margin-top: 0.75rem;
  margin-bottom: 1.5rem;
  padding: 0.75rem;
  background-color: #f9f9f9;
  border-radius: 4px;
  border: 1px solid #e9ebed;
}

.date-range-container.show {
  display: block;
}

.date-range-container .input-group {
  width: 100%;
}

.date-range-container .input-group-text {
  background-color: #fff;
  border-color: #d1d5db;
  color: #5f6b7a;
  font-weight: 500;
}

/* Time range selector styling */
.time-range-selector {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.time-range-selector .action-button {
  flex: 0 0 auto;
}

@media (max-width: 768px) {
  .time-range-selector {
      justify-content: center;
  }
  
  .date-range-container .row > div {
      margin-bottom: 0.5rem;
  }
  
  .date-range-container .row > div:last-child {
      text-align: center;
  }
}
/* Dashboard Metric Alignment */
.card-panel .row .col {
  display: grid;
  grid-template-rows: auto auto auto;
  min-height: 100px;
  padding: 10px 5px;
}

.metric-value {
  font-size: 1.5rem;
  font-weight: 600;
  color: #0a58ca;
  margin: 0;
  line-height: 1.2;
  text-align: center;
  align-self: end;
}

.metric-label {
  font-size: 0.9rem;
  color: #5f6b7a;
  margin: 5px 0;
  line-height: 1.2;
  text-align: center;
  align-self: center;
}

.metric-spacer {
  height: 13px;
  visibility: hidden;
  align-self: start;
}

/* Flip Container */


.flip-container {
  perspective: 1000px;
  width: 100%;
}

.flipper {
  transition: 0.6s;
  transform-style: preserve-3d;
  width: 100%;
  height: 100%;
}

.front,
.back {
  backface-visibility: hidden;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

.front {
  z-index: 2;
  transform: rotateY(0deg);
  display: grid;
  grid-template-rows: auto auto auto;
}

.front .metric-value {
  align-self: end;
}

.front .metric-label {
  align-self: center;
}

.front .flip-indicator {
  align-self: start;
  display: flex;
  justify-content: center;
  align-items: center;
}

.flip-indicator .flip-dot {
  width: 8px;
  height: 8px;
  background-color: #0a58ca; /* Changed from #ffc107 to blue */
  border-radius: 50%;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.flip-indicator .flip-dot:hover {
  transform: scale(1.2);
}

.back {
  transform: rotateY(180deg);
  padding: 10px 5px;
  flex-wrap: wrap;
  justify-content: center;
  gap: 5px;
}

.flip-container.flip .flipper {
  transform: rotateY(180deg);
}

.flip-container.flip .flip-dot {
  opacity: 0.5;
  background-color: #d1d5db;
}

/* Add this to the very end of your CSS file to fix rank alignment */
.flip-container .front .metric-value {
  margin-top: 0 !important;  /* Decreased from 5px to 0px */
  align-self: end !important;
  grid-row: 1 !important;
}

.flip-container .front .metric-label {
  margin-top: 7px !important; /* Decreased from 10px to 7px */
  align-self: center !important;
  grid-row: 2 !important;
}

.flip-container .front .flip-indicator {
  margin-top: 7px !important; /* Decreased from 10px to 7px */
  align-self: start !important;
  grid-row: 3 !important;
}

/* Adjust the grid row template for better distribution */
.front {
  grid-template-rows: 1fr auto 0.9fr !important; /* Adjusted from 0.8fr to 0.9fr */
  padding-top: 7px !important; /* Adjusted from 5px to 7px */
}

/* Ensure all cells have consistent height with proper vertical distribution */
.card-panel .row .col {
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  align-items: center !important;
  min-height: 120px !important; /* Increase height slightly */
}

/* Dashboard Side Menu - Card-like styling - Fix top alignment */
.dashboard-side-menu {
  position: fixed;
  top: 76px; /* Match exactly where content cards start */
  left: 20px;
  width: 240px;
  background-color: #e6f0ff !important; /* Light blue background (replaces #fff3cd) */
  border: 1px solid #cfe2ff !important; /* Light blue border (replaces #ffecb5) */
  border-radius: 8px; /* Rounded corners like a card */
  transition: all 0.3s ease;
  z-index: 1020;
  
  /* Fix footer overlap */
  overflow-y: auto;
  bottom: 60px; /* Fixed space at bottom for footer */
  max-height: calc(100vh - 76px - 60px); /* Viewport minus (top position + footer) */
  
  /* Scrollbar styling */
  scrollbar-width: thin;
  scrollbar-color: #0a58ca #e6f0ff !important; /* Blue scrollbar (replaces #ffc107 #fff3cd) */
}


/* Add pseudo-element to create stopping point for sidebar */
.dashboard-content::after {
  content: "";
  display: block;
  height: 60px; /* Match footer height */
  width: 100%;
  clear: both;
}

/* Fix for mobile view */
@media (max-width: 768px) {
  .dashboard-side-menu {
    top: 66px; /* Reduced top position for mobile */
    width: 70px;
    left: 5px;
    bottom: 60px; /* Same bottom space */
    
    /* Hide text on mobile */
    & .menu-text,
    & .menu-title {
      display: none !important;
    }
    
    /* Center icons on mobile */
    & .side-menu-nav a {
      display: flex;
      justify-content: center;
      align-items: center;
      padding: 12px 0;
      margin: 4px auto;
      width: 44px;
      text-align: center;
    }
    
    & .side-menu-nav i {
      margin-right: 0 !important;
      font-size: 1.3rem;
      width: auto !important;
    }
  }
  
  .dashboard-content {
    margin-left: 85px;
  }
}

/* Collapsed state styling - important for functionality */
.dashboard-side-menu.collapsed {
  width: 70px !important;
}

.dashboard-side-menu.collapsed .menu-text,
.dashboard-side-menu.collapsed .menu-title {
  display: none !important;
}

/* Improved collapsed menu icon styles */
.dashboard-side-menu.collapsed .side-menu-nav ul {
  padding-left: 0;
}

.dashboard-side-menu.collapsed .side-menu-nav a {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 12px 0;
  margin: 4px auto;
  width: 44px;
  text-align: center;
}

.dashboard-side-menu.collapsed .side-menu-nav i {
  margin-right: 0 !important;
  font-size: 1.3rem;
  width: auto !important;
}

/* Make sure icon rotation works */
.dashboard-side-menu.collapsed .collapse-menu-btn i {
  transform: rotate(180deg);
}

/* Fix for collapse menu button - add this to your CSS file */
.collapse-menu-btn.circle-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%; /* This makes it a circle */
  background: #343a40;
  border: 2px solid #495057;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
  padding: 0; /* Remove default button padding */
}

.collapse-menu-btn.circle-btn i {
  font-size: 1.1rem;
  color: #e9ecef;
  transition: all 0.3s ease;
}

.collapse-menu-btn.circle-btn:hover {
  border-color: #0a58ca; /* Changed from #ffc107 to blue */
  background-color: rgba(10, 88, 202, 0.2); /* Blue with opacity (replaces rgba(255, 193, 7, 0.2)) */
}

.collapse-menu-btn.circle-btn:hover i {
  color: #0a58ca; /* Changed from #ffc107 to blue */
}

/* Side menu header styling */
.side-menu-header {
  padding: 15px;
  border-bottom: 1px solid #343a40;
}

.side-menu-header-container {
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Text and icon styling for side nav */
.side-menu-nav {
  padding: 8px 0;
}

.side-menu-nav ul {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

.side-menu-nav li {
  margin: 4px 0;
}

.side-menu-nav a {
  padding: 10px 16px;
  display: flex;
  align-items: center;
  color: #084298 !important; /* Dark blue text (replaces #664d03) */
  text-decoration: none;
  border-radius: 4px;
  margin: 0 8px;
  transition: background-color 0.2s;
}

.side-menu-nav i {
  font-size: 1.2rem;
  margin-right: 12px;
  width: 24px;
  text-align: center;
  color: #0a58ca !important; /* Primary blue for icons (replaces #997404) */
  transition: color 0.2s;
}

.side-menu-nav a:hover {
  background-color: #cfe2ff !important; /* Lighter blue for hover (replaces #ffecb5) */
}

.side-menu-nav li.active a {
  background-color: #0a58ca; /* Changed from #ffc107 to blue */
  color: #ffffff; /* White text (changed from #212529) for better contrast on blue */
  font-weight: 500;
}

.side-menu-nav li.active i {
  color: #ffffff; /* White icons (changed from #212529) for better contrast on blue */
}

/* Dashboard content adjustment */
.dashboard-content {
  margin-left: 280px; /* Sidebar width (240px) + left margin (20px) + gap (20px) */
  padding-top: 20px; /* Should match sidebar padding-top */
  padding-right: 20px;
  padding-bottom: 60px; /* Space for footer */
  padding-left: 0;
}

.dashboard-content.expanded {
  margin-left: 110px !important; /* Collapsed sidebar + margins */
}

/* Add a wrapper for the dashboard to control layout */
.dashboard-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Make sure content area expands properly */
.dashboard-wrapper > .dashboard-content {
  flex: 1 0 auto;
}

/* Mobile adjustments */
@media (max-width: 768px) {
  .dashboard-side-menu {
    width: 70px;
    left: 5px;
    max-height: calc(100vh - 76px - 60px); /* Same calculation for consistency */
  }
  
  .dashboard-content {
    margin-left: 85px;
    padding: 10px 5px 60px 0;
  }
}

/* Fix Mobile menu text issue */
@media (max-width: 768px) {
  .dashboard-side-menu {
    width: 70px;
    left: 5px;
    max-height: calc(100vh - 76px - 60px); /* Same calculation for consistency */
  }
  
  /* Hide menu text on mobile */
  .dashboard-side-menu .menu-text,
  .dashboard-side-menu .menu-title {
    display: none !important;
  }
  
  /* Center icons on mobile */
  .dashboard-side-menu .side-menu-nav a {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 12px 0;
    margin: 4px auto;
    width: 44px;
    text-align: center;
  }
  
  .dashboard-side-menu .side-menu-nav i {
    margin-right: 0 !important;
    font-size: 1.3rem;
    width: auto !important;
  }
  
  .dashboard-content {
    margin-left: 85px;
    padding: 10px 5px 60px 0;
  }
}

/* Ensure dashboard content containers align with sidebar */
.dashboard-content > .container-fluid {
  padding-top: 0; /* Remove top padding */
  margin-top: 0; /* Remove top margin */
}


/* Fix sidebar vertical alignment with content cards */
.dashboard-side-menu {
  /* Position settings */
  position: fixed;
  top: 76px; /* Match exactly where content cards start */
  left: 20px;
  width: 240px;
  
  /* Visual styling */
  background-color: #e6f0ff !important; /* Light blue background (replaces #fff3cd) */
  border: 1px solid #cfe2ff !important; /* Light blue border (replaces #ffecb5) */
  border-radius: 8px; /* Rounded corners like a card */
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  
  /* Remove duplicate position declaration */
  /* position: fixed; - already declared above */
  
  /* Fix height to stop before footer */
  bottom: 60px; /* Fixed space at bottom for footer */
  height: auto;
  overflow-y: auto;
  
  /* Other properties */
  transition: all 0.3s ease;
  z-index: 1020;
  scrollbar-width: thin;
  scrollbar-color: #0a58ca #e6f0ff !important; /* Blue scrollbar (replaces #ffc107 #fff3cd) */
}

/* Match content cards exact positioning */
.dashboard-content {
  padding-top: 20px;
  margin-top: 0;
}

.dashboard-content > .container-fluid {
  padding-top: 0;
  margin-top: 0;
}



/* Fix mobile alignment issues */
@media (max-width: 768px) {
  .dashboard-side-menu {
    top: 66px; /* Reduced top position for mobile */
    width: 70px;
    left: 5px;
    bottom: 60px; /* Same bottom space */
  }
}

/* Add this CSS at the very end of your file to override conflicting styles */

/* Fix sidebar alignment with top card */
.dashboard-side-menu {
  /* Increase top position to align with first card */
  top: 96px !important; /* Navbar (56px) + Container top margin (20px) + Card padding (20px) */
  left: 20px;
  width: 240px;
  
  /* Fixed height calculation to avoid footer overlap */
  bottom: 60px !important;
  height: auto !important;
  max-height: none !important; /* Remove conflicting max-height */
  
  /* Make sure the styling remains correct */
  z-index: 1020;
  overflow-y: auto;
  
  /* Remove any padding that might affect alignment */
  padding-top: 0 !important;
}

/* Fix container margin to match sidebar precisely */
.dashboard-content > .container-fluid {
  margin-top: 20px !important; /* Match the top margin to align with sidebar */
}


/* Make sure body doesn't have extra padding */
/* body {
  margin-bottom: 0 !important;
  padding-bottom: 0 !important;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
} */

/* Ensure the dashboard wrapper doesn't add extra space */
.dashboard-wrapper {
  margin-bottom: 0 !important;
  padding-bottom: 0 !important;
}

/* Make sure the sidebar's bottom spacing matches footer exactly */
.dashboard-side-menu {
  bottom: 40px !important; /* Match actual footer height */
}

/* Adjust dashboard content padding to match footer height */
.dashboard-content {
  padding-bottom: 40px !important; /* Match footer height */
}

/* Add this at the end of your CSS file */

/* Auto-collapse sidebar on mobile without JavaScript */
@media (max-width: 768px) {
  /* Force sidebar to collapsed state on mobile */
  .dashboard-side-menu {
    width: 70px !important;
    left: 5px !important;
  }
  
  /* Force menu text to be hidden */
  .dashboard-side-menu .menu-text,
  .dashboard-side-menu .menu-title {
    display: none !important;
  }
  
  /* Force content to expanded state */
  .dashboard-content {
    margin-left: 85px !important;
  }
  
  /* Center icons properly */
  .dashboard-side-menu .side-menu-nav a {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    padding: 12px 0 !important;
    margin: 4px auto !important;
    width: 44px !important;
    text-align: center !important;
  }
  
  .dashboard-side-menu .side-menu-nav i {
    margin-right: 0 !important;
    font-size: 1.3rem !important;
    width: auto !important;
  }
}

/* Add this at the very end of your CSS file */

/* Fix account dropdown on dashboard page */
.navbar .dropdown-menu,
.dropdown-menu {
  z-index: 1050 !important; /* Higher than sidebar and regular navbar */
  position: absolute !important;
  display: none; /* Initially hidden */
}

.navbar .dropdown-menu.show,
.dropdown-menu.show {
  display: block !important; /* Force display when active */
}

/* Fix navbar positioning */
.navbar {
  position: fixed !important;
  top: 0 !important; /* Remove any space above navbar */
  left: 0 !important;
  right: 0 !important;
  z-index: 1040 !important; /* Between sidebar and dropdowns */
  margin-top: 0 !important; /* Remove any margin */
  padding-top: 0.5rem !important; /* Standard Bootstrap padding */
  padding-bottom: 0.5rem !important;
}

/* Fix body padding */
body {
  padding-top: 56px !important; /* Exact navbar height */
  margin-top: 0 !important;
}

/* Fix z-index conflicts */
.dropdown,
.dropdown-center,
.dropend,
.dropstart,
.dropup,
.dropup-center {
  position: relative !important;
}

/* Style tooltips for sidebar */
.tooltip {
  z-index: 1070;
  font-size: 0.875rem;
}

.tooltip .tooltip-inner {
  background-color: #232f3e; /* AWS blue */
  color: #fff;
  padding: 5px 10px;
  border-radius: 4px;
}

.tooltip .tooltip-arrow::before {
  border-right-color: #232f3e; /* AWS blue */
}

/* Only show tooltips when sidebar is collapsed */
.dashboard-side-menu:not(.collapsed) .tooltip {
  display: none !important;
}

/* Improve sidebar readability - update these styles */

/* Lighten the sidebar background for better contrast */
.dashboard-side-menu {
  background-color: #f8f9fa !important; /* Light gray background instead of light blue */
  border: 1px solid #dee2e6 !important; /* Neutral border color */
  scrollbar-color: #0a58ca #f8f9fa !important; /* Blue scrollbar on light background */
}

/* Increase contrast for navigation text */
.side-menu-nav a {
  color: #212529 !important; /* Darker text for better readability */
  font-weight: 500 !important; /* Slightly bolder text */
}

/* Keep icon color but make it slightly darker for better visibility */
.side-menu-nav i {
  color: #0a58ca !important; /* Keep blue but ensure good contrast */
}

/* Make hover state more distinct */
.side-menu-nav a:hover {
  background-color: #e9ecef !important; /* Neutral gray hover state */
  color: #0a58ca !important; /* Text changes to blue on hover */
}

/* Improve active state with better contrast */
.side-menu-nav li.active a {
  background-color: #0a58ca !important; /* Keep primary blue background */
  color: #ffffff !important; /* White text for maximum contrast */
  font-weight: 600 !important; /* Bolder text for active item */
}

/* Ensure active icons have good contrast */
.side-menu-nav li.active i {
  color: #ffffff !important; /* White icons for contrast on blue */
}

/* Add subtle border to menu items for better separation */
.side-menu-nav li {
  margin: 6px 0 !important; /* Slightly more spacing between items */
}

.side-menu-nav a {
  border: 1px solid transparent !important; /* Invisible border by default */
  transition: all 0.2s ease !important; /* Smooth transitions */
}

.side-menu-nav a:hover {
  border-color: #dee2e6 !important; /* Visible border on hover */
}

/* Loading indicator styles */
.chart-loading {
    position: relative;
}

.chart-loading::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.chart-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #0972d3;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 11;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    position: absolute;
    top: 60%;
    left: 50%;
    transform: translateX(-50%);
    font-size: 14px;
    color: #666;
    z-index: 12;
}

/* Button loading state */
.action-button.loading {
    opacity: 0.6;
    pointer-events: none;
    position: relative;
}

.action-button.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    margin: auto;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
}