{% extends "base.html" %}

{% block title %}Admin Dashboard{% endblock %}

{% block content %}
<div class="container mt-4">
    <h1 class="mb-4">Admin Dashboard</h1>
    <p class="lead mb-5">Welcome, {{ current_user.username }}. From here, you can manage assessments, users, clients, and system reports.</p>

    <div class="row">
        <!-- Assessments Card -->
        <div class="col-md-4 mb-4">
            <div class="card h-100 shadow-sm">
                <div class="card-body d-flex flex-column">
                    <h5 class="card-title"><i class="fas fa-clipboard-list mr-2"></i>Assessments</h5>
                    <p class="card-text">Create, edit, and manage all assessments and their questions.</p>
                    <a href="{{ url_for('admin.manage_assessments') }}" class="btn btn-primary mt-auto">Manage Assessments</a>
                </div>
            </div>
        </div>

        <!-- Users Card -->
        <div class="col-md-4 mb-4">
            <div class="card h-100 shadow-sm">
                <div class="card-body d-flex flex-column">
                    <h5 class="card-title"><i class="fas fa-users-cog mr-2"></i>User Management</h5>
                    <p class="card-text">View, suspend, activate, or delete user and consultant accounts.</p>
                    <a href="{{ url_for('admin.manage_users') }}" class="btn btn-info mt-auto">Manage Users</a>
                </div>
            </div>
        </div>

        <!-- Clients Card -->
        <div class="col-md-4 mb-4">
            <div class="card h-100 shadow-sm">
                <div class="card-body d-flex flex-column">
                    <h5 class="card-title"><i class="fas fa-user-friends mr-2"></i>Client Management</h5>
                    <p class="card-text">View, create, edit, and delete client profiles.</p>
                    <a href="{{ url_for('admin.manage_clients') }}" class="btn btn-secondary mt-auto">Manage Clients</a>
                </div>
            </div>
        </div>

        <!-- Generated Links Card -->
        <div class="col-md-4 mb-4">
            <div class="card h-100 shadow-sm">
                <div class="card-body d-flex flex-column">
                    <h5 class="card-title"><i class="fas fa-link mr-2"></i>Generated Links</h5>
                    <p class="card-text">View all generated one-time use assessment links.</p>
                    <a href="{{ url_for('admin.view_generated_links') }}" class="btn btn-dark mt-auto">View All Links</a>
                </div>
            </div>
        </div>

        <!-- Reports Card -->
        <div class="col-md-4 mb-4">
            <div class="card h-100 shadow-sm">
                <div class="card-body d-flex flex-column">
                    <h5 class="card-title"><i class="fas fa-chart-line mr-2"></i>View Reports</h5>
                    <p class="card-text">Access and review all completed assessment reports submitted by users.</p>
                    <a href="{{ url_for('admin.reports') }}" class="btn btn-success mt-auto">View Reports</a>
                </div>
            </div>
        </div>

        <!-- Assessment Requests Card -->
        <div class="col-md-4 mb-4">
            <div class="card h-100 shadow-sm">
                <div class="card-body d-flex flex-column">
                    <h5 class="card-title"><i class="fas fa-file-import mr-2"></i>Assessment Requests</h5>
                    <p class="card-text">Approve or reject requests from consultants to take paid assessments.</p>
                    <a href="{{ url_for('admin.manage_requests') }}" class="btn btn-warning mt-auto">Manage Requests</a>
                </div>
            </div>
        </div>

        <!-- User-Consultant Assignment Card -->
        <div class="col-md-4 mb-4">
            <div class="card h-100 shadow-sm">
                <div class="card-body d-flex flex-column">
                    <h5 class="card-title"><i class="fas fa-user-friends mr-2"></i>User Assignments</h5>
                    <p class="card-text">Assign users to consultants for better management and organization.</p>
                    <a href="{{ url_for('admin.assign_users_to_consultants') }}" class="btn btn-primary mt-auto">Assign Users</a>
                </div>
            </div>
        </div>
    </div>
</div>
{% endblock %}
