/* ══════════════════════════════════════════════════════════════
   Standard List Page — Reusable styles for list/grid pages
   Used by: StandardListPage.razor component
   ══════════════════════════════════════════════════════════════ */

/* ── Hide default DevExpress toolbar inside mydivpage ── */
.mydivpage > .dxbl-fl-item:first-child .dxbl-toolbar {
    display: none !important;
}

/* ── Remove DxFormLayout gaps so grid+pager are flush ── */
.mydivpage {
    --dxbl-fl-gap: 0px !important;
    gap: 0 !important;
    row-gap: 0 !important;
    width:100% !important;
}
.mydivpage > .dxbl-fl-group,
.mydivpage > .dxbl-fl-item,
.mydivpage > div,
.mydivpage > .dxbl-fl-cg {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
    margin-top: 0 !important;
    padding-top: 0 !important;
}
.mydivpage .dxbl-fl-ctrl {
    padding: 0 !important;
    margin: 0 !important;
}
.mydivpage .dxbl-fl-item {
    padding: 0 !important;
    margin: 0 !important;
}

/* Remove grid bottom margin so pager sits flush */
.nrn-grid,
.nrn-detail-grid {
    margin-bottom: 0 !important;
}
.nrn-grid tfoot,
.nrn-detail-grid tfoot {
    border-bottom: none !important;
}
.nrn-grid tfoot td,
.nrn-detail-grid tfoot td,
.nrn-grid .dxbl-grid-total-summary td,
.nrn-detail-grid .dxbl-grid-total-summary td {
    border-bottom: none !important;
}

/* ══════════════════════════════════════
   Breadcrumbs
   ══════════════════════════════════════ */
.nrn-breadcrumbs {
    margin-bottom: 6px;
}

.nrn-breadcrumbs .breadcrumb {
    display: flex;
    flex-wrap: wrap;
    padding: 0;
    margin: 0;
    list-style: none;
    background: transparent;
}

.nrn-breadcrumbs .breadcrumb-item {
    font-size: 14px;
    color: #6b7280;
}

.nrn-breadcrumbs .breadcrumb-item a {
    color: #6b7280;
    text-decoration: none;
    transition: color 0.2s;
}

.nrn-breadcrumbs .breadcrumb-item a:hover {
    color: #374151;
}

.nrn-breadcrumbs .breadcrumb-item + .breadcrumb-item::before {
    display: inline-block;
    padding-right: 8px;
    padding-left: 8px;
    color: #9ca3af;
    content: ">";
}

.nrn-breadcrumbs .breadcrumb-item.active a {
    color: #3b82f6;
    font-weight: 500;
}

/* ══════════════════════════════════════
   Page Header (Title + Toolbar)
   ══════════════════════════════════════ */
.nrn-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    flex-wrap: nowrap;
    gap: 16px;
}

.nrn-page-title {
    font-size: 22px;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
    white-space: nowrap;
    flex-shrink: 0;
    line-height: 1.3;
}

.nrn-toolbar-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    flex-wrap: nowrap;
}

/* ══════════════════════════════════════
   Toolbar Buttons
   ══════════════════════════════════════ */
.nrn-toolbar-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    line-height: 1;
}

.nrn-btn-refresh {
    background: #ffffff;
    color: #374151;
    border: 1px solid #d1d5db;
    padding: 9px 18px;
    height: 38px;
}

.nrn-btn-refresh:hover {
    background: #f9fafb;
    border-color: #9ca3af;
}

.nrn-btn-refresh i {
    font-size: 13px;
}

.nrn-btn-create {
    background: #318ED4;
    color: #ffffff;
    border: none;
    padding: 9px 20px;
    height: 38px;
}

.nrn-btn-create:hover {
    background: #2578b8;
}

.nrn-btn-create i {
    font-size: 13px;
}

.nrn-btn-edit {
    background: #ffffff;
    color: #374151;
    border: 1px solid #d1d5db;
    padding: 9px 18px;
    height: 38px;
}

.nrn-btn-edit:hover {
    background: #eff6ff;
    border-color: #3b82f6;
    color: #1d4ed8;
}

.nrn-btn-delete {
    background: #ffffff;
    color: #374151;
    border: 1px solid #d1d5db;
    padding: 9px 18px;
    height: 38px;
}

.nrn-btn-delete:hover {
    background: #fef2f2;
    border-color: #ef4444;
    color: #b91c1c;
}

.nrn-btn-approve {
    background: #ffffff;
    color: #374151;
    border: 1px solid #d1d5db;
    padding: 9px 18px;
    height: 38px;
}

.nrn-btn-approve:hover {
    background: #f0fdf4;
    border-color: #22c55e;
    color: #15803d;
}

.nrn-btn-cancel-line {
    background: #ffffff;
    color: #374151;
    border: 1px solid #d1d5db;
    padding: 9px 18px;
    height: 38px;
}

.nrn-btn-cancel-line:hover {
    background: #fff7ed;
    border-color: #f97316;
    color: #c2410c;
}

.nrn-btn-reminder {
    background: #ffffff;
    color: #374151;
    border: 1px solid #d1d5db;
    padding: 9px 18px;
    height: 38px;
}

.nrn-btn-reminder:hover {
    background: #f5f3ff;
    border-color: #8b5cf6;
    color: #6d28d9;
}

.nrn-btn-menu {
    width: 38px;
    height: 38px;
    padding: 0;
    border: 1px solid #d1d5db;
    background: #ffffff;
    color: #6b7280;
    border-radius: 10px;
    font-size: 16px;
}

.nrn-btn-menu:hover {
    background: #f9fafb;
    color: #374151;
}

/* ══════════════════════════════════════
   Toolbar Dropdown
   ══════════════════════════════════════ */
.nrn-toolbar-dropdown {
    position: relative;
}

.nrn-dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 170px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    margin-top: 6px;
    z-index: 1000;
    overflow: hidden;
}

.nrn-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 11px 16px;
    border: none;
    background: transparent;
    color: #374151;
    font-size: 14px;
    text-align: left;
    cursor: pointer;
    transition: background 0.15s;
}

.nrn-dropdown-item:hover {
    background: #f3f4f6;
}

.nrn-dropdown-item i {
    width: 16px;
    text-align: center;
    font-size: 13px;
    color: #6b7280;
}

/* ══════════════════════════════════════
   Grid Card
   ══════════════════════════════════════ */
.nrn-grid {
    border: 1px solid #e2e8f0 !important;
    border-radius: 12px 12px 0 0 !important;
    overflow: visible !important;
    background: #ffffff !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06) !important;
    height: auto !important;
    border-bottom: none !important;
}

/* ── Group Panel ── */
.nrn-grid .dxbl-grid-group-panel {
    min-height: 40px !important;
    padding: 10px 16px !important;
    border-bottom: 1px solid #e2e8f0 !important;
    background: #f5f7fb !important;
    color: #94a3b8 !important;
    font-size: 13px !important;
    font-weight: 400 !important;
    display: flex !important;
    align-items: center !important;
}

/* ── Search inside grid ── */
.nrn-grid .dxbl-grid-search-box,
.nrn-grid .dxbl-grid-searchbox,
.nrn-grid .dxbl-toolbar-searchbox {
    width: 200px !important;
    min-width: 160px !important;
}

.nrn-grid .dxbl-grid-search-box .form-control,
.nrn-grid .dxbl-grid-searchbox .form-control,
.nrn-grid .dxbl-toolbar-searchbox .form-control,
.nrn-grid .dxbl-grid-search-box input,
.nrn-grid .dxbl-grid-searchbox input,
.nrn-grid .dxbl-toolbar-searchbox input {
    min-height: 32px !important;
    height: 32px !important;
    border: none !important;
    border-radius: 8px !important;
    box-shadow: none !important;
    font-size: 13px !important;
    background: transparent !important;
    padding-top: 4px !important;
    padding-bottom: 4px !important;
    outline: none !important;
}

.nrn-grid .dxbl-grid-search-box .dxbl-input-group,
.nrn-grid .dxbl-grid-searchbox .dxbl-input-group,
.nrn-grid .dxbl-toolbar-searchbox .dxbl-input-group {
    border: 1px solid #d8dee8 !important;
    border-radius: 8px !important;
    box-shadow: none !important;
    background: #f5f7fb !important;
}

.nrn-grid .dxbl-grid-search-box .dxbl-input-group:focus-within,
.nrn-grid .dxbl-grid-searchbox .dxbl-input-group:focus-within,
.nrn-grid .dxbl-toolbar-searchbox .dxbl-input-group:focus-within {
    border-color: #93c5fd !important;
}

/* ── Header Row ── */
.nrn-grid thead th,
.nrn-grid .dxbl-grid-header-row th {
    background: #f5f7fb !important;
    color: #374151 !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    border-bottom: 1px solid #e2e8f0 !important;
    padding: 10px 14px !important;
}

/* ── Filter Row ── */
.nrn-grid .dxbl-grid-filter-row > td,
.nrn-grid tr.dxbl-grid-filter-row > td,
.nrn-grid .dxbl-filter-row > td,
.nrn-grid tr.dxbl-filter-row > td,
.nrn-grid .dxbl-grid-filter-row td,
.nrn-grid .dxbl-filter-row td {
    background: #f5f7fb !important;
    background-color: #f5f7fb !important;
    border-bottom: 1px solid #e2e8f0 !important;
    border-top: 1px solid #e2e8f0 !important;
    padding: 6px 14px !important;
    position: relative !important;
}

.nrn-grid .dxbl-grid-filter-row input,
.nrn-grid .dxbl-filter-row input,
.nrn-grid .dxbl-grid-filter-row .form-control,
.nrn-grid .dxbl-filter-row .form-control {
    min-height: 32px !important;
    border: 0 !important;
    border-radius: 4px !important;
    background-color: transparent !important;
    box-shadow: none !important;
    font-size: 13px !important;
    padding-left: 24px !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-size: 12px 12px !important;
    background-position: 6px center !important;
    transition: background-color 0.2s ease !important;
}

.nrn-grid .dxbl-grid-filter-row input:focus,
.nrn-grid .dxbl-filter-row input:focus,
.nrn-grid .dxbl-grid-filter-row .form-control:focus,
.nrn-grid .dxbl-filter-row .form-control:focus {
    background-color: #ffffff !important;
}

.nrn-grid .dxbl-grid-filter-row > td:last-child,
.nrn-grid .dxbl-filter-row > td:last-child,
.nrn-grid .dxbl-grid-filter-row td.dxbl-grid-command-cell,
.nrn-grid .dxbl-filter-row td.dxbl-grid-command-cell {
    background: #f5f7fb !important;
    background-color: #f5f7fb !important;
}

.nrn-grid .dxbl-grid-filter-row > td:last-child > *,
.nrn-grid .dxbl-filter-row > td:last-child > *,
.nrn-grid .dxbl-grid-filter-row td.dxbl-grid-command-cell > *,
.nrn-grid .dxbl-filter-row td.dxbl-grid-command-cell > *,
.nrn-grid .dxbl-grid-filter-row > td:last-child button,
.nrn-grid .dxbl-grid-filter-row > td:last-child .dxbl-btn,
.nrn-grid .dxbl-grid-filter-row > td:last-child .dxbl-btn-link,
.nrn-grid .dxbl-grid-filter-row > td:last-child svg,
.nrn-grid .dxbl-grid-filter-row > td:last-child img,
.nrn-grid .dxbl-grid-filter-row > td:last-child i,
.nrn-grid .dxbl-grid-filter-row > td:last-child span,
.nrn-grid .dxbl-grid-filter-row td.dxbl-grid-command-cell button,
.nrn-grid .dxbl-grid-filter-row td.dxbl-grid-command-cell .dxbl-btn,
.nrn-grid .dxbl-grid-filter-row td.dxbl-grid-command-cell .dxbl-btn-link,
.nrn-grid .dxbl-grid-filter-row td.dxbl-grid-command-cell svg,
.nrn-grid .dxbl-grid-filter-row td.dxbl-grid-command-cell img,
.nrn-grid .dxbl-grid-filter-row td.dxbl-grid-command-cell i,
.nrn-grid .dxbl-grid-filter-row td.dxbl-grid-command-cell span {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    width: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
}

/* ── Override DevExpress purple → blue (filter icon in header) ── */
.nrn-grid th .dxbl-btn,
.nrn-grid .dxbl-grid-header-row th .dxbl-btn,
.nrn-grid th .dxbl-btn.dxbl-btn-link,
.nrn-grid th .dxbl-btn.dxbl-active,
.nrn-grid .dxbl-grid-header-row .dxbl-active {
    --dxbl-btn-color: #318ED4 !important;
    --dxbl-btn-link-color: #318ED4 !important;
    --dxbl-btn-link-hover-color: #2578b8 !important;
    color: #318ED4 !important;
    background-color: transparent !important;
}

.nrn-grid th .dxbl-btn.dxbl-active {
    background-color: #DBEAFE !important;
    border-color: #93c5fd !important;
}

.nrn-grid th .dxbl-btn .dxbl-image,
.nrn-grid th .dxbl-btn svg,
.nrn-grid th .dxbl-btn svg path {
    color: #318ED4 !important;
    fill: currentColor !important;
}

/* ── Override DevExpress primary purple → blue (GLOBAL: popup portal) ── */
.dxbl-btn-primary,
.dxbl-btn.dxbl-btn-primary,
button.dxbl-btn-primary {
    --dxbl-btn-bg: #318ED4 !important;
    --dxbl-btn-border-color: #318ED4 !important;
    --dxbl-btn-hover-bg: #2578b8 !important;
    --dxbl-btn-hover-border-color: #2578b8 !important;
    --dxbl-btn-active-bg: #2578b8 !important;
    background-color: #318ED4 !important;
    border-color: #318ED4 !important;
}

.dxbl-btn-primary:hover,
.dxbl-btn.dxbl-btn-primary:hover {
    background-color: #2578b8 !important;
    border-color: #2578b8 !important;
}

/* Checkbox checked / indeterminate state in filter popup */
.dxbl-checkbox-checked .dxbl-checkbox-check-element,
.dxbl-checkbox-indeterminate .dxbl-checkbox-check-element,
.dxbl-checkbox input[type="checkbox"]:checked + .dxbl-checkbox-check-element,
.dxbl-checkbox input[type="checkbox"]:indeterminate + .dxbl-checkbox-check-element {
    background-color: #318ED4 !important;
    border-color: #318ED4 !important;
    --dxbl-checkbox-checked-bg: #318ED4 !important;
    --dxbl-checkbox-checked-border-color: #318ED4 !important;
    --dxbl-checkbox-indeterminate-bg: #318ED4 !important;
}

/* Selected row highlight in filter popup */
.dxbl-listbox-item.dxbl-listbox-item-selected,
.dxbl-listbox .dxbl-listbox-item.dxbl-active,
.dxbl-listbox-item-focused {
    background-color: #DBEAFE !important;
    color: #1e3a5f !important;
}

/* Focus ring / outline override */
.dxbl-checkbox-check-element:focus,
.dxbl-btn-primary:focus {
    box-shadow: 0 0 0 3px rgba(49, 142, 212, 0.25) !important;
}

/* ── Data Rows ── */
.nrn-grid tbody td,
.nrn-grid .dxbl-grid-table td {
    color: #64748b !important;
    font-size: 13px !important;
    border-bottom: 1px solid #f1f5f9 !important;
    border-left: none !important;
    border-right: none !important;
    padding: 10px 14px !important;
    background: #ffffff !important;
    overflow: visible !important;
}

.nrn-grid .dxbl-grid-header-row th,
.nrn-grid .dxbl-grid-filter-row td {
    border-left: none !important;
    border-right: none !important;
}

.nrn-grid tbody tr:hover td,
.nrn-grid .dxbl-grid-table tbody tr:hover td {
    background: #f8fafc !important;
}

/* ── Hide default DevExpress pager ── */
.nrn-grid .dxbl-grid-pager-container,
.nrn-grid .dxbl-grid-pager-container > .dxbl-pager,
.nrn-grid .dxbl-grid-pager-container > .dxbl-grid-pager,
.nrn-grid > .dxbl-pager,
.nrn-grid > .dxbl-grid-pager,
.nrn-grid .dxbl-pager,
.nrn-grid .dxbl-grid-pager {
    display: none !important;
    height: 0 !important;
    min-height: 0 !important;
    overflow: hidden !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
}

/* ── Row Menu Button ── */
.nrn-row-actions {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.nrn-row-menu {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: #94a3b8;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    letter-spacing: 1px;
}

.nrn-row-menu:hover {
    background: #f1f5f9;
    color: #475569;
}

/* ══════════════════════════════════════
   Fixed Right Column (Action column)
   Always neutral — no blue on focus/hover
   ══════════════════════════════════════ */

/* Fixed right column — all states: white background, left separator */
.nrn-grid td.dxbl-grid-fixed-cell,
.nrn-grid th.dxbl-grid-fixed-cell {
    background: #ffffff !important;
    border-left: 1px solid #e2e8f0 !important;
}

/* Header */
.nrn-grid .dxbl-grid-header-row th.dxbl-grid-fixed-cell {
    background: #f5f7fb !important;
}

/* Filter row */
.nrn-grid .dxbl-grid-filter-row td.dxbl-grid-fixed-cell,
.nrn-grid .dxbl-filter-row td.dxbl-grid-fixed-cell {
    background: #f5f7fb !important;
}

/* Override hover — keep neutral */
.nrn-grid tbody tr:hover td.dxbl-grid-fixed-cell {
    background: #f8fafc !important;
}

/* Override focused/selected row — NO blue on action column */
.nrn-grid .dxbl-grid-table tr.dxbl-focused td.dxbl-grid-fixed-cell,
.nrn-grid tbody tr.dxbl-focused td.dxbl-grid-fixed-cell,
.nrn-grid .dxbl-grid-table tr.dxbl-grid-focused-row td.dxbl-grid-fixed-cell,
.nrn-grid tbody tr.dxbl-grid-focused-row td.dxbl-grid-fixed-cell,
.nrn-grid tr[class*="focused"] td.dxbl-grid-fixed-cell,
.nrn-grid tr[class*="selected"] td.dxbl-grid-fixed-cell,
.nrn-grid .dxbl-grid-table td.dxbl-grid-fixed-cell,
.nrn-grid td.dxbl-grid-fixed-cell {
    background: #ffffff !important;
    background-color: #ffffff !important;
    --dxbl-grid-selection-bg: transparent !important;
    --dxbl-grid-focused-row-bg: transparent !important;
    --dxbl-grid-hover-bg: transparent !important;
}

/* Suppress ::before color overlay on fixed-right cells */
.nrn-grid td.dxbl-grid-fixed-cell::before,
.nrn-grid td.dxbl-grid-fixed-cell::after {
    background-color: transparent !important;
    opacity: 0 !important;
    display: none !important;
}

/* Footer */
.nrn-grid tfoot td.dxbl-grid-fixed-cell,
.nrn-grid .dxbl-grid-total-summary td.dxbl-grid-fixed-cell {
    background: #f8fafc !important;
}

/* ══════════════════════════════════════
   Row Dropdown (fixed portal)
   ══════════════════════════════════════ */
.nrn-row-dropdown-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
}

.nrn-row-dropdown {
    min-width: 140px !important;
    background: #ffffff !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 10px !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12) !important;
    z-index: 10000 !important;
    overflow: hidden !important;
}

.nrn-row-dropdown-item {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    width: 100% !important;
    padding: 11px 16px !important;
    border: none !important;
    background: transparent !important;
    color: #374151 !important;
    font-size: 14px !important;
    text-align: left !important;
    cursor: pointer !important;
    transition: background 0.15s !important;
}

    .nrn-row-dropdown-item:hover {
        background: #f3f4f6 !important;
    }

    .nrn-row-dropdown-item i {
        width: 16px !important;
        text-align: center !important;
        font-size: 13px !important;
        color: #6b7280 !important;
    }

    .nrn-row-dropdown-item.delete-item:hover {
        background: #fef2f2 !important;
        color: #dc2626 !important;
    }

        .nrn-row-dropdown-item.delete-item:hover i {
            color: #dc2626 !important;
        }

/* ══════════════════════════════════════
   Custom Pager
   ══════════════════════════════════════ */
.nrn-pager {
    display: grid !important;
    grid-template-columns: auto 1fr auto !important;
    align-items: center !important;
    border: 1px solid #e2e8f0;
    border-radius: 0 0 12px 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    padding: 14px 24px !important;
    background: #ffffff !important;
    min-height: 56px !important;
    gap: 16px !important;
    width: 100% !important;
}

.nrn-pager-left {
    display: inline-flex !important;
    align-items: center !important;
    gap: 10px !important;
    white-space: nowrap !important;
}

.nrn-pager-left span {
    font-size: 14px;
    color: #64748b;
}

.nrn-pager-left select {
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 4px 24px 4px 10px;
    font-size: 14px;
    color: #374151;
    background: #ffffff;
    min-height: 34px;
    cursor: pointer;
    outline: none;
}

.nrn-pager-center {
    display: inline-flex !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 4px !important;
}

.nrn-page-btn {
    min-width: 36px;
    min-height: 36px;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
    background: transparent;
    color: #64748b;
}

.nrn-page-btn:hover {
    background: #f1f5f9;
}

.nrn-page-btn.active {
    background: #dbeafe !important;
    color: #2878b8 !important;
}

.nrn-pager-right {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    justify-content: flex-end !important;
}

.nrn-nav-btn {
    background: #ffffff;
    border: 1px solid #d1d5db;
    color: #6b7280;
    border-radius: 8px;
    padding: 6px 16px;
    font-size: 14px;
    font-weight: 400;
    min-height: 36px;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.nrn-nav-btn:hover:not(:disabled) {
    background: #f9fafb;
    border-color: #9ca3af;
    color: #374151;
}

.nrn-nav-btn:disabled {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    color: #c4c9d2;
    cursor: default;
}

/* ══════════════════════════════════════
   Entity Filter (optional)
   ══════════════════════════════════════ */
.nrn-entity-filter {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.nrn-entity-label {
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    white-space: nowrap;
}

.nrn-entity-select {
    min-width: 200px;
    max-width: 280px;
}

.nrn-entity-select-100 {
    min-width: 200px;
    max-width: 100%;
}

/* ══════════════════════════════════════
   Filters Row (multiple filters)
   ══════════════════════════════════════ */
.nrn-filters-row {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 12px 0;
    flex-wrap: wrap;
}

.nrn-filter-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nrn-filter-label {
    font-size: 14px;
    color: #374151;
    font-weight: 500;
    white-space: nowrap;
}

.nrn-filter-select {
    min-width: 180px;
    max-width: 260px;
}

.nrn-filter-check {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* ══════════════════════════════════════
   Detail Grid (nested/child grid)
   ══════════════════════════════════════ */
.nrn-detail-grid {
    border: 1px solid #e2e8f0 !important;
    border-radius: 12px 12px 0 0 !important;
    overflow: visible !important;
    background: #ffffff !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06) !important;
    height: auto !important;
    border-bottom: none !important;
}

/* Detail: hide default toolbar */
.nrn-detail-grid .dxbl-toolbar,
.nrn-detail-grid > .dxbl-grid-toolbar {
    display: none !important;
}

.nrn-detail-grid thead th,
.nrn-detail-grid .dxbl-grid-header-row th {
    background: #f5f7fb !important;
    color: #374151 !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    border-bottom: 1px solid #e2e8f0 !important;
    padding: 10px 14px !important;
    border-left: none !important;
    border-right: none !important;
}

/* Detail: Filter Row */
.nrn-detail-grid .dxbl-grid-filter-row > td,
.nrn-detail-grid tr.dxbl-grid-filter-row > td,
.nrn-detail-grid .dxbl-filter-row > td,
.nrn-detail-grid .dxbl-grid-filter-row td,
.nrn-detail-grid .dxbl-filter-row td {
    background: #f5f7fb !important;
    background-color: #f5f7fb !important;
    border-bottom: 1px solid #e2e8f0 !important;
    border-top: 1px solid #e2e8f0 !important;
    border-left: none !important;
    border-right: none !important;
    padding: 6px 14px !important;
    position: relative !important;
}
.nrn-detail-grid .dxbl-grid-filter-row input,
.nrn-detail-grid .dxbl-filter-row input,
.nrn-detail-grid .dxbl-grid-filter-row .form-control,
.nrn-detail-grid .dxbl-filter-row .form-control {
    min-height: 32px !important;
    border: 0 !important; border-radius: 4px !important;
    background-color: transparent !important; box-shadow: none !important;
    font-size: 13px !important;
    transition: background-color 0.2s ease !important;
}
.nrn-detail-grid .dxbl-grid-filter-row input:focus,
.nrn-detail-grid .dxbl-filter-row input:focus,
.nrn-detail-grid .dxbl-grid-filter-row .form-control:focus,
.nrn-detail-grid .dxbl-filter-row .form-control:focus {
    background-color: #ffffff !important;
}

/* Detail: hide filter clear button in command cell */
.nrn-detail-grid .dxbl-grid-filter-row > td:first-child > *,
.nrn-detail-grid .dxbl-filter-row > td:first-child > *,
.nrn-detail-grid .dxbl-grid-filter-row td.dxbl-grid-command-cell > *,
.nrn-detail-grid .dxbl-filter-row td.dxbl-grid-command-cell > *,
.nrn-detail-grid .dxbl-grid-filter-row > td:first-child button,
.nrn-detail-grid .dxbl-grid-filter-row > td:first-child .dxbl-btn,
.nrn-detail-grid .dxbl-grid-filter-row > td:first-child .dxbl-btn-link,
.nrn-detail-grid .dxbl-grid-filter-row td.dxbl-grid-command-cell button,
.nrn-detail-grid .dxbl-grid-filter-row td.dxbl-grid-command-cell .dxbl-btn,
.nrn-detail-grid .dxbl-grid-filter-row td.dxbl-grid-command-cell .dxbl-btn-link {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    width: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
}

/* Detail: Override purple → blue (filter icon in header) */
.nrn-detail-grid th .dxbl-btn,
.nrn-detail-grid .dxbl-grid-header-row th .dxbl-btn,
.nrn-detail-grid th .dxbl-btn.dxbl-btn-link,
.nrn-detail-grid th .dxbl-btn.dxbl-active,
.nrn-detail-grid .dxbl-grid-header-row .dxbl-active {
    --dxbl-btn-color: #318ED4 !important;
    --dxbl-btn-link-color: #318ED4 !important;
    --dxbl-btn-link-hover-color: #2578b8 !important;
    color: #318ED4 !important;
    background-color: transparent !important;
}
.nrn-detail-grid th .dxbl-btn.dxbl-active {
    background-color: #DBEAFE !important;
    border-color: #93c5fd !important;
}
.nrn-detail-grid th .dxbl-btn .dxbl-image,
.nrn-detail-grid th .dxbl-btn svg,
.nrn-detail-grid th .dxbl-btn svg path {
    color: #318ED4 !important;
    fill: currentColor !important;
}

/* Detail: Data Rows */
.nrn-detail-grid tbody td,
.nrn-detail-grid .dxbl-grid-table td {
    color: #64748b !important;
    font-size: 13px !important;
    border-bottom: 1px solid #f1f5f9 !important;
    border-left: none !important;
    border-right: none !important;
    padding: 10px 14px !important;
    background: #ffffff !important;
}
.nrn-detail-grid tbody tr:hover td,
.nrn-detail-grid .dxbl-grid-table tbody tr:hover td {
    background: #f8fafc !important;
}

/* Detail: Focused row → blue instead of purple */
.nrn-detail-grid .dxbl-grid-table tr.dxbl-focused td,
.nrn-detail-grid tbody tr.dxbl-focused td,
.nrn-detail-grid .dxbl-grid-table tr.dxbl-grid-focused-row td,
.nrn-detail-grid tbody tr.dxbl-grid-focused-row td,
.nrn-detail-grid tr[class*="focused"] td,
.nrn-detail-grid tr[class*="selected"] td {
    background-color: #DBEAFE !important;
    color: #1e3a5f !important;
}

/* Detail: Command column styling */
.nrn-detail-grid .dxbl-grid-command-cell,
.nrn-detail-grid td.dxbl-grid-command-cell {
    background: transparent !important;
    border-left: none !important;
    border-right: none !important;
}
.nrn-detail-grid thead th.dxbl-grid-command-cell,
.nrn-detail-grid .dxbl-grid-header-row th.dxbl-grid-command-cell {
    background: #f5f7fb !important;
}

/* Detail: Hide DevExpress built-in pager */
.nrn-detail-grid .dxbl-grid-pager-container,
.nrn-detail-grid .dxbl-pager,
.nrn-detail-grid > .dxbl-grid-pager {
    display: none !important;
}

/* Detail: Summary row */
.nrn-detail-grid tfoot td,
.nrn-detail-grid .dxbl-grid-total-summary td {
    background: #f8fafc !important;
    color: #374151 !important;
    font-weight: 600 !important;
    font-size: 13px !important;
    border-top: 1px solid #e2e8f0 !important;
    border-left: none !important;
    border-right: none !important;
    border-bottom: none !important;
}

/* ══════════════════════════════════════
   Tab Styling (blue instead of purple)
   ══════════════════════════════════════ */
.dxbl-tabs .dxbl-tab-active,
.dxbl-tabs .nav-link.active,
.dxbl-fl-tab-active,
.dxbl-tabs .dxbl-tab .dxbl-tab-active {
    color: #318ED4 !important;
    border-bottom-color: #318ED4 !important;
}
.dxbl-tabs .nav-link:hover,
.dxbl-tabs .dxbl-tab:hover {
    color: #2578b8 !important;
}

/* ══════════════════════════════════════
   Detail Pager (same structure as main pager)
   ══════════════════════════════════════ */
.nrn-detail-pager {
    display: grid !important;
    grid-template-columns: auto 1fr auto !important;
    align-items: center !important;
    border: 1px solid #e2e8f0;
    border-radius: 0 0 12px 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    padding: 14px 24px !important;
    background: #fff !important;
    min-height: 56px !important;
    gap: 16px !important;
    width: 100% !important;
    margin-top: -1px !important;
}

.nrn-detail-pager .nrn-pager-left,
.nrn-detail-pager .nrn-pager-center,
.nrn-detail-pager .nrn-pager-right {
    /* Reuse same styles as main pager children */
}

.nrn-detail-pager .nrn-pager-left {
    display: inline-flex !important;
    align-items: center !important;
    gap: 10px !important;
    white-space: nowrap !important;
}

.nrn-detail-pager .nrn-pager-left span {
    font-size: 14px;
    color: #64748b;
}

.nrn-detail-pager .nrn-pager-left select {
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 4px 24px 4px 10px;
    font-size: 14px;
    color: #374151;
    background: #fff;
    min-height: 34px;
    cursor: pointer;
    outline: none;
}

.nrn-detail-pager .nrn-pager-center {
    display: inline-flex !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 4px !important;
}

.nrn-detail-pager .nrn-page-btn {
    min-width: 36px;
    min-height: 36px;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
    background: transparent;
    color: #64748b;
}

.nrn-detail-pager .nrn-page-btn.active {
    background: #dbeafe;
    color: #2878b8;
}

.nrn-detail-pager .nrn-pager-right {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    justify-content: flex-end !important;
}

.nrn-detail-pager .nrn-nav-btn {
    background: #fff;
    border: 1px solid #d1d5db;
    color: #6b7280;
    border-radius: 8px;
    padding: 6px 16px;
    font-size: 14px;
    font-weight: 400;
    min-height: 36px;
    cursor: pointer;
    white-space: nowrap;
}

.nrn-detail-pager .nrn-nav-btn:disabled {
    color: #c4c9d2;
    cursor: default;
}

/* ══════════════════════════════════════
   Responsive
   ══════════════════════════════════════ */
@media (max-width: 768px) {
    .nrn-page-header {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 12px;
    }

    .nrn-toolbar-right {
        width: 100%;
        justify-content: flex-start !important;
    }

    .nrn-filters-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

}

.json-value {
    display: block;
    font-family: "Segoe UI Mono", "Consolas", monospace;
    white-space: pre-wrap; /* preserve newlines and wrap long lines */
    overflow-wrap: anywhere; /* wrap long words / URLs */
    word-break: break-word;
    max-width: 100%;
    max-height: 8rem; /* limit height in grid cell */
    overflow: auto; /* add scrollbar when content is tall */
    padding: 4px 6px;
    background: #f8f9fa;
    border: 1px solid rgba(0,0,0,0.06);
    border-radius: 4px;
    font-size: 0.875rem;
}

.wrap-value {
    display: block;
    white-space: pre-wrap; /* preserve newlines and wrap long lines */
    overflow-wrap: anywhere; /* wrap long words / URLs */
    word-break: break-word;
    max-width: 100%;
    max-height: 6rem; /* limit height in grid cell */
    overflow: auto; /* add scrollbar when content is tall */
    padding: 4px 6px;
    font-size: 0.9rem;
    background: transparent;
    border-radius: 4px;
}
