<?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([]); ?>
     <?php $__env->slot('header', null, []); ?> 
        <style>
            @import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700;800;900&display=swap');
            .dash-header-title {
                font-family: 'DM Sans', sans-serif;
                font-weight: 900;
                font-size: 1.8rem;
                letter-spacing: 0.02em;
                color: #0a0a0a;
            }
        </style>
        <h2 class="dash-header-title">Dashboard Kurir</h2>
     <?php $__env->endSlot(); ?>

    <style>
        @import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700;800;900&display=swap');

        * {
            font-family: 'DM Sans', sans-serif;
        }

        .kurir-wrap { 
            font-family: 'DM Sans', sans-serif; 
            background: #f8f9fc; 
            min-height: 100vh; 
        }
        .kurir-inner { 
            max-width: 1400px; 
            margin: 0 auto; 
            padding: 40px 32px; 
        }

        /* ── GREETING ── */
        .kurir-greeting {
            background: #fff;
            border: 1px solid #eef2f6;
            border-radius: 16px;
            padding: 28px 32px;
            margin-bottom: 32px;
            box-shadow: 0 1px 2px rgba(0,0,0,0.02);
        }
        .kurir-greeting-name {
            font-family: 'DM Sans', sans-serif;
            font-size: 1.6rem;
            font-weight: 800;
            color: #0a0c10;
            letter-spacing: -0.01em;
            margin-bottom: 6px;
        }
        .kurir-greeting-date {
            font-family: 'DM Sans', sans-serif;
            font-size: 0.85rem;
            font-weight: 500;
            color: #6c757d;
        }

        /* ── QUICK ACTION BANNER ── */
        .kurir-quick {
            background: #ffffff;
            border: 1px solid #eef2f6;
            border-radius: 16px;
            padding: 24px 32px;
            margin-bottom: 32px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            flex-wrap: wrap;
            gap: 20px;
            box-shadow: 0 1px 3px rgba(0,0,0,0.03);
        }
        .kurir-quick-title {
            font-family: 'DM Sans', sans-serif;
            font-size: 1.1rem;
            font-weight: 800;
            color: #0a0c10;
            margin-bottom: 6px;
        }
        .kurir-quick-desc {
            font-family: 'DM Sans', sans-serif;
            font-size: 0.85rem;
            font-weight: 500;
            color: #5b677b;
        }
        .kurir-quick-btn {
            display: inline-block;
            background: #0f172a;
            color: white;
            font-family: 'DM Sans', sans-serif;
            font-size: 0.8rem;
            font-weight: 700;
            letter-spacing: 0.01em;
            text-transform: none;
            text-decoration: none;
            padding: 12px 28px;
            border-radius: 40px;
            transition: all 0.2s ease;
            box-shadow: 0 1px 2px rgba(0,0,0,0.05);
        }
        .kurir-quick-btn:hover { 
            background: #1e293b;
            transform: translateY(-1px);
        }

        /* ── STATS GRID ── */
        .kurir-stats {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
            gap: 20px;
            margin-bottom: 48px;
        }
        .kurir-stat-card {
            background: #ffffff;
            border-radius: 20px;
            padding: 28px 24px;
            border: 1px solid #eef2f6;
            transition: all 0.2s;
            box-shadow: 0 1px 2px rgba(0,0,0,0.02);
        }
        .kurir-stat-card:hover {
            border-color: #dce3ec;
            box-shadow: 0 8px 20px rgba(0,0,0,0.03);
        }
        .kurir-stat-label {
            font-family: 'DM Sans', sans-serif;
            font-size: 0.75rem;
            font-weight: 700;
            letter-spacing: 0.04em;
            text-transform: uppercase;
            color: #5b677b;
            margin-bottom: 12px;
        }
        .kurir-stat-value {
            font-family: 'DM Sans', sans-serif;
            font-size: 2.5rem;
            font-weight: 800;
            color: #0a0c10;
            letter-spacing: -0.02em;
            line-height: 1.2;
        }

        /* ── SECTION ── */
        .kurir-section {
            margin-bottom: 48px;
        }
        .kurir-section-title {
            font-family: 'DM Sans', sans-serif;
            font-size: 1.25rem;
            font-weight: 700;
            color: #0a0c10;
            letter-spacing: -0.01em;
            margin-bottom: 20px;
            padding-bottom: 8px;
            border-bottom: 2px solid #eef2f6;
        }

        /* ── CARDS ── */
        .kurir-card {
            background: #fff;
            border: 1px solid #eef2f6;
            border-radius: 20px;
            overflow: hidden;
            box-shadow: 0 1px 3px rgba(0,0,0,0.02);
        }

        /* ── ORDER ROW ── */
        .kurir-order {
            display: flex;
            align-items: flex-start;
            justify-content: space-between;
            padding: 24px 28px;
            border-bottom: 1px solid #f0f3f9;
            transition: background 0.2s;
            flex-wrap: wrap;
            gap: 20px;
        }
        .kurir-order:last-child { border-bottom: none; }
        .kurir-order:hover { background: #fafcff; }

        .kurir-order-number {
            font-family: 'DM Sans', sans-serif;
            font-size: 1rem;
            font-weight: 800;
            color: #0f172a;
            text-decoration: none;
            border-bottom: 1.5px solid transparent;
            transition: border-color 0.2s;
        }
        .kurir-order-number:hover { border-bottom-color: #0f172a; }

        .kurir-order-address {
            font-family: 'DM Sans', sans-serif;
            font-size: 0.85rem;
            font-weight: 500;
            color: #5b677b;
            margin-top: 8px;
            line-height: 1.5;
        }

        .kurir-badge {
            display: inline-block;
            padding: 6px 16px;
            font-family: 'DM Sans', sans-serif;
            font-size: 0.7rem;
            font-weight: 700;
            letter-spacing: 0.02em;
            text-transform: uppercase;
            border-radius: 40px;
            margin-top: 12px;
        }
        .kurir-badge-assigned {
            background: #f1f5f9;
            color: #334155;
        }
        .kurir-badge-picked_up {
            background: #eef2ff;
            color: #1e40af;
        }
        .kurir-badge-delivered {
            background: #e6f7ec;
            color: #15803d;
        }

        .kurir-order-date {
            font-family: 'DM Sans', sans-serif;
            font-size: 0.75rem;
            font-weight: 500;
            color: #7e8b9d;
            margin-top: 8px;
        }

        /* ── DETAIL BUTTON (BLACK, ROUNDED, NOT CHANGING ON CLICK) ── */
        .kurir-detail-link {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            font-family: 'DM Sans', sans-serif;
            font-size: 0.75rem;
            font-weight: 700;
            letter-spacing: 0.01em;
            text-transform: none;
            text-decoration: none;
            background: #0a0a0a;
            color: #ffffff;
            padding: 8px 20px;
            border-radius: 60px;
            transition: all 0.2s ease;
            flex-shrink: 0;
            border: none;
            cursor: pointer;
        }
        .kurir-detail-link:hover {
            background: #1a1a1a;
            transform: translateY(-1px);
        }
        /* Prevent any active/click styling changes */
        .kurir-detail-link:active {
            background: #0a0a0a;
            transform: translateY(0);
        }

        .kurir-view-all {
            padding: 20px 28px;
            border-top: 1px solid #eef2f6;
            background: #ffffff;
        }
        .kurir-view-all-link {
            font-family: 'DM Sans', sans-serif;
            font-size: 0.8rem;
            font-weight: 700;
            letter-spacing: 0.01em;
            text-transform: none;
            color: #3b4b66;
            text-decoration: none;
            display: inline-flex;
            align-items: center;
            gap: 8px;
            transition: color 0.2s;
            padding: 6px 0;
        }
        .kurir-view-all-link:hover {
            color: #0f172a;
        }

        /* ── EMPTY ── */
        .kurir-empty {
            padding: 60px 32px;
            text-align: center;
        }
        .kurir-empty-title {
            font-family: 'DM Sans', sans-serif;
            font-size: 1rem;
            font-weight: 700;
            color: #9aa4b8;
            margin-bottom: 8px;
        }
        .kurir-empty-desc {
            font-family: 'DM Sans', sans-serif;
            font-size: 0.85rem;
            font-weight: 500;
            color: #b9c1ce;
        }

        /* Responsive */
        @media (max-width: 768px) {
            .kurir-inner {
                padding: 24px 16px;
            }
            .kurir-order {
                flex-direction: column;
                align-items: flex-start;
            }
            .kurir-detail-link {
                align-self: flex-start;
                margin-top: 8px;
            }
            .kurir-stats {
                gap: 14px;
            }
            .kurir-stat-card {
                padding: 20px 18px;
            }
            .kurir-stat-value {
                font-size: 2rem;
            }
        }
    </style>

    <div class="kurir-wrap">
        <div class="kurir-inner">
            
            
            <?php if($stats['assigned'] + $stats['picked_up'] > 0): ?>
            <div class="kurir-quick">
                <div>
                    <div class="kurir-quick-title"><?php echo e($stats['assigned'] + $stats['picked_up']); ?> Pesanan Aktif</div>
                    <div class="kurir-quick-desc">
                        <?php if($stats['assigned'] > 0): ?> <?php echo e($stats['assigned']); ?> menunggu diambil <?php endif; ?>
                        <?php if($stats['assigned'] > 0 && $stats['picked_up'] > 0): ?> · <?php endif; ?>
                        <?php if($stats['picked_up'] > 0): ?> <?php echo e($stats['picked_up']); ?> dalam pengiriman <?php endif; ?>
                    </div>
                </div>
                <a href="<?php echo e(route('kurir.orders.index')); ?>" class="kurir-quick-btn">Lihat semua pesanan →</a>
            </div>
            <?php endif; ?>

            
            <div class="kurir-stats">
                <div class="kurir-stat-card">
                    <div class="kurir-stat-label">Total Tugas</div>
                    <div class="kurir-stat-value"><?php echo e($stats['total']); ?></div>
                </div>
                <div class="kurir-stat-card">
                    <div class="kurir-stat-label">Menunggu Pickup</div>
                    <div class="kurir-stat-value"><?php echo e($stats['assigned']); ?></div>
                </div>
                <div class="kurir-stat-card">
                    <div class="kurir-stat-label">Dalam Pengiriman</div>
                    <div class="kurir-stat-value"><?php echo e($stats['picked_up']); ?></div>
                </div>
                <div class="kurir-stat-card">
                    <div class="kurir-stat-label">Terkirim</div>
                    <div class="kurir-stat-value"><?php echo e($stats['delivered']); ?></div>
                </div>
            </div>

            
            <div class="kurir-section">
                <div class="kurir-section-title">Pesanan Aktif Saat Ini</div>
                <div class="kurir-card">
                    <?php $__empty_1 = true; $__currentLoopData = $activeOrders; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $order): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
                    <div class="kurir-order">
                        <div style="flex: 1;">
                            <a href="<?php echo e(route('kurir.orders.show', $order->id)); ?>" class="kurir-order-number">
                                #<?php echo e($order->order_number); ?>

                            </a>
                            <div class="kurir-order-address">
                                <?php echo e($order->recipient_name); ?> — <?php echo e($order->shipping_address); ?><br>
                                <?php echo e($order->village ?? ''); ?>, <?php echo e($order->district ?? '-'); ?>, <?php echo e($order->city ?? '-'); ?>, <?php echo e($order->province ?? '-'); ?>

                            </div>
                            <div>
                                <span class="kurir-badge kurir-badge-<?php echo e($order->courier_task_status); ?>">
                                    <?php if($order->courier_task_status === 'assigned'): ?> Perlu Diambil
                                    <?php elseif($order->courier_task_status === 'picked_up'): ?> Dalam Pengiriman
                                    <?php elseif($order->courier_task_status === 'delivered'): ?> Terkirim
                                    <?php endif; ?>
                                </span>
                            </div>
                        </div>
                        <a href="<?php echo e(route('kurir.orders.show', $order->id)); ?>" class="kurir-detail-link">
                            Detail →
                        </a>
                    </div>
                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
                    <div class="kurir-empty">
                        <div class="kurir-empty-title">Tidak ada pesanan aktif</div>
                        <div class="kurir-empty-desc">Semua pesanan sudah diproses</div>
                    </div>
                    <?php endif; ?>
                    <?php if($activeOrders->count() > 0): ?>
                    <div class="kurir-view-all">
                        <a href="<?php echo e(route('kurir.orders.index')); ?>" class="kurir-view-all-link">
                            Lihat semua pesanan aktif →
                        </a>
                    </div>
                    <?php endif; ?>
                </div>
            </div>

            
            <?php if($recentDelivered->count() > 0): ?>
            <div class="kurir-section">
                <div class="kurir-section-title">Pengiriman Selesai Terbaru</div>
                <div class="kurir-card">
                    <?php $__currentLoopData = $recentDelivered; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $order): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                    <div class="kurir-order">
                        <div style="flex: 1;">
                            <a href="<?php echo e(route('kurir.orders.show', $order->id)); ?>" class="kurir-order-number">
                                #<?php echo e($order->order_number); ?>

                            </a>
                            <div class="kurir-order-address">
                                <?php echo e($order->recipient_name); ?> — <?php echo e($order->shipping_address); ?><br>
                                <?php echo e($order->village ?? ''); ?>, <?php echo e($order->district ?? '-'); ?>, <?php echo e($order->city ?? '-'); ?>, <?php echo e($order->province ?? '-'); ?>

                            </div>
                            <?php if($order->delivered_at): ?>
                            <div class="kurir-order-date">
                                Terkirim: <?php echo e($order->delivered_at->format('d M Y, H:i')); ?> WIB
                            </div>
                            <?php endif; ?>
                        </div>
                        <a href="<?php echo e(route('kurir.orders.show', $order->id)); ?>" class="kurir-detail-link">
                            Detail
                        </a>
                    </div>
                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                    <div class="kurir-view-all">
                        <a href="<?php echo e(route('kurir.orders.index', ['status'=>'selesai'])); ?>" class="kurir-view-all-link">
                            Lihat semua pengiriman selesai
                        </a>
                    </div>
                </div>
            </div>
            <?php endif; ?>

        </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 C:\laragon\www\toko_pakaian\resources\views/kurir/dashboard.blade.php ENDPATH**/ ?>