document.addEventListener('DOMContentLoaded',()=>{const sidebar=document.querySelector('.sidebar');document.querySelectorAll('[data-sidebar-toggle]').forEach(b=>b.addEventListener('click',()=>sidebar?.classList.toggle('open')));document.querySelectorAll('[data-confirm]').forEach(el=>el.addEventListener('click',e=>{if(!confirm(el.dataset.confirm||'Are you sure?'))e.preventDefault()}));setTimeout(()=>document.querySelectorAll('.alert[data-auto-hide]').forEach(el=>el.remove()),6000);});
