<div class="sidebar d-flex flex-column flex-shrink-0 text-white bg-dark shadow" id="sidebar">
    <div class="sidebar-header p-3 border-bottom border-secondary mb-3">
        <a href="<?php echo e(url('/dashboard')); ?>"
            class="d-flex align-items-center mb-0 me-md-auto text-white text-decoration-none px-3">
            <?php $logo = \App\Models\SystemSetting::getValue('site_logo'); ?>
            <?php if($logo): ?>
                <img src="<?php echo e(url($logo)); ?>" alt="Logo" height="35">
            <?php else: ?>
                <span
                    class="fs-4 fw-bold text-primary"><?php echo e(\App\Models\SystemSetting::getValue('app_name', 'WorkFlow')); ?></span>
            <?php endif; ?>
        </a>
    </div>

    <ul class="nav nav-pills flex-column mb-auto px-3">
        <li class="nav-item mb-1">
            <a href="<?php echo e(url('/dashboard')); ?>"
                class="nav-link text-white <?php echo e(Request::is('dashboard') ? 'bg-primary' : ''); ?>">
                <i class="bi bi-speedometer2 me-2"></i> Dashboard
            </a>
        </li>
        <li class="nav-item mb-1">
            <a href="<?php echo e(url('/attendance')); ?>"
                class="nav-link text-white <?php echo e(Request::is('attendance*') ? 'bg-primary' : ''); ?>">
                <i class="bi bi-clock-history me-2"></i> Attendance
            </a>
        </li>
        <li class="nav-item mb-1">
            <a href="<?php echo e(url('/tasks')); ?>" class="nav-link text-white <?php echo e(Request::is('tasks*') ? 'bg-primary' : ''); ?>">
                <i class="bi bi-check2-square me-2"></i> My Tasks
            </a>
        </li>
        <li class="nav-item mb-1">
            <a href="<?php echo e(url('/projects')); ?>"
                class="nav-link text-white <?php echo e(Request::is('projects*') ? 'bg-primary' : ''); ?>">
                <i class="bi bi-briefcase me-2"></i> Projects
            </a>
        </li>
        <li class="nav-item mb-1">
            <a href="<?php echo e(url('/reports')); ?>"
                class="nav-link text-white <?php echo e(Request::is('reports*') ? 'bg-primary' : ''); ?>">
                <i class="bi bi-file-earmark-text me-2"></i> Work Reports
            </a>
        </li>
        <li class="nav-item mb-1">
            <a href="<?php echo e(url('/leaves')); ?>"
                class="nav-link text-white <?php echo e(Request::is('leaves*') ? 'bg-primary' : ''); ?>">
                <i class="bi bi-calendar-event me-2"></i> Leaves
            </a>
        </li>
        <li class="nav-item mb-1">
            <a href="<?php echo e(url('/announcements')); ?>"
                class="nav-link text-white <?php echo e(Request::is('announcements*') ? 'bg-primary' : ''); ?>">
                <i class="bi bi-megaphone me-2"></i> Announcements
            </a>
        </li>
    </ul>

    <div class="sidebar-footer p-3 border-top border-secondary mt-2">
        <div class="d-flex align-items-center bg-secondary-subtle bg-opacity-10 p-2 rounded-3">
            <img src="<?php echo e(auth()->user()->avatar ?? 'https://ui-avatars.com/api/?name=' . auth()->user()->name . '&background=random'); ?>"
                alt="" width="40" height="40" class="rounded-circle me-2 border border-secondary">
            <div class="overflow-hidden">
                <p class="mb-0 fw-semibold text-truncate small"><?php echo e(auth()->user()->name); ?></p>
                <span class="badge bg-primary-subtle text-primary p-1 px-2 rounded-pill"
                    style="font-size: 0.65rem;"><?php echo e(strtoupper(auth()->user()->role)); ?></span>
            </div>
        </div>
    </div>
</div>

<style>
    .nav-link {
        border-radius: 0.5rem;
        transition: all 0.2s;
        padding: 0.75rem 1rem;
        color: #adb5bd !important;
    }

    .nav-link:hover {
        background: rgba(255, 255, 255, 0.05);
        color: white !important;
    }

    .nav-link.bg-primary {
        background-color: var(--primary-color) !important;
        color: white !important;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    }

    .nav-link i {
        font-size: 1.1rem;
    }
</style>
<?php /**PATH G:\wamp64\www\projects\attendance\resources\views/partials/_sidebar-employee.blade.php ENDPATH**/ ?>