<?php require_once __DIR__ . '/../includes/auth.php'; requireLogin(['customer']); $user=currentUser(); $isWholesale = ($user['account_type'] ?? '') === 'wholesale'; ?>
<!doctype html><html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><title>Customer Dashboard</title><link rel="stylesheet" href="../assets/style.css"></head><body>
<div class="layout"><aside class="sidebar"><div class="brand">SHAHANA VEGitables<small>Customer Portal</small></div><nav class="nav"><a class="active" href="dashboard.php">Dashboard</a><a href="prices.php">Current Prices</a><a href="invoices.php">Invoices</a><a href="installments.php">Installments</a></nav></aside>
<main class="main"><div class="topbar"><div><h1 style="margin:0;">Hello, <?php echo htmlspecialchars($user['full_name']); ?></h1><p style="color:#66725f;"><?php echo $isWholesale ? 'Wholesale customer pricing active.' : 'Retail customer pricing active.'; ?></p></div><a class="btn btn-secondary" href="logout.php">Logout</a></div>
<div class="grid grid-3"><div class="card stat"><h3>Visible Price Type</h3><p><?php echo $isWholesale ? 'Wholesale' : 'Retail'; ?></p></div><div class="card stat"><h3>Total Outstanding</h3><p>₹ 8,450</p></div><div class="card stat"><h3>Last Invoice</h3><p>24 May 2026</p></div></div>
<div class="card" style="margin-top:20px;"><h3>Account Notes</h3><p>Your purchase amount can be adjusted with installment entries added by admin. Older invoices and payment history should be listed below with date filtering in the full implementation.</p></div>
</main></div></body></html>
