/* Office4Trade theme overrides. The light theme remains the default. */
html[data-theme="light"] { color-scheme: light; }
html[data-theme="light"] .content-wrapper { background-color: #fff; }
html[data-theme="light"] .sales-dashboard { --sd-border: #d6dbe0; }
html[data-theme="light"] .card,
html[data-theme="light"] .info-box,
html[data-theme="light"] .small-box { border: 1px solid #d6dbe0; }
html[data-theme="light"] .content-wrapper a.btn-app {
    color: #343a40;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
}
html[data-theme="light"] .content-wrapper a.btn-app:hover,
html[data-theme="light"] .content-wrapper a.btn-app:focus {
    color: #212529;
    background-color: #e9ecef;
    border-color: #c6ccd2;
}

html[data-theme="dark"] {
    color-scheme: dark;
    --o4t-bg: #171b22;
    --o4t-surface: #222832;
    --o4t-surface-raised: #2b333f;
    --o4t-border: #3b4552;
    --o4t-text: #e6eaf0;
    --o4t-muted: #aab4c2;
    --o4t-link: #fff;
}

html[data-theme="dark"] body,
html[data-theme="dark"] .main-footer {
    color: var(--o4t-text);
    background-color: var(--o4t-bg);
}

html[data-theme="dark"] .login-page {
    color: var(--o4t-text);
    background-color: #343a40;
}

/* Match the AdminLTE dark sidebar background. */
html[data-theme="dark"] .content-wrapper { background-color: #343a40; }

/* The statistics dashboard declares its own card colors in the template. */
html[data-theme="dark"] .sales-dashboard {
    --sd-ink: #f1f3f5;
    --sd-muted: #c2c8ce;
    --sd-border: var(--o4t-border);
    --sd-white: var(--o4t-surface);
    color: var(--sd-ink);
}

html[data-theme="dark"] .content-wrapper .btn-default {
    color: #f1f3f5;
    background-color: #343a40;
    border-color: #515a63;
}

html[data-theme="dark"] .content-wrapper a.btn-app {
    color: var(--o4t-text);
    background-color: var(--o4t-surface);
    border: 1px solid var(--o4t-border);
    box-shadow: 0 1px 3px rgba(0, 0, 0, .35);
}
html[data-theme="dark"] .content-wrapper a.btn-app:hover,
html[data-theme="dark"] .content-wrapper a.btn-app:focus {
    color: #fff;
    background-color: var(--o4t-surface-raised);
    border-color: #69737d;
}

html[data-theme="dark"] .content-wrapper .btn-default:hover,
html[data-theme="dark"] .content-wrapper .btn-default:focus {
    color: #fff;
    background-color: #454d55;
    border-color: #69737d;
}

html[data-theme="dark"] .sales-dashboard .sd-tabs .nav-link {
    color: #c2c8ce;
    background-color: #2b3035;
    border-color: #515a63;
}

html[data-theme="dark"] .sales-dashboard .sd-tabs .nav-link:hover,
html[data-theme="dark"] .sales-dashboard .sd-tabs .nav-link:focus {
    color: #fff;
    background-color: #454d55;
    border-color: #69737d;
}

html[data-theme="dark"] .sales-dashboard .sd-tabs .nav-link.active {
    color: #fff;
    background-color: #343a40;
    border-color: #515a63 #515a63 #343a40;
}

html[data-theme="dark"] .main-header,
html[data-theme="dark"] .navbar-white,
html[data-theme="dark"] .card,
html[data-theme="dark"] .info-box,
html[data-theme="dark"] .small-box,
html[data-theme="dark"] .dropdown-menu,
html[data-theme="dark"] .modal-content,
html[data-theme="dark"] .popover,
html[data-theme="dark"] .note-editor,
html[data-theme="dark"] .note-toolbar,
html[data-theme="dark"] .note-statusbar {
    color: var(--o4t-text);
    background-color: var(--o4t-surface);
    border-color: var(--o4t-border);
}

html[data-theme="dark"] .tour-card {
    color: var(--o4t-text);
    background-color: var(--o4t-surface);
    border: 1px solid var(--o4t-border);
    box-shadow: 0 .75rem 2.5rem rgba(0, 0, 0, .5);
}

html[data-theme="dark"] .tour-progress { color: var(--o4t-muted); }
html[data-theme="dark"] .tour-card .tour-close { color: var(--o4t-text); }
html[data-theme="dark"] .tour-card .btn-outline-secondary {
    color: var(--o4t-text);
    border-color: var(--o4t-border);
}
html[data-theme="dark"] .tour-card .btn-outline-secondary:hover,
html[data-theme="dark"] .tour-card .btn-outline-secondary:focus {
    color: #fff;
    background-color: var(--o4t-surface-raised);
}

html[data-theme="dark"] .notify-toast {
    color: var(--o4t-text);
    background-color: var(--o4t-surface);
    border: 1px solid var(--o4t-border);
    box-shadow: 0 4px 14px rgba(0, 0, 0, .45);
}

html[data-theme="dark"] .card,
html[data-theme="dark"] .info-box,
html[data-theme="dark"] .small-box { border: 1px solid var(--o4t-border); }

html[data-theme="dark"] .navbar-light .navbar-nav .nav-link,
html[data-theme="dark"] .card-title,
html[data-theme="dark"] label,
html[data-theme="dark"] .breadcrumb-item,
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(--o4t-text);
}

html[data-theme="dark"] .navbar-white.navbar-light .form-control-navbar,
html[data-theme="dark"] .navbar-white.navbar-light .form-control-navbar + .input-group-append > .btn-navbar,
html[data-theme="dark"] .navbar-white.navbar-light .form-control-navbar:focus,
html[data-theme="dark"] .navbar-white.navbar-light .form-control-navbar:focus + .input-group-append .btn-navbar {
    color: var(--o4t-text) !important;
    background-color: var(--o4t-surface-raised) !important;
    border-color: var(--o4t-border) !important;
}

html[data-theme="dark"] .navbar-white.navbar-light .form-control-navbar + .input-group-append > .btn-navbar:hover {
    color: #fff !important;
    background-color: #454d55 !important;
}

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

html[data-theme="dark"] a { color: var(--o4t-link); }
html[data-theme="dark"] a:hover { color: #e2e6ea; }

html[data-theme="dark"] .form-control,
html[data-theme="dark"] .custom-select,
html[data-theme="dark"] .custom-file-label,
html[data-theme="dark"] .input-group-text,
html[data-theme="dark"] .dt-input,
html[data-theme="dark"] select,
html[data-theme="dark"] textarea,
html[data-theme="dark"] input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]) {
    color: var(--o4t-text);
    background-color: var(--o4t-surface-raised);
    border-color: var(--o4t-border);
}

html[data-theme="dark"] .form-control::placeholder,
html[data-theme="dark"] input::placeholder,
html[data-theme="dark"] textarea::placeholder { color: #9aa6b5; }

html[data-theme="dark"] .table,
html[data-theme="dark"] table.dataTable,
html[data-theme="dark"] table.dataTable thead th,
html[data-theme="dark"] table.dataTable tbody td {
    color: var(--o4t-text);
    border-color: var(--o4t-border);
}

html[data-theme="dark"] .table thead th,
html[data-theme="dark"] table.dataTable thead th { background-color: var(--o4t-surface-raised); }
html[data-theme="dark"] .table-striped tbody tr:nth-of-type(odd),
html[data-theme="dark"] tr.even { background-color: rgba(255,255,255,.035); }
html[data-theme="dark"] .table-hover tbody tr:hover { color: var(--o4t-text); background-color: rgba(255,255,255,.075); }
html[data-theme="dark"] .dt-paging .dt-paging-button,
html[data-theme="dark"] .dataTables_paginate .paginate_button {
    color: var(--o4t-text) !important;
    background: var(--o4t-surface) !important;
    border-color: var(--o4t-border) !important;
}
html[data-theme="dark"] .dt-paging .dt-paging-button:hover,
html[data-theme="dark"] .dataTables_paginate .paginate_button:hover {
    color: #fff !important;
    background: var(--o4t-surface-raised) !important;
    border-color: #69737d !important;
}
html[data-theme="dark"] .dt-paging .dt-paging-button.current,
html[data-theme="dark"] .dataTables_paginate .paginate_button.current {
    color: #fff !important;
    background: #343a40 !important;
    border-color: #69737d !important;
}
html[data-theme="dark"] .dt-paging .dt-paging-button.disabled,
html[data-theme="dark"] .dataTables_paginate .paginate_button.disabled {
    color: #929ba5 !important;
    background: var(--o4t-bg) !important;
    border-color: var(--o4t-border) !important;
}
html[data-theme="dark"] .dt-length select,
html[data-theme="dark"] .dataTables_length select {
    color: var(--o4t-text);
    background-color: var(--o4t-surface-raised);
    border-color: var(--o4t-border);
}
html[data-theme="dark"] hr,
html[data-theme="dark"] .dropdown-divider { border-color: var(--o4t-border); }
html[data-theme="dark"] .list-group-item { color: var(--o4t-text); background-color: var(--o4t-surface); border-color: var(--o4t-border); }
html[data-theme="dark"] .close { color: var(--o4t-text); text-shadow: none; }
html[data-theme="dark"] .note-editable { color: var(--o4t-text); background-color: var(--o4t-surface); }
html[data-theme="dark"] #artikeldaten table.amounts input,
html[data-theme="dark"] #articles table.amounts input { color: var(--o4t-text); background-color: var(--o4t-surface-raised); }

#theme-toggle { border: 0; background: transparent; }
#theme-toggle:focus-visible { outline: 2px solid #007bff; outline-offset: 2px; }
