.dark-mode {
    scrollbar-width: thin;
    scrollbar-color: #555 #2c2c2e;
}

    .dark-mode ::-webkit-scrollbar {
        width: 12px;
        height: 12px;
    }

    .dark-mode ::-webkit-scrollbar-track {
        background: #2c2c2e;
    }

    .dark-mode ::-webkit-scrollbar-thumb {
        background-color: #555;
        border-radius: 6px;
        border: 3px solid #2c2c2e;
    }

@media (prefers-color-scheme: dark) {
    body {
        background-color: #1a1a1a;
    }

    #header {
        background-color: #2c2c2e;
        box-shadow: 0px 1px 15px 0px #000;
    }

    #footer {
        background-color: #252525;
        box-shadow: 0px 2px 15px 1px #000;
    }
}

body.dark-mode {
    background-color: #1a1a1a !important;
    color: #dcdcdc !important;
}

.dark-mode th a,
.dark-mode th a:hover {
    color: #dcdcdc !important;
    text-decoration: none !important;
}

.dark-mode #header {
    background-color: #2c2c2e !important;
    box-shadow: 0px 1px 15px 0px #000 !important;
}

.dark-mode #footer {
    background-color: #252525 !important;
    box-shadow: 0px 2px 15px 1px #000 !important;
    color: #888888 !important;
}

    .dark-mode #footer .content {
        color: #888888 !important;
    }

.dark-mode .about h1 {
    color: #f0f0f0 !important;
}

.dark-mode .about p {
    color: #a0a0a0 !important;
}

.dark-mode .about h3 a {
    color: #f0f0f0 !important;
}

.dark-mode .panel,
.dark-mode .panel-default {
    background-color: #2c2c2e !important;
    border-color: #3a3a3c !important;
}

.dark-mode .panel-heading {
    background-color: #3a3a3c !important;
    border-color: #4a4a4c !important;
    color: #f5f5f7 !important;
}

.dark-mode .panel-body {
    background-color: #252525 !important;
    color: #dcdcdc !important;
}

.dark-mode .navbar-default {
    background-color: #2c2c2e !important;
    border-color: #3a3a3c !important;
}

.dark-mode .dropdown-menu {
    background-color: #2c2c2e !important;
    border-color: #3a3a3c !important;
}

    .dark-mode .dropdown-menu > li > a:hover,
    .dark-mode .dropdown-menu > li > a:focus {
        background-color: #3a3a3c !important;
    }

    .dark-mode .dropdown-menu li a {
        color: #ffffff !important;
    }

.dark-mode .divider {
    background-color: #3a3a3c !important;
}

.dark-mode .nav-tabs {
    border-bottom: 1px solid #007aff !important;
}

    .dark-mode .nav-tabs > li > a:hover {
        border-color: #4a4a4c !important;
        border-bottom-color: #007aff !important;
        background-color: #3a3a3c;
    }

    .dark-mode .nav-tabs > li.active > a,
    .dark-mode .nav-tabs > li.active > a:hover,
    .dark-mode .nav-tabs > li.active > a:focus {
        background-color: #252525;
        border-color: #007aff !important;
        color: #ffffff !important;
        border-bottom-color: transparent !important;
    }

.dark-mode .table-hover > tbody > tr:hover {
    background-color: #33373a !important;
}

.dark-mode .table-striped > tbody > tr:nth-of-type(odd) {
    background-color: #28282a !important;
}

.dark-mode .table > thead > tr > th,
.dark-mode .table > tbody > tr > td,
.dark-mode .table > tfoot > tr > th,
.dark-mode .table > tfoot > tr > td {
    border-top-color: #3a3a3c !important;
}

.dark-mode .table-bordered,
.dark-mode .table-bordered > thead > tr > th,
.dark-mode .table-bordered > tbody > tr > td {
    border-color: #3a3a3c !important;
}

.dark-mode .form-control {
    background-color: #3a3a3c !important;
    border-color: #4a4a4c !important;
    color: #f5f5f7 !important;
}

    .dark-mode .form-control[disabled], .dark-mode .form-control[readonly] {
        background-color: #2c2c2e !important;
    }

.dark-mode .modal-content {
    background-color: #2c2c2e !important;
    border-color: #3a3a3c !important;
}

.dark-mode .modal-header {
    border-bottom-color: #3a3a3c !important;
}

.dark-mode .modal-footer {
    border-top-color: #3a3a3c !important;
}

.dark-mode .well {
    background-color: #252525 !important;
    border-color: #3a3a3c !important;
}

.dark-mode pre {
    background-color: #222 !important;
    color: #dcdcdc !important;
    border: 1px solid #4a4a4c !important;
}

.dark-mode .btn-default {
    color: #f5f5f7 !important;
    background-color: #3a3a3c !important;
    border-color: #4a4a4c !important;
}

    .dark-mode .btn-default:hover,
    .dark-mode .btn-default.active {
        background-color: #4a4a4c !important;
        border-color: #5a5a5c !important;
    }

.dark-mode .input-group-addon {
    background-color: #3a3a3c !important;
    border-color: #4a4a4c !important;
}

.dark-mode .stats-panel .stats-item,
.dark-mode .zone-stats-panel .stats-item {
    color: #fff !important;
}

.dark-mode .c3-axis-x text,
.dark-mode .c3-axis-y text,
.dark-mode .c3-legend-item {
    fill: #dcdcdc !important;
}

.dark-mode .c3-grid line {
    stroke: #4a4a4c !important;
}

.dark-mode input[type="datetime-local"] {
    color-scheme: dark;
}

    .dark-mode input[type="datetime-local"]::-webkit-calendar-picker-indicator {
        filter: invert(1);
    }

.dark-mode .pager li > a {
    background-color: #3a3a3c !important;
    border-color: #4a4a4c !important;
}

    .dark-mode .pager li > a:hover {
        background-color: #4a4a4c !important;
    }

.dark-mode .pagination li:not(.active) a {
    color: white;
    background-color: #252525;
    border: 1px solid #337ab7;
}

    .dark-mode .pagination li:not(.active) a:hover {
        background-color: #33373a;
    }

.dark-mode #dpCustomDayWiseStart,
.dark-mode #dpCustomDayWiseEnd,
.dark-mode #txtQueryLogStart,
.dark-mode #txtQueryLogEnd {
    color-scheme: dark;
}

    .dark-mode #dpCustomDayWiseStart::-webkit-calendar-picker-indicator,
    .dark-mode #dpCustomDayWiseEnd::-webkit-calendar-picker-indicator,
    .dark-mode #txtQueryLogStart::-webkit-calendar-picker-indicator,
    .dark-mode #txtQueryLogEnd::-webkit-calendar-picker-indicator {
        filter: invert(1);
    }

.dark-mode .modal-header .close {
    color: #fff;
    text-shadow: 0 1px 0 #3a3a3a;
}

    .dark-mode .modal-header .close:hover,
    .dark-mode .modal-header .close:focus {
        color: #cacaca;
    }

.dark-mode button,
.dark-mode input,
.dark-mode optgroup,
.dark-mode select,
.dark-mode textarea {
    color-scheme: dark;
}

.dark-mode code {
    color: #d44d57;
    background: #252527;
}

.dark-mode .btn-danger {
    color: #fff;
    background-color: #9f2723;
    border-color: #bd4339;
}

    .dark-mode .btn-danger:hover,
    .dark-mode .btn-danger:focus,
    .dark-mode .btn-danger:active,
    .dark-mode .btn-danger.active,
    .dark-mode .btn-danger.active.focus,
    .dark-mode .btn-danger.active:focus,
    .dark-mode .btn-danger.active:hover,
    .dark-mode .btn-danger:active.focus,
    .dark-mode .btn-danger:active:focus,
    .dark-mode .btn-danger:active:hover {
        background-color: #861b18;
        border-color: #a9372d;
    }

.dark-mode .btn-warning {
    color: #fff;
    background-color: #c57a11;
    border-color: #e39431;
}

    .dark-mode .btn-warning:hover,
    .dark-mode .btn-warning:focus,
    .dark-mode .btn-warning:active,
    .dark-mode .btn-warning.active,
    .dark-mode .btn-warning.active.focus,
    .dark-mode .btn-warning.active:focus,
    .dark-mode .btn-warning.active:hover,
    .dark-mode .btn-warning:active.focus,
    .dark-mode .btn-warning:active:focus,
    .dark-mode .btn-warning:active:hover {
        background-color: #a05e0e;
        border-color: #c26b00;
    }

.dark-mode .btn-success {
    color: #fff;
    background-color: #357935;
    border-color: #50934d;
}

    .dark-mode .btn-success:hover,
    .dark-mode .btn-success:focus,
    .dark-mode .btn-success:active,
    .dark-mode .btn-success.active,
    .dark-mode .btn-success.active.focus,
    .dark-mode .btn-success.active:focus,
    .dark-mode .btn-success.active:hover,
    .dark-mode .btn-success:active.focus,
    .dark-mode .btn-success:active:focus,
    .dark-mode .btn-success:active:hover {
        background-color: #236723;
        border-color: #42833f;
    }

.dark-mode .label-danger {
    background-color: #9f2723;
}

.dark-mode .label-warning {
    background-color: #c57a11;
}

.dark-mode .label-success {
    background-color: #357935;
}
