{% extends "base.html" %}
{% load static %}

{% block title %}Super Admin -- {{ PLATFORM_NAME }}{% endblock %}

{% block content %}
<div class="dash-layout container py-6">
    <!-- Super Admin Header Navigation -->
    <div class="flex justify-between items-center mb-8 pb-4" style="border-bottom: 2px solid var(--color-primary-100);">
        <div>
            <span class="badge badge--live mb-1">Super Admin Console</span>
            <h1 style="font-size: var(--font-size-2xl); font-weight: 800; color: var(--color-primary-dark);">Platform Control Center</h1>
        </div>
        <div class="flex gap-2">
            <a href="{% url 'core_auth:logout' %}" class="btn btn--ghost btn--sm" style="color:var(--color-error);">Log Out</a>
        </div>
    </div>

    <!-- Super Admin Nav Pills -->
    <div class="flex gap-2 mb-8" style="overflow-x: auto; padding-bottom: 8px;">
        <a href="{% url 'superadmin:overview' %}" class="btn btn--sm {% if request.resolver_match.url_name == 'overview' %}btn--primary{% else %}btn--secondary{% endif %}">
            📊 Overview
        </a>
        <a href="{% url 'superadmin:businesses' %}" class="btn btn--sm {% if request.resolver_match.url_name == 'businesses' or request.resolver_match.url_name == 'business_detail' %}btn--primary{% else %}btn--secondary{% endif %}">
            🏢 Businesses
        </a>
        <a href="{% url 'superadmin:sales' %}" class="btn btn--sm {% if request.resolver_match.url_name == 'sales' %}btn--primary{% else %}btn--secondary{% endif %}">
            ⚡ All Sales
        </a>
        <a href="{% url 'superadmin:orders' %}" class="btn btn--sm {% if request.resolver_match.url_name == 'orders' %}btn--primary{% else %}btn--secondary{% endif %}">
            🛒 All Orders
        </a>
        <a href="{% url 'superadmin:payments' %}" class="btn btn--sm {% if request.resolver_match.url_name == 'payments' %}btn--primary{% else %}btn--secondary{% endif %}">
            💳 Payments
        </a>
        <a href="{% url 'superadmin:analytics' %}" class="btn btn--sm {% if request.resolver_match.url_name == 'analytics' %}btn--primary{% else %}btn--secondary{% endif %}">
            📈 Analytics
        </a>
        <a href="{% url 'superadmin:settings' %}" class="btn btn--sm {% if request.resolver_match.url_name == 'settings' %}btn--primary{% else %}btn--secondary{% endif %}">
            ⚙️ Settings
        </a>
        <a href="{% url 'superadmin:audit_logs' %}" class="btn btn--sm {% if request.resolver_match.url_name == 'audit_logs' %}btn--primary{% else %}btn--secondary{% endif %}">
            📋 Audit Logs
        </a>
    </div>

    {% block superadmin_content %}{% endblock %}
</div>
{% endblock %}
