<footer class="main-footer">
    © <?php echo date("Y"); ?> Barangay San Fabian Profiling System. All rights reserved.
</footer>

        </div> <!-- End #content -->
    </div> <!-- End .wrapper -->

    <script>
        // --- THEME SWITCHER LOGIC ---
        const themeButtons = document.querySelectorAll('.theme-btn');
        const body = document.body;

        // Function to apply the theme
        function applyTheme(theme) {
            body.setAttribute('data-theme', theme);
            localStorage.setItem('selected-theme', theme); // Save theme to local storage
            
            // Highlight the active button
            themeButtons.forEach(btn => {
                if (btn.getAttribute('data-theme') === theme) {
                    btn.classList.add('active');
                } else {
                    btn.classList.remove('active');
                }
            });
        }

        // Add click event listeners to buttons
        themeButtons.forEach(button => {
            button.addEventListener('click', () => {
                const selectedTheme = button.getAttribute('data-theme');
                applyTheme(selectedTheme);
            });
        });

        // On page load, check for a saved theme in local storage
        document.addEventListener('DOMContentLoaded', () => {
            const savedTheme = localStorage.getItem('selected-theme') || 'light'; // Default to light
            applyTheme(savedTheme);
        });
    </script>
</body>
</html>

