class CRMSidebar1 extends HTMLElement { connectedCallback() { this.innerHTML = `
`; // Auto-highlight active menu based on current page requestAnimationFrame(() => { const currentPage = window.location.pathname.split('/').pop(); const activeLink = this.querySelector(`nav a[href="${currentPage}"]`); if (activeLink) activeLink.classList.add('active'); }); } } customElements.define('crm-sidebar-1', CRMSidebar1);