/* MinCiencia Informe Presupuestario — estilos públicos */

.mcip-wrapper {
    --mcip-bg: #1E1B4B;
    --mcip-bg-alt: #35355E;
    --mcip-accent: #34D399;
    --mcip-accent-dark: #10B981;
    --mcip-text: #F5F5FA;
    --mcip-text-muted: #A5A3C9;
    --mcip-border: #38346E;
    font-family: inherit;
    color: var( --mcip-text );
    box-sizing: border-box;
}

.mcip-wrapper *,
.mcip-wrapper *::before,
.mcip-wrapper *::after {
    box-sizing: border-box;
}

.mcip-empty {
    color: var( --mcip-text-muted );
}

/* ---------- Resumen (imagen 1) ---------- */
.mcip-resumen-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.mcip-resumen-card {
    background: var( --mcip-bg-alt );
    border-radius: 14px;
    padding: 20px 22px;
    display: flex;
    color: #A0E3CD;
    flex-direction: column;
    gap: 6px;
    flex: 0 1 360px;
    min-width: 360px;
}

.mcip-resumen-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba( 52, 211, 153, 0.12 );
    color: var( --mcip-accent );
    font-size: 18px;
    margin-bottom: 4px;
}

.mcip-resumen-icon img {
    width: 20px;
    height: 20px;
    display: block;
}

.mcip-resumen-value {
    font-size: 25px;
    font-weight: 700;
    color: #fff;
    line-height: 1.2;
}

.mcip-resumen-label {
    font-size: 13px;
    color: var( --mcip-text-muted );
}

/* ---------- Buscador (imagen 2) ---------- */
.mcip-buscador {
    background: var( --mcip-bg );
    border-radius: 16px;
    padding: 20px;
}

.mcip-buscador-filtros {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 14px;
}

.mcip-buscador-search {
    flex: 1 1 240px;
    position: relative;
    display: flex;
    align-items: center;
}

.mcip-buscador-search .dashicons {
    position: absolute;
    left: 12px;
    color: var( --mcip-text-muted );
    font-size: 18px;
    width: 18px;
    height: 18px;
}

.mcip-input-buscar {
    width: 100%;
    padding: 10px 12px 10px 36px;
    border-radius: 10px;
    border: 1px solid var( --mcip-border );
    background: var( --mcip-bg-alt );
    color: var( --mcip-text );
    font-size: 14px;
}

.mcip-select-anio,
.mcip-select-region,
.mcip-select-programa {
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid var( --mcip-border );
    background: var( --mcip-bg-alt );
    color: var( --mcip-text );
    font-size: 14px;
    min-width: 130px;
}

.mcip-buscador-tipos {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
}

.mcip-tipo-btn {
    padding: 6px 16px;
    border-radius: 999px;
    border: 1px solid var( --mcip-border );
    background: transparent;
    color: var( --mcip-text-muted );
    font-size: 13px;
    cursor: pointer;
}

.mcip-tipo-btn.is-active {
    background: var( --mcip-accent-dark );
    border-color: var( --mcip-accent-dark );
    color: #06281f;
    font-weight: 600;
}

.mcip-resultados-count {
    margin-left: auto;
    font-size: 12px;
    color: var( --mcip-text-muted );
}

.mcip-tabla-wrap {
    overflow-x: auto;
    border-radius: 10px;
}

.mcip-tabla {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.mcip-tabla thead th {
    text-align: left;
    padding: 10px 14px;
    color: var( --mcip-text-muted );
    font-weight: 600;
    border-bottom: 1px solid var( --mcip-border );
}

.mcip-tabla tbody td {
    padding: 12px 14px;
    border-bottom: 1px solid var( --mcip-border );
}

.mcip-tabla tbody tr:last-child td {
    border-bottom: none;
}

.mcip-tabla tbody tr:nth-child(odd) {
    background: #3C3E5E;
}

.mcip-tabla tbody tr:nth-child(even) {
    background: #32334A;
}

.mcip-tabla-loading,
.mcip-tabla-empty {
    text-align: center;
    color: var( --mcip-text-muted );
    padding: 24px 0 !important;
}

.mcip-badge-tipo {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
}

.mcip-badge-pública {
    background: rgba( 52, 211, 153, 0.16 );
    color: var( --mcip-accent );
}

.mcip-badge-privada {
    background: rgba( 165, 163, 201, 0.16 );
    color: var( --mcip-text-muted );
}

.mcip-paginador {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 16px;
}

.mcip-page-btn {
    min-width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1px solid var( --mcip-border );
    background: var( --mcip-bg-alt );
    color: var( --mcip-text );
    cursor: pointer;
    font-size: 13px;
}

.mcip-page-btn.is-active {
    background: var( --mcip-accent-dark );
    border-color: var( --mcip-accent-dark );
    color: #06281f;
    font-weight: 700;
}

.mcip-page-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* ---------- Programas destacados (imagen 3) ---------- */
.mcip-section-title {
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 4px;
    color: #111827;
}

.mcip-section-subtitle {
    font-size: 13px;
    color: #6B7280;
    margin: 0 0 20px;
}

.mcip-destacados-grid {
    display: grid;
    grid-template-columns: repeat( auto-fit, minmax( 260px, 1fr ) );
    gap: 18px;
}

.mcip-destacado-card {
    background: #ffffff;
    border: 1px solid #E5E7EB;
    border-top: 4px solid #4F46E5;
    border-radius: 10px;
    padding: 22px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    box-shadow: 0 1px 3px rgba( 0, 0, 0, 0.05 );
}

.mcip-destacado-titulo {
    font-size: 17px;
    font-weight: 700;
    margin: 0;
    color: #111827;
}

.mcip-destacado-badge {
    align-self: flex-start;
    background: #DCFCE7;
    color: #15803D;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
}

.mcip-destacado-desc {
    font-size: 13px;
    color: #6B7280;
    line-height: 1.5;
    margin: 4px 0;
}

.mcip-destacado-cobertura {
    font-size: 12px;
    color: #6B7280;
    margin: 0 0 8px;
}

.mcip-destacado-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: #4F46E5;
    color: #ffffff;
    font-weight: 600;
    font-size: 13px;
    padding: 10px 14px;
    border-radius: 8px;
    text-decoration: none;
    margin-top: auto;
}

.mcip-destacado-btn:hover {
    background: #4338CA;
    color: #ffffff;
}

.mcip-destacado-btn-arrow {
    display: inline-flex;
    align-items: center;
}

.mcip-destacado-btn-arrow img {
    width: 7px;
    height: 16px;
    display: block;
}

/* ---------- Distribución por región (imagen 4) ---------- */
.mcip-distribucion-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.mcip-distribucion-row {
    display: grid;
    grid-template-columns: 140px 1fr 44px;
    align-items: center;
    gap: 12px;
}

.mcip-distribucion-region {
    font-size: 13px;
    color: #374151;
}

.mcip-distribucion-bar-track {
    height: 8px;
    border-radius: 999px;
    background: #E0E7FF;
    overflow: hidden;
}

.mcip-distribucion-bar-fill {
    height: 100%;
    border-radius: 999px;
    background: #4F46E5;
}

.mcip-distribucion-pct {
    font-size: 13px;
    font-weight: 600;
    text-align: right;
    color: #374151;
}

@media ( max-width: 600px ) {
    .mcip-buscador-filtros {
        flex-direction: column;
    }

    .mcip-select-anio,
    .mcip-select-region,
    .mcip-select-programa {
        width: 100%;
    }

    .mcip-distribucion-row {
        grid-template-columns: 100px 1fr 40px;
    }
}
