/* ==== BASE GENERAL ==== */

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    color: #333;
    background: white;
    margin: 0;
    padding: 25px;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0;
    width: 100%;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.data-table th,
.data-table td {
    padding: 12px 15px;
    text-align: left;
    vertical-align: middle;
}

.data-table thead th {
    background-color: #f8f9fa;
    font-weight: 600;
    border-bottom: 2px solid #dee2e6;
}

.data-table th:nth-child(1),
.data-table td:nth-child(1) {
    width: 30%;
}

.data-table th:nth-child(2),
.data-table td:nth-child(2),
.data-table th:nth-child(3),
.data-table td:nth-child(3),
.data-table th:nth-child(4),
.data-table td:nth-child(4),
.data-table th:nth-child(5),
.data-table td:nth-child(5) {
    width: 17.5%;
}

.entity-cell {
    display: flex;
    align-items: center;
    gap: 10px;
}

.entity-logo {
    width: 48px;
    height: 48px;
    object-fit: contain;
    flex-shrink: 0;
}

.data-table tbody tr {
    border-bottom: 1px solid #e9ecef;
}

.data-table tbody tr:last-child {
    border-bottom: none;
}

.data-table tbody tr td {
    padding: 15px;
}

.separator-row td {
    height: 1px;
    padding: 0;
    background-color: #0056b3;
}

/* ==== MOBILE CUSTOM CARDS ==== */

.mobile-view {
    display: none;
}

.mobile-card {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    text-align: center;
}

.mobile-logo {
    width: 200px;
    height: 80px;
    object-fit: contain;
    margin: 0 auto 10px;
    display: block;
}

.mobile-entity-name {
    font-weight: bold;
    font-size: 18px;
    margin-bottom: 10px;
    text-align: center;
}

.mobile-field {
    font-size: 14px;
    margin: 4px 0;
    text-align: center;
}

/* ==== VISTA RESPONSIVA PARA MÓVILES ==== */

@media (max-width: 768px) {
    body {
        padding: 15px;
    }

    .data-table {
        font-size: 14px;
    }

    .data-table th,
    .data-table td {
        padding: 10px 8px;
    }

    .data-table th:nth-child(1),
    .data-table td:nth-child(1) {
        width: 35%;
    }

    .entity-logo {
        width: 42px;
        height: 42px;
    }

    /* Ocultar columnas innecesarias en móvil */
    .data-table th:nth-child(4),
    .data-table td:nth-child(4),
    .data-table th:nth-child(5),
    .data-table td:nth-child(5) {
        display: none;
    }

    /* Expandir columnas restantes */
    .data-table th:nth-child(2),
    .data-table td:nth-child(2),
    .data-table th:nth-child(3),
    .data-table td:nth-child(3) {
        width: 33%;
    }

    /* OCULTAR VISTA ESCRITORIO */
    thead,
    tbody.desktop-view {
        display: none !important;
    }

    /* MOSTRAR VISTA MÓVIL */
    tbody.mobile-view {
        display: table-row-group !important;
    }

    /* MOSTRAR TARJETAS MÓVILES */
    .mobile-card {
        display: block;
    }
}

/* ==== OCULTAR TARJETAS MÓVILES EN PC ==== */
@media (min-width: 769px) {
    .mobile-card {
        display: none !important;
    }
}
