/* ==========================================================================
   Dazos CRM Design System — List View / data table (CRM-3745, visual pass)
   Binding pattern: design-system README §6 + templates/data-table (DataTable.dc.html)
   and preview/component-datatable.html. Restyles the SHARED vTiger list templates
   in place: every control, id, class hook and data attribute that List.js binds to
   is unchanged; interactions (Ajax paging, inline edit, frozen columns, saved
   views, mass actions, quick preview) are untouched. Tenant colours arrive as
   tokens from ThemeStyle.tpl (--dz-accent, --dz-accent-fg, --dz-link); the design
   system supplies the neutrals. Loaded after the theme stylesheet.
   ========================================================================== */

:root {
  --dz-surface: #ffffff;
  --dz-bg: #f4f6f8;
  --dz-border: #dde2e7;
  --dz-hairline: #e8edf2;
  --dz-text: #1f2a36;
  --dz-text-2: #5a6a7a;
  --dz-text-3: #8899aa;
  --dz-row-hover: #f4f6f8;
  --dz-row-selected: #e1f3fc;
  --dz-focus: 0 0 0 3px #b3e5fc;
  --dz-radius-sm: 4px;
  --dz-radius-md: 8px;
  --dz-radius-lg: 12px;
  --dz-shadow-lg: 0 10px 15px rgba(31, 42, 54, .10), 0 4px 6px rgba(31, 42, 54, .05);
  --dz-table-row: 48px;
}
.dark-mode {
  --dz-surface: #0f172a;
  --dz-bg: #0a1120;
  --dz-border: #394451;
  --dz-hairline: #23303d;
  --dz-text: #e8edf2;
  --dz-text-2: #aab4be;
  --dz-text-3: #8899aa;
  --dz-row-hover: #16202b;
  --dz-row-selected: #072d4a;
  --dz-focus: 0 0 0 3px #0b476f;
  --dz-shadow-lg: 0 10px 15px rgba(0, 0, 0, .45), 0 4px 6px rgba(0, 0, 0, .3);
}

/* ---- shell ---------------------------------------------------------------- */
/* frozen column header: sticks right under the pinned toolbar (List.js placeTheListComponentStyle sets
   --dz-sticky-top on #page from the toolbar's real bottom edge; 55px = the unpinned/phone value from common.css) */
#page.page-List .sticky-header-list { top: var(--dz-sticky-top, 55px); }
/* phones (CRM-3241 follow-up, Sandeep 2026-09-15): #table-content scrolls sideways on a phone (overflow auto), which
   makes the CARD the header's scrollport — not #page. Both offsets meant for #page (the 55px fallback and the
   --dz-sticky-top List.js sets in the pinned layout = the toolbar's bottom edge) were therefore applied inside the
   card: the header + filter row left a blank slot at the top and floated down over the first rows. Inside the card
   the header sticks at its top edge, whatever the layout. */
@media (max-width: 767.98px) {
  #page.page-List .sticky-header-list { top: 0 !important; }
}
/* page-coloured backdrop behind the pinned breadcrumb row + toolbar (List.js sizes it): the bars are transparent, so
   without it the rows scrolling underneath showed through the gaps around them. Above the table (z 1), below the bars. */
#page.page-List .dz-list-pin-mask { position: fixed; z-index: 1; pointer-events: none; background: #f4f6f9; }
.dark-mode #page.page-List .dz-list-pin-mask { background: var(--dz-bg, #0a1120); }
#listViewContent #table-content.table-container {
  background: var(--dz-surface);
  border: 1px solid var(--dz-border);
  border-radius: var(--dz-radius-lg);
}
#listViewContent #listview-table,
.dark-mode #listViewContent #listview-table {
  background: var(--dz-surface);
  border-collapse: separate;
  border-spacing: 0;
  margin-bottom: 0;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--dz-text);
}
#listViewContent #listview-table.table-striped > tbody > tr:nth-of-type(odd) { background: transparent; } /* row dividers only, no zebra */

/* ---- header row ------------------------------------------------------------ */
#listViewContent #listview-table > thead > tr.listViewContentHeader > th {
  height: var(--dz-table-row);
  padding: 0 16px;
  vertical-align: middle;
  border-top: 0;
  border-bottom: 1px solid var(--dz-border);
  background: var(--dz-surface);
  font-size: 13px;
  font-weight: 600;
  color: var(--dz-text-2);
  white-space: nowrap;
}
#listViewContent #listview-table > thead > tr.listViewContentHeader > th:first-child { border-top-left-radius: var(--dz-radius-lg); }
#listViewContent #listview-table > thead > tr.listViewContentHeader > th:last-child { border-top-right-radius: var(--dz-radius-lg); }
#listViewContent #listview-table > thead th a.listViewContentHeaderValues,
#listViewContent #listview-table > thead th a.noSorting {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: inherit;
  text-decoration: none;
  filter: none !important;   /* ThemeStyle darkens every a:hover; keep header text crisp */
}
#listViewContent #listview-table > thead th a.listViewContentHeaderValues:hover { color: var(--dz-text); }
#listViewContent #listview-table > thead th .dz-sort-icon { color: var(--dz-text-3); flex: none; }
#listViewContent #listview-table > thead th.dz-sorted a.listViewContentHeaderValues { color: var(--dz-accent); font-weight: 700; }
#listViewContent #listview-table > thead th.dz-sorted .dz-sort-icon { color: var(--dz-accent); }
#listViewContent #listview-table > thead th a.removeSorting {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  margin-left: 2px;
  border-radius: var(--dz-radius-sm);
  color: var(--dz-text-3);
  vertical-align: middle;
}
#listViewContent #listview-table > thead th a.removeSorting:hover { background: var(--dz-row-hover); color: var(--dz-text); filter: none !important; }

/* header action cluster: select-all, manage columns, save view */
#listViewContent th.cusActionTh .table-actions { display: flex; align-items: center; gap: 2px; }
#listViewContent th.cusActionTh .table-actions > div { float: none !important; margin: 0 !important; }
#listViewContent th.cusActionTh .listColumnFilter,
#listViewContent th.cusActionTh #saveListFromFilterToggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--dz-radius-md);
  color: var(--dz-text-2);
  cursor: pointer;
}
#listViewContent th.cusActionTh .listColumnFilter:hover,
#listViewContent th.cusActionTh #saveListFromFilterToggle:hover { background: var(--dz-row-hover); color: var(--dz-text); }
#listViewContent th.cusActionTh .listColumnFilter.disabled { color: var(--dz-text-3); cursor: not-allowed; }
#listViewContent th.cusActionTh .listColumnFilterIcon { color: inherit; }   /* common.css pins the legacy glyph to #333 */
#listViewContent th.cusActionTh #saveListFromFilterToggle.cursorPointer:hover .dz-save-list-icon { color: var(--dz-accent); }

/* ---- filter (search) row --------------------------------------------------- */
#listViewContent #listview-table > thead > tr.searchRow > th {
  height: auto;
  padding: 8px;
  vertical-align: middle;
  border-top: 0;
  border-bottom: 1px solid var(--dz-border);
  background: var(--dz-surface);
}
#listViewContent #listview-table > thead > tr.searchRow input.form-control,
#listViewContent #listview-table > thead > tr.searchRow .form-control,
#listViewContent #listview-table > thead > tr.searchRow .select2-container .select2-choice,
#listViewContent #listview-table > thead > tr.searchRow .select2-container .select2-choices,
#listViewContent #listview-table > thead > tr.searchRow .select2-container--default .select2-selection {
  min-height: 36px;
  border: 1px solid var(--dz-text-3);
  border-radius: var(--dz-radius-md);
  background: var(--dz-surface);
  color: var(--dz-text);
  font-size: 13px;
  box-shadow: none;
}
#listViewContent #listview-table > thead > tr.searchRow input.form-control:focus,
#listViewContent #listview-table > thead > tr.searchRow .form-control:focus {
  border-color: var(--dz-accent);
  box-shadow: var(--dz-focus);
  outline: none;
}
/* every filter cell is at least wide enough for a readable value; the control fills its cell (Sandeep 2026-09-09:
   short columns produced tiny search boxes and a picklist dropdown that wrapped every option) */
#listViewContent #listview-table > thead > tr.searchRow > th:not(.inline-search-btn) { min-width: 160px; }
#listViewContent #listview-table > thead > tr.searchRow > th:not(.inline-search-btn) input.form-control,
#listViewContent #listview-table > thead > tr.searchRow > th:not(.inline-search-btn) .form-control,
#listViewContent #listview-table > thead > tr.searchRow > th:not(.inline-search-btn) .select2-container { width: 100% !important; min-width: 0; }
/* the select2 result list is appended to <body>: give it room. On list pages each option stays on one line; everywhere
   else a long picklist value wraps so it can be read in full (SPE-1356: unscoped, this rule truncated options app-wide) */
.select2-drop.select2-drop-active { min-width: 240px; }
body:has(#page.page-List) .select2-drop .select2-results .select2-result-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* the filter row stays one line tall: a long selected filter value truncates instead of growing the table header */
:is(#listViewContent, .relatedContents) #listview-table > thead > tr.searchRow .select2-container .select2-choice > .select2-chosen { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* CRM-3874: on list pages the picklist / owner filter drops (select2, appended to <body>) wear the same card as
   the Import & Export and More menus: white card, 12px radius, soft shadow, uppercase group headers, quiet hover.
   Scoped through the page wrapper so edit forms and popups keep their own select2 look. */
body:has(#page.page-List) .select2-drop.select2-drop-active {
  margin-top: 4px;
  padding: 8px;
  border: 1px solid var(--dz-border) !important;
  border-radius: var(--dz-radius-lg);
  background: var(--dz-surface);
  box-shadow: var(--dz-shadow-lg);
  color: var(--dz-text);
  font-family: var(--font-body);
  font-size: 13px;
}
body:has(#page.page-List) .select2-drop.select2-drop-active.select2-drop-above { margin-top: -4px; }
body:has(#page.page-List) .select2-drop.select2-drop-active .select2-search { min-height: 0; padding: 0 0 8px; }
body:has(#page.page-List) .select2-drop.select2-drop-active .select2-search input {
  min-height: 34px;
  padding: 6px 30px 6px 10px;
  border: 1px solid var(--dz-border);
  border-radius: var(--dz-radius-md);
  background-color: var(--dz-surface);
  color: var(--dz-text);
  font-family: inherit;
  font-size: 13px;
  box-shadow: none;
}
body:has(#page.page-List) .select2-drop.select2-drop-active .select2-search input:focus { border-color: var(--dz-accent); box-shadow: var(--dz-focus); }
body:has(#page.page-List) .select2-drop.select2-drop-active .select2-results { max-height: 280px; margin: 0; padding: 0; }
body:has(#page.page-List) .select2-drop.select2-drop-active .select2-results .select2-result-label {
  padding: 8px 12px;
  border-radius: var(--dz-radius-md);
  line-height: 1.3;
  color: var(--dz-text);
}
body:has(#page.page-List) .select2-drop.select2-drop-active .select2-results .select2-highlighted { background: transparent; color: var(--dz-text); }
body:has(#page.page-List) .select2-drop.select2-drop-active .select2-results .select2-highlighted > .select2-result-label { background: var(--dz-row-hover); }
body:has(#page.page-List) .select2-drop.select2-drop-active .select2-results .select2-result-selectable > .select2-result-label:hover { background: var(--dz-row-hover); }
/* group headers ("Users", "Groups") like the menu section headers */
body:has(#page.page-List) .select2-drop.select2-drop-active .select2-results li.select2-result-with-children > .select2-result-label {
  padding: 8px 12px 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--dz-text-2);
  cursor: default;
  background: transparent;
}
body:has(#page.page-List) .select2-drop.select2-drop-active .select2-results .select2-result-sub > li .select2-result-label { padding-left: 12px; }
body:has(#page.page-List) .select2-drop.select2-drop-active .select2-results .select2-no-results,
body:has(#page.page-List) .select2-drop.select2-drop-active .select2-results .select2-searching,
body:has(#page.page-List) .select2-drop.select2-drop-active .select2-results .select2-selection-limit { padding: 8px 12px; background: transparent; color: var(--dz-text-2); }
body:has(#page.page-List) .select2-drop.select2-drop-active .select2-results li em { background: var(--dz-row-selected); border-radius: 2px; }
/* Reports > Report Type filter: the sprite icon drawn by Reports List.js in front of each option and chosen chip */
.select2-results .select2-result-label .dz-report-type-icon,
.select2-container .select2-search-choice .dz-report-type-icon { margin-right: 8px; vertical-align: -3px; color: var(--dz-text-2); flex: none; }
#listViewContent #listview-table > thead > tr.searchRow th.inline-search-btn .table-actions { display: flex; align-items: center; gap: 2px; }
#listViewContent #listview-table > thead > tr.searchRow th.inline-search-btn .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  margin: 0 !important;
  border-radius: var(--dz-radius-md);
}
/* filter-row controls are quiet icon buttons; the "on" state (btn-success — List.js reads it for the
   starred filter) becomes an accent tint instead of a solid green button */
#listViewContent #listview-table > thead > tr.searchRow th.inline-search-btn .btn.btn-outline-success,
#listViewContent #listview-table > thead > tr.searchRow th.inline-search-btn .btn.btn-success {
  border: 1px solid transparent;
  background: transparent;
  color: var(--dz-text-2);
  box-shadow: none;
}
#listViewContent #listview-table > thead > tr.searchRow th.inline-search-btn .btn:hover { background: var(--dz-row-hover); color: var(--dz-text); }
#listViewContent #listview-table > thead > tr.searchRow th.inline-search-btn .btn.btn-success { background: var(--dz-row-selected); color: var(--dz-accent); }
#listViewContent #listview-table > thead > tr.searchRow th.inline-search-btn .btn.fetchStarredRecord.btn-success .dz-icon { fill: currentColor; }
#listViewContent #listview-table > thead > tr.searchRow th.inline-search-btn .btn:focus-visible { outline: none; box-shadow: var(--dz-focus); }

/* ---- body rows -------------------------------------------------------------- */
#listViewContent #listview-table > tbody > tr > td {
  height: var(--dz-table-row);
  padding: 0 16px;
  vertical-align: middle;
  border-top: 0;
  border-bottom: 1px solid var(--dz-hairline);
  background: transparent;
}
#listViewContent #listview-table > tbody > tr:last-child > td { border-bottom: 0; }
/* pinned columns (List.js frozen-col) and the action column slide over the other cells while the list scrolls
   sideways, so they must be opaque — the transparent body-cell rule above would let the covered text show through.
   Hover / selection rules below carry an extra class or pseudo-class, so they still win and keep their tint. */
#listViewContent #listview-table > thead > tr > th.frozen-col,
#listViewContent #listview-table > thead > tr > th.cusActionTh,
#listViewContent #listview-table > tbody > tr > td.frozen-col,
#listViewContent #listview-table > tbody > tr > td.cusActionTh { background: var(--dz-surface); }
/* native sticky pinning (List.js applyFrozenColumns sets --dz-pin-left = the table's resting offset inside the
   horizontal scroller, and an inline `left` on each pinned field column); no per-frame JS, so no lag */
#listViewContent #listview-table > thead > tr > th.cusActionTh,
#listViewContent #listview-table > tbody > tr > td.cusActionTh { position: sticky; left: var(--dz-pin-left, 0px); z-index: 3; }
#listViewContent #listview-table > thead > tr > th.frozen-col,
#listViewContent #listview-table > tbody > tr > td.frozen-col { position: sticky; z-index: 2; }
#listViewContent #listview-table > thead > tr > th.cusActionTh,
#listViewContent #listview-table > thead > tr > th.frozen-col { z-index: 6; }   /* inside the thead's own stacking context */
#listViewContent #listview-table > tbody > tr > td.frozen-col-shadow,
#listViewContent #listview-table > thead > tr > th.frozen-col-shadow,
#listViewContent #listview-table.dz-hscrolled:not(.dz-has-frozen) > tbody > tr > td.cusActionTh,
#listViewContent #listview-table.dz-hscrolled:not(.dz-has-frozen) > thead > tr > th.cusActionTh { box-shadow: 3px 0 6px -2px rgba(16, 24, 40, .14); }
/* while scrolled sideways the card's left margin sits between the scroller edge and the pinned cells; paint it in
   the page background so the columns passing underneath do not peek out there */
#listViewContent #listview-table.dz-hscrolled > thead > tr > th.cusActionTh,
#listViewContent #listview-table.dz-hscrolled > tbody > tr > td.cusActionTh { box-shadow: -24px 0 0 0 var(--dz-bg); }
#listViewContent #listview-table.dz-hscrolled:not(.dz-has-frozen) > tbody > tr > td.cusActionTh,
#listViewContent #listview-table.dz-hscrolled:not(.dz-has-frozen) > thead > tr > th.cusActionTh { box-shadow: -24px 0 0 0 var(--dz-bg), 3px 0 6px -2px rgba(16, 24, 40, .14); }
/* the totals strip sits inside the card that scrolls with the table: keep it in view on every screen size
   (--dz-pin-left is set on #table-content by List.js; 0 on phones, where #page scrolls and nothing is pinned) */
#listViewContent #table-content .lv-counters-bar { position: sticky; left: var(--dz-pin-left, 0px); z-index: 1; }
/* the page container's own scrollbars (desktop list layout scrolls #page) in the design's quiet style */
#page.page-List { scrollbar-width: thin; scrollbar-color: #c2c9d2 transparent; }
#page.page-List::-webkit-scrollbar { width: 10px; height: 10px; }
#page.page-List::-webkit-scrollbar-track { background: transparent; }
#page.page-List::-webkit-scrollbar-thumb { background: #c2c9d2; border-radius: 10px; border: 2px solid transparent; background-clip: padding-box; }
#page.page-List::-webkit-scrollbar-thumb:hover { background-color: #98a2b3; }
#page.page-List::-webkit-scrollbar-corner { background: transparent; }
/* the collapsed Lists-drawer handle docks at the right edge: step it off the scrollbar column while #page scrolls */
body.dz-page-scrollbar .main-container #listViewContent.full-width .essentials-toggle { right: 10px !important; }
.dark-mode #page.page-List { scrollbar-color: #50585f transparent; }
.dark-mode #page.page-List::-webkit-scrollbar-thumb { background-color: #50585f; }
@media (max-width: 767.98px) {
  /* phones scroll the whole #page sideways (the card stays overflow: visible so the frozen header keeps #page as
     its sticky container); the action column would eat a third of the screen if it stayed pinned, so it scrolls
     with the table there (Sandeep 2026-09-09). Pinned fields never apply under 1236px. */
  #listViewContent #table-content, #listViewContent #listview-table { --dz-pin-left: 0px !important; }
  #listViewContent #listview-table > thead > tr > th.cusActionTh,
  #listViewContent #listview-table > tbody > tr > td.cusActionTh { position: static; box-shadow: none !important; }
}
#listViewContent #listview-table > tbody > tr.listViewEntries:hover > td,
#listViewContent #listview-table.table-hover > tbody > tr.listViewEntries:hover > td { background: var(--dz-row-hover); }
#listViewContent #listview-table > tbody > tr.listViewEntries.highlightBackgroundColor > td,
#listViewContent #listview-table > tbody > tr.listViewEntries.selected > td,
#listViewContent #listview-table > tbody > tr.listViewEntries:has(> td input.listViewEntriesCheckBox:checked) > td { background: var(--dz-row-selected); }   /* selection tint keyed off the checkbox itself — no JS hook needed */
#listViewContent #listview-table > tbody > tr.listViewEntries > td.listViewEntryValue a { color: var(--dz-link, var(--dz-accent)); }
#listViewContent #listview-table > tbody > tr.emptyRecordsDiv > td { height: 140px; text-align: center; color: var(--dz-text-2); }

/* ---- selection checkboxes: square, 20px, accent when checked ------------------ */
#listViewContent input[type="checkbox"].listViewEntriesCheckBox,
#listViewContent input[type="checkbox"].listViewEntriesMainCheckBox {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  margin: 0;
  border: 2px solid var(--dz-text-3);
  border-radius: var(--dz-radius-sm);
  background: var(--dz-surface);
  display: inline-block;
  vertical-align: middle;
  position: relative;
  cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease;
}
#listViewContent input[type="checkbox"].listViewEntriesCheckBox:checked,
#listViewContent input[type="checkbox"].listViewEntriesMainCheckBox:checked {
  background: var(--dz-accent);
  border-color: var(--dz-accent);
}
#listViewContent input[type="checkbox"].listViewEntriesCheckBox:checked::after,
#listViewContent input[type="checkbox"].listViewEntriesMainCheckBox:checked::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 1px;
  width: 6px;
  height: 11px;
  border: solid var(--dz-accent-fg);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
#listViewContent input[type="checkbox"].listViewEntriesCheckBox:focus-visible,
#listViewContent input[type="checkbox"].listViewEntriesMainCheckBox:focus-visible { outline: none; box-shadow: var(--dz-focus); }

/* ---- row action cluster: checkbox · quick view · star · kebab ------------------- */
#listViewContent td.listViewRecordActions { padding-left: 16px; padding-right: 8px; }
#listViewContent td.listViewRecordActions .table-actions { gap: 2px; }
#listViewContent td.listViewRecordActions .table-actions > .input { display: inline-flex; align-items: center; margin-right: 6px !important; }
#listViewContent td.listViewRecordActions .action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  margin: 0 !important;
  border-radius: var(--dz-radius-md);
  color: var(--dz-text-2);
  cursor: pointer;
  transition: background-color .15s ease, color .15s ease;
}
#listViewContent td.listViewRecordActions .action:hover { background: var(--dz-row-hover); color: var(--dz-text); }
#listViewContent td.listViewRecordActions .action .dz-icon { width: 20px; height: 20px; }
#listViewContent td.listViewRecordActions .markStar.active,
#listViewContent td.listViewRecordActions .markStar.active.text-danger { color: var(--dz-accent) !important; }
#listViewContent td.listViewRecordActions .markStar.active .dz-icon { fill: currentColor; }
#listViewContent td.listViewRecordActions .more.dropdown .dropdown-toggle { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; }
#listViewContent td.listViewRecordActions .more.dropdown .dropdown-toggle::after { display: none; }
#listViewContent td.listViewRecordActions .more.dropdown .dropdown-menu {
  min-width: 190px;
  padding: 8px;
  border: 1px solid var(--dz-border);
  border-radius: var(--dz-radius-lg);
  background: var(--dz-surface);
  box-shadow: var(--dz-shadow-lg);
}
#listViewContent td.listViewRecordActions .more.dropdown .dropdown-menu > li { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: var(--dz-radius-md); font-size: 13px; }
#listViewContent td.listViewRecordActions .more.dropdown .dropdown-menu > li:hover { background: var(--dz-row-hover); }
#listViewContent td.listViewRecordActions .more.dropdown .dropdown-menu > li > a { color: var(--dz-text); padding: 0; filter: none !important; }
#listViewContent td.listViewRecordActions .more.dropdown .dropdown-menu > li > a.deleteRecordButton { color: #d32f2f; }
#listViewContent td.listViewRecordActions .inline-save { gap: 2px; }
/* inline editor Accept / Cancel: flat tiles like the filter-row buttons above them — the browser's 2px "outset"
   button border read as a dark outline and the focus ring as a shadow (CRM-3874) */
#listViewContent td.listViewRecordActions .inline-save .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0 !important;
  border-radius: var(--dz-radius-md);
  box-shadow: none !important;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}
#listViewContent td.listViewRecordActions .inline-save .button:focus-visible { box-shadow: var(--dz-focus) !important; }
#listViewContent td.listViewRecordActions .inline-save .button .dz-icon { width: 18px; height: 18px; }

/* ---- picklist values as tag pills (colour bound to value by PicklistColorMap) ---- */
#listViewContent #listview-table .picklist-color {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 10px;
  border-radius: var(--dz-radius-sm);
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
}

/* ---- toolbar (mass actions · list selector · pagination) --------------------- */
#listViewContent .listview-actions-container { padding: 4px 0 8px; }
#listViewContent .listViewActionsContainer .btn,
#listViewContent .listViewMassActions .btn,
#listViewContent .manuallPullEMR {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 36px;
  padding: 0 12px;
  border-radius: var(--dz-radius-md);
  font-weight: 600;
}
#listViewContent .listViewActionsContainer .btn .dz-icon { width: 18px; height: 18px; }
#listViewContent .list-filter-toggle {
  min-height: 36px;
  border-radius: var(--dz-radius-md) !important;
  font-weight: 600;
}
#listViewContent .list-filter-dropdown,
#listViewContent .listViewMassActions .dropdown-menu {
  padding: 6px;
  border: 1px solid var(--dz-border);
  border-radius: var(--dz-radius-lg);
  background: var(--dz-surface);
  box-shadow: var(--dz-shadow-lg);
  color: var(--dz-text);
}
#listViewContent .list-filter-dropdown li.viewList { border-radius: var(--dz-radius-md); padding: 6px 12px; }
#listViewContent .list-filter-dropdown li.viewList:hover { background: var(--dz-row-hover); }
#listViewContent .list-filter-dropdown li.viewList.active { background: var(--dz-row-selected); }
#listViewContent .list-filter-dropdown li.viewList a { color: var(--dz-text); filter: none !important; }
#listViewContent .list-filter-dropdown li.viewList .dz-icon { width: 16px; height: 16px; margin-left: 6px; vertical-align: -3px; }
#listViewContent .list-filter-dropdown .createFilterInDropdown { display: inline-flex; align-items: center; color: var(--dz-accent); }
#listViewContent .list-filter-dropdown .createFilterInDropdown:hover { color: var(--dz-link, var(--dz-accent)); filter: none !important; }
#listViewContent .listViewMassActions .dropdown-menu > li > a { border-radius: var(--dz-radius-md); padding: 8px 12px; color: var(--dz-text); filter: none !important; }
#listViewContent .listViewMassActions .dropdown-menu > li > a:hover { background: var(--dz-row-hover); }

/* ---- pagination ------------------------------------------------------------- */
#listViewContent .paginationActionBox { font-size: 13px; color: var(--dz-text-2); }
#listViewContent .paginationActionBox .form-label { color: var(--dz-text); font-weight: 600; }
#listViewContent .paginationActionBox select.page_limit {
  height: 32px;
  margin-top: -6px !important;
  padding: 0 8px;
  border: 1px solid var(--dz-text-3);
  border-radius: var(--dz-radius-md);
  background: var(--dz-surface);
  color: var(--dz-text);
  font-size: 13px;
}
#listViewContent .paginationActionBox .btn-default {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  margin-left: 4px;
  border: 1px solid var(--dz-border);
  border-radius: var(--dz-radius-md);
  background: var(--dz-surface);
  color: var(--dz-text-2);
}
#listViewContent .paginationActionBox .btn-default:hover:not(:disabled) { background: var(--dz-row-hover); color: var(--dz-text); }
#listViewContent .paginationActionBox .btn-default:disabled { color: var(--dz-text-3); opacity: 1; cursor: not-allowed; }
#listViewContent .paginationActionBox .pageNumbersText,
#listViewContent .paginationActionBox .totalNumberOfRecords { color: var(--dz-text-2); }
#listViewContent .paginationActionBox .PageJumpDropDown {
  padding: 10px;
  border: 1px solid var(--dz-border);
  border-radius: var(--dz-radius-lg);
  background: var(--dz-surface);
  box-shadow: var(--dz-shadow-lg);
  color: var(--dz-text);
}
#listViewContent .bottom-div-pagination { padding: 4px 0; }

/* ---- left-panel toggle keeps its fixed position, takes the icon-button look --- */
#listViewContent .essentials-toggle { display: inline-flex; align-items: center; justify-content: center; color: var(--dz-text-2); }

/* ---- responsive: true phone width ------------------------------------------- */
@media (max-width: 767.98px) {
  #listViewContent .listview-actions-container .row > [class*="col-"] { flex: 0 0 100%; max-width: 100%; margin: 4px 0 !important; }
  #listViewContent .listViewActionsContainer { flex-wrap: wrap; max-height: none !important; gap: 4px; }
  #listViewContent .list-filter-toggle { width: 100%; }
  /* The card must NOT be a scroll container on phones: an overflow other than visible makes #table-content the
     sticky container of the frozen header (thead.sticky-header-list, top: --dz-sticky-top = the pinned toolbar's
     bottom edge in #page coordinates). Measured at 430x932: the header row and its filter row rendered 343px down
     inside the card (two records above them) and slid away on scroll. #page.page-List already scrolls both axes
     under 768px (sidebar.css), so the wide table swipes sideways there, exactly like on desktop. */
  #listViewContent #table-content.table-container { overflow: visible; border-radius: var(--dz-radius-md); }
  #listViewContent #listview-table > tbody > tr > td,
  #listViewContent #listview-table > thead > tr.listViewContentHeader > th { height: 56px; }   /* relaxed density on mobile */
  #listViewContent td.listViewRecordActions .action,
  #listViewContent #listview-table > thead > tr.searchRow th.inline-search-btn .btn,
  #listViewContent .paginationActionBox .btn-default { width: 44px; height: 44px; }   /* touch targets */
  #listViewContent input[type="checkbox"].listViewEntriesCheckBox,
  #listViewContent input[type="checkbox"].listViewEntriesMainCheckBox { width: 22px; height: 22px; }
  #listViewContent .paginationActionBox { flex-wrap: wrap; row-gap: 6px; }
}

/* ============================================================================================
   Page header to the design (CRM-3745 follow-up, 2026-09-08): module title + back arrow in the
   top bar, small "CRM › Module › List" breadcrumb, quiet action row (segmented view switch, filled
   primary Add, outline Import / Customize). Functionality untouched: same buttons, ids and handlers.
   CRM-3241: the top-bar rules (.dz-page-heading, .dz-topbar-title, .nav-link.bars) moved to nav-chrome.css,
   which owns the header now.
   ============================================================================================ */

/* small breadcrumb on list views */
.dz-list-header h3.breadCrumbSize {
  display: flex; align-items: center; flex-wrap: wrap; gap: 4px; margin: 0; min-height: 36px;
  font-family: var(--font-body, inherit); font-size: 13px; font-weight: 600; line-height: 1.3;
}
.dz-list-header h3.breadCrumbSize .dz-crumb-root { color: #667085; font-weight: 500; }
.dz-list-header h3.breadCrumbSize .dz-crumb-sep { color: #98a2b3; flex-shrink: 0; }
.dz-list-header h3.breadCrumbSize a { color: var(--dz-link, #1a7efb); text-decoration: none; }
.dz-list-header h3.breadCrumbSize a:hover { text-decoration: underline; }
.dz-list-header h3.breadCrumbSize > span { display: inline-flex; align-items: center; gap: 4px; }

/* action row */
.pull-right.dz-list-header { display: flex; align-items: center; gap: 8px; }
.dz-list-header .dz-freeze-box { display: inline-flex; align-items: center; margin: 0 4px 0 0; }
.dz-list-header .dz-freeze-box .custom-control-label { font-size: 12px; font-weight: 600; color: #667085; white-space: nowrap; padding-top: 2px; }
.dz-list-header #appnav { margin: 0; }
.dz-list-header #appnav .btn-group { display: flex; align-items: center; gap: 8px; }
/* CRM-3950 (Kenny): "header button spacing shrinks after clicking Customize". Bootstrap adds .show to the button
   group while its dropdown is open, and the legacy todc bootstrap sheet declares `.show { display: block !important }`
   — the flex row (and its 8px gaps) became a block of inline buttons, so Add / Import / Customize closed ranks by
   24px and snapped back on close. The group keeps its flex layout while open; everywhere else a .show button group
   keeps Bootstrap 4's inline-flex. */
.btn-group.show,
.btn-group-vertical.show { display: inline-flex !important; }
.dz-list-header #appnav .btn-group.show,
#appnav .btn-group.show { display: flex !important; }
.dz-list-header #appnav .dz-vdivider { display: inline-block; width: 1px; height: 24px; background: #eaecf0; margin: 0 4px; }
.dz-list-header #appnav .btn.module-buttons {
  display: inline-flex; align-items: center; gap: 6px; height: 36px; margin: 0; padding: 0 14px;
  border: 1px solid #d0d5dd; border-radius: 8px; background: #fff; color: #101828;
  font-size: 13px; font-weight: 600; line-height: 1; box-shadow: none; white-space: nowrap;
}
.dz-list-header #appnav .btn.module-buttons:hover,
.dz-list-header #appnav .btn.module-buttons:focus { background: #f8f9fb; color: #101828; border-color: #c2c9d2; }
.dz-list-header #appnav .btn.module-buttons .dz-icon { width: 16px; height: 16px; }
.dz-list-header #appnav .btn.module-buttons .dz-caret { margin-left: -2px; color: #667085; }
.dz-list-header #appnav .btn.module-buttons.dropdown-toggle::after { display: none; } /* the caret icon replaces Bootstrap's */
.dz-list-header #appnav .btn.module-buttons[id$="_basicAction_LBL_ADD_RECORD"],
.dz-list-header #appnav .btn.module-buttons#Reports_listView_basicAction_Add,
.dz-list-header #appnav .btn.module-buttons.quickCreateModule {
  background: var(--dz-accent, #1a7efb); border-color: var(--dz-accent, #1a7efb); color: var(--dz-accent-fg, #fff);
}
.dz-list-header #appnav .btn.module-buttons[id$="_basicAction_LBL_ADD_RECORD"]:hover,
.dz-list-header #appnav .btn.module-buttons#Reports_listView_basicAction_Add:hover,
.dz-list-header #appnav .btn.module-buttons.quickCreateModule:hover { filter: brightness(.94); color: var(--dz-accent-fg, #fff); }
.dz-list-header #appnav .kanban-view-switch { margin: 0; }
.dark-mode .dz-list-header #appnav .btn.module-buttons { background: #343a40; border-color: #50585f; color: #e9ecef; }
.dark-mode .dz-list-header h3.breadCrumbSize .dz-crumb-root { color: #aeb9c4; }
.dark-mode .dz-list-header #appnav .dz-vdivider { background: #454d55; }
@media (max-width: 992px) {
  .dz-list-header #appnav .btn.module-buttons { padding: 0 10px; }
  .dz-list-header .dz-freeze-box .custom-control-label > span { display: none; }
  .dz-list-header .dz-freeze-box { padding: 0 10px; }
}
/* the tenant "Breadcrumb Font Size" theme rule (ThemeStyle.tpl, !important) targets .breadCrumbSize; on list views the
   module title moved to the top bar and the breadcrumb is secondary, so it stays small regardless of that setting */
.dz-list-header h3.breadCrumbSize,
.dz-list-header h3.breadCrumbSize a,
.dz-list-header h3.breadCrumbSize span { font-size: 13px !important; }
.dz-list-header h3.breadCrumbSize .dz-crumb-root { font-weight: 500 !important; }
/* Documents (and any override) that lays its actions out as a nav list instead of a .btn-group */
.dz-list-header #appnav .nav.navbar-nav { display: flex; flex-direction: row; align-items: center; gap: 8px; margin: 0; flex-wrap: nowrap; }
.dz-list-header #appnav .nav.navbar-nav > li { display: inline-flex; align-items: center; float: none; }
.dz-list-header #appnav .nav.navbar-nav > li > .btn.module-buttons { margin: 0; }
.pull-right.dz-list-header { flex-wrap: nowrap; }
/* design order in nav-list action rows: view switch, Add, then Customize */
.dz-list-header #appnav .nav.navbar-nav > li:has(> ul.detailViewSetting) { order: 9; }
/* Documents' "New Document" menu is also a ul.detailViewSetting: keep that (primary) action before Customize */
.dz-list-header #appnav .nav.navbar-nav > li:has(> .btn.btn-primary) { order: 8; }

/* ---- header action buttons on pages WITHOUT the list header class (Settings lists via Settings/Vtiger/ModuleHeader.tpl,
   record detail pages): the same `#appnav .btn-group > .btn.module-buttons` markup rendered as bare text — "+ Add Tag"
   floated as plain words in the breadcrumb row (Sandeep 2026-09-14). Same outline / filled treatment as the list
   header; `.addButton` (the Settings Add action) is the filled primary. The list-header rules above are more specific
   and keep winning on list pages. */
#appnav .btn-group { display: flex; align-items: center; gap: 8px; }
#appnav .btn-group > .btn.module-buttons {
  display: inline-flex; align-items: center; gap: 6px; height: 36px; margin: 0; padding: 0 14px;
  border: 1px solid #d0d5dd; border-radius: 8px; background: #fff; color: #101828;
  font-size: 13px; font-weight: 600; line-height: 1; box-shadow: none; white-space: nowrap;
}
#appnav .btn-group > .btn.module-buttons:hover,
#appnav .btn-group > .btn.module-buttons:focus { background: #f8f9fb; color: #101828; border-color: #c2c9d2; }
#appnav .btn-group > .btn.module-buttons .dz-icon { width: 16px; height: 16px; }
/* (the Import action carries .addButton too — it stays an outline button) */
#appnav .btn-group > .btn.module-buttons.addButton:not([id*="_IMPORT"]),
#appnav .btn-group > .btn.module-buttons[id$="_basicAction_LBL_ADD_RECORD"] {
  background: var(--dz-accent, #1a7efb); border-color: var(--dz-accent, #1a7efb); color: var(--dz-accent-fg, #fff);
}
#appnav .btn-group > .btn.module-buttons.addButton:not([id*="_IMPORT"]):hover,
#appnav .btn-group > .btn.module-buttons[id$="_basicAction_LBL_ADD_RECORD"]:hover { filter: brightness(.94); color: var(--dz-accent-fg, #fff); }
#appnav .btn-group > .settingsIcon > .btn.module-buttons { height: 36px; border: 1px solid #d0d5dd; border-radius: 8px; background: #fff; }
/* Import carries .addButton but is an outline button (above), so it takes the dark outline too: without it the light
   #fff background stayed under the dark theme's light text and the label disappeared */
.dark-mode #appnav .btn-group > .btn.module-buttons:not(.addButton),
.dark-mode #appnav .btn-group > .btn.module-buttons.addButton[id*="_IMPORT"] { background: #343a40; border-color: #50585f; color: #e9ecef; }
.dark-mode #appnav .btn-group > .btn.module-buttons:not(.addButton):hover,
.dark-mode #appnav .btn-group > .btn.module-buttons:not(.addButton):focus,
.dark-mode #appnav .btn-group > .btn.module-buttons.addButton[id*="_IMPORT"]:hover,
.dark-mode #appnav .btn-group > .btn.module-buttons.addButton[id*="_IMPORT"]:focus { background: #3d444b; border-color: #5c656e; color: #fff; }
/* Record pages of modules whose header puts its buttons in ul.nav.navbar-nav > li instead of .btn-group (Documents,
   Email / SMS Templates, Portal, Rss ModuleHeader.tpl): only the list header styled that markup, so on the record page
   Customize and New Document stacked as bare items. Same row and button look as the other record headers, the primary
   first; phones keep the Record options sheet (record-view-design.css). */
@media (min-width: 768px) {
  .module-breadcrumb-Detail #appnav > .nav.navbar-nav { display: flex; flex-direction: row; flex-wrap: nowrap; align-items: center; gap: 8px; margin: 0; }
  .module-breadcrumb-Detail #appnav > .nav.navbar-nav > li { float: none !important; margin: 0; }
  .module-breadcrumb-Detail #appnav > .nav.navbar-nav > li:has(> .btn.btn-primary) { order: -1; }
  .module-breadcrumb-Detail #appnav > .nav.navbar-nav > li > .btn.module-buttons {
    display: inline-flex; align-items: center; gap: 6px; height: 36px; margin: 0; padding: 0 14px;
    border: 1px solid #d0d5dd; border-radius: 8px; background: #fff; color: #101828;
    font-size: 13px; font-weight: 600; line-height: 1; box-shadow: none; white-space: nowrap;
  }
  .module-breadcrumb-Detail #appnav > .nav.navbar-nav > li > .btn.module-buttons:hover,
  .module-breadcrumb-Detail #appnav > .nav.navbar-nav > li > .btn.module-buttons:focus { background: #f8f9fb; color: #101828; border-color: #c2c9d2; }
  .module-breadcrumb-Detail #appnav > .nav.navbar-nav > li > .btn.module-buttons .dz-icon { width: 16px; height: 16px; }
  .module-breadcrumb-Detail #appnav > .nav.navbar-nav > li > .btn.btn-primary.module-buttons {
    background: var(--dz-accent, #1a7efb); border-color: var(--dz-accent, #1a7efb); color: var(--dz-accent-fg, #fff);
  }
  .module-breadcrumb-Detail #appnav > .nav.navbar-nav > li > .btn.btn-primary.module-buttons:hover { filter: brightness(.94); color: var(--dz-accent-fg, #fff); }
  .dark-mode .module-breadcrumb-Detail #appnav > .nav.navbar-nav > li > .btn.module-buttons:not(.btn-primary) { background: #343a40; border-color: #50585f; color: #e9ecef; }
}
/* Settings lists that draw their own Add button (Treatment Program): `pull-right` has no float here, so it sat at the
   left under the breadcrumb — right-aligned like the header actions */
.settingsPageDiv .col-lg-12.pt-3:has(> .btn.pull-right) { display: flex; justify-content: flex-end; }
.settingsPageDiv .col-lg-12.pt-3 > .btn.pull-right { float: none !important; display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: 8px; font-size: 13px; font-weight: 600; box-shadow: none; }

/* Screen Flow buttons in a record header's tag row (CRM-3863, DetailViewHeader.tpl + resources/ScreenFlowButtons.js):
   the same pill as "Add Tag" beside it. Two shapes are in the markup - one pill per flow, or one "Screen Flows"
   dropdown listing them - and the script shows whichever fits the row; the pills must never wrap mid-label or
   the one-line test they are measured by would be answered by the label instead of the row. */
.record-header .screenFlowButtons { white-space: nowrap; }
.record-header .screenFlowButtons .screenFlowButton { white-space: nowrap; margin-right: 4px; }
.record-header .screenFlowButtons .screenFlowButton .dz-icon,
.record-header .screenFlowButtons .screenFlowButtonsToggle .dz-icon { width: 14px; height: 14px; margin-right: 4px; vertical-align: -2px; }
.record-header .screenFlowButtons .screenFlowButtonsToggle .badge { margin-left: 4px; }
/* Compact shape: the "Screen Flows <count>" pill is the untouched markup (same btn-primary btn-sm as
   its neighbours); the Select2 container is laid over it, invisible, the same size, so a click on
   the pill opens the list under it (2026-09-25, "the look should not change, just select2"). The
   list gets a search box, the clipboard icon in front of every entry, and scrolls past 320px. */
.record-header .screenFlowButtons .screenFlowButtons-collapsed { position: relative; display: inline-block; vertical-align: middle; }
.record-header .screenFlowButtons .screenFlowButtons-collapsed .screenFlowButtonsToggle { pointer-events: none; }
.record-header .screenFlowButtons .screenFlowButtons-collapsed:hover .screenFlowButtonsToggle { filter: brightness(0.94); }
.record-header .screenFlowButtons .screenFlowPickerBox { position: absolute !important; left: 0; top: 0; width: 100% !important; height: 100%; margin: 0; opacity: 0; }
.record-header .screenFlowButtons .screenFlowPickerBox .select2-choice { display: block; height: 100%; padding: 0; margin: 0; border: 0; background: transparent; box-shadow: none; cursor: pointer; }
.record-header .screenFlowButtons .screenFlowPickerBox .select2-choice .select2-arrow { display: none; }
.screenFlowPickerDrop { min-width: 240px; }
.screenFlowPickerDrop .select2-results { max-height: 320px; }
.screenFlowPickerDrop .select2-result-label { white-space: nowrap; }
.screenFlowPickerDrop .screenFlowPickerItem { display: inline-flex; align-items: center; gap: 8px; }
.screenFlowPickerDrop .screenFlowPickerItem .dz-icon,
.screenFlowPickerDrop .screenFlowPickerItem svg { width: 14px; height: 14px; flex: none; }

/* ============================================================================================
   List toolbar + selection bar to the design (CRM-3745 follow-up, 2026-09-08)
   ============================================================================================ */
#listview-actions .dz-list-toolbar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 10px 12px; margin: 0 0 12px; background: #fff; border: 1px solid #eaecf0; border-radius: 12px;
}
#listview-actions .dz-list-toolbar-left, #listview-actions .dz-list-toolbar-right { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
#listview-actions .dz-list-toolbar-right { margin-left: auto; }
#listview-actions .dz-list-toolbar .dz-vdivider { display: inline-block; width: 1px; height: 24px; background: #eaecf0; margin: 0 2px; }
#listview-actions .btn.dz-tool-btn, .dz-list-header .dz-freeze-box {
  display: inline-flex; align-items: center; gap: 6px; height: 36px; margin: 0; padding: 0 12px;
  border: 1px solid #d0d5dd; border-radius: 8px; background: #fff; color: #101828;
  font-size: 13px; font-weight: 600; line-height: 1; box-shadow: none; white-space: nowrap; text-transform: none;
}
#listview-actions .btn.dz-tool-btn:hover, #listview-actions .btn.dz-tool-btn:focus { background: #f8f9fb; color: #101828; border-color: #c2c9d2; }
#listview-actions .btn.dz-tool-btn .dz-icon { width: 16px; height: 16px; }
#listview-actions .btn.dz-tool-btn .dz-caret { margin-left: -2px; color: #667085; }
#listview-actions .btn.dz-tool-btn.dropdown-toggle::after { display: none; }
#listview-actions .dz-lists-sep { color: #d0d5dd; margin: 0 2px; }
#listview-actions .dz-lists-current { color: #667085; font-weight: 500; }
#listview-actions .dz-lists-current b { color: var(--dz-link, #1a7efb); font-weight: 700; display: inline-block; max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }
#listview-actions .dz-impexp-menu { min-width: 260px; padding: 6px 0; border-radius: 10px; border: 1px solid #eaecf0; box-shadow: 0 8px 24px rgba(16,24,40,.12); }
#listview-actions .dz-impexp-menu .dz-menu-header { font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: #667085; padding: 8px 16px 4px; }
#listview-actions .dz-impexp-menu li.selectFreeRecords > a { display: flex; align-items: center; gap: 10px; padding: 8px 16px; font-size: 13px; color: #101828; }
#listview-actions .dz-impexp-menu li.selectFreeRecords > a:hover { background: #f4f6f8; }
#listview-actions .dz-impexp-menu li.selectFreeRecords > a .dz-icon { width: 16px; height: 16px; color: #475467; }
#listview-actions .dz-impexp-menu li.dz-menu-header + li.dz-menu-header, #listview-actions .dz-impexp-menu li.dz-menu-header:last-child { display: none; }
#listview-actions .dz-list-toolbar .manuallPullEMR { height: 36px; border-radius: 8px; }

/* selection bar: visible only while rows are ticked (List.js updateSelectionBar) */
#listview-actions .dz-selection-bar {
  display: flex; align-items: center; gap: 12px; padding: 8px 12px; margin: 0 0 8px;
  background: #eaf4ff; border: 1px solid #b6dbff; border-radius: 12px;
}
#listview-actions .dz-selection-bar[hidden] { display: none; }
#listview-actions .dz-selection-bar .listViewActionsContainer { display: flex; align-items: center; gap: 8px; max-height: none !important; }
#listview-actions .dz-selection-bar .listViewActionsContainer > .btn, #listview-actions .dz-selection-bar .listViewMassActions > .btn {
  width: 36px; height: 36px; padding: 0; display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; border: 0; margin: 0;
}
#listview-actions .dz-selection-bar .listViewMassActions > .btn.dz-more-btn { width: auto; padding: 0 12px; gap: 4px; font-size: 13px; font-weight: 600; background: #fff; color: #101828; border: 1px solid #d0d5dd; }
#listview-actions .dz-selection-bar .listViewMassActions > .btn.dropdown-toggle::after { display: none; }
#listview-actions .dz-selection-bar .listViewActionsContainer > .btn[disabled] { opacity: .45; }
#listview-actions .dz-selection-count { font-size: 13px; font-weight: 600; color: #101828; }
#listview-actions .dz-selection-clear { margin-left: auto; width: 32px; height: 32px; border: 0; background: transparent; color: #475467; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
#listview-actions .dz-selection-clear:hover { background: rgba(16,24,40,.06); color: #101828; }

/* freeze header: design toggle button; hidden on phones (the frozen header is a desktop feature) */
.dz-list-header .dz-freeze-box .custom-control { padding-left: 0; min-height: 0; display: inline-flex; align-items: center; }
.dz-list-header .dz-freeze-box .custom-control-input { position: absolute; width: 1px; height: 1px; opacity: 0; } /* stays :visible for List.js */
.dz-list-header .dz-freeze-box .custom-control-label { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; font-size: 13px; font-weight: 600; color: #101828; padding: 0; }
.dz-list-header .dz-freeze-box .custom-control-label::before, .dz-list-header .dz-freeze-box .custom-control-label::after { display: none; }
.dz-list-header .dz-freeze-box .custom-control-input:checked ~ .custom-control-label { color: var(--dz-link, #1a7efb); }
.dz-list-header .dz-freeze-box:has(.custom-control-input:checked) { border-color: var(--dz-link, #1a7efb); background: #eaf4ff; }
.dz-list-header .dz-freeze-box .dz-icon { width: 14px; height: 14px; }
.dark-mode #listview-actions .dz-list-toolbar { background: #2d3238; border-color: #454d55; }
.dark-mode #listview-actions .btn.dz-tool-btn, .dark-mode .dz-list-header .dz-freeze-box { background: #343a40; border-color: #50585f; color: #e9ecef; }
.dark-mode #listview-actions .dz-selection-bar { background: #1f2a3a; border-color: #2f4560; }
.dark-mode #listview-actions .dz-selection-count { color: #f2f4f7; }

#listview-actions .dz-selection-bar { margin-bottom: 14px; position: relative; z-index: 2; }
/* Import & Export menu: design layout (left-aligned uppercase section titles, divider, icon + label rows) */
#listview-actions .dz-impexp-menu { min-width: 280px; padding: 8px 0; text-align: left; }
#listview-actions .dz-impexp-menu > li { text-align: left !important; float: none; width: auto; }
#listview-actions .dz-impexp-menu .dz-menu-header { display: block; text-align: left !important; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #344054; padding: 6px 16px 6px; margin: 0; line-height: 1.2; }
#listview-actions .dz-impexp-menu .dz-menu-divider { height: 1px; margin: 6px 12px; background: #eaecf0; padding: 0; }
#listview-actions .dz-impexp-menu li.selectFreeRecords > a { display: flex; align-items: center; gap: 10px; padding: 9px 16px; font-size: 13px; font-weight: 500; color: #101828; white-space: nowrap; }
#listview-actions .dz-impexp-menu li.selectFreeRecords > a .dz-icon { width: 16px; height: 16px; color: #475467; flex-shrink: 0; }
#listview-actions .dz-impexp-menu .dz-menu-divider:has(+ .dz-menu-header:last-child) { display: none; }
.dark-mode #listview-actions .dz-impexp-menu .dz-menu-header { color: #cdd5df; }
.dark-mode #listview-actions .dz-impexp-menu .dz-menu-divider { background: #454d55; }
/* selection bar › More menu: same look as Import & Export; BS3 helper classes the items still use (.hide, .divider) */
#listview-actions .dz-selection-bar .listViewMassActions .dropdown-menu { min-width: 240px; padding: 8px 0; border-radius: 10px; border: 1px solid #eaecf0; box-shadow: 0 8px 24px rgba(16,24,40,.12); text-align: left; }
#listview-actions .dz-selection-bar .listViewMassActions .dropdown-menu > li { float: none; width: auto; text-align: left; }
#listview-actions .dz-selection-bar .listViewMassActions .dropdown-menu > li.hide,
#listview-actions .dz-selection-bar .listViewMassActions .dropdown-menu > li:has(> a.dz-menu-blank) { display: none !important; }
#listview-actions .dz-selection-bar .listViewMassActions .dropdown-menu > li.divider { height: 1px; margin: 6px 12px; padding: 0; background: #eaecf0; }
#listview-actions .dz-selection-bar .listViewMassActions .dropdown-menu > li.divider:first-child,
#listview-actions .dz-selection-bar .listViewMassActions .dropdown-menu > li.divider:last-child,
#listview-actions .dz-selection-bar .listViewMassActions .dropdown-menu > li.divider + li.divider { display: none !important; }
#listview-actions .dz-selection-bar .listViewMassActions .dropdown-menu > li > a { display: flex; align-items: center; gap: 10px; padding: 9px 16px; font-size: 13px; font-weight: 500; color: #101828; white-space: nowrap; line-height: 1.3; }
#listview-actions .dz-selection-bar .listViewMassActions .dropdown-menu > li > a:hover { background: #f4f6f8; color: #101828; }
#listview-actions .dz-selection-bar .listViewMassActions .dropdown-menu > li > a .dz-icon { width: 16px; height: 16px; color: #475467; flex-shrink: 0; }
.dark-mode #listview-actions .dz-selection-bar .listViewMassActions .dropdown-menu > li.divider { background: #454d55; }

/* Customize menu (list + kanban headers) — same card as the Import & Export / More menus.
   `ul.dz-header-menu` = other header dropdowns built on the same markup (Calendar "View:" saved views). */
#appnav ul.detailViewSetting.dropdown-menu, #appnav ul.dz-header-menu.dropdown-menu {
  min-width: 260px; padding: 8px 0; margin-top: 6px; border-radius: 10px; border: 1px solid #eaecf0;
  box-shadow: 0 8px 24px rgba(16,24,40,.12); text-align: left; background: #fff;
}
#appnav ul.detailViewSetting > li, #appnav ul.dz-header-menu > li { float: none; width: auto; text-align: left; }
#appnav ul.detailViewSetting > li > a, #appnav ul.dz-header-menu > li > a {
  display: flex; align-items: center; gap: 10px; padding: 9px 16px; font-size: 13px; font-weight: 500; color: #101828;
  white-space: nowrap; line-height: 1.3; text-decoration: none; background: none;
}
#appnav ul.detailViewSetting > li > a:hover, #appnav ul.detailViewSetting > li > a:focus,
#appnav ul.dz-header-menu > li > a:hover, #appnav ul.dz-header-menu > li > a:focus { background: #f4f6f8; color: #101828; }
#appnav ul.detailViewSetting > li > a .dz-icon, #appnav ul.dz-header-menu > li > a .dz-icon { width: 16px; height: 16px; color: #475467; flex-shrink: 0; }
/* saved-view rows: the delete icon sits at the far right (its `pull-right` has no float here) */
#appnav ul.dz-header-menu > li > a .sx-saved-view-delete { margin: 0 0 0 auto !important; color: #d92d20; }
#appnav ul.detailViewSetting > li > a img { width: 16px; height: 16px; margin: 0 !important; }
#appnav ul.detailViewSetting > li.dropdown-header { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #344054; padding: 6px 16px; line-height: 1.2; }
#appnav ul.detailViewSetting > li.divider, #appnav ul.dz-header-menu > li.divider { height: 1px; margin: 6px 12px; padding: 0; background: #eaecf0; }
.dark-mode #appnav ul.detailViewSetting.dropdown-menu, .dark-mode #appnav ul.dz-header-menu.dropdown-menu { background: #2d3238; border-color: #454d55; }
.dark-mode #appnav ul.detailViewSetting > li > a, .dark-mode #appnav ul.dz-header-menu > li > a { color: #e9ecef; }
.dark-mode #appnav ul.detailViewSetting > li > a:hover, .dark-mode #appnav ul.dz-header-menu > li > a:hover { background: #343a40; color: #fff; }
.dark-mode #appnav ul.detailViewSetting > li > a .dz-icon, .dark-mode #appnav ul.dz-header-menu > li > a .dz-icon { color: #cdd5df; }
/* ---- phones: list page chrome (CRM-3745 follow-up, 2026-09-08) ---------------------------- */
/* "List Options" (opens the saved-lists / tags side panel on small screens) as a toolbar button */
/* visible-xs/visible-sm keep it off desktops (>= 992px); only below that does it become a flex row */
@media (max-width: 991.98px) { .xs-sideOption-container { display: flex !important; justify-content: stretch; padding: 0 12px; margin: 0 0 10px !important; } }
.xs-sideOption-container .btn.dz-list-options {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%; height: 40px; margin: 0; padding: 0 12px;
  border: 1px solid #d0d5dd; border-radius: 8px; background: #fff; color: #101828; font-size: 13px; font-weight: 600; line-height: 1;
  box-shadow: none; text-transform: none;
}
.xs-sideOption-container .btn.dz-list-options .dz-icon { width: 16px; height: 16px; }
.xs-sideOption-container .btn.dz-list-options .toggleButton { display: inline-flex; margin-left: auto; color: #667085; }
.xs-sideOption-container .btn.dz-list-options .toggleButton .dz-icon { transition: transform .2s; }
.dark-mode .xs-sideOption-container .btn.dz-list-options { background: #343a40; border-color: #50585f; color: #e9ecef; }

@media (max-width: 767.98px) {
  /* breadcrumb on its own line (single line, ellipsis), action row below it */
  .col.module-breadcrumb.dz-list-header { flex: 0 0 100%; max-width: 100%; width: 100%; padding: 0 12px; }
  .dz-list-header h3.breadCrumbSize { flex-wrap: nowrap; min-height: 28px; overflow: hidden; white-space: nowrap; }
  .dz-list-header h3.breadCrumbSize a, .dz-list-header h3.breadCrumbSize > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
  .dz-list-header h3.breadCrumbSize .dz-crumb-module { flex: 0 1 auto; }
  .pull-right.dz-list-header { float: none !important; width: 100%; justify-content: flex-start; flex-wrap: wrap; gap: 6px; padding: 0 12px 4px !important; margin: 0 !important; }
  .dz-list-header #appnav { width: 100%; }
  .dz-list-header #appnav .btn-group { flex-wrap: wrap; gap: 6px; width: 100%; }
  .dz-list-header #appnav .btn.module-buttons { height: 40px; padding: 0 12px; }
  .dz-list-header #appnav .btn.module-buttons .dz-icon { width: 18px; height: 18px; }
  .dz-list-header #appnav .btn.module-buttons[id$="_basicAction_LBL_ADD_RECORD"],
  .dz-list-header #appnav .btn.module-buttons.quickCreateModule { flex: 1 1 auto; }
  .dz-list-header #appnav .dz-vdivider { display: none; }
  .dz-list-header .dz-freeze-box { height: 40px; }
  #appnav ul.detailViewSetting.dropdown-menu, #appnav ul.dz-header-menu.dropdown-menu { right: 0; left: auto; }
  /* toolbar: buttons wrap in rows, paging in one row underneath */
  #listview-actions .dz-list-toolbar { padding: 8px 10px; gap: 8px; }
  #listview-actions .dz-list-toolbar-left { width: 100%; gap: 6px; }
  #listview-actions .dz-list-toolbar-left .dz-vdivider { display: none; }
  #listview-actions .dz-list-toolbar-left .dz-lists-group { flex: 1 1 100%; }
  #listview-actions .dz-list-toolbar-left .dz-lists-group > .btn { width: 100%; justify-content: flex-start; }
  #listview-actions .dz-list-toolbar-left .dz-lists-current b { max-width: 140px; }
  #listview-actions .dz-list-toolbar-left .btn.dz-tool-btn { height: 40px; }
  #listview-actions .dz-list-toolbar-right { width: 100%; margin-left: 0; flex-wrap: nowrap; justify-content: space-between; gap: 6px; padding-top: 8px; border-top: 1px solid #eaecf0; }
  #listview-actions .dz-list-toolbar-right [class*="col-"], #listview-actions .dz-list-toolbar-right .col { flex: 0 0 auto; width: auto; max-width: none; float: none !important; padding: 0; margin: 0; }
  #listview-actions .dz-list-toolbar-right .form-label { margin: 0 !important; align-items: center; }
  #listview-actions .dz-list-toolbar-right select.page_limit { margin: 0 !important; height: 36px; }
  #listview-actions .dz-list-toolbar-right .pageNumbers { display: inline-flex !important; align-items: center; gap: 6px; margin: 0 !important; }
  #listview-actions .dz-list-toolbar-right .paginationActionBox .btn-default { width: 36px; height: 36px; }
  /* selection bar wraps; count stays readable */
  #listview-actions .dz-selection-bar { flex-wrap: wrap; row-gap: 6px; }
  #listview-actions .dz-selection-bar .dz-selection-clear { margin-left: auto; }
  /* common.css parks .freezHeaderBox absolutely at top:50px on phones (old two-row header) — it is a row item now */
  .dz-list-header .dz-freeze-box.freezHeaderBox { position: static; top: auto; order: -1; }
  /* lock toggle + action buttons share one row on any phone: #appnav shrinks and its buttons wrap inside it */
  .pull-right.dz-list-header { flex-wrap: nowrap; align-items: flex-start; }
  .dz-list-header #appnav { width: auto; flex: 1 1 0; min-width: 0; }
  .dz-list-header #appnav .btn-group { width: auto; flex: 1 1 auto; }
  .dz-list-header #appnav .btn-group > .btn.module-buttons { flex: 0 0 auto; } /* only Add grows (rule below) — a wrapped Customize must not stretch */
  /* paging in one row: page size left, "1 to 20 of" + arrows right */
  #listview-actions .dz-list-toolbar-right .paginationActionBox { display: flex; flex-wrap: nowrap; align-items: center; justify-content: space-between; width: 100%; margin: 0; }
  /* #listViewContent prefix: the generic phone rule above (.listview-actions-container .row > [class*="col-"] → 100%) carries an id */
  #listViewContent #listview-actions .dz-list-toolbar-right .paginationActionBox > span,
  #listview-actions .dz-list-toolbar-right .paginationActionBox > span { flex: 0 0 auto; width: auto; max-width: none; float: none !important; padding: 0; margin: 0 !important; }
  #listview-actions .dz-list-toolbar-right .pageNumbers { flex-direction: row-reverse; }
  #listview-actions .dz-list-toolbar-right .pageNumbers > span { float: none !important; display: inline-flex; align-items: center; }
  #listview-actions .dz-list-toolbar-right .pageNumbers .btn-group { gap: 4px; }
  /* compact toolbar: the pinned chrome (List.js placeTheListComponentStyle) must leave room for the table on a
     phone, so Lists takes the row and Find Duplicates / Import & Export collapse to icon buttons */
  #listview-actions .dz-list-toolbar-left { flex-wrap: nowrap; }
  #listview-actions .dz-list-toolbar-left .dz-lists-group { flex: 1 1 auto; min-width: 0; }
  #listview-actions .dz-list-toolbar-left .dz-lists-group > .btn { min-width: 0; overflow: hidden; }
  #listview-actions .dz-list-toolbar-left .dz-lists-current { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
  #listview-actions .dz-list-toolbar-left > .btn.dz-tool-btn > span,
  #listview-actions .dz-list-toolbar-left .dz-impexp-group > .btn > span:not(.dz-export-count),
  #listview-actions .dz-list-toolbar-left .dz-impexp-group > .btn > .dz-caret { display: none; }
  #listview-actions .dz-list-toolbar-left > .btn.dz-tool-btn,
  #listview-actions .dz-list-toolbar-left .dz-impexp-group > .btn { width: 40px; padding: 0; justify-content: center; flex: 0 0 auto; }
  #listview-actions .dz-list-toolbar-left .btn.dz-tool-btn .dz-icon { width: 18px; height: 18px; }
}