{% extends 'tasks/base.html' %}

{% block title %}Register{% endblock %}

{% block content %}
<div class="container">
    <div class="row justify-content-center mt-5">
        <div class="col-md-5">
            <div class="card shadow">
                <div class="card-header bg-success text-white text-center">
                    <h3><i class="bi bi-person-plus"></i> Create Account</h3>
                    <p class="mb-0">Join Task Manager today</p>
                </div>
                <div class="card-body">
                    <form method="POST">
                        {% csrf_token %}
                        <div class="mb-3">
                            <label for="id_username" class="form-label">Username</label>
                            <input type="text" class="form-control" id="id_username" name="username" required>
                            <small class="text-muted">Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.</small>
                        </div>
                        <div class="mb-3">
                            <label for="id_password1" class="form-label">Password</label>
                            <input type="password" class="form-control" id="id_password1" name="password1" required>
                            <small class="text-muted">Your password must contain at least 8 characters.</small>
                        </div>
                        <div class="mb-3">
                            <label for="id_password2" class="form-label">Confirm Password</label>
                            <input type="password" class="form-control" id="id_password2" name="password2" required>
                        </div>
                        <button type="submit" class="btn btn-success w-100">
                            <i class="bi bi-person-check"></i> Register
                        </button>
                    </form>
                </div>
                <div class="card-footer text-center">
                    Already have an account? <a href="{% url 'login' %}">Login here</a>
                </div>
            </div>
        </div>
    </div>
</div>
{% endblock %}