<h1 class="text-center mb-5"><i class="fas fa-tachometer-alt"></i> Dashboard</h1>
<div class="row g-4">
    <?php
    $orders = $pdo->query("SELECT COUNT(*), COALESCE(SUM(total),0) FROM orders WHERE status='paid'")->fetch();
    $packages = $pdo->query("SELECT COUNT(*) FROM packages")->fetchColumn();
    $pending = $pdo->query("SELECT COUNT(*) FROM pending_rewards WHERE delivered=0")->fetchColumn();
    ?>
    <div class="col-md-3"><div class="card p-4 text-center"><h2>$<?=number_format($orders[1],2)?></h2></div></div>
    <div class="col-md-3"><div class="card p-4 text-center"><h2><?=$orders[0]?></h2><p>Total Orders</p></div></div>
    <div class="col-md-3"><div class="card p-4 text-center"><h2><?=$packages?></h2><p>Packages</p></div></div>
    <div class="col-md-3"><div class="card p-4 text-center"><h2><?=$pending?></h2><p>Pending Rewards</p></div></div>
</div>
<div class="text-center mt-5">
    <h3>You're in control, king </h3>
    <p>Now add your first package → click <strong>Packages</strong> in the menu!</p>
</div>