/* ==========================================================================
   Dazos CRM Design System — form controls, detail-view and settings polish
   Companion to listview-design.css (loaded right after it). Visual only: every
   input name, class hook and handler stays as the templates render it.
   ========================================================================== */

/* ---- native radios / checkboxes on the workflow editor --------------------- */
#workflow_edit input[type="radio"],
#workflow_edit input[type="checkbox"]:not(.taskStatus):not(.tmpTaskStatus) {
  -webkit-appearance: none; appearance: none;
  width: 18px; height: 18px; margin: 0 6px 0 0; padding: 0;
  border: 2px solid #d0d5dd; background: #fff; vertical-align: middle; position: relative; top: -1px;
  cursor: pointer; transition: border-color .15s, background-color .15s; flex: none;
}
#workflow_edit input[type="radio"] { border-radius: 50%; }
#workflow_edit input[type="checkbox"]:not(.taskStatus):not(.tmpTaskStatus) { border-radius: 4px; }
#workflow_edit input[type="radio"]:hover,
#workflow_edit input[type="checkbox"]:not(.taskStatus):not(.tmpTaskStatus):hover { border-color: #98a2b3; }
#workflow_edit input[type="radio"]:checked { border-color: var(--dz-accent, #1a7efb); }
#workflow_edit input[type="radio"]:checked::after {
  content: ''; position: absolute; left: 3px; top: 3px; width: 8px; height: 8px; border-radius: 50%;
  background: var(--dz-accent, #1a7efb);
}
#workflow_edit input[type="checkbox"]:not(.taskStatus):not(.tmpTaskStatus):checked {
  border-color: var(--dz-accent, #1a7efb); background: var(--dz-accent, #1a7efb);
}
#workflow_edit input[type="checkbox"]:not(.taskStatus):not(.tmpTaskStatus):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);
}
#workflow_edit input[type="radio"]:focus-visible,
#workflow_edit input[type="checkbox"]:not(.taskStatus):not(.tmpTaskStatus):focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(26, 126, 251, .25); }
#workflow_edit input[type="radio"]:disabled,
#workflow_edit input[type="checkbox"]:not(.taskStatus):not(.tmpTaskStatus):disabled { opacity: .5; cursor: not-allowed; }
#workflow_edit input[type="radio"] + span { vertical-align: middle; font-size: 14px; color: #101828; }
/* radio groups line up with the inputs of the other rows (the column centred them) */
#workflow_edit .controls > .pull-left:has(input[type="radio"]) {
  float: none !important; display: flex; align-items: center; flex-wrap: wrap; gap: 6px 22px; min-height: 38px; text-align: left; width: 100%;
}
#workflow_edit .controls > .pull-left:has(input[type="radio"]) > span { display: inline-flex; align-items: center; margin: 0 !important; }
.dark-mode #workflow_edit input[type="radio"],
.dark-mode #workflow_edit input[type="checkbox"]:not(.taskStatus):not(.tmpTaskStatus) { background: #343a40; border-color: #50585f; }
.dark-mode #workflow_edit input[type="radio"] + span { color: #e9ecef; }

/* ---- workflow condition rows: picklist values shown as chips (same look as the Set Value popup) ---------- */
#workflow_edit .fieldUiHolder .dz-cond-chips {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-height: 38px; padding: 4px 8px; cursor: pointer;
  border: 1px solid #d0d5dd; border-radius: 8px; background: #fff;
}
#workflow_edit .fieldUiHolder .dz-cond-chips:hover { border-color: #c2c9d2; }
#workflow_edit .fieldUiHolder .dz-cond-chip {
  display: inline-flex; align-items: center; gap: 6px; max-width: 100%; padding: 3px 8px 3px 6px; border: 1px solid #d0d5dd; border-radius: 6px;
  background: #f4f6f8; color: #101828; font-size: 13px; line-height: 1.3; white-space: nowrap;
}
#workflow_edit .fieldUiHolder .dz-cond-chip .dz-cond-chip-x {
  display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; border-radius: 4px; color: #667085; font-size: 14px; line-height: 1; cursor: pointer;
}
#workflow_edit .fieldUiHolder .dz-cond-chip .dz-cond-chip-x:hover { background: #e4e7ec; color: #101828; }
#workflow_edit .fieldUiHolder .dz-cond-chip-label { overflow: hidden; text-overflow: ellipsis; }
#workflow_edit .fieldUiHolder .getPopupUi.dz-has-chips { position: absolute !important; width: 1px !important; height: 1px !important; opacity: 0; pointer-events: none; margin: 0; padding: 0; border: 0; }
.dark-mode #workflow_edit .fieldUiHolder .dz-cond-chips { background: #343a40; border-color: #50585f; }
.dark-mode #workflow_edit .fieldUiHolder .dz-cond-chip { background: #2d3238; border-color: #50585f; color: #e9ecef; }

/* ---- workflow actions table: edit / delete icons and the ON-OFF switch on one line ---- */
#workflow_edit #listview-table > tbody > tr > td:first-child { white-space: nowrap; vertical-align: middle; }
#workflow_edit #listview-table > tbody > tr > td:first-child .actions {
  float: none !important; display: inline-flex; align-items: center; gap: 4px; vertical-align: middle; margin-right: 10px;
}
#workflow_edit #listview-table > tbody > tr > td:first-child .actions .actionImages { display: inline-flex; align-items: center; gap: 4px; }
#workflow_edit #listview-table > tbody > tr > td:first-child .actions a {
  display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 6px; color: #475467;
}
#workflow_edit #listview-table > tbody > tr > td:first-child .actions a:hover { background: #f4f6f8; color: #101828; }
#workflow_edit #listview-table > tbody > tr > td:first-child .actions a .dz-icon { width: 16px; height: 16px; }
#workflow_edit #listview-table > tbody > tr > td:first-child .bootstrap-switch { vertical-align: middle; margin: 0; }

/* ---- detail view: the inline-edit pencil always sits at the right edge of the value cell -------------------- */
/* the template renders <span class="value"> (block) followed by <span class="action pull-right">; this layout has
   no .pull-right float, so the pencil landed wherever the value ended (or at the left for an empty value).
   Two markups share the rule: record detail (`.detailview-content #detailView … td.fieldValue`) and the Users /
   My Preferences detail (Users/DetailViewBlockView.tpl: `div.detailview-table … div.fieldValue`, Sandeep 2026-09-14). */
.detailview-content #detailView .detailview-table td.fieldValue,
#detailView .detailview-table div.fieldValue:has(> .action) { position: relative; padding-right: 40px; }
.detailview-content #detailView .detailview-table td.fieldValue > .action,
#detailView .detailview-table div.fieldValue > .action {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%); display: inline-flex; align-items: center;
  justify-content: center; width: 26px; height: 26px; border-radius: 6px; float: none; margin: 0;
}
.detailview-content #detailView .detailview-table td.fieldValue > .action:hover,
#detailView .detailview-table div.fieldValue > .action:hover { background: #f4f6f8; }
.detailview-content #detailView .detailview-table td.fieldValue > .action a,
#detailView .detailview-table div.fieldValue > .action a { display: inline-flex; color: #475467; }
.detailview-content #detailView .detailview-table td.fieldValue > .action a:hover,
#detailView .detailview-table div.fieldValue > .action a:hover { color: #101828; }
.detailview-content #detailView .detailview-table td.fieldValue > .edit ~ .action,
#detailView .detailview-table div.fieldValue > .edit ~ .action { z-index: 1; }
#detailView .detailview-table div.fieldValue > .action .dz-icon { width: 16px; height: 16px; }
.dark-mode .detailview-content #detailView .detailview-table td.fieldValue > .action:hover,
.dark-mode #detailView .detailview-table div.fieldValue > .action:hover { background: #343a40; }
.dark-mode .detailview-content #detailView .detailview-table td.fieldValue > .action a,
.dark-mode #detailView .detailview-table div.fieldValue > .action a { color: #cdd5df; }

/* ---- profile permissions: the per-module field grid uses the full width, legend on the right ---------------- */
.settingsPageDiv td:has(> .row[data-togglecontent]) { padding-left: 16px !important; padding-right: 16px !important; }
.settingsPageDiv .row[data-togglecontent] { margin: 0; }
.settingsPageDiv .row[data-togglecontent] > [class*="col-"]:has(> label) {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 16px; padding: 10px 8px 6px;
}
.settingsPageDiv .row[data-togglecontent] > [class*="col-"] > label { float: none !important; margin: 0; font-size: 14px; color: #101828; }
.settingsPageDiv .row[data-togglecontent] > [class*="col-"] > .pull-right {
  float: none !important; display: inline-flex; align-items: center; gap: 4px; margin-left: auto; font-size: 13px; color: #475467;
}
.settingsPageDiv .row[data-togglecontent] > [class*="col-"] > .pull-right > span[style*="margin"] { margin: 0 14px 0 6px !important; }
/* legend dots: the 50px slider track becomes a 14px dot so each colour sits next to its word */
.settingsPageDiv .row[data-togglecontent] > [class*="col-"] > .pull-right > .mini-slider-control {
  width: 14px; height: 13px; margin: 0; border: 0; background: transparent; box-shadow: none; position: relative; top: 0;
}
.settingsPageDiv .row[data-togglecontent] > [class*="col-"] > .pull-right > .mini-slider-control .ui-slider-handle { left: 0 !important; margin: 0 !important; top: 0; }
.settingsPageDiv .row[data-togglecontent] > [class*="col-"] > .clearfix { display: none; }
.settingsPageDiv .row[data-togglecontent] table.table { width: 100%; margin: 0 0 8px; table-layout: fixed; border: 0; }
.settingsPageDiv .row[data-togglecontent] table.table > tbody > tr > td,
.settingsPageDiv .row[data-togglecontent] table.table > tr > td { width: 33.333%; padding: 9px 8px; border: 0 !important; vertical-align: middle; background: transparent; }
.settingsPageDiv .row[data-togglecontent] table.table td .mini-slider-control { margin-right: 10px; height: 10px; overflow: visible !important; }
.settingsPageDiv .row[data-togglecontent] table.table td { overflow: visible; }
/* a clear knob: 16px over the 10px track (the row's 13px text had shrunk the em-based track under the 13px knob) */
.settingsPageDiv .row[data-togglecontent] table.table td .mini-slider-control .ui-slider-handle {
  width: 16px !important; height: 16px !important; top: -3px !important; margin-left: -8px; box-shadow: 0 1px 2px rgba(16, 24, 40, .18);
}
/* edit views (Profiles / Roles "Edit privileges"): slider and field name are two block divs — put them on one line */
.settingsPageDiv .row[data-togglecontent] table.table td > .mini-slider-control.editViewMiniSlider {
  display: inline-block; float: none !important; vertical-align: middle; width: 50px; margin: 0 12px 0 0;
}
.settingsPageDiv .row[data-togglecontent] table.table td > div.pull-left {
  float: none !important; display: inline-block; vertical-align: middle; font-size: 13px; color: #101828;
  max-width: calc(100% - 66px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;   /* long names shorten, never wrap under the slider */
}
.settingsPageDiv .row[data-togglecontent] table.table td { white-space: nowrap; }
.dark-mode .settingsPageDiv .row[data-togglecontent] table.table td > div.pull-left { color: #e9ecef; }
.settingsPageDiv .row[data-togglecontent] table.table td > .pull-left:last-child,
.settingsPageDiv .row[data-togglecontent] table.table td > span:last-child { float: none !important; display: inline-block; vertical-align: middle; font-size: 13px; color: #101828; }
.settingsPageDiv .row[data-togglecontent] table.table td img { vertical-align: middle; margin-right: 8px; }
.dark-mode .settingsPageDiv .row[data-togglecontent] > [class*="col-"] > label,
.dark-mode .settingsPageDiv .row[data-togglecontent] table.table td > .pull-left:last-child,
.dark-mode .settingsPageDiv .row[data-togglecontent] table.table td > span:last-child { color: #e9ecef; }

/* ---- settings detail pages: the Edit button block is meant to float right (no .pull-right float in this layout) ---- */
#DashboardRolesDetails .editbutton-container.pull-right,
.settingsPageDiv .detailViewContainer > div > .clearfix > .editbutton-container.pull-right { float: right !important; }
#DashboardRolesDetails .editbutton-container .btn.editButton {
  display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border: 1px solid #d0d5dd; border-radius: 8px;
  background: #fff; color: #101828; font-size: 13px; font-weight: 600; box-shadow: none;
}
#DashboardRolesDetails .editbutton-container .btn.editButton:hover { background: #f8f9fb; border-color: #c2c9d2; color: #101828; }

/* ---- user detail / my preferences header: Edit + More at the right edge (the template's .pull-right does not float here) ---- */
#userPageHeader .detailViewButtoncontainer,
#prefPageHeader .col-lg-3.col-xs-12 { display: flex; justify-content: flex-end; align-items: flex-start; float: none !important; }
#userPageHeader .detailViewButtoncontainer > .btn-group,
#prefPageHeader .btn-group.pull-right { float: none !important; margin-left: auto; display: inline-flex; gap: 6px; }
#userPageHeader .detailViewButtoncontainer .btn,
#prefPageHeader .btn-group.pull-right .btn {
  display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border: 1px solid #d0d5dd; border-radius: 8px;
  background: #fff; color: #101828; font-size: 13px; font-weight: 600; box-shadow: none; margin: 0;
}
#userPageHeader .detailViewButtoncontainer .btn:hover,
#prefPageHeader .btn-group.pull-right .btn:hover { background: #f8f9fb; border-color: #c2c9d2; color: #101828; }
#userPageHeader .detailViewButtoncontainer .dropdown-menu.pull-right,
#prefPageHeader .dropdown-menu.pull-right { right: 0; left: auto; }

/* ---- settings pages whose action button is wrapped in a non-floating .pull-right: mapping screens, calendar settings ---- */
.leadsFieldMappingListPageDiv .settingsHeader > span > span.pull-right,
.potentialsFieldMappingListPageDiv .settingsHeader > span > span.pull-right,
.AccountsFieldMappingListPageDiv .settingsHeader > span > span.pull-right,
.calendarview .detailViewButtoncontainer.pull-right,
.block_LBL_CALENDAR_SETTINGS .detailViewButtoncontainer.pull-right { display: flex; justify-content: flex-end; align-items: center; gap: 8px; float: none !important; width: 100%; }
.calendarview .detailViewButtoncontainer .btn-group.pull-right,
.block_LBL_CALENDAR_SETTINGS .detailViewButtoncontainer .btn-group.pull-right { float: none !important; margin-left: auto; }
.block_LBL_CALENDAR_SETTINGS .detailViewButtoncontainer .btn.btn-default {
  display: inline-flex; align-items: center; height: 36px; padding: 0 14px; border: 1px solid #d0d5dd; border-radius: 8px; background: #fff;
  color: #101828; font-size: 13px; font-weight: 600; box-shadow: none; margin: 0;
}
.block_LBL_CALENDAR_SETTINGS .detailViewButtoncontainer .btn.btn-default:hover { background: #f8f9fb; border-color: #c2c9d2; color: #101828; }
/* the button's column carries Bootstrap 3 col-xs-* classes that do nothing here, so it only spanned its content */
.calendarview > .row > div:has(> .detailViewButtoncontainer) { flex: 1 1 auto; margin-left: auto; display: flex; justify-content: flex-end; }
.calendarview > .row > h4:has(+ div > .detailViewButtoncontainer) { flex: 0 1 auto; }
.calendarview .detailViewButtoncontainer .btn,
.leadsFieldMappingListPageDiv .settingsHeader .btn,
.potentialsFieldMappingListPageDiv .settingsHeader .btn,
.AccountsFieldMappingListPageDiv .settingsHeader .btn {
  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; margin: 0;
}
.calendarview .detailViewButtoncontainer .btn.btn-default { border: 1px solid #d0d5dd; background: #fff; color: #101828; }
.calendarview .detailViewButtoncontainer .btn.btn-default:hover { background: #f8f9fb; border-color: #c2c9d2; color: #101828; }
.leadsFieldMappingListPageDiv .settingsHeader .btn strong,
.potentialsFieldMappingListPageDiv .settingsHeader .btn strong,
.AccountsFieldMappingListPageDiv .settingsHeader .btn strong { font-weight: 600; }

/* ---- more settings screens with a non-floating .pull-right around their action buttons ---------------------- */
/* VOB Insurance Policy Mapping (Add New / disabled note) and any settings header built the same way */
.settingsHeader > [class*="col-"] > span.pull-right { display: flex; justify-content: flex-end; align-items: center; gap: 8px; float: none !important; width: 100%; }
.settingsHeader > [class*="col-"] > span.pull-right > .btn.btn-default { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border: 1px solid #d0d5dd; border-radius: 8px; background: #fff; color: #101828; font-size: 13px; font-weight: 600; box-shadow: none; margin: 0 !important; }
.settingsHeader > [class*="col-"] > span.pull-right > .btn.btn-default:hover { background: #f8f9fb; border-color: #c2c9d2; color: #101828; }
/* field-mapping edit screens (Leads / Intake Opportunities / Accounts): Add Mapping stays left, Save + Cancel go right */
.editViewContents .row > span.col-sm-8 > span.pull-right:has(> .cancelLink) { display: flex; justify-content: flex-end; align-items: center; gap: 8px; float: none !important; width: 100%; }
.editViewContents .row > span.col-sm-8 > span.pull-right:has(> .cancelLink) > .btn { margin: 0 !important; }
/* Google Ads settings: heading left, Manage Campaigns + workflow toggle right on the same row */
.blockData .block > div:has(> #go_to_google_ads_campaigns) { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding-right: 8px; }
.blockData .block > div:has(> #go_to_google_ads_campaigns) > h4 { order: -1; flex: 1 1 auto; margin: 0 !important; }
.blockData .block > div:has(> #go_to_google_ads_campaigns) > .btn.pull-right { float: none !important; margin: 0 !important; }
/* telephony settings (CTM, CallRail, DialPad, 8x8, …): Edit + Map buttons in one right-aligned row */
.detailViewContainer > [class*="col-"] > .clearfix:has(> .btn-group.editbutton-container.pull-right) { display: flex; justify-content: flex-end; align-items: center; flex-wrap: wrap; gap: 8px; }
.detailViewContainer > [class*="col-"] > .clearfix:has(> .btn-group.editbutton-container.pull-right) > .pull-right { float: none !important; margin: 0; }
.detailViewContainer > [class*="col-"] > .clearfix:has(> .btn-group.editbutton-container.pull-right) .btn.mr-3 { margin-right: 0 !important; }

/* ---- picklist values: the Add Value button sits at the right of the heading row --------------------------- */
#pickListValuesTable thead th > #addItem {
  float: right !important; margin: 0 0 0 auto; display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px;
  border: 1px solid #d0d5dd; border-radius: 8px; background: #fff; color: #101828; font-size: 13px; font-weight: 600; box-shadow: none;
}
#pickListValuesTable thead th > #addItem:hover { background: #f8f9fb; border-color: #c2c9d2; color: #101828; }
#pickListValuesTable thead th > #addItem .dz-icon { width: 16px; height: 16px; }
#pickListValuesTable thead th > br { display: none; }
/* row actions (Active switch, edit, delete) at the right edge of each value row — this layout has no .pull-right float */
#pickListValuesTable td.fieldPropertyContainer { position: relative; padding-right: 220px; }
#pickListValuesTable td.fieldPropertyContainer > .picklistActions {
  float: none !important; position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  display: inline-flex; align-items: center; gap: 12px; margin: 0 !important; white-space: nowrap;
}
#pickListValuesTable td.fieldPropertyContainer > .picklistActions .picklist-toggle-wrap { display: inline-flex; align-items: center; gap: 6px; }
#pickListValuesTable td.fieldPropertyContainer > .picklistActions a {
  display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 6px; color: #475467;
}
#pickListValuesTable td.fieldPropertyContainer > .picklistActions a:hover { background: #f4f6f8; color: #101828; }
#pickListValuesTable td.fieldPropertyContainer > .picklistActions a .dz-icon { width: 16px; height: 16px; }
#pickListValuesTable thead th > span { display: inline-block; line-height: 34px; vertical-align: middle; }
.dark-mode #pickListValuesTable thead th > #addItem { background: #343a40; border-color: #50585f; color: #e9ecef; }

/* ---- Reports detail: "Dashboard" menu under the pin button — CRM-3874 follow-up, 2026-09-11 ------------------
   The red unpin icon appears the moment a dashboard is clicked and reads as pending until the server confirms
   (Reports Detail.js / ChartAndDetail.js flip it back if the request fails). */
.dashBoardTabMenu .removedashboard { color: #d32f2f; }
.dashBoardTabMenu .removedashboard.dz-pending { opacity: .45; pointer-events: none; }

/* ---- detail view inline edit: Save (check) / Cancel (x) buttons ------------------------------------------------
   common.css gives `.quickedit-button` `font-size: 25px !important` for the old glyph; the em-sized Lucide svg grew
   with it to 31px inside a 42px button (Sandeep 2026-09-11: "too big"). Same 32px flat tile as the list inline
   editor, 16px icon; colours (btn-outline-primary / input-group-addon, tenant accent) untouched. Covers the
   detail-view wrap (Detail.js), the Calendar "new" wrap and the dynamic-picklist add button. */
.input-save-wrap,
.input-save-wrap-new { display: inline-flex; align-items: center; gap: 4px; vertical-align: middle; }
.quickedit-button,
.input-save-wrap > .quickedit-button:first-child {   /* common.css zeroes the radius of the group's first child */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  margin-left: 0;
  border: 1px solid transparent;
  border-radius: 8px !important;
  font-size: 14px !important;
  line-height: 1;
  cursor: pointer;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease, filter .15s ease;
}
.quickedit-button .dz-icon { width: 16px; height: 16px; }
/* common.css: `.detailview-table .input-group-addon { border-radius: 0 !important }` outranks a single class — restate
   the radius at three-class specificity so BOTH buttons of the group are rounded */
.input-save-wrap .quickedit-button.input-group-addon,
.input-save-wrap-new .quickedit-button.input-group-addon,
.detailview-table .input-save-wrap .quickedit-button { border-radius: 8px !important; }
/* Save: filled tenant accent (the theme's primary button) */
.quickedit-button.inlineAjaxSave,
.quickedit-button.inlineAjaxSaveNew {
  background-color: var(--dz-accent, #008ce0) !important;
  border-color: var(--dz-accent, #008ce0) !important;
  color: var(--dz-accent-fg, #ffffff) !important;
}
.quickedit-button.inlineAjaxSave:hover,
.quickedit-button.inlineAjaxSaveNew:hover { filter: brightness(.92); }
/* Cancel: quiet outline tile, like the secondary buttons of the list header */
.quickedit-button.inlineAjaxCancel {
  background-color: #ffffff !important;
  border-color: #d0d5dd !important;
  color: #475467 !important;
}
.quickedit-button.inlineAjaxCancel:hover { background-color: #f8f9fb !important; border-color: #c2c9d2 !important; color: #101828 !important; }
.quickedit-button:focus-visible { outline: none; box-shadow: var(--dz-focus, 0 0 0 3px #b3e5fc); }
.dark-mode .quickedit-button.inlineAjaxCancel { background-color: #343a40 !important; border-color: #50585f !important; color: #e9ecef !important; }
.dark-mode .quickedit-button.inlineAjaxCancel:hover { background-color: #3d444b !important; color: #ffffff !important; }

/* ---- EMR Settings (EmrSettingsDetail.tpl): every EMR block's header row = "<EMR> Settings" + Edit / Disconnect
   (or Connect) / Remove. Remove and Disconnect float right (Bootstrap 4 `float-right` / inline style) while Edit
   carries `pull-right`, which has no float in this layout, so Edit sat alone in the middle of the header (Sandeep
   2026-09-11, Ritten). One rule for all 13 EMR blocks: the button column is a right-aligned flex row in the order
   Edit · Disconnect/Connect · Remove; the buttons keep their classes, data attributes and handlers. */
.emr-settings-page .editbutton-container > .row > [class*="col-"]:has(> .btn.editButton) {
  display: flex; justify-content: flex-end; align-items: center; flex-wrap: wrap; gap: 8px;
}
.emr-settings-page .editbutton-container > .row > [class*="col-"]:has(> .btn.editButton) > .btn {
  float: none !important; margin: 0 !important; height: 36px; display: inline-flex; align-items: center; border-radius: 8px;
  font-size: 13px; font-weight: 600; padding: 0 14px; box-shadow: none;
}
.emr-settings-page .editbutton-container > .row > [class*="col-"] > .btn.editButton { order: 1; border: 1px solid #d0d5dd; background: #fff; color: #101828; }
.emr-settings-page .editbutton-container > .row > [class*="col-"] > .btn.editButton:hover { background: #f8f9fb; border-color: #c2c9d2; color: #101828; }
.emr-settings-page .editbutton-container > .row > [class*="col-"] > .btn.disconnectEmr,
.emr-settings-page .editbutton-container > .row > [class*="col-"] > .btn.connectEmr { order: 2; }
.emr-settings-page .editbutton-container > .row > [class*="col-"] > .btn.removeIntegButton { order: 3; }
.dark-mode .emr-settings-page .editbutton-container > .row > [class*="col-"] > .btn.editButton { background: var(--dz-surface, #0f172a); border-color: var(--dz-border, #394451); color: var(--dz-text, #e8edf2); }

/* ---- Payment Settings (Transactions/PaymentSettingContent.tpl): "PickList Mapping" above each gateway form ------
   One right-aligned toolbar row per gateway tab; the button is the design's outline button with icon + label. */
.dz-form-toolbar { display: flex; justify-content: flex-end; align-items: center; gap: 8px; margin: 0 0 10px; }
.dz-form-toolbar .btn.dz-picklist-map-btn {
  display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; margin: 0;
  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-form-toolbar .btn.dz-picklist-map-btn .dz-icon { width: 16px; height: 16px; color: #475467; }
.dz-form-toolbar .btn.dz-picklist-map-btn:hover,
.dz-form-toolbar .btn.dz-picklist-map-btn:focus { background: #f8f9fb; border-color: #c2c9d2; color: #101828; }
.dz-form-toolbar .btn.dz-picklist-map-btn:focus-visible { outline: none; box-shadow: var(--dz-focus, 0 0 0 3px #b3e5fc); }
.dark-mode .dz-form-toolbar .btn.dz-picklist-map-btn { background: #343a40; border-color: #50585f; color: #e9ecef; }
.dark-mode .dz-form-toolbar .btn.dz-picklist-map-btn .dz-icon { color: #cdd5df; }

/* Payment Settings layout: the gateway panes sit in a Bootstrap 4 flex `.row.tab-content` without a column class, so
   each `.tab-pane` shrank to its content (1127px in a 1359px row) and left a blank band right of the Instructions
   card. The pane takes the full row; the two 50 % columns then span the page. */
#page.page-PaymentSetting .row.tab-content > .tab-pane { flex: 0 0 100%; max-width: 100%; width: 100%; }
#page.page-PaymentSetting .tab-pane .card { width: 100%; }
/* the "Is Default" / "eCheck/ACH" rows: the checkbox carried `form-control` (a 100 %-wide, 12px-high block) and the
   label its own grid column, so the box floated away from its text. Each row is now  [ ] Label  — an 18px design
   checkbox before its label, both rows on the same left edge. Ids, names and the inputElement class are unchanged. */
#page.page-PaymentSetting .tab-pane .form-group.row:has(> * > input[type="checkbox"].inputElement) {
  display: flex; align-items: center; flex-wrap: nowrap; gap: 10px; margin: 4px 0 14px; padding: 0;
}
#page.page-PaymentSetting .tab-pane .form-group.row:has(> * > input[type="checkbox"].inputElement) > label {
  order: 2; flex: 0 0 auto; width: auto !important; max-width: none; margin: 0; padding: 0; font-weight: 600; color: #101828; cursor: default; line-height: 1.3;
}
#page.page-PaymentSetting .tab-pane .form-group.row:has(> * > input[type="checkbox"].inputElement) > .input-group,
#page.page-PaymentSetting .tab-pane .form-group.row:has(> * > input[type="checkbox"].inputElement) > div[class*="col-"] {
  order: 1; flex: 0 0 auto; width: auto !important; max-width: none; padding: 0; margin: 0; display: inline-flex; align-items: center;
}
#page.page-PaymentSetting .tab-pane input[type="checkbox"].inputElement {
  -webkit-appearance: none; appearance: none; display: inline-block; position: relative;
  width: 18px; height: 18px; min-height: 0; margin: 0; padding: 0; border: 2px solid #c2c9d2; border-radius: 4px;
  background: #fff; box-shadow: none; cursor: pointer; transition: background-color .15s ease, border-color .15s ease;
}
#page.page-PaymentSetting .tab-pane input[type="checkbox"].inputElement:hover { border-color: #98a2b3; }
#page.page-PaymentSetting .tab-pane input[type="checkbox"].inputElement:checked { background: var(--dz-accent, #008ce0); border-color: var(--dz-accent, #008ce0); }
#page.page-PaymentSetting .tab-pane input[type="checkbox"].inputElement:checked::after {
  content: ''; position: absolute; left: 4px; top: 0; width: 6px; height: 11px;
  border: solid var(--dz-accent-fg, #fff); border-width: 0 2px 2px 0; transform: rotate(45deg);
}
#page.page-PaymentSetting .tab-pane input[type="checkbox"].inputElement:focus-visible { outline: none; box-shadow: var(--dz-focus, 0 0 0 3px #b3e5fc); }
.dark-mode #page.page-PaymentSetting .tab-pane .form-group.row:has(> * > input[type="checkbox"].inputElement) > label { color: #e9ecef; }
.dark-mode #page.page-PaymentSetting .tab-pane input[type="checkbox"].inputElement { background: #343a40; border-color: #50585f; }

/* ---- date / datetime / time fields (uitypes Date.tpl, DateTime.tpl, Time.tpl; the detail inline editor wraps the same
   input in `.referencefield-wrapper > .input-group.date`): input + picker addon as ONE rounded
   control — 8px corners, the addon a filled tile (tenant primary, white icon) flush on the input's right edge. Same
   markup on the edit page, quick create and the detail-view inline editor. In the inline editor Detail.js adds
   `form-control` to the whole group, which gave the GROUP its own border, padding and 38px height — neutralised. */
.input-group:has(> .dateField, > .dateTimeField, > .timeField):has(> .input-group-addon) {
  display: flex; flex-wrap: nowrap; align-items: stretch; width: 100%; min-width: 0;
  padding: 0 !important; border: 0 !important; height: auto !important; background: transparent !important; box-shadow: none !important;
}
.input-group:has(> .dateField, > .dateTimeField, > .timeField):has(> .input-group-addon) > .dateField.form-control,
.input-group:has(> .dateField, > .dateTimeField, > .timeField):has(> .input-group-addon) > .dateTimeField.form-control,
.input-group:has(> .dateField, > .dateTimeField, > .timeField):has(> .input-group-addon) > .timeField.form-control {
  flex: 1 1 auto; min-width: 0; width: 1%; height: 38px; padding: 0 12px;
  border: 1px solid #d0d5dd; border-right: 0; border-radius: 8px 0 0 8px !important; box-shadow: none; font-size: 14px; color: #101828;
}
.input-group:has(> .dateField, > .dateTimeField, > .timeField):has(> .input-group-addon) > .dateField.form-control:focus,
.input-group:has(> .dateField, > .dateTimeField, > .timeField):has(> .input-group-addon) > .dateTimeField.form-control:focus,
.input-group:has(> .dateField, > .dateTimeField, > .timeField):has(> .input-group-addon) > .timeField.form-control:focus { border-color: var(--dz-accent, #008ce0); box-shadow: var(--dz-focus, 0 0 0 3px #b3e5fc); outline: none; z-index: 1; }
/* the addon: common.css squares it in detail views (`.detailview-table .input-group-addon { border-radius:0 !important }`)
   and pads it for a glyph; ThemeStyle keeps painting the tenant primary background / font colour */
.input-group:has(> .dateField, > .dateTimeField, > .timeField):has(> .input-group-addon) > .input-group-addon {
  display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto;
  width: 40px !important; min-width: 40px; height: 38px; margin: 0; padding: 0 !important;
  border: 0 !important; border-radius: 0 8px 8px 0 !important; cursor: pointer; line-height: 1;
}
.input-group:has(> .dateField, > .dateTimeField, > .timeField):has(> .input-group-addon) > .input-group-addon .dz-icon { width: 16px; height: 16px; }
/* inline editor (detail view): the field takes the room it has. The row is a wrapping flex line: the date group grows
   from a 200px minimum, the Save / Cancel tiles keep their size; while both fit, they share the line and the input is
   wide — in a narrow cell the tiles drop to a second line and the input spans the full width (Sandeep 2026-09-14). */
.input-group.editElement { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; width: 100%; }
/* the detail-view editor wraps the date group in `.referencefield-wrapper`, which common.css sizes to 66 % / 77 % per
   breakpoint (`.edit .referencefield-wrapper`) — hence width !important; the edit page has the group as direct child */
.input-group.editElement > .referencefield-wrapper:has(.dateField, .dateTimeField, .timeField),
.input-group.editElement > .input-group:has(> .dateField, > .dateTimeField, > .timeField):has(> .input-group-addon) { flex: 1 1 200px; width: auto !important; min-width: 0; }
.input-group.editElement > .referencefield-wrapper > .input-group:has(> .dateField, > .dateTimeField, > .timeField):has(> .input-group-addon) { width: 100%; }
.input-group.editElement > .input-save-wrap { flex: 0 0 auto; margin: 0; }
.dark-mode .input-group:has(> .dateField, > .dateTimeField, > .timeField):has(> .input-group-addon) > .dateField.form-control,
.dark-mode .input-group:has(> .dateField, > .dateTimeField, > .timeField):has(> .input-group-addon) > .dateTimeField.form-control,
.dark-mode .input-group:has(> .dateField, > .dateTimeField, > .timeField):has(> .input-group-addon) > .timeField.form-control { background: #343a40; border-color: #50585f; color: #e9ecef; }

/* ---- PAA edit / standalone page (PreAssessments/partials/EditViewContents.tpl): module-table block headers ---------
   "Treatment History", "Substances of Abuse", "Medication", "Related Contacts", "Insurance Policies" and the custom
   module-table blocks put their "+ Add …" button inside the blue h4 with `pull-right` / `float-right`; neither floats
   in this layout, so the button sat glued to the title (Sandeep 2026-09-14, sandbox standalone PAA). The header is a
   flex row: title left, button at the right edge, as an outline tile on the bar. Ids, hrefs and handlers unchanged. */
.fieldBlockContainer > h4.fieldBlockHeader:has(> .btn) {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-right: 10px !important;
}
.fieldBlockContainer > h4.fieldBlockHeader:has(> .btn) > .btn {
  float: none !important; margin: 0 0 0 auto !important; display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, .7) !important; border-radius: 8px; background: #fff !important; color: #101828 !important;
  font-size: 13px; font-weight: 600; line-height: 1; box-shadow: none; white-space: nowrap; text-transform: none;
}
/* (!important: ThemeStyle paints .btn-primary / .btn-default with the tenant colours !important — a primary button on
   the primary-coloured bar would vanish) */
.fieldBlockContainer > h4.fieldBlockHeader:has(> .btn) > .btn:hover { background: #f8f9fb !important; color: #101828 !important; }
.fieldBlockContainer > h4.fieldBlockHeader:has(> .btn) > .btn .dz-icon { width: 16px; height: 16px; }
.fieldBlockContainer > h4.fieldBlockHeader:has(> .btn) > .btn .hidden-sm.hidden-xs { display: inline !important; }
@media (max-width: 767.98px) { .fieldBlockContainer > h4.fieldBlockHeader:has(> .btn) > .btn .hidden-sm.hidden-xs { display: none !important; } }

/* ---- Settings → Customer Portal (Settings/CustomerPortal/Index.tpl) and RsPortal (Settings/RsPortal/Index.tpl) ------
   Every row is a `.form-group` (inside a `.row.input-group`, a `section.row`, or straight in the form) holding
   `label.control-label.pull-left + div.pull-left`; with no float the
   label and its control stacked and the control rendered first, labels ended up right of the fields and the info
   addons stretched to full width (common.css `#customerPortalForm .input-group-addon { width:100% }`). Each row is a
   flex line again: label left (fixed column), control right; the theme block keeps its two settings per row. */
#customerPortalAccordion form .form-group:has(> label.control-label),
#RsPortalForm .form-group:has(> label.control-label) {
  display: flex; align-items: center; flex-wrap: nowrap; gap: 16px; float: none !important; margin: 0 0 14px; min-width: 0;
}
#customerPortalAccordion form .form-group:has(> label.control-label) > label.control-label,
#RsPortalForm .form-group:has(> label.control-label) > label.control-label {
  order: 1; flex: 0 0 220px; max-width: 220px; width: auto; margin: 0; padding: 0; float: none !important;
  text-align: left; font-weight: 600; font-size: 13px; color: #101828; line-height: 1.3;
}
#customerPortalAccordion form .form-group:has(> label.control-label) > label.control-label + div,
#RsPortalForm .form-group:has(> label.control-label) > label.control-label + div {
  order: 2; flex: 1 1 auto; min-width: 0; max-width: 340px; width: auto; float: none !important; padding: 0; margin: 0;
  display: flex; align-items: center; flex-wrap: nowrap;   /* 340px: compact controls, as the previous layout had */
}
/* "Portal Menu" (col-sm-3) beside "Portal Home Layout" (col-sm-9): both columns carry `pull-left` inside a plain block
   (`.overrow` on RsPortal, a bare div on Customer Portal), so they stacked; that wrapper is a flex row again */
#customerPortalAccordion div:has(> .col-sm-3.pull-left + .col-sm-9.portal-dashboard),
#RsPortalForm div:has(> .col-sm-3.pull-left + .col-sm-9.portal-dashboard) { display: flex; align-items: flex-start; flex-wrap: nowrap; }
#customerPortalAccordion div:has(> .col-sm-3.pull-left + .col-sm-9.portal-dashboard) > .pull-left,
#RsPortalForm div:has(> .col-sm-3.pull-left + .col-sm-9.portal-dashboard) > .pull-left { float: none !important; min-width: 0; }
#customerPortalAccordion div:has(> .col-sm-3.pull-left + .col-sm-9.portal-dashboard) > .col-sm-3.pull-left,
#RsPortalForm div:has(> .col-sm-3.pull-left + .col-sm-9.portal-dashboard) > .col-sm-3.pull-left { flex: 0 0 25%; max-width: 25%; }
#customerPortalAccordion div:has(> .col-sm-3.pull-left + .col-sm-9.portal-dashboard) > .col-sm-9.pull-left,
#RsPortalForm div:has(> .col-sm-3.pull-left + .col-sm-9.portal-dashboard) > .col-sm-9.pull-left { flex: 0 0 75%; max-width: 75%; }
@media (max-width: 767.98px) {
  #customerPortalAccordion div:has(> .col-sm-3.pull-left + .col-sm-9.portal-dashboard),
  #RsPortalForm div:has(> .col-sm-3.pull-left + .col-sm-9.portal-dashboard) { flex-wrap: wrap; }
  #customerPortalAccordion div:has(> .col-sm-3.pull-left + .col-sm-9.portal-dashboard) > .pull-left,
  #RsPortalForm div:has(> .col-sm-3.pull-left + .col-sm-9.portal-dashboard) > .pull-left { flex: 0 0 100%; max-width: 100%; }
}
/* theme block: two settings per row (form-group col-sm-6) — a narrower label column, swatch beside it */
#customerPortalAccordion form .form-group.col-sm-6:has(> label.control-label) > label.control-label { flex: 0 0 180px; max-width: 180px; }
#customerPortalAccordion form .form-group.col-sm-6:has(> label.control-label) > label.control-label + div { max-width: 260px; }
#customerPortalAccordion input[type="color"].form-control { width: 72px; height: 38px; padding: 3px 4px; flex: 0 0 auto; cursor: pointer; }
/* the select2 / link takes the row, the info addon is a compact tile on its right */
#customerPortalAccordion form .form-group:has(> label.control-label) .select2-container,
#RsPortalForm .form-group:has(> label.control-label) .select2-container { flex: 1 1 auto; min-width: 0; width: auto !important; }
#customerPortalAccordion form .form-group:has(> label.control-label) a.help-inline,
#RsPortalForm .form-group:has(> label.control-label) a.help-inline {
  float: none !important; flex: 0 1 auto; min-width: 0; height: 38px; display: inline-flex; align-items: center; padding: 0 12px;
  border: 1px solid #d0d5dd; border-right: 0; border-radius: 8px 0 0 8px; background: #f8f9fb; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
#customerPortalAccordion form .form-group:has(> label.control-label) .input-group-addon.input-select-addon,
#RsPortalForm .form-group:has(> label.control-label) .input-group-addon.input-select-addon {
  float: none !important; flex: 0 0 auto; width: auto !important; min-width: 38px; height: 38px; margin: 0; padding: 0 10px !important;
  display: inline-flex; align-items: center; justify-content: center; border: 0 !important; border-radius: 0 8px 8px 0 !important;
}
#customerPortalAccordion form .form-group:has(> label.control-label) .input-group-addon.input-select-addon .dz-icon,
#RsPortalForm .form-group:has(> label.control-label) .input-group-addon.input-select-addon .dz-icon { width: 16px; height: 16px; }
/* RsPortal → Portal Fields And Privileges (PortalFields.tpl, loaded by Ajax into the layout column): the "Select View"
   row sits in a half-width block, so the label column is shorter and the picklist keeps a readable width */
#RsPortalForm .setFieldForBlock .form-group:has(> label.control-label) > label.control-label,
#customerPortalAccordion .setFieldForBlock .form-group:has(> label.control-label) > label.control-label { flex: 0 0 110px; max-width: 110px; }
#RsPortalForm .setFieldForBlock .form-group:has(> label.control-label) .select2-container,
#customerPortalAccordion .setFieldForBlock .form-group:has(> label.control-label) .select2-container { min-width: 160px; }
#RsPortalForm .setFieldForBlock .form-group:has(> label.control-label) > label.control-label + div,
#customerPortalAccordion .setFieldForBlock .form-group:has(> label.control-label) > label.control-label + div { max-width: none; }
/* the save row has no label: keep its button centred */
#customerPortalAccordion form .form-group.text-center,
#RsPortalForm .form-group.text-center { display: flex; justify-content: center; }
@media (max-width: 767.98px) {
  #customerPortalAccordion form .form-group:has(> label.control-label),
  #RsPortalForm .form-group:has(> label.control-label) { flex-wrap: wrap; gap: 6px; }
  #customerPortalAccordion form .form-group:has(> label.control-label) > label.control-label,
  #RsPortalForm .form-group:has(> label.control-label) > label.control-label { flex: 0 0 100%; max-width: 100%; }
}

/* ---- picklists with the "add value" addon (uitypes Picklist.tpl / MultiPicklist.tpl: `.input-group > select.select2 +
   span.createPicklistRecord`): select2 replaces the select with a container that is not a .form-control, so Bootstrap's
   wrapping input-group let its 100 % width push the "+" onto a second line (Sandeep 2026-09-14, "Select Module Type For
   Lead"). One line: the select2 grows, the addon is a 38px tile attached on its right. */
.input-group:has(> .createPicklistRecord) { flex-wrap: nowrap; align-items: stretch; }
.input-group:has(> .createPicklistRecord) > .select2-container { flex: 1 1 auto; min-width: 0; width: auto !important; }
.input-group:has(> .createPicklistRecord) > .select2-container .select2-choice,
.input-group:has(> .createPicklistRecord) > .select2-container .select2-choices { border-radius: 8px 0 0 8px; }
/* the addon stretches to whatever height the select2 renders at (30px in popups, 38px on design forms) */
.input-group:has(> .createPicklistRecord) > .createPicklistRecord {
  display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; align-self: stretch; width: 40px; min-width: 40px; height: auto;
  margin: 0; padding: 0 !important; border: 0 !important; border-radius: 0 8px 8px 0 !important; line-height: 1;
}
.input-group:has(> .createPicklistRecord) > .createPicklistRecord .dz-icon { width: 16px; height: 16px; }

/* ---- record Updates tab (AdminLTE timeline, RecentActivities.tpl / ViewUserUpdationHistory.tpl) ----------------
   adminlte.css draws the round badge on the line with `.timeline > div > .fa / .fas / … / .ion` — icon-font classes.
   The Lucide <svg> matched none of them, so the icon collapsed to a bare 1.25em glyph hugging the line
   (Sandeep 2026-09-11). Same badge geometry as AdminLTE (30px circle, left 18px); the bg-* class supplies the colour
   and the white glyph. The non-comment relation rows wrap the icon in <i class="update_image bg-*"> — same badge. */
.timeline > div > svg.dz-icon,
.timeline > div > i.update_image {
  position: absolute;
  top: 0;
  left: 18px;
  width: 30px;
  height: 30px;
  padding: 7px;
  border-radius: 50%;
  background-color: #adb5bd;
  color: #fff;
  box-sizing: border-box;
  font-size: 16px;
  line-height: 1;
  text-align: center;
}
.timeline > div > i.update_image { display: inline-flex; align-items: center; justify-content: center; font-style: normal; }
.timeline > div > i.update_image > svg.dz-icon { width: 16px; height: 16px; flex: none; }

/* ---- detail view related lists (Documents, Activities, …) — CRM-3874 follow-up, 2026-09-11 ------------------
   Header cells wrapped onto two or three lines ("Folder Name", "Document No"), so the filter row underneath no
   longer lined up with them: the template's `nowrap` class is not defined anywhere. Same header treatment as the
   module lists (listview-design.css) — one line, vertically centred, controls filling their cell. */
.relatedContents #listview-table > thead > tr.listViewHeaders > th {
  height: 48px;
  padding: 0 16px;
  vertical-align: middle;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 600;
  color: #5a6a7a;
}
.relatedContents #listview-table > thead > tr.listViewHeaders > th a.listViewContentHeaderValues,
.relatedContents #listview-table > thead > tr.listViewHeaders > th a.noSorting {
  display: inline-flex; align-items: center; gap: 6px; color: inherit; white-space: nowrap; filter: none !important;
}
.relatedContents #listview-table > thead > tr.listViewHeaders > th a.listViewContentHeaderValues .dz-icon { width: 16px; height: 16px; color: #8899aa; flex: none; }
.relatedContents #listview-table > thead > tr.searchRow > th { padding: 8px; vertical-align: middle; white-space: nowrap; }
.relatedContents #listview-table > thead > tr.searchRow > th:not(.inline-search-btn) input.form-control,
.relatedContents #listview-table > thead > tr.searchRow > th:not(.inline-search-btn) .form-control,
.relatedContents #listview-table > thead > tr.searchRow > th:not(.inline-search-btn) .select2-container { width: 100% !important; min-width: 96px; }
.relatedContents #listview-table > thead > tr.searchRow > th.inline-search-btn { white-space: nowrap; }
.relatedContents #listview-table > thead > tr.searchRow > th.inline-search-btn .btn { vertical-align: middle; }
.dark-mode .relatedContents #listview-table > thead > tr.listViewHeaders > th { color: #aab4be; }
/* row action cluster (checkbox, edit, open, unlink, preview, download): one line — the inline 120px cell width
   pushed the last icon onto a second row */
.relatedContents #listview-table > tbody > tr.listViewEntries > td:first-child { min-width: 168px; white-space: nowrap; vertical-align: middle; }
.relatedContents #listview-table > tbody > tr.listViewEntries > td:first-child > .actionImages { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.relatedContents #listview-table > tbody > tr.listViewEntries > td:first-child > .actionImages > a { display: inline-flex; align-items: center; }
.relatedContents #listview-table > tbody > tr.listViewEntries > td:first-child > .actionImages .dz-icon { width: 16px; height: 16px; }

/* Documents tab "Roll up" switch: a right-aligned row above the toolbar (was a floatless .pull-right on the left) */
.relatedContainer .dz-related-rollup {
  display: flex; justify-content: flex-end; align-items: center; gap: 8px; padding: 6px 20px 0 0; margin-bottom: 4px;
}
.relatedContainer .dz-related-rollup .dz-related-rollup-label { font-size: 13px; font-weight: 600; color: #344054; }
.relatedContainer .dz-related-rollup > .dz-icon { color: #667085; }
.relatedContainer .dz-related-rollup .bootstrap-switch { margin: 0; }
.dark-mode .relatedContainer .dz-related-rollup .dz-related-rollup-label { color: #cdd5df; }

/* Comments panel composer footer (ShowAllComments.tpl, the ModComments related tab). The two halves were laid out
   with `pull-right` (Post / Cancel, first in the DOM) and `pull-left` (Attach Files) — but this layout gives those
   helpers no float (both measured `float: none`), and `col-xs-*` does not exist in Bootstrap 4, so neither half got
   a width either. Both collapsed into full-width blocks stacked at the left edge: Post / Cancel on one line, Attach
   Files on the next. One row again, with the attachment keeping the left edge it already had and the actions moved
   to the right. Scoped to the related panel so the narrow Summary-tab widget (RecentComments.tpl, which right-aligns
   with its own inline style) is untouched. */
.commentsRelatedContainer .addCommentBlock > .form-group {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 0;
}
.commentsRelatedContainer .addCommentBlock > .form-group > .pull-left {
  order: 1; flex: 1 1 auto; width: auto; max-width: none; min-width: 0; padding: 0; margin: 0;
}
.commentsRelatedContainer .addCommentBlock > .form-group > .pull-right {
  order: 2; flex: 0 0 auto; width: auto; max-width: none; padding: 0; margin: 0 0 0 auto; text-align: right;
}
/* the actions sit in a nested floatless .pull-right; keep them on one line at the right edge */
.commentsRelatedContainer .addCommentBlock > .form-group > .pull-right > .pull-right {
  display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 8px;
}
.commentsRelatedContainer .addCommentBlock > .form-group > .pull-right > .pull-right > .ml-2 { margin-left: 0 !important; }
/* phones: actions drop under the attachment rather than squeezing beside it */
@media (max-width: 575.98px) {
  .commentsRelatedContainer .addCommentBlock > .form-group > .pull-left,
  .commentsRelatedContainer .addCommentBlock > .form-group > .pull-right { flex: 1 1 100%; margin-left: 0; }
}

/* ==========================================================================
   Settings → Company Details (Settings/Vtiger/CompanyDetails.tpl) — Sandeep 2026-09-23
   The read view and the edit form are the same page; both render section cards
   (Branding, Company Information, Lead Conversion, CRM Behaviour, Feature Settings)
   whose rows are a label column + a value column. Before: `.form-horizontal`
   labels with `pull-left` (no float here) stacked above 700px inputs, the two
   lead-type rows left a 250px blank band while hidden, and the logos sat beside a
   bare `x` with a <hr>. Visual only — every name / id / js-* hook is unchanged.
   ========================================================================== */
/* full pane width (Sandeep 2026-09-23: no blank band when the settings menu is collapsed); the label column is fixed,
   the value column takes the rest, form controls stop growing at --dz-cd-value-w */
.dz-company-details { --dz-cd-label-w: 300px; --dz-cd-value-w: 720px; width: 100%; max-width: none; }
/* right padding keeps Edit clear of the floating settings-menu toggle pinned to the pane's right edge */
.dz-company-details .dz-cd-toolbar { display: flex; justify-content: flex-end; align-items: center; gap: 8px; margin: 0 0 14px; padding-right: 56px; }
.dz-company-details .dz-cd-toolbar .editbutton-container { float: none !important; display: inline-flex; }
.dz-company-details .dz-cd-toolbar.hide,
.dz-company-details #updateCompanyDetails.hide { display: none !important; }

/* outline button: the design's secondary button (same as the Edit buttons on the other settings pages) */
.dz-company-details .btn.dz-cd-btn-outline {
  display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; margin: 0;
  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-decoration: none;
}
.dz-company-details .btn.dz-cd-btn-outline:hover,
.dz-company-details .btn.dz-cd-btn-outline:focus { background: #f8f9fb; border-color: #c2c9d2; color: #101828; text-decoration: none; }
.dz-company-details .btn.dz-cd-btn-outline:focus-visible { outline: none; box-shadow: var(--dz-focus, 0 0 0 3px #b3e5fc); }
.dz-company-details .btn.dz-cd-btn-outline .dz-icon { width: 16px; height: 16px; color: #475467; }

/* ---- cards ---- */
.dz-company-details .dz-cd-card {
  background: #fff; border: 1px solid #dde2e7; border-radius: 12px; margin: 0 0 16px; overflow: hidden;
  box-shadow: 0 1px 3px rgba(31, 42, 54, .10), 0 1px 2px rgba(31, 42, 54, .06);
}
.dz-company-details .dz-cd-card-head {
  display: flex; align-items: center; gap: 12px; padding: 14px 20px; border-bottom: 1px solid #eef1f4; background: #fafbfc;
}
.dz-company-details .dz-cd-card-icon {
  display: inline-flex; align-items: center; justify-content: center; flex: none; width: 36px; height: 36px; border-radius: 8px;
  background: var(--dz-accent-soft, #e1f3fc); color: var(--dz-accent, #008ce0);
}
.dz-company-details .dz-cd-card-icon .dz-icon { width: 18px; height: 18px; }
.dz-company-details .dz-cd-card-heading { min-width: 0; }
.dz-company-details .dz-cd-card-title { margin: 0; padding: 0; font-size: 16px; font-weight: 700; line-height: 1.3; color: #1f2a36; }
.dz-company-details .dz-cd-card-hint { margin: 2px 0 0; font-size: 12px; color: #5a6a7a; line-height: 1.4; }
.dz-company-details .dz-cd-card-body { padding: 4px 20px 8px; }
/* sub-heading inside a card (Business Hours) */
.dz-company-details .dz-cd-subhead {
  display: flex; align-items: center; gap: 8px; margin: 18px 0 4px; padding: 0 0 8px; border-bottom: 1px solid #eef1f4;
  font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #5a6a7a;
}
.dz-company-details .dz-cd-subhead .dz-icon { width: 14px; height: 14px; color: #8899aa; }

/* ---- rows: label column | value column ---- */
.dz-company-details .dz-cd-row {
  display: grid; grid-template-columns: var(--dz-cd-label-w) minmax(0, 1fr); align-items: center; column-gap: 24px;
  padding: 12px 0; margin: 0 !important; border-bottom: 1px solid #f1f3f6; float: none !important; width: auto;
}
.dz-company-details .dz-cd-row:last-child { border-bottom: 0; }
.dz-company-details .dz-cd-row--top { align-items: start; }
.dz-company-details .dz-cd-row--top > .dz-cd-label { padding-top: 9px; }
.dz-company-details .dz-cd-row--compact { padding: 8px 0; }
.dz-company-details .dz-cd-label {
  margin: 0; padding: 0; float: none !important; width: auto !important; max-width: none; text-align: left; white-space: normal;
  font-size: 13px; font-weight: 600; line-height: 1.4; color: #344054;
}
.dz-company-details .dz-cd-label .redColor { color: #d32f2f; }
.dz-company-details .dz-cd-value {
  min-width: 0; margin: 0; padding: 0; float: none !important; width: auto !important; max-width: none;
  font-size: 14px; line-height: 1.5; color: #101828; word-wrap: break-word; overflow-wrap: anywhere;
}
/* read-view text runs the full column; edit controls stop at a readable width */
.dz-company-details .dz-cd-form .dz-cd-value:not(.dz-cd-value--wide) { max-width: var(--dz-cd-value-w); }
.dz-company-details .dz-cd-value--wide { max-width: none; }
.dz-company-details .dz-cd-muted { color: #5a6a7a; margin-left: 6px; }
.dz-company-details .dz-cd-help { display: block; margin: 6px 0 0; font-size: 12px; line-height: 1.4; color: #5a6a7a; }

/* read-view value badges */
.dz-company-details .dz-cd-pill {
  display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: 999px;
  background: #f0f2f5; color: #475467; font-size: 12px; font-weight: 600; line-height: 1; vertical-align: middle;
}
.dz-company-details .dz-cd-pill--on { background: #e6f4ec; color: #1e7a45; }
.dz-company-details .dz-cd-chip {
  display: inline-flex; align-items: center; height: 24px; padding: 0 9px; margin: 2px 6px 2px 0; border-radius: 6px;
  background: #e1f3fc; color: #065586; font-size: 12px; font-weight: 600; line-height: 1;
}
.dz-company-details .dz-cd-bh-range { margin-left: 10px; font-variant-numeric: tabular-nums; color: #344054; }

/* ---- logos ---- */
.dz-company-details .dz-cd-logos { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 20px; padding: 18px 20px 20px; }
.dz-company-details .dz-cd-logo-tile { min-width: 0; }
.dz-company-details .dz-cd-logo-tile > .dz-cd-label { margin-bottom: 8px; }
.dz-company-details .dz-cd-logo-preview {
  position: relative; display: flex; align-items: center; justify-content: center; min-height: 96px; padding: 16px 40px 16px 16px;
  border: 1px dashed #d0d5dd; border-radius: 8px; background: #fafbfc;
}
.dz-company-details .dz-cd-logo-preview--mini { padding: 16px 40px 16px 16px; }
.dz-company-details .dz-cd-logo-img { display: block; max-width: 100%; max-height: 72px; width: auto; height: auto; object-fit: contain; }
.dz-company-details .dz-cd-logo-img--mini { max-width: 40px; max-height: 40px; }
.dz-company-details .dz-cd-empty { font-size: 13px; color: #5a6a7a; text-align: center; }
/* the remove button (was a bare "x"): a quiet round icon tile in the corner of the preview */
.dz-company-details .dz-cd-logo-remove,
.dz-company-details .dz-cd-logo-remove.remove_logo {
  position: absolute; top: 8px; right: 8px; display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; padding: 0; margin: 0; border: 1px solid #d0d5dd; border-radius: 50%; background: #fff; color: #475467;
  cursor: pointer; line-height: 1; box-shadow: 0 1px 2px rgba(16, 24, 40, .08);
}
.dz-company-details .dz-cd-logo-remove:hover { background: #fdecea; border-color: #f2b8b5; color: #d32f2f; }
.dz-company-details .dz-cd-logo-remove .dz-icon { width: 14px; height: 14px; }
/* legacy skin rules for .companydetailsedit .company-logo-content (hr / img) do not apply here */
.dz-company-details .companydetailsedit .company-logo-content { border: 0; padding: 0; margin: 0; }
/* native file input: the browser keeps the "No file chosen" state (validation resets it), only the button is styled */
.dz-company-details input[type="file"].dz-cd-file { display: block; width: 100%; margin: 10px 0 0; font-size: 13px; color: #5a6a7a; }
.dz-company-details input[type="file"].dz-cd-file::file-selector-button {
  height: 32px; padding: 0 12px; margin-right: 10px; border: 1px solid #d0d5dd; border-radius: 8px; background: #fff; color: #101828;
  font-size: 13px; font-weight: 600; font-family: inherit; cursor: pointer;
}
.dz-company-details input[type="file"].dz-cd-file::file-selector-button:hover { background: #f8f9fb; border-color: #c2c9d2; }

/* ---- edit form controls ---- */
.dz-company-details .dz-cd-form .form-control,
.dz-company-details .dz-cd-form input[type="text"].inputElement,
.dz-company-details .dz-cd-form input[type="number"] {
  height: 38px; padding: 0 12px; border: 1px solid #d0d5dd; border-radius: 8px; background: #fff; box-shadow: none;
  font-size: 14px; color: #101828; width: 100%;
}
.dz-company-details .dz-cd-form textarea.form-control { height: auto; min-height: 64px; padding: 8px 12px; line-height: 1.5; }
.dz-company-details .dz-cd-form .form-control:focus,
.dz-company-details .dz-cd-form input[type="text"].inputElement:focus { border-color: var(--dz-accent, #008ce0); box-shadow: var(--dz-focus, 0 0 0 3px #b3e5fc); outline: none; }
.dz-company-details .dz-cd-form .form-control[readonly] { background: #f8f9fb; }
.dz-company-details .dz-cd-form .dz-cd-input--short { max-width: 160px; }
/* select2 (v3) as the same 38px rounded control */
.dz-company-details .dz-cd-form .select2-container { width: 100% !important; }
/* select2 copies the source <select>'s classes onto its container, so the multi-picklist container
   (`select.form-control.select2`) picked up the .form-control box too — a border around a border.
   The container is a plain wrapper; the .select2-choices box is the control. */
.dz-company-details .dz-cd-form .select2-container.form-control,
.dz-company-details .dz-cd-form .select2-container-multi.form-control {
  height: auto; min-height: 0; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none;
}
.dz-company-details .dz-cd-form .select2-container .select2-choice,
.dz-company-details .dz-cd-form .select2-container-multi .select2-choices {
  min-height: 38px; height: auto; padding-left: 12px; border: 1px solid #d0d5dd; border-radius: 8px; background: #fff; box-shadow: none;
  font-size: 14px; color: #101828; line-height: 1.4;
}
/* a long value wraps; 8 + 19.6 + 8 + borders keeps the single line at 38px */
.dz-company-details .dz-cd-form .select2-container .select2-choice .select2-chosen { padding-top: 8px; padding-bottom: 8px; }
.dz-company-details .dz-cd-form .select2-container .select2-choice .select2-arrow { border-left: 0; background: transparent; border-radius: 0 8px 8px 0; }
.dz-company-details .dz-cd-form .select2-container-multi .select2-choices { padding: 3px 6px; line-height: normal; }
.dz-company-details .dz-cd-form .select2-container-multi .select2-choices .select2-search-choice { margin: 3px 4px 3px 0; padding: 3px 8px 3px 22px; border-radius: 6px; background: #e1f3fc; border-color: #b3e5fc; color: #065586; box-shadow: none; }
.dz-company-details .dz-cd-form .select2-container-active .select2-choice,
.dz-company-details .dz-cd-form .select2-container-multi.select2-container-active .select2-choices { border-color: var(--dz-accent, #008ce0); box-shadow: var(--dz-focus, 0 0 0 3px #b3e5fc); }
/* checkboxes (the Business Hours switches keep their Bootstrap 4 custom-switch look) */
.dz-company-details .dz-cd-form input[type="checkbox"]:not(.custom-control-input) {
  -webkit-appearance: none; appearance: none; display: inline-block; position: relative; vertical-align: middle;
  width: 20px; height: 20px; min-height: 0; margin: 0; padding: 0; border: 2px solid #c2c9d2; border-radius: 4px; background: #fff;
  box-shadow: none; cursor: pointer; flex: none; transition: background-color .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.dz-company-details .dz-cd-form input[type="checkbox"]:not(.custom-control-input):hover { border-color: #98a2b3; }
.dz-company-details .dz-cd-form input[type="checkbox"]:not(.custom-control-input):checked { background: var(--dz-accent, #008ce0); border-color: var(--dz-accent, #008ce0); }
.dz-company-details .dz-cd-form input[type="checkbox"]:not(.custom-control-input):checked::after {
  content: ''; position: absolute; left: 5px; top: 1px; width: 6px; height: 11px;
  border: solid var(--dz-accent-fg, #fff); border-width: 0 2px 2px 0; transform: rotate(45deg);
}
.dz-company-details .dz-cd-form input[type="checkbox"]:not(.custom-control-input):focus-visible { outline: none; box-shadow: var(--dz-focus, 0 0 0 3px #b3e5fc); }
/* a checkbox with its dependent control (No Email placeholder / PAA type) */
.dz-company-details .dz-cd-inline { display: flex; align-items: center; gap: 12px; }
.dz-company-details .dz-cd-inline > input[type="text"].form-control { flex: 1 1 auto; width: auto !important; margin: 0 !important; display: block !important; }
.dz-company-details #redirect_to_after_paa_type_block.dz-cd-dependent { display: block; width: 100%; margin-top: 10px; }
.dz-company-details #nep-validation-error,
.dz-company-details #bh-validation-error { border-radius: 8px; font-size: 13px; padding: 8px 12px; }
/* radios (Business Hours Enabled / Disabled) */
.dz-company-details .dz-cd-radios { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 24px; min-height: 38px; }
.dz-company-details .dz-cd-radio { display: inline-flex; align-items: center; gap: 8px; margin: 0; font-size: 14px; font-weight: 400; color: #101828; cursor: pointer; }
.dz-company-details .dz-cd-radio input[type="radio"] {
  -webkit-appearance: none; appearance: none; width: 20px; height: 20px; margin: 0; padding: 0; position: relative; flex: none;
  border: 2px solid #c2c9d2; border-radius: 50%; background: #fff; cursor: pointer; transition: border-color .15s ease;
}
.dz-company-details .dz-cd-radio input[type="radio"]:hover { border-color: #98a2b3; }
.dz-company-details .dz-cd-radio input[type="radio"]:checked { border-color: var(--dz-accent, #008ce0); }
.dz-company-details .dz-cd-radio input[type="radio"]:checked::after {
  content: ''; position: absolute; left: 3px; top: 3px; width: 10px; height: 10px; border-radius: 50%; background: var(--dz-accent, #008ce0);
}
.dz-company-details .dz-cd-radio input[type="radio"]:focus-visible { outline: none; box-shadow: var(--dz-focus, 0 0 0 3px #b3e5fc); }
/* Business Hours schedule table */
.dz-company-details .dz-cd-bh-wrap { max-width: 640px; border: 1px solid #dde2e7; border-radius: 8px; overflow: hidden; }
.dz-company-details table.dz-cd-bh-table { margin: 0; border: 0; font-size: 13px; }
.dz-company-details table.dz-cd-bh-table > thead > tr > th {
  height: 40px; padding: 0 12px; border: 0; border-bottom: 1px solid #dde2e7; background: #fafbfc; vertical-align: middle;
  font-size: 12px; font-weight: 600; color: #5a6a7a; white-space: nowrap;
}
.dz-company-details table.dz-cd-bh-table > tbody > tr > td { padding: 6px 12px; border: 0; border-top: 1px solid #f1f3f6; vertical-align: middle; }
.dz-company-details table.dz-cd-bh-table > tbody > tr:first-child > td { border-top: 0; }
.dz-company-details table.dz-cd-bh-table > tbody > tr:hover > td { background: #fafbfc; }
.dz-company-details table.dz-cd-bh-table .dz-cd-bh-col-day { width: 120px; }
.dz-company-details table.dz-cd-bh-table .dz-cd-bh-col-status { width: 120px; }
.dz-company-details table.dz-cd-bh-table td strong { font-weight: 600; color: #344054; }
.dz-company-details table.dz-cd-bh-table .custom-switch { min-height: 24px; padding-left: 2.75rem; }
.dz-company-details table.dz-cd-bh-table .custom-control-label { font-size: 13px; color: #475467; padding-top: 1px; cursor: pointer; }
.dz-company-details table.dz-cd-bh-table .custom-control-input:checked ~ .custom-control-label::before { background-color: var(--dz-accent, #008ce0); border-color: var(--dz-accent, #008ce0); }
.dz-company-details table.dz-cd-bh-table input[type="time"].form-control { width: 128px; height: 34px; padding: 0 8px; font-size: 13px; font-variant-numeric: tabular-nums; }
.dz-company-details table.dz-cd-bh-table input[type="time"].form-control:disabled { background: #f4f6f8; color: #aab4be; }
@media (max-width: 430px) {
  .dz-company-details table.dz-cd-bh-table > thead > tr > th,
  .dz-company-details table.dz-cd-bh-table > tbody > tr > td { padding: 4px 5px; }
  .dz-company-details table.dz-cd-bh-table .dz-cd-bh-col-day { width: 86px; }
  .dz-company-details table.dz-cd-bh-table .dz-cd-bh-col-status { width: 84px; }
  .dz-company-details table.dz-cd-bh-table .js-bh-status-label { font-size: 11px; }
  .dz-company-details table.dz-cd-bh-table .custom-switch { padding-left: 2.25rem; }
  .dz-company-details table.dz-cd-bh-table input[type="time"].form-control { width: 74px; font-size: 12px; padding: 2px 3px; }
  .dz-company-details table.dz-cd-bh-table input[type="time"].form-control::-webkit-calendar-picker-indicator { display: none; margin: 0; }
}

/* ---- footer: Cancel · Save at the right edge, a soft bar under the last card ---- */
.dz-company-details .dz-cd-footer {
  display: flex; justify-content: flex-end; align-items: center; gap: 10px; padding: 14px 0 4px; margin-top: 4px;
}
.dz-company-details .dz-cd-footer .btn.saveButton {
  display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 16px; margin: 0; border-radius: 8px;
  font-size: 13px; font-weight: 600; line-height: 1; box-shadow: none;
}
.dz-company-details .dz-cd-footer .btn.saveButton .dz-icon { width: 16px; height: 16px; }
.dz-company-details .dz-cd-footer .btn.saveButton:disabled { opacity: .55; cursor: not-allowed; }

/* ---- narrow screens: label above value ---- */
@media (max-width: 767.98px) {
  .dz-company-details .dz-cd-row { grid-template-columns: minmax(0, 1fr); row-gap: 6px; }
  .dz-company-details .dz-cd-row--top > .dz-cd-label { padding-top: 0; }
  .dz-company-details .dz-cd-value { max-width: none; }
  .dz-company-details .dz-cd-logos { grid-template-columns: minmax(0, 1fr); }
  .dz-company-details .dz-cd-card-head, .dz-company-details .dz-cd-card-body, .dz-company-details .dz-cd-logos { padding-left: 14px; padding-right: 14px; }
}

/* ---- dark mode ---- */
.dark-mode .dz-company-details .dz-cd-card { background: var(--dz-surface, #0f172a); border-color: var(--dz-border, #394451); }
.dark-mode .dz-company-details .dz-cd-card-head { background: rgba(255, 255, 255, .03); border-color: var(--dz-border, #394451); }
.dark-mode .dz-company-details .dz-cd-card-title,
.dark-mode .dz-company-details .dz-cd-value,
.dark-mode .dz-company-details .dz-cd-radio { color: #e9ecef; }
.dark-mode .dz-company-details .dz-cd-label { color: #cdd5df; }
.dark-mode .dz-company-details .dz-cd-row,
.dark-mode .dz-company-details .dz-cd-subhead { border-color: #2d3238; }
.dark-mode .dz-company-details .dz-cd-logo-preview { background: #1b2230; border-color: #50585f; }
.dark-mode .dz-company-details .dz-cd-pill { background: #2d3238; color: #cdd5df; }
.dark-mode .dz-company-details .btn.dz-cd-btn-outline,
.dark-mode .dz-company-details .dz-cd-logo-remove,
.dark-mode .dz-company-details input[type="file"].dz-cd-file::file-selector-button,
.dark-mode .dz-company-details .dz-cd-form .form-control,
.dark-mode .dz-company-details .dz-cd-form input[type="text"].inputElement,
.dark-mode .dz-company-details .dz-cd-form .select2-container .select2-choice,
.dark-mode .dz-company-details .dz-cd-form .select2-container-multi .select2-choices { background: #343a40; border-color: #50585f; color: #e9ecef; }
.dark-mode .dz-company-details .dz-cd-form input[type="checkbox"]:not(.custom-control-input):not(:checked),
.dark-mode .dz-company-details .dz-cd-radio input[type="radio"] { background: #343a40; border-color: #50585f; }
.dark-mode .dz-company-details table.dz-cd-bh-table > thead > tr > th { background: rgba(255, 255, 255, .03); color: #aab4be; border-color: #394451; }
.dark-mode .dz-company-details table.dz-cd-bh-table > tbody > tr > td { border-color: #2d3238; }
.dark-mode .dz-company-details .dz-cd-bh-wrap { border-color: #394451; }

/* CRM-3975 — the radio / checkbox set ("Display As") is styled in common.css, which every
   surface that renders it loads (CRM, customer portal, RS portal, Leads Add). Only the
   Layout Editor dialog row lives here. */
.createCustomFieldForm .displayAsDiv > .controls > .form-group { margin-bottom: 0 !important; }

/* ---- EMR Settings > Kipu "Forms & Evaluations" (SPE-1326): Select Evaluation / Select Consent Forms ---------------
   Both lists were a 320px select2 that stacks every chosen form as its own chip line, so an account with many consent
   forms grew into a column taller than the screen (Kenny, Recovery Unplugged). Emr.js renderFormPicker hides the
   <select multiple> (still the source of truth for Load / Save / Refresh) and draws it as a searchable checklist:
   search, "N of M selected", Select all / Clear, "Selected only", and a scrollable multi-column list. */
.dz-form-picker-wrap { max-width: 1100px; }
.dz-form-picker-title { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 16px; margin-bottom: 8px; }
.dz-form-picker-title > h6 { margin: 0; }
.dz-form-picker-toolbar { display: inline-flex; align-items: center; gap: 8px; }
.dz-form-picker-toolbar > .btn { margin: 0; }
select.dz-form-picker-source { display: none !important; }
.dz-form-picker { border: 1px solid #d0d5dd; border-radius: 8px; background: #fff; overflow: hidden; }
.dz-form-picker-head {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; padding: 8px 10px;
  border-bottom: 1px solid #e4e7ec; background: #f8f9fb;
}
.dz-form-picker-search { flex: 1 1 220px; min-width: 160px; max-width: 360px; margin: 0; }
.dz-form-picker-query {
  width: 100%; height: 32px; padding: 0 10px; border: 1px solid #d0d5dd; border-radius: 6px; background: #fff;
  font-size: 13px; color: #101828; box-shadow: none;
}
.dz-form-picker-query:focus { outline: none; border-color: var(--dz-accent, #008ce0); box-shadow: var(--dz-focus, 0 0 0 3px #b3e5fc); }
.dz-form-picker-count { font-size: 12px; color: #475467; white-space: nowrap; }
.dz-form-picker-count b { color: #101828; }
.dz-form-picker-actions { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; margin-left: auto; }
.dz-form-picker-btn {
  border: 0; background: transparent; padding: 5px 6px; border-radius: 6px; line-height: 1;
  font-size: 12px; font-weight: 600; color: var(--dz-accent, #008ce0); cursor: pointer;
}
.dz-form-picker-btn:hover { background: #e1f3fc; }
.dz-form-picker-btn:focus-visible { outline: none; box-shadow: var(--dz-focus, 0 0 0 3px #b3e5fc); }
.dz-form-picker-only { display: inline-flex; align-items: center; gap: 6px; margin: 0; font-size: 12px; font-weight: 400; color: #475467; cursor: pointer; white-space: nowrap; }
.dz-form-picker-only-box { margin: 0; }
.dz-form-picker-list {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 0 8px; padding: 6px 8px;
  max-height: 320px; overflow-y: auto; overscroll-behavior: contain;
}
.dz-form-picker-item {
  display: flex; align-items: center; gap: 8px; min-height: 32px; min-width: 0; margin: 0; padding: 4px 8px; border-radius: 6px;
  font-size: 13px; font-weight: 400; color: #101828; cursor: pointer;
}
.dz-form-picker-item:hover { background: #f4f6f8; }
.dz-form-picker-item.is-selected { background: #e1f3fc; }
.dz-form-picker-item.is-selected:hover { background: #d2ecfa; }
.dz-form-picker-item.hide, .dz-form-picker-empty.hide { display: none !important; }
/* input[type] on purpose: common.css `input[type="checkbox"] { height: 12px }` outranks a bare class,
   squashing the box to 16x12 and pushing the tick off-centre. */
input[type="checkbox"].dz-form-picker-box {
  -webkit-appearance: none; appearance: none; flex: none; position: relative; width: 16px; height: 16px; margin: 0;
  border: 2px solid #c2c9d2; border-radius: 4px; background: #fff; cursor: pointer; transition: background-color .15s, border-color .15s;
}
/* The states carry the same input[type] prefix: as bare classes they lost to the white
   background above, so a ticked box drew white with a white tick (looked unticked). */
input[type="checkbox"].dz-form-picker-box:hover { border-color: #98a2b3; }
input[type="checkbox"].dz-form-picker-box:checked { background: var(--dz-accent, #008ce0); border-color: var(--dz-accent, #008ce0); }
input[type="checkbox"].dz-form-picker-box:checked::after {
  content: ''; position: absolute; left: 3px; top: 0; width: 5px; height: 9px;
  border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg);
}
input[type="checkbox"].dz-form-picker-box:focus-visible { outline: none; box-shadow: var(--dz-focus, 0 0 0 3px #b3e5fc); }
.dz-form-picker-name { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dz-form-picker-id { flex: none; font-size: 11px; color: #667085; font-variant-numeric: tabular-nums; }
.dz-form-picker-empty { padding: 14px 12px; font-size: 13px; color: #667085; }
.dark-mode .dz-form-picker { background: var(--dz-surface, #0f172a); border-color: var(--dz-border, #394451); }
.dark-mode .dz-form-picker-head { background: var(--dz-bg, #0a1120); border-color: var(--dz-hairline, #23303d); }
.dark-mode .dz-form-picker-query { background: #343a40; border-color: #50585f; color: #e9ecef; }
.dark-mode .dz-form-picker-count, .dark-mode .dz-form-picker-only, .dark-mode .dz-form-picker-empty, .dark-mode .dz-form-picker-id { color: var(--dz-text-2, #aab4be); }
.dark-mode .dz-form-picker-count b, .dark-mode .dz-form-picker-item { color: var(--dz-text, #e8edf2); }
.dark-mode .dz-form-picker-item:hover { background: var(--dz-row-hover, #16202b); }
.dark-mode .dz-form-picker-item.is-selected { background: var(--dz-row-selected, #072d4a); }
.dark-mode .dz-form-picker-btn:hover { background: var(--dz-accent-soft, #072d4a); }
.dark-mode input[type="checkbox"].dz-form-picker-box:not(:checked) { background: #343a40; border-color: #50585f; }

/* ---- "Send Evaluation Forms to Kipu" modal (CRM-3892): PreAssessments/ShowEmrFormModal.tpl, KIPU branch ----------
   Used by the Pre Assessment send and by custom module records (Financial Agreement, ...). What is sent and to which
   Kipu patient on top, one selectable card per form with its mapping state, the "new evaluation every send" note
   below. Detail.js registerKipuFormPicker keeps the count, the selected rows and the send button label in step. */
.dz-kipu-picker { font-size: 14px; color: var(--dz-text, #1f2a36); }
.dz-kipu-picker__context { display: flex; flex-wrap: wrap; gap: 8px 24px; padding: 12px 16px; margin-bottom: 16px;
    background: var(--dz-accent-soft, #e1f3fc); border: 1px solid #b3dcf5; border-radius: 8px; }
.dz-kipu-picker__context-item { display: flex; flex-direction: column; min-width: 0; }
.dz-kipu-picker__context-label { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600;
    text-transform: uppercase; letter-spacing: .03em; color: var(--dz-text-secondary, #5a6a7a); }
.dz-kipu-picker__context-label .dz-icon { width: 14px; height: 14px; }
.dz-kipu-picker__context-value { font-weight: 600; color: var(--dz-text, #1f2a36); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dz-kipu-picker__toolbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; padding: 0 2px; }
.dz-kipu-picker__all { display: inline-flex; align-items: center; gap: 8px; margin: 0; font-weight: 600; cursor: pointer; }
.dz-kipu-picker__count { font-size: 12px; color: var(--dz-text-secondary, #5a6a7a); }
.dz-kipu-picker__count b { color: var(--dz-text, #1f2a36); }
.dz-kipu-picker__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px;
    max-height: 360px; overflow-y: auto; }
.dz-kipu-picker__item { display: flex; align-items: center; gap: 12px; margin: 0; padding: 12px 16px; cursor: pointer;
    background: #fff; border: 1px solid var(--dz-border, #dde2e7); border-radius: 8px;
    transition: border-color .12s ease, background-color .12s ease, box-shadow .12s ease; }
.dz-kipu-picker__item:hover { background: var(--dz-row-hover, #f4f6f8); }
.dz-kipu-picker__item.is-selected { border-color: var(--dz-accent, #008ce0); background: var(--dz-accent-soft, #e1f3fc);
    box-shadow: 0 0 0 1px var(--dz-accent, #008ce0) inset; }
.dz-kipu-picker__item input[type="checkbox"] { flex: 0 0 auto; width: 16px; height: 16px; margin: 0; accent-color: var(--dz-accent, #008ce0); }
.dz-kipu-picker__body { display: flex; flex-direction: column; flex: 1 1 auto; min-width: 0; }
.dz-kipu-picker__name { font-weight: 600; color: var(--dz-text, #1f2a36); }
.dz-kipu-picker__meta { font-size: 12px; color: var(--dz-text-secondary, #5a6a7a); }
.dz-kipu-picker__badge { flex: 0 0 auto; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.dz-kipu-picker__badge.is-success { background: #e6f4ec; color: #237a4b; }
.dz-kipu-picker__badge.is-info { background: #e1f3fc; color: #006cb6; }
.dz-kipu-picker__badge.is-warning { background: #fff8e1; color: #9a6200; }
.dz-kipu-picker__item.is-unmapped .dz-kipu-picker__name { color: var(--dz-text-secondary, #5a6a7a); }
.dz-kipu-picker__note { display: flex; gap: 8px; align-items: flex-start; margin-top: 16px; padding: 10px 12px;
    font-size: 12px; color: var(--dz-text-secondary, #5a6a7a); background: var(--dz-row-hover, #f4f6f8); border-radius: 8px; }
.dz-kipu-picker__note .dz-icon { flex: 0 0 auto; width: 14px; height: 14px; margin-top: 1px; color: var(--dz-accent, #008ce0); }
#sendFormsToKipu { display: inline-flex; align-items: center; gap: 6px; }
#sendFormsToKipu .dz-icon { width: 14px; height: 14px; }
#sendFormsToKipu[disabled] { opacity: .55; cursor: not-allowed; }
.dark-mode .dz-kipu-picker, .dark-mode .dz-kipu-picker__name, .dark-mode .dz-kipu-picker__context-value,
.dark-mode .dz-kipu-picker__count b { color: var(--dz-text, #e8edf2); }
.dark-mode .dz-kipu-picker__context { background: #072d4a; border-color: #0b4a75; }
.dark-mode .dz-kipu-picker__item { background: #343a40; border-color: #50585f; }
.dark-mode .dz-kipu-picker__item:hover { background: var(--dz-row-hover, #16202b); }
.dark-mode .dz-kipu-picker__item.is-selected { background: var(--dz-row-selected, #072d4a); }
.dark-mode .dz-kipu-picker__note { background: #2d3238; }

/* ---- Intake Opportunity > Kipu Consent Forms block header (SPE-1326) ------------------------------------------
   Each consent is a collapsed row inside the block's iframe. The header shows how many are on file and, for two or
   more, an Expand all / Collapse all control; both stay [hidden] until Potentials/resources/Detail.js reads the
   loaded rows. The pill is white with dark text so it reads on any tenant colour of the bar. */
#kipuConsentPane h5 .kipuConsentCount:not([hidden]) {
  display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 20px; padding: 0 7px;
  margin-left: 8px; border-radius: 999px; background: #fff; color: #1f2a36; font-size: 12px; font-weight: 700;
  line-height: 1; vertical-align: middle; box-sizing: border-box;
}
#kipuConsentPane h5 .kipuConsentActions { display: inline-flex; align-items: center; gap: 10px; }
#kipuConsentPane h5 .kipuConsentToggleAll:not([hidden]) {
  display: inline-flex; align-items: center; height: 28px; padding: 0 10px; margin: 0;
  border: 1px solid rgba(255, 255, 255, .7); border-radius: 6px; background: transparent; color: #fff;
  font-size: 12px; font-weight: 600; line-height: 1; cursor: pointer; box-shadow: none;
}
#kipuConsentPane h5 .kipuConsentToggleAll:hover { background: rgba(255, 255, 255, .16); }
#kipuConsentPane h5 .kipuConsentToggleAll:focus-visible { outline: none; box-shadow: 0 0 0 3px #b3e5fc; }
/* CRM-4103 - EMR Settings > Kipu: summary fields, rows of [form][labels][+][delete] (Emr.js draws them). */
.consentSummaryFields {
  display: flex; flex-direction: column; gap: 8px; padding: 10px 12px;
  border: 1px solid #d0d5dd; border-radius: 8px; background: #fff;
}
.consentSummaryFieldRow { display: grid; grid-template-columns: minmax(200px, 340px) minmax(0, 1fr) auto; gap: 4px 10px; align-items: center; }
.consentSummaryFormWrap, .consentSummaryTagsWrap { min-width: 0; }
.consentSummaryRowActions { display: inline-flex; gap: 4px; }
.consentSummaryRowActions .btn { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; padding: 0; margin: 0; }
.consentSummaryRowActions .btn:disabled { opacity: .45; cursor: not-allowed; }
@media (max-width: 640px) { .consentSummaryFieldRow { grid-template-columns: minmax(0, 1fr) auto; } .consentSummaryFormWrap { grid-column: 1 / -1; } }
.dark-mode .consentSummaryFields { background: transparent; border-color: #394451; }

/* CRM-4103 - Kipu consent summary card (Intake Opportunity right column, both record views).
   Body drawn by Potentials Detail.js registerKipuConsentSummary; tokens fall back to light values. */
.kipuConsentSummary > .card-header { position: relative; }
.kipuConsentSummary .kipuConsentSummaryRefresh:not([hidden]) {
  position: absolute; top: 50%; right: 40px; transform: translateY(-50%);
  display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; padding: 0;
  border: 0; border-radius: 6px; background: transparent; color: var(--dz-text-2, #5a6a7a); cursor: pointer;
}
.kipuConsentSummary .kipuConsentSummaryRefresh:hover { background: var(--dz-row-hover, #f4f6f8); color: var(--dz-text, #1f2a36); }
.kipuConsentSummary .kipuConsentSummaryRefresh:focus-visible { outline: none; box-shadow: var(--dz-focus, 0 0 0 3px #b3e5fc); }
.kipuConsentSummaryBody { padding: 0 !important; color: var(--dz-text, #1f2a36); font-size: 13px; }
.kipuConsentSummaryBody .kcs-loading { display: flex; align-items: center; gap: 8px; padding: 14px; color: var(--dz-text-2, #5a6a7a); }
.kipuConsentSummaryBody .kcs-message { margin: 0; padding: 12px 14px; color: var(--dz-text-2, #5a6a7a); font-style: italic; }
.kipuConsentSummaryBody .kcs-retry { padding: 0 2px; vertical-align: baseline; font-style: normal; }
.kipuConsentSummaryBody .kcs-form { border-bottom: 1px solid var(--dz-hairline, #e8edf2); }
.kipuConsentSummaryBody .kcs-form:last-child { border-bottom: 0; }
.kipuConsentSummaryBody .kcs-head {
  display: flex; align-items: flex-start; flex-wrap: wrap; gap: 4px 8px; padding: 10px 14px;
  list-style: none; cursor: pointer;
}
.kipuConsentSummaryBody .kcs-head::-webkit-details-marker { display: none; }
.kipuConsentSummaryBody .kcs-head::marker { content: ""; }
.kipuConsentSummaryBody .kcs-head:hover { background: var(--dz-row-hover, #f4f6f8); }
.kipuConsentSummaryBody .kcs-head:focus-visible { outline: none; box-shadow: inset var(--dz-focus, 0 0 0 3px #b3e5fc); }
.kipuConsentSummaryBody .kcs-chev { flex: none; width: 16px; height: 16px; margin-top: 2px; color: var(--dz-text-2, #5a6a7a); transition: transform .15s ease; }
.kipuConsentSummaryBody .kcs-form[open] > .kcs-head .kcs-chev { transform: rotate(90deg); }
.kipuConsentSummaryBody .kcs-title { flex: 1 1 140px; min-width: 0; line-height: 1.35; overflow-wrap: anywhere; }
.kipuConsentSummaryBody .kcs-title strong { display: block; color: var(--dz-text, #1f2a36); }
.kipuConsentSummaryBody .kcs-sub { display: block; font-size: 12px; color: var(--dz-text-2, #5a6a7a); }
.kipuConsentSummaryBody .kcs-badges { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.kipuConsentSummaryBody .kcs-badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; }
.kipuConsentSummaryBody .kcs-ok { background: var(--dz-success-soft, #e6f4ec); color: var(--dz-success-fg, #1e6b41); }
.kipuConsentSummaryBody .kcs-warn { background: var(--dz-warning-soft, #fff8e1); color: var(--dz-warning-fg, #7a4f00); }
.kipuConsentSummaryBody .kcs-danger { background: var(--dz-danger-soft, #fdecea); color: var(--dz-danger-fg, #a12622); }
.kipuConsentSummaryBody .kcs-meta { font-size: 11px; color: var(--dz-text-2, #5a6a7a); }
.kipuConsentSummaryBody .kcs-body { padding: 0 14px 12px 38px; }
.kipuConsentSummaryBody .kcs-body .kcs-message { padding: 0 0 4px; }
.kipuConsentSummaryBody .kcs-section + .kcs-section { margin-top: 10px; }
.kipuConsentSummaryBody .kcs-label { font-size: 11px; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; color: var(--dz-text-2, #5a6a7a); }
.kipuConsentSummaryBody .kcs-value { margin-top: 2px; overflow-wrap: anywhere; }
.kipuConsentSummaryBody .kcs-blank { height: 26px; margin-top: 4px; border: 1px solid var(--dz-border, #dde2e7); border-radius: 4px; background: var(--dz-bg, #f4f6f8); }
.kipuConsentSummaryBody .kcs-checks {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 12px; margin: 4px 0 0; padding: 0; list-style: none;
}
.kipuConsentSummaryBody .kcs-checks li { display: flex; align-items: flex-start; gap: 6px; line-height: 1.35; overflow-wrap: anywhere; }
.kipuConsentSummaryBody .kcs-check { flex: none; width: 14px; height: 14px; margin-top: 2px; color: var(--dz-success-fg, #1e6b41); }
@media (max-width: 480px) { .kipuConsentSummaryBody .kcs-checks { grid-template-columns: minmax(0, 1fr); } }
@media (prefers-reduced-motion: reduce) { .kipuConsentSummaryBody .kcs-chev { transition: none; } }
