/* =========================================================
   BUA v2 — componentes de las páginas migradas
   Este archivo es NUEVO: no toca la home ni style.css.
   La home sigue con su propio home.css, intacto.
   Solo se carga en páginas ya migradas a v2.
   ========================================================= */

.v2-page {
  padding-bottom: 40px;
}

/* ===== CABECERA DE PÁGINA ===== */
.v2-pagehead {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  padding: 18px 0 10px;
}

.v2-pagehead h1 {
  margin: 12px 0 8px;
  font-size: clamp(2rem, 4.4vw, 3.2rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -.04em;
  color: var(--v2-ink);
}

.v2-pagehead p {
  max-width: 52ch;
  font-size: .92rem;
  color: var(--v2-muted);
}

.v2-pagehead-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* ===== FILTROS (PILLS) ===== */
.v2-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.v2-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 13px;
  border: 1px solid var(--v2-border);
  border-radius: 999px;
  background: var(--v2-surface);
  color: var(--v2-muted);
  font-size: .78rem;
  font-weight: 600;
  text-decoration: none;
  transition: border-color .18s var(--v2-ease), color .18s var(--v2-ease), background .18s var(--v2-ease);
}

.v2-pill:hover {
  border-color: var(--pill-color, var(--v2-ink));
  color: var(--v2-ink);
}

.v2-pill--active {
  border-color: var(--pill-color, var(--v2-ink));
  background: var(--pill-color, var(--v2-ink));
  color: #fff;
}

.v2-pill-n {
  display: inline-grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: rgba(0, 0, 0, .08);
  font-size: .64rem;
  font-weight: 700;
}

.v2-pill--active .v2-pill-n {
  background: rgba(255, 255, 255, .22);
}

/* ===== SELECTOR DE VISTAS (SEGMENTED) ===== */
.v2-segmented {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--v2-border);
  border-radius: 999px;
  background: var(--v2-surface-2);
}

.v2-segmented a {
  padding: 7px 14px;
  border-radius: 999px;
  color: var(--v2-muted);
  font-size: .76rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.v2-segmented a:hover {
  color: var(--v2-ink);
}

.v2-segmented a.activo {
  background: var(--v2-surface);
  color: var(--v2-ink);
  box-shadow: 0 1px 2px rgba(15, 42, 71, .08);
}

/* ===== ESTADO VACÍO ===== */
.v2-empty {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 24px;
  border: 1px dashed var(--v2-border);
  border-radius: 18px;
  background: var(--v2-surface-2);
}

.v2-empty-icon {
  display: grid;
  place-items: center;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--v2-surface);
  color: var(--v2-muted);
}

.v2-empty strong {
  display: block;
  font-size: .86rem;
  color: var(--v2-ink);
}

.v2-empty p {
  margin-top: 2px;
  font-size: .76rem;
  color: var(--v2-muted);
}

.v2-empty .v2-link {
  margin-top: 6px;
}

/* ===== ENLACE CON FLECHA ===== */
.v2-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex: 0 0 auto;
  color: var(--navy);
  font-size: .78rem;
  font-weight: 700;
  white-space: nowrap;
  text-decoration: none;
}

.v2-link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ===== RESPONSIVO ===== */
@media (max-width: 700px) {
  .v2-pagehead {
    align-items: flex-start;
    flex-direction: column;
  }
  .v2-empty {
    flex-direction: column;
    align-items: flex-start;
  }
  .v2-segmented {
    width: 100%;
    justify-content: space-between;
  }
  .v2-segmented a {
    flex: 1;
    text-align: center;
  }
}
