<!DOCTYPE html>
<html lang="id">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="csrf-token" content="{{ csrf_token() }}">

    <title>Admin - Sistem Rekomendasi Jurusan SMAN 4 Jember</title>

    <link href="https://fonts.bunny.net/css?family=figtree:400,500,600,700&display=swap" rel="stylesheet" />
    <link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css" rel="stylesheet"/>
    
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet">
    <link href="{{ asset('css/admin.css') }}" rel="stylesheet">

    @stack('styles')
</head>
<body>

<div class="admin-wrapper">
    <aside class="sidebar-modern">
        <div class="sidebar-header">
            <img src="{{ asset('images/logo.png') }}" alt="Logo SMAN 4 Jember" onerror="this.src='https://ui-avatars.com/api/?name=S4&background=2D7A47&color=fff'">
            <div class="sidebar-brand-text fw-bold text-white">SMAN 4 JEMBER</div>
            <div class="sidebar-brand-sub small" style="opacity: 0.8;">SISTEM REKOMENDASI</div>
        </div>

        <nav class="sidebar-menu">
            <div class="menu-label">Utama</div>
            <a href="{{ route('admin.dashboard') }}" class="nav-item {{ request()->routeIs('admin.dashboard') ? 'active' : '' }}">
                <i class="fas fa-th-large"></i> Dashboard
            </a>

            <div class="menu-label">Manajemen Data</div>
            <a href="{{ route('admin.siswa') }}" class="nav-item {{ request()->routeIs('admin.siswa*') ? 'active' : '' }}">
                <i class="fas fa-user-graduate"></i> Data Siswa
            </a>
            <a href="{{ route('admin.jurusan') }}" class="nav-item {{ request()->routeIs('admin.jurusan*') ? 'active' : '' }}">
                <i class="fas fa-university"></i> Data Jurusan
            </a>
            
            <a href="{{ route('admin.prospek-kerja') }}" class="nav-item {{ request()->routeIs('admin.prospek-kerja*') ? 'active' : '' }}">
                <i class="fas fa-briefcase"></i> Data Prospek Kerja
            </a>
            
            <a href="{{ route('admin.guru') }}" class="nav-item {{ request()->routeIs('admin.guru*') ? 'active' : '' }}">
                <i class="fas fa-user-tie"></i> Guru BK
            </a>
            <a href="{{ route('admin.alumni') }}" class="nav-item {{ request()->routeIs('admin.alumni*') ? 'active' : '' }}">
                <i class="fas fa-graduation-cap"></i> Data Alumni
            </a>

            <div class="menu-label">Analisis & Riwayat</div>
            <a href="{{ route('admin.riwayat') }}" class="nav-item {{ request()->routeIs('admin.riwayat*') ? 'active' : '' }}">
                <i class="fas fa-history"></i> Riwayat Prediksi
            </a>
            <a href="{{ route('admin.latih-model') }}" class="nav-item {{ request()->routeIs('admin.latih-model') ? 'active' : '' }}">
                <i class="fas fa-brain"></i> Latih Model (RF)
            </a>

            <div class="mt-4 pt-4 border-top border-white border-opacity-10">
                <a href="{{ route('landingpage') }}" class="nav-item text-white opacity-75">
                    <i class="fas fa-sign-out-alt"></i> Keluar Ke Landing
                </a>
            </div>
        </nav>
    </aside>

    <div class="main-content">
        <header class="topbar">
            <div class="search-bar">
                <i class="fas fa-search text-muted"></i>
                <input type="text" placeholder="Cari data...">
            </div>
            
            <div class="user-profile d-flex align-items-center gap-3">
                <div class="text-end d-none d-sm-block">
                    <div class="fw-bold small">Administrator</div>
                    <div class="text-muted" style="font-size: 11px;">GURU BK</div>
                </div>
                <img src="https://ui-avatars.com/api/?name=Admin+BK&background=2D7A47&color=fff&rounded=true" width="40" height="40">
            </div>
        </header>

        <main class="p-4">
            @yield('content')
        </main>
    </div>
</div>

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

</body>
</html>