<!DOCTYPE html>
<html lang="es">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title><?php echo $__env->yieldContent('title', 'Admin de Licencias'); ?> - Licencia System</title>
    <link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap" rel="stylesheet">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
    <style>
        :root {
            --bg-body: #0d1117;
            --bg-sidebar: #161b22;
            --bg-card: #1c2128;
            --text-main: #e6edf3;
            --text-muted: #8b949e;
            --primary: #58a6ff;
            --primary-hover: #3182ce;
            --success: #238636;
            --warning: #d29922;
            --danger: #f85149;
            --border-color: #30363d;
        }

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: 'Inter', sans-serif;
        }

        body {
            background-color: var(--bg-body);
            color: var(--text-main);
            display: flex;
            min-height: 100vh;
        }

        /* Sidebar Premium */
        .sidebar {
            width: 260px;
            background-color: var(--bg-sidebar);
            border-right: 1px solid var(--border-color);
            display: flex;
            flex-direction: column;
            position: fixed;
            height: 100vh;
            left: 0;
            top: 0;
            transition: all 0.3s ease;
        }

        .sidebar-header {
            padding: 20px;
            border-bottom: 1px solid var(--border-color);
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .sidebar-brand {
            font-size: 1.2rem;
            font-weight: 700;
            color: var(--primary);
            text-decoration: none;
        }

        .sidebar-menu {
            list-style: none;
            padding: 15px 10px;
            flex-grow: 1;
        }

        .sidebar-menu li {
            margin-bottom: 5px;
        }

        .sidebar-link {
            display: flex;
            align-items: center;
            padding: 12px 15px;
            color: var(--text-muted);
            text-decoration: none;
            border-radius: 8px;
            transition: all 0.2s ease;
            font-weight: 500;
            font-size: 0.95rem;
        }

        .sidebar-link i {
            width: 24px;
            font-size: 1.1rem;
        }

        .sidebar-link:hover, .sidebar-link.active {
            background-color: rgba(88, 166, 255, 0.1);
            color: var(--primary);
        }

        /* Main Content */
        .main-content {
            margin-left: 260px;
            flex: 1;
            display: flex;
            flex-direction: column;
            min-height: 100vh;
        }

        /* Topbar */
        .topbar {
            height: 70px;
            background-color: var(--bg-sidebar);
            border-bottom: 1px solid var(--border-color);
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 0 30px;
        }

        .topbar-user {
            display: flex;
            align-items: center;
            gap: 15px;
            color: var(--text-main);
        }

        .user-avatar {
            width: 38px;
            height: 38px;
            background-color: var(--primary);
            color: white;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: bold;
        }

        /* Content Area */
        .content-area {
            padding: 30px;
            flex-grow: 1;
        }

        .page-header {
            margin-bottom: 25px;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .page-title {
            font-size: 1.5rem;
            font-weight: 600;
        }

        /* Components */
        .card {
            background-color: var(--bg-card);
            border: 1px solid var(--border-color);
            border-radius: 12px;
            padding: 20px;
            box-shadow: 0 4px 6px rgba(0,0,0,0.1);
        }

        .btn {
            padding: 10px 20px;
            border-radius: 6px;
            font-size: 0.9rem;
            font-weight: 500;
            cursor: pointer;
            border: none;
            transition: all 0.2s;
            text-decoration: none;
            display: inline-flex;
            align-items: center;
            gap: 8px;
        }

        .btn-primary {
            background-color: var(--primary);
            color: white;
        }

        .btn-primary:hover {
            background-color: var(--primary-hover);
        }

    </style>
</head>
<body>

    <aside class="sidebar">
        <div class="sidebar-header">
            <i class="fa-solid fa-key text-primary" style="color: var(--primary); font-size: 1.5rem;"></i>
            <a href="<?php echo e(route('dashboard')); ?>" class="sidebar-brand">LicenciasPro</a>
        </div>
        <ul class="sidebar-menu">
            <li>
                <a href="<?php echo e(route('dashboard')); ?>" class="sidebar-link <?php echo e(request()->routeIs('dashboard') ? 'active' : ''); ?>">
                    <i class="fa-solid fa-chart-pie"></i> Dashboard
                </a>
            </li>
            <li>
                <a href="<?php echo e(route('empresas.index')); ?>" class="sidebar-link <?php echo e(request()->routeIs('empresas.*') ? 'active' : ''); ?>">
                    <i class="fa-solid fa-building"></i> Empresas
                </a>
            </li>
            <li>
                <a href="<?php echo e(route('licencias.index')); ?>" class="sidebar-link <?php echo e(request()->routeIs('licencias.*') ? 'active' : ''); ?>">
                    <i class="fa-solid fa-certificate"></i> Licencias
                </a>
            </li>
            <li>
                <a href="<?php echo e(route('activaciones.index')); ?>" class="sidebar-link <?php echo e(request()->routeIs('activaciones.*') ? 'active' : ''); ?>">
                    <i class="fa-solid fa-clock-rotate-left"></i> Activaciones
                </a>
            </li>
            <li>
                <a href="<?php echo e(route('pagos.index')); ?>" class="sidebar-link <?php echo e(request()->routeIs('pagos.*') ? 'active' : ''); ?>">
                    <i class="fa-solid fa-wallet"></i> Pagos
                </a>
            </li>
            <li style="margin-top: 20px;">
                <h6 style="color: var(--text-muted); padding-left: 15px; font-size: 0.75rem; text-transform: uppercase;">Ajustes</h6>
            </li>
            <li>
                <a href="<?php echo e(route('configuracion.index')); ?>" class="sidebar-link <?php echo e(request()->routeIs('configuracion.*') ? 'active' : ''); ?>">
                    <i class="fa-solid fa-gear"></i> Configuración
                </a>
            </li>
        </ul>
    </aside>

    <main class="main-content">
        <header class="topbar">
            <div>
                <!-- Ocultar/Mostrar sidebar en móvil -->
            </div>
            <div class="topbar-user">
                <span><?php echo e(auth()->user()->name ?? 'Administrador'); ?></span>
                <div class="user-avatar">
                    <i class="fa-solid fa-user"></i>
                </div>
                <!-- Formulario de Logout -->
                <form action="<?php echo e(route('logout')); ?>" method="POST" style="display:inline;">
                    <?php echo csrf_field(); ?>
                    <button type="submit" style="background:none; border:none; color: var(--text-muted); cursor:pointer; font-size:1.1rem; margin-left: 10px;" title="Cerrar Sessión">
                        <i class="fa-solid fa-arrow-right-from-bracket"></i>
                    </button>
                </form>
            </div>
        </header>

        <section class="content-area">
            <?php echo $__env->yieldContent('content'); ?>
        </section>
    </main>

    <?php echo $__env->yieldPushContent('scripts'); ?>
</body>
</html>
<?php /**PATH C:\Webs\PHP\licencia-sistemapanaderia\resources\views/layouts/app.blade.php ENDPATH**/ ?>