<?php require_once __DIR__ . '/../includes/auth.php'; requireLogin(['admin','staff']); $user=currentUser(); ?>
<!doctype html><html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><title>Items</title><link rel="stylesheet" href="../assets/style.css"></head><body>
<div class="layout"><aside class="sidebar"><div class="brand">SHAHANA VEGitables<small>Items</small></div><nav class="nav"><a href="dashboard.php">Dashboard</a><a class="active" href="items.php">Items</a><a href="billing.php">Billing</a><a href="expenses.php">Expenses</a><a href="users.php">Staff & Customers</a><a href="reports.php">Reports</a></nav></aside>
<main class="main"><div class="topbar"><h1>Items</h1><a class="btn btn-secondary" href="dashboard.php">Back</a></div>
<div class="grid grid-2"><div class="card"><h3>Add / Edit Item</h3><form>
<label>Item Name</label><input type="text" placeholder="Tomato">
<label>Section</label><select><option>Vegetable</option><option>Other Items</option></select>
<label>Unit</label><select><option>Kg</option><option>Quantity</option></select>
<?php if ($user['role']==='admin'): ?><label>Original Price</label><input type="number" step="0.01" placeholder="40.00"><?php endif; ?>
<label>Wholesale Price</label><input type="number" step="0.01" placeholder="45.00">
<label>Retail Price</label><input type="number" step="0.01" placeholder="50.00">
<button class="btn btn-primary" type="button">Save Item</button></form></div>
<div class="card"><h3>Price Visibility Rules</h3><p>Admin sees original, wholesale, and retail prices. Staff sees wholesale and retail. Wholesale customers see only wholesale price. Retail customers see only retail price.</p></div></div>
</main></div></body></html>
