<div class="li-sidebar">
    <div class="li-card">
        <div class="li-card-body p-2">
            <a href="<?= base_url('admin') ?>" class="li-nav-link <?= uri_string() === 'admin' ? 'active' : '' ?>">
                <i class="bi bi-house-door"></i> Overview
            </a>

            <?php if (in_array($role ?? '', ['agency_owner', 'recruiter'])): ?>
                <a href="<?= base_url('admin/jobs') ?>" class="li-nav-link <?= str_contains(uri_string(), 'admin/jobs') ? 'active' : '' ?>">
                    <i class="bi bi-briefcase"></i> Jobs
                </a>
                <a href="<?= base_url('admin/ats') ?>" class="li-nav-link <?= str_contains(uri_string(), 'admin/ats') ? 'active' : '' ?>">
                    <i class="bi bi-kanban"></i> ATS Pipeline
                </a>
                <a href="<?= base_url('admin/candidates') ?>" class="li-nav-link <?= str_contains(uri_string(), 'admin/candidates') ? 'active' : '' ?>">
                    <i class="bi bi-people"></i> Candidate Search
                </a>
                <a href="<?= base_url('admin/interviews') ?>" class="li-nav-link <?= str_contains(uri_string(), 'admin/interviews') ? 'active' : '' ?>">
                    <i class="bi bi-camera-video"></i> Interviews
                </a>
                <?php if (($role ?? '') === 'agency_owner'): ?>
                <a href="<?= base_url('admin/team') ?>" class="li-nav-link <?= str_contains(uri_string(), 'admin/team') ? 'active' : '' ?>">
                    <i class="bi bi-person-badge"></i> Team
                </a>
                <a href="<?= base_url('admin/billing') ?>" class="li-nav-link <?= str_contains(uri_string(), 'admin/billing') ? 'active' : '' ?>">
                    <i class="bi bi-credit-card"></i> Billing
                </a>
                <a href="<?= base_url('admin/reports') ?>" class="li-nav-link <?= str_contains(uri_string(), 'admin/reports') ? 'active' : '' ?>">
                    <i class="bi bi-bar-chart"></i> Reports
                </a>
                <a href="<?= base_url('admin/company-profile') ?>" class="li-nav-link <?= str_contains(uri_string(), 'admin/company-profile') ? 'active' : '' ?>">
                    <i class="bi bi-building"></i> Company Profile
                </a>
                <a href="<?= base_url('admin/profile-views') ?>" class="li-nav-link <?= str_contains(uri_string(), 'admin/profile-views') ? 'active' : '' ?>">
                    <i class="bi bi-eye"></i> Who Viewed My Profile
                </a>
                <a href="<?= base_url('admin/network') ?>" class="li-nav-link <?= str_contains(uri_string(), 'admin/network') ? 'active' : '' ?>">
                    <i class="bi bi-people-fill"></i> My Network
                </a>
                <?php endif; ?>
            <?php endif; ?>

            <?php if (($role ?? '') === 'candidate'): ?>
                <a href="<?= base_url('admin/profile') ?>" class="li-nav-link <?= str_contains(uri_string(), 'admin/profile') ? 'active' : '' ?>">
                    <i class="bi bi-person"></i> My Profile
                </a>
                <a href="<?= base_url('admin/profile-views') ?>" class="li-nav-link <?= str_contains(uri_string(), 'admin/profile-views') ? 'active' : '' ?>">
                    <i class="bi bi-eye"></i> Who Viewed My Profile
                </a>
                <a href="<?= base_url('admin/network') ?>" class="li-nav-link <?= str_contains(uri_string(), 'admin/network') ? 'active' : '' ?>">
                    <i class="bi bi-people-fill"></i> My Network
                </a>
                <a href="<?= base_url('admin/jobs') ?>" class="li-nav-link <?= str_contains(uri_string(), 'admin/jobs') ? 'active' : '' ?>">
                    <i class="bi bi-briefcase"></i> Browse Jobs
                </a>
                <a href="<?= base_url('admin/applications') ?>" class="li-nav-link <?= str_contains(uri_string(), 'admin/applications') ? 'active' : '' ?>">
                    <i class="bi bi-file-earmark-text"></i> My Applications
                </a>
                <a href="<?= base_url('admin/interviews') ?>" class="li-nav-link <?= str_contains(uri_string(), 'admin/interviews') ? 'active' : '' ?>">
                    <i class="bi bi-camera-video"></i> Interviews
                </a>
            <?php endif; ?>

            <?php if (($role ?? '') === 'super_admin'): ?>
                <a href="<?= base_url('admin/agencies') ?>" class="li-nav-link <?= str_contains(uri_string(), 'admin/agencies') ? 'active' : '' ?>">
                    <i class="bi bi-building"></i> Agencies
                </a>
                <a href="<?= base_url('admin/users') ?>" class="li-nav-link <?= str_contains(uri_string(), 'admin/users') ? 'active' : '' ?>">
                    <i class="bi bi-people"></i> Registered Users
                </a>
                <a href="<?= base_url('admin/payments') ?>" class="li-nav-link <?= str_contains(uri_string(), 'admin/payments') ? 'active' : '' ?>">
                    <i class="bi bi-credit-card"></i> Payments &amp; Invoices
                </a>
                <a href="<?= base_url('admin/audit-log') ?>" class="li-nav-link <?= str_contains(uri_string(), 'admin/audit-log') ? 'active' : '' ?>">
                    <i class="bi bi-journal-text"></i> Audit Log
                </a>
                <a href="<?= base_url('admin/reports') ?>" class="li-nav-link <?= str_contains(uri_string(), 'admin/reports') ? 'active' : '' ?>">
                    <i class="bi bi-bar-chart"></i> Platform Reports
                </a>
                <a href="<?= base_url('admin/settings') ?>" class="li-nav-link <?= str_contains(uri_string(), 'admin/settings') ? 'active' : '' ?>">
                    <i class="bi bi-gear"></i> Settings
                </a>
            <?php endif; ?>

            <a href="<?= base_url('admin/notifications') ?>" class="li-nav-link <?= str_contains(uri_string(), 'admin/notifications') ? 'active' : '' ?>">
                <i class="bi bi-bell"></i> Notifications
            </a>
        </div>
    </div>
</div>
