<!-- Sidebar -->
<aside class="main-sidebar sidebar-dark-primary elevation-4" style="background-color: #0d6efd;">

  <!-- Logo centrado, solo imagen -->
  <a href="<?= BASE_URL ?>views/modulos/dashboard.php" class="brand-link d-flex justify-content-center align-items-center" style="background: rgba(0,0,0,.08);">
    <img src="<?= BASE_URL ?>assets/adminlte/img/enpex_logo.png" alt="ENPEX Logo" class="brand-image elevation-3" style="max-height: 45px; width: auto;">
  </a>

  <!-- Contenido de la barra lateral -->
  <div class="sidebar">

    <!-- Panel de usuario -->
    <div class="user-panel mt-3 pb-3 mb-3 d-flex align-items-center border-bottom border-light">
      <div class="image ml-2">
        <i class="fas fa-user-circle fa-2x text-white"></i>
      </div>
      <div class="info ml-2">
        <a href="#" class="d-block text-white"><?= $_SESSION['usuario'] ?? 'Invitado' ?></a>
      </div>
    </div>

    <!-- Menú -->
    <nav class="mt-2">
      <ul class="nav nav-pills nav-sidebar flex-column text-sm" data-widget="treeview" role="menu" data-accordion="false">

        <li class="nav-item">
          <a href="<?= BASE_URL ?>views/modulos/dashboard.php" class="nav-link">
            <i class="nav-icon fas fa-home text-white"></i>
            <p>Inicio</p>
          </a>
        </li>

        <li class="nav-header text-white-50">GESTIÓN DE INVENTARIO</li>

        <li class="nav-item">
          <a href="<?= BASE_URL ?>views/modulos/productos.php" class="nav-link">
            <i class="nav-icon fas fa-boxes text-white"></i>
            <p>Productos</p>
          </a>
        </li>

        <li class="nav-item">
          <a href="<?= BASE_URL ?>views/modulos/productos_defectuosos.php" class="nav-link">
            <i class="nav-icon fas fa-exclamation-triangle text-warning"></i>
            <p>Productos Defectuosos</p>
          </a>
        </li>

        <li class="nav-item">
          <a href="<?= BASE_URL ?>views/modulos/tipos.php" class="nav-link">
            <i class="fas fa-tags nav-icon text-white"></i>
            <p>Tipos de Producto</p>
          </a>
        </li>

        <li class="nav-item">
          <a href="<?= BASE_URL ?>views/modulos/categorias.php" class="nav-link">
            <i class="fas fa-th-large nav-icon text-white"></i>
            <p>Categorías</p>
          </a>
        </li>

        <li class="nav-item">
          <a href="<?= BASE_URL ?>views/modulos/medidas.php" class="nav-link">
            <i class="nav-icon fas fa-ruler text-white"></i>
            <p>Medidas</p>
          </a>
        </li>

        <li class="nav-item">
          <a href="<?= BASE_URL ?>views/modulos/movimientos.php" class="nav-link">
            <i class="nav-icon fas fa-exchange-alt text-white"></i>
            <p>Movimientos</p>
          </a>
        </li>

        <li class="nav-item">
          <a href="<?= BASE_URL ?>views/modulos/reportes.php" class="nav-link">
            <i class="nav-icon fas fa-chart-line text-white"></i>
            <p>Reportes</p>
          </a>
        </li>

        <li class="nav-item">
          <a href="<?= BASE_URL ?>views/modulos/trabajadores.php" class="nav-link">
            <i class="nav-icon fas fa-user-friends text-white"></i>
            <p>Trabajadores</p>
          </a>
        </li>

        <li class="nav-item">
          <a href="<?= BASE_URL ?>views/modulos/usuarios.php" class="nav-link">
            <i class="nav-icon fas fa-users-cog text-white"></i>
            <p>Usuarios</p>
          </a>
        </li>

        <li class="nav-header text-white-50">OTROS</li>

        <li class="nav-item">
          <a href="<?= BASE_URL ?>logout.php" class="nav-link">
            <i class="nav-icon fas fa-sign-out-alt text-danger"></i>
            <p>Salir</p>
          </a>
        </li>

      </ul>
    </nav>
  </div>
</aside>
