/* ============================================================
   PANEL DE INDICADORES DEL HORARIO -- CECATECIS
   ============================================================
   Sistema Midnight Navy & Gold (#003b82 / #002D62 / #FFC300), el mismo de
   Login, Catálogo y el modal "Nuevo Curso/Taller", adaptado a página completa.

   ORGANIZACIÓN (rediseño UI/UX):
     cabecera → filtros compactos (sticky en escritorio) → banda héroe fija
     → 5 sub-pestañas (Resumen · Ocupación · Riesgo · Personas · Explorar).

   Antes era un solo scroll de 13 bloques y 2.764 px (3,3 pantallas) con todas
   las tarjetas del mismo peso visual. Ahora hay una única métrica principal
   (% de ocupación del aforo) y el resto queda a un clic.

   REGLA DE COLOR: verde→ámbar→rojo se usa EXCLUSIVAMENTE para ocupación y
   riesgo (lo único donde el color significa "bueno/malo"). Las paletas de
   Área, Tipo y Turno viven en indicadores.js y no comparten ningún tono.
   ============================================================ */

#indicadores-view.hidden { display: none; }

.ind-container {
    padding: 16px 20px 40px;
    max-width: 1500px;
    margin: 0 auto;
}

/* ============ CABECERA ============ */
.ind-header-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    background: linear-gradient(135deg, #003b82 0%, #002D62 55%, #001a38 100%);
    border-radius: 14px;
    padding: 14px 18px;
    margin-bottom: 12px;
    box-shadow: 0 8px 22px rgba(0, 45, 98, 0.22);
    border: 1px solid rgba(255, 195, 0, 0.25);
}

.ind-header-left { display: flex; align-items: center; gap: 14px; }

.ind-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.22);
    color: #ffffff;
    font-weight: 700;
    font-size: 0.85em;
    padding: 9px 14px;
    border-radius: 9px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}
.ind-back-btn:hover { background: #FFC300; color: #002D62; border-color: #FFC300; }

.ind-header-titles { display: flex; flex-direction: column; gap: 2px; }
.ind-module-badge {
    font-size: 0.64em;
    font-weight: 900;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #FFC300;
}
.ind-module-title {
    margin: 0;
    font-size: 1.25em;
    font-weight: 900;
    color: #ffffff;
    letter-spacing: 0.2px;
}

.ind-header-actions { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }

.ind-btn-action {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: none;
    border-radius: 9px;
    padding: 9px 15px;
    font-weight: 800;
    font-size: 0.84em;
    cursor: pointer;
    transition: all 0.2s ease;
}
.ind-btn-excel {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #ffffff;
    box-shadow: 0 3px 10px rgba(16, 185, 129, 0.3);
}
.ind-btn-excel:hover { transform: translateY(-1px); box-shadow: 0 5px 14px rgba(16, 185, 129, 0.4); }
.ind-btn-refresh { background: #FFC300; color: #002D62; box-shadow: 0 3px 10px rgba(255, 195, 0, 0.3); }
.ind-btn-refresh:hover { transform: translateY(-1px); }
.ind-btn-refresh.ind-spinning i { animation: indSpin 0.7s linear; }
@keyframes indSpin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

/* ============ FILTROS COMPACTOS (STICKY EN ESCRITORIO) ============ */
/* Sticky solo en escritorio: en móvil la barra de navegación ya es sticky
   con z-index 99998 (ver style.css), y encadenar dos elementos pegajosos
   obligaría a depender de su alto exacto. Ahí se resuelve mejor colapsando
   los filtros tras el botón "Filtros". */
.ind-filter-bar {
    position: sticky;
    top: 0;
    z-index: 30;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 10px 14px;
    margin-bottom: 14px;
    box-shadow: 0 2px 10px rgba(0, 45, 98, 0.06);
}

.ind-filter-body {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

/* El botón que colapsa los filtros solo existe en móvil */
.ind-filtros-toggle { display: none; }

.ind-presets { display: flex; flex-wrap: wrap; gap: 5px; }

.ind-preset-btn {
    background: #f1f5f9;
    border: 1.5px solid transparent;
    color: #334155;
    padding: 7px 13px;
    border-radius: 8px;
    font-size: 0.81em;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
}
.ind-preset-btn:hover { background: #e2e8f0; }
.ind-preset-btn.active { background: #002D62; color: #ffffff; border-color: #FFC300; }

/* Desplegable "Más periodos" */
.ind-more-wrap { position: relative; }
.ind-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #f1f5f9;
    border: 1.5px solid transparent;
    color: #334155;
    padding: 7px 12px;
    border-radius: 8px;
    font-size: 0.81em;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
}
.ind-more-btn:hover { background: #e2e8f0; }
.ind-more-btn.active { background: #002D62; color: #ffffff; border-color: #FFC300; }

.ind-more-menu {
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    min-width: 190px;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    box-shadow: 0 10px 28px rgba(0, 45, 98, 0.16);
    padding: 5px;
    z-index: 40;
}
.ind-more-menu.hidden { display: none; }

.ind-more-item {
    display: block;
    width: 100%;
    text-align: left;
    background: transparent;
    border: none;
    padding: 8px 11px;
    border-radius: 7px;
    font-size: 0.83em;
    font-weight: 700;
    color: #334155;
    cursor: pointer;
}
.ind-more-item:hover { background: #f0f6ff; color: #002D62; }
.ind-more-item.active { background: #002D62; color: #ffffff; }

.ind-filter-sep { width: 1px; height: 24px; background: #e2e8f0; }

.ind-direction-toggle {
    display: inline-flex;
    background: #f1f5f9;
    border-radius: 9px;
    padding: 3px;
    gap: 2px;
}
.ind-dir-btn {
    background: transparent;
    border: none;
    color: #64748b;
    padding: 6px 13px;
    border-radius: 7px;
    font-size: 0.79em;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.15s ease;
}
.ind-dir-btn.active { background: #ffffff; color: #002D62; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12); }

.ind-custom-range { display: flex; align-items: center; gap: 7px; }
.ind-custom-range.hidden { display: none; }
.ind-date-input {
    border: 1.5px solid #cbd5e1;
    border-radius: 7px;
    padding: 6px 8px;
    font-size: 0.81em;
    font-weight: 600;
    color: #002D62;
    background: #f8fafc;
}
.ind-date-sep { color: #94a3b8; font-weight: 700; }
.ind-btn-mini {
    background: #002D62; color: #fff; border: none; border-radius: 7px;
    padding: 6px 12px; font-size: 0.77em; font-weight: 800; cursor: pointer;
}
.ind-btn-mini:hover { background: #FFC300; color: #002D62; }

.ind-range-badge {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #eef2ff;
    color: #002D62;
    border: 1px solid #c7d2fe;
    font-size: 0.75em;
    font-weight: 800;
    padding: 5px 11px;
    border-radius: 20px;
    white-space: nowrap;
}

/* Chips de filtros activos (cross-filtering) */
.ind-chips-row {
    display: flex; flex-wrap: wrap; gap: 7px;
    margin-top: 9px; padding-top: 9px; border-top: 1px dashed #e2e8f0;
}
.ind-chips-row.hidden { display: none; }

.ind-chip {
    display: inline-flex; align-items: center; gap: 6px;
    background: #002D62; color: #ffffff;
    font-size: 0.75em; font-weight: 700;
    padding: 5px 8px 5px 12px; border-radius: 20px;
}
.ind-chip button {
    background: rgba(255, 255, 255, 0.2); border: none; color: #fff;
    width: 18px; height: 18px; border-radius: 50%; cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 0.9em; line-height: 1;
}
.ind-chip button:hover { background: #FFC300; color: #002D62; }
.ind-chip.ind-chip-range { background: #475569; }

/* ============ BANDA HÉROE ============ */
.ind-hero {
    display: grid;
    grid-template-columns: minmax(320px, 1.05fr) minmax(340px, 1.6fr);
    gap: 14px;
    margin-bottom: 16px;
}

/* Métrica principal: el único bloque navy de la página, para que sea
   inequívocamente "el número" que hay que mirar primero. */
.ind-hero-main {
    display: flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #003b82 0%, #002D62 100%);
    border: 1px solid rgba(255, 195, 0, 0.35);
    border-radius: 14px;
    padding: 14px 18px;
    box-shadow: 0 6px 18px rgba(0, 45, 98, 0.18);
}

.ind-hero-gauge-wrap { flex: 0 0 168px; }
.ind-hero-gauge {
    background: #ffffff;
    border-radius: 12px;
    padding: 6px 4px;
}

.ind-hero-main-info { flex: 1; min-width: 0; }

.ind-hero-label {
    font-size: 0.72em;
    font-weight: 900;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    color: #FFC300;
    margin-bottom: 3px;
}
.ind-hero-verdict {
    font-size: 1.35em;
    font-weight: 900;
    color: #ffffff;
    line-height: 1.15;
    margin-bottom: 5px;
}
.ind-hero-desc {
    font-size: 0.78em;
    color: #b7cced;
    line-height: 1.4;
    margin-bottom: 8px;
}
/* El valor en texto existe para el JS y los lectores de pantalla; el número
   visible lo pinta el medidor. */
.ind-hero-value-sr {
    position: absolute;
    width: 1px; height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.ind-hero-side {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.ind-hero-kpi {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 13px;
    padding: 13px 15px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.04);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.ind-hero-kpi:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(0, 45, 98, 0.1); }

.ind-hero-kpi-top {
    display: flex; align-items: center; justify-content: space-between; gap: 6px;
    margin-bottom: 5px;
}
.ind-hero-kpi-top i { color: #94a3b8; flex-shrink: 0; }
.ind-hero-kpi-label {
    font-size: 0.7em; font-weight: 800; text-transform: uppercase;
    letter-spacing: 0.3px; color: #64748b; line-height: 1.25;
}
.ind-hero-kpi-value {
    font-size: 1.75em; font-weight: 900; color: #002D62; line-height: 1.05;
    font-variant-numeric: tabular-nums;
}
.ind-hero-kpi-sub { font-size: 0.73em; color: #94a3b8; font-weight: 600; margin-top: 2px; line-height: 1.35; }
/* La mini-tendencia se apoya abajo, pero sin abrir un hueco enorme cuando la
   tarjeta hereda el alto del medidor. */
.ind-spark { margin-top: auto; padding-top: 8px; height: 38px; }

.ind-hero-kpi-link {
    margin-top: auto;
    align-self: flex-start;
    background: transparent;
    border: none;
    color: #002D62;
    font-size: 0.76em;
    font-weight: 800;
    cursor: pointer;
    padding: 6px 0 0 0;
}
.ind-hero-kpi-link:hover { color: #FFC300; }

/* Cuando hay incidencias, la tarjeta de riesgo se tiñe: es la única señal
   roja de la banda, así no compite con el resto. */
.ind-hero-kpi-riesgo.tiene-alertas { border-color: #fecaca; background: #fef2f2; }
.ind-hero-kpi-riesgo.tiene-alertas .ind-hero-kpi-value { color: #dc2626; }
.ind-hero-kpi-riesgo.tiene-alertas .ind-hero-kpi-top i { color: #dc2626; }

/* Delta vs. periodo anterior */
.ind-kpi-delta {
    display: inline-flex; align-items: center; gap: 3px;
    font-size: 0.71em; font-weight: 800;
    margin-top: 6px; padding: 2px 7px; border-radius: 6px;
    align-self: flex-start;
}
.ind-kpi-delta:empty { display: none; }
.ind-kpi-delta.up { color: #059669; background: rgba(5, 150, 105, 0.1); }
.ind-kpi-delta.down { color: #ef4444; background: rgba(239, 68, 68, 0.1); }
.ind-kpi-delta.flat { color: #64748b; background: rgba(100, 116, 139, 0.1); }
.ind-kpi-delta.sin-base { color: #94a3b8; background: rgba(148, 163, 184, 0.12); font-weight: 700; }
/* Dentro del bloque navy el delta necesita otro contraste */
.ind-hero-main .ind-kpi-delta.up { color: #6ee7b7; background: rgba(110, 231, 183, 0.14); }
.ind-hero-main .ind-kpi-delta.down { color: #fca5a5; background: rgba(252, 165, 165, 0.14); }
.ind-hero-main .ind-kpi-delta.flat,
.ind-hero-main .ind-kpi-delta.sin-base { color: #b7cced; background: rgba(183, 204, 237, 0.14); }

/* ============ SUB-PESTAÑAS ============ */
.ind-tabs {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    padding: 5px;
    border-radius: 12px;
    margin-bottom: 14px;
}

.ind-tab-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 16px;
    border: none;
    background: transparent;
    color: #64748b;
    font-size: 0.85em;
    font-weight: 800;
    border-radius: 9px;
    cursor: pointer;
    transition: all 0.16s ease;
    white-space: nowrap;
}
.ind-tab-btn:hover { color: #002D62; background: #f1f5f9; }
.ind-tab-btn.active { background: #002D62; color: #ffffff; box-shadow: 0 2px 8px rgba(0, 45, 98, 0.25); }
.ind-tab-btn.active i { color: #FFC300; }

.ind-tab-badge {
    background: #ef4444;
    color: #ffffff;
    font-size: 0.78em;
    font-weight: 900;
    min-width: 19px;
    padding: 1px 6px;
    border-radius: 999px;
    line-height: 1.5;
}
.ind-tab-badge.hidden { display: none; }

.ind-pane.hidden { display: none !important; }

/* ============ TARJETAS ============ */
.ind-card {
    background: #ffffff;
    border-radius: 14px;
    padding: 15px 17px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.04);
    margin-bottom: 14px;
}
.ind-card-wide { width: 100%; }
.ind-card:last-child { margin-bottom: 0; }

.ind-card-title-row {
    display: flex; align-items: center; justify-content: space-between;
    flex-wrap: wrap; gap: 10px; margin-bottom: 10px;
}
.ind-card-title {
    display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
    font-size: 0.84em; font-weight: 800; color: #002D62;
    margin-bottom: 10px; text-transform: uppercase; letter-spacing: 0.3px;
}
.ind-card-title i { color: #002D62; }
.ind-card-title-row .ind-card-title { margin-bottom: 0; }

.ind-click-hint {
    font-size: 0.82em; font-weight: 600; color: #94a3b8;
    text-transform: none; letter-spacing: 0;
}
.ind-card-desc { font-size: 0.82em; color: #64748b; margin: -4px 0 12px 0; line-height: 1.45; }

.ind-granularity-toggle { display: inline-flex; background: #f1f5f9; border-radius: 8px; padding: 3px; gap: 2px; }
.ind-gran-btn {
    background: transparent; border: none; color: #64748b;
    padding: 5px 12px; border-radius: 6px; font-size: 0.77em; font-weight: 800; cursor: pointer;
}
.ind-gran-btn.active { background: #002D62; color: #fff; }

.ind-apex-container-lg { min-height: 270px; }

/* ============ TIRA DE MÉTRICAS SECUNDARIAS ============ */
/* Los KPIs de apoyo van como tira compacta, no como tarjetas grandes: son
   contexto del héroe, no protagonistas. */
.ind-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1px;
    background: #e2e8f0;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 14px;
}
.ind-strip-item {
    background: #ffffff;
    padding: 13px 15px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.ind-strip-label {
    font-size: 0.68em; font-weight: 800; text-transform: uppercase;
    letter-spacing: 0.3px; color: #64748b;
}
.ind-strip-value {
    font-size: 1.35em; font-weight: 900; color: #002D62;
    font-variant-numeric: tabular-nums; line-height: 1.15;
}
.ind-strip-hint { font-size: 0.72em; color: #94a3b8; font-weight: 600; }

/* ============ DISTRIBUCIONES (barras apiladas compactas) ============ */
.ind-dist-stack { display: flex; flex-direction: column; gap: 4px; }
.ind-dist-block { border-top: 1px dashed #eef2f7; padding-top: 6px; }
.ind-dist-block:first-child { border-top: none; padding-top: 0; }
.ind-dist-head {
    font-size: 0.75em; font-weight: 800; color: #475569;
    text-transform: uppercase; letter-spacing: 0.3px;
}
.ind-apex-container-bar { min-height: 74px; }

/* ============ MAPA DE CALOR ============ */
/* Se acota el ancho para que las celdas no se estiren en pantallas anchas:
   con 7 aulas × 2 turnos, sin tope cada celda medía ~670 px de ancho por 34
   de alto (franjas ilegibles). */
.ind-heatmap-wrap { max-width: 940px; margin: 0 auto; }

/* ============ AVISOS ============ */
.ind-notice {
    display: flex; align-items: center; gap: 10px;
    background: #fffbeb; border: 1.5px solid #fde68a; color: #92400e;
    padding: 12px 16px; border-radius: 12px;
    font-size: 0.84em; font-weight: 600; line-height: 1.45;
}
.ind-notice.hidden { display: none; }
.ind-notice i { flex-shrink: 0; }

/* ============ PANEL DE RIESGO ============ */
.ind-risk-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 11px;
}
.ind-risk-item {
    display: flex; flex-direction: column; align-items: center; text-align: center;
    gap: 5px; padding: 15px 10px; border-radius: 12px;
    background: #f8fafc; border: 1.5px solid #e2e8f0;
}
.ind-risk-item i { color: #64748b; }
.ind-risk-value { font-size: 1.6em; font-weight: 900; color: #002D62; font-variant-numeric: tabular-nums; }
.ind-risk-label { font-size: 0.73em; font-weight: 700; color: #64748b; line-height: 1.25; }

.ind-risk-item.ind-risk-danger { background: #fef2f2; border-color: #fecaca; }
.ind-risk-item.ind-risk-danger i, .ind-risk-item.ind-risk-danger .ind-risk-value { color: #dc2626; }
.ind-risk-item.ind-risk-warning { background: #fffbeb; border-color: #fde68a; }
.ind-risk-item.ind-risk-warning i, .ind-risk-item.ind-risk-warning .ind-risk-value { color: #d97706; }
.ind-risk-item.ind-risk-neutral { background: #eff6ff; border-color: #bfdbfe; }
.ind-risk-item.ind-risk-neutral i, .ind-risk-item.ind-risk-neutral .ind-risk-value { color: #002D62; }

/* ============ TOP DE REPROGRAMACIONES ============ */
.ind-top-reprog-list { display: flex; flex-direction: column; gap: 3px; }

.ind-top-reprog-row {
    display: grid;
    grid-template-columns: 26px minmax(140px, 1.4fr) 1fr auto;
    align-items: center;
    gap: 12px;
    padding: 8px 6px;
    border-radius: 8px;
}
.ind-top-reprog-row:nth-child(odd) { background: #f8fafc; }

/* Sin barras (todos los conteos empatados): la columna de la barra desaparece
   en vez de dibujar cinco barras llenas idénticas que no dicen nada. */
.ind-top-reprog-list.sin-barras .ind-top-reprog-row {
    grid-template-columns: 26px 1fr auto;
}

.ind-top-reprog-pos {
    width: 22px; height: 22px; border-radius: 50%;
    background: #002D62; color: #FFC300;
    font-size: 0.72em; font-weight: 900;
    display: inline-flex; align-items: center; justify-content: center;
}
.ind-top-reprog-info { display: flex; flex-direction: column; overflow: hidden; }
.ind-top-reprog-info strong { color: #002D62; font-size: 0.85em; }
.ind-top-reprog-info span {
    color: #94a3b8; font-size: 0.75em;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ind-top-reprog-track { min-width: 60px; }
.ind-fill-reprog { background: linear-gradient(90deg, #f59e0b, #ef4444) !important; }
.ind-top-reprog-count {
    font-weight: 900; color: #d97706; text-align: right;
    font-variant-numeric: tabular-nums; white-space: nowrap;
}
.ind-top-reprog-count small { font-size: 0.62em; color: #94a3b8; font-weight: 700; margin-left: 4px; }
.ind-top-reprog-empty { color: #94a3b8; font-size: 0.85em; text-align: center; padding: 14px; }

/* ============ TABLAS (docentes / asesoras) ============ */
.ind-two-col {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 14px;
}
.ind-two-col .ind-card { margin-bottom: 0; }

.ind-table-wrap { max-height: 380px; overflow-y: auto; }
.ind-table { width: 100%; border-collapse: collapse; font-size: 0.85em; }
.ind-table th {
    text-align: left;
    padding: 8px 9px;
    background: #f8fafc;
    color: #64748b;
    font-weight: 800;
    font-size: 0.8em;
    text-transform: uppercase;
    letter-spacing: 0.2px;
    position: sticky;
    top: 0;
    border-bottom: 2px solid #e2e8f0;
    white-space: nowrap;
}
.ind-table th.ind-th-num { text-align: right; }
.ind-table td { padding: 9px; border-bottom: 1px solid #f1f5f9; }
.ind-table td.ind-td-num { text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; }
.ind-table tr:hover td { background: #f8fafc; }
.ind-td-nombre { font-weight: 700; color: #002D62; }
.ind-td-sesiones { color: #002D62; min-width: 18px; font-variant-numeric: tabular-nums; }
.ind-td-cupos { color: #059669; }
.ind-td-pct { color: #64748b; }

.ind-docente-bar-wrap { display: flex; align-items: center; gap: 7px; }
.ind-docente-bar-track { flex: 1; height: 6px; background: #e2e8f0; border-radius: 4px; overflow: hidden; min-width: 40px; }
.ind-docente-bar-fill { height: 100%; background: linear-gradient(90deg, #002D62, #FFC300); border-radius: 4px; }

/* ============ BUSCADOR ============ */
.ind-search-form { position: relative; margin-bottom: 12px; }
.ind-fuse-input { padding-left: 12px !important; }
.ind-fuse-results {
    position: absolute;
    top: calc(100% + 4px);
    left: 0; right: 0;
    background: #ffffff;
    border: 1.5px solid #cbd5e1;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    z-index: 20;
    max-height: 260px;
    overflow-y: auto;
}
.ind-fuse-results.hidden { display: none; }
.ind-fuse-item { padding: 9px 12px; cursor: pointer; font-size: 0.85em; border-bottom: 1px solid #f1f5f9; }
.ind-fuse-item:hover { background: #f0f6ff; }
.ind-fuse-item strong { color: #002D62; }
.ind-fuse-item span { color: #94a3b8; font-size: 0.9em; }
.ind-fuse-empty { padding: 12px; text-align: center; color: #94a3b8; font-size: 0.85em; }

.ind-search-results-box { margin-top: 6px; }
.ind-results-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.ind-results-header h4 { margin: 0; font-size: 0.9em; color: #002D62; }
.ind-btn-clear-filter {
    display: inline-flex; align-items: center; gap: 4px;
    background: #f1f5f9; border: none; color: #64748b;
    padding: 5px 10px; border-radius: 7px; font-size: 0.78em; font-weight: 700; cursor: pointer;
}
.ind-btn-clear-filter:hover { background: #fee2e2; color: #dc2626; }

.ind-results-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; }
.ind-mini-card { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 10px; padding: 10px; text-align: center; }
.ind-mini-lbl { font-size: 0.69em; font-weight: 700; color: #94a3b8; text-transform: uppercase; margin-bottom: 4px; }
.ind-mini-val { font-size: 1.3em; font-weight: 900; color: #002D62; font-variant-numeric: tabular-nums; }
.ind-mini-val.ind-val-verde { color: #059669; }
.ind-mini-val-txt { font-size: 1.02em !important; }

/* ============ COMPARADOR ============ */
.ind-compare-controls { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.ind-compare-box { flex: 1; min-width: 200px; }
.ind-compare-box label {
    display: block; font-size: 0.75em; font-weight: 800;
    color: #002D62; margin-bottom: 5px; text-transform: uppercase;
}
.ind-compare-box label.ind-label-b { color: #9d174d; }

.ind-compare-results-box {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 14px;
    align-items: stretch;
}
.ind-compare-results-box.hidden { display: none; }

.ind-compare-card { border-radius: 12px; padding: 14px; color: #fff; }
.ind-compare-card-a { background: linear-gradient(135deg, #003b82, #002D62); }
.ind-compare-card-b { background: linear-gradient(135deg, #9d174d, #6b1236); }
.ind-compare-name { font-weight: 800; font-size: 0.95em; margin-bottom: 2px; }
.ind-compare-code { font-size: 0.76em; opacity: 0.8; margin-bottom: 10px; }
.ind-compare-data { display: flex; flex-direction: column; gap: 8px; font-size: 0.84em; }
.ind-compare-data > div { display: flex; align-items: center; gap: 6px; }
.ind-compare-data i { color: #FFC300; flex-shrink: 0; }

.ind-compare-mid-labels { display: flex; flex-direction: column; justify-content: center; gap: 8px; padding-top: 44px; }
.ind-compare-mid-labels div {
    font-size: 0.71em; font-weight: 800; color: #94a3b8;
    text-transform: uppercase; text-align: center;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 1100px) {
    .ind-hero { grid-template-columns: 1fr; }
    .ind-hero-side { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 900px) {
    .ind-compare-results-box { grid-template-columns: 1fr; }
    .ind-compare-mid-labels { display: none; }
    .ind-hero-side { grid-template-columns: 1fr; }
    .ind-hero-main { flex-direction: column; text-align: center; }
    .ind-hero-gauge-wrap { flex: none; width: 100%; max-width: 220px; }
    .ind-hero-kpi-link, .ind-hero-main .ind-kpi-delta { align-self: center; }
}

@media (max-width: 768px) {
    .ind-container { padding: 12px 12px 30px; }

    .ind-header-bar { flex-direction: column; align-items: stretch; padding: 13px; }
    .ind-header-actions { justify-content: stretch; }
    .ind-btn-action { flex: 1; justify-content: center; }

    /* Los filtros se colapsan tras un botón: antes ocupaban ~250 px (tres
       filas de botones) antes de que apareciera un solo dato. */
    .ind-filter-bar { position: static; padding: 9px 11px; }
    .ind-filtros-toggle {
        display: inline-flex; align-items: center; gap: 7px;
        background: #f1f5f9; border: 1.5px solid #e2e8f0; color: #002D62;
        padding: 9px 14px; border-radius: 9px;
        font-size: 0.85em; font-weight: 800; cursor: pointer; width: 100%;
        justify-content: center;
    }
    .ind-filtros-toggle-badge { color: #64748b; font-weight: 700; font-size: 0.9em; }
    .ind-filter-body { display: none; }
    .ind-filter-bar.filtros-abiertos .ind-filter-body {
        display: flex; flex-direction: column; align-items: stretch;
        gap: 9px; margin-top: 10px;
    }
    .ind-filter-sep { display: none; }
    .ind-presets, .ind-direction-toggle { justify-content: center; }
    .ind-more-wrap, .ind-more-btn { width: 100%; justify-content: center; }
    .ind-more-menu { left: 0; right: 0; }
    .ind-range-badge { margin-left: 0; justify-content: center; }

    .ind-tabs { overflow-x: auto; flex-wrap: nowrap; -webkit-overflow-scrolling: touch; }
    .ind-tab-btn { padding: 9px 13px; font-size: 0.8em; }

    .ind-hero-kpi-value { font-size: 1.5em; }
    .ind-strip { grid-template-columns: repeat(2, 1fr); }
    .ind-two-col { grid-template-columns: 1fr; }
    .ind-card { padding: 13px; }
    .ind-risk-grid { grid-template-columns: repeat(2, 1fr); }
    .ind-top-reprog-row { grid-template-columns: 24px 1fr auto; }
    .ind-top-reprog-track { display: none; }
}

@media (max-width: 480px) {
    .ind-strip { grid-template-columns: 1fr; }
    .ind-risk-grid { grid-template-columns: 1fr; }
}
