<div class="header">
    <h1><?= $page_title ?? 'Admin Panel'; ?></h1>
    <div>
        <button class="toggle-btn" id="modeToggle">🌙 Dark Mode</button>
        <a class="logout-btn" href="logout.php">Logout</a>
    </div>
</div>
<script>
const btn = document.getElementById('modeToggle');
btn.onclick = () => {
    document.body.classList.toggle('dark');
    btn.textContent = document.body.classList.contains('dark') ? '☀️ Light Mode' : '🌙 Dark Mode';
};
</script>
