/* =====================================================================
   Connectwell UI kit — create / edit pages (mockup forms.css + ui.css
   .fsec / .fgrid / .fg / .factions / .frm / .rail). Applied by
   js/kit/cw-form.js and by plain selectors on the existing form markup.
   ===================================================================== */

/* Breadcrumb */
.cw-form-page .cw-form-crumb { margin-bottom: var(--s3); }

.cw-dirty-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--wip); display: inline-block; }

/* Single-card master forms: section header and the field grid */
.dashboard__table.cw-frm-card { padding: 0 !important; overflow: visible; }
.cw-frm-card > .cw-frm-hd { border-bottom: 1px solid var(--line-2); padding: var(--s3) var(--s5); border-radius: var(--r-lg) var(--r-lg) 0 0; }
.cw-frm-card > .cw-frm-hd .cw-i { width: 16px; height: 16px; color: var(--text-2); }
.cw-frm-card .cw-cnt { font-size: var(--fs-xs); font-weight: 600; color: var(--muted); margin-left: auto; }
.cw-frm-card .cw-cnt.cw-bad { color: var(--crit); }
.cw-frm-card > .dashboard__tableHead:empty, .cw-frm-card > .dashboard__tableHead:not(:has(*:not(input[type=hidden]))) { display: none !important; }
.cw-frm-card .modal-body.cw-fgrid-body { padding: var(--s5) !important; gap: var(--s4) var(--s5) !important; }
.cw-form-page .dashboard__content .form-label, .cw-form-page .dashboard__content label.form-label { font-size: var(--fs-sm); font-weight: 600; color: var(--text-2); margin-bottom: 6px; display: flex; align-items: center; gap: var(--s1); }
.cw-form-page .dashboard__content .form-control:not(textarea), .cw-form-page .dashboard__content .form-select { min-height: var(--h-input); border-radius: var(--r-md); }
.cw-form-page .dashboard__content .e-input-group:not(.e-multi-line-input), .cw-form-page .dashboard__content .e-control-wrapper.e-ddl, .cw-form-page .dashboard__content .e-multiselect.e-input-group { border-radius: var(--r-md) !important; min-height: var(--h-input); }

/* Sticky action bar */
.cw-form-page .cw-factions-bar {
  position: sticky; bottom: 0; z-index: 20; display: flex !important; gap: 10px; justify-content: flex-end; align-items: center;
  padding: var(--s3) var(--s5) !important; background: color-mix(in srgb, var(--card) 94%, transparent); backdrop-filter: blur(4px);
  border-top: 1px solid var(--line) !important; margin: 0 !important; border-radius: 0 0 var(--r-lg) var(--r-lg);
}
.cw-form-page .cw-factions-bar .cw-fb, .cw-form-page .cw-factions-bar a.cw-fb { width: auto !important; min-width: 96px; height: var(--h-btn); display: inline-flex; align-items: center; justify-content: center; margin: 0 !important; }
.cw-form-page .cw-factions-bar .cw-fnote { margin-right: auto; color: var(--muted); font-size: var(--fs-sm); display: inline-flex; gap: var(--s2); align-items: center; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.cw-form-page .cw-factions-bar .cw-fnote .cw-i { width: 14px; height: 14px; color: var(--faint); flex: 0 0 auto; }
.cw-form-page .cw-factions-bar .cw-fnote .cw-req { margin: 0 1px; }

/* Edit pages: their tab bar (Details / Updates & Logs / …) reads as the mockup's section tabs (ui.css .tabs):
   muted labels on the card's head band, the open one in the accent colour with an accent underline.
   The page's inline height / background / padding and issue.css's navy inner <span> are overridden
   (:root:root outranks the dark-legacy span colour rule). */
:root:root .dashboard__body .dashboard__tableHead.nav.nav-tabs { display: flex; flex-wrap: wrap; align-items: flex-end !important; gap: 2px !important; height: auto !important; padding: 0 var(--s3) !important; border: 0 !important; border-bottom: 1px solid var(--line) !important; background: var(--surface-3) !important; margin: 0 !important; border-radius: var(--r-lg) var(--r-lg) 0 0 !important; }
:root:root .dashboard__body .dashboard__tableHead.nav.nav-tabs .tabHead__item, :root:root .dashboard__body .dashboard__tableHead.nav.nav-tabs .nav-link {
  display: inline-flex; align-items: center; gap: 7px; height: auto !important; padding: 12px var(--s3) 10px !important; border: 0 !important; border-bottom: 2px solid transparent !important; border-radius: 0 !important;
  background: transparent !important; color: var(--muted) !important; font-size: var(--fs-md) !important; font-weight: 600 !important; margin: 0 0 -1px !important; box-shadow: none !important; transition: color .15s, border-color .15s;
}
:root:root .dashboard__body .dashboard__tableHead.nav.nav-tabs .tabHead__item span { display: inline !important; width: auto !important; height: auto !important; background: transparent !important; color: inherit !important; font-size: inherit !important; font-weight: inherit !important; padding: 0 !important; transition: none !important; }
:root:root .dashboard__body .dashboard__tableHead.nav.nav-tabs .tabHead__item:hover, :root:root .dashboard__body .dashboard__tableHead.nav.nav-tabs .nav-link:hover { color: var(--text) !important; }
:root:root .dashboard__body .dashboard__tableHead.nav.nav-tabs .tabHead__item.active, :root:root .dashboard__body .dashboard__tableHead.nav.nav-tabs .nav-link.active { color: var(--accent) !important; border-bottom-color: var(--accent) !important; background: transparent !important; }
:root:root .dashboard__body .dashboard__tableHead.nav.nav-tabs .tabHead__item:focus-visible, :root:root .dashboard__body .dashboard__tableHead.nav.nav-tabs .nav-link:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }

/* Kaizen form: its cards and step pills follow the kit */
.kz-form .kz-card { border-radius: var(--r-lg); border: 1px solid var(--line); box-shadow: var(--sh-1); }
.kz-form .kz-card__header { border-bottom: 1px solid var(--line-2); }
.kz-form .kz-card__title { font-size: var(--fs-h3); font-weight: 700; color: var(--ink); }
.kz-form [data-kz-section-nav] a, .kz-form .kz-section-nav a { border-radius: 9px; }
.dashboard__body .dashboard__tableHead.nav.nav-tabs { justify-content: flex-start !important; width: auto; }
.dashboard__body .dashboard__tableHead.nav.nav-tabs .tabHead__item { flex: 0 0 auto !important; width: auto !important; min-width: 0 !important; }

/* Record summary above edit forms (js/kit/cw-form.js recordMeta): label above value, title as the headline */
.cw-form-page .cw-rmeta { display: flex; flex-direction: column; gap: var(--s3); padding: var(--s4) var(--s5); margin: 0 0 var(--s4); background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--sh-1); }
.cw-form-page .cw-rmeta__row { display: flex !important; flex-wrap: wrap; align-items: flex-start !important; gap: var(--s3) var(--s6) !important; margin: 0 !important; min-width: 0; }
.cw-form-page .cw-rmeta__row + .cw-rmeta__row { justify-content: flex-start !important; border-top: 1px solid var(--line-2); padding-top: var(--s3); }
.cw-form-page .cw-rmeta__row > div:not(.cw-rmeta__it), .cw-form-page .cw-rmeta .cw-rmeta__grp { display: flex !important; flex-wrap: wrap; gap: var(--s3) var(--s6) !important; margin: 0 !important; }
.cw-form-page .cw-rmeta__it, .cw-form-page .cw-rmeta__pair { display: flex !important; flex-direction: column; gap: 3px; min-width: 0; margin: 0 !important; }
.cw-form-page .cw-rmeta .cw-rmeta__k { font-size: var(--fs-xs) !important; font-weight: 600 !important; color: var(--muted); margin: 0 !important; line-height: 1.3; }
.cw-form-page .cw-rmeta .cw-rmeta__v { font-size: var(--fs-md) !important; font-weight: 500 !important; color: var(--text); line-height: 1.4; }
.cw-form-page .cw-rmeta .cw-rmeta__title { flex: 1 1 320px; }
.cw-form-page .cw-rmeta .cw-rmeta__title .cw-rmeta__v { font-size: var(--fs-h2) !important; font-weight: 700 !important; color: var(--ink); line-height: 1.3; }
.cw-form-page .cw-rmeta .cw-rmeta__chip { display: inline-flex; align-items: center; height: 22px; padding: 0 10px !important; border-radius: 999px !important; font-size: var(--fs-xs) !important; font-weight: 600 !important; line-height: 1; cursor: default;
  background: var(--info-bg) !important; color: var(--info) !important; border: 1px solid var(--info-line) !important; box-shadow: none !important; }
.cw-form-page .cw-rmeta .cw-rmeta__chip:empty { display: none !important; }

/* An edit form card that only wraps another card: drawn as a plain container (no card in a card) */
.cw-form-page .dashboard__content .dashboard__table:has(> .dashboard__table) { background: transparent !important; border: 0 !important; box-shadow: none !important; }

/* Older edit pages caption fields with <span class="mb-2 d-block">: drawn as the kit's field label */
.cw-form-page .dashboard__content span.mb-2.d-block { font-size: var(--fs-sm) !important; font-weight: 600 !important; color: var(--text-2) !important; margin-bottom: 6px !important; }
.cw-form-page .dashboard__content input::placeholder { text-transform: none; }

/* Tracker custom fields (Issue/_CustomFieldPartial): the main field and the sub fields its value reveals.
   Their wrappers carry inline lightgreen / lightyellow fills (also set by app.js); the kit draws a sub field
   as an indented, accented follow-on of its main field instead. Wrapper markup and ids are untouched. */
.cw-form-page .main-subfield-container { margin: 0 !important; display: flex; flex-direction: column; gap: var(--s3); min-width: 0; }
.cw-form-page .main-subfield-container > div[style*="lightgreen"] { background: transparent !important; }
.cw-form-page .main-subfield-container > div[style*="lightyellow"] { background: var(--surface-2) !important; border-left: 2px solid var(--info-line); border-radius: 0 var(--r-md) var(--r-md) 0; padding: var(--s2) var(--s3); }
.cw-form-page .main-subfield-container > div > .form-label { overflow-wrap: anywhere; }

/* Lookup fields: value box + clear + Select read as one control of one height */
.cw-form-page .dashboard__content .input-group > .btn { height: auto; min-height: var(--h-input); align-self: stretch; display: inline-flex; align-items: center; gap: 6px; padding: 0 12px; font-size: var(--fs-sm); font-weight: 600; box-shadow: none !important; }
.cw-form-page .dashboard__content .input-group > .btn[style*="display: none"], .cw-form-page .dashboard__content .input-group > .btn[style*="display:none"] { display: none !important; }
.cw-form-page .dashboard__content .input-group > .btn-outline-secondary { background: var(--surface-2); border-color: var(--line) !important; color: var(--text-2); }
.cw-form-page .dashboard__content .input-group > .btn-outline-secondary:hover { background: var(--surface-3); border-color: var(--line-strong) !important; color: var(--ink); }
.cw-form-page .dashboard__content .input-group > .lookup-clear-btn { background: var(--card); border-color: var(--line) !important; color: var(--muted); padding: 0 10px; border-radius: 0 !important; line-height: calc(var(--h-input) - 2px); }
.cw-form-page .dashboard__content .input-group > .lookup-clear-btn:hover { background: var(--crit-bg, #fef2f2); color: var(--crit); }
.cw-form-page .dashboard__content .input-group > .form-control[readonly] { background: var(--card); }


/* Tabbed edit cards (Details / Updates & Logs / …): the tab body sits inside the card's padding, not on its border */
.cw-form-page .dashboard__table:has(> .dashboard__tableHead.nav-tabs) > .dashboard__tableBody:not(:has(.cw-fgrid-body)) { padding: var(--s5); }

/* Form field grids: a column may shrink below its widest content (a rich-text toolbar, a long value), so the
   form fits its card instead of scrolling sideways inside it */
.cw-form-page .dashboard__content .modal-body.d-grid > *, .cw-form-page .dashboard__content .dashboard__tableBodyLeft > *, .cw-form-page .dashboard__content .dashboard__tableBodyRight > * { min-width: 0; }

/* Form action bar buttons (mockup .btn): one height, quiet secondary buttons, one accent primary.
   Page markup sizes these inline (45px tall, 183px wide, 24px icons, 15px text); the kit outranks that.
   cw-form.js tags the roles: cw-fb--primary (the page's save), cw-fb--danger (Drop / Delete / Reject …),
   cw-fb--ghost (Cancel / Close). Visibility stays the page's own (display is never forced). */
.cw-form-page .cw-factions-bar { gap: var(--s2) !important; }
.cw-form-page .cw-factions-bar .cw-fb {
  height: var(--h-btn) !important; min-width: 0 !important; width: auto !important; padding: 0 var(--s4) !important; margin: 0 !important;
  align-items: center; justify-content: center; gap: 7px !important; border-radius: var(--r-md) !important; border: 1px solid var(--line) !important;
  background: var(--card) !important; color: var(--text) !important; font-family: var(--font); font-size: var(--fs-md) !important; font-weight: 600 !important;
  line-height: 1 !important; white-space: nowrap; box-shadow: var(--sh-1) !important; transition: background .15s, border-color .15s, color .15s;
}
.cw-form-page .cw-factions-bar .cw-fb * { font-size: inherit !important; font-weight: inherit !important; color: inherit !important; }
.cw-form-page .cw-factions-bar .cw-fb:hover { border-color: var(--line-strong) !important; background: var(--hover) !important; }
.cw-form-page .cw-factions-bar .cw-fb :is(img, svg, i) { width: 14px !important; height: 14px !important; font-size: 13px !important; flex: 0 0 auto; opacity: .7; }
:root[data-theme="dark"] .cw-form-page .cw-factions-bar .cw-fb img { filter: invert(1); }
.cw-form-page .cw-factions-bar .cw-fb.ms-auto { margin-left: var(--s3) !important; }
.cw-form-page .cw-factions-bar .cw-fb:is(.cw-fb--primary, .save-button, .master-crud-save) { background: var(--accent) !important; border-color: var(--accent) !important; color: #fff !important; }
.cw-form-page .cw-factions-bar .cw-fb:is(.cw-fb--primary, .save-button, .master-crud-save):hover { background: var(--accent-hover) !important; border-color: var(--accent-hover) !important; }
.cw-form-page .cw-factions-bar .cw-fb.cw-fb--danger { color: var(--crit) !important; border-color: var(--crit-line) !important; }
.cw-form-page .cw-factions-bar .cw-fb.cw-fb--danger:hover { background: var(--crit-bg) !important; }
.cw-form-page .cw-factions-bar .cw-fb.cw-fb--danger img { opacity: 1; filter: invert(19%) sepia(88%) saturate(4000%) hue-rotate(352deg) brightness(88%); }
:root[data-theme="dark"] .cw-form-page .cw-factions-bar .cw-fb.cw-fb--danger img { filter: invert(55%) sepia(60%) saturate(1800%) hue-rotate(320deg); }
.cw-form-page .cw-factions-bar .cw-fb.cw-fb--ghost { background: transparent !important; border-color: transparent !important; color: var(--text-2) !important; box-shadow: none !important; }
.cw-form-page .cw-factions-bar .cw-fb.cw-fb--ghost:hover { background: var(--hover) !important; color: var(--ink) !important; }
.cw-form-page .cw-factions-bar .cw-fb:is(:disabled, .disabled) { opacity: .5; box-shadow: none !important; }
.cw-form-page .cw-factions-bar .cw-fb:focus-visible { outline: 2px solid var(--accent) !important; outline-offset: 2px; }

/* Master lookup picker (js/kit/cw-form.js; same control as the CMMS asset form's .pick):
   [ chosen value …………………… × Choose… ] — one bordered box, the value muted while empty */
:root:root .input-group.cw-pick { display: flex; flex-wrap: nowrap; align-items: center; gap: 4px; height: var(--h-input); min-height: var(--h-input); box-sizing: border-box;
  border: 1px solid var(--line); border-radius: var(--r-md) !important; padding: 3px 4px 3px 0; background: var(--card); transition: border-color .15s, box-shadow .15s; }
:root:root .input-group.cw-pick:hover { border-color: var(--line-strong); }
:root:root .input-group.cw-pick:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); }
:root:root .input-group.cw-pick > .cw-pick__text { flex: 1 1 auto; min-width: 0; width: auto; height: 100% !important; min-height: 0 !important; border: 0 !important; border-radius: 0 !important;
  background: transparent !important; box-shadow: none !important; outline: 0; padding: 0 0 0 11px !important; font-size: var(--fs-sm) !important; color: var(--text); text-overflow: ellipsis; cursor: pointer; }
:root:root .input-group.cw-pick > .cw-pick__text::placeholder { color: var(--faint); text-transform: none; }
:root:root .input-group.cw-pick > .cw-pick__clear { flex: 0 0 auto; width: 24px; height: 24px !important; min-height: 0 !important; padding: 0 !important; margin: 0 !important; border: 0 !important; border-radius: 6px !important;
  background: transparent !important; color: var(--faint) !important; font-size: 18px !important; line-height: 22px !important; text-align: center; box-shadow: none !important; }
:root:root .input-group.cw-pick > .cw-pick__clear:hover { background: var(--crit-bg) !important; color: var(--crit) !important; }
:root:root .input-group.cw-pick > .cw-pick__btn { flex: 0 0 auto; display: inline-flex; align-items: center; height: 27px !important; min-height: 0 !important; padding: 0 11px !important; margin: 0 !important;
  border: 1px solid var(--line-strong) !important; border-radius: 7px !important; background: var(--card) !important; color: var(--text) !important; font-size: var(--fs-sm) !important; font-weight: 600 !important; box-shadow: none !important; white-space: nowrap; }
:root:root .input-group.cw-pick > .cw-pick__btn:hover { background: var(--hover) !important; }
:root:root .input-group.cw-pick:has(> .cw-pick__btn:disabled), :root:root .input-group.cw-pick:has(> .cw-pick__btn[style*="display: none"]) { background: var(--surface-2); }
:root:root .input-group.cw-pick > .cw-pick__btn:disabled { opacity: .45; cursor: not-allowed; }

/* The picker's dialog (Shared/_ModalGridSelectionPartial): wide, a heading with a hint line, the grid filling
   the height, and a footer band — the CMMS asset form's lookup dialog */
.modal.cw-pickdlg .modal-dialog { width: 90vw; max-width: min(1600px, 90vw) !important; margin: 5vh auto; }
.modal.cw-pickdlg .modal-content { height: 90vh; border: 0; border-radius: 12px; overflow: hidden; background: var(--card); box-shadow: 0 24px 60px -20px rgba(15, 23, 42, .5); }
.modal.cw-pickdlg .modal-header { align-items: flex-start; gap: var(--s4); padding: 14px 18px; border-bottom: 1px solid var(--line-2); }
.modal.cw-pickdlg .cw-pickdlg__heading { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.modal.cw-pickdlg .modal-title { font-size: var(--fs-lg) !important; font-weight: 700; color: var(--ink); margin: 0; }
.modal.cw-pickdlg .cw-pickdlg__sub { font-size: 11.5px; font-weight: 500; color: var(--muted); }
.modal.cw-pickdlg .modal-header .btn-close { margin: 0 0 0 auto; }
.modal.cw-pickdlg .modal-body { display: flex; flex-direction: column; min-height: 0; flex: 1 1 auto; overflow: hidden; padding: 12px 18px; }
.modal.cw-pickdlg .modal-body > .mb-3 { margin-bottom: 12px !important; flex: 0 0 auto; }
.modal.cw-pickdlg .modal-body > .mb-3 > input.form-control { height: 36px; padding-left: 34px; border-radius: var(--r-md); font-size: var(--fs-md);
  background: var(--card) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='15' height='15' viewBox='0 0 24 24' fill='none' stroke='%239aa3af' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.3-4.3'/%3E%3C/svg%3E") no-repeat 11px 50%; }
.modal.cw-pickdlg .modal-body > .table-responsive { flex: 1 1 auto; min-height: 0; overflow: hidden; }
.modal.cw-pickdlg .modal-body .e-grid { border-radius: var(--r-md); }
.modal.cw-pickdlg .modal-body .e-grid .e-row { cursor: pointer; }
.modal.cw-pickdlg .modal-footer { display: flex; align-items: center; gap: var(--s2); padding: 12px 18px; border-top: 1px solid var(--line-2); background: var(--surface-3); flex-wrap: nowrap; }
.modal.cw-pickdlg .modal-footer > * { margin: 0; }
.modal.cw-pickdlg .cw-pickdlg__hint { flex: 1 1 auto; min-width: 0; font-size: 11.5px; color: var(--muted); }
.modal.cw-pickdlg .modal-footer > .btn { height: var(--h-btn); padding: 0 var(--s4); border-radius: var(--r-md); font-size: var(--fs-md); font-weight: 600; display: inline-flex; align-items: center; }
.modal.cw-pickdlg .modal-footer > .btn-secondary { background: var(--card) !important; border: 1px solid var(--line) !important; color: var(--text) !important; }
.modal.cw-pickdlg .modal-footer > .btn-secondary:hover { background: var(--hover) !important; border-color: var(--line-strong) !important; }
.modal.cw-pickdlg .modal-footer > .cw-pickdlg__reset { background: transparent !important; border-color: transparent !important; color: var(--text-2) !important; }
/* a picker's Reset lives with the grid's other utilities, above the grid; this button stays as what it triggers */
.modal.cw-pickdlg:not(.cw-lkdlg) .modal-footer > .cw-pickdlg__reset { display: none !important; }
.modal.cw-pickdlg .modal-footer > .btn-primary { background: var(--accent) !important; border: 1px solid var(--accent) !important; color: #fff !important; }
.modal.cw-pickdlg .modal-footer > .btn-primary:hover { background: var(--accent-hover) !important; border-color: var(--accent-hover) !important; }
.modal.cw-pickdlg .modal-footer > .btn-primary:disabled { opacity: .5; }

/* Custom fields sit two to a row in the details column; when that column is too narrow for a picker to show its
   value (laptops with the summary rail), each takes the full row */
.cw-form-page .dashboard__tableBodyLeft:has(> .main-subfield-container) { container-type: inline-size; container-name: cw-fields; }
@container cw-fields (max-width: 560px) { .main-subfield-container { grid-column: 1 / -1; } }
.modal.cw-pickdlg input::placeholder { text-transform: none; }

/* Form status in the action bar (cw-form.js refresh): unsaved changes · x of y required · jump links to what is missing */
.cw-form-page .cw-factions-bar .cw-fnote > span { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.cw-form-page .cw-factions-bar .cw-fnote__dirty { color: var(--wip); font-weight: 600; flex: 0 0 auto; }
.cw-form-page .cw-factions-bar .cw-fnote__miss { display: inline !important; overflow: hidden; text-overflow: ellipsis; }
.cw-form-page .cw-factions-bar .cw-fnote__miss b { color: var(--text); }
.cw-form-page .cw-factions-bar .cw-fnote__miss a { color: var(--accent); font-weight: 600; text-decoration: none; }
.cw-form-page .cw-factions-bar .cw-fnote__miss a:hover { text-decoration: underline; }
.cw-form-page .cw-factions-bar .cw-fnote__ok .cw-i { color: var(--ok); }
.cw-form-page .cw-factions-bar .cw-fnote__sep { width: 1px; height: 14px; background: var(--line); margin: 0 10px; flex: 0 0 auto; }

/* Attachments — the CMMS asset form's control (masterextended .att-drop / .att-grid / .att-card):
   a dashed drop zone ("Drop files here or browse" + what may be attached), then the files as cards.
   cw-form.js tags Syncfusion's select row .cw-drop; the cards are #uploaderCustomTemplate's .att-card. */
:root .uploader-container { border: 0; padding: 0; border-radius: 0; }
:root .e-upload.e-control-wrapper { border: 0 !important; background: transparent !important; padding: 0 !important; }
:root .e-upload .e-file-select-wrap.cw-drop { display: flex; align-items: center; gap: 14px; padding: 16px 18px !important; border: 1.5px dashed var(--line-strong) !important;
  border-radius: 10px !important; background: var(--surface-2) !important; color: var(--text-2); cursor: pointer; transition: border-color .15s, background .15s; }
:root .e-upload .e-file-select-wrap.cw-drop:hover { border-color: var(--accent-line) !important; }
:root .e-upload.e-upload-drag-hover .e-file-select-wrap.cw-drop, :root .e-upload-drag-hover .e-file-select-wrap.cw-drop { border-color: var(--accent) !important; background: var(--accent-soft) !important; }
:root .uploader-container.error .e-file-select-wrap.cw-drop { border-color: var(--crit) !important; }
.cw-drop .cw-drop__ico { flex: 0 0 auto; display: inline-flex; color: var(--faint); }
.cw-drop .cw-drop__ico .cw-i { width: 24px; height: 24px; }
.cw-drop .cw-drop__txt { display: flex; flex-direction: column; gap: 3px; min-width: 0; font-size: var(--fs-md); line-height: 1.35; }
.cw-drop .cw-drop__txt b { color: var(--text); font-weight: 600; }
:root .cw-drop .cw-drop__browse.e-btn { display: inline; height: auto !important; min-height: 0 !important; padding: 0 !important; margin: 0 !important; border: 0 !important; background: none !important; box-shadow: none !important;
  font: inherit !important; font-weight: 700 !important; color: var(--accent) !important; text-decoration: underline; text-transform: none !important; vertical-align: baseline; cursor: pointer; }
:root .cw-drop .cw-drop__browse.e-btn:disabled { color: var(--faint) !important; text-decoration: none; cursor: not-allowed; }
.cw-drop .cw-drop__hint { font-size: 11.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
:root .cw-drop > .e-file-drop { display: none !important; }
/* file cards: CMMS size (auto-fill 132px cards, 92px preview face), kit colours in light and dark */
:root .e-upload .e-upload-files { --att-card-h: 134px; --att-gap: 12px; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); padding: 0; margin-top: 14px; }
:root .e-upload .e-upload-files:not(:has(.e-upload-file-list)) { margin-top: 0; }
:root .att-card { border: 1px solid var(--line) !important; border-radius: 9px; background: var(--card) !important; }
:root .att-card:hover, :root .att-card:focus-visible { border-color: var(--accent-line) !important; box-shadow: 0 3px 10px -4px rgba(15, 23, 42, .25); }
:root .att-card__face { height: 92px; flex: 0 0 92px; background: var(--surface-2) !important; }
:root .att-card__meta { padding: 7px 9px 8px; height: auto; flex: 1 1 auto; }
:root .att-card__name { font-size: var(--fs-sm); color: var(--text) !important; }
:root .att-card__sub { font-size: 11px; margin-top: 2px; color: var(--muted); }
:root .att-card__x { width: 22px; height: 22px; top: 6px; right: 6px; font-size: 15px; }
:root .att-card__x:hover { background: var(--crit) !important; }
:root .att-ext { font-size: 12px; padding: 7px 10px; border-radius: 6px; }
/* compact list variant (custom-field attachments on Edit Issue) keeps its row cards */
:root .uploader-container--edit-list .e-upload .e-upload-files { --att-card-h: 56px; grid-template-columns: 1fr; }
:root .uploader-container--edit-list .att-card__face { height: 100%; flex: 0 0 56px; }
:root .uploader-container--edit-list .att-card__meta { padding: 4px 32px 4px 10px; display: flex; flex-direction: column; justify-content: center; }
:root .uploader-container--edit-list .att-card__x { top: 50%; right: 8px; transform: translateY(-50%); }
/* One row: the status shrinks (ellipsis + hover tooltip) before any button wraps; a page's own static
   "Fields marked * are required" hint gives way to the kit status, which says the same and more */
.cw-form-page .cw-factions-bar { flex-wrap: nowrap !important; }
.cw-form-page .cw-factions-bar .cw-fb { flex: 0 0 auto; }
.cw-form-page .cw-factions-bar .cw-fnote { flex: 1 1 auto; min-width: 0; }
.cw-form-page .cw-factions-bar:has(> .cw-fnote) > :is(.kz-actionbar__hint, .form-hint, .required-hint) { display: none !important; }
.cw-form-page .cw-factions-bar .cw-fnote__more { color: var(--text-2); font-weight: 600; border-bottom: 1px dotted var(--line-strong); cursor: help; }

/* Create / edit pages load without a raw first paint: while html.cw-form-boot is set (_Layout <head>, released by
   cw-form.js once the kit has laid the form out) the page content is held hidden and a form skeleton shimmers in
   its place — a card with a title line and two columns of label + field bars. Then the content fades in. */
html:is(.cw-form-boot, .cw-settle-boot) .dashboard__content { position: relative; min-height: 560px; }
html:is(.cw-form-boot, .cw-settle-boot) .dashboard__content > * { visibility: hidden !important; }
html:is(.cw-form-boot, .cw-settle-boot) .dashboard__content::before {
  content: ""; position: absolute; z-index: 3; left: var(--s5); right: var(--s5); top: 36px; height: 520px; pointer-events: none;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--sh-1);
}
html:is(.cw-form-boot, .cw-settle-boot) .dashboard__content::after {
  content: ""; position: absolute; z-index: 4; left: calc(var(--s5) + 24px); right: calc(var(--s5) + 24px); top: 60px; height: 470px; pointer-events: none;
  background: linear-gradient(90deg, var(--chip-bg, #eef1f5) 0%, var(--chip-bg, #eef1f5) 40%, var(--surface-2, #f8fafc) 50%, var(--chip-bg, #eef1f5) 60%, var(--chip-bg, #eef1f5) 100%);
  background-size: 200% 100%; animation: cw-grid-shimmer 1.3s linear infinite;
  /* a title line (32% wide), then label (10px) + field (34px) pairs every 82px in two columns with a 24px gutter */
  -webkit-mask-image: linear-gradient(to bottom, #000 0 16px, transparent 16px), repeating-linear-gradient(to bottom, transparent 0 52px, #000 52px 62px, transparent 62px 70px, #000 70px 104px, transparent 104px 134px), linear-gradient(to right, #000 0 calc(50% - 12px), transparent calc(50% - 12px) calc(50% + 12px), #000 calc(50% + 12px)); -webkit-mask-size: 32% 100%, 100% 100%, 100% 100%; -webkit-mask-repeat: no-repeat; -webkit-mask-composite: source-over, source-in;
  mask-image: linear-gradient(to bottom, #000 0 16px, transparent 16px), repeating-linear-gradient(to bottom, transparent 0 52px, #000 52px 62px, transparent 62px 70px, #000 70px 104px, transparent 104px 134px), linear-gradient(to right, #000 0 calc(50% - 12px), transparent calc(50% - 12px) calc(50% + 12px), #000 calc(50% + 12px)); mask-size: 32% 100%, 100% 100%, 100% 100%; mask-repeat: no-repeat; mask-composite: add, intersect;
}
html.cw-form-in .dashboard__content > * { animation: cw-form-in .2s ease-out both; }
@keyframes cw-form-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { html.cw-form-boot .dashboard__content::after, html.cw-form-in .dashboard__content > * { animation: none; } }

/* Section step pills (Kaizen .kz-section-nav — the same control as the CMMS asset form's .asset-steps):
   white bordered pills with a square step number; the current one in the accent (not navy) */
:root .kz-section-nav__item { gap: 9px; padding: 8px 14px 8px 9px; border: 1px solid var(--line) !important; border-radius: 9px; background: var(--card) !important; color: var(--text-2) !important; font-size: var(--fs-md); font-weight: 600; box-shadow: var(--sh-1); }
:root .kz-section-nav__item:hover { border-color: var(--line-strong) !important; color: var(--ink) !important; }
:root .kz-section-nav__item.is-active { border-color: var(--accent) !important; background: var(--accent-soft) !important; color: var(--accent) !important; }
:root .kz-section-nav__step { width: 22px; height: 22px; border-radius: 6px; background: var(--chip-bg) !important; color: var(--text-2); font-size: 11px; font-variant-numeric: tabular-nums; }
:root .kz-section-nav__item.is-active .kz-section-nav__step { background: var(--accent) !important; color: #fff; }
:root .kz-section-nav__item:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* The action bar always spans the form: a page that wraps it in its own right-aligned footer (ToDo:
   .modal-footer.text-right > .modal-footer) does not shrink it to a floating box; outside the form card it is drawn
   as its own card edge to edge */
.cw-form-page .modal-footer:has(> .cw-factions-bar) { display: block !important; padding: 0 !important; margin: var(--s4) 0 0 !important; border: 0 !important; }
.cw-form-page .cw-factions-bar { width: 100%; box-sizing: border-box; }
.cw-form-page .cw-factions-bar:not(.dashboard__table .cw-factions-bar):not(.kz-form .cw-factions-bar) { border: 1px solid var(--line) !important; border-radius: var(--r-lg); box-shadow: var(--sh-1); }

/* Fields captioned beside their input (label | field rows, e.g. ToDo): drawn as the framework's label-above field
   (cw-form.js tags the rows .cw-fstack) */
.cw-form-page .cw-fstack { flex-direction: column !important; align-items: stretch !important; gap: 6px !important; }
.cw-form-page .cw-fstack > label.form-label { width: auto !important; max-width: none !important; margin: 0 !important; }
.cw-form-page .cw-fstack > :not(label):not(input[type=hidden]) { width: 100% !important; max-width: none !important; flex: 0 0 auto !important; }

/* Form cards with no body wrapper of their own (fields, matrices and grids placed straight in the card, e.g.
   Configure Kaizen): the card pads its content. Tabbed cards, card wrappers and kit-built cards keep theirs. */
.cw-form-page .dashboard__content .dashboard__table:not(.cw-frm-card):not(.cw-reg):not(:has(> .dashboard__table)):not(:has(> .dashboard__tableHead.nav-tabs)):not(.dashboard__tableBody .dashboard__table):not(.modal .dashboard__table) { padding: var(--s5) !important; }
/* section captions inside such a card ("Kaizen Notification", "Kaizen Category"): the kit's section heading */
.cw-form-page .dashboard__content .dashboard__table > label:not(.form-label), .cw-form-page .dashboard__content .dashboard__table > .inline-container > label:not(.form-label) {
  display: block; margin: var(--s6) 0 var(--s3) !important; font-size: var(--fs-h3) !important; font-weight: 700 !important; color: var(--ink) !important; }
.cw-form-page .dashboard__content .dashboard__table > .inline-container { display: flex; align-items: center; gap: var(--s3); margin: var(--s6) 0 var(--s3); }
.cw-form-page .dashboard__content .dashboard__table > .inline-container > label:not(.form-label) { margin: 0 !important; }
/* …and in a kit form card, the sections that follow the field grid (matrices, grids, captions) share its inset */
.cw-form-page .cw-frm-card > :not(.cw-frm-hd):not(:has(.cw-fgrid-body)):not(.cw-fgrid-body):not(.cw-factions-bar):not(.modal):not(.nav-tabs):not(script):not(style):not(input) { margin-left: var(--s5) !important; margin-right: var(--s5) !important; width: auto !important; max-width: none; }
.cw-form-page .cw-frm-card > :last-child:not(.cw-factions-bar) { margin-bottom: var(--s5) !important; }
.cw-form-page .dashboard__content .dashboard__table > .inline-container > label { white-space: nowrap; }
/* picker order like the asset form: value · × · (view) · Choose…; a clear / view that cannot act yet is not shown */
:root:root .input-group.cw-pick > .cw-pick__text { order: 0; }
:root:root .input-group.cw-pick > .cw-pick__clear { order: 1; }
:root:root .input-group.cw-pick > .cw-pick__aux { order: 2; }
:root:root .input-group.cw-pick > .cw-pick__btn { order: 3; }
:root:root .input-group.cw-pick > .cw-pick__clear:disabled, :root:root .input-group.cw-pick > .cw-pick__aux:disabled { display: none !important; }
:root:root .input-group.cw-pick > .cw-pick__aux { flex: 0 0 auto; width: 26px; height: 26px !important; min-height: 0 !important; padding: 0 !important; margin: 0 !important; border: 0 !important; border-radius: 6px !important;
  background: transparent !important; color: var(--muted) !important; box-shadow: none !important; display: inline-grid; place-items: center; font-size: 13px; }
:root:root .input-group.cw-pick > .cw-pick__aux:hover { background: var(--hover) !important; color: var(--info) !important; }

/* Master-lookup dropdowns drawn as the picker (cw-form.js, cssClass "cw-lookup"): [ value ………… × Choose… ] —
   the dropdown's arrow and own clear icon give way to the asset form's clear × and Choose… button */
:root:root .e-ddl.e-input-group:is(.cw-lookup, .cw-lkp) { display: flex; align-items: center; gap: 4px; padding-right: 4px !important; cursor: pointer; background: var(--card); }
:root:root .e-ddl.e-input-group:is(.cw-lookup, .cw-lkp) > .e-ddl-icon, :root:root .e-ddl.e-input-group:is(.cw-lookup, .cw-lkp) > .e-clear-icon { display: none !important; }
:root:root .e-ddl.e-input-group:is(.cw-lookup, .cw-lkp) > input.e-input { flex: 1 1 auto; min-width: 0; width: auto !important; cursor: pointer; text-overflow: ellipsis; text-transform: none; }
:root:root .e-ddl.e-input-group:is(.cw-lookup, .cw-lkp) > input.e-input::placeholder { color: var(--faint); text-transform: none; }
:root:root .cw-lkp > .cw-lkp__clear { flex: 0 0 auto; width: 24px; height: 24px; padding: 0; margin: 0; border: 0; border-radius: 6px; background: transparent; color: var(--faint); font-size: 18px; line-height: 22px; text-align: center; cursor: pointer; }
:root:root .cw-lkp > .cw-lkp__clear:hover { background: var(--crit-bg); color: var(--crit); }
:root:root .cw-lkp:not(.cw-lkp--has) > .cw-lkp__clear { display: none; }
:root:root .cw-lkp > .cw-lkp__btn { flex: 0 0 auto; display: inline-flex; align-items: center; height: 27px; padding: 0 11px; margin: 0; border: 1px solid var(--line-strong); border-radius: 7px; background: var(--card); color: var(--text);
  font-family: var(--font); font-size: var(--fs-sm); font-weight: 600; white-space: nowrap; cursor: pointer; }
:root:root .cw-lkp > .cw-lkp__btn:hover { background: var(--hover); }
:root:root .cw-lkp.e-disabled, :root:root .cw-lkp.e-readonly { background: var(--surface-2); cursor: not-allowed; }
:root:root .cw-lkp.e-disabled > .cw-lkp__btn, :root:root .cw-lkp.e-readonly > .cw-lkp__btn { opacity: .45; pointer-events: none; }
:root:root .cw-lkp.e-disabled > .cw-lkp__clear, :root:root .cw-lkp.e-readonly > .cw-lkp__clear { display: none; }
:root:root:root .e-input-group:has(~ .field-validation-error:not(:empty)), :root:root:root .e-input-group:has(.input-validation-error), :root:root .form-control.input-validation-error { border-color: var(--crit) !important; }
/* its dialog: the lookup dialog, sized to the list (a one- or two-column master opens narrow) */
:root .modal.cw-pickdlg.cw-lkdlg .modal-dialog { width: min(1040px, 92vw); max-width: min(1040px, 92vw) !important; margin: 4vh auto; }
:root .modal.cw-pickdlg.cw-lkdlg.cw-lkdlg--narrow .modal-dialog { width: min(640px, 92vw); max-width: min(640px, 92vw) !important; }
:root .modal.cw-pickdlg.cw-lkdlg .modal-content { height: min(720px, 88vh); }
:root .modal.cw-pickdlg.cw-lkdlg .modal-footer > .cw-pickdlg__reset[hidden] { display: none; }
:root .modal.cw-pickdlg.cw-lkdlg .e-grid .e-row.e-active .e-rowcell, :root .modal.cw-pickdlg.cw-lkdlg .e-grid .e-row[aria-selected="true"] .e-rowcell { font-weight: 600; }

/* Form sections in a single-card form (page markup: .cw-fsect > .cw-fsect__hd [.cw-fsect__n, h4, p] + .cw-fsect__grid):
   a numbered heading with what the section holds, "x of y required" on the right (cw-form.js), divider between */
:root .cw-frm-card .modal-body.cw-fgrid-body:has(> .cw-fsect) { display: block !important; padding: 0 !important; }
.cw-fsect { padding: var(--s4) var(--s5) var(--s5); scroll-margin-top: 90px; }
.cw-fsect + .cw-fsect { border-top: 1px solid var(--line-2); }
.cw-fsect__hd { display: flex; align-items: center; gap: var(--s3); margin: 0 0 var(--s4); min-width: 0; }
.cw-fsect__n { flex: 0 0 auto; display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-size: 11.5px; font-weight: 800; }
.cw-fsect__hd > div { min-width: 0; }
.cw-fsect__hd h4 { margin: 0; font-size: var(--fs-lg) !important; font-weight: 700; color: var(--ink); line-height: 1.3; }
.cw-fsect__hd p { margin: 1px 0 0; font-size: var(--fs-xs) !important; color: var(--muted); line-height: 1.4; }
.cw-fsect__cnt { margin-left: auto; flex: 0 0 auto; font-size: var(--fs-xs); font-weight: 600; color: var(--muted); white-space: nowrap; }
.cw-fsect__cnt.cw-bad { color: var(--crit); }
.cw-fsect__cnt.cw-ok { color: var(--ok); }
.cw-fsect__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s4) var(--s5); align-items: start; }
.cw-fsect__grid > * { min-width: 0; }
.cw-fsect__grid > .cw-w2 { grid-column: span 2; }
.cw-fsect__grid > .cw-w-all { grid-column: 1 / -1; }
.cw-fsect__grid > .d-none { display: none !important; }
@media (max-width: 1100px) { .cw-fsect__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* wrapper divs a page groups its bar buttons in are part of the bar's row (cw-form.js tags them cw-fb-wrap) */
.cw-form-page .cw-factions-bar .cw-fb-wrap:not(.d-none):not([hidden]):not([style*="display:none"]):not([style*="display: none"]) { display: contents !important; }
:root .cw-form-page .cw-factions-bar .cw-fb.cw-fb-push { margin-left: auto !important; }

/* Multi-select lookups (cw-form.js "cw-lkm"): the chips stay; a Choose… button sits at the right of the field and
   opens the multi-pick dialog. The control's own list arrow gives way to it; the clear-all × stays beside it. */
:root:root .e-multiselect.e-input-group.cw-lkm { position: relative; cursor: pointer; }
:root:root .e-multiselect.e-input-group.cw-lkm .e-multi-select-wrapper { padding: 3px 92px 3px 6px !important; min-height: calc(var(--h-input) - 2px); }
:root:root .e-multiselect.e-input-group.cw-lkm .e-multi-select-wrapper .e-clear-icon { right: 86px !important; }
:root:root .e-multiselect.e-input-group.cw-lkm .e-multi-select-wrapper .e-ddl-icon, :root:root .e-multiselect.e-input-group.cw-lkm .e-input-group-icon.e-ddl-icon { display: none !important; }
:root:root .e-multiselect.e-input-group.cw-lkm > .cw-lkp__btn { position: absolute; right: 4px; top: 3px; z-index: 2; display: inline-flex; align-items: center; height: 27px; padding: 0 11px; margin: 0;
  border: 1px solid var(--line-strong); border-radius: 7px; background: var(--card); color: var(--text); font-family: var(--font); font-size: var(--fs-sm); font-weight: 600; white-space: nowrap; cursor: pointer; }
:root:root .e-multiselect.e-input-group.cw-lkm > .cw-lkp__btn:hover { background: var(--hover); }
:root:root .e-multiselect.e-input-group.cw-lkm.e-disabled > .cw-lkp__btn, :root:root .e-multiselect.e-input-group.cw-lkm.e-readonly > .cw-lkp__btn { opacity: .45; pointer-events: none; }
:root:root .e-multiselect.e-input-group.cw-lkm.e-disabled, :root:root .e-multiselect.e-input-group.cw-lkm.e-readonly { background: var(--surface-2); }

/* The lookup dialog's multi-pick: "Selected (n)" chips between the search and the grid; tick column; the dialog
   sits above another open dialog it was opened from */
.modal.cw-lkdlg { z-index: 1070; }
.modal.cw-pickdlg.cw-lkdlg .cw-lkdlg__sel { display: flex; flex: 0 0 auto; flex-wrap: wrap; align-items: center; gap: 6px; margin: -4px 0 10px; min-height: 28px; font-size: var(--fs-sm); }
.modal.cw-pickdlg.cw-lkdlg .cw-lkdlg__sel[hidden] { display: none; }
.modal.cw-pickdlg.cw-lkdlg .cw-lkdlg__seln { color: var(--text-2); font-weight: 700; margin-right: 4px; }
.modal.cw-pickdlg.cw-lkdlg .cw-lkdlg__chips { display: contents; }
.modal.cw-pickdlg.cw-lkdlg .cw-lkdlg__chip { display: inline-flex; align-items: center; gap: 2px; height: 24px; padding: 0 2px 0 9px; border: 1px solid var(--info-line); border-radius: var(--r-pill);
  background: var(--info-bg); color: var(--info); font-size: var(--fs-xs); font-weight: 600; max-width: 220px; }
.modal.cw-pickdlg.cw-lkdlg .cw-lkdlg__chip > button { border: 0; background: transparent; color: inherit; width: 20px; height: 20px; border-radius: 50%; line-height: 18px; font-size: 15px; padding: 0; cursor: pointer; flex: 0 0 auto; }
.modal.cw-pickdlg.cw-lkdlg .cw-lkdlg__chip > button:hover { background: color-mix(in srgb, var(--info) 18%, transparent); }
.modal.cw-pickdlg.cw-lkdlg .cw-lkdlg__more { color: var(--text-2); font-weight: 600; border-bottom: 1px dotted var(--line-strong); cursor: help; }
.modal.cw-pickdlg.cw-lkdlg .cw-lkdlg__none { margin-left: auto; border: 0; background: transparent; color: var(--accent); font-weight: 600; font-size: var(--fs-sm); padding: 2px 6px; border-radius: var(--r-sm); }
.modal.cw-pickdlg.cw-lkdlg .cw-lkdlg__none:hover { background: var(--accent-soft); }
.modal.cw-pickdlg.cw-lkdlg .cw-lkdlg__none[hidden] { display: none; }
.modal.cw-pickdlg.cw-lkdlg .e-grid .e-headercell .e-rhandler { cursor: col-resize; }
.modal.cw-pickdlg.cw-lkdlg .e-grid .e-headercell:hover .e-rhandler, .modal.cw-pickdlg.cw-lkdlg .e-grid .e-rhandler:hover { border-right: 2px solid var(--line-strong) !important; }
.modal.cw-pickdlg.cw-lkdlg .e-grid .e-headercell:has(.e-checkselectall) .e-headercelldiv { text-overflow: clip !important; padding-left: 0 !important; padding-right: 0 !important; display: flex; justify-content: center; }

/* Kaizen edit page — the record header and the 4QD view in the kit's language (they were Kaizen's own navy look):
   title as the headline, status as a kit pill (toned by cw-form.js), quiet secondary download buttons, a light
   identity band, white quadrant cards with a thin tone line, kit chips and KPI tiles. Tokens only (light and dark). */
:root:root .kz-form .kz-summary__top { padding: var(--s4) var(--s5); border-bottom-color: var(--line-2); align-items: center; }
:root:root .kz-form .kz-summary__eyebrow { font-size: var(--fs-xs); font-weight: 700; letter-spacing: .4px; color: var(--muted); margin-bottom: 2px; }
:root:root .kz-form .kz-summary__idea { font-size: var(--fs-h3); font-weight: 700; color: var(--ink); line-height: 1.35; }
:root:root .kz-form .kz-summary__meta { padding: var(--s4) var(--s5); gap: var(--s3) var(--s6); }
:root:root .kz-form .kz-meta__label { font-size: var(--fs-xs); font-weight: 600; color: var(--muted); margin-bottom: 2px; }
:root:root .kz-form .kz-meta__value { font-size: var(--fs-md); font-weight: 600; color: var(--ink); }
:root:root .kz-form .kz-meta__sub { font-size: var(--fs-xs); color: var(--muted); }
:root:root .kz-form .kz-badge, :root:root .kz-form .kz-badge--navy { height: 24px; padding: 0 10px; gap: 6px; border: 1px solid var(--line); border-radius: var(--r-pill); background: var(--chip-bg) !important; color: var(--text-2); font-size: var(--fs-xs); font-weight: 600; }
:root:root .kz-form .kz-badge i { font-size: 11px; color: var(--faint); }
:root:root .kz-form .kz-status-pill { height: 24px; padding: 0 11px; gap: 6px; border: 1px solid var(--line); border-radius: var(--r-pill); background: var(--chip-bg); color: var(--text-2); font-size: var(--fs-xs); font-weight: 700; }
:root:root .kz-form .kz-status-pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
:root:root .kz-form .kz-status-pill.cw-ok { color: var(--ok); background: var(--ok-bg); border-color: var(--ok-line); }
:root:root .kz-form .kz-status-pill.cw-wip { color: var(--wip); background: var(--wip-bg); border-color: var(--wip-line); }
:root:root .kz-form .kz-status-pill.cw-crit { color: var(--crit); background: var(--crit-bg); border-color: var(--crit-line); }
:root:root .kz-form .kz-status-pill.cw-info { color: var(--info); background: var(--info-bg); border-color: var(--info-line); }
:root:root .kz-form .kz-status-pill.cw-idle { color: var(--idle); background: var(--idle-bg); border-color: var(--idle-line); }

/* 4QD head: "Improvements · 4QD · number", the downloads as secondary buttons; the status is already in the header */
:root:root .kz-4qd-head__top { padding: var(--s4) var(--s5); border-bottom-color: var(--line-2); }
:root:root .kz-4qd-brand { gap: var(--s3); align-items: center; }
:root:root .kz-4qd-brand__bar { width: 4px; align-self: stretch; border-radius: 2px; background: var(--accent); }
:root:root .kz-4qd-brand__eyebrow { font-size: var(--fs-h2); font-weight: 700; color: var(--ink); line-height: 1.2; }
:root:root .kz-4qd-brand__title { font-size: var(--fs-md); font-weight: 700; color: var(--accent); line-height: 1.4; }
:root:root .kz-4qd-brand__no { font-size: var(--fs-sm); font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
:root:root .kz-4qd-head__actions { gap: var(--s2); }
:root:root .kz-4qd-head__actions .kz-status-pill { display: none; }
:root:root .kz-form .kz-4qd-head__actions .kz-btn { height: var(--h-btn); min-height: 0; padding: 0 var(--s4); gap: 7px; border: 1px solid var(--line) !important; border-radius: var(--r-md);
  background: var(--card) !important; color: var(--text) !important; font-size: var(--fs-md); font-weight: 600; box-shadow: var(--sh-1); }
:root:root .kz-form .kz-4qd-head__actions .kz-btn:hover { background: var(--hover) !important; border-color: var(--line-strong) !important; }
:root:root .kz-form .kz-4qd-head__actions .kz-btn i { color: var(--muted); font-size: 13px; }
:root:root .kz-4qd-chips { gap: var(--s2); padding: var(--s3) var(--s5); }
:root:root .kz-4qd-chip { height: 28px; padding: 0 10px; gap: 6px; border: 1px solid var(--line); border-radius: var(--r-pill); background: var(--card); color: var(--text); font-size: var(--fs-sm); font-weight: 600; }
:root:root .kz-4qd-chip i { color: var(--faint); font-size: 12px; }

/* identity band: label above value on a light band (was a navy bar) */
:root:root .kz-4qd-identity, :root:root .kz-4qd-identity > div { background: var(--surface-3); }
:root:root .kz-4qd-identity { border-top: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); }
:root:root .kz-4qd-identity > div { padding: var(--s3) var(--s5); border-right: 1px solid var(--line-2); }
:root:root .kz-4qd-identity .kz-meta__label { color: var(--muted); font-size: var(--fs-xs); font-weight: 600; }
:root:root .kz-4qd-identity .kz-meta__value { color: var(--ink); font-size: var(--fs-md); font-weight: 600; }
:root:root .kz-4qd-theme { padding: var(--s4) var(--s5); }
:root:root .kz-4qd-theme__label { font-size: var(--fs-xs); font-weight: 700; letter-spacing: .4px; color: var(--muted); }
:root:root .kz-4qd-theme__text { font-size: var(--fs-md); font-weight: 600; color: var(--ink); }

/* quadrants: white cards, a 3px tone line and a toned icon disc (Before crit · After ok · Analysis info · Benefits wip) */
:root:root .kz-4qd-grid { gap: var(--s4); }
:root:root .kz-4qd-q { --q-accent: var(--idle); --q-icon-bg: var(--idle-bg); background: var(--card); border: 1px solid var(--line); border-top: 3px solid var(--q-accent); border-radius: var(--r-lg); box-shadow: var(--sh-1); padding: var(--s4) var(--s5) var(--s5); gap: var(--s3); }
:root:root .kz-4qd-q--before { --q-accent: var(--crit); --q-icon-bg: var(--crit-bg); }
:root:root .kz-4qd-q--after { --q-accent: var(--ok); --q-icon-bg: var(--ok-bg); }
:root:root .kz-4qd-q--analysis { --q-accent: var(--info); --q-icon-bg: var(--info-bg); }
:root:root .kz-4qd-q--benefits { --q-accent: var(--wip); --q-icon-bg: var(--wip-bg); }
:root:root .kz-4qd-q__icon { width: 32px; height: 32px; border-radius: 50%; }
:root:root .kz-4qd-q__title { font-size: var(--fs-h3); font-weight: 700; color: var(--ink); }
:root:root .kz-4qd-q__sub { font-size: var(--fs-xs); color: var(--muted); }
:root:root .kz-4qd-q__text, :root:root .kz-4qd-q--before .kz-4qd-q__text, :root:root .kz-4qd-q--after .kz-4qd-q__text { font-size: var(--fs-md); color: var(--text) !important; line-height: 1.55; }
:root:root .kz-4qd-empty { border: 1px dashed var(--line-strong) !important; border-radius: var(--r-md); background: var(--surface-3) !important; color: var(--muted); font-size: var(--fs-sm); }
:root:root .kz-4qd-kpi { border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface-3) !important; padding: var(--s2) var(--s3); }
:root:root .kz-4qd-kpi__label { font-size: var(--fs-xs); font-weight: 600; color: var(--muted); }
:root:root .kz-4qd-kpi__value { font-size: var(--fs-md); font-weight: 700; color: var(--ink); }

/* Section heading action (page markup: a .btn.cw-fsect__act inside .cw-fsect__hd, e.g. "New category"): the same solid red Create
   button as the registers (cw-register.css .cw-new), on the right after the "x of y required" count */
.cw-fsect__hd:has(> .cw-fsect__act) > div { flex: 1 1 auto; }
:root .cw-fsect__hd > .btn.cw-fsect__act { order: 3; flex: 0 0 auto; display: inline-flex; align-items: center; gap: var(--s2); height: var(--h-btn); padding: 0 var(--s4); margin-left: var(--s3);
  border-radius: var(--r-md); border: 1px solid var(--accent) !important; background: var(--accent) !important; color: #fff !important; font-size: var(--fs-md) !important; font-weight: 600; white-space: nowrap; box-shadow: none !important; }
:root .cw-fsect__hd > .btn.cw-fsect__act:hover { background: var(--accent-hover) !important; border-color: var(--accent-hover) !important; }
:root .cw-fsect__hd > .btn.cw-fsect__act svg { width: 16px; height: 16px; color: #fff; }
/* a grid inside a section: no extra frame or gutter of its own */
.cw-fsect .dashboard__tableBody, .cw-fsect .dashboard__tableBodyTable { margin: 0 !important; padding: 0 !important; }

/* Checkbox matrix (who is notified per status, permissions): any .table whose body cells are checkboxes, on a kit form.
   Pages write inline cell paddings, hence !important. Page markup may also add .cw-mtx explicitly. */
:root :is(table.cw-mtx, .cw-form-page table.table:has(> tbody > tr > td > input.form-check-input)) {
  --bs-table-bg: transparent; --bs-table-hover-bg: var(--hover); width: 100%; margin: 0; border: 1px solid var(--line); border-radius: var(--r-md);
  border-collapse: separate; border-spacing: 0; overflow: hidden; table-layout: fixed; background: var(--card); }
:root :is(table.cw-mtx, .cw-form-page table.table:has(> tbody > tr > td > input.form-check-input)) > * > tr > * {
  padding: 7px var(--s4) !important; border-bottom: 1px solid var(--line-2) !important; vertical-align: middle; text-align: center !important;
  font-size: var(--fs-sm) !important; color: var(--text); background: transparent; box-shadow: none; }
:root :is(table.cw-mtx, .cw-form-page table.table:has(> tbody > tr > td > input.form-check-input)) > * > tr > :first-child { text-align: left !important; width: 30%; }
:root :is(table.cw-mtx, .cw-form-page table.table:has(> tbody > tr > td > input.form-check-input)) > thead > tr > th {
  background: var(--surface-3) !important; color: var(--muted) !important; font-size: 11px !important; font-weight: 700 !important; text-transform: uppercase; letter-spacing: .04em;
  border-bottom-color: var(--line) !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
:root :is(table.cw-mtx, .cw-form-page table.table:has(> tbody > tr > td > input.form-check-input)) > tbody > tr > th { font-weight: 600 !important; color: var(--ink) !important; }
:root :is(table.cw-mtx, .cw-form-page table.table:has(> tbody > tr > td > input.form-check-input)) > tbody > tr:last-child > * { border-bottom: 0 !important; }
:root :is(table.cw-mtx, .cw-form-page table.table:has(> tbody > tr > td > input.form-check-input)) > tbody > tr:hover > * { background: var(--hover) !important; }
:root :is(table.cw-mtx, .cw-form-page table.table:has(> tbody > tr > td > input.form-check-input)) td > input.form-check-input { float: none; margin: 0; width: 16px; height: 16px; vertical-align: middle; cursor: pointer; }
.cw-fsect > .table-responsive { margin: 0; }

/* Form dialog (page markup: .modal-dialog.cw-fdlg; body fields in .cw-fdlg__grid, 2 columns, .cw-w-all spans both) */
:root .modal-dialog.cw-fdlg { max-width: 720px; }
:root .cw-fdlg .modal-content { border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; background: var(--card); }
:root .cw-fdlg .modal-header { padding: 14px 18px; border-bottom: 1px solid var(--line-2) !important; }
:root .cw-fdlg .modal-title { margin: 0; font-size: var(--fs-lg) !important; font-weight: 700; color: var(--ink); }
:root .cw-fdlg .modal-body { padding: 18px; }
.cw-fdlg__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s4) var(--s5); align-items: start; }
.cw-fdlg__grid > * { min-width: 0; }
.cw-fdlg__grid > .cw-w-all { grid-column: 1 / -1; }
.cw-fdlg__check { align-self: end; min-height: var(--h-input); display: flex; align-items: center; }
.cw-fdlg__check .form-check { margin: 0; }
:root .cw-fdlg .modal-footer { display: flex; justify-content: flex-end; gap: var(--s2); padding: 12px 18px; border-top: 1px solid var(--line-2) !important; background: var(--surface-3); }
:root .cw-fdlg .modal-footer > * { margin: 0; }
:root .cw-fdlg .modal-footer > .btn { height: var(--h-btn); min-width: 84px; padding: 0 var(--s4); border-radius: var(--r-md); font-size: var(--fs-md) !important; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; }
:root .cw-fdlg .modal-footer > .btn-light { background: var(--card) !important; border: 1px solid var(--line) !important; color: var(--text) !important; }
:root .cw-fdlg .modal-footer > .btn-light:hover { background: var(--hover) !important; border-color: var(--line-strong) !important; }
:root .cw-fdlg .modal-footer > .btn-danger { background: var(--accent) !important; border: 1px solid var(--accent) !important; color: #fff !important; }
:root .cw-fdlg .modal-footer > .btn-danger:hover:not(:disabled) { background: var(--accent-hover) !important; }
:root .cw-fdlg .modal-footer > .btn:disabled { opacity: .5; }

/* Secondary section action (Import, Export…): same size and place as the red Create, in the outline style */
:root .cw-fsect__hd > .btn.cw-fsect__act.cw-fsect__act--2nd { border-color: var(--line) !important; background: var(--card) !important; color: var(--text) !important; }
:root .cw-fsect__hd > .btn.cw-fsect__act.cw-fsect__act--2nd:hover { background: var(--hover) !important; border-color: var(--line-strong) !important; }
:root .cw-fsect__hd > .btn.cw-fsect__act.cw-fsect__act--2nd svg { color: var(--text-2); }

/* Line-item entry table (page markup: .cw-lines-wrap > table.table.cw-lines; one row per item, inputs in the cells, the
   last cell holds the + / − row buttons). Inputs fill their column — pages give Syncfusion inputs fixed pixel widths. */
.cw-lines-wrap { overflow: auto; max-height: min(460px, 60vh); border: 1px solid var(--line); border-radius: var(--r-md); background: var(--card); }
:root table.table.cw-lines { --bs-table-bg: transparent; overflow: visible !important; width: 100%; min-width: 100%; margin: 0; table-layout: auto; border-collapse: separate; border-spacing: 0; }
:root table.cw-lines > * > tr > * { padding: 6px 8px; border: 0; border-bottom: 1px solid var(--line-2); vertical-align: top; background: transparent; font-size: var(--fs-sm); color: var(--text); }
:root table.cw-lines > thead > tr > th { position: sticky; top: 0; z-index: 3; background: var(--surface-3) !important; color: var(--muted); font-size: 11px !important; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border-bottom-color: var(--line); vertical-align: middle; height: 34px; }
:root table.cw-lines > tbody > tr:last-child > * { border-bottom: 0; }
:root table.cw-lines > tbody > tr:hover > * { background: var(--hover); }
:root table.table.cw-lines:has(> colgroup) { table-layout: fixed; min-width: 1180px; }
:root table.cw-lines:has(> colgroup) td :is(.e-input-group, .e-control-wrapper, .e-ddl) { width: 100% !important; min-width: 0; }
/* tagged by cw-form.js on legacy pages: the page's own wrapper loses its inline margins and fixed height */
:root .cw-lines-wrap[style] { margin: var(--s2) var(--s5) var(--s5) !important; height: auto !important; }
:root table.cw-lines td .e-input-group:has(input[readonly]) { background: var(--surface-3) !important; border-color: var(--line-2) !important; }
:root table.cw-lines td .text-danger:empty { display: none; }
:root table.cw-lines td .text-danger { display: block; margin-top: 2px; font-size: var(--fs-xs); }
/* row buttons: + adds a row, − removes one (pages draw them as btn-primary / btn-danger text buttons) */
:root table.cw-lines > * > tr > :last-child { position: sticky; right: 0; z-index: 2; background: var(--card); white-space: nowrap; text-align: right; box-shadow: -1px 0 0 var(--line-2); }
:root table.cw-lines > thead > tr > :last-child { z-index: 4; }
:root table.cw-lines td:last-child > .btn { width: 30px; height: 30px; padding: 0; margin: 0 0 0 4px; border-radius: var(--r-md); font-size: 16px !important; font-weight: 600; line-height: 1;
  display: inline-flex; align-items: center; justify-content: center; vertical-align: top; box-shadow: none !important; }
:root table.cw-lines td:last-child > .btn-primary { background: var(--accent) !important; border: 1px solid var(--accent) !important; color: #fff !important; }
:root table.cw-lines td:last-child > .btn-primary:hover { background: var(--accent-hover) !important; }
:root table.cw-lines td:last-child > .btn-danger { background: var(--card) !important; border: 1px solid var(--line) !important; color: var(--text-2) !important; }
:root table.cw-lines td:last-child > .btn-danger:hover:not(:disabled) { border-color: var(--crit-line) !important; color: var(--crit) !important; background: var(--crit-bg) !important; }
:root table.cw-lines td:last-child > .btn:disabled { opacity: .4; }
.cw-fsect > .cw-lines-wrap { margin: 0; }

/* Kaizen forms (kaizen-form.css): the scroller has no padding so the step bar pins to its top edge. They keep the same
   16px page gutter as every other page — the breadcrumb takes the top gap, the form and its step bar the side gap. */
:root .dashboard__body:has(.kz-form) > main.detail__content > .dashboard__content > .cw-crumb { padding-top: var(--s4); }
:root .dashboard__body:has(.kz-form) .dashboard__content > .kz-form { padding: 0 var(--s4) var(--s4); }
/* the step bar sits on the page background in line with the cards (not a white full-width strip): breadcrumb, 12px,
   steps, 16px, first card; it keeps the page colour behind it while pinned on scroll */
:root .dashboard__body:has(.kz-form > form > .kz-section-nav) .dashboard__content > .cw-crumb { margin-bottom: 4px !important; }
:root .kz-form > form > .kz-section-nav { margin: 0 calc(-1 * var(--s4)) 4px !important; padding: 8px var(--s4) 12px !important; background: var(--bg) !important; border: 0 !important; box-shadow: none !important; }
:root .kz-form > .dashboard__table { margin-top: 0; }

/* Bootstrap card forms (.card > .card-body > form + label.control-label, e.g. MES Add / Details) drawn as the kit form
   card: same frame, inner padding and caption style as every other form; the "*" a page writes in a bare <span> is the
   red required marker. */
:root .cw-form-page .dashboard__content .card { border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--sh-1); background: var(--card); }
:root .cw-form-page .dashboard__content .card.mt-3 { margin-top: 0 !important; }
:root .cw-form-page .dashboard__content .card > .card-body { padding: var(--s5); }
:root .cw-form-page label.control-label { display: block; font-size: var(--fs-sm) !important; font-weight: 600; color: var(--ink); margin-bottom: 6px !important; }
:root .cw-form-page label.control-label > span:not([class]) { color: var(--crit); margin-left: 2px; }
:root .cw-form-page label.control-label > small { font-weight: 400; color: var(--muted); }

/* Two-panel entry forms (.dashboard__main > .dashboard__left / .dashboard__right .dashboard__box — Add ITS / CAR issue,
   Add Review, 1:1 issue): two kit cards of equal height, the page's 16px rhythm, kit headings. */
:root .cw-form-page .dashboard__main { gap: var(--s4) !important; align-items: stretch; }
:root .cw-form-page .dashboard__main > .dashboard__box { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--sh-1); padding: var(--s5) !important; height: auto !important; align-content: start; }
:root .cw-form-page .dashboard__box h6 { font-size: var(--fs-lg) !important; font-weight: 700; color: var(--ink); margin-bottom: var(--s4) !important; }
/* the dashed rules pages draw between groups of fields: the kit's solid hairline */
:root .cw-form-page [style*="dashed #D4D4D4"] { border-style: solid !important; border-color: var(--line-2) !important; }
:root .cw-form-page .dashboard__box [style*="margin-block: 30px"] { margin-block: var(--s5) !important; }
:root .cw-form-page .dashboard__box > h6.cw-box-hd { grid-column: 1 / -1; margin: 0 0 -4px !important; }
/* group headings pages write at 18px (labels / h6 inside the panels): one kit heading size */
:root .cw-form-page :is(h6, label)[style*="font-size: 18px"] { font-size: var(--fs-lg) !important; font-weight: 700 !important; color: var(--ink) !important; }
:root .cw-form-page .dashboard__box h6[style*="margin-bottom: 30px"] { margin-bottom: var(--s4) !important; }
/* Add Review: the schedule block is drawn by script inside its own framed box — no card inside the card */
:root .cw-form-page .dashboard__box div:has(> .e-schedule-form-container) { border: 0 !important; padding: 0 !important; }
:root .cw-form-page .dashboard__box #new-event-dialog { box-shadow: none !important; border-radius: 0 !important; background: transparent !important; }
:root .cw-form-page .e-recurrenceeditor label, :root .cw-form-page .e-recurrenceeditor .e-repeat-element-label { font-size: var(--fs-sm) !important; font-weight: 600 !important; color: var(--ink) !important; }
/* "Add" beside a list caption inside a form (cw-form.js converts the old round red "+" icon): the registers' red New button */
:root .btn.cw-act-new { display: inline-flex; align-items: center; gap: var(--s2); height: var(--h-btn); padding: 0 var(--s4); border-radius: var(--r-md); border: 1px solid var(--accent) !important;
  background: var(--accent) !important; color: #fff !important; font-size: var(--fs-md) !important; font-weight: 600; box-shadow: none !important; white-space: nowrap; }
:root .btn.cw-act-new:hover { background: var(--accent-hover) !important; border-color: var(--accent-hover) !important; }
:root .btn.cw-act-new .cw-i { width: 16px; height: 16px; }
:root .cw-act-row { display: flex !important; align-items: center !important; justify-content: flex-start; gap: var(--s2) !important; }
:root .cw-act-row > .cw-act-new { margin-left: auto !important; }
:root .cw-act-row > :is(label, h6, span) { margin: 0 !important; }
/* what the kit lays out with display … !important still hides when the page hides it (inline display:none, [hidden],
   .d-none): Add Review hides "Scored / Non Scored Checklist" while Is Checklisted Review is No, record meta hides empty pairs */
:root .cw-act-row:is(.d-none, [hidden], [style*="display: none"], [style*="display:none"]),
.cw-form-page .cw-rmeta__row:is(.d-none, [hidden], [style*="display: none"], [style*="display:none"]),
.cw-form-page .cw-rmeta__row > div:not(.cw-rmeta__it):is(.d-none, [hidden], [style*="display: none"], [style*="display:none"]),
.cw-form-page .cw-rmeta .cw-rmeta__grp:is(.d-none, [hidden], [style*="display: none"], [style*="display:none"]),
.cw-form-page :is(.cw-rmeta__it, .cw-rmeta__pair):is(.d-none, [hidden], [style*="display: none"], [style*="display:none"]) { display: none !important; }
/* Edit Review: the schedule block sits in a framed .container — flat, like Add Review */
:root .cw-form-page .container:has(> #new-event-dialog) { border: 0 !important; padding: 0 !important; max-width: none; }
:root .cw-form-page .container:has(> #new-event-dialog) > h6 { font-size: var(--fs-lg) !important; font-weight: 700; color: var(--ink); margin-bottom: var(--s3); }
:root .cw-form-page #new-event-dialog { box-shadow: none !important; border-radius: 0 !important; background: transparent !important; }
/* a record's status pill, moved by cw-form.js from a row of its own above the card into the card header */
:root .cw-frm-hd > .cw-hd-status { margin-left: auto; display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: var(--r-pill); font-size: var(--fs-xs) !important; font-weight: 700;
  border: 1px solid var(--info-line) !important; background: var(--info-bg) !important; color: var(--info) !important; box-shadow: none !important; cursor: default; white-space: nowrap; }
:root .cw-frm-hd > .cw-hd-status.cw-ok { border-color: var(--ok-line) !important; background: var(--ok-bg) !important; color: var(--ok) !important; }
:root .cw-frm-hd > .cw-hd-status.cw-wip { border-color: var(--wip-line) !important; background: var(--wip-bg) !important; color: var(--wip) !important; }
:root .cw-frm-hd > .cw-hd-status.cw-crit { border-color: var(--crit-line) !important; background: var(--crit-bg) !important; color: var(--crit) !important; }
:root .cw-frm-hd > .cw-hd-status.cw-idle { border-color: var(--idle-line) !important; background: var(--idle-bg) !important; color: var(--idle) !important; }
:root .cw-frm-hd > .cw-hd-status + .cw-cnt { margin-left: var(--s3); }
/* Tabbed edit forms whose panes hold bare .dashboard__tableBody blocks (Edit Review): the card's standard inner padding,
   so fields, headings and grids do not run into the card border; a footer row in a pane sits right, on a hairline */
/* every pane of a tabbed form card gets the card padding once (panes that wrap their fields in a .modal-body are padded by it) */
:root .cw-frm-card .tab-content:not(.tab-pane .tab-content) > .tab-pane:not(:has(> .cw-fgrid-body, > * > .cw-fgrid-body)) { padding: var(--s4) var(--s5) !important; }
:root .cw-frm-card .tab-content:not(.tab-pane .tab-content) > .tab-pane > .dashboard__tableBody { padding: 0 !important; }
:root .cw-frm-card .tab-content > .tab-pane > .dashboard__tableBody + .dashboard__tableBody { margin-top: var(--s4); }
:root .cw-frm-card .tab-pane > .dashboard__tableBody > .row > [class*="col-"] > .modal-body { padding: 0 !important; }
:root .cw-frm-card .tab-pane > .dashboard__tableBody > .modal-footer { justify-content: flex-end; margin-top: var(--s4); padding: var(--s3) 0 0; border-top: 1px solid var(--line-2) !important; }

/* Sub-tabs inside a record tab (Issues / Actionables, Updates / Logs — Issue, Kaizen and Review edit pages): compact
   underline tabs in the record-tab style, sized to their label; 12px down to the grid; the "+" create menu (when the
   viewer may create) at the end of the row, and no empty row when they may not. */
:root .tab-pane:has(> .nav:is(.updatelogs-nav, .issueActionables-nav)) { gap: var(--s3) !important; }
:root .nav:is(.updatelogs-nav, .issueActionables-nav) { flex-wrap: nowrap; align-items: flex-end; gap: 0; margin: 0 !important; border-bottom: 1px solid var(--line) !important; }
:root .nav:is(.updatelogs-nav, .issueActionables-nav) .nav-link { min-width: 0 !important; padding: 8px 14px !important; margin-bottom: -1px; border: 0 !important; border-bottom: 2px solid transparent !important; border-radius: 0 !important;
  background: transparent !important; color: var(--text-2) !important; font-size: var(--fs-md) !important; font-weight: 600 !important; white-space: nowrap; }
:root .nav:is(.updatelogs-nav, .issueActionables-nav) .nav-link:hover { color: var(--ink) !important; }
:root .nav:is(.updatelogs-nav, .issueActionables-nav) .nav-link.active { color: var(--accent) !important; border-bottom-color: var(--accent) !important; }
:root .issueActionables-nav > li:not(.nav-item) { order: 9; margin-left: auto; align-self: center; padding-bottom: 6px; }
:root .issueActionables-nav > li:not(.nav-item):not(:has(button)) { display: none; }
:root .issueActionables-nav > li:not(.nav-item) .dashboard__tableHead { margin: 0 !important; }

/* Record-header counts (cw-form.js countStat: "Issues: 2/5"): open count, "of N", a bar for the share closed */
.cw-form-page .cw-rmeta .cw-rcount { min-width: 104px; }
.cw-form-page .cw-rmeta .cw-rcount .cw-rmeta__v { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 5px; }
.cw-rcount__n { font-size: var(--fs-lg); font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; line-height: 1.2; }
.cw-rcount__u { font-size: var(--fs-sm); color: var(--text-2); }
.cw-rcount__of { font-size: var(--fs-sm); color: var(--muted); font-variant-numeric: tabular-nums; }
.cw-rcount__bar { flex: 0 0 100%; height: 4px; margin-top: 5px; border-radius: 2px; background: var(--line-2); overflow: hidden; }
.cw-rcount__bar > i { display: block; height: 100%; background: var(--ok); border-radius: 2px; }
.cw-rcount__none { font-size: var(--fs-sm); color: var(--muted); }
.cw-form-page .cw-rmeta .cw-rcount--link { cursor: pointer; padding: 4px 8px !important; margin: -4px -8px !important; border-radius: var(--r-md); transition: background-color .12s; }
.cw-form-page .cw-rmeta .cw-rcount--link:hover { background: var(--hover); }
.cw-form-page .cw-rmeta .cw-rcount--link:hover .cw-rmeta__k { color: var(--accent); }
.cw-form-page .cw-rmeta .cw-rcount--link:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

/* Captions pages write as 18px headings with a required "*" ("Checklist Type*", "Non Scored Checklist*"): they name
   one field or list, so they read as the kit's field caption, not as a section heading */
:root .cw-form-page :is(h6, label)[style*="font-size: 18px"]:has(> .cw-req),
:root .cw-form-page .tab-pane h6:has(> .cw-req) { font-size: var(--fs-sm) !important; font-weight: 600 !important; color: var(--ink) !important; margin: 0 0 6px !important; }
/* a dropdown sized as a sliver of the page ("width: 7%") in a form: never narrower than its text */
:root .cw-form-page .tab-pane .e-input-group.e-ddl[style*="%"]:not(td .e-input-group) { min-width: 240px; max-width: 100%; }
/* section headings inside a form tab (Review History "Review History and Issues") */
:root .cw-form-page .tab-pane > :is(h4, h5) { font-size: var(--fs-lg) !important; font-weight: 700 !important; color: var(--ink); margin: 0 0 var(--s3) !important; }

/* Expandable history rows (.review-item > .review-header + .review-content: Review History meetings) as kit rows */
:root .cw-form-page .review-item { margin: 0 0 var(--s2); border: 1px solid var(--line) !important; border-radius: var(--r-md); background: var(--card); overflow: hidden; }
:root .cw-form-page .review-header { gap: var(--s3); padding: 10px var(--s4) !important; background: var(--card) !important; font-weight: 600 !important; font-size: var(--fs-md); color: var(--ink); }
:root .cw-form-page .review-header:hover { background: var(--hover) !important; }
:root .cw-form-page .review-item.cw-open > .review-header { border-bottom: 1px solid var(--line-2); background: var(--surface-3) !important; }
:root .cw-form-page .review-header > span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
:root .cw-form-page .review-header .status-badge { display: inline-flex; align-items: center; height: 22px; padding: 0 10px; border-radius: var(--r-pill); font-size: var(--fs-xs); font-weight: 700; white-space: nowrap;
  border: 1px solid var(--idle-line); background: var(--idle-bg); color: var(--idle); }
:root .cw-form-page .review-header .status-badge.cw-ok { border-color: var(--ok-line); background: var(--ok-bg); color: var(--ok); }
:root .cw-form-page .review-header .status-badge.cw-wip { border-color: var(--wip-line); background: var(--wip-bg); color: var(--wip); }
:root .cw-form-page .review-header .status-badge.cw-crit { border-color: var(--crit-line); background: var(--crit-bg); color: var(--crit); }
:root .cw-form-page .review-header .status-badge.cw-info { border-color: var(--info-line); background: var(--info-bg); color: var(--info); }
:root .cw-form-page .review-header .arrow { display: inline-grid; place-items: center; width: 22px; height: 22px; font-size: 0 !important; color: var(--muted); transition: transform .15s; }
:root .cw-form-page .review-header .arrow::before { content: ''; width: 8px; height: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-2px) rotate(45deg); }
:root .cw-form-page .review-item.cw-open > .review-header .arrow { transform: rotate(180deg); }
:root .cw-form-page .review-content { padding: var(--s4); }
/* inside an opened history row: one primary action at most — the row's tool buttons (Review Custom Fields, Checklist,
   Attachment, Attendees) are secondary; captions are sub-headings */
:root .cw-form-page .review-content .btn.btn-primary { background: var(--card) !important; border: 1px solid var(--line) !important; color: var(--text) !important; font-weight: 600; font-size: var(--fs-sm) !important;
  height: var(--h-btn); padding: 0 var(--s3) !important; border-radius: var(--r-md) !important; box-shadow: none !important; }
:root .cw-form-page .review-content .btn.btn-primary:hover { background: var(--hover) !important; border-color: var(--line-strong) !important; }
:root .cw-form-page .review-content .cw-subhd { display: block; font-size: var(--fs-md) !important; font-weight: 700 !important; color: var(--ink); margin: var(--s2) 0 var(--s2); }

/* Section-card forms (the mockup's form layout; page markup: [data-cw-fsteps].cw-steps pills + .cw-fsecs > section.cw-card.cw-fsec,
   each with a .cw-card__hd [data-cw-tog] head and a .cw-card__bd > .cw-fgrid body; cw-form.js wires collapse, steps and counts).
   The pills stick under the top bar while the form scrolls; a hidden section drops its pill. */
:root .cw-form-page .cw-fsteps { top: var(--h-top); margin: 0 0 var(--s1); padding: var(--s2) 0 var(--s3); flex-wrap: wrap; row-gap: var(--s2); }
.cw-fsteps a[hidden] { display: none !important; }
.cw-fsteps a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
:root .cw-fsteps .btn.cw-fsteps__all { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 var(--s2) !important; border: 0 !important; background: transparent !important;
  color: var(--text-2) !important; font-size: var(--fs-sm) !important; font-weight: 600; box-shadow: none !important; }
:root .cw-fsteps .btn.cw-fsteps__all:hover { background: var(--hover) !important; color: var(--ink) !important; }
.cw-fsteps .cw-fsteps__all svg { width: 14px; height: 14px; }
.cw-fsecs { display: flex; flex-direction: column; gap: var(--s4); }   /* (gap, not sibling margins: pages keep script templates between sections) */
.cw-fsecs > .cw-fsec { margin: 0 !important; min-width: 0; }
.cw-fsec > .cw-card__hd { user-select: none; }
.cw-fsec > .cw-card__hd > .cw-i { width: 16px; height: 16px; color: var(--text-2); flex: 0 0 auto; }
.cw-fsec > .cw-card__hd > .cw-chev { width: 16px; height: 16px; }
.cw-fsec > .cw-card__hd h3 { font-size: var(--fs-lg) !important; }
.cw-fsec.cw-closed > .cw-card__hd { border-bottom-color: transparent; }
.cw-fsec .cw-fg > label { margin-bottom: 6px; }
/* a segmented choice inside a field: its options are not field captions */
:root .cw-fg .cw-seg label { margin: 0 !important; font-size: var(--fs-md) !important; font-weight: 600 !important; white-space: nowrap; }
:root .cw-fg .cw-seg { width: max-content; max-width: 100%; }
:root .cw-fg .cw-seg input.form-check-input { display: none; }
.cw-fg .cw-seg label:focus-within { box-shadow: inset 0 0 0 2px var(--accent-line); }
.cw-fsec .cw-kit-note { margin-top: var(--s3); }
/* form validation messages under a field: no empty gap until there is one */
.cw-fsec .cw-fg > span.text-danger:empty { display: none; }
/* fixed columns in section cards: fields keep their width as the page shows / hides others (auto-fit would stretch two
   visible fields across the row) */
.cw-fsec .cw-fgrid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }

/* Numbered-section forms upgraded to section cards (cw-form.js adds .cw-fsect-cards to the form card, .cw-fsec-x to each
   section, and the step pills): the card becomes a plain container — the sections are the cards, each with the mockup's
   head (accent bar, number, title, "x of y required", chevron) and a body that collapses. */
:root .cw-form-page .dashboard__table.cw-fsect-cards { background: transparent !important; border: 0 !important; box-shadow: none !important; padding: 0 !important; overflow: visible; }
:root .cw-fsect-cards > .cw-frm-hd { display: none !important; }
:root .cw-fsect-cards .modal-body.cw-fgrid-body { padding: 0 !important; background: transparent !important; }
:root .cw-fsect-cards .cw-fsec-x { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--sh-1); padding: 0 0 var(--s5); }
:root .cw-fsect-cards .cw-fsec-x + .cw-fsec-x { border-top: 1px solid var(--line); margin-top: var(--s4); }
:root .cw-fsect-cards .cw-fsec-x > .cw-fsect__hd { margin: 0 0 var(--s5); padding: var(--s3) var(--s5); min-height: 52px; border-bottom: 1px solid var(--line-2); cursor: pointer; user-select: none; }
:root .cw-fsect-cards .cw-fsec-x > .cw-fsect__hd::before { content: ''; flex: 0 0 auto; width: 5px; height: 22px; border-radius: 3px; background: var(--accent); }
:root .cw-fsect-cards .cw-fsec-x > :not(.cw-fsect__hd) { margin-left: var(--s5); margin-right: var(--s5); }
.cw-fsec-x > .cw-fsect__hd > .cw-fsect__chev { order: 10; flex: 0 0 auto; display: inline-grid; place-items: center; margin-left: var(--s2); color: var(--faint); transition: transform .2s; }
.cw-fsec-x > .cw-fsect__hd > .cw-fsect__chev svg { width: 16px; height: 16px; }
.cw-fsec-x.cw-closed > .cw-fsect__hd > .cw-fsect__chev { transform: rotate(-90deg); }
:root .cw-fsec-x.cw-closed { padding-bottom: 0; }
:root .cw-fsec-x.cw-closed > .cw-fsect__hd { margin-bottom: 0; border-bottom-color: transparent; }
.cw-fsec-x.cw-closed > :not(.cw-fsect__hd) { display: none !important; }
/* the action bar that lives inside the form card sits under the last section card */
:root .cw-fsect-cards > .cw-factions-bar { margin-top: var(--s4); }
.cw-fsec-x > .cw-fsect__hd > div { flex: 1 1 auto; }
/* phones: the step pills stay one row that scrolls sideways (five wrapped rows of sticky pills hid the form);
   Expand all / Collapse all keep their icon and tooltip */
@media (max-width: 767px) {
  :root .cw-form-page .cw-fsteps { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  :root .cw-form-page .cw-fsteps::-webkit-scrollbar { display: none; }
  .cw-fsteps a { flex: 0 0 auto; padding: 7px var(--s3); }
  :root .cw-fsteps .btn.cw-fsteps__all { flex: 0 0 auto; font-size: 0 !important; gap: 0; }
  .cw-fsec .cw-fgrid { grid-template-columns: minmax(0, 1fr); }
}
/* phones: the action bar's status line takes its own row above the buttons instead of being cut to a few letters */
@media (max-width: 767px) {
  :root .cw-form-page .cw-factions-bar { flex-wrap: wrap; row-gap: var(--s2); }
  :root .cw-form-page .cw-factions-bar > .cw-fnote { flex: 1 0 100%; order: -1; white-space: normal; }
}

/* ---------------- Form with the summary rail (mockup forms.js "frm") ----------------
   Pages that render _KitFormRail.cshtml: section cards on the left, the rail (progress, key facts, route) on the right,
   and the mockup's green primary action. Below 1180px the rail drops under the form; on a phone it is left out. */
.cw-form-page .cw-frm { margin-top: var(--s3); }
.cw-form-page .cw-frm__main > .cw-steps { margin-bottom: var(--s3); }
.cw-form-page .cw-frm__main .cw-fsecs { display: flex; flex-direction: column; gap: var(--s4); }
.cw-rail__person { display: flex; align-items: center; gap: 6px; }
.cw-rail__route li .cw-cellp { display: flex; align-items: center; gap: 6px; }
.cw-rail__ppl { color: var(--text-2); }
@media (max-width: 1180px) { .cw-form-page .cw-frm { grid-template-columns: minmax(0, 1fr); } .cw-form-page .cw-frm__rail { position: static; } }
@media (max-width: 640px) { .cw-form-page .cw-frm__rail { display: none; } }
.cw-form-page:has(.cw-frm__rail) .cw-factions-bar .cw-fb:is(.cw-fb--primary, .save-button, .master-crud-save) { background: var(--ok) !important; border-color: var(--ok) !important; color: #fff !important; }
.cw-form-page:has(.cw-frm__rail) .cw-factions-bar .cw-fb:is(.cw-fb--primary, .save-button, .master-crud-save):hover { filter: brightness(.92); }
/* beside the rail the step row is narrower: Expand / Collapse all are icon buttons (as in the mockup), names in the tooltip */
:root .cw-form-page .cw-frm__main .cw-fsteps { flex-wrap: nowrap; }
.cw-form-page .cw-frm__main .cw-fsteps > a { white-space: nowrap; }
:root .cw-form-page .cw-frm__main .cw-fsteps .btn.cw-fsteps__all { font-size: 0 !important; gap: 0; width: 32px; min-width: 32px; padding: 0 !important; justify-content: center; }
.cw-form-page .cw-frm__main .cw-fsteps__all svg { width: 16px; height: 16px; margin: 0 !important; }
@media (max-width: 900px) { :root .cw-form-page .cw-frm__main .cw-fsteps { flex-wrap: wrap; } }
/* the rail stays in view while the form scrolls: the page's scroll wrappers must not clip it */
.cw-form-page :is(.dashboard__tableBodyTable, .dashboard__tableBody, .dashboard__table):has(> .cw-frm, > * > .cw-frm, .cw-frm) { overflow: visible !important; }
/* Effort sheet: who filled it, the day's total, the activity-type picker row */
.cw-et-who { display: flex; align-items: center; gap: 6px; height: var(--h-input, 34px); font-weight: 600; color: var(--ink); }
.cw-et-total { display: flex; align-items: center; gap: 6px; height: var(--h-input, 34px); }
.cw-et-total span:not(.cw-muted) { font-weight: 700; }
.cw-et-add { display: flex; align-items: center; gap: var(--s4); flex-wrap: wrap; margin-bottom: var(--s3); }
.cw-et-add #fillefforttracker { display: none; }
/* Gatepoint: the field grid in the narrower column beside the rail, and its action row under the step pills */
.pm-gp .cw-frm__main .pm-grid { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
@media (max-width: 700px) { .pm-gp .cw-frm__main .pm-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; } }
:root .pm-gp .cw-gp-actions { position: static; padding: 0; margin: 0 0 var(--s3); justify-content: flex-start; }
.pm-gp .cw-gp-actions:not(:has(.pm-nav-actions)) { display: none; }
.pm-gp .cw-gp-actions .pm-nav-actions { margin-left: 0; }
.cw-gp-editbar a { color: var(--accent); font-weight: 600; }
/* Resource request: the parts list inside its section card; the edit page's material-requisition heading */
#cwRrParts #importPartsButtonContainer { margin: 0 0 var(--s2) !important; }
#cwRrParts #resourceCenterPartsSpacer { margin: 0 !important; min-height: 0 !important; }
.cw-rr-parts { max-height: 440px; overflow-y: auto; }
.cw-rr-parts-hd { padding: 0 0 var(--s3) !important; margin-bottom: var(--s3); border-bottom: 1px solid var(--line-2); }
#partsDetailDiv { margin-top: 0 !important; }
/* empty validation summaries and helper blocks left inside a section's field grid take no cell */
.cw-frm .cw-fgrid > div.validation-summary-valid, .cw-frm .cw-fgrid > div:empty { display: none; }
/* checklist items: the "Items *" caption row with Add / Import above the list */
#cwClItems .inline-container { margin-top: 0 !important; margin-bottom: var(--s2); }
#cwClItems .inline-container > label { font-size: var(--fs-md) !important; }
/* Kaizen Cost & Savings: the "INR" prefix and its amount are one joined field (the kit's rounded inputs left the
   prefix as a loose grey tag in front of a separate box) */
:root .kz-input-prefix { display: flex; align-items: stretch; width: 100%; border-radius: var(--r-md); }
:root .kz-input-prefix > .kz-input-prefix__addon {
  display: inline-flex; align-items: center; flex: 0 0 auto; padding: 0 12px; min-height: 35px;
  font-size: var(--fs-sm); font-weight: 700; letter-spacing: .3px; color: var(--muted); background: var(--surface-2);
  border: 1px solid var(--line-strong) !important; border-right: 0 !important; border-radius: var(--r-md) 0 0 var(--r-md) !important;
}
:root .kz-input-prefix > .form-control { flex: 1 1 auto; min-width: 0; border-radius: 0 var(--r-md) var(--r-md) 0 !important; border-color: var(--line-strong); }
:root .kz-input-prefix:focus-within { box-shadow: 0 0 0 3px var(--accent-ring); }
:root .kz-input-prefix:focus-within > .kz-input-prefix__addon, :root .kz-input-prefix > .form-control:focus { border-color: var(--accent) !important; box-shadow: none !important; }
:root .kz-input-prefix + .kz-help { display: block; margin-top: 6px; }

/* A bar with many actions (Update Resource Request: Drop, Transfer, Request Approval, Issue Material, SapApiLogs,
   Download PDF, Cancel, Save) has no room for the form status beside them: it takes its own full row above the
   buttons instead of being cut to "All required fi…" */
:root .cw-form-page .cw-factions-bar:has(> :nth-child(8)) { flex-wrap: wrap !important; row-gap: var(--s2); }
:root .cw-form-page .cw-factions-bar:has(> :nth-child(8)) > .cw-fnote { flex: 1 0 100%; order: -1; white-space: normal; overflow: visible; }

/* Parts tables (Add / Update Resource Request, Resource Bulk): the "+" (add a row) and "−" (remove this row) buttons
   are equal squares, centred in their cell, side by side — rows that hide "+" keep "−" in the middle too */
:root .cw-form-page td:has(> button[onclick*="removeRow"]),
:root .dashboard__content td:has(> button[onclick*="removeRow"]) { text-align: center !important; vertical-align: middle !important; white-space: nowrap; min-width: 92px; }
:root .cw-form-page td > button:is([onclick*="removeRow"], [onclick*="addNewRow"], [onclick*="addResourceRequestNewRow"]),
:root .dashboard__content td > button:is([onclick*="removeRow"], [onclick*="addNewRow"], [onclick*="addResourceRequestNewRow"]) {
  display: inline-flex !important; align-items: center; justify-content: center; width: 32px !important; min-width: 32px !important; height: 32px !important;
  padding: 0 !important; margin: 0 3px !important; border-radius: var(--r-md) !important; font-size: 16px !important; font-weight: 700 !important; line-height: 1 !important; vertical-align: middle;
}
:root .cw-form-page td > button[onclick*="removeRow"], :root .dashboard__content td > button[onclick*="removeRow"] {
  background: var(--card) !important; color: var(--text-2) !important; border: 1px solid var(--line-strong) !important;
}
:root .cw-form-page td > button[onclick*="removeRow"]:hover:not(:disabled), :root .dashboard__content td > button[onclick*="removeRow"]:hover:not(:disabled) { color: var(--crit) !important; border-color: var(--crit) !important; }
:root .cw-form-page td > button[onclick*="removeRow"]:disabled, :root .dashboard__content td > button[onclick*="removeRow"]:disabled { opacity: .45; }

/* Update Resource Request › Edit details: the "Cost Center Details" sub-heading lines up with the fields under it */
:root .cw-form-page h6.rr-sub-hd, :root h6.rr-sub-hd {
  margin: var(--s4) 20px var(--s2) !important; padding: 0 0 var(--s2); border-bottom: 1px solid var(--line-2);
  font-size: var(--fs-md) !important; font-weight: 700 !important; color: var(--ink) !important; letter-spacing: 0; text-transform: none;
}

/* Add / Edit User › Mobile: the country code button and the number are one joined field (they drifted apart as a
   loose "IN +91 ·" tag in front of a separately rounded box) */
:root .mobile-with-country { display: flex !important; align-items: stretch; width: 100%; gap: 0 !important; border-radius: var(--r-md); }
:root .mobile-with-country .country-code-toggle {
  height: 35px !important; padding: 0 10px !important; gap: 6px; background: var(--surface-2) !important; color: var(--text) !important;
  border: 1px solid var(--line-strong) !important; border-right: 0 !important; border-radius: var(--r-md) 0 0 var(--r-md) !important;
  font-size: var(--fs-md); font-weight: 600; white-space: nowrap;
}
:root .mobile-with-country .country-code-flag { font-size: var(--fs-xs); font-weight: 700; color: var(--muted); letter-spacing: .3px; }
:root .mobile-with-country .country-code-caret { font-size: 10px; color: var(--faint); line-height: 1; }
:root .mobile-with-country > .form-control { flex: 1 1 auto; min-width: 0; height: 35px !important; border-color: var(--line-strong); border-radius: 0 var(--r-md) var(--r-md) 0 !important; }
:root .mobile-with-country:focus-within { box-shadow: 0 0 0 3px var(--accent-ring); }
:root .mobile-with-country:focus-within .country-code-toggle, :root .mobile-with-country > .form-control:focus { border-color: var(--accent) !important; box-shadow: none !important; }
:root .mobile-with-country .country-code-menu { background: var(--card) !important; border-color: var(--line) !important; box-shadow: var(--sh-2); border-radius: var(--r-lg); }

/* lookup picker: the grid area takes the rest of the dialog body (the grid sizes itself to it, cw-form.js fit) */
:root .modal.cw-pickdlg.cw-lkdlg .modal-body { display: flex; flex-direction: column; min-height: 0; }
:root .modal.cw-pickdlg.cw-lkdlg .cw-lkdlg__grid { flex: 1 1 auto; min-height: 0; overflow: hidden; }

/* Select Tracker Issues: the grid's rows shrink to fit a short screen (345px = the dialog's title, footer and margins plus
   the grid's toolbar, header and pager), so the pager stays above the footer and the rows are the only thing that scrolls */
#selectRelatedIssueActionModal #GridRelatedTrackerIssuesToSelect .e-gridcontent > .e-content { height: min(500px, calc(100vh - 345px)) !important; }

/* Lookup dialogs: the rows shrink with a short screen (327px = the dialog's head, search, selection line, grid header, pager and footer), so the pager never ends up under the footer */
:root .modal.cw-pickdlg.cw-lkdlg .e-grid .e-gridcontent > .e-content { height: calc(min(720px, 88vh) - 327px) !important; }
