{% extends "admin/change_list.html" %}
{% load i18n admin_urls static admin_list %}

{% block result_list %}
    {{ block.super }}

    {% if summary_stats %}
    <div style="margin-top: 20px; padding: 16px; background: #ffffff; border-radius: 4px; border: 1px solid #ddd; box-shadow: 0 1px 3px rgba(0,0,0,0.1);">
        <h3 style="margin-top: 0; margin-bottom: 12px; font-size: 14px; font-weight: 600; color: #333;">📊 Summary Statistics</h3>
        <div style="display: flex; gap: 24px; flex-wrap: wrap; color: #333;">
            <div style="color: #333;">
                <strong>{{ summary_stats.total }}</strong> migration{{ summary_stats.total|pluralize }} stored
            </div>
            <div style="color: #28a745;">
                <strong>✓ {{ summary_stats.verified }}</strong> verified
            </div>
            {% if summary_stats.missing > 0 %}
            <div style="color: #856404;">
                <strong>⚠ {{ summary_stats.missing }}</strong> missing file{{ summary_stats.missing|pluralize }}
            </div>
            {% endif %}
            {% if summary_stats.differs > 0 %}
            <div style="color: #c82333;">
                <strong>✗ {{ summary_stats.differs }}</strong> code mismatch{{ summary_stats.differs|pluralize:"es" }}
            </div>
            {% endif %}
            {% if summary_stats.unknown > 0 %}
            <div style="color: #6c757d;">
                <strong>? {{ summary_stats.unknown }}</strong> unknown
            </div>
            {% endif %}
        </div>
    </div>
    {% endif %}
{% endblock %}
