/* Import Inter Font from Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');


/* ============================================================================
   PALETTE - "Quiet Shell"

   ONE place where a colour is chosen, and the ONLY place a literal appears.
   Radzen, Bootstrap and every component below resolve through these tokens, so
   the dark theme further down is a pure token flip rather than a second
   stylesheet. If you find yourself adding a hex anywhere else, add a token here
   instead - that is the whole mechanism.

   The shape of the problem this replaced: four unrelated primaries were live at
   once - Radzen's coral (#FF6D41), app.css's indigo (#4F46E5), Bootstrap's blue
   (#0D6EFD) and the menus' plum (#592263) - so which accent a control got
   depended only on which library drew it.

   The rule the palette follows: colour means something. Plum is "you can act on
   this" (buttons, links, selection). Orange is "this needs you" and nothing
   else - deliberately absent from the chrome. Everything structural is a warm
   neutral: greys that share a hue with the accent read as chosen rather than
   inherited, which is why they are red-biased instead of the cool blue-greys
   Radzen and Bootstrap both ship.

   Every foreground/background pair clears WCAG AA in BOTH themes. That was not
   true before: white on Radzen's warning amber measured 1.6:1, on a screen
   showing balances and due dates.

   NAMING, because it is counter-intuitive in dark mode: "-dark" means "the
   hover/pressed direction", not literally darker. On a light ground that is a
   darker shade; on a dark ground it is a LIGHTER one. Radzen's own variables
   are named the same way and expect exactly this.

   THIS IS THE DEFAULT SCHEME, plum. A second scheme is a file in wwwroot\themes
   that gives these same tokens other values and holds nothing else; it is
   linked AFTER this stylesheet when an agency chooses it (ColorSchemeService).
   So the three blocks below are also the complete list of what a scheme sets:
   add a token here and every file in that folder has to say what it is in that
   scheme. ColorSchemeTests fails until it does, and it measures the AA claim
   above for this palette and for each scheme, pair by pair.
   ============================================================================ */
:root {
  /* --- Brand ------------------------------------------------------------- */
  --app-primary:        #592263;   /* plum: actions, links, selection        */
  --app-primary-rgb:    89, 34, 99;
  --app-primary-hover:  #47184F;
  --app-primary-darker: #3E1745;
  --app-primary-light:  #6E2B7B;
  --app-primary-tint:   rgba(89, 34, 99, 0.14);
  --app-primary-soft:   #EBDDEE;   /* selected nav row, selected grid row    */
  --app-primary-softer: #F2ECF3;
  --app-primary-ink:    #4A1B54;   /* text/icon ON a soft plum surface       */
  --app-on-primary:     #FFFFFF;   /* 11.4:1 on --app-primary                */
  --app-on-status:      #FFFFFF;   /* ink on a status FILL; flips in dark    */

  /* Attention. Never chrome, never decoration - only "this needs you".
     #C0431A rather than Radzen's #FF6D41 because white on that measured
     2.8:1; this is 5.2:1. */
  --app-attention:       #C0431A;
  --app-attention-hover: #A5380F;
  --app-attention-soft:  #FBEADF;
  --app-attention-ink:   #8F3212;

  /* --- Surfaces ---------------------------------------------------------- */
  --app-ground:      #F8F6F5;   /* the page behind the cards                 */
  --app-surface:     #FFFFFF;   /* cards, inputs, grid body                  */
  --app-surface-2:   #F2EFED;   /* grid headers, toolbars, inset panels      */
  --app-surface-2-rgb: 242, 239, 237;
  --app-header:      #FFFFFF;   /* the app header bar                        */
  --app-rail:        #F5F2F0;   /* the menu rails                            */
  --app-rail-ink:    #3E3639;
  --app-rail-hover:  #EBE4EC;

  /* Grid rows that carry a meaning (the payment schedule, "Payment Schedule colours" below): a
     point already due, and a closed account or a point already in a processed ACH batch, whose
     text is --app-ink-2. Quiet neutrals with the scheme's own bias, so every scheme restates them.
     The current point is --app-primary-soft with a bar in --app-primary. */
  --app-row-past:    #EFEAED;
  --app-row-closed:  #E3E1E2;

  /* --- Ink and rules ----------------------------------------------------- */
  --app-ink:         #2B2528;
  --app-ink-rgb:     43, 37, 40;
  --app-ink-2:       #6B615F;
  --app-ink-2-rgb:   107, 97, 95;
  /* Tertiary is still TEXT, so it clears 4.5:1 on every surface text sits on, like the two inks
     above. Radzen paints fieldset legends, the calendar's day names, the grid's "drag a column
     header here" hint and every placeholder with it (--rz-text-tertiary-color), and some thirty
     rules of ours use it for captions and hints. It was #8C8286 - 3.7:1 on a card and 3.3:1 on a
     grid header or a pale card ("Collector:", "Plan Start"). The step with no floor is the
     DISABLED one, --app-base-500. */
  --app-ink-3:       #746A6E;
  --app-rule:        #E5DFDC;
  --app-rule-strong: #D6CED1;

  /* The two ends of the neutral ramp Radzen derives from. Named separately
     because they INVERT in dark mode: "the lightest surface" becomes the
     darkest, and "the darkest ink" becomes the lightest. */
  --app-base-50:  #FFFFFF;
  --app-base-400: #D0C8C6;
  --app-base-500: #A79EA1;
  --app-base-900: #1E1A1C;

  /* Quiet Shell has no second accent hue, so a "secondary" action is neutral. */
  --app-neutral:        var(--app-ink-2);
  --app-neutral-rgb:    107, 97, 95;
  --app-neutral-dark:   #574F4D;
  --app-neutral-darker: #443E3C;
  --app-neutral-tint:   rgba(107, 97, 95, 0.16);

  /* --- Status ------------------------------------------------------------
     Success and warning are each a hair deeper than the #2E7D4F and #A85B00 they started as.
     Those cleared 4.5:1 as text on a card and stopped at 4.4:1 on --app-surface-2, which is where a
     .text-success card header ("With your plan" on the customer's My Plan) or a status in a grid
     header sits. The difference cannot be seen; ColorSchemeTests holds all four on surface-2. */
  --app-success: #2D7A4D; --app-success-rgb: 45, 122, 77;
  --app-success-dark: #276B43; --app-success-light: #3E9463;
  --app-success-soft: #E3F2E8; --app-success-ink: #1F5A38;
  --app-success-tint: rgba(45, 122, 77, 0.14);

  --app-warning: #A55900; --app-warning-rgb: 165, 89, 0;
  --app-warning-dark: #8E4D00; --app-warning-light: #C06A00;
  --app-warning-soft: #FDEEDC; --app-warning-ink: #7A4200;
  --app-warning-tint: rgba(165, 89, 0, 0.14);
  /* The yellow of an amount that does not match: money credited to a payment schedule point but
     not applied to it, a pending-payments worksheet that does not add up, a hardship level the
     creditor does not accept (CSGrid's cs-cell-warning). */
  --app-warning-yellow: #FFF4C2; --app-warning-yellow-ink: #5C4700;

  --app-danger: #B3261E; --app-danger-rgb: 179, 38, 30;
  --app-danger-dark: #9A201A; --app-danger-light: #C9332A;
  --app-danger-soft: #FBE4E2; --app-danger-ink: #8A1C16;
  --app-danger-tint: rgba(179, 38, 30, 0.14);
  /* A whole ROW in trouble (a paid point whose payment came back NSF): one step stronger than
     -soft, which marks a cell. */
  --app-danger-strong: #F6CFCB; --app-danger-strong-ink: #6E140F;

  --app-info: #1F6A8C; --app-info-rgb: 31, 106, 140;
  --app-info-dark: #1A5A78; --app-info-light: #2A7EA4;
  --app-info-soft: #E2EFF5; --app-info-ink: #164E67;
  --app-info-tint: rgba(31, 106, 140, 0.14);

  /* --- Duotone icon tones (see the .fa-primary / .fa-secondary rules) ----- */
  --app-icon-1:      #4A3F44;   /* content icons: quiet, warm neutral        */
  --app-icon-2:      #C7BCC2;
  --app-rail-icon-1: #7B4886;   /* rail icons: the one place colour earns it */
  --app-rail-icon-2: #C7BCC2;

  /* --- Chart series (ChartRenderer / ChartPalette) -------------------------
     Eight slots, taken in this order and never by rank: series 1 is the brand
     hue, and every slot stays 40 degrees of hue or more from success, warning,
     attention and danger - a chart must not paint "series 2" in the green that
     means valid, or "series 3" in the red that means failed. Those four are
     spent on a chart only where the series IS that outcome (--app-chart-good /
     -pending / -bad, further down). ChartPaletteTests measures all of it, for
     this palette and for every scheme.
     The lightness is chosen per slot, not per ring: with only cool hues left,
     a colour-blind reader tells the slots apart by lightness first. Slots 5
     and 7 are below 3:1 on the surface on purpose; the legend and the tooltip
     name every mark. */
  --app-chart-1: #733281;   /* plum, the brand hue        8.4:1 */
  --app-chart-2: #028F95;   /* teal                       3.9:1 */
  --app-chart-3: #2760B7;   /* blue                       6.1:1 */
  --app-chart-4: #8F7CE3;   /* lavender                   3.4:1 */
  --app-chart-5: #0AB5E2;   /* cyan                       2.4:1 */
  --app-chart-6: #A13E7E;   /* magenta                    6.0:1 */
  --app-chart-7: #639EFA;   /* sky                        2.7:1 */
  --app-chart-8: #CB6AB2;   /* pink                       3.4:1 */
  /* The interest saved of a repayment comparison (ChartPalette.Saving: the quote summary's and My Plan's charts;
     the token keeps the name it shipped with in 12.0.79, when it drew the plan). Its two companions wear the
     outcome they stand for - the current path --app-chart-bad, the plan --app-chart-good (owner, 2026-12-02:
     "green means the program balances and blue is the interest saved") - so this is the blue that a red-green
     colour-blind reader still tells from both. The plan's green beside the red measured 6.0 apart to a
     deuteranope (a slot needs 8): the legend names every line. ChartPaletteTests measures this blue in every
     scheme. */
  --app-chart-plan: #2760B7;   /* blue, as slot 3          6.1:1 */

  /* --- SQL editor (CSSQLText) ---------------------------------------------
     SSMS's scheme, as the Windows console's CSFastColoredTextBox shows it,
     darkened where SSMS itself misses AA (its #FF00FF and #FF0000 do). The
     ratios are against --app-surface; all still clear AA on --app-surface-2. */
  --app-sql-keyword:     #0000FF;   /* SELECT, FROM, data types        8.6:1 */
  --app-sql-operator:    #6B615F;   /* AND OR NOT NULL JOIN = + <      6.0:1 */
  --app-sql-function:    #A0149F;   /* ISNULL(  GETDATE(  @@ROWCOUNT   6.8:1 */
  --app-sql-string:      #A31515;   /* 'text'                          7.9:1 */
  --app-sql-comment:     #007A00;   /* -- and block comments           5.6:1 */
  --app-sql-variable:    #8A4600;   /* @Result                         7.1:1 */
  --app-sql-bookmark:    #006B6B;   /* {ClientID}                      6.3:1 */
  --app-sql-bookmark-bg: rgba(0, 107, 107, 0.10);
  --app-sql-activeline:  rgba(43, 37, 40, 0.05);
  --app-sql-selection:   rgba(0, 102, 204, 0.25);

  /* --- Geometry and effects ----------------------------------------------
     Two radii, not three. Controls take Radzen's 4px (which the grids and
     dropdowns already use and cannot easily be talked out of); cards take 8px.
     The 12-16px card radius this replaced read as a different product sitting
     next to a 4px dropdown. */
  --app-radius-control: 4px;
  --app-radius-card:    8px;
  --app-focus-ring:     0 0 0 3px rgba(89, 34, 99, 0.22);
  --app-shadow-card:    0 1px 2px rgba(43, 37, 40, 0.06), 0 8px 24px -16px rgba(43, 37, 40, 0.28);
  --app-shadow-hover:   0 2px 4px rgba(43, 37, 40, 0.08), 0 12px 28px -14px rgba(43, 37, 40, 0.34);
}

/* ============================================================================
   DARK THEME

   Redefines the tokens above and NOTHING else. Everything downstream - Radzen,
   Bootstrap, the menu rails, the workspace - resolves through var(), so this
   block is the entire theme.

   THREE states, not two, and the structure matters:
   - the bare :root above is the complete LIGHT palette;
   - the media query covers the default "system" setting, where the server
     stamps no attribute at all and only prefers-color-scheme separates the two.
     It is guarded :not([data-theme="light"]) so an explicit light choice still
     beats a dark OS;
   - [data-theme="dark"] repeats it so an explicit dark choice beats a light OS.

   The attribute is stamped on <html> during SSR from the icco_theme cookie, so
   the first byte of HTML already carries the right theme and there is no flash
   of the wrong one. A cookie rather than localStorage precisely because the
   server can read it; see Components/App.razor.

   The plum inverts rather than dims: #592263 on a dark ground is unreadable
   (1.4:1), so dark uses #C79BD4 at 8.1:1 and flips --app-on-primary to a dark
   ink for text sitting ON that fill.
   ============================================================================ */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --app-primary:        #C79BD4;
    --app-primary-rgb:    199, 155, 212;
    --app-primary-hover:  #D9B6E2;
    --app-primary-darker: #E4CBEB;
    --app-primary-light:  #B387C0;
    --app-primary-tint:   rgba(199, 155, 212, 0.18);
    --app-primary-soft:   #3A2A40;
    --app-primary-softer: #2B2130;
    --app-primary-ink:    #E7D3EC;
    --app-on-primary:     #2A1330;
    --app-on-status:      #1A1416;

    --app-attention:       #F0834F;
    --app-attention-hover: #FF9A6B;
    --app-attention-soft:  #3A2419;
    --app-attention-ink:   #FFC3A3;

    --app-ground:      #161415;
    --app-surface:     #1F1C1E;
    --app-surface-2:   #272325;
    --app-surface-2-rgb: 39, 35, 37;
    --app-header:      #1F1C1E;
    --app-rail:        #221E20;
    --app-rail-ink:    #D6CFD2;
    --app-rail-hover:  #2E2830;

    --app-row-past:    #292427;
    --app-row-closed:  #2E2B2D;

    --app-ink:         #EAE6E7;
    --app-ink-rgb:     234, 230, 231;
    --app-ink-2:       #A9A1A4;
    --app-ink-2-rgb:   169, 161, 164;
    --app-ink-3:       #91898C;
    --app-rule:        #332E31;
    --app-rule-strong: #453E42;

    --app-base-50:  #1F1C1E;
    --app-base-400: #4A4347;
    --app-base-500: #6E6669;
    --app-base-900: #F5F1F2;

    --app-neutral:        #A9A1A4;
    --app-neutral-rgb:    169, 161, 164;
    --app-neutral-dark:   #BDB5B8;
    --app-neutral-darker: #D2CBCE;
    --app-neutral-tint:   rgba(169, 161, 164, 0.18);

    --app-success: #5FBF85; --app-success-rgb: 95, 191, 133;
    --app-success-dark: #7CCF9C; --app-success-light: #4EA972;
    --app-success-soft: #16301F; --app-success-ink: #A6E0BC;
    --app-success-tint: rgba(95, 191, 133, 0.18);

    --app-warning: #E3A551; --app-warning-rgb: 227, 165, 81;
    --app-warning-dark: #EFBA74; --app-warning-light: #C98F42;
    --app-warning-soft: #33260F; --app-warning-ink: #F0CB93;
    --app-warning-tint: rgba(227, 165, 81, 0.18);
    --app-warning-yellow: #332C0E; --app-warning-yellow-ink: #F2DC8C;

    --app-danger: #FF8A80; --app-danger-rgb: 255, 138, 128;
    --app-danger-dark: #FFA9A1; --app-danger-light: #E0776E;
    --app-danger-soft: #3A1A18; --app-danger-ink: #FFB3AC;
    --app-danger-tint: rgba(255, 138, 128, 0.18);
    --app-danger-strong: #4A1D1A; --app-danger-strong-ink: #FFC9C2;

    --app-info: #6BB6D8; --app-info-rgb: 107, 182, 216;
    --app-info-dark: #8CC8E3; --app-info-light: #559FC0;
    --app-info-soft: #142A33; --app-info-ink: #A9D6EA;
    --app-info-tint: rgba(107, 182, 216, 0.18);

    --app-icon-1:      #B9AFB4;
    --app-icon-2:      #5A5054;
    --app-rail-icon-1: #C79BD4;
    --app-rail-icon-2: #5F5266;

    --app-chart-1: #C480D4;
    --app-chart-2: #0B959B;
    --app-chart-3: #83C0FF;
    --app-chart-4: #6363C6;
    --app-chart-5: #0FC5CD;
    --app-chart-6: #A04C9A;
    --app-chart-7: #4882DC;
    --app-chart-8: #FD91D2;
    --app-chart-plan: #83C0FF;

    --app-sql-keyword:     #569CD6;
    --app-sql-operator:    #A9A1A4;
    --app-sql-function:    #D7A6E8;
    --app-sql-string:      #CE9178;
    --app-sql-comment:     #6FA85A;
    --app-sql-variable:    #D7BA7D;
    --app-sql-bookmark:    #4EC9B0;
    --app-sql-bookmark-bg: rgba(78, 201, 176, 0.14);
    --app-sql-activeline:  rgba(255, 255, 255, 0.05);
    --app-sql-selection:   rgba(100, 160, 230, 0.35);

    --app-focus-ring:   0 0 0 3px rgba(199, 155, 212, 0.30);
    --app-shadow-card:  0 1px 2px rgba(0, 0, 0, 0.50), 0 8px 24px -16px rgba(0, 0, 0, 0.80);
    --app-shadow-hover: 0 2px 4px rgba(0, 0, 0, 0.55), 0 12px 28px -14px rgba(0, 0, 0, 0.85);

    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --app-primary:        #C79BD4;
  --app-primary-rgb:    199, 155, 212;
  --app-primary-hover:  #D9B6E2;
  --app-primary-darker: #E4CBEB;
  --app-primary-light:  #B387C0;
  --app-primary-tint:   rgba(199, 155, 212, 0.18);
  --app-primary-soft:   #3A2A40;
  --app-primary-softer: #2B2130;
  --app-primary-ink:    #E7D3EC;
  --app-on-primary:     #2A1330;
  --app-on-status:      #1A1416;

  --app-attention:       #F0834F;
  --app-attention-hover: #FF9A6B;
  --app-attention-soft:  #3A2419;
  --app-attention-ink:   #FFC3A3;

  --app-ground:      #161415;
  --app-surface:     #1F1C1E;
  --app-surface-2:   #272325;
  --app-surface-2-rgb: 39, 35, 37;
  --app-header:      #1F1C1E;
  --app-rail:        #221E20;
  --app-rail-ink:    #D6CFD2;
  --app-rail-hover:  #2E2830;

  --app-row-past:    #292427;
  --app-row-closed:  #2E2B2D;

  --app-ink:         #EAE6E7;
  --app-ink-rgb:     234, 230, 231;
  --app-ink-2:       #A9A1A4;
  --app-ink-2-rgb:   169, 161, 164;
  --app-ink-3:       #91898C;
  --app-rule:        #332E31;
  --app-rule-strong: #453E42;

  --app-base-50:  #1F1C1E;
  --app-base-400: #4A4347;
  --app-base-500: #6E6669;
  --app-base-900: #F5F1F2;

  --app-neutral:        #A9A1A4;
  --app-neutral-rgb:    169, 161, 164;
  --app-neutral-dark:   #BDB5B8;
  --app-neutral-darker: #D2CBCE;
  --app-neutral-tint:   rgba(169, 161, 164, 0.18);

  --app-success: #5FBF85; --app-success-rgb: 95, 191, 133;
  --app-success-dark: #7CCF9C; --app-success-light: #4EA972;
  --app-success-soft: #16301F; --app-success-ink: #A6E0BC;
  --app-success-tint: rgba(95, 191, 133, 0.18);

  --app-warning: #E3A551; --app-warning-rgb: 227, 165, 81;
  --app-warning-dark: #EFBA74; --app-warning-light: #C98F42;
  --app-warning-soft: #33260F; --app-warning-ink: #F0CB93;
  --app-warning-tint: rgba(227, 165, 81, 0.18);
  --app-warning-yellow: #332C0E; --app-warning-yellow-ink: #F2DC8C;

  --app-danger: #FF8A80; --app-danger-rgb: 255, 138, 128;
  --app-danger-dark: #FFA9A1; --app-danger-light: #E0776E;
  --app-danger-soft: #3A1A18; --app-danger-ink: #FFB3AC;
  --app-danger-tint: rgba(255, 138, 128, 0.18);
  --app-danger-strong: #4A1D1A; --app-danger-strong-ink: #FFC9C2;

  --app-info: #6BB6D8; --app-info-rgb: 107, 182, 216;
  --app-info-dark: #8CC8E3; --app-info-light: #559FC0;
  --app-info-soft: #142A33; --app-info-ink: #A9D6EA;
  --app-info-tint: rgba(107, 182, 216, 0.18);

  --app-icon-1:      #B9AFB4;
  --app-icon-2:      #5A5054;
  --app-rail-icon-1: #C79BD4;
  --app-rail-icon-2: #5F5266;

  --app-chart-1: #C480D4;
  --app-chart-2: #0B959B;
  --app-chart-3: #83C0FF;
  --app-chart-4: #6363C6;
  --app-chart-5: #0FC5CD;
  --app-chart-6: #A04C9A;
  --app-chart-7: #4882DC;
  --app-chart-8: #FD91D2;
  --app-chart-plan: #83C0FF;

  --app-sql-keyword:     #569CD6;
  --app-sql-operator:    #A9A1A4;
  --app-sql-function:    #D7A6E8;
  --app-sql-string:      #CE9178;
  --app-sql-comment:     #6FA85A;
  --app-sql-variable:    #D7BA7D;
  --app-sql-bookmark:    #4EC9B0;
  --app-sql-bookmark-bg: rgba(78, 201, 176, 0.14);
  --app-sql-activeline:  rgba(255, 255, 255, 0.05);
  --app-sql-selection:   rgba(100, 160, 230, 0.35);

  --app-focus-ring:   0 0 0 3px rgba(199, 155, 212, 0.30);
  --app-shadow-card:  0 1px 2px rgba(0, 0, 0, 0.50), 0 8px 24px -16px rgba(0, 0, 0, 0.80);
  --app-shadow-hover: 0 2px 4px rgba(0, 0, 0, 0.55), 0 12px 28px -14px rgba(0, 0, 0, 0.85);

  color-scheme: dark;
}

/* ============================================================================
   LIBRARY REMAP - Radzen and Bootstrap both read from the palette above.

   Override the variables; NEVER fork Radzen's theme file. Every value here is a
   variable the shipped theme already defines, so an upgrade re-supplies its own
   defaults and these keep winning. Every value is a var() reference, which is
   what makes the dark block above sufficient on its own.

   Two things about Radzen worth knowing before editing this:
   - The -dark / -light / -lighter derivatives are LITERALS in the theme, not
     computed from --rz-primary. Overriding only --rz-primary leaves coral on
     every hover and every translucent tint.
   - --rz-link-color resolves to var(--rz-secondary), not the primary. Secondary
     is remapped to a neutral here (a secondary ACTION should be quiet), so the
     link colour is pointed at the primary explicitly below. Miss that and every
     link in the app turns grey.
   ============================================================================ */
:root {
  /* --- Radzen: primary = plum ------------------------------------------- */
  --rz-primary:          var(--app-primary);
  --rz-primary-dark:     var(--app-primary-hover);
  --rz-primary-darker:   var(--app-primary-darker);
  --rz-primary-light:    var(--app-primary-light);
  --rz-primary-lighter:  var(--app-primary-tint);
  --rz-on-primary:         var(--app-on-primary);
  --rz-on-primary-dark:    var(--app-on-primary);
  --rz-on-primary-darker:  var(--app-on-primary);
  --rz-on-primary-light:   var(--app-on-primary);
  --rz-on-primary-lighter: var(--app-primary);

  /* --- Radzen: secondary = neutral -------------------------------------- */
  --rz-secondary:         var(--app-neutral);
  --rz-secondary-dark:    var(--app-neutral-dark);
  --rz-secondary-darker:  var(--app-neutral-darker);
  --rz-secondary-light:   var(--app-ink-3);
  --rz-secondary-lighter: var(--app-neutral-tint);

  /* Links follow the ACTION colour, not the neutral secondary. */
  --rz-link-color:       var(--app-primary);
  --rz-link-hover-color: var(--app-primary-hover);

  /* So does an ON switch. Radzen fills it with the secondary, and in the dark
     theme, where the neutral ramp inverts, ON and OFF were two greys with only
     the knob's side to tell them apart. The knob takes the ink that belongs on
     the fill: Radzen's white one is 2.3:1 on the dark plum, 1.7:1 on the dark
     navy. A ticked Bootstrap checkbox (.form-check-input:checked) is the same
     colour. */
  --rz-switch-checked-background-color:        var(--app-primary);
  --rz-switch-checked-circle-background-color: var(--app-on-primary);

  /* --- Radzen: status ---------------------------------------------------- */
  --rz-success:         var(--app-success);
  --rz-success-dark:    var(--app-success-dark);
  --rz-success-darker:  var(--app-success-ink);
  --rz-success-light:   var(--app-success-light);
  --rz-success-lighter: var(--app-success-tint);
  --rz-warning:         var(--app-warning);
  --rz-warning-dark:    var(--app-warning-dark);
  --rz-warning-darker:  var(--app-warning-ink);
  --rz-warning-light:   var(--app-warning-light);
  --rz-warning-lighter: var(--app-warning-tint);
  --rz-danger:          var(--app-danger);
  --rz-danger-dark:     var(--app-danger-dark);
  --rz-danger-darker:   var(--app-danger-ink);
  --rz-danger-light:    var(--app-danger-light);
  --rz-danger-lighter:  var(--app-danger-tint);
  --rz-info:            var(--app-info);
  --rz-info-dark:       var(--app-info-dark);
  --rz-info-darker:     var(--app-info-ink);
  --rz-info-light:      var(--app-info-light);
  --rz-info-lighter:    var(--app-info-tint);

  /* The ink ON each "lighter" tint: Shade.Lighter badges, chips and buttons, and the hover of an
     outlined or text button. Radzen bakes these as its own pastels (warning is #fac152), so over the
     tints above the words were light-on-light - the task check list's "1 required item left - cannot
     close yet" measured 1.4:1 against the 4.5:1 WCAG AA asks for. The -ink step is the darkest of each
     severity and flips with the theme: 6.7:1 in light, 7.7:1 in dark. A severity's base colour is not
     enough (the warning itself on its tint is 4.3:1). RADZEN ALERT SHADES below says the same per alert. */
  --rz-on-success-lighter:   var(--app-success-ink);
  --rz-on-warning-lighter:   var(--app-warning-ink);
  --rz-on-danger-lighter:    var(--app-danger-ink);
  --rz-on-info-lighter:      var(--app-info-ink);
  --rz-on-secondary-lighter: var(--app-neutral-darker);

  /* --- Radzen: the neutral ramp -----------------------------------------
     Radzen ships a COOL blue-grey ramp (#F6F7FA .. #28363C). Restated warm so
     the greys belong to the plum. The ramp drives more than it looks:
     --rz-body-background-color is base-100, --rz-text-color is base-800, and
     every border is a base-* step - which is also why the ramp INVERTS in dark
     mode rather than merely darkening. */
  --rz-base-50:  var(--app-base-50);
  --rz-base-100: var(--app-ground);
  --rz-base-200: var(--app-surface-2);
  --rz-base-300: var(--app-rule);
  --rz-base-400: var(--app-base-400);
  --rz-base-500: var(--app-base-500);
  --rz-base-600: var(--app-ink-3);
  --rz-base-700: var(--app-ink-2);
  --rz-base-800: var(--app-ink);
  --rz-base-900: var(--app-base-900);
  --rz-base-lighter: var(--app-ground);
  --rz-base-light:   var(--app-surface-2);
  --rz-base-dark:    var(--app-ink-3);
  --rz-base-darker:  var(--app-base-900);

  --rz-base-background-color:  var(--app-surface);
  --rz-body-background-color:  var(--app-ground);
  --rz-panel-background-color: var(--app-surface);
  --rz-input-background-color: var(--app-surface);
  --rz-text-color:             var(--app-ink);
  --rz-text-secondary-color:   var(--app-ink-2);
  --rz-border-color:           var(--app-rule);
  --rz-grid-header-background-color: var(--app-surface-2);
  --rz-border-radius: var(--app-radius-control);

  /* --- Bootstrap 5.3 -----------------------------------------------------
     The -rgb pairs are load-bearing: .bg-primary / .text-bg-* are built as
     rgba(var(--bs-primary-rgb), var(--bs-bg-opacity)), so setting only
     --bs-primary leaves those utilities blue. They are tokens rather than
     literals for the same reason as everything else - so dark mode flips them. */
  --bs-primary:      var(--app-primary);
  --bs-primary-rgb:  var(--app-primary-rgb);
  --bs-secondary:     var(--app-neutral);
  --bs-secondary-rgb: var(--app-neutral-rgb);
  --bs-success:      var(--app-success);   --bs-success-rgb: var(--app-success-rgb);
  --bs-warning:      var(--app-warning);   --bs-warning-rgb: var(--app-warning-rgb);
  --bs-danger:       var(--app-danger);    --bs-danger-rgb:  var(--app-danger-rgb);
  --bs-info:         var(--app-info);      --bs-info-rgb:    var(--app-info-rgb);
  --bs-light:        var(--app-surface-2);
  --bs-dark:         var(--app-ink);

  --bs-body-bg:         var(--app-ground);
  --bs-body-color:      var(--app-ink);
  --bs-body-color-rgb:  var(--app-ink-rgb);
  --bs-border-color:    var(--app-rule);
  --bs-link-color:       var(--app-primary);
  --bs-link-color-rgb:   var(--app-primary-rgb);
  --bs-link-hover-color: var(--app-primary-hover);
  --bs-border-radius:    var(--app-radius-control);
  --bs-emphasis-color:   var(--app-ink);

  /* <code>. Bootstrap's own is a literal pink (#d63384), and a literal does not flip: 4.2:1 on
     the page ground and 3.9:1 on a grid header in light, 3.8:1 on a card in dark. Code is neither
     an action nor a status, so it is a neutral, and the monospace face is what marks it. The FULL
     ink, not a softer one: several hint lines dim themselves (opacity: .75), and the full ink is
     the only step that is still above 4.5:1 after that. Inside an alert it takes the alert's ink
     instead - the rule is with the alert's close button, under THEME LEGIBILITY. */
  --bs-code-color:       var(--app-ink);
}

/* ============================================================================
   BOOTSTRAP COMPONENTS

   Setting --bs-primary is NOT enough, and this is the trap worth remembering:
   only the UTILITIES (.bg-primary, .text-primary) read --bs-primary-rgb.
   Every COMPONENT in Bootstrap 5.3 carries its own baked variable -
   .list-group sets --bs-list-group-active-bg: #0d6efd on itself, .btn-primary
   sets --bs-btn-bg, and so on - so the blue survives a --bs-primary override
   and shows up on exactly the controls people click. The Reports category list
   was still Bootstrap blue after the palette landed, for this reason.

   The surface/ink variables here matter for a second reason: Bootstrap bakes
   WHITE backgrounds into .card, .modal, .dropdown-menu, .list-group and the
   form controls. Without these the dark theme would leave white panels on a
   dark page.
   ============================================================================ */
:root {
  --bs-primary-bg-subtle:     var(--app-primary-soft);
  --bs-primary-border-subtle: var(--app-primary-light);
  --bs-primary-text-emphasis: var(--app-primary-ink);
  --bs-blue: var(--app-primary);
}

.btn-primary {
  --bs-btn-bg:                  var(--app-primary);
  --bs-btn-color:               var(--app-on-primary);
  --bs-btn-border-color:        var(--app-primary);
  --bs-btn-hover-bg:            var(--app-primary-hover);
  --bs-btn-hover-color:         var(--app-on-primary);
  --bs-btn-hover-border-color:  var(--app-primary-hover);
  --bs-btn-active-bg:           var(--app-primary-hover);
  --bs-btn-active-color:        var(--app-on-primary);
  --bs-btn-active-border-color: var(--app-primary-hover);
  --bs-btn-disabled-bg:         var(--app-primary);
  --bs-btn-disabled-color:      var(--app-on-primary);
  --bs-btn-disabled-border-color: var(--app-primary);
  --bs-btn-focus-shadow-rgb:    var(--app-primary-rgb);
}

/* The disabled edge and both focus rings were still Bootstrap's blue (#0d6efd) in every scheme:
   the chat room's Send button wears the disabled edge whenever nobody can type yet. */
.btn-outline-primary {
  --bs-btn-color:               var(--app-primary);
  --bs-btn-border-color:        var(--app-primary);
  --bs-btn-hover-bg:            var(--app-primary);
  --bs-btn-hover-color:         var(--app-on-primary);
  --bs-btn-hover-border-color:  var(--app-primary);
  --bs-btn-active-bg:           var(--app-primary);
  --bs-btn-active-color:        var(--app-on-primary);
  --bs-btn-active-border-color: var(--app-primary);
  --bs-btn-disabled-color:      var(--app-primary);
  --bs-btn-disabled-border-color: var(--app-primary);
  --bs-btn-focus-shadow-rgb:    var(--app-primary-rgb);
}

/* The neutral pair. Bootstrap's own grey (#6c757d) was never remapped, and a literal does not
   flip: "Validate address" and some fifty other outline buttons measured 3.6:1 on the dark
   theme's surface and 4.1:1 on a light grid header. They take the palette's neutral - the same
   one a Radzen secondary button uses (--rz-secondary above) - so the label is --app-ink-2 at
   rest and --app-base-50 on the fill, which is what --rz-on-secondary resolves to further down.
   In light this is a warmer grey of almost the same weight; nothing else changes there. */
.btn-secondary {
  --bs-btn-bg:                  var(--app-neutral);
  --bs-btn-color:               var(--app-base-50);
  --bs-btn-border-color:        var(--app-neutral);
  --bs-btn-hover-bg:            var(--app-neutral-dark);
  --bs-btn-hover-color:         var(--app-base-50);
  --bs-btn-hover-border-color:  var(--app-neutral-dark);
  --bs-btn-active-bg:           var(--app-neutral-darker);
  --bs-btn-active-color:        var(--app-base-50);
  --bs-btn-active-border-color: var(--app-neutral-darker);
  --bs-btn-disabled-bg:         var(--app-neutral);
  --bs-btn-disabled-color:      var(--app-base-50);
  --bs-btn-disabled-border-color: var(--app-neutral);
  --bs-btn-focus-shadow-rgb:    var(--app-neutral-rgb);
}

.btn-outline-secondary {
  --bs-btn-color:               var(--app-ink-2);
  --bs-btn-border-color:        var(--app-neutral);
  --bs-btn-hover-bg:            var(--app-neutral);
  --bs-btn-hover-color:         var(--app-base-50);
  --bs-btn-hover-border-color:  var(--app-neutral);
  --bs-btn-active-bg:           var(--app-neutral-dark);
  --bs-btn-active-color:        var(--app-base-50);
  --bs-btn-active-border-color: var(--app-neutral-dark);
  --bs-btn-disabled-color:      var(--app-ink-2);
  --bs-btn-disabled-border-color: var(--app-neutral);
  --bs-btn-focus-shadow-rgb:    var(--app-neutral-rgb);
}

/* The danger outline, for the same reason. Bootstrap's red (#dc3545) is a literal: as a label it
   measured 4.3:1 on a light surface, and it does not flip with the theme. Only the chat room uses
   this button (Leave, and Reject on an AI draft). The label and the edge are the palette's danger,
   and on the hover fill the label is --app-on-status, like every other ink on a status fill. */
.btn-outline-danger {
  --bs-btn-color:               var(--app-danger);
  --bs-btn-border-color:        var(--app-danger);
  --bs-btn-hover-bg:            var(--app-danger);
  --bs-btn-hover-color:         var(--app-on-status);
  --bs-btn-hover-border-color:  var(--app-danger);
  --bs-btn-active-bg:           var(--app-danger-dark);
  --bs-btn-active-color:        var(--app-on-status);
  --bs-btn-active-border-color: var(--app-danger-dark);
  --bs-btn-disabled-color:      var(--app-danger);
  --bs-btn-disabled-border-color: var(--app-danger);
  --bs-btn-focus-shadow-rgb:    var(--app-danger-rgb);
}

.list-group {
  --bs-list-group-bg:                  var(--app-surface);
  --bs-list-group-color:               var(--app-ink);
  --bs-list-group-border-color:        var(--app-rule);
  --bs-list-group-action-hover-bg:     var(--app-surface-2);
  --bs-list-group-action-hover-color:  var(--app-ink);
  --bs-list-group-active-bg:           var(--app-primary);
  --bs-list-group-active-border-color: var(--app-primary);
  --bs-list-group-active-color:        var(--app-on-primary);
}

.nav-pills {
  --bs-nav-pills-link-active-bg:    var(--app-primary);
  --bs-nav-pills-link-active-color: var(--app-on-primary);
}

.dropdown-menu {
  --bs-dropdown-bg:                var(--app-surface);
  --bs-dropdown-color:             var(--app-ink);
  --bs-dropdown-border-color:      var(--app-rule);
  --bs-dropdown-link-color:        var(--app-ink);
  --bs-dropdown-link-hover-bg:     var(--app-surface-2);
  --bs-dropdown-link-hover-color:  var(--app-ink);
  --bs-dropdown-link-active-bg:    var(--app-primary);
  --bs-dropdown-link-active-color: var(--app-on-primary);
}

.pagination {
  --bs-pagination-bg:                  var(--app-surface);
  --bs-pagination-color:               var(--app-primary);
  --bs-pagination-border-color:        var(--app-rule);
  --bs-pagination-hover-bg:            var(--app-surface-2);
  --bs-pagination-active-bg:           var(--app-primary);
  --bs-pagination-active-color:        var(--app-on-primary);
  --bs-pagination-active-border-color: var(--app-primary);
}

.progress { --bs-progress-bg: var(--app-surface-2); --bs-progress-bar-bg: var(--app-primary); }

.card {
  --bs-card-bg:           var(--app-surface);
  --bs-card-color:        var(--app-ink);
  --bs-card-border-color: var(--app-rule);
  --bs-card-cap-bg:       var(--app-surface-2);
}

.modal {
  --bs-modal-bg:           var(--app-surface);
  --bs-modal-color:        var(--app-ink);
  --bs-modal-border-color: var(--app-rule);
}

.table {
  --bs-table-bg:           var(--app-surface);
  --bs-table-color:        var(--app-ink);
  --bs-table-border-color: var(--app-rule);
  --bs-table-hover-bg:     var(--app-surface-2);
  --bs-table-hover-color:  var(--app-ink);
}

.form-control, .form-select {
  background-color: var(--app-surface);
  color: var(--app-ink);
  border-color: var(--app-rule);
}

/* Focus: the ring is the palette's, on every control that draws one. Bootstrap
   bakes #86b7fe + rgba(13,110,253,.25) as literals in these rules, so they have
   to be restated rather than re-pointed. */
.form-control:focus,
.form-select:focus,
.form-check-input:focus {
  border-color: var(--app-primary);
  box-shadow: var(--app-focus-ring);
}

.form-check-input {
  background-color: var(--app-surface);
  border-color: var(--app-rule-strong);
}

.form-check-input:checked {
  background-color: var(--app-primary);
  border-color: var(--app-primary);
}

.nav-link:focus-visible { box-shadow: var(--app-focus-ring); }

:root {
  --primary-gradient: var(--app-primary);
  --secondary-gradient: var(--app-success);
  --danger-gradient: var(--app-danger);
  --card-shadow: var(--app-shadow-card);
  --hover-shadow: var(--app-shadow-hover);
  --bg-glass: var(--app-surface);
  --border-glass: var(--app-rule);
  --text-dark: var(--app-ink);
  --text-muted: var(--app-ink-2);
  --border-color: var(--app-rule);
  /* Radzen custom font family override */
  --rz-font-family: Arial, sans-serif !important;
  --rz-text-font-family: Arial, sans-serif !important;
  /* Radzen's default theme tracks its headings tight (-0.02em to -0.04em) for its own typeface,
     Source Sans Pro. The two lines above put Arial in its place, and bold Arial at that tracking
     closes the word gap before a capital A: "MyAccounts", "New Debtor andAccount", "Bank
     ofAmerica". With Arial the headings keep the font's own spacing. These tokens feed RadzenText's
     H1-H6 and DisplayH1-H6 styles and the dialog title; the plain h1-h6 elements, which Radzen
     tracks by a rule of its own, are reset below the html, body rule. Body and button text keep
     Radzen's tracking - regular weight does not show the defect, and widening every label would
     move layouts for nothing. */
  --rz-text-h1-letter-spacing: normal;
  --rz-text-h2-letter-spacing: normal;
  --rz-text-h3-letter-spacing: normal;
  --rz-text-h4-letter-spacing: normal;
  --rz-text-h5-letter-spacing: normal;
  --rz-text-h6-letter-spacing: normal;
  --rz-text-display-h1-letter-spacing: normal;
  --rz-text-display-h2-letter-spacing: normal;
  --rz-text-display-h3-letter-spacing: normal;
  --rz-text-display-h4-letter-spacing: normal;
  --rz-text-display-h5-letter-spacing: normal;
  --rz-text-display-h6-letter-spacing: normal;
  --rz-dialog-title-letter-spacing: normal;
  /* Decrease radzen grid header font size globally */
  --rz-grid-header-font-size: 0.7rem;
  --rz-grid-cell-font-size: 0.7rem;
  /* Radzen's default.css sets this token to `uppercase` on :root, which is why every grid header in
     the app was shouting. Capitals are ~10% wider than the same caption in mixed case AND the
     caption is nowrap+ellipsis inside a fixed-width th, so it cost column width and truncated
     headers for nothing. `none` shows the caption exactly as the column was named. This must stay a
     :root override rather than a rule on .rz-column-title: the token feeds the draggable title in
     the column picker and the Gantt header too, and they should all read the same. */
  --rz-grid-header-text-transform: none;
  --bs-body-font-size: 0.7rem;
  /* Icon palette - see the .fa-primary / .fa-secondary rules below. These two values are the
     tones every duotone glyph in the app. Warm neutral by default so a content icon stays quiet;
     the menu rail overrides them to plum (RadzenNavMenu2.razor.css) because that is where the
     colour earns its place. */
  --fa-primary-color: var(--app-icon-1);
  --fa-secondary-color: var(--app-icon-2);

  /* ==========================================================================
     SPACING SCALE

     One scale for the whole app, so a gap means the same thing on every screen.
     Steps are 4px apart at the low end and jump at the top; anything that is not
     on the scale is a bug, not a nuance.
     ========================================================================== */
  --sp-1: 0.25rem;   /*  4px - icon-to-label, chip innards            */
  --sp-2: 0.5rem;    /*  8px - inside a dense control, cell padding   */
  --sp-3: 0.75rem;   /* 12px - between siblings in a card            */
  --sp-4: 1rem;      /* 16px - card padding, gap between cards       */
  --sp-5: 1.5rem;    /* 24px - between major sections on a page      */
  --sp-6: 2rem;      /* 32px - page-level separation, rare           */

  /* The inset between the chrome (menu rails, header) and page content. Owned by
     the LAYOUT content container and by nothing else - see the "PAGE GUTTER"
     block further down for why a page must never add its own. */
  --content-gutter: var(--sp-4);

  /* Card/panel geometry. A "card" is any raised white surface on the page
     background: dashboard widgets, profile tiles, the settings panels. */
  --card-pad: var(--sp-4);
  --card-gap: var(--sp-3);
  --card-radius: 8px;
}

/* ---------------------------------------------------------------------------
   FontAwesome duotone tones.

   MUST live here in the GLOBAL stylesheet, never in a scoped .razor.css. FontAwesomeIcon and
   SvgIcon inline the file as a MarkupString, so the <svg> and its <path>s are not part of any
   component's markup and carry no b-xxxxx scope attribute. A scoped rule compiles to
   ".fa-primary[b-xxxxx]" and silently matches nothing - the same trap already documented in
   SettingsExplorer.razor.css, and the reason ".fa-icon-v7 svg" in RadzenNavMenu2.razor.css has
   never applied.

   IconSvg.Normalise puts these two classes on the artwork; overriding either variable in any
   narrower scope retints every icon under it. For example:
       [data-theme="dark"]           { --fa-secondary-color: #3a4a57; }
       .rz-button:hover .fa-icon-v7  { --fa-primary-color: #fff; }
   Single-tone icons (the FA solid exports) deliberately carry neither class and keep following
   the inherited text colour through their own currentColor.
   --------------------------------------------------------------------------- */
/* Default geometry. The inner <svg> is sized in em, so font-size scales the icon exactly the way
   it scaled the Radzen icon font this replaced - which is what let ~700 migrated call sites keep
   their existing Style="font-size:..." verbatim. Call sites that need fixed pixels (the card,
   chat, grid-toolbar and report-row icons) override this with a more specific rule. */
.fa-icon-v7 {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  flex: none;
}

.fa-icon-v7 > svg {
  width: 1em;
  height: 1em;
  display: block;
}

/* A single-tone icon follows the text colour - but only if its path SAYS currentColor.
   FontAwesome 7's light exports (the eleven *-light-full.svg files: paperclip, envelope,
   file-lines, the phone arrows...) carry no fill at all, and an SVG shape with no fill is BLACK.
   That read on a light surface and nowhere else: the interaction feed's channel icons measured
   1.2:1 in the dark theme, and the same glyph was black on a filled plum button in the light one.
   fill is inherited, so setting it on the <svg> reaches exactly the shapes that have none of their
   own - an attribute, .fa-primary / .fa-secondary and an embedded <style> all still win. */
.fa-icon-v7 > svg {
  fill: currentColor;
}

.fa-icon-v7 .fa-primary {
  fill: var(--fa-primary-color);
}

.fa-icon-v7 .fa-secondary {
  fill: var(--fa-secondary-color);
}

/* Report-list type icon (Reports.razor TypeIconHtml). Global rather than scoped for two reasons:
   the markup is built as a string in C# so it carries no component scope, and it is injected into
   a grid cell that belongs to CSGrid rather than to Reports. Sizes match the 16px img it replaced. */
.reports-type-icon.fa-icon-v7 {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  vertical-align: middle;
}

.reports-type-icon.fa-icon-v7 svg {
  width: 16px;
  height: 16px;
  display: block;
}

/* An icon sitting before a label inside a button. Replaces Radzen's ImageStyle on the Image=
   parameter, which only exists because Image renders an <img> - and an <img> cannot take the
   duotone tones from CSS. Same metrics the ImageStyle carried. Global, because the icon is
   rendered by SvgIcon and so belongs to no calling component's scope. */
.fa-icon-v7.icon-inline-sm {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.1rem;
  height: 1.1rem;
  margin-right: 0.35rem;
  vertical-align: middle;
}

.fa-icon-v7.icon-inline-sm svg {
  width: 1.1rem;
  height: 1.1rem;
  display: block;
}

/* Same metrics on an icon-ONLY button, where the trailing gap would just skew the padding. */
.fa-icon-v7.icon-inline-sm.icon-inline-bare {
  margin-right: 0;
}

*, *::before, *::after {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html, body {
  font-family: Arial, sans-serif;
  background-color: var(--app-ground);
  color: var(--app-ink);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Radzen's default.css tracks the heading ELEMENTS tight by a rule of its own (h1 -0.04em, h2
   -0.03em, h3 to h6 -0.02em, and the .h1 to .h6 classes with them), made for its own typeface. In
   bold Arial that closes the word gap before a capital A - see the --rz-text-h*-letter-spacing
   tokens in :root above, which cover RadzenText's heading styles. */
h1, .h1, h2, .h2, h3, .h3, h4, .h4, h5, .h5, h6, .h6 {
  letter-spacing: normal;
}

/* Base Link Color */
a, .btn-link {
  color: var(--app-primary);
  transition: color 0.2s ease;
}
a:hover, .btn-link:hover {
  color: var(--app-primary-hover);
  text-decoration: none;
}

/* CSTextBox & general input styles */
.form-control, .rz-textbox, .rz-textarea, .rz-numeric, .rz-dropdown, .rz-multiselect, .rz-inputtext {
  /* these make everything look bad, I don't know why we added them ? The dropdowns have too much padding and the text is not visible, and then some inherit a double border */
  /*
  border-radius: 8px !important;
  border: 1px solid var(--border-color) !important;
  padding: 0.6rem 0.80rem !important;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
  background-color: #fff !important;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05) !important;
    */
  /* This makes the text in the controls jagged and too big for dropdowns
  font-family: "Segoe UI", sans-serif !important;
  font-size: 0.95rem !important;
    */

  box-shadow: none !important;
}

.form-control:focus, .rz-state-focus, .rz-textbox:focus, .rz-textarea:focus {
  border-color: var(--app-primary) !important;
  box-shadow: var(--app-focus-ring) !important;
  outline: none !important;
}

/* Buttons */
.btn {
  border-radius: var(--app-radius-control);
  font-weight: 600;
  /* Try not to change the default icon styles... use the wi_btn_* instead */
  /* Removing padding so default buttons don't have so much */
  /* padding: 0.625rem 1.25rem;*/
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* File buttons: a <label> that stands for the file input inside it - the reply box's paperclip, the
   chat room's "Share a document", the upload panel's "Take a photo" and "Choose files". The input is
   class="visually-hidden", never d-none or display: none: an input that is not rendered is out of the
   Tab order, and a customer without a mouse could not attach a file at all (FileButtonKeyboardTests
   holds that, and this rule). The keyboard focus is then on an input nobody sees, so its label draws
   the ring - the app's keyboard ring (as on .csgrid and the rating stars). It is an outline because
   the label never has the focus itself, so Bootstrap's .btn:focus-visible does not match it.
   :focus-visible and not :focus-within: a mouse click on the label focuses its input too, and a
   clicked button shows no ring. Global because InputFile, a child component, renders the input. */
label:has(> input[type="file"].visually-hidden:focus-visible) {
  outline: 2px solid var(--app-primary);
  outline-offset: 2px;
}

.wi_btn_primary {
  background: var(--app-primary) !important;
  border: none !important;
  color: var(--app-on-primary) !important;
  box-shadow: none !important;
}

.wi_btn_primary:hover:not(:disabled) {
  transform: translateY(-1px);
  background: var(--app-primary-hover) !important;
}

.wi_btn_primary:active:not(:disabled) {
  transform: translateY(1px);
}

/* .dq-layout-buttons-secondary is the DQ page-layout hook for the same look: a layout author cannot
   put a class on a DQ button (the engine renders it), but can put one on the slot the buttons sit in. */
.wi_btn_secondary,
.dq-layout-buttons-secondary .rz-button {
  border: 1px solid var(--border-color) !important;
  /* NOT the literal `white` this carried until 2026-09-05. --text-dark aliases --app-ink, which flips
     to near-white in dark mode, so a literal white ground made the label invisible. The class had no
     users at the time, so the bug had never shipped - the DQ "Finish Later" button is the first. */
  background-color: var(--app-surface) !important;
  color: var(--text-dark) !important;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05) !important;
}

.wi_btn_secondary:hover:not(:disabled),
.dq-layout-buttons-secondary .rz-button:hover:not(:disabled) {
  background-color: var(--app-surface-2) !important;
  border-color: var(--app-rule-strong) !important;
}

/* Premium Form Container */
.wi_dqform_container {
  max-width: 960px;
  /* unnecessary... pushes the next control too much 
    margin-bottom: 3rem;
    */
}

/* The frame is deliberately Bootstrap's own .card - 4px radius, no shadow - so a questionnaire
   sits in the SAME frame as every other card in the app (the budget cards, the record-page
   sections). It used to carry an 8px radius and a lifting hover shadow, which made it the odd one
   out wherever a DQ form shares a column with anything else. Only the border is restated, because
   the markup carries .border-0 for the header's maroon fill to run edge to edge. */
.wi_dq_card {
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-glass) !important;
  overflow: hidden;
}

.wi_dq_header {
  /* unnecessary...
  background: var(--primary-gradient) !important;
  padding: 1.75rem 2rem !important;
    */
}

.wi_dq_title {
  /* Bootstrap's .text-white on the header div does NOT reach this: Radzen's default.css sets
     h3, .h3 { color: var(--rz-text-title-color) } which - being an explicit declaration on the
     element itself rather than an inherited one - wins over the ancestor's text-white regardless
     of specificity or !important. --app-on-primary is the token this palette already defines for
     text sitting on a --app-primary fill (see .btn-primary, .list-group), and it flips correctly
     in dark mode where --app-primary itself flips to a light tint. */
  color: var(--app-on-primary);
  /* Sized to the app's card headers rather than to an <h3>. It stays an h3 in the markup for the
     heading outline; the display size is the card-header size so a questionnaire sharing a column
     with other cards has a header bar of the same height and weight. The element's own font-size
     has to be restated because Radzen sets h3 explicitly, same as the colour above. The drop
     shadow and negative tracking went with the large type - both only read as deliberate at
     display sizes and just smear a 14px caption. */
  font-size: 14px;
  font-weight: 700;
  letter-spacing: normal;
}

.wi_dq_desc {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  font-weight: 400;
}

/* Section Styling */
  .wi_section_card {
  border-radius: var(--app-radius-card) !important;
  border: 1px solid var(--border-color) !important;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05) !important;
  margin-bottom: 1.75rem !important;
  overflow: hidden;
}

.wi_section_header {
  background-color: var(--app-surface-2) !important;
  padding: 1.25rem 1.5rem !important;
  border-bottom: 1px solid var(--border-color) !important;
}

.wi_section_title {
  font-weight: 600;
  color: var(--app-ink) !important;
  font-size: 1.15rem;
}

.wi_section_body {
  padding: 1.5rem !important;
  background-color: #ffffff;
}

/* Control Row Styling */
.wi_layout_control_row {
  margin-bottom: 1.25rem !important;
  transition: all 0.3s ease;
}

.wi_control_label {
  color: var(--app-ink-2);
  font-size: 0.925rem;
  font-weight: 600 !important;
}

/* Readonly fields display */
.wi_readonly_value {
  background-color: var(--app-surface-2) !important;
  border-color: var(--app-rule) !important;
  color: var(--app-ink-2) !important;
  font-weight: 500;
  border-radius: var(--app-radius-control);
  padding: 0.625rem 0.875rem !important;
}

/* Error message indicators */
.wi_validation_error {
  color: var(--app-danger) !important;
  font-size: 0.825rem;
  margin-top: 0.375rem;
  display: flex;
  align-items: center;
  animation: slideDown 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Alerts custom design */
.wi_alert_success {
  background-color: var(--app-success-soft);
  border: 1px solid var(--app-success);
  color: var(--app-success-ink);
  border-radius: var(--app-radius-control);
}

.wi_alert_danger {
  background-color: var(--app-danger-soft);
  border: 1px solid var(--app-danger);
  color: var(--app-danger-ink);
  border-radius: var(--app-radius-control);
}

/* File upload styling */
.wi_fileupload_placeholder {
  border: 2px dashed var(--app-rule-strong) !important;
  border-radius: var(--app-radius-card);
  background-color: var(--app-surface-2) !important;
  text-align: center;
  padding: var(--sp-4) !important;
  color: var(--app-ink-2) !important;
  transition: all 0.2s ease;
}
.wi_fileupload_placeholder:hover {
  border-color: var(--app-primary) !important;
  background-color: var(--app-primary-softer) !important;
}

/* Radzen Override Fixes */
.rz-dropdown, .rz-multiselect {
  display: inline-flex !important;
  align-items: center;
}

/* The align-items above works on the CROSS axis, and Radzen lays a dropdown out as a COLUMN - so it
   centered the label horizontally and shrink-wrapped it to its text. A value longer than the box then
   spilled out of BOTH sides: the start clipped at the left edge ("...BERT HUGHES" on the account
   Summary) and the end ran under the chevron and the clear (x), while the label's own ellipsis never
   fired. Stretching the label back across the box restores Radzen's layout; vertical centering comes
   from the label's padding either way. With Chips on and fewer chips than MaxSelectedLabels, the
   chips wrapper takes the label's place, and was centered and shrink-wrapped the same way. */
.rz-dropdown > .rz-dropdown-label,
.rz-dropdown > .rz-dropdown-chips-wrapper,
.rz-multiselect > .rz-multiselect-label-container {
  align-self: stretch;
  min-width: 0;
}

/* Radzen 10.4 reserves room in a DatePicker for its calendar button but not for its clear (x), which it
   places calc(trigger width + .5rem) from the right edge - so a date filling the box ran under the x
   ("9/29/2026" read "9/29/202x"). Its TimeSpanPicker carries this rule; the DatePicker does not. */
.rz-datepicker:has(> .rz-dropdown-clear-icon) > .rz-inputtext {
  padding-inline-end: calc(2 * var(--rz-dropdown-trigger-icon-width) + 1rem);
}

/* The account details Summary (ViewDebtorAccountInline) lays its fields out with viewport breakpoints
   (col-md-*), but the card sits between the pinned menus and the notes rail: on a 1440px screen it is
   about 520px wide, and four fields to a row left each about 125px - the creditor box showed "Ced...",
   a long name clipped, a date ran under its x. The card is a size container, so the rows follow ITS
   width. Safe for the popups inside it: Radzen moves dropdown and date picker panels to <body>, and the
   search box's dialog is a top-layer <dialog>. */
.account-summary { container-type: inline-size; }
@container (max-width: 959.98px) {
  .account-summary .row > .col-md-2,
  .account-summary .row > .col-md-3,
  .account-summary .row > .col-md-4 { flex: 0 0 auto; width: 33.33333333%; }
}
@container (max-width: 719.98px) {
  .account-summary .row > .col-md-2,
  .account-summary .row > .col-md-3,
  .account-summary .row > .col-md-4 { width: 50%; }
  /* A search box spends two buttons of its width; at half a narrow card its text is a stub. */
  .account-summary .row > [class*="col-md-"]:has(> .cs-searchbox) { width: 100%; }
}
/* One field per row only under 400px. The step stood at 460px, and at a 1440 window with both menus
   pinned and the notes beside the screen the card has 447px: every field took a row of its own and
   the Summary was a single column about 3,500px long beside an empty right half. Two per row there
   leaves each field 200px, enough for a date with its two buttons and for a balance with its two. */
@container (max-width: 399.98px) {
  .account-summary .row > .col-md-2,
  .account-summary .row > .col-md-3,
  .account-summary .row > .col-md-4 { width: 100%; }
}

/* ===== The HUD form (Components/Views/ViewDebtorHUD.razor) =====
   The owner's arrangement (2026-10-02): HUD Client first, then the related fields in pairs - County
   with FIPS Code, Family Size with Income Level, Ethnicity with Race - then HUD Grants. Two blocks
   per row from a 768 window up (col-md-6 in the markup), and the two pairs side by side - four
   blocks per row - once the FORM has 1184px: four blocks of 284px, the least that holds an income
   level's box beside "Calculate" (below), and three 16px gutters. A 1366 window with both menus
   unpinned gives the form 1188px, and four fitted there before this arrangement too.

   The form's own width, never the window's. The pinned menus take about 500px of the window, so the
   old col-xl-3 (four per row from a 1200 window) left a block 200px at 1366 and 155px at 1200:
   "Select..." was squeezed to 28px, its label ran 22px past the window and the page scrolled
   sideways. The form is a size container for that - on its own page and as the HUD tab of the record
   workspace, where the tab's panel scrolled sideways instead. Safe for what opens inside it: Radzen
   moves a dropdown's list and a date picker's calendar to <body>. */
.hud-form { container: hud-form / inline-size; }
@container hud-form (min-width: 1184px) {
  .hud-form .hud-field { flex: 0 0 auto; width: 25%; }
}

/* County, FIPS Code and Income Level stop at 300px like the form's other boxes (wi_dq_dropdown), so
   the two columns line up. That class also asks for 180px at least, and a block of this form can be
   narrower (147px on a phone on its side): there a box takes its block instead of running out of it. */
.hud-form .hud-box { width: 100%; max-width: 300px; }
.hud-form .wi_dq_dropdown { min-width: 0; }

/* A box with its button: FIPS Code and "Select...", Income Level and "Calculate". A small Radzen
   button has a min-width of its own (1.75rem), which replaces a flex item's automatic minimum: a
   crowded row squeezes the button to it and the label runs out of the button, while a text box does
   not go under its own width. Here the button keeps its label and the box takes what is left. In a
   block under 284px the button goes under the box: 193px for a box that shows the longest income
   level ("Chose not to respond"), the 8px gap and 83px for "Calculate". The block's width decides
   that, not the row's content, so a busy "Calculate" ("Working...", 29px wider) cannot push itself
   under its box and back. */
.hud-field { container: hud-field / inline-size; }
.hud-field-action { display: flex; align-items: center; gap: .5rem; }
.hud-field-action > .hud-box { flex: 1 1 auto; min-width: 0; }
.hud-field-action > .rz-button { flex: 0 0 auto; }
@container hud-field (max-width: 283.98px) {
  .hud-field-action { flex-wrap: wrap; }
}

/* ===== The payment schedule's toolbar (Components/Shared/Payments/PaymentSchedule.razor) =====
   Template and its chooser, Add / Add Multiple / Legend, the view switcher, Refresh / Refresh
   Balances, Hide Closed, Offer Filter and the unallocated funds, in one bar that WRAPS (the
   RadzenStack carries Wrap). Each group goes to the next line whole.

   Global, not scoped: the bar and its buttons are drawn by Radzen components, which carry no scope
   attribute of this view.

   The buttons do not shrink. A small Radzen button has a min-width of its own (1.75rem), which
   replaces a flex item's automatic minimum, so the one-line bar squeezed every labelled button to
   28px and the labels ran over their neighbours ("Add", "Add Multiple", "Legend", "Refresh
   Balances", "Hide Closed", "Offer Filter"). The template's NAME is the one thing that gives way:
   it shares its line with the chooser while it fits and breaks between words when it is longer than
   the bar itself. */
.ps-toolbar .rz-button { flex: 0 0 auto; }
.ps-toolbar-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem;
  max-width: 100%;
  min-width: 0;
}
.ps-toolbar .rz-text { margin-block: 0; }
.ps-toolbar-template { min-width: 0; overflow-wrap: anywhere; }
.ps-toolbar-funds { white-space: nowrap; }

/* ===== Payment Schedule colours (Components/Shared/Payments/PaymentSchedule.razor) =====
   The desktop's schedule colours its rows and cells, and the colours carry meaning, so they stay
   (owner, 2026-10-06) - as tokens, light and dark, in every scheme. The rows take the scheme's own
   neutrals (past, closed) or its brand (current); the cells and the NSF row take the status
   families, which are the same in every scheme. C# only marks a row (data-ps-row) or a cell (a
   ps-cell-* class) in OnRowRender, OnCellRender and the detail grid's two; these rules are the whole
   of the colour. A row takes an attribute because a class from RowRender REPLACES Radzen's own
   (rz-data-row, rz-state-highlight); a cell's class is added to Radzen's. The legend's swatches
   carry the same marks, so the legend cannot disagree with the grid.

   Global, because every element painted is Radzen's own markup, which carries no scope attribute.
   Keyed on .ps-schedule, the grid's wrapper: it is a csgrid-chrome, not a .csgrid, so the
   data-coloured row rules of CSGrid do not reach it.

   Precedence, on purpose:
   - A ROW fill is (0,2,2). Radzen's hovered, selected and focused rows are (0,3,3) and up, so a row
     the user points at or has chosen shows that state; an expanded row keeps its meaning. The
     detail grid draws no stripes (AllowAlternatingRows="false"): a stripe is an opaque fill on
     every cell and hid the closed grey.
   - A CELL fill is !important, as the inline style it replaced was: a matched amount stays green
     on a hovered or a selected row.
   - Radzen paints a value's ink on its own .rz-cell-data span, so every ink is set on that span.
     A colour on the <td> alone never reached the text: the override's red was never painted. */
.ps-schedule tr[data-ps-row="past"] > td,
.ps-swatch[data-ps-row="past"] { background-color: var(--app-row-past); }

/* Radzen selects a row with the same soft fill, so the current point also carries a bar in the
   action colour, which stays when it is selected. */
.ps-schedule tr[data-ps-row="current"] > td,
.ps-swatch[data-ps-row="current"] { background-color: var(--app-primary-soft); }
.ps-schedule tr[data-ps-row="current"] > td:first-child,
.ps-swatch[data-ps-row="current"] { box-shadow: inset 3px 0 0 var(--app-primary); }

.ps-schedule tr[data-ps-row="closed"] > td,
.ps-swatch[data-ps-row="closed"] { background-color: var(--app-row-closed); }
.ps-schedule tr[data-ps-row="closed"] > td .rz-cell-data { color: var(--app-ink-2); }

.ps-schedule tr[data-ps-row="nsf"] > td,
.ps-swatch[data-ps-row="nsf"] { background-color: var(--app-danger-strong); }
.ps-schedule tr[data-ps-row="nsf"] > td .rz-cell-data { color: var(--app-danger-strong-ink); }

.ps-schedule td.ps-cell-matched,
.ps-swatch.ps-cell-matched { background-color: var(--app-success-soft) !important; }
.ps-schedule td.ps-cell-matched .rz-cell-data { color: var(--app-success-ink) !important; }

.ps-schedule td.ps-cell-unapplied,
.ps-swatch.ps-cell-unapplied { background-color: var(--app-warning-yellow) !important; }
.ps-schedule td.ps-cell-unapplied .rz-cell-data { color: var(--app-warning-yellow-ink) !important; }

.ps-schedule td.ps-cell-below-min,
.ps-swatch.ps-cell-below-min { background-color: var(--app-warning-soft) !important; }
.ps-schedule td.ps-cell-below-min .rz-cell-data { color: var(--app-warning-ink) !important; }

.ps-schedule td.ps-cell-over-balance,
.ps-swatch.ps-cell-over-balance { background-color: var(--app-danger-soft) !important; }
.ps-schedule td.ps-cell-over-balance .rz-cell-data { color: var(--app-danger-ink) !important; }

.ps-schedule td.ps-cell-changed-fee,
.ps-swatch.ps-cell-changed-fee { background-color: var(--app-danger) !important; }
.ps-schedule td.ps-cell-changed-fee .rz-cell-data { color: var(--app-on-status) !important; }

/* An overridden amount is red text on whatever it sits on, a matched cell's green included, so it
   comes after the fills. An editable Override is a box, whose input does not inherit the colour. */
.ps-schedule td.ps-cell-override .rz-cell-data,
.ps-schedule td.ps-cell-override .rz-numeric-input,
.ps-legend-override { color: var(--app-danger) !important; }

.ps-swatch {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 1px solid var(--app-ink-3);
}

/* An opened point's account grid: its headings wrap rather than being cut. Its eleven columns share the width of the
   point's row equally (135px each at a 1920 window with both menus pinned, under 100px at 1440), and Radzen keeps a
   heading on one line with an ellipsis: "Current ...", "Payment...", "Default ...", "Override..." (owner, 2026-12-02,
   the Credit Counseling video at 1:09). A heading now takes a second line where it needs one, breaking only between
   words; the cells keep one line. The point grid's own headings already fit (their widths are set in the markup). */
.ps-schedule .rz-expanded-row-content .rz-grid-table thead th,
.ps-schedule .rz-expanded-row-content .rz-grid-table thead th .rz-column-title,
.ps-schedule .rz-expanded-row-content .rz-grid-table thead th .rz-column-title-content {
  white-space: normal;
  text-overflow: clip;
}

/* ===== The portal's work queue list (Components/Pages/AgentExternal/PortalQueues.razor) =====
   The list of queues beside the queue's grid. Its width is its own from a 992 window up, not a
   share of the window's twelfths: at 1440 two twelfths were 192px and "Creditor Documents" was cut
   beside an empty page. 15rem holds a name of 190px beside its count on one line; a longer name
   wraps. Below 992 the list is the page's full width, above the grid. */
@media (min-width: 992px) {
  .portal-queue-list { flex: 0 0 auto; width: 15rem; }
}

.rz-dropdown-trigger {
  background-color: transparent !important;
}

/* Multiselect popups are reparented to <body> and JS-sized to the trigger's width; CSGrid's
   icon-only column picker (28px trigger) needs the panel wide enough for names + checkboxes.
   !important because Radzen.js sets width AND min-width inline when opening the popup. */
.rz-multiselect-panel {
  min-width: 200px !important;
}

.rz-chkbox-box {
  border-radius: 4px !important;
  border: 2px solid #cbd5e1 !important;
  width: 20px !important;
  height: 20px !important;
  transition: all 0.15s ease !important;
}

.rz-chkbox-box.rz-state-active {
  background: var(--primary-gradient) !important;
  border-color: var(--app-primary) !important;
}

/* DialogService.Confirm and DialogService.Alert write their message as plain text into
   p.rz-dialog-confirm-message / p.rz-dialog-alert-message and Radzen leaves both at white-space:
   normal, so every "\n" a caller builds in (the account status warning, ApplyTemplateFlow's warning
   list, the formula bookmark list, a multi-error SQL message) collapsed into one paragraph. pre-line
   keeps the breaks and still collapses runs of spaces, so a one-line message renders exactly as
   before. The :has() guard skips the RenderFragment overloads, which render markup into the same <p>,
   where pre-line would make their source line breaks visible. Global: the dialog is outside every
   component's scope. */
.rz-dialog-confirm-message:not(:has(*)),
.rz-dialog-alert-message:not(:has(*)) {
  white-space: pre-line;
}

/* Fullscreen Submitting Overlay */
.wi_saving_overlay {
  animation: fadeIn 0.3s ease;
  backdrop-filter: blur(8px);
}

/* The questionnaire while a save or a ButtonReadOnly command is in flight
   (DynamicQuestionnaire.IsSaving). The button that is running shows Radzen's busy spinner and
   "Processing..."; the wait cursor over the rest of the form is the second, quieter signal for a
   user whose eyes are elsewhere - same idea as body.icco-navigating. Needed most for the DQ
   buttons that call a third-party API (the Spinwheel connect and pull chain) and take seconds. */
.wi_dqform_container.wi_dq_busy {
  cursor: progress;
}

/* Progress bar modernizer */
.wi_progress_container {
  background: var(--app-surface-2);
  padding: 1rem;
  border-radius: 12px;
  border: 1px solid var(--border-color);
}

.wi_progress_bar .rz-progressbar-value {
  background: var(--primary-gradient) !important;
}

/* The DQ progress bar sitting INSIDE the form's action bar rather than as a standalone panel above
   the questions (2026-09-05). The panel chrome is dropped - a boxed, filled panel on the same line as
   the buttons reads as a second control - but the wi_progress_container class name stays on the
   element because it is the documented hook for per-agency custom CSS.

   min-width matters: without it the flex item's basis is its content, so on a narrow dialog the bar
   refuses to shrink and pushes the buttons out of the row instead of the row wrapping. */
.wi_progress_inline {
  background: none;
  padding: 0;
  border: none;
  border-radius: 0;
  min-width: 12rem;
}

/* Phone: the action bar wraps (flex-wrap in the markup), so the bar takes its own line above the
   buttons and the buttons stay right-aligned under it. Radzen forces a dialog to 100% width below
   768px, which leaves roughly 310px inside the card body - not enough for a bar plus two buttons. */
@media (max-width: 575.98px) {
  .wi_progress_inline {
    min-width: 100%;
  }

  .wi_form_actions_buttons {
    width: 100%;
    justify-content: flex-end;
  }
}

/* Standard blazor features */
.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI5OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA5OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3LjgyOSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljg4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNzcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

/* Collapse the inspected-customer submenu column when there's no menu to show.
   RadzenNavMenu2 renders no .nav2-wrapper when empty, so :has() detects the gap. */
nav.nested-customer-menu:not(:has(.nav2-wrapper)) {
  display: none;
}

/* make menus flush left */
.internal-menu .nav2-wrapper {
  height: 100%;
}
.nested-customer-menu .nav2-wrapper {
  height: 100%;
}
.internal-menu .nav2-wrapper-compact {
  position: relative !important;
  left: unset !important;
  top: unset !important;
  height: 100% !important;
}
.nested-customer-menu .nav2-wrapper-compact {
  /*position: relative !important; */
  left: unset !important;
  top: unset !important;
  height: 100% !important;
}

/* ==========================================================================
   PAGE GUTTER

   ONE owner for the inset between the chrome and the page: the layout's content
   container. A page must not add its own padding at its root - that is what
   produced the three different gutters this replaces (0px on the internal
   screens, 16px where a page wrapped itself in .p-3, 32px on the customer
   portal where .customer-body's 1rem and the page's own .p-3 stacked up).

   Global rather than scoped to each layout's .razor.css for two reasons: the
   rules have to see across component boundaries (the :has() below matches a
   child rendered by a DIFFERENT component, whose scope attribute a scoped rule
   would never carry), and the gutter is one decision, so it reads better in one
   place than split three ways.

   The internal shell nests: .internal-body holds EITHER the page or the
   inspected-customer submenu column. When it holds the submenu, the gutter
   belongs to .nested-customer-body inside it - padding out here would push that
   submenu down and right, breaking its alignment with the main rail.
   ========================================================================== */
.internal-body:not(:has(> .nested-customer-layout)),
.nested-customer-body,
.customer-body {
  padding: var(--content-gutter);
}

/* Signer focus mode (MainCustomerLayout on the signing routes) takes the smaller step on a phone held
   upright, where the document needs every pixel (owner, 2026-10-27). It sets the variable rather than
   the padding because the sign page's document area takes back exactly --content-gutter to stay
   full width. */
@media (max-width: 575.98px) {
  .customer-body.signer-focus {
    --content-gutter: var(--sp-2);
  }
}

/* Where a page's own sticky header parks - ONE owner, for the same reason the gutter has one.
   `position: sticky` resolves against whatever ancestor scrolls, and that differs by route: on a
   normal page the WINDOW scrolls and .app-header (3.5rem, sticky, z-index 500) already owns the top
   of it, so a page header that parks at 0 is simply hidden behind the bar. Pages set
   `top: var(--sticky-header-top)` and any container that scrolls itself overrides the variable -
   see .sx-scrollbody in SettingsExplorer.razor.css, where a hosted settings screen scrolls in its
   pane rather than in the window. The database test mode banner sits above .app-header and is added
   in (--app-testmode-h, 0 when the database is live: DATABASE TEST MODE below). */
:root {
  --sticky-header-top: calc(3.5rem + 1px + var(--app-testmode-h)); /* the banner, .app-header's height and its bottom border */
}

/* Opt-out for a screen that genuinely wants the full bleed - a canvas, a
   split-pane workspace that draws its own edges. Put it on the page root. */
.page-flush,
.internal-body:has(> .page-flush),
.nested-customer-body:has(> .page-flush),
.customer-body:has(> .page-flush) {
  padding: 0;
}

/* A Bootstrap .container / .container-fluid used as the page ROOT brings its own
   horizontal gutter (--bs-gutter-x / 2 = 12px), which lands on top of the one
   above. Cancelled at the boundary rather than in each screen, and only for a
   DIRECT child, so containers nested inside a page keep their gutter.
   Padding, not --bs-gutter-x: that variable inherits, and zeroing it here would
   also flatten every .row gutter inside the page. */
.internal-body > .container, .internal-body > .container-fluid,
.nested-customer-body > .container, .nested-customer-body > .container-fluid,
.customer-body > .container, .customer-body > .container-fluid {
  padding-left: 0;
  padding-right: 0;
}

/* DynamicQuestionnaire dynamic questionnaires */
.dq-container {
  /*
  border: 1px solid green; /*dev outline while DynamicQuestionnaire layout is in progress */
}

.dq-question-container { /*
  border: 1px solid blue; dev outline while DynamicQuestionnaire layout is in progress */
                         /* adding a bit of a spacing below the question to separate it from the next question*/
                         margin-bottom: 8px;
}

.rz-navigation-item-text {
  /* make menus a bit "lighter" and compact */
  font-weight: normal;
  font-stretch: normal;
  font-size: small;
  line-height: 1.2;
}

.rz-navigation-item-link {
  /* make menu items closer, compact */
  margin: 0px !important;
}

/* The active row's icon gets NO plate of its own.

   This used to paint #FFEDE4 behind it, from when the selected row was a solid
   plum slab and the icon needed a light chip to stay legible on it. The selected
   row is now a soft plum TINT with plum ink on top, so the icon already contrasts
   with its own row - and the leftover peach was actively harmful in dark mode: the
   plate stayed light while the icon inverted to light, so the selected item was
   the one icon you could not see.

   The collapsed rail keeps a deliberate chip of its own (RadzenNavMenu2.razor.css,
   tooltip mode) for a different reason - there the caption pill slides UNDER the
   icon, so it needs a plate to sit on. That one follows --app-rail. */


/* Question inputs fill the container; selectors target the root element of each
   Radzen input used by the DynamicQuestionnaire question components (Style="" used to go there).
   The container may carry a wi_* width class (section below) that caps how far "100%" can go. */
.dq-question-input .rz-textbox,
.dq-question-input .rz-textarea,
.dq-question-input .rz-numeric,
.dq-question-input .rz-dropdown,
.dq-question-input .rz-datepicker {
  width: 100%;
}

/* Read-only "Text" (non-HTML) DQ answers (Questions/ReadOnly.razor, Questions/ReadOnlyAsync.razor):
   a plain wrapping div instead of a single-line <input>, so long free text (e.g. DQ
   SpinwheelAuthorization's InstructionsOne) wraps to multiple lines instead of being truncated. */
.dq-text-readonly {
  white-space: pre-wrap;
  overflow-wrap: break-word;
}

/* Checkbox questions lay the caption out INLINE, to the right of the box, rather than stacked above it
   like every other question type: a lone box under its caption becomes unreadable as soon as two
   checkboxes sit near each other, because the caption floats between them and neither pairing is
   obvious. Applied by DQQuestionContainer.InnerLayoutClass; a question authored with
   AnswerRelativePositionWithRespectToQuestion = BOTTOM opts out and keeps the stacked layout. */
.dq-inline-check {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  column-gap: 0.5rem;
}

/* order, not DOM order, does the swap: DQQuestionLabel keeps emitting the caption first, so its
   for=/id= association with the input is untouched. */
.dq-inline-check > .dq-question-input {
  order: 0;
  flex: 0 0 auto;
}

.dq-inline-check > .dq-question-label {
  order: 1;
  flex: 0 1 auto;
  margin: 0;
  cursor: pointer;
}

/* validation text and the debug strip belong on their own line under the pair, not beside it */
.dq-inline-check > .dq-question-validation,
.dq-inline-check > .dq-question-debug {
  order: 2;
  flex: 0 0 100%;
}

.dq-question-validation .rz-text-caption {
  color: var(--rz-danger);
  display: block;
}

/* ===== Field width classes — port of the CSWebApp CSWebV2.css question classes =====
   Same class names and widths as CSWebApp on purpose (documented in "Question Classes.md",
   Feature Specifications/Custom Forms (DQ)), so the convention and per-site override knowledge
   apply to both UIs. Bounded fields (SSN, ZIP, dates, phone…) look wrong stretched to the full
   column, so each class caps its element at the field's natural width; width:100% below the cap
   keeps fields responsive on narrow screens (they shrink, never grow past the cap).
   Usage: hand-built forms put the class straight on the Radzen control (or its wrapper div);
   DQ forms get it automatically on .dq-question-input (see DQQuestionContainer.FieldWidthClass). */
.wi_fc_numbers     { --fieldw: 160px; min-width: 100px; }
.wi_fc_numbersdays { --fieldw: 70px;  min-width: 60px;  }
.wi_fg_cspct       { --fieldw: 120px; min-width: 30px;  }
.wi_ig_csc         { --fieldw: 125px; }                    /* currency */
.wi_fc_email       { --fieldw: 300px; min-width: 160px; }
.wi_fc_ssn_ein     { --fieldw: 170px; }
.wi_ig_csphone     { --fieldw: 200px; min-width: 150px; }
.wi_fc_micr        { --fieldw: 280px; }
.wi_fc_d           { --fieldw: 150px; }                    /* Open ShortDate */
.wi_fc_dt          { --fieldw: 190px; }                    /* Open ShortDateAndTime */
.wi_ig_csd         { --fieldw: 155px; }                    /* SearchBox CalendarDateOnly */
.wi_ig_csdt        { --fieldw: 240px; }                    /* SearchBox Calendar (date+time) */
.wi_month_dd       { --fieldw: 170px; }
.wi_day_dd         { --fieldw: 90px;  }
.wi_year_dd        { --fieldw: 85px;  }
.wi_dq_dropdown    { --fieldw: 300px; min-width: 180px; }
/* web-app-only additions, not in the legacy doc table (bounded fields outside DQ forms) */
.wi_fc_zip         { --fieldw: 120px; }                    /* 12345-6789 */
.wi_fc_state       { --fieldw: 70px;  }                    /* 2-letter state */
.wi_dq_searchbox   { --fieldw: 360px; min-width: 220px; }  /* Searchbox ControlType: CSSearchBox field + lookup/clear buttons */
.wi_ctrl_generic_search { --fieldw: 360px; min-width: 220px; }  /* DQ SearchBox mode 7 (DQSearchBox): display field + lookup/clear buttons */

.wi_fc_numbers, .wi_fc_numbersdays, .wi_fg_cspct, .wi_ig_csc, .wi_fc_email,
.wi_fc_ssn_ein, .wi_ig_csphone, .wi_fc_micr, .wi_fc_d, .wi_fc_dt,
.wi_ig_csd, .wi_ig_csdt, .wi_month_dd, .wi_day_dd, .wi_year_dd,
.wi_dq_dropdown, .wi_dq_searchbox, .wi_ctrl_generic_search, .wi_fc_zip, .wi_fc_state {
  width: 100%;
  max-width: var(--fieldw);
}

/* Encrypted open questions render the input and a Clear button side by side: lift the cap off
   the pair and cap the input itself instead (--fieldw inherits down from the wrapper). */
.dq-question-input:has(> .dq-encrypted) { max-width: none; }
.dq-encrypted .rz-textbox { max-width: var(--fieldw, none); }

/* ===== DQ page layout (DQ_FormsV2.PageLayoutHTML) =====
   DQPageLayout renders a form's authored layout and drops each question into the element its
   LayoutDivID names. The layout is plain HTML the administrator writes in the questionnaire designer's
   "Page Layout HTML" tab, so these are the classes it can use on its elements - alongside any Bootstrap
   utility (row, col, d-flex, gap-*). Documented in "DQ Customizable Page Layout.md" (Custom Forms (DQ)).
   Same rule as the FontAwesome tones: these must stay in THIS global sheet. The elements they reach
   belong to the question components, so a scoped .razor.css would compile to .x[b-xxxx] and match nothing. */
.dq-page-layout .dq-question-container { margin-bottom: 0.9rem; }

/* A group of questions. Collapses when every question in it is hidden by its visibility condition,
   so a state that shows none of them leaves no stray gap behind. */
.dq-layout-section { margin-bottom: 0.5rem; }
.dq-layout-section:empty { display: none; }

/* Label to the LEFT of the value, the values aligned on one column. The label column is
   --dq-inline-label-w; widen it per group with style="--dq-inline-label-w: 14rem" on the element. */
.dq-layout-inline .dq-question-container > div:not(.dq-inline-check) {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  column-gap: 0.75rem;
}

.dq-layout-inline .dq-question-label {
  flex: 0 0 var(--dq-inline-label-w, 11rem);
  margin: 0;
  font-weight: 600;
}

.dq-layout-inline .dq-question-input {
  flex: 1 1 12rem;
  min-width: 0;
}

.dq-layout-inline .dq-question-validation,
.dq-layout-inline .dq-question-debug {
  flex: 0 0 100%;
}

/* Questions side by side on one line - a textbox with its button, a row of buttons - aligned on their
   bottom edge, so a button sits level with the input next to it rather than with its label. */
.dq-layout-row,
.dq-layout-buttons {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.5rem 1rem;
}

.dq-layout-row .dq-question-container,
.dq-layout-buttons .dq-question-container {
  margin-bottom: 0;
}

.dq-layout-buttons {
  gap: 0.5rem;
}
/* .dq-layout-buttons-secondary turns the buttons in a group neutral - the rule sits with .wi_btn_secondary. */

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 0.85; }
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Document tree hover and selection behavior: only adds a blue border outline,
   preventing background/color wipes on sent items */
.document-tree .rz-treenode-content:hover .rz-treenode-label {
  background-color: transparent !important;
  color: inherit !important;
}

.document-tree .rz-treenode-content-selected .rz-treenode-label {
  background-color: transparent !important;
  color: inherit !important;
  font-weight: bold !important;
}

.document-tree .rz-treenode-content:hover {
  box-shadow: inset 0 0 0 1px var(--app-primary) !important;
}

.document-tree .rz-treenode-content-selected {
  box-shadow: inset 0 0 0 1.5px var(--app-primary) !important;
}

/* RadzenDatePicker trigger icon: swap the Material "calendar_today" glyph for the Font Awesome
   duotone calendar-days SVG (keeps the icon's own bluegray colors, so a mask isn't used). Applies
   to every date control app-wide for a consistent look. */
.rz-datepicker-trigger .rzi-calendar::before {
  content: none !important;
}
.rz-datepicker-trigger .rzi-calendar {
  display: inline-block;
  width: var(--rz-datepicker-trigger-icon-width);
  height: var(--rz-datepicker-trigger-icon-height);
  /* MASK, not background-image: this is Radzen own trigger element, so there is no markup of
     ours to inline an SvgIcon into - and a background-image paints the file baked palette and
     cannot be retinted, so the date pickers stayed FontAwesome-blue in both themes. */
  background-color: var(--app-icon-1);
  -webkit-mask: url("assets/icons/calendar-daysbluegray.svg") no-repeat center / contain;
  mask: url("assets/icons/calendar-daysbluegray.svg") no-repeat center / contain;
}

/* CSDatePicker: the Today / Tomorrow / Next Week buttons, above the calendar as on the Windows calendar. Radzen renders a
   FooterTemplate last inside .rz-calendar, so the calendar becomes a column and the footer comes first in it. Global, not
   scoped: CSDatePicker is a .cs class with no .razor.css of its own.
   The buttons size to their captions and wrap, not to equal thirds: "Proxima semana" needs more than a third of the popup,
   an .rz-button clips what does not fit, and an agency can reword a caption to anything. */
.rz-calendar:has(> .rz-datepicker-footer > .cs-date-shortcuts) {
  display: flex;
  flex-direction: column;
}
.rz-datepicker-footer:has(> .cs-date-shortcuts) {
  order: -1;
  padding-top: 0.5rem;
}
.cs-date-shortcuts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}
.cs-date-shortcuts .rz-button {
  flex: 1 1 auto;
  white-space: nowrap;
}

/* No alternating (zebra) row striping in any grid, anywhere in the app. CreditSoft rows are
   colored by DATA — appointment types, statuses, queue-visit fades, the backcolor column
   convention — and a parity stripe both fights those colors and implies a meaning that isn't
   there. Radzen's default theme stripes even rows via these two variables on its
   .rz-grid-table-striped class; pointing both at the base background makes every row match.
   (Scoped to the class, not :root, because the chart tooltip hover reuses the stripe var.) */
.rz-grid-table-striped {
  --rz-grid-stripe-background-color: var(--rz-base-background-color);
  --rz-grid-stripe-odd-background-color: var(--rz-base-background-color);
}

/* ---------------------------------------------------------------------------
   Grid header chrome - the toolbar strip Radzen renders above the column headers
   (.rz-group-header): the column picker on the left, the host's HeaderTemplate
   buttons right-aligned.

   GLOBAL, and keyed on .csgrid-chrome rather than .csgrid, because two different
   kinds of grid share it: CSGrid (which carries both classes) and the handful of
   strongly-typed RadzenDataGrids that are not DataTable-shaped and so cannot be
   CSGrid - the payment schedule is the first. Without these rules Radzen's picker
   renders as a full-width "N columns showing" dropdown, which is what made the
   payment schedule's header look nothing like every other grid in the app.

   These cannot live in a scoped .razor.css of the HOST either: every element below
   is Radzen's own markup, so a scoped rule compiles to .rz-column-picker[b-xxxxx]
   and matches nothing.
   --------------------------------------------------------------------------- */

/* DOM order is custom-header -> group panel -> picker, so flex order re-arranges;
   a group panel stays in the middle-left, next to the picker. */
.csgrid-chrome .rz-group-header {
  align-items: center;
}

.csgrid-chrome .rz-column-picker {
  order: -1;
}

.csgrid-chrome .rz-custom-header {
  order: 2;
  margin-left: auto;
}

.csgrid-chrome .rz-column-picker .rz-dropdown {
  width: auto;
  min-width: 0;
  height: auto;
  border: none;
  background: transparent;
  box-shadow: none;
}

.csgrid-chrome .rz-column-picker .rz-dropdown:hover {
  background-color: var(--rz-base-200, #e8e8e8);
  border-radius: 4px;
}

/* Hide the "X columns showing" text (kept for screen readers) and show the picker icon instead.

   MASK, not background-image. This is Radzen's own dropdown internals, so there is no markup of
   ours to hang an inlined SvgIcon on - but a background-image has the same defect as an <img>:
   the file's baked blue-over-grey is painted as-is and CSS cannot reach inside it, which is why
   this one icon stayed FontAwesome-blue after every other icon moved onto the theme.

   A mask uses only the SVG's alpha channel and paints it with background-color, so the glyph
   becomes a single solid tone that follows --app-icon-1 through both themes. Single-tone is the
   right call for a small toolbar affordance anyway; the duotone contract needs real markup. */
.csgrid-chrome .rz-column-picker .rz-dropdown-label {
  width: 28px;
  height: 28px;
  padding: 0;
  overflow: hidden;
  color: transparent;
  font-size: 0;
  background-color: var(--app-icon-1);
  -webkit-mask: url('assets/icons/grid-2-plus_bluegray.svg') center / 18px 18px no-repeat;
  mask: url('assets/icons/grid-2-plus_bluegray.svg') center / 18px 18px no-repeat;
}

.csgrid-chrome .rz-column-picker .rz-dropdown:hover .rz-dropdown-label {
  background-color: var(--app-primary);
}

.csgrid-chrome .rz-column-picker .rz-dropdown-trigger {
  display: none;
}

/* the a11y helper input is in-flow here and would stretch the dropdown back to text width */
.csgrid-chrome .rz-column-picker .rz-helper-hidden-accessible {
  position: absolute;
}

/* The HeaderTemplate button strip. Not prefixed with .csgrid-chrome: the fragment is rendered by
   the host component, so the class alone identifies it wherever it lands. */
.csgrid-header-buttons {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.csgrid-header-buttons .rz-button-icon-left {
  width: 18px;
  height: 18px;
}

/* The toolbar icons are SvgIcon, not Radzen's Image= <img>, so that the duotone tones above can
   drive them. The rule above sizes the <i>; the inlined <svg> carries only a viewBox and needs
   its own size. */
.csgrid-header-buttons .rz-button-icon-left.fa-icon-v7 {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.csgrid-header-buttons .rz-button-icon-left.fa-icon-v7 svg {
  width: 18px;
  height: 18px;
  display: block;
}

/* ---------------------------------------------------------------------------
   Column headers: the reorder handle stays next to its label.

   Radzen draws the column-reorder handle (the vertical dots, .rz-column-drag) first in every
   header cell and lets the title fill the rest. On a left-aligned column that reads as dots, then
   the name. On a right-aligned one - every money and number column - the title pushes its text to
   the far right while the handle stays at the far left, so the dots stood alone at the column's
   left edge and the column read as unnamed (Balance, Original, Collected in the screenshots). Here
   the title shrinks to its text and the free space goes BEFORE the handle, so the pair sits
   together at the right; a centred column centres the pair. Global, because every RadzenDataGrid
   with AllowColumnReorder draws the same handle. The padding reset drops the sort-icon indent
   Radzen gives a right-aligned title, which only made sense while the title filled the cell.
   --------------------------------------------------------------------------- */
.rz-grid-table thead th.rz-text-align-right > div > .rz-column-drag,
.rz-grid-table thead th.rz-text-align-center > div > .rz-column-drag {
  margin-inline: auto 0;
}

.rz-grid-table thead th.rz-text-align-right > div > .rz-column-drag + .rz-column-title,
.rz-grid-table thead th.rz-text-align-center > div > .rz-column-drag + .rz-column-title {
  flex: 0 1 auto;
  width: auto;
  min-width: 0;
  padding-inline-start: 0;
}

.rz-grid-table thead th.rz-text-align-center > div > .rz-column-drag + .rz-column-title {
  margin-inline-end: auto;
}

/* the split button main part renders an &nbsp; text span even without a Text */
.csgrid-header-buttons .rz-splitbutton .rz-button-text {
  display: none;
}

/* the icon button opens the menu itself (AlwaysOpenPopup), so drop the chevron segment */
.csgrid-header-buttons .rz-splitbutton-menubutton {
  display: none;
}

/* "this view/mode is on" highlight - the view toggle's active half, and the filter button while
   the filter row is showing */
.csgrid-header-buttons .csgrid-view-active {
  background-color: var(--rz-base-300, #cbd5e1);
  box-shadow: inset 0 0 0 1px var(--rz-base-400, #94a3b8);
}

/* ---------------------------------------------------------------------------
   Work queues — the collector loop
   (Docs/WorkQueues/WorkQueues-SavedSearch-BlazorPort.md, Phase 3)

   These rules must live HERE and not in CSGrid.razor.css. A scoped stylesheet only
   attributes elements that appear in the component's own markup, and every one of these
   targets a <tr>/<td> that RadzenDataGrid renders inside CSGrid — a scoped rule would
   never match. (The plan records an earlier design that made exactly this mistake.)
   --------------------------------------------------------------------------- */

/* The keyboard cursor. Left bar rather than a background, so it stays legible on top of a
   row the queue's own SQL coloured and on top of the already-worked grey below. */
.csgrid .rz-grid-table > tbody > tr.csgrid-row-focused > td {
  box-shadow: inset 0 -1px 0 var(--rz-primary), inset 0 1px 0 var(--rz-primary);
}

.csgrid .rz-grid-table > tbody > tr.csgrid-row-focused > td:first-child {
  box-shadow: inset 3px 0 0 var(--rz-primary),
              inset 0 -1px 0 var(--rz-primary),
              inset 0 1px 0 var(--rz-primary);
}

.csgrid:focus {
  outline: none;
}

.csgrid:focus-visible {
  outline: 2px solid var(--rz-primary);
  outline-offset: 2px;
}

/* A row the host marks as not in use (a suspended bank account, an expired or inactive card),
   through the cssclass column convention. Global for the same reason as the cursor above. The
   !important matches the data-driven row colour rule in CSGrid.razor.css, which the theme's opaque
   td background would otherwise hide. */
.csgrid .rz-grid-table > tbody > tr.cs-row-inactive > td {
  background-color: var(--rz-base-300) !important;
}

/* A row that failed (cs-row-error) or needs a look (cs-row-warning) - e.g. a document batch recipient whose documents
   failed validation or sending. Theme tints, so they follow the dark theme; same !important reason as above. */
.csgrid .rz-grid-table > tbody > tr.cs-row-error > td {
  background-color: var(--rz-danger-lighter) !important;
}

.csgrid .rz-grid-table > tbody > tr.cs-row-warning > td {
  background-color: var(--rz-warning-lighter) !important;
}

/* ---------------------------------------------------------------------------
   CSContextMenu - the standard grid row menu (Components/Shared/Controls/CSContextMenu.razor).
   Global, not scoped: the items are RadzenMenuItem markup, which carries no scope attribute.
   --------------------------------------------------------------------------- */
.rz-context-menu .cs-context-menu .cs-context-menu-icon {
  font-size: 1rem;
  margin-inline-end: 0.5rem;
  vertical-align: middle;
}

.rz-context-menu .cs-context-menu .cs-context-menu-separator {
  list-style: none;
  height: 1px;
  margin: 0.25rem 0;
  padding: 0;
  background-color: var(--rz-base-300);
}

/* Delete is always last, below the separator, and red - text and both icon tones. */
.rz-context-menu .cs-context-menu .cs-context-menu-danger .rz-navigation-item-text {
  color: var(--rz-danger);
}

.rz-context-menu .cs-context-menu .cs-context-menu-danger .cs-context-menu-icon {
  --fa-primary-color: var(--rz-danger);
  --fa-secondary-color: var(--rz-danger);
  color: var(--rz-danger);
}

/* The record Actions menu (Components/Shared/Actions/ActionsMenu.razor): CSContextMenu's look, with
   the built-in verbs first, a height cap for an agency with many rules, and the reason an entry
   does not apply on a second line under it. */
.rz-context-menu .actions-menu {
  min-width: 14rem;
  max-width: 26rem;
  max-height: min(70vh, 34rem);
  overflow-y: auto;
}

.rz-context-menu .actions-menu .actions-menu-text {
  display: inline-flex;
  flex-direction: column;
  vertical-align: middle;
  white-space: normal;
}

.rz-context-menu .actions-menu .actions-menu-why {
  font-size: 0.75rem;
  line-height: 1.25;
  color: var(--app-ink-3);
}

/* The three dots at the end of a record header (ActionsButton). Icon only, so it is given a square
   hit area of the small button's height and the ink of the header's text. */
.rz-button.actions-kebab {
  min-width: 2rem;
  padding-inline: 0.25rem;
  color: var(--app-ink);
}

.rz-button.actions-kebab .fa-icon-v7 {
  font-size: 1.1rem;
}

/* "Already worked" fade. Ported verbatim from CSWebApp/CSWebV2.css, where the shades have
   existed since v11 and nothing has ever applied them — the legacy portal defines the classes
   and leaves it to each agency's saved-search SQL to emit them, which no deployed search does.
   QueueVisitService picks the level: darkest right after the row was worked, one step lighter
   an hour, gone after 13. There is no wi_gray_14 — the plan quotes 1..14, the stylesheet
   stops at 13. */
.csgrid .rz-grid-table > tbody > tr.wi_gray_1 > td { background-color: #F8F8F8 !important; }
.csgrid .rz-grid-table > tbody > tr.wi_gray_2 > td { background-color: #F0F0F0 !important; }
.csgrid .rz-grid-table > tbody > tr.wi_gray_3 > td { background-color: #E8E8E8 !important; }
.csgrid .rz-grid-table > tbody > tr.wi_gray_4 > td { background-color: #E0E0E0 !important; }
.csgrid .rz-grid-table > tbody > tr.wi_gray_5 > td { background-color: #D8D8D8 !important; }
.csgrid .rz-grid-table > tbody > tr.wi_gray_6 > td { background-color: #D0D0D0 !important; }
.csgrid .rz-grid-table > tbody > tr.wi_gray_7 > td { background-color: #C8C8C8 !important; }
.csgrid .rz-grid-table > tbody > tr.wi_gray_8 > td { background-color: #C0C0C0 !important; }
.csgrid .rz-grid-table > tbody > tr.wi_gray_9 > td { background-color: #B8B8B8 !important; }
.csgrid .rz-grid-table > tbody > tr.wi_gray_10 > td { background-color: #B0B0B0 !important; }
.csgrid .rz-grid-table > tbody > tr.wi_gray_11 > td { background-color: #A8A8A8 !important; }
.csgrid .rz-grid-table > tbody > tr.wi_gray_12 > td { background-color: #A0A0A0 !important; }
.csgrid .rz-grid-table > tbody > tr.wi_gray_13 > td { background-color: #989898 !important; }

/* The thirteen shades above are fixed light greys, so the ink on them has to be fixed too - the
   dark theme's light ink on #F8F8F8 is the same unreadable pairing the data-driven row colors
   had. Radzen's .rz-cell-data carries its own color, hence the second selector; see the matching
   note in CSGrid.razor.css. */
.csgrid .rz-grid-table > tbody > tr[class*="wi_gray_"] > td,
.csgrid.csgrid-cards .rz-grid-table > tbody > tr[class*="wi_gray_"] > td {
  color: #000000;
}

.csgrid .rz-grid-table > tbody > tr[class*="wi_gray_"] > td .rz-cell-data {
  color: inherit;
}

/* A link inside a data-coloured grid row, DARK THEME ONLY.

   The theme's link colour is chosen for the theme's own surface; a data-driven backcolor is not
   that surface. Under the dark theme the pale plum (#C79BD4) landing on a white AccountStatus row
   is 1.9:1 - the same "light on light" failure as the cell text, one layer down. So the link takes
   the row's own ink, which CSGridModel.BuildStyle has already picked to contrast with that fill.
   The row still reads as a link because .csgrid-command underlines unconditionally, deliberately
   (see the note on that rule in CSGrid.razor.css).

   Guarded to dark because under the LIGHT theme there is nothing to fix: the plum is already a
   light-surface colour, which is exactly what a data-coloured row is. Both guards are needed for
   the same reason the palette needs them - "system" stamps no attribute, an explicit choice does. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .csgrid tr[style*="background-color"] > td a,
  :root:not([data-theme="light"]) .csgrid tr[style*="background-color"] > td a:hover,
  :root:not([data-theme="light"]) .csgrid td[style*="background-color"] a,
  :root:not([data-theme="light"]) .csgrid td[style*="background-color"] a:hover {
    color: inherit;
  }
}

:root[data-theme="dark"] .csgrid tr[style*="background-color"] > td a,
:root[data-theme="dark"] .csgrid tr[style*="background-color"] > td a:hover,
:root[data-theme="dark"] .csgrid td[style*="background-color"] a,
:root[data-theme="dark"] .csgrid td[style*="background-color"] a:hover {
  color: inherit;
}

/* Card view renders each row as a block. The shade goes on the block and the cells inherit it,
   rather than thirteen more rules painting individual cells inside a card. */
.csgrid.csgrid-cards .rz-grid-table > tbody > tr[class*="wi_gray_"] > td {
  background-color: inherit !important;
}

.csgrid.csgrid-cards .rz-grid-table > tbody > tr[class*="wi_gray_"] {
  background-color: #E8E8E8;
}

/* The untouched-row marker. The Last Visited cell is genuinely empty on a row nobody has
   opened — the column stays a real datetime so it sorts and filters — so the label is drawn
   by CSS rather than written into the data. Bold orange is the legacy portal's own rendering
   (SavedSearch.aspx.vb:527-530). */
.csgrid td.wi_queue_new::after {
  content: "*New*";
  color: #d97706;
  font-weight: 600;
}

/* Triage drawer: a column beside the grid on wide screens, a full-width panel below it on
   narrow ones (never a modal — the point is to keep the queue on screen). */
.queue-drawer {
  border-left: 1px solid var(--rz-base-300, #dee2e6);
  background: var(--rz-base-background-color, #fff);
  max-height: calc(100vh - 6rem);
  overflow-y: auto;
  position: sticky;
  top: 0.5rem;
}

.queue-drawer .queue-drawer-note {
  max-height: 9rem;
  overflow-y: auto;
  font-size: 0.85rem;
}

.queue-shortcut-key {
  display: inline-block;
  min-width: 1.6rem;
  padding: 0 0.35rem;
  border: 1px solid var(--rz-base-400, #adb5bd);
  border-bottom-width: 2px;
  border-radius: 0.25rem;
  font-family: var(--bs-font-monospace, monospace);
  font-size: 0.8rem;
  text-align: center;
}

/* ==========================================================================
   Charts - ChartRenderer (the dashboard's chart widget, the DQ chart question, the AI Chart
   Assistant's preview) and ChartPalette.
   Global, not scoped: the chart library draws the marks, the axes and the legend, so none of those
   elements carries a component's scope attribute.
   ========================================================================== */

/* The chart tokens a scheme does NOT set, because each follows from one it does. They are kept out of
   the palette block at the top of this file for that reason: that block is the list of what a scheme
   has to restate.
   - good / pending / bad: an outcome series wears the status colour that names it - the same green and
     red as everywhere else in the application - and the neutral, a step towards the surface so that it
     stands back from the two that passed judgement, for "no outcome yet".
   - 9 to 16: a ninth series is the first slot a step towards the surface, a tenth the second, and so
     on. They are told apart from 1 to 8 by lightness, and by the legend. */
:root {
  --app-chart-good:    var(--app-success);
  --app-chart-pending: color-mix(in oklab, var(--app-neutral) 70%, var(--app-surface));
  --app-chart-bad:     var(--app-danger);

  --app-chart-9:  color-mix(in oklab, var(--app-chart-1) 50%, var(--app-surface));
  --app-chart-10: color-mix(in oklab, var(--app-chart-2) 50%, var(--app-surface));
  --app-chart-11: color-mix(in oklab, var(--app-chart-3) 50%, var(--app-surface));
  --app-chart-12: color-mix(in oklab, var(--app-chart-4) 50%, var(--app-surface));
  --app-chart-13: color-mix(in oklab, var(--app-chart-5) 50%, var(--app-surface));
  --app-chart-14: color-mix(in oklab, var(--app-chart-6) 50%, var(--app-surface));
  --app-chart-15: color-mix(in oklab, var(--app-chart-7) 50%, var(--app-surface));
  --app-chart-16: color-mix(in oklab, var(--app-chart-8) 50%, var(--app-surface));
}

.dq-chart-title {
  margin-bottom: 0.25rem;
  text-align: center;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--app-ink);
}

/* Axes and grid recede: the marks are the only thing in a chart allowed to be loud. Text wears ink
   tokens, never a series colour. */
.dq-chart .rz-tick-text {
  font-size: 0.75rem;
  fill: var(--app-ink-2);
}

.dq-chart .rz-grid-line {
  stroke: var(--app-rule);
}

.dq-chart .rz-axis .rz-line,
.dq-chart .rz-tick-line {
  stroke: var(--app-rule-strong);
}

.dq-chart .rz-legend-item-text {
  font-size: 0.8rem;
  color: var(--app-ink);
}

.dq-chart .rz-series-data-label {
  font-size: 0.75rem;
  fill: var(--app-ink);
}

/* A pie's legend (ChartRenderer): laid out by the browser beside or under the plot, so it takes the room its
   rows need. RadzenChart keeps a fixed 30px for its own legend at the top or the bottom, and drew every row past
   the first over the slices. ChartRenderer.PiePlotStyle counts one row of it (a 1rem line and the 0.5rem gap)
   and the title's 1.6rem: keep the two in step. */
.chart-pie {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* Beside the plot. In a card too narrow to keep the plot 12rem wide, the legend goes under it. */
.chart-pie-left,
.chart-pie-right {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
}

.chart-pie-plot {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
}

.chart-pie-left .chart-pie-plot,
.chart-pie-right .chart-pie-plot {
  flex: 1 1 12rem;
  align-self: stretch;
}

/* Past eight rows the list scrolls: a pie of dozens of slices must not stretch its card without end. */
.chart-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.25rem 1rem;
  max-height: 10.75rem;
  margin: 0;
  padding: 0;
  overflow-y: auto;
  list-style: none;
}

/* A column that scrolls starts at the top: centred, it would push its first entries above the scroll area, where
   nothing can reach them. The row (align-items) is what centres a short legend beside the pie. */
.chart-pie-left .chart-legend,
.chart-pie-right .chart-legend {
  flex: 0 1 auto;
  flex-direction: column;
  flex-wrap: nowrap;
  justify-content: flex-start;
  max-width: 100%;
  max-height: 16rem;
}

.chart-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
  font-size: 0.8rem;
  line-height: 1.25;
  color: var(--app-ink);
}

.chart-legend-swatch {
  flex: none;
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 2px;
}

.chart-legend-text {
  overflow-wrap: anywhere;
}

.chart-tip {
  font-size: 0.8rem;
  line-height: 1.35;
}

.chart-tip-label {
  font-weight: 600;
}

/* An empty chart: the space the chart would have taken, a quiet glyph and one sentence. */
.chart-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  height: 100%;
  padding: 1rem;
  text-align: center;
  color: var(--app-ink-3);
}

.chart-empty-icon,
.chart-empty-icon svg {
  width: 1.75rem;
  height: 1.75rem;
}

.chart-empty-icon {
  --fa-primary-color: var(--app-base-500);
  --fa-secondary-color: var(--app-base-400);
  color: var(--app-base-500);
}

.chart-empty-text {
  font-size: 0.85rem;
}

/* ==========================================================================
   Dashboard canvas (/dashboard "My board") — DashboardCanvas, DashboardWidgetFrame, WidgetQueues.
   Shared here rather than in scoped .razor.css files because the three components render one visual
   family and .dash-empty is used by all of them.
   ========================================================================== */

/* The persona picker: a segmented control, not a dropdown. There are only ever four, switching is the
   point rather than an edge case, and the current one has to be readable at a glance. */
.dash-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
}

.dash-persona {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.15rem;
  padding: 0.15rem;
  border: 1px solid var(--rz-base-300, #dee2e6);
  border-radius: 999px;
  background: var(--rz-base-50, #f8f9fa);
}

.dash-persona-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border: 0;
  border-radius: 999px;
  padding: 0.25rem 0.75rem;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--rz-text-secondary-color, #6c757d);
  background: transparent;
  cursor: pointer;
}

.dash-persona-btn .rzi {
  font-size: 1rem;
}

.dash-persona-btn:hover:not(.is-on):not(:disabled) {
  background: var(--rz-base-200, #e9ecef);
}

.dash-persona-btn.is-on {
  color: var(--rz-primary);
  background: var(--rz-base-background-color, #fff);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
}

.dash-persona-btn:disabled {
  cursor: default;
  opacity: 0.7;
}

/* On a phone the label alone is enough — four icon+label pills overflow a 375px viewport. */
@media (max-width: 575.98px) {
  .dash-persona {
    width: 100%;
    justify-content: space-between;
  }

  .dash-persona-btn {
    padding: 0.25rem 0.5rem;
  }

  .dash-persona-btn .rzi {
    display: none;
  }
}

.dash-board-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}

.dash-widget {
  display: flex;
  flex-direction: column;
  height: 100%;
  border: 1px solid var(--rz-base-300, #dee2e6);
  border-radius: 0.5rem;
  background: var(--rz-base-background-color, #fff);
  overflow: hidden;
}

.dash-widget.is-collapsed {
  height: auto;
}

.dash-widget-head {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.5rem 0.4rem 0.7rem;
  border-bottom: 1px solid var(--rz-base-200, #e9ecef);
  background: var(--rz-base-50, #f8f9fa);
}

.dash-widget.is-collapsed .dash-widget-head {
  border-bottom: 0;
}

.dash-widget-title {
  flex: 1;
  min-width: 0;
  margin: 0;
  font-size: 0.85rem;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dash-widget-kind {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--rz-text-secondary-color, #6c757d);
  border: 1px solid var(--rz-base-300, #dee2e6);
  border-radius: 0.2rem;
  padding: 0 0.3rem;
  flex: none;
}

.dash-widget-actions {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  flex: none;
}

.dash-widget-body {
  padding: 0.5rem;
  flex: 1;
}

/* Dashed outline while editing, so it is obvious which surface the controls act on. */
.dash-editing .dash-widget {
  border-style: dashed;
  border-color: var(--rz-primary-light);
}

/* --- Agency custom-form slots (P7) ---------------------------------------------------------------
   A slot element only exists when the agency actually has that form, so its spacing lives here rather
   than on a wrapper div in DashboardView — a wrapper would reserve margin on the usual empty case. */
.dash-slot {
  margin-top: 1rem;
  border: 1px solid var(--rz-base-300, #dee2e6);
  border-radius: 0.5rem;
  background: var(--rz-base-background-color, #fff);
  overflow: hidden;
}

.dash-slot-head {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.5rem 0.4rem 0.7rem;
  border-bottom: 1px solid var(--rz-base-200, #e9ecef);
  background: var(--rz-base-50, #f8f9fa);
}

.dash-slot.is-collapsed .dash-slot-head {
  border-bottom: 0;
}

.dash-slot-title {
  flex: 1;
  min-width: 0;
  margin: 0;
  font-size: 0.85rem;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* The DQ engine brings its own Bootstrap .container and .card. Inside a slot that reads as a card in a
   card, and the container's max-width would centre a narrow form in a full-width slot. Scoped to
   .dash-slot-body so no other DQ host is affected. */
.dash-slot-body .wi_dqform_container {
  max-width: none;
  padding: 0;
}

.dash-slot-body .wi_dq_card {
  border-radius: 0;
  box-shadow: none !important;
}

.dash-palette {
  border: 1px dashed var(--rz-primary-light);
  border-radius: 0.5rem;
  padding: 0.75rem 0.9rem;
  margin-bottom: 0.9rem;
  background: var(--rz-base-50, #f8f9fa);
}

.dash-palette-group + .dash-palette-group {
  margin-top: 0.6rem;
}

.dash-palette-cat {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--rz-text-secondary-color, #6c757d);
  margin-bottom: 0.3rem;
}

.dash-queue-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.dash-queue-list li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.3rem 0.35rem;
  border-radius: 0.25rem;
  cursor: pointer;
}

.dash-queue-list li:hover,
.dash-queue-list li:focus-visible {
  background: var(--rz-base-100, #f1f3f5);
}

.dash-queue-name {
  flex: 1;
  min-width: 0;
  font-size: 0.8rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dash-empty {
  padding: 0.9rem 0.5rem;
  text-align: center;
  font-size: 0.8rem;
  color: var(--rz-text-secondary-color, #6c757d);
}

/* --------------------------------------------------------------------------
   Dashboard "Today" spine — DashboardToday, DashboardIndicatorStrip.
   Severity is carried by shape (chip, stripe) as well as colour, so the page still reads correctly
   without relying on colour alone.
   -------------------------------------------------------------------------- */

.dash-today {
  border: 1px solid var(--rz-base-300, #dee2e6);
  border-radius: 0.5rem;
  background: var(--rz-base-background-color, #fff);
  overflow: hidden;
  height: 100%;
}

.dash-rail {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
  padding: 0.5rem 0.6rem;
  border-bottom: 1px solid var(--rz-base-200, #e9ecef);
  background: var(--rz-base-50, #f8f9fa);
}

.dash-rail-label {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--rz-text-secondary-color, #6c757d);
}

.dash-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border: 1px solid;
  border-radius: 999px;
  padding: 0.15rem 0.6rem;
  font: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  background: var(--rz-base-background-color, #fff);
  cursor: pointer;
}

.dash-chip .dash-chip-n {
  font-size: 0.85rem;
  font-weight: 700;
}

.dash-chip.is-on {
  box-shadow: 0 0 0 2px rgba(31, 95, 139, 0.25);
}

.dash-chip-crit {
  border-color: var(--app-danger-soft);
  background: var(--app-danger-soft);
  color: var(--app-danger-ink);
}

.dash-chip-due {
  border-color: var(--app-warning-soft);
  background: var(--app-warning-soft);
  color: var(--app-warning-ink);
}

.dash-chip-calm {
  border-color: var(--rz-base-300, #dee2e6);
  color: var(--rz-text-secondary-color, #6c757d);
}

.dash-clear {
  font-size: 0.75rem;
  font-weight: 600;
  color: #2c6e49;
}

.dash-today-body {
  padding: 0.6rem;
}

.dash-today-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
}

.dash-todo {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.dash-todo li {
  display: grid;
  grid-template-columns: 4px auto 1fr auto;
  align-items: center;
  gap: 0 0.55rem;
  padding: 0.35rem 0.3rem;
  border-bottom: 1px solid var(--rz-base-200, #e9ecef);
}

.dash-todo li:last-child {
  border-bottom: 0;
}

.dash-todo li.is-link {
  cursor: pointer;
  border-radius: 0.25rem;
}

.dash-todo li.is-link:hover,
.dash-todo li.is-link:focus-visible {
  background: var(--rz-base-100, #f1f3f5);
}

.dash-todo-stripe {
  width: 4px;
  height: 1.6rem;
  border-radius: 2px;
  background: var(--rz-base-300, #dee2e6);
}

.dash-todo-overdue .dash-todo-stripe { background: var(--app-danger); }
.dash-todo-today .dash-todo-stripe { background: var(--app-warning); }

/* SvgIcon now, so font-size drives the size (the inner svg is sized in em). Colour has to be set
   BOTH ways: a duotone icon paints from the two variables, while a single-tone one (the FA solid
   exports) paints fill="currentColor" and follows plain color. Setting only the variables left
   these rendering the inherited near-black instead of grey/red/amber. */
.dash-todo-icon {
  font-size: 1rem;
  color: var(--rz-text-secondary-color, #6c757d);
  --fa-primary-color: var(--rz-text-secondary-color, #6c757d);
  --fa-secondary-color: var(--rz-text-secondary-color, #6c757d);
}

.dash-todo-overdue .dash-todo-icon { color: var(--app-danger); --fa-primary-color: var(--app-danger); --fa-secondary-color: var(--app-danger); }
.dash-todo-today .dash-todo-icon { color: var(--app-warning); --fa-primary-color: var(--app-warning); --fa-secondary-color: var(--app-warning); }

.dash-todo-main {
  min-width: 0;
}

.dash-todo-text {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dash-todo-sub {
  display: block;
  margin-top: 0.05rem;
}

.dash-todo-tag {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.05rem 0.3rem;
  border-radius: 0.2rem;
  background: var(--rz-base-100, #f1f3f5);
  color: var(--rz-text-secondary-color, #6c757d);
}

.dash-todo-overdue .dash-todo-tag { background: var(--app-danger-soft); color: var(--app-danger-ink); }
.dash-todo-today .dash-todo-tag { background: var(--app-warning-soft); color: var(--app-warning-ink); }

/* A group session's places taken, beside its tag ("5 of 12 places taken") */
.dash-todo-count {
  margin-left: 0.4rem;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--rz-text-secondary-color, #6c757d);
  white-space: nowrap;
}

.dash-todo-when {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--rz-text-secondary-color, #6c757d);
  white-space: nowrap;
}

.dash-todo-overdue .dash-todo-when { color: var(--app-danger); }

/* KPI strip */
.dash-kpi-head {
  margin-bottom: 0.5rem;
}

.dash-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr));
  gap: 0.5rem;
}

.dash-kpi {
  border: 1px solid var(--rz-base-300, #dee2e6);
  border-radius: 0.5rem;
  padding: 0.5rem 0.6rem;
  background: var(--rz-base-background-color, #fff);
}

.dash-kpi.is-failed {
  border-style: dashed;
}

/* A number that opens its work queue (Indicators.DrillDownSavedSearchID). */
a.dash-kpi-link {
  display: block;
  color: inherit;
  text-decoration: none;
}

a.dash-kpi-link:hover,
a.dash-kpi-link:focus-visible {
  border-color: var(--rz-primary, #0d6efd);
  background: var(--rz-base-100, #f8f9fa);
}

a.dash-kpi-link:hover .dash-kpi-name {
  text-decoration: underline;
}

.dash-kpi-value {
  font-size: 1.3rem;
  font-weight: 700;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
}

.dash-kpi-name {
  font-size: 0.72rem;
  color: var(--rz-text-secondary-color, #6c757d);
}

/* Bulletin board widget (MainComments) */
.dash-bulletin {
  font-size: 0.85rem;
  line-height: 1.5;
  overflow-x: auto;
}

.dash-bulletin img {
  max-width: 100%;
  height: auto;
}

.dash-bulletin-edit {
  margin-top: 0.6rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--rz-base-200, #e9ecef);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  font-size: 0.72rem;
}

/* Manager scope toggle + team item owner (Today spine) */
.dash-scope {
  display: inline-flex;
  gap: 0.2rem;
  align-items: center;
}

.dash-todo-owner {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.05rem 0.3rem;
  margin-left: 0.3rem;
  border-radius: 0.2rem;
  border: 1px solid var(--rz-base-300, #dee2e6);
  color: var(--rz-text-secondary-color, #6c757d);
}

/* AI briefing card (Today spine)

   Tinted rather than plain, so it reads as the one generated card on the spine -
   but the tint now comes from the plum family the label and the rank chips
   already use. It was a hardcoded pale blue, which is the one thing the palette
   rules out: a literal does not flip, so the card stayed light while everything
   around it went dark. */
.dash-ai {
  border: 1px solid var(--app-primary-soft);
  border-radius: 0.5rem;
  background: linear-gradient(180deg, var(--app-primary-softer), var(--app-surface));
  padding: 0.6rem 0.7rem;
}

.dash-ai-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.dash-ai-label {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--app-primary);
}

.dash-ai-asof,
.dash-ai-foot span {
  font-size: 0.68rem;
  color: var(--rz-text-secondary-color, #6c757d);
}

.dash-ai-running {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  color: var(--rz-text-secondary-color, #6c757d);
  padding: 0.5rem 0;
}

.dash-ai-empty {
  font-size: 0.78rem;
  color: var(--rz-text-secondary-color, #6c757d);
  padding: 0.5rem 0;
}

.dash-ai-list {
  list-style: none;
  margin: 0.5rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.dash-ai-list li {
  display: grid;
  grid-template-columns: 1.2rem 1fr;
  gap: 0.5rem;
  font-size: 0.78rem;
  line-height: 1.45;
}

.dash-ai-rank {
  width: 1.2rem;
  height: 1.2rem;
  border-radius: 0.25rem;
  background: var(--app-primary);
  color: var(--app-on-primary);   /* not white: the fill is light in the dark theme */
  font-size: 0.68rem;
  font-weight: 700;
  display: grid;
  place-items: center;
}

.dash-ai-title {
  font-weight: 600;
}

.dash-ai-why {
  display: block;
  color: var(--rz-text-secondary-color, #6c757d);
}

.dash-ai-foot {
  margin-top: 0.6rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--app-primary-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* Dashboard filter bar */
.dash-filters {
  border: 1px solid var(--rz-base-300, #dee2e6);
  border-radius: 0.5rem;
  background: var(--rz-base-50, #f8f9fa);
  padding: 0.4rem 0.6rem;
  margin-bottom: 0.9rem;
}

.dash-filters-head {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.dash-filters-summary {
  font-size: 0.75rem;
  color: var(--rz-text-secondary-color, #6c757d);
  flex: 1;
  min-width: 0;
}

.dash-filters-body {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding-top: 0.6rem;
  margin-top: 0.5rem;
  border-top: 1px solid var(--rz-base-200, #e9ecef);
}

.dash-filter {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.dash-filter-label {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--rz-text-secondary-color, #6c757d);
}

.dash-filter-range {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

/* A flex column that holds a grid must be allowed to SHRINK below the grid's natural width.
   A flex item's implicit min-width is its min-content size, and a many-column CSGrid's
   min-content easily exceeds 2000px - wider than the space beside the queue rail - so without
   this the .col refuses to fit, the .row wraps, and the whole workspace lands BELOW the rail
   with the right half of a large screen empty. The grid then scrolls horizontally inside its
   own container, which is exactly what AllowHorizontalScroll is for. */
.col-shrinkable {
  min-width: 0;
}

/* Payment Schedule Templates editor (System Setup > Client). Global rather than scoped because the
   same form layout is shared by the five-tab editor and its three modal sub-editors, and Blazor
   scopes an isolated stylesheet to one component only - four near-identical copies would drift. */
.pstd-form {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 0.5rem 0.25rem;
}

.pstd-field {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
}

/* The label column is fixed so the inputs line up down the form the way the desktop's absolute
   positioning did, and wide enough for the longest caption ("Settlement Fee Default Percentage
   from Balance:"). */
.pstd-field > label {
  flex: 0 0 19rem;
  padding-top: 0.35rem;
  font-size: 0.875rem;
}

.pstd-checks {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: 19.6rem;
}

.pstd-fieldset {
  margin-left: 19.6rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--rz-base-300, #dee2e6);
  border-radius: 0.25rem;
}

.pstd-fieldset > legend {
  float: none;
  width: auto;
  padding: 0 0.35rem;
  font-size: 0.8125rem;
  color: var(--rz-text-secondary-color, #6c757d);
}

/* The editor's own toolbar, above the tab strip: every action that belongs to the WHOLE template
   (Make Default, Create Copy, Script, Delete) rather than to the tab in front. This is where a
   list-plus-eye-plus-popup screen puts its record actions - the list keeps only Add. Right-aligned
   so it does not compete with the first tab for the eye. */
.pstd-topbar {
  display: flex;
  justify-content: flex-end;
  gap: 0.375rem;
  margin-bottom: 0.4rem;
}

/* Delete is last and set apart from the benign actions, so it is not clipped on the way to Script. */
.pstd-topbar .pstd-danger {
  margin-left: 0.75rem;
}

/* Toolbar above the two child grids - the desktop's ToolStrip2 / ToolStrip3. */
.pstd-gridbar {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  margin-bottom: 0.5rem;
}

.pstd-footer {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.5rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--rz-base-200, #e9ecef);
  margin-top: 0.5rem;
}

/* A SQL formula field. The template editors store formulas, not amounts - real ones run to four or
   five lines of SELECT with joins - so these stack the label ABOVE a wide monospace box instead of
   using the 19rem label column, which left about a third of the dialog for the SQL itself. */
.pstd-formula {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.pstd-formula > label {
  font-size: 0.875rem;
  font-weight: 600;
}

.pstd-formula textarea {
  width: 100%;
  min-height: 9rem;
  /* Drag-to-grow: a formula longer than the box is common and the dialog cannot guess how long. */
  resize: vertical;
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.8125rem;
  line-height: 1.45;
  white-space: pre;
  overflow-wrap: normal;
  overflow-x: auto;
}

/* The check-syntax button sits under its box rather than beside it, so the box keeps the full width. */
.pstd-formula-actions {
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

/* ==========================================================================
   Legacy content compatibility (Landing Pages plan P4, defect ledger #38)

   The classic portal's landing content files are styled almost entirely with four wi_* classes,
   and an agency migrating one into Home_Main / Enroll_Main / Start_Main by copy-and-paste brings
   the class names with it. Without these rules that content renders as unstyled default serif -
   the migration LOOKS like it failed, on the front door of the site, and the obvious "fix" is to
   strip the markup back, which loses the agency's structure for good.

   Copied from CSWebApp\CSMasterStylesV2.css (the two text classes) and CSWebApp\CSWebV2.css (the
   two button classes) so migrated content keeps the size, spacing and colour it had. Deliberately
   a small closed set matching what the shipped ContentV2 files actually use, not a port of either
   stylesheet: everything else those files rely on is plain HTML or Bootstrap, which this app has.

   Do NOT scope these to .web-content-area. The same class names appear in the InternetMenus
   custom-content panels, which have exactly the same migration problem.
   ========================================================================== */

/* Body text in a migrated content file. */
.wi_loginwelcometext {
  font-size: 14px;
  padding-bottom: 10px;
}

/* Same, in the classic portal's heading blue. */
.wi_loginwelcometextblue {
  font-size: 14px;
  padding-top: 5px;
  padding-bottom: 15px;
  color: var(--app-primary-ink);
}

/* A call-to-action link or button inside migrated content. The legacy rule targeted an <input>
   painted by WebForms; here it is normally an <a>, so it needs the pieces a bare anchor lacks -
   inline-block, no underline, and a pointer - which the WebForms control got for free. */
.wi_button {
  display: inline-block;
  background: var(--app-primary);
  color: var(--app-on-primary);
  text-decoration: none;
  cursor: pointer;
  padding: 5px;
  border: none !important;
  border-radius: 5px;
  margin: 5px;
  min-width: 95px;
  width: auto;
  text-align: center;
}

.wi_button:hover,
.wi_button:focus {
  /* The token, not white: in the dark theme --app-primary is a LIGHT fill, and white on it was 2.3:1. */
  color: var(--app-on-primary);
  text-decoration: none;
}

/* Pairs with Bootstrap's .btn in the shipped Enrollment.htm, which supplies everything but the
   text colour. */
.wi_register_button {
  color: #fff !important;
}
.wi_hidden {
  display: none;
}
/* ==========================================================================
   Enhanced-navigation progress bar (#icco-nav-progress, declared in App.razor)

   Routes is static SSR, so EVERY page change - a link, or a NavigateTo from an
   interactive component - is an enhanced navigation: a fetch of the whole new
   page. The browser shows nothing for one of those (no tab spinner, no cursor
   change), so a page that takes a second to render simply looks frozen, which
   is what the account grid -> account detail hop looked like.

   The element ships hidden and is activated by JS; it is declared in App.razor
   rather than created on the fly because enhanced navigation removes body nodes
   the incoming document does not have.
   ========================================================================== */
.icco-nav-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 2000; /* above the sticky app header and the Radzen menus, below dialogs */
  pointer-events: none;
  opacity: 0;
  transition: opacity .15s linear;
}

/* Appears instantly - the script already held it back 150ms, and fading in on top of that would
   make it miss short navigations entirely. Only the fade OUT is animated. */
.icco-nav-progress.active {
  opacity: 1;
  transition: none;
}

/* Indeterminate: there is no progress to report - the server is either still
   working or streaming - so the bar sweeps rather than filling. */
.icco-nav-progress .icco-nav-progress-bar {
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, rgba(var(--app-primary-rgb), 0) 0%, var(--app-primary) 45%, var(--app-primary-light) 55%, rgba(var(--app-primary-rgb), 0) 100%);
  transform: translateX(-100%);
}

.icco-nav-progress.active .icco-nav-progress-bar {
  animation: icco-nav-progress-sweep 1.1s ease-in-out infinite;
}

@keyframes icco-nav-progress-sweep {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* Second, quieter signal for a user whose eyes are on the row they just clicked
   rather than on the top of the window. */
body.icco-navigating {
  cursor: progress;
}

@media (prefers-reduced-motion: reduce) {
  .icco-nav-progress.active .icco-nav-progress-bar {
    animation: none;
    transform: none;
    background: var(--app-primary);
  }
}

/* ============================================================================
   DATABASE TEST MODE (Components/Shared/DatabaseTestModeBanner.razor, rendered by App.razor)

   A yellow strip with black words across the top of every page while the database is in test mode
   (DatabaseTestModeEnabled above 0). It parks at the top of the window, and --app-testmode-h is its
   height: 0 normally, 2rem while App.razor stamps data-testmode on <html>. Everything that parks at
   the top of the window or is as tall as the window subtracts it - .app-header (MainLayout), the
   --sticky-header-top a page's own sticky header uses (PAGE GUTTER above), the record notes dock,
   the signing toolbar, the settings explorer, the custom form designer, the audit log and the
   phone-sized tasks menu - so the banner covers nothing and adds no scrollbar. A new sticky element
   or window-tall pane takes the same variable.

   The colours are literal, not --app-* tokens, on purpose: a warning must look the same in every
   colour scheme, in the dark theme and in Windows' high contrast, and none of the schemes' warning
   tints is loud enough for this. Black on #ffd100 is 14.6:1. The words are a Localizations row
   (set Layout), so they are written in capitals rather than transformed by CSS.
   ========================================================================== */
:root {
  --app-testmode-h: 0px;
}

html[data-testmode] {
  --app-testmode-h: 2rem;
}

.app-testmode-banner {
  position: sticky;
  top: 0;
  /* Above the sticky app header (500) and the page's own sticky headers; below the header's
     dropdown backdrops (999), the Radzen dialogs and the chat docks (1050), which are overlays. */
  z-index: 600;
  box-sizing: border-box;
  height: var(--app-testmode-h);   /* the border included: the variable is exactly what it takes */
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0 4.5rem;               /* clear of the warning-tape ends */
  overflow: hidden;
  white-space: nowrap;
  background:
    repeating-linear-gradient(-45deg, #000 0 0.5rem, #ffd100 0.5rem 1rem) left / 3.5rem 100% no-repeat,
    repeating-linear-gradient(-45deg, #000 0 0.5rem, #ffd100 0.5rem 1rem) right / 3.5rem 100% no-repeat,
    #ffd100;
  color: #000;
  border-bottom: 1px solid #000;
  font-size: 0.9375rem;
  line-height: 1;
  forced-color-adjust: none;
  print-color-adjust: exact;
  -webkit-print-color-adjust: exact;
}

.app-testmode-banner__label {
  flex: none;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.app-testmode-banner__detail {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 600;
}

.app-testmode-banner__icon {
  display: inline-flex;
  flex: none;
}

/* One tone, the banner's black: the duotone secondary would be a grey smudge on the yellow. */
.app-testmode-banner__icon svg {
  width: 1.125rem;
  height: 1.125rem;
  --fa-primary-color: #000;
  --fa-secondary-color: #000;
}

/* A phone keeps the two words and the icon; the sentence would only be cut off. */
@media (max-width: 575.98px) {
  .app-testmode-banner {
    padding: 0 2.25rem;
    background-size: 1.75rem 100%, 1.75rem 100%, auto;
  }

  .app-testmode-banner__detail {
    display: none;
  }
}

/* The small label next to the logo that takes the banner's place when Web_TestModeIndicator says Compact (TEST MODE)
   or Demo (DEMO, ICCO's demonstration databases) - MainLayout draws it, App.razor then draws no banner and stamps no
   data-testmode, so --app-testmode-h stays 0 and nothing moves. The banner's colours, for the same reasons. Where it
   sits in the header is MainLayout.razor.css's. Below xl it shows the short word (TEST; DEMO is short already): at
   1024px the long one took a hundred pixels from the Quick Search box. */
.app-testmode-pill {
  flex: none;
  display: inline-flex;
  align-items: center;
  box-sizing: border-box;
  height: 1.375rem;
  padding: 0 0.5rem;
  border: 1px solid #000;
  border-radius: 999px;
  background: #ffd100;
  color: #000;
  font-size: 0.6875rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1;
  white-space: nowrap;
  cursor: default;
  forced-color-adjust: none;
  print-color-adjust: exact;
  -webkit-print-color-adjust: exact;
}

.app-testmode-pill__short {
  display: none;
}

@media (max-width: 1199.98px) {
  .app-testmode-pill__long {
    display: none;
  }

  .app-testmode-pill__short {
    display: inline;
  }
}

@media (max-width: 575.98px) {
  .app-testmode-pill {
    padding: 0 0.375rem;
    letter-spacing: 0.04em;
  }
}

/* ============================================================================
   RADZEN ALERT SHADES

   A "lighter" alert paints a translucent tint of its severity colour and then
   sets the TEXT colour from a value the theme bakes rather than derives - so
   remapping --rz-info left the tint plum-warm and the words on top still the
   old teal. Nothing in the CSSOM exposes the rule that does it (the shipped
   theme is a single minified line, and the declaration does not surface through
   document.styleSheets), so this is stated directly rather than re-pointed.

   The -ink values are the darkest step of each severity, which is what a light
   tint needs behind text. Filled alerts with no shade class keep the theme's
   white-on-solid and are deliberately untouched.
   ============================================================================ */
.rz-alert.rz-shade-lighter.rz-info    { --rz-alert-color: var(--app-info-ink); }
.rz-alert.rz-shade-lighter.rz-success { --rz-alert-color: var(--app-success-ink); }
.rz-alert.rz-shade-lighter.rz-warning { --rz-alert-color: var(--app-warning-ink); }
.rz-alert.rz-shade-lighter.rz-danger  { --rz-alert-color: var(--app-danger-ink); }
.rz-alert.rz-shade-lighter.rz-primary { --rz-alert-color: var(--app-primary-ink); }

/* The title and the icon are THEIR OWN baked variables, not derived from
   --rz-alert-color - so a converted alert body still carried a teal heading. */
.rz-alert.rz-shade-lighter.rz-info    { --rz-alert-title-color: var(--app-info-ink);    --rz-alert-icon-color: var(--app-info); }
.rz-alert.rz-shade-lighter.rz-success { --rz-alert-title-color: var(--app-success-ink); --rz-alert-icon-color: var(--app-success); }
.rz-alert.rz-shade-lighter.rz-warning { --rz-alert-title-color: var(--app-warning-ink); --rz-alert-icon-color: var(--app-warning); }
.rz-alert.rz-shade-lighter.rz-danger  { --rz-alert-title-color: var(--app-danger-ink);  --rz-alert-icon-color: var(--app-danger); }
.rz-alert.rz-shade-lighter.rz-primary { --rz-alert-title-color: var(--app-primary-ink); --rz-alert-icon-color: var(--app-primary); }

/* ============================================================================
   RADZEN FORM FIELD CAPTIONS AND REQUIRED FIELDS

   Caption colour. A RadzenFormField caption sits INSIDE an empty box and floats
   onto the border once there is a value. The resting caption has no colour of
   its own - it INHERITS the text colour, the same ink as a typed value, so an
   empty "Bank Name" read as a bank name somebody had entered. (The theme does
   declare --rz-form-field-label-color, but no rule reads it; overriding it does
   nothing.) Both caption states now use --app-ink-2: clearly softer than a
   value, still AA (the caption is the field's only label, so it cannot go as
   pale as a placeholder). The floated state reads --rz-input-placeholder-color
   from a more specific theme rule, so that variable is re-pointed on the label
   element ONLY - setting it globally would also recolour every real placeholder
   and every disabled input. Focus (plum), invalid (red) and disabled keep their
   own, more specific theme rules.

   Required fields. Add class="app-required" to the RadzenFormField: a 3px plum
   bar on the leading edge, empty or filled. Deliberately NOT a red or amber
   border - red is the invalid state, and orange (--app-attention) would paint
   most of a new, empty form. It is a pseudo-element rather than a box-shadow
   because the theme's hover and focus rings are box-shadows on the same box.
   Colour alone is not enough (WCAG 1.4.1): pair it with an .app-required-key
   legend in the dialog or page, and aria-required="true" on the input.
   A disabled field shows no bar - it cannot be filled in anyway.
   ============================================================================ */
.rz-form-field-label { color: var(--app-ink-2); --rz-input-placeholder-color: var(--app-ink-2); }

.rz-form-field.app-required:not(.rz-state-disabled) > .rz-form-field-content::before {
  content: "";
  position: absolute;
  inset-block: 0;
  inset-inline-start: 0;
  width: 3px;
  background-color: var(--app-primary);
  border-start-start-radius: inherit;
  border-end-start-radius: inherit;
  pointer-events: none;
}

.app-required-key {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.75rem;
  color: var(--app-ink-2);
}
.app-required-key::before {
  content: "";
  width: 3px;
  height: 0.875rem;
  background-color: var(--app-primary);
}

/* Plain-label forms carry the same bar: a <label class="form-label"> above the control and no RadzenFormField
   (the creditor screen). Wrap the control in .app-required-control and the bar is drawn on the wrapper, for the
   reasons the DQ rule below gives - a text box is a bare <input>, which cannot take a ::before, and Radzen's
   hover/focus rings are box-shadows on the control itself. Put the class on the wrapper conditionally for a
   conditional requirement. A disabled control shows no bar, as above. */
.app-required-control {
  position: relative;
}
.app-required-control:not(:has(:disabled))::before {
  content: "";
  position: absolute;
  inset-block: 0;
  inset-inline-start: 0;
  width: 3px;
  background-color: var(--app-primary);
  border-start-start-radius: var(--rz-border-radius);
  border-end-start-radius: var(--rz-border-radius);
  z-index: 1;
  pointer-events: none;
}

/* DQ forms carry the same bar, but they have no RadzenFormField: the caption sits ABOVE the control.
   DQQuestionContainer adds .dq-required (QuestionBase.RequiresAnswer - the rule the red caption
   asterisk used, which this replaced) and the bar is drawn on the .dq-question-input WRAPPER, not the
   control. Two reasons: a text box is a bare <input>, which cannot take a ::before, and Radzen's
   hover/focus rings are box-shadows on the controls themselves. The wrapper's leading edge IS the
   control's - the wi_* width classes cap the wrapper, not the position - so on a box control the bar
   lands on its left border. Child combinators keep a required question from painting a bar inside
   anything nested in it. */
.dq-question-container.dq-required > div > .dq-question-input {
  position: relative;
}
.dq-question-container.dq-required > div > .dq-question-input::before {
  content: "";
  position: absolute;
  inset-block: 0;
  inset-inline-start: 0;
  width: 3px;
  background-color: var(--app-primary);
  border-start-start-radius: var(--rz-border-radius);
  border-end-start-radius: var(--rz-border-radius);
  z-index: 1;
  pointer-events: none;
}
/* Radio lists, checkboxes and grids have no box whose border the bar can sit on - it would cover the
   first radio circle - so they are pushed clear and the bar reads as a rule beside the whole group. */
.dq-question-container.dq-required:is([data-dq-question-answertype="singleselection"],
  [data-dq-question-answertype="boolean"], [data-dq-question-answertype="checkbox"],
  [data-dq-question-answertype="grid"], [data-dq-question-answertype="staticgrid"],
  [data-dq-question-answertype="editablegrid"], [data-dq-question-answertype="chart"]) > div > .dq-question-input {
  padding-inline-start: 0.75rem;
}
/* A read-only questionnaire has nothing to fill in (DynamicQuestionnaire hides its key too). */
.wi_dq_readonly .dq-question-container.dq-required > div > .dq-question-input::before {
  content: none;
}

/* ============================================================================
   THEME LEGIBILITY - the gaps the dark theme exposed

   Everything here is a colour one of the libraries BAKES as a literal, so it
   could not be reached by re-pointing a token. They were found by loading every
   route with the dark theme on and flagging any element whose background was
   light or whose text was near-black - the switch was built first precisely so
   this list could be measured rather than guessed at.

   Two of them were pre-existing LIGHT-theme bugs that dark mode merely made
   total, and both are called out below.
   ============================================================================ */
:root {
  /* Bootstrap bakes these as literal rgba(33,37,41,...) rather than deriving
     them from --bs-body-color-rgb, so muted text stayed near-black: the Reports
     category list, every .text-body-secondary, the work-queue rail captions. */
  --bs-secondary-color:  rgba(var(--app-ink-rgb), 0.75);
  --bs-tertiary-color:   rgba(var(--app-ink-rgb), 0.5);
  --bs-secondary-bg:     var(--app-surface-2);
  --bs-tertiary-bg:      var(--app-ground);
  --bs-emphasis-color-rgb: var(--app-ink-rgb);
  --bs-light-rgb:        var(--app-surface-2-rgb);
  --bs-dark-rgb:         var(--app-ink-rgb);

  /* The -subtle / -emphasis trio per severity. QueueCountBadge and the Bootstrap
     badges are written against these, so they follow once these are set. */
  --bs-success-bg-subtle: var(--app-success-soft);
  --bs-success-border-subtle: var(--app-success);
  --bs-success-text-emphasis: var(--app-success-ink);
  --bs-warning-bg-subtle: var(--app-warning-soft);
  --bs-warning-border-subtle: var(--app-warning);
  --bs-warning-text-emphasis: var(--app-warning-ink);
  --bs-danger-bg-subtle:  var(--app-danger-soft);
  --bs-danger-border-subtle: var(--app-danger);
  --bs-danger-text-emphasis: var(--app-danger-ink);
  --bs-info-bg-subtle:    var(--app-info-soft);
  --bs-info-border-subtle: var(--app-info);
  --bs-info-text-emphasis: var(--app-info-ink);
  --bs-light-bg-subtle:   var(--app-surface-2);
  --bs-dark-bg-subtle:    var(--app-surface-2);
  /* The ink of that pair was still Bootstrap's literal #495057, so .alert-light (the AI SQL
     assistant's notes) was dark grey on the dark theme's surface: 1.9:1. */
  --bs-light-text-emphasis: var(--app-ink-2);
  --bs-dark-text-emphasis:  var(--app-ink);

  /* Radzen's "on base" trio is a literal dark slate (#28363c) - white text on a
     dark fill in light mode, invisible on a dark fill in dark mode. */
  --rz-on-base:         var(--app-ink);
  --rz-on-base-light:   var(--app-ink);
  --rz-on-base-lighter: var(--app-ink);
  --rz-on-base-dark:    var(--app-base-50);
  --rz-on-base-darker:  var(--app-base-50);
  --rz-light: var(--app-surface-2);
  --rz-dark:  var(--app-ink);
}

/* An OUTLINED "light" button. Radzen paints its label AND its outline with --rz-base-200, the
   surface colour, so on a page it was a button nobody could see: 1.06:1 in the light theme,
   1.18:1 in the dark one. "Clear" beside a stored secret (Email, Telephony, Reliant) and Reliant's
   "Test connection" are these. It takes the neutral outline pair .btn-outline-secondary has -
   the label in --app-ink-2, the outline in --app-neutral - and on hover the tint and ink Radzen's
   own outlined secondary button uses; Radzen's hover for this one is a 12% white veil, which shows
   on nothing light. The text-variant twin of the same bug is the next rule. */
.rz-button.rz-variant-outlined.rz-light.rz-shade-default {
  color: var(--app-ink-2);
  box-shadow: inset 0 0 0 var(--rz-border-width) var(--app-neutral);
}

.rz-button.rz-variant-outlined.rz-light:not(.rz-state-disabled):hover,
.rz-button.rz-variant-outlined.rz-light:not(.rz-state-disabled):active {
  background-color: var(--app-neutral-tint);
  color: var(--app-neutral-darker);
}

/* PRE-EXISTING BUG, not a dark-mode one. Radzen paints a text-variant "light"
   button with color: var(--rz-base-200) - a near-invisible pale grey even in the
   shipped light theme, and invisible outright once base-200 becomes a dark
   surface. These are the grid toolbar icons (column chooser, export, filter):
   controls, not decoration, so they get readable ink and a real hover. */
.rz-button.rz-variant-text.rz-light,
.rz-button.rz-variant-text.rz-base {
  color: var(--app-ink-2);
}

.rz-button.rz-variant-text.rz-light:not(.rz-state-disabled):hover,
.rz-button.rz-variant-text.rz-base:not(.rz-state-disabled):hover {
  color: var(--app-primary);
  background-color: var(--app-primary-softer);
}

/* ...except inside an alert. Its close button is one of these text-variant buttons, so the rule
   above put --app-ink-2 on it whatever the alert was filled with: mid-grey on a solid danger fill
   measured 1.1:1 in both themes - the X was there and nobody could see it. An alert's close takes
   the alert's own ink, which Radzen sets per severity and shade. */
.rz-alert .rz-button.rz-variant-text.rz-light,
.rz-alert .rz-button.rz-variant-text.rz-base {
  color: inherit;
}

/* A <code> inside an alert takes the alert's ink as well. --bs-code-color is one colour for every
   surface, and a filled alert is a solid status colour: the tokens Documents Setup names in its
   "No problems found" alert were 1.2:1 in Bootstrap's pink, and would be 2.9:1 in the page ink. */
.rz-alert code {
  color: inherit;
}

/* ...and on a grid row painted with a colour from the DATA. CSGridModel.BuildStyle gives such a
   row its ink together with its fill (style="background-color:...;color:..."), and the row's text
   follows it. The row's Actions button kept the THEME's ink instead, so in the dark theme it was
   near-white on a light data colour: 2.2:1 on a #FF8080 task row. Only the neutral shades - a
   danger or a primary text button keeps its meaning. A light/base button's hover (the primary chip
   above) is more specific than this and still applies; a dark one's hover is only a veil, so the
   inherited ink stays under it. */
tr[style*="background-color"] .rz-button.rz-variant-text:is(.rz-dark, .rz-light, .rz-base),
td[style*="background-color"] .rz-button.rz-variant-text:is(.rz-dark, .rz-light, .rz-base) {
  color: inherit;
}

/* A DUOTONE icon in such a button paints from the two palette tones, not from the button's colour
   (the NOTE below is why that is right everywhere else). The palette is chosen for a theme surface:
   on a light data row the dark theme's light primary tone left only the back of the "View details"
   eye visible (1.4:1). Here both tones are the row's ink, the second one at part strength - what a
   filled button already does with its own. */
tr[style*="background-color"] .rz-button.rz-variant-text:is(.rz-dark, .rz-light, .rz-base) .fa-icon-v7,
td[style*="background-color"] .rz-button.rz-variant-text:is(.rz-dark, .rz-light, .rz-base) .fa-icon-v7 {
  --fa-primary-color: currentColor;
  --fa-secondary-color: currentColor;
}

tr[style*="background-color"] .rz-button.rz-variant-text:is(.rz-dark, .rz-light, .rz-base) .fa-icon-v7 .fa-secondary,
td[style*="background-color"] .rz-button.rz-variant-text:is(.rz-dark, .rz-light, .rz-base) .fa-icon-v7 .fa-secondary {
  opacity: .45;
}

/* NOTE - do not "help" the icon inside such a button by pinning its tones to the
   button's colour. That was tried and reverted: it forced --fa-primary-color to
   currentColor and flattened every DUOTONE glyph in a text-variant button to two
   greys - the Quick Search magnifier, Recent Records and the Help question mark
   all went monochrome. The colour fix above is enough on its own, because the two
   icon kinds need opposite things and both already get them:
     - a SINGLE-TONE icon has a bare currentColor and follows the button colour,
       which is exactly what the rule above just fixed;
     - a DUOTONE icon paints from .fa-primary / .fa-secondary and must keep the
       palette tones, not the button's ink.

/* ---------------------------------------------------------------------------
   Grid selection.

   Radzen derives the selected-row fill from --rz-secondary-dark and its text
   from --rz-on-secondary-dark. In the shipped theme "secondary" is a blue, so
   that reads as a proper accent; in this palette secondary is deliberately a
   NEUTRAL (a secondary ACTION should be quiet), which turned every selected
   grid row into a flat mid-grey - drab in light mode, and in dark mode a pale
   #BDB5B8 band carrying light text, which was unreadable.

   Selection is an accent state, not a quiet one, so it takes the primary. A
   tint rather than a solid fill because these grids are dense and the keyboard
   cursor (the left bar, further up this file) already marks the active row -
   two solid bands competing is worse than one tint plus a rule.
   --------------------------------------------------------------------------- */
:root {
  --rz-grid-selected-background-color: var(--app-primary-soft);
  --rz-grid-selected-color:            var(--app-primary-ink);
  --rz-grid-cell-focus-background-color: var(--app-primary-tint);
  --rz-grid-cell-focus-color:            var(--app-ink);
}

/* Two more baked literals the dark sweep turned up.
   --rz-base (the bare one, not the -50..-900 steps) is Radzen's chip / neutral-fill colour;
   --bs-*-bg-rgb are what .bg-body-tertiary and friends actually read, not the non-rgb pair. */
:root {
  --rz-base: var(--app-rule);
  --bs-secondary-bg-rgb: var(--app-surface-2-rgb);
  --bs-tertiary-bg-rgb:  var(--app-surface-2-rgb);
  --bs-body-tertiary-bg: var(--app-surface-2);
  --bs-body-secondary-bg: var(--app-surface-2);
}

/* ---------------------------------------------------------------------------
   Quick Search: the magnifier and the recent-records clock.

   SINGLE TONE by request. These two sit inside a text field rather than on a
   toolbar, at 18px, and at that size the duotone secondary reads as a smudge
   rather than as depth - so the secondary is made transparent and only the
   primary shape is drawn. Transparent rather than "same as primary" because a
   filled secondary would close up the counters (the magnifier's lens, the
   clock's face) and turn each glyph into a blob.

   The buttons are also forced to centre their content. Radzen leaves the icon
   on the text baseline, which put it 4px from the top and 10px from the bottom
   of a 28px button - visibly high, and the kind of thing you only see once you
   look for it. Flex centring makes it exact regardless of line-height.
   --------------------------------------------------------------------------- */
.quick-search .rz-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
}

.quick-search .rz-button .fa-icon-v7 {
  --fa-secondary-color: transparent;
  font-size: 18px;
  width: 18px;
  height: 18px;
  margin: 0;              /* rz-button-icon-left adds a right gap for a label these have no label */
}

.quick-search .rz-button .fa-icon-v7 svg {
  width: 18px;
  height: 18px;
}

.quick-search .rz-button:hover .fa-icon-v7 {
  --fa-primary-color: var(--app-primary);
}

/* ---------------------------------------------------------------------------
   HEADER HELP BUTTON (HelpButton.razor)

   Same two problems the quick-search buttons above had, for the same reason: a
   RadzenButton wrapping an inlined SvgIcon.

   1. It sat HIGH. Radzen leaves the icon on the text baseline, so in the 28px
      button the 14px glyph landed 4px from the top and 10px from the bottom -
      3px above the optical centre its neighbours share. Flex centring fixes it
      regardless of line-height.
   2. It read SMALL, at 14px against the 15.2px of the theme, language and
      account icons beside it. 0.95rem is that 15.2px: those three inherit it
      from their own toggle button, because the "font-size: 1.25rem" their
      scoped .razor.css declares on .theme_icon / .globe_icon / .avatar_icon has
      never applied - the <i> is rendered by FontAwesomeIcon and so carries no
      b-xxxxx attribute for the scoped selector to match. Matching what is on
      screen, not what those files say, is deliberate: the three icons are the
      size the header was signed off at.

   Global rather than a HelpButton.razor.css: the component's markup is nothing
   but child components, so it has no element of its own carrying a b-xxxxx
   scope attribute - a scoped rule (::deep included) would match nothing.
   --------------------------------------------------------------------------- */
.header-help-button.rz-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.header-help-button .fa-icon-v7 {
  font-size: 0.95rem;
  width: 0.95rem;
  height: 0.95rem;
  margin: 0;              /* rz-button-icon-left adds a right gap for a label this has no label */
}

.header-help-button .fa-icon-v7 > svg {
  width: 0.95rem;
  height: 0.95rem;
}

/* ---------------------------------------------------------------------------
   DUOTONE DEPTH - two places where the two tones were fighting instead of
   describing the shape.

   1. THE MENU RAIL. The recoloured (Form 1) exports carry a distinct GREY
      secondary at full opacity. At 20px that sits too close in weight to the
      plum primary, so the shapes merge: the Dashboard dial loses its needle and
      its tick dots, and the Task Search magnifier loses its handle. FontAwesome's
      own convention is the SAME hue at reduced opacity - that is what gives
      duotone its sense of depth - so restate it rather than living with the
      design share's flat grey.

   2. A FILLED BUTTON. A filled button paints its own background, so an icon on
      it must follow the button's FOREGROUND, not the content-icon tones. On the
      plum Search button the #4A3F44 primary was all but invisible.
      currentColor, never a literal, so it holds in both themes (white on plum in
      light, dark ink on light plum in dark) and for every ButtonStyle rather
      than just the primary one.

   Both rules live HERE and not in a scoped .razor.css: the SVG is inlined as a
   MarkupString, so its paths carry no b-xxxxx attribute and a scoped rule would
   compile to .fa-secondary[b-xxxxx] and match nothing.
   --------------------------------------------------------------------------- */
.nav2-wrapper .rz-navigation-item-icon .fa-secondary {
  fill: var(--app-rail-icon-1);
  opacity: .35;
}

.nav2-wrapper .rz-navigation-item-wrapper-active > .rz-navigation-item-link .rz-navigation-item-icon .fa-secondary {
  fill: var(--app-primary-ink);
  opacity: .4;
}

.rz-button.rz-variant-filled .fa-icon-v7 .fa-primary,
.rz-button.rz-variant-filled .fa-icon-v7 .fa-secondary,
.rz-button.rz-variant-flat .fa-icon-v7 .fa-primary,
.rz-button.rz-variant-flat .fa-icon-v7 .fa-secondary {
  fill: currentColor;
}

.rz-button.rz-variant-filled .fa-icon-v7 .fa-secondary,
.rz-button.rz-variant-flat .fa-icon-v7 .fa-secondary {
  opacity: .45;
}

/* A SelectBar's SELECTED item is a filled button in everything but its class: Radzen marks it
   rz-state-active and paints it with the neutral fill, so an icon on it follows the item's
   foreground for the reason given in (2). On that fill the palette tones were 1.68:1 in the light
   theme and 1.18:1 in the dark one (the notes "Tab / Right panel" switch). The other items sit on
   the page and keep the palette. */
.rz-selectbar .rz-button.rz-state-active .fa-icon-v7 .fa-primary,
.rz-selectbar .rz-button.rz-state-active .fa-icon-v7 .fa-secondary {
  fill: currentColor;
}

.rz-selectbar .rz-button.rz-state-active .fa-icon-v7 .fa-secondary {
  opacity: .45;
}

/* A duotone-LIGHT glyph reversed out of a filled button reads thinner than it
   measures: light strokes on a dark ground optically shrink, and 14px of a
   640-unit viewBox leaves very little line. Scaling the glyph thickens the
   stroke with it - the honest fix, short of shipping a heavier FontAwesome
   weight as a second file for one button. 17px still clears the 36px button. */
.rz-button.rz-variant-filled .fa-icon-v7,
.rz-button.rz-variant-flat .fa-icon-v7 {
  font-size: 17px;
  width: 17px;
  height: 17px;
}

.rz-button.rz-variant-filled .fa-icon-v7 > svg,
.rz-button.rz-variant-flat .fa-icon-v7 > svg {
  width: 17px;
  height: 17px;
}

/* The lens/backplate carries part of the shape at this size, so it earns a
   little more presence than the 45% used elsewhere. */
.rz-button.rz-variant-filled .fa-icon-v7 .fa-secondary,
.rz-button.rz-variant-flat .fa-icon-v7 .fa-secondary {
  opacity: .55;
}

/* Thicken the glyph itself, on top of the size bump above.

   These are fill-only paths (FontAwesome ships no strokes), so adding a stroke in
   the SAME colour grows the shape. Two details make it safe:

   - `vector-effect: non-scaling-stroke` measures stroke-width in CSS pixels rather
     than in the 640-unit viewBox, so the weight stays constant at every icon size
     instead of needing a different number per call site.
   - `paint-order: stroke fill` paints the stroke UNDERNEATH the fill, so the glyph
     grows OUTWARD only. Painted the default way round (fill then stroke) the inner
     half of the stroke would eat into the counters and close up the magnifier's
     lens and the clock's face at these sizes.

   Only on filled/flat buttons: this is compensation for a light glyph reversed out
   of a solid fill, not a change to how icons look generally. */
.rz-button.rz-variant-filled .fa-icon-v7 .fa-primary,
.rz-button.rz-variant-filled .fa-icon-v7 .fa-secondary,
.rz-button.rz-variant-flat .fa-icon-v7 .fa-primary,
.rz-button.rz-variant-flat .fa-icon-v7 .fa-secondary {
  stroke: currentColor;
  stroke-width: 1.1;
  vector-effect: non-scaling-stroke;
  paint-order: stroke fill;
}

/* Radzen reserves 10px of space above a floating-label field for the label to
   rise into, so the visible INPUT sits below its own field box's centre. The box
   was perfectly centred in the header and the search box still looked ~4px lower
   than the dropdowns beside it, because the eye compares the input, not the box.
   Pull the field up by half the reservation so the input lines up. */
.app-header .quick-search {
  position: relative;
  top: -4px;
}

/* ---------------------------------------------------------------------------
   Status pills above the record workspace (Web access, Password reset pending,
   requirement alerts).

   They sat flush on the workspace card below them - a 0px gap - and a full
   gutter below the header, which read as "attached to the card" rather than as a
   status line belonging to the record. Pull them up into the gutter and give
   them real separation from the card.
   --------------------------------------------------------------------------- */
.nested-customer-body > .badge,
.customer-body > .badge {
  /* position, not margin-top: these pills are inline-block, and a vertical margin on an
     inline-level box does not shift its line box - the -4px had no visible effect at all.
     Relative offset moves the pill without changing the space it reserves, so the 10px
     gap to the card below is preserved. */
  position: relative;
  top: -6px;
  margin-bottom: 10px;
}

/* ---------------------------------------------------------------------------
   Foreground for the STATUS colours.

   Radzen hardcodes --rz-on-success / -warning / -danger / -info to #ffffff,
   which is right while those fills are dark. In the dark theme they invert to
   LIGHT (#5FBF85, #E3A551, #FF8A80, #6BB6D8), and white-on-light-green measured
   2.3:1 on the Collect Payment button - worse than the coral it replaced.

   Same trick as --app-on-primary: one token that flips with the theme, so the
   ink follows the fill instead of being pinned to white.
   --------------------------------------------------------------------------- */
:root {
  --rz-on-success:        var(--app-on-status);
  --rz-on-success-dark:   var(--app-on-status);
  --rz-on-success-darker: var(--app-on-status);
  --rz-on-success-light:  var(--app-on-status);
  --rz-on-warning:        var(--app-on-status);
  --rz-on-warning-dark:   var(--app-on-status);
  --rz-on-warning-darker: var(--app-on-status);
  --rz-on-warning-light:  var(--app-on-status);
  --rz-on-danger:         var(--app-on-status);
  --rz-on-danger-dark:    var(--app-on-status);
  --rz-on-danger-darker:  var(--app-on-status);
  --rz-on-danger-light:   var(--app-on-status);
  --rz-on-info:           var(--app-on-status);
  --rz-on-info-dark:      var(--app-on-status);
  --rz-on-info-darker:    var(--app-on-status);
  --rz-on-info-light:     var(--app-on-status);
}

/* The same gap, in the two places the block above did not reach.

   SECONDARY. Radzen bakes --rz-on-secondary (and its -dark / -darker / -light) as #ffffff.
   Secondary is this palette's NEUTRAL, which the dark theme inverts to a light grey like every
   other step of the ramp - so every filled secondary button, and the selected item of every
   SelectBar, was white on light grey there: 2.5:1, measured on the record screens' Notes view
   switch. --app-base-50 is the surface end of the neutral ramp - white in light, the dark surface
   in dark - and is what --rz-on-base-dark already takes above. A no-op in the light theme.

   BOOTSTRAP. .text-bg-primary / -secondary / -success / -danger bake "color: #fff !important"
   beside a background that IS remapped onto the tokens, with the same result: the work queue's
   "5 overdue" badge was white on #FF8A80 in the dark theme, 2.3:1. Restated with the ink that
   belongs to each fill. Also a no-op in light, where all four inks are white. */
:root {
  --rz-on-secondary:        var(--app-base-50);
  --rz-on-secondary-dark:   var(--app-base-50);
  --rz-on-secondary-darker: var(--app-base-50);
  --rz-on-secondary-light:  var(--app-base-50);
}

.text-bg-primary   { color: var(--app-on-primary) !important; }
.text-bg-secondary { color: var(--app-base-50) !important; }
.text-bg-success,
.text-bg-danger    { color: var(--app-on-status) !important; }

/* The rest of that family. Every ratio below was measured on the running app, in both themes and
   in both colour schemes (2026-10-01); the rule is the same one throughout - Bootstrap bakes the
   INK for a fill whose colour this palette supplies, so the fill has to bring its own.

   .text-bg-warning / .text-bg-info. Bootstrap bakes BLACK for these two, chosen for its own yellow
   (#ffc107) and cyan (#0dcaf0). The palette's warning and info are deep enough to carry white -
   Radzen's warning and info badges and buttons already do, through --rz-on-warning / --rz-on-info
   above - so black on them measured 4.2:1 and 3.5:1 in the light theme. THIS ONE SHOWS in the
   light theme: the text of some seventy badges ("unsaved changes", "test mode", "due today") goes
   from black to white, which is also what makes them match the Radzen badges beside them.

   .text-bg-light / .text-bg-dark. The fills are remapped (--bs-light-rgb is --app-surface-2,
   --bs-dark-rgb is --app-ink) and the baked inks were not: black on the dark theme's surface was
   1.4:1 (twenty-five "neutral state" badges on the batch screens), white on its light ink 1.2:1.
   No visible change in light. */
.text-bg-warning,
.text-bg-info      { color: var(--app-on-status) !important; }
.text-bg-light     { color: var(--app-ink) !important; }
.text-bg-dark      { color: var(--app-base-50) !important; }

/* A badge with a bare fill ("badge bg-success", no text utility). .badge carries
   --bs-badge-color: #fff on itself, which is right in light and 2.2:1 to 2.5:1 on every dark-theme
   fill - the creditor portal's "In collection" was one. The variable, not color, because that is
   what the component reads (the trap BOOTSTRAP COMPONENTS describes at the top of this file).
   No visible change in light. */
.badge.bg-primary   { --bs-badge-color: var(--app-on-primary); }
.badge.bg-secondary,
.badge.bg-dark      { --bs-badge-color: var(--app-base-50); }
.badge.bg-success,
.badge.bg-danger,
.badge.bg-warning,
.badge.bg-info      { --bs-badge-color: var(--app-on-status); }
.badge.bg-light     { --bs-badge-color: var(--app-ink); }

/* A text utility written beside a fill. "bg-warning text-dark" is Bootstrap's own recipe for a
   readable warning badge and "bg-primary text-white" for a header, and here each is right in one
   theme at most: .text-dark resolves to --app-ink (dark ink on the deep amber is 3.0:1 in light,
   light ink on the light amber 1.7:1 in dark) and .text-white stays white (2.3:1 on the dark
   theme's primary). The FILL decides the ink, whichever utility the markup carries. Two classes,
   so these out-rank the utilities' own !important. "bg-warning text-dark" and "bg-info text-dark"
   SHOW in the light theme, for the same reason as .text-bg-warning above; the rest do not. */
.bg-primary:is(.text-white, .text-light, .text-dark) { color: var(--app-on-primary) !important; }
.bg-secondary:is(.text-white, .text-light, .text-dark),
.bg-dark:is(.text-white, .text-light)                { color: var(--app-base-50) !important; }
.bg-success:is(.text-white, .text-light, .text-dark),
.bg-danger:is(.text-white, .text-light, .text-dark),
.bg-warning:is(.text-white, .text-light, .text-dark),
.bg-info:is(.text-white, .text-light, .text-dark)    { color: var(--app-on-status) !important; }

/* ---------------------------------------------------------------------------
   A hovered or keyboard-focused filled STATUS button takes the palette's hover step.

   Radzen does not darken a hovered button, it veils it: under the pointer, and under the keyboard
   focus, a button's background-image is --rz-button-hover-gradient / --rz-button-focus-gradient,
   both linear-gradient(rgba(255,255,255,.1), rgba(255,255,255,.1)). On the dark theme's light
   fills, under a dark label, that adds contrast. In the light theme the label is white, and the
   veil took the two status fills nearest the floor below it: on the success green 5.25:1 at rest
   and 4.30:1 hovered or focused, on the warning amber 5.21:1 and 4.32:1, in both colour schemes
   (measured 2026-10-01; text needs 4.5:1). That was every filled green and amber button: Search,
   Collect Payment, Start timer, HUD Reporting, the customer's "That answered my question".

   The fill of those two states is now the status colour's -dark step - what the palette header
   calls "the hover/pressed direction", darker on a light ground and lighter on a dark one - and
   the veil is off. --app-on-status on each -dark step is a pair ColorSchemeTests holds for every
   scheme; a veiled fill never could be, because it is not a token. The label is 6.42:1 or better
   in the light theme and 9.73:1 or better in the dark one. Danger and info stayed above the floor
   under the veil (5.54:1, and 4.80:1 on navy's teal); they take the rule too, so that the four
   status buttons answer the pointer alike.

   Left to Radzen, on purpose:
   - the primary, the neutral (secondary) and the light buttons keep the veil - 8.67:1, 4.76:1
     and 13.31:1 under it (navy 9.30, 4.91, 13.30);
   - the pressed state (:not(:active) below is Radzen's own guard): the base colour under a BLACK
     veil, which is this same step to within a shade;
   - the 3px band along the bottom of a hovered button (--rz-button-hover-shadow). No label
     reaches it.

   Shade.Default only: a status button in another shade has no hover step in the palette, and none
   exists in the app. A LIGHT status shade under this label is below the floor at rest (3.74:1
   green, 3.96:1 amber) - do not reach for one.

   The :hover half sits in the media query Radzen's own hover rule sits in, so a tapped button on
   a touch screen is not left in its hover colour. ColorSchemeTests holds these eight rules as well
   as the pairs: a stylesheet merged without them would bring the veil back with no pair failing.
   --------------------------------------------------------------------------- */
.rz-button:is(.rz-variant-filled, .rz-variant-flat).rz-success.rz-shade-default:not(.rz-state-disabled):not(:active):focus-visible {
  background-color: var(--app-success-dark);
  background-image: none;
}

.rz-button:is(.rz-variant-filled, .rz-variant-flat).rz-warning.rz-shade-default:not(.rz-state-disabled):not(:active):focus-visible {
  background-color: var(--app-warning-dark);
  background-image: none;
}

.rz-button:is(.rz-variant-filled, .rz-variant-flat).rz-danger.rz-shade-default:not(.rz-state-disabled):not(:active):focus-visible {
  background-color: var(--app-danger-dark);
  background-image: none;
}

.rz-button:is(.rz-variant-filled, .rz-variant-flat).rz-info.rz-shade-default:not(.rz-state-disabled):not(:active):focus-visible {
  background-color: var(--app-info-dark);
  background-image: none;
}

@media (hover: hover) and (pointer: fine) {
  .rz-button:is(.rz-variant-filled, .rz-variant-flat).rz-success.rz-shade-default:not(.rz-state-disabled):not(:active):hover {
    background-color: var(--app-success-dark);
    background-image: none;
  }

  .rz-button:is(.rz-variant-filled, .rz-variant-flat).rz-warning.rz-shade-default:not(.rz-state-disabled):not(:active):hover {
    background-color: var(--app-warning-dark);
    background-image: none;
  }

  .rz-button:is(.rz-variant-filled, .rz-variant-flat).rz-danger.rz-shade-default:not(.rz-state-disabled):not(:active):hover {
    background-color: var(--app-danger-dark);
    background-image: none;
  }

  .rz-button:is(.rz-variant-filled, .rz-variant-flat).rz-info.rz-shade-default:not(.rz-state-disabled):not(:active):hover {
    background-color: var(--app-info-dark);
    background-image: none;
  }
}

/* The debug toggle's bug icon stays red in both themes - it marks a developer-only
   control, and that meaning does not change with the palette. Two tones so it still
   reads as a bug rather than a blob; the global rules cannot supply this because the
   colour is deliberately OFF-palette. Global, not scoped: the SVG is inlined as a
   MarkupString and carries no component scope attribute. */
.debug-toggle-icon.fa-icon-v7 {
  --fa-primary-color: #C0392B;
  --fa-secondary-color: #E8A6A0;
  font-size: 15px;
  width: 15px;
  height: 15px;
  vertical-align: -2px;
}

.debug-toggle-icon.fa-icon-v7 > svg {
  width: 15px;
  height: 15px;
}

/* Per-item menu icon colour + soft chip (dbo.InternetMenus.Color -> InternetMenuRules.BuildIconColorStyle).
   Global, not scoped: the SVG is inlined as a MarkupString and carries no component scope
   attribute, and dark-mode switches live on :root. box-sizing: content-box + negative margin
   grows a 4px soft chip halo without shifting the glyph or the caption column. */
.nav-item-colored-icon.fa-icon-v7 {
  color: var(--item-icon-1) !important;
  --fa-primary-color: var(--item-icon-1) !important;
  --fa-secondary-color: var(--item-icon-2) !important;
  background-color: var(--item-chip-bg);
  border-radius: 7px;
  padding: 4px;
  margin-block: -4px;
  margin-inline: -4px 2px !important;
  box-sizing: content-box;
}

.nav2-wrapper-compact:not(:hover) .nav-item-colored-icon.fa-icon-v7,
.nav2-tooltip-mode.nav2-wrapper-compact .nav-item-colored-icon.fa-icon-v7 {
  padding: 5px;
  margin: 0 !important;
  background-color: var(--item-chip-bg) !important;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .nav-item-colored-icon.fa-icon-v7 {
    color: var(--item-icon-1-dark) !important;
    --fa-primary-color: var(--item-icon-1-dark) !important;
    --fa-secondary-color: var(--item-icon-2-dark) !important;
    background-color: var(--item-chip-bg-dark);
  }

  :root:not([data-theme="light"]) .nav2-wrapper-compact:not(:hover) .nav-item-colored-icon.fa-icon-v7,
  :root:not([data-theme="light"]) .nav2-tooltip-mode.nav2-wrapper-compact .nav-item-colored-icon.fa-icon-v7 {
    background-color: var(--item-chip-bg-dark) !important;
  }
}

:root[data-theme="dark"] .nav-item-colored-icon.fa-icon-v7 {
  color: var(--item-icon-1-dark) !important;
  --fa-primary-color: var(--item-icon-1-dark) !important;
  --fa-secondary-color: var(--item-icon-2-dark) !important;
  background-color: var(--item-chip-bg-dark);
}

:root[data-theme="dark"] .nav2-wrapper-compact:not(:hover) .nav-item-colored-icon.fa-icon-v7,
:root[data-theme="dark"] .nav2-tooltip-mode.nav2-wrapper-compact .nav-item-colored-icon.fa-icon-v7 {
  background-color: var(--item-chip-bg-dark) !important;
}

/* Compact header, below md (MainLayout.razor.css): the Debug pill shows only its bug. The
   pill's own colour still tells ON (btn-warning) from OFF, and the label is hidden visually
   only, because it is the button's accessible name. Global because DebugModeToggle has no
   .razor.css, and its other rules are here. */
@media (max-width: 767.98px) {
  .debug-toggle-label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }
}

/* ==========================================================================
   NOTES DOCK

   The two placements a record-detail screen offers for its Notes feed: inside
   the screen's own tab strip, or docked as a rail on the RIGHT of the whole
   page. Driven by NotesDock; shared by the task, lead, client and account
   detail screens.

   GLOBAL rather than scoped to NotesDock.razor.css because the two halves are
   rendered by DIFFERENT components: .notes-dock-main wraps the hosting
   screen's own markup, which carries that screen's scope attribute and never
   NotesDock's, so a scoped `.notes-dock-side > .notes-dock-main` would match
   nothing.
   ========================================================================== */

.notes-view-toggle {
  margin-bottom: 0.25rem;
}

/* Tab view leaves .notes-dock as a plain block, so the wrapper costs nothing. */
.notes-dock-side {
  display: grid;
  /* minmax(0, ...) on both tracks: a grid or a long note inside must scroll its
     own box, never widen the page (the flex/grid min-width overflow trap). */
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 1rem;
  align-items: start;
}

/* No `order` anywhere: source order is main-then-rail, which is both the wide
   layout (screen left, notes right) and the narrow one (screen above notes). */
.notes-dock-side > .notes-dock-main,
.notes-dock-side > .notes-dock-rail {
  min-width: 0;
}

@media (max-width: 1099.98px) {
  .notes-dock-side {
    display: block;
  }

  .notes-dock-side > .notes-dock-rail {
    margin-top: 1rem;
  }
}

/* ==========================================================================
   DEBTOR WORKSPACE TAB STRIP

   Radzen's .rz-tabview-nav is a nowrap flex row with VISIBLE overflow, so a
   strip that does not fit neither scrolls nor wraps - it spills out of the
   panel and across whatever sits beside it.

   The debtor workspace is where that bites, because it builds its tabs from the
   agency's tabctlClient/tabctlLead layout (up to eighteen rows) AND gives up
   5/12 of its width whenever the Notes feed is docked to the side. Measured on
   /client/518/details at 1584px: twelve tabs want 1035px in a 622px column, so
   413px of tab strip hung outside the panel. It only shows in the Side
   placement - at full width the same twelve tabs fit in 1082px, which is why
   the tab placement looks fine.

   Wrapping rather than scrolling: every tab here is a destination the counselor
   chooses from, and a horizontal scroller would hide a third of them behind an
   affordance Radzen does not draw.

   GLOBAL, not DebtorTabHost.razor.css: the <ul> is RadzenTabs' own markup and
   carries no scope attribute, so a scoped rule would compile to
   .rz-tabview-nav[b-xxxxx] and match nothing.

   The creditor screen (ViewCreditorInline, .creditor-tabs) has the same strip,
   and wraps at every width as well (2026-11-27). It used to wrap on phones only,
   on the belief that on a desktop its tabs fit in one row by breaking their
   longer captions over two lines. They do not: up to fourteen tabs want about
   1260px with every caption broken, so beside the pinned menu the strip hung
   out of its card at 1024px - the whole page scrolled sideways, 1448px wide -
   and still at 1440px. Wrapped, every caption stays on one line: three rows at
   1024px, two at 1440px (78px, the height the one row of three-line captions
   had), two at 1920px, where one row of two-line captions was 59px.

   The account screen (ViewDebtorAccountInline, .account-tabs) wraps at every
   width too (2026-11-27, it was phones only): four to six tabs - Summary,
   Activity, Proposal, Bill Pay, Contact Plan, and Notes in the Tab placement -
   that on a 375px phone ran 62px past a 343px column, and that at 1024px, with
   both menus pinned and the Notes docked as the Right panel, got a column of
   196px: the four tabs of an account ran 209px past it, under the Notes panel.
   Wrapped, they stack there one a row; at 1280px two rows (78px; one row of
   two-line captions was 59px); from 1440px one row, as before.

   The Reliant page (ReliantConsumers, .reliant-tabs) wraps on phones only:
   four tabs - Consumers, Imports, Needs attention, Errors - whose last one ran
   59px past a 375px phone.
   ========================================================================== */
.debtor-tab-host .rz-tabview-nav,
.creditor-tabs .rz-tabview-nav,
.account-tabs .rz-tabview-nav {
  flex-wrap: wrap;
}

@media (max-width: 767.98px) {
  .reliant-tabs .rz-tabview-nav {
    flex-wrap: wrap;
  }
}

/* The field that follows a checkbox in a wrapping row of the creditor screen (ViewCreditorInline): the formula
   pickers of Payment Defaults (Use Payment Formula) and Interest (Use Reduced APR Formula), and the address of
   Send Proposals Via Email. 12rem is the room the field needs beside its checkbox (a search box: about 100px of
   text and its two buttons): with less, the row wraps and the field takes a line of its own; min-width: 0 then
   lets it shrink below its natural width on a phone. As a plain flex: 1 item it could do neither, and it was
   pushed out of its fieldset, which cut it off: a formula picker's Clear button by 33px at 1024px beside the
   pinned menu and by 20px on a 375px phone, the e-mail box by 23px on the phone. Here with the creditor tab
   strip's rule: ViewCreditorInline has no stylesheet of its own. */
.creditor-checkbox-field {
  flex: 1 1 12rem;
  min-width: 0;
}

/* ==========================================================================
   VIEW BARS AND CREDITOR PANEL ON A PHONE

   The last things that laid the account detail screen out wider than a phone.
   They are Radzen markup with no scope attribute, so the rules are here, and
   each host carries a class for them to hang on. Phones only (below 768px,
   like the tab strips above): the desktop keeps them exactly as they were.

   .view-select-bar - a "View" label and a RadzenSelectBar: ProgramViewBar
   (the account list, the transactions and the account detail screens) and
   the transactions screen's own view switcher. A select bar is a nowrap row,
   so the five programs of a multi-program licence wanted 468px of a 343px
   column and the PAGE scrolled sideways to 521px; the four transaction views
   ran 19px past the same column. The buttons wrap instead - every one is a
   choice, and a scroller would hide the selected one. Radzen draws the bar as
   one joined strip (no start border after the first button, round corners on
   the first and the last only), which reads as broken once the buttons sit on
   several rows, so wrapped they are separate buttons: a gap, a full border
   and four corners each. The two button selectors carry
   .rz-selectbar-horizontal to match the specificity of the Radzen rule that
   removes the start border.

   CreditorInfoPanel (.creditor-info-panel - the Summary and Proposal tabs of
   the account): its legend, the caption and the creditor's name, is one line
   because RadzenFieldset writes white-space: nowrap INLINE on the legend -
   hence the !important. 421px to 547px in a 261px fieldset: the tab panel
   clipped it and showed a horizontal scrollbar of its own.
   ========================================================================== */
@media (max-width: 767.98px) {
  .view-select-bar > .rz-selectbar {
    flex-wrap: wrap;
    gap: 0.25rem;
  }

  .view-select-bar > .rz-selectbar.rz-selectbar-horizontal > .rz-button {
    border-inline-start: var(--rz-selectbar-border);
    border-radius: var(--rz-selectbar-border-radius);
  }

  .view-select-bar > .rz-selectbar.rz-selectbar-horizontal > .rz-button.rz-state-active {
    border-inline-start: var(--rz-selectbar-selected-border);
  }

  .creditor-info-panel > .rz-fieldset-legend {
    white-space: normal !important;
  }

  /* The legend's text sits in the collapse button, and a button centres its lines. */
  .creditor-info-panel > .rz-fieldset-legend > button {
    text-align: start;
  }
}

/* ==========================================================================
   GENERATE DOCUMENTS - SEND METHOD ACTIONS

   Keeps Go/Review/Send/Cancel at a FIXED position while the panel above them
   changes height: the send-method radios reveal a phone dropdown, an address
   box or a "save to lead" row as the channel changes, and the action set itself
   swaps one Go for Review + Send. Buttons that move under a pointer already
   travelling towards them are how the wrong one gets clicked.

   The card matches the height of the document tree column beside it (the row is
   a stretch flex container, so height:100% resolves against the taller
   sibling), the radio group takes the slack, and the actions sit on the floor.
   Anchoring from the BOTTOM is what pins Cancel and Go specifically - the
   variable part (Review appearing) is then the topmost item and pushes nothing.

   GLOBAL, not GenerateDocuments.razor.css: .gd-actions-card lands on the div
   RadzenCard renders, which carries no b-xxxxx scope attribute, so a scoped
   rule would compile to .gd-actions-card[b-xxxxx] and match nothing.
   ========================================================================== */
.gd-actions-card {
  height: 100%;
  display: flex;
  flex-direction: column;
}

/* min-height:0 so the scroll container can actually shrink below its content -
   without it a flex item's automatic minimum size is its content, and the card
   would grow instead of the body scrolling. */
.gd-actions-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
}

.gd-actions-foot {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--app-rule);
}

/* Stacked layout: the columns are no longer side by side, so there is no tree
   height to match and a full-height card would just leave a gap under the
   radios. The actions still follow the panel, which is what "at the bottom"
   means when the card is only as tall as its content. */
@media (max-width: 767.98px) {
  .gd-actions-card {
    height: auto;
  }

  .gd-actions-body {
    overflow-y: visible;
  }
}

/* Currency fields: feedback when the two-decimal guard in wwwroot/js/currency-input.js refuses a
   keystroke or a paste. Without it the character simply fails to appear and the field looks broken.
   Global rather than scoped because the input is rendered by RadzenNumeric and carries no b-xxxxx
   scope attribute, so a rule in a .razor.css would compile to a selector matching nothing. */
.cs-currency-reject,
.cs-percent-reject {
  animation: cs-currency-reject-flash 0.6s ease-out;
}

@keyframes cs-currency-reject-flash {
  0%, 100% {
    background-color: transparent;
    box-shadow: none;
  }
  15%, 55% {
    background-color: var(--rz-danger-lighter, #fdeaea);
    box-shadow: 0 0 0 2px var(--rz-danger, #f43f5e);
  }
}

@media (prefers-reduced-motion: reduce) {
  .cs-currency-reject,
  .cs-percent-reject {
    animation-duration: 0.01ms;
    outline: 2px solid var(--rz-danger, #f43f5e);
  }
}

/* ---- Date of birth field (Components/Shared/Controls/DateOfBirthPicker.razor) --------------
   Global rather than scoped: the calendar button holds an <SvgIcon>, whose file is inlined as a
   MarkupString and so carries no b-xxxxx scope attribute - a rule in a .razor.css would compile to
   a selector matching nothing, which is the trap SettingsExplorer.razor.css already fell into. */
.dob-row {
  display: flex;
  align-items: stretch;
  gap: 4px;
}

.dob-row > .dob-input {
  flex: 1 1 auto;
  min-width: 0;
}

.dob-cal {
  flex: 0 0 auto;
  width: 2rem;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--app-ink-2);
  background: var(--rz-input-background-color, var(--app-surface));
  border: 1px solid var(--rz-border-color, var(--app-rule));
  border-radius: var(--app-radius-control);
}

.dob-cal:hover:not(:disabled) { background: var(--app-surface-2); }
.dob-cal:disabled { opacity: 0.55; cursor: default; }

.dob-cal:focus-visible {
  border-color: var(--app-primary);
  box-shadow: var(--app-focus-ring);
  outline: none;
}

.dob-cal .fa-icon-v7 { font-size: 0.95rem; line-height: 1; }

.dob-parts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

/* Always present, empty or not: reserving the line is what stops the form from nudging the moment
   a date is read back or a message appears. */
.dob-readout {
  min-height: 1.05rem;
  font-size: 0.78rem;
  line-height: 1.05rem;
  color: var(--app-ink-2);
}

.dob-readout.dob-invalid { color: var(--rz-danger, #f43f5e); }

/* wi_ig_csd caps a plain short-date box at 155px, which this field outgrew when it gained a button
   and three dropdowns. Widened here - on the field itself and on a wrapper holding one - rather
   than making every host drop the class it shares with the rest of its form. */
.dob-field.wi_ig_csd,
.wi_ig_csd:has(> .dob-field) { max-width: 17.5rem; }

/* ---- SsnInput ------------------------------------------------------------------------------- */
/* Sized by the host (the field sits in form rows of very different widths), so the wrapper only
   stacks the message under the input rather than imposing a width of its own. */
.ssn-field { display: block; width: 100%; }

.ssn-message {
  margin-top: 2px;
  font-size: 0.78rem;
  line-height: 1.05rem;
  color: var(--rz-danger, #f43f5e);
}

/* The input carries the state too, not just the line under it: in a dense form the message can be
   the only red thing on screen and there is nothing tying it to the box it belongs to. */
.ssn-input-invalid.rz-textbox,
.ssn-input-invalid .rz-textbox {
  border-color: var(--rz-danger, #f43f5e);
}

/* ---- Password field with a show/hide eye (Components/Shared/Controls/CSPassword.cs) ---------
   Global rather than scoped: CSPassword is a C# class, which no .razor.css can reach, and the eye
   is an <SvgIcon> inlined as a MarkupString with no b-xxxxx scope attribute. The wrapper carries
   the call site's Style and class (a width, w-100) the way RadzenNumeric's own wrapper does; the
   input fills it and keeps its text clear of the eye with its end padding. inline-flex rather than
   inline-block: an inline-block wrapper adds the line's descender gap under the input, and the eye,
   which spans the wrapper's height, would then sit lower than the box. */
.cs-password {
  position: relative;
  display: inline-flex;
}

.cs-password > .rz-textbox {
  flex: 1 1 auto;
  min-width: 0;
  padding-inline-end: 2rem;
}

/* Edge draws its own reveal eye inside a password box: one eye is enough. */
.cs-password > .rz-textbox::-ms-reveal {
  display: none;
}

.cs-password-toggle {
  position: absolute;
  inset-block: 1px;
  inset-inline-end: 1px;
  width: 1.9rem;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: var(--app-radius-control);
  background: transparent;
  color: var(--app-ink-2);
  cursor: pointer;
}

.cs-password-toggle:hover:not(:disabled) { background: var(--app-surface-2); }
.cs-password-toggle:disabled { opacity: 0.55; cursor: default; }

.cs-password-toggle:focus-visible {
  box-shadow: var(--app-focus-ring);
  outline: none;
}

.cs-password-toggle .fa-icon-v7 { font-size: 1rem; }

/* ---- AddressOneLine suggestions ------------------------------------------------------------- */
/* The dropdown used to hardcode background:#fff inline and set no colour, so in dark mode the
   inherited light ink landed on a white panel and the suggestions were unreadable. Both ends come
   from the palette now so the panel flips with the theme. */
.address-suggestions {
  position: absolute;
  z-index: 20;
  left: 0;
  right: 0;
  margin-top: 2px;
  background: var(--app-surface);
  color: var(--app-ink);
  border: 1px solid var(--app-rule);
  border-radius: var(--app-radius-control, 4px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.address-suggestion {
  padding: 6px 10px;
  font-size: 0.85rem;
  cursor: pointer;
}

.address-suggestion:hover { background: var(--app-surface-2); }

/* ============================================================================================
   SALES FORCE (/settings/salesforce)

   GLOBAL, not scoped, and deliberately so: these classes are shared by four separate components -
   the page, SalesForceAgentEditor, NewSalesAgentDialog and SalesForceMoveDialog. A scoped rule
   compiles to `.sf-field[b-xxxxx]` and would only ever match the one component it was declared in,
   so the editor and the dialogs would silently lose their layout.

   Tree-node styling stays scoped in SalesForceScreen.razor.css, because that markup belongs to the
   page alone.
   ============================================================================================ */

.sf-editor { display: flex; flex-direction: column; gap: .75rem; }

.sf-editor-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.sf-editor-sub {
  display: flex;
  align-items: center;
  gap: .4rem;
  flex-wrap: wrap;
  margin-top: .25rem;
}

.sf-editor-actions { display: flex; gap: .5rem; align-items: center; }

/* Two columns on a roomy pane, one when it is narrow. minmax(0,1fr) rather than 1fr so a long
   value cannot push the column wider than the grid. */
.sf-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .75rem 1rem;
  align-items: start;
}

@media (max-width: 760px) {
  .sf-grid { grid-template-columns: minmax(0, 1fr); }
}

.sf-field { display: flex; flex-direction: column; gap: .2rem; min-width: 0; }
.sf-field-wide { grid-column: 1 / -1; }

.sf-field > label {
  font-size: .8rem;
  font-weight: 600;
  color: var(--rz-text-secondary-color, #6c757d);
}

.sf-field .rz-textbox,
.sf-field .rz-textarea,
.sf-field .rz-dropdown,
.sf-field .rz-datepicker,
.sf-field .rz-numeric { width: 100%; }

.sf-field-split { display: grid; grid-template-columns: 1fr 90px; gap: .5rem; }
.sf-field-split > div { display: flex; flex-direction: column; gap: .2rem; min-width: 0; }
.sf-field-split label { font-size: .8rem; font-weight: 600; color: var(--rz-text-secondary-color, #6c757d); }

.sf-hint { font-size: .75rem; color: var(--rz-text-secondary-color, #6c757d); }
.sf-err { font-size: .75rem; color: var(--rz-danger, #dc3545); }
.sf-warn { font-size: .75rem; color: #7a5c00; }
.sf-req { color: var(--rz-danger, #dc3545); }

.sf-switch { display: flex; align-items: center; gap: .5rem; }

.sf-chip {
  font-size: .7rem;
  line-height: 1;
  padding: .2rem .4rem;
  border-radius: 3px;
  background: var(--rz-base-200, #eee);
  color: var(--rz-text-secondary-color, #6c757d);
  white-space: nowrap;
}

.sf-chip-inactive { background: #f6e0e0; color: #8a4a4a; }
.sf-chip-warn { background: #fdf1cf; color: #7a5c00; }
.sf-chip-web { background: #dfeaf7; color: #23527c; }

/* Reporting-line breadcrumb: the port of the WinForms FlowLayoutPanel of LinkLabels. */
.sf-crumbs { display: flex; align-items: center; gap: .25rem; flex-wrap: wrap; font-size: .8rem; }

.sf-crumb {
  border: 0;
  background: transparent;
  padding: 0;
  font: inherit;
  color: var(--rz-primary, #0d6efd);
  text-decoration: underline;
  cursor: pointer;
}

.sf-crumb-self { color: var(--rz-text-color, #212529); text-decoration: none; font-weight: 600; cursor: default; }
.sf-crumb-sep { color: var(--rz-text-secondary-color, #6c757d); }

.sf-supervisor { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; }
.sf-supervisor-name { font-weight: 600; }

.sf-subs { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .25rem; }
.sf-subs li { display: flex; align-items: center; gap: .35rem; flex-wrap: wrap; }

.sf-dialog { display: flex; flex-direction: column; gap: 1rem; }
.sf-dialog-lead { margin: 0; }
.sf-dialog-actions { display: flex; justify-content: flex-end; gap: .5rem; }

/* Dark theme. The media block must be guarded :not([data-theme="light"]) so an explicit light
   choice still beats a dark OS, and the [data-theme="dark"] block repeats it so an explicit dark
   choice beats a light OS. Never state the dark values outside the media query - unguarded they
   would apply in light mode too. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .sf-chip-inactive { background: #4a2f2f; color: #e8bcbc; }
  :root:not([data-theme="light"]) .sf-chip-warn     { background: #4a3f1a; color: #f0d68a; }
  :root:not([data-theme="light"]) .sf-chip-web      { background: #23384f; color: #b8d4f0; }
}

:root[data-theme="dark"] .sf-chip-inactive { background: #4a2f2f; color: #e8bcbc; }
:root[data-theme="dark"] .sf-chip-warn     { background: #4a3f1a; color: #f0d68a; }
:root[data-theme="dark"] .sf-chip-web      { background: #23384f; color: #b8d4f0; }

/* ---------------------------------------------------------------------------------------------
   CSSearchBox (Components/Shared/Controls/CSSearchBox.razor): the Windows CSSearchBox shape - a
   text field (typeable, or read-only in the DQ mode-7 question), a magnifier that opens the search
   dialog and a Clear button. .cs-searchbox-error is the Windows ControlHasError state: the typed
   text resolved to nothing. The dialog is inline (not the Radzen DialogService) so it works in
   every layout, inside a DQ form, and above a hosting Radzen dialog (QuestionnaireDialog,
   DocumentCriteriaDialog, WorkflowQuestionnaireDialog); its z-index sits above those. Colours come
   from the Radzen variables so the dialog follows the theme.
   --------------------------------------------------------------------------------------------- */
.cs-searchbox { display: flex; align-items: center; gap: 0.25rem; }
.cs-searchbox-input { flex: 1 1 auto; min-width: 0; text-overflow: ellipsis; }
.cs-searchbox-input[readonly] { cursor: pointer; }
.cs-searchbox-input:disabled { cursor: default; }
.cs-searchbox-error .cs-searchbox-input,
.cs-searchbox-error .cs-searchbox-input:focus {
  border-color: var(--rz-danger, #d32f2f);
  box-shadow: 0 0 0 1px var(--rz-danger, #d32f2f) inset;
}
.cs-searchbox-btn { flex: 0 0 auto; }

/* a native <dialog> in the top layer (showModal): centred by the browser, above everything, and
   immune to the DQ card's backdrop-filter / overflow: hidden, which would otherwise trap and clip
   a position: fixed dialog inside the card */
dialog.cs-searchbox-modal {
  padding: 0; border: 0; background: transparent;
  width: calc(100vw - 2rem); max-width: 1140px; max-height: 90vh;
  overflow: visible;
}
dialog.cs-searchbox-modal::backdrop { background: rgba(0, 0, 0, 0.4); }
.cs-searchbox-dialog {
  display: flex; flex-direction: column;
  width: min(1140px, 100%); max-height: 90vh;
  background: var(--rz-base-background-color, #fff);
  color: var(--rz-text-color, inherit);
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}
.cs-searchbox-header,
.cs-searchbox-footer {
  display: flex; align-items: center; justify-content: space-between; gap: 0.5rem;
  padding: 0.75rem 1rem;
}
.cs-searchbox-header { border-bottom: 1px solid var(--rz-border-color, #dee2e6); }
.cs-searchbox-footer { border-top: 1px solid var(--rz-border-color, #dee2e6); justify-content: flex-end; }
.cs-searchbox-body { flex: 1 1 auto; overflow: auto; padding: 1rem; }
.cs-searchbox-find { display: flex; gap: 0.5rem; margin-bottom: 0.75rem; }
.cs-searchbox-find input { flex: 1 1 auto; min-width: 0; }
.cs-searchbox-spinner { display: flex; justify-content: center; padding: 2rem; }

.cs-searchbox-grid { width: 100%; border-collapse: collapse; }
.cs-searchbox-grid th,
.cs-searchbox-grid td {
  padding: 0.4rem 0.6rem; text-align: left; vertical-align: top;
  border-bottom: 1px solid var(--rz-border-color, #dee2e6);
}
.cs-searchbox-grid th { font-weight: 600; white-space: nowrap; }
.cs-searchbox-grid tbody tr { cursor: pointer; }
.cs-searchbox-grid tbody tr:hover { background: var(--rz-secondary-lighter, #f2f2f2); }
.cs-searchbox-grid tbody tr.cs-searchbox-selected { background: var(--rz-primary-lighter, #e3f2fd); }
/* dialog title icon, search-row icon and empty state - the same icons CSSearchableComboBox uses */
.cs-searchbox-title { display: flex; align-items: center; gap: 0.5rem; }
.cs-searchbox-title-icon { font-size: 1.5rem; }
.cs-searchbox-find { align-items: center; }
.cs-searchbox-find-icon { flex: 0 0 auto; font-size: 1.1rem; color: var(--rz-text-secondary-color, #757575); }
.cs-searchbox-empty { display: flex; flex-direction: column; align-items: center; gap: 0.5rem; padding: 2rem 1rem; text-align: center; }
.cs-searchbox-empty-icon { font-size: 2.5rem; --fa-primary-color: #b0bec5; --fa-secondary-color: #b0bec5; }

/* ============================================================================================
   Queue banner aside (Components/Shared/Search/QueueBanner.razor)

   The right half of the banner's identity line - /queues puts its "My day" summary there. Capped
   at half the row so it can never squeeze the queue's own name, but ONLY from lg up, which is
   where the rail and the results column sit side by side. Below that the cap is what breaks it:
   the strip is ~400px of content, and 50% of a phone is 187px, so every chip stacks into a tall
   narrow column. Uncapped it simply wraps onto its own full-width line, which is the same
   affordance the rail itself takes at that width.
   ============================================================================================ */
.queue-header-aside { max-width: 100%; }

@media (min-width: 992px) {
  .queue-header-aside { max-width: 50%; }
}


/*Hide input spinners*/ 
/* For WebKit (Chrome, Safari, Edge, Opera) */
.rz-button.rz-numeric-button {
  display: none !important;
  
}

/* ============================================================================================
   An amount inside a localized sentence (My Settlements, CustomerPortal row YouSaveAfterFees: "You
   save: <strong>{AMOUNT}</strong> after fees"). The row brings its <strong> as markup, which a
   scoped rule cannot reach, so the savings keep their colour and weight here - those of the
   .fw-semibold.text-success span the sentence had before it was a row.
   ============================================================================================ */
.settlement-savings strong {
  font-weight: 600;
  color: rgba(var(--bs-success-rgb), 1);
}

/* ============================================================================================
   BUSINESS FUNCTION SECURITY (/settings/security/business-functions; RuleSwitch, badges, tags)

   GLOBAL, not scoped: RuleSwitch has no .razor.css, and the same switch, badges and tags render
   inside other components from slice S2 on (grids, the Why? view, the change review). Every
   color is a palette token, so the dark theme and the navy scheme (CollectPlus) flip it with no
   block of their own. The state is in the words and the pressed segment's weight and fill, never
   color alone (proposal 9.1).
   ============================================================================================ */
.bfs-rule-switch { display: inline-flex; border: 1px solid var(--app-rule-strong); border-radius: var(--app-radius-control); overflow: hidden; }
.bfs-rule-switch button {
  min-height: 32px; padding: 0 12px; border: 0; font: inherit; font-size: 13px; font-weight: 400;
  background: var(--app-surface); color: var(--app-ink-2); cursor: default; white-space: nowrap;
}
.bfs-rule-switch button + button { border-inline-start: 1px solid var(--app-rule-strong); }
.bfs-rule-switch button[aria-pressed="true"] { font-weight: 700; }
.bfs-rule-switch button[aria-pressed="true"].bfs-seg-allowed { background: var(--app-success-soft); color: var(--app-success-ink); }
.bfs-rule-switch button[aria-pressed="true"].bfs-seg-denied  { background: var(--app-danger-soft);  color: var(--app-danger-ink); }
.bfs-rule-switch button[aria-pressed="true"].bfs-seg-norule  { background: var(--app-surface-2);    color: var(--app-ink); }
.bfs-rule-switch button[aria-disabled="true"] { opacity: 1; }   /* read-only is NOT dimmed: an auditor reads the state */
.bfs-rule-switch button:focus-visible { outline: 2px solid var(--app-primary); outline-offset: -2px; }
@media (forced-colors: active) {
  .bfs-rule-switch button[aria-pressed="true"] { outline: 2px solid CanvasText; outline-offset: -3px; }
  /* after the pressed rule, which has the same specificity: Tab lands on the pressed segment, so focus must differ
     from pressed in style, not only in a color the forced palette replaces */
  .bfs-rule-switch button:focus-visible { outline: 3px dashed Highlight; outline-offset: -5px; }
}

.bfs-badge { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 700; white-space: nowrap; }
.bfs-badge-high      { background: var(--app-danger-soft);   color: var(--app-danger-ink); }
.bfs-badge-sensitive { background: var(--app-warning-soft);  color: var(--app-warning-ink); }
.bfs-badge-tier0     { background: var(--app-danger-strong); color: var(--app-danger-strong-ink); }
.bfs-tag { display: inline-flex; padding: 2px 8px; border-radius: 999px; border: 1px dashed var(--app-rule-strong); color: var(--app-ink-2);
           font-size: 11.5px; white-space: nowrap; }

/* Slice S3: the status and answer pills of Who can and Why? (BusinessFunctionWhyModel.StatusPillCss / AnswerPillCss). Global for the reason above: S4's change preview renders the same pills. Tokens only; the state is
   always in the pill's words, never its color alone. */
.bfs-pill { display: inline-flex; align-items: center; padding: 2px 9px; border-radius: 999px; font-size: 11.5px; line-height: 1.5;
            white-space: nowrap; border: 1px solid transparent; }
.bfs-pill-passed        { background: var(--app-success-soft); color: var(--app-ink); }
.bfs-pill-na            { background: var(--app-surface-2); color: var(--app-ink-2); }
.bfs-pill-notreached    { border: 1px dashed var(--app-rule-strong); color: var(--app-ink-2); }
.bfs-pill-later         { border: 1px dashed var(--app-rule-strong); color: var(--app-ink-3); }
.bfs-pill-allowed       { background: var(--app-success-soft); color: var(--app-success-ink); border-color: var(--app-success-ink); font-weight: 700; }
.bfs-pill-denied        { background: var(--app-danger-strong); color: var(--app-danger-strong-ink); font-weight: 700; }
.bfs-pill-notavailable  { background: var(--app-surface-2); color: var(--app-ink); border-color: var(--app-rule-strong); font-weight: 700; }
.bfs-pill-notevaluated  { background: var(--app-warning-soft); color: var(--app-warning-ink); font-weight: 700; }
@media (forced-colors: active) {
  .bfs-pill { border: 1px solid CanvasText; }
}

/* Slice S4: the editable rule switch, the "Changed, not saved" tag and an edit that cannot be saved. Global for the reason
   above: the rows of By group and By function and the change review (a dialog outside the page) render them. Tokens only;
   the state is always in words (the tag, the refusal's lead), never its color alone. */
.bfs-rule-switch.bfs-editable button { cursor: pointer; }
.bfs-rule-switch.bfs-editable button[aria-pressed="false"]:hover { background: var(--app-surface-2); color: var(--app-ink); }
.bfs-changed { display: inline-flex; padding: 2px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 700; white-space: nowrap;
               background: var(--app-info-soft); color: var(--app-info-ink); }
.bfs-refusal { margin: 4px 0 0; padding: 4px 8px; font-size: 12px; border-radius: var(--app-radius-control);
               background: var(--app-danger-soft); color: var(--app-danger-ink); }
@media (forced-colors: active) {
  .bfs-changed, .bfs-refusal { border: 1px solid CanvasText; }
}

/* Slice S7: a take-over's comparison and the fold of its card in the change review (a dialog outside the page), and the presses
   of By function. Global for the reason above. Tokens only; the state is always in words, never color alone. */
.bfs-parity { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; padding-top: 8px; border-top: 1px solid var(--app-rule); }
.bfs-parity-head { margin: 0; font-size: 13px; font-weight: 700; }
.bfs-parity-item { display: flex; flex-direction: column; gap: 2px; padding: 6px 8px; border: 1px solid var(--app-rule); border-radius: var(--app-radius-control); }
.bfs-parity-accept { display: flex; align-items: center; gap: 6px; margin-top: 2px; font-size: 13px; }
.bfs-parity-fold > summary { font-size: 12.5px; color: var(--app-primary); cursor: pointer; }
.bfs-parity-fold[open] > summary { margin-bottom: 4px; }
.bfs-parity-fold .bfs-rv-edit + .bfs-rv-edit { margin-top: 4px; }
.bfs-fn-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.rz-button.rz-light.bfs-fn-return:not(.rz-state-disabled),
.rz-button.rz-light.bfs-fn-return:not(.rz-state-disabled):hover { color: var(--app-danger-ink); }
