<meta name="theme-color" content="#3F51B5">
<meta name="apple-mobile-web-app-status-bar-style" content="#3F51B5">
<meta name="msapplication-navbutton-color" content="#3F51B5">
<link rel="stylesheet" href="css/fonts.css?v=2">
<link rel="stylesheet" href="css/font-awesome.min.css">
<link rel="stylesheet" href="css/roboto.css?v=1">
<link rel="stylesheet" href="css/material.min.css?v=3" />
<link rel="stylesheet" href="css/base.css?v=5">
<script src="js/material.min.js"></script>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="shortcut icon" sizes="100x100" type="image/x-icon" href="img/comanda.ico">
<link rel="icon" href="img/comanda.ico">
<script>
    /* ── Theme Manager ── */
    (function() {
        var saved = localStorage.getItem('wfood-theme') || 'light';
        document.documentElement.setAttribute('data-theme', saved);

        document.addEventListener('DOMContentLoaded', function() {
            var btn = document.getElementById('btnThemeToggle');
            var icon = document.getElementById('themeIcon');
            var label = document.getElementById('themeLabel');

            function updateToggleUI(theme) {
                if (!icon || !label) return;
                if (theme === 'dark') {
                    icon.textContent = 'brightness_7';
                    label.textContent = 'TEMA CLARO';
                } else {
                    icon.textContent = 'brightness_6';
                    label.textContent = 'TEMA ESCURO';
                }
            }

            updateToggleUI(saved);

            if (btn) {
                btn.addEventListener('click', function() {
                    var current = document.documentElement.getAttribute('data-theme');
                    var next = (current === 'dark') ? 'light' : 'dark';
                    document.documentElement.setAttribute('data-theme', next);
                    localStorage.setItem('wfood-theme', next);
                    updateToggleUI(next);
                });
            }
        });
    })();
</script>