<?php
/**
 * 会员中心 - 仪表盘
 */
?>
<div class="page-header">
    <h1 class="page-title">
        <i class="icon-home"></i>
        欢迎回来，<?php echo htmlspecialchars($member['nickname'] ?: $member['username']); ?>
    </h1>
</div>
<div class="page-content">
    <div class="dashboard-welcome">
        <div class="welcome-icon">🌿</div>
        <div class="welcome-text">
            <p>这里是您的个人中心，管理您的资料、内容和财务信息</p>
        </div>
    </div>
    <div class="dashboard-cards">
        <div class="dash-card">
            <div class="dash-card-icon">📝</div>
            <div class="dash-card-info">
                <div class="dash-card-val">0</div>
                <div class="dash-card-lbl">我的投稿</div>
            </div>
        </div>
        <div class="dash-card">
            <div class="dash-card-icon">💬</div>
            <div class="dash-card-info">
                <div class="dash-card-val">0</div>
                <div class="dash-card-lbl">我的留言</div>
            </div>
        </div>
        <div class="dash-card">
            <div class="dash-card-icon">📥</div>
            <div class="dash-card-info">
                <div class="dash-card-val">0</div>
                <div class="dash-card-lbl">下载记录</div>
            </div>
        </div>
        <div class="dash-card">
            <div class="dash-card-icon">💳</div>
            <div class="dash-card-info">
                <div class="dash-card-val">¥<?php echo number_format($member['balance'] ?? 0, 2); ?></div>
                <div class="dash-card-lbl">账户余额</div>
            </div>
        </div>
    </div>
</div>
<style>
.dashboard-welcome {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-radius: 12px;
    padding: 32px;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 28px;
}
.welcome-icon { font-size: 48px; }
.welcome-text p { font-size: 15px; opacity: 0.9; margin-top: 4px; }
.dashboard-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}
.dash-card {
    background: #f9fafb;
    border-radius: 10px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
}
.dash-card-icon { font-size: 32px; }
.dash-card-val { font-size: 22px; font-weight: 700; color: #1a1a1a; }
.dash-card-lbl { font-size: 13px; color: #888; margin-top: 2px; }
@media (max-width: 768px) {
    .dashboard-cards { grid-template-columns: repeat(2, 1fr); }
}
</style>