/* ==========================================================================
   MÓDULO DE PAGOS Y TARJETAS DE RESUMEN (TERRENO FÁCIL)
   ========================================================================== */

/* Colores e Identidad de Marca */
:root {
    --tf-blue: #006DAB;
    --tf-orange: #f37021;
}

/* 1. Header de Resumen y Gradientes */
.bg-tf-gradient {
    background: linear-gradient(135deg, var(--tf-blue) 0%, #004d7a 100%);
}

.btn-mapa-interactive {
    transition: all 0.3s ease;
}

.btn-mapa-interactive:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15) !important;
    background-color: #ffffff !important;
}

/* 2. Tarjetas KPI / Indicadores de Saldos */
.kpi-card-pagado {
    background-color: #f8fff9;
    border-left: 4px solid #198754 !important;
}

.kpi-card-restante {
    background-color: #fff8f5;
    border-left: 4px solid var(--tf-orange) !important;
}

.text-tf-orange {
    color: var(--tf-orange) !important;
}

.icon-kpi {
    width: 38px;
    height: 38px;
}

.datos-bancarios-collapsible {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transform: translateY(-10px);
    transition: all 0.4s ease-in-out;
    visibility: hidden;
}

.datos-bancarios-collapsible.show {
    max-height: 600px; /* Altura suficiente para mostrar el contenido completo */
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
}

@media (min-width: 768px) {
    .icon-kpi {
        width: 48px;
        height: 48px;
    }
}

/* 3. Tablas Responsive Basadas en data-label */
@media (max-width: 768px) {
    .table-responsive-cards thead {
        display: none;
    }

    .table-responsive-cards tr {
        display: block;
        margin-bottom: 1rem;
        background: #fff;
        border: 1px solid #dee2e6;
        border-radius: 8px;
        box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    }

    .table-responsive-cards td {
        display: block;
        position: relative;
        padding-left: 50% !important;
        text-align: right;
        border-bottom: 1px solid #f0f0f0;
    }

    .table-responsive-cards td::before {
        content: attr(data-label);
        position: absolute;
        left: 15px;
        top: 10px;
        width: 45%;
        text-align: left;
        font-weight: 700;
        color: var(--tf-blue);
        white-space: normal;
    }

    .table-responsive-cards td:last-child {
        border-bottom: 0;
    }

    /* Excepción exclusiva para tablas que contienen botones de acción finales */
    .tabla-con-acciones td:last-child {
        text-align: center !important;
        padding: 12px 15px !important;
        background-color: #f8f9fa;
    }

    .tabla-con-acciones td:last-child::before {
        display: none !important;
    }
}