/* =====================================================================
   Connectwell UI kit — every Syncfusion grid drawn like the mockup grid
   (ui.css table.grid): light header with no column dividers, sentence-case
   11.5px headings, 12px cells on hairline rows, bold record numbers, people
   with an avatar, kit status pills and the kit pager.
   It overrides grid-status-ux.css (the app-wide .cis-grid look), so every
   rule starts with :root to outrank its selectors. Grids that opt out with
   .cis-grid-plain keep the stock theme. js/kit/cw-grid.js adds the record
   number and avatar marks; nothing here changes what a grid does.
   ===================================================================== */

/* ---------------- Colours: the kit's tokens, light and dark ---------------- */
:root, :root[data-theme="dark"], :root[data-theme="dark"] .kd, :root .kd {
  --cis-grid-border: var(--line);
  --cis-grid-line: var(--line-2);
  --cis-grid-header-bg: var(--surface-2);
  --cis-grid-header-bg-hover: var(--hover);
  --cis-grid-header-text: var(--text-2);
  --cis-grid-toolbar-bg: var(--card);
  --cis-grid-surface: var(--card);
  --cis-grid-text: var(--text);
  --cis-grid-muted: var(--muted);
  --cis-grid-row-hover: var(--row-hover);
  --cis-grid-radius: var(--r-lg);
}

/* ---------------- Frame ---------------- */
:root .e-grid.cis-grid { border-color: var(--line); border-radius: var(--r-lg); font-family: var(--font); }

/* ---------------- Toolbar ---------------- */
:root .e-grid.cis-grid .e-toolbar { border-bottom: 1px solid var(--line-2) !important; }
:root .e-grid.cis-grid .e-toolbar .e-toolbar-item .e-tbar-btn { border-radius: var(--r-md) !important; color: var(--text-2) !important; }
:root .e-grid.cis-grid .e-toolbar .e-toolbar-item .e-tbar-btn .e-tbar-btn-text { font-size: var(--fs-md) !important; font-weight: 600 !important; color: inherit !important; }
:root .e-grid.cis-grid .e-toolbar .e-toolbar-item .e-tbar-btn .e-icons { color: inherit !important; }
:root .e-grid.cis-grid .e-toolbar .e-toolbar-item .e-tbar-btn:hover,
:root .e-grid.cis-grid .e-toolbar .e-toolbar-item .e-tbar-btn:focus-visible { background: var(--hover) !important; border-color: transparent !important; color: var(--text) !important; }
:root .e-grid.cis-grid .e-toolbar .e-toolbar-item .e-tbar-btn:hover .e-tbar-btn-text, :root .e-grid.cis-grid .e-toolbar .e-toolbar-item .e-tbar-btn:hover .e-icons { color: var(--text) !important; }
:root .e-grid.cis-grid .e-toolbar .e-toolbar-item .e-search { border-color: var(--line) !important; border-radius: var(--r-md) !important; background: var(--card) !important; }
:root .e-grid.cis-grid .e-toolbar .e-toolbar-item .e-search:focus-within { border-color: var(--accent) !important; box-shadow: 0 0 0 3px var(--accent-ring) !important; }
:root .e-grid.cis-grid .e-toolbar .e-toolbar-item .e-search input.e-input { font-size: var(--fs-md) !important; color: var(--text) !important; text-transform: none !important; }
:root .e-grid.cis-grid .e-toolbar .e-toolbar-item .e-search input.e-input::placeholder { color: var(--faint); }

/* ---------------- Header: one light band, no dividers ---------------- */
:root .e-grid.cis-grid .e-gridheader { box-shadow: none; border-bottom: 1px solid var(--line) !important; }
:root .e-grid.cis-grid .e-gridheader .e-headercell,
:root .e-grid.cis-grid .e-gridheader .e-detailheadercell,
:root .e-grid.cis-grid .e-gridheader .e-stackedheadercell { border-color: transparent !important; }
:root .e-grid.cis-grid .e-gridheader .e-stackedheadercell { border-bottom-color: var(--line-2) !important; }
:root .e-grid.cis-grid .e-headercelldiv,
:root .e-grid.cis-grid .e-stackedheadercelldiv,
:root .e-grid.cis-grid .e-headercelldiv .e-headertext,
:root .e-grid.cis-grid .e-stackedheadercelldiv .e-headertext,
:root .dashboard__tableBody .dashboard__tableBodyTable .e-control.e-grid.cis-grid .e-headercelldiv {
  font-family: var(--font); font-size: var(--fs-grid-head) !important; font-weight: 600 !important; letter-spacing: 0 !important; text-transform: none !important; color: var(--text-2) !important;
}
:root .e-grid.cis-grid .e-gridheader .e-headercell:hover .e-headertext { color: var(--ink) !important; }
/* Column resize grip: invisible until the header is hovered, so it is still found */
:root .e-grid.cis-grid .e-gridheader .e-rhandler { border-right-color: transparent !important; }
:root .e-grid.cis-grid .e-gridheader .e-headercell:hover .e-rhandler { border-right-color: var(--line) !important; }
/* Sort arrow and filter funnel: faint, accent when on (mockup .sarr / .fil) */
:root .e-grid.cis-grid .e-gridheader .e-sortfilterdiv,
:root .e-grid.cis-grid .e-gridheader .e-filtermenudiv,
:root .e-grid.cis-grid .e-gridheader .e-icon-filter { color: var(--faint) !important; font-size: 12px !important; }
:root .e-grid.cis-grid .e-gridheader .e-filtermenudiv { border-radius: var(--r-sm); }
:root .e-grid.cis-grid .e-gridheader .e-filtermenudiv:hover { color: var(--text) !important; background: var(--line-2); }
:root .e-grid.cis-grid .e-gridheader .e-sortfilterdiv.e-ascending,
:root .e-grid.cis-grid .e-gridheader .e-sortfilterdiv.e-descending,
:root .e-grid.cis-grid .e-gridheader .e-filtermenudiv.e-filtered,
:root .e-grid.cis-grid .e-gridheader .e-filtermenudiv.e-filtered::before,
:root .e-grid.cis-grid .e-gridheader .e-icon-filter.e-filtered { color: var(--accent) !important; }
:root .e-grid.cis-grid .e-gridheader .e-filtermenudiv.e-filtered { background: var(--accent-soft); }

/* ---------------- Rows ---------------- */
:root .e-grid.cis-grid .e-rowcell,
:root .dashboard__tableBody .dashboard__tableBodyTable .e-control.e-grid.cis-grid .e-rowcell { border-color: var(--line-2) !important; color: var(--text); font-family: var(--font); }
:root .e-grid.cis-grid td.e-rowcell.e-active,
:root .e-grid.cis-grid td.e-rowcell.e-selectionbackground { background-color: var(--accent-soft) !important; color: var(--text) !important; }
:root .e-grid.cis-grid tr.e-row[aria-selected="true"] > td.e-rowcell:first-child,
:root .e-grid.cis-grid tr.e-row > td.e-rowcell.e-active:first-child { box-shadow: none; }
:root .e-grid.cis-grid .e-emptyrow td { color: var(--muted) !important; }
:root .e-grid.cis-grid .e-groupcaption, :root .e-grid.cis-grid .e-indentcell,
:root .e-grid.cis-grid .e-recordplusexpand, :root .e-grid.cis-grid .e-recordpluscollapse,
:root .e-grid.cis-grid .e-summarycell, :root .e-grid.cis-grid .e-gridfooter { background-color: var(--surface-2) !important; border-color: var(--line-2) !important; }
:root .e-grid.cis-grid .e-summarycell { color: var(--text) !important; }

/* Record number column (js/kit/cw-grid.js marks it): bold ink, tabular figures — mockup .code */
:root .e-grid.cis-grid td.e-rowcell.cw-code-cell { font-weight: 700 !important; color: var(--ink) !important; font-variant-numeric: tabular-nums; }
:root .e-grid.cis-grid td.e-rowcell.cw-code-cell * { font-weight: 700 !important; }

/* People: avatar + name — mockup .cellp */
:root .e-grid.cis-grid .cw-cellp { display: inline-flex; align-items: center; gap: var(--s2); max-width: 100%; min-width: 0; vertical-align: middle; }
:root .e-grid.cis-grid .cw-cellp .cw-av { width: 22px; height: 22px; font-size: 9.5px !important; flex: 0 0 auto; }
:root .e-grid.cis-grid .cw-cellp__n { display: inline-block; line-height: 1.4 !important; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
:root .e-grid.cis-grid .cw-cellp .cw-av { line-height: 22px !important; }

/* Checkboxes in rows (selection, watch list): mockup size, kit accent */
:root .e-grid.cis-grid .e-rowcell input[type="checkbox"] { width: 15px; height: 15px; accent-color: var(--accent); cursor: pointer; vertical-align: middle; }
:root .e-grid.cis-grid .e-checkbox-wrapper .e-frame { border-color: var(--line-strong); border-radius: 4px; }

/* ---------------- Status pills: kit tones and mockup size ---------------- */
:root .e-grid .cis-status-chip { height: 20px; padding: 0 8px; font-size: 10.5px !important; font-weight: 700 !important; gap: 5px; line-height: 1; }
:root .cis-status-chip.cis-tone-neutral, :root .cis-status-chip.cis-tone-muted { background: var(--idle-bg); border-color: var(--idle-line); color: var(--idle); }
:root .cis-status-chip.cis-tone-info, :root .cis-status-chip.cis-tone-progress { background: var(--info-bg); border-color: var(--info-line); color: var(--info); }
:root .cis-status-chip.cis-tone-success { background: var(--ok-bg); border-color: var(--ok-line); color: var(--ok); }
:root .cis-status-chip.cis-tone-warning { background: var(--wip-bg); border-color: var(--wip-line); color: var(--wip); }
:root .cis-status-chip.cis-tone-danger { background: var(--crit-bg); border-color: var(--crit-line); color: var(--crit); }
:root .cis-status-chip::before { opacity: 1; }

/* ---------------- Pager: "Showing …" left, page buttons in the middle (QA 916), page size right ---------------- */
:root .e-grid.cis-grid .e-gridpager.e-pager, :root .e-grid.cis-grid .e-pager {
  background: var(--card) !important; border-top: 1px solid var(--line-2) !important; color: var(--muted) !important; font-family: var(--font); font-size: var(--fs-sm);
  padding: var(--s3) var(--s4) !important; display: flex; align-items: center; gap: var(--s1); flex-wrap: wrap;
}
:root .e-grid.cis-grid .e-pager .e-parentmsgbar { order: -1; margin-right: auto; padding: 0 !important; float: none !important; color: var(--muted) !important; font-size: var(--fs-sm) !important; }
:root .e-grid.cis-grid .e-pager .e-pagercontainer { display: inline-flex; gap: var(--s1); border: 0 !important; margin: 0 !important; background: transparent !important; float: none; vertical-align: middle; }
:root .e-grid.cis-grid .e-pager .e-numericitem, :root .e-grid.cis-grid .e-pager .e-pagercontainer .e-icons,
:root .e-grid.cis-grid .e-pager > .e-mfirst, :root .e-grid.cis-grid .e-pager > .e-mprev, :root .e-grid.cis-grid .e-pager > .e-mnext, :root .e-grid.cis-grid .e-pager > .e-mlast {
  min-width: 28px; height: 28px; line-height: 26px; padding: 0 6px !important; border: 1px solid var(--line) !important; border-radius: var(--r-sm) !important; background: var(--card) !important;
  color: var(--text-2) !important; font-weight: 600 !important; font-size: var(--fs-sm) !important; text-align: center; margin: 0 !important; box-shadow: none !important;
}
:root .e-grid.cis-grid .e-pager .e-numericitem:hover { border-color: var(--line-strong) !important; color: var(--ink) !important; }
/* (.e-numericitem.e-currentitem: as specific as the generated dark rule for the page numbers, which it must beat) */
:root .e-grid.cis-grid .e-pager .e-currentitem, :root .e-grid.cis-grid .e-pager .e-currentitem:hover, :root .e-grid.cis-grid .e-pager .e-numericitem.e-currentitem, :root .e-grid.cis-grid .e-pager .e-numericitem.e-currentitem:hover { background: var(--inverse) !important; color: var(--on-inverse) !important; border-color: var(--inverse) !important; }
:root .e-grid.cis-grid .e-pager .e-disable, :root .e-grid.cis-grid .e-pager .e-firstpagedisabled, :root .e-grid.cis-grid .e-pager .e-prevpagedisabled,
:root .e-grid.cis-grid .e-pager .e-nextpagedisabled, :root .e-grid.cis-grid .e-pager .e-lastpagedisabled { opacity: .4; }
:root .e-grid.cis-grid .e-pager .e-pagesizes { float: none; display: inline-flex; align-items: center; gap: var(--s1); margin-left: var(--s2); }
:root .e-grid.cis-grid .e-pager .e-pagesizes .e-input-group { height: 28px; border-radius: var(--r-sm) !important; border-color: var(--line) !important; background: var(--card) !important; }
:root .e-grid.cis-grid .e-pager .e-pagesizes .e-pagerconstant { color: var(--muted) !important; font-size: var(--fs-sm) !important; margin: 0 0 0 4px; }

/* =====================================================================
   Register grids (inside the kit's register card)
   ===================================================================== */
:root .cw-reg .e-grid.cis-grid { border: 0; border-radius: 0 0 var(--r-lg) var(--r-lg); }
/* 36px rows, 12px padding like the mockup cells */
:root .cw-reg .e-grid.cis-grid .e-rowcell { height: 36px; padding: 4px 12px !important; }
:root .cw-reg .e-grid.cis-grid .e-gridheader .e-headercell:not(.e-stackedheadercell) { height: 36px !important; }

/* One toolbar row like the mockup: Views, Overdue and the sort note on the left of the search,
   the grid's own tools after it, Actions and New on the right. The page's controls sit in an
   overlay just before the grid (js/kit/cw-register.js), so the grid's toolbar keeps its own
   items and keyboard handling; it only leaves room for them. */
.cw-reg .cw-gt-over { position: relative; height: 0; z-index: 6; }
.cw-reg .cw-gt-lead, .cw-reg .cw-gt-tail { position: absolute; top: 0; height: 56px; display: flex; align-items: center; gap: var(--s2); }
.cw-reg .cw-gt-lead { left: var(--s4); max-width: 60%; }
.cw-reg .cw-gt-tail { right: var(--s4); }
.cw-reg .cw-gt-tail:not(:empty)::before { content: ""; width: 1px; height: 22px; background: var(--line); margin: 0 var(--s1) 0 0; }
.cw-reg .cw-gt-lead > *, .cw-reg .cw-gt-tail > * { margin: 0 !important; flex: 0 0 auto; }
.cw-reg .cw-gt-lead .switch-control { display: inline-flex; align-items: center; gap: var(--s2); margin: 0 !important; }
.cw-reg .cw-gt-lead .switch-control label { margin: 0 !important; font-size: var(--fs-md); font-weight: 600; color: var(--text-2); }
.cw-reg .cw-gt-tail > .dropdown > .btn { height: var(--h-btn); border: 1px solid var(--line); border-radius: var(--r-md); background: var(--card); color: var(--text); font-weight: 600; font-size: var(--fs-md); padding: 0 var(--s3); }
.cw-reg .cw-gt-tail > .dropdown > .btn:hover { border-color: var(--line-strong); }
.cw-reg .cw-sortchip { display: inline-flex; align-items: center; gap: 6px; height: var(--h-btn); max-width: 200px; padding: 0 var(--s3); border: 1px solid var(--line); border-radius: var(--r-md); background: var(--card); color: var(--text); font-size: var(--fs-md); font-weight: 600; white-space: nowrap; cursor: default; }
.cw-reg .cw-sortchip > span { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.cw-reg .cw-sortchip .cw-i { width: 15px; height: 15px; color: var(--text-2); flex: 0 0 auto; }
.cw-reg .cw-sortchip.cw-on { border-color: var(--accent-line); background: var(--accent-soft); color: var(--accent-ink); }
.cw-reg .cw-sortchip.cw-on .cw-i { color: var(--accent); }
.cw-reg .cw-sortchip[hidden] { display: none; }
.cw-reg.cw-gt-merged .dashboard__tableBody .cis-grid-note { display: none !important; }
:root .cw-reg.cw-gt-stack .e-grid.cis-grid > .e-toolbar.cw-gt-toolbar.cw-gt-room { padding-top: 56px !important; }
.cw-reg.cw-gt-stack .cw-gt-lead { max-width: calc(100% - 260px); }
.cw-reg > .cw-reg__head.cw-reg__head--empty { display: none !important; }

:root .cw-reg .e-grid.cis-grid > .e-toolbar.cw-gt-toolbar.cw-gt-room {
  display: flex !important; align-items: center; gap: var(--s2); min-height: 56px; height: auto !important;
  padding: 0 calc(var(--cw-gt-r, 0px) + var(--s4)) 0 calc(var(--cw-gt-l, 0px) + var(--s4)) !important;
}
:root .cw-reg .e-toolbar.cw-gt-room > .e-toolbar-items,
:root .cw-reg .e-toolbar.cw-gt-room > .e-toolbar-items > .e-toolbar-left,
:root .cw-reg .e-toolbar.cw-gt-room > .e-toolbar-items > .e-toolbar-right { display: contents !important; }
:root .cw-reg .e-toolbar.cw-gt-room > .e-toolbar-items > .e-toolbar-center { display: none !important; }
:root .cw-reg .e-toolbar.cw-gt-room .e-toolbar-item { order: 5; min-height: 0 !important; height: auto !important; padding: 0 !important; margin: 0 !important; }
:root .cw-reg .e-toolbar.cw-gt-room .e-toolbar-left > .e-toolbar-item { order: 6; }
:root .cw-reg .e-toolbar.cw-gt-room .e-toolbar-item.e-search-wrapper { order: 1; margin-right: auto !important; }
:root .cw-reg .e-toolbar.cw-gt-room .e-toolbar-item.e-search-wrapper .e-search { width: 220px; min-width: 150px; }

/* Register cells force 12px on everything inside (cw-register.css); pills and avatars keep their own size */
:root .cw-reg .dashboard__tableBody .dashboard__tableBodyTable .e-control.e-grid .e-rowcell .cis-status-chip { font-size: 10.5px !important; }
:root .cw-reg .dashboard__tableBody .dashboard__tableBodyTable .e-control.e-grid .e-rowcell .cw-av { font-size: 9.5px !important; }

/* Grid toolbar button while its job runs (e.g. Excel export): a small spinner in place of the icon */
:root .e-grid .e-toolbar .e-toolbar-item .e-tbar-btn.cw-busy { cursor: progress; opacity: 1; }
:root .e-grid .e-toolbar .e-toolbar-item .e-tbar-btn.cw-busy .cw-i,
:root .e-grid .e-toolbar .e-toolbar-item .e-tbar-btn.cw-busy .e-btn-icon { display: none !important; }
:root .e-grid .e-toolbar .e-toolbar-item .e-tbar-btn.cw-busy::before {
  content: ""; width: 15px; height: 15px; border-radius: 50%; border: 2px solid var(--line-strong); border-top-color: var(--accent); animation: rot .7s linear infinite; flex: 0 0 auto;
}

/* Empty grid (mockup .empty): icon, the grid's own "No records" text and a hint, pinned to the visible width */
:root .e-grid.cis-grid .e-emptyrow > td { padding: 0 !important; text-align: left !important; }
:root .e-grid.cis-grid .cw-gempty {
  position: sticky; left: 0; box-sizing: border-box; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  min-height: 180px; padding: var(--s6, 32px) var(--s4); text-align: center; color: var(--muted); white-space: normal;
}
:root .e-grid.cis-grid .cw-gempty .cw-i { width: 28px !important; height: 28px !important; color: var(--faint); margin-bottom: 6px; stroke-width: 1.6; }
:root .e-grid.cis-grid .cw-gempty b { font-size: var(--fs-lg, 14px) !important; font-weight: 700; color: var(--ink); }
:root .e-grid.cis-grid .cw-gempty span { font-size: var(--fs-sm) !important; color: var(--muted); }

/* Switches in the register toolbar (e.g. Overdue): the kit's compact toggle */
.cw-reg .cw-gt-lead .switch-control > div { display: inline-flex; align-items: center; gap: var(--s2); }
.cw-reg .cw-gt-lead .e-switch-wrapper { width: 34px !important; height: 20px !important; }
.cw-reg .cw-gt-lead .e-switch-wrapper .e-switch-inner { height: 20px !important; border-radius: 999px !important; background: var(--line-strong) !important; border-color: var(--line-strong) !important; }
.cw-reg .cw-gt-lead .e-switch-wrapper .e-switch-inner.e-switch-active { background: var(--accent) !important; border-color: var(--accent) !important; }
.cw-reg .cw-gt-lead .e-switch-wrapper .e-switch-on, .cw-reg .cw-gt-lead .e-switch-wrapper .e-switch-off { background: transparent !important; text-indent: -9999px; }
.cw-reg .cw-gt-lead .e-switch-wrapper .e-switch-handle { width: 14px !important; height: 14px !important; top: 3px !important; bottom: auto !important; left: 3px !important; margin: 0 !important; background: #fff !important; box-shadow: 0 1px 2px rgba(15, 23, 42, .25); }
.cw-reg .cw-gt-lead .e-switch-wrapper .e-switch-handle.e-switch-active { left: 17px !important; margin: 0 !important; }

/* Listing pages before the register is wired (html.cw-reg-boot, set by cw-register.js): the controls that move
   to the toolbar row, and the grid's stock toolbar, keep their space but are not painted yet — no draw-then-jump */
html.cw-reg-boot .dashboard__content .dashboard__table .dashboard__tableHeadViews,
html.cw-reg-boot .dashboard__content .dashboard__table .switch-control,
html.cw-reg-boot .dashboard__content .dashboard__table > .dashboard__tableHead > :is(button, .dropdown, .dashboard__userAction, .popupSm__wrapper),
html.cw-reg-boot .dashboard__content .dashboard__table .e-grid > .e-toolbar:not(.cw-gt-room),
html.cw-reg-boot .dashboard__content .dashboard__table .cis-grid-note { visibility: hidden; }
/* a head that wraps while its controls are still in it is held at its final (remembered) height */
html.cw-reg-boot .dashboard__content .dashboard__table > .cw-reg__head { max-height: var(--cw-reg-head, none); overflow: hidden; }
html.cw-reg-boot .dashboard__content .dashboard__table .e-grid > .e-toolbar { min-height: var(--cw-reg-gt, 0px); }

/* Summary cards while their counts load (cw-register.js reserveKpis): same size as a card, shimmering bars */
.cw-kpis .cw-kpi.cw-kpi--wait { pointer-events: none; }
.cw-kpis .cw-kpi.cw-kpi--wait i { font-style: normal; color: transparent; border-radius: 5px; background: linear-gradient(90deg, var(--chip-bg) 25%, var(--surface-2) 50%, var(--chip-bg) 75%); background-size: 200% 100%; animation: shimmer 1.1s infinite; }
.cw-kpis .cw-kpi.cw-kpi--wait::before { background: var(--line); }

/* Space held for a register's summary cards until they are drawn (set in _Layout.cshtml <head>, released by cw-register.js) */
/* (the register table from its first frame — not only once its body has been parsed) */
html.cw-kpi-hold .dashboard__content .dashboard__table:not(:is(.dashboard__table, .modal, .e-dialog, .tab-pane) .dashboard__table) { margin-top: var(--cw-kpi-hold, 157px) !important; }

/* The sort chip sits right after the search box (cw-register.js places it), never in the left group */
.cw-reg .cw-gt-over > .cw-sortchip { position: absolute; transform: translateY(-50%); z-index: 1; }

/* =====================================================================
   Loading skeleton — every Syncfusion grid, every app on the kit.
   While the grid's own loading flag is up (> .e-spinner-pane.e-spin-show: first load, paging, sorting,
   filtering, search, tab switch), the row area shows shimmering placeholder rows in the mockup's row rhythm
   (36px rows, a bar per cell) instead of a lone spinner over "No records to display". Pure CSS keyed on
   Syncfusion's own class, so no grid needs any code; .cis-grid-plain grids keep the stock spinner.
   ===================================================================== */
.e-grid:not(.cis-grid-plain):has(> .e-spinner-pane.e-spin-show) > .e-spinner-pane { visibility: hidden; }
.e-grid:not(.cis-grid-plain):has(> .e-spinner-pane.e-spin-show) > .e-gridcontent { position: relative; }
/* row lines on the card colour (covers stale rows and the "No records" row underneath) */
.e-grid:not(.cis-grid-plain):has(> .e-spinner-pane.e-spin-show) > .e-gridcontent::before {
  content: ""; position: absolute; inset: 0; z-index: 4; pointer-events: none;
  background: repeating-linear-gradient(to bottom, transparent 0 35px, var(--line-2, #eef1f4) 35px 36px) var(--card, #fff);
}
/* a bar per cell, shimmering left to right */
.e-grid:not(.cis-grid-plain):has(> .e-spinner-pane.e-spin-show) > .e-gridcontent::after {
  content: ""; position: absolute; inset: 0; z-index: 5; 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;
  -webkit-mask-image: repeating-linear-gradient(to bottom, transparent 0 13px, #000 13px 23px, transparent 23px 36px), repeating-linear-gradient(to right, transparent 0 12px, #000 12px 132px, transparent 132px 200px);
  -webkit-mask-composite: source-in;
  mask-image: repeating-linear-gradient(to bottom, transparent 0 13px, #000 13px 23px, transparent 23px 36px), repeating-linear-gradient(to right, transparent 0 12px, #000 12px 132px, transparent 132px 200px);
  mask-composite: intersect;
}
@keyframes cw-grid-shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }
@media (prefers-reduced-motion: reduce) { .e-grid:has(> .e-spinner-pane.e-spin-show) > .e-gridcontent::after { animation: none; } }

/* Tab counts while they load: a shimmering pill in the count's place, so tabs keep their width.
   Before the register is wired the placeholder is drawn by CSS on the server-rendered head (cw-reg__head). */
.cw-reg__head .cw-tcount.cw-tcount--wait { display: inline-block; width: 22px; height: 16px; padding: 0; vertical-align: middle; }
.cw-reg__head .cw-tcount.cw-tcount--wait,
.dashboard__table:not(.cw-reg) > .cw-reg__head .btn-group label.btn:not(:has(.cw-tcount))::after {
  background: linear-gradient(90deg, var(--chip-bg) 25%, var(--surface-2) 50%, var(--chip-bg) 75%); background-size: 200% 100%; animation: shimmer 1.1s infinite; border-radius: var(--r-pill);
}
.dashboard__table:not(.cw-reg) > .cw-reg__head .btn-group label.btn:not(:has(.cw-tcount))::after { content: ""; display: inline-block; width: 22px; height: 16px; vertical-align: middle; }

/* "Select Action" and similar page menus (popupSm__wrapper .popup-sm) drawn as the kit menu (mockup .pop / .mi) */
.dashboard .popupSm__wrapper .popup-sm {
  background: var(--card) !important; border: 1px solid var(--line) !important; border-radius: var(--r-lg) !important; box-shadow: var(--sh-2) !important;
  padding: var(--s1) !important; min-width: 220px; font-family: var(--font);
}
.dashboard .popupSm__wrapper .popup-sm > li { list-style: none; margin: 0; }
/* placed in the window by cw-kit.js while open, so it is never cut off by the page edge or a clipped section */
/* a closed menu takes no room: invisible but laid out, it stuck out past the register's right edge and made the whole
   register (toolbar included) scroll sideways with the grid */
.popupSm__wrapper:not(.popup__active) > .popup-sm { display: none !important; }
.popupSm__wrapper .popup-sm.cw-pop-fixed { position: fixed !important; right: auto !important; bottom: auto !important; margin: 0 !important; z-index: 1080 !important; transition: opacity .2s ease-out, transform .2s ease-out !important; }
.dashboard .popupSm__wrapper .popup-sm > li > .btn {
  display: flex !important; align-items: center; gap: var(--s2); width: 100%; justify-content: flex-start; text-align: left;
  padding: 7px var(--s2) !important; border: 0 !important; border-radius: var(--r-sm) !important; background: transparent !important;
  font-size: var(--fs-md) !important; font-weight: 500 !important; color: var(--text) !important; box-shadow: none !important; height: auto !important;
}
/* a menu item the page hides (by role, inline display:none / [hidden] / .d-none) stays hidden despite display: flex !important */
.dashboard .popupSm__wrapper .popup-sm > li > .btn:is(.d-none, [hidden], [style*="display: none"], [style*="display:none"]) { display: none !important; }
.dashboard .popupSm__wrapper .popup-sm > li > .btn:hover:not(:disabled) { background: var(--hover) !important; color: var(--ink) !important; }
.dashboard .popupSm__wrapper .popup-sm > li > .btn:disabled, .dashboard .popupSm__wrapper .popup-sm > li > .btn.cw-act-off { color: var(--faint) !important; cursor: not-allowed; opacity: 1; pointer-events: none; }
.dashboard .popupSm__wrapper .popup-sm > li > hr { margin: var(--s1) 0; border-color: var(--line-2); opacity: 1; }
.dashboard .popupSm__wrapper .popup-sm > li.cw-act-hint {
  display: flex; align-items: center; gap: 6px; padding: 6px var(--s2) 8px; margin-bottom: 2px; border-bottom: 1px solid var(--line-2);
  font-size: var(--fs-xs); color: var(--muted); white-space: normal; line-height: 1.4;
}
.dashboard .popupSm__wrapper .popup-sm > li.cw-act-hint .cw-i { width: 13px; height: 13px; color: var(--faint); flex: 0 0 auto; }

/* First visit, before cw-register.js has run: the server-rendered register head (cw-reg__head) keeps the controls that
   will move to the toolbar row, and the grid's stock toolbar, unpainted — so they never show in the tab row and then
   jump. Pure CSS (no script needed to hide); as a fail-safe they show themselves after 5 s whatever happens. */
.dashboard__content .dashboard__table:not(.cw-reg) > .cw-reg__head :is(.dashboard__tableHeadViews, .switch-control),
.dashboard__content .dashboard__table:not(.cw-reg) > .cw-reg__head > :is(button, .dropdown, .dashboard__userAction, .popupSm__wrapper),
.dashboard__content .dashboard__table:not(.cw-reg):has(> .cw-reg__head) > .dashboard__tableBody .e-grid > .e-toolbar,
.dashboard__content .dashboard__table:not(.cw-reg):has(> .cw-reg__head) > .dashboard__tableBody .cis-grid-note { visibility: hidden; animation: cw-reveal 0s linear 5s forwards; }
@keyframes cw-reveal { to { visibility: visible; } }

/* Grid search box: one box, one focus ring. The input and its wrapper both carry Syncfusion's .e-search class, so
   box rules hit both and drew a ring inside a ring; the input is now borderless inside the wrapper. */
:root .e-grid .e-toolbar .e-search-wrapper .e-input-group.e-search input.e-input,
:root .e-grid .e-toolbar .e-search-wrapper .e-input-group.e-search input.e-input:focus {
  border: 0 !important; border-radius: 0 !important; box-shadow: none !important; outline: none !important; background: transparent !important;
}
:root .e-grid .e-toolbar .e-search-wrapper .e-input-group.e-search::before,
:root .e-grid .e-toolbar .e-search-wrapper .e-input-group.e-search::after { display: none !important; }
:root .e-grid .e-toolbar .e-search-wrapper .e-input-group.e-search .e-sicon { color: var(--faint) !important; border-radius: var(--r-sm); }
/* QA 919: hovering the search / clear icon at the box's right end painted a grey square; only the icon darkens now. */
:root .e-grid .e-toolbar .e-search-wrapper .e-input-group.e-search .e-sicon:hover { color: var(--text) !important; background: transparent !important; }

/* Selected row: a quiet info-blue tint (enterprise convention), not the brand red — red stays for actions and alerts.
   The cell outline Syncfusion draws on the clicked cell shows only while the grid is driven by the keyboard
   (cw-grid.js toggles .cw-kbd), where it is the keyboard focus indicator. */
:root .e-grid td.e-rowcell.e-active, :root .e-grid td.e-rowcell.e-selectionbackground,
:root .e-grid.cis-grid td.e-rowcell.e-active, :root .e-grid.cis-grid td.e-rowcell.e-selectionbackground,
:root .cw-reg .e-grid .e-row.e-active .e-rowcell, :root .cw-reg .e-grid .e-rowcell.e-active {
  background-color: color-mix(in srgb, var(--info) 9%, var(--card)) !important; color: var(--text) !important;
}
:root .e-grid .e-row[aria-selected="true"]:hover > td.e-rowcell { background-color: color-mix(in srgb, var(--info) 13%, var(--card)) !important; }
:root .e-grid:not(.cw-kbd) td.e-rowcell.e-focused, :root .e-grid:not(.cw-kbd) th.e-headercell.e-focused,
:root .e-grid:not(.cw-kbd) .e-focused:not(.e-menu-item):not(.e-editedbatchcell) { box-shadow: none !important; outline: none !important; }
:root .e-grid.cw-kbd td.e-rowcell.e-focused, :root .e-grid.cw-kbd th.e-headercell.e-focused { box-shadow: inset 0 0 0 2px var(--info) !important; }

/* Grids whose columns are narrower than the grid (cw-grid.js fill): header and rows stretch together to its width */
:root .e-grid.cw-fill .e-gridheader table.e-table, :root .e-grid.cw-fill .e-gridcontent table.e-table { width: 100% !important; }
/* no divider after the last column */
:root .e-grid .e-gridheader .e-headercell.e-lastcell .e-rhandler, :root .e-grid .e-gridheader .e-lastcell { border-right-color: transparent !important; }

/* Pager row, every grid: page buttons, the record count, and "Items per page" with its box on one centre line.
   (Syncfusion pulls the page-size box up with a -24px margin inside an 18px-tall block.) */
:root .e-pager { display: flex !important; align-items: center !important; flex-wrap: wrap; gap: var(--s2); }
:root .e-pager .e-pagesizes { display: inline-flex !important; align-items: center !important; gap: 6px; height: 28px !important; margin: 0 !important; float: none !important; vertical-align: middle; }
:root .e-pager .e-pagesizes .e-pagerdropdown { margin: 0 !important; height: 28px !important; width: 76px !important; vertical-align: middle !important; display: inline-flex !important; align-items: center; top: 0 !important; }
:root .e-pager .e-pagesizes .e-pagerdropdown .e-input-group { width: 100% !important; min-width: 0 !important; margin: 0 !important; }
:root .e-pager .e-pagesizes .e-pagerconstant { margin: 0 !important; line-height: 28px !important; height: 28px; display: inline-flex !important; align-items: center; white-space: nowrap; color: var(--muted) !important; font-size: var(--fs-sm) !important; }
:root .e-pager .e-pagercontainer, :root .e-pager .e-parentmsgbar { margin-top: 0 !important; margin-bottom: 0 !important; vertical-align: middle; }
/* QA 916: the page numbers sit in the centre of the pager row. The count (left) and the page size (right) share the space
   either side equally, instead of the count pushing the numbers over to the page size. */
:root .e-pager .e-parentmsgbar { order: -1; flex: 1 1 0; min-width: max-content; margin-right: 0 !important; }
:root .e-pager .e-pagesizes { flex: 1 1 0; justify-content: flex-end; min-width: max-content; }

/* Frozen columns: the divider after them is a 1px kit line (not Syncfusion's 3px grey), and an empty grid shows none
   (it ran down the empty state as a stray vertical line) */
:root .e-grid .e-frozenheader > .e-table, :root .e-grid .e-frozencontent > .e-table,
:root .e-grid .e-frozen-left-header > .e-table, :root .e-grid .e-frozen-left-content > .e-table { border-right: 1px solid var(--line) !important; }
:root .e-grid:has(.e-emptyrow) .e-frozencontent > .e-table, :root .e-grid:has(.e-emptyrow) .e-frozen-left-content > .e-table,
:root .e-grid:has(.e-emptyrow) .e-frozenheader > .e-table, :root .e-grid:has(.e-emptyrow) .e-frozen-left-header > .e-table { border-right-color: transparent !important; }
:root .e-grid:has(.e-emptyrow) .e-frozenscrollbar, :root .e-grid:has(.e-emptyrow) .e-frozen-left-scrollbar { border-right-color: transparent !important; }

/* One loading look for every register: the grid's own skeleton (above). A page's own overlay loader drawn over the grid
   (e.g. Call Logs "Loading data…") is not shown — the page script may still toggle it. */
:root .dashboard__tableBody :is(#pageLoader, .cw-grid-loader) { display: none !important; }

/* Grids outside a register (edit-page tabs and sections, dialogs) — compact kit toolbar (cw-register.js liteToolbar):
   icon buttons with tooltips like the register's, and a search box that fits inside the row instead of hanging over
   the column headers. */
:root .e-grid > .e-toolbar.cw-gt-lite { min-height: 46px !important; padding: 0 var(--s2) !important; background: var(--card) !important; }
:root .e-grid > .e-toolbar.cw-gt-lite .e-toolbar-items { min-height: 46px !important; display: flex !important; align-items: center; background: transparent !important; }
:root .e-grid > .e-toolbar.cw-gt-lite .e-toolbar-item { min-height: 46px !important; height: 46px !important; display: inline-flex !important; align-items: center; padding: 0 2px !important; }
:root .e-grid > .e-toolbar.cw-gt-lite .e-toolbar-item .e-tbar-btn {
  height: var(--h-btn) !important; min-height: var(--h-btn) !important; border-radius: var(--r-md) !important; padding: 0 var(--s3) !important; background: transparent !important; border: 1px solid transparent !important;
  color: var(--text-2) !important; font-family: var(--font); font-weight: 600; box-shadow: none !important; display: inline-flex !important; align-items: center; gap: var(--s2);
}
:root .e-grid > .e-toolbar.cw-gt-lite .e-toolbar-item .e-tbar-btn:hover { background: var(--hover) !important; color: var(--text) !important; }
:root .e-grid > .e-toolbar.cw-gt-lite .e-toolbar-item.cw-ticon .e-tbar-btn { width: var(--h-btn) !important; padding: 0 !important; justify-content: center; }
:root .e-grid > .e-toolbar.cw-gt-lite .e-toolbar-item.cw-ticon .e-tbar-btn .e-tbar-btn-text,
:root .e-grid > .e-toolbar.cw-gt-lite .e-toolbar-item.cw-ticon .e-tbar-btn .e-btn-icon { display: none !important; }
:root .e-grid > .e-toolbar.cw-gt-lite .e-toolbar-item .e-tbar-btn .cw-i { width: 17px; height: 17px; }
:root .e-grid > .e-toolbar.cw-gt-lite .e-toolbar-item.e-search-wrapper .e-input-group.e-search {
  height: var(--h-btn) !important; min-height: var(--h-btn) !important; width: 220px; margin: 0 !important; border: 1px solid var(--line) !important; border-radius: var(--r-md) !important; background: var(--card) !important; box-shadow: none !important;
}
:root .e-grid > .e-toolbar.cw-gt-lite .e-toolbar-item.e-search-wrapper input.e-input { height: calc(var(--h-btn) - 2px) !important; min-height: 0 !important; padding-top: 0 !important; padding-bottom: 0 !important; }
:root .e-grid > .e-toolbar.cw-gt-lite .e-toolbar-item.e-search-wrapper .e-input-group.e-search.e-input-focus { border-color: var(--accent) !important; box-shadow: 0 0 0 3px var(--accent-ring) !important; }

/* Sort arrows only: the 1 / 2 order badge read as a stray count. The "Sorted by" chip on the toolbar states the order. */
:root .e-grid .e-gridheader .e-sortnumber { display: none !important; }
