{# Performance caveat: always show when filter active, even on empty DB. #}
{% set _active_tab_for_caveat = tab_view if tab_view is defined else view %}
{% if account_filter_active and _active_tab_for_caveat == "performance" and not has_any_tax_data %}
Carryforward applied is taxpayer-level, not per-account. §1212(b) ST/LT netting and the §1211 $3,000 cap can't be partitioned by account.
{% endif %}
{% if not has_any_tax_data %}
{% with
es_icon="landmark",
es_title="No tax data yet",
es_body="Realized P&L, wash sales, and the harvest planner light up after your first import.",
es_primary_label="Take the tour",
es_primary_href="/welcome",
es_secondary_label="Import CSV",
es_secondary_href="/imports"
%}
{% include "_empty_state_hero.html" %}
{% endwith %}
{% else %}
{% if accounts_available %}
{% import "_account_multi_select.html" as macros_acc %}
{% endif %}
{% set _active_tab = tab_view if tab_view is defined else view %}
{% if _active_tab == "wash-sales" %}
{% include "_tax_wash_sales_tab.html" with context %}
{% elif _active_tab == "projection" %}
{% include "_projection_tab.html" with context %}
{% elif _active_tab == "performance" %}
{% include "_tax_performance_panel.html" with context %}
{% endif %}