<?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@300;400;500;600;700&display=swap');
            .dash-header-title {
                font-family: 'DM Sans', sans-serif;
                font-weight: 500;
                font-size: 1.6rem;
                letter-spacing: 0.02em;
                color: #0f0f0f;
            }
        </style>
        <h2 class="dash-header-title">Daftar Pesanan</h2>
     <?php $__env->endSlot(); ?>

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

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

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

        /* ── ALERT ── */
        .kurir-list-alert {
            padding: 14px 24px;
            margin-bottom: 28px;
            font-family: 'DM Sans', sans-serif;
            font-size: 0.8rem;
            font-weight: 400;
            border-left: 3px solid;
            background: #fff;
            border: 1px solid #ebebeb;
            border-left-width: 3px;
        }
        .kurir-list-alert-success { border-left-color: #0f0f0f; color: #0f0f0f; }

        /* ── TABS ── */
        .kurir-list-tabs {
            display: flex;
            gap: 1px;
            background: #ebebeb;
            border: 1px solid #ebebeb;
            border-radius: 3px;
            overflow: hidden;
            margin-bottom: 32px;
        }
        .kurir-list-tab {
            flex: 1;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 10px;
            padding: 14px 24px;
            background: #fff;
            font-family: 'DM Sans', sans-serif;
            font-size: 0.7rem;
            font-weight: 600;
            letter-spacing: 0.1em;
            text-transform: uppercase;
            text-decoration: none;
            color: #aaa;
            transition: all 0.2s;
            position: relative;
        }
        .kurir-list-tab.active {
            color: #0f0f0f;
            background: #fff;
        }
        .kurir-list-tab.active::after {
            content: '';
            position: absolute;
            bottom: 0;
            left: 0;
            right: 0;
            height: 2px;
            background: #0f0f0f;
        }
        .kurir-list-tab:hover:not(.active) {
            color: #555;
            background: #fafafa;
        }
        .kurir-list-tab-badge {
            font-family: 'DM Sans', sans-serif;
            font-size: 0.65rem;
            font-weight: 600;
            color: #bbb;
        }
        .kurir-list-tab.active .kurir-list-tab-badge {
            color: #0f0f0f;
        }

        /* ── CARD ── */
        .kurir-list-card {
            background: #fff;
            border: 1px solid #ebebeb;
            border-radius: 3px;
            overflow: hidden;
        }

        /* ── ORDER ROW ── */
        .kurir-list-row {
            padding: 24px 28px;
            border-bottom: 1px solid #f0f0f0;
            transition: background 0.15s;
        }
        .kurir-list-row:last-child { border-bottom: none; }
        .kurir-list-row:hover { background: #fafafa; }

        .kurir-list-row-inner {
            display: flex;
            align-items: flex-start;
            justify-content: space-between;
            gap: 24px;
            flex-wrap: wrap;
        }

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

        .kurir-list-date {
            font-family: 'DM Sans', sans-serif;
            font-size: 0.7rem;
            font-weight: 400;
            color: #999;
            margin-top: 4px;
        }

        .kurir-list-address {
            font-family: 'DM Sans', sans-serif;
            font-size: 0.75rem;
            font-weight: 400;
            color: #666;
            line-height: 1.6;
            margin-top: 10px;
        }
        .kurir-list-address strong {
            color: #1a1a1a;
            font-weight: 600;
        }

        /* ── BADGES ── */
        .kurir-list-badge {
            display: inline-block;
            padding: 5px 14px;
            font-family: 'DM Sans', sans-serif;
            font-size: 0.65rem;
            font-weight: 600;
            letter-spacing: 0.05em;
            text-transform: uppercase;
            border-radius: 2px;
            margin-top: 10px;
        }
        .kurir-list-badge-assigned {
            background: #fafafa;
            color: #aaa;
        }
        .kurir-list-badge-picked_up {
            background: #f0f0f0;
            color: #555;
        }
        .kurir-list-badge-delivered {
            background: #e8f5e9;
            color: #2e7d32;
        }

        .kurir-list-resi {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            margin-left: 10px;
            font-family: 'DM Sans', sans-serif;
            font-size: 0.65rem;
            font-weight: 500;
            color: #666;
            background: #fafafa;
            border: 1px solid #ebebeb;
            padding: 4px 12px;
            border-radius: 2px;
        }

        /* ── ACTION BUTTON ── */
        .kurir-list-detail-btn {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            font-family: 'DM Sans', sans-serif;
            font-size: 0.7rem;
            font-weight: 600;
            letter-spacing: 0.08em;
            text-transform: uppercase;
            color: #999;
            text-decoration: none;
            padding-bottom: 2px;
            border-bottom: 1px solid transparent;
            transition: color 0.2s, border-color 0.2s;
            flex-shrink: 0;
        }
        .kurir-list-detail-btn:hover {
            color: #0f0f0f;
            border-bottom-color: #0f0f0f;
        }

        /* ── EMPTY STATE ── */
        .kurir-list-empty {
            padding: 80px 32px;
            text-align: center;
        }
        .kurir-list-empty-title {
            font-family: 'DM Sans', sans-serif;
            font-size: 1rem;
            font-weight: 500;
            color: #ccc;
            margin-bottom: 8px;
        }
        .kurir-list-empty-desc {
            font-family: 'DM Sans', sans-serif;
            font-size: 0.75rem;
            font-weight: 400;
            color: #ddd;
        }

        /* ── PAGINATION ── */
        .kurir-list-pagination {
            margin-top: 28px;
        }

        /* Responsive */
        @media (max-width: 768px) {
            .kurir-list-inner {
                padding: 24px 16px;
            }
            .kurir-list-row {
                padding: 18px 20px;
            }
            .kurir-list-row-inner {
                flex-direction: column;
            }
            .kurir-list-detail-btn {
                align-self: flex-end;
            }
        }
    </style>

    <div class="kurir-list-wrap">
        <div class="kurir-list-inner">

            
            <?php if(session('success')): ?>
                <div class="kurir-list-alert kurir-list-alert-success"><?php echo e(session('success')); ?></div>
            <?php endif; ?>

            
            <div class="kurir-list-tabs">
                <a href="<?php echo e(route('kurir.orders.index', ['status'=>'aktif'])); ?>"
                   class="kurir-list-tab <?php echo e($activeTab === 'aktif' ? 'active' : ''); ?>">
                    Aktif
                    <?php if($counts['aktif'] > 0): ?>
                        <span class="kurir-list-tab-badge"><?php echo e($counts['aktif']); ?></span>
                    <?php endif; ?>
                </a>
                <a href="<?php echo e(route('kurir.orders.index', ['status'=>'selesai'])); ?>"
                   class="kurir-list-tab <?php echo e($activeTab === 'selesai' ? 'active' : ''); ?>">
                    Selesai
                    <?php if($counts['selesai'] > 0): ?>
                        <span class="kurir-list-tab-badge"><?php echo e($counts['selesai']); ?></span>
                    <?php endif; ?>
                </a>
            </div>

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

                            </a>
                            <div class="kurir-list-date"><?php echo e($order->created_at->format('d M Y, H:i')); ?> WIB</div>
                            <div class="kurir-list-address">
                                <strong><?php echo e($order->recipient_name); ?></strong> · <?php echo e($order->recipient_phone); ?><br>
                                <?php echo e($order->address_detail ?? $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-list-badge kurir-list-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 Perjalanan
                                    <?php elseif($order->courier_task_status === 'delivered'): ?> Terkirim
                                    <?php endif; ?>
                                </span>
                                <?php if($order->tracking_number): ?>
                                    <span class="kurir-list-resi">
                                        📦 <?php echo e($order->tracking_number); ?>

                                    </span>
                                <?php endif; ?>
                            </div>
                        </div>
                        <div>
                            <a href="<?php echo e(route('kurir.orders.show', $order->id)); ?>" class="kurir-list-detail-btn">
                                Detail →
                            </a>
                        </div>
                    </div>
                </div>
                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
                <div class="kurir-list-empty">
                    <div class="kurir-list-empty-title">
                        <?php if($activeTab === 'aktif'): ?> Tidak ada pesanan aktif
                        <?php else: ?> Belum ada pengiriman selesai
                        <?php endif; ?>
                    </div>
                    <div class="kurir-list-empty-desc">
                        <?php if($activeTab === 'aktif'): ?> Hubungi admin jika ada pesanan yang belum ditugaskan
                        <?php else: ?> Pesanan yang sudah selesai akan muncul di sini
                        <?php endif; ?>
                    </div>
                </div>
                <?php endif; ?>
            </div>

            
            <?php if($orders->hasPages()): ?>
                <div class="kurir-list-pagination">
                    <?php echo e($orders->links()); ?>

                </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_app\resources\views/kurir/orders/index.blade.php ENDPATH**/ ?>