{% extends "layouts/base.html" %}
{% load i18n %}

{% block title %}{% trans "No Hospital Assigned" %} - PX360{% endblock %}

{% block content %}
<div class="container mt-5">
    <div class="row justify-content-center">
        <div class="col-md-6">
            <div class="card shadow border-danger">
                <div class="card-body text-center py-5">
                    <div class="mb-4">
                        <i class="fas fa-exclamation-circle text-danger" style="font-size: 4rem;"></i>
                    </div>

                    <h3 class="card-title text-danger mb-3">
                        {% trans "No Hospital Assigned" %}
                    </h3>

                    <p class="card-text text-muted mb-4">
                        {% trans "Your account does not have a hospital assigned. Please contact your administrator to assign you to a hospital before accessing the system." %}
                    </p>

                    <div class="alert alert-info">
                        <i class="fas fa-info-circle me-2"></i>
                        <strong>{% trans "Information:" %}</strong>
                        <ul class="mb-0 mt-2 text-start">
                            <li>{% trans "Email:" %} {{ request.user.email }}</li>
                            <li>{% trans "Name:" %} {{ request.user.get_full_name }}</li>
                        </ul>
                    </div>

                    <div class="mt-4">
                        <a href="{% url 'accounts:logout' %}" class="btn btn-outline-danger" onclick="return confirmLogout()">
                            <i class="fas fa-sign-out-alt me-2"></i>
                            {% trans "Logout" %}
                        </a>
                    </div>
                </div>
            </div>

            <div class="card mt-4">
                <div class="card-body">
                    <h5 class="card-title">
                        <i class="fas fa-question-circle me-2"></i>
                        {% trans "Need Help?" %}
                    </h5>
                    <p class="card-text text-muted small">
                        {% trans "If you believe this is an error, please contact your PX360 administrator or IT support team for assistance." %}
                    </p>
                </div>
            </div>
        </div>
    </div>
</div>

<script>
function confirmLogout() {
    return confirm("{% trans 'Are you sure you want to logout?' %}");
}
</script>
{% endblock %}
