@media (prefers-color-scheme: dark) {
    :root {
        --dm-color: #d0d0d0;
        --dm-bk-color: #1e1e1e;
        --dm-box-border-color: #505050;
        --dm-box-bk-color: #383838;
        --dm-blue-color: #7ba4e0;
        --dm-btn-color: #e0e0e0;
        --dm-link-color: #7ba4e0;
        --seperator-color: #505050;
    }

    body {
        color: var(--dm-color);
        background-color: var(--dm-bk-color);
    }

    a {
        color: var(--dm-link-color);
    }
        a:hover, a:focus {
            color: var(--dm-link-color);
            text-decoration: underline;
            outline: none;
        }

    hr {
        border: none;
        border-top: 1px solid var(--seperator-color);
    }

    .h1, .h2, .h3, .h4, .h5, .h6, h1, h2, h3, h4, h5, h6 {
        color: var(--dm-color);
    }

    .mc-likeLink {
        color: var(--dm-link-color);
    }

    .mc-header {
        border-bottom: 2px solid var(--dm-box-border-color);
    }

    .mc-new-mail {
        color: #fff;
    }

    #toolBar.affix {
        background-color: var(--dm-bk-color);
    }

    .apv-status-wait {
        color: #38bdf8;
    }
    .apv-status-apply {
        color: #10b981;
    }
    .apv-status-apply {
        color: #10b981;
    }
    .apv-status-reject {
        color: #ef4444;
    }
    .apv-status-replaced {
        color: #38bdf8;
    }
    .apv-status-suspended {
        color: #ef4444;
    }
    .apv-status-opened {
        color: #10b981;
    }
    .apv-status-submitted {
        color: var(--dm-color);
    }
    .apv-status-defer {
        color: var(--dm-color);
    }

    .mc7_calendar .nextprev a {
        color: #d0d0d0 !important;
    }

    .mc7_calendar .today {
        background-color: #375a7f;
    }

    .mc7_calendar .appbody {
        background-color: #383838;
    }

    .form-control {
        background-color: var(--dm-bk-color);
        color: var(--dm-color);
        border: 1px solid var(--dm-box-border-color);
    }

    .has-success .form-control, .has-success .form-control:focus {
        border-color: var(--dm-blue-color);
    }

    .table > thead > tr > th {
        border-bottom: 2px solid var(--dm-box-border-color);
    }
    .table > thead > tr > th,
    .table > tbody > tr > th,
    .table > tfoot > tr > th,
    .table > thead > tr > td,
    .table > tbody > tr > td,
    .table > tfoot > tr > td {
        border-top: 1px solid var(--dm-box-border-color);
    }
    .table-hover > tbody > tr:hover {
        background-color: var(--dm-box-bk-color);
    }
    .table-bordered {
        border: 1px solid var(--dm-box-border-color);
    }
        .table-bordered > tbody > tr > td, .table-bordered > tbody > tr > th, .table-bordered > tfoot > tr > td, .table-bordered > tfoot > tr > th, .table-bordered > thead > tr > td, .table-bordered > thead > tr > th {
            border: 1px solid var(--dm-box-border-color);
        }
    .table-striped > tbody > tr:nth-of-type(odd) {
        background-color: #383838;
    }

    .k-treeview {
        color: var(--dm-color);
        background-color: var(--dm-bk-color);
    }
    .k-treeview-leaf.k-selected {
        border-color: var(--dm-box-border-color);
        color: var(--dm-color);
        background-color: var(--dm-box-bk-color);
    }

    .label {
        color: var(--dm-color);
    }
    .label-default {
        background-color: var(--dm-box-bk-color);
    }
    .label-info {
        background-color: var(--dm-box-border-color);
    }

    .k-checkbox:checked, .k-checkbox.k-checked {
        border-color: var(--dm-blue-color);
        color: var(--dm-color);
        background-color: var(--dm-blue-color);
    }

    .modal-content {
        background-color: var(--dm-box-bk-color);
        border: 1px solid var(--dm-box-border-color);
    }

    .modal-header {
        border-bottom: 1px solid var(--dm-box-border-color);
    }

    .modal-footer {
        border-top: 1px solid var(--dm-box-border-color);
    }

    .dropdown-menu {
        border: 1px solid var(--dm-box-border-color);
        background-color: var(--dm-bk-color);
    }
        .dropdown-menu > li > a {
            color: var(--dm-color);
        }
            .dropdown-menu > li > a:hover, .dropdown-menu > li > a:focus {
                color: var(--dm-color);
                background-color: var(--dm-box-bk-color);
            }

    .panel {
        background-color: var(--dm-bk-color);
    }
    .panel-body {
        background-color: var(--dm-bk-color);
    }
    .panel-heading {
        border-bottom: 1px solid transparent;
    }
    .panel-footer {
        background-color: var(--dm-box-bk-color);
        border-top: 1px solid var(--dm-box-bk-color);
    }
    .panel-default {
        border-color: var(--dm-box-border-color);
    }
        .panel-default > .panel-heading {
            color: var(--dm-color);
            background-color: var(--dm-box-bk-color);
            border-color: var(--dm-box-border-color);
        }
            .panel-default > .panel-heading + .panel-collapse > .panel-body {
                border-top-color: var(--dm-box-border-color);
            }
            .panel-default > .panel-heading .badge {
                color: #303030;
                background-color: #ffffff;
            }
        .panel-default > .panel-footer + .panel-collapse > .panel-body {
            border-bottom-color: var(--dm-box-border-color);
        }

    .well {
        background-color: var(--dm-box-bk-color);
        border: 1px solid transparent;
    }
        .well blockquote {
            border-color: #ddd;
            border-color: rgba(0, 0, 0, 0.15);
        }

    .k-upload .k-dropzone, .k-upload .k-upload-dropzone {
        border-color: var(--dm-box-border-color);
        color: var(--dm-color);
        background-color: var(--dm-box-bk-color);
    }

    a.list-group-item, button.list-group-item {
        color: var(--dm-color);
    }
    .list-group-item {
        background-color: var(--dm-bk-color);
        border: 1px solid var(--dm-box-border-color);
    }

    .btn-default {
        color: var(--dm-btn-color);
        background-color: #464545;
        border-color: #464545;
    }
        .btn-default:focus,
        .btn-default.focus {
            color: var(--dm-btn-color);
            background-color: #2c2c2c;
            border-color: #060606;
        }
        .btn-default:hover {
            color: var(--dm-btn-color);
            background-color: #2c2c2c;
            border-color: #272727;
        }
        .btn-default:active,
        .btn-default.active,
        .open > .dropdown-toggle.btn-default {
            color: var(--dm-btn-color);
            background-color: #2c2c2c;
            background-image: none;
            border-color: #272727;
        }
            .btn-default:active:hover,
            .btn-default.active:hover,
            .open > .dropdown-toggle.btn-default:hover,
            .btn-default:active:focus,
            .btn-default.active:focus,
            .open > .dropdown-toggle.btn-default:focus,
            .btn-default:active.focus,
            .btn-default.active.focus,
            .open > .dropdown-toggle.btn-default.focus {
                color: var(--dm-btn-color);
                background-color: #1a1a1a;
                border-color: #060606;
            }
        .btn-default.disabled:hover,
        .btn-default[disabled]:hover,
        fieldset[disabled] .btn-default:hover,
        .btn-default.disabled:focus,
        .btn-default[disabled]:focus,
        fieldset[disabled] .btn-default:focus,
        .btn-default.disabled.focus,
        .btn-default[disabled].focus,
        fieldset[disabled] .btn-default.focus {
            background-color: #464545;
            border-color: #464545;
        }
        .btn-default .badge {
            color: #464545;
            background-color: #ffffff;
        }

    .btn-primary {
        color: var(--dm-btn-color);
        background-color: #375a7f;
        border-color: #375a7f;
    }
        .btn-primary:focus,
        .btn-primary.focus {
            color: var(--dm-btn-color);
            background-color: #28415b;
            border-color: #101b26;
        }
        .btn-primary:hover {
            color: var(--dm-btn-color);
            background-color: #28415b;
            border-color: #253c54;
        }
        .btn-primary:active,
        .btn-primary.active,
        .open > .dropdown-toggle.btn-primary {
            color: var(--dm-btn-color);
            background-color: #28415b;
            background-image: none;
            border-color: #253c54;
        }
            .btn-primary:active:hover,
            .btn-primary.active:hover,
            .open > .dropdown-toggle.btn-primary:hover,
            .btn-primary:active:focus,
            .btn-primary.active:focus,
            .open > .dropdown-toggle.btn-primary:focus,
            .btn-primary:active.focus,
            .btn-primary.active.focus,
            .open > .dropdown-toggle.btn-primary.focus {
                color: var(--dm-btn-color);
                background-color: #1d2f43;
                border-color: #101b26;
            }
        .btn-primary.disabled:hover,
        .btn-primary[disabled]:hover,
        fieldset[disabled] .btn-primary:hover,
        .btn-primary.disabled:focus,
        .btn-primary[disabled]:focus,
        fieldset[disabled] .btn-primary:focus,
        .btn-primary.disabled.focus,
        .btn-primary[disabled].focus,
        fieldset[disabled] .btn-primary.focus {
            background-color: #375a7f;
            border-color: #375a7f;
        }
        .btn-primary .badge {
            color: #375a7f;
            background-color: #ffffff;
        }

    .btn-success {
        color: var(--dm-btn-color);
        background-color: #00bc8c;
        border-color: #00bc8c;
    }
        .btn-success:focus,
        .btn-success.focus {
            color: var(--dm-btn-color);
            background-color: #008966;
            border-color: #003d2d;
        }
        .btn-success:hover {
            color: var(--dm-btn-color);
            background-color: #008966;
            border-color: #007f5e;
        }
        .btn-success:active,
        .btn-success.active,
        .open > .dropdown-toggle.btn-success {
            color: var(--dm-btn-color);
            background-color: #008966;
            background-image: none;
            border-color: #007f5e;
        }
            .btn-success:active:hover,
            .btn-success.active:hover,
            .open > .dropdown-toggle.btn-success:hover,
            .btn-success:active:focus,
            .btn-success.active:focus,
            .open > .dropdown-toggle.btn-success:focus,
            .btn-success:active.focus,
            .btn-success.active.focus,
            .open > .dropdown-toggle.btn-success.focus {
                color: var(--dm-btn-color);
                background-color: #00654b;
                border-color: #003d2d;
            }
        .btn-success.disabled:hover,
        .btn-success[disabled]:hover,
        fieldset[disabled] .btn-success:hover,
        .btn-success.disabled:focus,
        .btn-success[disabled]:focus,
        fieldset[disabled] .btn-success:focus,
        .btn-success.disabled.focus,
        .btn-success[disabled].focus,
        fieldset[disabled] .btn-success.focus {
            background-color: #00bc8c;
            border-color: #00bc8c;
        }
        .btn-success .badge {
            color: #00bc8c;
            background-color: #ffffff;
        }

    .btn-info {
        color: var(--dm-btn-color);
        background-color: #3498db;
        border-color: #3498db;
    }
        .btn-info:focus,
        .btn-info.focus {
            color: var(--dm-btn-color);
            background-color: #217dbb;
            border-color: #16527a;
        }
        .btn-info:hover {
            color: var(--dm-btn-color);
            background-color: #217dbb;
            border-color: #2077b2;
        }
        .btn-info:active,
        .btn-info.active,
        .open > .dropdown-toggle.btn-info {
            color: var(--dm-btn-color);
            background-color: #217dbb;
            background-image: none;
            border-color: #2077b2;
        }
            .btn-info:active:hover,
            .btn-info.active:hover,
            .open > .dropdown-toggle.btn-info:hover,
            .btn-info:active:focus,
            .btn-info.active:focus,
            .open > .dropdown-toggle.btn-info:focus,
            .btn-info:active.focus,
            .btn-info.active.focus,
            .open > .dropdown-toggle.btn-info.focus {
                color: var(--dm-btn-color);
                background-color: #1c699d;
                border-color: #16527a;
            }
        .btn-info.disabled:hover,
        .btn-info[disabled]:hover,
        fieldset[disabled] .btn-info:hover,
        .btn-info.disabled:focus,
        .btn-info[disabled]:focus,
        fieldset[disabled] .btn-info:focus,
        .btn-info.disabled.focus,
        .btn-info[disabled].focus,
        fieldset[disabled] .btn-info.focus {
            background-color: #3498db;
            border-color: #3498db;
        }
        .btn-info .badge {
            color: #3498db;
            background-color: #ffffff;
        }

    .btn-warning {
        color: var(--dm-btn-color);
        background-color: #f39c12;
        border-color: #f39c12;
    }
        .btn-warning:focus,
        .btn-warning.focus {
            color: var(--dm-btn-color);
            background-color: #c87f0a;
            border-color: #7f5006;
        }
        .btn-warning:hover {
            color: var(--dm-btn-color);
            background-color: #c87f0a;
            border-color: #be780a;
        }
        .btn-warning:active,
        .btn-warning.active,
        .open > .dropdown-toggle.btn-warning {
            color: var(--dm-btn-color);
            background-color: #c87f0a;
            background-image: none;
            border-color: #be780a;
        }
            .btn-warning:active:hover,
            .btn-warning.active:hover,
            .open > .dropdown-toggle.btn-warning:hover,
            .btn-warning:active:focus,
            .btn-warning.active:focus,
            .open > .dropdown-toggle.btn-warning:focus,
            .btn-warning:active.focus,
            .btn-warning.active.focus,
            .open > .dropdown-toggle.btn-warning.focus {
                color: var(--dm-btn-color);
                background-color: #a66908;
                border-color: #7f5006;
            }
        .btn-warning.disabled:hover,
        .btn-warning[disabled]:hover,
        fieldset[disabled] .btn-warning:hover,
        .btn-warning.disabled:focus,
        .btn-warning[disabled]:focus,
        fieldset[disabled] .btn-warning:focus,
        .btn-warning.disabled.focus,
        .btn-warning[disabled].focus,
        fieldset[disabled] .btn-warning.focus {
            background-color: #f39c12;
            border-color: #f39c12;
        }
        .btn-warning .badge {
            color: #f39c12;
            background-color: #ffffff;
        }

    .btn-danger {
        color: var(--dm-btn-color);
        background-color: #e74c3c;
        border-color: #e74c3c;
    }
        .btn-danger:focus,
        .btn-danger.focus {
            color: var(--dm-btn-color);
            background-color: #d62c1a;
            border-color: #921e12;
        }
        .btn-danger:hover {
            color: var(--dm-btn-color);
            background-color: #d62c1a;
            border-color: #cd2a19;
        }
        .btn-danger:active,
        .btn-danger.active,
        .open > .dropdown-toggle.btn-danger {
            color: var(--dm-btn-color);
            background-color: #d62c1a;
            background-image: none;
            border-color: #cd2a19;
        }
            .btn-danger:active:hover,
            .btn-danger.active:hover,
            .open > .dropdown-toggle.btn-danger:hover,
            .btn-danger:active:focus,
            .btn-danger.active:focus,
            .open > .dropdown-toggle.btn-danger:focus,
            .btn-danger:active.focus,
            .btn-danger.active.focus,
            .open > .dropdown-toggle.btn-danger.focus {
                color: var(--dm-btn-color);
                background-color: #b62516;
                border-color: #921e12;
            }
        .btn-danger.disabled:hover,
        .btn-danger[disabled]:hover,
        fieldset[disabled] .btn-danger:hover,
        .btn-danger.disabled:focus,
        .btn-danger[disabled]:focus,
        fieldset[disabled] .btn-danger:focus,
        .btn-danger.disabled.focus,
        .btn-danger[disabled].focus,
        fieldset[disabled] .btn-danger.focus {
            background-color: #e74c3c;
            border-color: #e74c3c;
        }
        .btn-danger .badge {
            color: #e74c3c;
            background-color: #ffffff;
        }

    .alert-info {
        color: #ffffff;
        background-color: #3498db;
        border-color: #3498db;
    }
        .alert-info hr {
            border-top-color: #258cd1;
        }
        .alert-info .alert-link {
            color: #e6e6e6;
        }

    .alert-warning {
        color: #ffffff;
        background-color: #f39c12;
        border-color: #f39c12;
    }
        .alert-warning hr {
            border-top-color: #e08e0b;
        }
        .alert-warning .alert-link {
            color: #e6e6e6;
        }

    .alert-danger {
        color: #ffffff;
        background-color: #e74c3c;
        border-color: #e74c3c;
    }
        .alert-danger hr {
            border-top-color: #e43725;
        }
        .alert-danger .alert-link {
            color: #e6e6e6;
        }
}
