/* Theme Xanh: chỉ có hiệu lực khi sisTheme gắn data-sis-theme="blue" lên <html>.
   Control DevExpress lấy primary #1072B9 từ blazing-blue; file này đưa form và các dashboard phân hệ
   (mỗi trang một bảng màu cam/tím/kem riêng) về cùng một tông xanh. */
html[data-sis-theme="blue"] {
    --sb-primary: #1072B9;
    --sb-primary-dark: #0B5A93;
    --sb-ink: #0B3D66;
    --sb-text: #1F3A56;
    --sb-tint: #EAF3FB;
    --sb-tint2: #F5F9FD;
    --sb-line: #C9DFF2;
    --sb-hover: #DCEBF8;
}

    /* ── Control DevExpress: tiêu đề lưới, popup, group ──────────── */
    html[data-sis-theme="blue"] .dxbl-grid {
        --dxbl-grid-header-bg: var(--sb-tint);
        --dxbl-grid-header-color: var(--sb-ink);
    }

    html[data-sis-theme="blue"] .dxbl-modal {
        --dxbl-popup-header-bg: var(--sb-tint);
    }

    html[data-sis-theme="blue"] .dxbl-modal .dxbl-modal-header {
        color: var(--sb-ink);
        border-bottom-color: var(--sb-line);
    }

    html[data-sis-theme="blue"] .dxbl-group {
        --dxbl-group-header-bg: var(--sb-tint);
        --dxbl-group-header-color: var(--sb-ink);
    }

    html[data-sis-theme="blue"] .dxbl-fl {
        --dxbl-fl-group-header-bg: var(--sb-tint);
        --dxbl-fl-group-header-color: var(--sb-ink);
    }

    html[data-sis-theme="blue"] .css-header-grp {
        background: var(--sb-tint) !important;
    }

    html[data-sis-theme="blue"] .form-toolbar {
        background-color: var(--sb-tint) !important;
        border-bottom: 1px solid var(--sb-line);
    }

    html[data-sis-theme="blue"] .dx-total-box dxbl-group-control {
        border-color: var(--sb-line) !important;
    }

    /* ── Dashboard quy trình: bảng màu cho sis-dash.css ─────────── */
    html[data-sis-theme="blue"] {
        --dash-page: transparent;
        --dash-surface: #FFFFFF;
        --dash-line-soft: var(--sb-line);
        --dash-shadow: 0 1px 4px rgba(16, 114, 185, .10);
        --dash-title: var(--sb-primary);
        --dash-text: var(--sb-ink);
        --dash-muted: #5B7A99;
        --dash-accent: var(--sb-primary);
        --dash-item-bg: var(--sb-tint2);
        --dash-item-line: var(--sb-line);
        --dash-item-hover-bg: var(--sb-hover);
        --dash-item-icon: var(--sb-primary);
        --dash-item-text: var(--sb-text);
        --dash-node-bg: radial-gradient(circle at 35% 28%, #FFFFFF 0%, #F2F8FD 45%, #DCEBF8 100%);
        --dash-node-line: var(--sb-line);
        --dash-node-outline: #FFFFFF;
        --dash-node-shadow: 0 0 0 5px rgba(16, 114, 185, .10), 0 4px 14px rgba(16, 114, 185, .18);
        --dash-node-shadow-hover: 0 0 0 5px rgba(16, 114, 185, .22), 0 6px 18px rgba(16, 114, 185, .28);
        --dash-center-bg: radial-gradient(circle at 35% 28%, #3E9BE0 0%, #1072B9 55%, #0B5A93 100%);
        --dash-center-shadow: 0 0 0 8px rgba(16, 114, 185, .14), 0 0 0 18px rgba(16, 114, 185, .07), 0 8px 24px rgba(16, 114, 185, .35);
        --dash-center-icon: #FFFFFF;
        --dash-connector: #A9CDEB;
        --dash-dot: var(--sb-primary);
        --dash-ok: #067647;
        --dash-warn: #B54708;
        --dash-bad: #B42318;
    }

    /* Theme Xanh: mọi icon trên nút tròn cùng một màu xanh */
    html[data-sis-theme="blue"] .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 {
        color: var(--sb-primary) !important;
    }

    /* Bản mobile: các khối màu đổi thành dải xanh */
    html[data-sis-theme="blue"] .sis-dash :is(.mobile-blue, .mobile-green, .mobile-orange, .mobile-purple, .mobile-teal, [class*="-mobile-blue"], [class*="-mobile-green"], [class*="-mobile-orange"], [class*="-mobile-purple"]) {
        background: linear-gradient(135deg, #0B5A93 0%, #1072B9 100%) !important;
    }

    /* ── Panel Xem nhanh của danh mục (FrmBrowseComponent) ──────── */
    html[data-sis-theme="blue"] .brw-pv {
        --brw-pv-bg: #FFFFFF;
        --brw-pv-head-bg: var(--sb-tint);
        --brw-pv-head-color: var(--sb-ink);
        --brw-pv-line: var(--sb-line);
        --brw-pv-label: #5B7A99;
        --brw-pv-value: var(--sb-text);
        --brw-pv-accent: var(--sb-primary);
        --brw-pv-hover: var(--sb-hover);
    }
