<!DOCTYPE html>
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">

<head>
    <meta charset="utf-8">

    <meta name="application-name" content="{{ config('app.name') }}">
    <meta name="csrf-token" content="{{ csrf_token() }}">
    <meta name="viewport" content="width=device-width, initial-scale=1">

    <title>{{ config('app.name') }}</title>

    <style>
        [x-cloak] {
            display: none !important;
        }
    </style>

    @filamentStyles
    @vite('resources/css/app.css')
</head>

<body class="bg-gray-100 text-gray-900 flex h-screen">

    <!-- Sidebar -->
    <aside class="w-64 bg-blue-700 text-white flex flex-col p-4">
        <h2 class="text-2xl font-semibold mb-6">Mi App</h2>

        <nav class="flex flex-col gap-3">
            <a href="#" class="hover:bg-blue-600 rounded px-3 py-2">Inicio</a>
            <a href="#" class="hover:bg-blue-600 rounded px-3 py-2">Usuarios</a>
            <a href="#" class="hover:bg-blue-600 rounded px-3 py-2">Reportes</a>
            <a href="#" class="hover:bg-blue-600 rounded px-3 py-2">Configuración</a>
        </nav>

        <div class="mt-auto pt-6 border-t border-blue-500">
            <p class="text-sm text-blue-200">© 2025</p>
        </div>
    </aside>

    <!-- Contenido principal -->
    <div class="flex-1 flex flex-col">
        <!-- Header -->
        <header class="bg-white shadow p-4 flex justify-between items-center">
            <h1 class="text-xl font-semibold">@yield('header', 'Panel')</h1>
            <button class="bg-blue-600 text-white px-4 py-2 rounded hover:bg-blue-700">
                Cerrar sesión
            </button>
        </header>

        <!-- Contenido -->
        <main class="flex-1 p-6 overflow-y-auto">
            {{ $slot }}
        </main>
    </div>

    @livewire('notifications') {{-- Only required if you wish to send flash notifications --}}

    @filamentScripts
    @vite('resources/js/app.js')

</body>

</html>
