/* Compliance styles */

/* See task 322  */
.x-grid3-header {position: relative;}
.x-grid3-header-offset {width: auto;}

.delete {
	background:url("/static/images/tb_delete.png") no-repeat 0 0 !important;
}
.add {
	background:url("/static/images/tb_add.png") no-repeat 0 0 !important;
}
.open {
	background:url("/static/images/task_icon.png") no-repeat 0 0 !important;
}
/* Select User / Select Multiple Users dialog: theme the "Optional
   message sent with the email notification:" label to match the
   theme form labels (secondary text, 13px) with 25px row height. */
.select-user-msg-label {
	display: block !important;
	height: 25px !important;
	color: var(--acs-text-secondary) !important;
	font-size: 13px !important;
}

/* `.singleuser` / `.multiusers` legacy PNG background-image used as
   ExtJS button iconCls. We render the icon via ::before in the
   :is(.x-window, .task-popup).acs-task-host button::before block below, so clear
   the legacy bg-image here. Don't apply mask-image to the button
   itself — that would clip the text "Select" too (mask hides the
   element's entire painted output). */
.singleuser,
.multiusers {
	background: transparent !important;
	background-image: none !important;
}

/* Collaborator-grid <img> icons (rendered as <img src="groups.png"> in
   the x-grid3-col-type cell by an ExtJS renderer). Hide the legacy PNG
   and paint an SVG via the parent's ::before pseudo. */
.x-grid3-col-type img[src$="groups.png"],
.x-grid3-col-type img[src$="users.png"] {
	visibility: hidden !important;
}
.x-grid3-col-type {
	position: relative !important;
}
.x-grid3-col-type:has(.acs-img-groups)::before,
.x-grid3-col-type:has(.acs-img-users)::before {
	content: '' !important;
	position: absolute !important;
	left: 8px !important;
	top: 50% !important;
	transform: translateY(-50%) !important;
	width: 16px !important;
	height: 16px !important;
	-webkit-mask-repeat: no-repeat !important;
	        mask-repeat: no-repeat !important;
	-webkit-mask-position: center !important;
	        mask-position: center !important;
	-webkit-mask-size: 16px 16px !important;
	        mask-size: 16px 16px !important;
	background-color: var(--acs-text-secondary) !important;
	pointer-events: none !important;
}
.x-grid3-col-type:has(.acs-img-users)::before {
	-webkit-mask-image: var(--icon-user) !important;
	        mask-image: var(--icon-user) !important;
}
.x-grid3-col-type:has(.acs-img-groups)::before {
	-webkit-mask-image: var(--icon-users) !important;
	        mask-image: var(--icon-users) !important;
}
.location {
	background:url("/static/images/plugin_go.png") no-repeat 0 0 !important;
}
.edit {
	background-image: url(/static/images/libraryswitcher.png) !important; background-position: -352px -48px !important;
}
.book {
	background-image:url(/static/images/libraryswitcher.png) !important;
	background-position: -16px 0 !important;
}
.toc {
	background:url("/static/images/page.gif") no-repeat 0 0 !important;
}
.repeat_task{
	background:url("/static/images/repeat_task.png") no-repeat 0 0 !important;
}
.type_note{
	background:url("/static/images/note.png") no-repeat 0 6px !important;
}
.type_complete{
	background:url("/static/images/complete.png") no-repeat 0 6px !important;
}
.type_rubber_stamp{
	background:url("/static/images/1blank.png") no-repeat 0 6px !important;
}
.type_un_complete{
	background:url("/static/images/un_complete.png") no-repeat 0 6px !important;
}
.type_audit{
	background:url("/static/images/audit.png") no-repeat 0 6px !important;
}

.status_upcoming
{
background:url("/static/images/timing_upcoming.png") no-repeat 0 2px !important;
}

.status_overdue
{
background:url("/static/images/timing_overdue.png") no-repeat 0 2px !important;	
}


/* for legend */
.task-img
{
    background-image: url("/static/images/task_icon.png") !important;
    background-repeat: no-repeat;
    width:16px !important;
}

.repeating-task-img
{
    background-image: url("/static/images/tb_edit_multi.png") !important;
    background-repeat: no-repeat;
    width:16px !important;
}

.task_background .x-panel-body
{
	background-color: #dfe8f6;
	background-repeat : no-repeat;
}

.task_note_body
{
	height:48px;
	width:100%;
	white-space:normal !important;
	ol:{list-style-type: decimal; 
	list-style-position: inside; 
    margin:25px;padding:0;}
    ul :{list-style-type: disc;
    list-style-image: url(bullet.gif);
    list-style-position: inside;}
    margin:5px;padding:0;
}

/* for toc in existing notes */
.grid_toc_cell {
	padding:0 0 0 0;
}

.grid_toc_cell div span {
   padding:0 3px 0 3px;
   vertical-align:bottom;
}

.grid_toc_cell div span a{
	 color: #385F95;
	 text-decoration:none;
}

.grid_toc_cell div span a:hover{
	 color: #385F95;
	 text-decoration:underline;
}
.grid_toc_cell div img {
	vertical-align:bottom;
}

.day_button {
	width: 40px;
}

/* `.x-grid3-hd-has_attachments` legacy bg-image rule retired. The
   attachments column header is now painted by the Notes-grid theme rule
   below (`.x-grid3-header td.x-grid3-hd.x-grid3-td-has_attachments
   .x-grid3-hd-inner::before { mask-image: var(--icon-paperclip) }`) and
   any other consumer of this column will need its own theme rule. */

.dialog_label {
	font-size:12px;
	height: 18px;
}

/* hack to fix missing bottom border on a combobox */
.ext-ie6 .x-form-text {
    vertical-align: baseline;
}

.reminder_grid {
	border-width: 1px;
	border-style: solid;
	border-color: var(--acs-border-light);
	border-radius: var(--acs-radius-md);
	overflow: hidden;
}

/* Recurrence dialog (#repeat_win): the Options container holds the
   weekly/monthly/yearly day/month grids and the "every N period" controls.
   Style as a quiet themed card matching the rest of the form chrome.
   box-sizing: border-box so the 1px border is included in the ExtJS-set
   inline width (otherwise the container overflows the window body by
   2px on the right).

   Stretch the container to fill the window body width — minus the
   `left: _child_left` (20px) on each side. The legacy JS set a smaller
   width inline; this CSS rule overrides it to use all available space. */
#repeat_win .recurrence-options-container {
	border: 1px solid var(--acs-border-light) !important;
	border-radius: var(--acs-radius-md) !important;
	background: var(--acs-hover-bg) !important;
	box-sizing: border-box !important;
	/* Width = body - 2 * _child_left (20px each side) */
	width: calc(100% - 40px) !important;
}
/* Section header — smaller and lighter than the dialog title (which is
   14px/600). The section is subordinate; use 12px regular for a quiet
   header. No uppercase. */
#repeat_win .recurrence-options-container .x-panel-header {
	background: transparent !important;
	background-image: none !important;
	border: none !important;
	border-bottom: 1px solid var(--acs-border-light) !important;
	padding: 8px 14px !important;
	border-radius: 0 !important;
}
#repeat_win .recurrence-options-container .x-panel-header-text {
	color: var(--acs-text-primary) !important;
	font-size: 12px !important;
	font-weight: 600 !important;
	text-transform: none !important;
	letter-spacing: 0 !important;
}
#repeat_win .recurrence-options-container .x-panel-body {
	background: transparent !important;
	padding: 14px !important;
	border: none !important;
	/* Vertical flex stack so the row panels flow one beneath the next
	   regardless of their inline x/y from the absolute layout config. */
	display: flex !important;
	flex-direction: column !important;
	gap: 8px !important;
}

/* Each row panel sizes to content and ignores its inline absolute x/y
   (since the parent is now flex-column). The ExtJS hbox layout inside
   the row stays as-is so it can properly arrange its children. */
#repeat_win .recurrence-options-container .x-panel-body > .recurrence-row {
	position: static !important;
	left: auto !important;
	top: auto !important;
	width: 100% !important;
	flex: 0 0 auto !important;
}
/* The ExtJS hbox renders an inner .x-box-inner with `position:absolute;
   width: <calc>; height: <calc>`. We need that inner layout to keep its
   absolute behaviour so the hbox children align horizontally. Just make
   sure the parent gives it the right reference frame. */
#repeat_win .recurrence-options-container .recurrence-row {
	box-sizing: border-box !important;
}
#repeat_win .recurrence-options-container .recurrence-row > .x-panel-bwrap,
#repeat_win .recurrence-options-container .recurrence-row > .x-panel-bwrap > .x-panel-body {
	background: transparent !important;
	border: none !important;
	padding: 0 !important;
}

/* ExtJS HBox layout sizes its children to a fixed pre-calculated width
   and absolutely positions them via inline `left: <px>; width: <px>` on
   each .x-box-item. With our CSS shrinking the wraps to `inline-flex;
   width: auto` to fit the input's actual width, the HBox's `left:`
   coordinates become wrong (each child has more gap than needed).

   Convert the .x-box-inner to a flex row so children flow naturally
   from left to right with a 12px gap, ignoring the inline left/width.
   Also override the inline `height` ExtJS sets — the day-grid cell-
   padding makes the grid taller than the row's pre-calculated height,
   so the grid was overflowing and cropping the first/last button row. */
#repeat_win .recurrence-options-container .recurrence-row .x-box-inner {
	display: flex !important;
	flex-direction: row !important;
	align-items: flex-start !important;
	gap: 12px !important;
	position: relative !important;
	width: auto !important;
	height: auto !important;
}
#repeat_win .recurrence-options-container .recurrence-row .x-box-inner > .x-box-item {
	position: static !important;
	left: auto !important;
	top: auto !important;
	flex: 0 0 auto !important;
}
/* The first "cell" panel holds the radio + boxLabel — keep its
   configured width (150px from the JS config) so the radio cell stays
   aligned with the day-grid cell in the row above. It sits at the top of its
   row with its content height: its `fit` layout can carry a stale height
   (184px from the book viewer's task window), which centred the radio below
   the 40px "Repeat on the" row and clipped it. */
#repeat_win .recurrence-options-container .recurrence-row .x-box-inner > .x-panel.x-box-item {
	width: 150px !important;
	align-self: flex-start !important;
	height: auto !important;
}
#repeat_win .recurrence-options-container .recurrence-row .x-box-inner > .x-panel.x-box-item .x-panel-bwrap,
#repeat_win .recurrence-options-container .recurrence-row .x-box-inner > .x-panel.x-box-item .x-panel-body,
#repeat_win .recurrence-options-container .recurrence-row .x-box-inner > .x-panel.x-box-item .x-form-check-wrap {
	height: auto !important;
}

/* Day-grid + month-grid — let ExtJS's table-layout flow naturally
   (already gives us a proper 7-col 5-row grid for days). We just clear
   the sprite chrome and add gap between cells.
   Negative margin pulls the table's outer left edge back so the first
   button cell aligns flush with the day-grid container's left edge —
   which keeps the day buttons in row 1 aligned with the combo fields
   in row 2 below. */
#repeat_win .recurrence-options-container .recurrence-day-grid table.x-table-layout {
	border-collapse: collapse !important;
}
/* Gap between cells via per-cell padding: 8px LEFT padding on every
   cell EXCEPT the first in each row, and 8px TOP padding on every cell
   EXCEPT the first row. This way the table's left edge has no leading
   gap (so row 1 day buttons align with row 2 combo fields), but cells
   are spaced 8px apart visually. */
#repeat_win .recurrence-options-container .recurrence-day-grid td.x-table-layout-cell {
	padding-left: 8px !important;
	padding-top: 8px !important;
}
#repeat_win .recurrence-options-container .recurrence-day-grid tr td.x-table-layout-cell:first-child {
	padding-left: 0 !important;
}
#repeat_win .recurrence-options-container .recurrence-day-grid tr:first-child td.x-table-layout-cell {
	padding-top: 0 !important;
}
/* The legacy ExtJS button-group 9-slice chrome adds padding-left:3px
   on .x-btn-group-ml and padding-right:3px on .x-btn-group-mr — clear
   those so the day grid's first/last button aligns flush with the
   grid container's edges (which keeps row 1's buttons aligned with
   row 2's combo fields). */
#repeat_win .recurrence-options-container .x-btn-group-ml,
#repeat_win .recurrence-options-container .x-btn-group-mr {
	padding-left: 0 !important;
	padding-right: 0 !important;
}
#repeat_win .recurrence-options-container .recurrence-day-grid table.x-table-layout td.x-table-layout-cell {
	background: transparent !important;
	border: none !important;
}

/* The .recurrence-day-row used by Weekly is an hbox of 7 day buttons —
   let the ExtJS hbox lay them out. We just clear the legacy chrome. */
#repeat_win .recurrence-options-container .recurrence-day-row > .x-panel-bwrap,
#repeat_win .recurrence-options-container .recurrence-day-row > .x-panel-bwrap > .x-panel-body {
	background: transparent !important;
	border: none !important;
	padding: 0 !important;
}
/* Weekly day row: position the whole row statically so it flows in the
   parent body's flex column. */
#repeat_win .recurrence-options-container .x-panel-body > .recurrence-day-row {
	position: static !important;
	left: auto !important;
	top: auto !important;
	width: 100% !important;
	flex: 0 0 auto !important;
}

/* Section label inside the Options container (e.g. "Repeat days:",
   "Repeat months:"). Colour and weight come from the `#repeat_win label`
   rule below, so it reads like the Monthly radio labels.
   Position static so it flows in the body flex column instead of
   inheriting the legacy absolute x/y. */
#repeat_win .recurrence-options-container .recurrence-options-lbl {
	display: inline-flex !important;
	align-items: center !important;
	height: 20px !important;
	font-size: 13px !important;
	white-space: nowrap !important;
	position: static !important;
	left: auto !important;
	top: auto !important;
}
#repeat_win .recurrence-options-container .x-panel-body > .recurrence-options-lbl {
	flex: 0 0 auto !important;
}

/* Clear all the legacy ExtJS button-group chrome (sprite-borders,
   internal table cell padding, etc.) — the buttons sit directly in
   their parent row with our spacing. Otherwise the legacy renders
   visible "boxes" between buttons that look like a calendar grid. */
#repeat_win .recurrence-options-container .x-btn-group,
#repeat_win .recurrence-options-container .x-btn-group-tl,
#repeat_win .recurrence-options-container .x-btn-group-tr,
#repeat_win .recurrence-options-container .x-btn-group-tc,
#repeat_win .recurrence-options-container .x-btn-group-bl,
#repeat_win .recurrence-options-container .x-btn-group-br,
#repeat_win .recurrence-options-container .x-btn-group-bc,
#repeat_win .recurrence-options-container .x-btn-group-ml,
#repeat_win .recurrence-options-container .x-btn-group-mr,
#repeat_win .recurrence-options-container .x-btn-group-mc,
#repeat_win .recurrence-options-container .x-btn-group-bwrap,
#repeat_win .recurrence-options-container .x-btn-group-body,
#repeat_win .recurrence-options-container .x-btn-group-header,
#repeat_win .recurrence-options-container .x-table-layout-ct,
#repeat_win .recurrence-options-container table.x-table-layout {
	background: transparent !important;
	background-image: none !important;
	border: none !important;
	box-shadow: none !important;
}
#repeat_win .recurrence-options-container .x-btn-group-body {
	padding: 0 !important;
}
#repeat_win .recurrence-options-container .x-table-layout {
	border-collapse: separate !important;
	border-spacing: 6px !important;
}
#repeat_win .recurrence-options-container .x-table-layout-cell {
	background: transparent !important;
	border: none !important;
}

/* Day-of-week / day-of-month / month-of-year toggle buttons inside the
   options grid — themed as outline pill buttons that fill cyan when
   pressed (active selection). */
#repeat_win .recurrence-options-container .x-btn {
	background: var(--acs-card-bg) !important;
	background-image: none !important;
	border: 1px solid var(--acs-border-input) !important;
	border-radius: var(--acs-radius-sm) !important;
	box-shadow: none !important;
}
#repeat_win .recurrence-options-container .x-btn .x-btn-text {
	color: var(--acs-text-primary) !important;
	font-weight: 500 !important;
	font-size: 12px !important;
	padding: 0 8px !important;
	height: 28px !important;
	line-height: 28px !important;
	min-width: 36px !important;
}
#repeat_win .recurrence-options-container .x-btn.x-btn-over {
	background: var(--acs-hover-bg) !important;
	border-color: var(--acs-brand-cyan) !important;
}
#repeat_win .recurrence-options-container .x-btn.x-btn-over .x-btn-text {
	color: var(--acs-brand-cyan) !important;
}
#repeat_win .recurrence-options-container .x-btn.x-btn-pressed,
#repeat_win .recurrence-options-container .x-btn.x-btn-pressed.x-btn-over {
	background: var(--acs-brand-cyan-muted) !important;
	border-color: var(--acs-brand-cyan-muted) !important;
}
#repeat_win .recurrence-options-container .x-btn.x-btn-pressed .x-btn-text,
#repeat_win .recurrence-options-container .x-btn.x-btn-pressed.x-btn-over .x-btn-text {
	color: var(--acs-card-bg) !important;
	font-weight: 600 !important;
}

/* Labels inside the recurrence dialog (e.g. "Repeat:", "every:", "Repeat days:")
   — secondary text for visual hierarchy. */
#repeat_win .x-form-item-label,
#repeat_win label {
	color: var(--acs-text-secondary) !important;
	font-size: 13px !important;
}

/* If the recurrence top-row content wraps to two lines (narrow widths
   or long localised labels), the Options container — which is absolute-
   positioned via ExtJS — won't push down. Allow the window body to
   scroll vertically as a fallback so content stays accessible. */
#repeat_win .x-window-body {
	overflow-y: auto !important;
}

/* Recurrence top row — single inline flex row reading as a sentence:
   "Repeat [combo] every [N] [unit] until [date]"
   Wraps to the next line when the dialog is narrow. */
.recurrence-top-row > .x-panel-bwrap,
.recurrence-top-row > .x-panel-bwrap > .x-panel-body {
	background: transparent !important;
	border: none !important;
	overflow: visible !important;
}
.recurrence-top-row > .x-panel-bwrap > .x-panel-body {
	display: flex !important;
	flex-direction: row !important;
	flex-wrap: wrap !important;
	align-items: center !important;
	gap: 8px !important;
	padding: 0 !important;
}

/* Inline labels reading as sentence words ("Repeat", "every", "until",
   "days"/"weeks"). Same typography as theme form-item labels. */
.recurrence-inline-lbl {
	display: inline-flex !important;
	align-items: center !important;
	height: 32px !important;
	color: var(--acs-text-secondary) !important;
	font-size: 13px !important;
	font-weight: 400 !important;
	white-space: nowrap !important;
	line-height: 1 !important;
	margin: 0 !important;
	padding: 0 !important;
	flex: 0 0 auto !important;
}
/* Items that should be hidden via the ExtJS x-hide-display class — defeat
   the flex display: inline-flex above to keep `display: none` behaviour. */
.recurrence-top-row .x-hide-display {
	display: none !important;
}

/* ----- Combo / date field wraps for the WHOLE recurrence dialog -----
   The window rule in ext-acs-theme.css sizes fields from their
   configuration; this dialog keeps its own inline-flex row layout and
   32px height for every combo/date inside #repeat_win (period combo,
   date pickers, instance combos, day-rule combos).

   No .operator-wrap / .superbox-wrap carve-outs needed here — those are
   search-form-only classes (ext-acs-startpage.css scope) that don't
   appear in the recurrence dialog. */
#repeat_win.x-window .x-form-field-wrap:not(.x-hide-display) {
	position: relative !important;
	display: inline-flex !important;
	width: auto !important;
	height: 32px !important;
	flex: 0 0 auto !important;
}
#repeat_win.x-window .x-form-field-wrap.x-hide-display {
	display: none !important;
}
#repeat_win.x-window .x-form-field-wrap .x-form-text {
	position: relative !important;
	flex: none !important;
	min-width: 0 !important;
	height: 100% !important;
	box-sizing: border-box !important;
}

/* ----- Top-row sentence-flow widths (Repeat / every / until row) -----
   Compact widths so "Repeat [period] every N [unit] until [date]" fits
   on one line at the dialog's 680px width. Period 100px ("Monthly" +
   trigger), date 130px ("31 Dec, 2099"). The :last-of-type fallback
   ensures the until-date wrap gets the wider width regardless of how
   many hidden fields sit between it and the period combo. */
#repeat_win.x-window .recurrence-top-row .x-form-field-wrap > input.x-form-text.x-trigger-noedit {
	width: 100px !important;
}
#repeat_win.x-window .recurrence-top-row .x-form-field-wrap:nth-of-type(2) > input.x-form-text.x-trigger-noedit,
#repeat_win.x-window .recurrence-top-row .x-form-field-wrap:last-of-type > input.x-form-text.x-trigger-noedit {
	width: 130px !important;
}
/* Number field (units): single-digit number room. */
#repeat_win.x-window .recurrence-top-row input.x-form-num-field {
	flex: none !important;
	width: 64px !important;
	height: 32px !important;
}

/* ----- Options-row combo widths (monthly/yearly "Repeat on the" row) -----
   The instance combo ("First"/"Second"/"Third"/"Fourth"/"Last") and the
   day-rule combo ("Monday"..."Weekend day") need fixed widths to fit
   their longest options comfortably. */
#repeat_win.x-window .recurrence-options-container .x-form-field-wrap > input.x-form-text.x-trigger-noedit {
	width: 110px !important;
}
/* The day-rule combo is the second/last combo in its row — bump width
   for "Weekend day". */
#repeat_win.x-window .recurrence-options-container .recurrence-row .x-form-field-wrap:last-of-type > input.x-form-text.x-trigger-noedit {
	width: 140px !important;
}

/* Combo/date inputs in the recurrence dialog use ExtJS `editable: false`
   which adds the readonly attribute. The global readonly opacity:0.7
   dim signals "user can't type here" — but for picker-only fields like
   these where the value is set by the dropdown/calendar, dimming reads
   as "disabled". Keep them at full strength. */
#repeat_win .x-form-text[readonly].x-trigger-noedit,
#repeat_win .x-form-text:read-only.x-trigger-noedit {
	opacity: 1 !important;
}
/* Soften the legacy dark-gray (#aeb6be) separators inside the grid so
   the internal chrome matches the outer container border tone. Headers
   and cell column separators now use --acs-border-light. */
.reminder_grid .x-grid3-header {
	background: var(--acs-hover-bg) !important;
	background-image: none !important;
	border-bottom: 1px solid var(--acs-border-light) !important;
}
/* Drop vertical column separators — modern data-table pattern uses
   horizontal row dividers only (cleaner, less busy). */
.reminder_grid .x-grid3-hd,
.reminder_grid .x-grid3-cell {
	border-right: none !important;
}
.reminder_grid .x-grid3-hd .x-grid3-hd-inner {
	color: var(--acs-text-secondary) !important;
	font-weight: 600 !important;
	font-size: 12px !important;
}
/* Row chrome — transparent bg so the grid container bg shows through,
   and lighter row border-color matching --acs-border-light. The legacy
   row already has its own bottom border for separation; we only re-tint
   it. Local to .reminder_grid so other grids in the shell are untouched. */
.reminder_grid .x-grid3-row {
	background-color: transparent !important;
	border-color: var(--acs-border-light) !important;
}
/* Themed hover — legacy paints a beige-gray (#edeef0); replace with
   --acs-hover-bg so the hover wash matches the rest of the theme. */
.reminder_grid .x-grid3-row.x-grid3-row-over {
	background-color: var(--acs-hover-bg) !important;
}

.red_color {
	color: red;
}

#repeat_win {
    font-size: 12px;
}

#repeat_win .x-btn.x-btn-pressed {
    /*background-color: #99bbe8;*/
    background-color: #FFFFFF;
}

#repeat_win .x-btn.x-btn-pressed .x-btn-text{
    color: black !important;
}

/* Task edit dialog — the inner FormPanel uses .x-panel-footer for its
   Save/Cancel button bar (rendered inside .x-window-body, not as a
   sibling). Layout choices specific to this dialog:
   - Keep the theme's 16px horizontal padding on x-window-mc (centres
     the content). Drop only the top padding (the form's own padding
     provides top breathing room) and keep 0 bottom so the footer sits
     flush at the mc bottom edge.
   - Bump form body padding to 16px (top/bottom) so the form fields have
     breathing room from the modal top edge and from the footer's
     border-top above.
   - Override legacy .x-panel-footer { margin-top: 5px } so the footer
     sits flush at the mc bottom edge with no overflow.

   Scope: only when an .x-window contains a .task-window panel —
   leaves every other modal exactly as-is. `.task-popup` is the same
   form on the standalone task page (task.html), which has no .x-window;
   both branches weigh one class, so the in-app specificity is unchanged. */
:is(.x-window, .task-popup).acs-task-host .x-window-mc {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}
:is(.x-window, .task-popup).acs-task-host .task-window > .x-panel-bwrap > .x-panel-body {
    padding: 16px !important;
}
:is(.x-window, .task-popup).acs-task-host .x-panel-footer {
    margin-top: 0 !important;
}

/* Standalone task page: its title is the form's panel header, not an
   .x-window header. Match the window header (ext-acs-theme.css) and run
   it edge to edge past the 16px region margins set in task.html. */
.task-popup.x-panel > .x-panel-header {
    position: relative;
    margin: 0 -16px !important;
    padding: 12px 16px !important;
    line-height: 21px !important; /* the window header's 46px height */
    font-family: var(--acs-font-family) !important;
}
.task-popup.x-panel > .x-panel-header .x-panel-header-text {
    font-family: inherit !important;
}

/* Overdue / upcoming status as the All Tasks grid chip (ext-acs-taskreport.css),
   replacing the legacy <img> on the standalone page. Keep the title unpositioned:
   the [Task ID] div inside it anchors to the header. */
.task-popup.x-panel > .x-panel-header > img.x-panel-inline-icon {
    display: none !important;
}
.x-window.acs-task-host .x-window-header:is(.status_overdue, .status_upcoming) .x-window-header-text,
.task-popup.x-panel > .x-panel-header:has(> :is(.status_overdue, .status_upcoming)) .x-panel-header-text {
    display: inline-flex;
    align-items: center;
    vertical-align: top; /* the chip has no text baseline */
    min-height: 21px; /* the 46px header height of a task with no status */
}
.x-window.acs-task-host .x-window-header:is(.status_overdue, .status_upcoming) .x-window-header-text::before,
.task-popup.x-panel > .x-panel-header:has(> :is(.status_overdue, .status_upcoming)) .x-panel-header-text::before {
    content: '';
    order: -2;
    flex: none;
    width: 22px;
    height: 22px;
    margin: -3px 0; /* keeps the header height */
    border-radius: 6px;
}
.x-window.acs-task-host .x-window-header:is(.status_overdue, .status_upcoming) .x-window-header-text::after,
.task-popup.x-panel > .x-panel-header:has(> :is(.status_overdue, .status_upcoming)) .x-panel-header-text::after {
    content: '';
    order: -1;
    flex: none;
    width: 14px;
    height: 14px;
    margin: 0 12px 0 -18px; /* over the chip's centre, then 8px to the title */
    -webkit-mask: no-repeat center / 14px 14px;
            mask: no-repeat center / 14px 14px;
}
.x-window.acs-task-host .x-window-header.status_overdue .x-window-header-text::before,
.task-popup.x-panel > .x-panel-header:has(> .status_overdue) .x-panel-header-text::before {
    background-color: rgba(231, 76, 60, 0.22);
}
.x-window.acs-task-host .x-window-header.status_overdue .x-window-header-text::after,
.task-popup.x-panel > .x-panel-header:has(> .status_overdue) .x-panel-header-text::after {
    -webkit-mask-image: var(--icon-alert-circle);
            mask-image: var(--icon-alert-circle);
    background-color: var(--acs-error, #c53030);
}
.x-window.acs-task-host .x-window-header.status_upcoming .x-window-header-text::before,
.task-popup.x-panel > .x-panel-header:has(> .status_upcoming) .x-panel-header-text::before {
    background-color: rgba(243, 156, 18, 0.22);
}
.x-window.acs-task-host .x-window-header.status_upcoming .x-window-header-text::after,
.task-popup.x-panel > .x-panel-header:has(> .status_upcoming) .x-panel-header-text::after {
    -webkit-mask-image: var(--icon-clock);
            mask-image: var(--icon-clock);
    background-color: var(--acs-warning, #ffb300);
}

/* Details: every label sits on the first line of its value instead of the
   row's centre. Display fields are 14px with 3px padding (label +4px); the
   Location link has none; a textarea's text starts below its padding. */
:is(.x-window, .task-popup).acs-task-host #info_panel :is(.x-fieldset-body, .parent-task) {
    align-items: start;
}
:is(.x-window, .task-popup).acs-task-host #info_panel :is(.x-fieldset-body, .parent-task) > label:not(.acs_ext_readonly_field) {
    align-self: start !important;
    padding-top: 4px !important;
}
:is(.x-window, .task-popup).acs-task-host #info_panel .x-fieldset-body > label:has(+ #location) {
    padding-top: 3px !important;
}
:is(.x-window, .task-popup).acs-task-host #info_panel .x-fieldset-body > label:has(+ .x-form-item .x-form-textarea) {
    padding-top: 16px !important;
}
:is(.x-window, .task-popup).acs-task-host #info_panel .parent-task > label:has(+ .full-width .x-form-textarea) {
    padding-top: 10px !important;
}

/* Details scrolls inside a fixed-height box; keep its scrollbar visible so
   macOS overlay scrollbars do not hide that more rows are below. The page's
   standard scrollbar-* values would make Chrome ignore these styles. */
:is(.x-window, .task-popup).acs-task-host .x-fieldset-body:has(#info_panel) {
    scrollbar-width: auto !important;
    scrollbar-color: auto !important;
}
:is(.x-window, .task-popup).acs-task-host .x-fieldset-body:has(#info_panel)::-webkit-scrollbar {
    width: 6px;
}
:is(.x-window, .task-popup).acs-task-host .x-fieldset-body:has(#info_panel)::-webkit-scrollbar-track {
    background: transparent;
}
:is(.x-window, .task-popup).acs-task-host .x-fieldset-body:has(#info_panel)::-webkit-scrollbar-thumb {
    border-radius: 3px;
    background-color: var(--acs-scrollbar-thumb);
}
:is(.x-window, .task-popup).acs-task-host .x-fieldset-body:has(#info_panel)::-webkit-scrollbar-thumb:hover {
    background-color: var(--acs-scrollbar-thumb-hover);
}

/* Details: the "Parent task:" row and the parent's detail rows span both
   columns of the Details grid and repeat its 80px / 1fr columns, so they
   line up with Status, Created By and the rest. */
:is(.x-window, .task-popup).acs-task-host #info_panel .x-fieldset-body > .parent-task:not(.x-hide-display) {
    grid-column: 1 / -1;
}
/* The parent's own rows sit on a light panel so they read as the parent's,
   not the task's; the negative margin keeps the labels on the grid. */
:is(.x-window, .task-popup).acs-task-host #parent-task:not(.x-hide-display) {
    margin: 4px -8px 0;
    padding: 6px 8px;
    border-radius: var(--acs-radius-md);
    background-color: var(--acs-hover-bg);
}
:is(.x-window, .task-popup).acs-task-host .parent-task textarea {
    width: 100% !important;
}
/* The toggle always goes on its own line under the ID, whatever the
   dialog width. */
:is(.x-window, .task-popup).acs-task-host #parent-task-row:not(.x-hide-display) {
    margin-top: 6px;
}
:is(.x-window, .task-popup).acs-task-host .parent-task-summary {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
}
/* "Show details" / "Hide details": a text link with a chevron that turns
   over when open; no button chip (the legacy `.acs-new-theme .x-btn` rule
   paints one on every button). */
:is(.x-window, .task-popup).acs-task-host .x-btn.parent-task-toggle,
:is(.x-window, .task-popup).acs-task-host .x-btn.parent-task-toggle:is(.x-btn-over, .x-btn-pressed, .x-btn-focus, .x-btn-click),
:is(.x-window, .task-popup).acs-task-host .x-btn.parent-task-toggle td {
    background: transparent !important;
    border-color: transparent !important;
    box-shadow: none !important;
}
:is(.x-window, .task-popup).acs-task-host .x-btn.parent-task-toggle button.x-btn-text {
    display: inline-flex !important;
    align-items: center;
    gap: 4px;
    height: auto !important;
    padding: 0 !important;
    color: var(--acs-brand-cyan) !important;
    font-size: 13px !important;
    font-weight: 500 !important;
}
:is(.x-window, .task-popup).acs-task-host .x-btn.parent-task-toggle button.x-btn-text::after {
    content: '';
    width: 14px;
    height: 14px;
    -webkit-mask: var(--icon-chevron-down) no-repeat center / 14px 14px;
            mask: var(--icon-chevron-down) no-repeat center / 14px 14px;
    background-color: currentColor;
    transition: transform 0.15s;
}
:is(.x-window, .task-popup).acs-task-host .x-btn.parent-task-toggle.x-btn-pressed button.x-btn-text::after {
    transform: rotate(180deg);
}
:is(.x-window, .task-popup).acs-task-host .x-btn.parent-task-toggle.x-btn-over button.x-btn-text {
    color: var(--acs-brand-cyan-deep) !important;
}

/* Task-window inline action buttons (Recurrence, Select user, Select
   group): primary muted-teal theme with darken-on-hover (matches the
   shell .acs-new-theme button family) at the inline-action button
   density — 26px tall, 6px radius, 400 weight (the shell's inline
   helper buttons aren't a primary action, so we don't use semibold +
   32px reserved for dialog submission buttons).

   Pattern: outer .x-btn provides the theme chrome; inner <button>
   renders a ::before pseudo holding the icon mask, then the text. */
:is(.x-window, .task-popup).acs-task-host .x-btn.x-btn-text-icon.margin-left-10 {
    height: 26px !important;
    border-radius: var(--acs-radius-md) !important;
}
:is(.x-window, .task-popup).acs-task-host .x-btn.x-btn-text-icon.margin-left-10 button {
    background-image: none !important;
    height: 24px !important;
    padding: 0 10px 0 28px !important;
    font-weight: 400 !important;
    font-size: 13px !important;
    line-height: 1 !important;
    color: var(--acs-card-bg) !important;
    box-sizing: border-box !important;
    position: relative !important;
}
:is(.x-window, .task-popup).acs-task-host .x-btn.x-btn-text-icon.margin-left-10 button::before {
    content: '' !important;
    position: absolute !important;
    left: 8px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    width: 14px !important;
    height: 14px !important;
    -webkit-mask-repeat: no-repeat !important;
            mask-repeat: no-repeat !important;
    -webkit-mask-position: center !important;
            mask-position: center !important;
    -webkit-mask-size: 14px 14px !important;
            mask-size: 14px 14px !important;
    background-color: currentColor !important;
    pointer-events: none !important;
}
:is(.x-window, .task-popup).acs-task-host button.repeat_task::before {
    -webkit-mask-image: var(--icon-rotate-ccw) !important;
            mask-image: var(--icon-rotate-ccw) !important;
}
:is(.x-window, .task-popup).acs-task-host button.singleuser::before {
    -webkit-mask-image: var(--icon-user) !important;
            mask-image: var(--icon-user) !important;
}
:is(.x-window, .task-popup).acs-task-host button.multiusers::before {
    -webkit-mask-image: var(--icon-users) !important;
            mask-image: var(--icon-users) !important;
}

/* Task dialog footer Save button — primary action, muted-teal fill +
   white text. The theme's footer button rule paints all footer buttons
   as outline secondary; Save needs to stand out as the primary action.
   Targeted by id #save_task (stable hook from compliance-widgets.js). */
:is(.x-window, .task-popup).acs-task-host .x-panel-footer #save_task,
:is(.x-window, .task-popup).acs-task-host .x-panel-footer .x-btn#save_task {
    background: var(--acs-brand-cyan-muted) !important;
    background-color: var(--acs-brand-cyan-muted) !important;
    background-image: none !important;
    border: 1px solid var(--acs-brand-cyan-muted) !important;
}
:is(.x-window, .task-popup).acs-task-host .x-panel-footer #save_task:hover,
:is(.x-window, .task-popup).acs-task-host .x-panel-footer .x-btn#save_task.x-btn-over {
    background: var(--acs-brand-cyan-deep, #0a6f8c) !important;
    background-color: var(--acs-brand-cyan-deep, #0a6f8c) !important;
    border-color: var(--acs-brand-cyan-deep, #0a6f8c) !important;
}
:is(.x-window, .task-popup).acs-task-host .x-panel-footer #save_task button,
:is(.x-window, .task-popup).acs-task-host .x-panel-footer .x-btn#save_task button,
:is(.x-window, .task-popup).acs-task-host .x-panel-footer #save_task .x-btn-text,
:is(.x-window, .task-popup).acs-task-host .x-panel-footer .x-btn#save_task .x-btn-text {
    color: var(--acs-card-bg) !important;
    font-weight: 600 !important;
}

/* ============================================================================
   Notes tab inside Task dialog
   Scope: the single .x-grid-panel that is a direct child of .x-tab-panel-body
   inside a task-window (Notes is the only tab built as a top-level grid panel
   — Reminders/Related/Location are nested differently or hidden).
   ============================================================================ */

/* N3: Notes toolbar layout matches the `.acs-big-toolbar` pattern used by
   the search-results-grid toolbar (`.x-toolbar.acs-big-toolbar border-none`):
   40px tall, white bg, 2px padding, 12px top margin so it sits below the
   tab strip with breathing room. */
:is(.x-window, .task-popup).acs-task-host .x-tab-panel-body > .x-grid-panel > .x-panel-bwrap > .x-panel-tbar {
    margin-top: 12px !important;
    padding: 2px !important;
    background-color: #fff !important;
    height: 40px !important;
    box-sizing: border-box !important;
}

/* ============================================================================
   Location tab inside Task dialog (#search_search_book is a stable hook
   unique to this panel — the book-tree filter input).
   ============================================================================ */

/* Toolbar inner border-bottom — legacy paints `1px solid #aeb6be` (dark)
   on `.x-toolbar` inside the Location panel. Soften to the theme's
   `--acs-border-light` so the toolbar/tree boundary reads quietly. */
:is(.x-window, .task-popup).acs-task-host .x-tab-panel-body > .x-panel:has(#search_search_book) .x-toolbar {
    border-bottom-color: var(--acs-border-light, #ecf0f6) !important;
}

/* #search_search_book filter input — legacy ExtJS sized the wrap at 64px
   inline, leaving the input at ~26px so the placeholder ("Filter Books by
   Title") is clipped. Stretch the wrap + input to fill the toolbar so the
   filter feels first-class, matching the search-results-grid toolbar
   density. */
:is(.x-window, .task-popup).acs-task-host .x-tab-panel-body > .x-panel:has(#search_search_book) .x-toolbar-left,
:is(.x-window, .task-popup).acs-task-host .x-tab-panel-body > .x-panel:has(#search_search_book) .x-toolbar-left-row {
    width: 100% !important;
}
/* Override the ExtJS inline `width: 768px` / `764px` on the toolbar so its
   width follows the panel/viewport. (Same panel:has(#search_search_book)
   scope as the other Location-tab rules above.) */
:is(.x-window, .task-popup).acs-task-host .x-tab-panel-body > .x-panel:has(#search_search_book) .x-panel-tbar,
:is(.x-window, .task-popup).acs-task-host .x-tab-panel-body > .x-panel:has(#search_search_book) .x-panel-tbar > .x-toolbar,
:is(.x-window, .task-popup).acs-task-host .x-tab-panel-body > .x-panel:has(#search_search_book) .x-panel-tbar table.x-toolbar-ct,
:is(.x-window, .task-popup).acs-task-host .x-tab-panel-body > .x-panel:has(#search_search_book) .x-panel-tbar td.x-toolbar-left,
:is(.x-window, .task-popup).acs-task-host .x-tab-panel-body > .x-panel:has(#search_search_book) .x-panel-tbar td.x-toolbar-left > table {
    width: 100% !important;
    box-sizing: border-box !important;
}

/* The wrap has `width: 64px` inline (ExtJS-set). Override to fill the
   toolbar cell, and the input fills the wrap; both stretch as the toolbar
   grows. */
:is(.x-window, .task-popup).acs-task-host .x-tab-panel-body > .x-panel:has(#search_search_book) td.x-toolbar-cell:has(#search_search_book) {
    width: 100% !important;
}
:is(.x-window, .task-popup).acs-task-host .x-tab-panel-body > .x-panel:has(#search_search_book) .x-form-field-wrap:has(#search_search_book) {
    width: 100% !important;
    box-sizing: border-box !important;
    flex: 1 1 auto !important;
}
:is(.x-window, .task-popup).acs-task-host .x-tab-panel-body > .x-panel:has(#search_search_book) #search_search_book {
    width: 100% !important;
    min-width: 0 !important;
    flex: 1 1 auto !important;
    box-sizing: border-box !important;
}

/* N1/N2: replace legacy bitmap-icon backgrounds on the four toolbar buttons
   (Add Task Note / Copy Existing Note / Edit Note / Remove Note) with the
   shared-icons theme glyphs — matching the search-results-grid toolbar
   pattern (ext-acs-startpage.css:4787–4853): flat button with no chrome on
   the outer .x-btn, inline-block ::before icon next to the text, 16px,
   text-secondary gray that flips to brand-cyan on hover. */
:is(.x-window, .task-popup).acs-task-host .x-tab-panel-body > .x-grid-panel .x-panel-tbar .x-btn.x-btn-text-icon {
    background-color: transparent !important;
    background-image: none !important;
    border: none !important;
    border-radius: 0 !important;
    height: auto !important;
}
:is(.x-window, .task-popup).acs-task-host .x-tab-panel-body > .x-grid-panel .x-panel-tbar .x-btn.x-btn-text-icon button.x-btn-text {
    background-image: none !important;
    background-color: transparent !important;
    height: auto !important;
    padding: 6px 12px !important;
    font-weight: 500 !important;
    font-size: 13px !important;
    line-height: 1.4 !important;
    color: var(--acs-text-secondary, #5a6370) !important;
    box-sizing: border-box !important;
}
:is(.x-window, .task-popup).acs-task-host .x-tab-panel-body > .x-grid-panel .x-panel-tbar .x-btn.x-btn-text-icon button.x-btn-text::before {
    content: '' !important;
    display: inline-block !important;
    width: 16px !important;
    height: 16px !important;
    margin-right: 4px !important;
    vertical-align: -3px !important;
    -webkit-mask-repeat: no-repeat !important;
            mask-repeat: no-repeat !important;
    -webkit-mask-position: center !important;
            mask-position: center !important;
    -webkit-mask-size: 16px 16px !important;
            mask-size: 16px 16px !important;
    background-image: none !important;
    background-color: var(--acs-text-secondary, #5a6370) !important;
    transition: background-color 0.15s !important;
}

/* Per-button icon — Add (1st cell) = plus, Copy (2nd cell) = copy, Edit
   (3rd cell, .edit cls) = edit, Remove (4th cell, .delete cls) = trash. */
:is(.x-window, .task-popup).acs-task-host .x-tab-panel-body > .x-grid-panel .x-panel-tbar td.x-toolbar-cell:nth-of-type(1) button.x-btn-text.add::before {
    -webkit-mask-image: var(--icon-plus) !important;
            mask-image: var(--icon-plus) !important;
}
:is(.x-window, .task-popup).acs-task-host .x-tab-panel-body > .x-grid-panel .x-panel-tbar td.x-toolbar-cell:nth-of-type(2) button.x-btn-text.add::before {
    -webkit-mask-image: var(--icon-copy) !important;
            mask-image: var(--icon-copy) !important;
}
:is(.x-window, .task-popup).acs-task-host .x-tab-panel-body > .x-grid-panel .x-panel-tbar button.x-btn-text.edit::before {
    -webkit-mask-image: var(--icon-edit) !important;
            mask-image: var(--icon-edit) !important;
}
:is(.x-window, .task-popup).acs-task-host .x-tab-panel-body > .x-grid-panel .x-panel-tbar button.x-btn-text.delete::before {
    -webkit-mask-image: var(--icon-trash) !important;
            mask-image: var(--icon-trash) !important;
}
:is(.x-window, .task-popup).acs-task-host .x-tab-panel-body > .x-grid-panel .x-panel-tbar button.x-btn-text.open::before {
    -webkit-mask-image: var(--icon-external-link) !important;
            mask-image: var(--icon-external-link) !important;
}

/* Hover: text + icon flip to brand-cyan, no bg fill (matches the search-
   results-grid clear_grid_filters / srch_export / ss_item pattern). */
:is(.x-window, .task-popup).acs-task-host .x-tab-panel-body > .x-grid-panel .x-panel-tbar .x-btn.x-btn-text-icon.x-btn-over {
    background-color: transparent !important;
    background-image: none !important;
}
:is(.x-window, .task-popup).acs-task-host .x-tab-panel-body > .x-grid-panel .x-panel-tbar .x-btn.x-btn-text-icon.x-btn-over button.x-btn-text {
    color: var(--acs-brand-cyan, #00aeef) !important;
}
:is(.x-window, .task-popup).acs-task-host .x-tab-panel-body > .x-grid-panel .x-panel-tbar .x-btn.x-btn-text-icon.x-btn-over button.x-btn-text::before {
    background-color: var(--acs-brand-cyan, #00aeef) !important;
}

/* N4-header: Notes grid column headers — mirror the search-results-grid
   header pattern (ext-acs-startpage.css:3018–3047). Slate-grey bg, light
   border-bottom, secondary-text 12px semi-bold uppercase with letter-spacing;
   header hover flips to a slightly darker bg + cyan accent border. */
:is(.x-window, .task-popup).acs-task-host .x-tab-panel-body > .x-grid-panel td.x-grid3-hd {
    background-image: none !important;
    background-color: #f5f7f9 !important;
    border-left: none !important;
    border-right: none !important;
    border-bottom: 1px solid #e2e6ec !important;
    border-top: none !important;
}
:is(.x-window, .task-popup).acs-task-host .x-tab-panel-body > .x-grid-panel .x-grid3-hd-inner {
    color: var(--acs-text-secondary, #5a6370) !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.03em !important;
    padding: 8px 22px 8px 6px !important;
    position: relative !important;
}
:is(.x-window, .task-popup).acs-task-host .x-tab-panel-body > .x-grid-panel td.x-grid3-hd-over {
    background-image: none !important;
    background-color: #eef1f5 !important;
    border-bottom-color: var(--acs-brand-cyan, #00aeef) !important;
}
:is(.x-window, .task-popup).acs-task-host .x-tab-panel-body > .x-grid-panel td.x-grid3-hd-over .x-grid3-hd-inner {
    color: var(--acs-text-primary, #1c2127) !important;
}

/* N4: Notes grid chrome — mirror the saved-search / search-results grid look
   already defined in ext-acs-startpage.css:3314–3353 (which doesn't ship on
   compliance pages). Scoped to the Notes grid inside the task-window so the
   underlying all_taskreport main grid is unaffected. */
:is(.x-window, .task-popup).acs-task-host .x-tab-panel-body > .x-grid-panel .x-grid3 .x-grid3-row {
    border-color: var(--acs-border-light, #f0f2f5) !important;
    border-bottom-width: 1px !important;
    border-top-width: 0 !important;
    background-color: #fff !important;
}
:is(.x-window, .task-popup).acs-task-host .x-tab-panel-body > .x-grid-panel .x-grid3 .x-grid3-row-alt {
    background-color: #fafbfc !important;
}
:is(.x-window, .task-popup).acs-task-host .x-tab-panel-body > .x-grid-panel .x-grid3 .x-grid3-row-over {
    background-color: #f0f7ff !important;
    border-color: #e2e6ec !important;
}
:is(.x-window, .task-popup).acs-task-host .x-tab-panel-body > .x-grid-panel .x-grid3 .x-grid3-row-selected {
    background-color: #EEF6FB !important;
    border-color: #c8e1f0 !important;
}
:is(.x-window, .task-popup).acs-task-host .x-tab-panel-body > .x-grid-panel .x-grid3 .x-grid3-cell-inner {
    color: var(--acs-text-primary, #1c2127) !important;
    font-size: 13px !important;
    padding: 6px 6px !important;
    line-height: 1.4 !important;
}
:is(.x-window, .task-popup).acs-task-host .x-tab-panel-body > .x-grid-panel .x-grid3 .x-grid3-cell-first .x-grid3-cell-inner {
    padding-left: 10px !important;
}
:is(.x-window, .task-popup).acs-task-host .x-tab-panel-body > .x-grid-panel .x-grid3 td.x-grid3-cell {
    border-right: none !important;
}

/* N5: replace the legacy bitmap <img> the note-type and attachments column
   renderers paint (acs_compliance.render_note_type / render_attachments in
   ext-acs-compliance-widgets.js:6025+) with theme-icon masks. Same pattern
   as the collaborator-grid img override above (lines 41–66): hide the <img>
   then paint via the parent td's ::before pseudo. Mapping:
     note.png         → --icon-sticky-note   (general note)
     complete.png     → --icon-check-circle  (task complete)
     un_complete.png  → --icon-x-circle      (mark incomplete)
     rubber_stamp.png → --icon-stamp         (verified)
     audit.png        → --icon-clipboard-list (audit)
     1blank.png       → no glyph (kept blank, default fall-through)
     has_attachments.png → --icon-paperclip
*/
:is(.x-window, .task-popup).acs-task-host .x-tab-panel-body > .x-grid-panel .x-grid3-body .x-grid3-td-note_type img,
:is(.x-window, .task-popup).acs-task-host .x-tab-panel-body > .x-grid-panel .x-grid3-body .x-grid3-td-has_attachments img {
    visibility: hidden !important;
}
:is(.x-window, .task-popup).acs-task-host .x-tab-panel-body > .x-grid-panel .x-grid3-body .x-grid3-td-note_type,
:is(.x-window, .task-popup).acs-task-host .x-tab-panel-body > .x-grid-panel .x-grid3-body .x-grid3-td-has_attachments {
    position: relative !important;
}
:is(.x-window, .task-popup).acs-task-host .x-tab-panel-body > .x-grid-panel .x-grid3-body .x-grid3-td-note_type:has(.acs-img)::before,
:is(.x-window, .task-popup).acs-task-host .x-tab-panel-body > .x-grid-panel .x-grid3-body .x-grid3-td-has_attachments:has(.acs-img)::before {
    content: '' !important;
    position: absolute !important;
    left: 50% !important;
    top: 50% !important;
    transform: translate(-50%, -50%) !important;
    width: 16px !important;
    height: 16px !important;
    -webkit-mask-repeat: no-repeat !important;
            mask-repeat: no-repeat !important;
    -webkit-mask-position: center !important;
            mask-position: center !important;
    -webkit-mask-size: 16px 16px !important;
            mask-size: 16px 16px !important;
    background-color: var(--acs-text-secondary, #5a6370) !important;
    pointer-events: none !important;
}
:is(.x-window, .task-popup).acs-task-host .x-tab-panel-body > .x-grid-panel .x-grid3-body .x-grid3-td-note_type:has(.acs-img-note)::before {
    -webkit-mask-image: var(--icon-sticky-note) !important;
            mask-image: var(--icon-sticky-note) !important;
    background-color: var(--acs-brand-cyan-muted) !important;
}
:is(.x-window, .task-popup).acs-task-host .x-tab-panel-body > .x-grid-panel .x-grid3-body .x-grid3-td-note_type:has(.acs-img-complete)::before {
    -webkit-mask-image: var(--icon-check-circle) !important;
            mask-image: var(--icon-check-circle) !important;
    background-color: var(--acs-success, #2e7d32) !important;
}
:is(.x-window, .task-popup).acs-task-host .x-tab-panel-body > .x-grid-panel .x-grid3-body .x-grid3-td-note_type:has(.acs-img-un_complete)::before {
    -webkit-mask-image: var(--icon-x-circle) !important;
            mask-image: var(--icon-x-circle) !important;
    background-color: var(--acs-form-invalid-border, #d04437) !important;
}
:is(.x-window, .task-popup).acs-task-host .x-tab-panel-body > .x-grid-panel .x-grid3-body .x-grid3-td-note_type:has(.acs-img-rubber_stamp)::before {
    -webkit-mask-image: var(--icon-stamp) !important;
            mask-image: var(--icon-stamp) !important;
    background-color: var(--acs-brand-cyan-muted) !important;
}
:is(.x-window, .task-popup).acs-task-host .x-tab-panel-body > .x-grid-panel .x-grid3-body .x-grid3-td-note_type:has(.acs-img-audit)::before {
    -webkit-mask-image: var(--icon-clipboard-list) !important;
            mask-image: var(--icon-clipboard-list) !important;
    background-color: var(--acs-text-secondary, #5a6370) !important;
}
:is(.x-window, .task-popup).acs-task-host .x-tab-panel-body > .x-grid-panel .x-grid3-body .x-grid3-td-has_attachments:has(.acs-img-has_attachments)::before {
    -webkit-mask-image: var(--icon-paperclip) !important;
            mask-image: var(--icon-paperclip) !important;
    background-color: var(--acs-text-secondary, #5a6370) !important;
}

/* Related Tasks "link" column: legacy renderer paints
   <img src="right-arrow.png"> as the row's open-task affordance. Hide the
   bitmap and paint an external-link SVG mask on the cell-inner so the
   icon tracks the theme (and the same glyph as the toolbar Open Task
   button). */
:is(.x-window, .task-popup).acs-task-host .x-tab-panel-body > .x-grid-panel .x-grid3-body .x-grid3-col-link > img[src$="right-arrow.png"] {
    visibility: hidden !important;
}
:is(.x-window, .task-popup).acs-task-host .x-tab-panel-body > .x-grid-panel .x-grid3-body .x-grid3-td-link .x-grid3-cell-inner.x-grid3-col-link {
    position: relative !important;
}
/* ============================================================================
   Add Related Tasks dialog (#add_related_window)
   ============================================================================ */

/* Inner grid in #add_related_window — apply the same chrome as the Notes
   grid (saved-search-grid pattern). The dialog grid is wrapped in
   #existing_note_list panel; no toolbar, just headers + rows + checkbox
   first column. */
#add_related_window .x-grid3 .x-grid3-row {
    border-color: var(--acs-border-light, #f0f2f5) !important;
    border-bottom-width: 1px !important;
    border-top-width: 0 !important;
    background-color: #fff !important;
}
#add_related_window .x-grid3 .x-grid3-row-alt {
    background-color: #fafbfc !important;
}
#add_related_window .x-grid3 .x-grid3-row-over {
    background-color: #f0f7ff !important;
    border-color: #e2e6ec !important;
}
#add_related_window .x-grid3 .x-grid3-row-selected {
    background-color: #EEF6FB !important;
    border-color: #c8e1f0 !important;
}
#add_related_window .x-grid3 .x-grid3-cell-inner {
    color: var(--acs-text-primary, #1c2127) !important;
    font-size: 13px !important;
    padding: 6px 6px !important;
    line-height: 1.4 !important;
}
#add_related_window .x-grid3 .x-grid3-cell-first .x-grid3-cell-inner {
    padding-left: 10px !important;
}
#add_related_window .x-grid3 td.x-grid3-cell {
    border-right: none !important;
}

/* Header chrome — match Notes-grid (and search-results-grid) headers. */
#add_related_window td.x-grid3-hd {
    background-image: none !important;
    background-color: #f5f7f9 !important;
    border-left: none !important;
    border-right: none !important;
    border-bottom: 1px solid #e2e6ec !important;
    border-top: none !important;
}
/* Header typography + row/header checker theming for this dialog now
   inherits from shell-wide rules in ext-acs-theme.css:
     - "Grid column header — shell-wide chrome, typography, hover, and
       filter state"  (typography, hover, filter funnel)
     - "Grid CheckboxSelectionModel — shell-wide row + header checker
       theming"        (32px checker column, 16×16 themed box, flex-centre,
                       checked-state cyan fill + white tick)
   The grid's selection model is constructed with `header: false`, so the
   header checker isn't rendered at all on this dialog — no per-dialog
   hide-rules needed. */

/* Primary Add button in the footer — same chrome as the Notes-dialog Save
   button (cyan-muted fill, darken-on-hover, white 600-weight text). */
#add_related_window .x-panel-footer.x-panel-btns .x-toolbar-left-row > td.x-toolbar-cell:first-of-type > table.x-btn,
#add_related_window .x-panel-footer.x-panel-btns .x-toolbar-right-row > td.x-toolbar-cell:first-of-type > table.x-btn {
    background: var(--acs-brand-cyan-muted) !important;
    background-color: var(--acs-brand-cyan-muted) !important;
    background-image: none !important;
    border: 1px solid var(--acs-brand-cyan-muted) !important;
}
#add_related_window .x-panel-footer.x-panel-btns .x-toolbar-left-row > td.x-toolbar-cell:first-of-type > table.x-btn.x-btn-over,
#add_related_window .x-panel-footer.x-panel-btns .x-toolbar-right-row > td.x-toolbar-cell:first-of-type > table.x-btn.x-btn-over {
    background: var(--acs-brand-cyan-deep, #0a6f8c) !important;
    background-color: var(--acs-brand-cyan-deep, #0a6f8c) !important;
    border-color: var(--acs-brand-cyan-deep, #0a6f8c) !important;
}
#add_related_window .x-panel-footer.x-panel-btns .x-toolbar-left-row > td.x-toolbar-cell:first-of-type > table.x-btn button,
#add_related_window .x-panel-footer.x-panel-btns .x-toolbar-left-row > td.x-toolbar-cell:first-of-type > table.x-btn .x-btn-text,
#add_related_window .x-panel-footer.x-panel-btns .x-toolbar-right-row > td.x-toolbar-cell:first-of-type > table.x-btn button,
#add_related_window .x-panel-footer.x-panel-btns .x-toolbar-right-row > td.x-toolbar-cell:first-of-type > table.x-btn .x-btn-text {
    color: var(--acs-card-bg) !important;
    font-weight: 600 !important;
}

:is(.x-window, .task-popup).acs-task-host .x-tab-panel-body > .x-grid-panel .x-grid3-body .x-grid3-td-link .x-grid3-cell-inner.x-grid3-col-link:has(> :is(.acs-img-right-arrow, .acs-img-left-right-arrow))::before {
    content: '' !important;
    position: absolute !important;
    left: 10px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    width: 14px !important;
    height: 14px !important;
    -webkit-mask-image: var(--icon-external-link) !important;
            mask-image: var(--icon-external-link) !important;
    -webkit-mask-size: 14px 14px !important;
            mask-size: 14px 14px !important;
    -webkit-mask-position: center !important;
            mask-position: center !important;
    -webkit-mask-repeat: no-repeat !important;
            mask-repeat: no-repeat !important;
    background-color: var(--acs-text-secondary, #5a6370) !important;
    pointer-events: none !important;
}

/* Attachments column header — the legacy global at compliance.css:179 paints
   the legacy `has_attachments.png` bitmap as the header's background-image.
   In the Notes grid scope, kill the bitmap and paint a paperclip SVG mask
   centered in the header instead. */
:is(.x-window, .task-popup).acs-task-host .x-tab-panel-body > .x-grid-panel .x-grid3-header td.x-grid3-hd.x-grid3-td-has_attachments {
    background-image: none !important;
    padding-left: 0 !important;
    position: relative !important;
}
:is(.x-window, .task-popup).acs-task-host .x-tab-panel-body > .x-grid-panel .x-grid3-header td.x-grid3-hd.x-grid3-td-has_attachments .x-grid3-hd-inner {
    padding-left: 6px !important;
    padding-right: 6px !important;
}
:is(.x-window, .task-popup).acs-task-host .x-tab-panel-body > .x-grid-panel .x-grid3-header td.x-grid3-hd.x-grid3-td-has_attachments .x-grid3-hd-inner::before {
    content: '' !important;
    display: inline-block !important;
    vertical-align: -3px !important;
    width: 14px !important;
    height: 14px !important;
    -webkit-mask-image: var(--icon-paperclip) !important;
            mask-image: var(--icon-paperclip) !important;
    -webkit-mask-size: 14px 14px !important;
            mask-size: 14px 14px !important;
    -webkit-mask-position: center !important;
            mask-position: center !important;
    -webkit-mask-repeat: no-repeat !important;
            mask-repeat: no-repeat !important;
    background-image: none !important;
    background-color: var(--acs-text-secondary, #5a6370) !important;
}

/* ============================================================================
   Add/Edit Note dialog (note_window + state_note_window — both build the
   same note_form which contains an input id="note_title", so :has(#note_title)
   catches all three surfaces — Add Note, Edit Note, and the status-change
   note window.
   ============================================================================ */

/* A7: Title input was ExtJS-sized to 422px while the editor below it spans
   the full body width. Stretch the input wrap + input to fill the form-element
   container so the right edge aligns with the editor. The editor sits with
   ~36px of intrinsic right margin inside its own form-element, so we mirror
   that on the title's form-element so the right edges line up. */
.x-window:is(.acs-note-host, #acs-note-host) #x-form-el-note_title {
    padding-right: 36px !important;
}
.x-window:is(.acs-note-host, #acs-note-host) #note_title.x-form-text {
    width: 100% !important;
    box-sizing: border-box !important;
    min-width: 0 !important;
}

/* A2: HTML editor toolbar — add a subtle bottom border so the toolbar/iframe
   boundary reads. The toolbar itself uses transparent bg currently. */
.x-window:is(.acs-note-host, #acs-note-host) .x-html-editor-tb {
    border-bottom: 1px solid var(--acs-border-light) !important;
    padding-bottom: 4px !important;
    margin-bottom: 4px !important;
}

/* Fieldset banner styling lives in ext-acs-theme.css (search-form banner
   pattern: no border on fieldset, uppercase legend banner with bottom-
   border separator + SVG chevron toggle, flex-centered icon). Notes-
   dialog-only override: theme the "Attach a file" link inside the
   Attachments fieldset.

   The `acs_ext_link` xtype renders `<div><img src="paperclip.png"/><a/></div>`
   (see ext-acs-widgets.js:2677 — ExtLink.onRender). Replace the legacy
   bitmap by setting `content: var(--icon-paperclip)` on the <img> — this
   works on replaced elements (where mask-image can't paint over the
   intrinsic image content). currentColor inside the SVG inherits from
   the <img>'s `color` so we get themed paint. Same approach used for the
   fileuploader_widget icons below. */
.x-window:is(.acs-note-host, #acs-note-host) fieldset.x-fieldset div:has(> .acs-img-paperclip) {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
}
.x-window:is(.acs-note-host, #acs-note-host) fieldset.x-fieldset div > img[src$="paperclip.png"] {
    content: var(--icon-paperclip) !important;
    width: 14px !important;
    height: 14px !important;
    color: var(--acs-link-color, #00aeef) !important;
    vertical-align: middle !important;
}
.x-window:is(.acs-note-host, #acs-note-host) fieldset.x-fieldset a {
    color: var(--acs-link-color, #00aeef) !important;
    text-decoration: none !important;
    font-weight: 500 !important;
    line-height: 1 !important;
}
.x-window:is(.acs-note-host, #acs-note-host) fieldset.x-fieldset a:hover {
    text-decoration: underline !important;
}

/* Each direct child of the fieldset body (the per-file upload widget row +
   the "Attach another file" link) gets its own line, so adding multiple
   files stacks cleanly. */
.x-window:is(.acs-note-host, #acs-note-host) fieldset.x-fieldset .x-fieldset-body > div {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    margin-bottom: 6px !important;
}

/* Give breathing room between the last upload row and the "Attach another
   file" link so the link doesn't sit right under the file input. The link
   container has no .fileuploader_widget cls — match by having a direct <a>
   child. */
.x-window:is(.acs-note-host, #acs-note-host) fieldset.x-fieldset .x-fieldset-body > .fileuploader_widget {
    margin-bottom: 12px !important;
}

/* Indent the link text so it lines up with the "Choose file" file-input
   column of the upload rows above. Paperclip stays at the row gutter, but
   the link <a> shifts right by ~10px (the width difference between the
   bullet+gap and the file input's left-padding). */
.x-window:is(.acs-note-host, #acs-note-host) fieldset.x-fieldset .x-fieldset-body > div:has(> .acs-img-paperclip) > a {
    margin-left: 10px !important;
}

/* fileuploader_widget — swap the legacy paperclip + del_small bitmaps for
   theme SVGs. `<img>` is a replaced element, so mask-image doesn't paint
   above its rendered `src` (see saved-pref feedback_replaced_elements_no_
   pseudo.md). Use the proven `content: var(--icon-X)` trick instead: the
   data-URI SVG replaces the <img>'s rendered content entirely, while
   currentColor inside the SVG inherits from the element's `color`. */
.x-window:is(.acs-note-host, #acs-note-host) fieldset.x-fieldset .fileuploader_widget > img[src$="paperclip.png"] {
    content: var(--icon-paperclip) !important;
    width: 14px !important;
    height: 14px !important;
    color: var(--acs-text-secondary, #5a6370) !important;
    vertical-align: middle !important;
}
.x-window:is(.acs-note-host, #acs-note-host) .fileuploader_widget > img[src$="del_small.png"] {
    content: var(--icon-trash) !important;
    width: 14px !important;
    height: 14px !important;
    color: var(--acs-text-secondary, #5a6370) !important;
    cursor: pointer !important;
    vertical-align: middle !important;
    transition: color 0.15s !important;
    border-radius: 3px !important;
}
.x-window:is(.acs-note-host, #acs-note-host) .fileuploader_widget > img[src$="del_small.png"]:hover {
    color: var(--acs-form-invalid-border, #d04437) !important;
}
/* Hide the 1blank.png upload-progress placeholder — it's a 16×16 spacer that
   only matters when an upload is in flight, but visually it adds whitespace. */
.x-window:is(.acs-note-host, #acs-note-host) .fileuploader_widget > span > img[src$="1blank.png"] {
    display: none !important;
}

/* A1: Primary Save button in the dialog footer — same chrome as the task
   dialog #save_task (muted-teal fill, darken-on-hover, white text). The
   footer is .x-panel-footer.x-panel-btns; buttons render inside an x-toolbar
   row, so we target the first toolbar-left td.x-toolbar-cell > table.x-btn. */
.x-window:is(.acs-note-host, #acs-note-host) .x-panel-footer.x-panel-btns .x-toolbar-left-row > td.x-toolbar-cell:first-of-type > table.x-btn {
    background: var(--acs-brand-cyan-muted) !important;
    background-color: var(--acs-brand-cyan-muted) !important;
    background-image: none !important;
    border: 1px solid var(--acs-brand-cyan-muted) !important;
}
.x-window:is(.acs-note-host, #acs-note-host) .x-panel-footer.x-panel-btns .x-toolbar-left-row > td.x-toolbar-cell:first-of-type > table.x-btn.x-btn-over {
    background: var(--acs-brand-cyan-deep, #0a6f8c) !important;
    background-color: var(--acs-brand-cyan-deep, #0a6f8c) !important;
    border-color: var(--acs-brand-cyan-deep, #0a6f8c) !important;
}
.x-window:is(.acs-note-host, #acs-note-host) .x-panel-footer.x-panel-btns .x-toolbar-left-row > td.x-toolbar-cell:first-of-type > table.x-btn button,
.x-window:is(.acs-note-host, #acs-note-host) .x-panel-footer.x-panel-btns .x-toolbar-left-row > td.x-toolbar-cell:first-of-type > table.x-btn .x-btn-text {
    color: var(--acs-card-bg) !important;
    font-weight: 600 !important;
}
/* Keep the disabled state readable — .x-item-disabled cascades opacity 0.6
   to fade the whole button; explicitly hold the fill so it stays cyan. */
.x-window:is(.acs-note-host, #acs-note-host) .x-panel-footer.x-panel-btns .x-toolbar-left-row > td.x-toolbar-cell:first-of-type > table.x-btn.x-item-disabled {
    background-color: var(--acs-brand-cyan-muted) !important;
}

/* ============================================================================
   Copy Existing Note dialog (#existing_notes_grid is a stable hook unique
   to this window).
   ============================================================================ */

/* C1: Primary Select button in the dialog footer — same chrome as A1. */
.x-window:has(#existing_notes_grid) .x-panel-footer.x-panel-btns .x-toolbar-right-row > td.x-toolbar-cell:first-of-type > table.x-btn {
    background: var(--acs-brand-cyan-muted) !important;
    background-color: var(--acs-brand-cyan-muted) !important;
    background-image: none !important;
    border: 1px solid var(--acs-brand-cyan-muted) !important;
}
.x-window:has(#existing_notes_grid) .x-panel-footer.x-panel-btns .x-toolbar-right-row > td.x-toolbar-cell:first-of-type > table.x-btn.x-btn-over {
    background: var(--acs-brand-cyan-deep, #0a6f8c) !important;
    background-color: var(--acs-brand-cyan-deep, #0a6f8c) !important;
    border-color: var(--acs-brand-cyan-deep, #0a6f8c) !important;
}
.x-window:has(#existing_notes_grid) .x-panel-footer.x-panel-btns .x-toolbar-right-row > td.x-toolbar-cell:first-of-type > table.x-btn button,
.x-window:has(#existing_notes_grid) .x-panel-footer.x-panel-btns .x-toolbar-right-row > td.x-toolbar-cell:first-of-type > table.x-btn .x-btn-text {
    color: var(--acs-card-bg) !important;
    font-weight: 600 !important;
}
.x-window:has(#existing_notes_grid) .x-panel-footer.x-panel-btns .x-toolbar-right-row > td.x-toolbar-cell:first-of-type > table.x-btn.x-item-disabled {
    background-color: var(--acs-brand-cyan-muted) !important;
}


/* ============================================================================
   Add / Edit Task Category Admin (#group_user_win)

   The Select User combo is configured `width: 290`; this block sets a
   hand-measured 220px input instead (STYLING_PATTERNS 25.2b).

   `display: flex`, never `inline-flex`: this dialog is `layout: 'absolute'`
   and an inline box moves the origin the inline left/top offsets count from.
   Do not set `position` or `height` here for the same reason.
   ============================================================================ */
body.tasks-setup-page #group_user_win.x-window .x-form-field-wrap:not(.x-hide-display) {
    display: flex !important;
    width: -moz-fit-content !important;
    width: fit-content !important;
    flex: 0 0 auto !important;
}
body.tasks-setup-page #group_user_win.x-window .x-form-field-wrap.x-hide-display {
    display: none !important;
}
body.tasks-setup-page #group_user_win.x-window .x-form-field-wrap > input.x-form-text {
    flex: 0 0 auto !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    /* The theme pins `width: 0 !important`, which no inline value can outrank,
       so the width is restated here rather than in the component config. The
       longest display_name this combo offers measures 188px at the field's 12px
       font; 220px leaves a 196px content box after the 24px of padding. */
    width: 220px !important;
}
