<!DOCTYPE html>
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>@yield('title', 'Student Portal')</title>

    <!-- Fonts -->
    <link rel="preconnect" href="https://fonts.bunny.net">
    <link href="https://fonts.bunny.net/css?family=figtree:400,500,600&display=swap" rel="stylesheet" />

    <!-- Bootstrap CSS -->
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet">

    <!-- Font Awesome -->
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.0/css/all.min.css">

    <!-- App CSS & JS -->
    @vite(['resources/css/app.css', 'resources/js/app.js'])

    <style>
        body {
            font-family: 'Figtree', sans-serif;
            overflow-x: hidden;
        }
        .sidebar {
            width: 250px;
            height: 100vh;
            position: fixed;
            overflow-y: auto;
            top: 0;
            left: 0;
            background-color: #0d6efd;
            color: white;
        }
        .sidebar .nav-link:hover {
            background-color: #20c997;
        }
        .content-wrapper {
            margin-left: 250px;
            padding: 20px;
        }
    </style>
</head>
<body>
    <!-- Sidebar -->
    <nav class="sidebar p-3">
        <h4 class="text-warning text-center mb-4">🎓 Student Portal</h4>
        <ul class="nav flex-column">
            <li class="nav-item"><a href="{{ route('student.dashboard') }}" class="nav-link text-white"><i class="fas fa-home me-2"></i>Dashboard</a></li>
            <li class="nav-item"><a href="{{ route('student.registration') }}" class="nav-link text-white"><i class="fas fa-pen-nib me-2"></i>Registration</a></li>
            <li class="nav-item"><a href="{{ route('student.courses') }}" class="nav-link text-white"><i class="fas fa-list me-2"></i>Registered Courses</a></li>
            <li class="nav-item"><a href="{{ route('student.results') }}" class="nav-link text-white"><i class="fas fa-chart-bar me-2"></i>Results</a></li>
            <li class="nav-item"><a href="{{ route('student.coursework') }}" class="nav-link text-white"><i class="fas fa-tasks me-2"></i>Coursework</a></li>
            <li class="nav-item"><a href="{{ route('student.statement') }}" class="nav-link text-white"><i class="fas fa-credit-card me-2"></i>Fees</a></li>
            <li class="nav-item"><a href="{{ route('student.timetable') }}" class="nav-link text-white"><i class="fas fa-calendar-alt me-2"></i>Timetable</a></li>
            <li class="nav-item"><a href="{{ route('student.accommodation') }}" class="nav-link text-white"><i class="fas fa-bed me-2"></i>Accommodation</a></li>
            <li class="nav-item"><a href="{{ route('student.deferment') }}" class="nav-link text-white"><i class="fas fa-envelope me-2"></i>Deferment</a></li>
            <li class="nav-item">
                <a href="https://ecampus.co.zw/" target="_blank" class="nav-link text-white">
                    <i class="fas fa-star me-2"></i>Assessments
                </a>
            </li>
            <li class="nav-item"><a href="{{ route('student.notices') }}" class="nav-link text-white"><i class="fas fa-bullhorn me-2"></i>Notices</a></li>
            <li class="nav-item"><a href="{{ route('student.downloads') }}" class="nav-link text-white"><i class="fas fa-folder-open me-2"></i>Downloads</a></li>
            <li class="nav-item"><a href="{{ route('student.profile') }}" class="nav-link text-white"><i class="fas fa-user me-2"></i>Profile</a></li>
            <li class="nav-item mt-3">
                <a href="{{ route('logout') }}" class="nav-link text-danger"
                   onclick="event.preventDefault(); document.getElementById('logout-form').submit();">
                    <i class="fas fa-sign-out-alt me-2"></i>Logout
                </a>
                <form id="logout-form" action="{{ route('logout') }}" method="POST" class="d-none">@csrf</form>
            </li>
        </ul>
    </nav>

    <!-- Main Content -->
    <div class="content-wrapper">
        @yield('content')
    </div>

    <!-- Bootstrap JS -->
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js"></script>
</body>
</html>
