<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title>Air Waybill - <?php echo e($globalSiteName); ?></title>
    <style>
        /* PDF-Compatible CSS */
        @page { 
            size: A4; 
            margin: 0; 
        }
        
        body {
            margin: 0; 
            padding: 10mm;
            font-family: Helvetica, Arial, sans-serif;
            font-size: 10pt;
            line-height: 1.3;
            color: #1e293b;
            background: #ffffff;
        }
        
        .page-container {
            width: 190mm;
            margin: 0 auto;
            position: relative;
            border: 1px solid #ccc;
        }
        
        .brand-header {
            border-bottom: 3px solid #ef6c00;
            padding-bottom: 10px;
            margin-bottom: 10px;
            overflow: hidden;
        }
        
        .logo-section {
            float: left;
            width: 60%;
        }
        
        .logo-icon {
            width: 40px;
            height: 40px;
            background: #0b2545;
            border-radius: 4px;
            display: inline-block;
            vertical-align: middle;
            text-align: center;
            line-height: 40px;
            color: white;
            font-weight: bold;
            margin-right: 10px;
        }
        
        .company-name {
            font-size: 16pt;
            font-weight: bold;
            color: #0b2545;
            text-transform: uppercase;
            display: inline-block;
            vertical-align: middle;
        }
        
        .company-sub {
            font-size: 8pt;
            color: #64748b;
            font-weight: 600;
            display: block;
        }
        
        .header-right {
            float: right;
            text-align: right;
            width: 35%;
        }
        
        .awb-number-huge {
            font-size: 18pt;
            font-weight: bold;
            color: #0b2545;
            font-family: 'Courier New', monospace;
        }
        
        .grid-table {
            width: 100%;
            border-collapse: collapse;
            margin-bottom: 5px;
        }
        
        .grid-cell {
            border: 1px solid #cbd5e1;
            vertical-align: top;
            padding: 0;
        }
        
        .field-label {
            font-size: 7pt;
            color: #64748b;
            text-transform: uppercase;
            font-weight: bold;
            padding: 4px 6px 0 6px;
            display: block;
            background: #f8fafc;
        }
        
        .field-value {
            font-size: 9pt;
            font-weight: 500;
            color: #1e293b;
            padding: 2px 6px 6px 6px;
            line-height: 1.3;
        }
        
        .field-value.large {
            font-size: 12pt;
            font-weight: bold;
            color: #0b2545;
        }
        
        .field-value.mono {
            font-family: 'Courier New', monospace;
        }
        
        .routing-section {
            background: #0b2545;
            color: white;
        }
        
        .routing-section .field-label {
            color: rgba(255,255,255,0.7);
            background: #0b2545;
        }
        
        .routing-section .field-value {
            color: white;
        }
        
        .cargo-header {
            background: #0b2545;
            color: white;
            font-size: 8pt;
            font-weight: bold;
            text-transform: uppercase;
            padding: 6px;
            text-align: center;
        }
        
        .cargo-table {
            width: 100%;
            border-collapse: collapse;
            margin-bottom: 5px;
        }
        
        .cargo-cell {
            border: 1px solid #cbd5e1;
            vertical-align: top;
            padding: 8px;
        }
        
        .item-line {
            margin-bottom: 8px;
            font-size: 9pt;
            border-bottom: 1px dashed #eee;
            padding-bottom: 6px;
        }
        
        .brand-footer {
            background: #0b2545;
            color: white;
            padding: 8px;
            margin-top: 10px;
            font-size: 7pt;
        }
        
        .footer-table {
            width: 100%;
            color: white;
        }
        
        .footer-cell {
            padding: 3px;
            vertical-align: top;
        }
        
        .footer-link {
            color: #ef6c00;
            text-decoration: none;
            font-weight: bold;
        }
        
        .legal-text {
            font-size: 7pt;
            color: #94a3b8;
            text-align: justify;
            margin-top: 8px;
            padding-bottom: 3px;
            line-height: 1.2;
        }
        
        .barcode-strip {
            height: 20px;
            width: 100%;
            margin: 5px 0;
            background-image: repeating-linear-gradient(90deg, #000 0, #000 1px, transparent 1px, transparent 3px);
        }
        
        .copy-stamp {
            position: absolute;
            bottom: 60px;
            right: 15px;
            font-size: 12pt;
            font-weight: bold;
            color: #cbd5e1;
            text-transform: uppercase;
            border: 2px solid #cbd5e1;
            padding: 3px 8px;
            border-radius: 4px;
            transform: rotate(-5deg);
        }
        
        .clear {
            clear: both;
        }
    </style>
</head>
<body>
    <div class="page-container">
        <!-- Header -->
        <div class="brand-header">
            <div class="logo-section">
                <div class="logo-icon">
                    <svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
                        <path d="M22 2L11 13"/><path d="M22 2L15 22L11 13L2 9L22 2Z"/>
                    </svg>
                </div>
                <div style="display: inline-block; vertical-align: middle;">
                    <div class="company-name"><?php echo e($globalSiteName); ?></div>
                    <div class="company-sub">Shipping & Logistics</div>
                </div>
            </div>
            <div class="header-right">
                <div style="font-size: 7pt; color: #666; text-transform: uppercase; font-weight: bold;">Air Waybill Number</div>
                <div class="awb-number-huge"><?php echo e($shipment->tracking_number); ?></div>
            </div>
            <div class="clear"></div>
        </div>

        <!-- Shipper and Consignee -->
        <table class="grid-table">
            <tr>
                <td class="grid-cell" width="50%">
                    <span class="field-label">Shipper Name & Address</span>
                    <div class="field-value">
                        <strong><?php echo e($shipment->sender_name); ?></strong><br>
                        <?php echo e($shipment->sender_address); ?>

                    </div>
                    <span class="field-label">Shipper Contact</span>
                    <div class="field-value mono"><?php echo e($shipment->sender_phone_number); ?> | <?php echo e($shipment->sender_email); ?></div>
                </td>
                <td class="grid-cell" width="50%">
                    <span class="field-label">Consignee Name & Address</span>
                    <div class="field-value">
                        <strong><?php echo e($shipment->receiver_name); ?></strong><br>
                        <?php echo e($shipment->receiver_address); ?>

                    </div>
                    <span class="field-label">Consignee Contact</span>
                    <div class="field-value mono"><?php echo e($shipment->receiver_phone_number); ?> | <?php echo e($shipment->receiver_email); ?></div>
                </td>
            </tr>
        </table>

        <!-- Issuing Agent and Accounting -->
        <table class="grid-table">
            <tr>
                <td class="grid-cell" width="50%">
                    <span class="field-label">Issuing Agent</span>
                    <div class="field-value"><?php echo e($globalSiteName); ?><br>Address: <?php echo e($globalAddress); ?></div>
                </td>
                <td class="grid-cell" width="50%" style="background: #f1f5f9;">
                    <span class="field-label">Accounting Information / Notify Party</span>
                    <div class="field-value">Notify upon arrival.<br>Freight Prepaid</div>
                </td>
            </tr>
        </table>

        <!-- Routing Information -->
        <table class="grid-table routing-section">
            <tr>
                <td class="grid-cell" width="33%" style="border-color: rgba(255,255,255,0.2);">
                    <span class="field-label">Airport of Departure</span>
                    <div class="field-value large"><?php echo e($shipment->origin_city); ?></div>
                </td>
                <td class="grid-cell" width="34%" style="border-color: rgba(255,255,255,0.2);">
                    <span class="field-label">To (Destination)</span>
                    <div class="field-value large"><?php echo e($shipment->destination_city); ?></div>
                </td>
                <td class="grid-cell" width="33%">
                    <span class="field-label">By First Carrier / Flight / Date</span>
                    <div class="field-value"><?php echo e($globalSiteName); ?><br><?php echo e($shipment->shipping_mode); ?> / <?php echo e($shipment->departure_date); ?></div>
                </td>
            </tr>
        </table>

        <!-- Currency and Charges -->
        <table class="grid-table" style="background: #f8fafc;">
            <tr>
                <td class="grid-cell" width="10%">
                    <span class="field-label">Currency</span>
                    <div class="field-value mono">USD</div>
                </td>
                <td class="grid-cell" width="10%">
                    <span class="field-label">CHGS Code</span>
                    <div class="field-value">PP</div>
                </td>
                <td class="grid-cell" width="15%">
                    <span class="field-label">WT/VAL</span>
                    <div class="field-value">PPD</div>
                </td>
                <td class="grid-cell" width="15%">
                    <span class="field-label">Other</span>
                    <div class="field-value">PPD</div>
                </td>
                <td class="grid-cell" width="25%">
                    <span class="field-label">Declared Value Carriage</span>
                    <div class="field-value">12500.00</div>
                </td>
                <td class="grid-cell" width="25%">
                    <span class="field-label">Declared Value Customs</span>
                    <div class="field-value">NVD</div>
                </td>
            </tr>
        </table>

        <!-- Cargo Header -->
        <table class="cargo-table">
            <tr>
                <td class="cargo-header" width="10%">Pieces</td>
                <td class="cargo-header" width="12%">Gross Wgt</td>
                <td class="cargo-header" width="15%">Chargeable Wgt</td>
                <td class="cargo-header" width="63%">Nature and Quantity of Goods</td>
            </tr>
        </table>

        <!-- Cargo Details -->
        <table class="grid-table">
            <tr>
                <td class="grid-cell" width="10%" style="text-align: center;">
                    <div class="field-value mono"><?php echo e($shipment->quantity); ?></div>
                    <div style="margin-top:15px; border-top:1px solid #ccc; padding-top:5px;">
                        <div class="field-value mono" style="font-weight:bold;"><?php echo e($shipment->quantity); ?></div>
                    </div>
                </td>
                <td class="grid-cell" width="12%" style="text-align: center;">
                    <div class="field-value mono"><?php echo e($shipment->weight); ?> K</div>
                    <div style="margin-top:15px; border-top:1px solid #ccc; padding-top:5px;">
                        <div class="field-value mono" style="font-weight:bold;"><?php echo e($shipment->weight); ?></div>
                    </div>
                </td>
                <td class="grid-cell" width="15%" style="text-align: center;">
                    <div class="field-value mono"><?php echo e($shipment->weight); ?></div>
                </td>
                <td class="grid-cell" width="63%" style="padding: 8px;">
                    <div class="item-line">
                        <strong><?php echo e($shipment->shipment_name); ?></strong>
                        <span style="font-size:8pt; color:#666; display:block;">Origin: <?php echo e($shipment->origin_country); ?></span>
                    </div>
                    
                    <div style="padding: 6px; background: #f1f5f9; border-radius: 3px;">
                        <span class="field-label">Handling Information</span>
                        <div class="field-value"><?php echo e($shipment->comments); ?> <span style="color:#ef6c00; font-weight:bold;">SECURED CARGO.</span></div>
                    </div>
                </td>
            </tr>
        </table>

        <!-- Prepaid and Signature Section -->
        <table class="grid-table">
            <tr>
                <td class="grid-cell" width="50%">
                    <span class="field-label">Prepaid Weight Charge</span>
                    <div class="field-value mono"><?php echo e($shipment->shipping_cost); ?></div>
                    
                    <span class="field-label" style="margin-top:5px;">Total Other Charges Due Agent</span>
                    <div class="field-value mono">N/A</div>
                    
                    <div style="margin-top: 10px; padding-top:5px; border-top: 2px solid #0b2545;">
                        <span class="field-label">Total Prepaid</span>
                        <div class="field-value large"><?php echo e($shipment->shipping_cost); ?></div>
                    </div>
                </td>
                <td class="grid-cell" width="50%">
                    <div style="text-align: center; margin-bottom: 5px;">
                        <div class="barcode-strip"></div>
                        <div class="field-value mono" style="font-size:12pt; font-weight:bold;"><?php echo e($shipment->tracking_number); ?></div>
                    </div>
                    
                    <table style="width: 100%;">
                        <tr>
                            <td width="50%" style="padding-right: 5px;">
                                <span class="field-label">Signature of Shipper</span>
                                <div class="field-value" style="border-bottom: 1px solid #000; height: 20px; margin-top: 5px; font-family:'Courier New';"><?php echo e($shipment->sender_name); ?></div>
                            </td>
                            <td width="50%">
                                <span class="field-label">Signature of Issuing Carrier</span>
                                <div class="field-value" style="border-bottom: 1px solid #000; height: 20px; margin-top: 5px; font-family:'Courier New';"><?php echo e($globalSiteName); ?> Ops</div>
                            </td>
                        </tr>
                    </table>
                    <div class="field-value" style="font-size: 7pt; color: #999; margin-top: 5px; text-align: center;">
                        Executed on <?php echo e($shipment->created_at->format('Y-m-d H:i')); ?>

                    </div>
                </td>
            </tr>
        </table>
        
        <div class="legal-text">
            NOTICE: Liability of carrier is limited. If the carriage involves an ultimate destination or stop in a country other than the country of departure, the Montreal Convention or Warsaw Convention may be applicable. Carrier's liability is limited per kg unless a higher value is declared.
        </div>

        <div class="copy-stamp">Original 3 (For Shipper)</div>

        <!-- Footer -->
        <div class="brand-footer">
            <table class="footer-table">
                <tr>
                    <td class="footer-cell" width="40%">
                        <strong><?php echo e($globalSiteName); ?></strong><br>
                        <span style="opacity:0.8"><?php echo e($globalAddress); ?></span>
                    </td>
                    <td class="footer-cell" width="30%" style="text-align:center;">
                        <a href="#" class="footer-link"><?php echo e($globalDomain); ?></a>
                    </td>
                    <td class="footer-cell" width="30%" style="text-align:right;">
                        <div><?php echo e($globalPhoneNumber); ?></div>
                        <div style="opacity:0.8"><?php echo e($globalEmail); ?></div>
                    </td>
                </tr>
            </table>
        </div>
    </div>
</body>
</html><?php /**PATH /home/psyczwng/opscourier.com/core/resources/views/documents/air_waybill.blade.php ENDPATH**/ ?>