/* Desktop-specific styles */
@media (min-width: 769px) {
  /* Expanded sidebar styles */
  #sidebar.expanded {
    width: var(--sidebar-width);
  }
  
  #sidebar.expanded .sidebar-header h3 span,
  #sidebar.expanded ul li a span {
    display: inline;
  }
  
  #sidebar .sidebar-header h3 span,
  #sidebar ul li a span {
    display: none;
  }
  
  #sidebar.expanded .sidebar-header {
    padding: 20px 15px;
  }
  
  #sidebar.expanded ul li a i {
    margin-right: 15px;
  }
  
  /* Active menu styling */
  #sidebar ul li.active > a {
    color: var(--active-highlight);
    background: #E7F3FF;
    border-left: 4px solid var(--active-highlight);
    padding-left: 16px;
    font-weight: 600;
  }

  /* Active menu animation */
  #sidebar ul li.active > a::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--active-highlight);
    animation: pulse 2s infinite;
  }

  @keyframes pulse {
    0% { opacity: 0.7; }
    50% { opacity: 1; }
    100% { opacity: 0.7; }
  }

  /* Tooltip shows properly on hover in collapsed mode */
  #sidebar:not(.expanded) ul li:hover .sidebar-tooltip {
    visibility: visible;
    opacity: 1;
  }

  /* Content adjustments */
  #content {
    margin-left: 70px;
    width: calc(100% - 70px);
  }
  
  #sidebar.expanded ~ #content {
    margin-left: var(--sidebar-width);
    width: calc(100% - var(--sidebar-width));
  }
}

/* Mobile Styles */
@media (max-width: 768px) {
  #sidebar {
    transform: translateX(-100%);
    width: 280px;
    background: var(--sidebar-bg);
    box-shadow: 3px 0 15px rgba(0, 0, 0, 0.1);
  }
  
  #sidebar.mobile-active {
    transform: translateX(0);
    animation: slideIn 0.3s ease;
  }
  
  @keyframes slideIn {
    from { transform: translateX(-100%); }
    to { transform: translateX(0); }
  }
  
  #sidebar .sidebar-header {
    padding: 20px 15px;
    background: var(--sidebar-bg);
    border-bottom: 1px solid #e4e6ea;
  }
  
  #sidebar ul li {
    margin: 5px 12px;
  }
  
  #sidebar ul li a {
    padding: 14px 16px;
    border-radius: 10px;
  }
  
  /* Mobile icon styling */
  #sidebar ul li a i {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    border-radius: 50%;
    font-size: 1.1rem;
  }
  
  /* Bold text for mobile */
  #sidebar ul li a span {
    font-weight: 600;
    font-size: 0.95rem;
  }
  
  #sidebar ul li.active > a {
    color: var(--active-highlight);
    background: #E7F3FF;
    font-weight: 600;
  }
  
  #content {
    width: 100%;
    margin-left: 0;
  }
  
  .main-content {
    padding: 20px 15px;
  }
  
  .sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    display: none;
    backdrop-filter: blur(2px);
  }
  
  .sidebar-overlay.active {
    display: block;
    animation: fadeIn 0.3s ease;
  }
  
  @keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
  }
  
  /* Hide tooltips on mobile */
  .sidebar-tooltip {
    display: none;
  }
}