/* ==========================================================================
   SECPLAM · CONTROL DIRECTIVO (Fase 5) — prefijo .dv-
   ========================================================================== */
#directivo-root { display: flex; flex-direction: column; gap: 16px; }
.dv-top p { font-size: 0.8rem; color: var(--text-muted); font-weight: 600; }
.dv-sec, .dv-salud { padding: 18px 20px !important; }
.dv-sec-h { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.dv-sec-h h3 { display: flex; align-items: center; gap: 8px; font-size: 0.95rem; font-weight: 700; color: var(--text-main); }
.dv-sec-h h3 svg { width: 17px; height: 17px; color: var(--primary-start); }
.dv-sec-h > span { font-size: 0.74rem; color: var(--text-muted); font-weight: 600; }
.dv-note { font-size: 0.74rem; color: var(--text-muted); line-height: 1.5; margin-top: 10px; }
.dv-foot { text-align: right; }
.dv-grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.dv-plink { border: none; background: none; padding: 0; font-family: inherit; font-size: 0.76rem; font-weight: 600; color: var(--primary-start); cursor: pointer; text-align: left; }
.dv-plink:hover { text-decoration: underline; }

/* Fila 1: salud + KPI */
.dv-row1 { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 16px; align-items: stretch; }
.dv-salud-body { display: grid; grid-template-columns: 150px 1fr; gap: 18px; align-items: center; }
.dv-salud-ring { text-align: center; }
.dv-salud-ring p { font-size: 0.78rem; font-weight: 700; color: var(--text-muted); margin-top: 4px; }
.dv-ring { width: 140px; height: 140px; }
.dv-ring-v { font-size: 34px; font-weight: 800; fill: var(--text-main); font-family: 'Outfit', sans-serif; }
.dv-ring-l { font-size: 11px; font-weight: 600; fill: #64748b; font-family: 'Outfit', sans-serif; }
.dv-factores { display: flex; flex-direction: column; gap: 6px; }
.dv-factor { display: grid; grid-template-columns: minmax(130px, 42%) 1fr 30px; gap: 10px; align-items: center; border: none; background: none; padding: 5px 6px; border-radius: 8px; font-family: inherit; text-align: left; cursor: pointer; }
.dv-factor:hover { background: #f8fafc; }
.dv-f-n { font-size: 0.78rem; font-weight: 700; color: var(--text-main); line-height: 1.2; }
.dv-f-n small { display: block; font-size: 0.66rem; font-weight: 600; color: var(--text-muted); }
.dv-factor strong { font-size: 0.86rem; font-weight: 800; color: var(--text-main); text-align: right; }
.dv-factor.is-na strong, .dv-factor.is-na .dv-f-n { color: #94a3b8; }
.dv-bar-t { display: block; height: 9px; background: #eef2f7; border-radius: 5px; overflow: hidden; }
.dv-bar-t > span { display: block; height: 100%; border-radius: 5px; transition: width 0.6s ease; }
.dv-metodo { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border-color); font-size: 0.78rem; color: var(--text-muted); line-height: 1.5; }
.dv-metodo ul { margin: 8px 0 0 16px; display: flex; flex-direction: column; gap: 4px; }
.dv-metodo strong { color: var(--text-main); }
.dv-kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.dv-kpi { display: flex; align-items: center; gap: 12px; background: #fff; border: 1px solid var(--border-color); border-left: 4px solid var(--c); border-radius: 12px; padding: 12px 14px; cursor: pointer; font-family: inherit; text-align: left; transition: box-shadow 0.2s, transform 0.2s; }
.dv-kpi:hover { box-shadow: 0 6px 16px rgba(15, 23, 42, 0.07); transform: translateY(-1px); }
.dv-kpi:focus-visible, .dv-factor:focus-visible, .dv-fstep:focus-visible, .dv-bar:focus-visible { outline: 2px solid var(--primary-start); outline-offset: 2px; }
.dv-kpi-ico { width: 38px; height: 38px; border-radius: 10px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; background: color-mix(in srgb, var(--c) 11%, #fff); color: var(--c); }
.dv-kpi-ico svg { width: 19px; height: 19px; }
.dv-kpi-txt { display: flex; flex-direction: column; min-width: 0; }
.dv-kpi-txt em { font-style: normal; font-size: 0.72rem; font-weight: 700; color: var(--text-muted); }
.dv-kpi-txt strong { font-size: 1.35rem; font-weight: 800; color: var(--text-main); line-height: 1.15; font-variant-numeric: tabular-nums; word-break: break-word; }
.dv-kpi-txt small { font-size: 0.68rem; color: var(--text-muted); line-height: 1.3; }

/* Embudo */
.dv-funnel { display: flex; flex-direction: column; gap: 6px; }
.dv-fstep { display: grid; grid-template-columns: 150px 1fr 56px; gap: 10px; align-items: center; border: none; background: none; padding: 4px 6px; border-radius: 8px; font-family: inherit; cursor: pointer; text-align: left; }
.dv-fstep:hover { background: #f8fafc; }
.dv-f-lbl { font-size: 0.8rem; font-weight: 700; color: var(--text-main); }
.dv-f-track { position: relative; height: 22px; background: #f1f5f9; border-radius: 6px; overflow: hidden; }
.dv-f-alc { position: absolute; left: 0; top: 0; bottom: 0; background: color-mix(in srgb, var(--c) 22%, #fff); border-radius: 6px; }
.dv-f-act { position: absolute; left: 0; top: 4px; bottom: 4px; background: var(--c); border-radius: 4px; min-width: 2px; }
.dv-f-num { display: flex; align-items: baseline; gap: 5px; justify-content: flex-end; }
.dv-f-num strong { font-size: 0.95rem; font-weight: 800; color: var(--text-main); }
.dv-f-num small { font-size: 0.72rem; font-weight: 700; color: var(--text-muted); }

/* Decisiones */
.dv-dec { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.dv-dec li { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 12px; border: 1px solid var(--border-color); border-left: 4px solid #4f46e5; border-radius: 10px; }
.dv-dec li.is-soon { border-left-color: #ca8a04; background: #fffdf5; }
.dv-dec li.is-over { border-left-color: #dc2626; background: #fffafa; }
.dv-dec li > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.dv-dec-t { font-size: 0.68rem; font-weight: 800; color: #4f46e5; text-transform: uppercase; letter-spacing: 0.03em; }
.dv-dec strong { font-size: 0.86rem; color: var(--text-main); }
.dv-dec em { font-style: normal; }
.dv-dec small { font-size: 0.74rem; color: var(--text-muted); }
.dv-dec li.is-over small:not(.dv-ant) { color: #dc2626; font-weight: 600; }
.dv-ant { font-style: italic; }

/* Foco del Director */
.dv-foco, .dv-plist, .dv-obras { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.dv-foco button, .dv-plist button, .dv-obras button { width: 100%; display: flex; align-items: flex-start; gap: 10px; border: 1px solid var(--border-color); background: #fff; border-radius: 10px; padding: 10px 12px; font-family: inherit; text-align: left; cursor: pointer; }
.dv-foco button:hover, .dv-plist button:hover, .dv-obras button:hover { border-color: var(--primary-start); background: #fbfdff; }
.dv-foco div, .dv-plist div { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.dv-foco strong, .dv-plist strong { font-size: 0.84rem; color: var(--text-main); line-height: 1.3; }
.dv-foco span:not(.gx-sem):not(.gx-sem-dot) { font-size: 0.78rem; color: var(--text-main); }
.dv-foco small, .dv-plist span:not(.gx-sem):not(.gx-sem-dot) { font-size: 0.74rem; color: var(--text-muted); }
.dv-plist button > svg { width: 16px; height: 16px; color: #94a3b8; align-self: center; }

/* Hitos */
.dv-hitos { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; }
.dv-hitos li { display: grid; grid-template-columns: 84px 1fr; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--border-color); }
.dv-hitos li:last-child { border-bottom: none; }
.dv-hitos time { font-size: 0.72rem; color: var(--text-muted); display: flex; flex-direction: column; }
.dv-hitos time strong { font-size: 0.86rem; color: var(--text-main); }
.dv-hitos div { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.dv-h-t { font-size: 0.66rem; font-weight: 800; text-transform: uppercase; color: var(--primary-start); }
.dv-hitos div > strong { font-size: 0.82rem; color: var(--text-main); }

/* Profesionales */
.dv-table-wrap { overflow-x: auto; }
.dv-table { width: 100%; border-collapse: collapse; font-size: 0.8rem; }
.dv-table th { text-align: left; font-size: 0.7rem; font-weight: 700; color: var(--text-muted); padding: 9px 8px; border-bottom: 2px solid var(--border-color); white-space: nowrap; background: #f8fafc; }
.dv-table td { padding: 9px 8px; border-bottom: 1px solid var(--border-color); color: var(--text-main); }
.dv-table tbody tr { cursor: pointer; }
.dv-table tbody tr:hover { background: #f8fafc; }
.dv-table tr.is-none td:first-child strong { color: #b45309; }
.dv-table .t-c { text-align: center; }
.dv-n { display: inline-block; min-width: 24px; padding: 1px 6px; border-radius: 6px; font-weight: 700; color: #94a3b8; }
.dv-n.ok { background: #ecfdf5; color: #047857; } .dv-n.at { background: #fefce8; color: #a16207; }
.dv-n.ri { background: #fff7ed; color: #c2410c; } .dv-n.cr { background: #fef2f2; color: #dc2626; } .dv-n.na { background: #f1f5f9; color: #64748b; }
.dv-dist { display: flex; width: 120px; height: 10px; border-radius: 5px; overflow: hidden; background: #f1f5f9; }

/* Barras de inversión */
.dv-bars { display: flex; flex-direction: column; gap: 4px; }
.dv-bar { display: grid; grid-template-columns: minmax(100px, 34%) 1fr auto; gap: 10px; align-items: center; border: none; background: none; padding: 5px 6px; border-radius: 8px; font-family: inherit; cursor: pointer; text-align: left; }
.dv-bar:hover { background: #f8fafc; }
.dv-bar-l { font-size: 0.78rem; font-weight: 600; color: var(--text-main); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dv-bar strong { font-size: 0.8rem; font-weight: 800; color: var(--text-main); white-space: nowrap; font-variant-numeric: tabular-nums; }
.dv-bar strong small { font-weight: 700; color: var(--text-muted); background: #f1f5f9; padding: 0 5px; border-radius: 4px; margin-left: 4px; }

/* Obras */
.dv-obras button { flex-direction: column; }
.dv-o-h { width: 100%; display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.dv-o-h strong { font-size: 0.82rem; color: var(--text-main); line-height: 1.3; }
.dv-o-bars { width: 100%; display: grid; grid-template-columns: 64px 1fr 42px; gap: 4px 8px; align-items: center; margin-top: 6px; }
.dv-o-bars > span:not(.dv-bar-t) { font-size: 0.7rem; font-weight: 700; color: var(--text-muted); }
.dv-o-bars em { font-style: normal; font-size: 0.74rem; font-weight: 800; color: var(--text-main); text-align: right; }

/* Calidad de datos */
.dv-calidad { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.dv-calidad button { width: 100%; display: flex; align-items: center; gap: 10px; border: 1px solid var(--border-color); background: #fff; border-radius: 10px; padding: 9px 12px; font-family: inherit; font-size: 0.8rem; color: var(--text-main); text-align: left; cursor: pointer; }
.dv-calidad button:hover:not(:disabled) { border-color: #d97706; }
.dv-calidad button:disabled { cursor: default; color: var(--text-muted); }
.dv-calidad button span:nth-child(2) { flex: 1; }
.dv-calidad svg { width: 15px; height: 15px; color: #94a3b8; }
.dv-cal-n { min-width: 34px; text-align: center; font-weight: 800; padding: 2px 6px; border-radius: 6px; background: #fff7ed; color: #c2410c; }
.dv-cal-n.ok { background: #ecfdf5; color: #047857; }

@media (max-width: 1200px) {
  .dv-row1 { grid-template-columns: 1fr; }
  .dv-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 1024px) {
  .dv-grid2 { grid-template-columns: 1fr; }
  .dv-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .dv-salud-body { grid-template-columns: 1fr; justify-items: center; }
  .dv-factores { width: 100%; }
  .dv-factor { grid-template-columns: 1fr 70px 28px; }
  .dv-kpis { grid-template-columns: 1fr; }
  .dv-fstep { grid-template-columns: 96px 1fr 48px; }
  .dv-f-lbl { font-size: 0.72rem; }
}
@media (prefers-reduced-motion: reduce) { .dv-kpi { transition: none; } .dv-kpi:hover { transform: none; } }

.dv-more { display: block; margin-top: 10px; padding-left: 0; }
.dv-foco small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
