<div>
    <div class="py-12">
        <div class="max-w-7xl mx-auto sm:px-6 lg:px-8 space-y-6">

            <!-- Role-Based Stats Cards -->
            <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6">
                <!-- Course Verifications Card (All Lecturers) -->
                <div class="bg-white dark:bg-gray-800 rounded-lg shadow-md p-6">
                    <div class="flex items-center justify-between">
                        <div class="flex items-center">
                            <div class="p-3 rounded-full bg-blue-100 dark:bg-blue-900">
                                <i class="fa fa-file-alt text-blue-600 dark:text-blue-400 text-xl"></i>
                            </div>
                            <div class="ml-4">
                                <p class="text-sm font-medium text-gray-600 dark:text-gray-400">Course Verifications</p>
                                <div class="flex items-center space-x-2 mt-1">
                                    <span class="text-xs text-yellow-600 dark:text-yellow-400">
                                        Pending: <?php echo e($stats['courseVerifications']['pending']); ?>

                                    </span>
                                    <span class="text-xs text-gray-700 dark:text-gray-300">
                                        Total: <?php echo e($stats['courseVerifications']['total']); ?>

                                    </span>
                                </div>
                                <p class="text-xs text-green-600 dark:text-green-400 mt-1">
                                    Approval Rate: <?php echo e($stats['courseVerifications']['approval_rate']); ?>%
                                </p>
                            </div>
                        </div>
                    </div>
                </div>

                <!-- Supervised Students Card (If Supervisor) -->
                <!--[if BLOCK]><![endif]--><?php if(isset($stats['supervisedStudents'])): ?>
                    <div class="bg-white dark:bg-gray-800 rounded-lg shadow-md p-6">
                        <div class="flex items-center justify-between">
                            <div class="flex items-center">
                                <div class="p-3 rounded-full bg-green-100 dark:bg-green-900">
                                    <i class="fa fa-users text-green-600 dark:text-green-400 text-xl"></i>
                                </div>
                                <div class="ml-4">
                                    <p class="text-sm font-medium text-gray-600 dark:text-gray-400">Supervised Students
                                    </p>
                                    <p class="text-lg font-bold text-gray-900 dark:text-gray-100">
                                        <?php echo e($stats['supervisedStudents']['current']); ?> /
                                        <?php echo e($stats['supervisedStudents']['quota']); ?>

                                    </p>
                                    <p class="text-xs text-blue-600 dark:text-blue-400 mt-1">
                                        Available: <?php echo e($stats['supervisedStudents']['available']); ?>

                                    </p>
                                </div>
                            </div>
                        </div>
                    </div>
                <?php endif; ?><!--[if ENDBLOCK]><![endif]-->

                <!-- Committee Card (If Committee) -->
                <!--[if BLOCK]><![endif]--><?php if(isset($stats['committee'])): ?>
                    <div class="bg-white dark:bg-gray-800 rounded-lg shadow-md p-6">
                        <div class="flex items-center justify-between">
                            <div class="flex items-center">
                                <div class="p-3 rounded-full bg-purple-100 dark:bg-purple-900">
                                    <i class="fa fa-tasks text-purple-600 dark:text-purple-400 text-xl"></i>
                                </div>
                                <div class="ml-4">
                                    <p class="text-sm font-medium text-gray-600 dark:text-gray-400">Committee Tasks</p>
                                    <div class="flex flex-col space-y-1 mt-1">
                                        <span class="text-xs text-yellow-600 dark:text-yellow-400">
                                            Placements: <?php echo e($stats['committee']['pendingPlacementApplications']); ?>

                                        </span>
                                        <span class="text-xs text-orange-600 dark:text-orange-400">
                                            Defers: <?php echo e($stats['committee']['pendingDeferRequests']); ?>

                                        </span>
                                        <span class="text-xs text-red-600 dark:text-red-400">
                                            Changes: <?php echo e($stats['committee']['pendingChangeRequests']); ?>

                                        </span>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                <?php endif; ?><!--[if ENDBLOCK]><![endif]-->

                <!-- Coordinator Card (If Coordinator) -->
                <!--[if BLOCK]><![endif]--><?php if(isset($stats['coordinator'])): ?>
                    <div class="bg-white dark:bg-gray-800 rounded-lg shadow-md p-6">
                        <div class="flex items-center justify-between">
                            <div class="flex items-center">
                                <div class="p-3 rounded-full bg-indigo-100 dark:bg-indigo-900">
                                    <i class="fa fa-user-shield text-indigo-600 dark:text-indigo-400 text-xl"></i>
                                </div>
                                <div class="ml-4">
                                    <p class="text-sm font-medium text-gray-600 dark:text-gray-400">Coordinator Tasks
                                    </p>
                                    <div class="flex flex-col space-y-1 mt-1">
                                        <span class="text-xs text-yellow-600 dark:text-yellow-400">
                                            Approvals:
                                            <?php echo e($stats['coordinator']['pendingPlacementApprovals'] + $stats['coordinator']['pendingDeferApprovals'] + $stats['coordinator']['pendingChangeRequests']); ?>

                                        </span>
                                        <span class="text-xs text-red-600 dark:text-red-400">
                                            Unassigned: <?php echo e($stats['coordinator']['unassignedStudents']); ?>

                                        </span>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                <?php endif; ?><!--[if ENDBLOCK]><![endif]-->

                <!-- Academic Advisor Card (If Academic Advisor) -->
                <!--[if BLOCK]><![endif]--><?php if(isset($stats['academicAdvisor'])): ?>
                    <div class="bg-white dark:bg-gray-800 rounded-lg shadow-md p-6">
                        <div class="flex items-center justify-between">
                            <div class="flex items-center">
                                <div class="p-3 rounded-full bg-teal-100 dark:bg-teal-900">
                                    <i class="fa fa-graduation-cap text-teal-600 dark:text-teal-400 text-xl"></i>
                                </div>
                                <div class="ml-4">
                                    <p class="text-sm font-medium text-gray-600 dark:text-gray-400">Academic Advisor</p>
                                    <p class="text-lg font-bold text-gray-900 dark:text-gray-100">
                                        <?php echo e($stats['academicAdvisor']['adviseeCount']); ?> Students
                                    </p>
                                </div>
                            </div>
                        </div>
                    </div>
                <?php endif; ?><!--[if ENDBLOCK]><![endif]-->
            </div>

            <!-- Main Content Grid -->
            <div class="grid grid-cols-1 lg:grid-cols-3 gap-6">
                <!-- Left Column: Pending Tasks & Supervised Students -->
                <div class="lg:col-span-2 space-y-6">
                    <!-- Pending Tasks/To-Do List -->
                    <div class="bg-white dark:bg-gray-800 rounded-lg shadow-md p-6">
                        <h3 class="text-lg font-semibold text-gray-900 dark:text-gray-100 mb-4">Pending Tasks</h3>

                        <!--[if BLOCK]><![endif]--><?php if($pendingTasks->isEmpty()): ?>
                            <p class="text-sm text-gray-500 dark:text-gray-400 text-center py-4">
                                No pending tasks
                            </p>
                        <?php else: ?>
                            <div class="space-y-3">
                                <!--[if BLOCK]><![endif]--><?php $__currentLoopData = $pendingTasks; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $task): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                    <div
                                        class="border-l-4 <?php echo e($task['priority'] === 'high' ? 'border-red-500' : 'border-yellow-500'); ?> pl-4 py-3 bg-gray-50 dark:bg-gray-700/50 rounded-r">
                                        <div class="flex items-center justify-between">
                                            <div class="flex-1">
                                                <h4 class="font-medium text-sm text-gray-900 dark:text-gray-100">
                                                    <?php echo e($task['title']); ?>

                                                </h4>
                                                <p class="text-xs text-gray-600 dark:text-gray-400 mt-1">
                                                    <?php echo e($task['description']); ?>

                                                </p>
                                                <p class="text-xs text-gray-500 dark:text-gray-500 mt-1">
                                                    <?php echo e(is_string($task['date']) ? \Carbon\Carbon::parse($task['date'])->format('M d, Y') : $task['date']->format('M d, Y')); ?>

                                                </p>
                                            </div>
                                            <a href="<?php echo e($task['link']); ?>"
                                                class="ml-4 text-xs text-blue-600 dark:text-blue-400 hover:underline whitespace-nowrap">
                                                View →
                                            </a>
                                        </div>
                                    </div>
                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?><!--[if ENDBLOCK]><![endif]-->
                            </div>
                        <?php endif; ?><!--[if ENDBLOCK]><![endif]-->
                    </div>

                    <!-- My Supervised Students (If Supervisor) -->
                    <!--[if BLOCK]><![endif]--><?php if($supervisedStudents->isNotEmpty()): ?>
                        <div class="bg-white dark:bg-gray-800 rounded-lg shadow-md p-6">
                            <h3 class="text-lg font-semibold text-gray-900 dark:text-gray-100 mb-4">My Supervised
                                Students</h3>

                            <div class="space-y-4">
                                <!--[if BLOCK]><![endif]--><?php $__currentLoopData = $supervisedStudents; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $item): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                    <div class="border border-gray-200 dark:border-gray-700 rounded-lg p-4">
                                        <div class="flex items-center justify-between">
                                            <div class="flex-1">
                                                <h4 class="font-medium text-gray-900 dark:text-gray-100">
                                                    <?php echo e($item['student']->user->name); ?>

                                                </h4>
                                                <p class="text-sm text-gray-600 dark:text-gray-400">
                                                    <?php echo e($item['student']->studentID); ?>

                                                </p>
                                                <!--[if BLOCK]><![endif]--><?php if($item['placement']): ?>
                                                    <p class="text-sm text-gray-600 dark:text-gray-400 mt-1">
                                                        <span class="font-medium">Company:</span>
                                                        <?php echo e($item['placement']->companyName); ?>

                                                    </p>
                                                    <p class="text-xs text-gray-500 dark:text-gray-500 mt-1">
                                                        Status: <span
                                                            class="font-semibold <?php echo e($item['status'] === 'Active' ? 'text-green-600 dark:text-green-400' : 'text-yellow-600 dark:text-yellow-400'); ?>">
                                                            <?php echo e($item['status']); ?>

                                                        </span>
                                                    </p>
                                                <?php else: ?>
                                                    <p class="text-xs text-yellow-600 dark:text-yellow-400 mt-1">
                                                        Pending Placement
                                                    </p>
                                                <?php endif; ?><!--[if ENDBLOCK]><![endif]-->
                                            </div>
                                            <div class="ml-4">
                                                <!--[if BLOCK]><![endif]--><?php if($item['student']->user->email): ?>
                                                    <a href="mailto:<?php echo e($item['student']->user->email); ?>"
                                                        class="text-xs text-blue-600 dark:text-blue-400 hover:underline">
                                                        <i class="fa fa-envelope mr-1"></i> Contact
                                                    </a>
                                                <?php endif; ?><!--[if ENDBLOCK]><![endif]-->
                                            </div>
                                        </div>
                                    </div>
                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?><!--[if ENDBLOCK]><![endif]-->
                            </div>
                        </div>
                    <?php endif; ?><!--[if ENDBLOCK]><![endif]-->
                </div>

                <!-- Right Column: Recent Activity -->
                <div class="space-y-6">
                    <!-- Recent Activity -->
                    <div class="bg-white dark:bg-gray-800 rounded-lg shadow-md p-6">
                        <h3 class="text-lg font-semibold text-gray-900 dark:text-gray-100 mb-4">Recent Activity</h3>

                        <!--[if BLOCK]><![endif]--><?php if($recentActivities->isEmpty()): ?>
                            <p class="text-sm text-gray-500 dark:text-gray-400 text-center py-4">
                                No recent activity
                            </p>
                        <?php else: ?>
                            <div class="space-y-4">
                                <!--[if BLOCK]><![endif]--><?php $__currentLoopData = $recentActivities; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $activity): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                    <div
                                        class="border-l-4 <?php echo e($activity['status'] === 'approved' || $activity['status'] === 'Approved' ? 'border-green-500' : ($activity['status'] === 'pending' || $activity['status'] === 'Pending' ? 'border-yellow-500' : 'border-red-500')); ?> pl-4 py-2">
                                        <h4 class="font-medium text-sm text-gray-900 dark:text-gray-100">
                                            <?php echo e($activity['title']); ?>

                                        </h4>
                                        <p class="text-xs text-gray-600 dark:text-gray-400 mt-1">
                                            <?php echo e($activity['description']); ?>

                                        </p>
                                        <p class="text-xs text-gray-500 dark:text-gray-500 mt-1">
                                            <?php echo e(is_string($activity['date']) ? \Carbon\Carbon::parse($activity['date'])->diffForHumans() : $activity['date']->diffForHumans()); ?>

                                        </p>
                                        <!--[if BLOCK]><![endif]--><?php if($activity['link']): ?>
                                            <a href="<?php echo e($activity['link']); ?>"
                                                class="text-xs text-blue-600 dark:text-blue-400 hover:underline mt-1 inline-block">
                                                View →
                                            </a>
                                        <?php endif; ?><!--[if ENDBLOCK]><![endif]-->
                                    </div>
                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?><!--[if ENDBLOCK]><![endif]-->
                            </div>
                        <?php endif; ?><!--[if ENDBLOCK]><![endif]-->
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<?php /**PATH C:\Users\User\Desktop\Laravel\Internlink\resources\views/livewire/lecturer-dashboard.blade.php ENDPATH**/ ?>