{% load static %}
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>
        {% if status == "404" %}
            Error 404 - Page Not Found
        {% elif status == "500" %}
            Error 500 - Server Error
        {% elif status == "503" %}
            Error 503 - Service Unavailable
        {% else %}
            Error
        {% endif %}
    </title>
    <link rel="icon" type="image/icon" href="{% static DOMAIN_ICON %}">
    <style>
        /* Same styles as before */
        body {
            font-family: 'Arial', sans-serif;
            background-color: #f4f4f4;
            display: flex;
            justify-content: center;
            align-items: center;
            height: 100vh;
            margin: 0;
        }
        .error-container {
            background-color: white;
            padding: 2rem;
            border-radius: 8px;
            box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
            text-align: center;
            max-width: 400px;
        }
        h1 {
            color: #e74c3c;
            margin-bottom: 1rem;
        }
        p {
            color: #34495e;
            margin-bottom: 1.5rem;
        }
        a {
            display: inline-block;
            background-color: #3498db;
            color: white;
            padding: 0.5rem 1rem;
            text-decoration: none;
            border-radius: 4px;
            transition: background-color 0.3s ease;
        }
        a:hover {
            background-color: #2980b9;
        }
    </style>
</head>

<body>
    <div class="error-container">
        {% if status == "404" %}
            <h1>404 - Page Not Found</h1>
            <p>{{error_message}}</p>
        {% elif status == "500" %}
            <h1>500 - Server Error</h1>
            <p>{{error_message}}</p>
        {% elif status == "503" %}
            <h1>503 - Service Unavailable</h1>
            <p>{{error_message}}</p>
        {% else %}
            <h1>Error</h1>
            <p>{{error_message}}</p>
        {% endif %}

        {% if admin %}
            <a href="{% url 'admin_dashboard' %}">Go to Admin Dashboard</a>
        {% elif gate_keeper %}
            <a href="{% url 'gate_keeper_dashboard' %}">Go to Gate Keeper Dashboard</a>
        {% elif employee %}
            <a href="{% url 'employee_dashboard' %}">Go to Employee Dashboard</a>
        {% else %}
            <a href="/">Go to Login</a>
        {% endif %}
    </div>
</body>
</html>
