<?php if (isset($component)) { $__componentOriginal9ac128a9029c0e4701924bd2d73d7f54 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal9ac128a9029c0e4701924bd2d73d7f54 = $attributes; } ?>
<?php $component = App\View\Components\AppLayout::resolve([] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('app-layout'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
<?php $attributes = $attributes->except(\App\View\Components\AppLayout::ignoredParameterNames()); ?>
<?php endif; ?>
<?php $component->withAttributes([]); ?>
    <div class="space-y-6 p-2">
        <div class="flex flex-col md:flex-row md:items-center md:justify-between bg-white p-6 rounded-2xl border border-gray-100 shadow-sm gap-4">
                <div>
                    <h1 class="text-2xl font-black text-gray-800 tracking-tight">Selamat Datang Kembali, <?php echo e(auth()->user()->name); ?>!</h1>
                    <p class="text-sm text-gray-500 mt-1">Selamat datang kembali di sistem mitra Tempe Zhi.</p>
                </div>
                <div class="text-sm font-bold text-green-800 bg-green-50 px-4 py-2 rounded-xl border border-green-100 self-start md:self-auto">
                    <?php echo e(\Carbon\Carbon::now()->isoFormat('D MMMM YYYY')); ?>

                </div>
            </div>
            
        <div class="max-w-7xl mx-auto sm:px-6 lg:px-8">
            
            <div class="grid grid-cols-1 md:grid-cols-3 gap-6 mb-8">
                <div class="bg-white p-6 rounded-3xl border border-gray-100 shadow-sm">
                    <p class="text-gray-400 text-xs font-bold uppercase tracking-widest">Pesanan Aktif</p>
                    <h3 class="text-4xl font-black text-green-800 mt-2"><?php echo e($stats['aktif']); ?></h3>
                </div>
                <div class="bg-white p-6 rounded-3xl border border-gray-100 shadow-sm">
                    <p class="text-gray-400 text-xs font-bold uppercase tracking-widest">Total Transaksi</p>
                    <h3 class="text-4xl font-black text-gray-800 mt-2">Rp <?php echo e(number_format($stats['total_transaksi'], 0, ',', '.')); ?></h3>
                </div>
                <div class="bg-white p-6 rounded-3xl border border-gray-100 shadow-sm">
                    <p class="text-gray-400 text-xs font-bold uppercase tracking-widest">Total Pesanan Selesai</p>
                    <h3 class="text-4xl font-black text-green-800 mt-2"><?php echo e($stats['riwayat_count']); ?></h3>
                </div>
            </div>

            
            <div class="grid grid-cols-1 md:grid-cols-2 gap-6">
                <div class="bg-white p-8 rounded-3xl border border-gray-100 shadow-sm">
                    <h3 class="font-bold text-gray-800 mb-4">Aksi Cepat</h3>
                    <div class="flex flex-col gap-3">
                        <a href="<?php echo e(route('customer.pesanan.create')); ?>" class="w-full bg-green-800 text-center text-white px-6 py-3 rounded-xl font-bold hover:bg-green-700 transition">
                            Buat Pesanan Baru
                        </a>
                        <a href="<?php echo e(route('customer.pesanan.index')); ?>" class="w-full bg-gray-100 text-center text-gray-600 px-6 py-3 rounded-xl font-bold hover:bg-gray-200 transition">
                            Kelola Pesanan
                        </a>
                    </div>
                </div>

                
                <div class="bg-white p-8 rounded-3xl border border-gray-100 shadow-sm">
                    <h3 class="font-bold text-gray-800 mb-4">Aktivitas Terakhir</h3>
                    <?php if($latestOrder): ?>
                        <div class="flex items-center justify-between border-b border-gray-100 pb-4 mb-4">
                            <div>
                                <p class="text-sm font-bold text-gray-700"><?php echo e($latestOrder->kode_pesanan); ?></p>
                                <p class="text-xs text-gray-400"><?php echo e($latestOrder->created_at->diffForHumans()); ?></p>
                            </div>
                            <span class="px-3 py-1 bg-blue-100 text-blue-600 rounded-full text-xs font-bold uppercase"><?php echo e($latestOrder->status); ?></span>
                        </div>
                        <a href="<?php echo e(route('customer.pesanan.show', $latestOrder->id)); ?>" class="text-green-600 font-bold hover:underline">Lihat Detail →</a>
                    <?php else: ?>
                        <p class="text-gray-400 text-sm">Belum ada aktivitas pesanan.</p>
                    <?php endif; ?>
                </div>
            </div>
        </div>
    </div>
 <?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal9ac128a9029c0e4701924bd2d73d7f54)): ?>
<?php $attributes = $__attributesOriginal9ac128a9029c0e4701924bd2d73d7f54; ?>
<?php unset($__attributesOriginal9ac128a9029c0e4701924bd2d73d7f54); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal9ac128a9029c0e4701924bd2d73d7f54)): ?>
<?php $component = $__componentOriginal9ac128a9029c0e4701924bd2d73d7f54; ?>
<?php unset($__componentOriginal9ac128a9029c0e4701924bd2d73d7f54); ?>
<?php endif; ?><?php /**PATH D:\TempeZhi\resources\views/customer/dashboard.blade.php ENDPATH**/ ?>