<?php $__env->startSection('title', 'Dashboard'); ?>

<?php $__env->startSection('content'); ?>
<div class="space-y-8">
    <div>
        <h1 class="text-2xl font-bold text-gray-900">Welcome back, <?php echo e(auth()->user()->first_name); ?></h1>
        <p class="mt-1 text-sm text-gray-500">Here's an overview of your account.</p>
    </div>

    <?php if(!auth()->user()->hasVerifiedEmail()): ?>
    <div class="rounded-xl border border-orange-200 bg-orange-50 p-4 flex items-center gap-4">
        <div class="flex h-10 w-10 items-center justify-center rounded-lg bg-orange-100">
            <svg class="h-5 w-5 text-orange-600" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M21.75 6.75v10.5a2.25 2.25 0 01-2.25 2.25h-15a2.25 2.25 0 01-2.25-2.25V6.75m19.5 0A2.25 2.25 0 0019.5 4.5h-15a2.25 2.25 0 00-2.25 2.25m19.5 0v.243a2.25 2.25 0 01-1.07 1.916l-7.5 4.615a2.25 2.25 0 01-2.36 0L3.32 8.91a2.25 2.25 0 01-1.07-1.916V6.75" /></svg>
        </div>
        <div class="flex-1">
            <p class="text-sm font-semibold text-orange-900">Verify your email address</p>
            <p class="text-sm text-orange-700">We sent a verification link to <strong><?php echo e(auth()->user()->email); ?></strong>. Check your inbox.</p>
        </div>
        <form method="POST" action="<?php echo e(route('verification.verify', ['id' => auth()->id(), 'hash' => sha1(auth()->email)])); ?>">
            <?php echo csrf_field(); ?>
            <button type="submit" class="rounded-lg bg-orange-600 px-4 py-2 text-sm font-semibold text-white hover:bg-orange-700 transition">Resend</button>
        </form>
    </div>
    <?php endif; ?>

    
    <div class="grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-4">
        <div class="relative overflow-hidden rounded-xl bg-white px-6 py-5 shadow-sm border border-gray-100">
            <div class="flex items-center gap-x-4">
                <div class="flex h-12 w-12 items-center justify-center rounded-lg bg-green-50">
                    <svg class="h-6 w-6 text-green-500" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M21 12a2.25 2.25 0 00-2.25-2.25H15a3 3 0 11-6 0H5.25A2.25 2.25 0 003 12m18 0v6a2.25 2.25 0 01-2.25 2.25H5.25A2.25 2.25 0 013 18v-6m18 0V9M3 12V9m18 0a2.25 2.25 0 00-2.25-2.25H5.25A2.25 2.25 0 003 9m18 0V6a2.25 2.25 0 00-2.25-2.25H5.25A2.25 2.25 0 003 6v3" /></svg>
                </div>
                <div>
                    <p class="text-sm text-gray-500">Wallet Balance</p>
                    <p class="text-xl font-bold text-gray-900">₦<?php echo e(number_format($stats['balance'], 2)); ?></p>
                </div>
            </div>
            <a href="<?php echo e(route('wallet.index')); ?>" class="mt-4 block text-sm font-medium text-green-950 hover:text-green-700">Fund Wallet &rarr;</a>
        </div>

        <div class="relative overflow-hidden rounded-xl bg-white px-6 py-5 shadow-sm border border-gray-100">
            <div class="flex items-center gap-x-4">
                <div class="flex h-12 w-12 items-center justify-center rounded-lg bg-blue-50">
                    <svg class="h-6 w-6 text-blue-500" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M2.25 18.75a60.07 60.07 0 0115.797 2.101c.727.198 1.453-.342 1.453-1.096V18.75M3.75 4.5v.75A.75.75 0 013 6h-.75m0 0v-.375c0-.621.504-1.125 1.125-1.125H20.25M2.25 6v9m18-10.5v.75c0 .414.336.75.75.75h.75m-1.5-1.5h.375c.621 0 1.125.504 1.125 1.125v9.75c0 .621-.504 1.125-1.125 1.125h-.375m1.5-1.5H21a.75.75 0 00-.75.75v.75m0 0H3.75m0 0h-.375a1.125 1.125 0 01-1.125-1.125V15m1.5 1.5v-.75A.75.75 0 003 15h-.75M15 10.5a3 3 0 11-6 0 3 3 0 016 0zm3 0h.008v.008H18V10.5zm-12 0h.008v.008H6V10.5z" /></svg>
                </div>
                <div>
                    <p class="text-sm text-gray-500">Total Funded</p>
                    <p class="text-xl font-bold text-gray-900">₦<?php echo e(number_format($stats['total_funded'], 2)); ?></p>
                </div>
            </div>
        </div>

        <div class="relative overflow-hidden rounded-xl bg-white px-6 py-5 shadow-sm border border-gray-100">
            <div class="flex items-center gap-x-4">
                <div class="flex h-12 w-12 items-center justify-center rounded-lg bg-orange-50">
                    <svg class="h-6 w-6 text-orange-500" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M2.25 18.75a60.07 60.07 0 0115.797 2.101c.727.198 1.453-.342 1.453-1.096V18.75M3.75 4.5v.75A.75.75 0 013 6h-.75m0 0v-.375c0-.621.504-1.125 1.125-1.125H20.25M2.25 6v9m18-10.5v.75c0 .414.336.75.75.75h.75m-1.5-1.5h.375c.621 0 1.125.504 1.125 1.125v9.75c0 .621-.504 1.125-1.125 1.125h-.375m1.5-1.5H21a.75.75 0 00-.75.75v.75m0 0H3.75m0 0h-.375a1.125 1.125 0 01-1.125-1.125V15m1.5 1.5v-.75A.75.75 0 003 15h-.75M15 10.5a3 3 0 11-6 0 3 3 0 016 0zm3 0h.008v.008H18V10.5zm-12 0h.008v.008H6V10.5z" /></svg>
                </div>
                <div>
                    <p class="text-sm text-gray-500">Total Spent</p>
                    <p class="text-xl font-bold text-gray-900">₦<?php echo e(number_format($stats['total_spent'], 2)); ?></p>
                </div>
            </div>
        </div>

        <div class="relative overflow-hidden rounded-xl bg-white px-6 py-5 shadow-sm border border-gray-100">
            <div class="flex items-center gap-x-4">
                <div class="flex h-12 w-12 items-center justify-center rounded-lg bg-purple-50">
                    <svg class="h-6 w-6 text-purple-500" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M9 12.75L11.25 15 15 9.75M21 12a9 9 0 11-18 0 9 9 0 0118 0z" /></svg>
                </div>
                <div>
                    <p class="text-sm text-gray-500">Transactions</p>
                    <p class="text-xl font-bold text-gray-900"><?php echo e($stats['successful_transactions']); ?></p>
                </div>
            </div>
        </div>
    </div>

    
    <div class="rounded-xl bg-white p-6 shadow-sm border border-gray-100">
        <h2 class="text-lg font-semibold text-gray-900 mb-4">Quick Actions</h2>
        <div class="grid grid-cols-2 gap-4 sm:grid-cols-5">
            <a href="<?php echo e(route('airtime.index')); ?>" class="flex flex-col items-center gap-2 rounded-lg border border-gray-200 p-4 hover:border-green-300 hover:bg-green-50 transition-colors">
                <div class="flex h-10 w-10 items-center justify-center rounded-lg bg-green-100">
                    <svg class="h-5 w-5 text-green-950" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M10.5 1.5H8.25A2.25 2.25 0 006 3.75v16.5a2.25 2.25 0 002.25 2.25h7.5A2.25 2.25 0 0018 20.25V3.75a2.25 2.25 0 00-2.25-2.25H13.5m-3 0V3h3V1.5m-3 0h3" /></svg>
                </div>
                <span class="text-xs font-medium text-gray-700">Airtime</span>
            </a>
            <a href="<?php echo e(route('data.index')); ?>" class="flex flex-col items-center gap-2 rounded-lg border border-gray-200 p-4 hover:border-green-300 hover:bg-green-50 transition-colors">
                <div class="flex h-10 w-10 items-center justify-center rounded-lg bg-blue-100">
                    <svg class="h-5 w-5 text-blue-600" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M5.25 14.25h13.5m-13.5 0a3 3 0 01-3-3m3 3a3 3 0 100 6h13.5a3 3 0 100-6m-16.5-3a3 3 0 013-3h13.5a3 3 0 013 3m-19.5 0a4.5 4.5 0 01.9-2.7L5.737 5.1a3.375 3.375 0 012.7-1.35h7.126c1.062 0 2.062.5 2.7 1.35l2.587 3.45a4.5 4.5 0 01.9 2.7m0 0a3 3 0 01-3 3m0 3h.008v.008h-.008v-.008zm0-6h.008v.008h-.008v-.008zm-3 6h.008v.008h-.008v-.008zm0-6h.008v.008h-.008v-.008z" /></svg>
                </div>
                <span class="text-xs font-medium text-gray-700">Data</span>
            </a>
            <a href="<?php echo e(route('cable.index')); ?>" class="flex flex-col items-center gap-2 rounded-lg border border-gray-200 p-4 hover:border-green-300 hover:bg-green-50 transition-colors">
                <div class="flex h-10 w-10 items-center justify-center rounded-lg bg-orange-100">
                    <svg class="h-5 w-5 text-orange-600" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M6 20.25h12m-7.5-3v3m3-3v3m-10.125-3h3.75a1.125 1.125 0 011.125 1.125v3.75c0 .621-.504 1.125-1.125 1.125h-3.75a1.125 1.125 0 01-1.125-1.125v-9.75a6 6 0 0112 0v3.75c0 .621-.504 1.125-1.125 1.125h-3.75a1.125 1.125 0 01-1.125-1.125V6.75m-7.5 12h3.75a1.125 1.125 0 001.125-1.125v-3.75a1.125 1.125 0 00-1.125-1.125H5.25a1.125 1.125 0 00-1.125 1.125v3.75c0 .621.504 1.125 1.125 1.125z" /></svg>
                </div>
                <span class="text-xs font-medium text-gray-700">Cable TV</span>
            </a>
            <a href="<?php echo e(route('electricity.index')); ?>" class="flex flex-col items-center gap-2 rounded-lg border border-gray-200 p-4 hover:border-green-300 hover:bg-green-50 transition-colors">
                <div class="flex h-10 w-10 items-center justify-center rounded-lg bg-yellow-100">
                    <svg class="h-5 w-5 text-yellow-600" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M3.75 13.5l10.5-11.25L12 10.5h8.25L9.75 21.75 12 13.5H3.75z" /></svg>
                </div>
                <span class="text-xs font-medium text-gray-700">Electricity</span>
            </a>
            <a href="<?php echo e(route('exampin.index')); ?>" class="flex flex-col items-center gap-2 rounded-lg border border-gray-200 p-4 hover:border-green-300 hover:bg-green-50 transition-colors">
                <div class="flex h-10 w-10 items-center justify-center rounded-lg bg-purple-100">
                    <svg class="h-5 w-5 text-purple-600" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M4.26 10.147a60.436 60.436 0 00-.491 6.347A48.627 48.627 0 0112 20.904a48.627 48.627 0 018.232-4.41 60.46 60.46 0 00-.491-6.347m-15.482 0a50.57 50.57 0 00-2.658-.813A59.905 59.905 0 0112 3.493a59.902 59.902 0 0110.399 5.84c-.896.248-1.783.52-2.658.814m-15.482 0A50.697 50.697 0 0112 13.489a50.702 50.702 0 017.74-3.342M6.75 15a.75.75 0 100-1.5.75.75 0 000 1.5zm0 0v-3.675A55.378 55.378 0 0112 8.443m-7.007 11.55A5.981 5.981 0 006.75 15.75v-1.5" /></svg>
                </div>
                <span class="text-xs font-medium text-gray-700">Exam PINs</span>
            </a>
        </div>
    </div>

    
    <div class="rounded-xl bg-white shadow-sm border border-gray-100 overflow-hidden">
        <div class="flex items-center justify-between px-6 py-4 border-b border-gray-100">
            <h2 class="text-lg font-semibold text-gray-900">Recent Transactions</h2>
            <a href="<?php echo e(route('transactions.index')); ?>" class="text-sm font-medium text-green-950 hover:text-green-700">View All &rarr;</a>
        </div>
        <div class="overflow-x-auto">
            <table class="min-w-full divide-y divide-gray-100">
                <thead class="bg-gray-50">
                    <tr>
                        <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Service</th>
                        <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Reference</th>
                        <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Amount</th>
                        <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Status</th>
                        <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Date</th>
                    </tr>
                </thead>
                <tbody class="divide-y divide-gray-50">
                    <?php $__empty_1 = true; $__currentLoopData = $recentTransactions; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $transaction): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
                    <tr class="hover:bg-gray-50">
                        <td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900"><?php echo e($transaction->description); ?></td>
                        <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500 font-mono"><?php echo e($transaction->reference); ?></td>
                        <td class="px-6 py-4 whitespace-nowrap text-sm font-semibold <?php echo e($transaction->type === 'credit' ? 'text-green-950' : 'text-red-600'); ?>">
                            <?php echo e($transaction->type === 'credit' ? '+' : '-'); ?>₦<?php echo e(number_format($transaction->amount, 2)); ?>

                        </td>
                        <td class="px-6 py-4 whitespace-nowrap">
                            <?php if($transaction->status === 'completed'): ?>
                                <span class="inline-flex items-center rounded-full bg-green-50 px-2 py-1 text-xs font-medium text-green-700 ring-1 ring-inset ring-green-950/20">Completed</span>
                            <?php elseif($transaction->status === 'pending'): ?>
                                <span class="inline-flex items-center rounded-full bg-yellow-50 px-2 py-1 text-xs font-medium text-yellow-700 ring-1 ring-inset ring-yellow-600/20">Pending</span>
                            <?php elseif($transaction->status === 'failed'): ?>
                                <span class="inline-flex items-center rounded-full bg-red-50 px-2 py-1 text-xs font-medium text-red-700 ring-1 ring-inset ring-red-600/20">Failed</span>
                            <?php else: ?>
                                <span class="inline-flex items-center rounded-full bg-gray-50 px-2 py-1 text-xs font-medium text-gray-700 ring-1 ring-inset ring-gray-600/20"><?php echo e(ucfirst($transaction->status)); ?></span>
                            <?php endif; ?>
                        </td>
                        <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500"><?php echo e($transaction->created_at->format('M d, Y H:i')); ?></td>
                    </tr>
                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
                    <tr>
                        <td colspan="5" class="px-6 py-12 text-center text-sm text-gray-500">No transactions yet. Start by making a purchase!</td>
                    </tr>
                    <?php endif; ?>
                </tbody>
            </table>
        </div>
    </div>
</div>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('layouts.app', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH /Users/xunna/Documents/software dev/laravel/clikzpay/resources/views/dashboard/index.blade.php ENDPATH**/ ?>