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

<?php $__env->startSection('content'); ?>
<div class="p-6">
    <!-- Header -->
    <div class="mb-8">
        <h1 class="text-3xl font-bold text-white mb-2 font-display text-glow">Dashboard</h1>
        <p class="text-gray-300 font-body">Welcome to the NRT SA Admin Panel</p>
    </div>

    <!-- Statistics Cards -->
    <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6 mb-8">
        <div class="glass-card p-6 rounded-xl floating-card">
            <div class="flex items-center">
                <div class="icon-bg w-12 h-12 rounded-full flex items-center justify-center mr-4">
                    <i class="fas fa-car text-white"></i>
                </div>
                <div>
                    <p class="text-gray-300 text-sm font-body">Total Vehicles</p>
                    <p class="text-2xl font-bold text-white font-display"><?php echo e($stats['total_vehicles']); ?></p>
                </div>
            </div>
        </div>

        <div class="glass-card p-6 rounded-xl floating-card" style="animation-delay: 0.5s;">
            <div class="flex items-center">
                <div class="icon-bg w-12 h-12 rounded-full flex items-center justify-center mr-4">
                    <i class="fas fa-calendar-check text-white"></i>
                </div>
                <div>
                    <p class="text-gray-300 text-sm font-body">Total Bookings</p>
                    <p class="text-2xl font-bold text-white font-display"><?php echo e($stats['total_bookings']); ?></p>
                </div>
            </div>
        </div>

        <div class="glass-card p-6 rounded-xl floating-card" style="animation-delay: 1s;">
            <div class="flex items-center">
                <div class="icon-bg w-12 h-12 rounded-full flex items-center justify-center mr-4">
                    <i class="fas fa-clock text-white"></i>
                </div>
                <div>
                    <p class="text-gray-300 text-sm font-body">Pending Bookings</p>
                    <p class="text-2xl font-bold text-white font-display"><?php echo e($stats['pending_bookings']); ?></p>
                </div>
            </div>
        </div>

        <div class="glass-card p-6 rounded-xl floating-card" style="animation-delay: 1.5s;">
            <div class="flex items-center">
                <div class="icon-bg w-12 h-12 rounded-full flex items-center justify-center mr-4">
                    <i class="fas fa-star text-white"></i>
                </div>
                <div>
                    <p class="text-gray-300 text-sm font-body">Featured Testimonials</p>
                    <p class="text-2xl font-bold text-white font-display"><?php echo e($stats['featured_testimonials']); ?></p>
                </div>
            </div>
        </div>
    </div>

    <!-- Recent Bookings -->
    <div class="glass-card p-6 rounded-xl mb-8">
        <div class="flex items-center justify-between mb-6">
            <h2 class="text-xl font-bold text-white font-display text-glow">Recent Bookings</h2>
            <a href="<?php echo e(route('admin.bookings.index')); ?>" class="btn-primary">
                <i class="fas fa-eye"></i>
                <span>View All</span>
            </a>
        </div>

        <div class="overflow-x-auto">
            <table class="w-full text-left">
                <thead>
                    <tr class="border-b border-gray-700">
                        <th class="py-3 px-4 text-gray-300 font-body">Customer</th>
                        <th class="py-3 px-4 text-gray-300 font-body">Vehicle</th>
                        <th class="py-3 px-4 text-gray-300 font-body">Date</th>
                        <th class="py-3 px-4 text-gray-300 font-body">Status</th>
                        <th class="py-3 px-4 text-gray-300 font-body">Actions</th>
                    </tr>
                </thead>
                <tbody>
                    <?php $__empty_1 = true; $__currentLoopData = $recent_bookings; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $booking): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
                    <tr class="border-b border-gray-800">
                        <td class="py-3 px-4">
                            <div>
                                <p class="text-white font-body"><?php echo e($booking->name); ?></p>
                                <p class="text-gray-400 text-sm font-body"><?php echo e($booking->email); ?></p>
                            </div>
                        </td>
                        <td class="py-3 px-4 text-gray-300 font-body"><?php echo e($booking->vehicle->name ?? 'N/A'); ?></td>
                        <td class="py-3 px-4 text-gray-300 font-body"><?php echo e($booking->pickup_date->format('M d, Y')); ?></td>
                        <td class="py-3 px-4">
                            <span class="px-2 py-1 rounded-full text-xs font-body
                                <?php if($booking->status === 'pending'): ?> bg-yellow-100 text-yellow-800
                                <?php elseif($booking->status === 'confirmed'): ?> bg-green-100 text-green-800
                                <?php elseif($booking->status === 'completed'): ?> bg-blue-100 text-blue-800
                                <?php else: ?> bg-red-100 text-red-800
                                <?php endif; ?>">
                                <?php echo e(ucfirst($booking->status)); ?>

                            </span>
                        </td>
                        <td class="py-3 px-4">
                            <a href="<?php echo e(route('admin.bookings.show', $booking)); ?>" class="text-blue-400 hover:text-blue-300 mr-3">
                                <i class="fas fa-eye"></i>
                            </a>
                            <a href="<?php echo e(route('admin.bookings.edit', $booking)); ?>" class="text-green-400 hover:text-green-300">
                                <i class="fas fa-edit"></i>
                            </a>
                        </td>
                    </tr>
                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
                    <tr>
                        <td colspan="5" class="py-8 text-center text-gray-400 font-body">No recent bookings</td>
                    </tr>
                    <?php endif; ?>
                </tbody>
            </table>
        </div>
    </div>

    <!-- Quick Actions -->
    <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6">
        <div class="glass-card p-6 rounded-xl floating-card">
            <div class="text-center">
                <div class="icon-bg w-16 h-16 rounded-full flex items-center justify-center mx-auto mb-4">
                    <i class="fas fa-car text-2xl text-white"></i>
                </div>
                <h3 class="text-lg font-semibold text-white mb-2 font-display text-glow">Manage Fleet</h3>
                <p class="text-gray-300 mb-4 font-body">Add, edit, or remove vehicles from your fleet</p>
                <a href="<?php echo e(route('admin.fleet.index')); ?>" class="btn-primary w-full justify-center">
                    <i class="fas fa-cog"></i>
                    <span>Manage Fleet</span>
                </a>
            </div>
        </div>

        <div class="glass-card p-6 rounded-xl floating-card" style="animation-delay: 0.5s;">
            <div class="text-center">
                <div class="icon-bg w-16 h-16 rounded-full flex items-center justify-center mx-auto mb-4">
                    <i class="fas fa-calendar-check text-2xl text-white"></i>
                </div>
                <h3 class="text-lg font-semibold text-white mb-2 font-display text-glow">View Bookings</h3>
                <p class="text-gray-300 mb-4 font-body">Manage and update booking statuses</p>
                <a href="<?php echo e(route('admin.bookings.index')); ?>" class="btn-primary w-full justify-center">
                    <i class="fas fa-list"></i>
                    <span>View Bookings</span>
                </a>
            </div>
        </div>

        <div class="glass-card p-6 rounded-xl floating-card" style="animation-delay: 1s;">
            <div class="text-center">
                <div class="icon-bg w-16 h-16 rounded-full flex items-center justify-center mx-auto mb-4">
                    <i class="fas fa-envelope text-2xl text-white"></i>
                </div>
                <h3 class="text-lg font-semibold text-white mb-2 font-display text-glow">Messages</h3>
                <p class="text-gray-300 mb-4 font-body">View and respond to contact form messages</p>
                <a href="<?php echo e(route('admin.messages.index')); ?>" class="btn-primary w-full justify-center">
                    <i class="fas fa-inbox"></i>
                    <span>View Messages</span>
                </a>
            </div>
        </div>
    </div>
</div>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('admin.layouts.app', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH C:\xampp\htdocs\nrt\resources\views/admin/dashboard.blade.php ENDPATH**/ ?>