/* ==========================================================================
   PESTAÑAS — una sola forma: línea inferior en la pestaña activa.
   Cada módulo conserva sus clases porque su JavaScript depende de ellas;
   el aspecto se define solo aquí.
   ========================================================================== */
.view-tab-list,
.catalog-tabs,
.client-tabs,
.collection-tabs,
.k4-tabs,
.ilp-tabs,
.execution-tabs,
.tools-tabs,
.tools-loan-tabs,
.task-area-tabs,
.reports-nav,
.project-tabs {
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-end;
  gap: 2px 20px;
  margin: 0 0 var(--gap-md);
  padding: 0;
  overflow-x: auto;
  border: 0;
  border-bottom: 1px solid var(--line-strong);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  scrollbar-width: thin;
}

.view-tab-btn,
.catalog-tab,
.client-tab,
.collection-tab,
.k4-tab,
.ilp-tab,
.execution-tabs button,
.tools-tabs button,
.tools-loan-tabs a,
.task-area-tab,
.reports-nav a,
.project-tabs a {
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 7px;
  min-height: 44px;
  margin: 0;
  padding: 10px 2px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: var(--text);
  font-family: inherit;
  font-size: var(--fs-base);
  font-weight: var(--fw-medium);
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  appearance: none;
}

.view-tab-btn:hover,
.catalog-tab:hover,
.client-tab:hover,
.collection-tab:hover,
.k4-tab:hover,
.ilp-tab:hover,
.execution-tabs button:hover,
.tools-tabs button:hover,
.tools-loan-tabs a:hover,
.task-area-tab:hover,
.reports-nav a:hover,
.project-tabs a:hover {
  background: transparent;
  color: var(--brand-strong);
}

.view-tab-btn.is-active,
.catalog-tab.is-active,
.client-tab.is-active,
.collection-tab.is-active,
.k4-tab.is-active,
.ilp-tab.is-active,
.execution-tabs button.is-active,
.tools-tabs button[aria-selected="true"],
.tools-loan-tabs a.is-active,
.task-area-tab.is-active,
.reports-nav a.is-active,
.project-tabs a.is-active {
  background: transparent;
  box-shadow: none;
  color: var(--brand-strong);
  font-weight: var(--fw-semibold);
}

.view-tab-btn.is-active::after,
.catalog-tab.is-active::after,
.client-tab.is-active::after,
.collection-tab.is-active::after,
.k4-tab.is-active::after,
.ilp-tab.is-active::after,
.execution-tabs button.is-active::after,
.tools-tabs button[aria-selected="true"]::after,
.tools-loan-tabs a.is-active::after,
.task-area-tab.is-active::after,
.reports-nav a.is-active::after,
.project-tabs a.is-active::after {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 3px;
  background: var(--brand);
  content: "";
}

/* Contador o número dentro de la pestaña */
.catalog-tab > span,
.k4-tab > span,
.ilp-tab-count,
.execution-tabs button > span,
.tools-tabs button > span,
.tools-loan-tabs a > strong,
.project-tabs a > span {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  margin: 0;
  padding: 0 5px;
  border-radius: var(--radius-full);
  background: var(--surface-3);
  color: var(--text);
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  font-variant-numeric: tabular-nums;
}

.catalog-tab.is-active > span,
.k4-tab.is-active > span,
.execution-tabs button.is-active > span,
.tools-tabs button[aria-selected="true"] > span,
.tools-loan-tabs a.is-active > strong,
.project-tabs a.is-active > span {
  background: var(--brand-soft);
  color: var(--brand-strong);
}

.ilp-tab-count {
  background: var(--danger-bg);
  color: var(--danger);
}

.view-tab-panel {
  display: none;
}

.view-tab-panel.is-active {
  display: block;
}

.view-tabs,
.view-tab-panel-stack {
  display: grid;
  gap: var(--gap-lg);
}

.view-tabs > .view-tab-list {
  margin-bottom: 0;
}
