<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>WBX Admin - Dashboard</title>
    <link rel="stylesheet" th:href="@{/admin/css/admin.css}">
</head>
<body>
<div class="admin-layout">
    <div th:replace="~{admin/fragments :: sidebar('dashboard')}"></div>
    <div class="admin-content">
        <div class="page-header">
            <h1>대시보드</h1>
            <p>WBX Spring Framework 관리 콘솔</p>
        </div>

        <div class="stats-grid">
            <div class="stat-card">
                <div class="label">활성 사용자</div>
                <div class="value" th:text="${userCount}">0</div>
            </div>
            <div class="stat-card">
                <div class="label">전체 사용자</div>
                <div class="value" th:text="${totalUsers}">0</div>
            </div>
            <div class="stat-card">
                <div class="label">로그인 성공</div>
                <div class="value green" th:text="${loginCount}">0</div>
            </div>
            <div class="stat-card">
                <div class="label">등록 역할</div>
                <div class="value" th:text="${roleCount}">0</div>
            </div>
        </div>

        <div class="page-header"><h1>빠른 링크</h1></div>
        <a th:href="@{/admin/users}" class="btn btn-primary" style="margin-right:8px">사용자 관리</a>
        <a th:href="@{/admin/roles}" class="btn btn-outline" style="margin-right:8px">역할 관리</a>
        <a th:href="@{/admin/login-history}" class="btn btn-outline">로그인 이력</a>
    </div>
</div>
</body>
</html>
