{% extends "base.html" %}
{% block title %}仪表盘{% endblock %}
{% block content %}
<h2 class="mb-4">仪表盘</h2>
<div class="row g-4">
    <div class="col-md-4">
        <div class="card border-primary h-100">
            <div class="card-body text-center">
                <h1 class="display-4 text-primary">{{ stats.users }}</h1>
                <p class="text-muted mb-2">注册用户</p>
                <a href="{{ url_for('users') }}" class="btn btn-outline-primary btn-sm">管理用户</a>
            </div>
        </div>
    </div>
    <div class="col-md-4">
        <div class="card border-success h-100">
            <div class="card-body text-center">
                <h1 class="display-4 text-success">{{ stats.contests }}</h1>
                <p class="text-muted mb-2">杯赛总数</p>
                <a href="{{ url_for('competitions') }}" class="btn btn-outline-success btn-sm">管理杯赛</a>
            </div>
        </div>
    </div>
    <div class="col-md-4">
        <div class="card border-info h-100">
            <div class="card-body text-center">
                <h1 class="display-4 text-info">{{ stats.exams }}</h1>
                <p class="text-muted mb-2">考试总数</p>
                <a href="{{ url_for('exams') }}" class="btn btn-outline-info btn-sm">管理考试</a>
            </div>
        </div>
    </div>
    <div class="col-md-4">
        <div class="card border-warning h-100">
            <div class="card-body text-center">
                <h1 class="display-4 text-warning">{{ stats.pending_teacher }}</h1>
                <p class="text-muted mb-2">待审教师申请</p>
                <a href="{{ url_for('teacher_apps') }}" class="btn btn-outline-warning btn-sm">处理申请</a>
            </div>
        </div>
    </div>
    <div class="col-md-4">
        <div class="card border-danger h-100">
            <div class="card-body text-center">
                <h1 class="display-4 text-danger">{{ stats.pending_contest }}</h1>
                <p class="text-muted mb-2">待审杯赛申请</p>
                <a href="{{ url_for('competition_apps') }}" class="btn btn-outline-danger btn-sm">处理申请</a>
            </div>
        </div>
    </div>
    <div class="col-md-4">
        <div class="card border-secondary h-100">
            <div class="card-body text-center">
                <h1 class="display-4 text-secondary">{{ stats.posts }}</h1>
                <p class="text-muted mb-2">论坛帖子</p>
                <a href="{{ url_for('posts') }}" class="btn btn-outline-secondary btn-sm">管理帖子</a>
            </div>
        </div>
    </div>
</div>
{% endblock %}