<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Permission Denied</title>
    <style>
        body {
            font-family: Arial, sans-serif;
            text-align: center;
            padding: 50px;
            background-color: #f5f5f5;
        }
        .container {
            max-width: 600px;
            margin: 0 auto;
            background: white;
            padding: 40px;
            border-radius: 8px;
            box-shadow: 0 2px 10px rgba(0,0,0,0.1);
        }
        .error {
            color: #d32f2f;
            font-size: 18px;
            margin-bottom: 20px;
        }
        .details {
            color: #666;
            font-size: 14px;
            margin-bottom: 30px;
        }
        .back-btn {
            display: inline-block;
            padding: 10px 20px;
            background-color: #1976d2;
            color: white;
            text-decoration: none;
            border-radius: 4px;
            margin-right: 10px;
        }
        .back-btn:hover {
            background-color: #1565c0;
        }
    </style>
</head>
<body>
    <div class="container">
        <h1>🚫 Access Denied</h1>
        <p class="error">{{ error }}</p>
        
        {% if feature %}
        <div class="details">
            <strong>Feature:</strong> {{ feature }}<br>
            {% if required_permission %}
            <strong>Required Permission:</strong> {{ required_permission }}
            {% endif %}
        </div>
        {% endif %}
        
        <p>Contact your administrator if you believe this is an error.</p>
        
        <a href="javascript:history.back()" class="back-btn">Go Back</a>
    </div>
</body>
</html>