.content {
    height: 100vh !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    padding: 0 !important;
}

.wrapper {
    height: 100vh !important;
    overflow: hidden !important;
}

.predictive-page-container {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    background-color: transparent;
    color: #fff;
    font-family: "Poppins", sans-serif;
    padding: 0.5rem 1rem 0 1rem;
    box-sizing: border-box;
    overflow: hidden;
}

.predictive-filter-wrapper {
    flex-shrink: 0;
    display: flex;
    align-items: flex-end;
    gap: 10px;
    padding: 10px;
    background-color: #1b1b1b;
    /* border: 1px solid #444; */
    border-radius: 4px;
    margin-bottom: 0.5rem;
}

.highcharts-legend-item:hover text {
    fill: #ffd400 !important;
}

.select2-container--default
    .select2-selection--multiple
    .select2-selection__clear {
    color: #fff !important;
}

.predictive-chart-wrapper {
    flex: 1;
    min-height: 0;
    /* border: 1px solid #444; */
    background-color: #1b1b1b;
    margin-bottom: 0.5rem;
    position: relative;
    padding: 0.5rem 1rem;
    display: flex;
    flex-direction: column;
}

.predictive-chart-wrapper h5 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    flex-shrink: 0;
    font-size: 1rem;
    font-weight: 600;
}

.div-chart {
    flex: 1;
    min-height: 0;
    width: 100%;
    border: 1px solid #444;
    padding: 0.5rem;
    background-color: #1b1b1b;
    box-sizing: border-box;
    position: relative;
}

.predictive-table-wrapper {
    padding: 0.5rem 1rem;
    height: 25vh;
    min-height: 120px;
    flex-shrink: 0;
    /* border: 1px solid #444; */
    background-color: #1b1b1b;
    margin-bottom: 10px;
    display: flex;
    flex-direction: column;
}

.predictive-table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    flex-shrink: 0;
}

.div-table-list {
    border: 1px solid #444;
    padding: 0;

    flex: 1;
    min-height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background-color: #1b1b1b;
}

/* DataTables bisa discroll di dalam border */
.div-table-list .dt-container {
    flex: 1;
    overflow-y: auto; /* Scroll */
    overflow-x: hidden;
    padding: 10px;
}

/* TABEL STYLING */
.predictive-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.8rem;
    text-align: center;
}

/* HEADER STYLE  */
.predictive-table thead th {
    background-color: #2f3231 !important;
    color: #fff;
    padding: 0.6rem;
    /* font-weight: 600; */
    /* text-transform: uppercase; */
    border: 1px solid #555;
    /* border-bottom: 2px solid #555 !important; */
    text-align: center !important;
    position: sticky;
    top: 0;
    z-index: 10;
}

/* ROW DATA STYLE */
.predictive-table tbody tr {
    background-color: #4e4e4e !important;
    transition: background-color 0.2s;
}

/* Override striping default (genap/ganjil sama warnanya) */
.predictive-table tbody tr:nth-child(even) {
    background-color: #4e4e4e !important;
}

/* Hover Effect  */
.predictive-table tbody tr:hover {
    background-color: #999999 !important;
}

/* CELL STYLE */
.predictive-table td {
    border: 1px solid #666;
    padding: 10px 8px;
    color: #fff;
    vertical-align: middle;
    font-weight: 500;
}

.predictive-table tbody tr:last-child td {
    border-bottom: 1px solid #666;
}
/* --- FORM & BUTTONS --- */
.predictive-table-header h3 {
    font-size: 1rem;
    font-weight: 600;
    margin: 0 !important;
}

.export-buttons {
    display: flex;
    flex-direction: row;
    gap: 8px;
}

.btn-export {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #1b1b1b;
    border: 1px solid #414141;
    color: #ffffff;
    padding: 8px;
    border-radius: 5px;
    gap: 10px;
    font-size: 0.8rem;
    cursor: pointer;
}

.btn-export:hover {
    background-color: #454545;
}

.icon-excel {
    width: 15px;
}

.text-left {
    text-align: left !important;
    padding-left: 1rem !important;
}

.filter-group {
    display: flex;
    flex-direction: column;
}

.filter-group label {
    font-size: 0.75rem;
    color: #aaa;
    margin-bottom: 4px;
    font-weight: 600;
    text-transform: uppercase;
}

.form-control-dark {
    background-color: #222;
    color: #fff;
    border: 1px solid #444;
    border-radius: 4px;
    padding: 0 10px;
    width: 100%;
    height: 36px;
    font-size: 0.85rem !important;
}

.btn-load-chart {
    background-color: #1d6f42;
    color: #fff;
    border: 1px solid #165934;
    border-radius: 4px;
    width: 100%;
    font-weight: bold;
    cursor: pointer;
    height: 36px;
    font-size: 0.85rem !important;
}
.btn-load-chart:hover {
    background-color: #228b52;
}

/* --- DATATABLES & SELECT2 OVERRIDES --- */
div.dt-container div.dt-layout-row {
    margin: 0 !important;
}

.select2-container--default .select2-search--inline .select2-search__field {
    color: #fff;
}

.select2-container .select2-search--inline .select2-search__field {
    margin: 0px;
}

/* Custom Scrollbar untuk area gelap */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: #1b1b1b;
}
::-webkit-scrollbar-thumb {
    background: #444;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Select2 Dark Mode Fixes */
.select2-container--default .select2-selection--multiple {
    background-color: #1f1f1f !important;
    border: 1px solid #333 !important;
    border-radius: 4px !important;
    padding: 3px 6px;
    overflow-x: hidden;
    overflow-y: auto;
    max-height: 36px !important;
}

.select2-container--default
    .select2-selection--multiple
    .select2-selection__rendered {
    color: #bfbfbf !important;
}

.select2-dropdown {
    background-color: #1f1f1f !important;
    border: 1px solid #333 !important;
}

.select2-results__option {
    color: #dcdcdc !important;
    background-color: #1f1f1f !important;
}

.select2-results__option--highlighted {
    background-color: #333 !important;
    color: white !important;
}

.select2-container--default
    .select2-selection--multiple
    .select2-selection__choice {
    background-color: #444 !important;
    border: 1px solid #555 !important;
    color: #fff !important;
}

.select2-container--default
    .select2-selection--multiple
    .select2-selection__choice__display {
    color: #fff !important;
}

input[type="datetime-local"]::-webkit-calendar-picker-indicator {
    filter: invert(1) !important;
    cursor: pointer;
}

.custom-select-container {
    position: relative;
    width: 100%;
    font-size: 0.85rem;
}

/* DataTables Styling Fixes */
.dt-button {
    background-color: #444 !important;
    color: #fff !important;
    border: 1px solid #666 !important;
    font-size: 12px !important;
    padding: 4px 10px !important;
    margin-right: 5px !important;
}
.dt-button:hover {
    background-color: #666 !important;
}

.dataTables_empty {
    color: #777 !important;
    background-color: transparent !important;
    padding: 2rem !important;
    text-align: center;
}
.icon-excel {
    content: url("icon/icon-excel.svg");
    width: 15px;
}

/*  FOOTER NAVIGATION --- */
.predictive-footer-nav {
    flex-shrink: 0;
    height: 50px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 1rem;
    margin-left: -1rem;
    margin-right: -1rem;
    z-index: 50;
}

/* Tombol Footer Style */
.nav-btn-home {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(to bottom, #f0f0f0, #d0d0d0);
    color: #000;
    font-weight: 900;
    font-size: 0.9rem;
    text-decoration: none;
    padding: 0.4rem 1.5rem;
    border: 1px solid #999;
    border-radius: 4px;
    box-shadow: 2px 2px 3px rgba(0, 0, 0, 0.3);
}
.nav-btn-home:hover {
    filter: brightness(0.95);
    color: #000;
}

.nav-btn-action {
    background: linear-gradient(to bottom, #f0f0f0, #d0d0d0);
    color: #000;
    font-weight: 900;
    font-size: 0.9rem;
    border: 1px solid #999;
    padding: 0.4rem 1.5rem;
    border-radius: 4px;
    cursor: pointer;
    box-shadow: 2px 2px 3px rgba(0, 0, 0, 0.3);
}
.nav-btn-action:active {
    transform: translateY(2px);
    box-shadow: none;
}

/* PREDICTIVE PAGE - DATA THEME DARK (WHITE MODE/LIGHT THEME)  */
/* Background Wrappers & Borders */
[data-theme="dark"] .predictive-filter-wrapper,
[data-theme="dark"] .predictive-chart-wrapper,
[data-theme="dark"] .div-chart,
[data-theme="dark"] .predictive-table-wrapper,
[data-theme="dark"] .div-table-list {
    background-color: #ffffff;
    border-color: #ccc;
    color: #333;
}

/* Labels & Headings */
[data-theme="dark"] .filter-group label,
[data-theme="dark"] .predictive-chart-wrapper h5,
[data-theme="dark"] .predictive-table-header h3 {
    color: #333;
}

/* Input Date Picker */
[data-theme="dark"] .form-control-dark {
    background-color: #fff;
    color: #333;
    border: 1px solid #ccc;
}
/* Kembalikan icon kalender jadi hitam (default) */
[data-theme="dark"]
    input[type="datetime-local"]::-webkit-calendar-picker-indicator {
    filter: invert(0) !important;
}

/* Select2 (Dropdown Machine & Subject) di Mode Terang */
[data-theme="dark"] .select2-container--default .select2-selection--multiple {
    background-color: #ffffff !important;
    border: 1px solid #ccc !important;
}

[data-theme="dark"]
    .select2-container--default
    .select2-selection--multiple
    .select2-selection__rendered {
    color: #333 !important;
}

[data-theme="dark"]
    .select2-container--default
    .select2-selection--multiple
    .select2-selection__choice {
    background-color: #e9ecef !important;
    border: 1px solid #ccc !important;
    color: #333 !important;
}
[data-theme="dark"]
    .select2-container--default
    .select2-selection--multiple
    .select2-selection__choice__display {
    color: #333 !important;
}

/* Dropdown List Background */
[data-theme="dark"] .select2-dropdown {
    background-color: #ffffff !important;
    border-color: #ccc !important;
    color: #333 !important;
}
[data-theme="dark"] .select2-results__option {
    background-color: #ffffff !important;
    color: #333 !important;
}
/* Hover State di Dropdown */
[data-theme="dark"] .select2-results__option--highlighted {
    background-color: #0d6efd !important;
    color: #fff !important;
}

/* Export Buttons */
[data-theme="dark"] .btn-export {
    background-color: #f8f9fa;
    color: #333;
    border: 1px solid #ccc;
}
[data-theme="dark"] .btn-export:hover {
    background-color: #e2e6ea;
}

/* TABEL PREDICTIVE LIST (Light Mode) */
[data-theme="dark"] .predictive-table thead th {
    background-color: #f1f1f1 !important;
    color: #333;
    border: 1px solid #ddd;
    /* border-bottom: 2px solid #ccc !important; */
}

/* Row Body */
[data-theme="dark"] .predictive-table tbody tr,
[data-theme="dark"] .predictive-table tbody tr:nth-child(even) {
    background-color: #ffffff !important;
}

/* Cell Text & Border */
[data-theme="dark"] .predictive-table td {
    color: #333;
    border: 1px solid #ddd;
}

/* Hover Row */
[data-theme="dark"] .predictive-table tbody tr:hover {
    background-color: #f2f2f2 !important;
}

/* Avg Value agar terlihat di background putih */
[data-theme="dark"] .predictive-table span[style*="color:#fff"] {
    color: #333 !important;
}
[data-theme="dark"] .predictive-table span[style*="color:#07b5c2"] {
    color: #058a94 !important;
}
