{# Card Component - Reusable card macro for consistent styling #} {% macro card(title=None, subtitle=None, icon=None, class="", footer=None, highlight=False) %}
{% if title or icon %}
{% if icon %}
{{ icon | safe }}
{% endif %}
{% if title %}

{{ title }}

{% endif %} {% if subtitle %}

{{ subtitle }}

{% endif %}
{% endif %}
{{ caller() }}
{% if footer %}
{{ footer | safe }}
{% endif %}
{% endmacro %} {# Card Grid - Stat Card variant for displaying key metrics #} {% macro stat_card(label, value, trend=None, trend_label=None, icon=None, class="") %}

{{ label }}

{{ value }}

{% if trend and trend_label %}

{{ '+' if trend > 0 else '' }}{{ trend }}% {{ trend_label }}

{% endif %}
{% if icon %}
{{ icon | safe }}
{% endif %}
{% endmacro %} {# Empty State Card #} {% macro empty_card(title="No data available", description="", icon=None, action_text=None, action_url=None) %}
{% if icon %}
{{ icon | safe }}
{% endif %}

{{ title }}

{% if description %}

{{ description }}

{% endif %} {% if action_text and action_url %} {{ action_text }} {% endif %}
{% endmacro %} {# Hover Card - Interactive card variant #} {% macro hover_card(title, description, link="#", class="") %}

{{ title }}

{{ description }}

Learn more
{% endmacro %}