<?php $__empty_1 = true; $__currentLoopData = $results; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $i => $result): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
<tr class="<?php echo e($i % 2 === 0 ? 'bg-white' : 'bg-gray-50/50'); ?> hover:bg-indigo-50/30 transition">

    
    <td class="px-4 py-3 text-gray-400 text-xs font-medium">
        <?php echo e($results->firstItem() + $i); ?>

    </td>

    
    <td class="px-4 py-3">
        <div class="flex items-center gap-2">
            <span class="w-7 h-7 bg-purple-100 rounded-full flex items-center justify-center text-xs font-bold text-purple-600 flex-shrink-0">
                <?php echo e(strtoupper(substr($result->user->name ?? 'U', 0, 1))); ?>

            </span>
            <div>
                <p class="font-semibold text-gray-800 text-sm leading-tight"><?php echo e($result->user->name ?? '—'); ?></p>
                <p class="text-gray-400 text-xs mt-0.5"><?php echo e($result->user->email ?? '—'); ?></p>
            </div>
        </div>
    </td>

    
    <td class="px-4 py-3">
        <p class="text-sm font-medium text-gray-700 line-clamp-1"><?php echo e($result->course->title ?? '—'); ?></p>
    </td>

    
    <td class="px-4 py-3">
        <span class="text-sm font-semibold text-gray-800">
            <?php echo e($result->correct_answers); ?>/<?php echo e($result->total_questions); ?>

        </span>
        <span class="text-xs text-gray-400 ml-1">(<?php echo e(number_format((float) $result->score_percentage, 1)); ?>%)</span>
    </td>

    
    <td class="px-4 py-3">
        <?php if($result->passed): ?>
            <span class="inline-flex items-center gap-1 px-2.5 py-0.5 rounded-full text-xs font-semibold bg-green-100 text-green-700">
                <i class="fas fa-check text-xs"></i> PASS
            </span>
        <?php else: ?>
            <span class="inline-flex items-center gap-1 px-2.5 py-0.5 rounded-full text-xs font-semibold bg-red-100 text-red-700">
                <i class="fas fa-times text-xs"></i> FAIL
            </span>
        <?php endif; ?>
    </td>

    
    <td class="px-4 py-3">
        <span class="text-sm text-gray-600"><?php echo e($result->passing_threshold); ?>%</span>
    </td>

    
    <td class="px-4 py-3">
        <span class="text-xs text-gray-500"><?php echo e($result->created_at->format('d M Y')); ?></span>
        <span class="text-xs text-gray-400 block"><?php echo e($result->created_at->format('H:i')); ?></span>
    </td>

    
    <td class="px-4 py-3">
        <div class="flex items-center gap-1">
            <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('view self-paced results')): ?>
            <a href="<?php echo e(route('self-paced.dashboard.results.show', $result)); ?>"
               title="View Details"
               class="w-7 h-7 flex items-center justify-center rounded-lg bg-indigo-50 hover:bg-indigo-100 text-indigo-600 transition">
                <i class="fas fa-eye text-xs"></i>
            </a>
            <?php endif; ?>
            <a href="<?php echo e(route('self-paced.dashboard.results.result-slip', $result)); ?>"
               title="Download Result Slip"
               class="w-7 h-7 flex items-center justify-center rounded-lg bg-teal-50 hover:bg-teal-100 text-teal-600 transition">
                <i class="fas fa-download text-xs"></i>
            </a>
        </div>
    </td>
</tr>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
<tr>
    <td colspan="8" class="px-6 py-16 text-center">
        <i class="fas fa-clipboard-list text-5xl text-gray-200 mb-4 block"></i>
        <p class="text-gray-400 font-medium">No results found</p>
        <p class="text-gray-300 text-sm mt-1">Try adjusting your search or filters.</p>
    </td>
</tr>
<?php endif; ?>
<?php /**PATH /home/www/sshia.org/sshia/resources/views/self-paced/dashboard/results/partials/table.blade.php ENDPATH**/ ?>