{% extends 'base.html' %}
{% block title %}Access Denied — Rapha-Bethel BNPS{% endblock %}
{% block content %}
<div style="display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:60vh;text-align:center;padding:2rem">
    <div style="width:80px;height:80px;border-radius:50%;background:#fef2f2;display:flex;align-items:center;justify-content:center;margin-bottom:1.5rem">
        <i class="fas fa-lock" style="font-size:2rem;color:var(--rb-red)"></i>
    </div>
    <h1 style="font-size:1.4rem;font-weight:700;margin-bottom:.5rem">Access Denied</h1>
    <p style="color:#777;max-width:380px;margin-bottom:2rem;font-size:.9rem">
        {{ exception|default:"You don't have permission to view this page. If you believe this is a mistake, please contact your administrator." }}
    </p>
    <div style="display:flex;gap:.75rem;flex-wrap:wrap;justify-content:center">
        <a href="javascript:history.back()" class="btn btn-outline-secondary">
            <i class="fas fa-arrow-left me-1"></i> Go Back
        </a>
        <a href="{% url 'dashboard' %}" class="btn btn-rb-primary">
            <i class="fas fa-th-large me-1"></i> Dashboard
        </a>
    </div>
    {% if user.is_authenticated %}
    <p style="margin-top:2rem;font-size:.78rem;color:#bbb">
        Logged in as <strong>{{ user.get_full_name|default:user.username }}</strong>
        {% if user.staff_profile %} · {{ user.staff_profile.get_role_display }}{% endif %}
    </p>
    {% endif %}
</div>
{% endblock %}
