{% extends "base.html" %}

{% block title %}Error{% endblock %}

{% block content %}
<div class="container mt-5">
    <div class="row justify-content-center">
        <div class="col-md-6">
            <div class="text-center">
                <i class="fas fa-exclamation-triangle fa-5x text-warning mb-4"></i>
                <h1 class="display-4">{{ error_code | default('Error') }}</h1>
                <p class="lead">{{ error_message | default('An unexpected error occurred.') }}</p>
                
                {% if error_details %}
                <div class="alert alert-danger text-start mt-4">
                    <h6 class="alert-heading">Error Details:</h6>
                    <pre class="mb-0">{{ error_details }}</pre>
                </div>
                {% endif %}
                
                <div class="mt-4">
                    <a href="{{ url_for('index') }}" class="btn btn-primary me-2">
                        <i class="fas fa-home me-1"></i>Go to Dashboard
                    </a>
                    <button onclick="history.back()" class="btn btn-outline-secondary">
                        <i class="fas fa-arrow-left me-1"></i>Go Back
                    </button>
                </div>
            </div>
        </div>
    </div>
</div>
{% endblock %}
