/* ===========================
   Panel lateral
   =========================== */
.sidepanel-card { max-height: calc(100vh - 2rem); }
@media (min-width: 992px) { .sidepanel-card { height: auto; } }
.sidepanel-header {
  position: sticky; top: 0; z-index: 2;
  background: var(--bs-card-cap-bg, #fff);
  border-bottom: 1px solid var(--bs-border-color);
}
.sidepanel-body { overflow: auto; }
.sidepanel-body .btn, .sidepanel-body .btn-group { width: 100%; }
@media (max-width: 575.98px) {
  .sidepanel-body .btn, .sidepanel-body .btn-group { font-size: .95rem; }
}
.sidepanel-body::-webkit-scrollbar { width: 8px; }
.sidepanel-body::-webkit-scrollbar-thumb { background: rgba(0,0,0,.15); border-radius: 4px; }
.sidepanel-body::-webkit-scrollbar-track { background: transparent; }

/* ===========================
   Chips
   =========================== */
.badge.chip {
  font-weight: 500;
  padding: .35rem .5rem;
  border-radius: 999px;
  line-height: 1;
  cursor: pointer;
}
.badge.chip a { color: inherit; text-decoration: none; }
.badge.chip.chip-active { box-shadow: inset 0 0 0 1px rgba(0,0,0,.15); }
.badge.chip.chip-ring { box-shadow: 0 0 0 2px rgba(0,0,0,.15); }

/* ===========================
   Accesibilidad
   =========================== */
@media (prefers-reduced-motion: reduce) { .collapse { transition: none !important; } }
@media (prefers-color-scheme: dark) {
  .sidepanel-header { background: var(--bs-card-cap-bg, #1f1f1f); border-bottom-color: rgba(255,255,255,.15); }
  .sidepanel-body::-webkit-scrollbar-thumb { background: rgba(255,255,255,.2); }
}

/* ===========================
   Hover tablas
   =========================== */
.table-hover tbody tr:hover { background-color: rgba(17,24,39,.035); }

/* ===========================
   Dashboard Pro (base)
   =========================== */
.kpi-card {
  border: 0 !important;
  border-radius: 16px;
  box-shadow: 0 6px 24px rgba(16,24,40,.06);
  transition: transform .15s ease, box-shadow .15s ease;
  background: #fff;
}
.kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(16,24,40,.10);
}
.kpi-head {
  color: #667085;
  font-size: .85rem;
  margin-bottom: .35rem;
}
.kpi-value {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.1;
}
.kpi-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  display: grid; place-items: center;
  background: #e9eef3;            /* un poco más notorio */
  box-shadow: inset 0 1px 0 rgba(255,255,255,.7);
  font-size: 1.4rem;
}

/* ===== KPIs con marco (más visibles) ===== */
.kpi-card--framed {
  border: 1px solid #cbd5e1 !important;      /* slate-300 */
  box-shadow: 0 6px 22px rgba(16,24,40,.10) !important;
  border-radius: 16px !important;
  background: #ffffff;
}
.kpi-card--framed .card-body { padding: 1.1rem 1.25rem; }
.kpi-card--framed:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 28px rgba(16,24,40,.14);
}

/* ===========================
   Secciones (tablas/listados)
   =========================== */
.section-card {
  border: 1px solid #dbe1e8 !important;      /* sutil pero visible */
  border-radius: 16px;
  box-shadow: 0 6px 22px rgba(16,24,40,.08) !important;
  background: #fff;
  overflow: hidden;                           /* header pegado */
}
.section-card .card-header {
  background: #cedaeb;                        /* más contraste */
  border-bottom: 1px solid #e5e9f0;
  font-weight: 600;
  color: #334155;                              /* slate-700 */
}

/* ===========================
   Lista métrica (Top técnicos)
   =========================== */
.metric-list .list-group-item {
  display: flex; justify-content: space-between; align-items: center;
  border: 0; border-bottom: 1px solid #eef2f7;
}
.metric-list .list-group-item:last-child { border-bottom: 0; }

/* ===========================
   Chips suaves de texto
   =========================== */
.badge-soft {
  background: #f2f4f7;
  color: #344054;
  border-radius: 999px;
  font-weight: 600;
}

/* ===========================
   Helpers
   =========================== */
.gap-10 { gap: 2.5rem; }
.text-muted-2 { color: #667085 !important; }

/* ===========================
   Progreso por prioridad
   =========================== */
.prio-bars .bar {
  height: 8px; border-radius: 999px; background: #eef2f7;
  overflow: hidden;
}
.prio-bars .fill {
  height: 100%;
  background: linear-gradient(90deg, rgba(59,130,246,.9), rgba(56,189,248,.9));
}

/* ===========================
   Tablas (encabezado más legible)
   =========================== */
.table thead th {
  color: #334155;                /* slate-700 */
  border-bottom-color: #e5e7eb;  /* separador más claro */
  white-space: nowrap;
  vertical-align: middle;
  font-size: .82rem;
}

/* ===========================
   Modo oscuro (bordes/contraste)
   =========================== */
@media (prefers-color-scheme: dark) {
  .kpi-card--framed { border-color: rgba(255,255,255,.18) !important; }
  .section-card     { border-color: rgba(255,255,255,.14) !important; }
  .kpi-card .kpi-icon { background: rgba(255,255,255,.08); }
  .section-card .card-header {
    background: rgba(255,255,255,.06);
    border-bottom-color: rgba(255,255,255,.12);
    color: #e5e7eb;
  }
}
/* ===== Badges personalizados para dashboard ===== */

/* Badge rojo: tokens vigentes */
.badge-vigentes {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 2;
  transform: translate(60%, -60%); /* ajusta aquí separación horizontal y vertical */
}

/* Badge azul: solicitudes últimos 7 días */
.badge-7d {
  position: absolute;
  bottom: 0;
  right: 0;
  z-index: 1;
  transform: translate(60%, 60%); /* ajusta aquí separación horizontal y vertical */
}
