<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>首页</title>
    <link rel="stylesheet" href="{{ asset('CmsProUi/component/pear/css/pear.css') }}">
    <link rel="stylesheet" href="{{ asset('CmsProUi/font-awesome/4.7.0/css/font-awesome.min.css') }}">
    <link rel="stylesheet" href="{{ asset('Admin/css/admin.css') }}">
    <link rel="stylesheet" href="{{ asset('Admin/css/variables.css') }}">
    <link rel="stylesheet" href="{{ asset('Admin/css/reset.css') }}">
    <style>
    .stat-card {
        padding: 20px;
        border-radius: 4px;
        color: #fff;
        position: relative;
        overflow: hidden;
    }
    .stat-card .stat-icon {
        position: absolute;
        right: 15px;
        top: 50%;
        transform: translateY(-50%);
        font-size: 50px;
        opacity: 0.2;
    }
    .stat-card .stat-title {
        font-size: 14px;
        margin-bottom: 8px;
    }
    .stat-card .stat-value {
        font-size: 18px;
        font-weight: bold;
    }
    .stat-bg-blue { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); }
    .stat-bg-green { background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%); }
    .stat-bg-orange { background: linear-gradient(135deg, #fa709a 0%, #fee140 100%); }
    .stat-bg-cyan { background: linear-gradient(135deg, #a18cd1 0%, #fbc2eb 100%); }
    .info-table { width: 100%; }
    .info-table td { padding: 10px 15px; }
    .info-table .label { width: 120px; color: #666; font-weight: 500; }
    .info-table .value { color: #333; }
</style>
</head>
<body>
<div class="pear-container">
    <div class="layui-card" style="padding: 10px;">
        <div class="layui-card-body" style="text-align: center; padding: 30px;">
            <h2 style="color: #333; margin-bottom: 10px;">欢迎回来，{{ auth('web')->user()->nickname ?? auth('web')->user()->username }}</h2>
            <p style="color: #999;">用户中心</p>
        </div>
    </div>

    <div class="layui-row layui-col-space15" style="padding: 10px;">
        <div class="layui-col-md3">
            <div class="stat-card stat-bg-blue">
                <div class="stat-title">登录次数</div>
                <div class="stat-value">{{ auth('web')->user()->login_count ?? 0 }}</div>
                <div class="stat-icon"><i class="fa fa-sign-in"></i></div>
            </div>
        </div>
        <div class="layui-col-md3">
            <div class="stat-card stat-bg-green">
                <div class="stat-title">用户组</div>
                <div class="stat-value" style="font-size: 18px;">{{ auth('web')->user()->group->name ?? '默认组' }}</div>
                <div class="stat-icon"><i class="fa fa-users"></i></div>
            </div>
        </div>
        <div class="layui-col-md3">
            <div class="stat-card stat-bg-orange">
                <div class="stat-title">账号状态</div>
                <div class="stat-value" style="font-size: 18px;">{{ auth('web')->user()->status->label() }}</div>
                <div class="stat-icon"><i class="fa fa-shield"></i></div>
            </div>
        </div>
        <div class="layui-col-md3">
            <div class="stat-card stat-bg-cyan">
                <div class="stat-title">注册时间</div>
                <div class="stat-value" style="font-size: 16px;">{{ auth('web')->user()->create_time ? \Carbon\Carbon::parse(auth('web')->user()->create_time)->format('Y-m-d') : '-' }}</div>
                <div class="stat-icon"><i class="fa fa-calendar"></i></div>
            </div>
        </div>
    </div>

    <div class="layui-card" style="padding: 10px;">
        <div class="layui-card-header">个人信息</div>
        <div class="layui-card-body">
            <table class="info-table">
                <tr>
                    <td class="label">用户名</td>
                    <td class="value">{{ auth('web')->user()->username }}</td>
                    <td class="label">昵称</td>
                    <td class="value">{{ auth('web')->user()->nickname ?? '-' }}</td>
                </tr>
                <tr>
                    <td class="label">邮箱</td>
                    <td class="value">{{ auth('web')->user()->email ?? '-' }}</td>
                    <td class="label">手机号</td>
                    <td class="value">{{ auth('web')->user()->phone ?? '-' }}</td>
                </tr>
                <tr>
                    <td class="label">性别</td>
                    <td class="value">{{ auth('web')->user()->gender->label() }}</td>
                    <td class="label">生日</td>
                    <td class="value">{{ auth('web')->user()->birthday ?? '-' }}</td>
                </tr>
                <tr>
                    <td class="label">最后登录</td>
                    <td class="value">{{ auth('web')->user()->last_login_at ?? '-' }}</td>
                    <td class="label">签名</td>
                    <td class="value">{{ auth('web')->user()->signature ?? '-' }}</td>
                </tr>
            </table>
        </div>
    </div>
</div>
<script src="{{ asset('CmsProUi/component/layui/layui.js') }}"></script>
<script src="{{ asset('CmsProUi/component/pear/pear.js') }}"></script>
</body>
</html>
