                    {% if category.metrics|length > 0 %}
                                                <li class="nav-item" role="presentation">
                                                    <button class="nav-link {% if first_tab %}active{% endif %}" 
                                                            id="{{ category_key }}-tab" 
                                                            data-bs-toggle="tab" 
                                                            data-bs-target="#{{ 