.excel-table {
    border-collapse: collapse;
    font-size: 14px;
    width: 100%;
    margin-top: 10px;
}
.excel-table th,
.excel-table td {
    border: 1px solid #333;
    padding: 6px 10px;
    vertical-align: middle;
}
.excel-table th {
    background: #f8f9fa;
    text-align: center;
    font-weight: bold;
}
.excel-table td:first-child {
    text-align: left;
    font-weight: 500;
}
.excel-table td:not(:first-child) {
    text-align: right;
}
.excel-table caption {
    font-weight: bold;
    margin-bottom: 12px;
    font-size: 1rem;
    caption-side: top;
    text-align: center;
}
.table-loading,
.table-error {
  text-align: center;
  padding: 20px;
  font-style: italic;
  color: #6c757d;
}

/* Ensure table container is scrollable on mobile */
.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  width: 100%;
}

.chart-container {
    position: relative;
    width: 100%;
    height: 450px;
    margin: 20px 0 30px 0;
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
    border: 1px solid #e9ecef;
}

.chart-controls {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.chart-type-btn {
    padding: 10px 20px;
    border: 2px solid #667eea;
    background: white;
    color: #667eea;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

.chart-type-btn:hover {
    background: #f0f4ff;
}

.chart-type-btn.active {
    background: #667eea;
    color: white;
}

.filter-sidebar {
    width: 280px;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9ff 100%);
    box-shadow: 0 8px 32px rgba(102, 126, 234, 0.15);
    padding: 18px;
    border-radius: 12px;
    border: 1px solid rgba(102, 126, 234, 0.2);
    flex-shrink: 0;
    margin-right: 20px;
    height: fit-content;
    position: sticky;
    top: 20px;
    backdrop-filter: blur(10px);
}

.filter-group {
    margin-bottom: 20px;
}

.filter-group:last-of-type {
    margin-bottom: 0;
}

.filter-group label {
    display: block;
    margin-bottom: 12px;
    font-weight: 700;
    color: #1a1a2e;
    padding-bottom: 8px;
    border-bottom: 2px solid #667eea;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    font-size: 12px;
    position: relative;
}

.filter-group label::after {
    content: "";
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 50px;
    height: 2px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-radius: 2px;
}

.checkbox-list {
    max-height: 300px;
    overflow-y: auto;
    padding: 8px;
    background: linear-gradient(135deg, #f8f9ff 0%, #ffffff 100%);
    border-radius: 8px;
    border: 1px solid rgba(102, 126, 234, 0.1);
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.03);
}

.checkbox-list::-webkit-scrollbar {
    width: 5px;
}

.checkbox-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 8px;
}

.checkbox-list::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 8px;
}

.checkbox-item {
    display: flex;
    align-items: center;
    padding: 8px 10px;
    margin-bottom: 6px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: #ffffff;
    border: 1.5px solid #e9ecef;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.checkbox-item:last-child {
    margin-bottom: 0;
}

.checkbox-item:hover {
    background: linear-gradient(135deg, #f0f4ff 0%, #e8f0ff 100%);
    border-color: #667eea;
    transform: translateX(3px);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
}

.checkbox-item input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin-right: 8px;
    cursor: pointer;
    accent-color: #667eea;
    border-radius: 3px;
}

.checkbox-item label {
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    color: #2c3e50;
    margin: 0;
    padding: 0;
    border: none;
    text-transform: none;
    letter-spacing: normal;
}

.checkbox-item label::after {
    display: none;
}

.year-filter-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: linear-gradient(135deg, #f8f9ff 0%, #ffffff 100%);
    padding: 12px;
    border-radius: 8px;
    border: 1px solid rgba(102, 126, 234, 0.1);
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.03);
}

.year-filter-mode {
    width: 100%;
    padding: 10px 12px;
    border: 1.5px solid #e9ecef;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    background: white;
    color: #2c3e50;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.year-filter-mode:hover {
    border-color: #667eea;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.15);
}

.year-filter-mode:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.1);
}

.year-range-inputs {
    display: flex;
    gap: 8px;
}

.year-range-inputs input[type="number"] {
    flex: 1;
    padding: 10px 12px;
    border: 1.5px solid #e9ecef;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    background: white;
    color: #2c3e50;
    transition: all 0.3s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.year-range-inputs input[type="number"]:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.1);
}

.year-range-inputs input[type="number"]::placeholder {
    color: #adb5bd;
    font-size: 11px;
}

.filter-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
    padding-top: 18px;
    border-top: 2px solid rgba(102, 126, 234, 0.1);
}

.btn-filter,
.btn-reset {
    width: 100%;
    padding: 10px 16px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 700;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    letter-spacing: 0.3px;
    text-transform: uppercase;
    position: relative;
    overflow: hidden;
}

.btn-filter::before,
.btn-reset::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-filter:hover::before,
.btn-reset:hover::before {
    width: 300px;
    height: 300px;
}

.btn-filter {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
    position: relative;
    z-index: 1;
}

.btn-filter:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.5);
}

.btn-filter:active {
    transform: translateY(0);
}

.btn-reset {
    background: linear-gradient(135deg, #6c757d 0%, #5a6268 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(108, 117, 125, 0.3);
    position: relative;
    z-index: 1;
}

.btn-reset:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(108, 117, 125, 0.4);
    background: linear-gradient(135deg, #5a6268 0%, #495057 100%);
}

.btn-reset:active {
    transform: translateY(0);
}

.main-content-wrapper {
    display: flex;
    gap: 0;
    align-items: flex-start;
    margin-top: 20px;
}

.content-with-sidebar {
    flex: 1;
    min-width: 0;
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
    .main-content-wrapper {
        flex-direction: column;
        gap: 15px;
    }
    
    .filter-sidebar {
        width: 100%;
        margin-right: 0;
        margin-bottom: 15px;
        position: relative;
        top: 0;
        padding: 15px;
    }
    
    .chart-container {
        height: 300px;
        padding: 15px;
        margin: 15px 0;
    }
    
    .chart-controls {
        gap: 8px;
        margin-bottom: 12px;
    }
    
    .chart-type-btn {
        padding: 8px 12px;
        font-size: 12px;
        flex: 1;
        min-width: 0;
    }
    
    .chart-type-btn i {
        font-size: 14px;
    }
    
    .excel-table {
        font-size: 11px;
    }
    
    .excel-table th,
    .excel-table td {
        padding: 4px 6px;
    }
    
    .excel-table caption {
        font-size: 0.875rem;
        margin-bottom: 8px;
    }
    
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .checkbox-list {
        max-height: 250px;
        padding: 6px;
    }
    
    .checkbox-item {
        padding: 6px 8px;
        margin-bottom: 4px;
    }
    
    .checkbox-item label {
        font-size: 11px;
    }
    
    .filter-group label {
        font-size: 11px;
        margin-bottom: 10px;
    }
    
    .content-with-sidebar {
        width: 100%;
    }
    
    #tabel-container {
        padding: 12px !important;
        overflow-x: auto;
    }
    
    .btn {
        font-size: 13px;
        padding: 8px 16px;
    }
    
    .d-flex.gap-2 {
        flex-wrap: wrap;
        gap: 8px !important;
    }
}

/* Small Mobile (max-width: 480px) */
@media (max-width: 480px) {
    .chart-container {
        height: 250px;
        padding: 10px;
    }
    
    .chart-controls {
        gap: 6px;
    }
    
    .chart-type-btn {
        padding: 6px 8px;
        font-size: 11px;
    }
    
    .chart-type-btn i {
        display: none;
    }
    
    .excel-table {
        font-size: 10px;
    }
    
    .excel-table th,
    .excel-table td {
        padding: 3px 4px;
        min-width: 50px;
    }
    
    .filter-sidebar {
        padding: 12px;
    }
    
    .checkbox-list {
        max-height: 200px;
    }
    
    #tabel-container {
        padding: 8px !important;
    }
    
    .table-loading,
    .table-error {
        padding: 15px;
        font-size: 13px;
    }
    
    .btn {
        font-size: 12px;
        padding: 6px 12px;
        width: 100%;
    }
    
    .d-flex.gap-2 {
        flex-direction: column;
        gap: 8px !important;
    }
    
    .d-flex.gap-2 .btn {
        width: 100%;
        justify-content: center;
    }
}
