<!DOCTYPE html>
<html lang="id">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Admin - PPNI DPK BaliMéd</title>
    <script src="https://cdn.tailwindcss.com"></script>
</head>

<body class="bg-slate-100 text-slate-800">

    <div class="min-h-screen flex">
        <aside class="w-64 bg-blue-950 text-white p-6">
            <h2 class="text-2xl font-bold mb-8">Admin Panel</h2>

            <nav class="space-y-3">
                <a href="{{ route('admin.dashboard') }}"
                    class="block px-4 py-2 rounded-lg hover:bg-blue-900">Dashboard</a>
                <a href="{{ route('admin.posts.index') }}"
                    class="block px-4 py-2 rounded-lg hover:bg-blue-900">Berita</a>
                <a href="{{ route('admin.agendas.index') }}"
                    class="block px-4 py-2 rounded-lg hover:bg-blue-900">Agenda</a>
                <a href="{{ route('admin.galleries.index') }}"
                    class="block px-4 py-2 rounded-lg hover:bg-blue-900">Galeri</a>
            </nav>

            <form action="{{ route('logout') }}" method="POST" class="mt-10">
                @csrf
                <button type="submit" class="w-full bg-red-600 hover:bg-red-700 px-4 py-2 rounded-lg font-semibold">
                    Logout
                </button>
            </form>
        </aside>

        <main class="flex-1 p-8">
            @if(session('success'))
                <div class="mb-6 bg-green-100 text-green-800 px-4 py-3 rounded-lg">
                    {{ session('success') }}
                </div>
            @endif

            @yield('content')
        </main>
    </div>

</body>

</html>