{# Card components #} {% macro card(title=None, subtitle=None, footer=false) %}
{% if title %}

{{ title }}

{% if subtitle %}

{{ subtitle }}

{% endif %}
{{ caller() if caller else '' }}
{% endif %}
{% block body %}{% endblock %}
{% if footer %}
{% block footer %}{% endblock %}
{% endif %}
{% endmacro %} {% macro stat_card(label, value, change=None, change_type="up", icon=None) %}
{{ label }}
{{ value }}
{% if change %}
{% if change_type == 'up' %} {% else %} {% endif %} {% if change_type == 'up' %}Increased{% else %}Decreased{% endif %} by {{ change }}
{% endif %}
{% endmacro %} {% macro stats_grid() %}
{{ caller() }}
{% endmacro %} {% macro description_list(items) %}
{% for item in items %}
{{ item.label }}
{% if item.type == 'badge' %} {{ item.value }} {% elif item.type == 'link' %} {{ item.value }} {% else %} {{ item.value or '-' }} {% endif %}
{% endfor %}
{% endmacro %} {% macro empty_state(title, description, action_text=None, action_url=None, icon=None) %}
{% if icon %}
{{ icon }}
{% else %} {% endif %}

{{ title }}

{{ description }}

{% if action_text and action_url %}
{{ action_text }}
{% endif %}
{% endmacro %}