<?php $__env->startSection('title', 'Cartão Cliente'); ?>

<?php $__env->startSection('content'); ?>
<div class="relative z-10 w-full max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 pb-12">
    <header class="mb-8 flex flex-col md:flex-row md:items-end justify-between gap-6 pt-6">
        <div>
            <div class="flex items-center gap-3 mb-2">
                <span class="w-8 h-[2px] bg-brand"></span>
                <span class="font-bold text-[10px] uppercase tracking-[0.4em] text-brand">Recebidos</span>
            </div>
            <h1 class="text-4xl md:text-5xl font-bold italic tracking-tighter uppercase text-brand">CARTÃO CLIENTE</h1>
            <p class="text-slate-500 font-medium mt-1">Pedidos de cartão em fila de espera</p>
        </div>
    </header>

    <div class="bg-white border border-slate-100 rounded-2xl shadow-sm overflow-hidden">
        <div class="overflow-x-auto">
            <table class="w-full text-sm">
                <thead>
                    <tr class="border-b border-slate-100 bg-slate-50/80 text-left">
                        <th class="px-4 py-3.5 font-bold text-[10px] uppercase tracking-widest text-slate-400">Estado</th>
                        <th class="px-4 py-3.5 font-bold text-[10px] uppercase tracking-widest text-slate-400">Nome</th>
                        <th class="px-4 py-3.5 font-bold text-[10px] uppercase tracking-widest text-slate-400">Telefone</th>
                        <th class="px-4 py-3.5 font-bold text-[10px] uppercase tracking-widest text-slate-400">Loja</th>
                        <th class="px-4 py-3.5 font-bold text-[10px] uppercase tracking-widest text-slate-400">Data</th>
                        <th class="px-4 py-3.5 font-bold text-[10px] uppercase tracking-widest text-slate-400">Acções</th>
                    </tr>
                </thead>
                <tbody class="divide-y divide-slate-50">
                    <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::openLoop(); ?><?php endif; ?><?php $__empty_1 = true; $__currentLoopData = $requests; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $cardRequest): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::startLoopIteration(); ?><?php endif; ?>
                    <tr class="hover:bg-slate-50/50 transition-colors <?php echo e($cardRequest->status?->value === 'pending' ? 'bg-accent/[0.03]' : ''); ?>">
                        <td class="px-4 py-4">
                            <?php
                                $colors = [
                                    'pending' => 'bg-accent text-brand-900',
                                    'contacted' => 'bg-blue-50 text-blue-600',
                                    'collected' => 'bg-green-50 text-green-600',
                                    'cancelled' => 'bg-slate-50 text-slate-400',
                                ];
                            ?>
                            <span class="inline-block px-2.5 py-1 rounded-full text-[9px] font-bold uppercase tracking-wider <?php echo e($colors[$cardRequest->status?->value ?? 'pending'] ?? 'bg-slate-100 text-slate-500'); ?>">
                                <?php echo e($cardRequest->status?->label() ?? 'Fila de Espera'); ?>

                            </span>
                        </td>
                        <td class="px-4 py-4 font-semibold text-slate-800"><?php echo e($cardRequest->name); ?></td>
                        <td class="px-4 py-4 text-slate-500"><?php echo e($cardRequest->phone); ?></td>
                        <td class="px-4 py-4 text-slate-600 text-[11px] font-medium"><?php echo e($cardRequest->store?->name ?? '—'); ?></td>
                        <td class="px-4 py-4 text-slate-400 text-[11px] font-medium whitespace-nowrap"><?php echo e($cardRequest->created_at->format('d/m/Y H:i')); ?></td>
                        <td class="px-4 py-4">
                            <a href="<?php echo e(route('admin.card-requests.show', $cardRequest)); ?>" class="inline-flex items-center gap-1.5 text-[10px] font-bold uppercase tracking-widest text-brand hover:text-brand-700 transition">
                                <svg class="w-3.5 h-3.5" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M2.036 12.322a1.012 1.012 0 0 1 0-.639C3.423 7.51 7.36 4.5 12 4.5c4.638 0 8.573 3.007 9.963 7.178.07.207.07.431 0 .639C20.577 16.49 16.64 19.5 12 19.5c-4.638 0-8.573-3.007-9.963-7.178Z"/><path stroke-linecap="round" stroke-linejoin="round" d="M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z"/></svg>
                                Ver
                            </a>
                        </td>
                    </tr>
                    <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::endLoop(); ?><?php endif; ?><?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::closeLoop(); ?><?php endif; ?>
                    <tr>
                        <td colspan="6" class="px-4 py-12 text-center text-slate-400 text-sm">Nenhum pedido de cartão recebido.</td>
                    </tr>
                    <?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
                </tbody>
            </table>
        </div>
        <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($requests->hasPages()): ?>
        <div class="px-4 py-4 border-t border-slate-100">
            <?php echo e($requests->links()); ?>

        </div>
        <?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
    </div>
</div>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('layouts.admin', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH C:\Projetos\mangole_2\resources\views/admin/card-requests/index.blade.php ENDPATH**/ ?>