<?php
$route = $_GET['route'] ?? 'login';
$isAuthRoute = in_array($route, ['login']);
?>

<div id="appShell" class="app-shell d-flex <?= $isAuthRoute ? 'auth-shell' : 'has-sidebar' ?>">
    <?php if (!$isAuthRoute): ?>
        <?php include __DIR__ . '/nav.php'; ?>
        <div class="sidebar-backdrop d-lg-none" id="sidebarBackdrop"></div>
    <?php endif; ?>
    <div class="app-content flex-grow-1 d-flex flex-column">
        <?php if (!$isAuthRoute): ?>
            <div class="mobile-menu-trigger d-lg-none mb-3">
                <button class="btn btn-primary btn-sm shadow-sm" type="button" id="sidebarToggleButton" data-sidebar-toggle="true" aria-controls="appSidebarMenu" aria-expanded="false">
                    ☰ Menu
                </button>
            </div>
        <?php endif; ?>

