body {
    background-color: #f0f2f5;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.container-fluid {
    padding: 1.5rem;
}

.main-dashboard-layout {
    display: flex;
    gap: 1.5rem;
}

.left-column-layout {
    flex: 0 0 350px;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.right-column-layout {
    flex-grow: 1;
    display: flex;
}

.card {
    border: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border-radius: 8px;
    background-color: #fff;
}

/* Conveyor Filter Buttons */
.conveyor-filter-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 0.5rem;
    padding-right: 5px;
    max-height: 140px;
    overflow-y: auto;
}

.conveyor-filter-buttons .btn {
    font-size: 0.85rem;
    padding: 0.6rem 0.5rem;
    border-radius: 0.35rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: bold;
    color: #212529;
}

/* Departement Filter Buttons */
.conveyor-filter-buttons .btn.active {
    background-color: #0d6efd;
    border-color: #0d6efd;
    color: white;
}

.department-filter-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 0.5rem;
    padding-right: 5px;
    max-height: 90px;
    /* Anda bisa sesuaikan tingginya jika perlu */
    overflow-y: auto;
}

.department-filter-buttons .btn {
    font-size: 0.85rem;
    padding: 0.6rem 0.5rem;
    border-radius: 0.35rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: bold;
    color: #212529;
}

.department-filter-buttons .btn.active {
    background-color: #0d6efd;
    border-color: #0d6efd;
    color: white;
}

/* Date Input */
input[type="date"] {
    padding: 0.5rem 0.75rem;
    line-height: 1.5;
    border-radius: 0.25rem;
    border: 1px solid #ced4da;
}

.table-responsive-wrapper {
    max-height: 95vh; 
    overflow-y: auto;
    border: 1px solid #dee2e6;
    border-radius: 8px;
}

#downtimeTable {
    margin-bottom: 0;
    width: 100%;
    transition: all 0.2s ease-in-out;
}

/* Sticky Table Header */
#downtimeTable thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    background-color: #f8f9fa;
    box-shadow: inset 0 -2px 0 #dee2e6;
}

/* DataTables Loading Indicator */
.dataTables_wrapper .dataTables_processing {
    width: auto;
    left: 50%;
    transform: translateX(-50%);
    padding-left: 30px;
    padding-right: 30px;
    margin-left: 0 !important;
}

#downtimeTable_wrapper.processing #downtimeTable {
    filter: blur(2px);
    opacity: 0.6;
    pointer-events: none;
    transition: all 0.2s ease-in-out;
}

#downtimePieChart {
    max-height: 280px;
    max-width: 280px;
    margin: auto;
}

#downtimeDeptPieChart {
    max-height: 280px;
    max-width: 280px;
    margin: auto;
}

/* Stretch right column card to match left column height */
.right-column-layout .card {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.right-column-layout .card-body {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

/* Chart Bar */
.bar-chart-container {
    position: relative;
    width: 100%;
    height: 280px;
}

@media (max-width: 992px) {
    .main-dashboard-layout {
        flex-direction: column;
        align-items: stretch;
    }

    .left-column-layout,
    .right-column-layout {
        flex: 1 1 100%;
    }

    .table-responsive-wrapper {
        max-height: 400px;
    }
}