<?php
$page_title = 'Project / B2B Purchase';
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-building" style="color:#3b82f6; margin-right:10px;"></i>Project / B2B Purchase</h2>
        <p style="color:#64748b; font-size:0.95rem; margin-top:5px;">Hotel projects, builder orders, tender quotations, and contract pricing.</p>
    </div>
    <button style="background:linear-gradient(135deg,#3b82f6,#2563eb); color:#fff; border:none; padding:10px 20px; border-radius:8px; font-size:0.9rem; cursor:pointer; font-weight:600;"><i class="fas fa-plus"></i> New Project Order</button>
</div>
<div class="grid-4" style="margin-bottom:24px;">
    <div class="card" style="margin-bottom:0; border-top:4px solid #3b82f6;">
        <div style="color:#64748b; font-size:0.8rem; font-weight:600; margin-bottom:8px;">ACTIVE PROJECTS</div>
        <div style="font-size:1.4rem; font-weight:700; color:#0f172a;">4</div>
        <div style="color:#3b82f6; font-size:0.8rem; margin-top:5px;"><i class="fas fa-hard-hat"></i> In Progress</div>
    </div>
    <div class="card" style="margin-bottom:0; border-top:4px solid #10b981;">
        <div style="color:#64748b; font-size:0.8rem; font-weight:600; margin-bottom:8px;">TOTAL VALUE</div>
        <div style="font-size:1.4rem; font-weight:700; color:#10b981;">₹24.5L</div>
        <div style="color:#10b981; font-size:0.8rem; margin-top:5px;"><i class="fas fa-rupee-sign"></i> Contract Pricing</div>
    </div>
    <div class="card" style="margin-bottom:0; border-top:4px solid #f59e0b;">
        <div style="color:#64748b; font-size:0.8rem; font-weight:600; margin-bottom:8px;">PENDING APPROVALS</div>
        <div style="font-size:1.4rem; font-weight:700; color:#f59e0b;">2</div>
        <div style="color:#f59e0b; font-size:0.8rem; margin-top:5px;"><i class="fas fa-clock"></i> Awaiting Review</div>
    </div>
    <div class="card" style="margin-bottom:0; border-top:4px solid #8b5cf6;">
        <div style="color:#64748b; font-size:0.8rem; font-weight:600; margin-bottom:8px;">DELIVERIES SCHEDULED</div>
        <div style="font-size:1.4rem; font-weight:700; color:#0f172a;">6</div>
        <div style="color:#8b5cf6; font-size:0.8rem; margin-top:5px;"><i class="fas fa-truck"></i> This Month</div>
    </div>
</div>
<div class="grid-2">
    <div class="card">
        <h3 style="margin:0 0 15px; font-size:1.15rem; color:#0f172a;"><i class="fas fa-project-diagram" style="color:#3b82f6; margin-right:8px;"></i>Active Project Orders</h3>
        <?php
        $projects = [
            ['Taj Hotel — Bangalore', 'Hotel Project', '₹8.2L', '65%', '#10b981', 'Delivery Phase'],
            ['DLF Builder — Gurugram', 'Builder Order', '₹12.4L', '40%', '#3b82f6', 'Procurement'],
            ['Infosys Campus — Pune', 'Corporate', '₹2.8L', '90%', '#10b981', 'Final Delivery'],
            ['Metro Mall — Mumbai', 'Tender', '₹1.1L', '15%', '#f59e0b', 'Approval Pending'],
        ];
        foreach ($projects as $p): ?>
        <div style="border:1px solid #e2e8f0; border-radius:8px; padding:15px; margin-bottom:10px;">
            <div style="display:flex; justify-content:space-between; margin-bottom:8px;">
                <div>
                    <div style="font-weight:600; font-size:0.9rem;"><?= $p[0] ?></div>
                    <div style="font-size:0.75rem; color:#94a3b8;"><?= $p[1] ?> · <?= $p[2] ?></div>
                </div>
                <span style="background:<?= $p[4] ?>15; color:<?= $p[4] ?>; padding:3px 8px; border-radius:6px; font-size:0.7rem; font-weight:bold;"><?= $p[5] ?></span>
            </div>
            <div style="background:#e2e8f0; height:6px; border-radius:3px; overflow:hidden;">
                <div style="width:<?= $p[3] ?>; height:100%; background:<?= $p[4] ?>; border-radius:3px;"></div>
            </div>
        </div>
        <?php endforeach; ?>
    </div>
    <div class="card" style="background:linear-gradient(135deg,#3b82f6,#2563eb); color:#fff;">
        <h3 style="margin:0 0 15px; font-size:1.15rem;"><i class="fas fa-file-invoice"></i> Tender / Bid Quotation</h3>
        <p style="margin:0 0 15px; font-size:0.85rem; opacity:0.85;">Submit requirements for project-based pricing with scheduled deliveries.</p>
        <div style="display:flex; justify-content:space-between; font-size:0.85rem; margin-bottom:10px;">
            <span>Contract Pricing</span><span style="font-weight:bold;">Up to 18% off</span>
        </div>
        <div style="display:flex; justify-content:space-between; font-size:0.85rem; margin-bottom:10px;">
            <span>Approval Workflow</span><span style="font-weight:bold;">Multi-level</span>
        </div>
        <div style="display:flex; justify-content:space-between; font-size:0.85rem; margin-bottom:10px;">
            <span>Scheduled Delivery</span><span style="font-weight:bold;">Phase-wise</span>
        </div>
        <button style="background:#fff; color:#2563eb; border:none; padding:10px 20px; border-radius:8px; font-size:0.9rem; cursor:pointer; width:100%; font-weight:700; margin-top:10px;">Request Project Quote</button>
    </div>
</div>
<?php require_once __DIR__ . '/../includes/footer.php'; ?>
