.indicadores-shell {
  padding-bottom: 1.25rem;
}

.indicadores-shell .tab-content.card {
  border-radius: 14px;
  overflow: hidden;
}

/* ── Panel: barra de filtros ─────────────────────────────────────────── */
.ind-filtro-bar {
  padding: .75rem 1rem;
  border-radius: .5rem;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.03);
}

.ind-filtro-label {
  display: block;
  font-size: .7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
  opacity: .6;
  margin-bottom: .2rem;
}

/* ── Panel: chips de meta por indicador ─────────────────────────────── */
.ind-meta-chip {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: .67rem;
  font-weight: 600;
  background: rgba(0,123,255,.12);
  color: #74b1f7;
  border: 1px solid rgba(0,123,255,.18);
  white-space: nowrap;
}

/* ── Panel: chips de estadísticas ───────────────────────────────────── */
.ind-stat-chip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 9px;
  border-radius: 10px;
  font-size: .78rem;
  font-weight: 700;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.08);
}

.ind-stat-chip small {
  font-size: .63rem;
  font-weight: 400;
  opacity: .65;
}

/* ── Reporte PDF: pills de mes ──────────────────────────────────────── */
.ind-mes-pdf-pill {
  font-size: .73rem !important;
  transition: all .15s;
}

.ind-mes-pdf-pill.active {
  background-color: #17a2b8 !important;
  border-color: #17a2b8 !important;
  color: #fff !important;
}

/* ── Cards del panel y comités: solo estructura ───────────────────────── */
#panel_indicadores .card,
#comites_gerencia .card {
  border-radius: 12px;
  box-shadow: 0 4px 18px rgba(0,0,0,.18);
  overflow: hidden;
}

/* ── Tabs de admin (Crear / Editar) ──────────────────────────────────── */
.indicadores-admin-tabs {
  gap: .5rem;
  margin-bottom: 1rem;
  border-bottom: 0;
}

.indicadores-admin-tabs .nav-link {
  border-radius: .25rem;
  padding: .65rem 1rem;
  font-weight: 600;
  min-width: 0;
}

/* ── Badge de siglas de proceso ──────────────────────────────────────── */
.indicadores-admin-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 4px;
  background: rgba(26, 86, 219, 0.18);
  color: #74b1f7;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}

/* ── Toolbar del admin ───────────────────────────────────────────────── */
.indicadores-admin-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.indicadores-admin-search {
  min-width: min(100%, 320px);
  max-width: 420px;
}

/* ── Grid de tarjetas de edición ─────────────────────────────────────── */
.indicadores-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 1.1rem;
}

/* ── Tarjeta de edición (estructura, sin color hardcodeado) ──────────── */
.indicadores-edit-card {
  border-radius: .35rem;
  overflow: hidden;
  transition: transform .18s ease, box-shadow .18s ease;
  border: 1px solid rgba(255,255,255,.08);
}

.indicadores-edit-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 0.5rem 1.2rem rgba(0,0,0,.25);
}

.indicadores-edit-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: .75rem;
  padding: 1rem 1rem .8rem;
  border-bottom: 1px solid rgba(255,255,255,.07);
}

.indicadores-edit-card-body {
  padding: 1rem;
}

.indicadores-edit-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .75rem;
  margin-bottom: .9rem;
}

.indicadores-edit-stat {
  padding: .75rem .85rem;
  border-radius: .25rem;
  border: 1px solid rgba(255,255,255,.07);
}

.indicadores-edit-stat small {
  display: block;
  font-size: .72rem;
  opacity: .65;
  margin-bottom: .15rem;
}

.indicadores-edit-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  flex-wrap: wrap;
  margin-top: 1rem;
  padding-top: .9rem;
  border-top: 1px solid rgba(255,255,255,.07);
}

/* ══════════════════════════════════════════════════════════════════════
   IEC — Indicador Edit Card rediseñado (lista colapsable)
   Reemplaza el grid de tarjetas siempre-expandidas por una lista donde
   cada indicador muestra un resumen en la cabecera y el formulario
   completo se despliega al hacer clic.
══════════════════════════════════════════════════════════════════════ */
.iec-list {
  display: flex;
  flex-direction: column;
  gap: .45rem;
}

.iec {
  border-radius: .4rem;
  border: 1px solid rgba(255,255,255,.08);
  overflow: hidden;
  transition: box-shadow .18s ease, border-color .18s ease;
}
.iec.is-open {
  box-shadow: 0 4px 20px rgba(0,0,0,.32);
  border-color: rgba(255,193,7,.4);
}

/* ── Cabecera siempre visible ──────────────────────────────────────── */
.iec-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding: .65rem 1rem;
  cursor: pointer;
  user-select: none;
  transition: background .15s;
}
.iec-header:hover { background: rgba(255,255,255,.04); }
.iec.is-open .iec-header { border-bottom: 1px solid rgba(255,255,255,.09); }

.iec-header-main {
  display: flex;
  align-items: center;
  gap: .6rem;
  flex: 1;
  min-width: 0;
}

.iec-nombre {
  margin: 0;
  font-size: .84rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  min-width: 0;
}

.iec-chips {
  display: flex;
  align-items: center;
  gap: .3rem;
  flex-shrink: 0;
}
@media (max-width: 820px) { .iec-chips { display: none; } }

.iec-chip {
  font-size: .63rem;
  padding: 1px 7px;
  border-radius: 999px;
  background: rgba(255,255,255,.07);
  color: rgba(255,255,255,.55);
  white-space: nowrap;
  border: 1px solid rgba(255,255,255,.08);
}
.iec-chip.chip-ok { background: rgba(40,167,69,.15); color: #6fcf97; border-color: rgba(40,167,69,.2); }

.iec-header-right {
  display: flex;
  align-items: center;
  gap: .45rem;
  flex-shrink: 0;
}

.iec-chevron {
  font-size: .72rem;
  opacity: .45;
  transition: transform .22s ease;
}
.iec.is-open .iec-chevron { transform: rotate(180deg); opacity: .8; }

/* ── Cuerpo desplegable ────────────────────────────────────────────── */
.iec-body {
  padding: 1rem 1rem .9rem;
}

.iec-section {
  margin-bottom: .9rem;
  padding-bottom: .85rem;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.iec-section:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }

.iec-section-label {
  display: block;
  font-size: .62rem;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: rgba(255,193,7,.7);
  margin-bottom: .55rem;
}

.iec-field-label {
  display: block;
  font-size: .71rem;
  opacity: .6;
  margin-bottom: .28rem;
}

/* ── Etiqueta de sección dentro del modal de edición ──────────────── */
.mie-section-label {
  font-size: .62rem;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: rgba(255,193,7,.7);
  margin-bottom: .45rem;
}

/* ── Campo Fórmula ─────────────────────────────────────────────────── */
.formula-fx-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(30,149,185,.18);
  color: #1e95b9;
  font-weight: 700;
  font-size: .65rem;
  padding: 1px 5px;
  border-radius: 3px;
  letter-spacing: .03em;
  line-height: 1.4;
}
.formula-input-group .formula-input-prefix {
  background: rgba(30,149,185,.1);
  border-color: rgba(30,149,185,.35);
  color: #1e95b9;
  font-weight: 700;
  font-size: .95rem;
  padding: 0 .65rem;
}
.formula-input-group .formula-input {
  font-family: 'Courier New', Courier, monospace;
  font-size: .82rem;
  letter-spacing: .01em;
  border-left: none;
  border-color: rgba(30,149,185,.35);
  background: rgba(30,149,185,.04);
}
.formula-input-group .formula-input:focus {
  border-color: #1e95b9;
  box-shadow: 0 0 0 .15rem rgba(30,149,185,.2);
  background: rgba(30,149,185,.07);
}
@media (prefers-color-scheme: light) {
  .formula-fx-badge { background: rgba(23,118,147,.12); color: #176a93; }
  .formula-input-group .formula-input-prefix { background: rgba(23,118,147,.08); color: #176a93; border-color: rgba(23,118,147,.3); }
  .formula-input-group .formula-input { background: rgba(23,118,147,.03); border-color: rgba(23,118,147,.3); }
  .formula-input-group .formula-input:focus { border-color: #176a93; box-shadow: 0 0 0 .15rem rgba(23,118,147,.18); background: rgba(23,118,147,.06); }
}

/* ── Pill groups (opción visual en lugar de <select>) ──────────────── */
.iec-pill-group {
  display: flex;
  flex-wrap: wrap;
  gap: .28rem;
}

.iec-pill {
  padding: 3px 11px;
  font-size: .71rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.14);
  background: transparent;
  color: rgba(255,255,255,.6);
  cursor: pointer;
  transition: all .13s ease;
  line-height: 1.6;
}
.iec-pill:hover {
  border-color: rgba(255,193,7,.55);
  color: rgba(255,255,255,.9);
  background: rgba(255,193,7,.07);
}
.iec-pill.is-active {
  background: #ffc107;
  border-color: #ffc107;
  color: #1a2635;
  font-weight: 700;
}

/* ── Footer switches + guardar ─────────────────────────────────────── */
.iec-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  flex-wrap: wrap;
  margin-top: .85rem;
  padding-top: .85rem;
  border-top: 1px solid rgba(255,255,255,.07);
}

.iec-switches { display: flex; flex-direction: column; gap: .3rem; }

/* ── Formulario de creación (estructura) ─────────────────────────────── */
.indicadores-create-form {
  border-radius: .35rem;
  overflow: hidden;
}

.indicadores-create-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, .8fr);
  gap: 1rem;
  padding: 1rem;
}

.indicadores-form-panel {
  border: 1px solid rgba(255,255,255,.07);
  border-radius: .25rem;
  padding: 1.05rem 1.05rem 1rem;
}

.indicadores-form-panel-head {
  display: flex;
  align-items: flex-start;
  gap: .9rem;
  margin-bottom: 1rem;
}

.indicadores-form-step {
  width: 2rem;
  height: 2rem;
  flex: 0 0 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #007bff;
  color: #fff;
  font-size: .78rem;
  font-weight: 800;
}

.indicadores-form-tips {
  display: grid;
  gap: .7rem;
  margin-top: .5rem;
}

.indicadores-form-tip {
  display: flex;
  align-items: flex-start;
  gap: .65rem;
  padding: .75rem .85rem;
  border-radius: .25rem;
  border: 1px solid rgba(255,255,255,.06);
  font-size: .8rem;
  line-height: 1.45;
  opacity: .8;
}

.indicadores-form-tip i {
  color: #007bff;
  margin-top: .15rem;
}

.indicadores-switch-block {
  padding: .8rem .9rem .7rem;
  border-radius: .25rem;
  border: 1px solid rgba(255,255,255,.08);
  width: 100%;
}

.indicadores-form-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.1rem 1.1rem;
  border-top: 1px solid rgba(255,255,255,.07);
}

.indicadores-primary-action {
  min-width: 220px;
  border-radius: .25rem;
  font-weight: 700;
  padding: .8rem 1.15rem;
}

/* ── Comités: bordes sutiles en lista ────────────────────────────────── */
.cg-comite-item.border-bottom {
  border-bottom-color: rgba(255,255,255,.08) !important;
}

/* ── Registro mensual: blanco intencional (el card PHP tiene style="#fff") */
#registro_indicadores .table-responsive,
#registro_indicadores .table {
  background-color: #fff !important;
  color: #212529 !important;
}

#registro_indicadores .table td,
#registro_indicadores .table th {
  color: #212529 !important;
  border-color: #dee2e6 !important;
  vertical-align: middle;
}

#registro_indicadores .thead-light th {
  background-color: #f8f9fa !important;
  color: #495057 !important;
  white-space: nowrap;
  font-size: .78rem;
}

#registro_indicadores .reg-ind-cell {
  min-width: 190px;
  max-width: 230px;
  background-color: #f8f9fa !important;
}

#registro_indicadores .col-activo-mes {
  background-color: #eaf4ff !important;
  border-left: 2px solid #007bff !important;
  border-right: 2px solid #007bff !important;
  min-width: 200px;
}

#registro_indicadores thead .col-activo-mes {
  background-color: #cfe2ff !important;
  color: #004085 !important;
  border: none !important;
}

#registro_indicadores .col-solo-lectura {
  background-color: #fff !important;
}

#registro_indicadores .form-control,
#registro_indicadores select {
  background-color: #fff !important;
  color: #212529 !important;
  border-color: #ced4da !important;
}

#registro_indicadores select option {
  background: #fff;
  color: #212529;
}

#registro_indicadores .form-control:focus {
  border-color: #80bdff !important;
  box-shadow: 0 0 0 .2rem rgba(0,123,255,.25) !important;
}

#registro_indicadores .col-activo-mes .form-control {
  border-color: #86b7fe !important;
}

#registro_indicadores .form-control[disabled] {
  background-color: #e9ecef !important;
  color: #6c757d !important;
}

#registro_indicadores .reg-mes-pill {
  font-size: .78rem !important;
  transition: all .15s;
}

#registro_indicadores .reg-mes-pill.activo-mes {
  border-color: #0d6efd !important;
  color: #0a58ca !important;
  font-weight: 700 !important;
}

#registro_indicadores .reg-mes-pill.activo-mes.active {
  background-color: #0d6efd !important;
  color: #fff !important;
  border-color: #0d6efd !important;
}

#registro_indicadores .reg-mes-pill.active {
  background-color: #6c757d !important;
  border-color: #6c757d !important;
  color: #fff !important;
}

.reg-comentario-mini {
  font-size: .67rem;
  color: #6c757d !important;
  line-height: 1.2;
}

#registro_indicadores .table-hover tbody tr:hover td {
  background-color: #f5f9ff !important;
}

/* ── Comités: lista lateral ──────────────────────────────────────────── */
.cg-comite-item {
  border-left: 4px solid transparent;
  transition: background .15s;
}

.cg-comite-item:hover {
  background: rgba(23, 162, 184, .12) !important;
}

.cg-comite-item.activo {
  border-left-color: #17a2b8 !important;
  background: rgba(23, 162, 184, .18) !important;
}

/* ── Comités: encabezado de proceso ──────────────────────────────────── */
.cg-proceso-header {
  background: linear-gradient(90deg, #1a252f 0%, #2c3e50 100%);
  color: #fff;
  border-radius: 6px 6px 0 0;
  padding: .6rem 1rem;
}

.cg-proceso-header .proceso-nombre {
  font-size: .9rem;
  font-weight: 700;
  letter-spacing: .01em;
}

.cg-proceso-header .proceso-resp {
  font-size: .75rem;
  opacity: .8;
}

.cg-proceso-header .cg-prog-bar {
  height: 5px;
  border-radius: 3px;
  background: rgba(255,255,255,.2);
  overflow: hidden;
}

.cg-proceso-header .cg-prog-fill {
  height: 100%;
  background: #2ecc71;
  transition: width .4s;
}

/* ── Comités: tarjetas de compromisos ────────────────────────────────── */
.cg-cmp-card {
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,.08);
  box-shadow: 0 1px 4px rgba(0,0,0,.18);
  transition: box-shadow .2s, transform .15s;
  overflow: hidden;
  height: 100%;
}

.cg-cmp-card:hover {
  box-shadow: 0 4px 14px rgba(0,0,0,.3);
  transform: translateY(-1px);
}

.cg-cmp-card .cg-cmp-topbar {
  height: 4px;
  width: 100%;
}

.cg-cmp-card .cg-cmp-body {
  padding: .65rem .75rem .6rem;
}

.cg-cmp-card .cg-cmp-title {
  font-size: .84rem;
  font-weight: 700;
  line-height: 1.3;
}

.cg-cmp-card .cg-cmp-desc {
  font-size: .74rem;
  opacity: .7;
  line-height: 1.35;
}

.cg-cmp-card .cg-cmp-foot {
  font-size: .71rem;
  opacity: .65;
  border-top: 1px solid rgba(255,255,255,.07);
  padding: .45rem .75rem .5rem;
}

.cg-cmp-card.vencido {
  border-color: rgba(220, 53, 69, .35);
}

.cg-cmp-card.finalizado {
  opacity: .85;
}

.cg-acciones {
  display: flex;
  gap: 4px;
}

.cg-stat-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border-radius: 12px;
  font-size: .7rem;
  font-weight: 600;
}

/* ── Responsivo ──────────────────────────────────────────────────────── */
@media (max-width: 767.98px) {
  .indicadores-edit-meta {
    grid-template-columns: 1fr;
  }

  .indicadores-edit-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .indicadores-create-layout {
    grid-template-columns: 1fr;
    padding: .85rem;
  }

  .indicadores-form-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .indicadores-primary-action {
    min-width: 0;
    width: 100%;
  }

  .indicadores-admin-tabs .nav-link {
    width: 100%;
  }
}
