<div class="result-card-premium">
    <div class="result-header">
        <h5>
            <i class="bi bi-collection-fill text-danger"></i> Hasil Bulk Tracking
        </h5>
        <span class="badge bg-danger rounded-pill"><?php echo e(count($results)); ?> Resi</span>
    </div>

    <div class="table-responsive">
        <table class="table-custom">
            <thead>
                <tr>
                    <th width="5%" class="text-center">No</th>
                    <th width="15%">AWB / Date</th>
                    <th width="15%">Shipper</th>
                    <th width="15%">Consignee</th>
                    <th width="10%">Destination</th>
                    <th width="15%" class="text-center">Status</th>
                    <th width="10%">Ref No</th>
                    <th width="5%" class="text-center"></th> 
                </tr>
            </thead>
            <tbody>
                <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php $__currentLoopData = $results; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $index => $res): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                <tr class="main-row"> 
                    <td class="text-center text-muted"><?php echo e($index + 1); ?></td>
                    
                    <td>
                        <div style="font-weight: 700; color: #0554c6;"><?php echo e($res->awb); ?></div>
                        <div class="small text-muted mt-1">
                            <?php echo e($res->date ? \Carbon\Carbon::parse($res->date)->format('d/m/Y') : '-'); ?>

                        </div>
                    </td>
                    
                    <td><span class="d-block text-truncate" style="max-width: 150px; font-weight: 600;"><?php echo e($res->shipper); ?></span></td>
                    <td><span class="d-block text-truncate" style="max-width: 150px;"><?php echo e($res->consignee); ?></span></td>
                    <td><?php echo e($res->destination); ?></td>
                  
                    <td class="text-center">
                        <span class="badge <?php echo e($res->status == 'DELIVERED' ? 'bg-success' : 'bg-warning text-dark'); ?> px-3 py-1 rounded-pill">
                            <?php echo e($res->status); ?>

                        </span>
                        
                        <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($res->status == 'DELIVERED' && !empty($res->url_img)): ?>
                            <div class="mt-2">
                                <a href="<?php echo e(route('tracking.proof', ['secrets' => $res->url_img])); ?>" 
                                target="_blank" 
                                class="btn btn-sm btn-outline-success py-0 px-2 rounded-pill fw-bold" 
                                style="font-size: 0.65rem;"
                                onclick="event.stopPropagation()">
                                    <i class="bi bi-camera-fill me-1"></i> BUKTI
                                </a>
                            </div>
                        <?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
                    </td>
                                        
                    <td class="text-muted small"><?php echo e($res->ref_number); ?></td>
                    
                    <td class="text-center">
                        <div class="toggle-icon">
                            <i class="bi bi-chevron-down"></i>
                        </div>
                    </td>
                </tr>

                <!-- Detail Row -->
                <tr class="tracking-detail-row" style="display: none;">
                    <td colspan="9" class="p-0 border-0">
                        <div class="detail-wrapper" style="border-left-color: #ef4444;"> <!-- Aksen Merah utk Bulk -->
                             <?php echo $__env->make('partials.tracking_detail', ['history' => $res->history, 'status' => $res->status], array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?>
                        </div>
                    </td>
                </tr>
                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
            </tbody>
        </table>
    </div>
</div><?php /**PATH /var/www/html/resources/views/partials/result_bulk.blade.php ENDPATH**/ ?>