/* ==========================================================================
   Dazos CRM Design System — related lists + the Transactions action modals
   (CRM-3941). Companion to listview-design.css / forms-design.css (loaded
   right after them, before dark-mode-design.css).

   Scope, on purpose:
     .relatedContainer.dz-related       every related list on a record detail
                                        view (Vtiger/partials/RelatedListHeader.tpl
                                        + RelatedListFooter.tpl)
     .relatedContainer.dz-txn-related   what only the Transactions relation adds
     .dz-txn-recurring                  the inline recurring charge / payment
                                        views that replace that list
     .myModal .dz-modal                 the Quick create charge modal and the
                                        Add payment transaction modal

   Visual only: every id, name, class hook and data attribute the existing
   JS binds to (RelatedList.js, Detail.js, Contacts/Donors Detail.js,
   Pagination.js, the payment form handlers) is left exactly as the templates
   render it. Tokens come from listview-design.css (--dz-*) and the tenant
   accent from ThemeStyle.tpl (--dz-accent, --dz-accent-fg); the design
   system supplies the fallbacks. Inputs never carry a box-shadow: focus is
   a border-colour change only.
   ========================================================================== */

:root {
  --dz-txn-danger: #d32f2f;
  --dz-txn-danger-soft: #fdecea;
  --dz-txn-success: #3cb371;
  --dz-txn-success-soft: #e6f4ec;
  --dz-txn-warning: #ffa000;
  --dz-txn-warning-soft: #fff8e1;
  --dz-txn-input-border: #d0d5dd;
  --dz-txn-input-bg: #ffffff;
  --dz-txn-muted-bg: #f8f9fb;
  --dz-txn-accent-soft: #e1f3fc;
  --dz-rel-cell-max: 240px;
}
.dark-mode {
  --dz-txn-danger: #ef6b6b;
  --dz-txn-danger-soft: rgba(211, 47, 47, .18);
  --dz-txn-success: #5cc98d;
  --dz-txn-success-soft: rgba(60, 179, 113, .18);
  --dz-txn-warning: #ffb733;
  --dz-txn-warning-soft: rgba(255, 160, 0, .18);
  --dz-txn-input-border: #394451;
  --dz-txn-input-bg: #0f172a;
  --dz-txn-muted-bg: #16202b;
  --dz-txn-accent-soft: #072d4a;
}

/* ---- no box-shadow on any input, select or textarea in this surface ---------- */
.dz-related input, .dz-related select, .dz-related textarea,
.dz-txn-recurring input, .dz-txn-recurring select,
.dz-modal input, .dz-modal select, .dz-modal textarea,
.dz-related .select2-container .select2-choice, .dz-related .select2-container .select2-choices,
.dz-modal .select2-container .select2-choice, .dz-modal .select2-container .select2-choices { box-shadow: none !important; }

/* ---- shared button set ------------------------------------------------- */
.dz-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 36px; padding: 0 14px; border-radius: var(--dz-radius-md, 8px);
  border: 1px solid transparent; font-family: var(--font-body, "Open Sans", sans-serif);
  font-size: 13px; font-weight: 600; line-height: 1; white-space: nowrap;
  cursor: pointer; box-shadow: none; text-decoration: none; transition: background-color .15s, border-color .15s, color .15s;
}
.dz-btn:focus { outline: none; }
.dz-btn:focus-visible { border-color: var(--dz-accent, #008ce0); }
.dz-btn .dz-icon { width: 16px; height: 16px; }
.dz-btn-sm { height: 32px; padding: 0 12px; font-size: 12px; }
.dz-btn-primary,
.dz-btn-primary:hover, .dz-btn-primary:focus { background: var(--dz-accent, #008ce0); border-color: var(--dz-accent, #008ce0); color: var(--dz-accent-fg, #fff); }
.dz-btn-primary:hover { filter: brightness(.94); }
.dz-btn-outline { background: var(--dz-surface, #fff); border-color: var(--dz-txn-input-border); color: var(--dz-text, #1f2a36); }
.dz-btn-outline:hover, .dz-btn-outline:focus { background: var(--dz-txn-muted-bg); border-color: #c2c9d2; color: var(--dz-text, #1f2a36); text-decoration: none; }
.dz-btn-ghost { background: transparent; color: var(--dz-text-2, #5a6a7a); }
.dz-btn-ghost:hover, .dz-btn-ghost:focus { background: var(--dz-row-hover, #f4f6f8); color: var(--dz-text, #1f2a36); text-decoration: none; }
.dz-btn-danger { background: var(--dz-txn-danger-soft); border-color: transparent; color: var(--dz-txn-danger); }
.dz-btn-danger:hover, .dz-btn-danger:focus { background: var(--dz-txn-danger); color: #fff; }
.dz-btn-icon { width: 32px; height: 32px; padding: 0; border-radius: var(--dz-radius-md, 8px); }
.dz-btn[disabled], .dz-btn.disabled { opacity: .55; cursor: not-allowed; pointer-events: none; }
.dz-btn.dropdown-toggle::after { display: none; }
.dz-btn .dz-caret { margin-left: -2px; color: var(--dz-text-3, #8899aa); }
.dark-mode .dz-btn-outline { background: var(--dz-surface, #0f172a); border-color: var(--dz-border, #394451); color: var(--dz-text, #e8edf2); }
.dark-mode .dz-btn-outline:hover, .dark-mode .dz-btn-outline:focus { background: var(--dz-row-hover, #16202b); color: var(--dz-text, #e8edf2); }

/* ---- badges -------------------------------------------------------------- */
.dz-badge {
  display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 999px;
  font-size: 12px; font-weight: 600; line-height: 1; white-space: nowrap;
  background: var(--dz-row-hover, #f4f6f8); color: var(--dz-text-2, #5a6a7a);
}
.dz-badge-success { background: var(--dz-txn-success-soft); color: var(--dz-txn-success); }
.dz-badge-warning { background: var(--dz-txn-warning-soft); color: var(--dz-txn-warning); }
.dz-badge-danger { background: var(--dz-txn-danger-soft); color: var(--dz-txn-danger); }
.dz-badge-neutral { background: var(--dz-row-hover, #f4f6f8); color: var(--dz-text-2, #5a6a7a); }

/* ==========================================================================
   1. Related lists (every related module)
   ========================================================================== */
.relatedContainer.dz-related { padding: 0 16px 8px; font-family: var(--font-body, "Open Sans", sans-serif); color: var(--dz-text, #1f2a36); }

/* header: "<Relation> (N)" + the relation's actions */
.dz-related .dz-rel-header {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px 16px;
  padding: 4px 0 12px;
}
.dz-related .dz-rel-title { display: flex; align-items: center; gap: 8px; margin: 0; }
.dz-related .dz-rel-title h4 {
  margin: 0; font-family: var(--font-title, "Nunito", sans-serif); font-size: 16px; font-weight: 700; color: var(--dz-text, #1f2a36);
}
.dz-related .dz-rel-count { font-family: var(--font-title, "Nunito", sans-serif); font-size: 16px; font-weight: 700; color: var(--dz-text-2, #5a6a7a); }
.dz-related .dz-rel-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-left: auto; }
.dz-related .dz-rel-actions .btn-group { display: inline-flex; align-items: center; gap: 8px; margin: 0; padding: 0; float: none; }
.dz-related .dz-rel-actions .btn-group:empty { display: none; }
.dz-related .dz-rel-actions .btn.addButton, .dz-related .dz-rel-actions .btn-group > .btn { margin: 0; }
/* the legacy buttons keep btn-primary / btn-success / btn-danger for their handlers; the theme paints
   those with !important, so the design-system colours are forced here */
.dz-related .dz-rel-actions .btn.dz-btn { height: 36px; padding: 0 14px; border-radius: var(--dz-radius-md, 8px); font-size: 13px; font-weight: 600; line-height: 1; box-shadow: none !important; }
.dz-related .dz-rel-actions .btn.dz-btn-primary { background: var(--dz-accent, #008ce0) !important; border: 1px solid var(--dz-accent, #008ce0) !important; color: var(--dz-accent-fg, #fff) !important; }
.dz-related .dz-rel-actions .btn.dz-btn-outline { background: var(--dz-surface, #fff) !important; border: 1px solid var(--dz-txn-input-border) !important; color: var(--dz-text, #1f2a36) !important; }
.dz-related .dz-rel-actions .btn.dz-btn-outline:hover { background: var(--dz-txn-muted-bg) !important; }
.dz-related .dz-rel-actions .btn.dz-btn-danger { background: var(--dz-txn-danger-soft) !important; border: 1px solid transparent !important; color: var(--dz-txn-danger) !important; }
.dz-related .dz-rel-actions .btn.dz-btn-danger:hover { background: var(--dz-txn-danger) !important; color: #fff !important; }
.dz-related .dz-rel-actions .btn.dz-btn-icon { width: 36px; padding: 0; }
.dz-related .dz-rel-actions .btn.dz-btn-icon img { width: 16px; height: 16px; }
.dz-related .dz-rel-actions .btn.dz-btn .dz-icon { width: 16px; height: 16px; margin: 0; }
.dz-related .dz-rel-actions .btn.dz-btn > span { margin-left: 0; }
.dz-related .dz-rel-actions .dz-txn-manage { position: relative; }
.dz-related .dz-rel-actions .dropdown-menu {
  min-width: 220px; padding: 6px; margin-top: 4px; border: 1px solid var(--dz-border, #dde2e7); border-radius: var(--dz-radius-lg, 12px);
  box-shadow: var(--dz-shadow-lg, 0 10px 15px rgba(31, 42, 54, .10), 0 4px 6px rgba(31, 42, 54, .05)); background: var(--dz-surface, #fff);
}
.dz-related .dz-rel-actions .dropdown-menu > li { list-style: none; }
.dz-related .dz-rel-actions .dropdown-menu .dropdown-item {
  display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: var(--dz-radius-md, 8px);
  font-size: 13px; color: var(--dz-text, #1f2a36); background: transparent; white-space: nowrap;
}
.dz-related .dz-rel-actions .dropdown-menu .dropdown-item:hover,
.dz-related .dz-rel-actions .dropdown-menu .dropdown-item:focus { background: var(--dz-row-hover, #f4f6f8); color: var(--dz-text, #1f2a36); text-decoration: none; }
.dz-related .dz-rel-actions .dropdown-menu .dropdown-item .dz-icon { width: 16px; height: 16px; color: var(--dz-text-2, #5a6a7a); }
.dark-mode .dz-related .dz-rel-actions .dropdown-menu { background: var(--dz-surface, #0f172a); border-color: var(--dz-border, #394451); }
.dark-mode .dz-related .dz-rel-actions .dropdown-menu .dropdown-item { color: var(--dz-text, #e8edf2); }
/* Activities roll-up switch */
.dz-related .dz-rel-actions .dz-rel-rollup { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--dz-text-2, #5a6a7a); white-space: nowrap; }
.dz-related .dz-rel-actions .dz-rel-rollup .dz-icon { width: 14px; height: 14px; }
.dz-related .dz-rel-actions .dz-rel-rollup .bootstrap-switch { margin: 0; }

/* table shell: no border, no card shadow (common.css puts an !important shadow on .relatedContents) */
.dz-related .relatedContents.table-container {
  padding: 0; background: var(--dz-surface, #fff); border: 0; border-radius: 0;
  overflow: hidden;
  -webkit-box-shadow: none !important; box-shadow: none !important;
}
/* Comments related tab (Vtiger/ShowAllComments.tpl): same flat shell, no card shadow */
.commentContainer.commentsRelatedContainer { -webkit-box-shadow: none !important; box-shadow: none !important; }
.dz-related .relatedContents .bottomscroll-div { overflow-x: auto; overflow-y: hidden; }
.dz-related #listview-table,
.dark-mode .dz-related #listview-table {
  width: 100%; margin: 0; background: var(--dz-surface, #fff); border-collapse: separate; border-spacing: 0; font-size: 13px; color: var(--dz-text, #1f2a36);
}
.dz-related #listview-table > thead > tr.listViewHeaders > th {
  height: var(--dz-table-row, 48px); padding: 0 16px; vertical-align: middle; border: 0; border-bottom: 1px solid var(--dz-border, #dde2e7);
  background: var(--dz-surface, #fff); font-size: 13px; font-weight: 600; color: var(--dz-text-2, #5a6a7a); white-space: nowrap;
  max-width: var(--dz-rel-cell-max); overflow: hidden; text-overflow: ellipsis;
}
.dz-related #listview-table > thead th a.listViewContentHeaderValues,
.dz-related #listview-table > thead th a.noSorting {
  display: inline-flex; align-items: center; gap: 6px; max-width: 100%; color: inherit; text-decoration: none; filter: none !important;
}
.dz-related #listview-table > thead th a.listViewContentHeaderValues:hover { color: var(--dz-text, #1f2a36); }
.dz-related #listview-table > thead th a.listViewContentHeaderValues .dz-icon { width: 14px; height: 14px; color: var(--dz-text-3, #8899aa); flex: none; }
.dz-related #listview-table > thead th a.listViewContentHeaderValues .dz-icon:not(.customsort) { color: var(--dz-accent, #008ce0); }
.dz-related #listview-table > thead th img { display: none; }
.dz-related #listview-table > thead th a.removeSorting {
  display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; margin-left: 2px; border-radius: 4px; color: var(--dz-text-3, #8899aa);
}
.dz-related #listview-table > thead th a.removeSorting:hover { background: var(--dz-row-hover, #f4f6f8); color: var(--dz-text, #1f2a36); filter: none !important; }
.dz-related #listview-table > thead th a.removeSorting .dz-icon { width: 14px; height: 14px; }

/* column chooser icon in the first header cell */
.dz-related #listview-table > thead > tr.listViewHeaders > th:first-child { min-width: 0 !important; max-width: none; }
.dz-related #listColumnFilterContainer { display: inline-flex; }
.dz-related .listColumnFilter.relatedListColumnFilter {
  display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: var(--dz-radius-md, 8px);
  color: var(--dz-text-2, #5a6a7a); cursor: pointer;
}
.dz-related .listColumnFilter.relatedListColumnFilter:hover { background: var(--dz-row-hover, #f4f6f8); color: var(--dz-text, #1f2a36); }
.dz-related .listColumnFilter.relatedListColumnFilter .dz-icon { width: 18px; height: 18px; color: inherit; }

/* filter row */
.dz-related #listview-table > thead > tr.searchRow > th {
  padding: 8px 12px 10px; border: 0; border-bottom: 1px solid var(--dz-border, #dde2e7); background: var(--dz-txn-muted-bg); vertical-align: middle;
}
.dz-related #listview-table > thead > tr.searchRow > th.inline-search-btn { min-width: 0 !important; white-space: nowrap; }
.dz-related #listview-table > thead > tr.searchRow > th.inline-search-btn .btn {
  display: inline-flex; align-items: center; justify-content: center; height: 32px; padding: 0 12px; border-radius: var(--dz-radius-md, 8px);
  font-size: 12px; font-weight: 600; box-shadow: none; margin: 0 !important; line-height: 1;
}
.dz-related #listview-table > thead > tr.searchRow > th.inline-search-btn .btn[data-trigger="relatedListSearch"] {
  background: var(--dz-accent, #008ce0); border: 1px solid var(--dz-accent, #008ce0); color: var(--dz-accent-fg, #fff);
}
.dz-related #listview-table > thead > tr.searchRow > th.inline-search-btn .btn[data-trigger="relatedListSearch"]:hover { filter: brightness(.94); }
.dz-related #listview-table > thead > tr.searchRow > th.inline-search-btn .btn[data-trigger="clearListSearch"] {
  width: 32px; padding: 0; margin-left: 6px !important; background: var(--dz-surface, #fff); border: 1px solid var(--dz-txn-input-border); color: var(--dz-text-2, #5a6a7a);
}
.dz-related #listview-table > thead > tr.searchRow > th.inline-search-btn .btn[data-trigger="clearListSearch"]:hover { background: var(--dz-row-hover, #f4f6f8); color: var(--dz-text, #1f2a36); }
.dz-related #listview-table > thead > tr.searchRow > th.inline-search-btn .btn .dz-icon { width: 14px; height: 14px; }
.dz-related #listview-table > thead > tr.searchRow input.listSearchContributor,
.dz-related #listview-table > thead > tr.searchRow select.listSearchContributor,
.dz-related #listview-table > thead > tr.searchRow .inputElement,
.dz-related #listview-table > thead > tr.searchRow input[type="text"] {
  height: 32px; min-width: 120px; max-width: var(--dz-rel-cell-max); padding: 0 10px;  border-radius: 6px; background: var(--dz-txn-input-bg);
  font-size: 12px; color: var(--dz-text, #1f2a36); box-shadow: none;
}
/* border: 1px solid var(--dz-txn-input-border); */
.dz-related #listview-table > thead > tr.searchRow input:focus, .dz-related #listview-table > thead > tr.searchRow select:focus { outline: none; border-color: var(--dz-accent, #008ce0); }
.dz-related #listview-table > thead > tr.searchRow .input-group .input-group-addon,
.dz-related #listview-table > thead > tr.searchRow .input-group-text { height: 32px; padding: 0 8px; border-color: var(--dz-txn-input-border); background: var(--dz-surface, #fff); font-size: 12px; }
.dz-related #listview-table > thead > tr.searchRow .select2-container { max-width: var(--dz-rel-cell-max); }
.dz-related #listview-table > thead > tr.searchRow .select2-container .select2-choice,
.dz-related #listview-table > thead > tr.searchRow .select2-container .select2-choices {
  min-height: 32px; height: 32px; line-height: 30px; border: 1px solid var(--dz-txn-input-border); border-radius: 6px; background: var(--dz-txn-input-bg); font-size: 12px;
}
.dz-related #listview-table > thead > tr.searchRow .select2-container-active .select2-choice,
.dz-related #listview-table > thead > tr.searchRow .select2-container-active .select2-choices { border-color: var(--dz-accent, #008ce0); }
.dz-related #listview-table > thead > tr.searchRow .input-error { border-color: var(--dz-txn-danger) !important; }

/* rows: every cell capped like the list view, overflow shown as an ellipsis */
.dz-related #listview-table > tbody > tr.listViewEntries > td,
.dz-related #listview-table > tr.listViewEntries > td {
  height: var(--dz-table-row, 48px); padding: 0 16px; vertical-align: middle; border: 0; border-bottom: 1px solid var(--dz-hairline, #e8edf2);
  background: var(--dz-surface, #fff); font-size: 13px; color: var(--dz-text, #1f2a36); white-space: nowrap;
  max-width: var(--dz-rel-cell-max); overflow: hidden; text-overflow: ellipsis;
}
.dz-related #listview-table tr.listViewEntries:hover > td { background: var(--dz-row-hover, #f4f6f8); }
.dz-related #listview-table tr.listViewEntries:last-child > td { border-bottom: 0; }
.dz-related #listview-table td.relatedListEntryValues .value { display: inline-block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: middle; }
.dz-related #listview-table td.relatedListEntryValues a { color: var(--dz-link, var(--dz-accent, #008ce0)); text-decoration: none; font-weight: 600; }
.dz-related #listview-table td.relatedListEntryValues a:hover { text-decoration: underline; }
.dz-related #listview-table td.related-list-actions { padding: 0 8px 0 16px !important; max-width: none; overflow: visible; }
/* the column is as wide as its icons (forms-design.css pins td:first-child to 168px for the old layout) */
.dz-related .relatedContents #listview-table > tbody > tr.listViewEntries > td:first-child { min-width: 0; width: 1%; }
.dz-related #listview-table td.related-list-actions .actionImages { display: inline-flex; align-items: center; gap: 2px; white-space: nowrap; vertical-align: middle; line-height: 0; }
/* common.css forces a[name=relationEdit] / a.relationDelete to display:inline-block !important, width 24px, which put
   the edit and unlink icons on another baseline than the open / preview anchors; all four share one flex box here */
.dz-related #listview-table td.related-list-actions .actionImages > a,
.dz-related #listview-table td.related-list-actions .actionImages > button {
  display: inline-flex !important; align-items: center; justify-content: center; width: 28px !important; height: 28px; padding: 0; margin: 0; border: 0 !important; border-radius: 6px;
  background: transparent; color: var(--dz-text-2, #5a6a7a); font-size: 0 !important; line-height: 0; vertical-align: middle; cursor: pointer;
}
.dz-related #listview-table td.related-list-actions .actionImages > a .dz-icon,
.dz-related #listview-table td.related-list-actions .actionImages > button .dz-icon { position: static !important; display: block; margin: 0; }
.dz-related #listview-table td.related-list-actions .actionImages > a:hover,
.dz-related #listview-table td.related-list-actions .actionImages > button:hover { background: var(--dz-row-hover, #f4f6f8); color: var(--dz-text, #1f2a36); filter: none !important; }
.dz-related #listview-table td.related-list-actions .actionImages .dz-icon { width: 16px; height: 16px; }
.dz-related #listview-table td.related-list-actions .actionImages input[type="checkbox"] { margin: 0 6px 0 0; vertical-align: middle; }
.dz-related #listview-table td .picklist-color { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 999px; font-size: 12px; font-weight: 600; }

/* the actions column stays pinned while the table scrolls sideways, as in list view; the field columns an admin
   pinned in the related list's saved view (CRM-4206) stick right after it, see below */
.dz-related #listview-table > thead > tr.listViewHeaders > th:first-child,
.dz-related #listview-table > thead > tr.searchRow > th:first-child,
.dz-related #listview-table td.related-list-actions { position: sticky; left: 0; z-index: 3; }
.dz-related #listview-table tr.listViewEntries:hover > td.related-list-actions { background: var(--dz-row-hover, #f4f6f8); }
.dz-related #listview-table > thead > tr.searchRow > th:first-child { background: var(--dz-txn-muted-bg); }
@media (max-width: 767.98px) {
  /* phones: the whole table scrolls sideways, the actions column too (list view does the same) */
  .dz-related #listview-table > thead > tr.listViewHeaders > th:first-child,
  .dz-related #listview-table > thead > tr.searchRow > th:first-child,
  .dz-related #listview-table td.related-list-actions { position: static; }
}

/* CRM-4206: pinned field columns. Vtiger_RelatedListUi_Js.applyPinnedColumns sets each cell's `left` and only runs
   on wide windows (1236px+, as the list view), so phones never get here. The first column sticks too, so a list
   whose template does not pin it already (Documents) keeps the pinned columns from sliding under it. */
.relatedContainer #listview-table.dz-rel-has-pinned > thead > tr > th:first-child,
.relatedContainer #listview-table.dz-rel-has-pinned > tbody > tr > td:first-child { position: sticky; left: 0; z-index: 3; }
.relatedContainer #listview-table .dz-rel-pinned-cell { position: sticky; z-index: 2; }
.relatedContainer #listview-table > thead > tr > th.dz-rel-pinned-cell { z-index: 3; }
.relatedContainer #listview-table.dz-rel-has-pinned > tbody > tr > td:first-child,
.relatedContainer #listview-table > tbody > tr > td.dz-rel-pinned-cell { background: var(--dz-surface, #fff); }
.relatedContainer #listview-table.dz-rel-has-pinned > thead > tr.listViewHeaders > th:first-child,
.relatedContainer #listview-table > thead > tr.listViewHeaders > th.dz-rel-pinned-cell { background: var(--dz-surface, #fff); }
.relatedContainer #listview-table.dz-rel-has-pinned > thead > tr.searchRow > th:first-child,
.relatedContainer #listview-table > thead > tr.searchRow > th.dz-rel-pinned-cell { background: var(--dz-txn-muted-bg, #f7f9fb); }
.relatedContainer #listview-table tr.listViewEntries:hover > td.dz-rel-pinned-cell { background: var(--dz-row-hover, #f4f6f8); }
.relatedContainer #listview-table .dz-rel-pinned-last { box-shadow: 3px 0 6px -2px rgba(0, 0, 0, .18); }
.relatedContainer #listview-table > thead > tr.listViewHeaders > th.dz-rel-pinned .frozen-col-pin-icon { width: 12px; height: 12px; margin-left: 4px; color: var(--dz-accent, #008ce0); }

/* the pin toggle in the related list's Configure Columns dialog (same look as the list view's) */
.configColumnsContainer #selectedFieldsList .freezeColToggle { cursor: pointer; color: #ced4da; transition: color .15s, transform .2s; }
.configColumnsContainer #selectedFieldsList .freezeColToggle:hover,
.configColumnsContainer #selectedFieldsList .freezeColToggle.frozen-active { color: #007bff; }
.configColumnsContainer #selectedFieldsList .freezeColToggle.frozen-active { transform: rotate(-45deg); }
.configColumnsContainer #selectedFieldsList .freezeColToggle .dz-icon { width: 15px; height: 15px; }
.dark-mode .configColumnsContainer #selectedFieldsList .freezeColToggle { color: #495057; }
.dark-mode .configColumnsContainer #selectedFieldsList .freezeColToggle:hover,
.dark-mode .configColumnsContainer #selectedFieldsList .freezeColToggle.frozen-active { color: #38b3ea; }

/* "Apply to all parent modules" switch, at the left of the dialog footer whatever order the
   footer lays its buttons out in; a real checkbox under a pill track, no plugin */
.configColumnsContainer .modal-footer { position: relative; }
.configColumnsContainer .dz-rel-apply-all { position: absolute; left: 1rem; top: 50%; transform: translateY(-50%); display: inline-flex; align-items: center; gap: 8px; margin: 0; font-weight: 400; cursor: pointer; user-select: none; }
.configColumnsContainer .dz-rel-apply-all input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.configColumnsContainer .dz-rel-switch-track { position: relative; flex: 0 0 auto; width: 34px; height: 18px; border-radius: 9px; background: #ced4da; transition: background .15s; }
.configColumnsContainer .dz-rel-switch-track::after { content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .25); transition: transform .15s; }
.configColumnsContainer .dz-rel-apply-all input:checked + .dz-rel-switch-track { background: var(--dz-accent, #008ce0); }
.configColumnsContainer .dz-rel-apply-all input:checked + .dz-rel-switch-track::after { transform: translateX(16px); }
.configColumnsContainer .dz-rel-apply-all input:focus-visible + .dz-rel-switch-track { outline: 2px solid var(--dz-accent, #008ce0); outline-offset: 2px; }
.dark-mode .configColumnsContainer .dz-rel-switch-track { background: #495057; }
@media (max-width: 575.98px) {
    .configColumnsContainer .modal-footer { flex-wrap: wrap; }
    .configColumnsContainer .dz-rel-apply-all { position: static; transform: none; flex: 1 0 100%; }
}

/* QuickBooks sync column keeps its meaning, in the row's type */
.dz-related #listview-table td[style*="color:green"] { color: var(--dz-txn-success) !important; font-weight: 600; }
.dz-related #listview-table td[style*="color:red"] { color: var(--dz-txn-danger) !important; font-weight: 600; }

/* empty state */
.dz-related .dz-rel-empty {
  display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 36px 16px; text-align: center; color: var(--dz-text-2, #5a6a7a);
  border: 1px dashed var(--dz-border, #dde2e7); margin-top: 12px; font-size: 13px;
}
.dz-related .dz-rel-empty .dz-icon { width: 24px; height: 24px; color: var(--dz-text-3, #8899aa); }
.dz-related .dz-rel-empty strong { color: var(--dz-text, #1f2a36); font-size: 14px; }
/* empty state as a table row (Vtiger/RelatedList.tpl): the message stays in view at the scroller's width while
   the filter row above may be wider, and the sideways scrollbar sits below it */
.dz-related .relatedContents .bottomscroll-div { container-type: inline-size; }
.dz-related #listview-table tr.dz-rel-empty-row > td { padding: 0; border: 0; background: var(--dz-surface, #fff); max-width: none; overflow: visible; white-space: normal; }
.dz-related #listview-table tr.dz-rel-empty-row .dz-rel-empty {
  position: sticky; left: 12px; box-sizing: border-box; width: calc(100% - 24px); width: calc(100cqw - 24px); margin: 12px;
}

/* footer: Show [10] · 1–8 of 8 records · Page X of Y ‹ › */
.dz-related .dz-rel-footer {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 16px; padding: 12px 4px 4px; font-size: 13px; color: var(--dz-text-2, #5a6a7a);
}
.dz-related .dz-rel-footer .dz-rel-pagesize { display: inline-flex; align-items: center; gap: 8px; margin: 0; font-weight: 400; }
.dz-related .dz-rel-footer select.dz-rel-page-size {
  height: 32px; padding: 0 28px 0 10px; border: 1px solid var(--dz-txn-input-border); border-radius: 6px; background: var(--dz-txn-input-bg); color: var(--dz-text, #1f2a36); font-size: 13px;
}
.dz-related .dz-rel-footer select.dz-rel-page-size:focus { outline: none; border-color: var(--dz-accent, #008ce0); }
.dz-related .dz-rel-footer .dz-rel-range { white-space: nowrap; }
.dz-related .dz-rel-footer .dz-rel-pager { display: inline-flex; align-items: center; gap: 8px; }
.dz-related .dz-rel-footer .dz-rel-pageinfo { white-space: nowrap; }
.dz-related .dz-rel-footer .paginationActionBox { display: inline-flex; align-items: center; margin: 0 !important; padding: 0; width: auto; }
.dz-related .dz-rel-footer .paginationActionBox > span:first-child,
.dz-related .dz-rel-footer .pageNumbersText,
.dz-related .dz-rel-footer .totalNumberOfRecords,
.dz-related .dz-rel-footer .PageJump { display: none !important; }
.dz-related .dz-rel-footer .paginationActionChildBox { float: none !important; margin: 0 !important; padding: 0 !important; width: auto; }
.dz-related .dz-rel-footer .pageJumpBtnGroup { display: inline-flex !important; gap: 4px; }
.dz-related .dz-rel-footer .btn.PreviousPageButton,
.dz-related .dz-rel-footer .btn.NextPageButton {
  display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; padding: 0; margin: 0;
  border: 1px solid var(--dz-txn-input-border); border-radius: var(--dz-radius-md, 8px); background: var(--dz-surface, #fff); color: var(--dz-text-2, #5a6a7a); box-shadow: none;
}
.dz-related .dz-rel-footer .btn.PreviousPageButton:hover,
.dz-related .dz-rel-footer .btn.NextPageButton:hover { background: var(--dz-row-hover, #f4f6f8); color: var(--dz-text, #1f2a36); }
.dz-related .dz-rel-footer .btn.PreviousPageButton[disabled],
.dz-related .dz-rel-footer .btn.NextPageButton[disabled] { opacity: .45; cursor: not-allowed; }
.dz-related .dz-rel-footer .btn .dz-icon { width: 16px; height: 16px; }
.dark-mode .dz-related .dz-rel-footer .btn.PreviousPageButton,
.dark-mode .dz-related .dz-rel-footer .btn.NextPageButton { background: var(--dz-surface, #0f172a); border-color: var(--dz-border, #394451); color: var(--dz-text-2, #aab4be); }

/* ==========================================================================
   2. Inline recurring charges / payments views (Transactions)
   ========================================================================== */
.dz-txn-recurring { font-family: var(--font-body, "Open Sans", sans-serif); color: var(--dz-text, #1f2a36); }
.dz-txn-recurring .dz-rec-toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px 16px; padding: 4px 0 12px; }
.dz-txn-recurring .dz-rec-toolbar h4 { margin: 0; font-family: var(--font-title, "Nunito", sans-serif); font-size: 16px; font-weight: 700; }
.dz-txn-recurring .dz-rec-toolbar h4 .dz-txn-count { color: var(--dz-text-2, #5a6a7a); }
.dz-txn-recurring .dz-rec-toolbar .dz-rec-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-left: auto; }
.dz-txn-recurring .dz-rec-shell { background: var(--dz-surface, #fff); border: 1px solid var(--dz-border, #dde2e7); border-radius: 0; overflow: hidden; }
.dz-txn-recurring .dz-rec-scroll { overflow-x: auto; }
.dz-txn-recurring table.dz-rec-table { width: 100%; margin: 0; border-collapse: separate; border-spacing: 0; font-size: 13px; background: var(--dz-surface, #fff); }
.dz-txn-recurring table.dz-rec-table > thead > tr > th {
  height: 48px; padding: 0 16px; vertical-align: middle; border: 0; border-bottom: 1px solid var(--dz-border, #dde2e7); background: var(--dz-surface, #fff);
  font-size: 13px; font-weight: 600; color: var(--dz-text-2, #5a6a7a); white-space: nowrap;
}
.dz-txn-recurring table.dz-rec-table > tbody > tr > td {
  height: 48px; padding: 0 16px; vertical-align: middle; border: 0; border-bottom: 1px solid var(--dz-hairline, #e8edf2); background: var(--dz-surface, #fff); white-space: nowrap; color: var(--dz-text, #1f2a36);
  max-width: var(--dz-rel-cell-max); overflow: hidden; text-overflow: ellipsis;
}
.dz-txn-recurring table.dz-rec-table > tbody > tr:hover > td { background: var(--dz-row-hover, #f4f6f8); }
.dz-txn-recurring table.dz-rec-table > tbody > tr.dz-rec-empty > td { height: auto; padding: 32px 16px; text-align: center; color: var(--dz-text-2, #5a6a7a); max-width: none; }
.dz-txn-recurring table.dz-rec-table td.dz-rec-action { white-space: nowrap; max-width: none; overflow: visible; }
.dz-txn-recurring table.dz-rec-table td.dz-rec-action .dz-rec-icons { display: inline-flex; align-items: center; gap: 2px; }
.dz-txn-recurring table.dz-rec-table td.dz-rec-action .dz-rec-icons .dz-btn-icon { width: 28px; height: 28px; border: 0; background: transparent; color: var(--dz-text-2, #5a6a7a); }
.dz-txn-recurring table.dz-rec-table td.dz-rec-action .dz-rec-icons .dz-btn-icon:hover { background: var(--dz-row-hover, #f4f6f8); color: var(--dz-text, #1f2a36); }
.dz-txn-recurring table.dz-rec-table td.dz-rec-action .dz-rec-icons .dz-btn-icon.dz-rec-delete:hover { background: var(--dz-txn-danger-soft); color: var(--dz-txn-danger); }
.dz-txn-recurring table.dz-rec-table td.dz-rec-action .dz-rec-icons .dz-btn-icon[disabled] { opacity: .4; }
.dz-txn-recurring table.dz-rec-table td.dz-rec-action .dz-rec-na { color: var(--dz-text-3, #8899aa); font-size: 12px; }
.dz-txn-recurring table.dz-rec-table td.dz-rec-amount { font-variant-numeric: tabular-nums; }
.dz-txn-recurring .dz-rec-footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 16px; padding: 12px 4px 4px; font-size: 13px; color: var(--dz-text-2, #5a6a7a); }
.dz-txn-recurring .dz-rec-footer .dz-rec-pager { display: inline-flex; align-items: center; gap: 6px; }
.dz-txn-recurring .dz-rec-footer .dz-rec-pager .dz-rec-page { min-width: 60px; text-align: center; }
.dz-txn-recurring tr.dz-rec-row.dz-rec-hidden { display: none; }

/* ==========================================================================
   3. Modal shell shared by the two action modals
   ========================================================================== */
.myModal .dz-modal .modal-content {
  border: 1px solid var(--dz-border, #dde2e7); border-radius: var(--dz-radius-lg, 12px); background: var(--dz-surface, #fff); color: var(--dz-text, #1f2a36);
  box-shadow: var(--dz-shadow-lg, 0 10px 15px rgba(31, 42, 54, .10), 0 4px 6px rgba(31, 42, 54, .05)); font-family: var(--font-body, "Open Sans", sans-serif);
}
.myModal .dz-modal .modal-header.dz-modal-header {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 20px 24px 14px; border-bottom: 1px solid var(--dz-hairline, #e8edf2);
  border-radius: var(--dz-radius-lg, 12px) var(--dz-radius-lg, 12px) 0 0; background: var(--dz-surface, #fff);
}
.myModal .dz-modal .dz-modal-heading { min-width: 0; }
.myModal .dz-modal .modal-header.dz-modal-header .modal-title {
  margin: 0; font-family: var(--font-title, "Nunito", sans-serif); font-size: 18px; font-weight: 700; line-height: 1.3; color: var(--dz-text, #1f2a36);
}
.myModal .dz-modal .dz-modal-subtitle { margin: 4px 0 0; font-size: 13px; line-height: 1.4; color: var(--dz-text-2, #5a6a7a); }
.myModal .dz-modal .modal-header.dz-modal-header .close {
  flex: none; width: 32px; height: 32px; margin: -4px -8px 0 0; padding: 0; border-radius: var(--dz-radius-md, 8px); opacity: 1; font-size: 22px; font-weight: 400; line-height: 1; color: var(--dz-text-2, #5a6a7a);
}
.myModal .dz-modal .modal-header.dz-modal-header .close:hover { background: var(--dz-row-hover, #f4f6f8); color: var(--dz-text, #1f2a36); }
.myModal .dz-modal .modal-body.dz-modal-body { max-height: min(72vh, 760px); overflow-y: auto; padding: 8px 24px 20px; }
.myModal .dz-modal .modal-footer.dz-modal-footer {
  display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding: 14px 24px; border-top: 1px solid var(--dz-hairline, #e8edf2);
  background: var(--dz-surface, #fff); border-radius: 0 0 var(--dz-radius-lg, 12px) var(--dz-radius-lg, 12px);
}
.myModal .dz-modal .modal-footer.dz-modal-footer > * { margin: 0; }
.myModal .dz-modal .modal-footer.dz-modal-footer .dz-footer-spacer { flex: 1 1 auto; }
.myModal .dz-modal .dz-footer-total { display: inline-flex; align-items: baseline; gap: 8px; margin-right: auto; font-size: 13px; color: var(--dz-text-2, #5a6a7a); }
.myModal .dz-modal .dz-footer-total strong { font-family: var(--font-title, "Nunito", sans-serif); font-size: 18px; font-weight: 700; color: var(--dz-text, #1f2a36); font-variant-numeric: tabular-nums; }
.dark-mode .myModal .dz-modal .modal-content,
.dark-mode .myModal .dz-modal .modal-header.dz-modal-header,
.dark-mode .myModal .dz-modal .modal-footer.dz-modal-footer { background: var(--dz-surface, #0f172a); border-color: var(--dz-border, #394451); color: var(--dz-text, #e8edf2); }
.dark-mode .myModal .dz-modal .modal-header.dz-modal-header .modal-title,
.dark-mode .myModal .dz-modal .dz-footer-total strong { color: var(--dz-text, #e8edf2); }

/* sections + fields */
.dz-modal .dz-section { padding-top: 16px; margin-top: 12px; border-top: 1px solid var(--dz-hairline, #e8edf2); }
.dz-modal .dz-section:first-child, .dz-modal .dz-section.dz-section-first { border-top: 0; margin-top: 0; padding-top: 12px; }
/* section titles as in the design: small caps, no icon */
.dz-modal .dz-section-title { display: block; margin: 0 0 10px; font-family: var(--font-body, "Open Sans", sans-serif); font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--dz-text-2, #5a6a7a); }
.dz-modal .dz-section-title .dz-icon { display: none; }
.dz-modal .dz-section-title .dz-req { margin-left: 2px; }
.dz-modal .dz-section-hint { margin: -4px 0 12px; font-size: 12px; color: var(--dz-text-2, #5a6a7a); }
.dz-modal .dz-grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.dz-modal .dz-grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 16px; }
.dz-modal :is(.dz-field, td.fieldValue, .dz-qc-col) { margin: 0 0 14px; min-width: 0; }
.dz-modal .dz-field-label { display: block; margin: 0 0 6px; font-size: 13px; font-weight: 600; color: var(--dz-text, #1f2a36); }
.dz-modal .dz-field-label .dz-req, .dz-modal .dz-field-label .required, .dz-modal .dz-field-label .redColor { color: var(--dz-txn-danger); margin-left: 2px; }
.dz-modal .dz-field-help { display: block; margin: 6px 0 0; font-size: 12px; line-height: 1.4; color: var(--dz-text-2, #5a6a7a); }
.dz-modal .dz-field-help .dz-icon { width: 14px; height: 14px; vertical-align: -3px; margin-right: 4px; }
.dz-modal :is(.dz-field, td.fieldValue, .dz-qc-col) input.form-control,
.dz-modal :is(.dz-field, td.fieldValue, .dz-qc-col) input.inputElement,
.dz-modal :is(.dz-field, td.fieldValue, .dz-qc-col) input[type="text"], .dz-modal :is(.dz-field, td.fieldValue, .dz-qc-col) input[type="number"], .dz-modal :is(.dz-field, td.fieldValue, .dz-qc-col) input[type="tel"],
.dz-modal :is(.dz-field, td.fieldValue, .dz-qc-col) input[type="email"], .dz-modal :is(.dz-field, td.fieldValue, .dz-qc-col) input[type="password"],
.dz-modal :is(.dz-field, td.fieldValue, .dz-qc-col) select.form-control, .dz-modal :is(.dz-field, td.fieldValue, .dz-qc-col) select.inputElement, .dz-modal :is(.dz-field, td.fieldValue, .dz-qc-col) textarea {
  height: 38px; width: 100%; padding: 0 12px; border: 1px solid var(--dz-txn-input-border); border-radius: var(--dz-radius-md, 8px); background: var(--dz-txn-input-bg);
  font-size: 14px; color: var(--dz-text, #1f2a36); box-shadow: none; transition: border-color .15s;
}
.dz-modal :is(.dz-field, td.fieldValue, .dz-qc-col) textarea { height: auto; min-height: 80px; padding: 8px 12px; }
.dz-modal :is(.dz-field, td.fieldValue, .dz-qc-col) input:focus, .dz-modal :is(.dz-field, td.fieldValue, .dz-qc-col) select:focus, .dz-modal :is(.dz-field, td.fieldValue, .dz-qc-col) textarea:focus { outline: none; border-color: var(--dz-accent, #008ce0); }
.dz-modal :is(.dz-field, td.fieldValue, .dz-qc-col) input[readonly], .dz-modal :is(.dz-field, td.fieldValue, .dz-qc-col) input[disabled] { background: var(--dz-txn-muted-bg); color: var(--dz-text-2, #5a6a7a); }
.dz-modal :is(.dz-field, td.fieldValue, .dz-qc-col) input.input-error, .dz-modal :is(.dz-field, td.fieldValue, .dz-qc-col) select.input-error, .dz-modal :is(.dz-field, td.fieldValue, .dz-qc-col) .input-error { border-color: var(--dz-txn-danger) !important; }
.dz-modal :is(.dz-field, td.fieldValue, .dz-qc-col) .input-group { display: flex; flex-wrap: nowrap; width: 100%; align-items: stretch; }
.dz-modal :is(.dz-field, td.fieldValue, .dz-qc-col) .input-group > .form-control, .dz-modal :is(.dz-field, td.fieldValue, .dz-qc-col) .input-group > input { flex: 1 1 auto; min-width: 0; }
/* !important on the colours: the tenant theme paints .input-group-addon in the accent colour */
.dz-modal :is(.dz-field, td.fieldValue, .dz-qc-col) .input-group-addon, .dz-modal :is(.dz-field, td.fieldValue, .dz-qc-col) .input-group-text, .dz-modal :is(.dz-field, td.fieldValue, .dz-qc-col) .input-group-prepend .input-group-text {
  display: inline-flex; align-items: center; height: 38px; padding: 0 12px; border: 1px solid var(--dz-txn-input-border) !important; background: var(--dz-txn-muted-bg) !important; color: var(--dz-text-2, #5a6a7a) !important; font-size: 14px; border-radius: 0;
}
.dz-modal :is(.dz-field, td.fieldValue, .dz-qc-col) .input-group-addon .dz-icon { width: 16px; height: 16px; color: inherit; }
/* forms-design.css (`.input-group:has(> .dateField, …):has(> .input-group-addon) > .input-group-addon`) strips the
   border of date / time addons with !important because the theme paints them in the tenant primary there; in these
   modals every addon is neutral and bordered, so the same properties are re-asserted at a higher specificity */
.myModal .dz-modal :is(.dz-field, td.fieldValue, .dz-qc-col) .input-group > .input-group-addon:last-child,
.myModal .dz-modal :is(.dz-field, td.fieldValue, .dz-qc-col) .input-group:has(> .dateField, > .dateTimeField, > .timeField):has(> .input-group-addon) > .input-group-addon:last-child {
  width: 40px !important; min-width: 40px; padding: 0 !important; justify-content: center;
  border: 1px solid var(--dz-txn-input-border) !important; border-left: 0 !important; border-radius: 0 var(--dz-radius-md, 8px) var(--dz-radius-md, 8px) 0 !important;
}
.myModal .dz-modal :is(.dz-field, td.fieldValue, .dz-qc-col) .input-group > .input-group-addon:first-child {
  border: 1px solid var(--dz-txn-input-border) !important; border-right: 0 !important; border-radius: var(--dz-radius-md, 8px) 0 0 var(--dz-radius-md, 8px) !important;
}
.myModal .dz-modal :is(.dz-field, td.fieldValue, .dz-qc-col) .input-group > .input-group-addon:not(:first-child):not(:last-child) { border: 1px solid var(--dz-txn-input-border) !important; border-radius: 0 !important; }
.dz-modal :is(.dz-field, td.fieldValue, .dz-qc-col) .input-group > :first-child, .dz-modal :is(.dz-field, td.fieldValue, .dz-qc-col) .input-group > .input-group-prepend:first-child .input-group-text { border-top-left-radius: var(--dz-radius-md, 8px); border-bottom-left-radius: var(--dz-radius-md, 8px); }
.dz-modal :is(.dz-field, td.fieldValue, .dz-qc-col) .input-group > :last-child { border-top-right-radius: var(--dz-radius-md, 8px); border-bottom-right-radius: var(--dz-radius-md, 8px); }
.dz-modal :is(.dz-field, td.fieldValue, .dz-qc-col) .input-group > :not(:first-child) { margin-left: -1px; }
.dz-modal :is(.dz-field, td.fieldValue, .dz-qc-col) .input-group .input-group-addon.relatedPopup,
.dz-modal :is(.dz-field, td.fieldValue, .dz-qc-col) .input-group .clearReferenceSelection { cursor: pointer; }
.dz-modal :is(.dz-field, td.fieldValue, .dz-qc-col) .input-group .clearReferenceSelection { display: inline-flex; align-items: center; padding: 0 10px; border: 1px solid var(--dz-txn-input-border); background: var(--dz-txn-muted-bg); color: var(--dz-text-2, #5a6a7a); text-decoration: none; font-size: 14px; }
.dz-modal :is(.dz-field, td.fieldValue, .dz-qc-col) .input-group .clearReferenceSelection.hide { display: none; }
.dz-modal :is(.dz-field, td.fieldValue, .dz-qc-col) .input-group .relatedPopup:hover, .dz-modal :is(.dz-field, td.fieldValue, .dz-qc-col) .input-group .clearReferenceSelection:hover { background: var(--dz-row-hover, #f4f6f8); color: var(--dz-text, #1f2a36); }
.dz-modal :is(.dz-field, td.fieldValue, .dz-qc-col) .input-group .relatedPopup .dz-icon { width: 16px; height: 16px; }
.dz-modal :is(.dz-field, td.fieldValue, .dz-qc-col) .referencefield-wrapper { position: relative; }
.dz-modal :is(.dz-field, td.fieldValue, .dz-qc-col) .referencefield-wrapper .createReferenceRecord { display: none; }
.dz-modal :is(.dz-field, td.fieldValue, .dz-qc-col) .input-group.inputElement { border: 0; padding: 0; height: auto; }

/* select2 (single + multi): one border on the box, none on the inner input, accent border on focus */
.dz-modal :is(.dz-field, td.fieldValue, .dz-qc-col) .select2-container { width: 100% !important; }
.dz-modal :is(.dz-field, td.fieldValue, .dz-qc-col) .select2-container .select2-choice,
.dz-modal :is(.dz-field, td.fieldValue, .dz-qc-col) .select2-container .select2-choices,
.dz-modal :is(.dz-field, td.fieldValue, .dz-qc-col) .select2-container--default .select2-selection--single {
  height: 38px; min-height: 38px; line-height: 36px; padding: 0 30px 0 12px; border: 1px solid var(--dz-txn-input-border); border-radius: var(--dz-radius-md, 8px); background: var(--dz-txn-input-bg); color: var(--dz-text, #1f2a36); font-size: 14px; box-shadow: none;
}
.dz-modal .select2-chosen,
.dz-modal .select2-choice > span:first-child,
.dz-modal .select2-container .select2-choices .select2-search-field input { padding: 0; }
/* a long value wraps and the box grows from its 38px single line (8 + 19.6 + 8 + borders); the arrow stays on the first line */
.dz-modal :is(.dz-field, td.fieldValue, .dz-qc-col) .select2-container .select2-choice { height: auto; line-height: 1.4; padding-top: 8px; padding-bottom: 8px; white-space: normal; }
.dz-modal :is(.dz-field, td.fieldValue, .dz-qc-col) .select2-container .select2-choice .select2-chosen { line-height: 1.4; margin-right: 0; color: inherit; white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: anywhere; }
.dz-modal :is(.dz-field, td.fieldValue, .dz-qc-col) .select2-container .select2-choice .select2-arrow { top: 0; height: 36px; border: 0; background: transparent; }
.dz-modal :is(.dz-field, td.fieldValue, .dz-qc-col) .select2-container .select2-choice .select2-arrow b { background-position: 0 6px; }
.dz-modal :is(.dz-field, td.fieldValue, .dz-qc-col) .select2-container-active .select2-choice, .dz-modal :is(.dz-field, td.fieldValue, .dz-qc-col) .select2-dropdown-open .select2-choice { border-color: var(--dz-accent, #008ce0); outline: none; }
.dz-modal :is(.dz-field, td.fieldValue, .dz-qc-col) .select2-container-multi .select2-choices { height: auto; min-height: 38px; padding: 3px 8px; line-height: 1.4; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
.dz-modal :is(.dz-field, td.fieldValue, .dz-qc-col) .select2-container-multi.select2-container-active .select2-choices,
.dz-modal :is(.dz-field, td.fieldValue, .dz-qc-col) .select2-container-multi.select2-dropdown-open .select2-choices { border-color: var(--dz-accent, #008ce0); outline: none; }
.dz-modal :is(.dz-field, td.fieldValue, .dz-qc-col) .select2-container-multi .select2-choices .select2-search-field { margin: 0; padding: 0; }
.dz-modal :is(.dz-field, td.fieldValue, .dz-qc-col) .select2-container-multi .select2-choices .select2-search-field input,
.dz-modal :is(.dz-field, td.fieldValue, .dz-qc-col) .select2-container input.select2-input,
.dz-modal :is(.dz-field, td.fieldValue, .dz-qc-col) .select2-container input[type="text"] {
  height: 28px; min-height: 0; width: auto; min-width: 60px; margin: 0; padding: 0; border: 0 !important; border-radius: 0; background: transparent !important;
  box-shadow: none !important; outline: none !important; font-size: 14px; color: var(--dz-text, #1f2a36);
}
/* chip: text first, the × after it (select2 3.x puts the × before the text, absolutely positioned) */
.dz-modal :is(.dz-field, td.fieldValue, .dz-qc-col) .select2-container-multi .select2-choices .select2-search-choice {
  display: inline-flex; flex-direction: row-reverse; align-items: center; gap: 6px; margin: 0; padding: 3px 8px 3px 8px;
  border: 1px solid var(--dz-border, #dde2e7); border-radius: 6px; background: var(--dz-txn-muted-bg); color: var(--dz-text, #1f2a36); font-size: 13px; line-height: 1.3; box-shadow: none;
}
.dz-modal :is(.dz-field, td.fieldValue, .dz-qc-col) .select2-container-multi .select2-choices .select2-search-choice > div { padding: 0; margin: 0; }
.dz-modal :is(.dz-field, td.fieldValue, .dz-qc-col) .select2-container-multi .select2-choices .select2-search-choice .select2-search-choice-close { position: static; display: inline-block; width: 12px; height: 13px; margin: 0; flex: none; }
.dz-modal :is(.dz-field, td.fieldValue, .dz-qc-col) .select2-container .select2-choice:focus, .dz-modal :is(.dz-field, td.fieldValue, .dz-qc-col) .select2-container .select2-choices:focus { outline: none; }
.dz-modal .dz-locked {
  display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 12px; border: 1px solid var(--dz-txn-input-border); border-radius: var(--dz-radius-md, 8px);
  background: var(--dz-txn-muted-bg); color: var(--dz-text-2, #5a6a7a); font-size: 14px;
}
.dz-modal .dz-locked .dz-icon { width: 16px; height: 16px; color: var(--dz-text-3, #8899aa); }
.dz-modal .dz-locked strong { color: var(--dz-text, #1f2a36); font-weight: 600; }
.dz-modal .payment-error-message.ui.label,
.dz-modal .ui.pointing.red.basic.label {
  display: block; margin: 6px 0 0; padding: 0; border: 0 !important; background: transparent !important; color: var(--dz-txn-danger) !important; font-size: 12px; font-weight: 500;
}
.dz-modal .ui.pointing.red.basic.label::before { display: none; }
.dark-mode .dz-modal .dz-field-label, .dark-mode .dz-modal .dz-locked strong { color: var(--dz-text, #e8edf2); }
.dark-mode .dz-modal :is(.dz-field, td.fieldValue, .dz-qc-col) input, .dark-mode .dz-modal :is(.dz-field, td.fieldValue, .dz-qc-col) select, .dark-mode .dz-modal :is(.dz-field, td.fieldValue, .dz-qc-col) textarea,
.dark-mode .dz-modal :is(.dz-field, td.fieldValue, .dz-qc-col) .select2-container .select2-choice, .dark-mode .dz-modal :is(.dz-field, td.fieldValue, .dz-qc-col) .select2-container .select2-choices { background: var(--dz-txn-input-bg); border-color: var(--dz-txn-input-border); color: var(--dz-text, #e8edf2); }
.dark-mode .dz-modal :is(.dz-field, td.fieldValue, .dz-qc-col) input[readonly], .dark-mode .dz-modal .dz-locked, .dark-mode .dz-modal :is(.dz-field, td.fieldValue, .dz-qc-col) .input-group-addon, .dark-mode .dz-modal :is(.dz-field, td.fieldValue, .dz-qc-col) .input-group-text { background: var(--dz-txn-muted-bg); color: var(--dz-text-2, #aab4be); border-color: var(--dz-txn-input-border); }

/* ---- Quick create (design system: Modal card sec 05 "Quick Add", Text inputs "Family A") -------------------
   1 every field is Family A: outlined, 48px dense, the label rests inside an empty field and floats onto the
     border when the field is focused or filled (.dz-fa; Vtiger_Index_Js.familyA keeps .dz-fa-filled current)
   2 required fields first, optional ones marked "(optional)" (.dz-fa-req / .dz-fa-opt -> grid `order`)
   3 size follows the field count: <= 5 fields M 640 in one column, more L 880 in two (.dz-qc-m / .dz-qc-l, set
     by Vtiger_Index_Js.familyA before the sheet shows); the subject and checkbox rows span both columns
   5 calendar / lookup / chevron are trailing icons inside the field, not attached buttons
   6 no sections in the body                     7 tray: Cancel (text), Go to full form (outlined), Save (brand)
   Generic, Staffs and Survey render Vtiger/partials/QuickCreateField.tpl; Calendar (Tasks / Events) keeps its
   table, whose rows join the same grid through display: contents. Documents keeps its own upload layout. */
.myModal .dz-modal.dz-quick-create.modal-dialog { max-width: 880px; }
.myModal .dz-modal.dz-quick-create.modal-dialog.dz-qc-m { max-width: 640px; }
body.modal-open #messageBar { z-index: 9999999 !important; } /* was an inline style of the old quick create */
.dz-quick-create .modal-footer > .dz-qc-footer { display: contents; } /* Staffs / Survey wrap the tray buttons */

/* the grid: column gap 20px, row gap 16px (design sec 03) */
.dz-quick-create .quickCreateContent { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 20px; padding-top: 10px; }
.dz-quick-create.dz-qc-m .quickCreateContent { grid-template-columns: minmax(0, 1fr); }
.dz-quick-create .quickCreateContent > .dz-field { margin: 0; }
.dz-quick-create .quickCreateContent > .dz-field-wide,
.dz-quick-create .quickCreateContent > .dz-fa-check { grid-column: 1 / -1; }
.dz-quick-create .quickCreateContent > .dz-fa-opt { order: 1; }
.dz-quick-create .quickCreateContent > .dz-fa-check { order: 2; }
.dz-quick-create.dz-quick-charge .quickCreateContent > * { order: 0; } /* the charge keeps the design's own field order */
.dz-quick-create .dz-qc-qb, .dz-quick-create .dz-qc-qb > .dz-grid-2 { display: contents; } /* its two fields join the grid */
.dz-quick-create .dz-qc-qb .dz-field { margin: 0; order: 1; }
.dz-quick-create .quickCreateContent .dz-field textarea, .dz-quick-create .quickCreateContent .dz-field .cke { width: 100%; }
/* .fieldLabel / .fieldValue are handler hooks, not layout: neutralise the table-cell styling they carry elsewhere */
.dz-quick-create .dz-field > .fieldLabel, .dz-quick-create .dz-field > .fieldValue { display: block; width: auto; min-height: 0; padding: 0; border: 0; background: transparent; text-align: left; float: none; }
.dz-quick-create .dz-fa > .fieldValue, .dz-quick-create .dz-fa > .dz-qc-col { margin: 0; }
/* select2 copies the select's classes onto its container, and common.css gives `.quickCreateContent .inputElement`
   height: 30px - the 48px box then overflowed its 30px container by 18px and covered the gap to the next field */
.dz-quick-create .quickCreateContent .select2-container.inputElement { height: auto; }
/* a label + control pair on one line (VOB "Run Insurance Discovery"); the script shows it with display: flex */
.dz-quick-create .dz-qc-inline-row { align-items: center; gap: 10px; }
.dz-quick-create .dz-qc-inline-row > .fieldLabel { flex: 0 0 auto; font-size: 14px; font-weight: 600; color: var(--dz-text, #1f2a36); }

/* Family A: the floating label */
.dz-quick-create .dz-fa { position: relative; min-width: 0; margin: 0; }
.dz-quick-create .dz-fa:not(.dz-fa-multi) > :is(.fieldLabel, .dz-field-label) {
  position: absolute; z-index: 3; top: 24px; left: 8px; transform: translateY(-50%);
  display: block; width: auto; max-width: calc(100% - 56px); height: auto; min-height: 0; margin: 0; padding: 0 5px; border: 0; float: none;
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis; text-align: left;
  background: transparent; color: var(--dz-text-2, #5a6a7a); font-size: 14px; font-weight: 400; line-height: 1.3;
  pointer-events: none; transition: top .18s cubic-bezier(.4, 0, .2, 1), font-size .18s cubic-bezier(.4, 0, .2, 1), color .18s;
}
.dz-quick-create .dz-fa:not(.dz-fa-multi) > :is(.fieldLabel, .dz-field-label) * {
  display: inline; float: none !important; max-width: none; margin: 0; padding: 0; font: inherit; color: inherit; line-height: inherit;
}
.dz-quick-create .dz-fa > :is(.fieldLabel, .dz-field-label) .dz-icon { pointer-events: auto; width: 14px; height: 14px; vertical-align: -2px; margin-left: 4px; }
.dz-quick-create .dz-fa-opt-mark { color: var(--dz-text-3, #8899aa); }
.dz-quick-create .dz-fa:not(.dz-fa-multi):is(.dz-fa-filled, :focus-within, :has(.select2-container-active), :has(.select2-dropdown-open)) > :is(.fieldLabel, .dz-field-label) {
  top: 0; font-size: 11px; font-weight: 600; background: var(--dz-surface, #fff);
}
.dz-quick-create .dz-fa:not(.dz-fa-multi):is(:focus-within, :has(.select2-container-active), :has(.select2-dropdown-open)) > :is(.fieldLabel, .dz-field-label) { color: var(--dz-accent, #008ce0); }
/* while the label rests inside the field, nothing else may sit there: no placeholder, no "Select an Option" */
.dz-quick-create .dz-fa:not(.dz-fa-multi):not(.dz-fa-filled):not(:focus-within) :is(input, textarea)::placeholder { color: transparent; }
.dz-quick-create .dz-fa:not(.dz-fa-multi):not(.dz-fa-filled):not(:focus-within):not(:has(.select2-dropdown-open)) .select2-chosen { visibility: hidden; }

/* Family A: the outlined 48px box */
.myModal .dz-quick-create .dz-fa :is(input.form-control, input.inputElement, input[type="text"], input[type="number"], input[type="email"], input[type="tel"], input[type="password"], select.form-control, select.inputElement):not([type="checkbox"]):not([type="radio"]):not(.select2-input) { height: 48px; }
.myModal .dz-quick-create .dz-fa textarea { min-height: 96px; padding: 16px 12px 8px; }
.myModal .dz-quick-create .dz-fa :is(input, select, textarea):focus { border-color: var(--dz-accent, #008ce0); box-shadow: inset 0 0 0 1px var(--dz-accent, #008ce0); }
/* the picklist box starts at 48px (13 + 19.6 + 13 + borders) and grows when the chosen value wraps; the floated label sits on the border, not inside */
.myModal .dz-quick-create .dz-fa .select2-container .select2-choice { height: auto; min-height: 48px; line-height: 1.4; padding-top: 13px; padding-bottom: 13px; }
.myModal .dz-quick-create .dz-fa .select2-container .select2-choice .select2-chosen { line-height: 1.4; }
.myModal .dz-quick-create .dz-fa .select2-container .select2-choice .select2-arrow { height: 46px; }
.myModal .dz-quick-create .dz-fa .select2-container .select2-choice .select2-arrow b { background-position: 0 11px; }
.myModal .dz-quick-create .dz-fa :is(.select2-container-active, .select2-dropdown-open) :is(.select2-choice, .select2-choices) { border-color: var(--dz-accent, #008ce0); box-shadow: inset 0 0 0 1px var(--dz-accent, #008ce0); }
.myModal .dz-quick-create .dz-fa .select2-container-multi .select2-choices { min-height: 48px; padding: 9px 12px; }
.myModal .dz-quick-create .dz-locked { height: 48px; }

/* rule 5: the input group is ONE outlined box; the calendar / lookup / clear / currency parts sit inside it, unbordered.
   Classes are doubled on purpose: the bordered-addon rules above and forms-design.css's date-addon rule carry
   !important at up to (0,8,1), and this (0,9,0) has to outrank them inside a quick create only. */
.myModal .dz-quick-create.dz-modal .dz-fa.dz-fa .input-group.input-group.input-group {
  /* !important: forms-design.css strips the border, padding and background of every date / time group with !important */
  height: 48px !important; padding: 0 !important; align-items: center; overflow: hidden; border: 1px solid var(--dz-txn-input-border) !important; border-radius: var(--dz-radius-md, 8px) !important;
  background: var(--dz-txn-input-bg) !important; box-shadow: none !important;
}
.myModal .dz-quick-create.dz-modal .dz-fa.dz-fa .input-group.input-group.input-group:focus-within { border-color: var(--dz-accent, #008ce0) !important; box-shadow: inset 0 0 0 1px var(--dz-accent, #008ce0) !important; }
.myModal .dz-quick-create.dz-modal .dz-fa.dz-fa .input-group.input-group.input-group > :is(input, .form-control) {
  height: 46px; margin: 0 !important; border: 0 !important; border-radius: 0 !important; background: transparent !important; box-shadow: none !important;
}
.myModal .dz-quick-create.dz-modal .dz-fa.dz-fa .input-group.input-group.input-group > :is(.input-group-addon, .clearReferenceSelection, .input-group-prepend, .input-group-append),
.myModal .dz-quick-create.dz-modal .dz-fa.dz-fa .input-group.input-group.input-group :is(.input-group-prepend, .input-group-append) > .input-group-text {
  height: 46px; width: auto !important; min-width: 0; margin: 0 !important; padding: 0 12px !important; border: 0 !important; border-radius: 0 !important;
  background: transparent !important; color: var(--dz-text-2, #5a6a7a) !important; box-shadow: none !important;
}
.myModal .dz-quick-create.dz-modal .dz-fa.dz-fa .input-group.input-group.input-group > .input-group-addon:first-child { padding-right: 0 !important; } /* a leading "$" sits next to the value */
.myModal .dz-quick-create.dz-modal .dz-fa.dz-fa .input-group.input-group.input-group > :is(.input-group-addon, .clearReferenceSelection):hover { color: var(--dz-text, #1f2a36) !important; }
.myModal .dz-quick-create.dz-modal .dz-fa.dz-fa .input-group.input-group.input-group > .clearReferenceSelection.hide { display: none; }
.dz-quick-create .dz-fa:has(.input-group > .input-group-addon:first-child) > :is(.fieldLabel, .dz-field-label) { left: 30px; } /* label after the "$" */
.dz-quick-create .dz-fa.dz-fa-filled:has(.input-group > .input-group-addon:first-child) > :is(.fieldLabel, .dz-field-label),
.dz-quick-create .dz-fa:focus-within:has(.input-group > .input-group-addon:first-child) > :is(.fieldLabel, .dz-field-label) { left: 8px; }

/* a reference field whose label holds the module chooser: the chooser and the lookup are one pair (12px apart),
   the chooser captioned with the field's label */
.dz-quick-create .dz-fa.dz-fa-multi { display: flex; align-items: flex-start; gap: 12px; }
.dz-quick-create .dz-fa.dz-fa-multi > .fieldLabel {
  position: relative; display: block; flex: 0 0 38%; max-width: 38%; width: auto; margin: 0; padding: 0; border: 0; float: none; background: transparent;
}
.dz-quick-create .dz-fa.dz-fa-multi > .fieldLabel::before {
  content: attr(data-dz-caption); position: absolute; z-index: 3; top: 0; left: 8px; transform: translateY(-50%); max-width: calc(100% - 16px);
  padding: 0 5px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; background: var(--dz-surface, #fff);
  font-size: 11px; font-weight: 600; color: var(--dz-text-2, #5a6a7a); pointer-events: none;
}
.dz-quick-create .dz-fa.dz-fa-multi > .fieldLabel > span { display: block; float: none !important; width: 100%; max-width: none !important; }
.dz-quick-create .dz-fa.dz-fa-multi > .fieldLabel .select2-container { width: 100% !important; margin: 0; }
.dz-quick-create .dz-fa.dz-fa-multi > .fieldLabel .select2-container .select2-choice { height: auto; min-height: 48px; line-height: 1.4; padding-top: 13px; padding-bottom: 13px; }
.dz-quick-create .dz-fa.dz-fa-multi > .fieldLabel .select2-container .select2-choice .select2-chosen { line-height: 1.4; }
.dz-quick-create .dz-fa.dz-fa-multi > .fieldValue { flex: 1 1 auto; min-width: 0; margin: 0; }

/* a checkbox field is a full-width row: the box, then its label */
.dz-quick-create .dz-fa-check { display: flex; flex-direction: row-reverse; justify-content: flex-end; align-items: center; gap: 10px; margin: 0; }
.dz-quick-create .dz-fa-check > :is(.fieldLabel, td.fieldLabel) { position: static; display: block; width: auto; margin: 0; padding: 0; border: 0; background: transparent; font-size: 14px; font-weight: 600; color: var(--dz-text, #1f2a36); }
.dz-quick-create .dz-fa-check > :is(.fieldLabel, td.fieldLabel) * { float: none !important; display: inline; margin: 0; font: inherit; color: inherit; }
.dz-quick-create .dz-fa-check > .fieldValue { display: block; width: auto; margin: 0; padding: 0; border: 0; flex: none; }
.dz-quick-create .dz-fa-check input[type="checkbox"] { width: 18px !important; height: 18px !important; margin: 0; vertical-align: middle; accent-color: var(--dz-accent, #008ce0); }

/* Calendar (Tasks / Events): the hand-built rows and the table rows share one grid. The table and its tbody are
   display: contents, so each <tr> is a grid cell of its own and Calendar Edit.js still finds its <td>s. */
.dz-quick-calendar .quickCreateContent.calendarQuickCreateContent { margin-top: 0 !important; }
.dz-quick-calendar table.massEditTable, .dz-quick-calendar table.massEditTable > tbody { display: contents; }
.dz-quick-calendar table.massEditTable tr.row { display: block; margin: 0; padding: 0; min-width: 0; }
.dz-quick-calendar table.massEditTable tr.row > td { display: block; float: none; width: auto; max-width: none; min-width: 0; padding: 0; border: 0; background: transparent; flex: none; }
.dz-quick-calendar table.massEditTable tr.row:not(:has(> td:not(:empty))) { display: none; }
.dz-quick-calendar table.massEditTable tr.row:has(> td.fieldValue[colspan]) { grid-column: 1 / -1; }
.dz-quick-calendar table.massEditTable tr.row.dz-fa-opt { order: 1; }
.dz-quick-calendar table.massEditTable tr.row.dz-fa-check { display: flex; order: 2; grid-column: 1 / -1; }
/* Related To (Tasks / Events): the whole row, two cells - the module chooser in the first column, the lookup in the
   second - and no caption (Akansha, 2026-10-06) */
.dz-quick-calendar table.massEditTable tr.row.dz-fa-multi { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 20px; grid-column: 1 / -1; align-items: start; }
.dz-quick-calendar table.massEditTable tr.row.dz-fa-multi > td { flex: none; max-width: none; width: auto; }
.dz-quick-calendar table.massEditTable tr.row.dz-fa-multi > .fieldLabel::before { content: none; }
.dz-quick-calendar .calendarQuickCreateContent > .dz-qc-row { grid-column: 1 / -1; display: flex; gap: 12px; margin: 0 !important; padding: 0 !important; }
.dz-quick-calendar .calendarQuickCreateContent > .dz-qc-row > [class*="col-"] { flex: 1 1 0; max-width: none; min-width: 0; margin: 0; padding: 0; }
.dz-quick-calendar .calendarQuickCreateContent > .dz-qc-row.dz-qc-priority { grid-column: auto; order: 1; }
.dz-quick-calendar .dz-qc-col input.inputElement.p-1 { padding: 0 12px !important; }
.dz-quick-calendar .dz-qc-dates .input-group { margin: 0 !important; width: 100%; min-width: 0; }
/* All Day stays under the dates it changes: the box, then its label */
.dz-quick-calendar .calendarQuickCreateContent > .dz-qc-allday { flex-direction: row-reverse; flex-wrap: nowrap; justify-content: flex-end; align-items: center; gap: 10px; }
/* width: auto - Bootstrap 4 gives every .col-sm-* width: 100%, which a 0 0 auto basis takes as its size, so the
   label and the box each filled a line and stacked */
.dz-quick-calendar .calendarQuickCreateContent > .dz-qc-allday > [class*="col-"] { flex: 0 0 auto !important; width: auto; max-width: none; }
.dz-quick-calendar .dz-qc-allday .dz-field-label { margin: 0; font-size: 14px; font-weight: 600; color: var(--dz-text, #1f2a36); }
.dz-quick-calendar .dz-qc-allday input#makeItForAllDay { width: 18px !important; height: 18px !important; margin: 0; vertical-align: middle; accent-color: var(--dz-accent, #008ce0); }
.dz-quick-calendar .calendarQuickCreateContent > #rittenSendRow { order: 2; display: block; padding: 12px 14px !important; border: 1px solid var(--dz-border, #dde2e7) !important; border-radius: var(--dz-radius-md, 8px); background: var(--dz-txn-muted-bg); }
.dz-quick-calendar #rittenSendRow > .col-sm-12 { padding: 0 !important; }
.dz-quick-calendar #rittenSendRow label { font-size: 14px; font-weight: 600; color: var(--dz-text, #1f2a36); }
.dz-quick-calendar #rittenSendRow .text-muted { margin: 2px 0 0 !important; font-size: 12px; color: var(--dz-text-2, #5a6a7a) !important; }
.dz-quick-calendar .spend_tracking_event { margin: 16px 0 0 !important; padding: 12px 0 0 !important; border-top: 1px solid var(--dz-hairline, #e8edf2) !important; }
.dz-quick-calendar .spend_tracking_event .muted label { font-size: 13px; font-weight: 600; color: var(--dz-text, #1f2a36); }

/* mobile: full-screen sheet (modal-standard.css), one column, 56px fields, 16px values */
@media (max-width: 719.98px) {
  /* square full-screen sheet: section 3 above gives .dz-modal 12px corners with a selector that outranks the phone rule in modal-standard.css */
  .myModal .dz-modal .modal-content { border: 0; border-radius: 0; }
  .myModal .dz-modal .modal-header.dz-modal-header, .myModal .dz-modal .modal-footer.dz-modal-footer { border-radius: 0; }
  .dz-quick-create .quickCreateContent { grid-template-columns: minmax(0, 1fr); }
  .myModal .dz-quick-create .dz-fa :is(input.form-control, input.inputElement, input[type="text"], input[type="number"], select.form-control):not([type="checkbox"]):not([type="radio"]):not(.select2-input),
  .myModal .dz-quick-create.dz-modal .dz-fa.dz-fa .input-group.input-group.input-group { height: 56px; min-height: 56px; font-size: 16px; }
  .myModal .dz-quick-create .dz-fa .select2-container .select2-choice { height: auto; min-height: 56px; padding-top: 16px; padding-bottom: 16px; font-size: 16px; }
  .myModal .dz-quick-create.dz-modal .dz-fa.dz-fa .input-group.input-group.input-group > :is(input, .form-control, .input-group-addon, .clearReferenceSelection) { height: 54px; }
  .myModal .dz-quick-create .dz-fa .select2-container .select2-choice .select2-chosen { line-height: 1.4; }
  .dz-quick-create .dz-fa:not(.dz-fa-multi) > :is(.fieldLabel, .dz-field-label) { top: 28px; font-size: 16px; }
  .dz-quick-create .dz-fa.dz-fa-multi { flex-direction: column; align-items: stretch; }
  .dz-quick-create .dz-fa.dz-fa-multi > .fieldLabel { flex: none; max-width: none; }
  .dz-quick-calendar table.massEditTable tr.row.dz-fa-multi { grid-template-columns: minmax(0, 1fr); gap: 12px 0; }
}

/* ---- Add payment transaction ---------------------------------------------- */
.myModal .dz-modal.dz-payment-modal.modal-dialog { max-width: 880px; } /* L on the design's size scale: a two-column form (CRM-3935) */
.dz-payment-modal #makePaymentForm .modal-body { max-height: min(72vh, 760px); }
.dz-payment-modal .dz-method-help { min-height: 18px; }
.dz-payment-modal .dz-method-help.dz-method-help-fee { color: var(--dz-txn-warning); }
.dz-payment-modal .dz-method-help.dz-method-help-fee .dz-icon { color: var(--dz-txn-warning); }
.dz-payment-modal #hide_manual_payment .dz-grid-2 { margin-top: 0; }
/* SPE-1432: the Quick Create fields of the modal; text areas and checkboxes take the whole row */
.dz-payment-modal #dz_payment_extra_fields .dz-grid-2 > :is(.dz-field-wide, .dz-fa-check) { grid-column: 1 / -1; }
.dz-payment-modal .uploadDocRow.hide { display: none; }
.dz-payment-modal .uploadDocRow #dragandrophandler { border: 1px dashed var(--dz-txn-input-border); border-radius: var(--dz-radius-md, 8px); padding: 16px; text-align: center; background: var(--dz-txn-muted-bg); }
.dz-payment-modal .uploadDocRow .fileUploadBtn.btn { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: var(--dz-radius-md, 8px); font-size: 13px; font-weight: 600; box-shadow: none; }
.dz-payment-modal .uploadDocRow input[type="file"] { display: none; }

/* transaction categories: the legacy table keeps its tr/td structure (the
   amount handlers walk the DOM), styled as a list */
.dz-payment-modal .dz-cat-scroll { max-height: 260px; overflow: auto; border: 1px solid var(--dz-border, #dde2e7); border-radius: var(--dz-radius-md, 8px); }
.dz-payment-modal table#chargeData { width: 100%; margin: 0; border: 0; border-collapse: separate; border-spacing: 0; background: var(--dz-surface, #fff); }
.dz-payment-modal table#chargeData > thead { position: sticky; top: 0; z-index: 1; }
.dz-payment-modal table#chargeData > thead > tr > th { height: 36px; padding: 0 12px; border: 0; border-bottom: 1px solid var(--dz-border, #dde2e7); background: var(--dz-txn-muted-bg) !important; font-size: 12px; font-weight: 600; color: var(--dz-text-2, #5a6a7a) !important; white-space: nowrap; position: static; }
.dz-payment-modal table#chargeData > thead > tr > th:first-child { width: 44px; }
.dz-payment-modal table#chargeData > thead > tr > th:last-child { width: 160px; }
.dz-payment-modal table#chargeData > tbody > tr > td { height: 46px; padding: 4px 12px; border: 0; border-bottom: 1px solid var(--dz-hairline, #e8edf2); vertical-align: middle; background: var(--dz-surface, #fff); font-size: 13px; color: var(--dz-text, #1f2a36); }
.dz-payment-modal table#chargeData > tbody > tr:last-child > td { border-bottom: 0; }
.dz-payment-modal table#chargeData > tbody > tr:hover > td { background: var(--dz-row-hover, #f4f6f8); }
/* the amount cell keeps td > .input-group-prepend + .currency-wrap > input (the keyup handler walks
   three parents up to the row), so the cell stays a table cell and its two children sit inline */
.dz-payment-modal table#chargeData > tbody > tr > td.input-group { display: table-cell; width: 170px; white-space: nowrap; }
.dz-payment-modal table#chargeData > tbody > tr > td.input-group > .input-group-prepend { display: inline-flex; vertical-align: middle; margin: 0; }
.dz-payment-modal table#chargeData > tbody > tr > td.input-group > .input-group-prepend .input-group-text { height: 34px; padding: 0 10px; border: 1px solid var(--dz-txn-input-border); border-right: 0; border-radius: 6px 0 0 6px; background: var(--dz-txn-muted-bg); color: var(--dz-text-2, #5a6a7a); font-size: 13px; }
.dz-payment-modal table#chargeData .currency-wrap { display: inline-block; vertical-align: middle; width: calc(100% - 40px); position: static; }
.dz-payment-modal table#chargeData .dz-cat-label { margin: 0; font-weight: 400; cursor: pointer; display: block; }
.dz-payment-modal table#chargeData input.charge_amount { height: 34px; width: 100% !important; padding: 0 10px; border: 1px solid var(--dz-txn-input-border); border-radius: 0 6px 6px 0; background: var(--dz-txn-input-bg); font-size: 13px; color: var(--dz-text, #1f2a36); box-shadow: none; }
.dz-payment-modal table#chargeData input.charge_amount:focus { outline: none; border-color: var(--dz-accent, #008ce0); position: relative; z-index: 1; }
.dz-payment-modal table#chargeData input.chargeCheck {
  -webkit-appearance: none; appearance: none; width: 18px !important; height: 18px; margin: 0; padding: 0; border: 2px solid var(--dz-txn-input-border); border-radius: 4px;
  background: var(--dz-txn-input-bg); vertical-align: middle; position: relative; cursor: pointer; transition: border-color .15s, background-color .15s;
}
.dz-payment-modal table#chargeData input.chargeCheck:hover { border-color: #98a2b3; }
.dz-payment-modal table#chargeData input.chargeCheck:checked { border-color: var(--dz-accent, #008ce0); background: var(--dz-accent, #008ce0); }
.dz-payment-modal table#chargeData input.chargeCheck:checked::after { content: ''; position: absolute; left: 4px; top: 1px; width: 5px; height: 9px; border: solid var(--dz-accent-fg, #fff); border-width: 0 2px 2px 0; transform: rotate(45deg); }
.dz-payment-modal table#chargeData input.chargeCheck:focus-visible { outline: none; border-color: var(--dz-accent, #008ce0); }
.dz-payment-modal .dz-subtotal { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px 0; font-size: 13px; color: var(--dz-text-2, #5a6a7a); }
.dz-payment-modal .dz-subtotal strong { font-size: 14px; color: var(--dz-text, #1f2a36); font-variant-numeric: tabular-nums; }
.dz-payment-modal input[type=number]::-webkit-outer-spin-button, .dz-payment-modal input[type=number]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.dz-payment-modal input[type=number] { -moz-appearance: textfield; }

/* totals (calculated, read-only): the legacy inputs stay in the DOM for the
   handlers; the visible rows mirror them */
.dz-payment-modal .dz-totals { border: 1px solid var(--dz-border, #dde2e7); border-radius: var(--dz-radius-md, 8px); background: var(--dz-txn-muted-bg); padding: 4px 14px; }
.dz-payment-modal .dz-totals-row { display: flex; align-items: center; justify-content: space-between; padding: 9px 0; font-size: 13px; color: var(--dz-text-2, #5a6a7a); border-bottom: 1px solid var(--dz-hairline, #e8edf2); }
.dz-payment-modal .dz-totals-row:last-child { border-bottom: 0; }
.dz-payment-modal .dz-totals-row > span:last-child { font-variant-numeric: tabular-nums; color: var(--dz-text, #1f2a36); font-weight: 600; }
.dz-payment-modal .dz-totals-row.dz-totals-grand { font-size: 14px; }
.dz-payment-modal .dz-totals-row.dz-totals-grand > span:last-child { font-family: var(--font-title, "Nunito", sans-serif); font-size: 18px; font-weight: 700; }
.dz-payment-modal .dz-totals-row .dz-totals-note { display: block; font-size: 11px; color: var(--dz-text-3, #8899aa); font-weight: 400; }
.dz-payment-modal .dz-legacy-totals { display: none; }

/* payment schedule: "Payment type" label, two pill radios, hint below (as in the design).
   #duration_type itself is shown / hidden by the legacy handler (inline display:block) */
.dz-payment-modal #duration_type { margin: 0; }
.dz-payment-modal #duration_type .dz-schedule-row { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.dz-payment-modal #duration_type .dz-schedule-hint { font-size: 12px; color: var(--dz-text-2, #5a6a7a); }
.dz-payment-modal .dz-segmented { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; border: 0; background: transparent; }
.dz-payment-modal .dz-segmented input[type="radio"] { position: absolute; width: 1px; height: 1px; opacity: 0; margin: 0; pointer-events: none; }
.dz-payment-modal .dz-segmented label {
  display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px; margin: 0; border: 1px solid var(--dz-txn-input-border); border-radius: var(--dz-radius-md, 8px);
  background: var(--dz-surface, #fff); font-size: 13px; font-weight: 500; color: var(--dz-text, #1f2a36); cursor: pointer; transition: border-color .15s, background-color .15s;
}
.dz-payment-modal .dz-segmented label::before { content: ''; width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--dz-txn-input-border); background: var(--dz-surface, #fff); flex: none; box-sizing: border-box; }
.dz-payment-modal .dz-segmented label .dz-icon { display: none; }
.dz-payment-modal .dz-segmented label:hover { border-color: #c2c9d2; }
.dz-payment-modal .dz-segmented input[type="radio"]:checked + label { border-color: var(--dz-accent, #008ce0); background: var(--dz-txn-accent-soft); color: var(--dz-accent, #008ce0); font-weight: 600; }
.dz-payment-modal .dz-segmented input[type="radio"]:checked + label::before { border: 5px solid var(--dz-accent, #008ce0); }
.dz-payment-modal .dz-segmented input[type="radio"]:focus-visible + label { border-color: var(--dz-accent, #008ce0); }
.dz-payment-modal .dz-check { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--dz-text, #1f2a36); cursor: pointer; margin: 0; }
.dz-payment-modal .dz-check input[type="checkbox"], .dz-payment-modal .dz-radio input[type="radio"] {
  -webkit-appearance: none; appearance: none; width: 18px; height: 18px; margin: 0; padding: 0; border: 2px solid var(--dz-txn-input-border); background: var(--dz-txn-input-bg);
  position: relative; cursor: pointer; flex: none; transition: border-color .15s, background-color .15s;
}
.dz-payment-modal .dz-check input[type="checkbox"] { border-radius: 4px; }
.dz-payment-modal .dz-radio input[type="radio"] { border-radius: 50%; }
.dz-payment-modal .dz-check input[type="checkbox"]:checked { border-color: var(--dz-accent, #008ce0); background: var(--dz-accent, #008ce0); }
.dz-payment-modal .dz-check input[type="checkbox"]:checked::after { content: ''; position: absolute; left: 4px; top: 1px; width: 5px; height: 9px; border: solid var(--dz-accent-fg, #fff); border-width: 0 2px 2px 0; transform: rotate(45deg); }
.dz-payment-modal .dz-radio input[type="radio"]:checked { border-color: var(--dz-accent, #008ce0); }
.dz-payment-modal .dz-radio input[type="radio"]:checked::after { content: ''; position: absolute; left: 3px; top: 3px; width: 8px; height: 8px; border-radius: 50%; background: var(--dz-accent, #008ce0); }
.dz-payment-modal .dz-check input:focus-visible, .dz-payment-modal .dz-radio input:focus-visible { outline: none; border-color: var(--dz-accent, #008ce0); }
.dz-payment-modal .dz-radio { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--dz-text, #1f2a36); cursor: pointer; margin: 0; white-space: nowrap; }
.dz-payment-modal .dz-radio-group { display: flex; flex-wrap: wrap; gap: 10px 20px; align-items: center; }
.dz-payment-modal .dz-radio-group .form-inline { display: inline-flex; align-items: center; gap: 8px; flex-wrap: nowrap; white-space: nowrap; margin: 0; }
.dz-payment-modal .dz-radio-group .form-inline label { margin: 0; font-weight: 400; white-space: nowrap; }
.dz-payment-modal .dz-radio-group input[type="number"].form-control { width: 76px; height: 34px; flex: 0 0 auto; padding: 0 10px; border: 1px solid var(--dz-txn-input-border); border-radius: 6px; font-size: 13px; }
.dz-payment-modal .dz-radio-group input[type="number"].form-control[readonly] { background: var(--dz-txn-muted-bg); color: var(--dz-text-3, #8899aa); }
.dz-payment-modal #recurring_payment,
.dark-mode .dz-payment-modal #recurring_payment {
  margin-top: 12px; padding: 14px 16px !important; border: 1px solid var(--dz-border, #dde2e7) !important; border-radius: var(--dz-radius-md, 8px) !important; background: var(--dz-txn-muted-bg) !important; color: var(--dz-text, #1f2a36) !important;
}
.dz-payment-modal #recurring_payment .dz-field { margin-bottom: 12px; }
.dz-payment-modal #recurring_payment .dz-field:last-child { margin-bottom: 0; }
.dz-payment-modal #recurring_payment #total_installment input#installment { max-width: 160px; }
.dz-payment-modal #recurring_payment #frequency_date_time { margin-top: 10px; }
.dz-payment-modal #recurring_payment #frequency_date_time .form-inline { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.dz-payment-modal #recurring_payment #frequency_date_time .select2-container { width: 320px !important; max-width: 100%; }
.dz-payment-modal #recurring_payment #frequency_date_time input.timepicker-default { width: 120px; height: 38px; margin: 0; }
.dz-payment-modal #recurring_payment #frequency_date_time .dz-field-help { width: 100%; }
.dz-payment-modal #installment_details { display: block; margin-top: 6px; font-size: 12px; color: var(--dz-txn-success); }
.dz-payment-modal #installment_details:empty { display: none; }
.dz-payment-modal .dz-plan-ends { font-size: 12px; color: var(--dz-text-2, #5a6a7a); }

/* card + eCheck details */
.dz-payment-modal #card_details .ui.icon.input { display: block; padding: 0; width: 100%; }
.dz-payment-modal #card_details .ui.icon.input > i.icon { display: none; }
.dz-payment-modal #card_details input.input-lg, .dz-payment-modal #echeck_details input.input-lg, .dz-payment-modal #echeck_details select.input-lg { height: 38px; font-size: 14px; }
.dz-payment-modal #echeck_details .ui.icon.input.row { margin: 0; padding: 0; display: block; }
/* the gateway mount points only get a box once a card element is mounted in them (the legacy
   handler .show()s them inline, so :empty alone cannot hide them) */
.dz-payment-modal #card-element:not(:empty) { padding: 10px 12px; border: 1px solid var(--dz-txn-input-border); border-radius: var(--dz-radius-md, 8px); background: var(--dz-txn-input-bg); margin-top: 8px; }
.dz-payment-modal #card-element:empty, .dz-payment-modal #square_card_box:empty { padding: 0; border: 0; margin: 0; height: 0; }
.dz-payment-modal #square_card_box:not(:empty) { margin-top: 8px; }
.dz-payment-modal .dz-online-only[hidden] { display: none !important; }

/* footer buttons follow the shared set */
.dz-payment-modal .modal-footer .btn.btn-secondary,
.dz-quick-create .modal-footer .btn.btn-info, .dz-quick-create .modal-footer .cancelLink.btn { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: var(--dz-radius-md, 8px); border: 1px solid var(--dz-txn-input-border); background: var(--dz-surface, #fff); color: var(--dz-text, #1f2a36); font-size: 13px; font-weight: 600; box-shadow: none; text-decoration: none; }
.dz-payment-modal .modal-footer .btn.btn-secondary:hover,
.dz-quick-create .modal-footer .btn.btn-info:hover, .dz-quick-create .modal-footer .cancelLink.btn:hover { background: var(--dz-txn-muted-bg); border-color: #c2c9d2; color: var(--dz-text, #1f2a36); }
.dz-payment-modal .modal-footer .btn.btn-success,
.dz-quick-create .modal-footer .btn.btn-success { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 16px; border-radius: var(--dz-radius-md, 8px); border: 1px solid var(--dz-accent, #008ce0); background: var(--dz-accent, #008ce0); color: var(--dz-accent-fg, #fff); font-size: 13px; font-weight: 600; box-shadow: none; }
.dz-payment-modal .modal-footer .btn.btn-success:hover, .dz-quick-create .modal-footer .btn.btn-success:hover { filter: brightness(.94); }
.dz-payment-modal .modal-footer .btn.btn-default.disabled { height: 36px; border-radius: var(--dz-radius-md, 8px); font-size: 13px; }
.dz-quick-create .modal-footer .btn strong { font-weight: 600; }
.dark-mode .dz-payment-modal .modal-footer .btn.btn-secondary,
.dark-mode .dz-quick-create .modal-footer .btn.btn-info, .dark-mode .dz-quick-create .modal-footer .cancelLink.btn { background: var(--dz-surface, #0f172a); border-color: var(--dz-border, #394451); color: var(--dz-text, #e8edf2); }

/* ---- small widths ----------------------------------------------------------- */
@media (max-width: 767.98px) {
  .dz-related .dz-rel-header { flex-direction: column; align-items: stretch; }
  .dz-related .dz-rel-actions { margin-left: 0; }
  .dz-related .dz-rel-actions .dz-btn, .dz-related .dz-rel-actions .btn.addButton { flex: 1 1 calc(50% - 4px); }
  .dz-related .dz-rel-footer { justify-content: center; }
  .dz-modal .dz-grid-2, .dz-modal .dz-grid-3, .dz-quick-create .quickCreateContent,
  .dz-quick-calendar table.massEditTable > tbody { grid-template-columns: minmax(0, 1fr); }
  .relatedContainer.dz-related { padding: 0 8px 8px; }
  .myModal .dz-modal .modal-body.dz-modal-body { max-height: calc(100vh - 190px); padding-left: 16px; padding-right: 16px; }
  .myModal .dz-modal .modal-header.dz-modal-header, .myModal .dz-modal .modal-footer.dz-modal-footer { padding-left: 16px; padding-right: 16px; }
  .myModal .dz-modal .modal-footer.dz-modal-footer { flex-wrap: wrap; }
  .myModal .dz-modal .dz-footer-total { width: 100%; margin-bottom: 4px; }
}
.myModal .dz-modal .modal-footer.dz-modal-footer > .dz-qc-footer { display: contents; } /* Staffs / Survey wrap their footer buttons */
