/* The medQ names over the palette's roles. Declared again on a dark-scoped part (the open-patient
   cards), because a custom property holding var() is resolved where it is declared: inherited from
   the root, these would keep the light theme's values under the dark ones. */
:root,
.iws-dark-scope {
    --medq-navy: var(--iws-heading);
    --medq-blue: var(--iws-brand);
    --medq-sky: var(--iws-brand-soft);
    --medq-yellow: var(--iws-highlight);
    --medq-orange: var(--iws-attention);
    --medq-white: var(--iws-surface);
    --medq-gray-50: var(--iws-surface-sunken);
    --medq-gray-400: var(--iws-text-faint);
    --medq-gray-700: var(--iws-text-secondary);
    --medq-black: var(--iws-text);
}

:root {
    /* The height of every single-line box: text, combo, date, time, spin, masked, drop-down. */
    --iws-control-height: 32px;

    /* The wash across a band: solid at the left where the name sits, gone by the right. Named
       because a second thing wears it now — the section bands inside registration, so a group inside a
       frame reads as part of the same frame (Marius, 2026-09-16: "reuse the color and gradient from
       title bar in each acrodeon"). Two literals drifting apart is exactly the failure a token prevents. */
    --iws-band: linear-gradient(90deg, var(--iws-band-fill), transparent);

    /* The same wash, denser at the left, for a band that has to stand out from its neighbours — a
       section the practice has made mandatory. */
    --iws-band-strong: linear-gradient(90deg, var(--iws-band-fill-strong), transparent);

    /* The same wash in the other hue, for a band whose content is not safe yet: a frame asking whether
       to destroy something, and a chart area holding text the user has typed and not saved. `#f0aba6`
       is the blue's own recipe — `--list-tone-danger` (#d92d20) mixed 60% with white, exactly what
       `#bdd0e9` is to `--medq-blue` — so the two tones carry the same weight. A red picked by eye lands
       heavier, red reading as more urgent than blue at equal lightness.

       Named on the day the second surface wanted it (Marius, 2026-09-18: "red toolbar should be on
       areas where you typed text which is not saved yet"), which is the moment a literal in one rule
       becomes a literal in two. */
    --iws-band-danger: linear-gradient(90deg, var(--iws-band-fill-danger), transparent);

    /* A frame's title strip and base bar, solid rather than washed: the strip is a surface you grab,
       not a band that labels a section. The same left-end colours the washes start from, so a frame
       and the sections inside it still read as one family. */
    --iws-frame-fill: var(--iws-band-fill);
    --iws-frame-fill-danger: var(--iws-band-fill-danger);

    --list-tone-information: var(--iws-info-tone);
    --list-tone-information-text: var(--iws-info-text);
    --list-tone-success: var(--iws-success-tone);
    --list-tone-success-text: var(--iws-success-text);
    --list-tone-warning: var(--iws-warning-tone);
    --list-tone-warning-text: var(--iws-warning-text);
    --list-tone-danger: var(--iws-danger-tone);
    --list-tone-danger-text: var(--iws-danger-text);
    --list-tone-muted: var(--iws-muted-tone);
    --list-tone-muted-text: var(--iws-muted-text);

    /* The tint an opened episode and the encounters hanging off it share (Marius, 2026-09-18: "the
       opened episode row color should be the same with details area"). A token because the two are
       painted by two different components' stylesheets, and the whole point of the colour is that
       they are one block — which a literal in two files stops being the first time one is nudged. */
    --chart-depth-tint: var(--iws-tint);

    /* The ground a chart's panes are laid on, and the reason they read as panes at all (Marius,
       2026-09-19: "specs have a separate zone and rounded areas"). It is the design sheets' own page
       colour — a neutral grey rather than a blue one, so that a white card on it is white and not a
       blue card gone pale. Cards are white with `--shell-border` and 6px corners; the zone is what
       they float on and what the gaps between them show. */
    --chart-zone: var(--iws-zone);

    /* The row height of every workspace list (Worklist, Front Desk, Tasks). A list that should read
       like them takes the `workspace-list` class on its grid and the `grid-row` class on its data rows. */
    --iws-workspace-row: 40px;

}

/* A height on the data row, not on its cells: on the cells it also reaches the grid's virtual-scroll
   spacers, which are cells with no row to belong to. A floor, not a cap, since a `tr` is always at
   least its content. The status stripe's cell drops the theme's padding above and below it, or the
   36px stripe would drive the row to 50. */
.dxbl-grid.workspace-list .grid-row { height: var(--iws-workspace-row); }
.dxbl-grid.workspace-list tbody > tr > td:first-child { --dxbl-grid-text-cell-padding-y: 0; }

.list-indicator-column,
.list-indicator-cell {
    width: 1rem;
    min-width: 1rem;
    padding: 0 .2rem;
    text-align: center;
}

.list-leading-indicator {
    display: inline-block;
    width: .3rem;
    height: 2.25rem;
    border-radius: .1rem;
    vertical-align: middle;
}

.list-leading-indicator.list-tone-information { background: var(--list-tone-information); }
.list-leading-indicator.list-tone-success { background: var(--list-tone-success); }
.list-leading-indicator.list-tone-warning { background: var(--list-tone-warning); }
.list-leading-indicator.list-tone-danger { background: var(--list-tone-danger); }
.list-leading-indicator.list-tone-muted { background: var(--list-tone-muted); }
.list-leading-indicator.list-tone-none { background: transparent; }

/* Detail-rail status chip. Shared so every rail that shows a record's state looks identical;
   Patients uses the active/inactive pair, Tasks and Worklist the four-way workflow pair. */
.status-tag { display: inline-block; padding: .1rem .35rem; border-radius: .2rem; font-size: .68rem; font-weight: 700; }
.status-tag.linked { background: var(--iws-success-bg); color: var(--iws-success-text); }
.status-tag.dismissed { background: var(--iws-muted-bg); color: var(--iws-muted-text); }
.status-tag.unmatched { background: var(--iws-danger-bg); color: var(--iws-danger-text); }
.status-tag.review { background: var(--iws-warning-bg); color: var(--iws-warning-text); }
.status-tag.active { background: var(--iws-success-bg); color: var(--iws-success-text); }
.status-tag.inactive { background: var(--iws-danger-bg); color: var(--iws-danger-text); }
/* Work rather than a record: a task or an appointment is open until its due date passes. Same two
   fills as active / unmatched, because a reader should not have to learn a second colour scheme. */
.status-tag.open { background: var(--iws-success-bg); color: var(--iws-success-text); }
.status-tag.overdue { background: var(--iws-danger-bg); color: var(--iws-danger-text); }
/* An encounter's status, wherever it is shown. The colours come inline from the status catalog, so
   this carries only the shape. */
.encounter-status-chip { display: inline-block; padding: .1rem .35rem; border: 1px solid transparent; border-radius: .25rem; font-size: .68rem; line-height: 1.3; white-space: nowrap; vertical-align: middle; }
/* A task's status: the same capsule, colours inline from the task status catalog. */
.task-status-chip { display: inline-block; padding: .1rem .35rem; border: 1px solid transparent; border-radius: .25rem; font-size: .68rem; font-weight: 700; line-height: 1.3; white-space: nowrap; vertical-align: middle; }
/* The status drop-down's closed field wears the current status's three colours, handed in as custom
   properties on the wrapper; the chevron takes the text colour. */
.task-status-field { display: inline-block; max-width: 100%; }
.task-status-field .task-status-combo.dxbl-text-edit { width: 100%; background: var(--task-status-bg); border: 1px solid var(--task-status-border); border-radius: .25rem; color: var(--task-status-text); }
.task-status-field .task-status-combo > .dxbl-btn-group .dxbl-btn { color: var(--task-status-text); }
.task-status-field .task-status-value { color: var(--task-status-text); font-size: .78rem; font-weight: 700; white-space: nowrap; }
/* The workflow status sits on the box's middle line; the template's wrapper is DevExpress's, so it is reached through what it holds. */
.encounter-status-field .task-status-combo :has(> .task-status-value) { flex: 1 1 auto; min-width: 0; align-self: stretch; display: flex; align-items: center; margin-top: 0; margin-bottom: 0; padding-top: 0; padding-bottom: 0; }
.encounter-status-field .task-status-value { display: block; line-height: 1.2; }
/* The status list is short and read at a glance, so it opens to its full height instead of the
   theme's 200px with a scrollbar; the viewport cap is only for an admin list grown past the screen.
   !important because the theme sets the list's cap through a five-class chain. */
/* The filter pills of the chart's section lists, Notes and Communication alike (CH-14): All, then
   each pill on or off by itself, the count after the name. One with nothing under it is faint and
   cannot be clicked unless it is on. */
.dxbl-btn.iws-pill {
    height: auto;
    min-height: 0;
    margin: 0;
    padding: 2px 10px;
    gap: 5px;
    border-radius: 14px;
    font-size: .75rem;
    font-weight: 400;
    line-height: 1.35;
    white-space: nowrap;
    --dxbl-btn-bg: var(--iws-surface);
    --dxbl-btn-color: var(--iws-text-secondary);
    --dxbl-btn-border-color: var(--iws-border);
    --dxbl-btn-hover-bg: var(--iws-surface);
    --dxbl-btn-hover-color: var(--iws-heading);
    --dxbl-btn-hover-border-color: var(--iws-brand);
    --dxbl-btn-disabled-bg: var(--iws-surface-subtle);
    --dxbl-btn-disabled-color: var(--iws-text-faint);
    --dxbl-btn-disabled-border-color: var(--iws-border-subtle);
}
.dxbl-btn.iws-pill:disabled { opacity: 1; }
.dxbl-btn.iws-pill.is-on {
    font-weight: 600;
    --dxbl-btn-bg: var(--iws-selected);
    --dxbl-btn-color: var(--iws-link);
    --dxbl-btn-border-color: var(--iws-brand-soft);
    --dxbl-btn-hover-bg: var(--iws-selected);
    --dxbl-btn-hover-color: var(--iws-link);
    --dxbl-btn-hover-border-color: var(--iws-brand);
}
.dxbl-btn.iws-pill .iws-pill-n { color: var(--iws-text-secondary); font-weight: 400; }
.dxbl-btn.iws-pill.is-on .iws-pill-n { color: var(--iws-link); }
.dxbl-btn.iws-pill .iws-pill-n.is-alert { color: var(--iws-danger-text); }
.dxbl-btn.iws-pill:disabled .iws-pill-n { color: var(--iws-text-faint); }
/* New keeps one width whichever option it shows (MAUI IWSButtons.NewSplitWidth). */
.dxbl-btn-split.iws-new-split {
    box-sizing: border-box;
    display: inline-flex;
    width: 9.5rem;
}
.dxbl-btn-split.iws-new-split > .dxbl-btn:first-child {
    flex: 1 1 auto;
    min-width: 0;
    width: auto;
}
/* Every menu opened from a button (Paul, 2026-11-16, issue 021): never narrower than the button, as
   wide as its longest item, and wrapping only past the room it has. DevExpress already lines the menu
   up with the button's left edge, or with its right edge when it does not fit to the right; what it
   lacks is a width setting, and its 200px floor (--dxbl-btn-dropdown-min-width, declared on the
   panel itself) left a short menu wider than its button and off to one side. The button's width and
   the room come from index.html (--iws-menu-min-w, --iws-menu-max-w), measured as the menu is opened,
   because the menu is drawn at page level where CSS cannot read the button. Menus with their own
   content (a calendar, a search list) have no item list and are left alone. */
.dxbl-dropdown-dialog.dxbl-btn-dropdown-popup:has(.dxbl-btn-dropdown-list),
.dxbl-dropdown-dialog.dxbl-toolbar-dropdown {
    --dxbl-btn-dropdown-min-width: var(--iws-menu-min-w, 0px) !important;
    --dxbl-dropdown-min-width: var(--iws-menu-min-w, 0px) !important;
    box-sizing: border-box;
    flex: none !important;
    width: max-content !important;
    min-width: var(--iws-menu-min-w, 0px) !important;
    max-width: var(--iws-menu-max-w, calc(100vw - 16px)) !important;
}
.dxbl-dropdown-dialog.dxbl-btn-dropdown-popup .dxbl-btn-dropdown-list,
.dxbl-dropdown-dialog.dxbl-toolbar-dropdown .dxbl-toolbar-dropdown-item-list {
    --dxbl-dropdown-min-width: 0 !important;
    min-width: 0 !important;
}
.dxbl-dropdown-dialog.dxbl-btn-dropdown-popup .dxbl-btn-dropdown-item .dxbl-btn,
.dxbl-dropdown-dialog.dxbl-btn-dropdown-popup .dxbl-btn-dropdown-item .dxbl-btn-caption,
.dxbl-dropdown-dialog.dxbl-toolbar-dropdown .dxbl-dropdown-item,
.dxbl-dropdown-dialog.dxbl-toolbar-dropdown .dxbl-dropdown-item > span,
.dxbl-dropdown-dialog.dxbl-context-menu .dxbl-context-menu-item-text {
    white-space: normal !important;
    overflow-wrap: anywhere;
    text-align: start;
    min-width: 0;
}
.dxbl-dropdown-dialog.dxbl-context-menu {
    max-width: calc(100vw - 16px);
}
.dxbl-dropdown-dialog.iws-send-menu .dxbl-btn-dropdown-item .dxbl-btn {
    font-size: 0.75rem;
    padding-inline: 0.5rem;
}
.task-status-dropdown .dxbl-listbox,
.task-status-dropdown .dxbl-list-box-render-container { max-height: 80vh !important; }
.task-status-chip.is-off { opacity: .45; }
/* A task's priority: the glyph in the priority's colour, then the name in the text colour. */
.task-priority { display: inline-flex; align-items: center; gap: .3rem; min-width: 0; max-width: 100%; vertical-align: middle; }
.task-priority .shared-icon { display: inline-flex; flex: none; width: .95rem; height: .95rem; color: var(--task-priority-color); }
.task-priority .shared-icon svg { width: 100%; height: 100%; }
.task-priority-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task-priority-field { display: inline-block; width: 100%; }
.task-priority-null { color: var(--list-tone-muted-text); }
/* The list cell measures its own width: too narrow for glyph and name, only the glyph stays (the name
   is its tooltip). A container query rather than the grid's resize event, so a window or rail resize
   counts as much as a column drag. */
.task-priority-cell { container-type: inline-size; width: 100%; }
@container (max-width: 5.5rem) { .task-priority-cell .task-priority-name { display: none; } }
/* Check in / Arrive as chips (the Schedule pop-up): the chart chip's capsule, a step still to take
   outlined, a reached one filled in its status colour. */
.dxbl-btn.encounter-step-chip { padding: .15rem .55rem; border-radius: .25rem; font-size: .72rem; font-weight: 700; }

/* Blue "+ label" affordance that closes a detail-rail card. Shared by the Documentation rail
   (facts, charge lines, notes) and the Episodes rail (Acc#) so every rail add reads the same. */
.rail-link { justify-self: start; display: inline-flex; align-items: center; gap: .4rem; margin-top: .55rem; padding: 0; border: 0; background: transparent; color: var(--medq-blue); font: inherit; font-size: .78rem; font-weight: 600; cursor: pointer; }
.rail-link:hover:not(:disabled) { text-decoration: underline; }
.rail-link:disabled { color: var(--iws-text-faint); cursor: not-allowed; text-decoration: none; }
.rail-link svg { width: .85rem; height: .85rem; }

/* Body layout for the small chart dialogs (add charge line, structured facts, Acc#). The matching
   `.dialog-actions` went on 2026-09-15 with the last dialog off DxPopup: the frame's
   `.iws-frame-footer` is the right-aligned button row now, and every one of these dialogs hands its
   buttons to it. */
.dialog-form { display: grid; gap: .65rem; }
.dialog-form label { display: grid; gap: .25rem; color: var(--medq-navy); font-size: .78rem; font-weight: 600; }
/* `font-weight` stated, and it is the whole point of saying `font:inherit` twice over: these boxes
   are written inside their own caption — `<label>Note <textarea/></label>` — and a caption is 600
   navy, so every word anybody typed came out at the weight of the word naming the field (Marius,
   2026-09-20: "use a normal font, not sure why are bolded or so black"). What a person writes is
   the content of the form, not a heading in it. */
.dialog-form textarea { box-sizing: border-box; width: 100%; resize: vertical; min-height: 6rem; padding: .45rem; border: 1px solid var(--iws-border); border-radius: .25rem; font: inherit; font-weight: 400; line-height: 1.35; }
/* Still earned by the plain pages, which put their buttons under the last field rather than in a
   frame — Settings' own forms, PatientRegistrationPanel, the admin exports. */
.form-actions:not(:first-child) { margin-top: 1rem; }
.dialog-note { margin: .65rem 0 0; color: var(--medq-gray-700); font-size: .75rem; }
/* The reuse confirm lists each encounter on its own line, so newlines in the copy must survive. */
.reuse-message { margin: 0; color: var(--medq-navy); font-size: .78rem; line-height: 1.45; white-space: pre-line; }
/* The one sentence a confirm dialog is: a question with a name in it, and nothing else in the body.
   `.reuse-message` without the `pre-line`, since these are prose rather than a list. Shared across
   every confirm on the frame so six dialogs asking the same shape of question look alike — the
   margin is zero because `.iws-frame-scroll` owns the padding now. */
.confirm-message { margin: 0; color: var(--medq-navy); font-size: .78rem; line-height: 1.45; }

html, body {
    margin: 0;
    width: 100%;
    max-width: 100%;
    font-family: Roboto, system-ui, sans-serif;
    color: var(--iws-text);
    background: var(--iws-page);
}

/* One height whatever the size mode or theme: the box is a stretching flex row, so its input and
   buttons follow it. Zero specificity, so an editor drawn inside a capsule of its own can give it up.
   A memo is several lines; a tag box takes the height as its floor and grows with its tags. */
:where(.dxbl-text-edit:not(.dxbl-memo-edit, .dxbl-tag-box)) {
    box-sizing: border-box;
    height: var(--iws-control-height);
}

:where(.dxbl-tag-box.dxbl-text-edit) {
    box-sizing: border-box;
    min-height: var(--iws-control-height);
}

/* An input clips its text to its line, so a line no taller than the font cuts the tails of g, p and j.
   Two pixels more line, taken from the top padding, so the box keeps its height and the text sits a
   pixel higher. Above the theme's input rule (which is registered after this file) and below every
   editor that sets its own input; the dialog frame's smaller text adds its two pixels in AppIWSChrome. */
/* What is typed into an editor is in the app's face, as its caption is: the theme's own default is
   Segoe UI, which drew the value wider than the label above it. Only the editors: grids, buttons and
   menus share the theme's face through another token. */
.dxbl-text-edit.dxbl-text-edit {
    --dxbl-text-edit-font-family-s: Roboto, system-ui, sans-serif;
    --dxbl-text-edit-font-family-m: Roboto, system-ui, sans-serif;
    --dxbl-text-edit-font-family-l: Roboto, system-ui, sans-serif;
}

.dxbl-text-edit:where(:not(.dxbl-memo-edit, .dxbl-tag-box)) > input.dxbl-text-edit-input {
    padding-top: max(0px, calc(var(--dxbl-text-edit-padding-y) - 2px));
    line-height: calc(var(--dxbl-text-edit-line-height) + 2px);
}

#app {
    width: 100%;
    max-width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
}

h1, h2, h3, h4, .page-title {
    font-family: "Myriad Pro", Myriad, "Source Sans 3", system-ui, sans-serif;
}

.page-title {
    margin: 0 0 0.5rem;
    font-weight: 700;
    font-size: clamp(1.5rem, 3vw, 1.85rem);
    color: var(--medq-navy);
    letter-spacing: -0.02em;
}

.page-copy {
    margin: 0;
    color: var(--medq-gray-700);
    line-height: 1.5;
}

/* Full-page wait (Chart first load, auth gate). Centered so a 2–5s fetch is not
   a lone caption in the top-left of an empty grey panel. */
.page-loader {
    display: grid;
    place-content: center;
    place-items: center;
    gap: 0.85rem;
    box-sizing: border-box;
    /* Takes the height it is offered rather than 28rem of it (Marius, 2026-09-19: the chart's wait
       "should be centered"). In a frame this is the only child of `.iws-frame-scroll`, a flex column
       already holding the whole window's height — and a flex item is sized by its content unless it is
       told to grow, so the box below sat in the top 28rem of a dialog twice that tall. It was centred
       the whole time; it was centred in the wrong box, which puts the spinner about a quarter of the
       way down and reads as "somewhere near the top".

       Growing is the entire fix, and it costs the other callers nothing: `flex` is ignored outside a
       flex parent, so the auth gate and the chart's own route lay out exactly as before. The floor
       stays for them — it is what gives a loader on a page something to be centred in at all. */
    flex: 1 1 auto;
    min-height: min(28rem, calc(100dvh - 12rem));
    color: var(--medq-gray-700);
    font-size: 0.9rem;
    /* Loads that finish inside the delay never paint the spinner, so fast ones show no flash. */
    opacity: 0;
    animation: page-loader-appear 0.15s ease-out 0.25s forwards;
}
@keyframes page-loader-appear {
    to { opacity: 1; }
}
.page-loader p {
    margin: 0;
}
.page-loader-spinner {
    box-sizing: border-box;
    width: 2rem;
    height: 2rem;
    border: 3px solid var(--iws-border);
    border-top-color: var(--medq-blue);
    border-radius: 50%;
    animation: page-loader-spin 0.7s linear infinite;
}
@keyframes page-loader-spin {
    to { transform: rotate(360deg); }
}

h1:focus {
    outline: none;
}

a {
    color: var(--medq-blue);
    text-decoration: none;
}

a:hover {
    color: var(--medq-navy);
    text-decoration: none;
}

/* NavLink roots are child components — layout must live in global CSS */
.ribbon-nav .ribbon-btn,
.ribbon-nav a.ribbon-btn,
.ribbon-nav a.ribbon-btn:link,
.ribbon-nav a.ribbon-btn:visited,
.ribbon-nav a.ribbon-btn:hover,
.ribbon-nav a.ribbon-btn:focus,
.ribbon-nav a.ribbon-btn:active,
.ribbon-nav a.ribbon-btn.active,
.ribbon-nav button.ribbon-btn,
.ribbon-nav button.ribbon-btn:hover,
.ribbon-nav button.ribbon-btn:focus,
.ribbon-nav button.ribbon-btn:active,
.ribbon-nav button.ribbon-btn.is-active {
    appearance: none;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.125rem;
    min-width: 90px;
    padding: 0.1875rem 0.5rem;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: color-mix(in srgb, var(--iws-ribbon-text) 90%, transparent);
    font: inherit;
    text-align: center;
    text-decoration: none !important;
    box-sizing: border-box;
    line-height: 1;
    cursor: pointer;
}

.ribbon-nav a.ribbon-btn:hover,
.ribbon-nav button.ribbon-btn:hover {
    background: color-mix(in srgb, var(--iws-ribbon-text) 8%, transparent);
}

.ribbon-nav .ribbon-btn-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 100%;
    height: 2rem;
    flex: 0 0 2rem;
    line-height: 0;
}

/* The tab artwork is 32×32 and multi-colour: drawn at its own size, and its fills are left alone. */
.ribbon-nav .ribbon-btn-icon svg {
    width: 2rem;
    height: 2rem;
}

.ribbon-nav a.ribbon-btn.is-active,
.ribbon-nav a.ribbon-btn.active,
.ribbon-nav button.ribbon-btn.is-active,
.ribbon-nav button.ribbon-btn.active {
    background: color-mix(in srgb, var(--iws-ribbon-text) 14%, transparent);
    box-shadow: inset 0 -2px 0 var(--iws-ribbon-accent);
    color: var(--iws-ribbon-text);
}

.ribbon-nav a.ribbon-btn.is-active .ribbon-btn-label,
.ribbon-nav a.ribbon-btn.active .ribbon-btn-label,
.ribbon-nav button.ribbon-btn.is-active .ribbon-btn-label,
.ribbon-nav button.ribbon-btn.active .ribbon-btn-label {
    font-weight: 700;
}

.ribbon-nav .ribbon-badge {
    position: absolute;
    top: -0.2rem;
    right: calc(50% - 1.35rem);
    min-width: 1rem;
    height: 1rem;
    padding: 0 0.25rem;
    border-radius: 999px;
    background: var(--iws-danger-tone);
    color: var(--iws-text-on-accent);
    font-size: 0.625rem;
    font-weight: 700;
    line-height: 1rem;
    text-align: center;
    pointer-events: none;
}

.ribbon-nav .ribbon-badge.is-warn {
    background: color-mix(in srgb, var(--iws-warning-tone) 62%, var(--iws-ribbon));
}

.ribbon-nav .ribbon-btn-disabled .ribbon-btn-label {
    font-weight: 500;
}

.ribbon-nav .ribbon-btn-icon .shared-icon {
    display: flex;
}

.ribbon-nav .ribbon-btn-label {
    display: block;
    width: 100%;
    font-size: 0.6875rem;
    font-weight: 500;
    white-space: nowrap;
    line-height: 1;
    text-align: center;
}

.page-panel {
    max-width: 56rem;
    display: grid;
    gap: 1.25rem;
}

.page-panel--registration {
    /* Uncapped for the layout spike, and stated rather than simply dropped: `.page-panel` above sets
       56rem, so removing the registration ceiling does not widen this box, it narrows it to the base
       one. The old 81.375rem is why FHD shows empty space to the right of the form, and why two
       sections can never be abreast — the room they need is past the cap. What holds the field widths
       in now is the tier: more columns as there is more room, rather than one row of columns growing. */
    max-width: none;
    gap: 0.75rem;
    /* Sideways only, and `clip` rather than `hidden`, which matters now that the form scrolls inside a
       window instead of a page. `hidden` makes an element a scroll container even when nothing about
       it can be scrolled by hand, and Tab scrolls the *nearest* such container to reveal what it moved
       to — so tabbing to a field below the fold scrolled this box, which has no scrollbar and clips,
       instead of the frame's scroller: the form stayed put and focus went somewhere invisible.

       `clip` cuts the overflow without becoming a scroll container, so Tab walks past it to
       `.iws-frame-scroll` and the form follows the caret. Naming the axis keeps the other one
       `visible`; with `hidden` that is not possible at all, because a `hidden` axis forces the other
       to `auto`. Only the horizontal ever needed cutting: the section bands bleed 1rem past this box
       on each side by design, and the height is whatever the sections come to. */
    overflow-x: clip;
}

.page-panel--registration .registration-form-body {
    display: grid;
    gap: 0.75rem;
}

.page-panel--registration .form-grid {
    padding-top: 0.7rem;
    gap: 0.75rem 1rem;
    /* Five unless a section states otherwise. The converted sections set the variable inline from their
       layout tier, because the count has to answer to the width of the *window* and a media query can
       only see the viewport, which a window resize does not change. */
    grid-template-columns: repeat(var(--registration-cols, 5), minmax(0, 1fr));
}

/* Stated because the control is only as wide as it is told to be, and every section inside depends on
   filling what it was given — half the form, or all of it. */
.page-panel--registration .registration-layout {
    width: 100%;
}

/* The two columns of sections, above the tier's threshold.

   Two stacks rather than rows of two, which is the whole point: a row would hold its half-empty side
   open to the height of the taller section, and collapsing a section would leave a hole beside it.
   Stacks close their own gaps, so shutting an unused section on the right lifts everything under it.

   `align-items: start` so a short column stops where its content does instead of stretching to match
   its neighbour, and `min-width: 0` on the columns because a grid track otherwise refuses to go below
   the widest thing in it — which here is a row of editors that would rather not shrink. */
.page-panel--registration .registration-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: start;
    column-gap: 1.75rem;
}

.page-panel--registration .registration-column {
    min-width: 0;
}

/* The section's fields, filling the section (Marius, 2026-09-16: "origin should fill the group 50% -
   50% or 25% 25% 25% 25%").

   Form Layout lays a group's content out as a flex row, and a plain block dropped into one is a flex
   item sized to what is inside it rather than to the row. So a grid of `1fr` columns resolved those
   fractions against its own content width and stopped there: Origin's two combo boxes took half the
   group and left the rest white. Identity was never right either — it only looked it, being wide
   enough to reach the edge by accident.

   A basis of 100% is the row itself, which is the group less its padding. The columns then divide the
   section, which is what the counts in `--registration-cols` were always meant to divide. */
.page-panel--registration .registration-group .form-grid,
.page-panel--registration .registration-cell {
    flex: 1 1 100%;
    min-width: 0;
}

/* No top padding inside a group (Marius, 2026-09-16: "can we remove the top padding [green area]"). The
   0.7rem above belongs to the sections that draw their own heading — the provider dialog still does —
   where it is the gap under one. A group already pads its body, so here the two stacked. */
.page-panel--registration .registration-group .form-grid {
    padding-top: 0;
}

/* The fields sitting closer under the band (Marius, 2026-09-16: "-5px the margin after acordeon title
   move the interior area -5px up"). The band lost half its height, and the 0.75rem the control leaves
   under it was spaced for the taller one.

   Only the top comes off, which is why this states the padding rather than turning down the theme's
   variable for it: that variable feeds a shorthand covering both edges, so it cannot lighten the top
   without taking the same off the bottom and shortening the section twice over. The element is the one
   the control pads — read off the shipped stylesheet, not guessed at, and the variable is still where
   the number comes from so a change of theme or of density still carries. */
.page-panel--registration .registration-group .dxbl-group-body-content {
    padding-top: calc(var(--dxbl-fl-group-content-padding-x, 0.75rem) - 5px);
}

/* Commit on the right, as every frame puts it (Marius, 2026-09-16: "cancel + register button should be
   on right [like any window/popup]"). The same end as `.iws-frame-footer` and the same gap, since this
   form is in a window now and its buttons are read where a window's buttons are read. Scoped rather
   than done to `.form-actions` outright: the Settings forms and the admin exports wearing that class
   are still pages, where the row belongs under the field it follows. */
.page-panel--registration .form-actions {
    justify-content: flex-end;
}

/* The Form Layout spike: two sections abreast at the widest tier, one per row below it. The control
   supplies the twelve-column row and the collapsible header; the fields inside are still the grid above.

   The band is the one the hand-rolled sections wear, down to the rule that trails off to the right —
   the group is a different element underneath, but nothing about it should read as different. Reached
   through `HeaderCssClass`, which is the class the control puts on the header for exactly this; the
   internal class names are not ours to select on and were wrong when guessed at.

   `display: flex` is restated rather than assumed so the trailing rule has something to flex against,
   and it puts the expand button, the caption and the rule in one row — chevron, title, line, which is
   the order the old band read in. */
.page-panel--registration .registration-band {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    /* Half the old band. The height is padding and line box and nothing else, so both come down
       together: leaving the 1rem text would have put a floor under it well above half. */
    min-height: 0;
    padding: 0.1rem 1rem;
    border-top: 1px solid var(--iws-brand-faint);
    background: var(--iws-band);
    font-family: "Myriad Pro", Myriad, "Source Sans 3", system-ui, sans-serif;
    font-weight: 700;
    font-size: 0.875rem;
    line-height: 1.25;
    color: var(--medq-navy);
}

.page-panel--registration .registration-band--required {
    background: var(--iws-band-strong);
}

/* A section the practice pinned open. The chevron stays so the band keeps its shape, and the refusal is
   in the band rather than in the icon: `pointer-events` is the only thing in reach that stops the click
   outright, since the button belongs to the control and cannot be given a `disabled` attribute from
   here. Everything in this band is the expand button, so there is nothing else being switched off. */
.page-panel--registration .registration-band--pinned {
    pointer-events: none;
}

/* The chevron, greyed. Reached by position rather than by name: naming it means `ExpandButtonIconCssClass`,
   which *replaces* the control's icon class instead of joining it, so the glyph disappears along with the
   colour. The expand button is the first thing in the header whenever it is shown at the start. */
.page-panel--registration .registration-band--pinned > :first-child {
    opacity: 0.4;
}

/* The rule under the title, and only under an open one — shut, a band is just a band, and a line
   trailing off it would suggest content below that is not there.

   Full width and along the bottom, so it reads as the edge of the header rather than as decoration
   beside the text. It fades out to the right, which is the gradient the hand-rolled bands carry. It is
   also the band's entire bottom border: a 1px line underneath would double it. */
.page-panel--registration .registration-band--open::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--iws-brand) 0%, color-mix(in srgb, var(--iws-brand) 55%, transparent) 45%, transparent 100%);
}

.page-panel--registration.provider-registration .form-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

/* Two columns, or the whole grid where it has fewer than two. The section states the cap alongside its
   column count; without it, a field asking for two in a one-column grid grows an implicit column and
   hangs off the side. */
.page-panel--registration .form-field--span-2 {
    grid-column: span var(--registration-span-2, 2);
}

.page-panel--registration .form-field--span-3 {
    grid-column: span 3;
}

/* Two narrow editors sharing a single grid column, so every row keeps the same column edges. */
/* Two short boxes sharing one column — a middle initial beside a suffix, a date beside its pair.
   Unscoped, because Quick Register writes the same markup from outside the registration panel and
   would otherwise get a div with no layout in it, stacking the two boxes down the column. */
.form-field-pair {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 0.375rem;
    align-items: start;
    min-width: 0;
}

.form-field-pair > .form-field:only-child {
    grid-column: span 2;
}

/* A paired date has half a column to show "M/D/YYYY" in, and its own padding is the only slack
   available: widening it to a full column would break the row's column edges. */
.form-field-pair .iws-field-date {
    max-width: none;
}

.form-field-pair .iws-field-date .dxbl-text-edit-input,
.form-field-pair .iws-field-date input {
    min-width: 0;
    padding-left: 0.375rem;
    padding-right: 0.125rem;
    text-overflow: clip;
}

/* Forces a field to open a new grid row instead of filling the gap left in the previous one. */
.page-panel--registration .form-field--row-start {
    grid-column-start: 1;
}

.page-panel--registration .form-field--row-start.form-field--span-2 {
    grid-column: 1 / span var(--registration-span-2, 2);
}

/* Nothing here sets the registration column count any more. Every section states its own, from the room
   the window reports, and a window is free to be 600px wide on a 1080p screen — which no media query
   can see, since the viewport has not changed. */
@media (max-width: 62rem) {
    .page-panel--registration.provider-registration .form-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 40rem) {
    .page-panel--registration.provider-registration .form-grid {
        grid-template-columns: 1fr;
    }

    .page-panel--registration .form-field--span-3 {
        grid-column: auto;
    }

    /* Narrow enough that the grid is down to one column, and a span of two would overflow it. */
    .form-field--wide {
        grid-column: auto;
    }

    .check-list {
        grid-template-columns: 1fr;
    }
}

.page-panel .page-copy {
    margin: 0;
}

.form-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr));
    align-items: stretch;
}

/* Quick Register reads down each column. Dense so each column packs from the top whatever the other
   one holds; the dialog does not resize, so two columns always fit. */
.form-grid.quick-register-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-flow: row dense;
}

.quick-register-grid > .quick-register-left {
    grid-column: 1;
}

.quick-register-grid > .quick-register-right {
    grid-column: 2;
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    min-width: 0;
}

.form-field--full {
    grid-column: 1 / -1;
}

/* Two columns, for a value that needs the room without taking the whole row — a server path, not a name. */
.form-field--wide {
    grid-column: span 2;
}

/* The Add Payer pop-up: twelve fixed columns, so each field takes the share of its line the layout
   gives it (Marius, 2026-11-10) and the lines hold at the one width it opens at. */
.form-grid.payer-form-grid {
    grid-template-columns: repeat(12, minmax(0, 1fr));
}

.payer-form-grid .payer-span-3 { grid-column: span 3; }
.payer-form-grid .payer-span-4 { grid-column: span 4; }
.payer-form-grid .payer-span-5 { grid-column: span 5; }
.payer-form-grid .payer-span-6 { grid-column: span 6; }
.payer-form-grid .payer-span-7 { grid-column: span 7; }
.payer-form-grid .payer-span-12 { grid-column: 1 / -1; }

/* The address and the comments each open a group of their own, so a gap sets them off. */
.payer-form-grid .payer-form-group-start {
    margin-top: 0.75rem;
}

/* Active and ID in one cell of the first line: the switch takes its own width, the ID the rest. */
.payer-form-grid .payer-form-lead {
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr);
    column-gap: 0.75rem;
    min-width: 0;
}

/* The switch sits in the room under its caption that its neighbours' inputs take, centred on their line. */
.payer-form-grid .payer-form-active-box {
    flex: 1;
    display: flex;
    align-items: center;
}

/* Any label in a field, at whatever depth. Not a direct child: a label that shares its line with
   something — the preferred-number marker on the phone fields — sits inside a row wrapper, and under
   a child selector those three were the only labels on the form in the browser's default face and
   weight. What a field label looks like cannot depend on what is standing next to it. */
/* `.field-caption` alongside it for the rows that name a value nobody can type into — a deployment's
   storage kind, a key that has just been issued. Those read as fields and are drawn as fields, but a
   label is a caption *for a control*, and one pointing at a div is reported by the browser as a form
   field with nothing to fill in. The class carries the look across without the claim. */
.form-field label,
.form-field .field-caption {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--medq-black);
}

.form-field .field-caption {
    display: block;
}

/* A field that what is already filled in, or the choice made above it, has made required — the same
   look everywhere in the app. Only the caption changes: the editor's own red frame and callout after
   a refused Save stay exactly as they are. Placed after `.form-field label` so it wins at equal weight. */
label.field-label--required,
.form-field label.field-label--required,
.form-field .field-caption.field-label--required,
label > span.field-label--required,
.dxbl-fl .dxbl-fl-cpt.field-label--required,
.dxbl-fl .field-label--required .dxbl-fl-cpt {
    font-weight: 700;
    color: var(--iws-required-label);
}

/* DevExpress Form validation: icon inside editor + callout below (no layout shift). */
.form-field-editor-wrap {
    position: relative;
    min-width: 0;
}

/* DevExpress editors: fill the grid cell, keep input + buttons on one row. */
.form-field-editor-wrap > .dxbl-edit-box {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    flex-wrap: nowrap;
}

.form-field-editor-wrap > .dxbl-edit-box .dxbl-text-edit-input {
    min-width: 0;
    flex: 1 1 auto;
}

/* Template token lists open outside the page, so they are capped here at about ten rows. */
body:has(.dist-html) .dxbl-itemlist-dropdown .dxbl-toolbar-dropdown .dxbl-toolbar-dropdown-item-list,
.dist-token-menu .dxbl-dropdown-body,
.dxbl-dropdown-body.dist-token-menu {
    max-height: calc(10 * 2.125rem);
    overflow-y: auto;
}

.dxbl-dropdown.iws-search-picker-popup {
    box-sizing: border-box;
}

.dxbl-dropdown.iws-search-picker-popup--columns {
    min-width: min(36rem, 92vw);
}

.dxbl-dropdown-body.iws-search-picker-dropdown {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    box-sizing: border-box;
    overflow-x: hidden;
}

.dxbl-dropdown-body.iws-search-picker-dropdown--columns {
    overflow-x: auto;
}

.dxbl-dropdown-body.iws-search-picker-dropdown .iws-search-listbox,
.dxbl-dropdown-body.iws-search-picker-dropdown .dxbl-list-box,
.dxbl-dropdown-body.iws-search-picker-dropdown .dxbl-list-box-search,
.dxbl-dropdown-body.iws-search-picker-dropdown .dxbl-text-edit {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box;
}

.iws-search-listbox--columns {
    min-width: 0;
}

/* Multi-column pickers size to their own columns. A percentage or max-content width here
   resolves against the form panel, which stretches the popup across the whole row. */
.iws-search-picker-popup--columns,
.dxbl-dropdown.iws-search-picker-popup--columns,
.dxbl-dropdown-body.iws-search-picker-dropdown--columns {
    width: min(32rem, 94vw) !important;
    min-width: 0 !important;
    max-width: 94vw !important;
}

/* FitDropDownToEditor. A columned picker that wants the field's width takes this class *instead of*
   --columns, never as well: --columns pins a width with !important, and an !important of our own to
   undo it would beat the width DevExpress derives from the field too, leaving the panel at its content
   width. So the pin is never applied, and what is repeated here is the rest of what --columns gives —
   the row-height fit and the nowrap. No width is declared at all: on a fixed-position popup even 100%
   resolves against the viewport, which is the trap the comment above records. The floor is a
   min-width, not !important: DevExpress writes the field's width inline, and min-width only steps in
   when that width would leave the columns no room. */
.dxbl-dropdown.iws-search-picker-popup--fit-editor {
    min-width: min(20rem, 92vw);
}

.dxbl-dropdown-body.iws-search-picker-dropdown--fit-editor {
    overflow-x: auto;
}

.dxbl-dropdown-body.iws-search-picker-dropdown--fit-editor .dxbl-list-box,
.dxbl-dropdown-body.iws-search-picker-dropdown--fit-editor .iws-search-listbox .dxbl-scroll-viewer,
.dxbl-dropdown-body.iws-search-picker-dropdown--fit-editor .iws-search-listbox .dxbl-scroll-viewer-content {
    height: auto !important;
    max-height: 15rem !important;
}

.dxbl-dropdown-body.iws-search-picker-dropdown--fit-editor .dxbl-list-box-item-text {
    white-space: nowrap;
}

.dxbl-dropdown-body.iws-search-picker-dropdown--columns .iws-search-listbox,
.dxbl-dropdown-body.iws-search-picker-dropdown--columns .dxbl-list-box,
.dxbl-dropdown-body.iws-search-picker-dropdown--columns .dxbl-list-box-search,
.dxbl-dropdown-body.iws-search-picker-dropdown--columns .dxbl-text-edit {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
}

/* Fit the row area to the results so single matches do not sit above blank filler rows. The cap is
   the list's own scroll viewer, not every one in the body: the body has one of its own around the
   header, the search box and the hint, and capping that too at the list's height scrolled the whole
   panel inside itself, a second bar beside the list's. */
.dxbl-dropdown-body.iws-search-picker-dropdown--columns .dxbl-list-box,
.dxbl-dropdown-body.iws-search-picker-dropdown--columns .iws-search-listbox .dxbl-scroll-viewer,
.dxbl-dropdown-body.iws-search-picker-dropdown--columns .iws-search-listbox .dxbl-scroll-viewer-content {
    height: auto !important;
    max-height: 15rem !important;
}

/* The body grows to hold the whole panel, so only the list scrolls. */
.dxbl-dropdown-body.iws-search-picker-dropdown--fit-editor,
.dxbl-dropdown-body.iws-search-picker-dropdown--columns {
    height: auto !important;
    max-height: none !important;
}

.dxbl-dropdown-body.iws-search-picker-dropdown--fit-editor > .dxbl-scroll-viewer,
.dxbl-dropdown-body.iws-search-picker-dropdown--fit-editor > .dxbl-scroll-viewer > .dxbl-scroll-viewer-content,
.dxbl-dropdown-body.iws-search-picker-dropdown--columns > .dxbl-scroll-viewer,
.dxbl-dropdown-body.iws-search-picker-dropdown--columns > .dxbl-scroll-viewer > .dxbl-scroll-viewer-content {
    height: auto !important;
    max-height: none !important;
}

.dxbl-dropdown-body.iws-search-picker-dropdown--columns .dxbl-list-box-item-text {
    white-space: nowrap;
}

.dxbl-dropdown-body.iws-search-picker-dropdown .dxbl-list-box-item-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* BarList: a workspace filter bar's drop-down shows six rows at least (WL-12). Only the rows'
   scroll viewer is capped, so a search box adds to the height instead of taking rows; 18rem is six
   rows and part of a seventh, which says there are more. The body grows to hold it all. */
.dxbl-dropdown-body.iws-search-picker-dropdown--bar,
.dxbl-dropdown-body.iws-search-picker-dropdown--bar > .dxbl-scroll-viewer,
.dxbl-dropdown-body.iws-search-picker-dropdown--bar > .dxbl-scroll-viewer > .dxbl-scroll-viewer-content,
.dxbl-dropdown-body.iws-search-picker-dropdown--bar .dxbl-list-box {
    height: auto !important;
    max-height: none !important;
}

.dxbl-dropdown-body.iws-search-picker-dropdown--bar .iws-search-listbox .dxbl-scroll-viewer,
.dxbl-dropdown-body.iws-search-picker-dropdown--bar .iws-search-listbox .dxbl-scroll-viewer-content {
    height: auto !important;
    max-height: 18rem !important;
}

/* A ticked row in a multi-select drop-down is drawn as an unticked one, hover included; its checkbox
   alone marks it (WL-13). DevExpress declares these on the list box and again on its render container. */
.dxbl-list-box.iws-search-listbox--ticks,
.iws-search-listbox--ticks .dxbl-list-box,
.iws-search-listbox--ticks .dxbl-list-box-render-container {
    --dxbl-list-box-item-multi-selected-bg: var(--dxbl-list-box-item-bg);
    --dxbl-list-box-item-multi-selected-color: var(--dxbl-list-box-item-color);
    --dxbl-list-box-item-multi-selected-hover-bg: var(--dxbl-list-box-item-hover-bg);
    --dxbl-list-box-item-multi-selected-hover-color: var(--dxbl-list-box-item-hover-color);
    --dxbl-list-box-item-selected-bg: var(--dxbl-list-box-item-bg);
    --dxbl-list-box-item-selected-color: var(--dxbl-list-box-item-color);
    --dxbl-list-box-item-selected-hover-bg: var(--dxbl-list-box-item-hover-bg);
    --dxbl-list-box-item-selected-hover-color: var(--dxbl-list-box-item-hover-color);
}

/* ListFitsItems: the list at least 18rem wide, or its longest row on one line, whichever is wider.
   DevExpress writes the field's width inline on the popup, which this overrides; the field itself
   keeps its width. */
.dxbl-dropdown.iws-search-picker-popup--fit-items {
    width: max-content !important;
    min-width: min(18rem, 92vw);
    max-width: 92vw;
}

.dxbl-dropdown-body.iws-search-picker-dropdown--fit-items .dxbl-list-box-item-text {
    overflow: visible;
    text-overflow: clip;
}

.form-field-validation-callout {
    position: absolute;
    top: calc(100% + 0.2rem);
    left: 0;
    z-index: 6;
    max-width: min(100%, 22rem);
    padding: 0.35rem 0.65rem;
    border-radius: 0.2rem;
    background: var(--iws-danger-tone);
    color: var(--iws-text-on-accent);
    font-size: 0.8125rem;
    line-height: 1.25;
    box-shadow: 0 2px 6px var(--iws-shadow);
    pointer-events: none;
}

.form-field-validation-callout::before {
    content: "";
    position: absolute;
    top: -0.35rem;
    left: 0.85rem;
    border-width: 0 0.35rem 0.35rem 0.35rem;
    border-style: solid;
    border-color: transparent transparent var(--iws-danger-tone) transparent;
}

/* A phone or email box's warning on a form without the register forms' editor wrap: it hangs
   under the box from the field itself. */
.form-field:has(> .iws-contact-callout) {
    position: relative;
}

/* A phone, fax or email that does not look valid: yellow, softer than a refused field's red, the
   same in every theme (ContactFormat.WarningColor). Dark text, as white does not read on it. */
:root {
    --iws-contact-warning: #e19519;
}

.iws-contact-warning.dxbl-text-edit,
.iws-contact-warning .dxbl-text-edit-input,
.iws-contact-warning .dxbl-edit-box {
    border-color: var(--iws-contact-warning) !important;
}

.form-field-validation-callout.iws-contact-callout {
    background: var(--iws-contact-warning);
    color: #1f1a12;
    white-space: pre-line;
}

.form-field-validation-callout.iws-contact-callout::before {
    border-color: transparent transparent var(--iws-contact-warning) transparent;
}

.iws-dx-icon.iws-dx-icon-circle-exclamation.iws-contact-warning-icon {
    background-color: var(--iws-contact-warning) !important;
    color: var(--iws-contact-warning) !important;
}

/* The MRN / National ID check while it runs or when the server could not be asked: where the
   refusal would appear, but not an error. */
.form-field-validation-callout.iws-identifier-note {
    background: var(--iws-surface);
    color: var(--iws-text-muted);
    border: 1px solid var(--iws-border);
}

.form-field-validation-callout.iws-identifier-note::before {
    border-color: transparent transparent var(--iws-border) transparent;
}

/* Reserved field message slot (above editor) — popup-safe, no overflow clip. */
.form-field-message {
    min-height: 0;
    margin: 0;
    font-size: 0.8125rem;
    line-height: 1.25;
}

.form-field-message--error {
    color: var(--iws-danger-text);
    background: var(--iws-danger-bg);
    border: 1px solid var(--iws-danger-border);
    border-radius: 0.25rem;
    padding: 0.35rem 0.5rem;
}

/* Amber, non-blocking note (duplicate NPI). Blocking errors keep the slot above the editor. */
.form-field-message--warning {
    color: var(--iws-warning-text);
    background: var(--iws-warning-bg);
    border: 1px solid var(--iws-warning-border);
    border-radius: 0.25rem;
    padding: 0.35rem 0.5rem;
}

.form-field-message--below {
    margin-top: 0.25rem;
}

.iws-field-warning.dxbl-text-edit,
.iws-field-warning .dxbl-text-edit-input,
.iws-field-warning .dxbl-edit-box {
    border-color: var(--iws-warning-tone) !important;
}

/* Invalid editor — red outline (DevExpress Form style). */
.iws-field-invalid.dxbl-text-edit,
.iws-field-invalid .dxbl-text-edit-input,
.iws-field-invalid .dxbl-edit-box {
    border-color: var(--iws-danger-tone) !important;
}

.form-field-action {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 0;
}

.iws-field-date {
    max-width: 12rem;
    width: 100%;
}

/* Short catalog combos: grow dropdown to fit all rows (avoid partial-row scroll). */
.dxbl-dropdown-body.iws-combo-dropdown-fit {
    height: auto !important;
    max-height: none !important;
}

.dxbl-dropdown-body.iws-combo-dropdown-fit .dxbl-list-box,
.dxbl-dropdown-body.iws-combo-dropdown-fit .dxbl-scroll-viewer,
.dxbl-dropdown-body.iws-combo-dropdown-fit .dxbl-scroll-viewer-content {
    max-height: none !important;
    overflow: visible !important;
}

/* Searchable / long master lists keep a capped scroll area. */
.dxbl-dropdown-body.iws-combo-dropdown-scroll {
    max-height: 16rem;
}

.iws-search-listbox {
    border: none;
    width: 100%;
    max-width: 100%;
}

.iws-search-listbox .dxbl-list-box {
    width: 100%;
    max-width: 100%;
}

.iws-search-picker-panel {
    display: flex;
    flex-direction: column;
    width: 100%;
    min-width: 0;
}

/* Sits under the rows, so it reads as a status line rather than a result. */
.iws-picker-narrow-hint {
    padding: 0.375rem 0.75rem;
    border-top: 1px solid var(--iws-border);
    color: var(--iws-text-secondary);
    font-size: 0.75rem;
}

.iws-picker-empty {
    padding: 1rem 0.75rem;
    color: var(--iws-text-secondary);
    font-size: 0.85rem;
    text-align: center;
}

.iws-picker-dropdown-header {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 1rem;
    width: 100%;
    box-sizing: border-box;
    padding: 0.375rem 0.75rem 0.25rem;
}

.iws-picker-add-action {
    display: inline-flex;
    align-items: center;
    width: auto;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--medq-navy);
    font: inherit;
    text-align: right;
    cursor: pointer;
}

.iws-picker-add-action:hover {
    text-decoration: underline;
}

/* A picker's search box with its add action on the same line. The basis is 0, not auto: the panel
   sets every text editor in it to width 100% !important, which as a basis would shove the action out. */
.iws-search-picker-bar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-sizing: border-box;
    min-width: 0;
    padding: 0.375rem 0.75rem;
    border-bottom: 1px solid var(--iws-border);
}

.iws-search-picker-bar > .iws-search-picker-search {
    flex: 1 1 0;
}

.iws-search-picker-action {
    flex: 0 0 auto;
    white-space: nowrap;
}

.iws-search-picker-action:empty {
    display: none;
}

/* The app grid header: the chart window grids' heading for every DxGrid and every columned list —
   Roboto, small grey uppercase on white. A column heading is read once, when somebody works out what
   they are looking at, so it stays quieter than the values under it. Colour and weight through the
   theme's own variables. The theme sets the font of a header cell with
   `.dxbl-grid .dxbl-grid-table>thead>tr>th` and the list box's colour with a six-step child chain,
   so each selector below has to outrank that one or the theme's row font comes back. The caption of
   a sortable heading is a span the theme paints in `buttontext` with no variable behind it, so that
   one colour has to be said outright. */
.dxbl-grid.dxbl-grid {
    --dxbl-grid-header-color: var(--iws-text-secondary);
    --dxbl-grid-header-font-weight: 600;
}

/* Fluent Light's selected row (TK-3), kept under the mouse; the other themes keep DevExpress's own.
   A grid that clears its selection on purpose (the encounter rows under an episode) outranks this. */
html[data-theme="fluent-light"] .dxbl-grid {
    --dxbl-grid-selection-bg: var(--iws-grid-rowselected);
    --dxbl-grid-selected-hover-bg: var(--iws-grid-rowselected-hover);
}

.dxbl-grid.dxbl-grid .dxbl-grid-table > thead > tr > th,
.dxbl-list-box.dxbl-list-box > .dxbl-scroll-viewer > .dxbl-scroll-viewer-content > table > thead > tr > th {
    font-family: Roboto, "Segoe UI", system-ui, sans-serif;
    font-size: 0.62rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.dxbl-list-box.dxbl-list-box > .dxbl-scroll-viewer > .dxbl-scroll-viewer-content > table > thead > tr > th {
    color: var(--iws-text-secondary);
    font-weight: 600;
}

.dxbl-grid.dxbl-grid .dxbl-grid-table > thead > tr > th span {
    color: var(--iws-text-secondary) !important;
    font-size: inherit;
    letter-spacing: inherit;
    text-transform: inherit;
}

/* The patient search box: the glass is the options menu. Plain for the standard set; a tinted chip
   naming the mode for anything else. */
.iws-patient-search {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
}

/* The glass inside the editor: the frame and the focus bar are drawn here, from the theme's own
   tokens, and the editor inside gives up its chrome through the theme's variables — Fluent draws an
   editor as a border plus a 2px accent bar on ::after, and a border reset reaches only the first. */
.iws-patient-search-field {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.125rem;
    flex: 1 1 auto;
    box-sizing: border-box;
    height: var(--iws-control-height);
    min-width: 0;
    padding-inline-start: 0.1875rem;
    border: 1px solid var(--dxds-color-border-neutral-default-rest, var(--iws-border));
    border-bottom-color: var(--dxds-color-content-neutral-subdued-rest, var(--iws-border-strong));
    border-radius: var(--dxds-border-radius-40, 0.25rem);
    background: var(--dxds-color-surface-neutral-default-rest, var(--iws-surface));
}

.iws-patient-search-field:focus-within::after {
    content: "";
    position: absolute;
    inset-inline: -1px;
    bottom: -1px;
    height: 2px;
    border-radius: 0 0 var(--dxds-border-radius-40, 0.25rem) var(--dxds-border-radius-40, 0.25rem);
    background: var(--dxds-color-content-primary-default-rest, var(--iws-focus));
    pointer-events: none;
}

.iws-patient-search-field .iws-patient-search-input.dxbl-text-edit {
    --dxbl-text-edit-border-width: 0;
    --dxbl-text-edit-bg: transparent;
    --dxbl-text-edit-box-shadow: none;
    --dxbl-text-edit-underline-color: transparent;
    --dxbl-text-edit-underline-hovered-color: transparent;
    --dxbl-text-edit-underline-focused-color: transparent;
    --dxbl-text-edit-underline-active-color: transparent;
    flex: 1 1 auto;
    align-self: stretch;
    height: auto;
    min-width: 0;
    border: 0;
    box-shadow: none;
    background: transparent;
}

.iws-patient-search-glass.dxbl-btn {
    flex: 0 0 auto;
    gap: 0.25rem;
    padding: 0.15rem 0.35rem;
    border: 1px solid transparent;
    border-radius: 0.25rem;
    color: var(--iws-text-secondary);
    font-size: 0.8125rem;
    white-space: nowrap;
}

.iws-patient-search-glass--mode.dxbl-btn {
    border-color: var(--iws-selected-strong);
    background: var(--iws-tint);
    color: var(--iws-heading);
    font-weight: 600;
}

/* Menu rows: a tick column, then the row's own glyph, then the name. Every row keeps the tick's room
   so the glyphs line up; only the row in force draws it. */
.iws-patient-search-row.dxbl-btn::before {
    content: "";
    flex: 0 0 auto;
    width: 0.875rem;
    height: 0.875rem;
    margin-inline-end: 0.25rem;
}

.iws-patient-search-row--current.dxbl-btn::before {
    background-color: var(--iws-brand);
    -webkit-mask: url("/icons/check.svg") center / contain no-repeat;
    mask: url("/icons/check.svg") center / contain no-repeat;
}

.iws-patient-search-row.dxbl-btn .iws-dx-icon {
    color: var(--iws-text-secondary);
}

/* The patient picker. The search bar and the add action keep the field's width (--iws-editor-w, set by
   iwsTrackEditorWidth); the grid under them declares its width in rem, which is what lets the popup
   grow to it without resolving anything against the viewport. */
.dxbl-dropdown.iws-patient-picker-popup {
    box-sizing: border-box;
    max-width: var(--iws-panel-max-w, calc(100vw - 2rem)) !important;
}

.dxbl-dropdown-body.iws-patient-picker-body {
    height: auto !important;
    max-height: none !important;
    overflow: hidden;
}

/* Held inside the room left between the field and the window's edges; the grid is what gives way,
   scrolling both ways, while the search bar and the footer stay in view. */
.iws-patient-picker {
    display: flex;
    flex-direction: column;
    min-width: 0;
    max-width: var(--iws-panel-max-w, calc(100vw - 2rem));
    max-height: var(--iws-panel-max-h, calc(100vh - 2rem));
}

.iws-patient-picker-bar {
    width: var(--iws-editor-w, 100%);
    max-width: 100%;
    box-sizing: border-box;
    padding: 0.375rem 0.5rem;
}

.iws-patient-picker-action {
    flex: 0 0 auto;
    white-space: nowrap;
}

/* The grid scrolls itself, both ways, so its header stays on top and the chooser column stays at the
   right edge while the rows move under them. */
.iws-patient-picker-grid-wrap {
    position: relative;
    display: flex;
    flex-direction: column;
    flex: 0 1 auto;
    min-height: 0;
    overflow: hidden;
}

/* A set header height, so the columns button drawn over the chooser column's header can be centred on it. */
.iws-patient-picker-grid .dxbl-grid-table > thead > tr {
    height: 1.75rem;
}

.iws-patient-picker-bar,
.iws-patient-picker-footer {
    flex: 0 0 auto;
}

.iws-patient-picker-grid {
    --dxbl-grid-max-height: 18rem;
    flex: 0 1 auto;
    min-width: 100%;
    max-width: 100%;
    min-height: 0;
    border: none;
}

.iws-patient-picker-grid .dxbl-grid-table {
    table-layout: fixed;
}

/* A blank strip after the last row, inside the scrolling area, so the list reads as ended rather than
   cut off at the panel's edge — also once scrolled to the bottom. */
.iws-patient-picker-grid > .dxbl-scroll-viewer > .dxbl-scroll-viewer-content {
    padding-bottom: 1rem;
}

.iws-patient-picker-grid td {
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
}

.iws-patient-picker-row--picked > td {
    background: var(--iws-tint);
}

.iws-patient-picker-name {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.iws-patient-picker-tag {
    flex: 0 0 auto;
    padding: 0 0.3rem;
    border-radius: 0.2rem;
    background: var(--iws-surface-sunken);
    color: var(--iws-text-secondary);
    font-size: 0.6875rem;
}

.iws-patient-picker-matched {
    overflow: hidden;
    color: var(--iws-text-secondary);
    font-size: 0.75rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* The chooser's column: a command column, so the theme centres its header; the padding comes off so
   the button is not squeezed out of a 2.5rem cell. */
.iws-patient-picker-grid .dxbl-grid-table > thead > tr > th.dxbl-grid-command-cell {
    --dxbl-grid-text-cell-padding-x: 0;
    padding-inline: 0;
    text-align: center;
}

.iws-patient-picker-grid .dxbl-grid-command-cell .dxbl-grid-header-content {
    justify-content: center;
}

/* Centred on the chooser column's header: 2.5rem wide, 1.75rem tall. */
.iws-patient-picker-columns {
    position: absolute;
    top: 0.125rem;
    right: 0.5rem;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
    padding: 0;
    border: 0;
    border-radius: 0.2rem;
    background: transparent;
    color: var(--iws-text-secondary);
    cursor: pointer;
}

.iws-patient-picker-columns:hover {
    background: var(--iws-surface-sunken);
}

.iws-patient-picker-suggestions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    padding: 0 0.75rem 0.75rem;
}

.iws-patient-picker-suggestion {
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--iws-heading);
    font: inherit;
    font-size: 0.8125rem;
    cursor: pointer;
}

.iws-patient-picker-suggestion:hover {
    text-decoration: underline;
}

.iws-patient-picker-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.iws-patient-picker-footer:empty {
    display: none;
}

/* The column chooser: the columns' ticks, and Reset to default under them. */
.iws-patient-picker-chooser {
    min-width: 13rem;
}

.iws-patient-picker-chooser-list.dxbl-list-box {
    border: 0;
    max-height: min(20rem, 60vh);
}

.iws-patient-picker-chooser-footer {
    justify-content: center;
    text-align: center;
}

.dxbl-btn.iws-patient-picker-chooser-reset {
    padding: 0;
    font-size: 0.8125rem;
    white-space: nowrap;
}

/* Per-row action inside a picker's column grid (e.g. edit the provider on that row). */
.iws-picker-row-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
    padding: 0;
    border: 0;
    border-radius: 0.2rem;
    background: transparent;
    /* Follows the row's text colour so the icon stays visible on the selected (navy) row. */
    color: inherit;
    cursor: pointer;
}

.iws-picker-row-action svg {
    width: 0.85rem;
    height: 0.85rem;
}

.iws-picker-row-action:hover {
    background: color-mix(in srgb, currentColor 14%, transparent);
}

/* The shared height is the floor here rather than the height: a list that wraps its chips grows. */
.iws-multi-select-dropdown.dxbl-text-edit {
    height: auto;
    min-height: var(--iws-control-height);
}

.iws-multi-select-dropdown .dxbl-text-edit-input,
.iws-multi-select-dropdown .dxbl-edit-input {
    min-height: 0;
    height: auto !important;
    padding-top: 0;
    padding-bottom: 0;
}

.iws-multi-tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
    width: 100%;
    min-height: 1.5rem;
    padding: 0.1rem 0;
    box-sizing: border-box;
}

.iws-multi-tags-placeholder {
    color: var(--iws-text-secondary);
    opacity: 0.75;
    font-size: 0.875rem;
    line-height: 1.4;
}

.iws-multi-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    max-width: 100%;
    padding: 0.15rem 0.35rem 0.15rem 0.5rem;
    border-radius: 0.25rem;
    background: var(--iws-selected);
    color: var(--iws-heading);
    font-size: 0.8125rem;
    line-height: 1.25;
}

.iws-multi-tag-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.iws-multi-tag-remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 1.1rem;
    height: 1.1rem;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--iws-text-secondary);
    font-size: 0.95rem;
    line-height: 1;
    cursor: pointer;
}

.iws-multi-tag-remove:hover {
    background: color-mix(in srgb, var(--iws-heading) 12%, transparent);
    color: var(--iws-heading);
}

/* One line in a toolbar band: chips that do not fit whole give way to "+N", or all of them to
   "N selected" (multiTags.js). Chips keep their full width here, so one that does not fit overflows
   the line, which is what the script measures, rather than being cut to an ellipsis. */
.iws-multi-tags.is-single-line {
    flex-wrap: nowrap;
    overflow: hidden;
    /* Sized by the field, never by its chips, so chips that do not fit cannot widen it instead. */
    contain: inline-size;
    min-height: 0;
    padding: 0;
}

/* A field that never wraps holds the shared height, as the editors beside it in the bar do; only a
   wrapping one keeps the height as a floor and grows with its chips. */
.iws-multi-select-dropdown.dxbl-text-edit:has(.iws-multi-tags.is-single-line) {
    height: var(--iws-control-height);
}

/* The template box pads like an input on top of the chips' own padding; centred instead, the chips
   fit the shared height without being clipped. */
.iws-multi-select-dropdown.dxbl-text-edit:has(.iws-multi-tags.is-single-line) > .dxbl-text-edit-template {
    padding-top: 0;
    padding-bottom: 0;
    align-items: center;
}

.iws-multi-tags.is-single-line .iws-multi-tag {
    flex: 0 0 auto;
    max-width: none;
}

.iws-multi-tags.is-single-line > [hidden],
.iws-multi-tags-more:empty {
    display: none;
}

.iws-multi-tags.is-single-line .iws-multi-tags-placeholder {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.iws-multi-tags-more {
    flex: 0 0 auto;
    padding: 0.15rem 0.45rem;
    border-radius: 999px;
    background: var(--iws-accent);
    color: var(--iws-text-on-accent);
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.25;
    white-space: nowrap;
}

/* A list's view state, on the Filters funnel and the views bookmark (Tasks, Patients, Worklist). */
.iws-dx-icon-bookmark {
    -webkit-mask-image: url("/icons/bookmark.svg");
    mask-image: url("/icons/bookmark.svg");
}

.iws-dx-icon-bookmark-outline {
    -webkit-mask-image: url("/icons/bookmark-outline.svg");
    mask-image: url("/icons/bookmark-outline.svg");
}

.iws-dx-icon-filter {
    -webkit-mask-image: url("/icons/filter.svg");
    mask-image: url("/icons/filter.svg");
}

.iws-dx-icon-filter-outline {
    -webkit-mask-image: url("/icons/filter-outline.svg");
    mask-image: url("/icons/filter-outline.svg");
}

.iws-dx-icon.iws-view-changed {
    background-color: var(--iws-danger-text) !important;
}

.iws-dx-icon.iws-view-saved {
    background-color: var(--iws-success-tone) !important;
}

/* Beside the bookmark while a view is being written. */
.saved-view-status {
    align-self: center;
    margin-right: 0.35rem;
    color: var(--iws-danger-text);
    font-size: 0.8125rem;
    font-weight: 600;
    white-space: nowrap;
}

/* A grid heading whose filter differs from the view's saved one. */
.dxbl-grid .iws-filter-changed {
    background-color: var(--iws-warning-bg) !important;
}

/* A list's search box while it narrows the list, in the same pale yellow as the headings it matched. */
.dxbl-text-edit.iws-filter-active,
.dxbl-text-edit.iws-filter-active input {
    background-color: var(--iws-warning-bg) !important;
}

/* A list's own column chooser (ListColumnChooser). */
/* The width of the flyout's body, so a scrollbar, when one is needed, sits at its edge; tall enough
   for every column a list has today, and scrolling only once the window is shorter than that. */
.list-column-choices {
    box-sizing: border-box;
    width: 100%;
    margin: 0;
    padding: 0;
    list-style: none;
    max-height: min(34rem, 70vh);
    overflow-y: auto;
}

.list-column-choices label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.1rem;
    font-size: 0.8125rem;
    cursor: pointer;
}

/* Organize views: a shared view the user may not move reads as fixed. */
.organize-views-grid .is-locked {
    color: var(--iws-text-muted);
    font-style: italic;
}

/* A view hidden from the user's list: its name dimmed, its eye crossed out. */
.organize-views-grid .is-hidden .organize-views-name {
    opacity: 0.5;
}

.organize-views-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.125rem;
}

.organize-views-grid .organize-views-action {
    padding: 0.2rem 0.35rem;
    line-height: 1;
}

.organize-views-grid .organize-views-action svg {
    width: 1rem;
    height: 1rem;
}

.organize-views-empty {
    margin: 0.5rem 0;
    color: var(--iws-muted-text);
}

/* The list search's spinner, an editor button that takes no focus and no click. */
.list-search-busy {
    pointer-events: none;
}

.list-search-busy .page-loader-spinner,
.iws-patient-search-field > .page-loader-spinner {
    margin: 0 0.2rem;
    flex: none;
}

.form-section {
    display: grid;
    gap: 0.75rem;
}

/* Result-template facilities, grouped the same way as patient visibility: the radios share one
   left edge, and the site list hangs under the words of "Available for selection". */
.template-facilities {
    gap: 0.35rem;
    grid-template-columns: minmax(0, 1fr);
}

.template-access-option {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin: 0;
    cursor: pointer;
}

.template-access-option input {
    flex: none;
    margin: 0;
    width: 13px;
    height: 13px;
}

.template-access-rules {
    display: grid;
    gap: 0.25rem;
    padding-left: calc(13px + 0.4rem);
}

.form-section-title {
    font-family: "Myriad Pro", Myriad, "Source Sans 3", system-ui, sans-serif;
    font-weight: 700;
    font-size: 1rem;
    color: var(--medq-navy);
}

/* One size for every heading in a settings form, whether it is marked up as an h3, an h4, or the
   label of the field it heads; the field-label rule is outranked on purpose. */
.settings-section-title,
.form-field .settings-section-title {
    font-family: Roboto, "Segoe UI", system-ui, sans-serif;
    font-size: 16px;
    font-weight: 700;
}

.form-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    align-items: center;
}

/* A commit in flight: the same ring as the page loader, sized to sit beside a button rather than
   fill a panel, and turning immediately because the wait it reports has already started. */
.spinner-inline {
    width: 1rem;
    height: 1rem;
    border-width: 2px;
    animation-delay: 0s;
}

/* `.master-popup-body` and `.master-popup-footer` stood here until 2026-09-15, spacing the body and
   right-aligning the button row of every dialog built straight on DxPopup. They went with the last of
   those dialogs: `.iws-frame-scroll` owns the padding now and `.iws-frame-footer` owns the row, so
   the pair had been doing the job twice on every converted form. Nothing outside a popup ever wore
   them, which is why they could leave whole rather than shrink. */

/* `.qs-popup` and `.qs-popup-body` stood here until 2026-09-15, stripping the theme's header, padding
   and radius back so quick search could draw its own strip and base bar inside. They were the pair
   `.iws-frame-popup` below was written from, and they went when the sheet moved onto that frame —
   which is the same three rules, said once, for every frame in the shell. */

/* A filter's menu and a pill's options ride in a DevExpress drop-down, whose panel is padded for a
   dialog's worth of text — and unevenly, since the theme sets the top edge on the dialog and leaves
   the bottom to the dropdown default. Here it is 5px on every side, so a row's hover tint sits
   inside the panel rather than against its edge.

   Three variables and no padding property: Fluent pads the body from a selector of its own
   (.dxbl-dropdown > .dxbl-dropdown-dialog .dxbl-dropdown-body), which outweighs anything a class
   pair can say, and it names the vertical edges separately rather than as one y. Declaring the
   variables on the body itself is what gets through — they are inherited from the dialog otherwise.
   In app.css rather than the component's stylesheet for the same reason as the popup chrome above:
   this is the theme's own element and CSS isolation cannot reach it. */
.qs-drop .dxbl-dropdown-body {
    --dxbl-dropdown-body-padding-x: 5px;
    --dxbl-dropdown-body-padding-top: 5px;
    --dxbl-dropdown-body-padding-bottom: 5px;
}

/* An IWS frame draws the same chrome as quick search — a gradient strip over the title and a base
   under the footer — so the theme's header, padding and radius come off here for the same reason and
   in the same way. Global rather than scoped because these are DevExpress's own elements, which a
   component's stylesheet cannot reach.

   The two frames wear the same chrome and need the same box stripped back around it, but they cannot
   share a selector: DxPopup renders .dxbl-popup / .dxbl-modal-*, DxWindow renders an entirely
   separate .dxbl-window-* family. Writing the window against the popup's names looks right, compiles,
   and silently does nothing.

   Two rules govern every selector below, both learnt by getting them wrong:

   1. CssClass lands on the *dialog element itself*, not on a wrapper above it. The window proves it —
      `class="dxbl-window-dialog dxbl-popup-fixed-width iws-window"` — so `.iws-window > .dxbl-window-dialog`
      is a descendant selector for an element that is already the one it is looking for, and matches
      nothing at all. The popup is written both ways below because its own root was not in the DOM
      that settled the window, and a dead selector that looks alive has cost this file enough already.
   2. Specificity has to be counted against the theme, not guessed. Their chains run to five classes
      in places, and a shorter rule of ours loses every property it names without a word. */
.dxbl-popup.iws-frame-popup,
.iws-frame-popup .dxbl-popup {
    padding: 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 24px 60px var(--iws-shadow-strong);
}

/* A frame that does not fit below its Top rises until it does, and only past --iws-frame-highest does
   it stop and scroll (2026-11-06, Marius: "if from 200px there is no space should try from top").
   DevExpress places the dialog with translateY(Top); `translate` adds to it, and its percentage is the
   dialog's own height, which is what lets the lift follow the form as it grows without measuring it.
   The 2rem is the bottom margin the frame's MaxHeight already keeps. Both numbers come from
   AppIWSDialog on the modal root; without them the lift is zero. A frame being dragged or resized
   is first handed its lifted position as DevExpress's own (index.html, iwsFramePlaced), and is then
   marked so the lift is not counted twice. */
dxbl-modal-dialog.iws-frame-popup:not([data-iws-placed]) {
    translate: 0 max(calc(var(--iws-frame-highest, 0px) - var(--iws-frame-top, 0px)),
                     min(0px, calc(100vh - 2rem - var(--iws-frame-top, 0px) - 100%)));
}

/* The theme lays the content box out as a flex item with min-height left at auto, which for a flex
   item means "never smaller than your content". A long form then does not scroll: it asks for its
   full height, the body grants it, and the frame grows past the height it was given until
   .dxbl-popup clips it — taking the base bar with it. Naming zero hands the height back to the
   frame, and .iws-frame-work has a bound to scroll against. */
.iws-frame-popup .dxbl-modal-content {
    min-height: 0;
}

/* The corner the strip paints into (2026-09-16, Marius: "left top corner is not rounded"). The rule
   above rounds the frame and clips what is inside it, which is enough while the layer under the
   header is transparent — and stops being enough when the content box carries a background of its
   own, since that box is then square inside a rounded parent and paints right up to the corner. It
   shows on the left and not the right because the strip's gradient is opaque at the left end and
   fades out before the other one.

   So the radius is said again on the content box and inherited by the header, rather than working out
   which of the three is doing the painting. Inherited, so the number lives in one place. */
.dxbl-popup.iws-frame-popup > .dxbl-modal-content,
.iws-frame-popup .dxbl-popup > .dxbl-modal-content {
    border-radius: inherit;
    overflow: hidden;
}

.dxbl-popup.iws-frame-popup > .dxbl-modal-content > .dxbl-modal-body.iws-frame-popup-body,
.iws-frame-popup .dxbl-popup > .dxbl-modal-content > .dxbl-modal-body.iws-frame-popup-body {
    --dxbl-popup-body-padding-x: 0;
    --dxbl-popup-body-padding-top: 0;
    --dxbl-popup-body-padding-bottom: 0;
    padding: 0;
    min-height: 0;
    overflow: hidden;
}

/* The window's own family. `.iws-window` is the dialog, so it is named as a second class on it rather
   than as a parent of it — which also buys the one class of specificity these rules need over the
   theme's three. */
.dxbl-window > .dxbl-window-dialog.iws-window {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 24px 60px var(--iws-shadow-strong);
}

/* The theme's own words for it: padding-top, padding-x, padding-bottom. There is no -y — naming one
   zeroes nothing and leaves a band above the strip while the sides come in correctly, which is a
   confusing way to fail. The plain `padding` is stated as well, so the strip does not depend on having
   guessed the whole set of variable names correctly. */
.dxbl-window > .dxbl-window-dialog.iws-window > .dxbl-window-body {
    --dxbl-window-body-padding-x: 0;
    --dxbl-window-body-padding-top: 0;
    --dxbl-window-body-padding-bottom: 0;
    padding: 0;
    min-height: 0;
    overflow: hidden;
    /* The theme starts this flex column at flex-start and pins every child to `flex: none`, so the
       chrome inside comes up as wide as its widest row and as tall as its content — a window meant to
       cover the work area renders as a column the width of a patient's name. Stretched instead, so the
       size DxWindow was given is the size the chrome takes, and nothing has to state it twice. */
    align-items: stretch;
}

.dxbl-window > .dxbl-window-dialog.iws-window > .dxbl-window-body > * {
    flex: 1 1 auto;
    min-height: 0;
}

/* --------------------------------------------------------- the strip, which is their header

   AppIWSStrip renders *into* DevExpress's header rather than replacing it, because their drag is
   attached from that element and from nothing else. So the header element itself has to become the
   strip: the theme's padding, border, background and radius come off, and quick search's gradient
   goes on. Two selectors for the one look, because the popup and the window name their header
   differently and neither answers to the other's class.

   The popup selector is longer than it looks like it needs to be, and that is the point. The theme
   dresses this element from a five-class chain ending
   `.dxbl-popup > .dxbl-modal-content > .dxbl-modal-header`, so anything shorter of ours loses every
   property it names and loses it silently — which is exactly how the padding survived the first
   attempt and had to be reported rather than seen. `.dxbl-popup-header` and `.dxbl-modal-header` are
   both on the one element, not nested as their own `.dxbl-popup-header > .dxbl-modal-header` rule
   would lead you to expect, so naming the pair brings this level at five, and app.css is linked after
   the theme. The window's own rule is only three classes, so it needs no such help. */
.dxbl-popup.iws-frame-popup > .dxbl-modal-content > .dxbl-popup-header.dxbl-modal-header,
.iws-frame-popup .dxbl-popup > .dxbl-modal-content > .dxbl-popup-header.dxbl-modal-header,
.dxbl-window > .dxbl-window-dialog.iws-window > .dxbl-window-header {
    flex: none;
    height: 35px;
    min-height: 35px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0;
    padding: 0 8px 0 12px;
    border: 0;
    border-bottom: 1px solid var(--iws-border-subtle);
    /* The frame's corner at the top and none at the bottom, where the strip meets the work. This said
       zero for both until 2026-09-16 ("left top corner is not rounded"): the theme's radius here is
       wrong for a header that has become a strip, but so is none of it, and none was only invisible
       while every layer between the strip and the rounded frame was transparent. */
    border-radius: 8px 8px 0 0;
    background: var(--iws-frame-fill);
    font-family: Roboto, "Segoe UI", system-ui, sans-serif;
    /* Their own header line-height is sized for a taller header and would hold the strip open past
       the height above. */
    line-height: 1;
}

/* The danger tone: a frame that is asking whether to destroy something says so at the top, where the
   reading starts, rather than only at the commit button, which is reached last (Marius, 2026-09-15:
   "can we replace the blue title to some red light?").

   The tone itself and why it is mixed rather than chosen are with the token at the head of this file.

   The same selector shape as the rule above, for the same reason, and the base bar is tinted to match
   from AppIWSChrome's own stylesheet — `.iws-frame-base` is ours and cannot be reached from here. */
.dxbl-popup.iws-frame-danger > .dxbl-modal-content > .dxbl-popup-header.dxbl-modal-header,
.iws-frame-danger .dxbl-popup > .dxbl-modal-content > .dxbl-popup-header.dxbl-modal-header,
.dxbl-window > .dxbl-window-dialog.iws-frame-danger > .dxbl-window-header {
    background: var(--iws-frame-fill-danger);
}

/* Only a frame that actually drags says so before it is grabbed, so the cursor is tied to an
   `iws-frame-draggable` the frame adds from its own AllowDrag rather than to the strip, which every
   frame wears whether it moves or not. Both frames carry it today; a child frame with no strip will
   not. Long-form again because the theme states `cursor: default` here from that same five-class
   chain — and the window needs its own line, since its header answers to a different name. */
.dxbl-popup.iws-frame-draggable > .dxbl-modal-content > .dxbl-popup-header.dxbl-modal-header,
.iws-frame-draggable .dxbl-popup > .dxbl-modal-content > .dxbl-popup-header.dxbl-modal-header,
.dxbl-window > .dxbl-window-dialog.iws-frame-draggable > .dxbl-window-header {
    cursor: move;
}

/* The Q menu's body, stripped back so the list *is* the menu rather than a card sitting inside one. The
   rows carry their own padding and their hover fill now runs the full width, which is what a task list
   looks like everywhere it appears.

   Named as custom properties rather than as `padding: 0`, because that is how the theme states it —
   `padding: var(--dxbl-dropdown-body-padding-top) var(--dxbl-dropdown-body-padding-x) …` — so setting
   the values wins without having to out-specify a five-class chain. It also means the class may land on
   the body or on a wrapper above it and work either way: custom properties inherit, and a padding
   override would not have. `align-items` is here for the same reason — the body is a flex column whose
   theme alignment leaves the list as wide as its longest row. */
.iws-start-menu {
    --dxbl-dropdown-body-padding-x: 0;
    --dxbl-dropdown-body-padding-top: 0;
    --dxbl-dropdown-body-padding-bottom: 0;
    --dxbl-dropdown-body-align-items: stretch;
}

/* An address box's ZIP / City suggestions. Portaled like every drop-down, so it lives here; the body is
   stripped so the rows run edge to edge, and the list scrolls itself so a hundred rows stay a list. */
.iws-addr-lookup-dropdown {
    --dxbl-dropdown-body-padding-x: 0;
    --dxbl-dropdown-body-padding-top: 0;
    --dxbl-dropdown-body-padding-bottom: 0;
    --dxbl-dropdown-body-align-items: stretch;
}

.iws-addr-lookup-list {
    max-height: 16rem;
    overflow-y: auto;
    padding: 0.25rem 0;
}

.iws-addr-lookup-row {
    padding: 0.2rem 0.75rem;
    white-space: nowrap;
    cursor: pointer;
    color: var(--iws-text);
}

.iws-addr-lookup-row:hover {
    background-color: var(--iws-hover);
}

.iws-addr-lookup-row.is-active {
    background-color: var(--iws-selected);
}

/* The documentation macro list (case 1a). The body is portaled, so these cannot live in the
   tab's scoped sheet. Ranked groups, a 1/4 chip, and a tag — the list is as wide as the field. */
.macro-drop-body {
    --dxbl-dropdown-body-padding-x: 0;
    --dxbl-dropdown-body-padding-top: 0;
    --dxbl-dropdown-body-padding-bottom: 0;
    --dxbl-dropdown-body-align-items: stretch;
}

.macro-drop {
    text-align: left;
    color: var(--iws-heading);
}

.macro-drop-search {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    box-sizing: border-box;
    height: var(--iws-control-height);
    margin: 5px 6px 4px;
    padding: 0 6px;
    border: 1px solid var(--iws-border);
    border-radius: 4px;
    color: var(--iws-text-faint);
    font-size: 0.7rem;
}

.macro-drop-search input {
    flex: 1 1 auto;
    min-width: 0;
    border: 0;
    padding: 0;
    background: transparent;
    color: var(--iws-heading);
    font: inherit;
    outline: none;
}

.macro-drop-list {
    max-height: 18rem;
    overflow-y: auto;
}

.macro-drop-h {
    padding: 3px 8px;
    font-size: 0.62rem;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--iws-brand);
    background: var(--iws-tint);
    border-top: 1px solid var(--iws-border-subtle);
    border-bottom: 1px solid var(--iws-border-subtle);
}

.macro-drop-h.is-plain {
    color: var(--iws-text-faint);
    background: var(--iws-surface-subtle);
}

.macro-drop-opt {
    display: flex;
    align-items: baseline;
    gap: 6px;
    width: 100%;
    padding: 4px 8px 5px;
    border: 0;
    border-top: 1px solid color-mix(in srgb, var(--iws-border-subtle) 40%, transparent);
    background: transparent;
    text-align: left;
    font: inherit;
    cursor: pointer;
}

.macro-drop-opt:hover,
.macro-drop-opt.is-current {
    background: var(--iws-tint);
}

.macro-chip {
    flex: 0 0 auto;
    padding: 0 4px;
    height: 12px;
    line-height: 12px;
    border-radius: 6px;
    font-size: 0.62rem;
    font-weight: 700;
}

.macro-chip.is-one {
    background: var(--iws-tint);
    color: var(--iws-brand);
}

.macro-chip.is-four {
    background: color-mix(in srgb, #5b3fb5 10%, var(--iws-surface));
    color: color-mix(in srgb, #5b3fb5 80%, var(--iws-heading));
}

.macro-drop-name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--iws-heading);
    font-size: 0.72rem;
    font-weight: 600;
}

.macro-drop-tag {
    margin-left: auto;
    flex: 0 0 auto;
    font-size: 0.62rem;
    color: var(--iws-text-faint);
    white-space: nowrap;
}

.macro-drop-foot {
    margin: 0;
    padding: 4px 8px 5px;
    font-size: 0.62rem;
    color: var(--iws-text-faint);
    line-height: 1.45;
    border-top: 1px solid var(--iws-border-subtle);
}

.macro-drop-foot b {
    color: var(--iws-text-secondary);
    font-weight: 700;
}

.check-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem 1.5rem;
}

/* Two fields that read as one value — a range — kept at their natural width instead of taking a
   grid column each, which parks the second one an empty half-column away from the first. */
.form-range {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.message {
    padding: 0.75rem 1rem;
    border-radius: 0.35rem;
    font-size: 0.9rem;
    line-height: 1.4;
}

.message-error {
    background: var(--iws-danger-bg);
    color: var(--iws-danger-text);
    border: 1px solid var(--iws-danger-border);
}

.message-ok {
    background: var(--iws-success-bg);
    color: var(--iws-success-text);
    border: 1px solid var(--iws-success-border);
}

/* "Somebody on file looks like the patient being typed." Said by the full registration form and by
   Quick Register, which is why it sits here rather than inside either: the popup can be open with the
   form nowhere on the page, and a box that styled itself only next to its sibling would arrive raw. */
.message-warning {
    background: var(--iws-warning-bg);
    color: var(--iws-warning-text);
    border: 1px solid var(--iws-warning-border);
}

.match-preview-list {
    margin: 0.5rem 0 0;
    padding-left: 1.25rem;
}

.match-preview-hint {
    margin: 0.35rem 0 0;
    font-size: 0.85rem;
}

/* In Quick Register a candidate is not only read, it can be taken — the caller wanted a patient and
   this is one. Drawn as text rather than as a button: it belongs to the sentence above it, and three
   buttons stacked inside a warning box would compete with Save for the eye. */
.match-preview-pick {
    padding: 0;
    border: 0;
    background: none;
    color: inherit;
    font: inherit;
    text-align: left;
    text-decoration: underline;
    cursor: pointer;
}

.match-preview-pick:hover:not(:disabled),
.match-preview-pick:focus-visible {
    color: var(--medq-navy);
}

.match-preview-pick:disabled {
    opacity: 0.6;
    cursor: default;
}

/* Under-field explanation, e.g. a PCP with no linked offices. */
.field-hint {
    margin: 0.35rem 0 0;
    font-size: 0.8rem;
    line-height: 1.35;
    color: var(--medq-gray-700);
}

.link-button {
    padding: 0;
    border: 0;
    background: none;
    color: var(--medq-navy);
    font: inherit;
    font-weight: 600;
    text-decoration: underline;
    cursor: pointer;
}

/* DevExpress editor IconCssClass — applied to .dxbl-image inside the field */
.iws-dx-icon {
    display: inline-block !important;
    width: 1rem !important;
    height: 1rem !important;
    flex-shrink: 0;
    background-color: currentColor !important;
    background-image: none !important;
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-position: center;
    -webkit-mask-size: contain;
    mask-repeat: no-repeat;
    mask-position: center;
    mask-size: contain;
}

.iws-dx-icon > *,
.iws-dx-icon svg {
    display: none !important;
}

.iws-dx-icon.iws-dx-icon-circle-exclamation {
    background-color: var(--iws-danger-tone) !important;
    color: var(--iws-danger-tone) !important;
}

.iws-dx-icon-calendar-days {
    -webkit-mask-image: url("/icons/calendar-days.svg");
    mask-image: url("/icons/calendar-days.svg");
}

.iws-dx-icon-calendar-clock {
    -webkit-mask-image: url("/icons/calendar-clock.svg");
    mask-image: url("/icons/calendar-clock.svg");
}

.iws-dx-icon-xmark {
    -webkit-mask-image: url("/icons/xmark.svg");
    mask-image: url("/icons/xmark.svg");
}

.iws-dx-icon-ellipsis-vertical {
    -webkit-mask-image: url("/icons/ellipsis-vertical.svg");
    mask-image: url("/icons/ellipsis-vertical.svg");
}

.iws-dx-icon-chevron-up {
    -webkit-mask-image: url("/icons/chevron-up.svg");
    mask-image: url("/icons/chevron-up.svg");
}

.iws-dx-icon-chevron-down {
    -webkit-mask-image: url("/icons/chevron-down.svg");
    mask-image: url("/icons/chevron-down.svg");
}

.iws-dx-icon-magnifying-glass {
    -webkit-mask-image: url("/icons/magnifying-glass.svg");
    mask-image: url("/icons/magnifying-glass.svg");
}

.iws-dx-icon-sliders {
    -webkit-mask-image: url("/icons/sliders.svg");
    mask-image: url("/icons/sliders.svg");
}

.iws-dx-icon-magnifying-glass-plus {
    -webkit-mask-image: url("/icons/magnifying-glass-plus.svg");
    mask-image: url("/icons/magnifying-glass-plus.svg");
}

.iws-dx-icon-hashtag {
    -webkit-mask-image: url("/icons/hashtag.svg");
    mask-image: url("/icons/hashtag.svg");
}

.iws-dx-icon-id-card {
    -webkit-mask-image: url("/icons/id-card.svg");
    mask-image: url("/icons/id-card.svg");
}

.iws-dx-icon-mobile-screen {
    -webkit-mask-image: url("/icons/mobile-screen.svg");
    mask-image: url("/icons/mobile-screen.svg");
}

.iws-dx-icon-user {
    -webkit-mask-image: url("/icons/user.svg");
    mask-image: url("/icons/user.svg");
}

.iws-dx-icon-users {
    -webkit-mask-image: url("/icons/users.svg");
    mask-image: url("/icons/users.svg");
}

.iws-dx-icon-phone {
    -webkit-mask-image: url("/icons/phone.svg");
    mask-image: url("/icons/phone.svg");
}

.iws-dx-icon-envelope {
    -webkit-mask-image: url("/icons/envelope.svg");
    mask-image: url("/icons/envelope.svg");
}

.iws-dx-icon-building {
    -webkit-mask-image: url("/icons/building.svg");
    mask-image: url("/icons/building.svg");
}

.iws-dx-icon-location-dot {
    -webkit-mask-image: url("/icons/location-dot.svg");
    mask-image: url("/icons/location-dot.svg");
}

.iws-dx-icon-check {
    -webkit-mask-image: url("/icons/check.svg");
    mask-image: url("/icons/check.svg");
}

.iws-dx-icon-circle-question {
    -webkit-mask-image: url("/icons/circle-question.svg");
    mask-image: url("/icons/circle-question.svg");
}

.iws-dx-icon-circle-exclamation {
    -webkit-mask-image: url("/icons/circle-exclamation.svg");
    mask-image: url("/icons/circle-exclamation.svg");
}

.iws-dx-icon-pencil {
    -webkit-mask-image: url("/icons/pencil.svg");
    mask-image: url("/icons/pencil.svg");
}

.iws-dx-icon-arrows-rotate {
    -webkit-mask-image: url("/icons/arrows-rotate.svg");
    mask-image: url("/icons/arrows-rotate.svg");
}

.iws-dx-icon-plus {
    -webkit-mask-image: url("/icons/plus.svg");
    mask-image: url("/icons/plus.svg");
}

.iws-dx-icon-fax {
    -webkit-mask-image: url("/icons/fax.svg");
    mask-image: url("/icons/fax.svg");
}

.iws-dx-icon-print {
    -webkit-mask-image: url("/icons/print.svg");
    mask-image: url("/icons/print.svg");
}

.iws-dx-icon-comment {
    -webkit-mask-image: url("/icons/comment.svg");
    mask-image: url("/icons/comment.svg");
}

.iws-dx-icon-plug {
    -webkit-mask-image: url("/icons/plug.svg");
    mask-image: url("/icons/plug.svg");
}

.iws-dx-icon-lock {
    -webkit-mask-image: url("/icons/lock.svg");
    mask-image: url("/icons/lock.svg");
}

.iws-dx-icon-paper-plane {
    -webkit-mask-image: url("/icons/paper-plane.svg");
    mask-image: url("/icons/paper-plane.svg");
}

/* Taking another MRN. A quieter grey than the text beside it until it is pointed at, because it sits
   in a box the clerk is usually reading rather than pressing — and full strength next to a value it
   would replace reads as a warning. */
.iws-mrn-generate {
    opacity: .55;
}

.iws-mrn-generate:hover,
.dxbl-edit-btn:hover .iws-mrn-generate {
    opacity: 1;
}

/* The way out of a patterned box. It has to read as a hint rather than an action: the glyph sits
   beside a value, not on a toolbar, so at the shared 1rem it becomes the loudest thing in the
   field. Lit navy while the box is unlocked, so the state is readable without clicking. */
.iws-pattern-escape {
    width: .75rem !important;
    height: .75rem !important;
    opacity: .55;
}

.iws-pattern-free .iws-pattern-escape {
    background-color: var(--iws-heading) !important;
    opacity: 1;
}

/* FA check mark inside DxCheckBox (replaces Fluent default glyph) */
.iws-encounter-checkbox.dxbl-checkbox-checked
    .dxbl-checkbox-check-element > .dxbl-image {
    background-color: currentColor !important;
    background-image: none !important;
    -webkit-mask: url("/icons/check.svg") no-repeat center / contain;
    mask: url("/icons/check.svg") no-repeat center / contain;
}

.iws-encounter-checkbox.dxbl-checkbox-checked
    .dxbl-checkbox-check-element > .dxbl-image > * {
    display: none !important;
}

/* Shared FA SVGs injected via MarkupString (not CSS-isolation scoped) */
.shared-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
    color: inherit;
}

.shared-icon svg,
.ribbon-btn-icon svg,
.status-facility-trigger svg {
    width: 1.35rem;
    height: 1.35rem;
    display: block;
    fill: currentColor;
}

.status-facility-trigger .shared-icon svg,
.status-facility-trigger svg {
    width: 0.95rem;
    height: 0.95rem;
}

/* Workspace toolbars run at 13px; full-size glyphs would dwarf the button text. Worklist and Tasks
   share a root class and were reading the full 1.35rem until their buttons grew glyphs. */
.worklist-workspace .shared-icon svg {
    width: 0.85rem;
    height: 0.85rem;
}

/* Above everything, including the DevExpress popup family, which starts at 1050 and climbs. It used to
   sit at 1000 — under every dialog and under the registration window, which covers the screen — so an
   unhandled error while a form was open was reported where nobody could see it, and whatever failed
   looked instead like a button that does nothing. The number matches the facility menu's, and for the
   same reason: one value above the whole family needs no re-checking when two frames are stacked. */
/* This and the loader below are drawn from index.html before the palette exists, hence the fallbacks. */
#blazor-error-ui {
    color-scheme: light only;
    background: var(--iws-warning-bg, #fff6e0);
    color: var(--iws-text, #1e1d1d);
    bottom: 0;
    box-shadow: 0 -1px 2px var(--iws-shadow, #0a1b5b26);
    box-sizing: border-box;
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 99999;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

.blazor-error-boundary {
    background: var(--iws-accent);
    padding: 1rem;
    color: var(--iws-text-on-accent);
}

.loading-progress {
    position: absolute;
    display: block;
    width: 8rem;
    height: 8rem;
    inset: 20vh 0 auto 0;
    margin: 0 auto;
}

.loading-progress circle {
    fill: none;
    stroke: var(--iws-brand-soft, #91b1db);
    stroke-width: 0.6rem;
    transform-origin: 50% 50%;
    transform: rotate(-90deg);
}

/* The arc and the figure inside it are how much of the app has downloaded: blazor.webassembly.js
   sets --blazor-load-percentage (0%–100%) and --blazor-load-percentage-text ("25%") on the root as
   each file arrives. The circle's radius is 40% of the box, so its circumference is 0.8π of it. */
.loading-progress circle:last-child {
    stroke: var(--iws-accent, #0a1b5b);
    stroke-dasharray: calc(3.14159265359 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
    transition: stroke-dasharray 0.05s ease-in-out;
}

.loading-progress-text {
    position: absolute;
    text-align: center;
    font-weight: 600;
    inset: calc(20vh + 3.25rem) 0 auto 0;
    color: var(--iws-heading, #0a1b5b);
}

.loading-progress-text::after {
    content: var(--blazor-load-percentage-text, "0%");
}

@media (max-width: 640px) {
    #blazor-error-ui {
        background: var(--iws-warning-bg, #fff6e0);
    }
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.chart-shell {
    display: grid;
    gap: 1rem;
    max-width: 72rem;
}

.chart-header {
    display: grid;
    gap: 0.65rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--iws-border);
}

.chart-patient-name {
    margin: 0;
    font-size: clamp(1.35rem, 2.5vw, 1.75rem);
    color: var(--medq-navy);
    letter-spacing: -0.02em;
}

.chart-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 1.25rem;
    color: var(--medq-gray-700);
    font-size: 0.9375rem;
}

.chart-alert-strip {
    padding: 0.55rem 0.75rem;
    background: color-mix(in srgb, var(--medq-yellow) 22%, var(--medq-white));
    border-left: 3px solid var(--medq-orange);
    color: var(--medq-black);
    font-size: 0.875rem;
}

/* `.chart-tabs` and the five `.chart-tab*` rules that stood here are gone with the hand-rolled strip
   (2026-09-06): the chart's tabs are DxTabs, which draws its own row, rule and active mark. The names
   had to go rather than be left dead — `.chart-tabs` is still on the strip, as the class the scoped
   sheet reaches it by, and a global flex-with-a-border on the component's root would have been laid
   over the theme's own layout. */
.chart-section-title {
    margin: 0 0 0.5rem;
    font-size: 1.05rem;
    color: var(--medq-navy);
}

.chart-grid-2 {
    display: grid;
    gap: 1.5rem;
}

@media (min-width: 720px) {
    .chart-grid-2 {
        grid-template-columns: 1.2fr 1fr;
    }
}

.chart-list {
    margin: 0 0 1rem;
    padding-left: 1.1rem;
    color: var(--medq-gray-700);
}

.chart-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.chart-btn {
    appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.45rem 0.75rem;
    border: 1px solid var(--iws-border);
    border-radius: 0.25rem;
    background: var(--iws-surface);
    color: var(--iws-heading);
    font: inherit;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
}

.chart-btn:hover:not(:disabled),
.chart-btn:focus-visible:not(:disabled) {
    border-color: var(--medq-blue);
}

.chart-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.chart-btn-primary {
    background: var(--iws-accent);
    border-color: var(--iws-accent);
    color: var(--iws-text-on-accent);
}

.chart-btn-primary:hover:not(:disabled),
.chart-btn-primary:focus-visible:not(:disabled) {
    background: var(--iws-accent-hover);
    border-color: transparent;
    color: var(--iws-text-on-accent);
}

.chart-muted,
.chart-demographics {
    margin-top: 0.75rem;
    color: var(--medq-gray-700);
    font-size: 0.875rem;
}

.chart-error {
    color: var(--iws-warning-text);
}

/* Both an anchor and a button wear this. The two links into a chart from the registration form became
   buttons when they stopped navigating — a window over the form rather than a page instead of it — and
   a control that reads as a link has to keep reading as one whatever element it turns out to be. */
.chart-link {
    font-weight: 500;
}

button.chart-link {
    padding: 0;
    border: 0;
    background: none;
    font: inherit;
    font-weight: 500;
    color: var(--iws-brand);
    text-align: left;
    text-decoration: underline;
    cursor: pointer;
}

.chart-tag {
    display: inline-block;
    padding: 0.1rem 0.45rem;
    border-radius: 0.2rem;
    background: var(--medq-gray-50);
    color: var(--medq-navy);
    font-size: 0.75rem;
    font-weight: 600;
}

.episode-card {
    margin-bottom: 1rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--iws-border-subtle);
}

.episode-card-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.episode-card-header h3 {
    margin: 0;
    font-size: 1rem;
    color: var(--medq-navy);
}

.encounter-row {
    display: grid;
    gap: 0.35rem 0.75rem;
    align-items: center;
    padding: 0.55rem 0.35rem;
    border-radius: 0.25rem;
}

@media (min-width: 720px) {
    .encounter-row {
        grid-template-columns: 7rem 1fr auto auto;
    }
}

.encounter-row-focus {
    background: color-mix(in srgb, var(--medq-sky) 18%, var(--medq-white));
}

.enc-type {
    font-weight: 600;
    color: var(--medq-navy);
}

/* The wide settings ceiling, not the 56rem default: five 250px tiles plus their gaps need 1298px of
   content box, and 81.375rem is 1302px. It was 68rem, which held four — enough for every group but
   Clinical configuration, whose fifth tile dropped to a row of its own while the room it needed was
   past the cap (Marius, 2026-09-17: "patient merge should be -1row up where there is space available").

   A ceiling rather than a count: the grid still auto-fills, so a narrower window drops to four or three
   on its own. */
.settings-hub {
    max-width: 81.375rem;
}

/* The prose stays at the old measure. The grid wanted the extra 200px; a one-line description read
   across 1302px does not. */
.settings-hub > .page-copy {
    max-width: 56rem;
}

.settings-group {
    display: grid;
    gap: 0.75rem;
}

.settings-group-title {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--medq-navy);
}

/* Fixed 250px rather than a stretching minmax, so a tile is the same size here and on MAUI. */
.settings-tile-grid {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: repeat(auto-fill, 250px);
}

.settings-tile {
    position: relative;
    display: grid;
    gap: 0.35rem;
    padding: 0.85rem 1.6rem 0.85rem 1rem;
    border: 1px solid var(--iws-border);
    border-radius: 0.35rem;
    background: var(--medq-white);
    text-align: left;
    cursor: pointer;
}

/* The whole tile is the button; without this it reads as a static card. */
.settings-tile::after {
    content: "\203A";
    position: absolute;
    right: 0.7rem;
    bottom: 0.5rem;
    font-size: 1.1rem;
    line-height: 1;
    color: var(--iws-text-faint);
}

.settings-tile:hover,
.settings-tile:focus-visible {
    border-color: var(--medq-blue);
    background: color-mix(in srgb, var(--medq-sky) 12%, var(--medq-white));
}

.settings-tile-title {
    font-weight: 700;
    color: var(--medq-navy);
}

.settings-tile-copy {
    font-size: 0.85rem;
    color: var(--medq-gray-700);
    line-height: 1.35;
}

.settings-tile-badge {
    justify-self: start;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--list-tone-warning-text);
    background: color-mix(in srgb, var(--medq-yellow) 24%, var(--medq-white));
    padding: 0.12rem 0.4rem;
    border-radius: 0.2rem;
}

.settings-back {
    margin: 0;
}

.settings-back a {
    color: var(--medq-blue);
    text-decoration: none;
    font-weight: 600;
}

.settings-back a:hover {
    text-decoration: underline;
}

.settings-coming-soon {
    display: grid;
    gap: 0.5rem;
    padding: 1rem;
    border: 1px dashed var(--iws-border);
    border-radius: 0.35rem;
    background: var(--medq-gray-50);
}

.settings-coming-soon-badge {
    justify-self: start;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--list-tone-warning-text);
}

.settings-placeholder-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* ---- Practice settings screens ------------------------------------------------------------- */

/* The wide variant registration already uses. Only list grids and the permission matrix take it;
   forms keep the 56rem default, which puts a three-column field row near 270px per control. */
.page-panel--settings-wide {
    width: min(100%, 81.375rem);
    max-width: 81.375rem;
}

.page-panel--settings-full {
    width: min(100%, 95vw);
    max-width: 95vw;
}

/* ---- Practice settings: navigation beside the page (SettingsLayout) ------------------------ */

/* The shell's full height, so the list and the page scroll each on their own: a long page does not
   carry the list away, and the search box stays in reach from the bottom of either. */
.settings-shell {
    height: 100%;
    min-height: 0;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    gap: 0.75rem;
}

.settings-shell-head {
    display: grid;
    gap: 0.25rem;
}

.settings-shell-title {
    margin: 0;
    font-weight: 700;
    font-size: clamp(1.5rem, 3vw, 1.85rem);
    color: var(--medq-navy);
    letter-spacing: -0.02em;
}

.settings-shell-body {
    min-height: 0;
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 1.5rem;
}

/* The title heads the list column, not the shell, so it and the page's title share one top line. */
.settings-side {
    min-height: 0;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    gap: 0.5rem;
    padding-right: 0.75rem;
    border-right: 1px solid var(--iws-border);
}

.settings-nav {
    min-height: 0;
    overflow-y: auto;
    display: grid;
    align-content: start;
    gap: 0.5rem;
}

.settings-pane {
    min-width: 0;
    min-height: 0;
    overflow: auto;
}

.settings-pane-back {
    display: none;
    margin-bottom: 0.75rem;
}

.settings-nav-empty {
    margin: 0.25rem 0.5rem;
    font-size: 0.85rem;
    color: var(--medq-gray-700);
}

/* One ink per group, from the palette so the dark themes have their own. */
.settings-ink-people { --settings-ink: var(--iws-settings-people); }
.settings-ink-security { --settings-ink: var(--iws-settings-security); }
.settings-ink-clinical { --settings-ink: var(--iws-settings-clinical); }
.settings-ink-integration { --settings-ink: var(--iws-settings-integration); }
.settings-ink-compliance { --settings-ink: var(--iws-settings-compliance); }
.settings-ink-distribution { --settings-ink: var(--iws-settings-distribution); }

/* Flat rows as in the sketch: the heading and its pages share the ink, the page in view sits on a
   tint of it. Through the tree's own item variables, so hover and focus keep working. */
.settings-nav-tree .dxbl-treeview-item-container {
    --dxbl-treeview-item-color: var(--settings-ink);
    --dxbl-treeview-item-hover-color: var(--settings-ink);
    --dxbl-treeview-item-hover-bg: color-mix(in srgb, var(--settings-ink) 7%, transparent);
    --dxbl-treeview-item-active-color: var(--settings-ink);
    --dxbl-treeview-item-active-bg: color-mix(in srgb, var(--settings-ink) 14%, transparent);
}

.settings-nav-group > .dxbl-treeview-item-content > .dxbl-treeview-item-container,
.dxbl-treeview-item-container.settings-nav-group {
    --dxbl-treeview-item-cursor: default;
    --dxbl-treeview-item-hover-bg: transparent;
    font-weight: 700;
    margin-top: 0.35rem;
}

.settings-nav-page .dxbl-treeview-item-text-tmpl {
    display: grid;
    gap: 0.1rem;
}

.settings-nav-page .settings-tile-badge {
    margin-left: 0.35rem;
}

.settings-nav-match {
    font-size: 0.75rem;
    line-height: 1.3;
    color: var(--medq-gray-700);
}

::highlight(iws-settings-search) {
    background-color: color-mix(in srgb, var(--medq-yellow) 55%, transparent);
    color: inherit;
}

/* Too narrow for both: /settings is the list, a page takes the width with the way back on top.
   The width is the one settingsShell.js narrow() answers to. */
@media (max-width: 899.98px) {
    .settings-shell-body {
        grid-template-columns: minmax(0, 1fr);
    }

    .settings-side {
        padding-right: 0;
        border-right: 0;
    }

    .settings-shell--page .settings-nav,
    .settings-shell--list .settings-pane {
        display: none;
    }

    .settings-shell--page .settings-pane-back {
        display: block;
    }
}

.settings-hint {
    font-size: 0.75rem;
    color: var(--medq-gray-700);
    line-height: 1.4;
}

/* A rule that applies to the section rather than to one field sits under the whole grid. */
.settings-hint--section {
    padding-top: 0.15rem;
    border-top: 1px dashed var(--iws-brand-faint);
    margin-top: 0.15rem;
    padding-left: 0;
}

.settings-switch-row {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    min-height: 2rem;
    font-size: 0.85rem;
    color: var(--medq-gray-700);
}

.settings-readonly {
    padding: 0.4rem 0.6rem;
    border: 1px solid var(--iws-brand-faint);
    border-radius: 0.25rem;
    background: var(--medq-gray-50);
    font-size: 0.85rem;
    color: var(--medq-gray-700);
    min-height: 2rem;
    display: flex;
    align-items: center;
}

.settings-mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.8rem;
}

.settings-field-row {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.settings-field-row > :first-child {
    flex: 1;
    min-width: 0;
}

.settings-toolbar {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
}

/* A second list's title and Add, 5px above that list: the negative margin takes back the page's
   grid gap (`.page-panel`, 1.25rem). */
.settings-toolbar--section {
    margin-bottom: calc(5px - 1.25rem);
}

.settings-toolbar--section .settings-section-title {
    margin: 0;
}

.settings-toolbar-right {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Template folder is one line: caption, path, save. The add button shares the facility picker's center. */
.settings-folder-row,
.settings-action-row {
    align-items: center;
}

/* One width for every caption on the page, so folders and facility start on the same edge. */
.settings-folder-label {
    flex: none;
    width: 7.5rem;
    font-size: 0.85rem;
    color: var(--medq-gray-700);
    line-height: 1;
}

.settings-folder-input {
    width: 22rem;
    max-width: 100%;
    flex: none;
}

.settings-folder-input .dxbl-text-edit,
.settings-folder-input .dxbl-edit-box {
    width: 100%;
}

.settings-action-row .form-field-editor-wrap {
    width: 16rem;
    flex: none;
}

.settings-folder-row .settings-bar-btn,
.settings-action-row .settings-bar-btn {
    align-self: center;
    margin: 0;
}

.template-editor-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: -38px;
}

.template-editor-grid.form-editor-grid {
    margin-top: 0;
}

.template-editor-grid .form-field--lead {
    grid-column: 1;
}

.template-default-row {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.35rem;
    margin-top: -10px;
    margin-bottom: 0.65rem;
    font-size: 0.75rem;
    line-height: 1;
    color: var(--medq-gray-700);
}

.template-default-row .template-default-switch {
    transform: scale(0.8);
    transform-origin: left center;
}

/* Ordered last and given the whole line, so the search wraps to a row of its own immediately above
   the list it filters while the add button and the switches stay together on the row above it. */
.settings-toolbar-search {
    order: 1;
    flex: 1 0 100%;
}

.settings-table-scroll {
    overflow-x: auto;
    border: 1px solid var(--iws-brand-faint);
    border-radius: 0.35rem;
}

.settings-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.settings-table th {
    position: sticky;
    top: 0;
    text-align: left;
    font-weight: 700;
    color: var(--medq-navy);
    background: var(--iws-tint);
    padding: 0.45rem 0.6rem;
    border-bottom: 1px solid var(--iws-brand-faint);
    white-space: nowrap;
}

.settings-table td {
    padding: 0.4rem 0.6rem;
    border-bottom: 1px solid var(--iws-border-subtle);
    vertical-align: middle;
}

.settings-table tbody tr:hover {
    background: color-mix(in srgb, var(--medq-sky) 10%, var(--medq-white));
}

/* A list whose picked row drives what is shown under it (Sedation's types). */
.settings-table--pick tbody tr {
    cursor: pointer;
}

.settings-table tbody tr.is-selected,
.settings-table tbody tr.is-selected:hover {
    background: var(--iws-selected);
    box-shadow: inset 3px 0 0 var(--iws-focus);
}

.settings-table .is-yes {
    color: var(--iws-success-text);
    font-weight: 700;
}

.settings-table .is-no {
    color: var(--iws-text-faint);
}

.settings-row-actions {
    display: flex;
    gap: 0.35rem;
    justify-content: flex-end;
    white-space: nowrap;
}

/* A flex td leaves the table layout and draws its own, misaligned bottom border. */
td.settings-row-actions {
    display: table-cell;
    text-align: right;
}

td.settings-row-actions > * + * {
    margin-left: 0.35rem;
}

.settings-row-action {
    border: 0;
    background: none;
    padding: 0.1rem 0.25rem;
    font: inherit;
    font-size: 0.8rem;
    color: var(--medq-blue);
    cursor: pointer;
}

.settings-row-action:hover {
    text-decoration: underline;
}

.settings-row-action--danger {
    color: var(--iws-danger-text);
}

.settings-row-action[disabled] {
    color: var(--iws-text-faint);
    cursor: default;
    text-decoration: none;
}

/* A DxGrid on a settings page is drawn as the settings table above, so a page reads the same whichever
   of the two it lists with (Marius, 2026-11-06: "keep the same model we have for all settings"). It
   overrides the app grid header further up, small grey uppercase, which outranks the theme with two
   classes on the grid; the settings shell adds one more. Dialogs render outside the shell and keep the
   app header. */
.settings-shell .dxbl-grid.dxbl-grid {
    --dxbl-grid-font-family: inherit;
    --dxbl-grid-font-size: 0.85rem;
    --dxbl-grid-border-color: var(--iws-brand-faint);
    --dxbl-grid-border-radius: 0.35rem;
    --dxbl-grid-header-bg: var(--iws-tint);
    --dxbl-grid-header-color: var(--medq-navy);
    --dxbl-grid-header-font-weight: 700;
    --dxbl-grid-h-line-color: var(--iws-border-subtle);
    --dxbl-grid-hover-bg: color-mix(in srgb, var(--medq-sky) 10%, var(--medq-white));
    --dxbl-grid-text-cell-padding-x: 0.6rem;
    --dxbl-grid-text-cell-padding-y: 0.4rem;
}

.settings-shell .dxbl-grid.dxbl-grid .dxbl-grid-table > thead > tr > th {
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: normal;
    text-transform: none;
    color: var(--medq-navy);
    background: var(--iws-tint);
    border-bottom-color: var(--iws-brand-faint);
    white-space: nowrap;
}

.settings-shell .dxbl-grid.dxbl-grid .dxbl-grid-table > thead > tr > th span {
    color: var(--medq-navy) !important;
}

/* The medication settings dialogs, as the approved mockup: each caption right-aligned against its
   box in one shared column, in the quieter ink so the values read first. Global because a dialog
   renders outside its page, where the page's scoped styles do not reach. */
.dxbl-fl.settings-medication-form .dxbl-fl-cpt {
    justify-content: flex-end;
    text-align: right;
    color: var(--iws-text-secondary);
}

.settings-chip {
    display: inline-block;
    padding: 0.05rem 0.4rem;
    margin: 0.05rem 0.15rem 0.05rem 0;
    border-radius: 0.75rem;
    background: var(--medq-gray-50);
    border: 1px solid var(--iws-brand-faint);
    font-size: 0.72rem;
    color: var(--medq-gray-700);
    /* A chip is one token. In a narrow column the diagnosis Type chip broke after the hyphen and
       read as two values stacked, "ICD-" over "10"; several chips side by side still wrap between
       themselves, which is the wrapping these lists actually want. */
    white-space: nowrap;
}

/* The vocabulary that names a clinical code — ICD-9, ICD-10, SNOMED. One width for all three, set
   by the longest of them, and centred in it: the codes beside them line up because they are a column
   of their own, and a ragged column of chips in front of a straight column of codes reads as though
   the codes are indented by vocabulary. Centred rather than padded on one side, because a chip padded
   on one side only reads as a label that has been nudged. Same rule, same reason, as the `.sys` pill
   in the quick-search rail, which draws the same three labels at its own scale. */
.settings-chip--code-system {
    min-width: 4rem;
    text-align: center;
}

.settings-chip--ok {
    background: var(--iws-success-bg);
    border-color: var(--iws-success-border);
    color: var(--iws-success-text);
}

.settings-chip--danger {
    background: var(--iws-danger-bg);
    border-color: var(--iws-danger-border);
    color: var(--iws-danger-text);
}

.settings-pill {
    display: inline-block;
    margin-left: 0.45rem;
    padding: 0.03rem 0.4rem;
    border-radius: 0.2rem;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    background: var(--medq-gray-50);
    color: var(--medq-gray-700);
}

.settings-pill--ok {
    background: var(--iws-success-bg);
    color: var(--iws-success-text);
}

.settings-pill--modified {
    background: var(--iws-warning-bg);
    color: var(--iws-warning-text);
}

/* DxTextBox with Password="true" has no reveal affordance of its own, and a secret typed blind is a
   secret typed wrong. The toggle covers what is being entered now, never a stored value. */
.settings-secret-row {
    display: flex;
    gap: 0.4rem;
    align-items: center;
}

.settings-secret-row > :first-child {
    flex: 1 1 auto;
    min-width: 0;
}

.settings-reveal {
    flex: 0 0 auto;
    padding: 0.25rem 0.5rem;
    border: 1px solid var(--iws-border);
    border-radius: 0.25rem;
    background: var(--medq-white);
    font-size: 0.75rem;
    color: var(--medq-gray-700);
    cursor: pointer;
}

.settings-reveal:hover {
    background: var(--medq-gray-50);
}

.settings-empty {
    padding: 1.25rem;
    text-align: center;
    color: var(--medq-gray-700);
    font-size: 0.85rem;
}

.message-warn {
    padding: 0.5rem 0.75rem;
    border-radius: 0.25rem;
    font-size: 0.85rem;
    background: color-mix(in srgb, var(--medq-yellow) 18%, var(--medq-white));
    border: 1px solid color-mix(in srgb, var(--medq-yellow) 45%, var(--medq-white));
    color: var(--list-tone-warning-text);
}

/* Permission matrix: 38 keys grouped by prefix, three across on a wide panel. */
.perm-group + .perm-group {
    margin-top: 0.7rem;
}

.perm-group-title {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--medq-gray-700);
    padding-bottom: 0.3rem;
}

.perm-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
    gap: 0.25rem 1rem;
}

.perm {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.82rem;
    color: var(--medq-gray-700);
    cursor: pointer;
}

/* Held by a dependency: still ticked, but visibly not the administrator's own choice. */
.perm--auto {
    color: var(--iws-text-faint);
    cursor: default;
}

.perm-auto-note {
    margin-left: 0.35rem;
    font-size: 0.7rem;
    color: var(--iws-text-faint);
}

/* Clinical code pickers and the lists they add to. The grids themselves are .settings-table: a
   problem list and a user list are the same object on screen, and only the columns differ. */

.iws-code-picker {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    min-width: 0;
}

.iws-code-picker__system {
    flex: 0 0 7.5rem;
}

.iws-code-picker__box {
    flex: 1 1 auto;
    min-width: 0;
}

.iws-code-panel {
    display: flex;
    flex-direction: column;
    min-width: 26rem;
}

.iws-code-panel__search {
    margin: 0.4rem 0.5rem;
}

/* Capped rather than sized to content: the list pages forever, so without a ceiling the dropdown
   would grow past the window the moment a second page arrived. */
.iws-code-list {
    max-height: 20rem;
    overflow-y: auto;
}

.iws-code-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.iws-code-table th {
    position: sticky;
    top: 0;
    text-align: left;
    font-weight: 700;
    color: var(--medq-navy);
    background: var(--iws-tint);
    padding: 0.35rem 0.6rem;
    border-bottom: 1px solid var(--iws-brand-faint);
    white-space: nowrap;
}

.iws-code-table td {
    padding: 0.35rem 0.6rem;
    border-bottom: 1px solid var(--iws-border-subtle);
    cursor: pointer;
}

.iws-code-table tbody tr:hover {
    background: color-mix(in srgb, var(--medq-sky) 12%, var(--medq-white));
}

.iws-code-table__code {
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    font-weight: 600;
    color: var(--medq-navy);
}

.iws-code-section {
    padding: 0.25rem 0.6rem;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--iws-text-faint);
}

.iws-code-empty {
    padding: 0.75rem 0.6rem;
    font-size: 0.82rem;
    color: var(--medq-gray-700);
}

/* Zero-height on purpose: it is watched, never seen. Any height and it would be a gap under the
   last row that the scrollbar has to travel through. */
.iws-code-sentinel {
    height: 1px;
}

.iws-list-end {
    display: block;
    height: 1px;
}

.iws-problem-history__head {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 0.5rem;
}

.iws-problem-history__head .iws-code-picker {
    flex: 1 1 22rem;
}

/* Pushed to the end of the line, where Add Payer sits in the pickers. It holds that place whether or
   not the No Clinical Problems box is beside it, so the link does not move when the first diagnosis
   goes on and the box disappears. */
.iws-problem-history__add {
    flex: 0 0 auto;
    margin-left: auto;
}

.iws-problem-history__add[disabled] {
    color: var(--medq-gray-400);
    cursor: default;
    text-decoration: none;
}

/* The compact list: a problem read rather than edited, for a column too narrow to hold the grid.
   The vocabulary, the code, then the name and its actions — all on one line where the row is wide
   enough, wrapping to a second only where it is not. */
.iws-problem-list__row {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    column-gap: 0.5rem;
    row-gap: 0.0625rem;
    padding: 0.25rem 0;
    border-top: 1px solid var(--iws-border-subtle);
    font-size: 0.75rem;
    line-height: 0.95rem;
}

/* The name and the two actions as one wrapping unit. The basis is the width below which a
   description is not worth reading in place — clipped at "Personal history of nicotine depe" is the
   one part of a row nobody can reconstruct — so when less than that is left beside the code the pair
   takes the next line and the full width of it instead. */
.iws-problem-list__line {
    display: flex;
    flex: 1 1 15rem;
    align-items: baseline;
    gap: 0.5rem;
    min-width: 0;
}

/* One width for every vocabulary, set by the longest, so the codes start at the same place and the
   eye reads down them rather than hunting along each row. */
.iws-problem-list__sys {
    min-width: 3.6rem;
    padding: 0 0.375rem;
    border: 1px solid var(--iws-border-subtle);
    border-radius: 0.6rem;
    background: var(--iws-surface-subtle);
    font-size: 0.625rem;
    font-weight: 600;
    line-height: 1rem;
    letter-spacing: .03em;
    text-align: center;
    white-space: nowrap;
    color: var(--medq-gray-700);
}

/* The role the code plays, in the vocabulary pill's shape and a quieter dress — no border and a
   tint, so the pair reads as a chip and its footnote rather than as two labels of equal weight
   (Marius, 2026-09-20: "add Diagnosis Role ... pill like"). One width with the vocabulary, since in
   a rail the two stack into a column and a column of ragged pills is not one. */
.iws-problem-list__role {
    min-width: 3.6rem;
    padding: 0 0.375rem;
    border: 1px solid transparent;
    border-radius: 0.6rem;
    background: var(--iws-tint);
    font-size: 0.625rem;
    line-height: 1rem;
    text-align: center;
    white-space: nowrap;
    color: var(--medq-gray-700);
}

/* Tabular figures: a column of codes is read downwards, and proportional digits stagger it. Bold,
   and darker than the pills beside it (Marius, 2026-09-20: "make the code value = bold"): the code
   is what a row is looked up by, and the eye running down the list should land on it first. */
.iws-problem-list__code {
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    white-space: nowrap;
    color: var(--medq-navy);
}

.iws-problem-list__what {
    flex: 1 1 auto;
    min-width: 0;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow: hidden;
    color: var(--medq-black);
}

/* Correct and remove, at the end of the row. Faint until the row is under the pointer: present rather
   than hover-only, because a control that appears on hover cannot be found by anyone who is not
   already looking for it, but quiet, because reading this list is what it is mostly for. */
.iws-problem-actions {
    display: inline-flex;
    align-items: center;
    gap: 0.125rem;
    align-self: center;
    color: var(--medq-gray-400);
}

.iws-problem-list__row:hover .iws-problem-actions,
.settings-table tr:hover .iws-problem-actions,
.iws-problem-actions:focus-within {
    color: var(--medq-gray-700);
}

/* At the end of the name rather than against the code, so they sit beside the words they act on and
   the line that carries the vocabulary and the number does not read as a row of controls (Marius,
   2026-09-16: "move the icons on 2nd line [smaller maybe]"). Smaller, too, since this list is read
   far more often than it is corrected. */
.iws-problem-list__line > .iws-problem-actions {
    flex: none;
    margin-left: auto;
    align-self: center;
}

.iws-problem-list__row .iws-picker-row-action {
    width: 1.125rem;
    height: 1.125rem;
}

.iws-problem-list__row .iws-picker-row-action svg {
    width: 0.7rem;
    height: 0.7rem;
}

/* Removal is the one that cannot be taken back, so it answers to the pointer in the colour it will
   act in — the confirm behind it is tinted the same. */
.iws-problem-actions__drop:hover {
    color: var(--iws-danger-text);
}

/* The actions take only the width they need, at the end of the row. */
.iws-problem-actions__cell {
    width: 1%;
    white-space: nowrap;
}

/* Two columns and a tail: Role over From, Status over To, Outside beside them (Marius, 2026-09-20:
   "align the columns"). Laid as a grid rather than as a wrapping row of self-sized fields, which is
   what put From under Role and To under nothing in particular — every field was as wide as the
   control it holds, so the second column of the second line started wherever the first one happened
   to end. Columns at a date's width rather than a description's, since that is the widest thing
   either of them has to show.

   The two field tracks may shrink under a dialog dragged narrow; the checkbox keeps its own width,
   because a wrapped "Outside" reads as two things. */
.iws-diagnosis__fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 10rem)) auto;
    align-items: end;
    gap: 0.5rem 0.75rem;
}

/* And the editors fill the cell they were given. Left to themselves they take the width of what they
   hold, so a column of aligned cells still drew a combo and a date box of two different widths with
   two different right edges. */
.iws-diagnosis__fields .dxbl-edit-box {
    width: 100%;
    min-width: 0;
    max-width: 100%;
}

/* A checkbox has no caption line of its own, so it sits level with the boxes beside it rather than
   with their labels — the row is aligned to its controls, and this is one. */
.iws-diagnosis__check {
    padding-bottom: 0.3rem;
}

/* A problem the patient no longer has. Greyed rather than dropped: it is history, and history is
   what this list is. The pill greys with it — a resolved problem beside a live-looking vocabulary
   reads as two states in one row — and the word travels in the screen-reader text. */
.iws-problem-list__row--past .iws-problem-list__code,
.iws-problem-list__row--past .iws-problem-list__what {
    color: var(--medq-gray-400);
}

.iws-problem-list__row--past .iws-problem-list__sys,
.iws-problem-list__row--past .iws-problem-list__role {
    color: var(--medq-gray-400);
    border-color: var(--iws-border-subtle);
    background: var(--iws-surface-subtle);
}

/* The diagnosis dialog, which adds and corrects in one box. The picker fills the width because the
   vocabulary has moved out of it and onto the pills above, leaving the search box alone on its row.

   Compact throughout (Marius, 2026-09-20: "apply compact model text"): the editors are the theme's
   small size and the captions step down with them. This is a box of short answers about one code —
   at the form's own scale it read as a page, and a page is what the reader had just left. */
.iws-diagnosis {
    display: grid;
    gap: 0.6rem;
}

.iws-diagnosis .iws-code-picker {
    width: 100%;
}

.iws-diagnosis .form-field {
    gap: 0.2rem;
}

.iws-diagnosis .form-field label {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--medq-gray-700);
}

.iws-code-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.iws-code-pill {
    padding: 0.2rem 0.75rem;
    border: 1px solid var(--iws-brand-faint);
    border-radius: 0.9rem;
    background: var(--medq-gray-50);
    font-size: 0.78rem;
    color: var(--medq-gray-700);
    white-space: nowrap;
    cursor: pointer;
}

.iws-code-pill:hover {
    border-color: var(--medq-blue);
}

.iws-code-pill--on {
    background: var(--medq-blue);
    border-color: var(--medq-blue);
    color: var(--iws-text-on-accent);
}

/* The code as it stands — what Save will write, said back in the same three parts the grid shows it
   in. On an edit it starts as the row's own code and changes the moment another is picked, so the
   line is both the answer and the confirmation that a re-pick landed. */
.iws-diagnosis__chosen {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    min-height: 1.5rem;
    font-size: 0.78rem;
}

/* The one part that can run long. It wraps rather than pushing the chip and the code off the line,
   and takes the slack so the two buttons sit at the end of the line rather than against the text. */
.iws-diagnosis__what {
    flex: 1 1 auto;
    min-width: 0;
    overflow-wrap: anywhere;
}

/* Quiet until the line is under the pointer: the code is the thing being read here, and two icons at
   full strength beside it read as a toolbar. */
.iws-diagnosis__change {
    flex: 0 0 auto;
    align-self: flex-start;
    color: var(--medq-gray-400);
}

.iws-diagnosis__chosen:hover .iws-diagnosis__change,
.iws-diagnosis__change:focus-visible {
    color: var(--medq-gray-700);
}

.iws-diagnosis__hint {
    min-height: 1.5rem;
    font-size: 0.76rem;
    color: var(--medq-gray-700);
}

.iws-diagnosis__error {
    font-size: 0.76rem;
    color: var(--iws-danger-text);
}

.iws-problem-history__none {
    flex: 0 0 auto;
    white-space: nowrap;
}

.iws-problem-history__hint,
.iws-problem-history__empty {
    font-size: 0.82rem;
    color: var(--medq-gray-700);
    padding: 0.4rem 0;
}

.iws-problem-history__error {
    font-size: 0.82rem;
    color: var(--iws-danger-text);
    padding: 0.4rem 0;
}

/* Home board: the tile menu, the Add tile's launcher and the Undo toast render outside the board. */
.home-tile-menu .home-menu-check,
.home-tile-menu .home-menu-blank {
    width: 16px;
    height: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.home-tile-menu .home-menu-check::before {
    content: "✓";
    color: var(--medq-navy);
    font-weight: 600;
}

.home-launcher .home-launcher-note {
    margin: 0;
    color: var(--medq-gray-700);
}

/* Columns side by side when the groups outgrow the window's height (HomeLauncher.razor picks how
   many); past the width's last column, the columns scroll. */
.home-launcher .home-launcher-columns {
    display: flex;
    align-items: flex-start;
    gap: 24px;
    max-height: 70vh;
    overflow-x: hidden;
    overflow-y: auto;
    scrollbar-gutter: stable;
}

.home-launcher .home-launcher-column {
    flex: 0 0 auto;
}

.home-launcher .home-launcher-group + .home-launcher-group {
    margin-top: 12px;
}

.home-launcher .home-launcher-heading {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--list-tone-muted-text);
    margin-bottom: 6px;
}

.home-launcher .home-launcher-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 4px;
    width: min(24rem, calc(100vw - 3rem));
}

.home-launcher .home-launcher-tile {
    border: 0;
    background: transparent;
    border-radius: 6px;
    padding: 8px 4px;
    font: inherit;
    color: inherit;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

.home-launcher .home-launcher-tile:hover:not(:disabled) {
    background: var(--medq-gray-50);
}

.home-launcher .home-launcher-tile:disabled {
    opacity: 0.45;
    cursor: default;
}

.home-launcher .home-launcher-icon {
    position: relative;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--chart-zone);
    color: var(--medq-navy);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.home-launcher .home-launcher-icon svg {
    width: 20px;
    height: 20px;
}

.home-launcher .home-launcher-icon.is-artwork {
    background: var(--iws-ribbon);
}

.home-launcher .home-launcher-icon.is-artwork svg {
    width: 24px;
    height: 24px;
}

.home-launcher .home-launcher-tick {
    position: absolute;
    right: -4px;
    bottom: -2px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--list-tone-success);
    color: var(--iws-text-on-accent);
    font-size: 0.625rem;
    line-height: 16px;
    text-align: center;
}

.home-launcher .home-launcher-caption {
    font-size: 0.75rem;
    line-height: 1.2;
    text-align: center;
    word-break: break-word;
}

.home-undo-toast .home-undo {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 12px;
}

/* Collaboration: the merge view, the lease bar, the roster, claims and the live toasts. */
.collab-merge-intro {
    margin: 0 0 4px;
    font-weight: 600;
}

.collab-merge-hint {
    margin: 0 0 12px;
    color: var(--iws-text-secondary);
    font-size: 0.8125rem;
}

.collab-merge {
    display: grid;
    gap: 6px;
}

.collab-merge-row {
    display: grid;
    grid-template-columns: 9rem 1fr 1fr;
    gap: 12px;
    align-items: start;
    padding: 6px 0;
    border-bottom: 1px solid var(--iws-border-subtle);
}

.collab-merge-head {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--iws-text-secondary);
}

.collab-merge-field {
    font-weight: 600;
}

.collab-toast-body {
    display: grid;
    gap: 6px;
    padding: 8px 12px;
}

.collab-toast-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.collab-undo {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 2px 6px;
}

.collab-roster-trigger {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    background: transparent;
    border: 0;
    color: inherit;
    font: inherit;
    cursor: pointer;
    padding: 0 4px;
}

.collab-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    color: var(--iws-text-on-accent);
    font-size: 0.5625rem;
    font-weight: 700;
    flex: none;
}

.collab-avatar-more {
    background: var(--iws-muted-tone);
}

.collab-avatar.is-away {
    opacity: 0.7;
}

.collab-roster {
    list-style: none;
    margin: 0 0 8px;
    padding: 0;
}

.collab-roster-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 0;
}

.collab-roster-line {
    flex: 1;
    min-width: 0;
}

.collab-roster-away,
.collab-roster-empty,
.collab-broadcast-hint {
    color: var(--iws-text-muted);
    font-size: 0.8125rem;
}

.collab-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    margin: 0 0 8px;
    border-radius: 4px;
    border-left: 3px solid var(--iws-info-tone);
    background: var(--iws-info-bg);
    font-size: 0.8125rem;
}

.collab-bar.is-warn {
    border-left-color: var(--iws-attention);
    background: var(--iws-warning-bg);
}

.collab-bar.is-lock {
    border-left-color: var(--iws-danger-tone);
    background: var(--iws-danger-bg);
}

.collab-bar-text {
    flex: 1;
    min-width: 12rem;
}

.collab-recent {
    margin: 0 0 8px;
    color: var(--iws-text-muted);
    font-size: 0.75rem;
}

.collab-claim {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 0 6px;
    border-radius: 9px;
    background: var(--iws-info-bg);
    color: var(--iws-heading);
    font-size: 0.6875rem;
    white-space: nowrap;
}

.collab-claim.is-mine {
    background: var(--iws-success-bg);
    color: var(--iws-success-text);
}

.collab-diff-row {
    display: grid;
    grid-template-columns: 8rem 1fr 1fr;
    gap: 12px;
    padding: 4px 0;
}

/* ------------------------------------------------------------------ Forms (forms-v3) */

/* The action row sits on the folder row's columns: the button on the caption's, the search on the folder box's. */
.settings-action-row .forms-add {
    width: 7.5rem;
    flex: none;
}

.forms-search {
    width: 22rem;
    max-width: 100%;
    flex: none;
}

.forms-search .dxbl-text-edit {
    width: 100%;
}

.forms-cell-main {
    display: block;
}

.forms-cell-sub {
    display: block;
    font-size: 0.72rem;
    color: var(--medq-gray-700);
}

.forms-cell-warn {
    color: var(--iws-danger, #b42318);
}

.forms-muted {
    color: var(--medq-gray-700);
    font-size: 0.75rem;
}

.forms-tag {
    display: inline-block;
    padding: 0 6px;
    margin: 1px 2px 1px 0;
    border-radius: 9px;
    background: var(--medq-gray-50);
    border: 1px solid var(--iws-brand-faint);
    font-size: 0.7rem;
    white-space: nowrap;
}

.forms-tag--token {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    background: var(--iws-info-bg);
}

.forms-state {
    display: inline-block;
    padding: 0 8px;
    border-radius: 9px;
    background: var(--medq-gray-50);
    font-size: 0.72rem;
}

.forms-state--ok {
    background: var(--iws-success-bg);
    color: var(--iws-success-text);
}

.forms-state--wait {
    background: var(--iws-warning-bg, #fff4e0);
    color: var(--iws-warning-text, #8a5300);
}

.forms-dlg {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 10px 32px;
}

.forms-dlg__col,
.forms-dlg__stack {
    display: grid;
    gap: 10px;
    align-content: start;
    min-width: 0;
}

/* forms-v3 `.sect`: a small uppercase caption on a rule, not a heading. */
.forms-dlg__sect {
    font-weight: 700;
    font-size: 0.66rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--iws-text-faint);
    border-bottom: 1px solid var(--iws-border-subtle);
    padding-bottom: 3px;
    margin-top: 4px;
}

/* The mockup's ticks sit a line apart: the theme's padding around each check box and list item
   (8px and 6px at Medium) is what spread them. */
.forms-dlg .dxbl-checkbox {
    --dxbl-checkbox-padding-m: 0.0625rem 0;
    --dxbl-checkbox-padding-s: 0.0625rem 0;
}

/* A list of ticks draws its rows as `ul > li`, padded by `item-padding-y`; `item-cell-padding-y` is
   the table layout's. The render container declares both again, so it is named too. */
.forms-dlg .forms-checklist,
.forms-dlg .forms-checklist .dxbl-list-box-render-container {
    --dxbl-list-box-item-padding-y-m: 0;
    --dxbl-list-box-item-padding-y-s: 0;
    --dxbl-list-box-item-cell-padding-y-m: 0;
    --dxbl-list-box-item-cell-padding-y-s: 0;
    --dxbl-list-box-item-multi-selected-bg: transparent;
    --dxbl-list-box-item-multi-selected-color: inherit;
    --dxbl-list-box-item-selected-bg: transparent;
}

/* A ticked item reads as a tag, as `.chklist .ck:has(.cbx.on) .t` draws it. */
.forms-dlg .forms-checklist .dxbl-list-box-item-selected .dxbl-list-box-item-text {
    background: var(--iws-info-bg);
    color: var(--iws-heading);
    border-radius: 3px;
    padding: 0 6px;
}

.forms-dlg__ident {
    display: grid;
    grid-template-columns: 52px 150px 1fr;
    gap: 10px;
}

.forms-dlg__two {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 10px 16px;
    align-items: start;
}

.forms-dlg .form-field {
    gap: 0.25rem;
}

.forms-dlg .form-field > label {
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--iws-text);
}

.forms-pair,
.forms-inline {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    font-size: 0.8rem;
}

.forms-checks {
    display: grid;
    gap: 2px;
    justify-items: start;
    font-size: 0.8rem;
}

.forms-indent {
    margin-left: 18px;
}

.forms-months {
    width: 3.5rem;
}

.forms-combo {
    width: 180px;
}

.forms-checklist {
    height: 132px;
    font-size: 0.8rem;
}

.forms-checklist--tall {
    height: 140px;
}

.forms-box {
    border: 1px solid var(--iws-border);
    border-radius: 6px;
    overflow: hidden;
    background: var(--iws-surface);
}

.forms-box__scroll {
    max-height: 104px;
    overflow-y: auto;
}

.forms-box__bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    border-top: 1px solid var(--iws-border-subtle);
}

.forms-box__hint {
    margin-left: auto;
    font-size: 0.68rem;
}

.forms-dest-hint {
    margin: 4px 0 2px;
}

.forms-mini {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.78rem;
}

.forms-mini th {
    text-align: left;
    font-weight: 700;
    font-size: 0.72rem;
    color: var(--iws-heading);
    background: var(--iws-tint);
    padding: 6px 8px;
    border-bottom: 1px solid var(--iws-border-subtle);
    white-space: nowrap;
}

.forms-mini td {
    padding: 4px 8px;
    border-bottom: 1px solid var(--iws-border-subtle);
    vertical-align: middle;
}

.forms-mini tbody tr:last-child td {
    border-bottom: 0;
}

.forms-mini__n { width: 28px; }
.forms-mini__order { width: 64px; white-space: nowrap; }
.forms-mini__x { width: 30px; text-align: right; }
.forms-mini__code { width: 62px; }
.forms-mini__type { width: 110px; }
.forms-mini__copies { width: 76px; }

.forms-mini td.forms-mini__empty {
    color: var(--iws-text-secondary);
    text-align: center;
    padding: 14px 8px;
}

.forms-picker {
    display: grid;
    gap: 4px;
    padding: 6px;
    border-top: 1px solid var(--iws-brand-faint);
    background: var(--iws-surface-subtle);
}

.forms-picker__list {
    display: grid;
    gap: 2px;
    max-height: 140px;
    overflow-y: auto;
    font-size: 0.78rem;
}

.forms-picker__foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.forms-adder {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 6px;
    border-top: 1px solid var(--iws-brand-faint);
}

.forms-adder__input {
    flex: 1;
    min-width: 0;
}

/* Chart rail · Forms block (forms-v3 case 3) */
/* The theme's stylesheet is added after this one, so these outrank `.dxbl-tabs` / `.dxbl-btn` by weight. */
.rail-block .dxbl-tabs.forms-rail-tabs {
    margin-top: 4px;
    --dxbl-tabs-tab-padding-x-s: 8px;
    --dxbl-tabs-tab-padding-y-s: 3px;
    --dxbl-tabs-tab-font-size-s: 0.72rem;
    --dxbl-tabs-tab-line-height-s: 1rem;
    --dxbl-tabs-tab-border-offset-x-s: 0px;
    --dxbl-tabs-tab-color: var(--medq-gray-700);
    --dxbl-tabs-tab-active-color: var(--iws-heading);
    --dxbl-tabs-tab-active-bg: var(--iws-heading);
}

.forms-rail-count {
    display: inline-block;
    margin-left: 4px;
    padding: 0 5px;
    border-radius: 8px;
    background: var(--iws-info-bg);
    color: var(--iws-link);
    font-size: 0.6rem;
    font-weight: 700;
    line-height: 0.95rem;
}

.rail-block .rail-mini.forms-rail {
    width: 100%;
    font-size: 0.72rem;
}

/* forms-v3 `.g`: title-case headings on the tint, 6px 8px cells — not the rail's uppercase captions. */
.rail-block .rail-mini.forms-rail thead th {
    padding: 6px 8px;
    border-bottom: 1px solid var(--iws-border-subtle);
    background: var(--iws-tint);
    color: var(--iws-heading);
    font-size: 0.66rem;
    line-height: 1.2;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: none;
    white-space: nowrap;
}

.rail-block .rail-mini.forms-rail tbody td {
    padding: 6px 8px;
    color: var(--iws-text);
    vertical-align: middle;
}

.forms-rail-name {
    font-weight: 700;
}

.forms-rail-sub {
    margin-top: 1px;
    color: var(--medq-gray-700);
    font-size: 0.63rem;
    font-weight: 400;
    white-space: normal;
}

/* The Forms block's Print… pop-up (FO-11): a form's own printer reads "Print to PDF (default)", the mark
   dimmer, in the list and in its chip; a line sets Local printer apart under the server printers. */
.forms-print-default {
    margin-left: 0.3em;
    color: var(--iws-text-muted);
    font-weight: 400;
}

.forms-print-list li:has(.forms-print-row--local),
.forms-print-list [role="option"]:has(.forms-print-row--local) {
    border-top: 1px solid var(--iws-border);
}

.form-field.forms-ask-copies {
    margin-top: 12px;
}

.forms-rail .forms-state {
    display: inline-block;
    min-height: 18px;
    padding: 2px 7px;
    box-sizing: border-box;
    font-size: 0.6rem;
    font-weight: 700;
    line-height: 14px;
    white-space: normal;
}

/* Form takes most of the row, State a set 6rem, the actions their own width (MAUI: 3* / 2* / Auto).
   A State hugging its chip held the column open at the chip's one-line width (*Saved v1 · emailed
   16:03*) on every row and left the form name a word per line; the chip and the line under it wrap
   inside the column instead. The State heading wraps too. */
.rail-block .rail-mini.forms-rail .forms-rail-state {
    width: 6rem;
}

.rail-block .rail-mini.forms-rail thead th.forms-rail-state {
    white-space: normal;
}

.rail-block .rail-mini.forms-rail tbody td.forms-rail-state {
    overflow-wrap: anywhere;
}

/* A name breaks between words; only a word wider than the column is broken. */
.rail-block .rail-mini.forms-rail tbody td.rail-mini-fill {
    overflow-wrap: break-word;
}

.rail-block .rail-mini.forms-rail .forms-rail-actions {
    width: 1%;
}

.rail-block .rail-mini.forms-rail tbody td.forms-rail-actions {
    white-space: nowrap;
    text-align: right;
    overflow: visible;
}

.rail-block .forms-rail-actions .dxbl-btn {
    --dxbl-btn-padding-x-s: 8px;
    --dxbl-btn-padding-y-s: 2px;
    --dxbl-btn-font-size-s: 0.66rem;
    --dxbl-btn-line-height-s: 16px;
    --dxbl-btn-primary-bg: var(--iws-accent);
    --dxbl-btn-primary-border-color: var(--iws-accent);
    --dxbl-btn-primary-color: var(--iws-text-on-accent);
    --dxbl-btn-primary-hover-bg: var(--iws-accent-hover);
    --dxbl-btn-primary-hover-border-color: var(--iws-accent-hover);
    --dxbl-btn-primary-active-bg: var(--iws-accent-hover);
    --dxbl-btn-primary-active-border-color: var(--iws-accent-hover);
    --dxbl-btn-secondary-bg: var(--iws-surface);
    --dxbl-btn-secondary-color: var(--iws-heading);
    --dxbl-btn-secondary-border-color: var(--iws-border);
    --dxbl-btn-secondary-separator-border-color: var(--iws-border);
    --dxbl-btn-secondary-hover-bg: var(--iws-tint);
    --dxbl-btn-secondary-hover-border-color: var(--iws-border);
    font-weight: 500;
}

.forms-rail-actions .dxbl-btn,
.forms-rail-actions .dxbl-btn-split {
    margin-left: 4px;
}

.forms-rail-actions .dxbl-btn-split .dxbl-btn {
    margin-left: 0;
}

.rail-block .rail-block-empty.is-error {
    color: var(--iws-danger-text);
}

.rail-link.is-danger {
    color: var(--iws-danger-text);
}

/* Form dialog (forms-v3 cases 5 and 6) */
/* The frame's body is a flex column with a min-height, so the form grows into it; a percentage height
   would resolve against nothing. */
.forms-open {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    gap: 6px;
    min-height: 0;
}

.forms-open__banner {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 10px;
    border-radius: 4px;
    background: var(--iws-warning-bg, #fff4e0);
    color: var(--iws-warning-text, #8a5300);
    font-size: 0.78rem;
}

.forms-open__warn {
    font-weight: 600;
}

.forms-open__error {
    margin: 0;
    color: var(--iws-danger-text);
    font-size: 0.78rem;
}

.forms-open__notice {
    color: var(--iws-success-text);
    font-size: 0.78rem;
}

/* The loader and the viewer are pinned to the box rather than given 100%, which only fills a parent
   whose height is set; this one's comes from growing. */
.forms-open__viewer {
    position: relative;
    flex: 1 1 auto;
    min-height: 320px;
    border: 1px solid var(--iws-border-subtle);
}

.forms-open__viewer > * {
    position: absolute;
    inset: 0;
}

.forms-open__viewer > .page-loader {
    min-height: 0;
}

/* The viewer's side panel holds only Search, opened by the toolbar's search button, so its strip of
   tab buttons is not drawn while the panel is shut. The viewer sizes the page from the strip's
   visible width, so the page takes the room. The panel's wrapper keeps its left shadow and border
   while shut, which would draw a band down the page's right edge, so they go with the strip. */
.forms-open__viewer .dxrd-designer-wrapper .dx-tab-panel-collapsed .dxrd-right-tabs {
    display: none;
}

.forms-open__viewer .dxrd-designer-wrapper .dxrd-tab-panel-wrapper.dx-tab-panel-collapsed.dx-shadow.dx-shadow-right,
.forms-open__viewer .dxrd-designer-wrapper .dx-tab-panel-collapsed .dxrd-tab-panel-wrapper.dx-shadow.dx-shadow-right {
    box-shadow: none;
    border-color: transparent;
}

/* The attachments rail's PDF viewer: a 30px toolbar, 3px round each button instead of the viewer's
   16px, and a 24px button round a 20px icon instead of 32px round 24px, so the page keeps the rail's
   height (Marius, 2026-11-10: "can we make them 3-5 px?"). The viewer's script puts the page area
   84px down, inline, for its own 68px toolbar, so the offset is overridden to sit under this one; the
   page fit is measured from that same offset, so the page takes the room back. The result-document
   and chart-notes viewer (.iws-pdf-viewer) is the same control and looks the same (CN-1). */
.attachment-preview .dx-blazor-reporting .dxrd-preview.dxrd-designer-wrapper .dxrd-toolbar-wrapper,
.attachment-preview .dx-blazor-reporting .dxrd-preview.dxrd-designer-wrapper .dxrd-toolbar-wrapper .dxrd-toolbar,
.iws-pdf-viewer .dx-blazor-reporting .dxrd-preview.dxrd-designer-wrapper .dxrd-toolbar-wrapper,
.iws-pdf-viewer .dx-blazor-reporting .dxrd-preview.dxrd-designer-wrapper .dxrd-toolbar-wrapper .dxrd-toolbar {
    height: 30px;
}

.attachment-preview .dx-blazor-reporting .dxrd-preview.dxrd-designer-wrapper .dxrd-preview-wrapper,
.iws-pdf-viewer .dx-blazor-reporting .dxrd-preview.dxrd-designer-wrapper .dxrd-preview-wrapper {
    top: 30px !important;
}

/* "Creating the document…" in the middle of the page area rather than its bottom-left corner, where
   it sat under the fold of a short preview. The viewer places it inline, hence the !important. */
.attachment-preview .dx-blazor-reporting .dxrd-preview.dxrd-designer-wrapper .dxrd-preview-wrapper .dxrd-preview-progress,
.iws-pdf-viewer .dx-blazor-reporting .dxrd-preview.dxrd-designer-wrapper .dxrd-preview-wrapper .dxrd-preview-progress {
    top: 50% !important;
    bottom: auto !important;
    left: 50% !important;
    right: auto !important;
    transform: translate(-50%, -50%);
}

/* A PDF the client just sent (a result document, chart notes) is a few pages, built in a moment: the
   page's own "Loading…" is its one sign of work, without the progress box and its Cancel over it (CN-9). */
.iws-pdf-viewer .dx-blazor-reporting .dxrd-preview.dxrd-designer-wrapper .dxrd-preview-wrapper .dxrd-preview-progress {
    display: none !important;
}

.attachment-preview .dx-blazor-reporting .dxrd-preview.dxrd-designer-wrapper .dxrd-toolbar-wrapper .dxrd-toolbar .dxrd-toolbar-item,
.attachment-preview .dx-blazor-reporting .dxrd-preview.dxrd-designer-wrapper .dxrd-toolbar-wrapper .dxrd-toolbar .dxrd-toolbar-item-zoom,
.iws-pdf-viewer .dx-blazor-reporting .dxrd-preview.dxrd-designer-wrapper .dxrd-toolbar-wrapper .dxrd-toolbar .dxrd-toolbar-item,
.iws-pdf-viewer .dx-blazor-reporting .dxrd-preview.dxrd-designer-wrapper .dxrd-toolbar-wrapper .dxrd-toolbar .dxrd-toolbar-item-zoom {
    padding: 3px;
}

.attachment-preview .dx-blazor-reporting .dxrd-preview.dxrd-designer-wrapper .dxrd-toolbar-wrapper .dxrd-toolbar .dxrd-toolbar-item .dxrd-toolbar-item-image,
.iws-pdf-viewer .dx-blazor-reporting .dxrd-preview.dxrd-designer-wrapper .dxrd-toolbar-wrapper .dxrd-toolbar .dxrd-toolbar-item .dxrd-toolbar-item-image {
    width: 24px;
    height: 24px;
}

.attachment-preview .dx-blazor-reporting .dxrd-preview.dxrd-designer-wrapper .dxrd-toolbar-wrapper .dxrd-toolbar .dxrd-toolbar-item .dxrd-toolbar-item-image svg,
.iws-pdf-viewer .dx-blazor-reporting .dxrd-preview.dxrd-designer-wrapper .dxrd-toolbar-wrapper .dxrd-toolbar .dxrd-toolbar-item .dxrd-toolbar-item-image svg {
    width: 20px;
    height: 20px;
}

.attachment-preview .dx-blazor-reporting .dxrd-preview.dxrd-designer-wrapper .dxrd-toolbar-wrapper .dxrd-toolbar .dxrd-toolbar-item-separator,
.iws-pdf-viewer .dx-blazor-reporting .dxrd-preview.dxrd-designer-wrapper .dxrd-toolbar-wrapper .dxrd-toolbar .dxrd-toolbar-item-separator {
    top: 3px;
    height: 24px;
}

/* The JavaScript-based document viewer ships one light colour scheme of fixed colours and reads no
   theme variables, so its palette classes and the DevExtreme widgets inside it are pointed at the
   shell's roles here: it is dark when the shell is dark. Each rule repeats the shipped selector under
   html, one step more specific. The printed page keeps its own white. */
html .dx-blazor-reporting .dx-designer-viewport .dxd-back-primary2,
html .dx-blazor-reporting .dx-designer-viewport .dxd-back-primary2-invariant {
    background-color: var(--iws-surface);
}

html .dx-blazor-reporting .dx-designer-viewport .dxd-back-primary,
html .dx-blazor-reporting .dx-designer-viewport .dxd-back-secondary-invariant {
    background-color: var(--iws-surface-subtle);
}

html .dx-blazor-reporting .dx-designer-viewport .dxd-back-secondary,
html .dx-blazor-reporting .dx-designer-viewport .dxd-back-primary-invariant {
    background-color: var(--iws-surface-sunken);
}

html .dx-blazor-reporting .dx-designer-viewport .dxd-back-highlighted:hover:not(.dxd-state-no-hover),
html .dx-blazor-reporting .dx-designer-viewport .dxd-back-highlighted.dxd-state-normal:hover:not(.dxd-state-no-hover),
html .dx-blazor-reporting .dx-designer-viewport .dxd-back-primary .dxd-back-highlighted:hover:not(.dxd-state-no-hover) {
    background-color: var(--iws-hover);
}

html .dx-blazor-reporting .dx-designer-viewport .dxd-back-highlighted.dxd-state-selected,
html .dx-blazor-reporting .dx-designer-viewport .dxd-back-highlighted.dxd-state-selected:hover {
    background-color: var(--iws-selected);
}

html .dx-blazor-reporting .dx-designer-viewport .dxd-back-highlighted.dxd-state-active {
    background-color: var(--iws-selected-strong);
}

html .dx-blazor-reporting .dx-designer-viewport .dxd-back-accented {
    background-color: var(--iws-accent);
}

html .dx-blazor-reporting .dx-designer-viewport .dxd-border-primary {
    border-color: var(--iws-border-subtle);
}

html .dx-blazor-reporting .dx-designer-viewport .dxd-border-secondary {
    border-color: var(--iws-border);
}

html .dx-blazor-reporting .dx-designer-viewport .dxd-border-accented {
    border-color: var(--iws-accent);
}

html .dx-blazor-reporting .dx-designer-viewport .dxd-text-primary {
    color: var(--iws-text);
}

html .dx-blazor-reporting .dx-designer-viewport .dxd-text-info {
    color: var(--iws-text-secondary);
}

html .dx-blazor-reporting .dx-designer-viewport .dxd-text-accented {
    color: var(--iws-link);
}

html .dx-blazor-reporting .dx-designer-viewport .dxd-icon-fill {
    fill: var(--iws-text-secondary);
}

html .dx-blazor-reporting .dx-designer-viewport .dxd-icon-accented .dxd-icon-fill,
html .dx-blazor-reporting .dx-designer-viewport .dxd-icon-highlighted:hover .dxd-icon-fill {
    fill: var(--iws-link);
}

html .dx-blazor-reporting .dx-widget,
html .dx-blazor-reporting .dx-menu-base,
html .dx-blazor-reporting .dx-menu,
html .dx-blazor-reporting .dx-menu-item,
html .dx-blazor-reporting .dx-popup-bottom,
html .dx-blazor-reporting .dx-texteditor-input,
html .dx-blazor-reporting .dx-dropdowneditor-icon,
html .dx-blazor-reporting .dx-list-item-chevron {
    color: var(--iws-text);
}

html .dx-blazor-reporting .dx-toolbar,
html .dx-blazor-reporting .dx-toolbar-background {
    background-color: var(--iws-surface);
    color: var(--iws-text);
}

html .dx-blazor-reporting .dx-button-mode-text,
html .dx-blazor-reporting .dx-button-mode-text .dx-icon,
html .dx-blazor-reporting .dx-button-mode-contained .dx-icon,
html .dx-blazor-reporting .dx-toolbar-menu-section .dx-toolbar-hidden-button .dx-button,
html .dx-blazor-reporting .dx-toolbar-menu-section .dx-toolbar-hidden-button .dx-button .dx-icon {
    color: var(--iws-text);
}

html .dx-blazor-reporting .dx-button-mode-text.dx-state-hover,
html .dx-blazor-reporting .dx-button-mode-text.dx-state-focused,
html .dx-blazor-reporting .dx-button-mode-contained.dx-state-hover {
    background-color: var(--iws-hover);
}

html .dx-blazor-reporting .dx-button-mode-text.dx-state-active,
html .dx-blazor-reporting .dx-button-mode-text.dx-state-selected,
html .dx-blazor-reporting .dx-button-mode-contained.dx-state-focused,
html .dx-blazor-reporting .dx-button-mode-contained.dx-state-active,
html .dx-blazor-reporting .dx-button-mode-contained.dx-state-selected,
html .dx-blazor-reporting .dx-toolbar-menu-section .dx-toolbar-hidden-button .dx-button.dx-state-selected {
    background-color: var(--iws-selected);
    color: var(--iws-text);
}

html .dx-blazor-reporting .dx-button-mode-contained {
    background-color: var(--iws-surface);
    border-color: var(--iws-border);
    color: var(--iws-text);
}

html .dx-blazor-reporting .dx-texteditor.dx-editor-outlined {
    background: var(--iws-surface);
    border: 1px solid var(--iws-border);
}

html .dx-blazor-reporting .dx-texteditor.dx-editor-underlined {
    border-bottom: 1px solid var(--iws-border);
}

html .dx-blazor-reporting .dx-texteditor.dx-state-hover {
    border-color: var(--iws-border-strong);
}

html .dx-blazor-reporting .dx-texteditor.dx-state-focused,
html .dx-blazor-reporting .dx-texteditor.dx-state-active.dx-editor-outlined {
    border-color: var(--iws-focus);
}

html .dx-blazor-reporting .dx-placeholder {
    color: var(--iws-text-faint);
}

html .dx-blazor-reporting .dx-texteditor-label {
    color: var(--iws-text-muted);
}

html .dx-blazor-reporting .dx-popup-wrapper > .dx-overlay-content,
html .dx-blazor-reporting .dx-tooltip-wrapper .dx-overlay-content,
html .dx-blazor-reporting .dx-loadpanel-content {
    background: var(--iws-surface);
    border: 1px solid var(--iws-border);
    color: var(--iws-text);
}

html .dx-blazor-reporting .dx-tooltip-wrapper.dx-popover-wrapper .dx-popover-arrow:after {
    background: var(--iws-surface);
    border: 1px solid var(--iws-border);
}

html .dx-blazor-reporting .dx-popup-title {
    border-bottom: 1px solid var(--iws-border);
    color: var(--iws-text);
}

html .dx-blazor-reporting .dx-list .dx-empty-message,
html .dx-blazor-reporting .dx-list-item {
    border-top: 1px solid var(--iws-border-subtle);
    color: var(--iws-text);
}

html .dx-blazor-reporting .dx-list:not(.dx-list-select-decorator-enabled) .dx-list-item.dx-state-hover,
html .dx-blazor-reporting .dx-menu-item.dx-state-hover {
    background-color: var(--iws-hover);
    color: var(--iws-text);
}

html .dx-blazor-reporting .dx-list:not(.dx-list-select-decorator-enabled) .dx-list-item.dx-list-item-selected,
html .dx-blazor-reporting .dx-list:not(.dx-list-select-decorator-enabled) .dx-list-item.dx-list-item-selected.dx-state-hover:not(.dx-state-focused),
html .dx-blazor-reporting .dx-menu-item-selected {
    background-color: var(--iws-selected);
    color: var(--iws-text);
}

html .dx-blazor-reporting .dx-list:not(.dx-list-select-decorator-enabled) .dx-list-item.dx-state-focused,
html .dx-blazor-reporting .dx-list:not(.dx-list-select-decorator-enabled) .dx-list-item.dx-state-focused.dx-list-item-selected,
html .dx-blazor-reporting .dx-list:not(.dx-list-select-decorator-enabled) .dx-list-item.dx-state-active {
    background-color: var(--iws-accent);
    color: var(--iws-text-on-accent);
}

html .dx-blazor-reporting .dx-menu-item-expanded,
html .dx-blazor-reporting .dx-menu .dx-menu-item-expanded,
html .dx-blazor-reporting .dx-menu-adaptive-mode {
    background-color: var(--iws-surface);
    color: var(--iws-text);
}

html .dx-blazor-reporting .dx-checkbox-icon {
    background-color: var(--iws-surface);
    border: 1px solid var(--iws-border-strong);
}

html .dx-blazor-reporting .dx-checkbox-checked .dx-checkbox-icon {
    color: var(--iws-accent);
}

html .dx-blazor-reporting .dx-scrollbar-hoverable.dx-scrollable-scrollbar-active .dx-scrollable-scroll-content {
    background-color: var(--iws-border-strong);
}

html .dx-blazor-reporting .dx-tabs-wrapper,
html .dx-blazor-reporting .dx-tab,
html .dx-blazor-reporting .dx-tabs-nav-button {
    background-color: var(--iws-surface-subtle);
    border-color: var(--iws-border);
    color: var(--iws-text);
}

html .dx-blazor-reporting .dx-tab.dx-tab-selected {
    background-color: var(--iws-surface);
    color: var(--iws-text);
}

html .dx-blazor-reporting .dx-tab .dx-tab-text,
html .dx-blazor-reporting .dx-tab .dx-icon,
html .dx-blazor-reporting .dx-tab.dx-tab-selected .dx-icon,
html .dx-blazor-reporting .dx-tab.dx-tab-selected .dx-tab-text {
    color: var(--iws-text);
}

.forms-open__foot {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
}

.forms-open__foot .rail-link {
    margin-top: 0;
}

.forms-open__note {
    flex: 1;
    color: var(--iws-text-secondary);
    font-size: 0.72rem;
}

/* Discard draft and Private on the left, the buttons on the right. */
.forms-open__gap {
    flex: 1;
}

/* FO-12: the printer Print sends to, beside Private. */
.forms-open__default {
    flex: 0 1 auto;
    min-width: 0;
    overflow: hidden;
    color: var(--iws-text-secondary);
    font-size: 0.78rem;
    white-space: nowrap;
    text-overflow: ellipsis;
}

/* Attach to patient (forms-v3 case 7) */
/* Grows with a resized dialog, the preview with it (pinned like the viewer above). */
.forms-attach {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 14px;
    flex: 1 1 auto;
    min-height: 440px;
}

.forms-attach__fields {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.forms-attach__preview {
    position: relative;
    border: 1px solid var(--iws-border-subtle);
    background: var(--medq-gray-50);
}

.forms-attach__preview iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* Forms to send, on a status change (forms-v3 case 4) */
.forms-prompt {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8rem;
}

.forms-prompt th {
    padding: 4px 6px;
    border-bottom: 1px solid var(--iws-border-subtle);
    color: var(--iws-text-faint);
    font-size: 0.66rem;
    font-weight: 400;
    text-align: left;
    text-transform: uppercase;
}

.forms-prompt td {
    padding: 6px;
    border-bottom: 1px solid var(--iws-border-subtle);
    vertical-align: top;
}

.forms-prompt__check {
    width: 28px;
}

.forms-prompt td .dxbl-checkbox {
    display: flex;
    margin-bottom: 2px;
}

/* A typed fax number or email address: its tick, then the box. */
.forms-prompt__typed {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 2px 0;
}

.forms-prompt__typed .dxbl-checkbox {
    margin-bottom: 0;
    white-space: nowrap;
}

/* Ticked, the number or address beside it is required: its caption takes the required look. */
.forms-prompt__typed .field-label--required {
    font-weight: 700;
    color: var(--iws-required-label);
}

.forms-prompt__typed .dxbl-text-edit {
    flex: 1 1 auto;
    max-width: 260px;
}
