document.addEventListener('DOMContentLoaded',()=>{const loader=document.getElementById('appLoader');requestAnimationFrame(()=>loader?.classList.add('is-hidden'));const button=document.querySelector('.menu-toggle'),sidebar=document.querySelector('.sidebar');button?.addEventListener('click',()=>{const open=sidebar.classList.toggle('is-open');button.setAttribute('aria-expanded',String(open))});document.querySelectorAll('.side-link').forEach(link=>link.addEventListener('click',()=>sidebar?.classList.remove('is-open')));document.addEventListener('submit',()=>loader?.classList.remove('is-hidden'));});