.nexa-grid-container {
    width: 100%;
    overflow-x: auto;
    background: var(--nexa-surface);
    border: 1px solid var(--nexa-border);
    border-radius: var(--nexa-radius-lg);
    box-shadow: var(--nexa-shadow-sm);
}
.nexa-grid-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--nexa-space-3);
    margin-bottom: var(--nexa-space-3);
    padding: var(--nexa-space-3);
    background: var(--nexa-surface);
    border: 1px solid var(--nexa-border);
    border-radius: var(--nexa-radius-md);
    box-shadow: var(--nexa-shadow-xs);
}
.nexa-grid-toolbar-start,
.nexa-grid-toolbar-end {
    display: flex;
    align-items: center;
    gap: var(--nexa-space-2);
    flex-wrap: wrap;
}
.nexa-grid-search {
    min-width: 260px;
    flex: 1;
}
.nexa-grid-actions {
    display: flex;
    align-items: center;
    gap: var(--nexa-space-2);
    flex-wrap: wrap;
}
.nexa-icon-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    min-width: 38px;
    height: 38px;
    padding: 0;
    border-radius: var(--nexa-radius-sm);
    font-weight: 800;
}
.nexa-grid-number {
    direction: ltr !important;
    text-align: left !important;
    font-variant-numeric: tabular-nums;
    unicode-bidi: isolate;
}
.nexa-grid-date {
    direction: ltr !important;
    text-align: center !important;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
.nexa-grid-center {
    text-align: center !important;
}
.nexa-grid-nowrap {
    white-space: nowrap !important;
}
.nexa-list-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--nexa-space-3);
    margin-bottom: var(--nexa-space-4);
    padding: var(--nexa-space-3);
    background: var(--nexa-surface-secondary);
    border: 1px solid var(--nexa-border);
    border-radius: var(--nexa-radius-md);
}
.nexa-list-search {
    min-width: 280px;
    flex: 1;
}
.nexa-list-filter-buttons {
    display: flex;
    align-items: center;
    gap: var(--nexa-space-2);
    flex-wrap: wrap;
}
.nexa-filter-button {
    min-height: 36px;
    padding: 6px 13px;
    color: var(--nexa-text-secondary);
    background: var(--nexa-surface);
    border: 1px solid var(--nexa-border-strong);
    border-radius: var(--nexa-radius-round);
    font-weight: 700;
    cursor: pointer;
}
.nexa-filter-button.active {
    color: #fff;
    background: var(--nexa-primary);
    border-color: var(--nexa-primary);
}
.nexa-list-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(160px, 1fr));
    gap: var(--nexa-space-3);
    margin-top: var(--nexa-space-4);
}
.nexa-list-summary-item,
.nexa-list-summary > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--nexa-space-3);
    min-height: 64px;
    padding: var(--nexa-space-3);
    background: var(--nexa-surface-secondary);
    border: 1px solid var(--nexa-border);
    border-radius: var(--nexa-radius-md);
}
.nexa-list-summary span {
    color: var(--nexa-text-muted);
    font-size: var(--nexa-font-sm);
    font-weight: 700;
}
.nexa-list-summary strong {
    direction: ltr;
    color: var(--nexa-text);
    font-size: var(--nexa-font-lg);
    font-weight: 900;
    font-variant-numeric: tabular-nums;
}
.nexa-table-wrap {
    width: 100%;
    overflow-x: auto;
}
.nexa-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    color: var(--nexa-text);
    background: var(--nexa-surface);
    font-size: var(--nexa-font-sm);
}
.nexa-table th {
    padding: 12px 14px;
    color: var(--nexa-text-secondary);
    background: var(--nexa-surface-secondary);
    border-bottom: 1px solid var(--nexa-border);
    font-weight: 800;
    text-align: right;
    white-space: nowrap;
}
.nexa-table td {
    padding: 12px 14px;
    border-bottom: 1px solid #eef0f3;
    text-align: right;
    vertical-align: middle;
}
.nexa-table tbody tr:hover {
    background: #fdfbf5;
}
.nexa-status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 88px;
    min-height: 29px;
    padding: 5px 11px;
    border-radius: var(--nexa-radius-round);
    font-size: var(--nexa-font-xs);
    font-weight: 800;
    white-space: nowrap;
}
.nexa-status-warning {
    color: #8e5a00;
    background: var(--nexa-warning-soft);
    border: 1px solid #f0cb7d;
}
.nexa-status-success {
    color: #0d6838;
    background: var(--nexa-success-soft);
    border: 1px solid #b9e4ca;
}
.nexa-status-danger {
    color: #a52222;
    background: var(--nexa-danger-soft);
    border: 1px solid #efc0c0;
}
.nexa-status-info {
    color: #1f5f9c;
    background: var(--nexa-info-soft);
    border: 1px solid #bfd9f2;
}
.nexa-status-dark {
    color: #39414c;
    background: #f0f2f5;
    border: 1px solid #cbd1d8;
}
.dxbl-grid {
    width: 100% !important;
    direction: ltr;
    overflow: hidden;
    font-family: var(--nexa-font-family) !important;
    background: var(--nexa-surface) !important;
    border: 1px solid var(--nexa-border) !important;
    border-radius: var(--nexa-radius-md) !important;
}
.dxbl-grid table,
.dxbl-grid td,
.dxbl-grid th,
.dxbl-grid .dxbl-text {
    direction: rtl;
    text-align: right;
}
.dxbl-grid th,
.dxbl-grid td {
    border-inline-start: 1px solid #edf0f3 !important;
}
.dxbl-grid .dxbl-grid-header-row {
    color: var(--nexa-text-secondary) !important;
    background: #f7f8fa !important;
}
.dxbl-grid .dxbl-grid-header-row > td,
.dxbl-grid .dxbl-grid-header-row > th {
    min-height: 44px;
    color: var(--nexa-text-secondary) !important;
    border-color: var(--nexa-border) !important;
    font-weight: 800 !important;
}
.dxbl-grid .dxbl-grid-data-row:hover {
    background: #fdfbf6 !important;
}
.dxbl-grid .dxbl-grid-filter-row,
.dxbl-grid-filter-row,
tr.dxbl-grid-filter-row {
    display: none !important;
}
.dxbl-grid .dxbl-grid-command-cell {
    min-width: 120px;
}
.dxbl-grid .dxbl-pager {
    padding: var(--nexa-space-3);
    background: var(--nexa-surface-secondary);
    border-top: 1px solid var(--nexa-border);
}
.dxbl-grid .dxbl-btn {
    font-family: var(--nexa-font-family) !important;
}
.nexa-dashboard-grid,
.nexa-dashboard-grid .dxbl-grid {
    direction: ltr;
}

.order-grid-filters {
    display: grid;
    grid-template-columns: repeat(3, minmax(160px, 1fr)) auto auto;
    align-items: end;
    gap: .75rem;
    margin-bottom: 1rem;
}

.dxbl-grid .dxbl-grid-footer-row,
.dxbl-grid [class*="footer-row"] {
    background: #f5efe6 !important;
    color: #493b2c !important;
    font-weight: 800 !important;
}

@media (max-width: 900px) {
    .order-grid-filters {
        grid-template-columns: 1fr;
    }
}
.nexa-dashboard-grid table,
.nexa-dashboard-grid th,
.nexa-dashboard-grid td,
.nexa-dashboard-grid .dxbl-text {
    direction: rtl;
    text-align: right;
}

/* Remove increment/decrement buttons from every numeric editor. */
.dxbl-spin-edit .dxbl-spin-edit-buttons,
.dxbl-spin-edit .dxbl-editor-button,
.dxbl-spin-edit button,
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    display: none !important;
    -webkit-appearance: none;
    margin: 0;
}
input[type="number"] {
    -moz-appearance: textfield;
    appearance: textfield;
}

@media (max-width: 900px) {
    .nexa-grid-toolbar,
    .nexa-list-toolbar {
        align-items: stretch;
        flex-direction: column;
    }
    .nexa-grid-toolbar-start,
    .nexa-grid-toolbar-end,
    .nexa-list-filter-buttons {
        width: 100%;
    }
    .nexa-grid-search,
    .nexa-list-search {
        width: 100%;
        min-width: 0;
    }
    .nexa-list-summary {
        grid-template-columns: 1fr;
    }
}
