.native-grid-shell {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
    min-height: 0;
    height: 100%;
}

.native-grid-toolbar,
.native-grid-pager {
    display: flex;
    align-items: center;
    flex: 0 0 auto;
    flex-wrap: wrap;
    gap: 8px;
}

.native-grid-toolbar {
    justify-content: space-between;
    padding: 8px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
}

.native-grid-toolbar-main,
.native-grid-toolbar-end {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.native-grid-toolbar-end {
    margin-left: auto;
}

.native-grid-search input,
.native-grid-pager select {
    min-height: 34px;
    padding: 6px 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    color: var(--text);
}

.native-grid-search input {
    min-width: 260px;
}

.native-grid-toolbar button,
.native-grid-pager button,
.native-grid-export,
.native-grid-download,
.native-grid-column-menu summary,
.native-grid-legend-button {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 34px;
    padding: 6px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    color: var(--text);
    text-decoration: none;
    cursor: pointer;
}

.native-grid-primary {
    background: var(--accent-soft);
    border-color: var(--accent);
    color: var(--accent);
}

.native-grid-danger {
    border-color: var(--danger);
    color: var(--danger);
}

.native-grid-column-menu {
    position: relative;
}

.native-grid-column-list {
    position: absolute;
    left: 0;
    top: calc(100% + 6px);
    z-index: 20;
    display: grid;
    gap: 6px;
    min-width: 210px;
    max-height: 320px;
    overflow: auto;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
}

.native-grid-column-list label {
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    font-size: 12px;
    text-transform: uppercase;
}

.native-grid-frame {
    position: relative;
    flex: 1 1 auto;
    overflow-x: hidden;
    overflow-y: auto;
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: var(--card-shadow);
}

.native-grid {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    table-layout: fixed;
    border-collapse: separate;
    border-spacing: 0;
    border: 0;
}

.native-grid th,
.native-grid td {
    padding: 8px 10px;
    text-align: left;
    vertical-align: top;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.native-grid-header-cell {
    position: relative;
    user-select: none;
}

.native-grid-filter-row th {
    padding: 6px 8px;
}

.native-grid-filter-cell input,
.native-grid-filter-cell select {
    width: 100%;
    min-height: 30px;
    padding: 4px 8px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--surface);
    color: var(--text);
}

.native-grid-header-title {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    padding-left: 18px;
    padding-right: 16px;
}

.native-grid-actions-header,
.native-grid-actions-cell,
.native-grid-bool {
    text-align: center;
}

.native-grid-actions-cell {
    white-space: nowrap;
}

.native-grid-icon-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    margin: 0 2px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--surface);
    color: var(--text);
    cursor: pointer;
}

.native-grid-icon-button-info,
.status-bool-icon-admin {
    color: var(--accent);
}

.native-grid-icon-button-danger,
.status-bool-icon-alarm {
    color: var(--danger);
}

.native-grid-icon-button-permissions {
    color: var(--success);
}
.native-grid-selectable-row {
    cursor: pointer;
}

.native-grid-row-selected > td,
.native-grid-row-selected.dxbl-grid-focused-row > td {
    background: var(--accent-soft) !important;
}


.native-grid-command-icon,
.native-grid-action-icon,
.status-bool-icon .businesslog-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.native-grid-command-icon,
.native-grid-action-icon {
    width: 16px;
    height: 16px;
}

.status-bool-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 999px;
    font-size: 18px;
}

.status-bool-icon .businesslog-icon {
    width: 20px;
    height: 20px;
}

.status-bool-icon-on {
    color: #15803d;
}

.status-bool-icon-off {
    color: #dc2626;
}

.status-bool-icon-admin {
    color: #2563eb;
}

.status-bool-icon-alarm {
    background: transparent;
    color: #dc2626;
}

.status-bool-icon-custom {
    color: #d4a017;
}

.status-bool-icon-lock {
    color: #8b0000;
}

.status-bool-icon-admin .status-bool-svg,
.status-bool-icon-admin .status-bool-svg img,
.status-bool-icon-admin .status-bool-svg svg,
.status-bool-icon-alarm .status-bool-svg,
.status-bool-icon-alarm .status-bool-svg img,
.status-bool-icon-alarm .status-bool-svg svg,
.status-bool-icon-custom .status-bool-svg,
.status-bool-icon-custom .status-bool-svg img,
.status-bool-icon-custom .status-bool-svg svg,
.status-bool-icon-lock .status-bool-svg,
.status-bool-icon-lock .status-bool-svg img,
.status-bool-icon-lock .status-bool-svg svg {
    width: 22px;
    height: 22px;
}

.event-color-dot {
    display: inline-block;
    width: 16px;
    height: 16px;
    border-radius: 999px;
}

.ml-indicator,
.ml-indicator-dot {
    display: inline-block;
}

.ml-indicator-dot {
    width: 14px;
    height: 14px;
    border-radius: 999px;
}

.ml-indicator-clock {
    position: relative;
    width: 14px;
    height: 14px;
    border: 2px solid currentColor;
    border-radius: 999px;
    background: transparent;
}

.ml-indicator-clock::before,
.ml-indicator-clock::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    background: currentColor;
    transform-origin: bottom center;
}

.ml-indicator-clock::before {
    width: 2px;
    height: 4px;
    transform: translate(-50%, -100%);
}

.ml-indicator-clock::after {
    width: 4px;
    height: 2px;
    transform: translate(0, -50%);
}

.ml-indicator-green {
    background: #15803d;
    color: #15803d;
}

.ml-indicator-yellow {
    background: #f59e0b;
    color: #f59e0b;
}

.ml-indicator-red {
    background: #991b1b;
    color: #991b1b;
}

.ml-indicator-blue {
    background: transparent;
    color: #2563eb;
}

.ml-indicator-clock.ml-indicator-red,
.ml-indicator-clock.ml-indicator-blue {
    background: transparent;
}

.native-grid-load-panel {
    position: absolute;
    inset: 0;
    z-index: 30;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, .08);
}

.native-grid-load-panel-content {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-height: 58px;
    padding: 14px 18px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
}

.native-grid-load-spinner {
    display: inline-block;
    width: 24px;
    height: 24px;
    border: 3px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 999px;
    animation: native-grid-spin .8s linear infinite;
}

.native-grid-load-message {
    font-size: 14px;
    font-weight: 600;
}

@keyframes native-grid-spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.native-grid-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(0, 0, 0, .28);
}

.native-grid-modal {
    width: min(720px, 100%);
    max-width: 720px;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
}

.native-grid-confirm-modal {
    max-width: 420px;
}

.native-grid-message-modal {
    display: flex;
    flex-direction: column;
    width: min(780px, calc(100vw - 24px));
    max-width: 780px;
    max-height: calc(100vh - 48px);
}

.native-grid-sheet-modal,
.native-grid-permissions-modal {
    width: min(1180px, calc(100vw - 24px));
    max-width: 1180px;
}

.native-grid-sheet-modal {
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 48px);
}

.native-grid-legend-modal {
    max-width: 420px;
}

.native-grid-modal-header,
.native-grid-modal-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
}

.native-grid-modal-header {
    border-bottom: 1px solid var(--border);
    font-weight: 600;
}

.native-grid-modal-footer {
    border-top: 1px solid var(--border);
}

.native-grid-modal-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.native-grid-modal-actions > .native-grid-icon-button {
    width: 34px;
    min-width: 34px;
    height: 34px;
    min-height: 34px;
    margin: 0;
    border-radius: 8px;
}

.native-grid-message-body {
    flex: 1 1 auto;
    min-height: 0;
    max-height: calc(100vh - 160px);
    overflow: auto;
}

.native-grid-message-html {
    padding: 16px;
}

pre.native-grid-message-body {
    margin: 0;
    padding: 16px;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    word-break: break-word;
    font-family: var(--dxds-font-family-monospace, Consolas, monospace);
    font-size: 13px;
    line-height: 1.45;
    background: var(--surface);
    color: var(--text);
}

.machine-sheet {
    display: grid;
    gap: 16px;
}

.machine-sheet-title {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.machine-sheet-title > div:first-child {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.machine-sheet-title strong {
    font-size: 20px;
    line-height: 1.2;
}

.machine-sheet-title span {
    color: var(--muted);
}

.machine-sheet-badge {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 6px 12px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface-2);
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.machine-sheet-kpis,
.machine-sheet-sections,
.native-grid-permissions-body {
    display: grid;
    gap: 12px;
    align-items: start;
}

.machine-sheet-kpis {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.machine-sheet-sections,
.native-grid-permissions-body {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.native-grid-permissions-body {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-height: min(66vh, 720px);
    overflow: auto;
    padding: 12px;
}

.machine-sheet-kpi,
.machine-sheet-section,
.machine-sheet-table,
.native-grid-permission-section {
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
}

.machine-sheet-kpi {
    padding: 10px;
}

.machine-sheet-kpi strong {
    display: block;
    margin-top: 6px;
    font-size: 20px;
    line-height: 1.2;
    word-break: break-word;
}

.machine-sheet-kpi span,
.machine-sheet-section dt,
.dx-ml-filter-empty {
    color: var(--muted);
}

.machine-sheet-section h3,
.machine-sheet-table > summary,
.native-grid-permission-section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin: 0;
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
    background: var(--surface-2);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.machine-sheet-section dl {
    margin: 0;
    padding: 8px 12px 10px;
}

.machine-sheet-section dd {
    min-width: 0;
    margin: 0;
    word-break: break-word;
}

.machine-sheet-section dl div {
    display: grid;
    grid-template-columns: minmax(100px, 38%) minmax(0, 1fr);
    gap: 8px;
    padding: 6px 0;
    border-bottom: 1px solid var(--border);
}

.machine-sheet-section dl div:last-child {
    border-bottom: 0;
}

.machine-sheet-tabs {
    display: grid;
    gap: 12px;
}

.machine-sheet-table {
    align-self: start;
}

.machine-sheet-table > summary {
    list-style: none;
    cursor: pointer;
}

.machine-sheet-table > summary::-webkit-details-marker {
    display: none;
}

.machine-sheet-table-title,
.machine-sheet-table-meta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.machine-sheet-table-meta {
    color: var(--muted);
    font-size: 11px;
}

.machine-sheet-table-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 24px;
    padding: 3px 8px;
    border: 1px solid var(--accent-soft);
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 11px;
    font-weight: 600;
    text-transform: none;
    letter-spacing: normal;
}

.machine-sheet-table-toggle-open,
.machine-sheet-table-toggle-closed {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.machine-sheet-table-toggle-icon,
.machine-sheet-table-toggle-icon svg {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
}

.machine-sheet-table-toggle-icon svg {
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.machine-sheet-table[open] .machine-sheet-table-toggle-closed,
.machine-sheet-table:not([open]) .machine-sheet-table-toggle-open {
    display: none;
}

.machine-sheet-table:not([open]) table,
.machine-sheet-table:not([open]) .machine-sheet-empty {
    display: none;
}

.machine-sheet-table table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.machine-sheet-table th,
.machine-sheet-table td {
    padding: 8px 10px;
    text-align: left;
    vertical-align: top;
    border-top: 1px solid var(--border);
    word-break: break-word;
}

.machine-sheet-table th {
    color: var(--muted);
    background: var(--surface-2);
    font-size: 12px;
    font-weight: 600;
}

.machine-sheet-empty {
    padding: 18px 12px;
    color: var(--muted);
}

.machine-sheet-bool {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 999px;
}

.machine-sheet-bool svg {
    display: block;
    width: 14px;
    height: 14px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.machine-sheet-bool-true {
    color: var(--success);
}

.machine-sheet-bool-false {
    color: var(--danger);
}

.native-grid-permission-rows {
    display: grid;
}

.native-grid-permission-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
    padding: 8px 18px 8px 10px;
    border-bottom: 1px solid var(--border);
}

.native-grid-permission-row:last-child {
    border-bottom: 0;
}

.native-grid-permission-options {
    display: flex;
    gap: 5px;
    justify-content: flex-end;
    min-width: max-content;
}

.native-grid-permission-option {
    min-width: 104px;
}

.native-grid-permission-option.permission-state-1 {
    min-width: 132px;
}

.native-grid-permission-option.selected {
    background: var(--accent-soft);
    border-color: var(--accent);
    color: var(--accent);
}

.dx-export-grid-host {
    position: fixed;
    top: -10000px;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.dx-log-grid-frame {
    position: relative;
    flex: 1 1 auto;
    width: 100%;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: hidden;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
    box-shadow: var(--card-shadow);
}

.dx-log-grid,
.dx-log-grid .dxbl-grid-root,
.dx-log-grid .dxbl-grid-container {
    --dx-log-row-even-bg: var(--surface);
    --dx-log-row-odd-bg: var(--surface-2);
    --dx-log-row-text: var(--text);
    --dxbl-grid-cell-bg: var(--surface);
    --dxbl-grid-cell-color: var(--text);
    width: 100%;
    max-width: 100%;
    height: 100%;
    min-height: 160px;
    overflow-x: hidden;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

.dx-log-grid .dxbl-grid-table {
    width: 100%;
    table-layout: fixed;
    border-collapse: separate !important;
    border-spacing: 0 !important;
    border: 0 !important;
}

.dx-log-grid .dxbl-grid-table,
.dx-log-grid .dxbl-grid-table > thead,
.dx-log-grid .dxbl-grid-table > tbody,
.dx-log-grid .dxbl-grid-table > tfoot {
    border-radius: 0 !important;
    box-shadow: none !important;
}

.dx-log-grid .dxbl-grid-table :is(th, td) {
    border-left-color: transparent !important;
    border-right-color: transparent !important;
    border-top-color: transparent !important;
    border-bottom-color: transparent !important;
}

.dx-log-grid .dxbl-grid-table > thead > tr.dxbl-grid-editor-inplace-container > td {
    background-color: var(--surface-2) !important;
    box-shadow: inset 0 1px 0 var(--border), inset 0 -1px 0 var(--border);
}

.dx-log-grid .dxbl-grid-table > thead > tr.dxbl-grid-editor-inplace-container > td > .dxbl-text-edit {
    --dxbl-text-edit-bg: var(--surface);
    --dxbl-text-edit-border-color: var(--border-strong);
    --dxbl-text-edit-border-hovered-color: var(--accent);
    --dxbl-text-edit-border-active-color: var(--accent);
    --dxbl-text-edit-placeholder-color: var(--muted);
}

.dx-log-grid .dxbl-grid-table > thead > tr.dxbl-grid-editor-inplace-container > td > .dxbl-text-edit > .dxbl-btn.dxbl-edit-btn-dropdown,
.dx-log-grid .dxbl-grid-table > thead > tr.dxbl-grid-editor-inplace-container > td > .dxbl-text-edit > .dxbl-btn.dxbl-edit-btn-clear,
.dx-log-grid .dxbl-grid-table > thead > tr.dxbl-grid-editor-inplace-container > td > .dxbl-text-edit > .dxbl-btn-group > .dxbl-btn.dxbl-edit-btn-dropdown,
.dx-log-grid .dxbl-grid-table > thead > tr.dxbl-grid-editor-inplace-container > td > .dxbl-text-edit > .dxbl-btn-group > .dxbl-btn.dxbl-edit-btn-clear {
    --dxbl-btn-bg: var(--surface);
    --dxbl-btn-hover-bg: var(--surface-3);
}

.dx-log-grid .dx-log-grid-header-context {
    cursor: context-menu;
}

.dx-log-grid .dxbl-grid-header-content .dxbl-grid-filter-menu-funnel-btn {
    opacity: 0;
    pointer-events: none;
    transition: opacity .12s ease;
}

.dx-log-grid .dx-log-grid-header-context:hover .dxbl-grid-header-content .dxbl-grid-filter-menu-funnel-btn,
.dx-log-grid .dx-log-grid-header-context:focus-within .dxbl-grid-header-content .dxbl-grid-filter-menu-funnel-btn {
    opacity: 1;
    pointer-events: auto;
}

.dx-log-grid .dxbl-grid-table > tbody > tr.dx-log-row-even > td {
    --dxbl-grid-cell-bg: var(--dx-log-row-bg, var(--dx-log-row-even-bg));
    --dxbl-grid-cell-color: var(--dx-log-row-color, var(--dx-log-row-text));
    background: var(--dx-log-row-bg, var(--dx-log-row-even-bg)) !important;
    background-color: var(--dx-log-row-bg, var(--dx-log-row-even-bg)) !important;
    color: var(--dx-log-row-color, var(--dx-log-row-text)) !important;
}

.dx-log-grid .dxbl-grid-table > tbody > tr.dx-log-row-odd > td {
    --dxbl-grid-cell-bg: var(--dx-log-row-bg, var(--dx-log-row-odd-bg));
    --dxbl-grid-cell-color: var(--dx-log-row-color, var(--dx-log-row-text));
    background: var(--dx-log-row-bg, var(--dx-log-row-odd-bg)) !important;
    background-color: var(--dx-log-row-bg, var(--dx-log-row-odd-bg)) !important;
    color: var(--dx-log-row-color, var(--dx-log-row-text)) !important;
}

.dx-log-grid .dxbl-grid-table > tbody > tr.dx-log-row-even > td *,
.dx-log-grid .dxbl-grid-table > tbody > tr.dx-log-row-odd > td * {
    color: inherit !important;
}

[data-bs-theme="dark"] .dx-log-grid-frame {
    background: var(--surface);
    border-color: var(--border);
}

[data-bs-theme="dark"] .dx-log-grid,
[data-bs-theme="dark"] .dx-log-grid .dxbl-grid-root,
[data-bs-theme="dark"] .dx-log-grid .dxbl-grid-container,
[data-bs-theme="dark"] .dx-log-grid .dxbl-grid-table {
    --dx-log-row-even-bg: #2b2b2b;
    --dx-log-row-odd-bg: #363636;
    --dx-log-row-text: #f5f7fa;
    --dxbl-grid-cell-bg: #2b2b2b;
    --dxbl-grid-cell-color: #f5f7fa;
    color: var(--text) !important;
}

[data-bs-theme="dark"] .dx-log-grid .dxbl-grid-table th,
[data-bs-theme="dark"] .dx-log-grid .dxbl-grid-table td {
    color: inherit !important;
}

[data-bs-theme="dark"] .dx-log-grid .dxbl-grid-table > thead > tr.dxbl-grid-editor-inplace-container > td {
    background-color: var(--surface-3) !important;
    box-shadow: inset 0 1px 0 var(--border-strong), inset 0 -1px 0 var(--border-strong);
}

[data-bs-theme="dark"] .dx-log-grid .dxbl-grid-table > thead > tr.dxbl-grid-editor-inplace-container > td > .dxbl-text-edit {
    --dxbl-text-edit-bg: var(--surface);
    --dxbl-text-edit-color: var(--text);
    --dxbl-text-edit-border-color: var(--border-strong);
    --dxbl-text-edit-border-hovered-color: var(--accent);
    --dxbl-text-edit-border-active-color: var(--accent);
    --dxbl-text-edit-placeholder-color: var(--muted);
    --dxbl-text-edit-btn-color: var(--muted);
    --dxbl-text-edit-btn-hover-color: var(--text);
}

[data-bs-theme="dark"] .dx-log-grid .dxbl-grid-table > tbody > tr.dx-log-row-even > td {
    --dxbl-grid-cell-bg: var(--dx-log-row-bg, var(--dx-log-row-even-bg));
    --dxbl-grid-cell-color: var(--dx-log-row-color, var(--dx-log-row-text));
    background: var(--dx-log-row-bg, var(--dx-log-row-even-bg)) !important;
    background-color: var(--dx-log-row-bg, var(--dx-log-row-even-bg)) !important;
    color: var(--dx-log-row-color, var(--dx-log-row-text)) !important;
}

[data-bs-theme="dark"] .dx-log-grid .dxbl-grid-table > tbody > tr.dx-log-row-odd > td {
    --dxbl-grid-cell-bg: var(--dx-log-row-bg, var(--dx-log-row-odd-bg));
    --dxbl-grid-cell-color: var(--dx-log-row-color, var(--dx-log-row-text));
    background: var(--dx-log-row-bg, var(--dx-log-row-odd-bg)) !important;
    background-color: var(--dx-log-row-bg, var(--dx-log-row-odd-bg)) !important;
    color: var(--dx-log-row-color, var(--dx-log-row-text)) !important;
}

[data-bs-theme="dark"] .dx-log-grid tr.dx-log-row-even,
[data-bs-theme="dark"] .dx-log-grid tr.dx-log-row-even > td {
    --dxbl-grid-cell-bg: var(--dx-log-row-bg, var(--dx-log-row-even-bg));
    --dxbl-grid-cell-color: var(--dx-log-row-color, var(--dx-log-row-text));
    background: var(--dx-log-row-bg, var(--dx-log-row-even-bg)) !important;
    background-color: var(--dx-log-row-bg, var(--dx-log-row-even-bg)) !important;
    color: var(--dx-log-row-color, var(--dx-log-row-text)) !important;
}

[data-bs-theme="dark"] .dx-log-grid tr.dx-log-row-odd,
[data-bs-theme="dark"] .dx-log-grid tr.dx-log-row-odd > td {
    --dxbl-grid-cell-bg: var(--dx-log-row-bg, var(--dx-log-row-odd-bg));
    --dxbl-grid-cell-color: var(--dx-log-row-color, var(--dx-log-row-text));
    background: var(--dx-log-row-bg, var(--dx-log-row-odd-bg)) !important;
    background-color: var(--dx-log-row-bg, var(--dx-log-row-odd-bg)) !important;
    color: var(--dx-log-row-color, var(--dx-log-row-text)) !important;
}

[data-bs-theme="dark"] .dx-log-grid tr.dx-log-row-even > td *,
[data-bs-theme="dark"] .dx-log-grid tr.dx-log-row-odd > td * {
    color: inherit !important;
}

.dx-log-grid .status-bool-icon.status-bool-icon-on,
.dx-log-grid .status-bool-icon.status-bool-icon-on *,
.dx-log-grid .status-bool-icon.status-bool-icon-off,
.dx-log-grid .status-bool-icon.status-bool-icon-off *,
.dx-log-grid .status-bool-icon.status-bool-icon-admin,
.dx-log-grid .status-bool-icon.status-bool-icon-admin *,
.dx-log-grid .status-bool-icon.status-bool-icon-alarm,
.dx-log-grid .status-bool-icon.status-bool-icon-alarm *,
.dx-log-grid .status-bool-icon.status-bool-icon-custom,
.dx-log-grid .status-bool-icon.status-bool-icon-custom *,
.dx-log-grid .status-bool-icon.status-bool-icon-lock,
.dx-log-grid .status-bool-icon.status-bool-icon-lock * {
    color: inherit;
}

.dx-log-grid .status-bool-icon.status-bool-icon-on,
.dx-log-grid .status-bool-icon.status-bool-icon-on * {
    color: #15803d !important;
}

.dx-log-grid .status-bool-icon.status-bool-icon-off,
.dx-log-grid .status-bool-icon.status-bool-icon-off * {
    color: #dc2626 !important;
}

.dx-log-grid .status-bool-icon.status-bool-icon-admin,
.dx-log-grid .status-bool-icon.status-bool-icon-admin * {
    color: #2563eb !important;
}

.dx-log-grid .status-bool-icon.status-bool-icon-alarm,
.dx-log-grid .status-bool-icon.status-bool-icon-alarm * {
    color: #dc2626 !important;
}

.dx-log-grid .status-bool-icon.status-bool-icon-alarm {
    background: transparent !important;
    background-color: transparent !important;
}

.dx-log-grid .status-bool-icon.status-bool-icon-custom,
.dx-log-grid .status-bool-icon.status-bool-icon-custom * {
    color: #eab308 !important;
}

.dx-log-grid .status-bool-icon.status-bool-icon-lock,
.dx-log-grid .status-bool-icon.status-bool-icon-lock * {
    color: #dc2626 !important;
}

.dx-log-grid .status-bool-icon.status-bool-icon-on .status-bool-svg svg,
.dx-log-grid .status-bool-icon.status-bool-icon-on .status-bool-svg svg * {
    color: #15803d !important;
    stroke: #15803d !important;
}

.dx-log-grid .status-bool-icon.status-bool-icon-off .status-bool-svg svg,
.dx-log-grid .status-bool-icon.status-bool-icon-off .status-bool-svg svg * {
    color: #dc2626 !important;
    stroke: #dc2626 !important;
}

.dx-log-grid .status-bool-icon.status-bool-icon-admin .status-bool-svg svg,
.dx-log-grid .status-bool-icon.status-bool-icon-admin .status-bool-svg svg * {
    color: #2563eb !important;
    fill: #2563eb !important;
    stroke: #2563eb !important;
}

.dx-log-grid .status-bool-icon.status-bool-icon-alarm .status-bool-svg svg,
.dx-log-grid .status-bool-icon.status-bool-icon-alarm .status-bool-svg svg * {
    color: #dc2626 !important;
    fill: #dc2626 !important;
    stroke: #dc2626 !important;
}

.dx-log-grid .status-bool-icon.status-bool-icon-alarm .status-bool-svg {
    background: #dc2626 !important;
    background-color: #dc2626 !important;
    mask: url("/icons/businesslog/action_bell.svg") center / contain no-repeat;
    -webkit-mask: url("/icons/businesslog/action_bell.svg") center / contain no-repeat;
}

.dx-log-grid .status-bool-icon.status-bool-icon-alarm .status-bool-svg img {
    display: none;
}

.dx-log-grid .status-bool-icon.status-bool-icon-custom .status-bool-svg svg,
.dx-log-grid .status-bool-icon.status-bool-icon-custom .status-bool-svg svg * {
    color: #eab308 !important;
    fill: #eab308 !important;
    stroke: #eab308 !important;
}

.dx-log-grid .status-bool-icon.status-bool-icon-lock .status-bool-svg svg,
.dx-log-grid .status-bool-icon.status-bool-icon-lock .status-bool-svg svg * {
    color: #dc2626 !important;
    fill: #dc2626 !important;
    stroke: #dc2626 !important;
}

.dx-log-grid .status-bool-icon.status-bool-icon-on .status-bool-svg svg path,
.dx-log-grid .status-bool-icon.status-bool-icon-off .status-bool-svg svg path {
    fill: none !important;
}

.dx-log-actions-cell {
    gap: 4px;
    padding: 0;
    border-bottom: 0;
}

.dx-ml-filter-combo {
    width: 100%;
}

.dx-ml-filter-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 20px;
}

.dashboard-soc-panel .native-grid-shell,
.dashboard-soc-panel .dx-log-grid-frame,
.dashboard-soc-panel .dx-log-grid {
    flex: 1 1 auto;
    height: 100%;
    min-height: 0;
    width: 100%;
}

.dashboard-soc-panel .native-grid-shell {
    gap: 0;
    height: 100%;
    padding: 10px 12px 12px;
}

.dashboard-soc-panel .dx-log-grid-frame {
    overflow-x: hidden;
    overflow-y: hidden;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

.dashboard-soc-panel .dxbl-grid,
.dashboard-soc-panel .dxbl-grid-root,
.dashboard-soc-panel .dxbl-grid-container {
    width: 100%;
    height: 100%;
    min-height: 0;
}

.dashboard-soc-panel .dxbl-grid-table td,
.dashboard-soc-panel .dxbl-grid-table td *,
.dx-log-grid .virtual-soc-message-cell {
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: normal;
}

.blazor-table-host table {
    width: 100%;
    border-collapse: collapse;
}

.blazor-table-host th,
.blazor-table-host td {
    padding: 8px 10px;
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid var(--border);
}

#blazor-error-ui {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 10000;
    display: none;
    padding: 8px 16px;
    background: var(--surface-3);
    border-top: 1px solid var(--border);
}

#blazor-error-ui .dismiss {
    position: absolute;
    right: 12px;
    top: 8px;
    cursor: pointer;
}

@media (max-width: 960px) {
    .machine-sheet-kpis,
    .machine-sheet-sections,
    .native-grid-permissions-body {
        grid-template-columns: 1fr;
    }

    .machine-sheet-title {
        flex-direction: column;
        align-items: stretch;
    }
}
