:root {
    --bg-color: #1d2125;
    --bg-card: #161a1d;
    /* Default Dark Mode Background */
    --text-color: #f7f8f9;
    --text-no-file: white;
    --file-folder: #e0e0e0;
    --file-folder-shadow: rgba(68, 55, 53, 0.3);
    /* Default Dark Mode Text */
    --border-color: #32363d;
}

/* Light Mode Styles */
.light-mode {
    --bg-color: #f7f8f9;
    --bg-card: #f1f2f4;
    --text-color: #1d2125;
    --text-no-file: #575757;
    --file-folder: #d5dbdd;
    --file-folder-shadow: rgba(146, 146, 146, 0.8);
    --border-color: #b9c1d0;
}

/* Prevent scrolling */
html,
body {
    height: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

/* Main container (fills screen height) */
.flex-container {
    display: flex;
    height: 93vh;
    padding: 5px 0px;
    gap: 10px;
    box-sizing: border-box;
}

/* Left section (bigger portion) */
.left-section {
    display: flex;
    flex-direction: column;
    flex: 2;
    gap: 10px;
    overflow: hidden;
}

/* Right section (smaller portion) */
.right-section {
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 10px;
    overflow: hidden;
}

/* Row layout for charts */
.flex-row {
    display: flex;
    flex: 1;
    gap: 10px;
    overflow: hidden;
}

/* Chart cards */
.card-chart {
    flex: 1;
    background-color: var(--bg-card);
    color: var(--text-color);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    /* box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); */
    padding: 10px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: start;
}

/* Make charts take full space */
.card-chart div[id^="chart-"] {
    width: 100%;
    height: 100%;
}

.card-chart h3 {
    margin-top: 20px;
    margin-left: 10px;
}

h3 {
    font-size: 1.1rem;
    font-weight: bold;
}

h4 {
    font-size: 1.1rem;
}

/* Safety section */
.card {
    flex: 1;
    background-color: var(--bg-card);
    color: var(--text-color);
    border-radius: 8px;
    /* box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); */
    border: 1px solid var(--border-color);
    padding: 15px;
    overflow: hidden;
}

.card-improve {
    flex: 5;
    gap: 10px;
}

.card-filter {
    flex: 0.6;
    position: relative; /* agar z-index bekerja jika diperlukan */
    overflow: visible !important; /* ini penting agar dropdown bisa keluar */
    /* gap: 10px; */
    /* flex-shrink: 2; */
}

.custom-select-style {
    display: block;
    width: 100%;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    color: #212529;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid #ced4da;
    border-radius: 0.375rem;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1rem;
    appearance: none; /* hilangkan default arrow */
}

.custom-select-style:focus {
    border-color: #86b7fe;
    outline: 0;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

.custom-select-style.dropdown-toggle::after {
    content: "";
    position: absolute;
    top: 50%;
    right: 0.75rem;
    transform: translateY(-50%);

    display: inline-block;
    width: 0;
    height: 0;
    margin-left: 0.255em;
    vertical-align: 0.255em;
    border-top: 0.3em solid;
    border-right: 0.3em solid transparent;
    border-left: 0.3em solid transparent;
}

.card-spoilage {
    flex: 2.2;
}

table.table {
    height: 12rem !important;
    overflow: scroll;
}

.table,
.table th,
.table td {
    background-color: var(--bg-color) !important;
    color: var(--text-color) !important;
    border-color: var(--border-color) !important;
}

figure {
    margin: 0rem;
    width: 100%;
    height: auto;
}

figure div {
    width: 100%;
    height: 14.5rem !important;
}

/* Table containers scroll inside the card */
.table-container {
    flex: 1;
    overflow: auto;
}

/* Center the middle text */
.middle-text {
    flex: 0.3;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.5rem;
}

.improve-bar {
    flex: 1;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
}
.idp {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    /* border: 1px solid var(--text-color); */
}

.idp h5 {
    font-size: 1.1rem;
    font-weight: bold;
}

.idp span {
    font-size: 1.1rem;
    margin-top: 5px;
    margin-bottom: 20px;
    font-weight: bold;
    border: 1px solid var(--text-color);
    padding: 8px 30px;
    border-radius: 5px;
    background-color: var(--bg-color);
}

#user_name,
#user_name_nhc {
    font-size: 1.4rem;
    /* color: yellow; */
    color: var(--text-color);
}

#user_nrp,
#user_nrp_nhc {
    font-size: 1.4rem;
    /* color: yellow; */
    color: var(--text-color);
}

/* .intro {
    border: 2px solid var(--text-color);
    border-radius: 10px;
} */

.img-user {
    height: 100px;
    width: 100px;
    border: 2px solid var(--text-color);
    border-radius: 10px;
    padding: 10px;
    background-color: var(--bg-color);
}

.select2-container--default
    .select2-selection--single
    .select2-selection__rendered {
    background-color: var(--text-color) !important;
    color: var(--bg-color) !important;
    /* border: 1px solid var(--border-color) !important; */
    border-radius: 0.3rem;
}

.select2-container--default .select2-results__option--disabled,
.select2-results__option--selectable {
    background-color: var(--text-color) !important;
    color: var(--bg-color) !important;
}

.select2-results__option {
    background-color: var(--text-color);
    color: var(--bg-color);
}

.select2-container--default .select2-results__option--disabled,
.select2-results__option--selectable:hover {
    background-color: var(--bg-color) !important;
    color: var(--text-color) !important;
}

.select2-container--default .select2-search--dropdown .select2-search__field {
    color: #fff;
}
.spoilage-bar {
    display: flex;
    gap: 20px;
    flex-direction: row;
    justify-content: center;
    align-items: center;
}

.spoilage-bar .idp span {
    border: 1px solid var(--text-color);
    padding: 8px 50px;
    border-radius: 5px;
}

.middle-text {
    display: flex;
    justify-content: center;
    align-items: center;
    min-width: 150px;
}

.middle-text table {
    border-collapse: collapse;
}

.middle-text td {
    padding: 4px 2px;
    font-size: 14px;
    border: none;
    background: none;
}

.datepicker-orient-top {
    margin-top: -70.906px;
}

.setting-chart {
    margin-top: 18px;
    padding: 0rem 0.3rem;
    border-radius: 0.2rem;
    background: var(--bg-color);
    border: 1px solid var(--text-color);
    color: var(--text-color);
    font-size: 1rem;
    margin-right: 0.5rem;
}

.date-input {
    width: 150px;
    text-align: center;
    background-color: var(--text-color) !important;
    color: var(--bg-color) !important;
}
