<div class="card" style="border-left: 3px solid {% if report.missing_files.is_empty() && report.modified_files.is_empty() %}var(--success){% else %}var(--danger){% endif %}">
    <h2>Integrity</h2>
    {% if report.missing_files.is_empty() && report.modified_files.is_empty() && report.untracked_dirs.is_empty() %}
    <p class="text-muted">{{ report.tracked_files }} tracked files — all present, hashes match.</p>
    {% else %}
    <table>
        <tr><th style="width:140px">Tracked</th><td>{{ report.tracked_files }} files</td></tr>
        {% if !report.missing_files.is_empty() %}
        <tr><th>Missing</th><td><span class="badge badge-danger">{{ report.missing_files.len() }}</span></td></tr>
        {% endif %}
        {% if !report.modified_files.is_empty() %}
        <tr><th>Modified</th><td><span class="badge badge-warning">{{ report.modified_files.len() }}</span></td></tr>
        {% endif %}
        {% if !report.untracked_dirs.is_empty() %}
        <tr><th>Untracked</th><td class="text-muted">{{ report.untracked_dirs.len() }} director{% if report.untracked_dirs.len() != 1 %}ies{% else %}y{% endif %}</td></tr>
        {% endif %}
    </table>
    {% endif %}
</div>
