$(document).ready(function() {
    // Toggle sidebar
    $('#sidebarCollapse').on('click', function() {
        $('#sidebar').toggleClass('active');
    });

    // Highlight current page in sidebar
    const currentPage = window.location.pathname.split('/').pop();
    $('.list-unstyled.components li').each(function() {
        const link = $(this).find('a').attr('href');
        if (link === currentPage) {
            $(this).addClass('active');
        }
    });
});
