﻿
/* ============================================================
   MMWebADMSol
   AJUSTES VISUALES - CASOS POR DEPARTAMENTO

   1. Eliminar divisiones internas de la tabla.
   2. Centrar encabezados e información.
   3. Destacar RUT en negrita.
   4. Utilizar imagen original de actualizar.

   Mantiene todas las funcionalidades existentes.
   ============================================================ */


/* ============================================================
   1. CONTENEDOR DE LA TABLA
   ============================================================ */

html body .dept-page .department-cases-table {
    background: #ffffff !important;
    border: 1px solid #d9e2f0 !important;
    border-radius: 18px !important;
    overflow: hidden !important;
    box-shadow: 0 6px 20px rgba(16, 22, 83, 0.06) !important;
}


    /* ============================================================
   2. ENCABEZADOS
   ============================================================ */

    html body .dept-page
    .department-cases-table .dept-table-header {
        background: #f8fafc !important;
        border: none !important;
        box-shadow: none !important;
        /* Compensar espacio de barra de desplazamiento */
        padding-right: 14px !important;
        box-sizing: border-box !important;
    }


        /* Todos los títulos centrados */

        html body .dept-page
        .department-cases-table
        .dept-table-header > div {
            display: flex !important;
            align-items: center !important;
            justify-content: center !important;
            text-align: center !important;
            padding: 8px 6px !important;
            background: transparent !important;
            color: #101653 !important;
            font-size: 12px !important;
            font-weight: 700 !important;
            /* Eliminar separadores interiores */

            border: none !important;
            border-left: none !important;
            border-right: none !important;
            box-shadow: none !important;
        }


    /* ============================================================
   3. CUERPO DE LA TABLA
   ============================================================ */

    html body .dept-page
    .department-cases-table .dept-table-body {
        background: #ffffff !important;
        border: none !important;
    }


    /* Filas sin bordes grises */

    html body .dept-page
    .department-cases-table .dept-case-row {
        background: #ffffff !important;
        border: none !important;
        margin-bottom: 0 !important;
        box-shadow: none !important;
    }


        /* Alternar ligeramente los fondos para diferenciar registros */

        html body .dept-page
        .department-cases-table
        .dept-case-row:nth-child(even) {
            background: #f8fafc !important;
        }


        /* ============================================================
   4. CELDAS CENTRADAS
   ============================================================ */

        html body .dept-page
        .department-cases-table .dept-case-row > .dept-cell {
            display: flex !important;
            align-items: center !important;
            justify-content: center !important;
            text-align: center !important;
            padding: 10px 8px !important;
            min-width: 0 !important;
            background: transparent !important;
            color: #334155 !important;
            font-size: 12px !important;
            line-height: 1.5 !important;
            overflow-wrap: anywhere !important;
            /* Eliminar todas las divisiones */

            border: none !important;
            border-top: none !important;
            border-bottom: none !important;
            border-left: none !important;
            border-right: none !important;
            box-shadow: none !important;
        }


            /* Eliminar borde de la primera columna */

            html body .dept-page
            .department-cases-table
            .dept-case-row > .dept-cell:first-child {
                border: none !important;
            }


    /* ============================================================
   5. RUT Y DATOS DEL VECINO
   ============================================================ */

    html body .dept-page
    .department-cases-table .dept-person {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        text-align: center !important;
        gap: 6px !important;
    }


    /* RUT destacado en negrita */

    html body .dept-page
    .department-cases-table .dept-rut {
        display: block !important;
        width: 100% !important;
        min-height: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        border: none !important;
        border-bottom: none !important;
        box-shadow: none !important;
        text-align: center !important;
        color: #101653 !important;
        font-size: 13px !important;
        font-weight: 800 !important;
        line-height: 1.4 !important;
    }


    /* Datos adicionales sin líneas divisorias */

    html body .dept-page
    .department-cases-table .dept-person-data {
        display: block !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        border: none !important;
        box-shadow: none !important;
        text-align: center !important;
        color: #475569 !important;
        font-weight: 400 !important;
        line-height: 1.5 !important;
    }


    /* ============================================================
   6. DESCRIPCIÓN CENTRADA
   ============================================================ */

    html body .dept-page
    .department-cases-table .dept-description {
        text-align: center !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 12px !important;
        line-height: 1.55 !important;
        color: #334155 !important;
    }


    /* ============================================================
   7. FECHAS Y ESTADOS
   ============================================================ */

    html body .dept-page
    .department-cases-table .dept-center {
        text-align: center !important;
        align-items: center !important;
        justify-content: center !important;
    }


    /* Mantener fechas expiradas destacadas */

    html body .dept-page
    .department-cases-table .expired-date {
        color: #168344 !important;
        font-weight: 700 !important;
    }


    /* ============================================================
   8. EFECTO AL PASAR EL MOUSE
   ============================================================ */

    html body .dept-page
    .department-cases-table .dept-case-row:hover {
        background: #eef8fc !important;
    }


    /* ============================================================
   9. MENSAJES DE TABLA
   ============================================================ */

    html body .dept-page
    .department-cases-table .dept-table-message {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 100% !important;
        min-height: 140px !important;
        padding: 20px !important;
        color: #64748b !important;
        text-align: center !important;
    }


/* ============================================================
   10. BOTÓN ACTUALIZAR
   REUTILIZAR IMAGEN ORIGINAL
   ============================================================ */

html body .dept-page .dept-refresh {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 48px !important;
    height: 48px !important;
    padding: 5px !important;
    /* Imagen utilizada por el administrador */

    background-image: url("/images/icons/actualizar.png") !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    background-size: 38px 38px !important;
    background-color: transparent !important;
    border: none !important;
    border-radius: 12px !important;
    cursor: pointer !important;
    box-shadow: none !important;
    transition: background-color 0.2s ease, transform 0.2s ease !important;
}


    /* Ocultar el SVG anterior.
   La función @onclick del botón se conserva. */

    html body .dept-page .dept-refresh svg {
        display: none !important;
    }


    /* Efecto hover */

    html body .dept-page .dept-refresh:hover:not(:disabled) {
        background-color: #e9fafb !important;
        transform: scale(1.04) !important;
    }


    /* Estado deshabilitado */

    html body .dept-page .dept-refresh:disabled {
        opacity: 0.5 !important;
        cursor: not-allowed !important;
    }


    /* Accesibilidad */

    html body .dept-page .dept-refresh:focus-visible {
        outline: 2px solid #21c7ca !important;
        outline-offset: 3px !important;
    }
