<?php
$page_title = 'Pricing Engine';
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;">Dynamic Pricing Engine</h2>
        <p style="color:#64748b; font-size:0.95rem; margin-top:5px;">Manage your contracts, tier discounts, and promotional offers.</p>
    </div>
    <div>
        <button style="background:#2563eb; color:#fff; border:none; padding:10px 20px; border-radius:8px; font-weight:600; cursor:pointer; box-shadow:0 4px 6px -1px rgba(37,99,235,0.2);"><i class="fas fa-download" style="margin-right:8px;"></i> Download Price List</button>
    </div>
</div>

<div class="grid-3" style="margin-bottom:24px;">
    <div class="card" style="margin-bottom:0; display:flex; align-items:center; gap:20px;">
        <div style="width:50px; height:50px; border-radius:12px; background:#dbeafe; color:#2563eb; display:flex; align-items:center; justify-content:center; font-size:1.5rem;">
            <i class="fas fa-tags"></i>
        </div>
        <div>
            <div style="color:#64748b; font-size:0.85rem; font-weight:600;">ACTIVE TIER</div>
            <div style="color:#0f172a; font-size:1.4rem; font-weight:700;">Gold Partner</div>
            <div style="color:#10b981; font-size:0.75rem;">15% Base Discount</div>
        </div>
    </div>
    <div class="card" style="margin-bottom:0; display:flex; align-items:center; gap:20px;">
        <div style="width:50px; height:50px; border-radius:12px; background:#dcfce7; color:#10b981; display:flex; align-items:center; justify-content:center; font-size:1.5rem;">
            <i class="fas fa-piggy-bank"></i>
        </div>
        <div>
            <div style="color:#64748b; font-size:0.85rem; font-weight:600;">YTD SAVINGS</div>
            <div style="color:#0f172a; font-size:1.4rem; font-weight:700;">₹1,24,500</div>
            <div style="color:#10b981; font-size:0.75rem;"><i class="fas fa-arrow-up"></i> 12% vs Last Year</div>
        </div>
    </div>
    <div class="card" style="margin-bottom:0; display:flex; align-items:center; gap:20px;">
        <div style="width:50px; height:50px; border-radius:12px; background:#fef3c7; color:#d97706; display:flex; align-items:center; justify-content:center; font-size:1.5rem;">
            <i class="fas fa-ticket-alt"></i>
        </div>
        <div>
            <div style="color:#64748b; font-size:0.85rem; font-weight:600;">ACTIVE COUPONS</div>
            <div style="color:#0f172a; font-size:1.4rem; font-weight:700;">4 Available</div>
            <div style="color:#d97706; font-size:0.75rem;">Expiring soon</div>
        </div>
    </div>
</div>

<div class="grid-2">
    <div class="card">
        <h3 style="margin:0 0 20px; font-size:1.2rem; color:#0f172a;">Customer-Specific Contracts</h3>
        <table style="width:100%; border-collapse:collapse; font-size:0.9rem;">
            <thead>
                <tr style="background:#f8fafc; text-align:left;">
                    <th style="padding:12px; border-bottom:1px solid #e2e8f0;">Product Line</th>
                    <th style="padding:12px; border-bottom:1px solid #e2e8f0;">Contract Price</th>
                    <th style="padding:12px; border-bottom:1px solid #e2e8f0;">Valid Until</th>
                </tr>
            </thead>
            <tbody>
                <tr>
                    <td style="padding:12px; border-bottom:1px solid #e2e8f0; font-weight:500;">SS 304 Sheets (2mm)</td>
                    <td style="padding:12px; border-bottom:1px solid #e2e8f0; font-weight:bold; color:#10b981;">₹125 / kg</td>
                    <td style="padding:12px; border-bottom:1px solid #e2e8f0;">31 Dec 2026</td>
                </tr>
                <tr>
                    <td style="padding:12px; border-bottom:1px solid #e2e8f0; font-weight:500;">Kitchen Sinks (Double Bowl)</td>
                    <td style="padding:12px; border-bottom:1px solid #e2e8f0; font-weight:bold; color:#10b981;">₹3,400 / unit</td>
                    <td style="padding:12px; border-bottom:1px solid #e2e8f0;">30 Nov 2026</td>
                </tr>
                <tr>
                    <td style="padding:12px; border-bottom:1px solid #e2e8f0; font-weight:500;">Premium Faucets</td>
                    <td style="padding:12px; border-bottom:1px solid #e2e8f0; font-weight:bold; color:#10b981;">₹1,850 / unit</td>
                    <td style="padding:12px; border-bottom:1px solid #e2e8f0;">15 Oct 2026</td>
                </tr>
            </tbody>
        </table>
    </div>

    <div class="card">
        <h3 style="margin:0 0 20px; font-size:1.2rem; color:#0f172a;">Volume Discounts & Bundles</h3>
        <div style="border:1px solid #e2e8f0; border-radius:8px; padding:15px; margin-bottom:15px; display:flex; justify-content:space-between; align-items:center;">
            <div>
                <h4 style="margin:0 0 5px; color:#0f172a;">Bulk Order: SS Pipes</h4>
                <p style="margin:0; font-size:0.85rem; color:#64748b;">Order > 5000 kg</p>
            </div>
            <div style="background:#dcfce7; color:#166534; padding:5px 12px; border-radius:20px; font-size:0.8rem; font-weight:bold;">
                +5% Extra Off
            </div>
        </div>
        <div style="border:1px solid #e2e8f0; border-radius:8px; padding:15px; margin-bottom:15px; display:flex; justify-content:space-between; align-items:center;">
            <div>
                <h4 style="margin:0 0 5px; color:#0f172a;">Kitchen Bundle (Sink + Faucet)</h4>
                <p style="margin:0; font-size:0.85rem; color:#64748b;">Buy together & save</p>
            </div>
            <div style="background:#fef3c7; color:#d97706; padding:5px 12px; border-radius:20px; font-size:0.8rem; font-weight:bold;">
                Flat ₹500 Off
            </div>
        </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; color:#0f172a;">Festive Cashback</h4>
                <p style="margin:0; font-size:0.85rem; color:#64748b;">On prepaid orders > ₹50,000</p>
            </div>
            <div style="background:#dbeafe; color:#1d4ed8; padding:5px 12px; border-radius:20px; font-size:0.8rem; font-weight:bold;">
                2% Cashback to Wallet
            </div>
        </div>
    </div>
</div>

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