<?php $__empty_1 = true; $__currentLoopData = $certificates; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $i => $certificate): $__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($certificates->firstItem() + $i); ?>

    </td>

    
    <td class="px-4 py-3">
        <span class="font-mono text-xs font-semibold text-purple-700 bg-purple-50 px-2 py-0.5 rounded">
            <?php echo e($certificate->certificate_number); ?>

        </span>
    </td>

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

            </span>
            <div>
                <p class="font-semibold text-gray-800 text-sm leading-tight"><?php echo e($certificate->user->name ?? '—'); ?></p>
                <p class="text-gray-400 text-xs mt-0.5"><?php echo e($certificate->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($certificate->course->title ?? '—'); ?></p>
    </td>

    
    <td class="px-4 py-3">
        <span class="text-xs text-gray-600"><?php echo e($certificate->issue_date?->format('d M Y') ?? '—'); ?></span>
    </td>

    
    <td class="px-4 py-3">
        <?php if($certificate->is_revoked): ?>
            <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-ban text-xs"></i> Revoked
            </span>
        <?php else: ?>
            <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-circle text-xs"></i> Valid
            </span>
        <?php endif; ?>
    </td>

    
    <td class="px-4 py-3">
        <span class="inline-flex items-center gap-1 text-xs font-semibold text-rose-600 bg-rose-50 px-2 py-0.5 rounded-full">
            <i class="fas fa-eye text-xs"></i> <?php echo e($certificate->verification_count); ?>

        </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('manage self-paced certificates')): ?>
            <a href="<?php echo e(route('self-paced.dashboard.certificates.show', $certificate)); ?>"
               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>
            <a href="<?php echo e(route('self-paced.dashboard.certificates.download', $certificate)); ?>"
               title="Download PDF"
               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>
            <?php if(!$certificate->is_revoked): ?>
            <button type="button"
                    title="Revoke Certificate"
                    @click="openRevokeModal(<?php echo e($certificate->id); ?>, '<?php echo e($certificate->certificate_number); ?>')"
                    class="w-7 h-7 flex items-center justify-center rounded-lg bg-red-50 hover:bg-red-100 text-red-500 transition">
                <i class="fas fa-ban text-xs"></i>
            </button>
            <?php endif; ?>
            <?php endif; ?>
        </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-certificate text-5xl text-gray-200 mb-4 block"></i>
        <p class="text-gray-400 font-medium">No certificates 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/certificates/partials/table.blade.php ENDPATH**/ ?>