/* ==========================================================================
   Bootstrap 3.3.5 – Dark Mode (overlay)
   Aktywacja: html[data-theme="dark"]
   Autor: (Twój projekt)
   Uwaga: Dobór kolorów neutralny, niskie kontrasty podbite na focus/hover.
   ========================================================================== */

/* ========= PODSTAWA / TYPOGRAFIA ========= */
html[data-theme="dark"] body {
    background-color: #121212;
    color: #e5e5e5;
}

html[data-theme="dark"] legend {
    color: #e5e5e5;
}

html[data-theme="dark"] a:not(.btn):not(.btn-link) {
    color: #74b6ff;
}

    html[data-theme="dark"] a:not(.btn):not(.btn-link):hover,
    html[data-theme="dark"] a:not(.btn):not(.btn-link):focus {
        color: #a9d0ff;
    }

    html[data-theme="dark"] a:hover,
    html[data-theme="dark"] a:focus {
        color: #a6d0ff;
    }

html[data-theme="dark"] hr {
    border-top: 1px solid #2a2a2a;
}

html[data-theme="dark"] .text-muted {
    color: #aaaaaa;
}

html[data-theme="dark"] .text-primary {
    color: #8ab6ff;
}

html[data-theme="dark"] .text-success {
    color: #6fd18b;
}

html[data-theme="dark"] .text-info {
    color: #80d4ff;
}

html[data-theme="dark"] .text-warning {
    color: #ffd280;
}

html[data-theme="dark"] .text-danger {
    color: #ff8c8c;
}

html[data-theme="dark"] code,
html[data-theme="dark"] kbd,
html[data-theme="dark"] pre,
html[data-theme="dark"] samp {
    background-color: #1a1a1a;
    color: #f5f5f5;
    border-color: #2a2a2a;
}

html[data-theme="dark"] mark,
html[data-theme="dark"] .mark {
    background: #3a2f00;
    color: #ffe39c;
}

/* ========= NAVBAR / DROPDOWN ========= */
html[data-theme="dark"] .navbar {
    background-color: #1f1f1f;
    border-color: #2a2a2a;
}

html[data-theme="dark"] .navbar-brand,
html[data-theme="dark"] .navbar-text,
html[data-theme="dark"] .navbar-nav > li > a {
    color: #e5e5e5 !important;
}

    html[data-theme="dark"] .navbar-nav > li > a:hover,
    html[data-theme="dark"] .navbar-nav > li > a:focus {
        background: #2a2a2a !important;
        color: #fff !important;
    }

html[data-theme="dark"] .navbar-toggle {
    border-color: #3a3a3a;
}

    html[data-theme="dark"] .navbar-toggle .icon-bar {
        background-color: #cccccc;
    }

html[data-theme="dark"] .navbar-collapse,
html[data-theme="dark"] .navbar-form {
    border-color: #2a2a2a;
}

html[data-theme="dark"] .dropdown-menu {
    background: #1f1f1f;
    border-color: #2a2a2a;
}

    html[data-theme="dark"] .dropdown-menu > li > a {
        color: #e5e5e5;
    }

        html[data-theme="dark"] .dropdown-menu > li > a:hover,
        html[data-theme="dark"] .dropdown-menu > li > a:focus {
            background: #2a2a2a;
            color: #fff;
        }

html[data-theme="dark"] .dropdown-header {
    color: #9e9e9e;
}

html[data-theme="dark"] .divider {
    background-color: #2a2a2a;
}

/* ========= PANELS / WELLS / THUMBNAILS ========= */
html[data-theme="dark"] .panel {
    background-color: #1b1b1b;
    border-color: #2a2a2a;
    color: #e5e5e5;
}

html[data-theme="dark"] .panel-heading {
    background: #202020 !important;
    border-color: #2a2a2a !important;
    color: #ddd !important;
}

html[data-theme="dark"] .panel-footer {
    background: #181818;
    border-top-color: #2a2a2a;
}

html[data-theme="dark"] .well {
    background-color: #171717;
    border-color: #2a2a2a;
    color: #e5e5e5;
}

html[data-theme="dark"] .thumbnail {
    background-color: #1b1b1b;
    border-color: #2a2a2a;
}

/* ========= TABLES ========= */
html[data-theme="dark"] .table {
    color: #e5e5e5;
}

    html[data-theme="dark"] .table > thead > tr > th {
        border-bottom-color: #2a2a2a;
        color: #bbbbbb;
    }

    html[data-theme="dark"] .table > tbody > tr > td,
    html[data-theme="dark"] .table > tbody > tr > th {
        border-top-color: #2a2a2a;
    }

html[data-theme="dark"] .table-striped > tbody > tr:nth-of-type(odd) {
    background-color: #191919;
}

html[data-theme="dark"] .table-hover > tbody > tr:hover {
    background: #222;
}

html[data-theme="dark"] .table-bordered {
    border-color: #2a2a2a;
}

    html[data-theme="dark"] .table-bordered > thead > tr > th,
    html[data-theme="dark"] .table-bordered > tbody > tr > td {
        border-color: #2a2a2a !important;
    }

/* ========= FORMY / INPUTY ========= */
html[data-theme="dark"] .form-control {
    background: #161616;
    color: #e5e5e5;
    border-color: #333;
}

    html[data-theme="dark"] .form-control::-webkit-input-placeholder {
        color: #9e9e9e;
    }

    html[data-theme="dark"] .form-control:-ms-input-placeholder {
        color: #9e9e9e;
    }

    html[data-theme="dark"] .form-control::placeholder {
        color: #9e9e9e;
    }

    html[data-theme="dark"] .form-control:focus {
        background: #181818;
        border-color: #4c8dff;
        color: #fff;
        box-shadow: inset 0 1px 1px rgba(0,0,0,.2),0 0 8px rgba(76,141,255,.4);
    }

html[data-theme="dark"] .input-group-addon {
    background: #222;
    color: #ccc;
    border-color: #333;
}

html[data-theme="dark"] .help-block {
    color: #a9a9a9;
}

html[data-theme="dark"] .checkbox label,
html[data-theme="dark"] .radio label {
    color: #e5e5e5;
}

html[data-theme="dark"] .checkbox-inline,
html[data-theme="dark"] .radio-inline {
    color: #e5e5e5;
}

html[data-theme="dark"] .has-success .help-block,
html[data-theme="dark"] .has-success .control-label,
html[data-theme="dark"] .has-success .radio,
html[data-theme="dark"] .has-success .checkbox,
html[data-theme="dark"] .has-success .radio-inline,
html[data-theme="dark"] .has-success .checkbox-inline {
    color: #6fd18b;
}

html[data-theme="dark"] .has-success .form-control {
    border-color: #3d9b5a;
}

    html[data-theme="dark"] .has-success .form-control:focus {
        border-color: #4ec26f;
    }

html[data-theme="dark"] .has-warning .help-block,
html[data-theme="dark"] .has-warning .control-label,
html[data-theme="dark"] .has-warning .radio,
html[data-theme="dark"] .has-warning .checkbox,
html[data-theme="dark"] .has-warning .radio-inline,
html[data-theme="dark"] .has-warning .checkbox-inline {
    color: #ffd280;
}

html[data-theme="dark"] .has-warning .form-control {
    border-color: #a67c00;
}

    html[data-theme="dark"] .has-warning .form-control:focus {
        border-color: #e6a700;
    }

html[data-theme="dark"] .has-error .help-block,
html[data-theme="dark"] .has-error .control-label,
html[data-theme="dark"] .has-error .radio,
html[data-theme="dark"] .has-error .checkbox,
html[data-theme="dark"] .has-error .radio-inline,
html[data-theme="dark"] .has-error .checkbox-inline {
    color: #ff8c8c;
}

html[data-theme="dark"] .has-error .form-control {
    border-color: #7a1d1d;
}

    html[data-theme="dark"] .has-error .form-control:focus {
        border-color: #c0392b;
    }

/* ========= BUTTONY ========= */
html[data-theme="dark"] .btn-default {
    background: #222;
    border-color: #555;
    color: #eee;
}

    html[data-theme="dark"] .btn-default:hover,
    html[data-theme="dark"] .btn-default:focus {
        background: #3a3a3a;
        color: #fff;
        border-color: #666;
    }

html[data-theme="dark"] .btn-primary {
    background: #0d6efd;
    border-color: #0b5ed7;
}

    html[data-theme="dark"] .btn-primary:hover,
    html[data-theme="dark"] .btn-primary:focus {
        background: #2a7dff;
        border-color: #0b5ed7;
    }

html[data-theme="dark"] .btn-success {
    background: #28a745;
    border-color: #218838;
}

html[data-theme="dark"] .btn-info {
    background: #17a2b8;
    border-color: #138496;
}

html[data-theme="dark"] .btn-warning {
    background: #f0ad4e;
    border-color: #d48a1d;
    color: #222;
}

html[data-theme="dark"] .btn-danger {
    background: #d9534f;
    border-color: #b52b27;
}

html[data-theme="dark"] .btn-link {
    color: #8ab6ff;
}

/* ========= BADGE / LABEL ========= */
html[data-theme="dark"] .badge {
    background: #3a3a3a;
    color: #e5e5e5;
}

html[data-theme="dark"] .label-default {
    background: #3a3a3a;
}

html[data-theme="dark"] .label-primary {
    background: #0d6efd;
}

html[data-theme="dark"] .label-success {
    background: #28a745;
}

html[data-theme="dark"] .label-info {
    background: #17a2b8;
}

html[data-theme="dark"] .label-warning {
    background: #f0ad4e;
    color: #222;
}

html[data-theme="dark"] .label-danger {
    background: #d9534f;
}

/* ========= ALERTY ========= */
html[data-theme="dark"] .alert {
    color: #e5e5e5;
    border-color: #2a2a2a;
}

html[data-theme="dark"] .alert-success {
    background: #0f2b1c;
    border-color: #1f5a39;
    color: #a6e4b9;
}

html[data-theme="dark"] .alert-info {
    background: #0d2730;
    border-color: #1c5566;
    color: #aee9ff;
}

html[data-theme="dark"] .alert-warning {
    background: #32250a;
    border-color: #6b4d12;
    color: #ffdea6;
}

html[data-theme="dark"] .alert-danger {
    background: #301515;
    border-color: #6a2626;
    color: #ffb3b0;
}

/* ========= LIST-GROUP ========= */
html[data-theme="dark"] .list-group-item {
    background: #181818;
    color: #e5e5e5;
    border-color: #2a2a2a;
}

    html[data-theme="dark"] .list-group-item.active,
    html[data-theme="dark"] .list-group-item.active:focus,
    html[data-theme="dark"] .list-group-item.active:hover {
        background: #0d6efd;
        border-color: #0d6efd;
        color: #fff;
    }

/* ========= PAGINATION / PAGER / BREADCRUMBS ========= */
html[data-theme="dark"] .pagination > li > a,
html[data-theme="dark"] .pagination > li > span {
    background: #181818;
    border-color: #2a2a2a;
    color: #e5e5e5;
}

    html[data-theme="dark"] .pagination > li > a:hover,
    html[data-theme="dark"] .pagination > li > span:hover {
        background: #2a2a2a;
        color: #fff;
    }

html[data-theme="dark"] .pager li > a,
html[data-theme="dark"] .pager li > span {
    background: #181818;
    border-color: #2a2a2a;
    color: #e5e5e5;
}

html[data-theme="dark"] .breadcrumb {
    background: #181818;
    border: 1px solid #2a2a2a;
    color: #cfcfcf;
}

    html[data-theme="dark"] .breadcrumb > li + li:before {
        color: #9e9e9e;
    }

/* ========= PROGRESS / JUMBOTRON ========= */
html[data-theme="dark"] .progress {
    background: #1a1a1a;
}

html[data-theme="dark"] .progress-bar {
    background: #0d6efd;
}

html[data-theme="dark"] .jumbotron {
    background: #171717;
    color: #e5e5e5;
    border: 1px solid #2a2a2a;
}

/* ========= MODAL / POPOVER / TOOLTIP ========= */
html[data-theme="dark"] .modal-content {
    background: #1b1b1b;
    border-color: #2a2a2a;
    color: #e5e5e5;
}

html[data-theme="dark"] .modal-header {
    border-bottom-color: #2a2a2a;
}

html[data-theme="dark"] .modal-footer {
    border-top-color: #2a2a2a;
}

html[data-theme="dark"] .popover {
    background: #1b1b1b;
    border-color: #2a2a2a;
    color: #e5e5e5;
}

html[data-theme="dark"] .popover-title {
    background: #202020;
    border-bottom-color: #2a2a2a;
    color: #dcdcdc;
}

html[data-theme="dark"] .tooltip-inner {
    background: #2a2a2a;
    color: #e5e5e5;
}

html[data-theme="dark"] .tooltip.top .tooltip-arrow {
    border-top-color: #2a2a2a;
}

html[data-theme="dark"] .tooltip.right .tooltip-arrow {
    border-right-color: #2a2a2a;
}

html[data-theme="dark"] .tooltip.bottom .tooltip-arrow {
    border-bottom-color: #2a2a2a;
}

html[data-theme="dark"] .tooltip.left .tooltip-arrow {
    border-left-color: #2a2a2a;
}

/* ========= TABS / PILLS / NAVS ========= */
html[data-theme="dark"] .nav > li > a {
    color: #e5e5e5;
}

    html[data-theme="dark"] .nav > li > a:hover,
    html[data-theme="dark"] .nav > li > a:focus {
        background: #222;
    }

html[data-theme="dark"] .nav-tabs {
    border-bottom-color: #2a2a2a;
}

    html[data-theme="dark"] .nav-tabs > li > a {
        background: transparent;
        border-color: transparent;
    }

    html[data-theme="dark"] .nav-tabs > li.active > a,
    html[data-theme="dark"] .nav-tabs > li.active > a:hover,
    html[data-theme="dark"] .nav-tabs > li.active > a:focus {
        background: #1b1b1b;
        color: #fff;
        border: 1px solid #2a2a2a;
        border-bottom-color: transparent;
    }

html[data-theme="dark"] .nav-pills > li > a {
    background: transparent;
}

html[data-theme="dark"] .nav-pills > li.active > a,
html[data-theme="dark"] .nav-pills > li.active > a:hover,
html[data-theme="dark"] .nav-pills > li.active > a:focus {
    background: #0d6efd;
    color: #fff;
}

/* ========= CAROUSEL ========= */
html[data-theme="dark"] .carousel-control {
    color: #fff;
}

html[data-theme="dark"] .carousel-indicators li {
    background: #666;
    border-color: #666;
}

html[data-theme="dark"] .carousel-indicators .active {
    background: #fff;
}

/* ========= CLOSE / CARET / ETC. ========= */
html[data-theme="dark"] .close {
    color: #e5e5e5;
    opacity: .7;
}

    html[data-theme="dark"] .close:hover {
        color: #fff;
        opacity: 1;
    }

html[data-theme="dark"] .caret {
    border-top-color: #e5e5e5;
    border-bottom-color: #e5e5e5;
}

/* ========= KOMPONENTY RZADZIEJ UŻYWANE ========= */
html[data-theme="dark"] .media,
html[data-theme="dark"] .media-body {
    color: #e5e5e5;
}

html[data-theme="dark"] .pager .disabled > a,
html[data-theme="dark"] .pager .disabled > span {
    background: #151515;
    color: #7a7a7a;
    border-color: #2a2a2a;
    cursor: not-allowed;
}

/* ========= PRINT (opcjonalnie wyłącz przyciemnianie w druku) ========= */
@media print {
    html[data-theme="dark"] body {
        background: #fff !important;
        color: #000 !important;
    }
}

/* Dark mode dla .switch (Bootstrap 3.3.5 overlay) */
html[data-theme="dark"] .switch span {
    background-color: #1e1e1e;
    border: 1px solid #3a3a3a;
    box-shadow: inset 1px 2px 3px rgba(0,0,0,.45);
}

    html[data-theme="dark"] .switch span:after {
        background-color: #e9e9e9;
        border: 1px solid #555;
        box-shadow: 0 1px 3px rgba(0,0,0,.6);
    }

html[data-theme="dark"] .switch:hover span {
    border-color: #4a4a4a;
}

/* Stan: checked */
html[data-theme="dark"] .switch input:checked + span {
    background-color: #5d9cec; /* zachowujemy Twój akcent */
    border-color: #5d9cec;
    box-shadow: inset 0 0 0 2px rgba(0,0,0,.05);
}

    html[data-theme="dark"] .switch input:checked + span:after {
        border-color: #4b89dc;
    }

/* Dostępność: focus z klawiatury */
html[data-theme="dark"] .switch input:focus + span {
    outline: 0;
    box-shadow: 0 0 0 3px rgba(93,156,236,.35), inset 1px 2px 3px rgba(0,0,0,.45);
}

/* Stan: disabled */
html[data-theme="dark"] .switch input:disabled + span {
    background-color: #1a1a1a;
    border-color: #2a2a2a;
    opacity: .6;
    cursor: not-allowed;
}

    html[data-theme="dark"] .switch input:disabled + span:after {
        background-color: #9a9a9a;
        border-color: #666;
    }

html[data-theme="dark"] .switch input:disabled ~ * {
    cursor: not-allowed;
}

/* (opcjonalnie) redukcja animacji dla osób z ograniczeniami ruchu */
@media (prefers-reduced-motion: reduce) {
    .switch span,
    .switch span:after {
        transition: none !important;
    }
}
/* found */
html[data-theme="dark"] .wrapper {
    background-color: #121212;
}

html[data-theme="dark"] fieldset {
    border-bottom-color: #333;
}

html[data-theme="dark"] .content-wrapper > h3,
html[data-theme="dark"] .content-wrapper > .content-heading {
    background-color: #121212;
    border-bottom-color: #2a2a2a;
}

html[data-theme="dark"] .panel-footer,
html[data-theme="dark"] .panel-heading,
html[data-theme="dark"] .content-heading,
html[data-theme="dark"] footer {
    background-color: #121212 !important;
}

html[data-theme="dark"] .content-wrapper {
    border-top-color: #2a2a2a;
}

html[data-theme="dark"] body .ng-table th.sortable.sort-desc,
html[data-theme="dark"] body .ng-table th.sortable.sort-asc {
    background-color: #121212;
}

html[data-theme="dark"] .wrapper > footer {
    border-top-color: #2a2a2a;
}

/* sweetalert.dark.css ---------------------------------------------------- */
/* Aktywacja tylko w dark mode (u Ciebie <html data-theme="dark">) */
html[data-theme="dark"] .swal-overlay {
    background-color: rgba(0,0,0,.65) !important;
}

html[data-theme="dark"] .swal-modal {
    background-color: #1b1c1f !important;
    color: #e6e6e6 !important;
    box-shadow: 0 10px 30px rgba(0,0,0,.6) !important;
}

/* Teksty */
html[data-theme="dark"] .swal-title {
    color: #f1f3f5 !important;
}

html[data-theme="dark"] .swal-text {
    color: #cfd4da !important;
}

/* Stopka i separator */
html[data-theme="dark"] .swal-footer {
    border-top: 1px solid #2a2d34 !important;
}

/* Przyciski */
html[data-theme="dark"] .swal-button {
    background-color: #2d6cdf !important; /* akcent */
    color: #fff !important;
    border: none !important;
}

    html[data-theme="dark"] .swal-button:not([disabled]):hover {
        filter: brightness(1.05);
    }

    html[data-theme="dark"] .swal-button:active {
        filter: brightness(.95);
    }
/* Cancel jako neutralny, bardziej „płaski” */
html[data-theme="dark"] .swal-button--cancel {
    background-color: #2a2f38 !important;
    color: #e6e6e6 !important;
}

    html[data-theme="dark"] .swal-button--cancel:not([disabled]):hover {
        background-color: #313641 !important;
    }
/* Danger */
html[data-theme="dark"] .swal-button--danger {
    background-color: #e64942 !important;
}

/* Loader kropek na przyciskach (lepsza widoczność) */
html[data-theme="dark"] .swal-button__loader div {
    background-color: rgba(255,255,255,.9) !important;
}

/* Pola input/textarea w treści modala */
html[data-theme="dark"] .swal-content__input,
html[data-theme="dark"] .swal-content__textarea {
    -webkit-appearance: none;
    background-color: #111315 !important;
    color: #e6e6e6 !important;
    border: 1px solid #2e333a !important;
}

    html[data-theme="dark"] .swal-content__input:focus,
    html[data-theme="dark"] .swal-content__textarea:focus {
        outline: none;
        border-color: #5aa2ff !important;
        box-shadow: 0 0 0 3px rgba(90,162,255,.25);
    }

    html[data-theme="dark"] .swal-content__input::placeholder,
    html[data-theme="dark"] .swal-content__textarea::placeholder {
        color: #8a9099;
        opacity: 1;
    }

/* Ikony – dopasowanie do ciemnego tła */
html[data-theme="dark"] .swal-icon {
    box-shadow: none;
}
/* „maski” w ikonie sukcesu mają w oryginale białe tło – podmień na kolor modala */
html[data-theme="dark"] .swal-icon--success:before,
html[data-theme="dark"] .swal-icon--success:after,
html[data-theme="dark"] .swal-icon--success__hide-corners {
    background: #1b1c1f !important;
}
/* delikatniejszy niebieski dla „info” na ciemnym */
html[data-theme="dark"] .swal-icon--info {
    border-color: #8cc7dd !important;
}

/* Opcjonalnie: sygnalizacja schematu dla natywnych kontrolek */
html[data-theme="dark"] {
    color-scheme: dark;
}


/* ui-select.dark.css  — aktywacja tylko w dark mode */
html[data-theme="dark"] {
    /* możesz podmienić akcent pod swój motyw */
    --ui-accent: #2d6cdf; /* fallback: niebieski */
    --ui-bg: #1b1c1f;
    --ui-bg-2: #111315;
    --ui-bg-3: #2a2f3f;
    --ui-txt: #e6e6e6;
    --ui-txt-2: #cfd4da;
    --ui-muted: #8a9099;
    --ui-bd: #2e333a;
    --ui-shadow: 0 8px 20px rgba(0,0,0,.5);
}

    /* Wspólne -------------------------------------------------------------- */
    html[data-theme="dark"] .ui-select-highlight {
        font-weight: 600;
        color: #fff;
    }

    /* Rząd listy (hover/active/disabled) */
    html[data-theme="dark"] .ui-select-bootstrap .ui-select-choices-row > span {
        color: var(--ui-txt);
        background: transparent;
    }

        html[data-theme="dark"] .ui-select-choices-row:hover,
        html[data-theme="dark"] .ui-select-bootstrap .ui-select-choices-row > span:hover,
        html[data-theme="dark"] .ui-select-bootstrap .ui-select-choices-row > span:focus {
            background-color: var(--ui-bg-3);
            color: #fff;
        }

    html[data-theme="dark"] .ui-select-bootstrap .ui-select-choices-row.active > span {
        background-color: var(--ui-accent);
        color: #fff;
    }

    html[data-theme="dark"] .ui-select-bootstrap .ui-select-choices-row.disabled > span,
    html[data-theme="dark"] .ui-select-bootstrap .ui-select-choices-row.active.disabled > span {
        color: var(--ui-muted);
        background: transparent;
    }

    /* Bootstrap theme ------------------------------------------------------ */
    /* pole „match” jako przycisk */
    html[data-theme="dark"] .ui-select-bootstrap > .ui-select-match > .btn {
        background-color: var(--ui-bg-2) !important;
        color: var(--ui-txt) !important;
        border: 1px solid var(--ui-bd) !important;
        text-align: left !important; /* zachowujemy oryginalne */
    }

    html[data-theme="dark"] .ui-select-bootstrap > .ui-select-match > .caret,
    html[data-theme="dark"] .ui-select-bootstrap .ui-select-toggle > .caret {
        border-top-color: var(--ui-txt-2);
        border-bottom-color: var(--ui-txt-2);
    }

    /* dropdown */
    html[data-theme="dark"] .ui-select-bootstrap > .ui-select-choices,
    html[data-theme="dark"] .ui-select-bootstrap > .ui-select-no-choice {
        background-color: var(--ui-bg);
        color: var(--ui-txt);
        border: 1px solid var(--ui-bd);
        box-shadow: var(--ui-shadow);
    }

    /* search input (single) */
    html[data-theme="dark"] .ui-select-bootstrap > input.ui-select-search.form-control {
        background-color: var(--ui-bg-2);
        color: var(--ui-txt);
        border: 1px solid var(--ui-bd);
    }

        html[data-theme="dark"] .ui-select-bootstrap > input.ui-select-search.form-control::placeholder {
            color: var(--ui-muted);
        }

    /* multiple */
    html[data-theme="dark"] .ui-select-multiple.ui-select-bootstrap {
        background-color: var(--ui-bg-2);
        border: 1px solid var(--ui-bd);
    }

        html[data-theme="dark"] .ui-select-multiple.ui-select-bootstrap input.ui-select-search {
            color: var(--ui-txt);
        }

    html[data-theme="dark"] .ui-select-multiple .ui-select-match-item {
        background-color: var(--ui-bg-3);
        color: var(--ui-txt);
        border: 1px solid #39404a;
    }

    html[data-theme="dark"] .ui-select-multiple.ui-select-bootstrap .ui-select-match .close {
        color: var(--ui-txt-2);
    }

    /* focus ring jak w Twoich inputach */
    html[data-theme="dark"] .btn-default-focus {
        color: var(--ui-txt);
        background-color: #22252a;
        border-color: var(--ui-accent);
        box-shadow: 0 0 0 1px #000, 0 0 0 3px color-mix(in srgb, var(--ui-accent) 40%, transparent);
    }

    /* „direction-up” – odwrócony cień */
    html[data-theme="dark"] .ui-select-container[theme="bootstrap"].direction-up .ui-select-dropdown {
        box-shadow: 0 -8px 20px rgba(0,0,0,.5);
    }

    /* spinner */
    html[data-theme="dark"] .ui-select-refreshing.glyphicon {
        color: color-mix(in srgb, var(--ui-accent) 65%, white 10%);
    }

    /* Select2 theme -------------------------------------------------------- */
    html[data-theme="dark"] .ui-select-container[theme="select2"] .select2-choice {
        background-color: var(--ui-bg-2);
        color: var(--ui-txt);
        border: 1px solid var(--ui-bd);
    }

    html[data-theme="dark"] .ui-select-container[theme="select2"] .ui-select-dropdown {
        background-color: var(--ui-bg);
        color: var(--ui-txt);
        border: 1px solid var(--ui-bd);
        box-shadow: var(--ui-shadow);
    }

    html[data-theme="dark"] .ui-select-container[theme="select2"] .select2-search input {
        background-color: var(--ui-bg-2);
        color: var(--ui-txt);
        border: 1px solid var(--ui-bd);
    }

    html[data-theme="dark"] .ui-select-container[theme="select2"].direction-up .ui-select-dropdown {
        box-shadow: 0 -8px 20px rgba(0,0,0,.5);
    }

    /* Selectize theme ------------------------------------------------------ */
    html[data-theme="dark"] .ui-select-container[theme="selectize"] .selectize-input {
        background-color: var(--ui-bg-2) !important;
        color: var(--ui-txt) !important;
        border: 1px solid var(--ui-bd) !important;
    }

    html[data-theme="dark"] .ui-select-container[theme="selectize"] .selectize-dropdown {
        background-color: var(--ui-bg);
        color: var(--ui-txt);
        border: 1px solid var(--ui-bd);
        box-shadow: var(--ui-shadow);
    }

        html[data-theme="dark"] .ui-select-container[theme="selectize"] .selectize-dropdown .active {
            background-color: var(--ui-accent);
            color: #fff;
        }

    html[data-theme="dark"] .ui-select-container[theme="selectize"] .selectize-input > input {
        color: var(--ui-txt);
    }

    html[data-theme="dark"] .selectize-input.selectize-focus {
        border-color: var(--ui-accent) !important;
    }

    /* Stany błędu – zostawiamy czerwony, tylko kontrast krawędzi */
    html[data-theme="dark"] .ng-dirty.ng-invalid > a.select2-choice,
    html[data-theme="dark"] .ng-dirty.ng-invalid > div.selectize-input,
    html[data-theme="dark"] .ui-select-bootstrap.ng-dirty.ng-invalid > button.btn.ui-select-match {
        border-color: #D44950 !important;
    }


@media screen and (max-width: 767px) {
    html[data-theme="dark"] .table-responsive {
        border-color: #1a1a1a;
    }
}

html[data-theme="dark"] body .whirl:before {
    background-color: #444;
}

html[data-theme="dark"] .preloader {
    background-color: #1a1a1a;
    background-image: -webkit-linear-gradient(90deg, #1a1a1a 10%, #2b2b2b 90%);
    /* Chrome 10+, Saf5.1+ */
    background-image: -moz-linear-gradient(90deg, #1a1a1a 10%, #2b2b2b 90%);
    /* FF3.6+ */
    background-image: -ms-linear-gradient(90deg, #1a1a1a 10%, #2b2b2b 90%);
    /* IE10 */
    background-image: -o-linear-gradient(90deg, #1a1a1a 10%, #2b2b2b 90%);
    /* Opera 11.10+ */
    background-image: linear-gradient(90deg, #1a1a1a 10%, #2b2b2b 90%);
}