<div class="sidebar" id="sidebar">
    <div class="sidebar-header">
        <img src="{{ asset('images/rosa-mys-logo.png') }}" alt="Logo" class="sidebar-logo me-3">
        <h5>Student Portal</h5>
    </div>

    <nav class="sidebar-nav">
        <a href="{{ route('student.dashboard') }}" class="nav-item {{ request()->routeIs('student.dashboard') ? 'active' : '' }}">
            <i class="fas fa-tachometer-alt"></i>
            <span>Dashboard</span>
        </a>

        <div class="nav-item dropdown-sidebar">
            <a href="#" class="nav-link-sidebar" data-bs-toggle="collapse" data-bs-target="#resultsDropdown"
                {{ request()->routeIs('student.results.*') ? 'aria-expanded=true' : '' }}>
                <i class="fas fa-chart-line"></i>
                <span>My Results</span>
                <i class="fas fa-chevron-down ms-2 dropdown-arrow"></i>
            </a>
            <div class="collapse {{ request()->routeIs('student.results.*') ? 'show' : '' }}" id="resultsDropdown">
                <a href="{{ route('student.results.termly') }}"
                   class="nav-sub-item {{ request()->routeIs('student.results.termly') ? 'active' : '' }}"
                   style="padding-left: 50px;">
                    <i class="fas fa-calendar"></i>
                    <span>Termly Results</span>
                </a>
                <a href="{{ route('student.results.annual') }}"
                   class="nav-sub-item {{ request()->routeIs('student.results.annual') ? 'active' : '' }}"
                   style="padding-left: 50px;">
                    <i class="fas fa-calendar-alt"></i>
                    <span>Annual Results</span>
                </a>
            </div>
        </div>

        <a href="{{ route('student.payments.index') }}" class="nav-item {{ request()->routeIs('student.payments.*') ? 'active' : '' }}">
            <i class="fas fa-money-bill-wave"></i>
            <span>Payments</span>
        </a>

        <a href="{{ route('student.profile') }}" class="nav-item {{ request()->routeIs('student.profile') ? 'active' : '' }}">
            <i class="fas fa-user"></i>
            <span>My Profile</span>
        </a>

        <a href="{{ route('logout') }}" class="nav-item">
            <i class="fas fa-sign-out-alt"></i>
            <span>Logout</span>
        </a>
    </nav>
</div>

<div class="sidebar-overlay" id="sidebarOverlay"></div>