/* Chế độ tối: chỉ có hiệu lực khi sisTheme gắn data-sis-theme="dark" lên <html>.
   Nạp sau cùng để đè CSS riêng của app (site.css, sis.css, <style> trong .razor); control DevExpress do blazing-dark lo. */
html[data-sis-theme="dark"] {
    color-scheme: dark;
    --sd-bg: #1E1E1E;
    --sd-surface: #252526;
    --sd-surface2: #2D2D30;
    --sd-hover: #3A3D41;
    --sd-line: #3F3F46;
    --sd-text: #E4E4E7;
    --sd-muted: #A1A1AA;
    --sd-link: #4FA3E3;
    --sd-accent: #FFC107;
    /* Bootstrap 5.0 dùng các biến này cho .table, .text-*, ... */
    --bs-body-bg: var(--sd-bg);
    --bs-body-color: var(--sd-text);
}

    /* ── Khung chung ─────────────────────────────────────────────── */
    html[data-sis-theme="dark"] body {
        background: var(--sd-bg) !important;
        color: var(--sd-text);
    }

    html[data-sis-theme="dark"] a,
    html[data-sis-theme="dark"] .btn-link {
        color: var(--sd-link);
    }

    html[data-sis-theme="dark"] .demo-content,
    html[data-sis-theme="dark"] .main,
    html[data-sis-theme="dark"] .content,
    html[data-sis-theme="dark"] .main .top-row,
    html[data-sis-theme="dark"] #banhang-main,
    html[data-sis-theme="dark"] .khung-main,
    html[data-sis-theme="dark"] .dxPopup,
    html[data-sis-theme="dark"] .login_container2 {
        background-color: var(--sd-bg) !important;
        color: var(--sd-text);
    }

    html[data-sis-theme="dark"] .main .top-row {
        border-bottom-color: var(--sd-line);
    }

    html[data-sis-theme="dark"] .sidebar,
    html[data-sis-theme="dark"] .demo-content.sidebar-shown .sidebar,
    html[data-sis-theme="dark"] .mob-drawer-open .sidebar {
        background: var(--sd-surface) !important;
    }

    /* Thanh trên desktop: style nội tuyến aliceblue trong MainLayout */
    html[data-sis-theme="dark"] .desktop-topbar {
        background-color: var(--sd-surface) !important;
    }

    html[data-sis-theme="dark"] hr.desktop-dxmenu {
        background-color: var(--sd-line) !important;
    }

    html[data-sis-theme="dark"] .mobile-topbar {
        background: var(--sd-surface);
        border-bottom-color: var(--sd-line);
    }

    html[data-sis-theme="dark"] .mobile-hamburger span {
        background: var(--sd-text);
    }

    html[data-sis-theme="dark"] .mobile-footer-bar {
        background: #0E4F80;
    }

    html[data-sis-theme="dark"] .mfb-dvcs-dropdown {
        background: var(--sd-surface);
    }

    html[data-sis-theme="dark"] .mfb-dvcs-item {
        border-bottom-color: var(--sd-line);
    }

        html[data-sis-theme="dark"] .mfb-dvcs-item:hover,
        html[data-sis-theme="dark"] .mfb-dvcs-item.active {
            background: var(--sd-hover);
        }

    html[data-sis-theme="dark"] .mfb-dvcs-code,
    html[data-sis-theme="dark"] .mfb-dvcs-item.active .mfb-dvcs-code {
        color: var(--sd-text);
    }

    html[data-sis-theme="dark"] .mfb-dvcs-name {
        color: var(--sd-muted);
    }

    html[data-sis-theme="dark"] .status-bar {
        border-top-color: var(--sd-line);
    }

        html[data-sis-theme="dark"] .status-bar i,
        html[data-sis-theme="dark"] .m-toggler-icon {
            color: var(--sd-muted);
        }

    /* Màu xanh đậm #1072B9 trên nền tối khó đọc: nâng sáng */
    html[data-sis-theme="dark"] .dxbl-treeview-item-content,
    html[data-sis-theme="dark"] .m-menu-item,
    html[data-sis-theme="dark"] .checkboxitem,
    html[data-sis-theme="dark"] .staff-title,
    html[data-sis-theme="dark"] .productName,
    html[data-sis-theme="dark"] .noti-container,
    html[data-sis-theme="dark"] .ismallcaption,
    html[data-sis-theme="dark"] .sidebar .nav-item a.active,
    html[data-sis-theme="dark"] .sidebar .nav-item a:hover,
    html[data-sis-theme="dark"] #version,
    html[data-sis-theme="dark"] #inputtext,
    html[data-sis-theme="dark"] .txtin {
        color: var(--sd-link);
    }

    html[data-sis-theme="dark"] .noti_noi_dung,
    html[data-sis-theme="dark"] .btn-toolbar-fucn {
        color: var(--sd-text);
    }

    /* ── Khối tiêu đề / tổng cộng / chọn đơn vị (sis.css, site.css) ── */
    html[data-sis-theme="dark"] .dxheader,
    html[data-sis-theme="dark"] .dxheadem {
        background-image: linear-gradient(135deg, var(--sd-surface) 10%, var(--sd-surface2) 80%);
        border-color: var(--sd-line);
        color: var(--sd-text);
    }

    html[data-sis-theme="dark"] .css-header-grp {
        background: var(--sd-surface2) !important;
    }

    html[data-sis-theme="dark"] .dx-total-box dxbl-group-control,
    html[data-sis-theme="dark"] .dx-total-box .dxbl-group-header .dxbl-text,
    html[data-sis-theme="dark"] .dx-total-box .dxbl-group-header .dxbl-btn-text-secondary,
    html[data-sis-theme="dark"] .dropdown-dvcs,
    html[data-sis-theme="dark"] .dvcs,
    html[data-sis-theme="dark"] .col-ali,
    html[data-sis-theme="dark"] .col-ali1,
    html[data-sis-theme="dark"] .col-btn {
        background: var(--sd-surface) !important;
        border-color: var(--sd-line) !important;
        color: var(--sd-text);
    }

    html[data-sis-theme="dark"] .dropdown-content a {
        background-color: var(--sd-surface2);
        color: var(--sd-text);
    }

        html[data-sis-theme="dark"] .dropdown-content a:hover {
            background-color: var(--sd-hover);
        }

    html[data-sis-theme="dark"] .drop-target {
        border-color: var(--sd-line);
    }

    /* ── Bootstrap 5.0 (không có data-bs-theme) ─────────────────── */
    html[data-sis-theme="dark"] .card,
    html[data-sis-theme="dark"] .modal-content,
    html[data-sis-theme="dark"] .dropdown-menu,
    html[data-sis-theme="dark"] .list-group-item,
    html[data-sis-theme="dark"] .bg-white,
    html[data-sis-theme="dark"] .bg-light {
        background-color: var(--sd-surface) !important;
        border-color: var(--sd-line);
        color: var(--sd-text);
    }

    html[data-sis-theme="dark"] .card-header,
    html[data-sis-theme="dark"] .card-footer,
    html[data-sis-theme="dark"] .modal-header,
    html[data-sis-theme="dark"] .modal-footer {
        background-color: var(--sd-surface2);
        border-color: var(--sd-line);
    }

    /* ── Form sửa danh mục (FormList): tiêu đề, thân, thanh nút ───── */
    html[data-sis-theme="dark"] .popup-header,
    html[data-sis-theme="dark"] .text-bg-light {
        background-color: var(--sd-surface2) !important;
        color: var(--sd-text) !important;
    }

        html[data-sis-theme="dark"] .popup-header [style*="#005FFF"] {
            color: var(--sd-link) !important;
        }

    html[data-sis-theme="dark"] .popup-container hr {
        background-color: var(--sd-line) !important;
    }

    html[data-sis-theme="dark"] .popup-body {
        background-color: var(--sd-bg);
        color: var(--sd-text);
    }

    html[data-sis-theme="dark"] .popup-footer {
        background-color: var(--sd-surface2) !important;
        border-top: 1px solid var(--sd-line);
    }

        html[data-sis-theme="dark"] .popup-footer .btncmdgroup.dxbl-btn-light {
            --dxbl-btn-bg: var(--sd-surface);
            --dxbl-btn-color: var(--sd-text);
            --dxbl-btn-border-color: var(--sd-line);
            background-color: var(--sd-surface);
            color: var(--sd-text);
            border-color: var(--sd-line);
        }

    /* Tên nhóm (dx-total-box): sis.css ép color: blue !important */
    html[data-sis-theme="dark"] .dx-total-box .dxbl-group-header .dxbl-text {
        color: var(--sd-link) !important;
    }

    html[data-sis-theme="dark"] .dropdown-item {
        color: var(--sd-text);
    }

        html[data-sis-theme="dark"] .dropdown-item:hover,
        html[data-sis-theme="dark"] .dropdown-item:focus {
            background-color: var(--sd-hover);
            color: var(--sd-text);
        }

    html[data-sis-theme="dark"] .form-control,
    html[data-sis-theme="dark"] .form-select,
    /* Nền và chữ luôn đi cùng nhau, đủ mạnh để đè style riêng của trang (vd .inputWithIcon input nền sáng)
       — nếu chỉ chữ đổi sáng mà nền giữ sáng thì chữ trắng trên nền nhạt, không đọc được. */
    html[data-sis-theme="dark"] input:not([type="checkbox"], [type="radio"], [type="range"], [type="color"], [type="button"], [type="submit"], [type="image"], [type="file"]),
    html[data-sis-theme="dark"] textarea:not(.sd-x),
    html[data-sis-theme="dark"] select:not(.sd-x) {
        background-color: var(--sd-surface2);
        border-color: var(--sd-line);
        color: var(--sd-text);
    }

        html[data-sis-theme="dark"] input::placeholder,
        html[data-sis-theme="dark"] textarea::placeholder {
            color: var(--sd-muted);
            opacity: 1;
        }

        /* Ô nhập bên trong editor DevExpress: để blazing-dark tô khung, ô trong trong suốt */
        html[data-sis-theme="dark"] [class*="dxbl-"] input:not([type="checkbox"], [type="radio"]),
        html[data-sis-theme="dark"] [class*="dxbl-"] textarea:not(.sd-x) {
            background-color: transparent;
            color: inherit;
        }

        html[data-sis-theme="dark"] .form-control:disabled,
        html[data-sis-theme="dark"] .form-control[readonly] {
            background-color: var(--sd-surface);
        }

    html[data-sis-theme="dark"] .table {
        color: var(--sd-text);
        border-color: var(--sd-line);
        --bs-table-striped-color: var(--sd-text);
        --bs-table-striped-bg: rgba(255, 255, 255, .04);
        --bs-table-hover-color: var(--sd-text);
        --bs-table-hover-bg: rgba(255, 255, 255, .07);
    }

    html[data-sis-theme="dark"] .text-dark,
    html[data-sis-theme="dark"] .text-body {
        color: var(--sd-text) !important;
    }

    html[data-sis-theme="dark"] .text-muted,
    html[data-sis-theme="dark"] .text-secondary {
        color: var(--sd-muted) !important;
    }

    html[data-sis-theme="dark"] .border,
    html[data-sis-theme="dark"] .border-top,
    html[data-sis-theme="dark"] .border-bottom,
    html[data-sis-theme="dark"] hr {
        border-color: var(--sd-line) !important;
    }

    html[data-sis-theme="dark"] .btn-close {
        filter: invert(1) grayscale(1) brightness(2);
    }

    /* Style nội tuyến nền trắng trong các .razor (background:#fff, white) */
    html[data-sis-theme="dark"] [style*="background:#fff"],
    html[data-sis-theme="dark"] [style*="background: #fff"],
    html[data-sis-theme="dark"] [style*="background-color:#fff"],
    html[data-sis-theme="dark"] [style*="background-color: #fff"],
    html[data-sis-theme="dark"] [style*="background:white"],
    html[data-sis-theme="dark"] [style*="background: white"],
    html[data-sis-theme="dark"] [style*="background-color:white"],
    html[data-sis-theme="dark"] [style*="background-color: white"],
    html[data-sis-theme="dark"] [style*="background-color:aliceblue"] {
        background: var(--sd-surface) !important;
        color: var(--sd-text);
    }

    /* ── Menu cây bên trái (Header.razor) ────────────────────────── */
    html[data-sis-theme="dark"] .treeview-leaf span {
        color: var(--sd-text);
    }

    html[data-sis-theme="dark"] .treeview-items span {
        color: var(--sd-link);
    }

    html[data-sis-theme="dark"] .dxbl-treeview-item-container:hover {
        background: var(--sd-hover);
    }

        html[data-sis-theme="dark"] .dxbl-treeview-item-container:hover span {
            color: var(--sd-accent);
        }

    html[data-sis-theme="dark"] .status-bar {
        color: var(--sd-muted);
    }

    /* ── Thanh công cụ, breadcrumb, ô tìm kiếm (dx-demo.css) ─────── */
    html[data-sis-theme="dark"] .form-toolbar,
    html[data-sis-theme="dark"] .css-toolbar,
    html[data-sis-theme="dark"] .demo-content .sidebar {
        background-color: var(--sd-surface) !important;
    }

    html[data-sis-theme="dark"] .form-toolbar {
        border-bottom: 1px solid var(--sd-line);
    }

    html[data-sis-theme="dark"] .demo-breadcrumbs-container::before,
    html[data-sis-theme="dark"] .search-editor::before {
        background-color: var(--sd-line);
    }

    html[data-sis-theme="dark"] .dropdown-content {
        background-color: var(--sd-surface2);
    }

    /* Link mã chứng từ / mã danh mục trên lưới: style nội tuyến color:blue */
    html[data-sis-theme="dark"] a[style*="color:blue"],
    html[data-sis-theme="dark"] a[style*="color: blue"] {
        color: var(--sd-link) !important;
    }

    /* ── Dashboard quy trình: bảng màu cho sis-dash.css ─────────── */
    html[data-sis-theme="dark"] {
        --dash-page: transparent;
        --dash-surface: var(--sd-surface);
        --dash-line-soft: var(--sd-line);
        --dash-shadow: 0 2px 8px rgba(0, 0, 0, .35);
        --dash-title: var(--sd-link);
        --dash-text: var(--sd-text);
        --dash-muted: var(--sd-muted);
        --dash-accent: var(--sd-link);
        --dash-item-bg: var(--sd-surface2);
        --dash-item-line: var(--sd-line);
        --dash-item-hover-bg: var(--sd-hover);
        --dash-item-icon: var(--sd-link);
        --dash-item-text: var(--sd-text);
        --dash-node-bg: radial-gradient(circle at 35% 28%, #3A3F4B 0%, #2B2F38 60%, #23262D 100%);
        --dash-node-line: var(--sd-line);
        --dash-node-outline: var(--sd-line);
        --dash-node-shadow: 0 0 0 5px rgba(255, 255, 255, .05), 0 6px 18px rgba(0, 0, 0, .45);
        --dash-node-shadow-hover: 0 0 0 5px rgba(79, 163, 227, .35), 0 8px 22px rgba(0, 0, 0, .5);
        --dash-center-bg: radial-gradient(circle at 35% 28%, #2F6FA3 0%, #1B4F7A 60%, #143A5A 100%);
        --dash-center-shadow: 0 0 0 8px rgba(79, 163, 227, .18), 0 0 0 18px rgba(79, 163, 227, .07), 0 8px 26px rgba(0, 0, 0, .5);
        --dash-center-icon: #FFFFFF;
        --dash-connector: #4B5563;
        --dash-dot: var(--sd-link);
        --dash-ok: #6CE9A6;
        --dash-warn: #FEC84B;
        --dash-bad: #F97066;
    }

    /* Icon trên nút tròn giữ màu riêng từng bước, chỉ nâng sáng cho nổi trên nền tối */
    html[data-sis-theme="dark"] .sis-dash :is([class*="node-icon"], [class*="center-icon"], [class*="tile-icon"], [class*="hub-icon"], .icon-circle, .item-icon-wrap, .orbit-item, .pf-node, .sphere, .sphere-sm, [class$="-sphere"], .fn-icon) i {
        filter: brightness(1.45) saturate(1.1);
    }

    /* ── Đăng nhập (LoginComponent.razor) ────────────────────────── */
    html[data-sis-theme="dark"] [style*="erpBG.svg"] {
        background-color: #15171C;
        background-blend-mode: multiply;
    }

    html[data-sis-theme="dark"] .login_container2 {
        background-color: var(--sd-surface) !important;
        border: 1px solid var(--sd-line);
        box-shadow: 0 8px 28px rgba(0, 0, 0, .6);
    }

    html[data-sis-theme="dark"] .inputWithIcon input,
    html[data-sis-theme="dark"] .tbbassword {
        background-color: var(--sd-surface2) !important;
        border: 1px solid #52525B !important;
        box-shadow: none !important;
        color: #FFFFFF;
    }

    html[data-sis-theme="dark"] .tbbassword .inputpas {
        color: #FFFFFF;
    }

    html[data-sis-theme="dark"] .inputWithIcon input:focus,
    html[data-sis-theme="dark"] .tbbassword:focus-within {
        border-color: var(--sd-link) !important;
        box-shadow: 0 0 0 3px rgba(79, 163, 227, .3) !important;
    }

    html[data-sis-theme="dark"] .inputWithIcon i,
    html[data-sis-theme="dark"] .pasWithIcon i {
        color: var(--sd-link);
    }

    html[data-sis-theme="dark"] .pasWithIcon img {
        filter: invert(1) brightness(1.4);
    }

    html[data-sis-theme="dark"] .login-formv .text-primary,
    html[data-sis-theme="dark"] .div_right {
        color: var(--sd-link) !important;
    }

    html[data-sis-theme="dark"] .container_swap span {
        color: var(--sd-text);
    }

    /* ── Thanh cuộn ──────────────────────────────────────────────── */
    html[data-sis-theme="dark"] ::-webkit-scrollbar-track {
        background: var(--sd-bg);
    }

    html[data-sis-theme="dark"] ::-webkit-scrollbar-thumb {
        background: #4B4B52;
    }

    /* ── Thẻ người dùng + 3 popup (EmployeeCard) ─────────────────── */
    html[data-sis-theme="dark"] .emp-card {
        --emp-ink: var(--sd-text);
        --emp-muted: var(--sd-muted);
        --emp-line: var(--sd-line);
        --emp-blue: var(--sd-link);
    }

        html[data-sis-theme="dark"] .emp-card .emp-btn {
            background: var(--sd-surface2);
        }

            html[data-sis-theme="dark"] .emp-card .emp-btn:hover {
                background: var(--sd-hover);
            }

        html[data-sis-theme="dark"] .emp-card .emp-btn-out {
            color: #F97066;
        }

            html[data-sis-theme="dark"] .emp-card .emp-btn-out:hover {
                background: #3B1F1D;
            }

        html[data-sis-theme="dark"] .emp-card .emp-btn img {
            filter: brightness(1.6);
        }

    html[data-sis-theme="dark"] .emp-photo {
        background: var(--sd-surface2);
    }

    html[data-sis-theme="dark"] .emp-popup {
        --dxbl-popup-header-bg: var(--sd-surface2);
        --dxbl-popup-footer-bg: var(--sd-surface2);
    }

        html[data-sis-theme="dark"] .emp-popup .dxbl-modal-header,
        html[data-sis-theme="dark"] .emp-popup .dxbl-modal-footer {
            border-color: var(--sd-line);
        }

    html[data-sis-theme="dark"] .emp-form {
        color: var(--sd-text);
    }

        html[data-sis-theme="dark"] .emp-form label,
        html[data-sis-theme="dark"] .emp-check {
            color: var(--sd-muted);
        }

        html[data-sis-theme="dark"] .emp-form input[type="text"] {
            background: var(--sd-surface);
            border-color: var(--sd-line);
            color: var(--sd-text);
        }

    html[data-sis-theme="dark"] .emp-dropzone {
        background: var(--sd-surface);
        border-color: var(--sd-line);
    }

    html[data-sis-theme="dark"] .emp-dropzone-over {
        border-color: var(--sd-link);
        background: #1B2B3A;
    }

    html[data-sis-theme="dark"] .emp-dropzone-text {
        color: var(--sd-muted);
    }

    html[data-sis-theme="dark"] .emp-msg-err {
        background: #3B1F1D;
        color: #F97066;
    }

    html[data-sis-theme="dark"] .emp-msg-ok {
        background: #16301F;
        color: #6CE9A6;
    }

    /* ── Panel Xem nhanh của danh mục (FrmBrowseComponent) ──────── */
    html[data-sis-theme="dark"] .brw-pv {
        --brw-pv-bg: #37353D;
        --brw-pv-head-bg: #2B2A2F;
        --brw-pv-head-color: #FFFFFF;
        --brw-pv-line: rgba(255, 255, 255, .12);
        --brw-pv-label: rgba(255, 255, 255, .6);
        --brw-pv-value: #FFFFFF;
        --brw-pv-accent: var(--sd-link);
        --brw-pv-hover: rgba(255, 255, 255, .08);
    }

    html[data-sis-theme="dark"] .brw-pv-split:hover::after,
    html[data-sis-theme="dark"] .brw-pv-dragging .brw-pv-split::after {
        background: var(--sd-link);
    }

    /* ── Màu nền sáng gắn cứng trong <style> của từng màn hình (tự quét, ~260 selector) ── */
    html[data-sis-theme="dark"] #btnfilterdongy,
    html[data-sis-theme="dark"] #chatbox-container,
    html[data-sis-theme="dark"] .about-card,
    html[data-sis-theme="dark"] .apr-editor,
    html[data-sis-theme="dark"] .apr-event-r,
    html[data-sis-theme="dark"] .apr-flow-item.apr-on,
    html[data-sis-theme="dark"] .apr-flows,
    html[data-sis-theme="dark"] .apr-save,
    html[data-sis-theme="dark"] .apr-step.apr-on,
    html[data-sis-theme="dark"] .aprh-detail,
    html[data-sis-theme="dark"] .aprh-list,
    html[data-sis-theme="dark"] .aprh-table tr.aprh-on,
    html[data-sis-theme="dark"] .aprq-detail,
    html[data-sis-theme="dark"] .aprq-list,
    html[data-sis-theme="dark"] .aprq-table tr.aprq-on,
    html[data-sis-theme="dark"] .bhc-bank,
    html[data-sis-theme="dark"] .bhc-card,
    html[data-sis-theme="dark"] .bidv-acct-tabs,
    html[data-sis-theme="dark"] .bidv-tabs,
    html[data-sis-theme="dark"] .bidvcon-tabs,
    html[data-sis-theme="dark"] .bold-item,
    html[data-sis-theme="dark"] .bold-item td,
    html[data-sis-theme="dark"] .bpht-button,
    html[data-sis-theme="dark"] .bpht-menu,
    html[data-sis-theme="dark"] .bpht-menu-header,
    html[data-sis-theme="dark"] .button-container,
    html[data-sis-theme="dark"] .buttonsetting,
    html[data-sis-theme="dark"] .c2-account-edit-window,
    html[data-sis-theme="dark"] .c2-account-list-window,
    html[data-sis-theme="dark"] .c2-account-toolbar,
    html[data-sis-theme="dark"] .c2-arso-grid .c2-arso-group-row > td,
    html[data-sis-theme="dark"] .c2-arso-grid .c2-arso-summary-row > td,
    html[data-sis-theme="dark"] .c2-bckqkd-filter .c2-compact-adv-title,
    html[data-sis-theme="dark"] .c2-bctdtt2-grid .c2-bctdtt2-summary-row > td,
    html[data-sis-theme="dark"] .c2-calc-list-window,
    html[data-sis-theme="dark"] .c2-calc-toolbar,
    html[data-sis-theme="dark"] .c2-cctp-filter .c2-compact-adv-title,
    html[data-sis-theme="dark"] .c2-cogtxl1-filter .c2-compact-adv-title,
    html[data-sis-theme="dark"] .c2-covvlk1-filter .c2-compact-adv-title,
    html[data-sis-theme="dark"] .c2-covvth1-filter .c2-compact-adv-title,
    html[data-sis-theme="dark"] .c2-covvth1-grid .c2-covvth1-detail-row > td,
    html[data-sis-theme="dark"] .c2-covvth1-grid .c2-covvth1-group-row > td,
    html[data-sis-theme="dark"] .c2-fieldset-title,
    html[data-sis-theme="dark"] .c2-glcd5-ref-summary,
    html[data-sis-theme="dark"] .c2-inso2-grid .c2-inso2-group-row > td,
    html[data-sis-theme="dark"] .c2-tab-title,
    html[data-sis-theme="dark"] .c2-th2vv-filter .c2-compact-adv-title,
    html[data-sis-theme="dark"] .c2-vvcd2-filter .c2-compact-adv-title,
    html[data-sis-theme="dark"] .c2-vvcd3-grid .c2-vvcd3-summary-row > td,
    html[data-sis-theme="dark"] .c2-vvcd3-lk-summary-host .c2-vvcd3-lk-summary-row > td,
    html[data-sis-theme="dark"] .c2-vvsd1ck-grid .c2-vvsd1ck-summary-row > td,
    html[data-sis-theme="dark"] .c2-vvth2-group-dropdown > summary,
    html[data-sis-theme="dark"] .c2-vvth2-group-menu,
    html[data-sis-theme="dark"] .c2-vvth2x-group-dropdown > summary,
    html[data-sis-theme="dark"] .c2-vvth2x-group-menu,
    html[data-sis-theme="dark"] .c2-vvth3-filter .c2-compact-adv-title,
    html[data-sis-theme="dark"] .c2-zccpn2-filter .c2-compact-adv-title,
    html[data-sis-theme="dark"] .c2vvkcgv-split,
    html[data-sis-theme="dark"] .c2vvkcgv-title,
    html[data-sis-theme="dark"] .c2vvpbc-split,
    html[data-sis-theme="dark"] .c2vvpbc-title,
    html[data-sis-theme="dark"] .c2zcglls-account-shell,
    html[data-sis-theme="dark"] .c2zcglls-edit-box,
    html[data-sis-theme="dark"] .c2zcglls-picker-shell,
    html[data-sis-theme="dark"] .c2zcglls-tab,
    html[data-sis-theme="dark"] .c2zcglls-toolbar,
    html[data-sis-theme="dark"] .cabh01-bank,
    html[data-sis-theme="dark"] .cakutv-summary-row,
    html[data-sis-theme="dark"] .cm-cay-i,
    html[data-sis-theme="dark"] .cm-notify-dd,
    html[data-sis-theme="dark"] .cm-sendemail-rcps,
    html[data-sis-theme="dark"] .cmib-json,
    html[data-sis-theme="dark"] .cmkn-btn,
    html[data-sis-theme="dark"] .colsxth1-detail-caption,
    html[data-sis-theme="dark"] .colsxth2-detail-caption,
    html[data-sis-theme="dark"] .cossdmtt-group-row,
    html[data-sis-theme="dark"] .cothe-gtsp-total-row,
    html[data-sis-theme="dark"] .css-detail,
    html[data-sis-theme="dark"] .custom-add-row-bar,
    html[data-sis-theme="dark"] .cv-ocr-panel,
    html[data-sis-theme="dark"] .cv-ocr-preview,
    html[data-sis-theme="dark"] .definition-grid,
    html[data-sis-theme="dark"] .definition-toolbar,
    html[data-sis-theme="dark"] .detail-editor,
    html[data-sis-theme="dark"] .dh-tonghop,
    html[data-sis-theme="dark"] .dropdown-content,
    html[data-sis-theme="dark"] .dt-nhom,
    html[data-sis-theme="dark"] .dy-sec,
    html[data-sis-theme="dark"] .eacpdn-group-row.eacpdn-group-row,
    html[data-sis-theme="dark"] .eacpdn-group-row.eacpdn-group-row [class*="grid-cell"],
    html[data-sis-theme="dark"] .eacpdn-group-row.eacpdn-group-row td,
    html[data-sis-theme="dark"] .eacpdn-sd-table tfoot .tot td,
    html[data-sis-theme="dark"] .eadms-group-row.eadms-group-row,
    html[data-sis-theme="dark"] .eadms-group-row.eadms-group-row [class*="grid-cell"],
    html[data-sis-theme="dark"] .eadms-group-row.eadms-group-row td,
    html[data-sis-theme="dark"] .eadms-sd-table tfoot .tot td,
    html[data-sis-theme="dark"] .ebdc-grand-row.ebdc-grand-row [class*="grid-cell"],
    html[data-sis-theme="dark"] .ebdc-grand-row.ebdc-grand-row td,
    html[data-sis-theme="dark"] .ebdc-group-row.ebdc-group-row [class*="grid-cell"],
    html[data-sis-theme="dark"] .ebdc-group-row.ebdc-group-row td,
    html[data-sis-theme="dark"] .ebdc-sub-row.ebdc-sub-row [class*="grid-cell"],
    html[data-sis-theme="dark"] .ebdc-sub-row.ebdc-sub-row td,
    html[data-sis-theme="dark"] .erpd,
    html[data-sis-theme="dark"] .erpd-ctype,
    html[data-sis-theme="dark"] .erpd-rpt tr.grp td,
    html[data-sis-theme="dark"] .erpd-rpt tr.total td,
    html[data-sis-theme="dark"] .form-control.form-control-sm.form-toolbar,
    html[data-sis-theme="dark"] .form-sele,
    html[data-sis-theme="dark"] .form-toolbar,
    html[data-sis-theme="dark"] .frm-header,
    html[data-sis-theme="dark"] .fx-footer,
    html[data-sis-theme="dark"] .glcd1-summary-footer,
    html[data-sis-theme="dark"] .glcd1-summary-scroll,
    html[data-sis-theme="dark"] .glso5-summary-row,
    html[data-sis-theme="dark"] .glso5-summary-row [role="gridcell"],
    html[data-sis-theme="dark"] .glso5-summary-row td,
    html[data-sis-theme="dark"] .gltcbdv-unit-button,
    html[data-sis-theme="dark"] .gltcbdv-unit-menu,
    html[data-sis-theme="dark"] .hrbdnsthang-chart-wrapper,
    html[data-sis-theme="dark"] .hrkh-group-row.hrkh-group-row,
    html[data-sis-theme="dark"] .hrkh-group-row.hrkh-group-row [class*="grid-cell"],
    html[data-sis-theme="dark"] .hrkh-group-row.hrkh-group-row td,
    html[data-sis-theme="dark"] .hrkh-sd-table tfoot .tot td,
    html[data-sis-theme="dark"] .inbk1n2-column-side,
    html[data-sis-theme="dark"] .inbk1n2-column-title,
    html[data-sis-theme="dark"] .inbk1x2-column-side,
    html[data-sis-theme="dark"] .inbk1x2-column-title,
    html[data-sis-theme="dark"] .invoice-content,
    html[data-sis-theme="dark"] .invoice-view-container,
    html[data-sis-theme="dark"] .kbm-table td.kbm-rowno,
    html[data-sis-theme="dark"] .kbm-table th.kbm-rowno,
    html[data-sis-theme="dark"] .kbm-table tr.kbm-start td,
    html[data-sis-theme="dark"] .kkq-btn-outline,
    html[data-sis-theme="dark"] .kkq-card,
    html[data-sis-theme="dark"] .kkq-page,
    html[data-sis-theme="dark"] .kkq-stat,
    html[data-sis-theme="dark"] .kn-card,
    html[data-sis-theme="dark"] .kn-test,
    html[data-sis-theme="dark"] .kn-title,
    html[data-sis-theme="dark"] .kn-url,
    html[data-sis-theme="dark"] .kq-card,
    html[data-sis-theme="dark"] .ksxapr-row-approved,
    html[data-sis-theme="dark"] .ksxapr-row-approved > td,
    html[data-sis-theme="dark"] .locked-item,
    html[data-sis-theme="dark"] .lp-card,
    html[data-sis-theme="dark"] .maincontain,
    html[data-sis-theme="dark"] .menu-left-custom,
    html[data-sis-theme="dark"] .missing-fields,
    html[data-sis-theme="dark"] .month-table thead .month-table-sticky-inner,
    html[data-sis-theme="dark"] .month-table thead .month-table-subheader-row .month-table-sticky-inner,
    html[data-sis-theme="dark"] .month-table-sticky-inner,
    html[data-sis-theme="dark"] .of-card,
    html[data-sis-theme="dark"] .of-footer,
    html[data-sis-theme="dark"] .pf-card,
    html[data-sis-theme="dark"] .qrtl-btn,
    html[data-sis-theme="dark"] .qrtl-grid-wrap,
    html[data-sis-theme="dark"] .qrtl-sel,
    html[data-sis-theme="dark"] .sis-wait-box,
    html[data-sis-theme="dark"] .smktrbc-empty,
    html[data-sis-theme="dark"] .smktrbc-page,
    html[data-sis-theme="dark"] .smktrbc-result-panel,
    html[data-sis-theme="dark"] .summary-row,
    html[data-sis-theme="dark"] .tab-content-container,
    html[data-sis-theme="dark"] .template-tab-caption,
    html[data-sis-theme="dark"] .tm-definition,
    html[data-sis-theme="dark"] .tm-tab,
    html[data-sis-theme="dark"] .tm-toolbar,
    html[data-sis-theme="dark"] .tx-plain-grid,
    html[data-sis-theme="dark"] .tx-section,
    html[data-sis-theme="dark"] .tx-section-title,
    html[data-sis-theme="dark"] .txdb-page .txdb-card,
    html[data-sis-theme="dark"] .txdb-page .txdb-gnode,
    html[data-sis-theme="dark"] .txdb-page .txdb-k,
    html[data-sis-theme="dark"] .txdb-page .txdb-life,
    html[data-sis-theme="dark"] .txgc-box .txgc-btn,
    html[data-sis-theme="dark"] .txgc-box.txgc-full,
    html[data-sis-theme="dark"] .txgc-scroll .txgc-node,
    html[data-sis-theme="dark"] .txlf-page .txlf-doc,
    html[data-sis-theme="dark"] .txlt-preview .txlt-label,
    html[data-sis-theme="dark"] .txpk-page .txpk-card,
    html[data-sis-theme="dark"] .txpk-page .txpk-h,
    html[data-sis-theme="dark"] .txt-page .txt-card,
    html[data-sis-theme="dark"] .unit-button,
    html[data-sis-theme="dark"] .unit-menu,
    html[data-sis-theme="dark"] .unit-menu-header,
    html[data-sis-theme="dark"] .unit-select-button,
    html[data-sis-theme="dark"] .unit-select-menu,
    html[data-sis-theme="dark"] .unit-select-tools,
    html[data-sis-theme="dark"] .wchk-map .wchk-input,
    html[data-sis-theme="dark"] .white-bck {
        background-color: var(--sd-surface2) !important;
        border-color: var(--sd-line);
        color: var(--sd-text);
}

    html[data-sis-theme="dark"] .cm-dlg .cm-mg th,
    html[data-sis-theme="dark"] .cmkn-mg th,
    html[data-sis-theme="dark"] .custom-grid-wrapper table th,
    html[data-sis-theme="dark"] .dstk-tbl th,
    html[data-sis-theme="dark"] .eacpdn-sd-table thead th,
    html[data-sis-theme="dark"] .eadms-sd-table thead th,
    html[data-sis-theme="dark"] .eagt-ht-table thead th,
    html[data-sis-theme="dark"] .eaxl-ad-table thead th,
    html[data-sis-theme="dark"] .erpd-dt th,
    html[data-sis-theme="dark"] .hrkh-sd-table thead th,
    html[data-sis-theme="dark"] .kbm-table th,
    html[data-sis-theme="dark"] .kt-ct th,
    html[data-sis-theme="dark"] .mau-tbl th,
    html[data-sis-theme="dark"] .month-table thead th,
    html[data-sis-theme="dark"] .month-table-subheader-row th,
    html[data-sis-theme="dark"] .qrtl-grid thead th,
    html[data-sis-theme="dark"] .tx-plain-grid th,
    html[data-sis-theme="dark"] .txlf-doc .txlf-t th,
    html[data-sis-theme="dark"] .vc-opt-tbl thead th {
        background-color: var(--sd-surface2) !important;
        border-color: var(--sd-line);
        color: var(--sd-text) !important;
}

    html[data-sis-theme="dark"] .apr-flow-item:hover,
    html[data-sis-theme="dark"] .apr-save:hover,
    html[data-sis-theme="dark"] .aprh-table tr.aprh-row:hover,
    html[data-sis-theme="dark"] .aprq-table tr.aprq-row:hover,
    html[data-sis-theme="dark"] .bhc-bank-active,
    html[data-sis-theme="dark"] .bpht-option:hover,
    html[data-sis-theme="dark"] .c2-covvth1-grid .c2-covvth1-detail-row:hover > td,
    html[data-sis-theme="dark"] .c2-vvth2-check:hover,
    html[data-sis-theme="dark"] .c2-vvth2x-check:hover,
    html[data-sis-theme="dark"] .cabh01-bank-active,
    html[data-sis-theme="dark"] .chatinput:focus,
    html[data-sis-theme="dark"] .cm-notify-item:hover,
    html[data-sis-theme="dark"] .col-ald:hover,
    html[data-sis-theme="dark"] .custom-add-row-bar:hover,
    html[data-sis-theme="dark"] .dr-item:hover,
    html[data-sis-theme="dark"] .dropdown-content a:hover,
    html[data-sis-theme="dark"] .dropdown:hover .dropbtn,
    html[data-sis-theme="dark"] .erpd-bal:hover,
    html[data-sis-theme="dark"] .erpd-ctype:hover,
    html[data-sis-theme="dark"] .erpd-dt tr:hover td,
    html[data-sis-theme="dark"] .gltcbdv-unit-item:hover,
    html[data-sis-theme="dark"] .img-with-text:hover,
    html[data-sis-theme="dark"] .incd1tg-selected-row,
    html[data-sis-theme="dark"] .incd1tg-selected-row > td,
    html[data-sis-theme="dark"] .inddmax-selected-row,
    html[data-sis-theme="dark"] .inddmax-selected-row > td,
    html[data-sis-theme="dark"] .insd2ck-selected-row,
    html[data-sis-theme="dark"] .insd2ck-selected-row > td,
    html[data-sis-theme="dark"] .inth1n-selected-row,
    html[data-sis-theme="dark"] .inth1n-selected-row > td,
    html[data-sis-theme="dark"] .inth1ntg-selected-row,
    html[data-sis-theme="dark"] .inth1ntg-selected-row > td,
    html[data-sis-theme="dark"] .inth1x-selected-row,
    html[data-sis-theme="dark"] .inth1x-selected-row > td,
    html[data-sis-theme="dark"] .inth1xtg-selected-row,
    html[data-sis-theme="dark"] .inth1xtg-selected-row > td,
    html[data-sis-theme="dark"] .inth4n-selected-row,
    html[data-sis-theme="dark"] .inth4n-selected-row > td,
    html[data-sis-theme="dark"] .inth4x-selected-row,
    html[data-sis-theme="dark"] .inth4x-selected-row > td,
    html[data-sis-theme="dark"] .inth7n-selected-row,
    html[data-sis-theme="dark"] .inth7n-selected-row > td,
    html[data-sis-theme="dark"] .inth7x-selected-row,
    html[data-sis-theme="dark"] .inth7x-selected-row > td,
    html[data-sis-theme="dark"] .sis-grid-row-active td,
    html[data-sis-theme="dark"] .tab-active,
    html[data-sis-theme="dark"] .tab-btn:hover,
    html[data-sis-theme="dark"] .template-item:hover,
    html[data-sis-theme="dark"] .txgc-box .txgc-btn:hover,
    html[data-sis-theme="dark"] .unit-option:hover,
    html[data-sis-theme="dark"] .unit-select-item:hover {
        background-color: var(--sd-hover) !important;
        color: var(--sd-text);
}

    /* style="background:#fff" nội tuyến (nhãn nhóm, thanh trạng thái, vạch gauge...) */
    html[data-sis-theme="dark"] [style*="background:#fff"],
    html[data-sis-theme="dark"] [style*="background: #fff"],
    html[data-sis-theme="dark"] [style*="background-color:white"],
    html[data-sis-theme="dark"] [style*="background-color: white"],
    html[data-sis-theme="dark"] [style*="background-color:aliceblue"],
    html[data-sis-theme="dark"] [style*="background-color: #f8f9fa"] {
        background-color: var(--sd-surface2) !important;
        border-color: var(--sd-line) !important;
        color: var(--sd-text);
    }

    html[data-sis-theme="dark"] [style*="background:#F1F2F4"] {
        background: var(--sd-line) !important;
    }
