/* ==========================================================================
   Indicator table — merged first-column cells with rowSpan
   ========================================================================== */

.indicator-table-wrapper {
    width: 100%;
    overflow-x: auto;
    border-radius: 8px;
    border: 1px solid var(--border-color, #D1D1D1);
}

.indicator-table {
    width: 100%;
    border-collapse: collapse;
    font-family: 'Montserrat', Arial, Helvetica, sans-serif;
    font-size: 0.82rem;
}

/* Header */
.indicator-th {
    background-color: var(--primary, #00768A);
    color: #fff;
    font-weight: 600;
    text-align: center;
    padding: 10px 14px;
    border: 1px solid var(--primary-dark, #005D6D);
    white-space: nowrap;
    font-size: 0.8rem;
    letter-spacing: 0.02em;
}

/* Data cells */
.indicator-cell {
    text-align: center;
    padding: 8px 12px;
    border-bottom: 1px solid var(--grey-light, #EBEBEB);
    border-right: 1px solid var(--grey-light, #EBEBEB);
    color: var(--font-dark, #333);
}

.indicator-cell:last-child {
    border-right: none;
}

/* Grouped first-column cell (rowSpan) */
.indicator-cell-group {
    text-align: left;
    padding: 10px 14px;
    border-bottom: 2px solid var(--border-color, #D1D1D1);
    border-right: 2px solid var(--border-color, #D1D1D1);
    font-weight: 700;
    background-color: #f0f8fa;
    vertical-align: middle;
    color: var(--primary-dark, #005D6D);
    white-space: nowrap;
}

/* Separator between groups */
.indicator-group-last-row > .indicator-cell {
    border-bottom: 2px solid var(--border-color, #D1D1D1);
}

/* Subtle hover */
.indicator-table tbody tr:hover .indicator-cell {
    background-color: #e8f4f6;
}

/* ==========================================================================
   Safety report — multi-level header & news table
   ========================================================================== */

/* Title column (first col, left-aligned) */
.safety-th-title {
    text-align: left;
    min-width: 180px;
    background-color: var(--background-dark, #333) !important;
    border-color: var(--background-darker, #282828) !important;
}

/* Grouped header spanning sub-columns */
.safety-th-group {
    text-align: center;
    letter-spacing: 0.04em;
}

/* Sub-column headers under the group */
.safety-th-sub {
    font-size: 0.78rem;
    padding: 6px 10px;
}

/* Extra standalone column (e.g. Reportes de Salud) */
.safety-th-extra {
    vertical-align: middle;
    min-width: 130px;
}

/* Day cells (first column of body) */
.safety-cell-day {
    text-align: left;
    font-weight: 600;
    white-space: nowrap;
    background-color: #f8f9fa;
    border-right: 2px solid var(--border-color, #D1D1D1);
}

/* Totals row */
.safety-totals-row {
    border-top: 2px solid var(--primary, #00768A);
}

.safety-cell-total {
    font-weight: 700;
    background-color: var(--primary-light, #00758A42) !important;
    color: var(--primary-dark, #005D6D);
}

/* News table — image cell */
.safety-cell-img {
    padding: 6px;
    width: 90px;
    min-width: 90px;
}

.safety-news-img {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid var(--grey-light, #EBEBEB);
}

.safety-news-img-clickable {
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.safety-news-img-clickable:hover {
    transform: scale(1.08);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Image modal overlay */
.safety-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
}

.safety-modal-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
}

.safety-modal-img {
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
}

.safety-modal-close {
    position: absolute;
    top: -12px;
    right: -12px;
    width: 32px;
    height: 32px;
    background: #fff;
    color: #333;
    border-radius: 50%;
    font-size: 20px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    z-index: 10000;
    line-height: 1;
}

.safety-modal-close:hover {
    background: #f0f0f0;
}

/* Description cell — allow wrapping */
.safety-cell-desc {
    text-align: left;
    max-width: 350px;
    white-space: normal;
    line-height: 1.4;
}
