/* Shared presentation around the standard XAF ListView. Detail/lookup grids are unaffected. */
.proc-workspace.np-list-workspace {
    padding: 20px;
    gap: 22px;
    background: #f4f7fd;
}
.np-list-workspace.with-tree { grid-template-columns: 280px minmax(0, 1fr); }
.np-list-workspace .np-list-sidebar {
    border: 1px solid #e0e8f4;
    border-radius: 10px;
    box-shadow: 0 2px 8px #17365d03;
}
.np-list-page {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-width: 0;
    min-height: 0;
    height: 100%;
    color: #112650;
}
.np-list-header { flex: 0 0 auto; padding: 4px 12px 20px; }
.np-list-breadcrumb { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 18px; color: #627494; font-size: 13px; }
.np-list-breadcrumb span + span::before { content: "›"; margin-right: 10px; color: #8695ad; }
.np-list-breadcrumb span:first-child { color: #344d76; font-weight: 600; }
.np-list-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.np-list-title { margin: 0; color: #10234a; font-size: 28px; font-weight: 700; line-height: 1.25; }
.np-list-description { margin: 6px 0 0; color: #687e9f; font-size: 15px; }
.np-primary-action-container { flex: 0 0 210px; }
.np-list-page .np-primary-action { background: transparent; border: 0; }
.np-list-page .np-primary-action .dxbl-btn {
    --dxbl-btn-bg: #075ce5;
    --dxbl-btn-color: #fff;
    --dxbl-btn-border-color: #075ce5;
    --dxbl-btn-hover-bg: #064bb9;
    --dxbl-btn-hover-color: #fff;
    min-height: 42px;
    padding: 9px 16px;
    border-radius: 6px;
    background: #075ce5;
    border-color: #075ce5;
    color: #fff;
    font-weight: 600;
}
.np-list-page .np-primary-action .dxbl-btn svg { color: inherit; }
.np-list-page .np-primary-action .dxbl-btn img { filter: brightness(0) invert(1); }
.np-list-card {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
    background: #fff;
    border: 1px solid #e0e8f4;
    border-radius: 9px;
    box-shadow: 0 2px 10px #17365d03;
}
.np-list-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 18px; padding: 13px 15px; border-bottom: 1px solid #e3eaf5; }
.np-list-query { flex: 1.2 1 450px; min-width: 0; }
.np-list-secondary { flex: 1 1 330px; min-width: 0; margin-left: auto; }
.np-list-toolbar .dxbl-toolbar { border: 0; background: transparent; }
.np-list-toolbar .dxbl-btn { min-height: 36px; border-radius: 5px; color: #233f69; }
.np-list-toolbar .dxbl-text-edit { min-height: 38px; border-color: #d9e3f1; border-radius: 6px; }
.np-list-query .dxbl-text-edit { min-width: min(270px, 100%); }
.np-list-content { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; overflow: auto; }
.np-list-content .dxbl-grid {
    --dxbl-grid-border-color: #e3eaf5;
    --dxbl-grid-header-bg: #f4f6fa;
    --dxbl-grid-header-color: #304972;
    --dxbl-grid-selection-bg: #eaf2ff;
    --dxbl-grid-hover-bg: #f4f8ff;
    border: 0;
    border-radius: 0;
    font-size: 13px;
}
.np-list-content .dxbl-grid-table > thead > tr > th { background: #f4f6fa; color: #304972; font-weight: 600; }
.np-list-content .dxbl-grid-table > :is(thead, tbody) > tr > :is(td, th) {
/*    border-left-color: transparent;
    border-right-color: transparent;*/
    border-bottom-color: #e3eaf5;
    padding-top: 10px;
    padding-bottom: 10px;
}
.np-list-content .dxbl-grid-table > tbody > tr.cursor-pointer:not(.dxbl-grid-focused-row):not(.dxbl-grid-selected-row):hover > td { background: #f3f7fe; }
.np-list-content .np-object-name { color: #075ce5; font-weight: 600; }
.np-list-content :is(.dxbl-grid-focused-row, .dxbl-grid-selected-row) .np-object-name { color: inherit; }
.np-list-content .np-status-cell { --np-badge-bg: #f0f2f5; --np-badge-color: #566273; }
.np-list-content .np-status-success { --np-badge-bg: #eaf9ec; --np-badge-color: #16853b; }
.np-list-content .np-status-danger { --np-badge-bg: #fff0ee; --np-badge-color: #b84738; }
.np-list-content .np-status-warning { --np-badge-bg: #fff6df; --np-badge-color: #946412; }
.np-list-content .np-status-cell > div {
    width: fit-content;
    max-width: 100%;
    padding: 2px 10px;
    border-radius: 999px;
    background: var(--np-badge-bg);
    color: var(--np-badge-color);
    font-size: 12px;
    line-height: 1.5;
}
.np-list-sidebar .proc-xaf-tree { padding: 12px; }
.np-list-sidebar .proc-xaf-tree-header { flex-direction: row; align-items: center; justify-content: space-between; padding: 5px 3px 12px; margin: 0; border: 0; }
.np-list-sidebar .proc-xaf-tree-header strong { font-size: 17px; color: #10234a; }
.np-menu-search { margin: 4px 2px 14px; }
.np-menu-search input { width: 100%; min-height: 38px; padding: 8px 12px; border: 1px solid #d9e3f1; border-radius: 6px; font-size: 13px; background: #fff; color: #273e61; }
.np-menu-search input:focus-visible { outline: 2px solid #075ce5; outline-offset: 2px; }
.np-menu-node { display: flex; align-items: center; gap: 9px; min-width: 0; white-space: normal; }
.np-menu-node > :first-child { flex-shrink: 0; }
.np-list-sidebar .proc-admin-tree { font-size: 13px; color: #193359; }
.np-list-sidebar .dxbl-treeview-item { border-radius: 5px; }
.np-list-sidebar .proc-admin-tree .dxbl-treeview-item-content {
    border-radius: 0px;
}
/* Include the expand-button slot. Direct children keep a selected descendant
   from highlighting the parent level as well. */
.np-list-sidebar .proc-admin-tree .dxbl-treeview-item-content:hover {
    background: #f3f7ff;
}
.np-list-sidebar .proc-admin-tree .dxbl-treeview-item-content:has(> [role="treeitem"][aria-selected="true"]) {
    background: #eaf2ff;
    color: #075ce5;
    box-shadow: inset 4px 0 #075ce5;
}
.np-list-sidebar .proc-admin-tree .dxbl-treeview-item-content > [role="treeitem"],
.np-list-sidebar .proc-admin-tree .dxbl-treeview-item-content > [role="treeitem"] > .dxbl-treeview-item-text-container {
    background: transparent;
    color: inherit;
    box-shadow: none;
}
.np-menu-toggle { display: none; border: 1px solid #d9e3f1; border-radius: 5px; background: #fff; color: #233f69; padding: 5px 8px; font-size: 12px; }
/* All action adapters still render for non-list views, in the original toolbar region. */
.proc-view-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.proc-view-toolbar > .proc-xaf-view-toolbar { flex: 1; }
@media (max-width: 1000px) {
    .proc-workspace.np-list-workspace { padding: 12px; gap: 12px; }
    .np-list-workspace.with-tree { grid-template-columns: 260px minmax(0, 1fr); }
    .np-list-heading { flex-wrap: wrap; gap: 12px; }
    .np-list-title { font-size: 24px; }
}
@media (max-width: 800px) {
    .np-list-workspace.with-tree { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
    .np-list-sidebar .proc-xaf-tree { min-height: 0; padding: 8px 12px; }
    .np-list-sidebar .proc-xaf-tree-header { padding-bottom: 4px; }
    .np-menu-toggle { display: inline-block; }
    .np-menu-content.collapsed { display: none; }
    .np-list-header { padding: 6px 4px 14px; }
    .np-list-breadcrumb { margin-bottom: 10px; }
    .np-list-toolbar { padding: 10px; }
    .np-list-secondary { flex: 1 1 100%; }
}
.dxbl-grid .dxbl-grid-table > tbody > tr > td {
    border-top: 0px;
    border-bottom-width: 1px;
}
/* Native XAF master/detail keeps the same ListView controls and card treatment. */
.np-messages-page > .np-list-card { border:0; border-radius:0; box-shadow:none; background:transparent; }
.np-messages-page .np-list-content { overflow:hidden; }
.np-messages-page .xaf-masterdetail-container { gap:12px; height:100%; min-height:0; }
.np-messages-page .xaf-masterdetail-view { min-width:0; min-height:0; overflow:hidden; background:#fff; border:1px solid #e0e8f4; border-radius:9px; box-shadow:0 2px 10px #17365d03; }
.np-messages-page .xaf-masterdetail-detailview-holder { height:100%; min-height:0; }
.np-messages-page .xaf-masterdetail-listview > .grid-content,
.np-messages-page .xaf-masterdetail-listview xaf-contextmenu-click-helper,
.np-messages-page .xaf-masterdetail-listview .dxbl-grid {
    display:flex; flex-direction:column; flex:1 1 auto; height:100%; min-height:0;
}
.np-messages-page .xaf-masterdetail-detailview > .dxbl-scroll-viewer-content,
.np-messages-page .xaf-masterdetail-detailview-holder > layout-editor,
.np-messages-page .xaf-masterdetail-detailview .detail-view-content,
.np-messages-page .xaf-masterdetail-detailview .dxbl-fl,
.np-messages-page .xaf-masterdetail-detailview .dxbl-row,
.np-messages-page .xaf-masterdetail-detailview .dxbl-fl-group,
.np-messages-page .xaf-masterdetail-detailview .dxbl-fl-item,
.np-messages-page .xaf-masterdetail-detailview .dxbl-fl-ctrl {
    display:flex; flex-direction:column; flex:1 1 auto; height:100%; min-height:0;
    margin:0; padding:0; overflow:hidden;
}
.np-messages-page .dxbl-grid-toolbar-container { padding:0; }
.np-messages-page .dxbl-grid-toolbar-container > .np-list-toolbar {
    flex:1 1 100%; width:100%; min-width:0; box-sizing:border-box;
}
.np-messages-page .xaf-masterdetail-view { box-shadow:none; }
.np-messages-page .xaf-masterdetail-listview { flex:0 1 35%; }
.np-messages-page .xaf-masterdetail-detailview { flex:1 1 0%; }
.np-messages-page .xaf-masterdetail-splitter { margin:0; }
.np-messages-page .xaf-masterdetail-detailview-holder { padding-right:0; }
.np-messages-page .dxbl-grid {
    --dxbl-grid-focus-bg:#eaf2ff;
    --dxbl-grid-focus-color:#193359;
    --dxbl-grid-selection-color:#193359;
}
.np-messages-page .dxbl-grid-table { table-layout:fixed; width:100%; }
.np-messages-page .dxbl-grid-empty-cell { display:none; }
.np-messages-page .dxbl-grid-table > thead { display:none; }
.np-messages-page .dxbl-grid-table > tbody > tr > td {
    padding:10px 12px; border-left:0; border-right:0; height:70px;
    color:#193359; font-weight:400; overflow:hidden;
}
.np-messages-page .dxbl-grid-table > tbody > :is(.dxbl-grid-focused-row, .dxbl-grid-selected-row) > td {
    background:#eaf2ff; color:#193359; box-shadow:inset 3px 0 #3579df;
}
.np-chat-row { display:grid; grid-template-columns:minmax(0,1fr) auto; grid-template-rows:22px 22px; gap:4px 10px; min-width:0; }
.np-chat-subject, .np-chat-preview { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.np-chat-subject { font-weight:400; }
.np-chat-unread .np-chat-subject { font-weight:700; }
.np-chat-time { color:#627494; font-size:11px; align-self:center; white-space:nowrap; }
.np-chat-preview { color:#627494; font-size:12px; }
.np-chat-count { justify-self:end; min-width:22px; padding:0 6px; padding-top:3px; border-radius:11px; background:#155ec0; color:white; font-size:11px; font-weight:600; text-align:center; }
.np-chat-filter { display:flex; align-items:center; gap:7px; font-size:13px; white-space:nowrap; }
.np-messages-page .np-list-query { flex:1 1 180px; }
.np-messages-page .np-list-query .dxbl-text-edit { min-width:0; }
.np-messages-page .np-list-secondary { flex:0 0 auto; }
.np-messages-page .np-list-toolbar { gap:8px; padding:10px 12px; }
.np-message-mobile-actions { display:none; }
@media (max-width: 760px) {
    .np-message-mobile-actions { display:flex; gap:8px; padding-bottom:10px; }
    .np-messages-page .xaf-masterdetail-container > :not(.xaf-masterdetail-view) { display:none; }
    .np-messages-page .xaf-masterdetail-view { flex:1 1 100% !important; }
    .np-messages-page:not(.np-show-chat) .xaf-masterdetail-detailview,
    .np-messages-page.np-show-chat .xaf-masterdetail-listview { display:none; }
}
