/* Global Table Alignment CSS for Colored Headers */
/* This CSS ensures proper alignment for tables with #8D95C2 colored headers */

/* Fix alignment for colored headers */
table thead th[style*="background-color: #8D95C2"] {
    text-align: center !important;
    vertical-align: middle !important;
    width: 150px !important;
    padding: 8px 4px !important;
}

/* Ensure data cells align with headers */
table tbody td {
    text-align: center !important;
    vertical-align: middle !important;
    width: 150px !important;
    padding: 8px 4px !important;
}

/* Description column (first column) */
table th:first-child,
table td:first-child {
    width: 200px !important;
    text-align: left !important;
    padding: 8px 4px !important;
}

/* Force table layout for consistent alignment */
table {
    table-layout: fixed !important;
    width: 100% !important;
}

/* Ensure header colspan works properly */
table thead th[colspan] {
    text-align: center !important;
}

/* Specific alignment for year headers (last row of headers) */
table thead tr:last-child th {
    text-align: center !important;
    vertical-align: middle !important;
    width: 150px !important;
    padding: 8px 4px !important;
}

/* Ensure data cells match header width exactly */
table tbody td:not(:first-child) {
    width: 150px !important;
    text-align: center !important;
    padding: 8px 4px !important;
}

/* DataTable specific overrides */
.dataTable thead th[style*="background-color: #8D95C2"] {
    text-align: center !important;
    vertical-align: middle !important;
    width: 150px !important;
    padding: 8px 4px !important;
}

.dataTable tbody td {
    text-align: center !important;
    vertical-align: middle !important;
    width: 150px !important;
    padding: 8px 4px !important;
}

.dataTable th:first-child,
.dataTable td:first-child {
    width: 200px !important;
    text-align: left !important;
    padding: 8px 4px !important;
}

.dataTable {
    table-layout: fixed !important;
    width: 100% !important;
}

.dataTable thead th[colspan] {
    text-align: center !important;
}

.dataTable thead tr:last-child th {
    text-align: center !important;
    vertical-align: middle !important;
    width: 150px !important;
    padding: 8px 4px !important;
}

.dataTable tbody td:not(:first-child) {
    width: 150px !important;
    text-align: center !important;
    padding: 8px 4px !important;
}

/* Override any DataTables default styling */
.dataTables_scrollHeadInner table,
.dataTables_scrollBody table {
    width: 100% !important;
    table-layout: fixed !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    table th:first-child,
    table td:first-child,
    .dataTable th:first-child,
    .dataTable td:first-child {
        width: 150px !important;
        min-width: 150px !important;
    }
    
    table thead th[style*="background-color: #8D95C2"],
    table tbody td,
    .dataTable thead th[style*="background-color: #8D95C2"],
    .dataTable tbody td {
        width: 120px !important;
        min-width: 120px !important;
        font-size: 12px !important;
        padding: 4px 2px !important;
    }
} 