{%- if title|default('') -%}
{{ title }} - {{ app_name }} Admin
{%- else -%}
{{ app_name }} Admin
{%- endif -%}
{% if not admin_force_theme %}
{# Resolve theme choice before paint to avoid a flash of light/dark
mismatch. Storage key + resolver shape must match theme.js. #}
{% endif %}
{# Component CSS is compiled into the Tailwind build via
plain/admin/tailwind.css (auto-discovered by plain-tailwind). No
separate for component styles is needed here. #}
{% tailwind_css %}
{% htmx_js %}
{# Default text fonts. Override `{% block admin_fonts %}` to swap or
drop these — pair with `--font-sans` / `--font-mono` overrides on
`.plain-admin` so the cascade actually picks up the new family. #}
{% block admin_fonts %}
{% endblock %}
{# Declarative data-* behaviors (delegated handlers on document). #}
{# Stateful UI components — popover, dropdown-menu, hovercard. Init runs
on DOMContentLoaded + htmx:afterSwap; idempotent via data-* flags. #}
{% block header_scripts %}{% endblock %}
{% include "admin/_header.html" %}
{% block header %}
{# Breadcrumbs - small, above title #}
{% if parent_view_classes %}
{% endif %}
{# Title row with actions #}