{% extends 'allianceauth/base-bs5.html' %}
{% load i18n %}
{% load navactive %}

{% block page_title %}{{ page_title }} - {% translate "Ship Mastery" %}{% endblock %}

{% block header_nav_brand %}{% translate "Ship Mastery" %}{% endblock %}

{% block header_nav_collapse_left %}
{% if perms.mastery.basic_access %}
<li class="nav-item">
    <a class="nav-link {% navactive request 'mastery:pilot_index' %}" href="{% url 'mastery:pilot_index' %}">
        {% translate 'Skill Mastery' %}
    </a>
</li>
{% endif %}
{% if perms.mastery.doctrine_summary %}
<li class="nav-item">
    <a class="nav-link {% navactive request 'mastery:summary_list' %}" href="{% url 'mastery:summary_list' %}">
        {% translate 'Doctrine Summary' %}
    </a>
</li>
{% endif %}
{% if perms.mastery.manage_summary_groups %}
<li class="nav-item">
    <a class="nav-link {% navactive request 'mastery:summary_settings' %}" href="{% url 'mastery:summary_settings' %}">
        {% translate 'Summary Group Settings' %}
    </a>
</li>
{% endif %}
{% if perms.mastery.manage_fittings %}
<li class="nav-item">
    <a class="nav-link {% navactive request 'mastery:doctrine_list' %}" href="{% url 'mastery:doctrine_list' %}">
        {% translate 'Manage Skill Plans' %}
    </a>
</li>
{% endif %}
{% endblock header_nav_collapse_left %}

{% block header_nav_user_character_control %}
{% comment %}
This block is left empty intentionally to disable defaults.
{% endcomment %}
{% endblock %}

{% block content %}
<div class="mastery-page">
    {% block details %}{% endblock %}
</div>
{% endblock %}

<style>
    .mastery-page .card.border-0.shadow-sm {
        box-shadow: 0 0.42rem 1.08rem rgba(17, 24, 39, 0.12) !important;
        border: 1px solid rgba(17, 24, 39, 0.1) !important;
    }

    /* Unified table header styling */
    .mastery-page .mastery-table-head th,
    .mastery-page .mastery-summary-thead th {
        background-color: var(--bs-tertiary-bg, #f1f3f5);
        color: var(--bs-emphasis-color, var(--bs-body-color));
        border-bottom: 2px solid var(--bs-border-color, #dee2e6);
        font-weight: 600;
        padding: 0.75rem;
    }

    html[data-bs-theme="dark"] .mastery-page .card.border-0.shadow-sm,
    body[data-bs-theme="dark"] .mastery-page .card.border-0.shadow-sm,
    html[data-theme*="dark"] .mastery-page .card.border-0.shadow-sm,
    body[data-theme*="dark"] .mastery-page .card.border-0.shadow-sm {
        border-color: rgba(255, 255, 255, 0.14) !important;
    }

    @media (prefers-color-scheme: dark) {
        .mastery-page .mastery-table-head th,
        .mastery-page .mastery-summary-thead th {
            background-color: #343a40;
            color: #e9ecef;
            border-bottom-color: #495057;
        }
    }

    html[data-bs-theme="dark"] .mastery-page .mastery-table-head th,
    body[data-bs-theme="dark"] .mastery-page .mastery-table-head th,
    html[data-theme*="dark"] .mastery-page .mastery-table-head th,
    body[data-theme*="dark"] .mastery-page .mastery-table-head th,
    html[data-bs-theme="dark"] .mastery-page .mastery-summary-thead th,
    body[data-bs-theme="dark"] .mastery-page .mastery-summary-thead th,
    html[data-theme*="dark"] .mastery-page .mastery-summary-thead th,
    body[data-theme*="dark"] .mastery-page .mastery-summary-thead th {
        background-color: #343a40;
        color: #e9ecef;
        border-bottom-color: #495057;
    }
</style>
