/* Mini Sidebar Design - Enhanced to match modern navbar */
.mini-sidebar {
  width: 72px;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  background: linear-gradient(180deg, #0f172a 0%, #111827 50%, #0f172a 100%);
  backdrop-filter: blur(24px);
  border-right: 1px solid rgba(59, 130, 246, 0.1);
}

.mini-sidebar::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(180deg, rgba(59, 130, 246, 0.05) 0%, transparent 20%, transparent 80%, rgba(139, 92, 246, 0.05) 100%);
  pointer-events: none;
}

.mini-sidebar.expanded {
  width: 256px;
  border-right: 1px solid rgba(59, 130, 246, 0.3);
  box-shadow: 4px 0 30px rgba(0, 0, 0, 0.4), 0 0 20px rgba(59, 130, 246, 0.1);
  background: linear-gradient(180deg, #0f172a 0%, #111827 30%, #1e293b 50%, #111827 70%, #0f172a 100%);
}

.mini-sidebar.expanded::before {
  background: linear-gradient(180deg, rgba(59, 130, 246, 0.08) 0%, rgba(139, 92, 246, 0.03) 50%, rgba(59, 130, 246, 0.08) 100%);
}

/* Enhanced hover indication to match navbar style */
.mini-sidebar:hover:not(.expanded) {
  border-right: 1px solid rgba(59, 130, 246, 0.2);
  box-shadow: 2px 0 15px rgba(0, 0, 0, 0.2), 0 0 10px rgba(59, 130, 246, 0.05);
}

.mini-sidebar:hover:not(.expanded)::before {
  background: linear-gradient(180deg, rgba(59, 130, 246, 0.08) 0%, rgba(139, 92, 246, 0.02) 50%, rgba(59, 130, 246, 0.08) 100%);
}

/* Mini sidebar text animations */
.mini-sidebar .sidebar-text {
  opacity: 0;
  transform: translateX(-10px);
  transition: opacity 0.2s ease-in-out, transform 0.2s ease-in-out;
  white-space: nowrap;
  pointer-events: none;
}

.mini-sidebar.expanded .sidebar-text {
  opacity: 1;
  transform: translateX(0);
  transition-delay: 0.1s;
  pointer-events: auto;
}

/* Mini text labels (always visible in collapsed state) */
.mini-sidebar .mini-text {
  opacity: 1;
  font-size: 0.6rem;
  line-height: 0.75rem;
  text-align: center;
  color: #9ca3af;
  transition: all 0.2s ease-in-out;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 64px;
  margin-top: 2px;
  font-weight: 500;
  letter-spacing: 0.025em;
}

.mini-sidebar .sidebar-link:hover .mini-text {
  color: #3b82f6;
  transform: scale(1.05);
}

.mini-sidebar.expanded .mini-text {
  opacity: 0;
  transition-delay: 0s;
}

/* Mini sidebar icons */
.mini-sidebar .sidebar-icon {
  min-width: 24px;
  transition: all 0.3s ease;
}

.mini-sidebar.expanded .sidebar-icon {
  transform: scale(1.1);
}

/* Mini sidebar links - Redesigned */
.mini-sidebar .sidebar-link {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0.25rem 0.5rem;
  padding: 0.75rem 0.5rem;
  border-radius: 12px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  background: transparent;
  min-height: 56px;
  text-decoration: none;
  color: inherit;
}

.mini-sidebar.expanded .sidebar-link {
  justify-content: flex-start;
  padding: 0.875rem 1rem;
  margin: 0.25rem 0.75rem;
  min-height: 48px;
}

/* Standardize all sidebar menu items to use consistent alignment */
.mini-sidebar.expanded .sidebar-text a:not(.sidebar-link),
.mini-sidebar.expanded .sidebar-text button:not(.sidebar-link) {
  margin: 0.25rem 0.75rem !important;
  padding: 0.875rem 1rem !important;
  min-height: 48px;
  display: flex;
  align-items: center;
  border-radius: 12px;
}

.mini-sidebar .sidebar-link:hover {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.12) 0%, rgba(139, 92, 246, 0.08) 100%);
  transform: translateY(-1px) scale(1.02);
  box-shadow: 
    0 6px 20px rgba(59, 130, 246, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.15),
    0 0 0 1px rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.15);
}

/* Active/Current page indicator */
.mini-sidebar .sidebar-link.active {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.15) 0%, rgba(139, 92, 246, 0.1) 100%);
  border: 1px solid rgba(59, 130, 246, 0.2);
}

.mini-sidebar .sidebar-link.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 24px;
  background: linear-gradient(180deg, #3b82f6 0%, #8b5cf6 100%);
  border-radius: 0 2px 2px 0;
}

/* Simplified content structure */
.mini-sidebar .sidebar-link-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  transition: all 0.3s ease;
}

.mini-sidebar.expanded .sidebar-link-content {
  flex-direction: row;
  justify-content: flex-start;
  align-items: center;
}

/* Icon styling */
.mini-sidebar .sidebar-icon {
  width: 24px;
  height: 24px;
  color: #9ca3af;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.mini-sidebar .sidebar-link:hover .sidebar-icon {
  color: #3b82f6;
  transform: scale(1.1);
}

/* Mini text - shown in collapsed state */
.mini-sidebar .mini-text {
  margin-top: 6px;
  font-size: 0.65rem;
  font-weight: 600;
  color: #6b7280;
  text-align: center;
  line-height: 1;
  transition: all 0.3s ease;
  max-width: 48px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-sidebar .sidebar-link:hover .mini-text {
  color: #3b82f6;
}

.mini-sidebar.expanded .mini-text {
  opacity: 0;
  transform: scale(0.9);
}

/* Full text - shown in expanded state */
.mini-sidebar .sidebar-text {
  opacity: 0;
  font-size: 0.875rem;
  font-weight: 500;
  color: #e5e7eb;
  transition: all 0.3s ease;
  transform: translateX(-8px);
}

.mini-sidebar.expanded .sidebar-text {
  opacity: 1;
  transform: translateX(0);
}

/* Enhanced tooltip for mini sidebar */
.mini-sidebar-tooltip {
  position: absolute;
  left: 76px;
  top: 50%;
  transform: translateY(-50%);
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.95) 0%, rgba(15, 23, 42, 0.98) 100%);
  color: white;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  font-size: 0.875rem;
  font-weight: 500;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  z-index: 1000;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(59, 130, 246, 0.3);
  box-shadow: 
    0 8px 25px rgba(0, 0, 0, 0.3),
    0 0 0 1px rgba(59, 130, 246, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.mini-sidebar .sidebar-link:hover .mini-sidebar-tooltip {
  opacity: 1;
  transform: translateY(-50%) translateX(4px) scale(1.02);
  transition-delay: 0.5s;
}

.mini-sidebar.expanded .mini-sidebar-tooltip {
  opacity: 0 !important;
}

/* Section headers */
.mini-sidebar .sidebar-section {
  margin: 1rem 0.5rem 0.5rem 0.5rem;
  padding: 0.5rem 0;
  border-top: 1px solid rgba(59, 130, 246, 0.1);
  opacity: 0;
  transform: translateY(-4px);
  transition: all 0.3s ease;
  display: none;
}

.mini-sidebar.expanded .sidebar-section {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.2s;
  display: block;
}

.mini-sidebar .sidebar-section .sidebar-text {
  font-size: 0.7rem;
  font-weight: 700;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0 0.75rem;
}

/* Improved spacing for mini sidebar content */
.mini-sidebar .sidebar-link {
  margin: 0.125rem 0.5rem;
}

.mini-sidebar.expanded .sidebar-link {
  margin: 0.25rem 0.75rem;
}

/* Enhanced user profile section - Compact */
.mini-sidebar .sidebar-profile {
  margin-bottom: 1rem;
  padding: 0;
  transition: all 0.3s ease;
  border-bottom: 1px solid rgba(59, 130, 246, 0.1);
}

.mini-sidebar .mini-sidebar-centered {
  justify-content: center !important;
  transition: all 0.3s ease;
}

.mini-sidebar.expanded .mini-sidebar-centered {
  justify-content: flex-start !important;
}

.mini-sidebar .sidebar-profile .profile-info {
  opacity: 0;
  transform: translateX(-20px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.mini-sidebar.expanded .sidebar-profile .profile-info {
  opacity: 1;
  transform: translateX(0);
  transition-delay: 0.1s;
}

/* Badges and indicators */
.mini-sidebar .sidebar-badge {
  font-size: 0.65rem;
  font-weight: 700;
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.3);
  color: #93c5fd;
  backdrop-filter: blur(8px);
  transition: all 0.3s ease;
}

.mini-sidebar.expanded .sidebar-badge {
  right: 8px;
  top: 8px;
}

.mini-sidebar .sidebar-link:hover .sidebar-badge {
  background: rgba(59, 130, 246, 0.25);
  border-color: rgba(59, 130, 246, 0.5);
  color: #dbeafe;
  transform: scale(1.05);
}

/* Mini sidebar dropdowns */
.mini-sidebar .sidebar-dropdown {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.mini-sidebar.expanded .sidebar-dropdown.active {
  max-height: 200px;
}

/* Fixed Bottom Section - Only visible in expanded state */
.sidebar-bottom-fixed {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 80px; /* Fixed height */
  padding: 1rem 0.75rem;
  background: linear-gradient(180deg, rgba(17, 24, 39, 0.95) 0%, rgba(17, 24, 39, 1) 100%);
  backdrop-filter: blur(10px);
  border-top: 1px solid rgba(75, 85, 99, 0.5);
  display: none; /* Hidden by default in mini state */
  flex-direction: row;
  justify-content: space-around;
  align-items: center;
  gap: 0.5rem;
  z-index: 10;
}

.mini-sidebar.expanded .sidebar-bottom-fixed {
  display: flex; /* Show only when expanded */
}

.sidebar-bottom-fixed .sidebar-link {
  height: 48px;
  padding: 0.75rem;
  flex: 1;
  margin: 0;
  border-radius: 8px;
  transition: all 0.3s ease;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sidebar-bottom-fixed .sidebar-link:hover {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Hide old sidebar-bottom class completely in new layout */
.mini-sidebar .sidebar-bottom {
  display: none;
}

/* Mini sidebar glow effect */
.mini-sidebar::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 1px;
  height: 100%;
  background: linear-gradient(180deg, transparent 0%, rgba(59, 130, 246, 0.5) 50%, transparent 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.mini-sidebar.expanded::before {
  opacity: 1;
}

/* Main content adjustment for desktop */
@media (min-width: 1024px) {
  .main-content,
  main,
  body:not(.mobile) .content-area {
    margin-left: 72px;
    transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }
  
  .mini-sidebar.expanded ~ .main-content,
  .mini-sidebar.expanded ~ main {
    margin-left: 256px;
  }
}

/* Small screen adjustments - use same expanded logic */
@media (max-width: 1024px) {
  .mini-sidebar {
    width: 280px;
    transform: translateX(-100%);
  }
  
  .mini-sidebar.expanded {
    transform: translateX(0);
  }
  
  /* Hide mini icons on mobile - show full sidebar instead */
  .mini-sidebar-icons {
    display: none !important;
  }
  
  /* Show full sidebar content when expanded on small screens */
  .mini-sidebar.expanded .sidebar-text {
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto !important; /* Force override with higher specificity */
    display: block; /* Ensure it's visible */
  }
  
  /* Ensure sidebar-text is non-interactive when sidebar is closed on small screens */
  .mini-sidebar:not(.expanded) .sidebar-text {
    pointer-events: none !important;
  }
  
  /* Ensure all links and buttons within sidebar-text are clickable when expanded */
  .mini-sidebar.expanded .sidebar-text a,
  .mini-sidebar.expanded .sidebar-text button {
    pointer-events: auto !important;
    cursor: pointer;
    /* Remove hover effects on touch devices */
    -webkit-tap-highlight-color: rgba(59, 130, 246, 0.1);
    tap-highlight-color: rgba(59, 130, 246, 0.1);
  }
  
  /* Disable hover effects on all sidebar-text elements for touch devices only */
  @media (hover: none) and (pointer: coarse) {
    .mini-sidebar.expanded .sidebar-text a:hover,
    .mini-sidebar.expanded .sidebar-text button:hover {
      background: inherit !important;
      transform: none !important;
      box-shadow: none !important;
    }
  }
  
  /* Allow hover effects for desktop browsers in small windows */
  @media (hover: hover) and (pointer: fine) {
    .mini-sidebar.expanded .sidebar-text a:hover,
    .mini-sidebar.expanded .sidebar-text button:hover {
      background: rgba(59, 130, 246, 0.1) !important;
      transform: translateY(-1px) !important;
    }
  }
  
  /* Add touch-specific active states */
  .mini-sidebar.expanded .sidebar-text a.touch-active,
  .mini-sidebar.expanded .sidebar-text a:active,
  .mini-sidebar.expanded .sidebar-text button.touch-active,
  .mini-sidebar.expanded .sidebar-text button:active {
    background: rgba(59, 130, 246, 0.15) !important;
    transform: scale(0.98) !important;
    transition: all 0.1s ease !important;
  }
  
  .mini-sidebar.expanded .mini-text {
    display: none;
  }
  
  /* Hide tooltips on mobile */
  .mini-sidebar .mini-sidebar-tooltip {
    display: none;
  }
  
  /* Show all sections when expanded on small screens */
  .mini-sidebar.expanded .sidebar-section {
    display: block;
    opacity: 1;
    transform: translateY(0);
  }
  
  .mini-sidebar.expanded .sidebar-profile {
    display: block;
  }
  
  .mini-sidebar.expanded [data-collapse-toggle] {
    display: flex;
  }
  
  .mini-sidebar.expanded .sidebar-dropdown {
    display: block;
  }
  
  /* Hide bottom fixed section on mobile */
  .mini-sidebar .sidebar-bottom-fixed {
    display: none;
  }
  
  /* Ensure proper layout for navigation when expanded on small screens */
  .mini-sidebar.expanded .sidebar-link {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    margin: 4px 8px;
    border-radius: 8px;
    transition: background-color 0.2s ease;
  }
  
  /* Remove hover states on touch devices, use touch-active class instead */
  .mini-sidebar.expanded .sidebar-link:hover {
    background-color: transparent; /* Disable hover on touch devices */
  }
  
  /* Touch feedback for small screens */
  .mini-sidebar.expanded .sidebar-link.touch-active,
  .mini-sidebar.expanded .sidebar-link:active {
    background-color: rgba(59, 130, 246, 0.15);
    transform: scale(0.98);
  }
  
  .mini-sidebar.expanded .sidebar-link .sidebar-icon {
    margin-right: 12px;
    min-width: 24px;
    width: 24px;
    height: 24px;
  }
  
  /* Show badges when expanded on small screens */
  .mini-sidebar.expanded .sidebar-badge {
    display: block;
  }
  
  /* Ensure link content is properly aligned */
  .mini-sidebar.expanded .sidebar-link-content {
    display: flex;
    align-items: center;
    flex: 1;
    pointer-events: none; /* Prevent interference with link clicks */
  }
  
  /* Ensure proper touch target size for accessibility */
  .mini-sidebar.expanded .sidebar-link {
    min-height: 44px; /* iOS recommended touch target size */
    touch-action: manipulation; /* Optimize for touch */
  }
  
  .main-content,
  main,
  .content-area {
    margin-left: 0 !important;
  }
  
  /* Ensure sidebar content is properly displayed and scrollable when expanded on small screens */
  .mini-sidebar.expanded .sidebar-content {
    display: block;
    overflow-y: auto;
    height: calc(100vh - 60px); /* Account for navbar height */
    padding-bottom: 20px;
    /* Prevent scroll jumping */
    scroll-behavior: auto !important;
    overscroll-behavior: contain;
  }
  
  /* Disable any scroll behavior on simplebar elements */
  .mini-sidebar .sidebar-content[data-simplebar],
  .mini-sidebar .sidebar-content[data-simplebar] .simplebar-content-wrapper,
  .mini-sidebar .sidebar-content[data-simplebar] .simplebar-content {
    scroll-behavior: auto !important;
  }
  
  /* Reset any flex properties that might interfere with layout on small screens */
  .mini-sidebar.expanded .sidebar-content > * {
    width: auto;
    display: block;
    justify-content: flex-start;
  }
}

/* Main content spacing for desktop */
@media (min-width: 1024px) {
  #cm_dashboard_navbar {
    padding-left: calc(72px + 0.5rem) !important;
    transition: padding-left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }
}

/* Enhanced styling for all sidebar links and elements */

/* Legacy sidebar links - upgrade to modern styling with standardized alignment */
.mini-sidebar .sidebar-text a:not(.sidebar-link),
.mini-sidebar .sidebar-text button {
  display: flex;
  align-items: center;
  margin: 0.25rem 0.75rem !important;
  padding: 0.875rem 1rem !important;
  border-radius: 12px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  background: transparent;
  min-height: 48px;
  text-decoration: none;
  color: inherit;
  border: 1px solid transparent;
}

.mini-sidebar .sidebar-text a:not(.sidebar-link):hover,
.mini-sidebar .sidebar-text button:hover {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.12) 0%, rgba(139, 92, 246, 0.08) 100%);
  transform: translateY(-1px) scale(1.02);
  box-shadow: 
    0 6px 20px rgba(59, 130, 246, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.15),
    0 0 0 1px rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.15);
}

/* Enhanced dropdown styling with standardized alignment */
.mini-sidebar [data-collapse-toggle] {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.8) 0%, rgba(15, 23, 42, 0.9) 100%);
  border: 1px solid rgba(59, 130, 246, 0.1);
  margin: 0.25rem 0.75rem !important;
  padding: 0.875rem 1rem !important;
  border-radius: 12px;
  min-height: 48px;
}

.mini-sidebar [data-collapse-toggle]:hover {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.15) 0%, rgba(139, 92, 246, 0.1) 100%);
  border: 1px solid rgba(59, 130, 246, 0.2);
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.15);
}

/* Enhanced dropdown arrow animation */
.mini-sidebar [data-collapse-toggle] svg[sidebar-toggle-item] {
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dropdown submenu styling - Standardized alignment */
.mini-sidebar .sidebar-text ul {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.95) 0%, rgba(30, 41, 59, 0.9) 100%);
  border: 1px solid rgba(59, 130, 246, 0.1);
  border-radius: 8px;
  margin: 0.5rem 0.75rem;
  padding: 0.5rem 0;
  backdrop-filter: blur(10px);
}

.mini-sidebar .sidebar-text ul li a {
  margin: 0.125rem 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-size: 0.875rem;
  min-height: auto;
}

/* Standardize dropdown item alignment - remove excessive left padding */
.mini-sidebar.expanded .sidebar-text ul li a {
  padding-left: 1rem !important;
  margin: 0.125rem 0.5rem !important;
}

.mini-sidebar.expanded .sidebar-text .pl-11,
.mini-sidebar.expanded .sidebar-text [class*="pl-11"] {
  padding-left: 1rem !important;
}

/* Global alignment fix for any dropdown content with excessive padding */
.mini-sidebar.expanded .sidebar-text [class*="pl-"],
.mini-sidebar.expanded .sidebar-text div[style*="padding-left"] {
  padding-left: 1rem !important;
}

/* Ensure dropdown containers also follow standard margin */
.mini-sidebar.expanded .sidebar-text .hidden,
.mini-sidebar.expanded .sidebar-text div[id*="dropdown"],
.mini-sidebar.expanded .sidebar-text ul[id*="dropdown"] {
  margin: 0.5rem 0.75rem !important;
  padding: 0.5rem 0 !important;
}

/* Fix specific dropdown sections with divider headers */
.mini-sidebar.expanded .sidebar-text div[class*="pl-11"].mb-2 {
  margin-bottom: 0.5rem !important;
  padding-left: 1rem !important;
  font-size: 0.75rem;
  text-transform: uppercase;
  font-weight: 600;
  color: rgba(139, 92, 246, 0.7);
}

/* Standardize all sidebar menu item containers spacing */
.mini-sidebar.expanded .sidebar-text .mt-1,
.mini-sidebar.expanded .sidebar-text .mt-2 {
  margin-top: 0.25rem !important;
}

/* Remove extra bottom padding from last items in sidebar content */
.mini-sidebar.expanded .sidebar-content > div:last-child {
  margin-bottom: 0 !important;
}

/* Ensure uniform border-radius for all interactive elements */
.mini-sidebar.expanded .sidebar-text a,
.mini-sidebar.expanded .sidebar-text button {
  border-radius: 12px !important;
}

/* Fix the "Account & Other" section styling to match sidebar-section */
.mini-sidebar.expanded .sidebar-text .border-t.border-b {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.3) 0%, rgba(15, 23, 42, 0.5) 100%) !important;
  border: 1px solid rgba(59, 130, 246, 0.1) !important;
  border-radius: 8px !important;
  margin: 1rem 0.75rem 0.5rem 0.75rem !important;
  backdrop-filter: blur(8px) !important;
  border-top: 1px solid rgba(59, 130, 246, 0.1) !important;
  border-bottom: 1px solid rgba(59, 130, 246, 0.1) !important;
}

.mini-sidebar.expanded .sidebar-text .border-t.border-b span {
  font-weight: 600 !important;
  color: rgba(139, 92, 246, 0.8) !important;
  text-transform: uppercase !important;
  letter-spacing: 0.05em !important;
  padding: 0.5rem 1rem !important;
  display: block !important;
}

/* Hide the hr inside Account & Other section since we're styling the container */
.mini-sidebar.expanded .sidebar-text .border-t.border-b hr {
  display: none !important;
}

.mini-sidebar .sidebar-text ul li a:hover {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(139, 92, 246, 0.06) 100%);
  transform: translateX(4px) scale(1.01);
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.15);
}

/* Special animated link styling (referral) */
.mini-sidebar a[style*="border-image"] {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.8) 0%, rgba(15, 23, 42, 0.9) 100%);
  backdrop-filter: blur(10px);
  position: relative;
}

.mini-sidebar a[style*="border-image"]:hover {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.12) 0%, rgba(139, 92, 246, 0.08) 100%);
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 25px rgba(59, 130, 246, 0.2);
}

/* Section headers enhancement - Standardized alignment */
.mini-sidebar .sidebar-section {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.3) 0%, rgba(15, 23, 42, 0.5) 100%);
  border: 1px solid rgba(59, 130, 246, 0.1);
  border-radius: 8px;
  margin: 1rem 0.75rem 0.5rem 0.75rem !important;
  backdrop-filter: blur(8px);
}

.mini-sidebar .sidebar-section span {
  font-weight: 600;
  color: rgba(139, 92, 246, 0.8);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.5rem 1rem;
  display: block;
}

/* Enhanced badge styling */
.mini-sidebar .sidebar-text span[class*="bg-red-900"],
.mini-sidebar .sidebar-text span[class*="bg-yellow-900"],
.mini-sidebar .sidebar-text span[class*="bg-green-900"] {
  position: relative;
  backdrop-filter: blur(8px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-weight: 600;
  transition: all 0.2s ease;
}

.mini-sidebar .sidebar-text span[class*="bg-red-900"]:hover,
.mini-sidebar .sidebar-text span[class*="bg-yellow-900"]:hover,
.mini-sidebar .sidebar-text span[class*="bg-green-900"]:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

/* Enhanced icons styling */
.mini-sidebar .sidebar-text svg,
.mini-sidebar .sidebar-text img:not(.sidebar-icon) {
  transition: all 0.3s ease;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.mini-sidebar .sidebar-text a:hover svg,
.mini-sidebar .sidebar-text button:hover svg,
.mini-sidebar .sidebar-text a:hover img:not(.sidebar-icon),
.mini-sidebar .sidebar-text button:hover img:not(.sidebar-icon) {
  transform: scale(1.1);
  filter: drop-shadow(0 4px 8px rgba(59, 130, 246, 0.3));
}

/* Enhanced profile section styling - Compact design */
.mini-sidebar .sidebar-profile {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.5) 0%, rgba(15, 23, 42, 0.7) 100%);
  border: 1px solid rgba(59, 130, 246, 0.15);
  border-radius: 12px;
  margin: 0.75rem 0.75rem 0.5rem 0.75rem;
  padding: 0.75rem;
  backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
}

.mini-sidebar .sidebar-profile::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, #3b82f6, #8b5cf6, #06b6d4);
  opacity: 0.6;
}

.mini-sidebar .sidebar-profile a {
  transition: all 0.3s ease;
  border-radius: 8px;
  padding: 0.25rem;
  margin: 0;
}

.mini-sidebar .sidebar-profile a:hover {
  background: rgba(59, 130, 246, 0.1);
  transform: scale(1.02);
}

/* Level badge enhancement - Compact */
.mini-sidebar .sidebar-profile .absolute {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  border: 1px solid rgba(59, 130, 246, 0.3);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

/* User badge enhancement - Compact */
.mini-sidebar .sidebar-profile img[alt="User Badge"] {
  border: 1px solid rgba(139, 92, 246, 0.5);
  box-shadow: 0 1px 4px rgba(139, 92, 246, 0.3);
}

/* Balance display enhancement */
.mini-sidebar .text-green-400,
.mini-sidebar .text-blue-400,
.mini-sidebar .text-purple-400 {
  font-weight: 600;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  filter: drop-shadow(0 0 6px currentColor);
}

/* Hide scrollbar in mini sidebar, show only when expanded and needed */
.mini-sidebar {
  overflow-y: hidden;
}

.mini-sidebar.expanded {
  overflow-y: auto;
}

/* Sidebar content container */
.mini-sidebar .sidebar-content {
  overflow-y: hidden;
  height: 100%;
}

/* Center content vertically in mini sidebar state */
.mini-sidebar:not(.expanded) .sidebar-content {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  padding: 0;
  gap: 0;
}

/* In mini state, ensure only visible sidebar-link elements are shown and centered */
.mini-sidebar:not(.expanded) .sidebar-content > * {
  width: 100%;
  display: flex;
  justify-content: center;
}

/* Hide all text content in mini sidebar to prevent layout interference - except when expanded */
.mini-sidebar:not(.expanded) .sidebar-text {
  display: none !important;
}

/* Mini Sidebar Icons - Only visible in collapsed state */
.mini-sidebar-icons {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 1rem 0.5rem;
  padding-bottom: 80px; /* Account for Discord button at bottom */
  transition: all 0.3s ease;
  height: 100%;
  overflow-y: auto;
  justify-content: flex-start;
}

.mini-sidebar.expanded .mini-sidebar-icons {
  display: none !important;
}

.mini-icon-item {
  width: 100%;
  display: flex;
  justify-content: center;
}

.mini-icon-item .sidebar-link {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0.75rem 0.5rem;
  margin: 0.125rem 0;
  border-radius: 12px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  background: transparent;
  min-height: 56px;
  text-decoration: none;
  color: inherit;
}

.mini-icon-item .sidebar-link:hover {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.12) 0%, rgba(139, 92, 246, 0.08) 100%);
  transform: translateY(-1px) scale(1.02);
  box-shadow: 
    0 6px 20px rgba(59, 130, 246, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.15),
    0 0 0 1px rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.15);
}

.mini-icon-item .sidebar-link-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.mini-icon-item .sidebar-icon {
  width: 24px;
  height: 24px;
  color: #9ca3af;
  transition: all 0.3s ease;
  flex-shrink: 0;
  margin-bottom: 4px;
}

.mini-icon-item .sidebar-link:hover .sidebar-icon {
  color: #3b82f6;
  transform: scale(1.1);
}

.mini-icon-item .mini-text {
  font-size: 0.75rem;
  font-weight: 600;
  color: #6b7280;
  text-align: center;
  line-height: 1;
  transition: all 0.3s ease;
  max-width: 48px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-icon-item .sidebar-link:hover .mini-text {
  color: #3b82f6;
}

/* Hide profile section in mini state since it has sidebar-text class - except when expanded */
.mini-sidebar:not(.expanded) .sidebar-profile {
  display: none !important;
}

.mini-sidebar.expanded .sidebar-content {
  overflow-y: auto; /* Allow scrolling in expanded state */
  height: calc(100% - 80px); /* Account for fixed bottom section height */
  margin-bottom: 0; /* No margin needed since height is calculated */
  padding-bottom: 20px; /* Small padding for visual spacing */
  display: block; /* Reset to default block layout for expanded state */
}

/* Override simplebar in mini state */
.mini-sidebar .sidebar-content[data-simplebar] .simplebar-scrollbar {
  display: none !important;
}

.mini-sidebar.expanded .sidebar-content[data-simplebar] .simplebar-scrollbar {
  display: block !important;
}

/* Hide browser scrollbars while keeping custom simplebar */
.sidebar-content {
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* Internet Explorer 10+ */
}

.sidebar-content::-webkit-scrollbar {
  display: none; /* WebKit browsers - hide default scrollbar */
}

/* Custom scrollbar styling for expanded state */
.mini-sidebar.expanded::-webkit-scrollbar {
  width: 6px;
}

.mini-sidebar.expanded::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.1);
  border-radius: 3px;
}

.mini-sidebar.expanded::-webkit-scrollbar-thumb {
  background: rgba(59, 130, 246, 0.7);
  border-radius: 3px;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.mini-sidebar.expanded::-webkit-scrollbar-thumb:hover {
  background: rgba(59, 130, 246, 0.9);
  border-color: rgba(59, 130, 246, 0.5);
}

/* Ensure scrollbar is always visible in expanded state */
.mini-sidebar.expanded .sidebar-content {
  scrollbar-width: thin;
  scrollbar-color: rgba(59, 130, 246, 0.7) rgba(0, 0, 0, 0.1);
}

/* Animation for expanding content */
@keyframes expandContent {
  from {
    opacity: 0;
    transform: translateX(-10px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.mini-sidebar.expanded .animate-expand {
  animation: expandContent 0.3s ease-out;
}

/* Enhanced icon hover effects */
.mini-sidebar .sidebar-icon:hover {
  color: #3b82f6;
  transform: scale(1.2);
  filter: drop-shadow(0 0 6px rgba(59, 130, 246, 0.4));
}

/* Icon background glow in mini state */
.mini-sidebar .sidebar-link:hover .sidebar-icon {
  background: radial-gradient(circle, rgba(59, 130, 246, 0.1) 0%, transparent 70%);
  border-radius: 50%;
  padding: 2px;
}

/* Better spacing for mini sidebar content */
.mini-sidebar .mini-sidebar-only {
  gap: 4px;
}

.mini-sidebar .sidebar-link:hover {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(147, 51, 234, 0.1) 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Expansion hint indicator */
.mini-sidebar::after {
  content: '';
  position: absolute;
  top: 50%;
  right: -2px;
  transform: translateY(-50%);
  width: 4px;
  height: 30px;
  background: linear-gradient(180deg, transparent 0%, rgba(59, 130, 246, 0.6) 50%, transparent 100%);
  border-radius: 0 2px 2px 0;
  opacity: 0;
  animation: expandHint 2s ease-in-out infinite;
}

@keyframes expandHint {
  0%, 90%, 100% { opacity: 0; }
  45%, 55% { opacity: 0.8; }
}

.mini-sidebar.expanded::after {
  display: none;
}

/* Notification dots for mini sidebar */
.mini-sidebar .notification-dot {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 8px;
  height: 8px;
  background: #ef4444;
  border-radius: 50%;
  border: 2px solid #111827;
}

.mini-sidebar.expanded .notification-dot {
  top: 12px;
  right: 12px;
}

/* Mini Discord at bottom - Only visible in mini state */
.mini-discord-bottom {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 15;
  transition: opacity 0.3s ease, transform 0.3s ease;
  opacity: 1;
  transform: translateY(0);
  display: flex;
  visibility: visible;
  height: 60px;
  background: linear-gradient(180deg, transparent 0%, rgba(17, 24, 39, 0.95) 50%, rgba(17, 24, 39, 1) 100%);
  border-top: 1px solid rgba(75, 85, 99, 0.3);
}

.mini-sidebar.expanded .mini-discord-bottom {
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  visibility: hidden;
}

/* Hide mini Discord on mobile */
@media (max-width: 1024px) {
  .mini-discord-bottom {
    display: none;
  }
}

/* Enhanced mini Discord styling with improved clickability */
.mini-discord-bottom {
  pointer-events: auto;
  z-index: 20;
}

.mini-discord-bottom .sidebar-link {
  padding: 0.75rem;
  border-radius: 12px;
  transition: all 0.3s ease;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  pointer-events: auto;
  cursor: pointer;
}

.mini-discord-bottom .sidebar-link:hover {
  background: linear-gradient(135deg, rgba(88, 101, 242, 0.1) 0%, rgba(88, 101, 242, 0.2) 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(88, 101, 242, 0.3);
}

.mini-discord-bottom .sidebar-link-content {
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.mini-discord-bottom .sidebar-icon {
  filter: none;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  width: 24px;
  height: 24px;
  display: block;
  pointer-events: none;
}

/* Ensure all sidebar links are clickable and have proper pointer events */
.mini-sidebar a,
.mini-sidebar button,
.mini-sidebar .sidebar-link {
  pointer-events: auto !important;
  cursor: pointer;
}

.mini-sidebar .sidebar-link-content {
  pointer-events: none;
}

/* Prevent sidebar toggle when clicking on any interactive elements */
.mini-sidebar .sidebar-profile,
.mini-sidebar .sidebar-section,
.mini-sidebar [data-collapse-toggle],
.mini-sidebar .mini-discord-bottom {
  pointer-events: auto;
}

/* Desktop-only: Allow sidebar-text interaction for expanded state */
@media (min-width: 1025px) {
  .mini-sidebar .sidebar-text {
    pointer-events: auto;
  }
}