.dhx_grid-cell__content .mdi {
    color: var(--re-primary) !important;
}

.dhx_checkbox__input:checked + .dhx_checkbox__visual-input,
.dhx_checkbox__input[data-dhx-checked="true"] + .dhx_checkbox__visual-input {
    background-color: var(--re-primary) !important;
    border-color: var(--re-primary) !important;
}

/* ===== MenuConfig tree grid ===== */
.menuConfig-tree .dhx_grid-cell{
    border: none !important;
}
.menuConfig-tree .dhx_data-wrap {
    border-bottom: 1px solid var(--re-surface) !important;
}
/* ================================ */

.dhx_grid-content {
    background: none !important;
}

.dhx_checkbox { /* override the display: inline-block; by vault.scss which misaligned grid checkboxes*/
    display: flex;
}
.dhx_checkbox__visual-input {
    border-radius: 6px !important;
    border: 1px solid var(--re-border-strong) !important;
}

/* Round every grid/form/toolbar inside any space layout, no matter how deep */
.dhx_layout-space.dhx_layout-columns>.dhx_layout-cell {
  border: 1px solid var(--re-border) !important;
  border-radius: 10px !important;
  overflow: hidden !important;
}

.dhx_layout-space {
    background: var(--re-bg);
}

/* ---------- Grid surfaces & selection ----------------------------------- */
.dhx_grid {
    background: var(--re-surface) !important;
}

.dhx_grid-header,
.dhx_grid-header-cell {
    background: var(--re-surface-soft) !important;
    color: var(--re-ink-muted) !important;
    font-weight: 500 !important;
}

.dhx_grid-cell {
    border-bottom: 1px solid var(--re-border) !important;
    color: var(--re-ink) !important;
    background: var(--re-surface) !important;
}

.dhx_grid-cell a,
.dhx_grid-cell__content {
    color: var(--re-ink) !important;
}

.dhx_grid-row:hover .dhx_grid-cell {
    background: var(--re-primary-softer) !important;
}

.dhx_grid-row--selected .dhx_grid-cell,
.dhx_grid-row.dhx_grid-row--selected .dhx_grid-cell {
    background-color: var(--re-primary-soft) !important;
}

/* Selection text sync: classes from js/grid-selection-primary-text.js */
.dhx_grid-row.re-grid-row--selected .dhx_grid-cell,
.dhx_grid-row.re-grid-row--selected .dhx_grid-cell__content {
    color: var(--re-primary) !important;
}

.dhx_grid-row.re-grid-row--selected .dhx_grid-cell a {
    color: var(--re-primary) !important;
}

.dhx_grid-row.re-grid-row--selected .dhx_grid-cell__content .mdi {
    color: var(--re-primary) !important;
}

.dhx_grid-cell.re-grid-cell--selected,
.dhx_grid-cell.re-grid-cell--selected .dhx_grid-cell__content {
    color: var(--re-primary) !important;
}

.dhx_grid-cell.re-grid-cell--selected a {
    color: var(--re-primary) !important;
}

.dhx_grid-cell.re-grid-cell--selected .dhx_grid-cell__content .mdi {
    color: var(--re-primary) !important;
}

.dhx_grid-selected-row::after {
    background: var(--re-primary-soft) !important;
    opacity: 1 !important;
}

[data-theme="dark"] .dhx_grid-selected-row::after {
    background: var(--re-primary-soft) !important;
}

.dhx_grid-selected-cell {
    border-color: var(--re-primary) !important;
    background-color: var(--re-primary-soft) !important;
}

[data-theme="dark"] .dhx_grid-selected-cell {
    background-color: var(--re-primary-soft) !important;
}

.dhx_grid-body .dhx_grid-cell {
    border-right: 1px solid var(--re-border) !important;
}

.dhx_grid-body .dhx_grid-row > .dhx_grid-cell:last-child {
    border-right: none !important;
}

.dhx_grid-header .dhx_grid-header-cell {
    border-right: 1px solid var(--re-border) !important;
    border-bottom: 1px solid var(--re-border) !important;
}

.dhx_grid-header .dhx_grid-header-cell:last-child {
    border-right: none !important;
}

.dhx_grid-header .dhx_grid-header-cell:first-child {
    border-left: none !important;
}

.dhx_grid-header .dhx_grid-header-cell:not(:first-child) {
    border-left: none !important;
}

/* ---------- Layout borders & space gutters ------------------------------ */
.dhx_widget,
.dhx_widget--bordered,
.dhx_widget--border,
.dhx_widget--border_top,
.dhx_widget--border_right,
.dhx_widget--border_bottom,
.dhx_widget--border_left,
.dhx_layout-cell,
.dhx_layout-rows > .dhx_layout-cell,
.dhx_layout-cols > .dhx_layout-cell {
    border-color: var(--re-border) !important;
    --dhx-border: 1px solid transparent !important;
    --dhx-border-color: var(--re-border) !important;
}

.dhx_layout--type_space,
.dhx_layout-cols.dhx_layout--type_space,
.dhx_layout-rows.dhx_layout--type_space {
    background: var(--re-bg) !important;
}

/* Soft-deleted entity rows: muted red text + per-word strikethrough (.re-word-strike). */
.dhx_widget.dhx_grid .dhx_grid-row.re-grid-row-deleted .dhx_grid-cell__content,
.dhx_widget.dhx_grid .dhx_grid-row.re-grid-row-deleted .dhx_grid-cell a {
    color: #b71c1c !important;
    opacity: 0.72;
}

.dhx_widget.dhx_grid .dhx_grid-row.re-grid-row-deleted .dhx_grid-cell {
    color: #b71c1c !important;
}

.dhx_widget.dhx_grid .dhx_grid-row.re-grid-row-deleted .re-word-strike {
    text-decoration: line-through;
    text-decoration-color: #b71c1c;
    text-decoration-thickness: 1px;
    text-decoration-skip-ink: none;
}

.dhx_widget.dhx_grid .dhx_grid-row.re-grid-row-deleted .dhx_grid-cell__content .mdi {
    color: #b71c1c !important;
}

.dhx_widget.dhx_grid .dhx_grid-row.re-grid-row-deleted.re-grid-row--selected .dhx_grid-cell__content,
.dhx_widget.dhx_grid .dhx_grid-row.re-grid-row-deleted.dhx_grid-row--selected .dhx_grid-cell__content {
    color: #b71c1c !important;
    opacity: 0.78;
}

.dhx_widget.dhx_grid .dhx_grid-row.re-grid-row-deleted.re-grid-row--selected .dhx_grid-cell__content .mdi,
.dhx_widget.dhx_grid .dhx_grid-row.re-grid-row-deleted.dhx_grid-row--selected .dhx_grid-cell__content .mdi {
    color: #b71c1c !important;
}

[data-theme="dark"] .dhx_widget.dhx_grid .dhx_grid-row.re-grid-row-deleted .dhx_grid-cell__content,
[data-theme="dark"] .dhx_widget.dhx_grid .dhx_grid-row.re-grid-row-deleted .dhx_grid-cell a {
    color: #fecaca !important;
    opacity: 0.72;
}

[data-theme="dark"] .dhx_widget.dhx_grid .dhx_grid-row.re-grid-row-deleted .dhx_grid-cell {
    color: #fecaca !important;
}

[data-theme="dark"] .dhx_widget.dhx_grid .dhx_grid-row.re-grid-row-deleted .re-word-strike {
    text-decoration-color: #fecaca;
}

[data-theme="dark"] .dhx_widget.dhx_grid .dhx_grid-row.re-grid-row-deleted .dhx_grid-cell__content .mdi {
    color: #fecaca !important;
}

[data-theme="dark"] .dhx_widget.dhx_grid .dhx_grid-row.re-grid-row-deleted.re-grid-row--selected .dhx_grid-cell__content,
[data-theme="dark"] .dhx_widget.dhx_grid .dhx_grid-row.re-grid-row-deleted.dhx_grid-row--selected .dhx_grid-cell__content {
    color: #fecaca !important;
    opacity: 0.78;
}

[data-theme="dark"] .dhx_widget.dhx_grid .dhx_grid-row.re-grid-row-deleted.re-grid-row--selected .dhx_grid-cell__content .mdi,
[data-theme="dark"] .dhx_widget.dhx_grid .dhx_grid-row.re-grid-row-deleted.dhx_grid-row--selected .dhx_grid-cell__content .mdi {
    color: #fecaca !important;
}