</main>
</div>

<script>
function toggleSidebar(){
  document.getElementById('sidebar').classList.toggle('open');
  document.getElementById('overlay').classList.toggle('active');
}
function closeSidebar(){
  document.getElementById('sidebar').classList.remove('open');
  document.getElementById('overlay').classList.remove('active');
}
function openModal(id){ var el=document.getElementById(id); if(!el) return; if(el.parentNode!==document.body){ document.body.appendChild(el); } el.classList.add('open'); }
function closeModal(id){ document.getElementById(id).classList.remove('open'); }
// Close modal on backdrop click
document.querySelectorAll('.modal-backdrop').forEach(el=>{
  el.addEventListener('click', function(e){ if(e.target===this) this.classList.remove('open'); });
});
</script>
</body>
</html>
