<?php
// /admin/sidebar.php
$projeto_nome = "VoxCore CMS";
$pagina_atual = basename($_SERVER['PHP_SELF']);
?>

<div class="admin-mobile-header d-flex d-md-none">
    <h5><i class="fas fa-satellite-dish text-info me-2"></i> <?= $projeto_nome ?></h5>
    <button class="btn btn-outline-light border-0" id="btnToggleMenu">
        <i class="fas fa-bars fa-lg"></i>
    </button>
</div>

<div class="sidebar-overlay" id="sidebarOverlay"></div>

<div class="container-fluid">
    <div class="row">
        <nav class="col-md-3 col-lg-2 sidebar" id="sidebarMenu">
            <div class="sidebar-wrapper">
                <div class="text-center mb-4 d-none d-md-block">
                    <i class="fas fa-satellite-dish fa-2x text-info"></i>
                    <h5 class="mt-2"><?= $projeto_nome ?></h5>
                    <small class="text-muted">Gestão de Identidade</small>
                </div>
                
                <a href="dashboard.php" class="<?= $pagina_atual == 'dashboard.php' ? 'active' : '' ?>"><i class="fas fa-home me-2"></i> Início</a>
                <a href="editar-home.php" class="<?= $pagina_atual == 'editar-home.php' ? 'active' : '' ?>"><i class="fas fa-image me-2"></i> Imagem Home</a>
                <a href="editar-bio.php" class="<?= $pagina_atual == 'editar-bio.php' ? 'active' : '' ?>"><i class="fas fa-user-edit me-2"></i> Biografia</a>
                <a href="editar-galeria.php" class="<?= $pagina_atual == 'editar-galeria.php' ? 'active' : '' ?>"><i class="fas fa-th me-2"></i> Galeria</a>
                <a href="editar-portfolio.php" class="<?= $pagina_atual == 'editar-portfolio.php' ? 'active' : '' ?>"><i class="fas fa-list-alt me-2"></i> Portfólio Completo</a>
                <a href="editar-faq.php" class="<?= $pagina_atual == 'editar-faq.php' ? 'active' : '' ?>"><i class="fas fa-question-circle me-2"></i> FAQ</a>
                <a href="configuracoes.php" class="<?= $pagina_atual == 'configuracoes.php' ? 'active' : '' ?>"><i class="fas fa-cog me-2"></i> Configurações Globais</a>
                <a href="manual.php" class="<?= $pagina_atual == 'manual.php' ? 'active' : '' ?>"><i class="fas fa-book me-2"></i> Manual de Operação</a>
                
                <div style="margin-top: 30px; border-top: 1px solid rgba(255,255,255,0.1); padding-top: 10px;">
                    <?php if($pagina_atual == 'dashboard.php'): ?>
                        <a data-bs-toggle="modal" data-bs-target="#modalSenha" style="cursor:pointer;"><i class="fas fa-key me-2"></i> Alterar Senha</a>
                    <?php endif; ?>
                    <a href="logout.php" class="btn-logout"><i class="fas fa-sign-out-alt me-2"></i> Sair</a>
                </div>
            </div>
        </nav>