<!DOCTYPE html>
<html lang="id">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>@yield('title') - Pustaka Nawasena</title>
    <link rel="icon" href="{{ asset('images/pustaka.jpeg') }}" type="image/png">

    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet">
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.min.css">
    <link href="https://fonts.googleapis.com/css2?family=Inter:wght@100..900&display=swap" rel="stylesheet">
    <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>

    <style>
        :root {
            --primary-color: #0d47a1;
            --secondary-color: #ffeb3b;
        }
        body {
            font-family: 'Inter', sans-serif;
            background: url('{{ asset("images/bg2.jpg") }}') no-repeat center center fixed;
            background-size: cover;
            min-height: 100vh;
            backdrop-filter: blur(4px);
        }
        .glass {
            background: rgba(255, 255, 255, 0.7);
            border-radius: 20px;
            box-shadow: 0 10px 40px rgba(31, 38, 135, 0.15);
            backdrop-filter: blur(10px);
            border: 1px solid rgba(255, 255, 255, 0.4);
            padding: 30px;
            transition: all 0.3s ease-in-out;
        }
        .glass:hover {
            transform: translateY(-5px);
            box-shadow: 0 15px 50px rgba(0, 0, 0, 0.2);
        }
        .navbar-custom {
            background: rgba(13, 71, 161, 0.9);
            backdrop-filter: blur(8px);
            border-bottom: 3px solid var(--secondary-color);
        }
        .navbar-custom .nav-link {
            color: #fff !important;
            font-weight: 500;
        }
        .navbar-custom .nav-link:hover {
            color: var(--secondary-color) !important;
        }
        .footer-custom {
            background: rgba(0, 0, 0, 0.6);
            backdrop-filter: blur(5px);
            color: white;
        }
    </style>
</head>
<body>

<nav class="navbar navbar-expand-lg navbar-custom sticky-top">
    <div class="container-fluid container-xl">
        <a class="navbar-brand fw-bold text-white fs-4" href="{{ route('admin.dashboard') }}">
            <i class="bi bi-book-half"></i> PUSTAKA NAWASENA
        </a>
        <button class="navbar-toggler border-0" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav">
            <i class="bi bi-list text-white fs-2"></i>
        </button>
        <div class="collapse navbar-collapse" id="navbarNav">
            <ul class="navbar-nav ms-auto align-items-center">
                <li class="nav-item"><a class="nav-link" href="{{ route('profile') }}"><i class="bi bi-person-circle me-1"></i> Profil</a></li>
                <li class="nav-item">
                    <a class="nav-link btn btn-sm btn-warning text-dark px-3 ms-lg-2 mt-2 mt-lg-0" href="{{ route('logout') }}" 
                       onclick="event.preventDefault(); document.getElementById('logout-form').submit();">
                        <i class="bi bi-box-arrow-right"></i> Logout
                    </a>
                </li>
            </ul>
            <form id="logout-form" action="{{ route('logout') }}" method="POST" class="d-none">@csrf</form>
        </div>
    </div>
</nav>

<main class="py-5">
    <div class="container container-xl">
        @yield('content')
    </div>
</main>

<footer class="footer-custom py-4 mt-auto">
    <div class="container container-xl text-center">
        <p class="mb-0 small">&copy; {{ date('Y') }} Pustaka Nawasena Bakorwil III Malang. Hak Cipta Dilindungi.</p>
        <p class="mb-0 small text-light mt-1"></p>
    </div>
</footer>

<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js"></script>
@yield('scripts')
</body>
</html>

