html {
    scrollbar-width: thin;
    /* scrollbar-color: #aaa #F4F6F9; */
    scrollbar-color: #aaa #fcfcfc;
}

html:has(body.dark-mode) {
    scrollbar-color: #aaa #171717;
}

body {
    font-family: Inter;
    font-size: 14px;
    /* background-color: #f4f6f9; */
    background-color: #fcfcfc;
}

body.dark-mode {
    background-color: #171717;
}

div.content-wrapper {
    background: #fcfcfc;
}

.dark-mode div.content-wrapper {
    background: #171717;
}

.dark-mode .breadcrumb-item.active {
    color: white !important;
}

.btn {
    font-size: 14px;
    border-radius: 0.75rem;
}

/* Dashboard */
.dashboard-v2 {
    height: 825px;
    width: 100%; 
    position: relative;
}

.dashboard-v2 .kpi-header {
    display: flex; 
    align-items: center;
    height: 2.5rem; 
    border-radius: 10px; 
    pointer-events: auto; 
    background: white; 
    color: #343A40;
    box-shadow: 6px 3px 10px 0 rgba(0,0,0,0.2),0 6px 12px 0 rgba(0,0,0,0.19);
    width: 65%; 
    justify-self: center;
}

.dark-mode .dashboard-v2 .kpi-header {
    color: #D0D0D0;
    background-color: #1d1d1d;
    border: 1px solid hsla(0, 0%, 100%, .04);
    box-shadow: inset 0px 2px 20px 20px rgba(var(--dark-light), 0.1);
}

.dashboard-v2 .kpi-warehouse {
    flex: 0 0 50%;
    max-width: 50%;
    padding: 0 1.25rem;
    border-right: 1px solid rgba(0, 0, 0, 0.2);
}

.dashboard-v2 .kpi-warehouse #selectedWarehouseCode {
    white-space: nowrap;
    text-overflow: ellipsis;
    text-align: center;
    overflow: hidden;
    width: 100%;
    margin-bottom: 0;
    color: rgb(var(--primary));
}

.dashboard-v2 .kpi-datepicker {
    display: flex;
    flex: 0 0 50%;
    max-width: 50%;
}

.dashboard-v2 .kpi-datepicker-icon {
    display: flex; 
    justify-content: center; 
    align-items: center; 
    padding: 1rem;
}

.dashboard-v2 .kpi-datepicker-input {
    flex: 1 1 auto; 
    display: flex; 
    padding-right: 1.25rem;
}

.dashboard-v2 .kpi-datepicker-input input {
    width: 100%; 
    text-overflow: ellipsis; 
    border: none;
    background: transparent;
    color: #343A40;
}

.dark-mode .dashboard-v2 .kpi-datepicker-input input {
    color: #D0D0D0;
}

.dashboard-v2 .dashboard-card {
    display: flex; 
    flex-direction: column; 
    padding: 0.75rem; 
    height: 100%; 
    border-radius: 10px; 
    pointer-events: auto; 
    background: white; 
    box-shadow: 6px 3px 10px 0 rgba(0,0,0,0.2),0 6px 12px 0 rgba(0,0,0,0.19);
}

.dark-mode .dashboard-v2 .dashboard-card {
    background-color: #1d1d1d;
    border: 1px solid hsla(0, 0%, 100%, .04);
    box-shadow: inset 0px 2px 20px 20px rgba(var(--dark-light), 0.1);
}

.dashboard-v2 .dashboard-card .dashboard-card-title {
    display: flex; 
    align-items: center; 
    margin-bottom: 0.5rem; 
    justify-content: space-between; 
    color: #343a40;
}

.dark-mode .dashboard-v2 .dashboard-card .dashboard-card-title {
    color: #D0D0D0;
}

.dashboard-v2 .dashboard-card .dashboard-card-title label {
    margin-bottom: 0;
}

.dashboard-v2 .dashboard-card .dashboard-card-title .title-detail-btn {
    border: 1px solid rgba(0, 0, 0, 0.2); 
    cursor: pointer; 
    border-radius: 0.4rem; 
    padding: 0.05rem 0.1rem;
}

.dark-mode .dashboard-v2 .dashboard-card .dashboard-card-title .title-detail-btn {
    border: 1px solid rgba(255, 255, 255, 0.2); 
}

.dashboard-v2 .dashboard-card .kpi-table {
    display: flex;
    justify-content: center;
    margin-top: 0.5rem;
}

.dashboard-v2 .dashboard-card .kpi-table table {
    font-size: 12px;
}

.dashboard-v2 .dashboard-card .kpi-table .indicator span {
    display: block; 
    height: 10px; 
    width: 10px; 
    border-radius: 50%;
}

.dashboard-v2 .dashboard-card .kpi-table .indicator.info span {
    background-color: rgb(var(--info));
}

.dashboard-v2 .dashboard-card .kpi-table .indicator.success span {
    background-color: rgb(var(--success));
}

.dashboard-v2 .dashboard-card .kpi-table .indicator.warning span {
    background-color: rgb(var(--warning));
}

.dashboard-v2 .dashboard-card .kpi-table .indicator.danger span {
    background-color: rgb(var(--danger));
}

.dashboard-v2 .dashboard-card .kpi-table .label {
    color: #737373;
    padding: 0.1rem 0.5rem;
}

.dashboard-v2 .dashboard-card .kpi-table .value {
    color: #343a40; 
    font-weight: bold;
    padding: 0.1rem 0.25rem;
}

.dark-mode .dashboard-v2 .dashboard-card .kpi-table .value {
    color: #D0D0D0;
}

.dark-mode .dashboard-v2 g:has(tspan) {
    color: #D0D0D0;
}

.dashboard-v2 #iomonthyearlabel {
    color: #343a40;
}

.dark-mode .dashboard-v2 #iomonthyearlabel {
    color: #D0D0D0;
}

.dashboard-v2 .popular-item {
    display: flex; 
    flex-direction: column; 
}

.dashboard-v2 .popular-item-label {
    display: flex; 
    align-items: center; 
    margin-bottom: 0.3rem;
}

.dashboard-v2 .popular-item-label i {
    color: rgb(184, 102, 225); 
    margin-right: 0.5rem;
}

.dashboard-v2 .popular-item-label label {
    flex: 1 1 auto; 
    margin-bottom: 0; 
    color: #343a40; 
    font-size: 12px;
}

.dark-mode .dashboard-v2 .popular-item-label label {
    color: #D0D0D0;
}

.dashboard-v2 .popular-item-label span {
    font-size: 12px; 
    color: #737373;
}

.dashboard-v2 .popular-item-bar-base {
    position: relative; 
    width: 100%; 
    height: 5px; 
    border-radius: 3px; 
    background-color: #e2e6eb; 
    box-shadow: 3px 1px 5px 0 rgba(0, 0, 0, 0.2), 0 6px 9px 0 rgba(0, 0, 0, 0.19);
}

.dashboard-v2 .popular-item-bar {
    width: 0;
    position: absolute; 
    top: 0; 
    bottom: 0; 
    left: 0;
    border-radius: 3px; 
    background: linear-gradient(180deg, rgb(202, 141, 232), rgb(184, 102, 225)) repeat-x;
    transition: width 1s ease-out;
}

.dark-mode .dashboard-v2 .leaflet-layer,
.dark-mode .dashboard-v2 .leaflet-control-zoom-in,
.dark-mode .dashboard-v2 .leaflet-control-zoom-out,
.dark-mode .dashboard-v2 .leaflet-control-attribution {
  filter: invert(100%) hue-rotate(180deg) brightness(95%) contrast(90%);
}

.modal .mode-selection-label {
    margin-right: 0.5rem;
    color: #343a40;
}

.dark-mode .modal .mode-selection-label {
    color: #D0D0D0;
}
/* End of Dashboard */

/* x Button in Modal */
.modal-header button.close:has(.bi-x) {
    align-self: center;
    outline: none;
}
/* End of x Button in Modal */

/* System Message */
.system-msg .modal-content {
    border-radius: 1rem;
    padding: 1.5rem;
    flex-direction: row;
}

.system-msg .modal-content .content-close .close {
    position: absolute;
    top: 1rem;
    right: 1rem;
}

.dark-mode .system-msg .modal-content .content-close .close {
    color: white;
}

.system-msg .modal-content .content-icon div {
    width: 75px; 
    height: 75px; 
    border-radius: 10px; 
    display: flex; 
    justify-content: center; 
    align-items: center;
    font-size: 2.5rem;
}

.system-msg .modal-content.success-msg .content-icon div {
    background-color: rgba(var(--success), 0.1);
    color: rgb(var(--success)); 
}

.system-msg .modal-content.warning-msg .content-icon div {
    background-color: rgba(var(--warning), 0.1);
    color: rgb(var(--warning)); 
}

.system-msg .modal-content.danger-msg .content-icon div {
    background-color: rgba(var(--danger), 0.1);
    color: rgb(var(--danger));
}

.system-msg .modal-content .content-text {
    flex: 1 1 auto;
}

.system-msg .modal-content .content-text>div {
    display: flex; 
    flex-direction: column; 
    padding: 0 0.75rem;
}

.system-msg .modal-content .content-text label {
    font-size: 1rem; 
    margin-bottom: 0;
    /* color: #343A40; */
}

.system-msg .modal-content.success-msg .content-text label {
    color: rgb(var(--success));
}

.system-msg .modal-content.warning-msg .content-text label {
    color: rgb(var(--warning));
}

.system-msg .modal-content.danger-msg .content-text label {
    color: rgb(var(--danger));
}

/* .dark-mode .system-msg .modal-content .content-text label {
    color: #D0D0D0;
} */

.system-msg .modal-content .content-text p {
    margin-bottom: 0;
    color: #343A40;
}

.dark-mode .system-msg .modal-content .content-text p {
    color: #D0D0D0;
}

.system-msg .modal-content .content-button {
    display: flex; 
    align-items: flex-end;
}

.system-msg .modal-content .content-button button {
    border-radius: 10rem; 
    padding: 0.4rem 1.5rem;
}
/* End of System Message */

/* Badge */
.badge {
    display: inline-block;
    padding: 0.4em 0.8em;
    font-size: 0.75em;
    font-weight: 700;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: 0.375rem;
    transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

a.nav-link .badge {
    font-size: 75%;
    margin-left: 0.5rem;
}
/* End of Badge */

/* Status Indicator */
.status-badge {
    font-size: 0;
    height: 15px;
    width: 15px;
    border-radius: 50%;
    display: block;
    padding: 0;
    justify-self: center;
    box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.15), 3px 4px 8px 0 rgba(0, 0, 0, 0.1);
    transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.tooltip { top: 0; }
/* End of Status Indicator */

/* Expandable Button (display button label on hover) */
.btn-expand {
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    overflow: hidden;
    width: auto;
    border-radius: 999px;
    border: none;
    padding: 0.5rem 1rem;
}

.btn-expand.btn-sm {
    /* padding: 0.25rem 0.55rem; */
    padding: 0.3125rem 0.6125rem;
}

.btn-expand span.expand-text {
    white-space: nowrap;
    padding-left: 0;
    opacity: 0;
    max-width: 0;
    transition: padding-left 0.1s linear 0.4s, opacity 0.5s, max-width 0.5s linear;
}

.btn-expand:hover span.expand-text {
    padding-left: 0.5rem;
    opacity: 1;
    max-width: 100px;
    transition: padding-left 0.1s, opacity 0.5s, max-width 0.5s;
}

.btn-expand:hover span.expand-text.long {
    max-width: 180px;
}
/* End of Expandable Button */

/* The mysterious line that appears on hover - can remove this if uploadCSVfile.css is removed */
.dropdown-toggle:after {
    content: none !important;
}

.upload-btn:hover:before, button:hover:after {
    width: 0 !important;
    background: rbg(var(--primary));
}
/* End of the mysterious line */
