.tmi-wrap{--ink:#151515;--muted:#667085;--line:#b9d8e6;--good:#63d37d;--warn:#f4d35e;--bad:#ef7a7a;font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:var(--ink);background:#fff;max-width:1600px;margin:0 auto;padding:18px 20px 24px}.tmi-header{display:flex;justify-content:space-between;align-items:flex-start;gap:18px;border-bottom:3px solid #1598a8;padding:4px 0 16px;margin-bottom:20px}.tmi-title{font-size:clamp(26px,3vw,40px);font-weight:900;letter-spacing:.01em}.tmi-subtitle{margin-top:5px;color:var(--muted);font-size:12px;font-weight:700;text-transform:uppercase;letter-spacing:.08em}.tmi-year-filter label,.tmi-field label{display:block;font-size:12px;color:#4a4a4a;font-weight:700}.tmi-year-filter select,.tmi-field select,.tmi-field input{margin-top:6px;border:1px solid #e2e5e9;border-radius:2px;background:#fff;min-height:34px;padding:5px 10px;color:#555}.tmi-year-filter select{min-width:100px}.tmi-top-grid{display:grid;grid-template-columns:minmax(660px,1.1fr) minmax(560px,.9fr);gap:30px;align-items:start}.tmi-bottom-grid{display:grid;grid-template-columns:minmax(740px,1.2fr) minmax(500px,.8fr);gap:28px;margin-top:28px}.tmi-panel{min-width:0}.tmi-filter-row{display:flex;align-items:end;gap:26px;margin-bottom:8px;flex-wrap:wrap}.tmi-range-inputs{display:flex;gap:8px}.tmi-range-inputs input{width:86px}.tmi-apply{border:0;border-radius:4px;background:#1598a8;color:#fff;font-weight:800;padding:8px 14px;min-height:34px;cursor:pointer}.tmi-section-title{text-align:center;font-size:20px;font-weight:500;letter-spacing:.02em;margin:6px 0 8px}.tmi-kpi-area{display:grid;gap:46px;padding-top:12px}.tmi-kpi-row{display:grid;grid-template-columns:repeat(3,1fr);gap:24px}.tmi-kpi{min-width:0;text-align:center}.tmi-kpi-label{font-size:18px;font-weight:500}.tmi-kpi-value{font-size:clamp(42px,4vw,62px);font-weight:300;line-height:1.05;margin-top:2px}.tmi-kpi-pct{display:inline-block;margin-top:14px;padding:4px 8px;font-size:20px}.tmi-kpi-pct.good{background:var(--good)}.tmi-kpi-pct.warn{background:var(--warn)}.tmi-kpi-pct.bad{background:var(--bad)}.tmi-table-wrap{overflow:auto}.tmi-table{border-collapse:collapse;width:100%;font-size:13px;min-width:720px}.tmi-week-table{min-width:1040px}.tmi-table th,.tmi-table td{padding:5px 7px;text-align:right;border-bottom:1px solid #e6e6e6;white-space:nowrap}.tmi-table th{font-weight:500;border-bottom:2px solid #73b8d6;color:#444}.tmi-table th:first-child,.tmi-table td:first-child{text-align:left}.tmi-table tbody tr:nth-child(even){background:#f1f1f1}.tmi-table .tmi-total{background:#e9e9e9!important;font-weight:900}.tmi-good{background:var(--good)!important}.tmi-warn{background:var(--warn)!important}.tmi-bad{background:var(--bad)!important}.tmi-source-note{margin-top:22px;padding-top:12px;border-top:1px solid #edf0f2;color:var(--muted);font-size:12px}.tmi-notice{margin:0 0 16px;padding:10px 12px;border-radius:8px;border:1px solid #d8e4ee;background:#f7fbfe}.tmi-warning{background:#fff8e1;border-color:#f3d98b}.tmi-error{background:#fff1f2;border-color:#fecdd3}@media(max-width:1180px){.tmi-top-grid,.tmi-bottom-grid{grid-template-columns:1fr}.tmi-kpi-area{gap:24px}.tmi-header{align-items:center}}@media(max-width:720px){.tmi-wrap{padding:12px}.tmi-kpi-row{grid-template-columns:1fr}.tmi-filter-row{gap:12px}.tmi-title{font-size:24px}.tmi-kpi-value{font-size:44px}}@media print{.tmi-apply,.tmi-filter-row,.tmi-year-filter{display:none}.tmi-wrap{max-width:none;padding:0}}
.tmi-table th{padding:0}.tmi-sort-button{appearance:none;-webkit-appearance:none;width:100%;border:0;background:transparent;color:inherit;font:inherit;font-weight:500;text-align:right;padding:5px 7px;cursor:pointer;white-space:nowrap}.tmi-table th:first-child .tmi-sort-button{text-align:left}.tmi-sort-button:hover,.tmi-sort-button:focus-visible{background:#edf8fc;outline:none}.tmi-sort-indicator{display:inline-block;width:10px;margin-left:4px}.tmi-sort-button[data-sort-dir="asc"] .tmi-sort-indicator:after{content:"▲";font-size:8px}.tmi-sort-button[data-sort-dir="desc"] .tmi-sort-indicator:after{content:"▼";font-size:8px}

/* v1.0.6: filtros unificados y detalle de excepciones */
.tmi-wrap{--warn:#f59e0b}
.tmi-all-filters{display:flex;align-items:end;gap:18px;flex-wrap:wrap;margin:0 0 24px;padding:14px 16px;border:1px solid #e6eef2;border-radius:8px;background:#fbfdfe}
.tmi-all-filters .tmi-field{min-width:110px}
.tmi-all-filters .tmi-apply{margin-left:auto}
.tmi-section-head{display:flex;align-items:center;justify-content:center;gap:12px;margin:6px 0 8px;position:relative}
.tmi-section-head .tmi-section-title{margin:0}
.tmi-details-button{border:1px solid #1598a8;background:#fff;color:#117d89;border-radius:5px;font-weight:800;padding:5px 10px;cursor:pointer}
.tmi-details-button:hover,.tmi-details-button:focus-visible{background:#eefbfc;outline:none}
.tmi-details-button span{display:inline-block;min-width:19px;padding:1px 5px;border-radius:999px;background:#1598a8;color:#fff;font-size:11px;margin-left:4px}
.tmi-details-modal[hidden]{display:none!important}.tmi-details-modal{position:fixed;inset:0;z-index:100000;display:flex;align-items:center;justify-content:center;padding:24px}.tmi-details-backdrop{position:absolute;inset:0;background:rgba(15,23,42,.55)}.tmi-details-card{position:relative;z-index:1;width:min(1280px,96vw);max-height:86vh;overflow:hidden;background:#fff;border-radius:10px;box-shadow:0 24px 70px rgba(0,0,0,.28);display:flex;flex-direction:column}.tmi-details-header{display:flex;justify-content:space-between;align-items:flex-start;gap:20px;padding:16px 18px;border-bottom:1px solid #e5e7eb}.tmi-details-header strong{font-size:18px}.tmi-details-subtitle{font-size:12px;color:var(--muted);margin-top:3px}.tmi-details-close{border:0;background:transparent;font-size:30px;line-height:1;cursor:pointer;color:#475569}.tmi-details-empty{padding:28px;text-align:center;color:var(--muted)}.tmi-details-table-wrap{overflow:auto}.tmi-details-table{width:100%;border-collapse:collapse;font-size:12px}.tmi-details-table th,.tmi-details-table td{padding:7px 9px;border-bottom:1px solid #e5e7eb;text-align:left;vertical-align:top;white-space:nowrap}.tmi-details-table th{position:sticky;top:0;background:#f8fafc;z-index:1}.tmi-details-table td:last-child{white-space:normal;min-width:240px}
body.tmi-modal-open{overflow:hidden}
@media(max-width:900px){.tmi-all-filters .tmi-apply{margin-left:0}.tmi-details-modal{padding:10px}.tmi-details-card{width:98vw;max-height:92vh}}
@media print{.tmi-all-filters,.tmi-details-button,.tmi-details-modal{display:none!important}}


/* v1.0.8: detalle exhaustivo de registros fuente */
.tmi-details-list{overflow:auto;padding:14px;background:#f8fafc;display:grid;gap:14px}.tmi-detail-record{background:#fff;border:1px solid #dbe4ea;border-radius:8px;overflow:hidden}.tmi-detail-record-head{display:flex;align-items:center;gap:10px;flex-wrap:wrap;padding:10px 12px;background:#f1f7fa;border-bottom:1px solid #dbe4ea}.tmi-detail-record-head>span:last-child{color:#475569}.tmi-detail-status{font-size:11px;font-weight:800;padding:3px 7px;border-radius:999px;background:#e2e8f0}.tmi-detail-summary{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:1px;background:#e5e7eb;border-bottom:1px solid #e5e7eb}.tmi-detail-summary>div{background:#fff;padding:8px 10px;min-width:0}.tmi-detail-summary span,.tmi-raw-field span{display:block;font-size:10px;line-height:1.2;color:#64748b;font-weight:700;text-transform:none;overflow-wrap:anywhere}.tmi-detail-summary strong,.tmi-raw-field strong{display:block;margin-top:3px;font-size:12px;line-height:1.35;color:#0f172a;overflow-wrap:anywhere;word-break:break-word}.tmi-raw-row{border-top:1px solid #eef2f6}.tmi-raw-row summary{cursor:pointer;padding:9px 12px;font-size:12px;font-weight:800;color:#117d89;background:#fbfdfe}.tmi-raw-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(210px,1fr));gap:1px;background:#e5e7eb;border-top:1px solid #e5e7eb}.tmi-raw-field{background:#fff;padding:8px 10px;min-width:0;max-height:140px;overflow:auto}


/* v1.0.9: detalle visible completo, sin colapsado ni recorte por estilos externos */
.tmi-details-card{width:min(1500px,98vw)!important;max-height:94vh!important;overflow:hidden!important}
.tmi-details-list{overflow:auto!important;display:block!important;padding:14px!important}
.tmi-detail-record{height:auto!important;max-height:none!important;min-height:0!important;overflow:visible!important;display:block!important;margin:0 0 16px!important}
.tmi-detail-record-head{height:auto!important;min-height:0!important;overflow:visible!important}
.tmi-detail-summary{display:grid!important;height:auto!important;max-height:none!important;overflow:visible!important}
.tmi-source-row-block{display:block!important;height:auto!important;max-height:none!important;overflow:visible!important;border-top:1px solid #eef2f6}
.tmi-source-row-title{padding:10px 12px;font-size:12px;font-weight:800;color:#117d89;background:#fbfdfe;border-bottom:1px solid #e5e7eb}
.tmi-raw-grid{display:grid!important;grid-template-columns:repeat(auto-fit,minmax(240px,1fr))!important;height:auto!important;max-height:none!important;overflow:visible!important}
.tmi-raw-field{height:auto!important;max-height:none!important;min-height:58px!important;overflow:visible!important}
.tmi-raw-field strong{white-space:normal!important;overflow:visible!important;text-overflow:clip!important;word-break:break-word!important}


/* v1.0.11: tablas centradas y vista inferior completa sin desplazamiento horizontal */
.tmi-table th,.tmi-table td{text-align:center!important}
.tmi-table th:first-child,.tmi-table td:first-child{text-align:center!important}
.tmi-sort-button,.tmi-table th:first-child .tmi-sort-button{text-align:center!important}

@media(min-width:1181px){
  .tmi-wrap{max-width:none!important;width:100%!important;box-sizing:border-box!important;padding-left:8px!important;padding-right:8px!important}
  .tmi-bottom-grid{grid-template-columns:minmax(0,1.58fr) minmax(0,1fr)!important;gap:14px!important;width:100%!important}
  .tmi-bottom-grid>.tmi-panel{min-width:0!important;width:100%!important}
  .tmi-bottom-grid .tmi-table-wrap{overflow-x:visible!important;overflow-y:visible!important;width:100%!important;max-width:none!important}
  .tmi-bottom-grid .tmi-table{width:100%!important;min-width:0!important;max-width:none!important;table-layout:auto!important;font-size:12px!important}
  .tmi-bottom-grid .tmi-table th,.tmi-bottom-grid .tmi-table td{padding:5px 4px!important}
  .tmi-bottom-grid .tmi-sort-button{padding:5px 3px!important}
  .tmi-week-table{min-width:0!important}
  .tmi-week-table th:first-child,.tmi-week-table td:first-child{width:26%!important;white-space:normal!important;line-height:1.2!important}
  .tmi-bottom-grid>.tmi-panel:last-child .tmi-table th:first-child,
  .tmi-bottom-grid>.tmi-panel:last-child .tmi-table td:first-child{width:38%!important;white-space:normal!important;line-height:1.2!important}
}

/* v1.0.15: vista Semáforo Diario - Instalaciones */
.tmi-semaforo-wrap{max-width:none!important;width:100%!important;padding:0 10px 18px!important;box-sizing:border-box}
.tmi-semaforo-header{display:grid;grid-template-columns:72px minmax(0,1fr) auto auto;align-items:center;gap:18px;border-bottom:3px solid #1598a8;padding:8px 0 16px;margin-bottom:14px}
.tmi-semaforo-back{font-size:58px;line-height:1;color:#11a9d6;font-weight:300;text-align:left;transform:rotate(2deg)}
.tmi-semaforo-title{font-size:clamp(30px,3vw,46px);font-weight:800;letter-spacing:.01em;white-space:nowrap}
.tmi-semaforo-year label{font-size:12px;font-weight:700}.tmi-semaforo-year select{display:block;margin-top:6px;min-width:110px;border:1px solid #e2e5e9;background:#fff;padding:6px 10px}
.tmi-semaforo-brand{font-size:42px;font-weight:800;color:#555;white-space:nowrap}.tmi-semaforo-brand span{color:#ef3d2f}
.tmi-semaforo-filters{display:grid;grid-template-columns:180px 210px 220px 210px 160px;gap:42px;align-items:end;justify-content:center;margin:10px 0 14px}
.tmi-semaforo-filters .tmi-field select{width:100%}.tmi-semaforo-filters .tmi-range-inputs input{width:86px}
.tmi-semaforo-layout{display:grid;grid-template-columns:minmax(640px,.95fr) minmax(720px,1.05fr);gap:46px;align-items:start}
.tmi-semaforo-left,.tmi-semaforo-right{min-width:0}
.tmi-semaforo-section-title{text-align:center;font-size:22px;font-weight:500;margin:2px 0 10px}
.tmi-semaforo-right{display:grid;gap:30px}
.tmi-semaforo-right-top{display:grid;grid-template-columns:220px minmax(0,1fr);gap:34px;align-items:start}
.tmi-semaforo-meta-card{text-align:center;padding-top:8px}.tmi-semaforo-meta-card>div{font-size:20px;font-weight:500}.tmi-semaforo-meta-card strong{display:block;font-size:64px;line-height:1;font-weight:300;margin-top:4px}
.tmi-semaforo-daily-zone{display:grid;grid-template-columns:180px minmax(0,1fr);gap:22px;align-items:start}.tmi-semaforo-daily-zone .tmi-semaforo-section-title{grid-column:2;margin-top:0}.tmi-semaforo-day-filter{grid-row:1 / span 2;align-self:center}.tmi-semaforo-day-filter select{width:140px}
.tmi-semaforo-progress-zone{padding-left:200px}
.tmi-semaforo-wrap .tmi-table{min-width:0!important;font-size:13px}.tmi-semaforo-wrap .tmi-table th,.tmi-semaforo-wrap .tmi-table td{padding:4px 6px!important;text-align:center!important}.tmi-semaforo-wrap .tmi-table th:first-child,.tmi-semaforo-wrap .tmi-table td:first-child{text-align:left!important}
.tmi-semaforo-day-table th:nth-child(2),.tmi-semaforo-day-table td:nth-child(2),.tmi-semaforo-day-table th:nth-child(4),.tmi-semaforo-day-table td:nth-child(4){text-align:left!important}
.tmi-semaforo-dot{display:inline-block;width:16px;height:16px;border-radius:999px;vertical-align:-3px;margin-right:7px;border:1px solid rgba(0,0,0,.2)}.tmi-semaforo-dot.good{background:#63b981}.tmi-semaforo-dot.bad{background:#ef7a7a}
.tmi-semaforo-compare td:first-child,.tmi-semaforo-mini td:first-child{white-space:normal!important;line-height:1.15}
@media(max-width:1380px){.tmi-semaforo-filters{gap:18px;grid-template-columns:160px 190px 190px 190px 140px}.tmi-semaforo-layout{grid-template-columns:1fr}.tmi-semaforo-right-top{grid-template-columns:240px 1fr}.tmi-semaforo-progress-zone{padding-left:0}.tmi-semaforo-daily-zone{grid-template-columns:170px 1fr}}
@media(max-width:850px){.tmi-semaforo-header{grid-template-columns:44px 1fr}.tmi-semaforo-title{white-space:normal;font-size:28px}.tmi-semaforo-year,.tmi-semaforo-brand{grid-column:auto}.tmi-semaforo-brand{font-size:28px}.tmi-semaforo-filters{grid-template-columns:1fr 1fr;justify-content:stretch}.tmi-semaforo-right-top,.tmi-semaforo-daily-zone{grid-template-columns:1fr}.tmi-semaforo-daily-zone .tmi-semaforo-section-title{grid-column:1}.tmi-semaforo-day-filter{grid-row:auto}.tmi-semaforo-meta-card strong{font-size:52px}}

/* v1.0.16: Semáforo sin branding decorativo, filtros con aplicar y orden por KPI */
.tmi-semaforo-header{grid-template-columns:minmax(0,1fr) auto!important}
.tmi-semaforo-title{grid-column:1!important}
.tmi-semaforo-year{grid-column:2!important}
.tmi-semaforo-back,.tmi-semaforo-brand{display:none!important}
.tmi-semaforo-filters{grid-template-columns:180px 210px 220px 210px 160px auto!important;gap:24px!important}
.tmi-semaforo-apply{align-self:end;margin:0 0 1px!important;white-space:nowrap}
.tmi-semaforo-wrap .tmi-sort-button{width:100%;justify-content:center;text-align:center!important;padding:3px 2px!important}
.tmi-semaforo-wrap .tmi-table th:first-child .tmi-sort-button{text-align:left!important;justify-content:flex-start}
@media(max-width:1380px){.tmi-semaforo-filters{grid-template-columns:160px 190px 190px 190px 140px auto!important;gap:14px!important}}
@media(max-width:850px){.tmi-semaforo-header{grid-template-columns:1fr auto!important}.tmi-semaforo-filters{grid-template-columns:1fr 1fr!important}.tmi-semaforo-apply{width:100%}}

/* v1.0.19 · Adaptación al ancho REAL del lienzo de Core.
 * Core/Theme puede expandir o contraer el sidebar sin cambiar el ancho del viewport;
 * por eso estas reglas reaccionan a clases calculadas con ResizeObserver sobre .tmi-wrap. */
.tmi-wrap{width:100%!important;max-width:100%!important;min-width:0!important;box-sizing:border-box!important;overflow-x:hidden!important}
.tmi-wrap *{box-sizing:border-box}
.tmi-top-grid,.tmi-bottom-grid,.tmi-semaforo-layout,.tmi-semaforo-right-top,.tmi-semaforo-daily-zone{min-width:0!important;max-width:100%!important}
.tmi-panel,.tmi-kpi-area,.tmi-semaforo-left,.tmi-semaforo-right{min-width:0!important;max-width:100%!important}

/* Sidebar abierto / lienzo intermedio */
.tmi-wrap.tmi-layout-medium .tmi-top-grid{grid-template-columns:minmax(0,1.08fr) minmax(0,.92fr)!important;gap:18px!important}
.tmi-wrap.tmi-layout-medium .tmi-bottom-grid{grid-template-columns:minmax(0,1.5fr) minmax(0,.9fr)!important;gap:12px!important}
.tmi-wrap.tmi-layout-medium .tmi-kpi-row{gap:10px!important}
.tmi-wrap.tmi-layout-medium .tmi-kpi-label{font-size:15px!important;line-height:1.15!important}
.tmi-wrap.tmi-layout-medium .tmi-kpi-value{font-size:clamp(34px,3.2vw,52px)!important}
.tmi-wrap.tmi-layout-medium .tmi-kpi-pct{font-size:16px!important;margin-top:8px!important}
.tmi-wrap.tmi-layout-medium .tmi-table{font-size:11px!important;min-width:0!important;table-layout:auto!important}
.tmi-wrap.tmi-layout-medium .tmi-table th,.tmi-wrap.tmi-layout-medium .tmi-table td{padding:4px 3px!important}
.tmi-wrap.tmi-layout-medium .tmi-week-table{min-width:0!important}
.tmi-wrap.tmi-layout-medium .tmi-week-table th:first-child,.tmi-wrap.tmi-layout-medium .tmi-week-table td:first-child{width:24%!important;white-space:normal!important;line-height:1.12!important}
.tmi-wrap.tmi-layout-medium .tmi-bottom-grid>.tmi-panel:last-child .tmi-table th:first-child,.tmi-wrap.tmi-layout-medium .tmi-bottom-grid>.tmi-panel:last-child .tmi-table td:first-child{width:35%!important;white-space:normal!important;line-height:1.12!important}

.tmi-semaforo-wrap.tmi-layout-medium .tmi-semaforo-filters{grid-template-columns:minmax(120px,.8fr) minmax(160px,1fr) minmax(170px,1.15fr) minmax(160px,1fr) minmax(120px,.75fr) auto!important;gap:12px!important;justify-content:stretch!important}
.tmi-semaforo-wrap.tmi-layout-medium .tmi-semaforo-layout{grid-template-columns:minmax(0,1.04fr) minmax(0,.96fr)!important;gap:18px!important}
.tmi-semaforo-wrap.tmi-layout-medium .tmi-semaforo-right-top{grid-template-columns:minmax(150px,.34fr) minmax(0,1fr)!important;gap:12px!important}
.tmi-semaforo-wrap.tmi-layout-medium .tmi-semaforo-daily-zone{grid-template-columns:minmax(120px,.28fr) minmax(0,1fr)!important;gap:12px!important}
.tmi-semaforo-wrap.tmi-layout-medium .tmi-table{font-size:11px!important;min-width:0!important;table-layout:auto!important}
.tmi-semaforo-wrap.tmi-layout-medium .tmi-table th,.tmi-semaforo-wrap.tmi-layout-medium .tmi-table td{padding:3px 3px!important;white-space:normal!important;line-height:1.1!important}
.tmi-semaforo-wrap.tmi-layout-medium .tmi-semaforo-meta-card strong{font-size:clamp(42px,4vw,64px)!important}

/* Si el lienzo efectivo es realmente estrecho, priorizar legibilidad sobre dos columnas. */
.tmi-wrap.tmi-layout-tight .tmi-top-grid,.tmi-wrap.tmi-layout-tight .tmi-bottom-grid,.tmi-semaforo-wrap.tmi-layout-tight .tmi-semaforo-layout{grid-template-columns:1fr!important}
.tmi-wrap.tmi-layout-tight .tmi-kpi-area{padding-top:0!important;gap:24px!important}
.tmi-semaforo-wrap.tmi-layout-tight .tmi-semaforo-right-top{grid-template-columns:minmax(170px,.3fr) minmax(0,1fr)!important}

/* Estado activo explícito de la subvista en Navigation V2. La clase se asigna por URL real. */
.tmi-nav-current,
.tmi-nav-current>a,
.tmi-nav-current>[role="link"]{
  background:linear-gradient(135deg,#e6007e 0%,#7b2cff 58%,#22b8f4 100%)!important;
  color:#fff!important;
  border-radius:14px!important;
  box-shadow:0 8px 22px rgba(123,44,255,.24)!important;
}
.tmi-nav-current *{color:#fff!important}

/* v1.0.20 · Evita solapamiento entre Semanal y Diario con sidebar abierto.
 * En lienzo intermedio ambas tablas usan layout fijo y respetan estrictamente
 * el ancho de su celda del grid, en lugar de desbordarse por contenido nowrap. */
.tmi-wrap.tmi-layout-medium .tmi-bottom-grid{
  grid-template-columns:minmax(0,1.56fr) minmax(0,.94fr)!important;
  gap:18px!important;
  align-items:start!important;
}
.tmi-wrap.tmi-layout-medium .tmi-bottom-grid>.tmi-panel{
  min-width:0!important;
  max-width:100%!important;
  overflow:hidden!important;
}
.tmi-wrap.tmi-layout-medium .tmi-bottom-grid .tmi-table-wrap{
  width:100%!important;
  max-width:100%!important;
  overflow:visible!important;
}
.tmi-wrap.tmi-layout-medium .tmi-bottom-grid .tmi-table{
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
  table-layout:fixed!important;
}
.tmi-wrap.tmi-layout-medium .tmi-bottom-grid .tmi-table th,
.tmi-wrap.tmi-layout-medium .tmi-bottom-grid .tmi-table td{
  white-space:normal!important;
  overflow-wrap:anywhere!important;
  word-break:normal!important;
  padding-left:2px!important;
  padding-right:2px!important;
}
.tmi-wrap.tmi-layout-medium .tmi-week-table th:first-child,
.tmi-wrap.tmi-layout-medium .tmi-week-table td:first-child{width:23%!important}
.tmi-wrap.tmi-layout-medium .tmi-bottom-grid>.tmi-panel:last-child .tmi-table th:first-child,
.tmi-wrap.tmi-layout-medium .tmi-bottom-grid>.tmi-panel:last-child .tmi-table td:first-child{width:36%!important}

/* v1.0.24 · Compromiso - Instalaciones */
.tmi-compromiso-wrap{max-width:none}
.tmi-comp-filters{display:flex;align-items:end;gap:18px;flex-wrap:wrap;margin:18px 0 22px}
.tmi-comp-filters .tmi-field{min-width:170px}.tmi-comp-filters .tmi-range{display:flex;gap:8px}.tmi-comp-filters .tmi-range input{width:84px}
.tmi-comp-top{display:grid;grid-template-columns:minmax(260px,.78fr) minmax(620px,1.7fr);gap:28px;align-items:start;margin-bottom:18px}
.tmi-comp-top .tmi-table{width:100%;table-layout:auto}
.tmi-comp-history{overflow:auto;border-top:1px solid #d7e0e8;padding-top:6px;max-height:514px;scrollbar-gutter:stable}
.tmi-comp-history .tmi-comp-matrix thead th{position:sticky;z-index:4;background:#fff}
.tmi-comp-history .tmi-comp-matrix thead tr:first-child th{top:0}
.tmi-comp-history .tmi-comp-matrix thead tr:nth-child(2) th{top:32px}
.tmi-comp-history .tmi-comp-matrix thead tr{height:32px}
.tmi-comp-history .tmi-comp-matrix tbody tr{height:32px}
.tmi-comp-matrix{min-width:1120px;width:100%;border-collapse:collapse}
.tmi-comp-matrix thead tr:first-child th{border:1px solid #94a3b8;border-bottom:0;background:#fff}
.tmi-comp-matrix thead tr:nth-child(2) th{border-bottom:2px solid #0ea5c6}
.tmi-comp-matrix th,.tmi-comp-matrix td{text-align:center;white-space:nowrap;padding:6px 8px}
.tmi-comp-matrix tbody tr:nth-child(even){background:#f1f1f1}
.tmi-comp-green{background:#61d27b!important;color:#122018!important}.tmi-comp-orange{background:#f2b817!important;color:#241a00!important}.tmi-comp-red{background:#ef7777!important;color:#2c1010!important}
.tmi-comp-applied{text-align:right;font-size:13px;margin-top:12px;padding:10px 0;border-bottom:2px solid #149eb2;color:#334155}
@media(max-width:1250px){.tmi-comp-top{grid-template-columns:1fr}.tmi-comp-top section{min-width:0}.tmi-comp-top .tmi-table{table-layout:fixed}.tmi-comp-top th,.tmi-comp-top td{white-space:normal;overflow-wrap:anywhere}}

/* v1.0.29 · marcas de aplicación de filtros */
.tmi-filter-applied{text-align:right;font-size:13px;margin-top:12px;padding:10px 0 4px;color:#334155}

/* v1.0.30 · cabecera sticky de histórico sin sangrado de filas */
.tmi-comp-history{
  padding-top:0!important;
  position:relative;
  isolation:isolate;
  background:#fff;
}
.tmi-comp-history .tmi-comp-matrix{
  border-collapse:separate!important;
  border-spacing:0!important;
}
.tmi-comp-history .tmi-comp-matrix thead{
  position:relative;
  z-index:20;
}
.tmi-comp-history .tmi-comp-matrix thead tr:first-child th{
  top:0!important;
  height:34px!important;
  min-height:34px!important;
  background:#fff!important;
  background-clip:padding-box!important;
  z-index:22!important;
  box-shadow:0 -1px 0 #fff,0 1px 0 #94a3b8;
}
.tmi-comp-history .tmi-comp-matrix thead tr:nth-child(2) th{
  top:34px!important;
  height:34px!important;
  min-height:34px!important;
  background:#fff!important;
  background-clip:padding-box!important;
  z-index:21!important;
  box-shadow:0 1px 0 #0ea5c6;
}
.tmi-comp-history .tmi-comp-matrix thead th{
  position:sticky!important;
  opacity:1!important;
}
.tmi-comp-history .tmi-comp-matrix tbody{
  position:relative;
  z-index:1;
}


/* v1.0.31 · máscara superior del histórico durante scroll */
.tmi-comp-history .tmi-comp-matrix thead tr:first-child th{
  overflow:visible!important;
}
.tmi-comp-history .tmi-comp-matrix thead tr:first-child th::before{
  content:"";
  position:absolute;
  left:-1px;
  right:-1px;
  bottom:100%;
  height:40px;
  background:#fff;
  pointer-events:none;
  z-index:30;
}
.tmi-comp-history .tmi-comp-matrix thead tr:first-child th{
  position:sticky!important;
  z-index:31!important;
}
.tmi-comp-history .tmi-comp-matrix thead tr:nth-child(2) th{
  z-index:30!important;
}


/* v1.0.32 · tablas superiores de Compromiso sin solapamiento */
.tmi-comp-top{
  grid-template-columns:minmax(0,.82fr) minmax(0,1.78fr)!important;
  column-gap:34px!important;
}
.tmi-comp-top>section{
  min-width:0!important;
  max-width:100%!important;
  overflow:hidden!important;
}
.tmi-comp-top .tmi-table{
  width:100%!important;
  min-width:0!important;
  max-width:100%!important;
  table-layout:fixed!important;
}
.tmi-comp-top .tmi-table th,
.tmi-comp-top .tmi-table td{
  white-space:normal!important;
  overflow-wrap:anywhere!important;
  word-break:normal!important;
  padding-left:5px!important;
  padding-right:5px!important;
}
.tmi-comp-top>section:first-child .tmi-table th:first-child,
.tmi-comp-top>section:first-child .tmi-table td:first-child{width:64%!important}
.tmi-comp-top>section:first-child .tmi-table th:nth-child(2),
.tmi-comp-top>section:first-child .tmi-table td:nth-child(2){width:22%!important}
.tmi-comp-top>section:first-child .tmi-table th:nth-child(3),
.tmi-comp-top>section:first-child .tmi-table td:nth-child(3){width:14%!important}
.tmi-comp-top>section:nth-child(2) .tmi-table th:first-child,
.tmi-comp-top>section:nth-child(2) .tmi-table td:first-child{width:29%!important}
@media(max-width:1250px){
  .tmi-comp-top{grid-template-columns:1fr!important;row-gap:20px!important}
  .tmi-comp-top>section{overflow:visible!important}
}


/* v1.0.33 · KES visual system / Región Sur
   Solo presentación: consume tokens del Theme/Core cuando están disponibles y conserva fallbacks locales. */
.tmi-wrap{
  --tmi-kes-primary:var(--kes-primary,var(--krn-primary,var(--rs-purple,#6b17d9)));
  --tmi-kes-secondary:var(--kes-secondary,var(--krn-secondary,var(--rs-pink,#e600a8)));
  --tmi-kes-accent:var(--kes-accent,var(--krn-accent,var(--rs-cyan,#0ea5e9)));
  --tmi-kes-success:var(--kes-success,var(--krn-success,#10b981));
  --tmi-kes-warning:var(--kes-warning,var(--krn-warning,#f59e0b));
  --tmi-kes-error:var(--kes-error,var(--krn-error,#ef5350));
  --tmi-kes-bg:var(--kes-bg,var(--krn-bg,var(--rs-bg,#f8f6fc)));
  --tmi-kes-surface:var(--kes-surface,var(--krn-surface,var(--rs-card,#fff)));
  --tmi-kes-soft:color-mix(in srgb,var(--tmi-kes-primary) 4%,var(--tmi-kes-surface));
  --tmi-kes-text:var(--kes-text,var(--krn-text,var(--rs-text,#171827)));
  --tmi-kes-muted:var(--kes-muted,var(--krn-muted,var(--rs-muted,#667085)));
  --tmi-kes-border:var(--kes-border,var(--krn-line,var(--rs-line,rgba(112,67,180,.15))));
  --tmi-kes-radius-sm:var(--kes-radius-sm,12px);
  --tmi-kes-radius-md:var(--kes-radius-md,16px);
  --tmi-kes-radius-lg:var(--kes-radius-lg,var(--krn-radius-sm,20px));
  --tmi-kes-radius-xl:var(--kes-radius-xl,var(--krn-radius,28px));
  --tmi-kes-pill:var(--kes-radius-pill,999px);
  --tmi-kes-shadow-sm:var(--kes-shadow-sm,var(--krn-soft-shadow,var(--rs-soft-shadow,0 12px 30px rgba(31,23,48,.06))));
  --tmi-kes-shadow-md:var(--kes-shadow-md,var(--krn-shadow,var(--rs-shadow,0 20px 50px rgba(31,23,48,.10))));
  --tmi-kes-gradient:var(--kes-grad-primary,var(--krn-action-gradient,var(--rs-action-gradient,linear-gradient(105deg,#e600a8 0%,#8a2be2 58%,#0ea5e9 100%))));
  --ink:var(--tmi-kes-text)!important;
  --muted:var(--tmi-kes-muted)!important;
  --line:var(--tmi-kes-border)!important;
  --good:#5fd17f;
  --warn:#f6b81a;
  --bad:#ef7474;
  background:transparent!important;
  color:var(--tmi-kes-text)!important;
  font-family:var(--krn-font-sans,var(--rs-font,Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif))!important;
}

/* KES Hero Compacto */
.tmi-header,.tmi-semaforo-header{
  position:relative;
  border:1px solid var(--tmi-kes-border)!important;
  border-radius:var(--tmi-kes-radius-xl)!important;
  padding:18px 22px!important;
  margin:0 0 18px!important;
  background:
    radial-gradient(circle at 10% 0%,color-mix(in srgb,var(--tmi-kes-secondary) 9%,transparent),transparent 38%),
    radial-gradient(circle at 94% 12%,color-mix(in srgb,var(--tmi-kes-accent) 7%,transparent),transparent 35%),
    var(--tmi-kes-surface)!important;
  box-shadow:var(--tmi-kes-shadow-sm)!important;
  overflow:hidden;
}
.tmi-header:after,.tmi-semaforo-header:after{
  content:"";position:absolute;left:22px;right:22px;bottom:0;height:3px;border-radius:999px;background:var(--tmi-kes-gradient);opacity:.92;
}
.tmi-title,.tmi-semaforo-title{
  color:var(--tmi-kes-text)!important;
  letter-spacing:-.045em!important;
  line-height:1!important;
  font-weight:800!important;
}
.tmi-subtitle{
  display:inline-flex!important;align-items:center;min-height:24px;margin-top:8px!important;padding:4px 9px;border-radius:var(--tmi-kes-pill);
  color:var(--tmi-kes-secondary)!important;background:color-mix(in srgb,var(--tmi-kes-secondary) 7%,transparent);border:1px solid color-mix(in srgb,var(--tmi-kes-secondary) 12%,transparent);
  font-size:10px!important;letter-spacing:.16em!important;font-weight:800!important;
}

/* KES Filter Bar Compacta */
.tmi-filter-row,.tmi-semaforo-filters,.tmi-comp-filters{
  padding:12px 14px!important;
  border:1px solid var(--tmi-kes-border)!important;
  border-radius:var(--tmi-kes-radius-lg)!important;
  background:color-mix(in srgb,var(--tmi-kes-surface) 92%,transparent)!important;
  box-shadow:0 8px 22px color-mix(in srgb,var(--tmi-kes-primary) 5%,transparent)!important;
}
.tmi-filter-row{margin-bottom:12px!important}
.tmi-semaforo-filters{margin-top:0!important;margin-bottom:18px!important}
.tmi-comp-filters{margin-top:0!important;margin-bottom:18px!important;width:max-content;max-width:100%}
.tmi-field label,.tmi-year-filter label,.tmi-semaforo-year label{
  color:var(--tmi-kes-muted)!important;font-size:11px!important;font-weight:800!important;letter-spacing:.02em;
}
.tmi-year-filter select,.tmi-field select,.tmi-field input,.tmi-semaforo-year select{
  border:1px solid var(--tmi-kes-border)!important;
  border-radius:12px!important;
  background:var(--tmi-kes-surface)!important;
  color:var(--tmi-kes-text)!important;
  box-shadow:0 4px 12px rgba(31,23,48,.035)!important;
  min-height:38px!important;
  transition:border-color .18s ease,box-shadow .18s ease,transform .18s ease;
}
.tmi-year-filter select:focus,.tmi-field select:focus,.tmi-field input:focus,.tmi-semaforo-year select:focus{
  outline:none!important;border-color:color-mix(in srgb,var(--tmi-kes-primary) 45%,var(--tmi-kes-border))!important;
  box-shadow:0 0 0 3px color-mix(in srgb,var(--tmi-kes-primary) 10%,transparent)!important;
}
.tmi-apply{
  display:inline-flex!important;align-items:center!important;justify-content:center!important;
  border:0!important;border-radius:var(--tmi-kes-pill)!important;
  min-height:38px!important;padding:8px 18px!important;
  color:#fff!important;background:var(--tmi-kes-gradient)!important;
  box-shadow:0 12px 26px color-mix(in srgb,var(--tmi-kes-secondary) 20%,transparent)!important;
  font-size:12px!important;font-weight:900!important;letter-spacing:.01em;
  transition:transform .16s ease,box-shadow .16s ease,filter .16s ease;
}
.tmi-apply:hover{transform:translateY(-1px);filter:saturate(1.05);box-shadow:0 16px 32px color-mix(in srgb,var(--tmi-kes-secondary) 26%,transparent)!important}
.tmi-apply:focus-visible{outline:3px solid color-mix(in srgb,var(--tmi-kes-accent) 32%,transparent)!important;outline-offset:2px}

/* Paneles y tarjetas KES */
.tmi-panel,.tmi-semaforo-left,.tmi-semaforo-right-top,.tmi-semaforo-daily-zone,.tmi-semaforo-progress-zone,.tmi-comp-top>section,.tmi-comp-history{
  border:1px solid var(--tmi-kes-border)!important;
  border-radius:var(--tmi-kes-radius-lg)!important;
  background:var(--tmi-kes-surface)!important;
  box-shadow:var(--tmi-kes-shadow-sm)!important;
}
.tmi-panel{padding:14px!important}
.tmi-semaforo-left{padding:16px!important}
.tmi-semaforo-right-top,.tmi-semaforo-daily-zone,.tmi-semaforo-progress-zone{padding:14px!important}
.tmi-comp-top>section{padding:12px!important;overflow:hidden!important}
.tmi-comp-history{padding:0!important;overflow:auto!important}

.tmi-section-head,.tmi-semaforo-section-title{
  color:var(--tmi-kes-text)!important;
}
.tmi-section-title,.tmi-semaforo-section-title{
  font-weight:800!important;letter-spacing:-.025em!important;
}

/* KES Metric / White cards */
.tmi-kpi-area{gap:14px!important;padding-top:0!important}
.tmi-kpi-row{gap:14px!important}
.tmi-kpi,.tmi-semaforo-meta-card{
  position:relative;
  min-height:132px;
  padding:16px 14px!important;
  border:1px solid var(--tmi-kes-border)!important;
  border-radius:var(--tmi-kes-radius-lg)!important;
  background:var(--tmi-kes-surface)!important;
  box-shadow:var(--tmi-kes-shadow-sm)!important;
  overflow:hidden;
}
.tmi-kpi:before,.tmi-semaforo-meta-card:before{
  content:"";position:absolute;left:0;top:0;bottom:0;width:4px;background:var(--tmi-kes-gradient);opacity:.92;
}
.tmi-kpi-label,.tmi-semaforo-meta-card>div{font-size:12px!important;color:var(--tmi-kes-muted)!important;font-weight:800!important}
.tmi-kpi-value,.tmi-semaforo-meta-card strong{font-weight:760!important;letter-spacing:-.055em!important;color:var(--tmi-kes-text)!important}
.tmi-kpi-value{font-size:clamp(34px,3vw,52px)!important;margin-top:8px!important}
.tmi-semaforo-meta-card strong{font-size:clamp(42px,4vw,64px)!important}
.tmi-kpi-pct{
  border-radius:var(--tmi-kes-pill)!important;padding:5px 10px!important;font-size:12px!important;font-weight:900!important;
  box-shadow:inset 0 0 0 1px rgba(0,0,0,.04);
}

/* KES table cards */
.tmi-table-wrap{border-radius:14px!important;overflow:auto;background:var(--tmi-kes-surface)}
.tmi-table{color:var(--tmi-kes-text)!important}
.tmi-table th,.tmi-table td{
  border-bottom:1px solid color-mix(in srgb,var(--tmi-kes-border) 72%,transparent)!important;
}
.tmi-table th{
  background:color-mix(in srgb,var(--tmi-kes-primary) 3.5%,var(--tmi-kes-surface))!important;
  color:var(--tmi-kes-muted)!important;
  border-bottom:1px solid color-mix(in srgb,var(--tmi-kes-primary) 18%,var(--tmi-kes-border))!important;
  font-size:11px!important;font-weight:850!important;text-transform:none!important;
}
.tmi-table tbody tr:nth-child(even){background:color-mix(in srgb,var(--tmi-kes-primary) 3%,var(--tmi-kes-surface))!important}
.tmi-table tbody tr:hover:not(.tmi-total){background:color-mix(in srgb,var(--tmi-kes-accent) 5%,var(--tmi-kes-surface))!important}
.tmi-table .tmi-total,.tmi-table tr.tmi-total{
  background:color-mix(in srgb,var(--tmi-kes-primary) 7%,var(--tmi-kes-surface))!important;
  color:var(--tmi-kes-text)!important;
}
.tmi-sort-button{color:inherit!important;font-weight:850!important;border-radius:8px!important;transition:background .16s ease,color .16s ease}
.tmi-sort-button:hover,.tmi-sort-button:focus-visible{background:color-mix(in srgb,var(--tmi-kes-primary) 8%,transparent)!important;color:var(--tmi-kes-primary)!important}

/* Pills y botones secundarios */
.tmi-details-button{
  border:1px solid color-mix(in srgb,var(--tmi-kes-primary) 20%,var(--tmi-kes-border))!important;
  border-radius:var(--tmi-kes-pill)!important;
  background:color-mix(in srgb,var(--tmi-kes-primary) 6%,var(--tmi-kes-surface))!important;
  color:var(--tmi-kes-primary)!important;
  font-size:11px!important;font-weight:900!important;padding:6px 11px!important;
}
.tmi-details-button:hover,.tmi-details-button:focus-visible{background:color-mix(in srgb,var(--tmi-kes-primary) 12%,var(--tmi-kes-surface))!important}
.tmi-details-button span{background:var(--tmi-kes-gradient)!important}

/* KES Detail Modal / blur */
.tmi-details-backdrop{background:rgba(24,15,42,.38)!important;backdrop-filter:blur(9px);-webkit-backdrop-filter:blur(9px)}
.tmi-details-card{border:1px solid color-mix(in srgb,var(--tmi-kes-primary) 16%,transparent)!important;border-radius:24px!important;box-shadow:0 28px 80px rgba(20,12,36,.28)!important;background:var(--tmi-kes-surface)!important}
.tmi-details-header{padding:18px 20px!important;background:linear-gradient(135deg,color-mix(in srgb,var(--tmi-kes-secondary) 5%,var(--tmi-kes-surface)),var(--tmi-kes-surface))!important;border-bottom:1px solid var(--tmi-kes-border)!important}
.tmi-details-close{width:38px;height:38px;border-radius:var(--tmi-kes-pill)!important;background:color-mix(in srgb,var(--tmi-kes-primary) 7%,transparent)!important;color:var(--tmi-kes-primary)!important}
.tmi-details-list{background:var(--tmi-kes-bg)!important}
.tmi-detail-record{border-color:var(--tmi-kes-border)!important;border-radius:16px!important;box-shadow:0 8px 24px rgba(31,23,48,.045)!important}
.tmi-detail-record-head,.tmi-source-row-title{background:color-mix(in srgb,var(--tmi-kes-primary) 4%,var(--tmi-kes-surface))!important}
.tmi-detail-status{border-radius:var(--tmi-kes-pill)!important;background:color-mix(in srgb,var(--tmi-kes-primary) 9%,var(--tmi-kes-surface))!important;color:var(--tmi-kes-primary)!important}

/* Notas, timestamps y estados */
.tmi-source-note,.tmi-filter-applied,.tmi-comp-applied{color:var(--tmi-kes-muted)!important}
.tmi-filter-applied,.tmi-comp-applied{
  display:flex;justify-content:flex-end;align-items:center;gap:8px;
  margin-top:12px!important;padding:8px 12px!important;border:1px solid var(--tmi-kes-border)!important;border-radius:var(--tmi-kes-pill)!important;background:var(--tmi-kes-surface)!important;box-shadow:0 6px 18px rgba(31,23,48,.035)!important;font-size:11px!important;width:max-content;max-width:100%;margin-left:auto!important;
}
.tmi-notice{border-color:var(--tmi-kes-border)!important;border-radius:16px!important;background:var(--tmi-kes-surface)!important;box-shadow:var(--tmi-kes-shadow-sm)!important}

/* Semáforo: preservar significado, aplicar tratamiento KES */
.tmi-semaforo-dot{width:12px!important;height:12px!important;border:2px solid color-mix(in srgb,#fff 80%,transparent)!important;box-shadow:0 0 0 1px rgba(0,0,0,.08)}
.tmi-semaforo-dot.good{background:var(--tmi-kes-success)!important}.tmi-semaforo-dot.bad{background:var(--tmi-kes-error)!important}

/* Compromiso: matriz histórica dentro de una tarjeta KES */
.tmi-comp-matrix thead tr:first-child th,.tmi-comp-history .tmi-comp-matrix thead tr:first-child th,.tmi-comp-history .tmi-comp-matrix thead tr:nth-child(2) th{
  background:var(--tmi-kes-surface)!important;
  color:var(--tmi-kes-muted)!important;
  border-color:var(--tmi-kes-border)!important;
}
.tmi-comp-history .tmi-comp-matrix thead tr:first-child th::before{background:var(--tmi-kes-surface)!important}
.tmi-comp-matrix thead tr:nth-child(2) th{border-bottom:2px solid color-mix(in srgb,var(--tmi-kes-accent) 65%,var(--tmi-kes-primary))!important}
.tmi-comp-matrix tbody tr:nth-child(even){background:color-mix(in srgb,var(--tmi-kes-primary) 3%,var(--tmi-kes-surface))!important}

/* Dark mode / KES dark: no fondo blanco forzado. */
body.krn-mode-dark .tmi-wrap,html.krn-mode-dark .tmi-wrap{
  --tmi-kes-surface:var(--kes-surface,var(--krn-surface,#171120));
  --tmi-kes-bg:var(--kes-bg,var(--krn-bg,#0b0710));
  --tmi-kes-text:var(--kes-text,var(--krn-text,#f8f2ff));
  --tmi-kes-muted:var(--kes-muted,var(--krn-muted,#c3b6d3));
  --tmi-kes-border:var(--kes-border,var(--krn-line,rgba(255,255,255,.11)));
}
body.krn-mode-dark .tmi-table tbody tr:nth-child(even),body.krn-mode-dark .tmi-table .tmi-total{color:var(--tmi-kes-text)!important}

/* Responsive: mantiene la disciplina de canvas/sidebar del Theme. */
@media(max-width:1180px){
  .tmi-header,.tmi-semaforo-header{border-radius:22px!important;padding:16px 18px!important}
  .tmi-kpi-row{grid-template-columns:repeat(3,minmax(0,1fr))!important}
}
@media(max-width:820px){
  .tmi-wrap{padding:10px!important}
  .tmi-header,.tmi-semaforo-header{border-radius:18px!important;padding:14px!important}
  .tmi-kpi-row{grid-template-columns:1fr!important}
  .tmi-kpi{min-height:108px}
  .tmi-comp-filters{width:100%}
  .tmi-panel,.tmi-semaforo-left,.tmi-semaforo-right-top,.tmi-semaforo-daily-zone,.tmi-semaforo-progress-zone,.tmi-comp-top>section,.tmi-comp-history{border-radius:16px!important}
}

/* v1.0.34 · Semáforo Diario KES layout refinements */
.tmi-semaforo-right-top{
  background:transparent!important;
  border:0!important;
  box-shadow:none!important;
  padding:0!important;
}
.tmi-semaforo-right-top>.tmi-table-wrap{
  background:var(--tmi-kes-surface,#fff)!important;
  border:1px solid var(--tmi-kes-border,rgba(120,70,220,.16))!important;
  border-radius:18px!important;
  box-shadow:var(--tmi-kes-shadow-sm,0 8px 24px rgba(50,20,90,.06))!important;
  padding:14px!important;
  min-width:0!important;
}
.tmi-semaforo-meta-card{
  align-self:start!important;
  margin:0!important;
}
.tmi-semaforo-daily-zone{
  display:block!important;
}
.tmi-semaforo-daily-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  margin-bottom:10px;
}
.tmi-semaforo-daily-head .tmi-semaforo-section-title{
  margin:0!important;
  flex:1 1 auto;
  text-align:center;
}
.tmi-semaforo-day-filter{
  grid-row:auto!important;
  align-self:flex-start!important;
  margin:0!important;
  min-width:138px;
}
.tmi-semaforo-day-filter select{width:140px!important;max-width:100%}
@media(max-width:850px){
  .tmi-semaforo-daily-head{align-items:stretch;flex-direction:column}
  .tmi-semaforo-daily-head .tmi-semaforo-section-title{text-align:left}
  .tmi-semaforo-day-filter{width:100%}
  .tmi-semaforo-day-filter select{width:100%!important}
}

/* v1.0.35 · KES range/week pickers inspired by Vista regional */
.tmi-kes-rangebar{
  position:relative;display:flex;align-items:center;gap:10px;flex-wrap:wrap;
  width:max-content;max-width:100%;margin:0 0 12px 0;padding:8px;
  border:1px solid var(--tmi-kes-border,rgba(126,76,214,.16));
  border-radius:18px;background:var(--tmi-kes-surface,#fff);box-shadow:var(--tmi-kes-shadow-sm,0 8px 24px rgba(50,20,90,.05));
}
.tmi-kes-segments,.tmi-kes-week-nav{display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.tmi-kes-segment,.tmi-kes-nav-pill,.tmi-kes-secondary,.tmi-kes-icon-btn,.tmi-kes-range-trigger,.tmi-kes-daychip{
  appearance:none;border:1px solid var(--tmi-kes-border,rgba(126,76,214,.16));background:color-mix(in srgb,var(--tmi-kes-primary,#7c3aed) 4%,var(--tmi-kes-surface,#fff));
  color:var(--tmi-kes-text,#171126);font:inherit;cursor:pointer;transition:.16s ease;
}
.tmi-kes-segment,.tmi-kes-nav-pill,.tmi-kes-secondary{border-radius:999px;padding:7px 12px;font-size:11px;font-weight:850}
.tmi-kes-segment.is-active,.tmi-kes-nav-pill.is-current,.tmi-kes-daychip.is-selected{
  border-color:transparent;background:linear-gradient(90deg,var(--tmi-kes-primary,#7c3aed),var(--tmi-kes-accent,#ec4899));color:#fff;
  box-shadow:0 6px 18px color-mix(in srgb,var(--tmi-kes-primary,#7c3aed) 22%,transparent);
}
.tmi-kes-range-trigger{display:flex;align-items:center;gap:10px;min-width:190px;border-radius:14px;padding:7px 10px;text-align:left}
.tmi-kes-range-trigger:hover,.tmi-kes-nav-pill:hover,.tmi-kes-segment:hover,.tmi-kes-secondary:hover,.tmi-kes-daychip:hover{transform:translateY(-1px);border-color:color-mix(in srgb,var(--tmi-kes-primary,#7c3aed) 35%,var(--tmi-kes-border))}
.tmi-kes-range-trigger-kicker{display:block;font-size:9px;text-transform:uppercase;letter-spacing:.08em;color:var(--tmi-kes-muted,#756b86);font-weight:850}
.tmi-kes-range-trigger strong{font-size:12px;line-height:1.2;flex:1}
.tmi-kes-popover{
  position:absolute;z-index:60;top:calc(100% + 8px);left:0;width:330px;max-width:min(330px,calc(100vw - 36px));padding:14px;
  border:1px solid var(--tmi-kes-border,rgba(126,76,214,.18));border-radius:18px;background:var(--tmi-kes-surface,#fff);box-shadow:0 24px 60px rgba(45,18,78,.18);
}
.tmi-kes-popover[hidden]{display:none!important}
.tmi-kes-popover-head{display:grid;grid-template-columns:34px 1fr 34px;align-items:center;gap:8px;margin-bottom:10px;text-align:center}
.tmi-kes-icon-btn{width:34px;height:34px;border-radius:999px;font-weight:900}
.tmi-kes-weekdays,.tmi-kes-calendar-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:5px}
.tmi-kes-weekdays{margin-bottom:5px}.tmi-kes-weekdays span{text-align:center;font-size:9px;font-weight:850;color:var(--tmi-kes-muted,#756b86)}
.tmi-kes-calendar-day{appearance:none;border:0;border-radius:999px;min-height:34px;background:transparent;color:var(--tmi-kes-text,#171126);cursor:pointer;font:inherit;font-size:11px}
.tmi-kes-calendar-day:hover{background:color-mix(in srgb,var(--tmi-kes-primary,#7c3aed) 8%,transparent)}
.tmi-kes-calendar-day.is-range{background:color-mix(in srgb,var(--tmi-kes-primary,#7c3aed) 12%,var(--tmi-kes-surface,#fff))}
.tmi-kes-calendar-day.is-start,.tmi-kes-calendar-day.is-end{background:linear-gradient(90deg,var(--tmi-kes-primary,#7c3aed),var(--tmi-kes-accent,#ec4899));color:#fff;font-weight:900}
.tmi-kes-calendar-day.is-outside{opacity:.28;pointer-events:none}
.tmi-kes-range-caption,.tmi-kes-week-dates{margin:10px 0 8px;font-size:10px;color:var(--tmi-kes-muted,#756b86);font-weight:750}
.tmi-kes-popover-apply{width:100%}
.tmi-kes-week-picker{margin-bottom:12px}
.tmi-kes-week-picker .tmi-kes-popover{left:auto;right:0;width:360px}
.tmi-kes-popover-title{font-size:11px;line-height:1.35;color:var(--tmi-kes-muted,#756b86);margin-bottom:10px}
.tmi-kes-popover-title strong{color:var(--tmi-kes-text,#171126)}
.tmi-kes-daychips{display:grid;grid-template-columns:repeat(7,1fr);gap:6px}
.tmi-kes-daychip{border-radius:999px;padding:8px 2px;font-size:10px;font-weight:900;text-align:center}
.tmi-kes-popover-actions{display:flex;justify-content:space-between;gap:10px;align-items:center;margin-top:10px}
.tmi-kes-secondary{background:transparent;color:var(--tmi-kes-primary,#7c3aed)}
.tmi-compromiso-form>.tmi-kes-rangebar{margin:12px 0 16px}
.tmi-month-panel>.tmi-kes-rangebar{margin-bottom:10px}
.tmi-bottom-grid .tmi-kes-rangebar{margin-bottom:6px}
@media(max-width:820px){
 .tmi-kes-rangebar{width:100%;align-items:stretch}.tmi-kes-segments,.tmi-kes-week-nav{width:100%}.tmi-kes-range-trigger{width:100%}.tmi-kes-popover{left:0!important;right:auto!important;width:min(360px,calc(100vw - 40px))}
 .tmi-kes-nav-pill{flex:1 1 auto}
}

/* v1.0.38 — Semáforo Diario: títulos, rango unificado y orden de paneles */
.tmi-semaforo-filters{
  grid-template-columns:minmax(150px,180px) minmax(190px,220px) minmax(220px,280px) auto!important;
  justify-content:center!important;
  gap:20px!important;
}
.tmi-semaforo-right-top{
  grid-template-columns:minmax(150px,220px) minmax(0,1fr)!important;
  gap:22px!important;
}
.tmi-semaforo-table-card{min-width:0;max-width:100%}
.tmi-semaforo-compare-card .tmi-semaforo-section-title,
.tmi-semaforo-progress-zone>.tmi-semaforo-section-title{margin:0 0 10px!important}
.tmi-semaforo-progress-zone{padding-left:0!important}
.tmi-semaforo-daily-zone{
  display:block!important;
}
.tmi-semaforo-daily-head{
  display:flex!important;
  align-items:flex-end!important;
  justify-content:space-between!important;
  gap:18px!important;
  margin-bottom:10px!important;
}
.tmi-semaforo-daily-head .tmi-semaforo-section-title{
  margin:0!important;
  flex:1;
  text-align:center!important;
}
.tmi-semaforo-daily-filters{
  display:flex;
  align-items:flex-end;
  gap:12px;
  flex:0 0 auto;
}
.tmi-semaforo-daily-filters .tmi-field select{min-width:110px}
.tmi-semaforo-day-filter select{width:140px!important}
@media(max-width:1380px){
  .tmi-semaforo-filters{grid-template-columns:minmax(130px,.8fr) minmax(180px,1fr) minmax(190px,1.15fr) auto!important}
}
@media(max-width:850px){
  .tmi-semaforo-filters{grid-template-columns:1fr 1fr!important}
  .tmi-semaforo-daily-head{align-items:stretch!important;flex-direction:column!important}
  .tmi-semaforo-daily-head .tmi-semaforo-section-title{text-align:left!important}
  .tmi-semaforo-daily-filters{width:100%;display:grid;grid-template-columns:1fr 1fr}
  .tmi-semaforo-daily-filters .tmi-field select{width:100%!important;min-width:0}
}

/* v1.0.39 — filtros KES Diario y Semáforo */
.tmi-kes-daybar{
  display:grid;
  grid-template-columns:repeat(7,minmax(0,1fr));
  gap:8px;
  width:100%;
  margin:0 0 12px;
  padding:8px;
  border:1px solid var(--tmi-kes-border,rgba(126,76,214,.16));
  border-radius:18px;
  background:var(--tmi-kes-surface,#fff);
  box-shadow:var(--tmi-kes-shadow-sm,0 8px 24px rgba(50,20,90,.05));
}
.tmi-kes-day-nav-pill{
  appearance:none;
  min-width:0;
  border:1px solid var(--tmi-kes-border,rgba(126,76,214,.16));
  border-radius:999px;
  padding:8px 6px;
  background:color-mix(in srgb,var(--tmi-kes-primary,#7c3aed) 4%,var(--tmi-kes-surface,#fff));
  color:var(--tmi-kes-text,#171126);
  font:inherit;
  font-size:11px;
  font-weight:850;
  text-align:center;
  cursor:pointer;
  white-space:nowrap;
  transition:.16s ease;
}
.tmi-kes-day-nav-pill:hover{transform:translateY(-1px);border-color:color-mix(in srgb,var(--tmi-kes-primary,#7c3aed) 35%,var(--tmi-kes-border))}
.tmi-kes-day-nav-pill.is-current{
  border-color:transparent;
  background:linear-gradient(90deg,var(--tmi-kes-primary,#7c3aed),var(--tmi-kes-accent,#ec4899));
  color:#fff;
  box-shadow:0 6px 18px color-mix(in srgb,var(--tmi-kes-primary,#7c3aed) 22%,transparent);
}
.tmi-daily-panel>.tmi-kes-daybar{width:100%}

/* Semáforo: Mes + Días Transcurridos pasan a un único calendario de rango. */
.tmi-semaforo-filters{
  grid-template-columns:minmax(230px,320px) minmax(220px,300px) auto!important;
  gap:18px!important;
  align-items:center!important;
}
.tmi-semaforo-filters>.tmi-kes-month-picker{width:100%;margin:0!important}
.tmi-semaforo-filters>.tmi-kes-month-picker .tmi-kes-range-trigger{width:100%}
.tmi-semaforo-filters>.tmi-kes-month-picker .tmi-kes-popover{left:0;right:auto}

/* Semáforo Diario: semana + día como un único control KES, a todo lo ancho de la tarjeta. */
.tmi-semaforo-daily-head{
  display:grid!important;
  grid-template-columns:1fr!important;
  gap:10px!important;
  align-items:stretch!important;
}
.tmi-semaforo-daily-head .tmi-semaforo-daily-filters{
  grid-row:1;
  width:100%;
  display:block!important;
}
.tmi-semaforo-daily-head .tmi-semaforo-section-title{
  grid-row:2;
  width:100%;
  text-align:center!important;
}
.tmi-semaforo-weekday-picker{width:100%!important;margin:0!important}
.tmi-semaforo-weekday-picker .tmi-kes-week-nav{width:100%;display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);gap:8px}
.tmi-semaforo-weekday-picker .tmi-kes-nav-pill{width:100%;min-width:0}
.tmi-semaforo-weekday-picker .tmi-kes-week-popover{left:50%!important;right:auto!important;transform:translateX(-50%);width:min(420px,calc(100vw - 48px))}
.tmi-kes-popover-actions-single{justify-content:flex-end}

@media(max-width:850px){
  .tmi-kes-daybar{grid-template-columns:repeat(4,minmax(0,1fr))}
  .tmi-semaforo-filters{grid-template-columns:1fr!important}
  .tmi-semaforo-filters>.tmi-kes-month-picker,.tmi-semaforo-filters>.tmi-field,.tmi-semaforo-apply{width:100%}
  .tmi-semaforo-weekday-picker .tmi-kes-week-nav{grid-template-columns:1fr}
  .tmi-semaforo-weekday-picker .tmi-kes-week-popover{left:0!important;transform:none}
}
@media(max-width:560px){.tmi-kes-daybar{grid-template-columns:repeat(2,minmax(0,1fr))}}


/* v1.0.41 — corrección efectiva: selector semanal compacto en Semáforo Diario */
.tmi-semaforo-daily-head .tmi-semaforo-daily-filters{
  width:auto!important;
  max-width:350px!important;
  justify-self:start!important;
  display:block!important;
}
.tmi-semaforo-weekday-picker{
  width:auto!important;
  max-width:350px!important;
  margin:0!important;
}
.tmi-semaforo-weekday-picker .tmi-kes-week-nav{
  width:auto!important;
  display:flex!important;
  align-items:center!important;
  gap:6px!important;
  flex-wrap:nowrap!important;
}
.tmi-semaforo-weekday-picker .tmi-kes-nav-pill{
  width:auto!important;
  min-width:0!important;
  flex:0 0 auto!important;
  padding:6px 10px!important;
  font-size:12px!important;
  line-height:1.15!important;
  white-space:nowrap!important;
}
.tmi-semaforo-weekday-picker [data-tmi-week-trigger]{
  padding-inline:12px!important;
}
.tmi-semaforo-weekday-picker .tmi-kes-week-popover{
  left:0!important;
  right:auto!important;
  transform:none!important;
  width:350px!important;
  max-width:calc(100vw - 48px)!important;
}
@media(max-width:850px){
  .tmi-semaforo-daily-head .tmi-semaforo-daily-filters,
  .tmi-semaforo-weekday-picker{width:100%!important;max-width:none!important}
  .tmi-semaforo-weekday-picker .tmi-kes-week-nav{
    width:100%!important;
    display:grid!important;
    grid-template-columns:minmax(0,1fr) auto minmax(0,1fr)!important;
  }
  .tmi-semaforo-weekday-picker .tmi-kes-nav-pill{width:100%!important}
}

/* v1.0.42 — Semáforo Diario: consistencia visual de tarjetas */
/* La comparativa mensual debe leerse como una tarjeta KES independiente,
   con el mismo fondo/borde/sombra que el resto de paneles del tablero. */
.tmi-semaforo-compare-card{
  box-sizing:border-box!important;
  width:100%!important;
  min-width:0!important;
  padding:14px!important;
  border:1px solid var(--tmi-kes-border,rgba(120,70,220,.16))!important;
  border-radius:var(--tmi-kes-radius-lg,18px)!important;
  background:var(--tmi-kes-surface,#fff)!important;
  box-shadow:var(--tmi-kes-shadow-sm,0 8px 24px rgba(50,20,90,.06))!important;
  overflow:hidden!important;
}
.tmi-semaforo-compare-card .tmi-table-wrap{
  background:transparent!important;
}

/* El selector semanal ocupa la primera fila; el título Diario ocupa la
   segunda y debe abarcar el ancho completo de la tarjeta. Una regla base
   antigua asignaba grid-column:2 al título y lo desplazaba a la derecha. */
.tmi-semaforo-daily-head .tmi-semaforo-section-title{
  grid-column:1 / -1!important;
  grid-row:2!important;
  width:100%!important;
  justify-self:stretch!important;
  text-align:center!important;
  margin:0!important;
}
.tmi-semaforo-daily-head .tmi-semaforo-daily-filters{
  grid-column:1 / -1!important;
  grid-row:1!important;
}

/* v1.0.48 · Clientes Instalados x Día como comparativo de barras */
.tmi-semaforo-day-bars{
  table-layout:fixed!important;
}
.tmi-semaforo-day-bars th:nth-child(1),
.tmi-semaforo-day-bars td:nth-child(1){width:7%!important}
.tmi-semaforo-day-bars th:nth-child(2),
.tmi-semaforo-day-bars td:nth-child(2){width:16%!important;text-align:left!important}
.tmi-semaforo-day-bars th:nth-child(3),
.tmi-semaforo-day-bars td:nth-child(3){width:43%!important;text-align:left!important}
.tmi-semaforo-day-bars th:nth-child(4),
.tmi-semaforo-day-bars td:nth-child(4){width:10%!important}
.tmi-semaforo-day-bars th:nth-child(5),
.tmi-semaforo-day-bars td:nth-child(5){width:10%!important}
.tmi-semaforo-day-bars th:nth-child(6),
.tmi-semaforo-day-bars td:nth-child(6){width:14%!important}
.tmi-semaforo-day-bars td{vertical-align:middle!important}
.tmi-day-label{display:flex;flex-direction:column;gap:1px;line-height:1.08}
.tmi-day-label strong{font-weight:800;color:var(--tmi-kes-text,#111827);text-transform:capitalize}
.tmi-day-label span{font-size:10px;color:var(--tmi-kes-muted,#667085);font-weight:700;text-transform:capitalize}
.tmi-install-compare{display:flex;flex-direction:column;gap:4px;min-width:0;padding:2px 0}
.tmi-install-track{position:relative;height:14px;border-radius:999px;overflow:hidden;background:color-mix(in srgb,var(--tmi-kes-primary,#7c3aed) 7%,var(--tmi-kes-surface,#fff));box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--tmi-kes-primary,#7c3aed) 4%,transparent)}
.tmi-install-bar{position:absolute;left:0;border-radius:999px;display:block}
.tmi-install-bar-prev{top:2px;height:10px;background:color-mix(in srgb,#178ac4 24%,#dff3fd);opacity:.9}
.tmi-install-bar-current{top:3px;height:8px;background:#178ac4;box-shadow:0 0 0 1px rgba(23,138,196,.08)}
.tmi-install-values{display:flex;align-items:center;justify-content:space-between;gap:8px;line-height:1}
.tmi-install-values strong{font-size:12px;color:var(--tmi-kes-text,#111827);font-weight:850}
.tmi-install-values span{font-size:10px;color:var(--tmi-kes-muted,#667085);font-weight:700;white-space:nowrap}
.tmi-semaforo-day-bars tr.tmi-total .tmi-install-track{height:16px}
.tmi-semaforo-day-bars tr.tmi-total .tmi-install-bar-prev{top:2px;height:12px}
.tmi-semaforo-day-bars tr.tmi-total .tmi-install-bar-current{top:4px;height:8px}
@media(max-width:900px){
  .tmi-semaforo-day-bars th:nth-child(2),.tmi-semaforo-day-bars td:nth-child(2){width:18%!important}
  .tmi-semaforo-day-bars th:nth-child(3),.tmi-semaforo-day-bars td:nth-child(3){width:39%!important}
  .tmi-install-values span{font-size:9px}
}


/* v1.0.49 · Doble comparativo: Actual vs Anterior + Actual vs Meta */
.tmi-semaforo-day-bars th:nth-child(1),
.tmi-semaforo-day-bars td:nth-child(1){width:6%!important}
.tmi-semaforo-day-bars th:nth-child(2),
.tmi-semaforo-day-bars td:nth-child(2){width:14%!important;text-align:left!important}
.tmi-semaforo-day-bars th:nth-child(3),
.tmi-semaforo-day-bars td:nth-child(3){width:32%!important;text-align:left!important}
.tmi-semaforo-day-bars th:nth-child(4),
.tmi-semaforo-day-bars td:nth-child(4){width:8%!important}
.tmi-semaforo-day-bars th:nth-child(5),
.tmi-semaforo-day-bars td:nth-child(5){width:32%!important;text-align:left!important}
.tmi-semaforo-day-bars th:nth-child(6),
.tmi-semaforo-day-bars td:nth-child(6){width:8%!important}
.tmi-meta-compare{display:flex;flex-direction:column;gap:4px;min-width:0;padding:2px 0}
.tmi-install-bar-meta{top:2px;height:10px;opacity:.34}
.tmi-bar-state-good .tmi-install-bar-current{background:#22c55e!important;box-shadow:0 0 0 1px rgba(34,197,94,.12)!important}
.tmi-bar-state-good .tmi-install-bar-prev,
.tmi-bar-state-good .tmi-install-bar-meta{background:#86efac!important}
.tmi-bar-state-bad .tmi-install-bar-current{background:#ef4444!important;box-shadow:0 0 0 1px rgba(239,68,68,.12)!important}
.tmi-bar-state-bad .tmi-install-bar-prev,
.tmi-bar-state-bad .tmi-install-bar-meta{background:#fca5a5!important}
.tmi-semaforo-day-bars tr.tmi-total .tmi-install-bar-meta{top:2px;height:12px}
@media(max-width:900px){
  .tmi-semaforo-day-bars th:nth-child(2),.tmi-semaforo-day-bars td:nth-child(2){width:16%!important}
  .tmi-semaforo-day-bars th:nth-child(3),.tmi-semaforo-day-bars td:nth-child(3){width:29%!important}
  .tmi-semaforo-day-bars th:nth-child(5),.tmi-semaforo-day-bars td:nth-child(5){width:29%!important}
}
