{% macro page_header(icon_class, title_text, subtitle_text=None, actions_html=None) %}
<div class="card stats-card hover-lift mb-4">
    <div class="card-body d-flex flex-column flex-md-row justify-content-between align-items-start align-items-md-center">
        <div class="mb-3 mb-md-0">
            <h1 class="h3 mb-1">{% if icon_class %}<i class="{{ icon_class }} me-2"></i>{% endif %}{{ title_text }}</h1>
            {% if subtitle_text %}
            <p class="mb-0">{{ subtitle_text }}</p>
            {% endif %}
        </div>
        <div class="d-flex flex-wrap gap-2">
            {{ actions_html|safe if actions_html }}
        </div>
    </div>
</div>
{% endmacro %}

{% macro summary_card(icon_class, icon_color, label, value) %}
<div class="card border-0 shadow-sm h-100 summary-card">
    <div class="card-body p-3">
        <div class="d-flex align-items-center">
            <div class="flex-shrink-0">
                <div class="summary-icon bg-{{ icon_color }} bg-opacity-10 text-{{ icon_color }}">
                    <i class="{{ icon_class }}"></i>
                </div>
            </div>
            <div class="flex-grow-1 ms-3">
                <div class="summary-label">{{ label }}</div>
                <div class="summary-value">{{ value }}</div>
            </div>
        </div>
    </div>
</div>
{% endmacro %}


