    </main>

    <footer class="py-4 bg-light mt-auto">
        <div class="container-fluid px-4">
            <div class="d-flex align-items-center justify-content-between small">
                <div class="text-muted">
                    <span>&copy; 2003-<?= date('Y') ?> by Crop Monitor</span>. All Rights Reserved
                </div>
                <div>
                    <a href="/privacy-policy.php">Privacy Policy</a>
                    &middot;
                    <a href="/terms.php">Terms &amp; Conditions</a>
                </div>
            </div>
        </div>
    </footer>

</div><!-- /layoutSidenav_content -->
</div><!-- /layoutSidenav -->

<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.0/dist/js/bootstrap.bundle.min.js"
        integrity="sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+1p"
        crossorigin="anonymous"></script>

<script>
    window.addEventListener('DOMContentLoaded', () => {
        // Restore sidebar toggle state from previous visit
        if (localStorage.getItem('sb|sidebar-toggle') === 'true') {
            document.body.classList.add('sb-sidenav-toggled');
        }

        const sidebarToggle = document.querySelector('#sidebarToggle');
        if (sidebarToggle) {
            sidebarToggle.addEventListener('click', e => {
                e.preventDefault();
                document.body.classList.toggle('sb-sidenav-toggled');
                localStorage.setItem(
                    'sb|sidebar-toggle',
                    document.body.classList.contains('sb-sidenav-toggled')
                );
            });
        }
    });
</script>

</body>
</html>
