html[data-theme="dark"] {
    --mikan-bg-body: #1a1d21;
    --mikan-bg-surface: #252830;
    --mikan-bg-elevated: #2b3038;
    --mikan-bg-hover: #353b46;
    --mikan-border: #3a3f4b;
    --mikan-border-input: #4a5160;
    --mikan-text-primary: #e8eaed;
    --mikan-text-heading: #f0f2f5;
    --mikan-text-muted: #9aa0a8;
    --mikan-link: #7eb8ff;
    --mikan-link-hover: #a8d4ff;
    --mikan-accent: #6b9bd1;
}

html[data-theme="dark"] body {
    background-color: var(--mikan-bg-body);
    color: var(--mikan-text-primary);
}

html[data-theme="dark"] a {
    color: var(--mikan-link);
}

html[data-theme="dark"] a:hover,
html[data-theme="dark"] a:focus {
    color: var(--mikan-link-hover);
}

html[data-theme="dark"] h1,
html[data-theme="dark"] h2,
html[data-theme="dark"] h3,
html[data-theme="dark"] h4,
html[data-theme="dark"] h5,
html[data-theme="dark"] h6 {
    color: var(--mikan-text-heading);
}

html[data-theme="dark"] .text-muted {
    color: var(--mikan-text-muted) !important;
}

html[data-theme="dark"] .navbar.navbar-default {
    background-color: var(--mikan-bg-surface) !important;
    border-color: var(--mikan-border);
}

html[data-theme="dark"] .navbar-default .navbar-brand,
html[data-theme="dark"] .navbar-default .navbar-nav .nav-link {
    color: var(--mikan-text-primary) !important;
}

html[data-theme="dark"] .navbar-default .navbar-nav .nav-link:hover,
html[data-theme="dark"] .navbar-default .navbar-nav .nav-link:focus {
    color: #fff !important;
}

html[data-theme="dark"] .dropdown-menu {
    background-color: var(--mikan-bg-elevated);
    border-color: var(--mikan-border);
}

html[data-theme="dark"] .dropdown-item {
    color: var(--mikan-text-primary) !important;
}

html[data-theme="dark"] .dropdown-item:hover,
html[data-theme="dark"] .dropdown-item:focus {
    background-color: var(--mikan-bg-hover);
    color: #fff !important;
}

html[data-theme="dark"] .dropdown-divider {
    border-top-color: var(--mikan-border);
}

html[data-theme="dark"] .table {
    color: var(--mikan-text-primary);
    background-color: transparent;
}

html[data-theme="dark"] .table thead th {
    background-color: var(--mikan-bg-elevated);
    border-bottom-color: var(--mikan-border);
    color: var(--mikan-text-heading);
}

html[data-theme="dark"] .table td,
html[data-theme="dark"] .table th {
    border-top-color: var(--mikan-border);
}

html[data-theme="dark"] .table-bordered {
    border-color: var(--mikan-border);
}

html[data-theme="dark"] .table-bordered th,
html[data-theme="dark"] .table-bordered td {
    border-color: var(--mikan-border);
}

html[data-theme="dark"] .table-bordered thead th,
html[data-theme="dark"] .table-bordered thead td {
    border-bottom-color: var(--mikan-border);
}

html[data-theme="dark"] .table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(255, 255, 255, 0.04);
}

html[data-theme="dark"] .table-hover tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.08);
    color: var(--mikan-text-primary);
}

html[data-theme="dark"] .table-hover .table-primary:hover,
html[data-theme="dark"] .table-hover .table-primary:hover > td,
html[data-theme="dark"] .table-hover .table-primary:hover > th {
    background-color: rgba(233, 84, 32, 0.25);
    color: var(--mikan-text-primary);
}

html[data-theme="dark"] .table-fixed-header thead {
    background-color: var(--mikan-bg-elevated);
    box-shadow: 0 2px 2px -1px rgba(0, 0, 0, 0.6);
}

html[data-theme="dark"] .form-control {
    background-color: var(--mikan-bg-elevated);
    border-color: var(--mikan-border-input);
    color: var(--mikan-text-primary);
}

html[data-theme="dark"] .form-control:focus {
    background-color: #323844;
    border-color: var(--mikan-accent);
    color: #fff;
    box-shadow: 0 0 0 0.2rem rgba(107, 155, 209, 0.25);
}

html[data-theme="dark"] .form-control:disabled,
html[data-theme="dark"] .form-control[readonly] {
    background-color: #23272e;
    color: var(--mikan-text-muted);
}

html[data-theme="dark"] select.form-control option {
    background-color: var(--mikan-bg-elevated);
    color: var(--mikan-text-primary);
}

html[data-theme="dark"] input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]):not([type="reset"]),
html[data-theme="dark"] textarea,
html[data-theme="dark"] select {
    background-color: var(--mikan-bg-elevated);
    border: 1px solid var(--mikan-border-input);
    color: var(--mikan-text-primary);
}

html[data-theme="dark"] input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]):not([type="reset"]):focus,
html[data-theme="dark"] textarea:focus,
html[data-theme="dark"] select:focus {
    background-color: #323844;
    border-color: var(--mikan-accent);
    color: #fff;
    outline: none;
    box-shadow: 0 0 0 0.2rem rgba(107, 155, 209, 0.25);
}

html[data-theme="dark"] .form-check-input {
    accent-color: var(--mikan-accent);
}

html[data-theme="dark"] label,
html[data-theme="dark"] .custom-control-label {
    color: var(--mikan-text-primary);
}

html[data-theme="dark"] .card {
    background-color: var(--mikan-bg-surface);
    border-color: var(--mikan-border);
    color: var(--mikan-text-primary);
}

html[data-theme="dark"] .card-header {
    background-color: var(--mikan-bg-elevated);
    border-bottom-color: var(--mikan-border);
    color: var(--mikan-text-heading);
}

html[data-theme="dark"] .card-body {
    background-color: var(--mikan-bg-surface);
}

html[data-theme="dark"] .card-info > .card-header {
    color: #b8d4e8;
    background-color: #1e3a4f;
    border-color: #2d5a78;
}

html[data-theme="dark"] .card-primary > .card-header,
html[data-theme="dark"] .card-danger > .card-header {
    color: #fff;
    background-color: #c34113;
    border-color: #b73d12;
}

html[data-theme="dark"] .card-success > .card-header {
    color: #b8dfc4;
    background-color: #1e3d2a;
    border-color: #2d5c3f;
}

html[data-theme="dark"] .card-warning > .card-header {
    color: #f0d9a8;
    background-color: #4a3f1a;
    border-color: #6b5c2a;
}

html[data-theme="dark"] .card-default > .card-header {
    color: var(--mikan-text-heading);
    background-color: var(--mikan-bg-hover);
    border-color: var(--mikan-border);
}

html[data-theme="dark"] .modal-content {
    background-color: var(--mikan-bg-surface);
    border-color: var(--mikan-border);
    color: var(--mikan-text-primary);
}

html[data-theme="dark"] .modal-header,
html[data-theme="dark"] .modal-footer {
    border-color: var(--mikan-border);
}

html[data-theme="dark"] .close {
    color: var(--mikan-text-primary);
    text-shadow: none;
    opacity: 0.8;
}

html[data-theme="dark"] .alert-info {
    color: #b8d4e8;
    background-color: #1e3a4f;
    border-color: #2d5a78;
}

html[data-theme="dark"] .alert-danger {
    color: #f5c6cb;
    background-color: #4a2328;
    border-color: #6b333a;
}

html[data-theme="dark"] .alert-success {
    color: #b8dfc4;
    background-color: #1e3d2a;
    border-color: #2d5c3f;
}

html[data-theme="dark"] .alert-warning {
    color: #f0d9a8;
    background-color: #4a3f1a;
    border-color: #6b5c2a;
}

html[data-theme="dark"] .alert-secondary {
    color: var(--mikan-text-primary);
    background-color: var(--mikan-bg-elevated);
    border-color: var(--mikan-border);
}

html[data-theme="dark"] .alert-secondary .alert-link {
    color: var(--mikan-link);
}

html[data-theme="dark"] .breadcrumb {
    background-color: var(--mikan-bg-elevated);
}

html[data-theme="dark"] .breadcrumb-item,
html[data-theme="dark"] .breadcrumb-item.active {
    color: var(--mikan-text-muted);
}

html[data-theme="dark"] .breadcrumb-item a {
    color: var(--mikan-link);
}

html[data-theme="dark"] .breadcrumb-item a:hover,
html[data-theme="dark"] .breadcrumb-item a:focus {
    color: var(--mikan-link-hover);
}

html[data-theme="dark"] .breadcrumb-item + .breadcrumb-item::before {
    color: var(--mikan-text-muted);
}

html[data-theme="dark"] .btn-default,
html[data-theme="dark"] .btn-secondary {
    background-color: #3a3f4b !important;
    border-color: #4a5160 !important;
    color: #e8eaed !important;
}

html[data-theme="dark"] .btn-default:hover,
html[data-theme="dark"] .btn-default:focus,
html[data-theme="dark"] .btn-secondary:hover,
html[data-theme="dark"] .btn-secondary:focus {
    background-color: #4a5160 !important;
    border-color: #5a6170 !important;
    color: #fff !important;
}

html[data-theme="dark"] .btn-light {
    background-color: #3a3f4b;
    border-color: #4a5160;
    color: #e8eaed;
}

html[data-theme="dark"] .btn-light:hover,
html[data-theme="dark"] .btn-light:focus {
    background-color: #4a5160;
    border-color: #5a6170;
    color: #fff;
}

html[data-theme="dark"] .btn-primary {
    background-color: #c34113;
    border-color: #b73d12;
    color: #fff !important;
}

html[data-theme="dark"] .btn-primary:hover,
html[data-theme="dark"] .btn-primary:focus {
    background-color: #a83810;
    border-color: #9e3410;
    color: #fff !important;
}

html[data-theme="dark"] .btn-success {
    background-color: #2c8d3a;
    border-color: #298336;
    color: #fff !important;
}

html[data-theme="dark"] .btn-success:hover,
html[data-theme="dark"] .btn-success:focus {
    background-color: #247832;
    border-color: #216e2e;
    color: #fff !important;
}

html[data-theme="dark"] .btn-danger {
    background-color: #a82824;
    border-color: #9c2420;
    color: #fff;
}

html[data-theme="dark"] .btn-danger:hover,
html[data-theme="dark"] .btn-danger:focus {
    background-color: #922220;
    border-color: #861f1c;
    color: #fff;
}

html[data-theme="dark"] .btn-warning {
    background-color: #b8860b;
    border-color: #a67a0a;
    color: #1a1d21;
}

html[data-theme="dark"] .btn-warning:hover,
html[data-theme="dark"] .btn-warning:focus {
    background-color: #9a7209;
    border-color: #8c6808;
    color: #1a1d21;
}

html[data-theme="dark"] .btn-info {
    background-color: #2d6a8a;
    border-color: #285f7c;
    color: #fff;
}

html[data-theme="dark"] .btn-info:hover,
html[data-theme="dark"] .btn-info:focus {
    background-color: #255a75;
    border-color: #215068;
    color: #fff;
}

html[data-theme="dark"] .btn-link {
    color: var(--mikan-link);
}

html[data-theme="dark"] .btn-link:hover,
html[data-theme="dark"] .btn-link:focus {
    color: var(--mikan-link-hover);
}

html[data-theme="dark"] .page-link {
    background-color: var(--mikan-bg-elevated);
    border-color: var(--mikan-border);
    color: var(--mikan-link);
}

html[data-theme="dark"] .page-link:hover {
    background-color: var(--mikan-bg-hover);
    border-color: var(--mikan-border-input);
    color: var(--mikan-link-hover);
}

html[data-theme="dark"] .page-item.active .page-link {
    background-color: var(--mikan-accent);
    border-color: var(--mikan-accent);
    color: #fff;
}

html[data-theme="dark"] .page-item.disabled .page-link {
    background-color: var(--mikan-bg-surface);
    border-color: var(--mikan-border);
    color: var(--mikan-text-muted);
}

html[data-theme="dark"] .list-group-item {
    background-color: var(--mikan-bg-surface);
    border-color: var(--mikan-border);
    color: var(--mikan-text-primary);
}

html[data-theme="dark"] .list-group-item-action:hover,
html[data-theme="dark"] .list-group-item-action:focus {
    background-color: var(--mikan-bg-hover);
    color: var(--mikan-text-primary);
}

html[data-theme="dark"] .badge-light {
    background-color: var(--mikan-bg-hover);
    color: var(--mikan-text-primary);
}

html[data-theme="dark"] .ui-widget-content,
html[data-theme="dark"] .ui-datepicker {
    background: var(--mikan-bg-elevated);
    border-color: var(--mikan-border);
    color: var(--mikan-text-primary);
}

html[data-theme="dark"] .ui-state-default,
html[data-theme="dark"] .ui-widget-content .ui-state-default {
    background: var(--mikan-bg-hover);
    border-color: var(--mikan-border-input);
    color: var(--mikan-text-primary);
}

html[data-theme="dark"] .ui-state-hover,
html[data-theme="dark"] .ui-widget-content .ui-state-hover {
    background: #404856;
    border-color: var(--mikan-accent);
    color: #fff;
}

html[data-theme="dark"] .ui-state-active,
html[data-theme="dark"] .ui-widget-content .ui-state-active {
    background: #4a6fa5;
    border-color: var(--mikan-accent);
    color: #fff;
}

html[data-theme="dark"] ul.sort-programm li {
    background-color: var(--mikan-bg-elevated);
    border-color: var(--mikan-border-input);
    color: var(--mikan-text-primary);
}

html[data-theme="dark"] ul.sort-programm li.selected {
    background-color: #4a3f1a;
    color: var(--mikan-text-primary);
}

html[data-theme="dark"] .nav-tabs {
    border-bottom-color: var(--mikan-border);
}

html[data-theme="dark"] .nav-tabs .nav-link {
    color: var(--mikan-text-muted);
    border-color: transparent;
}

html[data-theme="dark"] .nav-tabs .nav-link:hover,
html[data-theme="dark"] .nav-tabs .nav-link:focus {
    border-color: var(--mikan-border);
    color: var(--mikan-text-primary);
}

html[data-theme="dark"] .nav-tabs .nav-link.active {
    background-color: var(--mikan-bg-surface);
    border-color: var(--mikan-border) var(--mikan-border) var(--mikan-bg-surface);
    color: var(--mikan-text-heading);
}

html[data-theme="dark"] footer a {
    color: var(--mikan-text-muted);
}

html[data-theme="dark"] .site-theme-toggle {
    cursor: pointer;
    border: 0;
    background: transparent;
    padding: 0.5rem 0.75rem;
}

html[data-theme="dark"] .site-theme-toggle:hover {
    color: #fff !important;
}

@media print {
    html[data-theme="dark"] body,
    html[data-theme="dark"] .card,
    html[data-theme="dark"] .card-body,
    html[data-theme="dark"] .table {
        background: #fff !important;
        color: #000 !important;
    }
}
