<?php
require_once __DIR__ . '/app_shell.php';
require_user();
app_head('Overview'); app_open('dashboard', 'Overview');
?>
<div class="page-heading"><div><h2>Good to see you.</h2><p>Your account at a glance, using your current account data.</p></div><div><a class="btn-v btn-muted" href="<?= APP_BASE ?>/deposit"><i class="bi bi-plus-lg"></i> Add funds</a> <a class="btn-v" href="<?= APP_BASE ?>/investments">Explore investments</a></div></div>
<section class="stats"><article class="stat"><div class="stat-top"><span>Available balance</span><i class="bi bi-wallet2 stat-icon"></i></div><strong id="accountBalance">—</strong><small>Available in your account</small></article><article class="stat"><div class="stat-top"><span>Invested amount</span><i class="bi bi-briefcase stat-icon"></i></div><strong id="amountInvested">—</strong><small>Across active records</small></article><article class="stat"><div class="stat-top"><span>Recorded earnings</span><i class="bi bi-graph-up stat-icon"></i></div><strong id="totalEarnings">—</strong><small>Posted account earnings</small></article><article class="stat"><div class="stat-top"><span>Net funding</span><i class="bi bi-arrow-left-right stat-icon"></i></div><strong id="netFunding">—</strong><small><span id="totalDeposits">—</span> deposited · <span id="totalWithdrawals">—</span> withdrawn</small></article></section>
<section class="grid-2"><article class="panel"><div class="panel-title"><h3>Portfolio activity</h3><span>Based on account records</span></div><div class="performance" aria-label="Portfolio activity visualization"></div><div class="notice" style="margin-top:16px">This view tracks recorded account activity; it is not a performance forecast or investment recommendation.</div></article><aside class="panel"><div class="panel-title"><h3>Quick actions</h3></div><div class="action-list"><a class="action" href="<?= APP_BASE ?>/deposit"><i class="bi bi-arrow-down-left-circle"></i><span><b>Deposit funds</b>Submit a funding request</span></a><a class="action" href="<?= APP_BASE ?>/investments"><i class="bi bi-graph-up-arrow"></i><span><b>Review investments</b>See available opportunities</span></a><a class="action" href="<?= APP_BASE ?>/withdraw"><i class="bi bi-arrow-up-right-circle"></i><span><b>Withdraw funds</b>Request an account withdrawal</span></a><a class="action" href="<?= APP_BASE ?>/transactions"><i class="bi bi-receipt"></i><span><b>Transaction history</b>Review account activity</span></a></div></aside></section>
<script>window.APP_BASE = <?= json_encode(APP_BASE) ?>;</script><script src="<?= APP_BASE ?>/dashboard.js"></script>
<?php app_close(); ?>