    </main>

    <footer class="erp-footer">
        <div class="d-flex flex-column flex-md-row align-items-center justify-content-between gap-2">
        <span>Powered by <strong>Host Rafel Cloud Technologies Pvt. Ltd.</strong></span>
            <span class="text-muted small">
                Logged in as <strong><?= h(getSession('full_name') ?? '') ?></strong>
                &mdash; <?= roleBadge(getSession('role') ?? '') ?>
            </span>
            <span class="text-muted small">v<?= APP_VERSION ?></span>
        </div>
    </footer>
</div><!-- /.erp-content-wrapper -->

<!-- Bootstrap JS -->
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js"></script>
<!-- Expose BASE_URL to JS -->
<script>const BASE_URL = '<?= BASE_URL ?>';</script>
<!-- App JS -->
<script src="<?= BASE_URL ?>/assets/js/app.js?v=<?= APP_VERSION ?>"></script>
<script src="<?= BASE_URL ?>/assets/js/main.js?v=<?= APP_VERSION ?>"></script>
<?php if (isset($extraJs)) echo $extraJs; ?>
<script>
if ('serviceWorker' in navigator) {
    navigator.serviceWorker.register('<?= BASE_URL ?>/sw.js').catch(() => {});
}
</script>
</body>
</html>
