{% extends "base.html" %}
{% block title %}New Ticket - Support Center{% endblock %}

{% block content %}
<div class="row justify-content-center">
    <div class="col-md-8 col-lg-6">
        <div class="mb-4">
            <a href="{% url 'dashboard' %}" class="text-decoration-none text-muted small">&larr; Back to Dashboard</a>
        </div>
        
        <div class="card p-4 p-md-5">
            <h2 class="mb-4">Submit a Ticket</h2>
            <p class="text-muted mb-5">Please fill out the form below and our team will get back to you as soon as possible.</p>
            
            <form method="post">
                {% csrf_token %}
                {% for field in form %}
                    <div class="mb-4">
                        <label for="{{ field.id_for_label }}" class="form-label fw-semibold small">{{ field.label }}</label>
                        {{ field }}
                        {% if field.errors %}
                            <div class="text-danger small mt-1">{{ field.errors|first }}</div>
                        {% endif %}
                    </div>
                {% endfor %}
                
                <div class="d-grid mt-5">
                    <button type="submit" class="btn btn-primary btn-lg">Create Ticket</button>
                </div>
            </form>
        </div>
    </div>
</div>
{% endblock %}
