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

<?php $__env->startSection('content'); ?>
<section class="mx-auto max-w-5xl px-4 py-10 sm:px-6">
    <?php echo $__env->make('account.partials.nav', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?>

    <div class="grid grid-cols-2 gap-3 sm:grid-cols-4">
        <div class="rounded-2xl bg-gradient-to-br from-violet-600 to-indigo-700 p-4 text-white">
            <p class="text-xs font-semibold uppercase text-indigo-200">Reward points</p>
            <p class="mt-1 text-2xl font-extrabold"><?php echo e($customer->reward_points); ?></p>
        </div>
        <div class="rounded-2xl bg-white p-4 shadow-sm ring-1 ring-slate-200">
            <p class="text-xs font-bold uppercase text-slate-400">Membership</p>
            <p class="mt-1 text-lg font-extrabold <?php echo e($membership ? '' : 'text-slate-300'); ?>" style="<?php echo e($membership ? 'color: ' . $membership->plan->color : ''); ?>"><?php echo e($membership->plan->name ?? 'None yet'); ?></p>
        </div>
        <div class="rounded-2xl bg-white p-4 shadow-sm ring-1 ring-slate-200">
            <p class="text-xs font-bold uppercase text-slate-400">Total stays</p>
            <p class="mt-1 text-2xl font-extrabold text-slate-900"><?php echo e($customer->bookings()->count()); ?></p>
        </div>
        <div class="rounded-2xl bg-white p-4 shadow-sm ring-1 ring-slate-200">
            <p class="text-xs font-bold uppercase text-slate-400">Referral code</p>
            <p class="mt-1 font-mono text-lg font-extrabold text-gold-600"><?php echo e(auth()->user()->referral_code ?? '—'); ?></p>
        </div>
    </div>

    <div class="mt-6 grid gap-5 md:grid-cols-2">
        <div class="rounded-3xl bg-white p-6 shadow-sm ring-1 ring-slate-200">
            <div class="mb-3 flex items-center justify-between">
                <h2 class="font-bold text-slate-900">Upcoming stays</h2>
                <a href="<?php echo e(route('site.book')); ?>" class="text-xs font-bold text-gold-600 hover:underline">Book new →</a>
            </div>
            <?php $__empty_1 = true; $__currentLoopData = $upcoming; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $booking): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
                <div class="mb-2 rounded-2xl bg-stone-50 p-4">
                    <div class="flex items-center justify-between">
                        <p class="font-bold text-slate-800"><?php echo e($booking->roomType->name ?? 'Room'); ?></p>
                        <span class="rounded-full bg-sky-100 px-2 py-0.5 text-[10px] font-bold uppercase text-sky-700"><?php echo e($booking->status); ?></span>
                    </div>
                    <p class="mt-1 text-xs text-slate-500"><?php echo e($booking->check_in->format('D j M')); ?> → <?php echo e($booking->check_out->format('D j M Y')); ?> · <?php echo e($booking->code); ?></p>
                </div>
            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
                <p class="rounded-2xl bg-stone-50 py-8 text-center text-sm text-slate-400">No upcoming stays — treat yourself! 🛏</p>
            <?php endif; ?>
        </div>

        <div class="rounded-3xl bg-white p-6 shadow-sm ring-1 ring-slate-200">
            <div class="mb-3 flex items-center justify-between">
                <h2 class="font-bold text-slate-900">Recent orders</h2>
                <a href="<?php echo e(route('site.order')); ?>" class="text-xs font-bold text-gold-600 hover:underline">Order food →</a>
            </div>
            <?php $__empty_1 = true; $__currentLoopData = $recentOrders; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $order): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
                <div class="mb-2 flex items-center justify-between rounded-2xl bg-stone-50 p-4">
                    <div>
                        <p class="font-mono text-xs font-bold text-slate-500"><?php echo e($order->code); ?></p>
                        <p class="text-xs text-slate-400"><?php echo e($order->created_at->format('j M Y')); ?></p>
                    </div>
                    <p class="font-extrabold text-slate-900"><?php echo e($CUR ?? '₦') . number_format((float) ($order->total), 2); ?></p>
                </div>
            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
                <p class="rounded-2xl bg-stone-50 py-8 text-center text-sm text-slate-400">No orders yet — the jollof is calling. 🍽</p>
            <?php endif; ?>
        </div>
    </div>
</section>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('layouts.site', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH C:\wamp64\www\hms\resources\views/account/dashboard.blade.php ENDPATH**/ ?>