/* Styling untuk modal gabung SKP tahunan */
#mergeSKPModal .modal-content {
    background: linear-gradient(135deg, #f8f9ff 0%, #ffffff 100%);
}

#mergedSKPTable {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    table-layout: fixed; /* Enable precise column width control */
}

/* Specific column widths for merged SKP table */
#mergedSKPTable colgroup col.col-month { width: 100px; }
#mergedSKPTable colgroup col.col-aktivitas { width: 80px; }
#mergedSKPTable colgroup col.col-input { width: 60px; }
#mergedSKPTable colgroup col.col-registrasi { width: 50px; }
#mergedSKPTable colgroup col.col-pengajuan { width: 70px; }
#mergedSKPTable colgroup col.col-verifikasi { width: 70px; }
#mergedSKPTable colgroup col.col-cetak { width: 70px; }
#mergedSKPTable colgroup col.col-lainnya { width: 80px; }
#mergedSKPTable colgroup col.col-hari { width: 60px; }

/* Responsive column widths based on screen size */
@media (max-width: 1400px) {
    #mergedSKPTable colgroup col.col-month { width: 90px; }
    #mergedSKPTable colgroup col.col-aktivitas { width: 70px; }
    #mergedSKPTable colgroup col.col-input { width: 50px; }
    #mergedSKPTable colgroup col.col-registrasi { width: 45px; }
    #mergedSKPTable colgroup col.col-pengajuan { width: 60px; }
    #mergedSKPTable colgroup col.col-verifikasi { width: 60px; }
    #mergedSKPTable colgroup col.col-cetak { width: 60px; }
    #mergedSKPTable colgroup col.col-lainnya { width: 70px; }
    #mergedSKPTable colgroup col.col-hari { width: 50px; }
}

@media (max-width: 1200px) {
    #mergedSKPTable colgroup col.col-month { width: 80px; }
    #mergedSKPTable colgroup col.col-aktivitas { width: 65px; }
    #mergedSKPTable colgroup col.col-input { width: 45px; }
    #mergedSKPTable colgroup col.col-registrasi { width: 40px; }
    #mergedSKPTable colgroup col.col-pengajuan { width: 55px; }
    #mergedSKPTable colgroup col.col-verifikasi { width: 55px; }
    #mergedSKPTable colgroup col.col-cetak { width: 55px; }
    #mergedSKPTable colgroup col.col-lainnya { width: 65px; }
    #mergedSKPTable colgroup col.col-hari { width: 45px; }
}

#mergedSKPTable thead th {
    text-align: center !important;
    font-weight: 600;
    border: 1px solid #ddd;
    padding: 8px 4px;
    font-size: 0.85em;
    color: #333 !important;
    text-shadow: none !important;
    word-wrap: break-word;
    overflow: hidden;
}

#mergedSKPTable tbody td {
    border: 1px solid #e1e8ed;
    padding: 6px 4px;
    text-align: center;
    vertical-align: middle;
    transition: background-color 0.2s ease;
    word-wrap: break-word;
    overflow: hidden;
    text-overflow: ellipsis;
}

#mergedSKPTable tbody tr:hover {
    background-color: rgba(102, 126, 234, 0.05) !important;
}

#mergedSKPTable tfoot th {
    border: 1px solid #ddd;
    padding: 8px 4px;
    text-align: center;
    font-weight: bold;
    background: #f8f9fa !important;
    color: #333 !important;
    word-wrap: break-word;
    overflow: hidden;
}

/* Column resize handles (optional interactive resizing) */
.column-resizer {
    position: absolute;
    top: 0;
    right: -2px;
    width: 4px;
    height: 100%;
    background: rgba(102, 126, 234, 0.3);
    cursor: col-resize;
    opacity: 0;
    transition: opacity 0.2s ease;
}

#mergedSKPTable th:hover .column-resizer {
    opacity: 1;
}

/* Spinner animation */
.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

/* Custom column width controls */
.column-width-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #f8f9fa;
    margin-bottom: 10px;
}

.column-width-control {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.85em;
}

.column-width-control label {
    font-weight: 500;
    min-width: 60px;
}

.column-width-control input[type="range"] {
    width: 80px;
}

.column-width-control span {
    min-width: 35px;
    font-weight: 600;
    color: #667eea;
}

/* SKP Table Column Width Standardization */
#skpTable {
    table-layout: fixed;
    width: 100%;
    min-width: 1400px;
}

/* Standardized column widths */
#skpTable th:nth-child(1),
#skpTable td:nth-child(1) {
    width: 100px; /* Date column */
    min-width: 100px;
}

#skpTable th:nth-child(2),
#skpTable td:nth-child(2) {
    width: 70px; /* Activity total column */
    min-width: 70px;
}

/* Data input columns - standardized width */
#skpTable th:nth-child(n+3):nth-child(-n+14),
#skpTable td:nth-child(n+3):nth-child(-n+14) {
    width: 50px;
    min-width: 50px;
}

/* Lainnya column */
#skpTable th:nth-child(15),
#skpTable td:nth-child(15) {
    width: 60px;
    min-width: 60px;
}

/* Notes column */
#skpTable th:last-child,
#skpTable td:last-child {
    width: 120px;
    min-width: 120px;
}

/* Ensure inputs fit within columns */
#skpTable input[type="number"],
#skpTable input[type="text"] {
    width: 100%;
    box-sizing: border-box;
    padding: 2px 4px;
    font-size: 0.8em;
}

/* Day status badge sizing */
.day-status-badge {
    font-size: 0.7em !important;
    padding: 2px 4px !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Table container scrolling */
#skpTableModal .table-container {
    overflow-x: auto;
    overflow-y: auto;
}
