<!DOCTYPE html>
<html lang="es">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Panel Admin - <?php echo $__env->yieldContent('title', 'EduPlatform'); ?></title>
    <!-- Vite para cargar Bootstrap -->
    <?php echo app('Illuminate\Foundation\Vite')(['resources/sass/app.scss', 'resources/js/app.js']); ?>
    <!-- Iconos de Bootstrap (vía CDN para agilizar, o puedes usar npm) -->
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.min.css">
    
    <style>
        body { font-size: .875rem; background-color: #f8f9fa; }
        .sidebar { position: fixed; top: 0; bottom: 0; left: 0; z-index: 100; padding: 48px 0 0; box-shadow: inset -1px 0 0 rgba(0, 0, 0, .1); width: 240px; }
        .sidebar-sticky { position: relative; top: 0; height: calc(100vh - 48px); padding-top: .5rem; overflow-x: hidden; overflow-y: auto; }
        .sidebar .nav-link { font-weight: 500; color: #333; }
        .sidebar .nav-link.active { color: #0d6efd; }
        .sidebar .nav-link:hover { color: #0d6efd; background-color: #e9ecef; }
        .navbar-brand { padding-top: .75rem; padding-bottom: .75rem; font-size: 1rem; background-color: rgba(0, 0, 0, .25); box-shadow: inset -1px 0 0 rgba(0, 0, 0, .1); }
        @media (max-width: 991.98px) { .sidebar { position: static; width: 100%; padding-top: 0; height: auto; } .sidebar-sticky { height: auto; } }
        main { margin-left: 240px; }
        @media (max-width: 991.98px) { main { margin-left: 0; } }
    </style>
</head>
<body>

    <!-- NAVBAR SUPERIOR -->
    <header class="navbar navbar-dark sticky-top bg-dark flex-md-nowrap p-0 shadow">
        <a class="navbar-brand col-md-3 col-lg-2 me-0 px-3 fs-6" href="<?php echo e(route('admin.dashboard')); ?>">EduPlatform Admin</a>
        <button class="navbar-toggler position-absolute d-md-none collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#sidebarMenu" aria-controls="sidebarMenu" aria-expanded="false" aria-label="Toggle navigation">
            <span class="navbar-toggler-icon"></span>
        </button>
        <div class="navbar-nav w-100 d-flex justify-content-end px-3">
            <div class="nav-item text-nowrap">
                <a class="nav-link text-white-50" href="<?php echo e(url('/')); ?>" target="_blank">
                    <i class="bi bi-box-arrow-up-right me-1"></i> Ver Sitio Web
                </a>
            </div>
        </div>
    </header>

    <div class="container-fluid">
        <div class="row">
            <!-- SIDEBAR BARRA LATERAL -->
            <nav id="sidebarMenu" class="col-md-3 col-lg-2 d-md-block bg-white sidebar collapse">
                <div class="sidebar-sticky pt-3">
                    <ul class="nav flex-column gap-1 px-2">
                        <li class="nav-item">
                            <a class="nav-link rounded <?php echo e(Request::routeIs('admin.dashboard') ? 'active bg-light' : ''); ?>" href="<?php echo e(route('admin.dashboard')); ?>">
                                <i class="bi bi-speedometer2 me-2"></i> Dashboard
                            </a>
                        </li>

                        <li class="nav-item">
                            <a class="nav-link rounded <?php echo e(Request::routeIs('admin.users.*') ? 'active bg-light' : ''); ?>" href="<?php echo e(route('admin.users.index')); ?>">
                                <i class="bi bi-people-fill me-2"></i> Usuarios / Roles
                            </a>
                        </li>

                       <li class="nav-item">
                            <a class="nav-link rounded <?php echo e(Request::routeIs('admin.courses.*') ? 'active bg-light' : ''); ?>" href="<?php echo e(route('admin.courses.index')); ?>">
                                <i class="bi bi-journal-bookmark-fill me-2"></i> Cursos
                            </a>
                        </li>
                        <li class="nav-item">
                            <a class="nav-link rounded" href="#">
                                <i class="bi bi-people-fill me-2"></i> Alumnos / Matrículas
                            </a>
                        </li>
                        <li class="nav-item">
                            <a class="nav-link rounded" href="#">
                                <i class="bi bi-file-earmark-text-fill me-2"></i> Validar Profesiones
                            </a>
                        </li>
                        <li class="nav-item">
                            <a class="nav-link rounded" href="#">
                                <i class="bi bi-credit-card-fill me-2"></i> Ventas / Pagos
                            </a>
                        </li>
                    </ul>

                    <h6 class="sidebar-heading d-flex justify-content-between align-items-center px-3 mt-4 mb-1 text-muted text-uppercase" style="font-size: .75rem;">
                        <span>Configuración</span>
                    </h6>
                    <ul class="nav flex-column mb-2 gap-1 px-2">
                        <li class="nav-item">
                            <a class="nav-link rounded" href="#">
                                <i class="bi bi-gear-fill me-2"></i> Ajustes Plataforma
                            </a>
                        </li>
                        <li class="nav-item mt-3">
                            <!-- Botón de Cerrar Sesión con Bootstrap -->
                            <a class="nav-link text-danger rounded" href="#"
                            onclick="event.preventDefault(); document.getElementById('admin-logout-form').submit();">
                                <i class="bi bi-box-arrow-left me-2"></i> Cerrar Sesión
                            </a>
                            
                            <!-- Formulario oculto requerido por Laravel -->
                            <form id="admin-logout-form" action="<?php echo e(route('logout')); ?>" method="POST" class="d-none">
                                <?php echo csrf_field(); ?>
                            </form>
                        </li>
                    </ul>
                </div>
            </nav>

            <!-- CONTENIDO PRINCIPAL -->
            <main class="col-md-9 ms-sm-auto col-lg-10 px-md-4 pt-4">
                <?php echo $__env->yieldContent('content'); ?>
            </main>
        </div>
    </div>

</body>
</html><?php /**PATH C:\Users\jaran\Documents\Marketing Digital\Laravel\adipa-clone\resources\views/layouts/admin.blade.php ENDPATH**/ ?>