<?php
$page_title = 'Export & Global Trade';
require_once __DIR__ . '/../config.php';
if (session_status() === PHP_SESSION_NONE) { session_start(); }
if (!isset($_SESSION['admin_id'])) { redirect(SITE_URL . '/admin/login.php'); }
require_once __DIR__ . '/header.php';
?>

<div style="display:flex; justify-content:space-between; align-items:center; margin-bottom:24px;">
    <div>
        <h2 style="font-family:'Outfit', sans-serif; font-size:1.8rem; color:#0f172a; margin:0;"><i class="fas fa-globe-asia" style="color:#6366f1; margin-right:10px;"></i>Export & Global Trade</h2>
        <p style="color:#64748b; font-size:0.95rem; margin-top:5px;">Shipping integrations, customs documentation, and international tax engine.</p>
    </div>
</div>

<div class="grid-3" style="margin-bottom:24px;">
    <div style="background:#fff; padding:20px; border-radius:12px; border:1px solid #e2e8f0; display:flex; align-items:center; gap:15px;">
        <div style="width:45px; height:45px; border-radius:10px; background:#dbeafe; color:#2563eb; display:flex; align-items:center; justify-content:center; font-size:1.3rem;"><i class="fas fa-flag"></i></div>
        <div>
            <div style="color:#64748b; font-size:0.8rem; font-weight:600;">EXPORT COUNTRIES</div>
            <div style="color:#0f172a; font-size:1.4rem; font-weight:700;">28</div>
        </div>
    </div>
    <div style="background:#fff; padding:20px; border-radius:12px; border:1px solid #e2e8f0; display:flex; align-items:center; gap:15px;">
        <div style="width:45px; height:45px; border-radius:10px; background:#dcfce7; color:#10b981; display:flex; align-items:center; justify-content:center; font-size:1.3rem;"><i class="fas fa-ship"></i></div>
        <div>
            <div style="color:#64748b; font-size:0.8rem; font-weight:600;">CONTAINERS IN TRANSIT</div>
            <div style="color:#0f172a; font-size:1.4rem; font-weight:700;">14</div>
        </div>
    </div>
    <div style="background:#fff; padding:20px; border-radius:12px; border:1px solid #e2e8f0; display:flex; align-items:center; gap:15px;">
        <div style="width:45px; height:45px; border-radius:10px; background:#fef3c7; color:#d97706; display:flex; align-items:center; justify-content:center; font-size:1.3rem;"><i class="fas fa-file-alt"></i></div>
        <div>
            <div style="color:#64748b; font-size:0.8rem; font-weight:600;">PENDING CUSTOMS DOCS</div>
            <div style="color:#d97706; font-size:1.4rem; font-weight:700;">6</div>
        </div>
    </div>
</div>

<div class="grid-2">
    <div style="background:#fff; padding:20px; border-radius:12px; border:1px solid #e2e8f0;">
        <h3 style="margin:0 0 20px; font-size:1.15rem; color:#0f172a;"><i class="fas fa-ship" style="color:#3b82f6; margin-right:8px;"></i> Container Tracking</h3>
        <div style="border:1px solid #e2e8f0; border-radius:8px; padding:15px; margin-bottom:12px; display:flex; justify-content:space-between; align-items:center;">
            <div>
                <h4 style="margin:0 0 5px; font-size:0.95rem;">CONT-4428 → Dubai, UAE</h4>
                <p style="margin:0; font-size:0.8rem; color:#64748b;">Vessel: MSC Fortunate • ETD: 5 May • 20ft FCL</p>
            </div>
            <span style="background:#dbeafe; color:#1d4ed8; padding:4px 10px; border-radius:12px; font-size:0.75rem; font-weight:bold;">At Sea</span>
        </div>
        <div style="border:1px solid #e2e8f0; border-radius:8px; padding:15px; margin-bottom:12px; display:flex; justify-content:space-between; align-items:center;">
            <div>
                <h4 style="margin:0 0 5px; font-size:0.95rem;">CONT-4431 → Nairobi, Kenya</h4>
                <p style="margin:0; font-size:0.8rem; color:#64748b;">Vessel: Maersk Sealand • ETD: 8 May • 40ft FCL</p>
            </div>
            <span style="background:#fef3c7; color:#b45309; padding:4px 10px; border-radius:12px; font-size:0.75rem; font-weight:bold;">Customs Hold</span>
        </div>
        <div style="border:1px solid #e2e8f0; border-radius:8px; padding:15px; display:flex; justify-content:space-between; align-items:center;">
            <div>
                <h4 style="margin:0 0 5px; font-size:0.95rem;">CONT-4435 → London, UK</h4>
                <p style="margin:0; font-size:0.8rem; color:#64748b;">Vessel: CMA CGM • ETD: 12 May • 20ft FCL</p>
            </div>
            <span style="background:#dcfce7; color:#166534; padding:4px 10px; border-radius:12px; font-size:0.75rem; font-weight:bold;">Booked</span>
        </div>
    </div>

    <div style="background:#fff; padding:20px; border-radius:12px; border:1px solid #e2e8f0;">
        <h3 style="margin:0 0 20px; font-size:1.15rem; color:#0f172a;"><i class="fas fa-calculator" style="color:#8b5cf6; margin-right:8px;"></i> International Tax & Incentive Engine</h3>
        <table style="width:100%; border-collapse:collapse; font-size:0.9rem;">
            <thead>
                <tr style="background:#f8fafc; text-align:left;">
                    <th style="padding:10px 12px; border-bottom:1px solid #e2e8f0;">Country</th>
                    <th style="padding:10px 12px; border-bottom:1px solid #e2e8f0;">Duty</th>
                    <th style="padding:10px 12px; border-bottom:1px solid #e2e8f0;">MEIS Incentive</th>
                </tr>
            </thead>
            <tbody>
                <tr>
                    <td style="padding:10px 12px; border-bottom:1px solid #f1f5f9; font-weight:500;">🇦🇪 UAE</td>
                    <td style="padding:10px 12px; border-bottom:1px solid #f1f5f9;">5%</td>
                    <td style="padding:10px 12px; border-bottom:1px solid #f1f5f9; color:#10b981; font-weight:bold;">3% RoDTEP</td>
                </tr>
                <tr>
                    <td style="padding:10px 12px; border-bottom:1px solid #f1f5f9; font-weight:500;">🇬🇧 United Kingdom</td>
                    <td style="padding:10px 12px; border-bottom:1px solid #f1f5f9;">2.5%</td>
                    <td style="padding:10px 12px; border-bottom:1px solid #f1f5f9; color:#10b981; font-weight:bold;">4% RoDTEP</td>
                </tr>
                <tr>
                    <td style="padding:10px 12px; font-weight:500;">🇰🇪 Kenya</td>
                    <td style="padding:10px 12px;">0% (FTA)</td>
                    <td style="padding:10px 12px; color:#10b981; font-weight:bold;">2% RoDTEP</td>
                </tr>
            </tbody>
        </table>
    </div>
</div>

<?php require_once __DIR__ . '/footer.php'; ?>
