        closeSidebar();
        }
      }

      function closeSidebar() {
        sidebarOpen = false;
        sidebar.classList.add('-translate-x-full');
        mainContent.classList.remove('sm:ml-64', 'md:ml-72');
        sidebarOverlay.classList.remove('active');
      }

      function toggleSubmenu() {
        submenuOpen = !submenuOpen;
        if (submenuOpen) {
          submenuContent.classList.remove('hidden');
          submenuArrow.classList.add('rotate-180');
        } else {
