<?php if (!defined('DASHBOARD_ROOT')) { http_response_code(403); exit; } $_ovIcons = [ 'revenue' => '<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8"><path d="M12 1v22M17 5H9.5a3.5 3.5 0 000 7h5a3.5 3.5 0 010 7H6"/></svg>', 'chart' => '<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8"><polyline points="22 12 18 12 15 21 9 3 6 12 2 12"/></svg>', 'clock' => '<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8"><circle cx="12" cy="12" r="10"/><polyline points="12 6 12 12 16 14"/></svg>', 'bag' => '<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8"><path d="M6 2L3 6v14a2 2 0 002 2h14a2 2 0 002-2V6l-3-4z"/><line x1="3" y1="6" x2="21" y2="6"/><path d="M16 10a4 4 0 01-8 0"/></svg>', 'chat' => '<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8"><path d="M21 15a2 2 0 01-2 2H7l-4 4V5a2 2 0 012-2h14a2 2 0 012 2z"/></svg>', 'user' => '<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8"><path d="M20 21v-2a4 4 0 00-4-4H8a4 4 0 00-4 4v2"/><circle cx="12" cy="7" r="4"/></svg>', ]; ?> <div class="ov-kpi-ribbon"> <div class="ov-kpi green"> <div class="ov-kpi-accent"></div> <span class="ov-kpi-icon"><?= $_ovIcons['revenue'] ?></span> <div class="ov-kpi-val">$<?= number_format($revenueToday, 0) ?></div> <div class="ov-kpi-lbl">Today's Revenue</div> <div class="ov-kpi-sub"><?= $ordersToday ?> orders</div> </div> <div class="ov-kpi blue"> <div class="ov-kpi-accent"></div> <span class="ov-kpi-icon"><?= $_ovIcons['chart'] ?></span> <div class="ov-kpi-val">$<?= number_format($revenueWeek, 0) ?></div> <div class="ov-kpi-lbl">7-Day Revenue</div> <div class="ov-kpi-sub"><?= $ordersWeek ?> orders</div> </div> <div class="ov-kpi <?= $pendingOrders > 0 ? 'amber' : 'green' ?>"> <div class="ov-kpi-accent"></div> <span class="ov-kpi-icon"><?= $_ovIcons['clock'] ?></span> <div class="ov-kpi-val"><?= $pendingOrders ?></div> <div class="ov-kpi-lbl">Pending Orders</div> <div class="ov-kpi-sub"><?= $paidOrders ?> paid, needs fulfil</div> </div> <div class="ov-kpi purple"> <div class="ov-kpi-accent"></div> <span class="ov-kpi-icon"><?= $_ovIcons['bag'] ?></span> <div class="ov-kpi-val"><?= $totalProducts ?></div> <div class="ov-kpi-lbl">Live Products</div> <div class="ov-kpi-sub"><?= $draftProducts ?> drafts &middot;<?= $totalCats ?> categories</div> </div> <div class="ov-kpi <?= $openTickets > 0 ? 'red' : 'green' ?>"> <div class="ov-kpi-accent"></div> <span class="ov-kpi-icon"><?= $_ovIcons['chat'] ?></span> <div class="ov-kpi-val"><?= $openTickets ?></div> <div class="ov-kpi-lbl">Open Tickets</div> <div class="ov-kpi-sub"><?= $reviewsPending ?> reviews pending</div> </div> <div class="ov-kpi cyan"> <div class="ov-kpi-accent"></div> <span class="ov-kpi-icon"><?= $_ovIcons['user'] ?></span> <div class="ov-kpi-val"><?= $usersToday ?></div> <div class="ov-kpi-lbl">New Users Today</div> <div class="ov-kpi-sub"><?= number_format($totalUsers) ?> total</div> </div> </div>