<div class="card shadow-sm p-3 mb-4">
    <h6>Top Risk Tenants</h6>

    <table class="table table-sm">
        <thead>
            <tr>
                <th>Tenant</th>
                <th>Score</th>
                <th>Risk</th>
            </tr>
        </thead>
        <tbody>
            {% for t in tenants %}
            <tr>
                <td>{{ t.tenant.username }}</td>
                <td>{{ t.score }}</td>
                <td>
                    <span class="badge bg-{% if t.risk == 'High' %}danger{% elif t.risk == 'Medium' %}warning{% else %}success{% endif %}">
                        {{ t.risk }}
                    </span>
                </td>
            </tr>
            {% endfor %}
        </tbody>
    </table>
</div>