/* LoanWise app styles. Brand palettes + motion/shape tokens live in brand-themes.css;
   component look comes from MudBlazor themed per tenant (TenantThemeProvider). */

/* Home module tiles */
.lw-tile {
    border-radius: var(--lw-radius-box);
    transition: box-shadow var(--lw-duration-fast) var(--lw-ease),
                transform var(--lw-duration-fast) var(--lw-ease);
}

.lw-tile:hover {
    box-shadow: var(--lw-shadow-raised);
    transform: translateY(-2px);
}

/* ============================================================================
   Sign-in page (Fatih, 2026-09-24): one light background colour under a faint ledger grid, and a white card
   with the product name, a hairline, the tenant's logo and the SSO button. Every tenant sees the same page; only
   the logo differs. The card rises in once on load, only when the user allows motion. The admin portal has the
   same page (AdminWebUI site.css, with "Admin Portal" in place of the logo): keep the two in sync.
   ============================================================================ */

.lw-login-stage {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    overflow: hidden;
    background: #f7f8fa;
    color: #16181d;
}

/* Faint ledger grid, fading out towards the edges */
.lw-stage-grid {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(22, 24, 29, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(22, 24, 29, 0.08) 1px, transparent 1px);
    background-size: 44px 44px;
    mask-image: radial-gradient(80% 80% at 50% 45%, #000000 30%, transparent 100%);
}

/* The card */
.lw-login-card {
    position: relative;
    width: 100%;
    max-width: 400px;
    padding: 44px 40px 40px;
    text-align: center;
    border-radius: 8px;
    background: #ffffff;
    border: 1px solid #e4e7ec;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04), 0 12px 32px rgba(16, 24, 40, 0.06);
}

/* Product name. "LoanWise" is the largest thing on the card (the product; the tenant's logo is smaller), and
   "Loan Management Platform" under it is stretched to exactly its width, so both edges line up: the block is as
   wide as "LoanWise" and the subtitle is justified across it (the letter spacing brings it within a few pixels,
   the two word gaps take up the rest). The letters, not the boxes, have to line up: at 52 px the L of "LoanWise"
   starts 4.1 px inside its box and the e ends 0.7 px inside it, while the small L starts 1.1 px in and the m ends
   2.3 px in (side bearing plus the trailing letter spacing), so the subtitle is inset 3 px on the left and reaches
   1.5 px past the box on the right (Manrope, measured 2026-09-24; re-measure if the sizes change). */
.lw-login-brand {
    display: inline-block;
}

.lw-login-title {
    margin: 0;
    font-family: var(--lw-font-display);
    font-size: 3.25rem;
    font-weight: 650;
    line-height: 1.1;
    letter-spacing: -0.025em;
    color: #16181d;
}

.lw-login-product {
    margin: 2px -1.5px 0 3px;
    font-size: 0.9375rem;
    font-weight: 500;
    letter-spacing: 0.09em;
    color: #5f6470;
    text-align: justify;
    text-align-last: justify;
}

.lw-login-rule {
    margin: 28px 0 0;
    border: 0;
    border-top: 1px solid #eceef1;
}

/* The tenant's logo, centred; a tenant without one shows its name */
.lw-login-company {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    margin: 32px 0;
}

.lw-login-logo {
    display: block;
    height: 42px;
    width: auto;
    max-width: 100%;
    object-fit: contain;   /* an uploaded logo too wide for the card shrinks instead of squashing */
}

/* Venue's built-in wordmark by its file, so it keeps its height under Venue's own colours and an uploaded logo doesn't
   (the company's own logo, weekly meeting 2026-10-23 #5). */
.lw-login-logo:is([src$="venue-logo.svg"], [src$="venue-logo-light.svg"]) {
    height: 40px;   /* thin letters and no symbol: at this height it carries the same weight as the Cashco logo */
}

.lw-login-company-name {
    font-size: 1.25rem;
    font-weight: 600;
    color: #16181d;
}

/* SSO button: black with white text */
.lw-sso-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 13px 18px;
    border-radius: 6px;
    background: #000000;
    color: #ffffff;
    font-size: 0.9375rem;
    font-weight: 600;
    text-decoration: none;
    transition: background-color var(--lw-duration-fast) var(--lw-ease),
                transform var(--lw-duration-fast) var(--lw-ease);
}

.lw-sso-btn:hover {
    background: #2a2a2a;
}

.lw-sso-btn:active {
    transform: scale(0.985);
}

.lw-sso-btn:focus-visible {
    outline: 2px solid #000000;
    outline-offset: 3px;
}

/* #12556: "You'll be signed out soon", two minutes before the idle sign-out (lw.js lwStartIdleSignOut). Above every dialog. */
.lw-idle-warn {
    position: fixed;
    inset: 0;
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(20, 28, 40, 0.45);
}
.lw-idle-card {
    width: min(440px, 100%);
    padding: 20px 22px 16px;
    border-radius: 12px;
    background: var(--mud-palette-surface, #fff);
    color: var(--mud-palette-text-primary, #1f2937);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
}
.lw-idle-card h2 {
    margin: 0 0 8px;
    font-size: 1.125rem;
    font-weight: 700;
}
.lw-idle-card p {
    margin: 0 0 16px;
    font-size: 0.9375rem;
    line-height: 1.5;
}
.lw-idle-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}
.lw-idle-buttons button {
    font: inherit;
    font-weight: 600;
    font-size: 0.875rem;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    border: 1px solid var(--mud-palette-primary, #2262ac);
}
.lw-idle-out {
    background: transparent;
    color: var(--mud-palette-primary, #2262ac);
}
.lw-idle-stay {
    background: var(--mud-palette-primary, #2262ac);
    color: var(--mud-palette-primary-text, #fff);
}
.lw-idle-buttons button:focus-visible {
    outline: 2px solid var(--mud-palette-primary, #2262ac);
    outline-offset: 2px;
}

/* #12556: a sign-in refused for no second step (MFA). */
.lw-login-refused {
    margin: 0 0 14px;
    padding: 10px 12px;
    border-radius: 8px;
    background: #fdecea;
    color: #8a1c1c;
    font-size: 0.875rem;
    line-height: 1.4;
}

.lw-login-help {
    margin: 18px 0 0;
    font-size: 0.8125rem;
    line-height: 1.5;
    color: #5f6470;
}

@media (max-width: 480px) {
    .lw-login-card {
        padding: 36px 24px 32px;
    }
}

@media (prefers-reduced-motion: no-preference) {
    .lw-login-card {
        animation: lw-card-enter 420ms var(--lw-ease) both;
    }
}

@keyframes lw-card-enter {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

/* Buttons: subtle press feedback in the gap before async loading indicators take over */
.mud-button-root:active:not(:disabled) {
    transform: scale(0.98);
}

.mud-button-root {
    transition: transform var(--lw-duration-fast) var(--lw-ease),
                box-shadow var(--lw-duration-fast) var(--lw-ease),
                background-color var(--lw-duration-fast) var(--lw-ease);
}

/* FocusOnNavigate (Routes.razor) moves focus to the page's <h1> after every navigation so screen readers
   announce the new page; a heading is not interactive, so no ring is drawn around it (as in the Blazor
   template). The focus itself stays. */
h1:focus,
h1:focus-visible {
    outline: none;
}

/* Keyboard focus ring in the tenant accent (ui-guidelines.md), the deep variant so it holds 3:1 on white */
.mud-button-root:focus-visible,
.mud-input-slot:focus-visible {
    outline: 2px solid var(--lw-accent-strong, var(--lw-accent));
    outline-offset: 2px;
}

/* Help tooltips (InfoHint.razor) ask for Color.Surface. MudBlazor 8 emits mud-theme-surface for it but defines
   no style, so the bubble had no background of its own. Give it the surface, the ink text, a hairline ring and
   the raised shadow; border-color feeds the arrow (MudBlazor draws it with border-top-color: inherit). */
.mud-tooltip.mud-theme-surface {
    background-color: var(--mud-palette-surface);
    color: var(--mud-palette-text-primary);
    border-color: var(--mud-palette-surface);
    box-shadow: 0 0 0 1px var(--mud-palette-lines-default), var(--lw-shadow-raised);
}

/* Page content enter: light fade + rise (CSS only; disabled via prefers-reduced-motion tokens) */
.mud-main-content > * {
    animation: lw-enter var(--lw-duration-base) var(--lw-ease);
}

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

/* ============================================================================
   Work-surface backdrop. A subtle, STATIC brand-tinted wash behind the content
   (two faint corner glows in the tenant's --lw-primary / --lw-accent) so the
   app reads less flat without distracting from the work. Fixed so it doesn't
   scroll; white content cards sit cleanly on top. Per ui-guidelines the work
   surface stays calm — this is a tint, not the login's animated ambient art.
   Tints automatically per tenant via the .brand-{id} custom properties.
   ============================================================================ */
.mud-main-content {
    background-color: var(--mud-palette-background-gray);
    background-image:
        radial-gradient(56% 46% at 100% 0%, color-mix(in srgb, var(--lw-primary) 7%, transparent) 0%, transparent 60%),
        radial-gradient(46% 40% at 0% 100%, color-mix(in srgb, var(--lw-accent) 7%, transparent) 0%, transparent 62%);
    background-attachment: fixed;
    background-repeat: no-repeat;
}

/* ============================================================================
   Shared UI foundation (UI overhaul, 2026-06-18). Tabular money, KPI stat tiles,
   section cards, status chips, page header. Introduced by the start-page
   dashboard and rolled out screen-by-screen. Colours read MudBlazor's per-tenant
   palette variables (--mud-palette-*) so everything inherits the tenant theme;
   status-chip tints are a fixed, calm semantic set.
   ============================================================================ */

/* Tabular lining figures so money + counts align in columns and don't jitter. */
.lw-tnum {
    font-variant-numeric: tabular-nums lining-nums;
}

/* App-bar wordmark: the "LoanWise" suffix after the company's logo button reads as a quiet sub-label behind a hairline
   (prototype v141). */
.lw-wordmark-sub {
    color: var(--mud-palette-text-secondary);
    font-weight: 600;
    line-height: 24px;
    padding-inline-start: 14px;
    border-inline-start: 1px solid var(--mud-palette-lines-default);
    white-space: nowrap;
}

/* App-bar wordmark: the tenant's logo, a hairline, then the product name. */
.lw-wordmark {
    display: flex;
    align-items: center;
    gap: 12px;
}

.lw-brand-logo {
    display: block;
    height: 36px;   /* prototype v141's logo (Fatih, Nov 19, 2026) */
    width: auto;
    /* An uploaded logo of any shape (weekly meeting 2026-10-23 #5): a wide one shrinks into the bar instead of pushing the
       bell and the branch off it. */
    max-width: 220px;
    object-fit: contain;
    object-position: left center;
}

.lw-brand-logo:is([src$="venue-logo.svg"], [src$="venue-logo-light.svg"]) {
    height: 31px;   /* Venue's wide wordmark with no symbol: a little shorter to carry the same visual weight; its light version
                       on the dark theme is the same size (Fatih, Nov 19, 2026) */
}

/* Compact density keeps the 48 px bar, and the logo its earlier size there (phones keep theirs, below). */
@media (min-width: 600px) {
    .mud-appbar-dense .lw-brand-logo {
        height: 28px;
    }

    .mud-appbar-dense .lw-brand-logo:is([src$="venue-logo.svg"], [src$="venue-logo-light.svg"]) {
        height: 24px;
    }
}

/* A company without a logo yet shows its name as text (TenantThemeProvider; Fatih, 2026-10-08): one line that takes the
   room the app bar has left and ends in an ellipsis only when the bar needs that room (the full name is its tooltip).
   The slot may shrink (lw-brand-slot, CompanySwitcher); the "LoanWise" label beside it never does. A fixed phone cap cut
   "QA Three Lending Ltd" by one pixel while the bar had room to spare (screen check 2026-10-08). */
.lw-brand-slot {
    min-width: 0;
    flex: 0 1 auto;
}

.lw-brand-slot .lw-wordmark,
.lw-brand-slot .lw-company-switch {
    min-width: 0;
    max-width: 100%;
}

.lw-brand-slot .lw-wordmark-sub {
    flex-shrink: 0;
}

.lw-brand-name {
    display: block;
    min-width: 0;
    max-width: 360px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* The company's logo button and "LoanWise" side by side (CompanySwitcher; prototype v141: the arrow beside the logo). The
   pair spans the bar's height so the company menu still hangs from its bottom edge. */
.lw-appbar-brand {
    display: flex;
    align-items: center;
    align-self: stretch;
    gap: 14px;
}

.lw-appbar-brand > .mud-menu {
    min-width: 0;
}

.lw-company-caret {
    color: var(--mud-palette-text-secondary);
}

/* The logo doubling as the company switch (CompanySwitcher): it looks like the logo and works like a button. */
.lw-company-switch {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    margin: 0;
    padding: 0;
    border: 0;
    background: none;
    color: inherit;
    font: inherit;
    cursor: pointer;
}

.lw-company-switch:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 4px;
    border-radius: 4px;
}

/* KPI stat tile (StatTile.razor) */
.lw-stat-head {
    gap: 8px;
}

.lw-stat {
    border-radius: var(--lw-radius-box);
    transition: box-shadow var(--lw-duration-fast) var(--lw-ease),
                transform var(--lw-duration-fast) var(--lw-ease);
}

.lw-stat:hover {
    box-shadow: var(--lw-shadow-raised);
    transform: translateY(-2px);
}

.lw-stat-value {
    font-family: var(--lw-font-display);
    font-size: 1.625rem;
    font-weight: 500;
    letter-spacing: -0.01em;
    line-height: 1.2;
    color: var(--mud-palette-text-primary);
}

/* Page header (PageHeader.razor) */
.lw-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.lw-page-title {
    font-family: var(--lw-font-display);
    font-size: 1.625rem;   /* the prototype's 26 px (Fatih, Nov 20, 2026) */
    font-weight: 600;
    letter-spacing: -0.015em;
    line-height: 1.2;
    margin: 0;
    color: var(--mud-palette-text-primary);
}

/* The title block beside the actions. A flex item is at least as wide as its content by default, and a nowrap line in
   the meta (Home's branch tag) would then push the page past a phone's width; min-width: 0 lets the block shrink, so
   the tag's own max-width and ellipsis take effect. */
.lw-page-head-main {
    min-width: 0;
    max-width: 100%;
}

.lw-page-sub {
    font-size: 0.875rem;
    color: var(--mud-palette-text-secondary);
    margin: 3px 0 0;
}

/* Page header meta line (PageHeader Meta). Holds no spacing itself, so it takes no room when empty. */
.lw-page-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* Home's branch tag: whose figures the page shows (the top-bar working branch, or all branches). */
.lw-branch-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 10px;
    padding: 3px 12px 3px 9px;
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 999px;
    background: var(--mud-palette-surface);
    color: var(--mud-palette-text-primary);
    font-size: 0.8125rem;
    font-weight: 500;
    line-height: 1.4;
    /* The branch's name now (meeting 2026-10-06), which can be long: never wider than the header. */
    max-width: 100%;
}

.lw-branch-tag .mud-icon-root {
    flex-shrink: 0;
    font-size: 1rem;
    color: var(--mud-palette-text-secondary);
}

.lw-branch-tag-text {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Status chip (StatusChip.razor) — soft tint + same-family dark text */
.lw-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-height: 24px;   /* the prototype's chip: 24 px, 12 px semi-bold, its colours below (Fatih, Nov 20, 2026) */
    box-sizing: border-box;
    font-size: 0.75rem;
    line-height: 1;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 999px;
    white-space: nowrap;
}

.lw-chip-success { background: #e8f3e9; color: #2e7d32; }
.lw-chip-warning { background: #fdf1e0; color: #9a5b00; }
.lw-chip-danger  { background: #fbe9e9; color: #c62828; }
.lw-chip-info    { background: #e6f2f7; color: #004077; }
.lw-chip-neutral { background: #eef1f6; color: #243248; }

/* A chip whose text may be long (the branch chip on the loan page and the client file: a branch name may have up to 100
   characters): never wider than its line, it ends in an ellipsis instead of widening a phone screen, and its title has
   the whole text. */
.lw-chip.lw-chip-fit {
    display: inline-block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* A checkbox or switch with an InfoHint after it. MudBlazor's boolean inputs don't shrink, so a long label pushed the
   "i" past the card's edge, where the card cut it off; here the label wraps and the "i" stays right after it. */
.lw-check-hint {
    display: flex;
    align-items: center;
    min-width: 0;
}

.lw-check-hint > .mud-input-control.mud-input-control-boolean-input {
    flex: 0 1 auto;
    min-width: 0;
}

.lw-check-hint > .mud-tooltip-root {
    flex: 0 0 auto;
}

/* Quote schedules beside the loan request: dates stay on one line (they used to break at every hyphen) and the cells
   are tighter, so the money columns fit the panel instead of scrolling sideways. Phones get MudTable's stacked rows.
   The selectors match MudBlazor's dense-table rule (padding-inline 16px 24px), which a shorter selector loses to. */
.lw-quote-table.mud-table-dense * .mud-table-row .mud-table-cell {
    padding-inline: 8px;
    white-space: nowrap;
}

.lw-quote-table.mud-table-dense * .mud-table-row .mud-table-cell:first-child {
    padding-inline-start: 16px;
}

.lw-quote-table.mud-table-dense * .mud-table-row .mud-table-cell:last-child {
    padding-inline-end: 16px;
}

/* Dashboard worklist rows */
/* Home collections worklist: five equal columns that grow and shrink with the page (phones get a two-line layout,
   below; a narrow desktop card scrolls sideways in its .lw-table-scroll wrapper). The client column is left-aligned;
   every other column is centred, header, rows and the total alike, so each value sits under its heading. */
.lw-worklist {
    width: 100%;
    min-width: 520px;
    border-collapse: collapse;
    table-layout: fixed;
}

.lw-worklist th:not(:first-child),
.lw-worklist td:not(:first-child) {
    text-align: center;
}

.lw-worklist td {
    overflow-wrap: anywhere;
}

.lw-worklist th {
    font-size: 0.72rem;
    font-weight: 400;
    text-transform: none;
    color: var(--mud-palette-text-secondary);
    text-align: left;
    padding: 8px 14px;
}

.lw-worklist td {
    font-size: 0.85rem;
    padding: 10px 14px;
    border-top: 1px solid var(--mud-palette-lines-default);
}

.lw-worklist tbody tr {
    cursor: pointer;
    transition: background-color var(--lw-duration-fast) var(--lw-ease);
}

.lw-worklist tbody tr:hover {
    background-color: var(--mud-palette-action-default-hover);
}

/* Secondary line under a worklist customer name (product · loan #). */
.lw-worklist-sub {
    font-size: 0.72rem;
}

/* Totals footer row: a quiet rule-topped total of everything owing (the table itself shows only the first rows;
   the count is on the card's "View all" button). */
.lw-worklist tfoot td {
    font-size: 0.8rem;
    font-weight: 600;
    padding: 10px 14px;
    border-top: 2px solid var(--mud-palette-lines-default);
    color: var(--mud-palette-text-secondary);
}

/* Clickable table rows: pointer affordance + hover tint + a keyboard-focus ring shown when a focusable
   control inside the row (e.g. an "Open" action button) is focused. Apply via MudTable RowClass="lw-row-click"
   (lands on the <tr>) or directly on a <tr>; pair it with a focusable in-row control for keyboard access. */
.lw-row-click {
    cursor: pointer;
    transition: background-color var(--lw-duration-fast) var(--lw-ease);
}

.lw-row-click:hover {
    background-color: var(--mud-palette-action-default-hover);
}

.lw-row-click:focus-within {
    outline: 2px solid var(--mud-palette-primary);
    outline-offset: -2px;
}

/* Canonical empty-state block (EmptyState shared component). */
.lw-empty {
    min-height: 120px;
}

/* Right-aligned tabular numerals for money / count cells — replaces inline style="text-align:right" + tabular
   nums so per-tenant font scaling applies. Use Class="lw-num" on a <td>/<MudTd>/<th>. */
.lw-num {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

/* Horizontal-scroll wrapper for wide read-only tables so they scroll within their own box on narrow viewports
   instead of forcing the page to scroll sideways. Wrap a wide table: <div class="lw-table-scroll">…</div>. */
.lw-table-scroll {
    overflow-x: auto;
    width: 100%;
}

/* Right-align a non-numeric cell/header (text-align only — use .lw-num for money/counts so they also get
   tabular figures). Replaces inline style="text-align:right". */
.lw-right {
    text-align: right;
}

/* Key/value label column in a 2-column MudSimpleTable: replaces the assorted inline width:NNNpx on the label
   <td>. Auto-sizes to the longest label (kept on one line) instead of a hardcoded pixel width, so it scales
   with the font. Pair with the existing mud-text-secondary on the label cell. */
.lw-kv-label {
    white-space: nowrap;
    padding-right: 24px;
}

/* Slightly smaller helper text (replaces inline font-size:.8em/.85em); em-relative so it still font-scales. */
.lw-fs-sm {
    font-size: 0.85em;
}

/* Centered narrow column for a printed/standalone report body (replaces inline max-width:900px;margin auto). */
.lw-report-narrow {
    max-width: 900px;
    margin: 24px auto;
}

/* Dashboard worklist totals row — separated by a heavier top rule + medium weight. */
.lw-worklist-total td {
    border-top: 2px solid var(--mud-palette-lines-default);
    font-weight: 600;
}

/* Phones: five columns do not fit, so each case becomes two lines - client and balance on top, then status, days and
   branch - and the column headings go (each value carries its own label). Nothing scrolls sideways; the total keeps the
   balance on the right. Uses the lw-wl-* cell classes in Index.razor. */
@media (max-width: 599.98px) {
    .lw-worklist {
        min-width: 0;
        table-layout: auto;
    }

    .lw-worklist,
    .lw-worklist tbody,
    .lw-worklist tfoot {
        display: block;
    }

    .lw-worklist thead {
        display: none;
    }

    /* Columns: status, days, the rest (the branch on the second line), balance. The branch's name may be long, so it gets
       whatever status and days leave, minmax(0, ...) lets it shrink below the name's width, and a name that still does
       not fit ends in an ellipsis instead of pushing the row past the screen. */
    .lw-worklist tr {
        display: grid;
        grid-template-columns: max-content max-content minmax(0, 1fr) max-content;
        align-items: center;
        column-gap: 12px;
        row-gap: 6px;
        padding: 10px 14px;
        border-top: 1px solid var(--mud-palette-lines-default);
    }

    .lw-worklist tbody tr:first-child {
        border-top: 0;
    }

    .lw-worklist tfoot tr {
        border-top: 2px solid var(--mud-palette-lines-default);
    }

    .lw-worklist td,
    .lw-worklist tfoot td,
    .lw-worklist-total td {
        display: block;
        padding: 0;
        border: 0;
    }

    .lw-worklist th:not(:first-child),
    .lw-worklist td:not(:first-child) {
        text-align: left;
    }

    .lw-worklist td.lw-wl-client {
        grid-column: 1 / 4;
        grid-row: 1;
    }

    .lw-worklist td.lw-wl-balance {
        grid-column: 4;
        grid-row: 1;
        align-self: start;
        text-align: right;
        font-weight: 600;
    }

    /* The loan's branch by name (meeting 2026-10-06; it was a short code, shown first on the line). It comes after status
       and days now and takes the rest of the line, under the balance too, so a usual name fits; a long one ends in an
       ellipsis (the cell's title has the full name). */
    .lw-worklist td.lw-wl-branch {
        grid-column: 3 / 5;
        grid-row: 2;
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .lw-worklist td.lw-wl-status {
        grid-column: 1;
        grid-row: 2;
    }

    .lw-worklist td.lw-wl-days {
        grid-column: 2;
        grid-row: 2;
    }

    .lw-worklist td.lw-wl-branch::before {
        content: "Branch: ";
        color: var(--mud-palette-text-secondary);
    }

    .lw-worklist td.lw-wl-days::after {
        content: " days";
        color: var(--mud-palette-text-secondary);
    }
}

/* A worklist-style table whose rows open nothing (Home's branch summary): no pointer, no hover tint. */
.lw-worklist.lw-static tbody tr {
    cursor: default;
}

.lw-worklist.lw-static tbody tr:hover {
    background-color: transparent;
}

/* Home's branch summary (company-wide staff at "All branches") uses the worklist table as it is: five equal columns, the
   figures centred under their headings. Phones: each branch becomes a block - its name, then four labelled figures two by
   two (the column headings go, as in the worklist). The total row takes the same shape. */
@media (max-width: 599.98px) {
    .lw-worklist.lw-branch-summary tr {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        column-gap: 16px;
        row-gap: 10px;
    }

    .lw-branch-summary td.lw-bs-branch {
        grid-column: 1 / -1;
        grid-row: 1;
        font-weight: 600;
    }

    .lw-branch-summary td.lw-bs-funded    { grid-column: 1; grid-row: 2; }
    .lw-branch-summary td.lw-bs-collected { grid-column: 2; grid-row: 2; }
    .lw-branch-summary td.lw-bs-pastdue   { grid-column: 1; grid-row: 3; }
    .lw-branch-summary td.lw-bs-owing     { grid-column: 2; grid-row: 3; }

    .lw-branch-summary td.lw-bs-funded::before,
    .lw-branch-summary td.lw-bs-collected::before,
    .lw-branch-summary td.lw-bs-pastdue::before,
    .lw-branch-summary td.lw-bs-owing::before {
        display: block;
        margin-bottom: 2px;
        font-size: 0.72rem;
        font-weight: 400;
        color: var(--mud-palette-text-secondary);
    }

    .lw-branch-summary td.lw-bs-funded::before    { content: "Funded today"; }
    .lw-branch-summary td.lw-bs-collected::before { content: "Collected today"; }
    .lw-branch-summary td.lw-bs-pastdue::before   { content: "Past due"; }
    .lw-branch-summary td.lw-bs-owing::before     { content: "Past-due balance"; }
}

/* Constrained (left-aligned) column for a settings/admin form so fields don't stretch the full page width.
   Replaces the assorted inline max-width:680/720px on the settings-form wrapper. */
.lw-settings-form {
    max-width: 720px;
}

/* Company settings: the cash profiles (Fatih, 2026-10-22), one under another: the name and the Default chip with the
   actions on the right, then the profile's rules and which branches use it. Long names and rules wrap, on a phone too. */
.lw-cash-profiles {
    list-style: none;
    margin: 0;
    padding: 0;
}

.lw-cash-profile {
    padding: 12px 16px;
}

.lw-cash-profile + .lw-cash-profile {
    border-top: 1px solid var(--mud-palette-lines-default);
}

.lw-cash-profile-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.lw-cash-profile-name {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 8px;
    min-width: 0;
}

.lw-cash-profile-title {
    font-weight: 500;
    overflow-wrap: anywhere;
}

.lw-cash-profile-actions {
    display: flex;
    flex: 0 0 auto;
}

.lw-cash-profile-rules {
    font-size: 0.875rem;
    margin-top: 2px;
    overflow-wrap: anywhere;
}

.lw-cash-profile-use {
    color: var(--mud-palette-text-secondary);
    font-size: 0.8125rem;
    margin-top: 2px;
}

/* A row of fields in a settings card (a MudStack Row: Loan settings' min/max, fee and EPP rows). The fields sit side by
   side while each has room for its whole label and wrap onto the next line otherwise, in a half-width card on a laptop
   as on a phone (Fatih's screen review, 2026-10-07: "EPP option", "Admin-fee grace (months)" and "Auto-push min days"
   were cut short). A shrunk MudBlazor label is capped at its field's width before it scales down, so a field needs
   its label's full-size width (measured in Manrope, 2026-10-07): 13rem for the longest labels here ("Admin-fee grace
   (months)", 199 px), 9.5rem for the shorter ones ("Max term (months)", 145 px), 4.5rem for one-word ones ("Semi-mo",
   67 px: the four still share one line on a 360 px phone). A check box keeps its natural width (MudBlazor's rule wins). */
div.lw-field-row {
    flex-wrap: wrap;
}

div.lw-field-row > * {
    flex: 1 1 13rem;
    min-width: 0;
}

div.lw-field-row.lw-field-row-short > * {
    flex-basis: 9.5rem;
}

div.lw-field-row.lw-field-row-tiny > * {
    flex-basis: 4.5rem;
}

/* A field whose value is long too (the EPP option select: "By recent-loan count"), wrapped in a div in the row. */
div.lw-field-row > div.lw-field-wide {
    flex-basis: 13rem;
}

/* A reason an outside service or a connector gave (a failed pull, a message not sent, a connector LoanWise turned off; W4b
   review of 2026-10-07): it may hold a long unbroken address or code, which wraps instead of widening a phone screen. */
.lw-reason {
    min-width: 0;
    overflow-wrap: anywhere;
}

/* Users dialog: the two branch lists, "Other branches" and "Has access to" (Cory / Ateel, 2026-10-02). A click moves a
   branch across; locked rows (their default branch, the company's default branch for staff, everything under
   company-wide access) carry a tag and a lock. Side by side from sm up, stacked on phones (MudGrid). */
.lw-transfer-box {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: var(--lw-radius-box);
    background: var(--mud-palette-surface);
}

.lw-transfer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 12px;
    border-bottom: 1px solid var(--mud-palette-lines-default);
}

.lw-transfer-list {
    height: 220px;
    overflow-y: auto;
    padding: 4px 0;
}

.lw-transfer-item {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 6px 12px;
    border: 0;
    background: none;
    color: inherit;
    font: inherit;
    font-size: 0.875rem;
    text-align: left;
    cursor: pointer;
    transition: background-color var(--lw-duration-fast) var(--lw-ease);
}

.lw-transfer-item:hover:not([disabled]) {
    background-color: var(--mud-palette-action-default-hover);
}

.lw-transfer-item:focus-visible {
    outline: 2px solid var(--mud-palette-primary);
    outline-offset: -2px;
}

.lw-transfer-item[disabled] {
    cursor: default;
}

.lw-transfer-name {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lw-transfer-tag {
    font-size: 0.72rem;
    color: var(--mud-palette-text-secondary);
    white-space: nowrap;
}

.lw-transfer-item .mud-icon-root {
    font-size: 1.1rem;
    color: var(--mud-palette-text-secondary);
}

.lw-transfer-empty {
    padding: 12px;
    font-size: 0.85rem;
    color: var(--mud-palette-text-secondary);
}

.lw-transfer-foot {
    display: flex;
    justify-content: flex-end;
    padding: 2px 8px;
    border-top: 1px solid var(--mud-palette-lines-default);
}

/* Visually-hidden label: present for screen readers but not painted. Use on an otherwise-empty action-column
   header (<MudTh><span class="lw-sr-only">Actions</span></MudTh>) so the column is announced. */
.lw-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Fenced "danger zone" on the loan action bar: destructive actions (Void / Rescind / Write-off) grouped at the
   end of the bar, set apart by a left rule + spacing so they aren't interleaved with the routine buttons. */
.lw-danger-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    padding-left: 12px;
    margin-left: 4px;
    border-left: 2px solid var(--mud-palette-error);
}

/* Dashboard "Quick actions" button cluster: even-width wrapping buttons, left-aligned labels. */
.lw-quick-actions {
    gap: 10px;
}

.lw-quick-action {
    flex: 1 1 160px;
    justify-content: flex-start;
}

/* Quick-action chips reuse the home-tile hover lift via .lw-tile */

/* Printed documents (the LoanWise replacement for FSL XtraReports — no DevExpress/PDF library).
   Shared by ReportShell and the collection-letter page so the print chrome-stripping lives in one place:
     .lw-print-sheet — the centred document column (its max-width is set inline, since it varies per doc);
     .lw-print-hide  — screen-only chrome (toolbar/back/print buttons, warnings) hidden when printing.
   On print: drop the app bar/drawer, zero the main-content padding, and flatten the sheet's shadow so
   only the document prints. */
.lw-print-sheet {
    margin: 0 auto;
    /* Documents are paper: the report/statement/PAD/letter sheet is pure white with near-black text, so it reads
       like a printout on screen and prints correctly. Scopes MudBlazor's palette vars to this subtree, so the
       MudPaper/tables/text inside use the paper colours rather than the app's canvas and ink. */
    --mud-palette-surface: #ffffff;
    --mud-palette-background: #ffffff;
    --mud-palette-background-gray: #ffffff;
    --mud-palette-text-primary: #1a1a1a;
    --mud-palette-text-secondary: #55555a;
    --mud-palette-lines-default: #e0e0e0;
    --mud-palette-table-lines: #e0e0e0;
    --mud-palette-divider: #e0e0e0;
    --mud-palette-action-default-hover: rgba(0,0,0,0.04);
    color: #1a1a1a;
    background-color: #ffffff;
}

/* The company's uploaded logo over a document's heading (DocumentLogo; weekly meeting 2026-10-23 #5): at most 56 px high and
   240 px wide whatever its shape, centred where the heading is centred and at the left of a letterhead. */
.lw-doc-logo {
    display: block;
    max-width: min(240px, 100%);
    max-height: 56px;
    width: auto;
    height: auto;
    margin-bottom: 12px;
}

@media print {
    .mud-appbar,
    .mud-drawer,
    .lw-print-hide {
        display: none !important;
    }

    /* A white page for printing, without the canvas tint behind the content. */
    html, body, .mud-main-content {
        background: #ffffff !important;
        background-image: none !important;
    }

    .mud-main-content {
        padding: 0 !important;
        margin: 0 !important;
    }

    .lw-print-sheet {
        box-shadow: none !important;
    }
}

/* Pre-Authorized Debit (PAD) agreement layout (PadAgreement.razor). Two-column parties + signature blocks,
   a numbered terms list, and signing lines — kept print-stable (no collapse) so the form prints like a form. */
.lw-pad-parties {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.lw-pad-terms {
    margin: 0 0 24px;
    padding-left: 20px;
    font-size: 0.8rem;
    line-height: 1.45;
}

    .lw-pad-terms li {
        margin-bottom: 8px;
    }

.lw-pad-signatures {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 28px 24px;
    margin-top: 32px;
}

.lw-sig-line {
    border-bottom: 1px solid var(--mud-palette-text-primary, #000);
    height: 30px;
}

@media (max-width: 599px) {
    .lw-pad-parties {
        grid-template-columns: 1fr;
    }
}

/* ============================================================================
   Shell & surfaces (2026-09-23). Appearance only: no element is added, moved or
   renamed. The navigation is the one place with some character - roomy rows and a
   soft pill in the tenant's own colour on the active item. Everything else stays
   quiet: hairline-bordered boxes with the menus' corner and a soft resting shadow
   (2026-09-30; flat before). Floating layers (menus, popovers, dialogs, snackbars,
   tooltips) keep their deeper shadows, so they still sit above the boxes.
   ============================================================================ */

/* App bar: white and flat, one hairline under its full width; the sidebar starts below it and never reaches into it
   (a line through the bar used to cut the wordmark). The tenant's logo leads, "LoanWise" beside it stays quiet; a
   tenant without a logo shows its name as text in its brand colour. */
.mud-layout .mud-appbar.mud-elevation-1 {
    box-shadow: none;
    border-bottom: 1px solid var(--mud-palette-lines-default);
}

.mud-layout .mud-appbar .mud-typography-h6 {
    color: var(--mud-palette-primary);
    font-size: 1.0625rem;
    font-weight: 600;
    letter-spacing: -0.005em;
}

/* App-bar menus (company switch, notifications, working branch) hang from the bar's bottom edge instead of covering its
   lower part (Fatih, 2026-09-30). MudBlazor opens a menu at the bottom of its anchor, so the anchor spans the bar's full
   height with the button centred in it. The list's top border lies on the bar's hairline, its top corners are square
   and its shadow falls below it only, so it reads as part of the bar. */
.mud-appbar .mud-menu.lw-appbar-menu {
    align-self: stretch;
    align-items: center;
}

.mud-popover.lw-appbar-popover {
    /* Branch names can be long (staff see names, not codes; meeting 2026-10-06): the menu never runs off a phone's
       screen, and a long name wraps. */
    max-width: min(420px, calc(100vw - 16px));
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 0 0 var(--lw-radius) var(--lw-radius);
    box-shadow: 0 12px 28px -6px rgba(16, 24, 40, 0.2), 0 6px 10px -4px rgba(16, 24, 40, 0.12);
}

/* The bell's unread count: MudBlazor pins it 8 px outside the button's top-right corner, which in the 48 px dense bar is
   above the top of the screen, so the count was cut off. Its centre goes on the bell glyph's top-right corner instead
   (the 24 px glyph sits 12 px in from each edge of the 48 px button); a longer count grows to the left. */
.mud-appbar .lw-bell-badge .mud-badge.mud-badge-top.right {
    top: 2px;
    right: 2px;
    bottom: auto;
    left: auto;
}

/* Pop-up messages (snackbars) open just under the app bar, not over its lower half - the same rule as the app-bar
   menus (Fatih, 2026-09-30) - so a follow-up reminder never covers the bell, the branch or Sign out. The bar is 64 px
   (Comfortable) or 48 px (Compact, dense). */
#mud-snackbar-container.mud-snackbar-location-top-right,
#mud-snackbar-container.mud-snackbar-location-top-center,
#mud-snackbar-container.mud-snackbar-location-top-left {
    top: calc(var(--mud-appbar-height) + 12px);
}

body:has(.mud-appbar-dense) #mud-snackbar-container.mud-snackbar-location-top-right,
body:has(.mud-appbar-dense) #mud-snackbar-container.mud-snackbar-location-top-center,
body:has(.mud-appbar-dense) #mud-snackbar-container.mud-snackbar-location-top-left {
    top: calc(var(--mud-appbar-height) * 0.75 + 12px);
}

/* The menu button (prototype v141; Fatih, Nov 19, 2026): its icon is in line with the menu's icons (the bar's left gutter
   is 8 px and the 48 px button's 20 px icon centres 32 px in, the middle of the 64 px rail of icons), and it turns half
   way round when the menu opens or closes. */
.mud-appbar .mud-toolbar-gutters {
    padding-left: 8px;
}

/* Compact density's smaller icon buttons (6 px) leave this one alone, so it stays in line in the 48 px bar too. */
.mud-appbar .mud-icon-button.lw-menu-toggle {
    padding: 14px;
}

.mud-appbar .lw-menu-toggle .mud-icon-root {
    font-size: 20px;
    transition: transform 300ms var(--lw-ease);
}

.mud-appbar .lw-menu-toggle.lw-menu-toggle-closed .mud-icon-root {
    transform: rotate(180deg);
}


/* Drawer: white, separated from the page by a hairline instead of a shadow. */
.mud-layout .mud-drawer.mud-elevation-1 {
    box-shadow: none;
    border-inline-end: 1px solid var(--mud-palette-lines-default);
}

.mud-drawer .mud-drawer-content > .mud-navmenu {
    padding: 14px 0 24px;
}

/* Rows: 44 px targets inset from the drawer edges, icon and label spaced for scanning. Home's icon starts 22 px in, where
   every icon sits when the menu closes to its 64 px rail, in line with the menu button (prototype v141). */
.mud-drawer .mud-nav-item > .mud-nav-link,
.mud-drawer .mud-nav-group > .mud-nav-link {
    min-height: 44px;
    margin: 2px 8px;
    padding: 10px 14px;
    border-radius: 999px;
    width: calc(100% - 16px);   /* full row inside the 8 px inset on each side */
    color: var(--mud-palette-text-primary);
    transition: background-color var(--lw-duration-fast) var(--lw-ease),
                color var(--lw-duration-fast) var(--lw-ease);
}

.mud-drawer .mud-nav-link .mud-nav-link-icon {
    font-size: 20px;   /* not rem: at a larger text size the icons stay in line with the menu button's */
    color: var(--mud-palette-text-secondary);
    transition: color var(--lw-duration-fast) var(--lw-ease);
}

.mud-drawer .mud-nav-link .mud-nav-link-text {
    margin-inline-start: 12px;
    font-size: 0.875rem;   /* the prototype's 14 px menu (Fatih, Nov 20, 2026) */
    font-weight: 500;
    white-space: nowrap;
    /* MudBlazor's icon-rail menu sets line-height 1 on its rows, which cut the bottom off "g" and "p" wherever a label
       clips its text (the "…" of a long label; Fatih, Nov 19, 2026): the menu's text keeps its normal line height. */
    line-height: 1.43;
}

.mud-drawer .mud-navmenu .mud-nav-link:hover:not(.mud-nav-link-disabled) {
    background-color: color-mix(in srgb, var(--lw-nav-accent, var(--mud-palette-primary)) 6%, transparent);
}

.mud-drawer .mud-navmenu .mud-nav-link:hover:not(.mud-nav-link-disabled) .mud-nav-link-icon {
    color: var(--mud-palette-text-primary);
}

/* Active page: a soft pill in the tenant's primary, label and icon in the primary too. */
.mud-drawer .mud-navmenu.mud-navmenu-default .mud-nav-link.active:not(.mud-nav-link-disabled),
.mud-drawer .mud-navmenu.mud-navmenu-default .mud-nav-link.active:not(.mud-nav-link-disabled):hover:not(.mud-nav-link-disabled) {
    background-color: color-mix(in srgb, var(--lw-nav-accent, var(--mud-palette-primary)) var(--lw-nav-tint, 10%), transparent);
    color: var(--lw-nav-accent-strong, var(--mud-palette-primary));
}

.mud-drawer .mud-navmenu .mud-nav-link.active:not(.mud-nav-link-disabled) .mud-nav-link-icon {
    color: var(--lw-nav-accent-strong, var(--mud-palette-primary));
}

.mud-drawer .mud-navmenu .mud-nav-link.active:not(.mud-nav-link-disabled) .mud-nav-link-text {
    font-weight: 700;
}

/* Groups: the header reads as a row like the others; the chevron stays grey, open or closed. */
.mud-drawer .mud-navmenu.mud-navmenu-default .mud-nav-link-expand-icon,
.mud-drawer .mud-navmenu.mud-navmenu-default .mud-nav-link-expand-icon.mud-transform {
    fill: var(--mud-palette-text-secondary);
    color: var(--mud-palette-text-secondary);
    font-size: 1.25rem;
}

.mud-drawer .mud-nav-group > .mud-nav-link.mud-expanded .mud-nav-link-text {
    font-weight: 600;
}

/* Children: indented one step under the group label, a size smaller and lighter, so the
   hierarchy shows at a glance without extra rules or labels. */
.mud-drawer .mud-nav-group .mud-navmenu .mud-nav-item > .mud-nav-link {
    min-height: 38px;
    margin: 1px 12px;
    padding: 8px 16px 8px 30px;
    border-radius: 999px;
    width: calc(100% - 24px);   /* full row inside the 12 px inset on each side */
}

.mud-drawer .mud-nav-group .mud-navmenu .mud-nav-link .mud-nav-link-icon {
    font-size: 1.125rem;
}

.mud-drawer .mud-nav-group .mud-navmenu .mud-nav-link .mud-nav-link-text {
    font-size: 0.875rem;
    font-weight: 500;
}

/* The menu by role (#12809): small uppercase headings over their links, as in Daniel's PDL prototype (Clients, Online
   lending, Consoles, Back office), the links under a heading a step in, and a count pill at the end of a row
   (unassigned online applications, loans waiting for a signature). */
.mud-drawer .lw-nav-heading {
    margin: 18px 22px 4px;
    white-space: nowrap;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--mud-palette-text-secondary);
}

/* A group under a heading (Administration under Back office) has the same row as the links beside it, and its own
   links sit one step further in. */
.mud-drawer .mud-nav-item.lw-nav-sub > .mud-nav-link,
.mud-drawer .mud-nav-group.lw-nav-sub > .mud-nav-link {
    min-height: 40px;
    margin: 1px 8px;
    padding: 8px 12px 8px 30px;   /* the prototype's step in: icons 38 px from the edge; 12 px at the end, as its rows */
}

.mud-drawer .mud-nav-item.lw-nav-sub > .mud-nav-link .mud-nav-link-text,
.mud-drawer .mud-nav-group.lw-nav-sub > .mud-nav-link .mud-nav-link-text {
    font-size: 0.875rem;
}

.mud-drawer .mud-nav-group.lw-nav-sub .mud-navmenu .mud-nav-item > .mud-nav-link {
    padding-left: 40px;
}

/* The count always shows whole: if the row ever runs short, the label ends in "…" instead (Fatih, Nov 19, 2026: the
   Online Applications count was cut off). With the 14 px menu (Nov 20) a 6 px gap keeps "Online Applications" whole beside a
   two-digit count. */
.mud-drawer .mud-nav-link-text:has(.lw-nav-badge) {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1 1 auto;
    min-width: 0;
}

.mud-drawer .lw-nav-label {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mud-drawer .lw-nav-badge {
    flex: 0 0 auto;
    min-width: 22px;
    padding: 1px 8px;
    border-radius: 999px;
    background-color: var(--lw-nav-accent-strong, var(--mud-palette-primary));
    color: var(--mud-palette-primary-text);
    font-size: 0.6875rem;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

/* Page margins. MainLayout's pa-2 / pa-sm-4 utilities are !important and used to override MudBlazor's
   top padding that clears the fixed app bar, so page titles started 8-16 px from the window top, under
   the bar. Restore the clearance (MudBlazor's own bar heights: 64 px from 600 px wide, 56 px on a phone held upright and
   48 px held sideways; 48 px dense, in Compact density) plus the intended gap, and give the work a little more room at
   tablet and desktop widths. */
.mud-layout .mud-appbar ~ .mud-main-content {
    padding-top: calc(var(--mud-appbar-height) - var(--mud-appbar-height) / 8 + 8px) !important;
}

@media (min-width: 0px) and (orientation: landscape) {
    .mud-layout .mud-appbar ~ .mud-main-content {
        padding-top: calc(var(--mud-appbar-height) - var(--mud-appbar-height) / 4 + 8px) !important;
    }
}

.mud-layout .mud-appbar-dense ~ .mud-main-content {
    padding-top: calc(var(--mud-appbar-height) * 0.75 + 8px) !important;
}

@media (min-width: 600px) {
    .mud-layout .mud-appbar ~ .mud-main-content {
        padding-top: calc(var(--mud-appbar-height) + 24px) !important;
    }

    .mud-layout .mud-appbar-dense ~ .mud-main-content {
        padding-top: calc(var(--mud-appbar-height) * 0.75 + 24px) !important;
    }

    .mud-layout .mud-main-content {
        padding-left: 20px !important;
        padding-right: 20px !important;
    }
}

@media (min-width: 1280px) {
    .mud-layout .mud-main-content {
        padding-left: 32px !important;
        padding-right: 32px !important;
    }
}

/* Boxes: the menus' rounded corner, a hairline border and a soft resting shadow (Fatih, 2026-09-30; sharp and flat
   before). A box inside another box stays flat, so a card never shows a shadow inside a card. Tables nested flat
   inside a card keep only the corner so there is never a double border. */
.mud-main-content .mud-paper:not(.mud-elevation-0),
.mud-main-content .mud-table:not(.mud-elevation-0) {
    border-radius: var(--lw-radius-box);
    border: 1px solid var(--mud-palette-lines-default);
    box-shadow: var(--lw-shadow-resting);
}

.mud-main-content :is(.mud-paper, .mud-table):not(.mud-elevation-0) :is(.mud-paper, .mud-table):not(.mud-elevation-0) {
    box-shadow: none;
}

/* Tabs raised as one frame around the tab bar and its panels (the client file: ApplyEffectsToContainer): the boxes'
   hairline and resting shadow instead of MudBlazor's grey one. Tabs without elevation stay as they are. */
.mud-main-content .mud-tabs[class*="mud-elevation-"]:not(.mud-elevation-0) {
    border: 1px solid var(--mud-palette-lines-default);
    box-shadow: var(--lw-shadow-resting);
}

.mud-main-content .mud-paper.mud-elevation-0,
.mud-main-content .mud-table.mud-elevation-0 {
    border-radius: var(--lw-radius-box);
}

/* Section cards: even 16 px padding in the header and body, matching the table cells. */
.mud-main-content .lw-card > .pa-3 {
    padding: 16px !important;
}

/* ---------------------------------------------------------------------------------------------------------------
   Small screens. The app bar holds menu, logo, product name, bell, branch switcher, the user's name and Sign out;
   on a phone that ran past the right edge and pushed Sign out off screen.
   - below 960 px the user's name goes (it is on the page and in the account's own screens);
   - below 600 px the product name goes, the logo shrinks a little, and Sign out / Sign in / the branch switcher
     show their icon only (the label stays in the accessibility tree);
   - long branch names end in an ellipsis at every width;
   - page and card headers let their actions wrap under the title instead of overflowing.
   --------------------------------------------------------------------------------------------------------------- */
.lw-appbar-branch .lw-appbar-label {
    display: inline-block;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: bottom;
}

.lw-section-head {
    flex-wrap: wrap;
}

/* A card header's right side (SectionCard): the prototype's grey hint, then any actions. */
.lw-section-head-end {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    min-width: 0;
}

.lw-section-hint {
    font-size: 12px;
    line-height: 1.4;
    color: var(--mud-palette-text-secondary);
}

/* A page header's actions sit beside the title when they fit, else move under it; on a narrow screen they wrap onto
   more lines instead of running past the right edge (the client file's row overflowed a phone-width screen). */
.lw-page-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    flex: 0 1 auto;
    min-width: 0;
}

/* Notifications inbox: the tabs keep their row and "Mark all read" wraps under them on a phone; a row's buttons sit at
   the right of its text, or under it, right-aligned, when the text needs the width. */
.lw-inbox-head {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px 8px;
}

.lw-inbox-head .lw-inbox-tabs {
    flex: 1 1 300px;
    min-width: 0;
}

.lw-notification-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px 12px;
}

.lw-notification-main {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    flex: 1 1 260px;
    min-width: 0;
}

.lw-notification-text {
    min-width: 0;
    overflow-wrap: anywhere;
}

.lw-notification-actions {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: auto;
}

/* Products page and the branch products dialog (meeting 2026-10-06): the product's names take the width and wrap (a long
   company name breaks rather than widening the card on a phone); the switch and the rename button keep their size at the
   right. */
.lw-product-row {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
}

.lw-product-text {
    flex: 1 1 auto;
    min-width: 0;
    overflow-wrap: anywhere;
}

.lw-product-actions {
    display: flex;
    align-items: center;
    flex: 0 0 auto;
    gap: 2px;
}

/* Activity audit. Filters flow into as many columns as fit (one on a phone). An entry's label, type and result wrap; its
   changes read "Record: field  old -> new", the old value muted, and long values break instead of widening the table. */
.lw-audit-filters {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 12px 16px;
    align-items: center;
}

.lw-audit-cell {
    min-width: 0;
}

.lw-audit-what {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 8px;
}

/* Every entry is one line of the same height (Fatih, 2026-10-22: rows of different sizes looked clunky). As a table (wider
   than 1280px) the columns have fixed widths and anything longer ends in "…": a long staff, client or branch name, the note
   after the label (the whole What line on hover). An entry opens under its row (the chevron, or a click anywhere on the
   row) only for what the row does not show: its loan, a value cut short at this width, its changes. Up to 1280px the table
   stacks into cards (MudTable Breakpoint.Md, whose own rule is max-width: 1280px): with the menu open, a narrower table
   left What no room beside the fixed columns. */
.lw-audit-row-more {
    cursor: pointer;
}

.lw-audit-note {
    color: var(--mud-palette-text-secondary);
    font-size: 0.8125rem;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (min-width: 1280.02px) {
    .lw-audit-table .mud-table-root {
        table-layout: fixed;
    }

    /* Tighter cells so What keeps the room (a time such as "Oct-09-2026 10:59:20 AM" takes up to about 172 px). */
    .lw-audit-table .mud-table-root .mud-table-cell {
        padding-left: 8px;
        padding-right: 8px;
        padding-inline-start: 8px;
        padding-inline-end: 8px;
    }

    .lw-audit-table .mud-table-root .mud-table-cell:first-child {
        padding-left: 16px;
        padding-inline-start: 16px;
    }

    .lw-audit-table .lw-audit-col-when {
        width: 200px;
    }

    .lw-audit-table .lw-audit-col-staff {
        width: 125px;
    }

    .lw-audit-table .lw-audit-col-subject {
        width: 170px;
    }

    .lw-audit-table .lw-audit-col-branch {
        width: 115px;
    }

    .lw-audit-table .lw-audit-col-toggle {
        width: 48px;
    }

    .lw-audit-table .lw-audit-row > td {
        height: 48px;
    }

    .lw-audit-table .lw-audit-line {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    /* The value itself ends in "…", so the browser can tell whether it is cut short (lw.js lwAuditWatch). */
    .lw-audit-table .lw-audit-text,
    .lw-audit-table .lw-audit-subject {
        display: block;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .lw-audit-table .lw-audit-what {
        flex-wrap: nowrap;
        overflow: hidden;
    }

    .lw-audit-table .lw-audit-what > * {
        flex: 0 0 auto;
    }

    .lw-audit-table .lw-audit-what > .lw-audit-label {
        flex: 0 1 auto;
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .lw-audit-table .lw-audit-what > .lw-audit-note {
        flex: 1 1 0;
    }
}

.lw-audit-toggle {
    text-align: right;
}

/* Change history (Reports / EntityAudit): as a table (960px and wider) the record and the field keep a readable width and
   a long value breaks anywhere rather than squeezing its neighbours, so a date stays on one line (2026-10-06: "Oct-05-"
   over "2026" in a narrow From column). The time may go under the date, so the When column gives way first. Below 960px
   the table stacks into cards. */
.lw-nowrap {
    white-space: nowrap;
}

/* One line in a table, from 600 px up (MudTable's breakpoint): the Collections worklist's Loan cell ("Payday loan #5"
   broke after "loan"; Fatih's screen review, 2026-10-07). Below 600 px the table is MudTable's stacked cards, where a long
   company product name may still wrap, so nothing is wider than a 375 px phone. */
@media (min-width: 600px) {
    .lw-nowrap-sm {
        white-space: nowrap;
    }
}

/* A wide worklist that must fit a laptop with the menu open (the Collections worklist: eleven columns came to ~1,200 px
   against ~860 px of room, so it scrolled sideways and cut off Follow-up; Fatih's screen review, 2026-10-07). Its cells
   take less side padding, and the columns staff need least (lw-col-optional: Opened and Last activity, both shown on the
   case) step out between 600 and 1,535 px (1,359 px until the columns became equal on 2026-10-22: nine equal columns at
   1,366 px left a date too little room for one line, and a client name at 1,440 px). Below 600 px the table is
   MudTable's cards, which keep every field. */
@media (min-width: 600px) {
    .lw-table-tight.mud-table-dense .mud-table-row .mud-table-cell {
        padding-left: 8px;
        padding-right: 8px;
        padding-inline-start: 8px;
        padding-inline-end: 8px;
    }
}

@media (min-width: 600px) and (max-width: 1535.98px) {
    .lw-col-optional {
        display: none;
    }

    /* Fewer columns share the width meanwhile (--lw-cols-narrow, see lw-table-even below). */
    .lw-table-even {
        --lw-cols-shown: var(--lw-cols-narrow, var(--lw-cols, 5));
    }
}

/* List tables laid out like Home's worklist (Fatih, 2026-10-22: each value centred under its heading, and "equal
   separation between the columns"), on a MudTable or a MudSimpleTable. Every heading and value is centred, money and
   dates included; the first column, the client or name the row is about (after a selection checkbox), stays
   left-aligned as on Home, and so do a long-text column marked lw-col-text and a full-width row (colspan).
   lw-table-center stops there. lw-table-even also shares the width equally: each heading asks for the same percentage
   (--lw-cols on the table: how many columns share the width, not counting a selection checkbox or a column marked
   lw-col-tight, which keep only the room they need; --lw-cols-narrow while the lw-col-optional columns are hidden),
   together 90% so the narrow columns fit beside them, and the browser hands any room left over to the shared columns in
   equal parts. A percentage rather than table-layout: fixed, so a value that cannot be narrower (a date, a loan number
   kept on one line) still gets its room and the other columns give way, instead of the value spilling into its
   neighbour. A sort arrow hangs beside its heading instead of pushing it off centre. On a phone, MudTable's stacked
   cards keep their label-left, value-right layout (MudBlazor hides the headings there and sets text-align: start
   !important). */
:is(.lw-table-even, .lw-table-center) .mud-table-root .mud-table-cell,
:is(.lw-table-even, .lw-table-center).mud-simple-table table tr > :is(th, td) {
    text-align: center;
}

:is(.lw-table-even, .lw-table-center) .mud-table-root tr > .mud-table-cell:first-child:not(:has(.mud-table-cell-checkbox)),
:is(.lw-table-even, .lw-table-center) .mud-table-root tr > .mud-table-cell:has(.mud-table-cell-checkbox) + .mud-table-cell,
:is(.lw-table-even, .lw-table-center) .mud-table-root .mud-table-cell:is(.lw-col-text, [colspan]),
:is(.lw-table-even, .lw-table-center).mud-simple-table table tr > :is(th, td):is(:first-child, .lw-col-text, [colspan]) {
    text-align: left;
}

.lw-table-even .mud-table-root .mud-table-head .mud-table-cell,
.lw-table-even.mud-simple-table table thead th {
    width: calc(90% / var(--lw-cols-shown, var(--lw-cols, 5)));
}

.lw-table-even .mud-table-root .mud-table-head .mud-table-cell:has(.mud-table-cell-checkbox),
.lw-table-even .mud-table-root .mud-table-head .mud-table-cell.lw-col-tight,
.lw-table-even.mud-simple-table table thead th.lw-col-tight {
    width: 0.1%;
}

:is(.lw-table-even, .lw-table-center) .mud-table-sort-label {
    position: relative;
}

:is(.lw-table-even, .lw-table-center) .mud-table-sort-label-icon {
    position: absolute;
    left: 100%;
}

/* A smaller arrow closer to its heading where narrow columns sit side by side (the collection console with its selection
   column at about 1,000 px, 2026-11-02: Follow-up's arrow touched "Assigned to"). */
.lw-sort-compact:is(.lw-table-even, .lw-table-center) .mud-table-sort-label-icon {
    font-size: 15px;
    margin-left: 1px;
}

/* The loan writer's Home (#12810, Daniel's PDL prototype): today's tiles in a grid that fills the row (two to a row on a
   phone), each a label, the count and a short note; a tile with a screen is a link, one without (not built yet) is plain. */
.lw-home-tiles {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 16px;
}

.lw-home-tile {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 16px 18px;
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: var(--mud-default-borderradius);
    box-shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 4px 12px rgba(16, 24, 40, .07);   /* the prototype's card */
    background: var(--mud-palette-surface);
    color: var(--mud-palette-text-primary);
    text-decoration: none;
    transition: border-color var(--lw-duration-fast) var(--lw-ease);
}

a.lw-home-tile:hover {
    border-color: var(--mud-palette-primary);
    color: var(--mud-palette-text-primary);
}

a.lw-home-tile:focus-visible {
    outline: 2px solid var(--mud-palette-primary);
    outline-offset: 2px;
}

.lw-home-tile-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--mud-palette-text-secondary);
}

.lw-home-tile-value {
    font-size: 28px;
    font-weight: 700;
    line-height: 1.15;
    color: var(--mud-palette-primary);
    font-variant-numeric: tabular-nums;
}

.lw-home-tile-note {
    font-size: 12px;
    color: var(--mud-palette-text-secondary);
}

@media (max-width: 599.98px) {
    .lw-home-tiles {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .lw-home-tile {
        padding: 12px 14px;
    }

    .lw-home-tile-value {
        font-size: 24px;
    }
}

/* The Recovery console (#12826-#12828, Daniel's PDL prototype): its groups as tiles, then the grid with the side panel of the
   row picked beside it from 1280 px (under it on a narrower screen, lw.js lwRevealSidePanel brings it into view). */
.lw-recovery-tiles {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.lw-recovery-tile {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    min-width: 110px;
    padding: 8px 12px;
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: var(--mud-default-borderradius);
    background: var(--mud-palette-surface);
    color: var(--mud-palette-text-primary);
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.lw-recovery-tile:hover {
    border-color: var(--mud-palette-primary);
}

.lw-recovery-tile:focus-visible {
    outline: 2px solid var(--mud-palette-primary);
    outline-offset: 2px;
}

.lw-recovery-tile.lw-on {
    border-color: var(--mud-palette-primary);
    background: color-mix(in srgb, var(--mud-palette-primary) 10%, var(--mud-palette-surface));
}

.lw-recovery-tile-count {
    font-size: 20px;
    font-weight: 700;
    line-height: 1.2;
    color: var(--mud-palette-primary);
    font-variant-numeric: tabular-nums;
}

.lw-recovery-tile-label {
    font-size: 12px;
    color: var(--mud-palette-text-secondary);
    white-space: nowrap;
}

.lw-recovery-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
    align-items: start;
}

.lw-recovery-panel {
    scroll-margin-top: 72px;
}

@media (min-width: 1280px) {
    .lw-recovery-layout.lw-with-panel {
        grid-template-columns: minmax(0, 1fr) 380px;
    }

    .lw-recovery-panel {
        position: sticky;
        top: 80px;
    }
}

/* Every column as wide as its content, on one line; the grid scrolls sideways when the card is narrower (#12827). */
.lw-recovery-grid .mud-table-cell {
    white-space: nowrap;
}

.lw-recovery-grid .lw-row-selected {
    background: color-mix(in srgb, var(--mud-palette-primary) 12%, transparent);
}

.lw-recovery-empty {
    position: sticky;
    left: 16px;
    width: max-content;
    max-width: calc(100vw - 64px);
    white-space: normal;
    text-align: left;
}

.lw-recovery-comment {
    display: inline-block;
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: bottom;
}

.lw-recovery-next {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.lw-recovery-soon {
    font-weight: 700;
}

/* The panel's figures: a label and its value per line (#12828). */
.lw-recovery-facts {
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr);
    gap: 6px 16px;
    margin: 8px 0 12px;
    font-size: 13px;
}

.lw-recovery-facts dt {
    color: var(--mud-palette-text-secondary);
}

.lw-recovery-facts dd {
    margin: 0;
    font-weight: 600;
}

.lw-recovery-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.lw-recovery-activity {
    margin-top: 16px;
    padding: 12px;
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: var(--mud-default-borderradius);
}

.lw-recovery-activity .lw-recovery-facts {
    margin: 0;
}

.lw-recovery-activity-title {
    margin-bottom: 8px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--mud-palette-text-secondary);
}

/* The side panel's Next action box (#12828, prototype v156): the current date and its flag, the picker with Save, the three
   shortcuts, then the saved message or the error. */
.lw-recovery-na {
    margin-top: 16px;
    padding: 12px;
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: var(--mud-default-borderradius);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.lw-recovery-na-head {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

    .lw-recovery-na-head .lw-recovery-activity-title {
        margin-bottom: 0;
    }

.lw-recovery-na-cur {
    font-size: 0.8125rem;
    font-weight: 600;
}

.lw-recovery-na-pick {
    display: flex;
    align-items: flex-end;
    gap: 8px;
}

    .lw-recovery-na-pick .mud-input-control {
        flex: 1 1 150px;
        margin: 0;
    }

.lw-recovery-na-quick {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.lw-recovery-na-err,
.lw-recovery-na-msg {
    margin: 0;
    font-size: 0.75rem;
    font-weight: 600;
}

.lw-recovery-na-err {
    color: var(--mud-palette-error);
}

.lw-recovery-na-msg {
    color: #1b5e20;
}

.lw-theme-dark .lw-recovery-na-msg {
    color: #8fd19e;
}

/* From / To (#13118): the counts line under the tiles and the From-after-To message. */
.lw-recovery-countnote {
    margin: -8px 0 12px;
    font-size: 0.75rem;
    color: var(--mud-palette-text-secondary);
}

.lw-recovery-daterr {
    margin: 0;
    padding: 6px 16px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--mud-palette-error);
    border-bottom: 1px solid var(--mud-palette-lines-default);
}

/* PTP date colours (#13114, prototype v156): the last promise that came due, Kept green, Broken red, Pending yellow. */
.lw-recovery-grid .mud-table-body .mud-table-row > td.mud-table-cell.lw-ptp-kept,
.lw-ptp-swatch.lw-ptp-kept {
    background: #e3f4e5;
    color: #1b5e20;
}

.lw-recovery-grid .mud-table-body .mud-table-row > td.mud-table-cell.lw-ptp-broken,
.lw-ptp-swatch.lw-ptp-broken {
    background: #fbe3e3;
    color: #8e1d1d;
}

.lw-recovery-grid .mud-table-body .mud-table-row > td.mud-table-cell.lw-ptp-pending,
.lw-ptp-swatch.lw-ptp-pending {
    background: #fdf3d0;
    color: #7a5a00;
}

.lw-recovery-grid .mud-table-body .mud-table-row > td.mud-table-cell.lw-ptp-kept,
.lw-recovery-grid .mud-table-body .mud-table-row > td.mud-table-cell.lw-ptp-broken,
.lw-recovery-grid .mud-table-body .mud-table-row > td.mud-table-cell.lw-ptp-pending {
    font-weight: 600;
}

.lw-theme-dark .lw-recovery-grid .mud-table-body .mud-table-row > td.mud-table-cell.lw-ptp-kept,
.lw-theme-dark .lw-ptp-swatch.lw-ptp-kept {
    background: #1e3b24;
    color: #a6e3b0;
}

.lw-theme-dark .lw-recovery-grid .mud-table-body .mud-table-row > td.mud-table-cell.lw-ptp-broken,
.lw-theme-dark .lw-ptp-swatch.lw-ptp-broken {
    background: #4a2222;
    color: #f4b4b4;
}

.lw-theme-dark .lw-recovery-grid .mud-table-body .mud-table-row > td.mud-table-cell.lw-ptp-pending,
.lw-theme-dark .lw-ptp-swatch.lw-ptp-pending {
    background: #463a12;
    color: #f2d98a;
}

/* Settings › Performance pay (#13135, prototype v174 board 1f): the tier dialog's four targets in two columns (one on a
   phone), and each row's Edit / Remove. */
.lw-pp-dlg-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 14px;
}

@media (max-width: 599.98px) {
    .lw-pp-dlg-grid {
        grid-template-columns: 1fr;
    }
}

.lw-pp-tiers td.lw-pp-actions {
    white-space: nowrap;
    text-align: right;
}

/* The standard comment field (#13123, prototype v158): the text field with ▼, the list in a popover with its header. */
.lw-cmbo {
    position: relative;
    min-width: 0;
}

.lw-cmbo-pop {
    padding: 4px 0;
    min-width: 230px;
}

.lw-cmbo-hd {
    padding: 4px 12px 6px;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--mud-palette-text-secondary);
}

.lw-cmbo-opt {
    display: block;
    width: 100%;
    padding: 7px 12px;
    border: 0;
    background: none;
    font: inherit;
    font-size: 0.8125rem;
    text-align: left;
    white-space: nowrap;
    color: var(--mud-palette-text-primary);
    cursor: pointer;
}

    .lw-cmbo-opt:hover,
    .lw-cmbo-opt:focus-visible {
        background: var(--mud-palette-action-default-hover);
    }

    .lw-cmbo-opt.lw-on {
        font-weight: 600;
    }

/* The Recovery grid's Comments cell (#13123): the comment, then Edit or Add comment; editing puts the field, Save and Cancel
   on the row. */
.lw-recovery-grid td.lw-recovery-cmcell {
    white-space: normal;
    min-width: 220px;
}

.lw-recovery-cmedit {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* The comment and its Edit on one line, centred together (they sat a few pixels apart). */
.lw-recovery-cmshow {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    column-gap: 4px;
}

    .lw-recovery-cmedit .lw-cmbo {
        width: 240px;
    }

@media (max-width: 599.98px) {
    /* On a phone the field, Save and Cancel fit the screen's width. */
    .lw-recovery-cmedit .lw-cmbo {
        width: 170px;
    }
}

    .lw-recovery-cmedit .mud-input-control {
        margin: 0;
    }

.lw-ptp-legend {
    margin: 0;
    padding: 8px 16px;
    font-size: 0.75rem;
    color: var(--mud-palette-text-secondary);
    display: flex;
    gap: 6px 14px;
    flex-wrap: wrap;
    align-items: center;
    border-top: 1px solid var(--mud-palette-lines-default);
}

.lw-ptp-swatch {
    display: inline-block;
    width: 14px;
    height: 14px;
    margin-right: 5px;
    border-radius: 3px;
    vertical-align: -2px;
    border: 1px solid rgba(0, 0, 0, .08);
}

/* Console grids (#12827, Daniel Nov 19): the grid scrolls inside a box no taller than the window and its header row stays in
   view; lw.js moves it down (--lw-sth) so it stays under the top bar while the page scrolls past the grid's top. The
   Collections and Abeyance grids (lw-cc-scroll) work the same way. */
.lw-gridbox .mud-table-container {
    max-height: max(320px, calc(100vh - 120px));
    overflow: auto;
}

.lw-gridbox .mud-table-head .mud-table-cell {
    position: sticky;
    top: var(--lw-sth, 0px);
    z-index: 2;
    background: var(--mud-palette-surface);
    box-shadow: inset 0 -1px 0 var(--mud-palette-lines-default);
}

.lw-cc-scroll.lw-gridbox-cc {
    max-height: max(320px, calc(100vh - 120px));
}

    .lw-cc-scroll.lw-gridbox-cc .lw-cc-grid th {
        top: var(--lw-sth, 0px);
        z-index: 2;
    }

/* The recovery file (#12829, Daniel's PDL prototype): its figures in a strip of cells, then its sections in two columns from
   960 px (one below). */
/* The recovery file's figures: all eight on one row at 1440 px, and a date ("Nov-26-2026") never breaks across lines. */
.lw-file-figures {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(128px, 1fr));
}

.lw-file-figures > div {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    padding: 12px 10px;
    border-right: 1px solid var(--mud-palette-lines-default);
    border-bottom: 1px solid var(--mud-palette-lines-default);
}

.lw-file-figures span {
    font-size: 12px;
    color: var(--mud-palette-text-secondary);
}

.lw-file-figures strong {
    font-size: 18px;
    font-weight: 700;
    color: var(--mud-palette-primary);
    white-space: nowrap;
}

.lw-file-figures small {
    font-size: 11px;
    color: var(--mud-palette-text-secondary);
    min-height: 1em;
}

.lw-file-chips {
    margin-top: -8px;
}

.lw-file-sections {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
    align-items: start;
}

.lw-file-col {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
}

@media (min-width: 960px) {
    .lw-file-sections {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    }
}

/* The file's contact history (#12830): one line per entry with its text cut short; the entry clicked shows in full below. */
.lw-contact-tabs .mud-tabs-tabbar {
    border-bottom: 1px solid var(--mud-palette-lines-default);
}

/* The three tabs share the width, so all of them fit on a phone (MinimumTabWidth="0px" on the tabs). */
.lw-contact-tabs .mud-tabs-tabbar-wrapper {
    width: 100%;
}

.lw-contact-tabs .mud-tabs-tabbar-wrapper > * {
    flex: 1 1 0;
    min-width: 0;
}

.lw-contact-tabs .mud-tab {
    width: 100%;
    padding: 6px 8px;
    white-space: nowrap;
}

.lw-contact-snippet {
    display: inline-block;
    max-width: 420px;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: bottom;
}

.lw-contact-full {
    margin-top: 12px;
    padding: 12px;
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: var(--mud-default-borderradius);
    background: color-mix(in srgb, var(--mud-palette-primary) 4%, transparent);
}

.lw-contact-text {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    font-size: 14px;
}

/* Set up EFT (#12835): the loan summary in label/value pairs, three across on a wide screen; the payment states in the
   prototype's colours (a swatch in the legend, a tint on the row); the EFT history beside the selected EFT from 960 px. */
.lw-eft-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 8px 24px;
    margin: 0;
    font-size: 13px;
}

.lw-eft-summary > div {
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr);
    gap: 8px;
}

.lw-eft-summary dt {
    color: var(--mud-palette-text-secondary);
}

.lw-eft-summary dd {
    margin: 0;
    font-weight: 600;
    overflow-wrap: anywhere;
}

.lw-eft-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 16px;
    margin-bottom: 8px;
    font-size: 12px;
    color: var(--mud-palette-text-secondary);
}

.lw-eft-legend span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.lw-eft-sw {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 2px;
}

.lw-eft-sw.lw-st-await { background: #b9a3e3; }
.lw-eft-sw.lw-st-paid { background: #8bc34a; }
.lw-eft-sw.lw-st-late { background: #42a5f5; }
.lw-eft-sw.lw-st-nsf { background: #ffa726; }
.lw-eft-sw.lw-st-nsfpaid { background: #fff176; }

.lw-recovery-grid tr.lw-st-await td { background: #f1ecfb; }
.lw-recovery-grid tr.lw-st-paid td { background: #eef7e6; }
.lw-recovery-grid tr.lw-st-late td { background: #e8f3fd; }
.lw-recovery-grid tr.lw-st-nsf td { background: #fdf1e0; }
.lw-recovery-grid tr.lw-st-nsfpaid td { background: #fffbe0; }

.lw-eft-plus {
    min-width: 36px;
    font-weight: 700;
}

.lw-eft-history {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
    align-items: start;
}

/* Seven columns: tighter cells, and the details panel beside the table only where the table still fits (from 1280px). */
.lw-eft-history .mud-table .mud-table-row .mud-table-cell {
    padding: 6px 8px;
}

@media (min-width: 1280px) {
    .lw-eft-history {
        grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    }
}

.lw-eft-notes {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

/* Online Applications (#12795-#12806, Daniel's PDL prototype): four tabs with their counts, each tab's filters, the grid and
   the application picked beside it from 1280 px (the Recovery console's layout, lw-recovery-*). */
.lw-oa-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    border-bottom: 1px solid var(--mud-palette-lines-default);
}

.lw-oa-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    background: none;
    color: var(--mud-palette-text-secondary);
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}

.lw-oa-tab:hover {
    color: var(--mud-palette-text-primary);
}

.lw-oa-tab:focus-visible {
    outline: 2px solid var(--mud-palette-primary);
    outline-offset: -2px;
}

.lw-oa-tab.lw-on {
    color: var(--mud-palette-primary);
    border-bottom-color: var(--mud-palette-primary);
}

.lw-oa-tab-count {
    padding: 0 7px;
    border-radius: 10px;
    background: var(--mud-palette-background-gray);
    color: var(--mud-palette-text-primary);
    font-size: 12px;
    font-variant-numeric: tabular-nums;
}

.lw-oa-tab.lw-on .lw-oa-tab-count {
    background: color-mix(in srgb, var(--mud-palette-primary) 14%, var(--mud-palette-surface));
    color: var(--mud-palette-primary);
}

/* A list's count line over its grid (the prototype's "5 of 5 pending loans · filtered"). */
.lw-count-line {
    padding: 8px 16px;
    font-size: 0.75rem;
    color: var(--mud-palette-text-secondary);
}

/* Pending e-sign's empty list: grey text and, when filtered, Clear filters (the prototype). */
.lw-esign-empty {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    padding: 16px;
    font-size: 0.8125rem;
    color: var(--mud-palette-text-secondary);
}

/* Pending e-sign (#12811, Daniel's PDL prototype): the grid scrolls sideways under its 13 columns, and View agreement shows
   the agreement sent for signature in a bordered box with an "awaiting signature" watermark. */
.lw-esign-grid .mud-table-cell {
    white-space: nowrap;
    /* keeps the hidden "Resend" header label inside the grid's scroll box, not widening the page */
    position: relative;
}

/* On a phone the CID and Loan ID filters share a row, so the list starts higher up. */
@media (max-width: 599.98px) {
    .lw-oa-filters.lw-esign-filters .lw-oa-f-narrow {
        flex: 1 1 calc(50% - 6px);
        min-width: 0;
    }
}

.lw-esign-doc {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 18px 20px;
    overflow: hidden;
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: var(--mud-default-borderradius);
    background: var(--mud-palette-background-gray);
    font-size: 0.875rem;
}

.lw-esign-watermark {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: rotate(-12deg);
    color: var(--mud-palette-text-secondary);
    opacity: 0.18;
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    pointer-events: none;
    text-align: center;
}

/* Needs Attention's strip over its filters (the prototype): "STP problems (3) · Pending e-sign loans have their own screen". */
.lw-oa-strip {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 12px;
    font-size: 0.8125rem;
}

.lw-oa-strip a {
    color: var(--mud-palette-primary);
}

.lw-oa-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

.lw-oa-filters .lw-oa-f { flex: 0 1 170px; min-width: 140px; }
.lw-oa-filters .lw-oa-f-wide { flex: 0 1 280px; min-width: 200px; }
.lw-oa-filters .lw-oa-f-narrow { flex: 0 1 120px; min-width: 100px; }

@media (max-width: 599.98px) {
    .lw-oa-filters .lw-oa-f,
    .lw-oa-filters .lw-oa-f-wide,
    .lw-oa-filters .lw-oa-f-narrow {
        flex: 1 1 100%;
    }
}

.lw-oa-panel-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
}

.lw-oa-panel-head > div {
    min-width: 0;
    overflow-wrap: anywhere;
}

.lw-oa-section {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid var(--mud-palette-lines-default);
}

.lw-oa-section-title {
    font-weight: 700;
    font-size: 13px;
    margin-bottom: 8px;
}

.lw-oa-tag {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin-bottom: 10px;
    font-size: 13px;
    overflow-wrap: anywhere;
}

.lw-oa-tag-code {
    flex: 0 0 auto;
    min-width: 44px;
    padding: 1px 6px;
    border-radius: 4px;
    background: color-mix(in srgb, var(--mud-palette-warning) 18%, var(--mud-palette-surface));
    font-weight: 700;
    font-size: 12px;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.lw-oa-tag-code.lw-deny { background: color-mix(in srgb, var(--mud-palette-error) 16%, var(--mud-palette-surface)); }
.lw-oa-tag-code.lw-info { background: color-mix(in srgb, var(--mud-palette-info) 16%, var(--mud-palette-surface)); }

.lw-oa-tag-step { margin-top: 2px; }

/* How to decide and where to check under a tag's next step (#12801). */
.lw-oa-tag-guide {
    margin-top: 2px;
    font-size: 0.8125rem;
    color: var(--mud-palette-text-secondary);
}

.lw-oa-tag-where {
    margin-top: 2px;
    font-size: 0.75rem;
    color: var(--mud-palette-text-secondary);
}

.lw-oa-tag-key {
    margin-top: 2px;
    font-size: 11px;
    color: var(--mud-palette-text-secondary);
}

.lw-oa-links {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 14px;
    margin-top: 8px;
    font-size: 13px;
}

.lw-oa-log {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.lw-oa-log .lw-oa-log-channel { flex: 0 0 110px; }
.lw-oa-log .lw-oa-log-note { flex: 1 1 160px; min-width: 0; }

.lw-oa-note {
    margin-bottom: 8px;
    font-size: 13px;
    overflow-wrap: anywhere;
}

.lw-oa-note-text {
    white-space: pre-wrap;
    color: var(--mud-palette-text-secondary);
}

/* Online Applications settings (#12806): each rule's words beside its inputs, stacked on a phone. */
.lw-oa-settings {
    display: flex;
    flex-direction: column;
}

.lw-oa-setting {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 8px 24px;
    padding: 12px 0;
    border-bottom: 1px solid var(--mud-palette-lines-default);
}

@media (min-width: 960px) {
    .lw-oa-setting {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
        align-items: center;
    }
}

.lw-oa-setting-title { font-weight: 600; }

.lw-oa-setting-hint {
    font-size: 13px;
    color: var(--mud-palette-text-secondary);
}

.lw-oa-setting-input {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
}

.lw-oa-setting-input .mud-input-control { flex: 0 1 180px; min-width: 140px; }
.lw-oa-hours .mud-input-control { flex: 1 1 150px; }
.lw-oa-holidays .mud-input-control { flex: 1 1 240px; }

.lw-oa-steps {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--mud-palette-lines-default);
}

.lw-oa-steps-hint { grid-column: 1 / -1; }

.lw-oa-tag-table .mud-table-cell { vertical-align: top; }

/* Letters sent (#12832): the letter, when and by whom on one line, the note under it; scrolls past five. */
.lw-letter-list {
    list-style: none;
    margin: 0;
    /* Room on the right for the scrollbar, which phones draw over the text (Nov 24). */
    padding: 0 10px 0 0;
    max-height: 300px;
    overflow-y: auto;
}

.lw-letter-list li {
    padding: 8px 0;
    border-bottom: 1px solid var(--mud-palette-lines-default);
}

.lw-letter-list li:last-child {
    border-bottom: none;
}

.lw-letter-list-head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 2px 12px;
    font-size: 14px;
}

.lw-letter-list-head span {
    font-size: 12px;
    color: var(--mud-palette-text-secondary);
}

/* Abeyance activity's details (#12965): an abeyance note can be 1,000 characters with line breaks. */
.lw-ab-act-text {
    font-size: 13px;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.lw-letter-list-note {
    margin-top: 2px;
    font-size: 13px;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

/* A recovery letter's preview (#12832): the letter as the email shows it. */
.lw-letter-preview {
    padding: 16px;
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: var(--mud-default-borderradius);
    font-size: 14px;
    line-height: 1.5;
}

.lw-letter-preview p {
    margin: 0 0 12px;
}

.lw-letter-signature {
    margin-top: 20px !important;
}

/* The file's promise to pay form and cancel box (#12831). */
.lw-ptp-form {
    padding: 12px;
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: var(--mud-default-borderradius);
    background: color-mix(in srgb, var(--mud-palette-primary) 4%, transparent);
}

/* The Recovery History Report (#12834): dates, activities and names on one line, notes wrap; printed pages are numbered. */
.lw-rhr-nowrap,
.lw-rhr-table th {
    white-space: nowrap;
}

/* A report's Back / Download PDF / Print buttons keep their labels on one line; on a phone the row wraps instead. */
.lw-report-toolbar .mud-button-root {
    white-space: nowrap;
}

.lw-rhr-notes {
    min-width: 220px;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

@page recovery-history {
    margin: 14mm 12mm;

    @bottom-right {
        content: "Page " counter(page) " of " counter(pages);
        font-size: 9pt;
        color: #5b6475;
    }
}

@media print {
    .lw-rhr {
        page: recovery-history;
    }

    .lw-rhr .mud-table-container {
        overflow: visible !important;
    }

    .lw-rhr .mud-table-sort-label-icon {
        display: none !important;
    }

    .lw-rhr .lw-print-sheet {
        max-width: none !important;
    }
}

/* On a phone the Recovery tiles sit three across. */
@media (max-width: 599.98px) {
    .lw-recovery-tiles {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 6px;
    }

    .lw-recovery-tile {
        min-width: 0;
        padding: 6px 8px;
    }

    .lw-recovery-tile-label {
        white-space: normal;
        line-height: 1.25;
    }
}

@media (min-width: 960px) {
    .lw-ch-table .lw-ch-record {
        min-width: 120px;
    }

    .lw-ch-table .lw-ch-field {
        min-width: 140px;
    }

    .lw-ch-table .lw-ch-value {
        min-width: 130px;
        overflow-wrap: anywhere;
    }

    .lw-ch-table .lw-ch-who {
        min-width: 90px;
        overflow-wrap: anywhere;
    }
}

/* Up to 1280px the table stacks into cards (label left, value right, as MudBlazor lays out every cell). Each value shows
   one line, ending in "…", and the toggle line keeps its height on an entry with nothing to open, so every card is the
   same height too; an entry's label, chips and note line up on the right like the other values. The values are clamped
   to a line rather than kept on one (white-space: nowrap would make the auto-sized table as wide as its longest value,
   past the edge of a phone). */
@media (max-width: 1280px) {
    .lw-audit-table.mud-md-table .lw-audit-what {
        justify-content: flex-end;
        flex-wrap: nowrap;
        min-width: 0;
    }

    .lw-audit-table.mud-md-table .lw-audit-what > * {
        flex: 0 0 auto;
    }

    .lw-audit-table.mud-md-table .lw-audit-what > .lw-audit-label,
    .lw-audit-table.mud-md-table .lw-audit-what > .lw-audit-note,
    .lw-audit-table.mud-md-table .lw-audit-text,
    .lw-audit-table.mud-md-table .lw-audit-subject {
        flex: 0 1 auto;
        min-width: 0;
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 1;
        line-clamp: 1;
        overflow: hidden;
        white-space: normal;
        overflow-wrap: anywhere;
    }

    .lw-audit-table.mud-md-table .lw-audit-toggle {
        min-height: 42px;
    }
}

/* On a phone the entry's type chip makes way for its label (the type is still in the filter, and on wider screens). */
@media (max-width: 599.98px) {
    .lw-audit-table.mud-md-table .lw-audit-category {
        display: none;
    }
}

.lw-audit-label {
    font-weight: 500;
}

.lw-audit-detail {
    color: var(--mud-palette-text-secondary);
    font-size: 0.8125rem;
    margin-top: 2px;
    overflow-wrap: anywhere;
}

.lw-audit-child {
    background: var(--mud-palette-background-gray);
    padding: 8px 16px 10px !important;
}

/* An opened entry: its loan and the values its line cuts short (label, then value), above its changes. */
.lw-audit-facts {
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr);
    gap: 2px 12px;
    margin: 0;
    font-size: 0.8125rem;
}

.lw-audit-facts dt {
    color: var(--mud-palette-text-secondary);
}

.lw-audit-facts dd {
    margin: 0;
    overflow-wrap: anywhere;
}

.lw-audit-facts .mud-link {
    font-size: inherit;
}

.lw-audit-facts + .lw-audit-changes {
    margin-top: 6px;
    padding-top: 4px;
    border-top: 1px solid var(--mud-palette-lines-default);
}

.lw-audit-changes {
    list-style: none;
    margin: 0;
    padding: 0;
}

.lw-audit-change {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 2px 10px;
    padding: 3px 0;
    font-size: 0.8125rem;
}

.lw-audit-change + .lw-audit-change {
    border-top: 1px solid var(--mud-palette-lines-default);
}

.lw-audit-change-record {
    font-weight: 500;
}

.lw-audit-change-values {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 2px 6px;
    min-width: 0;
    overflow-wrap: anywhere;
}

.lw-audit-old {
    color: var(--mud-palette-text-secondary);
}

.lw-audit-arrow {
    color: var(--mud-palette-text-secondary);
}

/* The client History tab: on wide screens From and To keep a readable width (a long value wraps by word, not a letter per
   line); stacked into cards below 960px, a long value lines up on the right like the other values. */
.lw-history-table .lw-history-value {
    min-width: 160px;
    overflow-wrap: break-word;
}

.lw-history-table .lw-history-who {
    min-width: 110px;
}

@media (max-width: 959.98px) {
    .lw-history-table.mud-sm-table .lw-history-value,
    .lw-history-table.mud-sm-table .lw-history-who {
        min-width: 0;
    }

    .lw-history-table.mud-sm-table .lw-history-text {
        min-width: 0;
        text-align: right;
        overflow-wrap: anywhere;
    }
}

/* A loan's History card: one entry per row, the changes opening under it. */
.lw-audit-history {
    list-style: none;
    margin: 0;
    padding: 0;
}

.lw-audit-history-item {
    padding: 8px 16px;
}

.lw-audit-history-item + .lw-audit-history-item {
    border-top: 1px solid var(--mud-palette-lines-default);
}

.lw-audit-history-line {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 2px 10px;
}

.lw-audit-history-when {
    color: var(--mud-palette-text-secondary);
    font-size: 0.8125rem;
    white-space: nowrap;
}

.lw-audit-history-who {
    font-size: 0.875rem;
}

.lw-audit-history-item .lw-audit-child {
    margin-top: 6px;
    border-radius: var(--lw-radius);
}

/* "Sign out" / "Sign in" stay on one line however full the bar is. */
.mud-appbar .lw-appbar-action {
    white-space: nowrap;
}

@media (max-width: 959.98px) {
    .lw-appbar-user {
        display: none;
    }
}

@media (max-width: 599.98px) {
    .lw-wordmark-sub {
        display: none;
    }

    /* A crowded phone bar shrinks the logo within its slot instead of letting it run under the next button. */
    .lw-brand-logo {
        height: 24px;
        max-width: min(132px, 100%);
    }

    .lw-brand-logo:is([src$="venue-logo.svg"], [src$="venue-logo-light.svg"]) {
        height: 21px;
    }

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

    .mud-appbar .lw-appbar-action {
        min-width: 0;
        padding: 6px 8px;
    }

    /* Tighter gaps between the bar's buttons on a phone, so the logo keeps its size next to the bell, the branch and a
       Busy/Away chip (screen check Nov 10). */
    .mud-appbar .mud-toolbar-gutters {
        padding-right: 8px;
    }

    .mud-appbar .lw-appbar-menu.mr-2 {
        margin-right: 2px !important;
    }

    .mud-appbar .lw-brand-slot.lw-appbar-brand {
        margin-left: 4px !important;
    }

    .mud-appbar .lw-appbar-action .mud-button-icon-start {
        margin-inline: 0;
    }

    .mud-appbar .lw-appbar-action .mud-button-icon-end {
        margin-inline: -2px 0;
    }

    .lw-page-title {
        font-size: 1.5rem;
    }

    /* Pop-up messages span the phone's width with even margins (they sat against the left edge). */
    #mud-snackbar-container.mud-snackbar-location-top-right,
    #mud-snackbar-container.mud-snackbar-location-top-center,
    #mud-snackbar-container.mud-snackbar-location-top-left {
        left: 12px;
        right: 12px;
    }

    #mud-snackbar-container .mud-snackbar {
        min-width: 0;
        width: 100%;
    }
}

/* ---------------------------------------------------------------------------------------------------------------
   The prototype's controls (Fatih, Nov 20, 2026; Daniel's PDL prototype v141+): every field is a white box with its
   label above it and a light orange ring while you type in it, toggle switches are its pill switch, and buttons have
   room either side of their text. MudGlobal (Program.cs) makes every input outlined with its label always shrunk and
   dense margins; these rules turn that into the prototype's look, in both themes. Page sections further down may
   still dress a field their own way.
   --------------------------------------------------------------------------------------------------------------- */
:root {
    --lw-field-bg: var(--mud-palette-surface);
    --lw-field-ink: var(--mud-palette-text-primary);
    --lw-field-label: var(--mud-palette-text-secondary);
    --lw-field-line: #cdd5e1;
    --lw-field-hover: #8a97ab;
    --lw-field-disabled: #f4f6fb;
    --lw-focus: #f0a055;
    --lw-focus-ring: rgba(240, 160, 85, 0.22);
    --lw-switch-off: #cdd5e1;
    --lw-switch-on: var(--lw-accent-strong, var(--mud-palette-primary));
}

.lw-theme-dark {
    --lw-field-line: #566179;
    --lw-field-hover: #7d889c;
    --lw-field-disabled: #161b25;
    --lw-focus: #f5ad6a;
    --lw-focus-ring: rgba(245, 173, 106, 0.24);
    --lw-switch-off: #3a4458;
}

/* Fields: the label above the box (12 px, semi-bold, grey), no gap cut into the border for it. */
.mud-input-control.mud-input-outlined-with-label > .mud-input-control-input-container {
    padding-top: 20px;
}

.mud-input-control.mud-input-outlined-with-label > .mud-input-control-input-container > label.mud-input-label.mud-input-label-outlined.mud-input-label-inputcontrol {
    top: 0;
    left: 0;
    transform: none;
    max-width: 100%;
    padding: 0 !important;
    font-size: 12px;
    font-weight: 600;
    line-height: 16px;
    letter-spacing: 0;
    color: var(--lw-field-label);
}

.mud-input-control.mud-input-outlined-with-label > .mud-input-control-input-container > label.mud-input-label.mud-input-label-inputcontrol.mud-input-error {
    color: var(--mud-palette-error) !important;
}

.mud-input-control.mud-input-required > .mud-input-control-input-container > .mud-input-label.mud-input-label-outlined::after {
    margin-left: 2px;
    color: var(--mud-palette-error);
}

/* The same red * on a field whose page checks it itself (Class="lw-required"): no MudBlazor "Required" as you leave it. New
   client lists what's missing after Save instead, as the prototype. */
.lw-required .mud-input-label.mud-input-label-outlined::after,
.mud-input-control.lw-required > .mud-input-control-input-container > .mud-input-label.mud-input-label-outlined::after {
    content: "*";
    margin-left: 2px;
    color: var(--mud-palette-error);
}

.mud-input-control .mud-input.mud-input-outlined > .mud-input-outlined-border legend {
    width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}

.mud-input-control.mud-input-control-margin-dense.mud-input-outlined-with-label,
.mud-input-control.mud-input-control-margin-dense {
    margin-top: 4px;
    margin-bottom: 4px;
}

/* The box: white (the surface in the dark theme), a light grey border, 34 px tall, 10 px in from each side. */
.mud-input-control .mud-input.mud-input-outlined {
    border-radius: 4px;
    background-color: var(--lw-field-bg);
    color: var(--lw-field-ink);
    font-size: 0.8125rem;   /* the prototype's 13 px */
}

.mud-input-control .mud-input.mud-input-outlined > .mud-input-outlined-border {
    border-width: 1px;
    border-color: var(--lw-field-line);
    border-radius: 4px;
    transition: border-color 150ms ease, box-shadow 150ms ease;
}

.mud-input-control .mud-input > input.mud-input-root.mud-input-root-outlined,
.mud-input-control div.mud-input-slot.mud-input-root.mud-input-root-outlined {
    padding: 8px 10px;
}

.mud-input-control .mud-input > input.mud-input-root.mud-input-root-outlined.mud-input-root-adorned-end,
.mud-input-control div.mud-input-slot.mud-input-root.mud-input-root-outlined.mud-input-root-adorned-end {
    padding-right: 0;
}

.mud-input-control .mud-input > input.mud-input-root.mud-input-root-outlined.mud-input-root-adorned-start,
.mud-input-control div.mud-input-slot.mud-input-root.mud-input-root-outlined.mud-input-root-adorned-start {
    padding-left: 0;
}

.mud-input-control .mud-input > textarea.mud-input-root.mud-input-root-outlined {
    margin-top: 0;
    padding: 8px 10px;
    mask-image: none;
}

.mud-input-control .mud-input.mud-input-outlined .mud-input-adornment-end {
    margin-right: 6px;
}

.mud-input-control .mud-input.mud-input-outlined .mud-input-adornment-start {
    margin-left: 10px;
}

@media (hover: hover) and (pointer: fine) {
    .mud-input-control .mud-input.mud-input-outlined:not(.mud-disabled):not(:focus-within):hover > .mud-input-outlined-border {
        border-color: var(--lw-field-hover);
    }
}

/* Typing in a field: a light orange border all round it and a soft glow (the label stays grey). */
.mud-input-control .mud-input.mud-input-outlined:focus-within > .mud-input-outlined-border {
    border-width: 1px;
    border-color: var(--lw-focus);
    box-shadow: 0 0 0 3px var(--lw-focus-ring);
}

.mud-input-control .mud-input:focus-within ~ label.mud-input-label.mud-input-label-inputcontrol:not(.mud-input-error) {
    color: var(--lw-field-label);
}

/* A field in error: red all round, a little heavier (the prototype's .in.bad). */
.mud-input-control.mud-input-error .mud-input.mud-input-outlined > .mud-input-outlined-border,
.mud-input-control .mud-input.mud-input-outlined.mud-input-error > .mud-input-outlined-border {
    border-color: var(--mud-palette-error) !important;
    box-shadow: inset 0 0 0 1px var(--mud-palette-error);
}

.mud-input-control.mud-input-error .mud-input.mud-input-outlined:focus-within > .mud-input-outlined-border {
    box-shadow: inset 0 0 0 1px var(--mud-palette-error), 0 0 0 3px rgba(198, 40, 40, 0.16);
}

.mud-input-control .mud-input.mud-input-outlined.mud-disabled {
    background-color: var(--lw-field-disabled);
}

.mud-input-control .mud-input-helper-text {
    margin-top: 4px;
    margin-left: 0;
    margin-right: 0;
    font-size: 12px;
}

/* Toggle switches: the prototype's pill (44 x 24, grey off, the company's blue on) with a white knob sliding inside. */
.mud-switch .mud-switch-span.mud-switch-span-medium {
    width: 44px;
    height: 24px;
    padding: 0;
    margin: 7px 10px 7px 0;
    overflow: visible;
}

.mud-switch.mud-input-content-placement-start .mud-switch-span.mud-switch-span-medium {
    margin: 7px 0 7px 10px;
}

.mud-switch .mud-switch-base.mud-switch-base-medium {
    width: 24px;
    height: 24px;
    padding: 3px;
    background-color: transparent !important;
}

.mud-switch .mud-switch-base.mud-switch-base-medium.mud-checked {
    transform: translateX(20px);
}

.mud-switch .mud-switch-base .mud-switch-thumb-medium {
    width: 18px;
    height: 18px;
    background-color: #ffffff !important;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.28);
}

.mud-switch .mud-switch-span-medium .mud-switch-track {
    width: 44px;
    height: 24px;
    border-radius: 12px;
    opacity: 1 !important;
    background-color: var(--lw-switch-off);
    transition: background-color 150ms ease;
}

.mud-switch .mud-switch-base.mud-checked + .mud-switch-track.mud-primary {
    background-color: var(--lw-switch-on);
}

.mud-switch .mud-switch-base.mud-checked + .mud-switch-track:is(.mud-success, .mud-warning, .mud-info, .mud-error, .mud-secondary, .mud-tertiary) {
    opacity: 1 !important;
}

.mud-switch:has(.mud-switch-input:focus-visible) .mud-switch-track {
    box-shadow: 0 0 0 3px var(--lw-focus-ring), 0 0 0 1px var(--lw-focus);
}

.mud-switch.mud-disabled .mud-switch-span {
    opacity: 0.5;
}

/* A switch's or check box's own words: the page's text size (MudBlazor gives them body1, larger than the rest). */
label.mud-switch > p.mud-typography,
label.mud-checkbox > p.mud-typography {
    font-size: 0.8125rem;
}

/* Buttons: the prototype's (13 px semi-bold, 4 px corners, flat), with room either side of the text: 34 px tall and
   16 px in (small 30 / 12, large 40 / 22); outlined buttons have a full-strength border and a light tint on hover. */
.mud-button-root.mud-button:not(.mud-icon-button) {
    min-height: 34px;
    padding: 0 16px;
    border-radius: 4px;
    font-size: 0.8125rem;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: 0.01em;
    text-transform: none;
}

.mud-button-root.mud-button[class*="-size-small"]:not(.mud-icon-button) {
    min-height: 30px;
    padding: 0 12px;
}

.mud-button-root.mud-button[class*="-size-large"]:not(.mud-icon-button) {
    min-height: 40px;
    padding: 0 22px;
    font-size: 0.875rem;
}

.mud-button-root.mud-button-text:not(.mud-icon-button) {
    padding: 0 10px;
}

.mud-button-root.mud-button-text[class*="-size-small"]:not(.mud-icon-button) {
    padding: 0 8px;
}

.mud-button-root.mud-button .mud-button-icon-start {
    margin-left: -2px;
    margin-right: 6px;
}

.mud-button-root.mud-button .mud-button-icon-end {
    margin-left: 6px;
    margin-right: -2px;
}

.mud-button-root.mud-button-filled,
.mud-button-root.mud-button-filled:hover,
.mud-button-root.mud-button-filled:active {
    box-shadow: none;
}

.mud-button-root.mud-button-outlined.mud-button-outlined-primary {
    border-color: var(--mud-palette-primary);
    background-color: var(--mud-palette-surface);
}

.mud-button-root.mud-button-outlined.mud-button-outlined-error {
    border-color: var(--mud-palette-error);
    background-color: var(--mud-palette-surface);
}

.mud-button-root.mud-button-outlined.mud-button-outlined-default {
    border-color: var(--lw-field-line);
    background-color: var(--mud-palette-surface);
}

@media (hover: hover) and (pointer: fine) {
    .mud-button-root.mud-button-outlined.mud-button-outlined-primary:not(:disabled):hover {
        background-color: color-mix(in srgb, var(--mud-palette-primary) 10%, var(--mud-palette-surface));
    }

    .mud-button-root.mud-button-outlined.mud-button-outlined-error:not(:disabled):hover {
        background-color: color-mix(in srgb, var(--mud-palette-error) 8%, var(--mud-palette-surface));
    }

    .mud-button-root.mud-button-outlined.mud-button-outlined-default:not(:disabled):hover {
        border-color: var(--lw-field-hover);
        background-color: var(--mud-palette-background);
    }
}

/* ---------------------------------------------------------------------------------------------------------------
   The prototype's type sizes (Fatih, Nov 20, 2026: "copy the same font size from prototype", keeping our pages full
   width): 14 px text and menu, 26 px page titles, 15 px card titles, tabs 14 px semi-bold in sentence case, tables
   13 px with 12 px headers, fields, buttons, alerts and lists 13 px, chips and pagers 12 px, dialog titles 18 px. All
   in rem, so the larger text sizes in My settings still scale them. Rules for one part sit with that part (page title,
   card titles, table headers, menu, fields, chips); these are the rest.
   --------------------------------------------------------------------------------------------------------------- */

/* Tabs: as the prototype's, words as written (MudBlazor capitalises them), semi-bold, grey until picked. */
.mud-tabs .mud-tab {
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0;
    text-transform: none;
    min-height: 44px;
}

.mud-tabs .mud-tab:not(.mud-tab-active):not(.mud-disabled) {
    color: var(--mud-palette-text-secondary);
}

.mud-tabs .mud-tab:not(.mud-tab-active):not(.mud-disabled):hover {
    color: var(--mud-palette-text-primary);
}

/* Table rows 13 px, as the prototype's tables. */
.mud-table-root .mud-table-body .mud-table-cell,
.mud-table-root .mud-table-foot .mud-table-cell,
.mud-simple-table table tbody td,
.mud-simple-table table tfoot td {
    font-size: 0.8125rem;
}

/* The pager under a table: 12 px. */
.mud-table-pagination,
.mud-table-pagination .mud-table-pagination-caption,
.mud-table-pagination .mud-select-input,
.mud-table-pagination .mud-input {
    font-size: 0.75rem;
}

/* Alerts and their buttons: 13 px. */
.mud-alert .mud-alert-message {
    font-size: 0.8125rem;
}

/* A dropdown's or menu's choices: 13 px, as the field they open from. */
.mud-popover .mud-list-item .mud-list-item-text .mud-typography,
.mud-popover .mud-menu-item .mud-menu-item-text,
.mud-popover .mud-list-item .mud-typography-body1 {
    font-size: 0.8125rem;
}

/* Dialog titles: 18 px bold. */
.mud-dialog .mud-dialog-title .mud-typography-h6,
.mud-dialog .mud-dialog-title > h6 {
    font-size: 1.125rem;
    font-weight: 700;
}

/* A link back to the list ("← Back to search results"): 13 px. */
.lw-back-link {
    font-size: 0.8125rem;
}

/* ---------------------------------------------------------------------------------------------------------------
   Field rows: buttons line up with the fields beside them. A field row is a MudGrid whose cells hold a field
   directly, or a horizontal MudStack whose children are fields; page layout grids hold cards, not fields, so they
   never match. A labelled field is 4 px of margin, a 20 px label band, a 34 px box and 4 px of margin (above); a
   plain button would drift depending on whether the row aligned to the top, centre or bottom, so a button beside
   labelled fields takes the box's height and place: 34 px tall starting 24 px down (small buttons 30 px, centred on
   the box). A cell that holds only a full-width button on its own row (xs="12" and nothing wider) is left alone.
   (An underlined field, below, is only one that still asks for Variant.Text.)
   --------------------------------------------------------------------------------------------------------------- */
.mud-grid:has(> .mud-grid-item > .mud-input-outlined-with-label, > .mud-grid-item > .mud-select > .mud-input-outlined-with-label, > .mud-grid-item > .mud-picker > .mud-input-outlined-with-label)
    > .mud-grid-item:is([class*="-sm-"], [class*="-md-"], [class*="-lg-"], [class*="-xl-"], :not(.mud-grid-item-xs-12)) > .mud-button-root:not(.mud-icon-button),
.d-flex.flex-row:has(> .mud-input-outlined-with-label, > .mud-select > .mud-input-outlined-with-label, > .mud-picker > .mud-input-outlined-with-label)
    > .mud-button-root:not(.mud-icon-button) {
    height: 34px;
    margin-top: 24px;
    margin-bottom: 4px;
}

.mud-grid:has(> .mud-grid-item > .mud-input-outlined-with-label, > .mud-grid-item > .mud-select > .mud-input-outlined-with-label, > .mud-grid-item > .mud-picker > .mud-input-outlined-with-label)
    > .mud-grid-item:is([class*="-sm-"], [class*="-md-"], [class*="-lg-"], [class*="-xl-"], :not(.mud-grid-item-xs-12)) > .mud-button-root[class*="-size-small"]:not(.mud-icon-button),
.d-flex.flex-row:has(> .mud-input-outlined-with-label, > .mud-select > .mud-input-outlined-with-label, > .mud-picker > .mud-input-outlined-with-label)
    > .mud-button-root[class*="-size-small"]:not(.mud-icon-button) {
    height: 30px;
    min-height: 30px;
    margin-top: 26px;
    margin-bottom: 6px;
}

/* An unlabelled field (e.g. a search box with only a placeholder) takes the labelled fields' place so its box sits on the
   same line as theirs; an icon button beside them is centred on the box. */
.d-flex.flex-row:has(> .mud-input-outlined-with-label, > .mud-select > .mud-input-outlined-with-label, > .mud-picker > .mud-input-outlined-with-label)
    > .mud-input-control.mud-input-control-margin-dense:not(.mud-input-outlined-with-label),
.mud-grid:has(> .mud-grid-item > .mud-input-outlined-with-label, > .mud-grid-item > .mud-select > .mud-input-outlined-with-label, > .mud-grid-item > .mud-picker > .mud-input-outlined-with-label)
    > .mud-grid-item > .mud-input-control.mud-input-control-margin-dense:not(.mud-input-outlined-with-label) {
    margin-top: 24px;
    margin-bottom: 4px;
}

.d-flex.flex-row:has(> .mud-input-outlined-with-label, > .mud-select > .mud-input-outlined-with-label, > .mud-picker > .mud-input-outlined-with-label)
    > .mud-icon-button {
    margin-top: 21px;
}

.mud-grid:has(> .mud-grid-item > .mud-input-control .mud-input-text-with-label, > .mud-grid-item > .mud-select > .mud-input-control .mud-input-text-with-label, > .mud-grid-item > .mud-picker > .mud-input-control .mud-input-text-with-label)
    > .mud-grid-item:is([class*="-sm-"], [class*="-md-"], [class*="-lg-"], [class*="-xl-"], :not(.mud-grid-item-xs-12)) > .mud-button-root:not(.mud-icon-button),
.d-flex.flex-row:has(> .mud-input-control .mud-input-text-with-label, > .mud-select > .mud-input-control .mud-input-text-with-label, > .mud-picker > .mud-input-control .mud-input-text-with-label)
    > .mud-button-root:not(.mud-icon-button) {
    height: 36px;
    margin-top: 12px;
}

.mud-grid:has(> .mud-grid-item > .mud-input-control .mud-input-text-with-label, > .mud-grid-item > .mud-select > .mud-input-control .mud-input-text-with-label, > .mud-grid-item > .mud-picker > .mud-input-control .mud-input-text-with-label)
    > .mud-grid-item:is([class*="-sm-"], [class*="-md-"], [class*="-lg-"], [class*="-xl-"], :not(.mud-grid-item-xs-12)) > .mud-button-root[class*="-size-small"]:not(.mud-icon-button),
.d-flex.flex-row:has(> .mud-input-control .mud-input-text-with-label, > .mud-select > .mud-input-control .mud-input-text-with-label, > .mud-picker > .mud-input-control .mud-input-text-with-label)
    > .mud-button-root[class*="-size-small"]:not(.mud-icon-button) {
    height: 32px;
    margin-top: 16px;
}

/* Cards side by side in a grid row share the row's height; the body takes the extra space and an empty state stays
   centred in it. Only a card that is alone in its cell: cells stacking several cards keep their natural heights, and
   so does a card marked lw-card-natural (Home's Quick actions, which stays its own size beside a long worklist). */
.mud-grid-item > .lw-card:only-child {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.mud-grid-item > .lw-card.lw-card-natural:only-child {
    height: auto;
}

.mud-grid-item > .lw-card:only-child > :last-child {
    flex: 1 1 auto;
}

.mud-grid-item > .lw-card:only-child > :last-child > .lw-empty:only-child {
    height: 100%;
}

/* The connection banner (#13183; prototype v213 board 1g card 8; App.razor #components-reconnect-modal). A slim banner under
   the app bar, no veil: it moves the page down a little and covers nothing, so the page stays readable and what was typed
   stays put. Amber while reconnecting, red with "Reload the page" when the connection is lost, green "Reconnected" for 3 s
   (lw.js adds lw-reconnect-back). */
body {
    --lw-bar-top: var(--mud-appbar-height);
    --lw-conn-h: 38px;
}

body:has(.mud-appbar-dense) {
    --lw-bar-top: calc(var(--mud-appbar-height) * 0.75);
}

@media (max-width: 599.98px) {
    body {
        /* Two lines on a phone: the text over the Reload button when the connection is lost. */
        --lw-conn-h: 72px;
    }
}

.lw-reconnect {
    display: none;
    position: fixed;
    left: 0;
    right: 0;
    top: var(--lw-bar-top);
    z-index: 1250;
    height: var(--lw-conn-h);
    box-sizing: border-box;
    align-items: center;
    justify-content: center;
    padding: 6px 16px;
    border-bottom: 1px solid #f0d3a8;
    background: #fdf1e0;
    color: #7a4800;
    font-family: var(--lw-font-text);
    font-size: 0.8125rem;
    font-weight: 600;
    animation: lw-conn-drop 0.2s ease-out;
}

@keyframes lw-conn-drop {
    from {
        opacity: 0.3;
        transform: translateY(-4px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

.lw-reconnect:is(.components-reconnect-show, .components-reconnect-retrying, .components-reconnect-failed,
                 .components-reconnect-rejected, .components-reconnect-paused, .components-reconnect-resume-failed,
                 .lw-reconnect-back) {
    display: flex;
}

.lw-reconnect-card {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    text-align: center;
}

.lw-reconnect-spin,
.lw-reconnect-busy,
.lw-reconnect-ok,
.lw-reconnect-lost,
.lw-reconnect-reload {
    display: none;
}

.lw-reconnect-spin {
    width: 14px;
    height: 14px;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    box-sizing: border-box;
    flex: none;
    animation: lw-spin 0.75s linear infinite;
}

@keyframes lw-spin {
    to {
        transform: rotate(360deg);
    }
}

.lw-reconnect:is(.components-reconnect-show, .components-reconnect-retrying) :is(.lw-reconnect-spin, .lw-reconnect-busy) {
    display: inline-block;
}

/* Lost: red, with Reload the page. */
.lw-reconnect:is(.components-reconnect-failed, .components-reconnect-rejected, .components-reconnect-paused,
                 .components-reconnect-resume-failed) {
    background: #fbe9e9;
    color: #8e1d1d;
    border-color: #f2c4c4;
}

.lw-reconnect:is(.components-reconnect-failed, .components-reconnect-rejected, .components-reconnect-paused,
                 .components-reconnect-resume-failed) :is(.lw-reconnect-lost, .lw-reconnect-reload) {
    display: inline-block;
}

/* Back: green "Reconnected" for 3 s. */
.lw-reconnect.lw-reconnect-back {
    background: #e8f3e9;
    color: #1b5e20;
    border-color: #bfe0c3;
}

.lw-reconnect.lw-reconnect-back .lw-reconnect-ok {
    display: inline-block;
}

.lw-reconnect-reload {
    height: 28px;
    padding: 0 12px;
    border: 0;
    border-radius: var(--lw-radius);
    background: var(--mud-palette-primary, #1b6ec2);
    color: #ffffff;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

/* MudBlazor ships rules for #components-reconnect-modal, all !important: an opaque canvas background and uppercase
   buttons with ink text and a 40 px margin. Override them for the banner (the id raises the specificity). */
#components-reconnect-modal.lw-reconnect {
    background-color: #fdf1e0 !important;
}

#components-reconnect-modal.lw-reconnect:is(.components-reconnect-failed, .components-reconnect-rejected,
                                            .components-reconnect-paused, .components-reconnect-resume-failed) {
    background-color: #fbe9e9 !important;
}

#components-reconnect-modal.lw-reconnect.lw-reconnect-back {
    background-color: #e8f3e9 !important;
}

#components-reconnect-modal .lw-reconnect-reload {
    margin: 0 !important;
    min-width: 0;
    color: #ffffff !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
    line-height: 1.4 !important;
}

#components-reconnect-modal .lw-reconnect-reload:hover {
    background-color: var(--mud-palette-primary-darken, #14538f) !important;
}

/* While the banner shows, the page and the menu move down by its height (nothing is covered). */
body:has(#components-reconnect-modal:is(.components-reconnect-show, .components-reconnect-retrying, .components-reconnect-failed,
                                        .components-reconnect-rejected, .components-reconnect-paused,
                                        .components-reconnect-resume-failed, .lw-reconnect-back)) {
    --lw-conn-on: var(--lw-conn-h);
}

body:has(#components-reconnect-modal:is(.components-reconnect-show, .components-reconnect-retrying, .components-reconnect-failed,
                                        .components-reconnect-rejected, .components-reconnect-paused,
                                        .components-reconnect-resume-failed, .lw-reconnect-back)) .mud-main-content::before {
    content: "";
    display: block;
    height: var(--lw-conn-h);
}

body:has(#components-reconnect-modal:is(.components-reconnect-show, .components-reconnect-retrying, .components-reconnect-failed,
                                        .components-reconnect-rejected, .components-reconnect-paused,
                                        .components-reconnect-resume-failed, .lw-reconnect-back)) .mud-drawer.mud-drawer-clipped-always {
    top: calc(var(--lw-bar-top) + var(--lw-conn-h)) !important;
    height: calc(100% - var(--lw-bar-top) - var(--lw-conn-h)) !important;
}

/* Sign-in page: Manrope too (its layout uses MudBlazor's default theme, whose font stack starts with Roboto). */
.lw-login-stage {
    font-family: var(--lw-font-text);
}

/* Filled buttons are flat; colour and the press feedback carry the state. */
.mud-button-filled,
.mud-button-filled:hover,
.mud-button-filled:focus-visible,
.mud-button-filled:active {
    box-shadow: none;
}

/* Section card titles: the prototype's 15 px bold card heading (SectionCard sets 600 inline). */
.mud-main-content .lw-card > .lw-section-head .mud-typography-subtitle1 {
    font-family: var(--lw-font-display);
    font-size: 0.9375rem;
    font-weight: 700 !important;
    line-height: 1.5;
    letter-spacing: -0.005em;
}

/* Table headers: quieter than the data - secondary ink, bold, a step smaller (the prototype's 12 px headers over 13 px
   rows). */
.mud-main-content .mud-table-root .mud-table-head .mud-table-cell,
.mud-main-content .mud-simple-table table thead th,
.mud-dialog .mud-table-root .mud-table-head .mud-table-cell,
.mud-dialog .mud-simple-table table thead th {
    color: var(--mud-palette-text-secondary);
    font-weight: 700;
    font-size: 0.75rem;
    letter-spacing: 0.01em;
}

@media print {
    /* Paper documents print without the on-screen hairline frame. */
    .mud-main-content .mud-paper,
    .mud-main-content .mud-table {
        border: none !important;
    }
}

/* A card header's actions wrap onto more lines on a narrow screen instead of running past the edge. */
.lw-section-head > div:last-child {
    flex-wrap: wrap;
    min-width: 0;
}

/* ---- The client file as a 360 view (#12813), after Daniel's PDL prototype ---- */

.lw-cf-hint {
    font-size: 0.8125rem;
}

/* Overview: Client at a glance (#12817). */
.lw-cf-stats {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(152px, 1fr));   /* room for "May-28-2026" inside the padding */
}

.lw-cf-stat {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 12px 16px;
    border-right: 1px solid var(--mud-palette-lines-default);
    border-bottom: 1px solid var(--mud-palette-lines-default);
    min-width: 0;
}

/* A long value ("Loan written · Nov-06-2026", "SMS · Nov-01") wraps inside its tile, between its "·" parts, instead of
   running into the next tile. */
.lw-cf-stat b {
    font-size: 1.125rem;   /* 18 px over a 12 px label: at the prototype's 20 px a date touched the tile's border (Fatih, Nov 20, 2026) */
    font-weight: 700;
    line-height: 1.3;
    overflow-wrap: break-word;
}

.lw-cf-stat b span {
    white-space: nowrap;
}

.lw-cf-stat > span,
.lw-cf-big span {
    color: var(--mud-palette-text-secondary);
    font-size: 0.75rem;
    font-weight: 600;
}

/* Profile completeness: a donut per section, green complete and red missing, the missing items listed. */
.lw-cf-legend {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--mud-palette-text-secondary);
    font-size: 0.8125rem;
}

.lw-cf-legend i {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

/* Profile completeness (#12817, Daniel Nov 16, prototype v111): the company's accent colour for the share complete and grey for
   the share missing. The donuts' missing share, the legend's Missing dot and the missing items' dots are one grey (--lw-cf-miss),
   a shade darker than the old #d5dce6 so the dots read better (Fatih, Nov 24). */
.lw-cf-legend,
.lw-cf-donuts {
    --lw-cf-miss: #bac3cf;
}

.lw-theme-dark .lw-cf-legend,
.lw-theme-dark .lw-cf-donuts {
    --lw-cf-miss: #59657a;
}

.lw-cf-legend i.lw-cf-ok { background: var(--lw-accent, #ef7d22); }
.lw-cf-legend i.lw-cf-miss { background: var(--lw-cf-miss); }

.lw-cf-donuts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
}

.lw-cf-donut {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    min-width: 0;
}

.lw-cf-ring {
    flex: none;
    width: 84px;
    height: 84px;
}

.lw-cf-ring .lw-cf-ring-ok { stroke: var(--lw-accent, #ef7d22); }
.lw-cf-ring .lw-cf-ring-miss { stroke: var(--lw-cf-miss); }
/* The empty ring, seen only while the donuts fill: lighter than the missing grey, so its sweep still shows. */
.lw-cf-ring .lw-cf-ring-track { stroke: #f0f3f7; }
.lw-theme-dark .lw-cf-ring .lw-cf-ring-track { stroke: #2c3340; }

/* The fill (Fatih, Nov 24), the Book of Business donut's sweep (.lw-bb-donut): one progress (--lw-cf-p, 0 to 100) eases in once,
   and each part shows the piece of the sweep in its share: the complete part from the top up to --lw-cf-c (the percent), the
   missing part from there to the end. A donut 100% complete is all blue, 0% all grey; the seam between the parts never moves.
   Each donut starts a little after the one before it (--lw-cf-i). A reload after an edit eases --lw-cf-c to the new share.
   Registered so they can be eased; without @property the donuts simply appear. */
@property --lw-cf-p {
    syntax: '<number>';
    inherits: true;
    initial-value: 0;
}

@property --lw-cf-c {
    syntax: '<number>';
    inherits: true;
    initial-value: 0;
}

.lw-cf-donut {
    --lw-cf-p: 0;
    transition: --lw-cf-p 1200ms cubic-bezier(0.65, 0, 0.35, 1) calc(var(--lw-cf-i, 0) * 90ms),
        --lw-cf-c 700ms cubic-bezier(0.4, 0, 0.2, 1);
}

.lw-cf-filled .lw-cf-donut {
    --lw-cf-p: 100;
}

.lw-cf-ring .lw-cf-ring-ok,
.lw-cf-ring .lw-cf-ring-miss {
    stroke-linecap: butt;
}

/* Each part is one dash and a gap of the rest of the ring (dash + gap = the ring's 100), starting at the top (offset 25). */
.lw-cf-ring .lw-cf-ring-ok {
    --lw-cf-ok-len: min(var(--lw-cf-p), var(--lw-cf-c));
    stroke-dasharray: calc(var(--lw-cf-ok-len) * 1px) calc((100 - var(--lw-cf-ok-len)) * 1px);
    stroke-dashoffset: 25px;
}

.lw-cf-ring .lw-cf-ring-miss {
    --lw-cf-miss-len: clamp(0, var(--lw-cf-p) - var(--lw-cf-c), 100 - var(--lw-cf-c));
    stroke-dasharray: calc(var(--lw-cf-miss-len) * 1px) calc((100 - var(--lw-cf-miss-len)) * 1px);
    stroke-dashoffset: calc((25 - var(--lw-cf-c)) * 1px);
}

.lw-cf-ring-text {
    fill: var(--mud-palette-text-primary);
    font-size: 8px;
    font-weight: 600;
    transition: opacity 450ms ease calc(300ms + var(--lw-cf-i, 0) * 90ms);
}

/* The percentage fades in once the sweep has started. */
.lw-cf-donuts:not(.lw-cf-filled) .lw-cf-ring-text {
    opacity: 0;
}

@media (prefers-reduced-motion: reduce) {
    .lw-cf-donut,
    .lw-cf-ring-text {
        transition: none;
    }
}

.lw-cf-donut-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    font-size: 0.875rem;
}

.lw-cf-missing {
    position: relative;
    padding-left: 14px;
    font-size: 0.8125rem;
}

.lw-cf-missing::before {
    content: "";
    position: absolute;
    left: 2px;
    top: 0.5em;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--lw-cf-miss);
}

/* Two cards a row from tablet width, one on a phone; a wide card takes the whole row. */
.lw-cf-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.lw-cf-grid > .lw-cf-wide {
    grid-column: 1 / -1;
}

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

/* An outstanding loan's numbers. */
.lw-cf-big {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
}

.lw-cf-big > div {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.lw-cf-big b {
    font-size: 1.125rem;
    font-weight: 600;
    overflow-wrap: anywhere;
}

.lw-cf-flags {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
}

.lw-cf-alert {
    margin: 0;
}

/* Label and value pairs. */
.lw-cf-kv {
    display: grid;
    grid-template-columns: minmax(110px, 38%) minmax(0, 1fr);
    gap: 6px 12px;
    margin: 0;
    font-size: 0.875rem;
}

.lw-cf-kv dt {
    color: var(--mud-palette-text-secondary);
}

.lw-cf-kv dd {
    margin: 0;
    min-width: 0;
    overflow-wrap: anywhere;
}

/* A number not in service (NIS, #12818). */
.lw-cf-struck {
    text-decoration: line-through;
    color: var(--mud-palette-text-secondary);
}

.lw-cf-idrow {
    padding-bottom: 10px;
    margin-bottom: 10px;
    border-bottom: 1px solid var(--mud-palette-lines-default);
}

.lw-cf-idrow:last-child {
    padding-bottom: 0;
    margin-bottom: 0;
    border-bottom: none;
}

.lw-cf-phone {
    display: flex;
    align-items: flex-end;
    gap: 8px;
}

.lw-cf-phone > :first-child {
    flex: 1 1 auto;
    min-width: 0;
}

/* The timeline (#12817, #12823). */
.lw-cf-tl {
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr);
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px dashed var(--mud-palette-lines-default);
    font-size: 0.875rem;
}

.lw-cf-tl:last-child {
    border-bottom: none;
}

.lw-cf-when {
    color: var(--mud-palette-text-secondary);
    font-size: 0.8125rem;
}

@media (max-width: 599.98px) {
    .lw-cf-tl {
        grid-template-columns: minmax(0, 1fr);
        gap: 2px;
    }
}

/* Loans tab (#12820): a product's group heading with its count. */
.lw-cf-grp {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: var(--mud-palette-background-gray);
    border-bottom: 1px solid var(--mud-palette-lines-default);
    font-weight: 600;
    font-size: 0.875rem;
}

.lw-cf-count {
    padding: 0 8px;
    border-radius: 10px;
    background: var(--mud-palette-surface);
    border: 1px solid var(--mud-palette-lines-default);
    font-size: 0.75rem;
    font-variant-numeric: tabular-nums;
}

/* Decisions history (#12821): the ticks, the picked row and its details. */
.lw-cf-check {
    text-align: center;
}

.lw-cf-dec-table .mud-table-body .mud-table-row {
    cursor: pointer;
}

.lw-cf-dec-table .mud-table-body .mud-table-row.lw-cf-picked > .mud-table-cell {
    background: color-mix(in srgb, var(--mud-palette-primary) 8%, var(--mud-palette-surface));
}

.lw-cf-dec {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
    border-top: 1px solid var(--mud-palette-lines-default);
}

.lw-cf-dec-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
}

.lw-cf-dec-grid h3 {
    margin: 0 0 6px;
    font-size: 0.875rem;
    font-weight: 600;
}

.lw-cf-warn {
    margin-bottom: 6px;
    padding: 6px 10px;
    border-left: 3px solid var(--mud-palette-warning);
    background: color-mix(in srgb, var(--mud-palette-warning) 8%, var(--mud-palette-surface));
    font-size: 0.875rem;
}

.lw-cf-list {
    margin: 4px 0 0 18px;
    padding: 0;
    font-size: 0.875rem;
}

/* Client photo (#12818; Fatih 2026-11-05: bigger, with Add photo and Take photo). */
.lw-photo {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 16px;
}

.lw-photo .lw-photo-avatar {
    width: 160px;
    height: 160px;
}

.lw-photo .lw-photo-initials {
    font-size: 3rem;
}

.lw-photo-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

@media (max-width: 599.98px) {
    .lw-photo .lw-photo-avatar {
        width: 120px;
        height: 120px;
    }

    .lw-photo .lw-photo-initials {
        font-size: 2.25rem;
    }
}

/* "Development · Viewing as" in the top bar, left of the bell (ViewAsSwitcher; Fatih Nov 24): the prototype's "Prototype · Viewing
   as" switch as it looks there (.proto: dashed brown border on pale yellow, its select white with a tan border), on every theme.
   Below 960 px, where the bar also hides the name, "Dev" stands for the label and the select narrows. */
.lw-dev-view {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-right: 8px;
    border: 1px dashed #9a5b00;
    background: #fff8ec;
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 12px;
    color: #7a4800;
    white-space: nowrap;
}
.lw-dev-view select {
    border: 1px solid #d9b98a;
    border-radius: 4px;
    padding: 4px 6px;
    font: inherit;
    font-size: 13px;
    color: #243248;
    background: #fff;
    cursor: pointer;
}
.lw-dev-view-short {
    display: none;
    font-weight: 600;
}
@media (max-width: 959.98px) {
    .lw-dev-view {
        gap: 6px;
        padding: 3px 6px;
        margin-right: 4px;
    }
    .lw-dev-view-full {
        display: none;
    }
    .lw-dev-view-short {
        display: inline;
    }
    .lw-dev-view select {
        max-width: 118px;
        padding: 3px 4px;
        font-size: 12px;
    }
}
/* On a phone the dashed yellow box alone marks it, so the logo keeps its size (screen check Nov 24: the logo was squeezed). */
@media (max-width: 599.98px) {
    .lw-dev-view {
        padding: 2px 4px;
        margin-right: 2px;
    }
    .lw-dev-view-short {
        display: none;
    }
    .lw-dev-view select {
        max-width: 94px;
        padding: 2px 2px;
        font-size: 11px;
    }
}

/* The Abeyance console's Agreement column (#12946): the request chip above the button. */
.lw-ab-agreement {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
}

/* The consoles' tabs under the page title (ConsoleTabs; Daniel's prototype, Nov 5): links to the consoles the person can
   open, the current one underlined in the company's colour, each with its file count. They wrap on a narrow screen. */
.lw-console-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    border-bottom: 1px solid var(--mud-palette-lines-default);
}

.lw-console-tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-bottom: 3px solid transparent;
    margin-bottom: -1px;
    color: var(--mud-palette-text-secondary);
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}

.lw-console-tab:hover {
    color: var(--mud-palette-primary);
}

.lw-console-tab.lw-on {
    color: var(--mud-palette-primary);
    border-bottom-color: var(--mud-palette-primary);
}

.lw-console-tab-count {
    background: var(--mud-palette-action-default-hover);
    color: var(--mud-palette-text-primary);
    border-radius: 10px;
    padding: 1px 8px;
    font-size: 11px;
    font-weight: 700;
}

/* On a phone the three tabs fit on one line. */
@media (max-width: 599.98px) {
    .lw-console-tabs {
        gap: 0;
    }

    .lw-console-tab {
        gap: 6px;
        padding: 10px 8px;
    }

    .lw-console-tab-count {
        padding: 1px 6px;
    }
}

/* The client's photo beside the name on the client file's Overview (Fatih 2026-11-06: as in the prototype, half as big
   again, no buttons; kept at that size on Nov 20, 2026). PageHeader puts it before the title (lw-page-lead). */
.lw-page-lead {
    flex: 0 0 auto;
    margin-right: 4px;
}

/* The name stays beside the photo; the actions keep to the right of it, wrapping onto a second line there rather than
   dropping under the whole header. */
.lw-page-lead + .lw-page-head-main {
    margin-right: auto;
}

.lw-page-lead ~ .lw-page-actions {
    flex: 1 1 360px;
    justify-content: flex-end;
}

.lw-photo.lw-photo-head {
    margin-bottom: 0;
}

.lw-photo.lw-photo-head .lw-photo-avatar {
    width: 78px;
    height: 78px;
}

.lw-photo.lw-photo-head .lw-photo-initials {
    font-size: 1.75rem;
}

@media (max-width: 599.98px) {
    /* On a phone the actions go under the name, from the left, as on the other tabs. */
    .lw-page-lead ~ .lw-page-actions {
        justify-content: flex-start;
    }

    .lw-photo.lw-photo-head .lw-photo-avatar {
        width: 64px;
        height: 64px;
    }

    .lw-photo.lw-photo-head .lw-photo-initials {
        font-size: 1.4rem;
    }
}

/* Activity (#12823). */
.lw-act-filter {
    min-width: 170px;
    max-width: 200px;
}

.lw-act-icon {
    vertical-align: text-bottom;
    margin-right: 4px;
    color: var(--mud-palette-text-secondary);
}

.lw-act-note {
    white-space: pre-line;
    overflow-wrap: anywhere;
}

.lw-cf-tl.lw-act-priority {
    background: color-mix(in srgb, var(--mud-palette-warning) 6%, var(--mud-palette-surface));
    border-radius: var(--mud-default-borderradius);
    padding-left: 8px;
    padding-right: 8px;
}

/* Documents in folders (#12822), the prototype's look (Fatih, Nov 20, 2026): each folder a full-width row in a flush card,
   its amber folder icon, the name, and "N files · last modified …" at the end; the note at the foot under a line. */
.lw-doc-folders {
    display: flex;
    flex-direction: column;
}

.lw-doc-folder {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 12px 16px;
    border: 0;
    border-top: 1px solid var(--mud-palette-lines-default);
    background: none;
    color: var(--mud-palette-text-primary);
    font: inherit;
    font-size: 0.875rem;
    text-align: left;
    cursor: pointer;
}

.lw-doc-folder:first-child {
    border-top: 0;
}

.lw-doc-folder:hover {
    background: color-mix(in srgb, var(--mud-palette-primary) 4%, var(--mud-palette-surface));
}

.lw-doc-folder:focus-visible {
    outline: 2px solid var(--lw-focus, var(--mud-palette-primary));
    outline-offset: -2px;
}

.lw-doc-fico {
    flex: none;
    width: 22px;
    height: 22px;
    fill: #fdf1e0;
    stroke: #9a5b00;
    stroke-width: 1.5;
}

.lw-theme-dark .lw-doc-fico {
    fill: rgba(246, 176, 77, 0.16);
    stroke: #f7c47a;
}

.lw-doc-folder-name {
    flex: 1 1 auto;
    min-width: 0;
    font-weight: 600;
}

.lw-doc-folder-meta {
    font-size: 0.75rem;
    color: var(--mud-palette-text-secondary);
    white-space: nowrap;
}

.lw-doc-empty {
    margin: 0;
    padding: 12px 16px;
    font-size: 0.8125rem;
    color: var(--mud-palette-text-secondary);
}

.lw-doc-foot {
    margin: 0;
    padding: 10px 16px;
    font-size: 0.75rem;
    color: var(--mud-palette-text-secondary);
    border-top: 1px solid var(--mud-palette-lines-default);
}

@media (max-width: 599.98px) {
    /* On a phone the count goes under the name. */
    .lw-doc-folder {
        flex-wrap: wrap;
        row-gap: 2px;
    }

    .lw-doc-folder-meta {
        width: 100%;
        padding-left: 34px;
        white-space: normal;
    }
}

.lw-doc-name {
    overflow-wrap: anywhere;
}

.lw-doc-note {
    font-size: 0.75rem;
}

/* SMS and email conversation panel (#12816). */
.lw-conv .mud-drawer-content {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.lw-conv-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--mud-palette-lines-default);
}

.lw-conv-thread {
    flex: 1 1 auto;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 12px 16px;
    background: var(--mud-palette-background-gray);
}

.lw-conv-msg {
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-width: 88%;
    padding: 8px 12px;
    border-radius: 12px;
    font-size: 0.875rem;
}

.lw-conv-out {
    align-self: flex-end;
    background: color-mix(in srgb, var(--mud-palette-primary) 12%, var(--mud-palette-surface));
}

.lw-conv-in {
    align-self: flex-start;
    background: var(--mud-palette-surface);
    border: 1px solid var(--mud-palette-lines-default);
}

.lw-conv-text {
    white-space: pre-line;
    overflow-wrap: anywhere;
}

.lw-conv-msg small {
    color: var(--mud-palette-text-secondary);
    font-size: 0.75rem;
}

.lw-conv-msg small.lw-conv-problem {
    color: var(--mud-palette-error);
}

.lw-conv-compose {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px 16px;
    border-top: 1px solid var(--mud-palette-lines-default);
}

.lw-conv-send {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

/* Client file tabs (Fatih, 2026-11-05: no icons, as the prototype): as wide as their label, closer together. */
.mud-tabs.lw-cf-tabs .mud-tab {
    /* MudBlazor's own 160 px minimum wins otherwise */
    min-width: 0 !important;
    padding: 6px 16px;
}

/* Client flags window (Daniel, Nov 24 on #12817, prototype v192): each switch with its one-line hint under the name. */
.lw-cf-flagrows {
    display: flex;
    flex-direction: column;
}
.lw-cf-flagrow {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 10px 0;
}
.lw-cf-flagrow + .lw-cf-flagrow {
    border-top: 1px solid var(--mud-palette-lines-default);
}
.lw-cf-flagtext {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.lw-cf-flagtext small {
    font-size: 12px;
    color: var(--mud-palette-text-secondary);
    line-height: 1.4;
}

/* ---- The payday loan page (#12894, prototype board 7) ---- */
.lw-pdl-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px 16px;
    margin-bottom: 12px;
}

.lw-pdl-title {
    min-width: 0;
    flex: 1 1 320px;
}

.lw-pdl-back {
    display: inline-block;
    margin-bottom: 4px;
}

.lw-pdl-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 6px;
}

.lw-pdl-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.lw-pdl-menu-item {
    display: flex;
    flex-direction: column;
    line-height: 1.25;
    max-width: 320px;
    white-space: normal;
}

.lw-pdl-menu-item small {
    color: var(--mud-palette-text-secondary);
    font-size: 0.75rem;
}

.lw-pdl-menu-danger .lw-pdl-menu-item > span {
    color: var(--mud-palette-error);
}

.lw-pdl-banner .lw-pdl-banner-link,
.lw-pdl-banner .lw-pdl-banner-link:hover {
    color: inherit !important;
    font-weight: 600;
    text-decoration: underline;
}

.lw-pdl-kpis {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: var(--mud-default-borderradius);
    background: var(--mud-palette-surface);
    overflow: hidden;
    margin-bottom: 12px;
}

/* Each tile draws its right and bottom line; the box's own border hides the outer ones. */
.lw-pdl-kpi {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 12px 16px;
    min-width: 0;
    box-shadow: 1px 0 0 var(--mud-palette-lines-default), 0 1px 0 var(--mud-palette-lines-default);
}

.lw-pdl-kpi b {
    font-size: 1.375rem;
    font-weight: 600;
    white-space: nowrap;
}

.lw-pdl-kpi-label,
.lw-pdl-kpi-sub {
    color: var(--mud-palette-text-secondary);
    font-size: 0.8125rem;
}

.lw-pdl-facts {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 24px;
    margin: 0 0 16px;
    font-size: 0.875rem;
}

.lw-pdl-facts > div {
    display: flex;
    gap: 6px;
    min-width: 0;
}

.lw-pdl-facts dt {
    color: var(--mud-palette-text-secondary);
}

.lw-pdl-facts dd {
    margin: 0;
    overflow-wrap: anywhere;
}

.lw-pdl-panels {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 12px;
    margin-bottom: 12px;
    align-items: start;
}

.lw-pdl-panels .lw-pdl-total {
    font-weight: 600;
    color: var(--mud-palette-text-primary);
    border-top: 1px solid var(--mud-palette-lines-default);
    padding-top: 6px;
}

.lw-pdl-pair {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 12px;
    margin-bottom: 12px;
    align-items: start;
}

.lw-pdl-due tr.lw-clickable {
    cursor: pointer;
}

.lw-pdl-state {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.lw-eft-sw.lw-st-scheduled { background: #e3e8f0; }
.lw-eft-sw.lw-st-neutral { background: #e3e8f0; }

@media (max-width: 599.98px) {
    .lw-pdl-actions {
        justify-content: flex-start;
    }

    .lw-pdl-kpi b {
        font-size: 1.125rem;
    }

    .lw-pdl-panels,
    .lw-pdl-pair {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* ---- Take payment (#12895, prototype board 7c) ---- */
.lw-pay {
    max-width: 880px;
}

.lw-pay-types {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 8px;
    margin-bottom: 16px;
}

.lw-pay-type {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    text-align: left;
    padding: 10px 12px;
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: var(--mud-default-borderradius);
    background: var(--mud-palette-surface);
    color: var(--mud-palette-text-primary);
    cursor: pointer;
    font: inherit;
}

.lw-pay-type span {
    color: var(--mud-palette-text-secondary);
    font-size: 0.8125rem;
}

.lw-pay-type.on {
    border-color: var(--mud-palette-primary);
    box-shadow: inset 0 0 0 1px var(--mud-palette-primary);
}

.lw-pay-type.dis {
    cursor: not-allowed;
    opacity: 0.55;
}

.lw-pay-figs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 32px;
    margin: 0 0 8px;
}

.lw-pay-figs dt {
    color: var(--mud-palette-text-secondary);
    font-size: 0.8125rem;
}

.lw-pay-figs dd {
    margin: 0;
    font-size: 1rem;
}

.lw-pay-custom,
.lw-pay-tender {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 4px 16px;
    align-items: start;
}

.lw-pay-calc {
    margin-top: 12px;
    justify-self: start;
}

.lw-pay-remain {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    margin: 12px 0 8px;
    padding: 10px 12px;
    border-radius: var(--mud-default-borderradius);
    background: var(--mud-palette-background-gray);
}

.lw-pay-remain.short b { color: var(--mud-palette-error); }
.lw-pay-remain.ok b { color: var(--mud-palette-success); }
.lw-pay-remain.over b { color: var(--mud-palette-info); }

/* EFT maintenance (#12896, prototype board 7e): the payments beside the selected EFT from 1280 px (under it before), the rules
   as a short list, and the Set up EFT dialog's four figures two by two. */
.lw-eftm-cols {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
    align-items: start;
}

@media (min-width: 1280px) {
    .lw-eftm-cols {
        grid-template-columns: minmax(0, 1fr) minmax(320px, 380px);
    }
}

.lw-eftm-compact .mud-table-row .mud-table-cell {
    padding: 6px 8px;
}

.lw-eftm-rules {
    margin: 0 0 16px;
    padding-left: 20px;
    font-size: 12px;
    line-height: 1.6;
}

.lw-eftm-kv {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 16px;
    margin: 0;
    font-size: 13px;
}

.lw-eftm-kv dt {
    color: var(--mud-palette-text-secondary);
}

.lw-eftm-kv dd {
    margin: 0;
    font-weight: 600;
}

/* Loan documents (#12899): the agreement previewed in the dialog; the Loan history report's worked-out lines (late interest,
   what is still owing) in italics, and its details column wide enough to read. */
.lw-doc-preview {
    width: 100%;
    height: 60vh;
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 4px;
}

.lw-history-report tr.lw-history-worked td {
    font-style: italic;
    color: var(--mud-palette-text-secondary);
}

.lw-history-report td.lw-history-detail {
    min-width: 220px;
    white-space: normal;
}

/* Loan documents and Resend receipts (#12899): one row per document or receipt, its buttons beside it, under it on a phone. */
.lw-doc-list {
    border-top: 1px solid var(--mud-palette-lines-default);
}

.lw-doc-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 8px 16px;
    padding: 10px 0;
    border-bottom: 1px solid var(--mud-palette-lines-default);
    font-size: 14px;
}

.lw-doc-date {
    font-size: 12px;
}

.lw-doc-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

/* Income form: the Pay dates row and the Pay dates window (#12819 Nov 6, prototype v76). */
.lw-pd-sum {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px 16px;
    padding: 10px 12px;
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: var(--mud-default-borderradius);
}

.lw-pd-sum > div {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.lw-pd-sum-label {
    font-size: 0.75rem;
    color: var(--mud-palette-text-secondary);
}

.lw-pd-sum small,
.lw-pd-opt small,
.lw-pd-sec small,
.lw-pd-next small {
    color: var(--mud-palette-text-secondary);
    font-size: 0.8125rem;
}

.lw-pd-opts {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.lw-pd-opt {
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: var(--mud-default-borderradius);
}

.lw-pd-opt.on {
    border-color: var(--mud-palette-primary);
    box-shadow: inset 0 0 0 1px var(--mud-palette-primary);
}

.lw-pd-radio {
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 10px;
    width: 100%;
    padding: 10px 12px;
    background: none;
    border: 0;
    color: inherit;
    font: inherit;
    text-align: start;
    cursor: pointer;
}

.lw-pd-radio:focus-visible {
    outline: 2px solid var(--mud-palette-primary);
    outline-offset: -2px;
    border-radius: var(--mud-default-borderradius);
}

.lw-pd-radio > i {
    flex: none;
    width: 18px;
    height: 18px;
    margin-top: 2px;
    border: 2px solid var(--mud-palette-text-secondary);
    border-radius: 50%;
}

.lw-pd-opt.on .lw-pd-radio > i {
    border-color: var(--mud-palette-primary);
    box-shadow: inset 0 0 0 3px var(--mud-palette-surface), inset 0 0 0 9px var(--mud-palette-primary);
}

.lw-pd-radio > span {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.lw-pd-in {
    padding: 0 12px 10px 40px;
    max-width: 360px;
}

.lw-pd-sec {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.lw-pd-sec .lw-pd-in {
    padding: 0;
}

.lw-pd-cal {
    margin-top: 16px;
}

.lw-pd-calnav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.lw-pd-legend {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px 14px;
    font-size: 0.8125rem;
    color: var(--mud-palette-text-secondary);
}

.lw-pd-legend > span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.lw-pd-key {
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 4px;
}

.lw-pd-key.now {
    outline: 2px solid var(--mud-palette-primary);
    outline-offset: -2px;
}

.lw-pd-key.pay,
.lw-pd-day.pay,
.lw-pd-day.off.pay {
    background: color-mix(in srgb, var(--mud-palette-success) 24%, transparent);
    color: var(--mud-palette-text-primary);
    font-weight: 600;
}

.lw-pd-key.off,
.lw-pd-day.off {
    background: color-mix(in srgb, var(--mud-palette-error) 14%, transparent);
}

.lw-pd-months {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-top: 8px;
}

@media (max-width: 720px) {
    .lw-pd-months {
        grid-template-columns: minmax(0, 1fr);
    }
}

.lw-pd-mtitle {
    text-align: center;
    font-weight: 600;
    margin-bottom: 6px;
}

.lw-pd-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 2px;
    text-align: center;
    font-size: 0.8125rem;
}

.lw-pd-dow {
    color: var(--mud-palette-text-secondary);
    font-size: 0.75rem;
    padding-bottom: 2px;
}

.lw-pd-day {
    padding: 4px 0;
    border-radius: 4px;
    font-variant-numeric: tabular-nums;
}

.lw-pd-day.now {
    outline: 2px solid var(--mud-palette-primary);
    outline-offset: -2px;
}

.lw-pd-next {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px 10px;
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid var(--mud-palette-lines-default);
}

.lw-pd-next > span {
    color: var(--mud-palette-text-secondary);
}

.lw-pd-next > b {
    font-size: 1.05rem;
}

/* New payday loan (#12903-#12908, prototype v76): the steps, the Banking options, results and footers. */
.lw-nl {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 1180px;
}

.lw-nl-back {
    align-self: flex-start;
}

.lw-wiz {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 18px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.lw-wiz li {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--mud-palette-text-secondary);
    font-size: 0.875rem;
}

.lw-wiz-num {
    display: inline-grid;
    place-items: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 1px solid var(--mud-palette-lines-default);
    font-size: 0.75rem;
    font-weight: 600;
}

.lw-wiz li.on {
    color: var(--mud-palette-text-primary);
    font-weight: 600;
}

.lw-wiz li.on .lw-wiz-num {
    background: var(--mud-palette-primary);
    border-color: var(--mud-palette-primary);
    color: var(--mud-palette-primary-text);
}

.lw-wiz li.done .lw-wiz-num {
    background: color-mix(in srgb, var(--mud-palette-success) 18%, transparent);
    border-color: var(--mud-palette-success);
    color: var(--mud-palette-text-primary);
}

.lw-nl-ways {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 10px;
}

.lw-nl-way {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 12px 14px;
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: var(--mud-default-borderradius);
    background: none;
    color: inherit;
    font: inherit;
    text-align: start;
    cursor: pointer;
}

.lw-nl-way span {
    color: var(--mud-palette-text-secondary);
    font-size: 0.8125rem;
}

.lw-nl-way.on {
    border-color: var(--mud-palette-primary);
    box-shadow: inset 0 0 0 1px var(--mud-palette-primary);
}

.lw-nl-way:focus-visible {
    outline: 2px solid var(--mud-palette-primary);
    outline-offset: 2px;
}

.lw-nl-panel {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 12px 14px;
    border-radius: var(--mud-default-borderradius);
    background: color-mix(in srgb, var(--mud-palette-primary) 4%, transparent);
}

.lw-nl-send {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 14px;
}

.lw-nl-send .mud-radio-group {
    display: flex;
    flex-wrap: wrap;
}

.lw-nl-result {
    padding: 12px 14px;
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: var(--mud-default-borderradius);
    background: var(--mud-palette-surface);
}

.lw-nl-kv {
    display: grid;
    grid-template-columns: minmax(140px, max-content) minmax(0, 1fr);
    gap: 6px 16px;
    margin: 0;
}

.lw-nl-kv dt {
    color: var(--mud-palette-text-secondary);
}

.lw-nl-kv dd {
    margin: 0;
    min-width: 0;
    overflow-wrap: anywhere;
}

.lw-nl-kv-big dd {
    font-weight: 600;
}

@media (max-width: 599.98px) {
    .lw-nl-kv {
        grid-template-columns: minmax(0, 1fr);
        gap: 2px;
    }

    .lw-nl-kv dd {
        margin-bottom: 6px;
    }
}

.lw-nl-foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
    padding-top: 12px;
    border-top: 1px solid var(--mud-palette-lines-default);
}

.lw-nl-foot > .mud-typography {
    flex: 1 1 200px;
}

.lw-nl-foot-card {
    padding: 12px 16px;
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: var(--mud-default-borderradius);
    background: var(--mud-palette-surface);
}

.lw-nl-reasons,
.lw-nl-errors {
    margin: 4px 0 0;
    padding-inline-start: 18px;
}

.lw-nl-reasons {
    list-style: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.lw-nl-code {
    display: inline-block;
    min-width: 40px;
    margin-inline-end: 8px;
    padding: 0 6px;
    border-radius: 4px;
    background: color-mix(in srgb, var(--mud-palette-warning) 18%, transparent);
    font-size: 0.75rem;
    font-weight: 600;
    text-align: center;
}

.lw-nl-details {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
}

@media (min-width: 1100px) {
    .lw-nl-details {
        grid-template-columns: minmax(0, 1.2fr) minmax(320px, 1fr);
        align-items: start;
    }
}

.lw-nl-amount {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 8px 12px;
}

.lw-nl-amount-field {
    flex: 1 1 300px;
    max-width: 340px;
}

.lw-nl-date {
    min-width: 170px;
    max-width: 200px;
}

.lw-nl-wrap .mud-alert-message {
    min-width: 0;
    overflow-wrap: anywhere;
}

.lw-nl-f {
    display: inline-block;
    margin-inline-start: 6px;
    padding: 0 6px;
    border-radius: 4px;
    background: color-mix(in srgb, var(--mud-palette-warning) 24%, transparent);
    font-weight: 700;
    font-size: 0.75rem;
}

.lw-nl-subhead {
    padding: 10px 16px;
    border-top: 1px solid var(--mud-palette-lines-default);
    font-weight: 600;
}

.lw-nl-timeline {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.lw-nl-timeline li {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--mud-palette-text-secondary);
}

.lw-nl-timeline li.done {
    color: var(--mud-palette-text-primary);
}

.lw-nl-dot {
    display: inline-grid;
    place-items: center;
    flex: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 1px solid var(--mud-palette-lines-default);
    font-size: 0.75rem;
}

.lw-nl-timeline li.done .lw-nl-dot {
    background: color-mix(in srgb, var(--mud-palette-success) 22%, transparent);
    border-color: var(--mud-palette-success);
}


/* Funding & Payments (#12909-#12913, Daniel's PDL prototype boards 5-5d): the tab's intro, Auto Funding's strip (sent today,
   queued, in error), the EFT lists' switch and the filters above the grid; long reasons cut to one line (the full text in the
   title); a file's rows scroll inside the View dialog. */
.lw-fund-head {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.lw-fund-strip {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    max-width: 640px;
}

.lw-fund-tile {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 10px 12px;
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: var(--mud-default-borderradius);
    background: var(--mud-palette-surface);
}

.lw-fund-tile span {
    color: var(--mud-palette-text-secondary);
    font-size: 0.8125rem;
}

.lw-fund-tile strong {
    font-size: 1.375rem;
    line-height: 1.2;
}

.lw-fund-tile.lw-bad {
    border-color: color-mix(in srgb, var(--mud-palette-error) 55%, var(--mud-palette-lines-default));
}

.lw-fund-tile.lw-bad strong {
    color: var(--mud-palette-error);
}

.lw-fund-seg {
    align-self: flex-start;
    max-width: 100%;
}

.lw-fund-why {
    display: inline-block;
    max-width: 260px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: bottom;
}

.lw-fund-ref {
    min-width: 170px;
}

.lw-fund-file {
    max-height: 60vh;
    overflow: auto;
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: var(--mud-default-borderradius);
}

.lw-fund-file th,
.lw-fund-file td {
    white-space: nowrap;
}

.lw-fund-apply-fields {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.lw-fund-history li {
    align-items: flex-start;
}

.lw-fund-apply-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
    width: 100%;
}

/* A payment type that doesn't fit the amount (Apply e-Transfer). */
.lw-nl-ways .lw-nl-way:disabled {
    cursor: not-allowed;
    opacity: 0.45;
}

@media (max-width: 599.98px) {
    .lw-fund-strip {
        grid-template-columns: minmax(0, 1fr);
    }

    .lw-fund-tile {
        flex-direction: row;
        align-items: baseline;
        justify-content: space-between;
    }

    .lw-fund-seg {
        flex-wrap: wrap;
    }

    .lw-fund-apply-fields {
        grid-template-columns: minmax(0, 1fr);
    }

    /* Two filters a row on a phone (From and To, CID and LID, Name and Status), so the list starts higher up. */
    .lw-fund-filters .lw-oa-f,
    .lw-fund-filters .lw-oa-f-narrow,
    .lw-fund-filters > .mud-select {
        flex: 1 1 calc(50% - 6px);
        min-width: 0;
    }
}

/* ---- My settings › Appearance (#12928): the person's own theme, density, text size, stripes and menu ----
   MainLayout puts the classes on the brand element (display: contents, so the rules reach the whole app). */

/* Text size: Large 110%, Larger 125%. MudBlazor's type and LoanWise's own sizes are in rem, so the root size scales text,
   tables, inputs and buttons together. */
html:has(.lw-text-110) { font-size: 110%; }
html:has(.lw-text-125) { font-size: 125%; }

/* The open menu widens with the text so "Online Applications" and its count still fit (264 px at Standard; Fatih, Nov 19,
   2026). The icons keep their 20 px and their column (MainLayout's menu rules), so the rail stays 64 px. */
.lw-text-110 { --mud-drawer-width-left: 284px; }
.lw-text-125 { --mud-drawer-width-left: 304px; }

/* Compact: tighter table rows, buttons, inputs, card headers and page margins, so more rows fit. */
.lw-density-compact .mud-table-dense .mud-table-cell,
.lw-density-compact .mud-table-cell {
    padding-top: 4px;
    padding-bottom: 4px;
}
.lw-density-compact .mud-button-root.mud-button:not(.mud-icon-button) {
    min-height: 30px;
}
.lw-density-compact .mud-button-root.mud-button[class*="-size-small"]:not(.mud-icon-button) {
    min-height: 26px;
}
.lw-density-compact .mud-icon-button {
    padding: 6px;
}
.lw-density-compact .mud-input-control .mud-input.mud-input-outlined .mud-input-slot.mud-input-root-outlined {
    padding-top: 5px;
    padding-bottom: 5px;
}
.lw-density-compact .mud-input-control.mud-input-control-margin-normal,
.lw-density-compact .mud-input-control.mud-input-control-margin-dense {
    margin-top: 4px;
    margin-bottom: 2px;
}
.lw-density-compact .lw-section-head.pa-3 {
    padding-top: 6px !important;
    padding-bottom: 6px !important;
}
.lw-density-compact .mud-main-content .mud-paper > .pa-4,
.lw-density-compact .mud-main-content .lw-card > .pa-3 {
    padding: 10px !important;
}
@media (min-width: 600px) {
    .lw-density-compact .mud-layout .mud-appbar-dense ~ .mud-main-content {
        padding-left: 12px !important;
        padding-right: 12px !important;
    }
}
.lw-density-compact .mud-drawer .mud-nav-item.lw-nav-sub > .mud-nav-link,
.lw-density-compact .mud-drawer .mud-nav-group.lw-nav-sub > .mud-nav-link {
    min-height: 32px;
    padding-top: 4px;
    padding-bottom: 4px;
}

/* Striped table rows: every other row shaded. */
.lw-striped .mud-table-body .mud-table-row:nth-of-type(odd) > .mud-table-cell {
    background-color: var(--mud-palette-table-striped);
}

/* The menu closed on a computer: the prototype's rail of icons (MudDrawer Mini, 64 px; Fatih, Nov 19, 2026). Every icon
   sits 22 px in, in one column under the menu button; the labels, headings and counts go, and come back with a short
   fade while MudBlazor widens the menu again. */
.mud-drawer.mud-drawer-mini .mud-drawer-content {
    overflow-x: hidden;
}
.mud-drawer.mud-drawer-mini.mud-drawer--closed .lw-nav-heading,
.mud-drawer.mud-drawer-mini.mud-drawer--closed .lw-nav-badge,
.mud-drawer.mud-drawer-mini.mud-drawer--closed .mud-nav-group .mud-nav-link-expand-icon {
    display: none;
}
.mud-drawer.mud-drawer-mini.mud-drawer--closed .mud-nav-item > .mud-nav-link,
.mud-drawer.mud-drawer-mini.mud-drawer--closed .mud-nav-item.lw-nav-sub > .mud-nav-link,
.mud-drawer.mud-drawer-mini.mud-drawer--closed .mud-nav-group.lw-nav-sub > .mud-nav-link,
.mud-drawer.mud-drawer-mini.mud-drawer--closed .mud-nav-group .mud-navmenu .mud-nav-item > .mud-nav-link {
    width: 48px;
    margin-left: 8px;
    margin-right: 8px;
    padding-left: 14px;
    padding-right: 14px;
}
.mud-drawer.mud-drawer-mini.mud-drawer--open .mud-nav-link-text,
.mud-drawer.mud-drawer-mini.mud-drawer--open .lw-nav-heading {
    animation: lw-nav-label-in 220ms var(--lw-ease) both;
}
@keyframes lw-nav-label-in {
    from { opacity: 0; }
    to { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
    .mud-drawer.mud-drawer-mini,
    .mud-main-content,
    .mud-appbar .lw-menu-toggle .mud-icon-root {
        transition: none !important;
    }
    .mud-drawer.mud-drawer-mini.mud-drawer--open .mud-nav-link-text,
    .mud-drawer.mud-drawer-mini.mud-drawer--open .lw-nav-heading {
        animation: none;
    }
}

/* ---- Dark theme: the hard-coded colours of site.css in dark versions (the palette and --lw-* tokens do the rest) ---- */
html:has(.lw-theme-dark) {
    color-scheme: dark;
}
.lw-theme-dark .mud-main-content {
    background-image:
        radial-gradient(56% 46% at 100% 0%, color-mix(in srgb, var(--lw-primary) 6%, transparent) 0%, transparent 60%),
        radial-gradient(46% 40% at 0% 100%, color-mix(in srgb, var(--lw-accent) 5%, transparent) 0%, transparent 62%);
}
.lw-theme-dark .mud-appbar {
    border-bottom: 1px solid var(--mud-palette-lines-default);
}
.lw-theme-dark .lw-chip-success { background: rgba(108, 192, 112, 0.16); color: #8fd793; }
.lw-theme-dark .lw-chip-warning { background: rgba(246, 176, 77, 0.16); color: #f7c47a; }
.lw-theme-dark .lw-chip-danger  { background: rgba(242, 114, 111, 0.16); color: #f59a97; }
.lw-theme-dark .lw-chip-info    { background: rgba(100, 170, 240, 0.16); color: #9ccbf6; }
.lw-theme-dark .lw-chip-neutral { background: rgba(230, 234, 242, 0.10); color: #c9d1de; }

/* The payment schedule's states: deeper swatches and tinted rows that keep the light text readable. */
.lw-theme-dark .lw-eft-sw.lw-st-await { background: #8f78c9; }
.lw-theme-dark .lw-eft-sw.lw-st-paid { background: #6f9e3c; }
.lw-theme-dark .lw-eft-sw.lw-st-late { background: #3a8fd6; }
.lw-theme-dark .lw-eft-sw.lw-st-nsf { background: #d98a1d; }
.lw-theme-dark .lw-eft-sw.lw-st-nsfpaid { background: #c9b73c; }
.lw-theme-dark .lw-eft-sw.lw-st-scheduled,
.lw-theme-dark .lw-eft-sw.lw-st-neutral { background: #3a4458; }
.lw-theme-dark .lw-recovery-grid tr.lw-st-await td { background: rgba(143, 120, 201, 0.16); }
.lw-theme-dark .lw-recovery-grid tr.lw-st-paid td { background: rgba(111, 158, 60, 0.16); }
.lw-theme-dark .lw-recovery-grid tr.lw-st-late td { background: rgba(58, 143, 214, 0.16); }
.lw-theme-dark .lw-recovery-grid tr.lw-st-nsf td { background: rgba(217, 138, 29, 0.16); }
.lw-theme-dark .lw-recovery-grid tr.lw-st-nsfpaid td { background: rgba(201, 183, 60, 0.14); }

/* The light logo of a built-in brand is swapped in by MainLayout; a company's own uploaded logo has no light version, so it
   sits on a light plate. */
.lw-theme-dark.lw-own-logo .lw-brand-logo {
    background: #ffffff;
    border-radius: var(--lw-radius);
    padding: 2px 6px;
}

/* The connection banner sits outside the layout (#13183): deeper tints on the dark theme. */
html:has(.lw-theme-dark) #components-reconnect-modal.lw-reconnect {
    background-color: #3a2a12 !important;
    color: #f5d9a8;
    border-color: #5c4318;
}
html:has(.lw-theme-dark) #components-reconnect-modal.lw-reconnect:is(.components-reconnect-failed, .components-reconnect-rejected,
                                                                      .components-reconnect-paused, .components-reconnect-resume-failed) {
    background-color: #3d1d1d !important;
    color: #f4c2c2;
    border-color: #6a2a2a;
}
html:has(.lw-theme-dark) #components-reconnect-modal.lw-reconnect.lw-reconnect-back {
    background-color: #1d3320 !important;
    color: #bfe6c3;
    border-color: #2f5634;
}

/* Printing is always light: the dark theme's palette goes back to paper colours for the printout. */
@media print {
    html:has(.lw-theme-dark) {
        color-scheme: light;
    }
    .lw-theme-dark {
        --mud-palette-surface: #ffffff;
        --mud-palette-background: #ffffff;
        --mud-palette-background-gray: #ffffff;
        --mud-palette-text-primary: #1a1a1a;
        --mud-palette-text-secondary: #55555a;
        --mud-palette-lines-default: #e0e0e0;
        --mud-palette-table-lines: #e0e0e0;
        --mud-palette-divider: #e0e0e0;
    }
}

/* ---- Settings pages as tabs (#13184; prototype v213 board 8, r66): the bar under the page title, one row that scrolls sideways
   with soft edge shadows (the shadows show only where there is more to scroll), sticky under the app bar while a long tab
   scrolls. The chosen tab has a 3 px underline; focus shows a ring. ---- */
.lw-tabs {
    position: sticky;
    /* Right under the app bar, which is 56 px on a phone held upright and 48 px held sideways (64 px from 600 px wide). */
    top: calc(var(--mud-appbar-height) - var(--mud-appbar-height) / 8);
    z-index: 4;
    display: flex;
    flex-wrap: nowrap;
    gap: 2px;
    overflow-x: auto;
    overflow-y: hidden;
    margin: -8px 0 16px;
    padding-top: 8px;
    border-bottom: 1px solid var(--mud-palette-lines-default);
    scrollbar-width: thin;
    --lw-tabs-bg: var(--mud-palette-background-gray);
    background:
        linear-gradient(to right, var(--lw-tabs-bg) 40%, transparent) left center / 48px 100% no-repeat local,
        linear-gradient(to left, var(--lw-tabs-bg) 40%, transparent) right center / 48px 100% no-repeat local,
        radial-gradient(farthest-side at 0 50%, rgba(36, 50, 72, 0.22), transparent) left center / 16px 100% no-repeat scroll,
        radial-gradient(farthest-side at 100% 50%, rgba(36, 50, 72, 0.22), transparent) right center / 16px 100% no-repeat scroll,
        var(--lw-tabs-bg);
}
@media (orientation: landscape) {
    .lw-tabs {
        top: calc(var(--mud-appbar-height) - var(--mud-appbar-height) / 4);
    }
}
@media (min-width: 600px) {
    .lw-tabs {
        top: var(--mud-appbar-height);
    }
}
body:has(.mud-appbar-dense) .lw-tabs {
    top: calc(var(--mud-appbar-height) * 0.75);
}
.lw-tab {
    flex: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    background: none;
    border: 0;
    border-bottom: 3px solid transparent;
    padding: 10px 14px 9px;
    font: inherit;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--mud-palette-text-secondary);
    cursor: pointer;
}
.lw-tab:hover {
    color: var(--mud-palette-primary);
}
.lw-tab-on {
    color: var(--mud-palette-primary);
    border-bottom-color: var(--mud-palette-primary);
}
.lw-tab:focus-visible {
    outline: 2px solid var(--mud-palette-primary);
    outline-offset: -2px;
    border-radius: 4px 4px 0 0;
}
.lw-tab-count {
    border-radius: 10px;
    padding: 1px 8px;
    font-size: 0.6875rem;
    font-weight: 700;
    background: var(--mud-palette-action-default-hover);
    color: var(--mud-palette-text-primary);
}
.lw-tab-amber {
    background: #fdecc8;
    color: #8a5a00;
}
body:has(.mud-appbar-dense) .lw-tab {
    padding: 7px 12px 6px;
}

/* ---- My settings (#12927): the page's group list beside the group's cards; the list above them on a phone ---- */
.lw-set-layout {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    grid-template-rows: auto 1fr;
    grid-template-areas: "nav main" "org main";
    gap: 16px;
    align-items: start;
}
.lw-set-nav {
    grid-area: nav;
    padding: 8px 0;
}
.lw-set-org {
    grid-area: org;
}
.lw-set-main {
    grid-area: main;
    min-width: 0;
}
.lw-set-nav-head {
    margin: 8px 16px 4px;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--mud-palette-text-secondary);
}
.lw-set-nav a {
    display: block;
    padding: 8px 16px;
    border-left: 3px solid transparent;
    color: var(--mud-palette-text-primary);
    text-decoration: none;
}
.lw-set-nav a:hover {
    background: var(--mud-palette-action-default-hover);
}
.lw-set-nav a.lw-set-on {
    border-left-color: var(--lw-nav-accent-strong, var(--mud-palette-primary));
    background: color-mix(in srgb, var(--lw-nav-accent, var(--mud-palette-primary)) var(--lw-nav-tint, 10%), transparent);
}
.lw-set-nav a b {
    display: block;
    font-weight: 600;
    font-size: 0.875rem;
}
.lw-set-nav a span {
    display: block;
    font-size: 0.75rem;
    color: var(--mud-palette-text-secondary);
}
.lw-set-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 0;
    border-bottom: 1px solid var(--mud-palette-lines-default);
}
.lw-set-row:last-child {
    border-bottom: 0;
}
.lw-set-row-text {
    flex: 1 1 auto;
    min-width: 0;
}
.lw-set-row-text b {
    display: block;
    font-weight: 600;
}
.lw-set-row-text span {
    display: block;
    font-size: 0.8125rem;
    color: var(--mud-palette-text-secondary);
}
.lw-set-row-control {
    flex: 0 0 auto;
}
.lw-set-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    padding-top: 12px;
    font-size: 0.8125rem;
    color: var(--mud-palette-text-secondary);
}

/* Theme as three picture choices. */
.lw-set-themes {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}
.lw-set-theme {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 8px;
    border: 2px solid var(--mud-palette-lines-default);
    border-radius: var(--lw-radius-box);
    background: transparent;
    color: var(--mud-palette-text-primary);
    font: inherit;
    font-size: 0.8125rem;
    cursor: pointer;
}
.lw-set-theme[aria-pressed="true"] {
    border-color: var(--mud-palette-primary);
}
.lw-set-theme-pic {
    display: grid;
    grid-template-columns: 22px 1fr;
    grid-template-rows: 10px 1fr;
    width: 104px;
    height: 64px;
    border-radius: 3px;
    overflow: hidden;
    border: 1px solid rgba(127, 127, 127, 0.35);
}
.lw-set-theme-pic i { display: block; }
.lw-set-theme-pic i:nth-child(1) { grid-column: 1 / 3; }
.lw-set-pic-light i:nth-child(1) { background: #ffffff; border-bottom: 1px solid #e3e8f0; }
.lw-set-pic-light i:nth-child(2) { background: #ffffff; border-right: 1px solid #e3e8f0; }
.lw-set-pic-light i:nth-child(3) { background: #f4f6fb; }
.lw-set-pic-dark i:nth-child(1) { background: #1a2030; border-bottom: 1px solid #2f384b; }
.lw-set-pic-dark i:nth-child(2) { background: #161b25; border-right: 1px solid #2f384b; }
.lw-set-pic-dark i:nth-child(3) { background: #11151d; }
.lw-set-pic-system i:nth-child(1) { background: linear-gradient(90deg, #ffffff 50%, #1a2030 50%); }
.lw-set-pic-system i:nth-child(2) { background: #ffffff; }
.lw-set-pic-system i:nth-child(3) { background: linear-gradient(90deg, #f4f6fb 40%, #11151d 40%); }

/* My menu: a switch per link under the menu's headings. */
.lw-set-menu-group {
    margin-top: 8px;
}
.lw-set-menu-group > div:first-child {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--mud-palette-text-secondary);
}

/* The Client at a glance tile editor: the library in groups beside the chosen tiles in order. */
.lw-set-tiles {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 16px;
    margin-top: 12px;
}
.lw-set-tile-group {
    margin-bottom: 10px;
}
.lw-set-tile-group > div:first-child {
    font-weight: 600;
    font-size: 0.8125rem;
    margin-bottom: 2px;
}
.lw-set-tile-pick {
    display: flex;
    align-items: center;
    gap: 6px;
}
.lw-set-tile-pick small {
    color: var(--mud-palette-text-secondary);
}
.lw-set-chosen {
    list-style: none;
    margin: 0;
    padding: 0;
}
.lw-set-chosen li {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 0;
    border-bottom: 1px solid var(--mud-palette-lines-default);
}
.lw-set-chosen li > span:first-child {
    width: 22px;
    color: var(--mud-palette-text-secondary);
    font-variant-numeric: tabular-nums;
}
.lw-set-chosen li > span:nth-child(2) {
    flex: 1 1 auto;
    min-width: 0;
}

/* Where you're signed in: the This device chip. */
.lw-set-this {
    margin-left: 6px;
}

@media (max-width: 959.98px) {
    .lw-set-layout {
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: auto;
        grid-template-areas: "nav" "main" "org";
    }
    /* The groups as a strip that scrolls sideways; their hints only on wide screens. */
    .lw-set-nav:not(.lw-set-org) nav {
        display: flex;
        overflow-x: auto;
    }
    .lw-set-nav:not(.lw-set-org) nav a {
        flex: 0 0 auto;
        border-left: 0;
        border-bottom: 3px solid transparent;
        white-space: nowrap;
    }
    .lw-set-nav:not(.lw-set-org) nav a.lw-set-on {
        border-bottom-color: var(--lw-nav-accent-strong, var(--mud-palette-primary));
    }
    .lw-set-nav:not(.lw-set-org) nav a span {
        display: none;
    }
}

@media (max-width: 599.98px) {
    .lw-set-row {
        flex-direction: column;
        gap: 8px;
    }
    .lw-set-tiles {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* Home › Customize (#12929): the hidden-cards note under the tiles. */
.lw-home-hidden {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: -12px 0 16px;
    font-size: 0.8125rem;
    color: var(--mud-palette-text-secondary);
}

/* The chips under the client's name (ClientHeaderChips; the prototype's header, Fatih, Nov 20, 2026). */
.lw-cf-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 6px;
    min-width: 0;
}

/* ---- My settings, 12b (#12931-#12934) ---- */

/* Notifications: the event with its hint, then the bell and email ticks. */
.lw-set-notif th,
.lw-set-notif td {
    vertical-align: middle;
}
.lw-set-notif .lw-set-tick {
    width: 110px;
    text-align: center;
}
.lw-set-notif .lw-set-tick .mud-checkbox {
    justify-content: center;
}

/* Messages: the email preview. */
.lw-set-preview-mail {
    margin-top: 4px;
    padding: 12px 14px;
    border: var(--lw-border);
    border-radius: var(--lw-radius-box);
    background: var(--mud-palette-background-gray);
    font-size: 0.875rem;
}
.lw-set-preview-mail p {
    margin: 0 0 10px;
}
.lw-set-preview-sig {
    white-space: pre-line;
    color: var(--mud-palette-text-secondary);
}

/* Availability: "Busy" / "Away until Nov-14" beside the name in the top bar. */
.lw-appbar-status {
    display: inline-flex;
    align-items: center;
    margin-right: 8px;
    padding: 1px 10px;
    border-radius: 999px;
    background: var(--mud-palette-warning);
    color: var(--mud-palette-warning-text);
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 20px;
    white-space: nowrap;
    text-decoration: none;
}
.lw-appbar-status-short {
    display: none;
}
.lw-chip-away {
    margin-left: 6px;
}

/* The client's Contact card: whether it's within business hours where the client lives (#12932). */
.lw-cf-hours {
    margin: 0 0 10px;
    padding: 6px 10px;
    border-radius: var(--lw-radius);
    font-size: 0.8125rem;
}
.lw-cf-hours-in {
    background: color-mix(in srgb, var(--mud-palette-success) 12%, transparent);
    color: var(--mud-palette-success);
}
.lw-cf-hours-out {
    background: color-mix(in srgb, var(--mud-palette-warning) 14%, transparent);
    color: var(--mud-palette-warning);
}

@media (max-width: 599.98px) {
    .lw-set-notif .lw-set-tick {
        width: 64px;
    }
    .lw-appbar-status {
        margin-right: 4px;
        padding: 1px 8px;
    }
}

/* Below 960 px (no name in the bar) the chip says only "Busy" or "Away"; screen readers still get the whole status. */
@media (max-width: 959.98px) {
    .lw-appbar-status {
        position: relative;
    }
    .lw-appbar-status-full {
        position: absolute;
        width: 1px;
        height: 1px;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
    }
    .lw-appbar-status-short {
        display: inline;
    }
}

/* The full TransUnion report and the bank statement kept with a decision (#12821). */
.lw-tu-report section {
    margin-bottom: 16px;
}
.lw-tu-h {
    margin: 0 0 6px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--mud-palette-primary);
}
.lw-tu-scroll {
    overflow-x: auto;
}
.lw-tu-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8125rem;
}
.lw-tu-table th,
.lw-tu-table td {
    padding: 4px 8px;
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid var(--mud-palette-lines-default);
}
.lw-tu-table th {
    font-weight: 600;
    color: var(--mud-palette-text-secondary);
    white-space: nowrap;
}
.lw-tu-table .lw-tu-num {
    text-align: right;
    white-space: nowrap;
}

/* A dialog whose footer has several buttons (the decision reports: Back to summary, Download PDF, Close): on a phone the
   buttons move to a second row instead of squeezing their labels onto two lines. */
.lw-dialog-actions-wrap {
    flex-wrap: wrap;
    row-gap: 4px;
}

.lw-dialog-actions-wrap .mud-button-root {
    white-space: nowrap;
}

/* ---- Settings, Organization groups (part 13, prototype v85) ---- */

/* Rows per page above and under a list (#12971): one line, wrapping on a phone. */
.lw-pager {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 6px 10px;
    margin: 4px 0;
    font-size: 0.8125rem;
}

.lw-pager-label,
.lw-pager-text {
    color: var(--mud-palette-text-secondary);
    white-space: nowrap;
}

.lw-pager .lw-pager-size {
    width: 84px;
    flex: 0 0 auto;
}

.lw-pager-nav {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    white-space: nowrap;
}

.lw-pager-nav .lw-pager-text {
    margin-right: 6px;
}

.lw-org-hint {
    display: block;
    font-size: 0.75rem;
    color: var(--mud-palette-text-secondary);
    overflow-wrap: anywhere;
}

/* Users (#12939): every column without sideways scrolling at 1440 px. The Role and Companies boxes are 170 and 190 px (v85:
   150 and 132), so a role or a company's full name ("Cashco Financial") reads whole; the name column takes what is left. */
/* The search bars on Settings › People & access (#12939 Users, #12938 Roles and permissions; prototype v223 board 8d): search,
   filters, the count and Clear in one row that wraps on a phone. */
.lw-org-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
    margin-bottom: 12px;
}

.lw-org-filters .lw-org-filter-search {
    flex: 2 1 260px;
}

.lw-org-filters .lw-org-filter-select {
    flex: 0 1 190px;
    min-width: 150px;
}

.lw-org-filters .mud-input-control {
    margin-top: 0;
}

.lw-org-filter-count {
    white-space: nowrap;
    font-size: 0.8125rem;
    color: var(--mud-palette-text-secondary);
}

.lw-org-filter-none {
    margin: 0 0 12px;
    font-size: 0.875rem;
    color: var(--mud-palette-text-secondary);
}

@media (max-width: 599.98px) {
    .lw-org-filters .lw-org-filter-select {
        flex: 1 1 140px;
    }
}

.lw-org-users .mud-table-root {
    width: 100%;
}

.lw-org-users.mud-table .mud-table-row .mud-table-cell {
    padding: 6px 8px;
}

/* Column widths only while it is a table: up to 1280 px (the table's Breakpoint.Md; MudBlazor's card rule is max-width
   1280px, 1280 included) each row is a card and the boxes take its width. At 600 px they squeezed the card's Role and
   Companies pickers to "Ca..." (Nov 19); beside the menu and the settings groups the table fits from about 1300 px. */
@media (min-width: 1280.02px) {
    .lw-org-users .lw-org-role {
        width: 170px;
    }

    .lw-org-users .lw-org-companies {
        width: 190px;
    }

    .lw-org-users .lw-org-signed-in {
        min-width: 96px;
    }
}

.lw-org-users .mud-table-head .mud-table-cell {
    line-height: 1.25;
}

.lw-org-user b {
    display: block;
    overflow-wrap: anywhere;
}

.lw-org-user span {
    display: block;
    /* Breaks after the @ (UsersCard.EmailText); a long part still wraps rather than widen the table. */
    overflow-wrap: break-word;
    font-size: 0.75rem;
    color: var(--mud-palette-text-secondary);
}

.lw-org-select {
    min-width: 0;
    font-size: 0.875rem;
}

.lw-org-select .mud-input,
.lw-org-select .mud-select-input {
    font-size: 0.875rem;
}

/* The Permissions dialog's list. */
.lw-org-perm-list {
    max-height: 52vh;
    overflow-y: auto;
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: var(--lw-radius, 8px);
    padding: 4px 12px;
}

.lw-org-perm-head,
.lw-org-more-head {
    margin: 12px 0 2px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--mud-palette-text-secondary);
}

.lw-org-perm {
    padding: 2px 0 6px;
}

.lw-org-perm .lw-org-hint {
    margin-left: 34px;
    margin-top: -6px;
}

.lw-org-date {
    max-width: 260px;
}

/* Roles and permissions (#12938): the seven role columns fit at 1440 px (names wrap); narrower screens scroll the table. */
.lw-org-perms-wrap {
    overflow-x: auto;
}

.lw-org-perms {
    width: 100%;
    /* 80 px a role after the permission names' 220 px: the seven standard roles fit the 784 px a 1440 px screen leaves; added
       roles make the table wider, and it scrolls. */
    min-width: calc(220px + var(--lw-roles, 7) * 80px);
    border-collapse: collapse;
    table-layout: fixed;
    font-size: 0.8125rem;
}

.lw-org-perms th,
.lw-org-perms td {
    border-bottom: 1px solid var(--mud-palette-lines-default);
    padding: 6px 4px;
    vertical-align: middle;
}

.lw-org-perms thead th {
    text-align: center;
    font-weight: 600;
    font-size: 0.6875rem;
    padding: 6px 2px;
    /* Role names wrap between words; a long one ("Administrator") is hyphenated rather than cut anywhere. */
    overflow-wrap: break-word;
    hyphens: auto;
}

.lw-org-perms thead th span {
    display: block;
    font-weight: 400;
    font-size: 0.6875rem;
    color: var(--mud-palette-text-secondary);
}

.lw-org-perms .lw-org-perms-name {
    width: 220px;
    text-align: left;
}

.lw-org-perms td.lw-org-perms-name b {
    font-weight: 600;
}

.lw-org-perms-group td {
    background: var(--mud-palette-background-gray);
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--mud-palette-text-secondary);
}

.lw-org-perms-tick {
    text-align: center;
}

.lw-org-perms-tick .mud-checkbox {
    justify-content: center;
    margin: 0;
}

.lw-org-new {
    display: inline-block;
    margin-left: 6px;
    padding: 0 6px;
    border-radius: 10px;
    font-size: 0.6875rem;
    font-weight: 600;
    background: var(--mud-palette-warning-lighten, #fff3cd);
    color: var(--mud-palette-warning-darken, #7a5b00);
}

/* Override codes (#12945): every approver box one width, so the column lines up whatever the choice: the prototype's 320 px on
   a wide screen, 220 px below 1280 px so the override's name keeps room. */
.lw-org-approver {
    flex: 0 0 220px;
    width: 220px;
}

@media (min-width: 1280px) {
    .lw-org-approver {
        flex-basis: 320px;
        width: 320px;
    }
}

@media (min-width: 600px) {
    .lw-set-row.lw-org-approver-row {
        align-items: center;
    }
}

/* Settings history (#12953). */
.lw-org-filters {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 12px;
    margin-bottom: 8px;
}

.lw-org-filters .lw-org-search {
    flex: 1 1 260px;
    max-width: 360px;
}

.lw-org-filters .lw-org-area {
    flex: 0 1 220px;
}

/* Words wrap whole ("People & access", a person's name); only a long value with no spaces breaks. When stays on one line,
   and Setting takes the room the others leave. */
.lw-org-history.mud-table .mud-table-row .mud-table-cell {
    padding: 6px 8px;
    overflow-wrap: break-word;
}

@media (min-width: 600px) {
    .lw-org-history .lw-org-history-when {
        width: 150px;
        white-space: nowrap;
    }

    .lw-org-history .lw-org-history-who,
    .lw-org-history .lw-org-history-area {
        width: 120px;
    }

    .lw-org-history .lw-org-history-value {
        width: 14%;
    }

    .lw-org-history .lw-org-history-setting {
        min-width: 180px;
    }
}

/* A group's pages (until its own cards come). */
.lw-org-pages {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 8px;
}

.lw-org-pages a {
    display: block;
    padding: 10px 12px;
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: var(--lw-radius, 8px);
    color: inherit;
    text-decoration: none;
}

.lw-org-pages a:hover {
    border-color: var(--mud-palette-primary);
}

.lw-org-pages b,
.lw-org-pages span {
    display: block;
}

.lw-org-pages span {
    font-size: 0.75rem;
    color: var(--mud-palette-text-secondary);
}

@media (max-width: 599.98px) {
    .lw-org-approver {
        flex: 1 1 100%;
        min-width: 0;
        width: 100%;
    }

    .lw-pager {
        justify-content: flex-start;
    }
}

/* The top bar's company menu (#12943, prototype v85): the company's name with a tick on the current one, or "You work in
   ... only." for someone in one company. */
.lw-co-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-width: 180px;
}
.lw-co-one {
    max-width: 260px;
}

/* Settings › Company (part 13b, #12948, #12944): the options card's rows keep their buttons on the right; the dialogs' section
   heads, the read-only brand and the business hours rows (day, switch, state, opens, to, closes). */
.lw-org-option .lw-set-row-text span {
    overflow-wrap: break-word;
}

.lw-org-form-head {
    margin: 16px 0 8px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--mud-palette-text-secondary);
}

.lw-org-form-head:first-child {
    margin-top: 0;
}

.lw-org-brand {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 4px;
}

.lw-org-swatch {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    border: 1px solid var(--mud-palette-lines-default);
}

.lw-org-brand-logo {
    height: 28px;
    width: auto;
}

.lw-org-hours {
    display: grid;
    gap: 4px;
}

.lw-org-hours-row {
    display: grid;
    grid-template-columns: 40px auto 56px minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: 8px;
}

.lw-org-hours-state {
    font-size: 0.8125rem;
    color: var(--mud-palette-text-secondary);
}

@media (max-width: 599.98px) {
    .lw-org-hours-row {
        grid-template-columns: 40px auto minmax(0, 1fr);
        row-gap: 0;
        padding-bottom: 8px;
        border-bottom: 1px solid var(--mud-palette-lines-default);
    }

    /* Opens, then closes, each the row's width (the time boxes don't fit two across). */
    .lw-org-hours-row .lw-org-hours-time {
        grid-column: span 3;
    }

    .lw-org-hours-row > span.mud-text-secondary {
        display: none;
    }
}

/* Settings › Applications & consoles (part 13b, #12950): a number and its unit side by side, the Collections rule (v85: 280
   px; 340 so its longer choice reads whole), the save bar, and the STP pool's list. */
.lw-org-number {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.lw-org-number .mud-input-control {
    width: 84px;
    flex: 0 0 84px;
}

.lw-org-number > span {
    color: var(--mud-palette-text-secondary);
    font-size: 0.8125rem;
    white-space: nowrap;
}

.lw-org-rule {
    flex: 0 0 384px;
    width: 384px;
    max-width: 100%;
}
/* Part 27 test pass: where the settings column is narrow (about 1000 px wide windows), the label kept one word a line beside the
   384 px choice, which ran past the card. The row wraps instead: the label keeps at least 180 px, the choice goes under it. */
.lw-set-row:has(> .lw-org-rule) {
    flex-wrap: wrap;
}
.lw-set-row:has(> .lw-org-rule) > .lw-set-row-text {
    flex: 1 1 180px;
}

/* Settings › Product rules, the profile editor (#12949, part 13b; prototype v85): a heading per section, the late-EFT
   boxes in a row, and the pending e-sign times. */
.lw-org-section-head {
    margin: 20px 0 4px;
    padding-top: 12px;
    border-top: 1px solid var(--mud-palette-lines-default);
    font-weight: 600;
    font-size: 0.9375rem;
}
.lw-org-section-head:first-of-type {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}
.lw-org-checks {
    display: flex;
    flex-wrap: wrap;
    gap: 0 12px;
    justify-content: flex-end;
}
.lw-org-time {
    flex: 0 0 160px;
    width: 160px;
}
.lw-org-profiles th,
.lw-org-profiles .lw-org-nowrap {
    white-space: nowrap;
}
/* #12564: a profile's scheduled change under its version ("Scheduled from Jan 01, 2027: NSF fee: $20.00 → $25.00"), amber as in
   prototype v207; the versions and Scheduled changes tables' headings stay on one line. */
.lw-org-scheduled {
    color: var(--mud-palette-warning-darken);
    font-size: 12px;
    margin-top: 2px;
}
/* The scheduled line sits under its profile's row: no line between them. */
.lw-org-profiles .mud-table-row:has(+ .lw-org-scheduled-row) .mud-table-cell {
    border-bottom: none;
}
.lw-org-scheduled-row td {
    padding: 0 8px 10px 16px;
}
/* On a phone each cell's value sits on the right: the version's three lines too. */
@media (max-width: 599.98px) {
    .lw-org-profiles td[data-label="Version"] > div {
        text-align: right;
    }
}
.lw-org-scheduled-table th,
.lw-org-versions .lw-org-nowrap,
.lw-org-scheduled-table .lw-org-nowrap {
    white-space: nowrap;
}
/* v85's eight columns fit the settings column at desktop width: tighter cells; the profile and its date wrap. */
@media (min-width: 600px) {
    .lw-org-profiles.mud-table-dense .mud-table-row .mud-table-cell {
        padding-left: 8px;
        padding-right: 8px;
    }
}

.lw-org-savebar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.lw-org-pool {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}

@media (max-width: 599.98px) {
    .lw-org-number {
        justify-content: flex-start;
    }

    .lw-org-rule {
        flex: 1 1 100%;
        width: 100%;
    }

    .lw-org-checks {
        justify-content: flex-start;
    }
}

/* Settings › Abeyance agencies (#12969): nine columns; the headings wrap (the product names under Fair share and New interest
   rate) so the table fits the settings column at desktop width. */
.lw-org-agencies th {
    white-space: normal;
}

/* Settings › Payments setup (#12951): a switch and its Edit schedule button side by side; the funding days start at the left. */
.lw-org-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px 8px;
    justify-content: flex-end;
}
.lw-org-checks.lw-org-days {
    justify-content: flex-start;
}

/* Auto Funding (#12910): the strip also holds the AcceptPay Global wallet and the Auto Funding switch when the person has them
   (one column on a phone, as before). */
@media (min-width: 600px) {
    .lw-fund-strip {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        max-width: 900px;
    }
}
.lw-fund-tile.lw-fund-wallet {
    flex-direction: column;
    align-items: flex-start;
}
.lw-fund-tile em {
    font-style: normal;
    font-size: 0.875rem;
    color: var(--mud-palette-text-secondary);
}
.lw-fund-switch {
    display: flex;
    align-items: center;
}

/* Settings › Communications & system › Message templates (#12952, v85): the list on the left, the editor on the right; one
   column on a phone. */
.lw-org-templates {
    display: grid;
    grid-template-columns: minmax(200px, 260px) minmax(0, 1fr);
    gap: 16px;
    align-items: start;
}
@media (max-width: 899.98px) {
    .lw-org-templates {
        grid-template-columns: minmax(0, 1fr);
    }
}
.lw-org-template {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    width: 100%;
    padding: 8px 10px;
    border: 0;
    border-radius: var(--mud-default-borderradius);
    background: transparent;
    color: inherit;
    text-align: left;
    cursor: pointer;
    font: inherit;
}
.lw-org-template span {
    font-size: 0.8125rem;
    color: var(--mud-palette-text-secondary);
}
.lw-org-template:hover {
    background: var(--mud-palette-action-default-hover);
}
.lw-org-template.lw-on {
    background: color-mix(in srgb, var(--mud-palette-primary) 12%, transparent);
}
.lw-org-template-facts {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 24px;
    margin-bottom: 12px;
    font-size: 0.875rem;
}
.lw-org-template-facts b {
    margin-right: 6px;
}
.lw-org-merge {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    font-size: 0.875rem;
}
.lw-org-preview-email > div,
.lw-org-preview-sms {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    font-size: 0.875rem;
}
.lw-org-preview-email {
    padding: 12px;
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: var(--mud-default-borderradius);
}
.lw-org-preview-email b {
    display: block;
    margin-bottom: 12px;
}
.lw-org-preview-sms {
    max-width: 320px;
    padding: 10px 12px;
    border-radius: 14px 14px 14px 4px;
    background: color-mix(in srgb, var(--mud-palette-primary) 10%, var(--mud-palette-surface));
}

/* Rows per page over and under a grid (#12971): a small inset so it doesn't sit on the card's edge. */
.lw-pager.lw-pager-grid {
    padding: 0 12px;
}

/* Client search (#12814, prototype v85): the fields in one wrapping row (CID, Loan ID, phone and SIN narrower), the buttons at
   the end; results fit a desktop screen without sideways scrolling (the email wraps). */
.lw-cs-fields {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 12px 16px;
}
.lw-cs-fields > .mud-input-control {
    flex: 1 1 160px;
    margin-top: 0;
}
.lw-cs-fields > .mud-input-control.lw-cs-narrow {
    flex: 0 1 130px;
}
.lw-cs-buttons {
    display: flex;
    gap: 8px;
    padding-bottom: 2px;
}
.lw-cs-loans {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
}
.lw-cs-email {
    overflow-wrap: break-word;
}
.lw-cs-grid th {
    white-space: nowrap;
}
.lw-cs-none {
    text-align: center;
}
.lw-strong {
    font-weight: 600;
}
.lw-back-link {
    display: inline-block;
    margin-bottom: 4px;
}
@media (max-width: 599.98px) {
    .lw-cs-fields > .mud-input-control,
    .lw-cs-fields > .mud-input-control.lw-cs-narrow {
        flex: 1 1 100%;
    }
}

/* The prototype's form pieces (Fatih, Nov 20, 2026), for any form page:
   - lw-grid4: fields side by side, as many 210 px+ columns as fit (the prototype's .grid4), labels above their boxes;
   - lw-card-body: a card's padding round a form;
   - lw-errs: the red box listing what can't be saved yet, in two columns (one on a phone);
   - lw-match: the amber card for a possible match, its text and buttons on one line where they fit;
   - lw-hint: the grey 12 px notes under a section; lw-req: the red * in a sentence. */
.lw-grid4 {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 4px 16px;
    align-items: start;
}

.lw-card-body {
    padding: 16px 18px;
}

.lw-errs {
    padding: 14px 18px;
    border: 1px solid #f3c7c7;
    border-radius: 4px;
    background: #fdf3f3;
    color: #8e1f1f;
    font-size: 13px;
}

/* #13014: the Bank account card's "Same account as" names, each a link to the list. */
.lw-shared-names {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 2px 12px;
}

/* A box with what to do next (#13141 Decision too old: Run the decision again, and where the days are set). */
.lw-errs-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 14px;
    margin-top: 10px;
}

.lw-errs ul {
    margin: 6px 0 0;
    padding-left: 20px;
    columns: 2;
    column-gap: 28px;
}

.lw-errs li {
    margin: 2px 0;
    break-inside: avoid;
}

@media (max-width: 600px) {
    .lw-errs ul {
        columns: 1;
    }
}

.lw-match {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 16px;
    padding: 16px 18px;
    border: 1px solid #f0dcc0;
    border-radius: 4px;
    background: #fffaf2;
    color: var(--mud-palette-text-primary);
    font-size: 0.875rem;
}

.lw-match-text {
    flex: 1 1 320px;
}

.lw-match-text a {
    color: var(--mud-palette-primary);
}

.lw-theme-dark .lw-errs {
    border-color: #6b2b2b;
    background: #2a1a1d;
    color: #f3b4b4;
}

.lw-theme-dark .lw-match {
    border-color: #5a4630;
    background: #261f17;
}

.lw-hint {
    margin: 0;
    font-size: 12px;
    line-height: 1.5;
    color: var(--mud-palette-text-secondary);
}

.lw-req {
    color: var(--mud-palette-error);
}

.lw-nc-expired {
    color: var(--mud-palette-warning-darken);
}

/* New client's "Client file created" card (A152, the prototype's .done card): a green tick and the CID, the saved details
   two pairs to a row (one on a phone), the next steps, then Create another client / Back to client search. */
.lw-nc-done {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 20px 22px;
}

.lw-nc-donehead {
    display: flex;
    gap: 14px;
    align-items: center;
}

.lw-nc-donehead h2 {
    margin: 0;
    font-family: var(--lw-font-display);
    font-size: 1.25rem;
    font-weight: 700;
}

/* The CID opens the new file. */
.lw-nc-donehead h2 a {
    color: var(--mud-palette-primary);
    text-decoration: none;
}

.lw-nc-donehead h2 a:hover {
    text-decoration: underline;
}

.lw-nc-tick {
    flex: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e8f3e9;
    color: #2e7d32;
    font-size: 1.125rem;
    font-weight: 700;
}

.lw-kv4 {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr) 150px minmax(0, 1fr);
    gap: 6px 12px;
    margin: 0;
    font-size: 0.8125rem;
}

.lw-kv4 dt {
    color: var(--mud-palette-text-secondary);
}

.lw-kv4 dd {
    margin: 0;
    font-weight: 600;
    overflow-wrap: anywhere;
}

@media (max-width: 759.98px) {
    .lw-kv4 {
        grid-template-columns: 112px minmax(0, 1fr);
    }

    .lw-nc-done {
        padding: 16px;
    }
}

.lw-nc-steps-title {
    margin: 0 0 8px;
    font-size: 0.875rem;
    font-weight: 700;
}

.lw-nc-steps {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 0;
    padding-left: 20px;
    font-size: 0.8125rem;
}

.lw-nc-steps li > span {
    margin-right: 10px;
}

.mud-button-root.lw-nc-step-btn {
    margin-top: 6px;
    vertical-align: middle;
}

.lw-nc-okm {
    margin-top: 10px;
    padding: 8px 12px;
    border-radius: 4px;
    background: #e8f3e9;
    color: #1e5e22;
    font-size: 0.8125rem;
}

.lw-nc-done-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding-top: 14px;
    border-top: 1px solid var(--mud-palette-lines-default);
}

.lw-theme-dark .lw-nc-tick,
.lw-theme-dark .lw-nc-okm {
    background: rgba(108, 192, 112, 0.16);
    color: #8fd793;
}

/* Merge files (#12914, prototype v85 board 6c). The steps: each number (or a check when done) beside a label every role can
   read; the current step outlined in the primary colour. */
.lw-mg-steps {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    list-style: none;
    margin: 0 0 16px;
    padding: 0;
}
.lw-mg-steps li {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 16px;
    background: var(--mud-palette-surface);
    border: 1px solid var(--mud-palette-lines-default);
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--mud-palette-text-primary);
}
.lw-mg-step-n {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
    font-size: 0.6875rem;
    font-weight: 700;
    background: var(--mud-palette-background-gray);
    color: var(--mud-palette-text-primary);
}
.lw-mg-steps li.lw-mg-step-on {
    border-color: var(--mud-palette-primary);
    color: var(--mud-palette-primary-darken);
}
.lw-mg-steps li.lw-mg-step-on .lw-mg-step-n {
    background: var(--mud-palette-primary);
    color: var(--mud-palette-primary-text);
}
.lw-mg-steps li.lw-mg-step-done .lw-mg-step-n {
    background: var(--mud-palette-success);
    color: var(--mud-palette-success-text);
}
.lw-mg-find-actions,
.lw-mg-compare-bar,
.lw-mg-merge-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 8px 12px;
    margin-top: 12px;
}
.lw-mg-compare-bar {
    margin: 0;
    padding: 12px 16px;
    border-top: 1px solid var(--mud-palette-lines-default);
}
.lw-mg-results tr.lw-mg-picked td {
    background: color-mix(in srgb, var(--mud-palette-primary) 8%, transparent);
}
.lw-mg-cmp-wrap {
    overflow-x: auto;
}
.lw-mg-cmp {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}
.lw-mg-cmp th,
.lw-mg-cmp td {
    padding: 8px 16px;
    border-bottom: 1px solid var(--mud-palette-lines-default);
    text-align: left;
    vertical-align: top;
}
.lw-mg-cmp th:first-child,
.lw-mg-cmp-label {
    width: 170px;
    font-weight: 600;
    color: var(--mud-palette-text-secondary);
}
.lw-mg-keep {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    cursor: pointer;
}
/* The prototype's colours: the same in both = green text; different = the kept value a green pill, the other an amber one. */
.lw-mg-diff,
.lw-mg-kept {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 4px;
}
.lw-mg-same {
    color: #2e7d32;
    font-weight: 600;
}
.lw-mg-diff {
    background: #fdf1e0;
    color: #7a4800;
    font-weight: 600;
}
.lw-mg-kept {
    background: #e8f3e9;
    color: #1b5e20;
    font-weight: 700;
}
.lw-theme-dark .lw-mg-same {
    color: #6cc070;
}
.lw-theme-dark .lw-mg-diff {
    background: #3a2c15;
    color: #f2c27a;
}
.lw-theme-dark .lw-mg-kept {
    background: #1d3322;
    color: #8fd394;
}
.lw-mg-notes {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
/* Reason (wide) and the CID typed to confirm, side by side (the prototype's 2 + 1 columns). */
.lw-mg-reason {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    gap: 4px 16px;
}
@media (max-width: 720px) {
    .lw-mg-reason {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* The prototype's notes (any page): grey for information, red for a warning. */
.lw-note {
    padding: 10px 12px;
    border-radius: 4px;
    background: #f4f6fb;
    color: var(--mud-palette-text-primary);
    font-size: 13px;
    line-height: 1.5;
}
.lw-note.lw-note-warn {
    background: #fbe9e9;
    color: #8e1d1d;
}
.lw-theme-dark .lw-note {
    background: #1f2533;
}
.lw-theme-dark .lw-note.lw-note-warn {
    background: #2e1b1e;
    color: #f3b4b4;
}

/* ---- Collections console (part 16: #12959-#12962, prototype board 3c) ---- */
.lw-cc-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 14px;
}
.lw-cc-toolbar .mud-input-control {
    margin-top: 0;
}
.lw-cc-collector {
    flex: 0 0 190px;
}
.lw-cc-search {
    flex: 1 1 240px;
    max-width: 320px;
}
.lw-cc-view {
    flex: 0 0 230px;
}
.lw-cc-toolbar-end {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-left: auto;
}
.lw-cc-banner-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 6px 16px;
}
.lw-cc-banner-actions {
    display: inline-flex;
    gap: 4px;
}
.lw-cc-panel {
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: var(--lw-radius-box, 8px);
    padding: 12px 14px;
    background: color-mix(in srgb, var(--mud-palette-primary) 3%, var(--mud-palette-surface));
}
.lw-cc-panel-head {
    font-weight: 600;
    margin-bottom: 6px;
}
.lw-cc-checks {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 0 12px;
}
.lw-cc-panel-foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 6px 12px;
    margin-top: 8px;
    font-size: 0.8125rem;
}
.lw-cc-filters {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 10px 14px;
    align-items: start;
}
.lw-cc-eft {
    grid-column: 1 / -1;
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 6px;
    padding: 4px 10px 6px;
    display: flex;
    flex-wrap: wrap;
    gap: 0 14px;
}
.lw-cc-eft legend {
    font-size: 0.75rem;
    color: var(--mud-palette-text-secondary);
    padding: 0 4px;
}
.lw-cc-chips {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
}
.lw-cc-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 6px;
    padding: 6px 10px;
    border-radius: 8px;
    background: color-mix(in srgb, var(--mud-palette-primary) 10%, var(--mud-palette-surface));
}
.lw-cc-actions > strong {
    margin-right: 6px;
}
.lw-cc-actions-sep {
    width: 1px;
    align-self: stretch;
    margin: 2px 6px;
    background: var(--mud-palette-lines-default);
}
.lw-cc-dim {
    opacity: 0.45;
}
.lw-cc-actions-note {
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 0.8125rem;
    color: var(--mud-palette-text-secondary);
    background: color-mix(in srgb, var(--mud-palette-text-primary) 4%, var(--mud-palette-surface));
}
/* Over the Group SMS and email limit (#12962): orange, with Keep the first N. */
.lw-cc-actions-note.lw-over {
    color: var(--mud-palette-warning-darken);
    font-weight: 600;
    border-left: 4px solid var(--mud-palette-warning);
    background: color-mix(in srgb, var(--mud-palette-warning) 16%, var(--mud-palette-surface));
}
.lw-cc-keep {
    font-size: 0.8125rem;
    padding-top: 0;
    padding-bottom: 0;
}
.lw-cc-gmc {
    display: inline-flex;
    align-items: center;
    height: 26px;
    padding: 0 9px;
    border-radius: 13px;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--mud-palette-primary);
    background: color-mix(in srgb, var(--mud-palette-primary) 12%, var(--mud-palette-surface));
}
.lw-cc-gmc.lw-over {
    color: var(--mud-palette-warning-darken);
    background: color-mix(in srgb, var(--mud-palette-warning) 22%, var(--mud-palette-surface));
    box-shadow: inset 0 0 0 1px var(--mud-palette-warning);
}
.lw-cc-hint {
    font-size: 0.8125rem;
}
.lw-cc-pagerow {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 4px 12px;
}
.lw-cc-totals {
    font-size: 0.8125rem;
    color: var(--mud-palette-text-secondary);
}
.lw-cc-empty {
    color: var(--mud-palette-text-secondary);
}
/* Every column on one line, as wide as it needs; the grid scrolls sideways when the card is narrower, and its header stays. */
.lw-cc-scroll {
    overflow: auto;
    max-height: 72vh;
    border-top: 1px solid var(--mud-palette-lines-default);
    border-bottom: 1px solid var(--mud-palette-lines-default);
}
.lw-cc-grid {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.8125rem;
}
.lw-cc-grid th,
.lw-cc-grid td {
    white-space: nowrap;
    padding: 6px 10px;
    text-align: left;
    border-bottom: 1px solid var(--mud-palette-lines-default);
}
.lw-cc-grid th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: var(--mud-palette-surface);
    font-weight: 600;
}
.lw-cc-grid .lw-num {
    text-align: right;
}
.lw-cc-grid th.lw-num .lw-cc-sort {
    text-align: right;
}
.lw-cc-grid td.lw-cc-check,
.lw-cc-grid th.lw-cc-check {
    width: 34px;
    padding: 0 0 0 6px;
}
.lw-cc-grid td.lw-cc-check .mud-checkbox {
    pointer-events: none;
}
.lw-cc-sort {
    border: 0;
    background: none;
    padding: 0;
    font: inherit;
    font-weight: 600;
    color: inherit;
    cursor: pointer;
    white-space: nowrap;
}
.lw-cc-sort:focus-visible {
    outline: 2px solid var(--mud-palette-primary);
    outline-offset: 2px;
}
.lw-cc-grid tbody tr.lw-cc-newinfo td {
    background: #fdf0f0;
}
.lw-cc-grid tbody tr.lw-cc-selected td {
    background: #e6f2f7;
}

/* ---- File assignment (#13150, prototype boards 4 and 4b) ---- */
.lw-fa-tabs {
    display: flex;
    gap: 4px;
    border-bottom: 1px solid var(--mud-palette-lines-default);
    margin-bottom: 16px;
    overflow-x: auto;
}
.lw-fa-tab {
    background: none;
    border: 0;
    border-bottom: 2px solid transparent;
    padding: 10px 14px;
    font: inherit;
    font-weight: 600;
    color: var(--mud-palette-text-secondary);
    cursor: pointer;
    white-space: nowrap;
}
.lw-fa-tab.is-on {
    color: var(--mud-palette-primary);
    border-bottom-color: var(--mud-palette-primary);
}
.lw-fa-count {
    display: inline-block;
    min-width: 22px;
    margin-left: 6px;
    padding: 0 7px;
    border-radius: 999px;
    background: var(--mud-palette-background-gray);
    font-size: 12px;
    line-height: 20px;
    text-align: center;
}
.lw-fa-layout {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    flex-wrap: wrap;
}
.lw-fa-layout > .lw-fa-main {
    flex: 999 1 600px;
    min-width: 0;
}
.lw-fa-layout > .lw-fa-team {
    flex: 1 1 320px;
    max-width: 420px;
}
.lw-fa-toolbar {
    display: flex;
    gap: 10px;
    padding: 12px 16px;
    flex-wrap: wrap;
    align-items: center;
    border-bottom: 1px solid var(--mud-palette-lines-default);
}
.lw-fa-toolbar .lw-fa-assignto {
    flex: 0 1 260px;
    min-width: 200px;
}
.lw-fa-toolbar .lw-fa-group {
    flex: 0 1 180px;
    min-width: 160px;
}
.lw-fa-spacer {
    flex: 1 1 auto;
}
.lw-fa-noteam {
    font-size: 13px;
    color: var(--mud-palette-text-secondary);
}
.lw-fa-grid .lw-fa-client {
    font-weight: 600;
}
.lw-fa-grid tbody tr.is-selected td {
    background: #e6f2f7;
}
.lw-fa-grid tbody tr {
    cursor: pointer;
}
.lw-fa-center {
    text-align: center;
}
.lw-fa-note {
    display: block;
    font-size: 12px;
    color: var(--mud-palette-text-secondary);
}
.lw-fa-empty {
    margin: 0;
    padding: 18px 16px;
    font-size: 13px;
    color: var(--mud-palette-text-secondary);
}
.lw-fa-rule {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    padding: 12px 16px;
    border-top: 1px solid var(--mud-palette-lines-default);
    font-size: 13px;
}
.lw-fa-rule-label {
    color: var(--mud-palette-text-secondary);
}
.lw-fa-rule .lw-fa-rule-select {
    flex: 0 1 300px;
    min-width: 240px;
}
.lw-fa-rule-saved {
    color: var(--mud-palette-success-darken);
}
.lw-fa-rule-hint {
    flex: 1 0 100%;
    font-size: 12px;
    color: var(--mud-palette-text-secondary);
}
.lw-fa-person {
    display: flex;
    gap: 12px;
    padding: 12px 16px;
    border-top: 1px solid var(--mud-palette-lines-default);
}
.lw-fa-avatar {
    flex: 0 0 34px;
    height: 34px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 12px;
    font-weight: 700;
    background: var(--mud-palette-primary-lighten);
    color: var(--mud-palette-primary-text);
}
.lw-fa-person-body {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.lw-fa-person-head {
    display: flex;
    justify-content: space-between;
    gap: 8px;
}
.lw-fa-files {
    font-size: 12px;
    color: var(--mud-palette-text-secondary);
    white-space: nowrap;
}
.lw-fa-chips {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.lw-fa-bar {
    height: 6px;
    border-radius: 3px;
    background: var(--mud-palette-background-gray);
    overflow: hidden;
}
.lw-fa-bar > span {
    display: block;
    height: 100%;
    background: var(--mud-palette-primary);
}
.lw-fa-foot {
    margin: 0;
    padding: 12px 16px;
    border-top: 1px solid var(--mud-palette-lines-default);
    font-size: 12px;
    color: var(--mud-palette-text-secondary);
}
.lw-theme-dark .lw-fa-grid tbody tr.is-selected td { background: rgba(33, 150, 243, 0.16); }
@media (max-width: 600px) {
    .lw-fa-toolbar .lw-fa-assignto,
    .lw-fa-toolbar .lw-fa-group,
    .lw-fa-rule .lw-fa-rule-select {
        flex: 1 1 100%;
        min-width: 0;
    }
    .lw-fa-spacer {
        display: none;
    }
    .lw-fa-layout > .lw-fa-team {
        max-width: none;
    }
}
.lw-cc-new {
    display: inline-block;
    padding: 1px 8px;
    border-radius: 999px;
    font-size: 0.6875rem;
    font-weight: 700;
    color: #fff;
    background: #c62828;
}
.lw-cc-name {
    font-weight: 700;
    color: var(--mud-palette-primary);
    text-decoration: none;
}
.lw-cc-name:hover {
    text-decoration: underline;
}
.lw-cc-today {
    font-weight: 700;
    color: #9a5b00;
}
.lw-cc-overdue {
    font-weight: 700;
    color: #c62828;
}
.lw-cc-comment {
    max-width: 30ch;
    overflow: hidden;
    text-overflow: ellipsis;
}
.lw-cc-eftchip {
    display: inline-block;
    padding: 1px 8px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
}
.lw-cc-tone-grey { background: #eef1f6; color: #243248; }
.lw-cc-tone-blue { background: #e6f2f7; color: #004077; }
.lw-cc-tone-purple { background: #efe7fb; color: #5b2a9e; }
.lw-cc-tone-green { background: #e8f3e9; color: #2e7d32; }
.lw-cc-tone-red { background: #fbe9e9; color: #c62828; }
.lw-cc-tone-amber { background: #fdf1e0; color: #9a5b00; }
.lw-theme-dark .lw-cc-grid tbody tr.lw-cc-newinfo td { background: rgba(198, 40, 40, 0.16); }
.lw-theme-dark .lw-cc-grid tbody tr.lw-cc-selected td { background: rgba(0, 120, 190, 0.22); }
.lw-theme-dark .lw-cc-today { color: #f0b04a; }

/* The PTP Date colours on the Collections grid (#13125), after the New Info and selected row tints so the colour shows. */
.lw-cc-grid tbody tr > td.lw-ptp-kept { background: #e3f4e5; color: #1b5e20; font-weight: 600; }
.lw-cc-grid tbody tr > td.lw-ptp-broken { background: #fbe3e3; color: #8e1d1d; font-weight: 600; }
.lw-cc-grid tbody tr > td.lw-ptp-pending { background: #fdf3d0; color: #7a5a00; font-weight: 600; }
.lw-theme-dark .lw-cc-grid tbody tr > td.lw-ptp-kept { background: #1e3b24; color: #a6e3b0; }
.lw-theme-dark .lw-cc-grid tbody tr > td.lw-ptp-broken { background: #4a2222; color: #f4b4b4; }
.lw-theme-dark .lw-cc-grid tbody tr > td.lw-ptp-pending { background: #463a12; color: #f2d98a; }
.lw-theme-dark .lw-cc-overdue { color: #ef7d7d; }
.lw-theme-dark .lw-cc-tone-grey { background: rgba(160, 172, 190, 0.18); color: #d6dce6; }
.lw-theme-dark .lw-cc-tone-blue { background: rgba(58, 143, 214, 0.2); color: #9fcdf2; }
.lw-theme-dark .lw-cc-tone-purple { background: rgba(143, 120, 201, 0.22); color: #c9b6f0; }
.lw-theme-dark .lw-cc-tone-green { background: rgba(111, 158, 60, 0.22); color: #a8d58a; }
.lw-theme-dark .lw-cc-tone-red { background: rgba(198, 40, 40, 0.22); color: #f1a1a1; }
.lw-theme-dark .lw-cc-tone-amber { background: rgba(217, 138, 29, 0.22); color: #f0c27a; }
/* The group SMS / email window (#12962; prototype v202 board 3c). */
.lw-gm-dialog .mud-dialog-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.lw-gm-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px 16px;
}
.lw-gm-tabs {
    display: inline-flex;
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 8px;
    overflow: hidden;
}
.lw-gm-tab {
    padding: 5px 14px;
    font: inherit;
    font-size: 0.875rem;
    font-weight: 600;
    border: 0;
    background: var(--mud-palette-surface);
    color: var(--mud-palette-text-primary);
    cursor: pointer;
}
.lw-gm-tab + .lw-gm-tab {
    border-left: 1px solid var(--mud-palette-lines-default);
}
.lw-gm-tab.lw-on {
    background: var(--mud-palette-primary);
    color: var(--mud-palette-primary-text);
}
.lw-gm-tab.lw-sent:not(.lw-on) {
    color: var(--mud-palette-success-darken);
}
.lw-gm-tiles3,
.lw-gm-tiles4 {
    display: grid;
    gap: 8px;
}
.lw-gm-tiles3 {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 3fr);
}
.lw-gm-tiles4 {
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
}
.lw-gm-tile {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid var(--mud-palette-lines-default);
    background: color-mix(in srgb, var(--mud-palette-primary) 4%, var(--mud-palette-surface));
}
.lw-gm-tile > span {
    font-size: 0.75rem;
    color: var(--mud-palette-text-secondary);
}
.lw-gm-tile > b {
    font-size: 1.25rem;
    line-height: 1.2;
}
.lw-gm-tile > p {
    margin: 0;
    font-size: 0.8125rem;
}
.lw-gm-tile.lw-amber { background: color-mix(in srgb, var(--mud-palette-warning) 12%, var(--mud-palette-surface)); }
.lw-gm-tile.lw-green { background: color-mix(in srgb, var(--mud-palette-success) 12%, var(--mud-palette-surface)); }
.lw-gm-tile.lw-red { background: color-mix(in srgb, var(--mud-palette-error) 10%, var(--mud-palette-surface)); }
.lw-gm-tile.lw-blue { background: color-mix(in srgb, var(--mud-palette-info) 12%, var(--mud-palette-surface)); }
.lw-gm-link {
    align-self: flex-start;
    padding: 0;
    border: 0;
    background: none;
    font: inherit;
    font-size: 0.75rem;
    color: var(--mud-palette-primary);
    text-decoration: underline;
    cursor: pointer;
}
.lw-gm-reasons {
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.8125rem;
    background: color-mix(in srgb, var(--mud-palette-warning) 12%, var(--mud-palette-surface));
}
.lw-gm-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    gap: 16px;
}
.lw-gm-compose,
.lw-gm-preview {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}
.lw-gm-insert {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    font-size: 0.8125rem;
}
.lw-gm-msg {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 8px;
    border-radius: 8px;
    border: 1px solid var(--mud-palette-lines-default);
}
.lw-gm-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 14px;
    font-size: 0.75rem;
    color: var(--mud-palette-text-secondary);
}
.lw-gm-key {
    display: inline-block;
    width: 10px;
    height: 10px;
    margin-right: 5px;
    border-radius: 2px;
    vertical-align: -1px;
}
.lw-gm-key.lw-y { background: #fff3c4; box-shadow: inset 0 0 0 1px #e0c060; }
.lw-gm-key.lw-g { background: color-mix(in srgb, var(--mud-palette-text-primary) 10%, var(--mud-palette-surface)); }
.lw-gm-fixed {
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 0.875rem;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    color: var(--mud-palette-text-secondary);
    background: color-mix(in srgb, var(--mud-palette-text-primary) 7%, var(--mud-palette-surface));
}
.lw-gm-edit {
    width: 100%;
    min-height: 140px;
    padding: 8px 10px;
    border-radius: 6px;
    border: 1px solid #e0c060;
    background: #fff8dc;
    color: #2b2b2b;
    font: inherit;
    font-size: 0.875rem;
    resize: vertical;
}
.lw-gm-edit:focus {
    outline: 2px solid var(--mud-palette-primary);
    outline-offset: 1px;
}
.lw-gm-segwarn {
    color: var(--mud-palette-warning-darken);
}
.lw-gm-to {
    font-size: 0.8125rem;
    overflow-wrap: anywhere;
}
.lw-gm-pv-subject {
    font-weight: 700;
    overflow-wrap: anywhere;
}
.lw-gm-pv {
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid var(--mud-palette-lines-default);
    background: color-mix(in srgb, var(--mud-palette-primary) 3%, var(--mud-palette-surface));
    font-size: 0.875rem;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}
.lw-gm-info {
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.8125rem;
    background: color-mix(in srgb, var(--mud-palette-info) 10%, var(--mud-palette-surface));
}
.lw-gm-nothing {
    margin-right: auto;
    font-size: 0.8125rem;
}
.lw-gm-done {
    display: flex;
    gap: 12px;
    padding: 12px;
    border-radius: 8px;
    background: color-mix(in srgb, var(--mud-palette-success) 10%, var(--mud-palette-surface));
}
.lw-gm-done p {
    margin: 4px 0 0;
    font-size: 0.875rem;
}
.lw-gm-ok {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    color: #fff;
    font-weight: 700;
    background: var(--mud-palette-success);
}
.lw-gm-asgot {
    margin-bottom: 4px;
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--mud-palette-text-secondary);
}
.lw-gm-reptitle {
    font-size: 0.9375rem;
}
.lw-gm-repbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}
.lw-gm-grow {
    flex: 1 1 auto;
}
.lw-gm-chip {
    padding: 3px 10px;
    border-radius: 14px;
    border: 1px solid var(--mud-palette-lines-default);
    background: var(--mud-palette-surface);
    color: var(--mud-palette-text-primary);
    font: inherit;
    font-size: 0.8125rem;
    cursor: pointer;
}
.lw-gm-chip.lw-on {
    border-color: var(--mud-palette-primary);
    background: color-mix(in srgb, var(--mud-palette-primary) 14%, var(--mud-palette-surface));
    font-weight: 600;
}
.lw-gm-detail {
    min-width: 220px;
    white-space: normal;
}
@media (max-width: 700px) {
    .lw-gm-tiles3,
    .lw-gm-grid {
        grid-template-columns: minmax(0, 1fr);
    }
    .lw-gm-nothing {
        flex: 1 1 100%;
    }
}
.lw-cc-excluded {
    padding: 8px 12px;
    border-radius: 6px;
    background: color-mix(in srgb, var(--mud-palette-warning) 14%, var(--mud-palette-surface));
    font-size: 0.875rem;
}
.lw-cc-excluded ul {
    margin: 4px 0 0 18px;
    padding: 0;
}
.lw-cc-group {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 16px;
}
.lw-cc-insert {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    font-size: 0.8125rem;
}
.lw-cc-preview {
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 8px;
    padding: 10px 12px;
    background: color-mix(in srgb, var(--mud-palette-primary) 3%, var(--mud-palette-surface));
    min-width: 0;
}
.lw-cc-preview-head {
    font-size: 0.8125rem;
    color: var(--mud-palette-text-secondary);
    margin-bottom: 6px;
}
.lw-cc-preview-subject {
    font-weight: 700;
    margin-bottom: 6px;
}
.lw-cc-preview-body {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}
@media (max-width: 700px) {
    .lw-cc-collector,
    .lw-cc-view {
        flex: 1 1 100%;
    }
    .lw-cc-search {
        flex: 1 1 100%;
        max-width: none;
    }
    .lw-cc-toolbar-end {
        margin-left: 0;
    }
    .lw-cc-group {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* ---- The collections file (part 16: #12963, prototype board 3c) and Notes (#12972) ---- */
.lw-cf2-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px 24px;
}
.lw-cf2-title {
    min-width: 0;
}
.lw-cf2-label {
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--mud-palette-text-secondary);
}
.lw-cf2-title h1 {
    margin: 2px 0 4px;
    font-family: var(--lw-font-display);
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.25;
}
.lw-cf2-sub {
    font-size: 0.875rem;
    color: var(--mud-palette-text-secondary);
    overflow-wrap: anywhere;
}
.lw-cf2-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.lw-cf2-chips {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-top: 12px;
}
.lw-cf2-figures {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    margin-top: 16px;
    border-top: 1px solid var(--mud-palette-lines-default);
}
.lw-cf2-figures > div {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 10px 12px 2px;
}
.lw-cf2-figures span {
    font-size: 12px;
    color: var(--mud-palette-text-secondary);
}
.lw-cf2-figures strong {
    font-size: 18px;
    font-weight: 700;
    color: var(--mud-palette-primary);
}
.lw-cf2-columns {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
    gap: 16px;
    align-items: start;
}
@media (max-width: 1180px) {
    .lw-cf2-columns {
        grid-template-columns: minmax(0, 1fr);
    }
    .lw-cf2-figures {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}
@media (max-width: 520px) {
    .lw-cf2-figures {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
.lw-notes-scroll {
    max-height: none;
}
.lw-notes-grid td.lw-notes-text {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    min-width: 220px;
}

/* ---- The Abeyance console (part 17: #12965-#12968; prototype boards 3d and 3e) ---- */
.lw-ab-kpis {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0;
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 10px;
    background: var(--mud-palette-surface);
}
.lw-ab-kpi {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 12px 16px;
    border-left: 1px solid var(--mud-palette-lines-default);
    min-width: 0;
}
.lw-ab-kpi:first-child {
    border-left: 0;
}
.lw-ab-kpi span {
    font-size: 0.75rem;
    color: var(--mud-palette-text-secondary);
}
.lw-ab-kpi b {
    font-size: 1.25rem;
}
.lw-ab-kpi small {
    font-size: 0.75rem;
    color: var(--mud-palette-text-secondary);
}
@media (max-width: 960px) {
    .lw-ab-kpis {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .lw-ab-kpi {
        border-left: 0;
        border-top: 1px solid var(--mud-palette-lines-default);
    }
    .lw-ab-kpi:nth-child(-n + 2) {
        border-top: 0;
    }
}
.lw-ab-views {
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
    border-bottom: 1px solid var(--mud-palette-lines-default);
}
.lw-ab-view {
    border: 0;
    background: none;
    padding: 8px 14px;
    font: inherit;
    font-weight: 600;
    color: var(--mud-palette-text-secondary);
    border-bottom: 3px solid transparent;
    cursor: pointer;
}
.lw-ab-view.on {
    color: var(--mud-palette-primary);
    border-bottom-color: var(--mud-palette-primary);
}
.lw-ab-view:focus-visible,
.lw-ab-band:focus-visible,
.lw-ab-name:focus-visible,
.lw-ab-found-item:focus-visible {
    outline: 2px solid var(--mud-palette-primary);
    outline-offset: 2px;
}
.lw-ab-bands {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.lw-ab-band {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 999px;
    background: var(--mud-palette-surface);
    font: inherit;
    font-size: 0.8125rem;
    cursor: pointer;
}
.lw-ab-band.on {
    border-color: var(--mud-palette-primary);
    background: color-mix(in srgb, var(--mud-palette-primary) 12%, var(--mud-palette-surface));
    font-weight: 600;
}
.lw-ab-sw {
    width: 12px;
    height: 12px;
    border-radius: 3px;
    border: 1px solid rgba(0, 0, 0, 0.2);
    display: inline-block;
}
.lw-ab-sw.cur { background: #ffffff; }
.lw-ab-sw.late60 { background: #fff3b0; }
.lw-ab-sw.late90 { background: #f8c9d4; }
.lw-ab-sw.new { background: #c8efc4; }
.lw-ab-sw.closed { background: #d9dde3; }
/* The file panel sits beside the list on a wide screen and under it otherwise. */
.lw-ab-wrap {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
    align-items: start;
}
@media (min-width: 1280px) {
    .lw-ab-wrap:has(.lw-ab-file) {
        grid-template-columns: minmax(0, 1fr) 380px;
    }
}
.lw-ab-main,
.lw-ab-file {
    min-width: 0;
}
.lw-ab-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 10px;
}
.lw-ab-filters .mud-input-control {
    flex: 0 1 170px;
    min-width: 140px;
}
.lw-ab-filters .lw-ab-search {
    flex: 2 1 260px;
}
.lw-ab-filters .lw-ab-date {
    flex: 0 1 190px;
}
.lw-ab-filter-end {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-left: auto;
}
.lw-ab-grid tbody tr {
    cursor: pointer;
}
.lw-ab-grid tbody tr.lw-ab-b4 td { background: #e6f7e3; }
.lw-ab-grid tbody tr.lw-ab-b2 td { background: #fff8d6; }
.lw-ab-grid tbody tr.lw-ab-b3 td { background: #fde4ea; }
.lw-ab-grid tbody tr.lw-ab-b5 td { color: var(--mud-palette-text-secondary); }
.lw-ab-grid tbody tr.lw-ab-open td { box-shadow: inset 0 2px 0 var(--mud-palette-primary), inset 0 -2px 0 var(--mud-palette-primary); }
.lw-ab-name {
    border: 0;
    background: none;
    padding: 0;
    font: inherit;
    font-weight: 700;
    color: var(--mud-palette-primary);
    cursor: pointer;
}
.lw-ab-name:hover {
    text-decoration: underline;
}
.lw-ab-chip {
    display: inline-block;
    padding: 1px 8px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    background: rgba(120, 130, 150, 0.16);
}
.lw-ab-chip.blue { background: #e3effa; color: #1d5a96; }
.lw-ab-chip.green { background: #e2f4e0; color: #2e6b26; }
.lw-ab-chip.purple { background: #efe6fa; color: #5b3a92; }
.lw-ab-chip.amber { background: #fff1d6; color: #8a5400; }
.lw-ab-chip.red { background: #fbe1e1; color: #a12626; }
.lw-ab-chip.grey { background: rgba(120, 130, 150, 0.16); color: inherit; }
.lw-ab-note,
.lw-ab-in {
    font: inherit;
    font-size: 0.8125rem;
    padding: 4px 6px;
    border: 1px solid var(--mud-palette-lines-inputs);
    border-radius: 6px;
    background: var(--mud-palette-surface);
    color: var(--mud-palette-text-primary);
}
.lw-ab-note {
    width: 26ch;
}
.lw-ab-in:disabled {
    opacity: 0.7;
}
.lw-ab-money {
    width: 9ch;
    text-align: right;
}
.lw-ab-file-in {
    width: 18ch;
}
.lw-ab-file-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
}
.lw-ab-small {
    font-size: 0.8125rem;
}
.lw-ab-kv {
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr);
    gap: 4px 12px;
    margin: 10px 0 0;
    font-size: 0.8125rem;
}
.lw-ab-kv dt {
    color: var(--mud-palette-text-secondary);
}
.lw-ab-kv dd {
    margin: 0;
    font-weight: 600;
    overflow-wrap: anywhere;
}
.lw-ab-acts {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 10px;
    align-items: center;
    margin-top: 8px;
    font-size: 0.8125rem;
}
/* The Abeyance loan report from the console (#12238; prototype v133 board 3d .repgrid): As of with its shortcuts, the loan
   details beside the summary (stacked on a phone), then the transactions in a box that scrolls. */
.lw-abr-asof {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}
.lw-abr-date {
    flex: 0 1 200px;
}
.lw-abr-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 12px 24px;
    align-items: start;
}
@media (max-width: 860px) {
    .lw-abr-grid { grid-template-columns: minmax(0, 1fr); }
}
.lw-abr-grid .lw-ab-kv {
    margin-top: 0;
}
.lw-abr-sh {
    font-size: 0.8125rem;
    font-weight: 600;
    margin-bottom: 6px;
}
.lw-abr-sum {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8125rem;
}
.lw-abr-sum th {
    font-weight: 600;
    color: var(--mud-palette-text-secondary);
    text-align: left;
    padding: 4px 6px;
    border-bottom: 1px solid var(--mud-palette-lines-default);
}
.lw-abr-sum td {
    padding: 4px 6px;
    border-bottom: 1px solid var(--mud-palette-table-lines, var(--mud-palette-lines-default));
}
.lw-abr-sum .num,
.lw-abr-tx .num {
    text-align: right;
    white-space: nowrap;
}
.lw-abr-sum .lw-abr-tot td {
    font-weight: 600;
}
.lw-abr-tx {
    max-height: 260px;
    overflow: auto;
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 6px;
}
.lw-abr-tx table {
    width: 100%;
}
.lw-abr-tx thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: var(--mud-palette-surface);
}
/* Cheques on hand and bank deposits (#12996; prototype v175 board 3d): the live line (green when the cheques match what was
   applied), each cheque or deposit as a row with its chip, the client payments under a cheque, and the slip preview. */
.lw-dep-live {
    padding: 8px 12px;
    border-radius: 6px;
    background: #fff8d6;
    color: #6b4e00;
    font-size: 0.8125rem;
    font-weight: 600;
}
.lw-dep-live.ok {
    background: #e6f7e3;
    color: #1e5b23;
}
.lw-theme-dark .lw-dep-live { background: rgba(255, 213, 79, 0.14); color: #ffe082; }
.lw-theme-dark .lw-dep-live.ok { background: rgba(76, 175, 80, 0.16); color: #a5d6a7; }
.lw-dep-head {
    font-size: 0.875rem;
    font-weight: 600;
}
.lw-dep-list {
    display: flex;
    flex-direction: column;
}
.lw-dep-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--mud-palette-lines-default);
}
.lw-dep-main {
    min-width: 0;
    font-size: 0.8125rem;
}
.lw-dep-title {
    font-weight: 600;
    overflow-wrap: anywhere;
}
.lw-dep-sub {
    color: var(--mud-palette-text-secondary);
}
.lw-dep-toggle {
    border: 0;
    background: transparent;
    padding: 2px 0;
    color: var(--mud-palette-primary);
    font: inherit;
    cursor: pointer;
}
.lw-dep-apps {
    margin: 4px 0 0;
    padding-left: 18px;
}
.lw-dep-apps li {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    max-width: 520px;
}
.lw-dep-btns {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 8px;
    margin-top: 6px;
}
.lw-dep-chip {
    flex: 0 0 auto;
    max-width: 45%;
    padding: 2px 8px;
    border-radius: 12px;
    background: #fff3cd;
    color: #7a5600;
    font-size: 0.75rem;
    font-weight: 600;
    text-align: right;
}
.lw-dep-chip.ok {
    background: #e6f7e3;
    color: #1e5b23;
}
.lw-theme-dark .lw-dep-chip { background: rgba(255, 213, 79, 0.16); color: #ffe082; }
.lw-theme-dark .lw-dep-chip.ok { background: rgba(76, 175, 80, 0.18); color: #a5d6a7; }
@media (max-width: 600px) {
    .lw-dep-item { flex-direction: column; }
    .lw-dep-chip { max-width: 100%; text-align: left; }
}
.lw-dep-preview {
    width: 100%;
    height: min(70vh, 760px);
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 6px;
}
/* Email trustee (#12998; prototype v147): From the team inbox, To / CC / Subject, the formatting toolbar over the message, the
   Attach menu and the attachment chips. */
.lw-te-from {
    display: flex;
    gap: 12px;
    align-items: baseline;
    font-size: 0.8125rem;
    margin-bottom: 8px;
}
.lw-te-lbl {
    color: var(--mud-palette-text-secondary);
    min-width: 40px;
}
.lw-te-fromaddr {
    font-weight: 600;
    overflow-wrap: anywhere;
}
.lw-te-note {
    color: var(--mud-palette-text-secondary);
    font-size: 0.75rem;
}
.lw-te-fields {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 0 12px;
}
.lw-te-fields .lw-te-subject {
    grid-column: 1 / -1;
}
@media (max-width: 600px) {
    .lw-te-fields { grid-template-columns: minmax(0, 1fr); }
}
.lw-rte {
    border: 1px solid var(--mud-palette-lines-inputs);
    border-radius: 6px;
    margin-top: 10px;
}
.lw-rte.lw-rte-bad {
    border-color: var(--mud-palette-error);
}
.lw-rte-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 2px;
    padding: 4px 6px;
    border-bottom: 1px solid var(--mud-palette-lines-default);
}
.lw-rte-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border: 0;
    border-radius: 4px;
    background: transparent;
    color: var(--mud-palette-text-primary);
    cursor: pointer;
}
.lw-rte-btn:hover,
.lw-rte-btn:focus-visible {
    background: var(--mud-palette-action-default-hover);
}
.lw-rte-gap {
    flex: 1 1 auto;
}
.lw-rte-body {
    min-height: 180px;
    max-height: 340px;
    overflow: auto;
    padding: 10px 12px;
    font-size: 0.875rem;
    line-height: 1.5;
    outline: none;
    overflow-wrap: anywhere;
}
.lw-rte-body ul,
.lw-rte-body ol {
    margin: 4px 0;
    padding-left: 24px;
}
.lw-te-attach {
    position: relative;
}
.lw-te-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 4px);
    z-index: 5;
    width: min(320px, 80vw);
    background: var(--mud-palette-surface);
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 6px;
    box-shadow: var(--mud-elevation-8);
    padding: 4px;
}
.lw-te-mi {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    width: 100%;
    padding: 8px 10px;
    border: 0;
    border-radius: 4px;
    background: transparent;
    color: var(--mud-palette-text-primary);
    font: inherit;
    font-size: 0.8125rem;
    text-align: left;
    cursor: pointer;
}
.lw-te-mi span {
    color: var(--mud-palette-text-secondary);
    font-size: 0.75rem;
}
.lw-te-mi:hover,
.lw-te-mi:focus-visible {
    background: var(--mud-palette-action-default-hover);
}
.lw-te-file {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}
.lw-te-link {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 8px;
    padding: 6px 8px 0;
}
.lw-te-link .mud-input-control {
    flex: 1 1 220px;
}
.lw-te-files {
    margin-top: 8px;
}
.lw-te-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    max-width: 100%;
    margin: 0 6px 6px 0;
    padding: 3px 4px 3px 6px;
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 14px;
    font-size: 0.75rem;
}
.lw-te-chipname {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 260px;
}
.lw-te-ext {
    padding: 1px 5px;
    border-radius: 4px;
    background: #fde4e4;
    color: #b42318;
    font-size: 0.6875rem;
    font-weight: 700;
}
.lw-te-ext.img { background: #e3f1fd; color: #1d5fa8; }
.lw-te-ext.doc { background: #e6f7e3; color: #2e7d32; }
.lw-theme-dark .lw-te-ext { background: rgba(244, 67, 54, 0.2); color: #ffb4a9; }
.lw-theme-dark .lw-te-ext.img { background: rgba(33, 150, 243, 0.2); color: #9fcbff; }
.lw-theme-dark .lw-te-ext.doc { background: rgba(76, 175, 80, 0.2); color: #a5d6a7; }
.lw-te-x {
    border: 0;
    background: transparent;
    color: var(--mud-palette-text-secondary);
    font-size: 1rem;
    line-height: 1;
    padding: 0 4px;
    cursor: pointer;
}
/* Abeyance status on the file panel (#12968, Daniel Nov 18; prototype v133 .stseg): Enrolled, Default, Satisfied. */
.lw-ab-stseg {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    border: 1px solid var(--mud-palette-lines-inputs);
    border-radius: 6px;
    overflow: hidden;
    margin-top: 6px;
}
.lw-ab-stopt {
    height: 36px;
    border: 0;
    border-right: 1px solid var(--mud-palette-lines-inputs);
    background: var(--mud-palette-surface);
    font: inherit;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--mud-palette-text-primary);
    cursor: pointer;
    padding: 0 8px;
}
.lw-ab-stopt:last-child { border-right: 0; }
.lw-ab-stopt:hover { background: var(--mud-palette-action-default-hover); }
.lw-ab-stopt.on {
    background: var(--mud-palette-primary);
    color: var(--mud-palette-primary-text);
    cursor: default;
}
.lw-ab-stopt.dis {
    color: var(--mud-palette-text-disabled);
    background: var(--mud-palette-background-gray);
    cursor: not-allowed;
}
.lw-ab-stopt:focus-visible { outline: 2px solid var(--mud-palette-primary); outline-offset: -2px; }
.lw-ab-sec-title {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--mud-palette-text-secondary);
}
.lw-ab-hrow {
    display: flex;
    flex-direction: column;
    gap: 1px;
    padding: 6px 0;
    border-bottom: 1px solid var(--mud-palette-lines-default);
    font-size: 0.8125rem;
}
.lw-ab-totals {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 14px;
    margin-left: auto;
    font-size: 0.8125rem;
}
.lw-ab-payscroll {
    max-height: 60vh;
}
.lw-ab-pay tbody tr.lw-ab-saved td {
    background: #fffaf0;
}
.lw-ab-strong {
    font-weight: 600;
}
.lw-ab-status {
    white-space: nowrap;
}
.lw-ab-wrapcell {
    white-space: normal !important;
    min-width: 260px;
}
/* Record agency payments (#12967, Daniel Nov 18; prototype v133 board 3d): the cheque at the top, the running total against it,
   a row's split when Rosie's rule cuts the fair share or books revenue, a closed file's row and the notes under the list. */
.lw-ab-chq {
    display: grid;
    grid-template-columns: minmax(200px, 2fr) minmax(165px, 1fr) repeat(3, minmax(130px, 1fr)) minmax(180px, 2fr);
    gap: 10px;
    align-items: start;
}
@media (max-width: 1100px) {
    .lw-ab-chq { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
}
.lw-ab-recon {
    padding: 8px 12px;
    border-radius: 4px;
    background: var(--mud-palette-background-gray);
    font-size: 0.8125rem;
    font-weight: 600;
}
.lw-ab-recon.ok { background: rgba(46, 125, 50, 0.12); color: #1b5e20; }
.lw-theme-dark .lw-ab-recon.ok { color: #a7e0a3; }
.lw-ab-splitx { font-size: 0.75rem; font-weight: 600; color: #8a5300; margin-top: 3px; }
.lw-theme-dark .lw-ab-splitx { color: #ffd27a; }
.lw-ab-pay .lw-ab-pct { width: 64px; text-align: right; }
/* The payments grid fits a 1440 screen: headers wrap, and a row's split wraps under its "applied to" choice. */
.lw-cc-grid.lw-ab-pay th { white-space: normal; vertical-align: bottom; }
.lw-cc-grid.lw-ab-pay td.lw-ab-applied { white-space: normal; min-width: 200px; max-width: 240px; }
.lw-ab-applied select { max-width: 100%; }
.lw-ab-closedrow td { background: var(--mud-palette-background-gray); }
.lw-ab-hints { margin: 0; padding-left: 28px; display: flex; flex-direction: column; gap: 4px; }
.lw-ab-savebar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
    border-top: 1px solid var(--mud-palette-lines-default);
}
.lw-ab-savebar > span:first-child {
    flex: 1 1 320px;
}
.lw-ab-savebar-btns {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
/* The Abeyance Entry Panel. */
.lw-ab-found {
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-height: 320px;
    overflow: auto;
}
.lw-ab-found-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    padding: 8px 10px;
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 8px;
    background: var(--mud-palette-surface);
    font: inherit;
    font-size: 0.8125rem;
    text-align: left;
    cursor: pointer;
}
.lw-ab-found-item:hover {
    border-color: var(--mud-palette-primary);
}
/* Abeyance notes on the file panel and the grid's Latest note (#12965, Daniel Nov 18; prototype v133 .nlist / .lnote). */
.lw-ab-notes-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 6px; }
.lw-ab-nlist { display: flex; flex-direction: column; gap: 8px; max-height: 260px; overflow-y: auto; }
.lw-ab-nrow {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 8px 10px;
    border-radius: 6px;
    background: var(--mud-palette-background-gray);
    font-size: 0.8125rem;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}
.lw-ab-nrow > span:first-child { font-size: 0.75rem; }
.lw-ab-lnote {
    max-width: 260px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
/* Enroll a loan (#12966, Daniel Nov 18; prototype v133 board 3d): the client search's fields, loans that can't be picked,
   the Pending EFT and Re-enroll alerts, and the Re-enroll block on the file panel (#12999). */
.lw-ab-sfgrid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 10px;
}
.lw-ab-found-item.off,
.lw-ab-found-item:disabled {
    cursor: not-allowed;
    background: var(--mud-palette-background-gray);
    color: var(--mud-palette-text-secondary);
}
.lw-ab-found-item.off:hover { border-color: var(--mud-palette-lines-default); }
.lw-ab-eftsm { font-size: 0.75rem; color: #8a5300; }
.lw-ab-offwhy { font-size: 0.75rem; color: var(--mud-palette-error); }
.lw-ab-eftal,
.lw-ab-againal {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 10px 12px;
    border-radius: 4px;
    font-size: 0.75rem;
    margin-bottom: 14px;
}
.lw-ab-eftal { background: #fdf1e0; border-left: 4px solid #c77700; color: #5c3a00; }
.lw-ab-againal { background: #eef4fb; border-left: 4px solid #2262ac; color: #0b2f55; }
.lw-ab-eftal b, .lw-ab-againal b { font-size: 0.8125rem; }
.lw-ab-again {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    margin-top: 12px;
    padding: 10px 12px;
    border-radius: 4px;
    background: #eef4fb;
    border-left: 4px solid #2262ac;
}
.lw-theme-dark .lw-ab-eftal { background: rgba(255, 179, 0, 0.12); color: #ffd27a; }
.lw-theme-dark .lw-ab-againal,
.lw-theme-dark .lw-ab-again { background: rgba(66, 133, 244, 0.14); color: #c9dcf7; }
.lw-theme-dark .lw-ab-eftsm { color: #ffd27a; }
.lw-ab-sec {
    padding: 10px 0;
    border-top: 1px solid var(--mud-palette-lines-default);
}
.lw-ab-sec .lw-ab-sec-title {
    margin-bottom: 8px;
}
.lw-ab-g3 {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px 12px;
    align-items: end;
}
@media (max-width: 720px) {
    .lw-ab-g3 {
        grid-template-columns: minmax(0, 1fr);
    }
}
.lw-ab-ro {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 0.8125rem;
}
.lw-ab-ro span {
    color: var(--mud-palette-text-secondary);
}
.lw-theme-dark .lw-ab-grid tbody tr.lw-ab-b4 td { background: rgba(76, 175, 80, 0.16); }
.lw-theme-dark .lw-ab-grid tbody tr.lw-ab-b2 td { background: rgba(255, 213, 79, 0.14); }
.lw-theme-dark .lw-ab-grid tbody tr.lw-ab-b3 td { background: rgba(240, 98, 146, 0.16); }
.lw-theme-dark .lw-ab-pay tbody tr.lw-ab-saved td { background: rgba(255, 213, 79, 0.08); }
.lw-theme-dark .lw-ab-chip.blue { background: rgba(66, 135, 245, 0.2); color: #a9cbff; }
.lw-theme-dark .lw-ab-chip.green { background: rgba(76, 175, 80, 0.2); color: #a7e0a3; }
.lw-theme-dark .lw-ab-chip.purple { background: rgba(156, 106, 222, 0.22); color: #d5bdf5; }
.lw-theme-dark .lw-ab-chip.amber { background: rgba(255, 179, 0, 0.18); color: #ffd27a; }
.lw-theme-dark .lw-ab-chip.red { background: rgba(229, 57, 53, 0.2); color: #f5a3a3; }
/* The lock banner under the client's name on every tab of a locked file and on its loan pages (#12981; red since Daniel's Nov 18
   comment, prototype v133): padlock, title, the reason in bold
   with who locked the file and when, and a small line on what still works. */
.lw-lockban {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    background: #b3261e;
    color: #fff;
    border-radius: 6px;
    padding: 14px 18px;
}
.lw-lockban .lw-lockban-icon {
    color: #fff;
    flex: none;
    margin-top: 2px;
}
.lw-lockban-text {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
    font-size: 0.875rem;
    overflow-wrap: anywhere;
}
.lw-lockban-text strong {
    font-size: 0.9375rem;
}
.lw-lockban-text .lw-lockban-reason { font-size: 0.9375rem; }
.lw-lockban-text .lw-lockban-reason > b { font-weight: 800; letter-spacing: 0.01em; }
.lw-lockban-text small {
    font-size: 0.75rem;
    opacity: 0.9;
}
/* Refund or reverse a payment (#12900, prototype v112): steps, option cards, the payment list, the form and the done page. */
.lw-rf { display: flex; flex-direction: column; gap: 14px; }
.lw-rf-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.lw-rf-title { margin: 0; font-size: 1.5rem; font-weight: 600; }
.lw-rf-sub { margin: 4px 0 0; font-size: 0.875rem; }
.lw-rf-hint { font-size: 0.75rem; }
.lw-rf-steps { display: flex; gap: 6px; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; }
.lw-rf-steps li { display: flex; gap: 6px; align-items: center; font-size: 0.8125rem; font-weight: 600; color: var(--mud-palette-text-secondary);
    padding: 6px 12px 6px 6px; border-radius: 16px; background: var(--mud-palette-background-gray); }
.lw-rf-steps b { width: 22px; height: 22px; border-radius: 50%; background: #d5dce6; color: #fff; display: inline-flex; align-items: center;
    justify-content: center; font-size: 0.75rem; }
.lw-rf-steps li.on { color: var(--mud-palette-primary); background: color-mix(in srgb, var(--mud-palette-primary) 10%, var(--mud-palette-surface)); }
.lw-rf-steps li.on b { background: var(--mud-palette-primary); }
.lw-rf-steps li.ok { color: var(--mud-palette-success); }
.lw-rf-steps li.ok b { background: var(--mud-palette-success); }
.lw-rf-opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.lw-rf-opts.sm { grid-template-columns: minmax(0, 1fr); }
.lw-rf-opt { display: flex; gap: 12px; align-items: flex-start; text-align: left; background: var(--mud-palette-surface);
    border: 1px solid var(--mud-palette-lines-inputs); border-radius: 8px; padding: 14px; font: inherit; color: var(--mud-palette-text-primary); cursor: pointer; }
.lw-rf-opt:hover { border-color: var(--mud-palette-primary); }
.lw-rf-opt i { flex: none; width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--mud-palette-text-secondary); margin-top: 1px; box-sizing: border-box; }
.lw-rf-opt span { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.lw-rf-opt b { font-size: 0.875rem; }
.lw-rf-opt small { font-size: 0.75rem; color: var(--mud-palette-text-secondary); line-height: 1.45; }
.lw-rf-opt.on { border-color: var(--mud-palette-primary); background: color-mix(in srgb, var(--mud-palette-primary) 5%, var(--mud-palette-surface));
    box-shadow: 0 0 0 1px var(--mud-palette-primary); }
.lw-rf-opt.on i { border-color: var(--mud-palette-primary); background: var(--mud-palette-primary); box-shadow: inset 0 0 0 3px var(--mud-palette-surface); }
.lw-rf-opt.dis, .lw-rf-opt:disabled { opacity: 0.5; cursor: not-allowed; }
.lw-rf-opt.dis:hover { border-color: var(--mud-palette-lines-inputs); }
.lw-rf-table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.lw-rf-table th, .lw-rf-table td { padding: 8px 12px; text-align: left; border-bottom: 1px solid var(--mud-palette-lines-default); white-space: nowrap; }
.lw-rf-table th { font-size: 0.75rem; color: var(--mud-palette-text-secondary); font-weight: 600; }
.lw-rf-table .lw-num { text-align: right; }
.lw-rf-table tbody tr { cursor: pointer; }
.lw-rf-table tbody tr.off { cursor: default; color: var(--mud-palette-text-secondary); }
.lw-rf-table tbody tr.sel td { background: color-mix(in srgb, var(--mud-palette-primary) 6%, var(--mud-palette-surface)); }
.lw-rf-radio { display: inline-block; width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--mud-palette-text-secondary); box-sizing: border-box; vertical-align: middle; }
.lw-rf-radio.on { border-color: var(--mud-palette-primary); background: var(--mud-palette-primary); box-shadow: inset 0 0 0 3px var(--mud-palette-surface); }
.lw-rf-actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.lw-rf-actions.lw-rf-between { justify-content: space-between; }
.lw-rf-actions.lw-rf-start { justify-content: flex-start; }
.lw-rf-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; align-items: start; }
.lw-rf-form { display: flex; flex-direction: column; gap: 14px; }
.lw-rf-label { font-size: 0.8125rem; font-weight: 600; margin-bottom: 6px; }
.lw-rf-ok { color: var(--mud-palette-success); font-weight: 700; font-size: 0.8125rem; }
.lw-rf-rules { margin: 0; padding-left: 18px; font-size: 0.75rem; display: flex; flex-direction: column; gap: 3px; }
.lw-rf-done ul { margin: 8px 0 16px; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; font-size: 0.875rem; }
.lw-rf-done-title { margin: 10px 0 0; font-size: 1.25rem; }
.lw-rf-check { width: 40px; height: 40px; border-radius: 50%; background: color-mix(in srgb, var(--mud-palette-success) 14%, var(--mud-palette-surface));
    color: var(--mud-palette-success); font-size: 1.375rem; font-weight: 700; display: flex; align-items: center; justify-content: center; }

/* The shared report page (ReportPage, #12841, prototype screen 9b): the report's heading, a card with the filter bar, the run
   bar (who ran it, when, the filters, Export / PDF / Print), the summary sections and the rows, which scroll sideways inside
   their own box on a phone. Printing (and Save as PDF) drops the filters and buttons, shows the printout heading (logo,
   name, filters, run time, who) and numbers the pages. */
.lw-rpt-crumb {
    margin-bottom: 6px;
}

.lw-rpt-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 14px;
}

.lw-rpt-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 6px;
}

.lw-rpt-card {
    overflow: hidden;
}

.lw-rpt-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 12px 16px;
    padding: 16px;
    border-bottom: 1px solid var(--mud-palette-lines-default);
}

    .lw-rpt-filters .lw-rpt-filter {
        flex: 0 1 180px;
        min-width: 150px;
    }

    .lw-rpt-filters .lw-rpt-filter-wide {
        flex: 0 1 280px;
        min-width: 200px;
    }

.lw-rpt-filter-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.lw-rpt-empty {
    padding: 28px 16px;
    text-align: center;
    color: var(--mud-palette-text-secondary);
}

.lw-rpt-runbar {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 10px 16px;
    padding: 14px 16px;
    font-size: 0.875rem;
}

.lw-rpt-filtertext {
    font-size: 0.8125rem;
    margin-top: 2px;
}

.lw-rpt-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.lw-rpt-summary {
    margin: 0 16px 14px;
    padding: 12px 14px;
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 8px;
    max-width: 480px;
    background: color-mix(in srgb, var(--mud-palette-primary) 4%, var(--mud-palette-surface));
}

    .lw-rpt-summary table {
        width: 100%;
        border-collapse: collapse;
        font-size: 0.875rem;
    }

    .lw-rpt-summary th {
        text-align: left;
        font-weight: 600;
        padding: 4px 6px;
        border-bottom: 1px solid var(--mud-palette-lines-default);
    }

    .lw-rpt-summary td {
        padding: 4px 6px;
    }

    .lw-rpt-summary .lw-rpt-sum td {
        font-weight: 700;
        border-top: 1px solid var(--mud-palette-lines-default);
    }

.lw-rpt-pager {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px 10px;
    padding: 6px 16px;
    font-size: 0.8125rem;
    color: var(--mud-palette-text-secondary);
}

.lw-rpt-pagesize {
    font: inherit;
    color: var(--mud-palette-text-primary);
    background: var(--mud-palette-surface);
    border: 1px solid var(--mud-palette-lines-inputs);
    border-radius: 4px;
    padding: 2px 4px;
}

.lw-rpt-scroll {
    overflow-x: auto;
    width: 100%;
}

.lw-rpt-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8125rem;
}

    .lw-rpt-table th {
        position: sticky;
        top: 0;
        background: var(--mud-palette-background-gray);
        border-bottom: 1px solid var(--mud-palette-lines-default);
        padding: 0;
        white-space: nowrap;
        text-align: left;
    }

    .lw-rpt-table td {
        padding: 6px 10px;
        border-bottom: 1px solid var(--mud-palette-table-lines);
        white-space: nowrap;
    }

    .lw-rpt-table th.lw-num .lw-rpt-sort {
        justify-content: flex-end;
    }

.lw-rpt-sort {
    display: flex;
    align-items: center;
    gap: 4px;
    width: 100%;
    padding: 8px 10px;
    border: 0;
    background: none;
    font: inherit;
    font-weight: 600;
    color: var(--mud-palette-text-primary);
    cursor: pointer;
    text-align: inherit;
}

    .lw-rpt-sort:hover {
        background: var(--mud-palette-action-default-hover);
    }

    .lw-rpt-sort:focus-visible {
        outline: 2px solid var(--mud-palette-primary);
        outline-offset: -2px;
    }

.lw-rpt-arrow {
    font-size: 0.7rem;
    color: var(--mud-palette-text-disabled);
}

    .lw-rpt-arrow.on {
        color: var(--mud-palette-primary);
    }

.lw-rpt-table td a {
    color: var(--mud-palette-primary);
    text-decoration: none;
}

    .lw-rpt-table td a:hover {
        text-decoration: underline;
    }

.lw-rpt-group td {
    font-weight: 600;
    background: color-mix(in srgb, var(--mud-palette-primary) 6%, var(--mud-palette-surface));
}

.lw-rpt-subtotal td {
    font-weight: 600;
    background: var(--mud-palette-background-gray);
}

.lw-rpt-total td {
    font-weight: 700;
    border-top: 2px solid var(--mud-palette-lines-default);
}

.lw-rpt-printhead {
    display: none;
}

@page lw-report {
    size: landscape;
    margin: 12mm 10mm;

    @bottom-right {
        content: "Page " counter(page) " of " counter(pages);
        font-size: 9pt;
        color: #5b6475;
    }
}

@media print {
    .lw-rpt {
        page: lw-report;
        color: #1a1a1a;
    }

    .lw-rpt-printhead {
        display: block;
        margin-bottom: 10px;
        font-size: 9pt;
    }

    .lw-rpt-printtitle {
        font-size: 14pt;
        font-weight: 700;
    }

    .lw-rpt-card {
        box-shadow: none !important;
        overflow: visible;
    }

    .lw-rpt-scroll {
        overflow: visible;
    }

    .lw-rpt-table {
        font-size: 8pt;
    }

        .lw-rpt-table th {
            position: static;
        }

        .lw-rpt-table td {
            padding: 3px 6px;
            white-space: normal;
        }

    .lw-rpt-arrow {
        display: none;
    }

    .lw-rpt-table tr {
        break-inside: avoid;
    }

    .lw-rpt-summary {
        margin: 0 0 10px;
        break-inside: avoid;
    }
}

@media (max-width: 599.98px) {
    .lw-rpt-filters .lw-rpt-filter,
    .lw-rpt-filters .lw-rpt-filter-wide {
        flex: 1 1 100%;
        min-width: 0;
    }

    .lw-rpt-runbar {
        padding: 12px;
    }

    .lw-rpt-summary {
        margin: 0 12px 12px;
    }
}

/* My settings › Appearance › Time zone (#12928, prototype v139): the province picker and the box saying which zone is in use. */
/* The text keeps at least 240 px: when the picker doesn't fit beside it, it goes on its own line under it. */
.lw-set-row-wrap {
    flex-wrap: wrap;
}
@media (min-width: 600px) {
    .lw-set-row-wrap > .lw-set-row-text {
        flex: 1 1 240px;
    }
}
.lw-set-tz-control {
    width: 330px;
    max-width: 100%;
}
.lw-set-tzbox {
    margin: 0 0 12px;
    padding: 10px 12px;
    border-radius: 6px;
    background: var(--mud-palette-background-gray, #f3f7fc);
    border: 1px solid var(--mud-palette-lines-default, #dbe6f3);
    font-size: 0.8125rem;
}
.lw-set-tzbox p {
    margin: 0 0 6px;
}
.lw-set-tzbox p:last-child {
    margin: 0;
}
.lw-set-tzbox .lw-set-tzwarn {
    color: #8a4b00;
    background: #fdf1e0;
    border-left: 4px solid #c77700;
    padding: 6px 10px;
    border-radius: 4px;
}
.lw-set-tzbox .lw-set-tzhint {
    color: var(--mud-palette-text-secondary);
}

/* Users › Companies (Nov 19): the picker with its "Adding to Venue Financial…" note under it, as one box beside the label. */
.lw-org-users .lw-org-companies-box {
    flex: 1 1 auto;
    min-width: 0;
}

/* Company details (Daniel, Nov 18, #12948, prototype v141): a note under a section head, then one block per province's payday
   lender licence with its regulator and standing; an expired licence, or one expiring within 60 days, reads in red here and
   on the Company row. */
.lw-org-form-note {
    margin: -4px 0 8px;
    font-size: 0.8125rem;
    color: var(--mud-palette-text-secondary);
}

.lw-org-licence {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--mud-palette-lines-default);
}

.lw-org-licence-head {
    margin-bottom: 4px;
}

.lw-org-licence-head > b {
    display: block;
    font-weight: 600;
}

.lw-org-licence-head > span {
    display: block;
    font-size: 0.8125rem;
    color: var(--mud-palette-text-secondary);
    overflow-wrap: break-word;
}

.lw-org-licence-warn,
.lw-set-row-text span.lw-org-licence-warn {
    color: var(--mud-palette-error);
    font-weight: 600;
}
/* New payday loan › Checks before the loan (#13008, prototype v156): one row per check, its icon, name, source, detail and result. */
.lw-chks {
    list-style: none;
    margin: 0;
    padding: 0;
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 6px;
    background: var(--mud-palette-surface);
}
.lw-chk {
    display: grid;
    grid-template-columns: 26px minmax(0, 1fr) auto;
    gap: 12px;
    align-items: start;
    padding: 12px 14px;
}
.lw-chk + .lw-chk {
    border-top: 1px solid var(--mud-palette-lines-default);
}
.lw-chk.bad { background: #fff8f8; }
.lw-chk.ovn, .lw-chk.note { background: #fffbf3; }
.lw-chk-ic {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: .8125rem;
    font-weight: 700;
    background: #2e7d32;
}
.lw-chk.bad .lw-chk-ic { background: #c62828; }
.lw-chk.ovn .lw-chk-ic, .lw-chk.note .lw-chk-ic { background: #b3261e; }
.lw-chk.ovd .lw-chk-ic { background: #2262ac; }
.lw-chk-name {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    font-size: .8125rem;
}
.lw-chk-src {
    font-style: normal;
    font-size: .6875rem;
    font-weight: 700;
    color: var(--mud-palette-text-secondary);
    background: var(--mud-palette-background-gray);
    border-radius: 4px;
    padding: 1px 6px;
}
.lw-chk-detail {
    margin: 4px 0 0;
    font-size: .8125rem;
    line-height: 1.45;
    overflow-wrap: anywhere;
}
.lw-chk-act {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-top: 6px;
}
.lw-chkbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 12px;
    margin-bottom: 12px;
    border-radius: 4px;
    font-size: .8125rem;
}
.lw-chkbar > span { flex: 1 1 320px; }
.lw-chkbar.ok { background: #e8f3e9; color: #1b5e20; }
.lw-chkbar.bad { background: #fbe9e9; color: #8e1d1d; }
.lw-theme-dark .lw-chk.bad { background: rgba(242, 114, 111, 0.08); }
.lw-theme-dark .lw-chk.ovn, .lw-theme-dark .lw-chk.note { background: rgba(246, 176, 77, 0.08); }
.lw-theme-dark .lw-chkbar.ok { background: rgba(108, 192, 112, 0.14); color: #8fd793; }
.lw-theme-dark .lw-chkbar.bad { background: rgba(242, 114, 111, 0.14); color: #f59a97; }
@media (max-width: 599.98px) {
    .lw-chk { grid-template-columns: 24px minmax(0, 1fr); }
    .lw-chk > .lw-chip, .lw-chk > .mud-chip, .lw-chk > span:last-child { grid-column: 2; justify-self: start; }
}

/* Client Information › Payday lending (#13015, prototype v156). */
.lw-pl-state {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    font-size: .8125rem;
    color: var(--mud-palette-text-secondary);
}
.lw-pl-override {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
    font-size: .75rem;
    color: var(--mud-palette-text-secondary);
}
/* Settings › Company › Provinces we lend in (#13021, prototype v156): the status's reason under its chip, and the dialog's effects. */
.lw-prov-status {
    min-width: 0;
}
.lw-prov-why {
    margin-top: 4px;
    font-size: .75rem;
    color: var(--mud-palette-text-secondary);
    max-width: 420px;
}
.lw-prov-table .mud-table-cell {
    vertical-align: top;
}
@media (min-width: 600px) {
    .lw-prov-table th.mud-table-cell { white-space: nowrap; }
    .lw-prov-table .mud-table-cell:nth-child(1) { width: 1%; white-space: nowrap; }
    .lw-prov-table .mud-table-cell:nth-child(2) { width: 1%; }
    .lw-prov-table .mud-table-cell:nth-child(3) { min-width: 200px; }
    .lw-prov-table .mud-table-cell:nth-child(4) { min-width: 120px; }
    .lw-prov-table .mud-table-cell:nth-child(6) { width: 1%; }
}
.lw-prov-effects {
    margin: 0 0 12px;
    padding-left: 20px;
    font-size: .8125rem;
}
.lw-prov-effects li + li {
    margin-top: 4px;
}

/* Home's Customize button (Fatih, Nov 19, 2026): prototype v141's outlined button (white, a 1 px border and text in the
   company's colour, 36 px high, 4 px corners, semi-bold) with our tune icon, filling with the company's colour on hover. */
.mud-button-root.lw-customize-btn {
    height: 36px;
    padding: 0 16px;
    border: 1px solid var(--mud-palette-primary);
    border-radius: 4px;
    background-color: var(--mud-palette-surface);
    color: var(--mud-palette-primary);
    font-weight: 600;
    white-space: nowrap;
    transition: background-color var(--lw-duration-fast) var(--lw-ease), color var(--lw-duration-fast) var(--lw-ease);
}

.mud-button-root.lw-customize-btn:hover {
    border-color: var(--mud-palette-primary);
    background-color: var(--mud-palette-primary);
    color: var(--mud-palette-primary-text);
}

/* ---- Employee Dashboard (#12986) and Book of Business Dashboard (#12987), prototype v141 ---- */
.lw-ed-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.lw-ed-refreshed {
    font-size: 12px;
    color: var(--mud-palette-text-secondary);
}

/* Full screen: the grid card fills the window, above the top bar, below dialogs and messages. */
.lw-ed-gridwrap.lw-ed-full {
    position: fixed;
    inset: 0;
    z-index: 1350;
    overflow: auto;
    background: var(--mud-palette-surface);
}

.lw-ed-gridwrap.lw-ed-full .lw-ed-card {
    min-height: 100%;
    border-radius: 0;
}

/* Padding at both sides of the grid; on a narrow screen the grid scrolls inside its card, never the page. */
.lw-ed-box {
    padding: 4px 16px 0;
    overflow-x: auto;
}

.lw-ed-full .lw-ed-box {
    padding: 4px 24px 0;
}

.lw-ed-grid.mud-table {
    background: transparent;
}

.lw-ed-grid table {
    width: 100%;
}

/* The prototype's tighter cells, so all eleven columns fit beside the menu without scrolling sideways. */
.lw-ed-grid.mud-table .mud-table-row .mud-table-cell {
    padding: 9px 8px;
}

.lw-ed-grid .mud-table-head .mud-table-cell {
    white-space: normal;
    vertical-align: bottom;
    line-height: 1.25;
    font-weight: 700;
    color: var(--mud-palette-text-secondary);
}

/* Headings wrap to two lines: the label flows as text, and the sort arrow shows only on the sorted column (the prototype's
   ▲/▼ after the heading) instead of keeping an empty arrow's width in every heading. */
.lw-ed-grid .mud-table-head .mud-table-sort-label {
    display: inline;
    white-space: normal;
}

.lw-ed-grid .mud-table-head .mud-table-sort-label-icon {
    width: 14px;
    height: 14px;
    margin: 0 0 0 2px;
    vertical-align: -2px;
}

.lw-ed-grid .mud-table-head .mud-table-sort-label-icon.mud-direction-none {
    display: none;
}

.lw-ed-grid th.lw-ed-num {
    text-align: right;
}

.lw-ed-grid td.lw-ed-num {
    text-align: right;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.lw-ed-grid td.lw-ed-name {
    white-space: nowrap;
}

.lw-ed-neg {
    color: var(--mud-palette-error);
}

/* Growth % and Total Revenue in red when negative, in every row (above the table's own cell colours, both themes). */
.lw-ed-grid.mud-table .mud-table-row .mud-table-cell.lw-ed-neg {
    color: var(--mud-palette-error);
}

.lw-ed-grid.mud-table .lw-ed-filters .mud-table-cell {
    padding: 6px 4px;
    vertical-align: middle;
}

.lw-ed-filter {
    width: 100%;
    min-width: 52px;
    height: 28px;
    box-sizing: border-box;
    padding: 0 6px;
    font: inherit;
    font-size: 12px;
    color: var(--mud-palette-text-primary);
    background: var(--mud-palette-surface);
    border: 1px solid var(--mud-palette-lines-inputs);
    border-radius: 4px;
}

.lw-ed-filter:focus {
    outline: 2px solid var(--mud-palette-primary);
    outline-offset: -1px;
}

.lw-ed-person {
    font-weight: 700;
    color: var(--mud-palette-primary);
    text-decoration: none;
}

.lw-ed-person:hover,
.lw-ed-person:focus-visible {
    text-decoration: underline;
}

/* Unassigned: directly above the Company Total, italic grey, not bold (#12986). */
.lw-ed-grid .lw-ed-unassigned .mud-table-cell {
    background: var(--mud-palette-background-gray);
    color: var(--mud-palette-text-secondary);
    font-style: italic;
    font-weight: 400;
}

.lw-ed-grid .lw-ed-unassigned .lw-ed-person {
    font-weight: 600;
    color: var(--mud-palette-text-secondary);
}

/* The Company Total: bold and pinned at the bottom. */
.lw-ed-grid .lw-ed-total .mud-table-cell {
    font-weight: 700;
    color: var(--mud-palette-primary);
    background: color-mix(in srgb, var(--mud-palette-primary) 7%, var(--mud-palette-surface));
    border-top: 2px solid var(--mud-palette-lines-default);
}

.lw-theme-dark .lw-ed-grid .lw-ed-total .mud-table-cell {
    color: var(--mud-palette-text-primary);
}

.lw-ed-grid .mud-table-foot .mud-table-cell {
    font-size: inherit;
}

.lw-ed-note {
    margin: 0;
    padding: 10px 24px;
    font-size: 12px;
    color: var(--mud-palette-text-secondary);
}

.lw-ed-foot {
    border-top: 1px solid var(--mud-palette-lines-default);
    padding-bottom: 16px;
}

/* Book of Business Dashboard (#12987): the prototype's own colours (v141) on this page whatever the company's brand, so Venue's
   red brand never reads as "late". Dark: the same colours as the prototype's dark view (inverted, hue turned back), on the app's
   dark surfaces. */
.lw-bb-page {
    --bb-navy: #004077;
    --bb-blue: #2262ac;
    --bb-red: #c62828;
    --bb-green: #1d7a46;
    --bb-ink: #243248;
    --bb-muted: #5f6e87;
    --bb-line: #e3e8f0;
    --bb-line-soft: #eef1f6;
    --bb-track: #e3e8f0;
    --bb-surface: #ffffff;
    --bb-banner: #004077;
    --bb-banner-ink: #ffffff;
    --bb-alert: #e6f2f7;
    --bb-alert-ink: #004077;
    --bb-shadow: 0 1px 2px rgba(16, 24, 40, 0.06), 0 4px 12px rgba(16, 24, 40, 0.07);
    --bb-pp-on: #eef4fa;
    --bb-amber: #b26a00;
    --bb-pp-next: #fdf6e7;
    --bb-pp-next-line: #f3dfb3;
    --bb-pp-next-ink: #5a4300;
    --bb-pp-top: #e3f4e5;
    --bb-pp-top-line: #bfe3c5;
    --bb-pp-top-ink: #1b5e20;
    --bb-pp-pay-sub: #cfe3f6;
    --bb-field: #ffffff;
    --bb-field-ink: #243248;
    --bb-field-line: #cdd5e1;
    --bb-field-line-hover: #8a97ab;
    --bb-field-icon: #5f6e87;
}

.lw-theme-dark .lw-bb-page {
    /* The pickers as the app's other dark fields: the card surface, light text, the inputs' own border (Fatih, Nov 19). */
    --bb-field: var(--mud-palette-surface);
    --bb-field-ink: var(--mud-palette-text-primary);
    --bb-field-line: var(--mud-palette-lines-inputs);
    --bb-field-line-hover: var(--mud-palette-text-secondary);
    --bb-field-icon: var(--mud-palette-text-secondary);
    --bb-navy: #8fc2ee;
    --bb-blue: #71a4e0;
    --bb-red: #f08c8c;
    --bb-green: #5faa80;
    --bb-ink: #c4cddb;
    --bb-muted: #8f9bb0;
    --bb-line: #2c3444;
    --bb-line-soft: #262d3b;
    --bb-track: #2f3747;
    --bb-surface: var(--mud-palette-surface);
    --bb-banner: #8fc2ee;
    --bb-banner-ink: #0f1621;
    --bb-alert: #1f2c3d;
    --bb-alert-ink: #9fc8ef;
    --bb-shadow: none;
    --bb-pp-on: #1c2838;
    --bb-amber: #e0a64a;
    --bb-pp-next: #2b2517;
    --bb-pp-next-line: #54451f;
    --bb-pp-next-ink: #e8cf8f;
    --bb-pp-top: #172a1d;
    --bb-pp-top-line: #2e5235;
    --bb-pp-top-ink: #9fd3a8;
    --bb-pp-pay-sub: #24405e;
}

.lw-bb-back {
    display: inline-block;
    margin-bottom: 8px;
    font-size: 13px;
}

.lw-bb-page .lw-bb-back,
.lw-bb-page .lw-bb-back:hover {
    color: var(--bb-blue);
}

/* The two pickers: the label above the box, as the prototype's fields; white with dark text in the light theme, the app's dark
   field in the dark one (Fatih, Nov 19). */
.lw-bb-pickers {
    display: flex;
    gap: 10px;
    align-items: flex-end;
    flex-wrap: wrap;
}

.lw-bb-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.lw-bb-field.lw-bb-book {
    width: 260px;
    max-width: 100%;
}

.lw-bb-field.lw-bb-month {
    width: 200px;
    max-width: 100%;
}

.lw-bb-field-label {
    font-size: 12px;
    font-weight: 600;
    line-height: 16px;
    color: var(--bb-muted);
}

.lw-bb-select.mud-input-control {
    margin: 0;
}

.lw-bb-select .mud-input.mud-input-outlined {
    min-height: 36px;
    border-radius: 4px;
    background: var(--bb-field);
    color: var(--bb-field-ink);
}

.lw-bb-select .mud-input.mud-input-outlined .mud-input-slot,
.lw-bb-select .mud-input.mud-input-outlined input,
.lw-bb-select .mud-select-input {
    color: var(--bb-field-ink);
    font-size: 13px;
    font-weight: 500;
}

.lw-bb-select .mud-input.mud-input-outlined .mud-input-outlined-border {
    border-color: var(--bb-field-line);
}

.lw-bb-select .mud-input.mud-input-outlined:hover .mud-input-outlined-border {
    border-color: var(--bb-field-line-hover);
}

.lw-bb-select .mud-input.mud-input-outlined.mud-input-adorned-end .mud-input-adornment,
.lw-bb-select .mud-input-adornment .mud-icon-root,
.lw-bb-select .mud-select .mud-icon-root {
    color: var(--bb-field-icon);
}

.lw-bb-select .mud-input-control-input-container {
    background: transparent;
}

.lw-bb-alert {
    margin-bottom: 16px;
    padding: 10px 12px;
    border-radius: 4px;
    font-size: 13px;
    background: var(--bb-alert);
    color: var(--bb-alert-ink);
}

.lw-bb-grid {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: 16px;
    align-items: stretch;
}

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

/* The prototype's card: white, a light border and shadow, the heading with its "As of" note on one line. The loan book card is
   the same height as the tiles beside it, with padding on all sides. */
.lw-bb-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    border: 1px solid var(--bb-line);
    border-radius: 4px;
    background: var(--bb-surface);
    box-shadow: var(--bb-shadow);
    color: var(--bb-ink);
}

.lw-bb-card-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    flex-wrap: wrap;
    padding: 18px 24px;
    border-bottom: 1px solid var(--bb-line-soft);
}

.lw-bb-card-head h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--bb-ink);
}

.lw-bb-card-head span {
    font-size: 12px;
    color: var(--bb-muted);
}

.lw-bb-donut-body {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    padding: 28px 32px;
}

.lw-bb-donut {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 32px;
    width: 100%;
}

.lw-bb-ring {
    position: relative;
    flex: none;
    width: 230px;
    height: 230px;
}

.lw-bb-ring svg {
    display: block;
    width: 100%;
    height: 100%;
}

.lw-bb-track {
    stroke: var(--bb-track);
}

.lw-bb-cur {
    stroke: var(--bb-blue);
}

.lw-bb-late {
    stroke: var(--bb-red);
}

/* The fill, as one sweep round the ring: a single progress (--lw-bb-p, 0 to 100) eases in and out once, and each part shows the
   piece of the sweep that falls in its share: the current part from the top up to its share (--lw-bb-c), the late part from
   there to the end (--lw-bb-l). So a ring all current or all late, a sliver of either, or an empty book (both 0: the track only)
   all sweep the same way, and the seam between the parts never moves. A later book or month changes the shares, which ease to
   their new sizes (the parts morph together). Registered so they can be eased; without @property the ring simply appears. */
@property --lw-bb-p {
    syntax: '<number>';
    inherits: true;
    initial-value: 0;
}

@property --lw-bb-c {
    syntax: '<number>';
    inherits: true;
    initial-value: 0;
}

@property --lw-bb-l {
    syntax: '<number>';
    inherits: true;
    initial-value: 0;
}

.lw-bb-donut {
    --lw-bb-p: 0;
    transition: --lw-bb-p 1200ms cubic-bezier(0.65, 0, 0.35, 1), --lw-bb-c 700ms cubic-bezier(0.4, 0, 0.2, 1),
        --lw-bb-l 700ms cubic-bezier(0.4, 0, 0.2, 1);
}

.lw-bb-donut.lw-bb-filled {
    --lw-bb-p: 100;
}

.lw-bb-arc {
    stroke-linecap: butt;
}

/* Each part is one dash and a gap of the rest of the ring (dash + gap = the ring's 100), so the pattern repeats exactly once round
   the circle and a part that starts before the circle's own start (3 o'clock) wraps on past it. */
.lw-bb-cur {
    --lw-bb-cur-len: min(var(--lw-bb-p), var(--lw-bb-c));
    stroke-dasharray: calc(var(--lw-bb-cur-len) * 1px) calc((100 - var(--lw-bb-cur-len)) * 1px);
    stroke-dashoffset: 25px;
}

.lw-bb-late {
    --lw-bb-late-len: clamp(0, var(--lw-bb-p) - var(--lw-bb-c), var(--lw-bb-l));
    stroke-dasharray: calc(var(--lw-bb-late-len) * 1px) calc((100 - var(--lw-bb-late-len)) * 1px);
    stroke-dashoffset: calc((25 - var(--lw-bb-c)) * 1px);
}

/* The total and the legend fade up once the sweep has started. */
.lw-bb-mid,
.lw-bb-key,
.lw-bb-counts {
    transition: opacity 450ms ease, transform 450ms cubic-bezier(0.22, 0.61, 0.36, 1);
}

.lw-bb-donut:not(.lw-bb-filled) .lw-bb-mid,
.lw-bb-donut:not(.lw-bb-filled) .lw-bb-key,
.lw-bb-donut:not(.lw-bb-filled) .lw-bb-counts {
    opacity: 0;
    transform: translateY(6px);
}

.lw-bb-donut:not(.lw-bb-filled) .lw-bb-mid {
    transform: scale(0.96);
}

.lw-bb-filled .lw-bb-mid {
    transition-delay: 300ms;
}

.lw-bb-filled .lw-bb-key:nth-child(1) {
    transition-delay: 450ms;
}

.lw-bb-filled .lw-bb-key:nth-child(2) {
    transition-delay: 550ms;
}

.lw-bb-filled .lw-bb-counts {
    transition-delay: 650ms;
}

@media (prefers-reduced-motion: reduce) {
    .lw-bb-donut,
    .lw-bb-mid,
    .lw-bb-key,
    .lw-bb-counts {
        transition: none;
    }
}

.lw-bb-mid {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 0 36px;
    text-align: center;
}

.lw-bb-mid b {
    font-size: 24px;
    line-height: 1.1;
    color: var(--bb-navy);
    overflow-wrap: anywhere;
}

.lw-bb-mid small,
.lw-bb-label,
.lw-bb-tile > span {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--bb-muted);
}

/* "Total loan book" on one line, as in the prototype: it fits the ring's hole at both ring sizes. */
.lw-bb-mid small {
    letter-spacing: 0.08em;
    white-space: nowrap;
}

.lw-bb-legend {
    display: flex;
    flex: 1 1 200px;
    flex-direction: column;
    gap: 14px;
    min-width: 200px;
}

.lw-bb-key {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.lw-bb-key i {
    flex: none;
    width: 12px;
    height: 12px;
    margin-top: 4px;
    border-radius: 2px;
}

.lw-bb-key i.lw-bb-key-cur {
    background: var(--bb-blue);
}

.lw-bb-key i.lw-bb-key-late {
    background: var(--bb-red);
}

.lw-bb-key > div {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.lw-bb-key strong {
    font-size: 13px;
    color: var(--bb-ink);
}

.lw-bb-key b {
    font-size: 18px;
    color: var(--bb-navy);
    overflow-wrap: anywhere;
}

.lw-bb-key small {
    margin-left: 6px;
    font-size: 12px;
    color: var(--bb-muted);
}

.lw-bb-counts {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding-top: 10px;
    border-top: 1px solid var(--bb-line-soft);
    font-size: 13px;
    color: var(--bb-ink);
}

.lw-bb-right {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
}

.lw-bb-banner {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 14px;
    padding: 16px 24px;
    border-radius: 8px;
    background: var(--bb-banner);
    color: var(--bb-banner-ink);
}

.lw-bb-banner > span {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    opacity: 0.85;
}

.lw-bb-banner b {
    font-size: 30px;
    line-height: 1.1;
}

.lw-bb-banner small {
    font-size: 12px;
    opacity: 0.8;
}

.lw-bb-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.lw-bb-label {
    letter-spacing: 0.08em;
}

.lw-bb-tiles {
    display: grid;
    gap: 10px;
}

.lw-bb-tiles-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.lw-bb-tiles-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (max-width: 720px) {
    .lw-bb-tiles-3,
    .lw-bb-tiles-2 {
        grid-template-columns: minmax(0, 1fr);
    }

    .lw-bb-ring {
        width: 190px;
        height: 190px;
    }

    .lw-bb-mid small {
        font-size: 10px;
        letter-spacing: 0.05em;
    }

    .lw-bb-donut-body {
        padding: 20px 16px;
    }

    .lw-bb-card-head {
        padding: 14px 16px;
    }
}

.lw-bb-tile {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
    padding: 14px 18px;
    border: 1px solid var(--bb-line);
    border-radius: 8px;
    background: var(--bb-surface);
}

.lw-bb-tile > span {
    letter-spacing: 0.05em;
}

/* No value is cut off, however large (#12987): long amounts wrap inside their tile. */
.lw-bb-tile b {
    font-size: 22px;
    font-weight: 700;
    line-height: 1.2;
    color: var(--bb-navy);
    overflow-wrap: anywhere;
}

.lw-bb-tile small {
    font-size: 12px;
    color: var(--bb-muted);
}

.lw-bb-page .lw-bb-neg {
    color: var(--bb-red);
}

.lw-bb-page .lw-bb-pos {
    color: var(--bb-green);
}

.lw-bb-foot {
    margin: 16px 0 0;
    font-size: 12px;
    color: var(--bb-muted);
}

/* Performance pay (#13134, prototype v174 board 1e): four tiles (the pay one in navy), the sentence on which measure holds the
   book, the measures against every tier beside how the pay is worked out, then what the next tier needs. */
.lw-pp-pick {
    margin: 16px 0 0;
}

.lw-bb-card.lw-pp {
    margin-top: 16px;
}

.lw-pp-head span {
    display: block;
    margin-top: 2px;
}

.lw-pp-tiles {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    padding: 16px 24px 0;
}

@media (max-width: 900px) {
    .lw-pp-tiles {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.lw-pp-tiles > .lw-pp-pay {
    background: var(--bb-banner);
    border-color: var(--bb-banner);
}

.lw-pp-tiles > .lw-pp-pay > span,
.lw-pp-tiles > .lw-pp-pay > small {
    color: var(--bb-pp-pay-sub);
}

.lw-pp-tiles > .lw-pp-pay > b {
    color: var(--bb-banner-ink);
}

.lw-theme-dark .lw-pp-tiles > .lw-pp-pay > span,
.lw-theme-dark .lw-pp-tiles > .lw-pp-pay > small {
    color: var(--bb-banner-ink);
}

.lw-pp-why {
    margin: 0;
    padding: 12px 24px 0;
    font-size: 13px;
    color: var(--bb-ink);
}

.lw-pp-body {
    display: grid;
    grid-template-columns: minmax(0, 9fr) minmax(0, 4fr);
    gap: 16px;
    padding: 16px 24px;
}

@media (max-width: 1100px) {
    .lw-pp-body {
        grid-template-columns: minmax(0, 1fr);
    }
}

.lw-pp h3 {
    margin: 0 0 8px;
    font-size: 13px;
    font-weight: 700;
    color: var(--bb-ink);
}

.lw-pp h3 > small {
    margin-left: 8px;
    font-size: 12px;
    font-weight: 400;
    color: var(--bb-muted);
}

.lw-pp-measures {
    min-width: 0;
}

.lw-pp-scroll {
    overflow-x: auto;
    border: 1px solid var(--bb-line);
    border-radius: 8px;
}

.lw-pp-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    color: var(--bb-ink);
}

.lw-pp-table th,
.lw-pp-table td {
    padding: 8px 7px;
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid var(--bb-line-soft);
}

.lw-pp-table th {
    font-size: 12px;
    font-weight: 600;
    color: var(--bb-muted);
    white-space: nowrap;
}

.lw-pp-table th.lw-num,
.lw-pp-table td.lw-num {
    text-align: right;
    white-space: nowrap;
}

.lw-pp-table td.lw-pp-m {
    min-width: 120px;
    max-width: 170px;
}

.lw-pp-table td.lw-pp-m > b,
.lw-pp-table td.lw-pp-m > small {
    display: block;
}

.lw-pp-table td.lw-pp-m > small {
    font-size: 11px;
    color: var(--bb-muted);
}

.lw-pp-table td.lw-pp-c {
    color: var(--bb-muted);
    white-space: nowrap;
}

.lw-pp-table td.lw-pp-c.lw-pp-ok {
    color: var(--bb-green);
    font-weight: 600;
}

.lw-pp-table th.lw-pp-on,
.lw-pp-table td.lw-pp-on {
    background: var(--bb-pp-on);
}

.lw-pp-table th.lw-pp-on {
    color: var(--bb-navy);
    box-shadow: inset 0 3px 0 var(--bb-navy);
}

.lw-pp-tick {
    margin-right: 4px;
    font-style: normal;
}

.lw-pp-table td.lw-pp-reach {
    font-weight: 700;
    color: var(--bb-green);
    white-space: nowrap;
}

.lw-pp-table td.lw-pp-reach.lw-pp-hold {
    color: var(--bb-amber);
}

.lw-pp-table td.lw-pp-reach.lw-pp-no {
    color: var(--bb-red);
}

.lw-pp-table tr.lw-pp-rates > td {
    font-weight: 700;
    color: var(--bb-navy);
    border-top: 2px solid var(--bb-line);
    border-bottom: 0;
}

.lw-pp-calc {
    display: flex;
    flex-direction: column;
    align-self: start;
    min-width: 0;
    padding: 12px 16px;
    border: 1px solid var(--bb-line);
    border-radius: 8px;
}

.lw-pp-line {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 7px 0;
    border-bottom: 1px solid var(--bb-line-soft);
    font-size: 13px;
    color: var(--bb-ink);
}

.lw-pp-line > b {
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.lw-pp-line.lw-pp-in {
    padding-left: 12px;
    color: var(--bb-muted);
}

.lw-pp-line.lw-pp-total {
    border-top: 2px solid var(--bb-ink);
    font-weight: 700;
}

.lw-pp-line.lw-pp-final {
    margin-top: 8px;
    padding: 10px 12px;
    border: 0;
    border-radius: 6px;
    background: var(--bb-banner);
    color: var(--bb-banner-ink);
    font-size: 15px;
    font-weight: 700;
}

.lw-pp-hint {
    margin: 8px 0 0;
    font-size: 12px;
    color: var(--bb-muted);
}

.lw-pp-next {
    margin: 0 24px 16px;
    padding: 12px 16px;
    border: 1px solid var(--bb-pp-next-line);
    border-radius: 8px;
    background: var(--bb-pp-next);
    color: var(--bb-pp-next-ink);
    font-size: 13px;
}

.lw-pp-next > b {
    display: block;
    margin-bottom: 4px;
}

.lw-pp-next > ul {
    margin: 0;
    padding-left: 18px;
}

.lw-pp-next > p {
    margin: 6px 0 0;
}

.lw-pp-next.lw-pp-top {
    border-color: var(--bb-pp-top-line);
    background: var(--bb-pp-top);
    color: var(--bb-pp-top-ink);
}

.lw-pp-next.lw-pp-top > p {
    margin: 0;
}

.lw-bb-foot.lw-pp-foot {
    margin: 0;
    padding: 0 24px 16px;
}

@media (max-width: 720px) {
    .lw-pp-tiles,
    .lw-pp-why,
    .lw-pp-body {
        padding-left: 16px;
        padding-right: 16px;
    }

    .lw-pp-next {
        margin-left: 16px;
        margin-right: 16px;
    }

    .lw-bb-foot.lw-pp-foot {
        padding: 0 16px 16px;
    }
}

/* ---- Credit application (#13153, prototype v194 board 6e): two Letter-sized papers and the side panel. The papers stay
   white in the dark theme: they are the document as it prints. ---- */
.lw-ca { max-width: 1240px; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; }
.lw-ca-back { font-size: 13px; align-self: flex-start; }
.lw-ca-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.lw-ca-h1 { margin: 0; font-size: 24px; font-weight: 600; }
.lw-ca-who { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 6px; font-size: 13px; color: var(--mud-palette-text-secondary); }
.lw-ca-bar { display: flex; gap: 8px; flex-wrap: wrap; }
.lw-ca-banner { padding: 10px 14px; border-radius: 6px; font-size: 13px; line-height: 1.45; border: 1px solid; }
.lw-ca-banner-blue { background: #eef5fb; border-color: #bcd6ee; color: #12406b; }
.lw-ca-banner-amber { background: #fdf6ec; border-color: #f3d3a5; color: #7a4a00; }
.lw-ca-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; align-items: start; }
.lw-ca-papers { display: flex; flex-direction: column; gap: 20px; align-items: center; min-width: 0; }
.lw-ca-paper { width: 816px; max-width: 100%; min-height: 1056px; box-sizing: border-box; padding: 44px 56px 36px; background: #fff; color: #1d2939;
    border: 1px solid #dfe4ec; box-shadow: 0 2px 6px rgba(16, 24, 40, .08), 0 10px 28px rgba(16, 24, 40, .08); display: flex; flex-direction: column;
    gap: 18px; font-size: 12.5px; line-height: 1.45; }
.lw-ca-hd { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; padding-bottom: 14px; border-bottom: 3px solid #f6933e; }
.lw-ca-logo .lw-doc-logo { display: block; max-height: 46px; width: auto; }
.lw-ca-co { display: flex; flex-direction: column; align-items: flex-end; gap: 1px; text-align: right; font-size: 11px; color: #475467; }
.lw-ca-co b { font-size: 13px; color: #1d2939; }
.lw-ca-hd2 { display: flex; justify-content: space-between; gap: 12px; font-size: 11px; color: #667085; padding-bottom: 10px; border-bottom: 1px solid #e4e7ec; }
.lw-ca-title { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.lw-ca-title h2 { margin: 0; font-size: 26px; font-weight: 700; color: #004077; letter-spacing: -.01em; }
.lw-ca-title p { margin: 4px 0 0; font-size: 13px; color: #475467; }
.lw-ca-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.lw-ca-meta > div { display: flex; gap: 10px; font-size: 11px; color: #667085; }
.lw-ca-meta > div b { color: #1d2939; font-size: 12px; min-width: 110px; text-align: right; }
.lw-ca-stamp { display: inline-block; margin-top: 2px; padding: 3px 10px; border: 1.5px solid #98a2b3; border-radius: 4px; font-size: 11px; font-weight: 700;
    letter-spacing: .04em; text-transform: uppercase; color: #475467; text-align: right; }
.lw-ca-stamp-confirmed { border-color: #2e7d32; color: #2e7d32; background: #f1f8f2; }
.lw-ca-stamp-waiting { border-color: #2262ac; color: #2262ac; background: #f3f8fc; }
.lw-ca-stamp-replaced { border-color: #98a2b3; color: #667085; background: #f9fafb; }
.lw-ca-sec { display: flex; flex-direction: column; gap: 8px; }
.lw-ca-sec h3 { margin: 0; display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em;
    color: #004077; padding-bottom: 5px; border-bottom: 1px solid #e4e7ec; }
.lw-ca-sec h3 i { font-style: normal; display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; border-radius: 50%;
    background: #004077; color: #fff; font-size: 11px; letter-spacing: 0; }
.lw-ca-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 18px; }
.lw-ca-f { display: flex; flex-direction: column; gap: 1px; padding-bottom: 4px; border-bottom: 1px dotted #cfd4dc; min-width: 0; }
.lw-ca-f.wide { grid-column: span 2; }
.lw-ca-f span { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: #667085; }
.lw-ca-f b { font-size: 13px; font-weight: 600; color: #1d2939; overflow-wrap: anywhere; }
.lw-ca-f.miss b { color: #b42318; }
.lw-ca-f.miss { border-bottom-color: #f04438; }
.lw-ca-miss { margin: 0; color: #b42318; font-weight: 600; }
.lw-ca-note { margin: 0; font-size: 11.5px; color: #667085; }
.lw-ca-tabwrap { overflow-x: auto; }
.lw-ca-tab { width: 100%; border-collapse: collapse; font-size: 12px; }
.lw-ca-tab th { text-align: left; font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: #667085; background: #f4f6fb;
    padding: 6px 8px; border-bottom: 1px solid #e4e7ec; }
.lw-ca-tab td { padding: 7px 8px; border-bottom: 1px dotted #cfd4dc; font-weight: 600; }
.lw-ca-text { margin: 0; font-size: 12px; color: #344054; text-align: justify; }
.lw-ca-cons { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.lw-ca-cons li { display: flex; gap: 10px; align-items: flex-start; font-size: 12px; color: #344054; }
.lw-ca-box { flex: none; width: 15px; height: 15px; border: 1.5px solid #344054; border-radius: 2px; display: inline-flex; align-items: center;
    justify-content: center; font-size: 12px; font-weight: 700; line-height: 1; color: #2e7d32; margin-top: 1px; }
.lw-ca-box.on { border-color: #2e7d32; }
.lw-ca-sig { display: grid; grid-template-columns: 2fr 1fr 1.2fr; gap: 22px; margin-top: 10px; }
.lw-ca-sigline { display: flex; flex-direction: column; justify-content: flex-end; min-height: 62px; gap: 3px; }
.lw-ca-sigline > span { display: block; border-bottom: 1px solid #475467; }
.lw-ca-sigline small { font-size: 10px; text-transform: uppercase; letter-spacing: .05em; color: #667085; font-weight: 600; }
.lw-ca-sigline b { font-size: 13px; font-weight: 600; }
.lw-ca-sigline b.script { font-family: "Segoe Script", "Brush Script MT", "Lucida Handwriting", cursive; font-weight: 400; font-size: 24px; color: #1d3b8a; line-height: 1.1; }
.lw-ca-sigbox { border: 1px solid #d0dbe8; background: #f5f8fc; border-radius: 6px; padding: 10px 12px; }
.lw-ca-sigbox b { display: block; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: #2262ac; margin-bottom: 4px; }
.lw-ca-sigbox p { margin: 0; font-size: 12px; color: #344054; }
.lw-ca-cert { margin-top: 12px; border: 1px solid #d0e3d2; background: #f6fbf6; border-radius: 6px; padding: 10px 12px; }
.lw-ca-cert > b { display: block; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: #2e7d32; margin-bottom: 6px; }
.lw-ca-cert dl { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 4px 16px; }
.lw-ca-cert dl div { display: flex; flex-direction: column; }
.lw-ca-cert dt { font-size: 10px; color: #667085; }
.lw-ca-cert dd { margin: 0; font-size: 11.5px; font-weight: 600; overflow-wrap: anywhere; }
.lw-ca-foot { margin-top: auto; display: flex; justify-content: space-between; gap: 12px; padding-top: 10px; border-top: 1px solid #e4e7ec; font-size: 10px; color: #667085; }
.lw-ca-side { display: flex; flex-direction: column; gap: 14px; position: sticky; top: 12px; }
.lw-ca-card { padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; background: var(--mud-palette-surface); border: 1px solid var(--mud-palette-lines-default);
    border-radius: 8px; }
.lw-ca-cardh { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 4px 8px; }
.lw-ca-cardh h2 { margin: 0; font-size: 14px; font-weight: 600; }
.lw-ca-p { margin: 0; font-size: 12.5px; color: var(--mud-palette-text-secondary); line-height: 1.45; }
.lw-ca-muted { font-size: 11.5px; }
.lw-ca-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.lw-ca-steps li { display: grid; grid-template-columns: 24px 1fr auto; align-items: center; gap: 8px; padding: 5px 0; font-size: 12.5px; color: var(--mud-palette-text-secondary); }
.lw-ca-steps li i { font-style: normal; width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid #cdd5e1; display: inline-flex; align-items: center;
    justify-content: center; font-size: 11px; font-weight: 700; }
.lw-ca-steps li small { font-size: 11px; }
.lw-ca-steps li.done { color: var(--mud-palette-text-primary); }
.lw-ca-steps li.done i { background: #2e7d32; border-color: #2e7d32; color: #fff; }
.lw-ca-steps li.now { color: var(--mud-palette-primary); font-weight: 600; }
.lw-ca-steps li.now i { border-color: var(--mud-palette-primary); color: var(--mud-palette-primary); }
.lw-ca-changes { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.lw-ca-changes li { display: flex; flex-direction: column; gap: 1px; font-size: 12px; padding: 6px 8px; background: #fdf6ec; color: #3d2a00; border-radius: 4px; }
.lw-ca-changes b { font-weight: 600; }
.lw-ca-changes s { color: #98a2b3; }
.lw-ca-versions { display: flex; flex-direction: column; gap: 4px; }
.lw-ca-version { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; padding: 7px 10px; border: 1px solid var(--mud-palette-lines-default);
    border-radius: 4px; background: transparent; font: inherit; text-align: left; cursor: pointer; color: var(--mud-palette-text-primary); }
.lw-ca-version b { font-size: 12.5px; }
.lw-ca-version small { font-size: 11px; color: var(--mud-palette-text-secondary); }
.lw-ca-version.on { border-color: var(--mud-palette-primary); box-shadow: inset 3px 0 0 var(--mud-palette-primary); }
.lw-ca-version:focus-visible { outline: 2px solid var(--mud-palette-primary); outline-offset: 2px; }
.lw-ca-hist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.lw-ca-hist li { display: flex; flex-direction: column; gap: 1px; font-size: 12px; }
.lw-ca-hist small { color: var(--mud-palette-text-secondary); font-size: 11px; }
.lw-ca-hist span { color: var(--mud-palette-text-secondary); }

@media (max-width: 1100px) {
    .lw-ca-grid { grid-template-columns: minmax(0, 1fr); }
    .lw-ca-side { position: static; }
}

@media (max-width: 600px) {
    .lw-ca-paper { min-height: 0; padding: 22px 16px 18px; gap: 14px; }
    .lw-ca-hd, .lw-ca-title { flex-direction: column; align-items: stretch; }
    .lw-ca-co, .lw-ca-meta { align-items: flex-start; text-align: left; }
    .lw-ca-meta > div b { min-width: 0; text-align: left; }
    .lw-ca-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .lw-ca-sig { grid-template-columns: 1fr; gap: 10px; }
    .lw-ca-sigline { min-height: 44px; }
    .lw-ca-hd2, .lw-ca-foot { flex-direction: column; gap: 2px; }
    .lw-ca-cert dl { grid-template-columns: 1fr; }
}

/* The credit application in a new loan's documents (#13156): blue when no signature is needed, amber when it goes in the package. */
.lw-nl-ca { display: flex; flex-direction: column; gap: 4px; padding: 10px 12px; border-radius: 6px; border: 1px solid #bcd6ee; background: #eef5fb; color: #12406b; font-size: 13px; line-height: 1.45; }
.lw-nl-ca-in { border-color: #f3d3a5; background: #fdf6ec; color: #7a4a00; }
.lw-nl-ca ul { margin: 2px 0 0; padding-left: 18px; }

/* Send for e-signature (#13155). */
.lw-ca-send { border: 1px solid var(--mud-palette-lines-default); border-radius: 6px; padding: 8px 12px 10px; margin: 0; display: flex; flex-direction: column; gap: 2px; }
.lw-ca-send legend { font-size: 12px; font-weight: 600; padding: 0 4px; }
.lw-ca-send small { font-size: 11.5px; color: var(--mud-palette-text-secondary); }
.lw-ca-send-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.lw-ca-preview { border: 1px dashed var(--mud-palette-lines-default); border-radius: 6px; padding: 8px 12px; }
.lw-ca-preview span { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--mud-palette-text-secondary); }
.lw-ca-preview p { margin: 4px 0 0; font-size: 13px; }
.lw-ca-dl { margin: 4px 0 0; display: grid; grid-template-columns: 1fr; gap: 4px; }
.lw-ca-dl div { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; }
.lw-ca-dl dt { color: var(--mud-palette-text-secondary); }
.lw-ca-dl dd { margin: 0; font-weight: 600; text-align: right; overflow-wrap: anywhere; }
.lw-ca-test { border: 1px dashed #f6933e; border-radius: 6px; padding: 6px 10px; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; background: #fffaf4; }
.lw-ca-test span { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: #9a5b00; }
@media (max-width: 600px) { .lw-ca-send-grid { grid-template-columns: 1fr; } }
.lw-ca-sigbox dl { margin: 8px 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 4px 16px; }
.lw-ca-sigbox dl div { display: flex; flex-direction: column; }
.lw-ca-sigbox dt { font-size: 10px; color: #667085; }
.lw-ca-sigbox dd { margin: 0; font-size: 11.5px; font-weight: 600; color: #1d2939; overflow-wrap: anywhere; }
@media (max-width: 600px) { .lw-ca-sigbox dl { grid-template-columns: 1fr; } }
/* Credit application copies (#13161). */
.lw-org-copies-sub { margin: 0 0 10px; font-size: 13px; color: var(--mud-palette-text-secondary); line-height: 1.45; }
.lw-org-copies { overflow-x: auto; }
.lw-org-copies table { width: 100%; border-collapse: collapse; font-size: 13px; }
.lw-org-copies th { text-align: left; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--mud-palette-text-secondary); padding: 6px 8px; border-bottom: 1px solid var(--mud-palette-lines-default); }
.lw-org-copies td { padding: 8px; border-bottom: 1px solid var(--mud-palette-lines-default); vertical-align: middle; }
.lw-org-copies td:first-child { width: 75%; }
.lw-org-copies td b { display: block; font-weight: 600; }
.lw-org-copies td span { display: block; font-size: 12px; color: var(--mud-palette-text-secondary); }

/* Settings › Payments setup › EFT holidays (#13139, part 26a). */
.lw-eh-alert-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.lw-eh-alert-row > span { flex: 1 1 260px; }
.lw-eh-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.lw-eh-spacer { flex: 1 1 auto; }
.lw-eh-bar > .mud-input-control-boolean-input { flex: 0 0 auto; width: auto; white-space: nowrap; margin: 0; }
.lw-eh-bar > .mud-select { flex: 0 0 120px; max-width: 120px; }
.lw-eh-table td { vertical-align: middle; }
.lw-eh-date { font-weight: 600; white-space: nowrap; }
.lw-eh-off td { color: var(--mud-palette-text-secondary); }
.lw-eh-switch { display: flex; align-items: center; gap: 4px; }
@media (max-width: 600px) {
    .lw-eh-spacer { display: none; }
    .lw-eh-bar > .mud-input-control-boolean-input { flex-basis: 100%; }
    .lw-eh-bar > .mud-button-root { flex: 1 1 auto; }
}

/* Settings › Product rules › Government benefit pay dates (#13140, part 26a). */
.lw-bd-cards { overflow-x: auto; }
.lw-bd-table td { vertical-align: top; }
.lw-bd-note { font-size: 12px; }
.lw-bd-warn { font-size: 12px; color: var(--mud-palette-warning-darken); margin-top: 2px; }
.lw-bd-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.lw-bd-bar > .mud-input-control-boolean-input { flex: 0 0 auto; width: auto; white-space: nowrap; margin: 0; }
.lw-bd-pick { border: 1px solid var(--mud-palette-lines-default); border-radius: 8px; padding: 12px; margin-bottom: 10px; }
.lw-bd-calendar { max-width: 320px; }
.lw-bd-legend { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; color: var(--mud-palette-text-secondary); margin: 6px 0; }
.lw-bd-legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: -8px; }
.lw-bd-legend .lw-bd-off { background: #fde2e4; }
.lw-bd-legend .lw-bd-has { background: #d1fadf; }
.lw-bd-actions { display: flex; justify-content: flex-end; gap: 8px; }
.lw-bd-row-actions { white-space: nowrap; text-align: right; }
.lw-bd-calendar .mud-picker-calendar-day:disabled:not(.mud-hidden) { background: #fde2e4; border-radius: 50%; }
.lw-bd-calendar .lw-bd-day-has { background: #d1fadf; border-radius: 50%; }
@media (max-width: 600px) {
    .lw-bd-cards .lw-bd-table thead { display: none; }
    .lw-bd-cards .lw-bd-table tr { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; padding: 8px 0; border-bottom: 1px solid var(--mud-palette-lines-default); }
    .lw-bd-cards .lw-bd-table td { border: 0 !important; padding: 2px 8px !important; }
    .lw-bd-cards .lw-bd-table td:nth-child(1) { grid-column: 1 / -1; }
    .lw-bd-cards .lw-bd-table td:nth-child(2) { grid-column: 1; grid-row: 2; }
    .lw-bd-cards .lw-bd-table td:nth-child(3) { grid-column: 1; grid-row: 3; font-weight: 400; }
    .lw-bd-cards .lw-bd-table td:nth-child(4) { grid-column: 2; grid-row: 2 / span 2; align-self: center; }
    .lw-bd-cards .lw-bd-table td:nth-child(2)::before { content: "Next: "; font-weight: 400; color: var(--mud-palette-text-secondary); }
    .lw-bd-cards .lw-bd-table td:nth-child(3)::before { content: "Last on file: "; color: var(--mud-palette-text-secondary); }
}

/* Funding & Payments › EFT, the nightly file (#13011; prototype board 5d): the run cards (last night's checks and file, tonight's
   queue) with their figures as buttons, the Kept out of the file count on its segment, the kept-out table's bank and reasons, and
   Fix and re-queue's fields and live checks. One column on a phone. */
.lw-eft-segn {
    display: inline-block;
    min-width: 20px;
    margin-left: 6px;
    padding: 0 6px;
    border-radius: 10px;
    background: var(--mud-palette-error);
    color: var(--mud-palette-error-text);
    font-size: 0.75rem;
    line-height: 20px;
    text-align: center;
}
.lw-eft-runs {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.6fr) minmax(0, 0.8fr);
    gap: 10px;
}
.lw-eft-run {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 10px 12px;
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: var(--mud-default-borderradius);
    background: var(--mud-palette-surface);
}
.lw-eft-runh {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 4px 12px;
}
.lw-eft-runh span {
    color: var(--mud-palette-text-secondary);
    font-size: 0.8125rem;
}
.lw-eft-kpis {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}
.lw-eft-kpi {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    padding: 6px 10px;
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: var(--mud-default-borderradius);
    background: transparent;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
}
.lw-eft-kpi:hover:not(:disabled),
.lw-eft-kpi:focus-visible {
    border-color: var(--mud-palette-primary);
}
.lw-eft-kpi:disabled {
    cursor: default;
}
.lw-eft-kpi b {
    font-size: 1.25rem;
    line-height: 1.2;
}
.lw-eft-kpi span {
    color: var(--mud-palette-text-secondary);
    font-size: 0.8125rem;
}
.lw-eft-kpi.lw-bad {
    border-color: color-mix(in srgb, var(--mud-palette-error) 55%, var(--mud-palette-lines-default));
}
.lw-eft-kpi.lw-bad b {
    color: var(--mud-palette-error);
}
.lw-eft-kpi.lw-ok b {
    color: var(--mud-palette-success);
}
.lw-eft-kpi.lw-warn b {
    color: var(--mud-palette-warning);
}
/* The Settlement card holds up to 8 figures. */
.lw-eft-kpis.lw-eft-kpis-wide {
    grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
}
.lw-eft-bank {
    white-space: nowrap;
    font-size: 0.8125rem;
}
.lw-esign-grid td.lw-eft-why {
    min-width: 320px;
    max-width: 440px;
    white-space: normal;
}
.lw-eft-acts {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.lw-eft-acts .mud-button-root {
    white-space: nowrap;
}
.lw-eft-kv {
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr);
    gap: 4px 14px;
    margin: 0 0 12px;
    font-size: 0.875rem;
}
.lw-eft-kv dt {
    color: var(--mud-palette-text-secondary);
}
.lw-eft-kv dd {
    margin: 0;
}
.lw-eft-link {
    margin-left: 6px;
    padding: 0 4px;
    min-width: 0;
}
.lw-eft-fields {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 8px;
}
.lw-eft-fields.lw-eft-two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: center;
}
.lw-eft-checks {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 10px 12px;
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: var(--mud-default-borderradius);
    font-size: 0.875rem;
}
.lw-eft-ck {
    display: flex;
    align-items: baseline;
    gap: 8px;
}
.lw-eft-ck i {
    font-style: normal;
    font-weight: 700;
    width: 1em;
    text-align: center;
}
.lw-eft-ck.lw-ok i {
    color: var(--mud-palette-success);
}
.lw-eft-ck.lw-bad i {
    color: var(--mud-palette-error);
}
@media (max-width: 1279.98px) {
    .lw-eft-runs {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    }
}
@media (max-width: 959.98px) {
    .lw-eft-runs {
        grid-template-columns: minmax(0, 1fr);
    }
}
@media (max-width: 599.98px) {
    .lw-eft-kpis {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    /* The EFT lists' switch two by two (MudBlazor sets its columns inline). */
    .lw-fund-seg.mud-toggle-group-horizontal {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        align-self: stretch;
    }
    .lw-eft-fields,
    .lw-eft-fields.lw-eft-two {
        grid-template-columns: minmax(0, 1fr);
    }
    .lw-eft-kv {
        grid-template-columns: minmax(0, 1fr);
        gap: 0;
    }
    .lw-eft-kv dd {
        margin-bottom: 6px;
    }
}
/* The Preview for picker keeps its height in the group window's column (#12962). */
.lw-gm-preview > .mud-select,
.lw-gm-preview > .mud-input-control,
.lw-gm-compose > .mud-input-control {
    flex: 0 0 auto;
}
.lw-gm-actions {
    flex-wrap: wrap;
    gap: 8px;
}
.lw-gm-err {
    flex: 1 1 100%;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 600;
    color: #fff;
    background: var(--mud-palette-error);
}
@media (max-width: 700px) {
    .lw-gm-tiles3 {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    }
    .lw-gm-tile.lw-wide {
        grid-column: 1 / -1;
    }
}
/* Settings › Communications & system › Late and NSF reminders (#13019; prototype v202 board 8e): four columns that fit the card. */
.lw-rem-table table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    font-size: 0.8125rem;
}
.lw-rem-table th {
    text-align: left;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--mud-palette-text-secondary);
    padding: 6px 8px;
    border-bottom: 1px solid var(--mud-palette-lines-default);
}
.lw-rem-table th:nth-child(1) { width: 22%; }
.lw-rem-table th:nth-child(2) { width: 36%; }
.lw-rem-table th:nth-child(3) { width: 28%; }
.lw-rem-table th:nth-child(4) { width: 14%; }
.lw-rem-table td {
    vertical-align: top;
    padding: 8px;
    border-bottom: 1px solid var(--mud-palette-lines-default);
    overflow-wrap: anywhere;
}
.lw-rem-table td > b {
    display: block;
    font-weight: 600;
}
.lw-rem-hint {
    display: block;
    margin-top: 2px;
    font-size: 0.75rem;
    color: var(--mud-palette-text-secondary);
}
.lw-rem-tpl {
    display: block;
    margin-top: 2px;
    font-size: 0.75rem;
    cursor: pointer;
}
.lw-rem-act {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
}
/* On a phone each reminder becomes a block, its cells one under the other. */
@media (max-width: 700px) {
    .lw-rem-table thead {
        display: none;
    }
    .lw-rem-table table,
    .lw-rem-table tbody,
    .lw-rem-table tr,
    .lw-rem-table td {
        display: block;
        width: 100%;
    }
    .lw-rem-table tr {
        border-bottom: 1px solid var(--mud-palette-lines-default);
        padding: 6px 0;
    }
    .lw-rem-table td {
        border-bottom: 0;
        padding: 4px 0;
    }
    .lw-rem-act {
        flex-direction: row;
        align-items: center;
    }
}
/* Settings › Communications & system › Marketing texts (#13142; prototype v202 board 8e). */
.lw-mk-wording {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    gap: 16px;
    padding: 10px 0;
    border-bottom: 1px solid var(--mud-palette-lines-default);
    font-size: 0.875rem;
}
.lw-mk-wording b {
    display: block;
    margin-bottom: 4px;
}
.lw-mk-text {
    width: 100%;
    margin-top: 6px;
    padding: 8px 10px;
    border-radius: 6px;
    border: 1px solid var(--mud-palette-lines-inputs);
    background: var(--mud-palette-surface);
    color: var(--mud-palette-text-primary);
    font: inherit;
    resize: vertical;
}
.lw-mk-savebar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 10px 0;
}
.lw-mk-dirty {
    flex: 1 1 auto;
    font-weight: 600;
    font-size: 0.875rem;
}
.lw-mk-err {
    flex: 1 1 100%;
}
@media (max-width: 700px) {
    .lw-mk-wording {
        grid-template-columns: minmax(0, 1fr);
    }
}
/* The collections file's collector history (#13169; prototype v203 board 3c). */
.lw-ch-chip {
    display: inline-flex;
    align-items: center;
    gap: 2px;
}
.lw-ch-link {
    min-width: 0;
    padding: 0 6px;
    font-size: 0.75rem;
}
.lw-ch-table .lw-ch-now td {
    font-weight: 600;
    background: color-mix(in srgb, var(--mud-palette-primary) 6%, var(--mud-palette-surface));
}
.lw-ch-nw {
    white-space: nowrap;
}
/* A time control keeps its 160px width when a settings row stacks on a phone (its flex basis would become its height). */
@media (max-width: 700px) {
    .lw-org-time {
        flex: 0 0 auto;
    }
}
.lw-ch-table td {
    white-space: normal;
}
.lw-ch-table td.lw-ch-nw {
    white-space: nowrap;
}
/* Settings › Applications & consoles › Loans in the wrong stage (#13173): the list, stacked on phones; Fix stage asks in the card. */
.lw-ws-table td {
    vertical-align: top;
    white-space: normal;
}
.lw-ws-lid {
    font-weight: 600;
    color: var(--mud-palette-primary);
}
.lw-ws-hint {
    font-size: 12px;
    color: var(--mud-palette-text-secondary);
    line-height: 1.4;
}
.lw-ws-act {
    white-space: nowrap;
    text-align: right;
}
.lw-ws-ask .mud-alert-message {
    width: 100%;
}
.lw-ws-ask-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 8px;
}
@media (max-width: 700px) {
    .lw-ws-table thead {
        display: none !important;
    }
    .lw-ws-table tr {
        display: block !important;
        border-bottom: 1px solid var(--mud-palette-lines-default);
        padding: 6px 0;
    }
    .lw-ws-table td {
        display: block !important;
        border: none !important;
        padding: 2px 8px !important;
    }
    .lw-ws-table td[data-label]::before {
        content: attr(data-label);
        display: block;
        font-size: 11px;
        font-weight: 600;
        color: var(--mud-palette-text-secondary);
    }
    .lw-ws-act {
        text-align: left;
    }
}
/* Settings › Communications & system › Contact verification (#13168): the two time choices side by side; they stack on a phone. */
.lw-cv-times {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}
.lw-cv-times > .mud-select {
    flex: 0 0 150px;
    width: 150px;
}
/* Client Information › Address and contact: the verification line under a cell or email. */
.lw-cv-line {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 4px;
}
.lw-cv-meta {
    font-size: 12px;
    color: var(--mud-palette-text-secondary);
}
/* Verify cell phone (#13168): Send a new code on the left, Cancel and Verify on the right; wraps on a phone. */
.lw-cv-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    width: 100%;
}
.lw-cv-spacer {
    flex: 1 1 auto;
}
/* Settings › Data retention (#13170): the Keep for column, and the legal hold row (stacks on a phone). */
.lw-rt-keep .mud-select {
    width: 130px;
}
.lw-rt-hold {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}
.lw-rt-hold > .mud-input-control {
    flex: 1 1 160px;
    min-width: 140px;
}
/* The retention rules table has four text columns: it stacks below 1100px too, not only on a phone. */
@media (max-width: 1100px) {
    .lw-rt-table thead {
        display: none !important;
    }
    .lw-rt-table tr {
        display: block !important;
        border-bottom: 1px solid var(--mud-palette-lines-default);
        padding: 6px 0;
    }
    .lw-rt-table td {
        display: block !important;
        border: none !important;
        padding: 2px 8px !important;
    }
    .lw-rt-table td[data-label]::before {
        content: attr(data-label);
        display: block;
        font-size: 11px;
        font-weight: 600;
        color: var(--mud-palette-text-secondary);
    }
}
/* Credit bureau reporting (#13166): the result email with its Save. */
.lw-cr-email {
    display: flex;
    gap: 8px;
    align-items: center;
}

/* Google's address search (#12727, AddressSearchField): Google's terms ask for "Powered by Google" under its suggestions. */
.lw-address-google {
    padding: 4px 16px 6px;
    font-size: 0.75rem;
    color: var(--mud-palette-text-secondary);
    text-align: right;
}

/* ---- Tasks (#13175; prototype v207 boards 1 and 6): Home › My tasks and the client file's Tasks ----
   - the count pill beside the title; a row per task: its title and line (client · loan · For · From), the due chip, then Done,
     Take it and Open; on a phone the chip and the buttons go under the title;
   - the message under the header with Undo and Dismiss;
   - the dialog's client pick, the For segments and the details list. */
.lw-task-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 20px;
    padding: 0 7px;
    border-radius: 10px;
    background: var(--mud-palette-action-default-hover);
    color: var(--mud-palette-text-primary);
    font-size: 12px;
    font-weight: 700;
}
.lw-task-msg {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    margin: 10px 12px 0;
    border-radius: 6px;
    border: 1px solid rgba(var(--mud-palette-success-rgb), 0.45);
    background: rgba(var(--mud-palette-success-rgb), 0.10);
    color: var(--mud-palette-text-primary);
    font-size: 13px;
}
.lw-task-msg > .mud-icon-root {
    color: var(--mud-palette-success);
}
.lw-task-msg-text {
    flex: 1 1 auto;
}
.lw-task-empty {
    margin: 0;
    padding: 14px 16px;
    font-size: 13px;
    color: var(--mud-palette-text-secondary);
}
.lw-task-list {
    display: flex;
    flex-direction: column;
}
.lw-task-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    border-top: 1px solid var(--mud-palette-lines-default);
}
.lw-task-list .lw-task-row:first-child {
    border-top: none;
}
.lw-task-main {
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.lw-task-name {
    font-weight: 600;
    overflow-wrap: anywhere;
}
.lw-task-meta {
    font-size: 12px;
    color: var(--mud-palette-text-secondary);
}
.lw-task-acts {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    justify-content: flex-end;
}
.lw-task-donetext {
    font-size: 12px;
    color: var(--mud-palette-text-secondary);
}
.lw-task-donehd {
    padding: 10px 16px 4px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--mud-palette-text-secondary);
    border-top: 1px solid var(--mud-palette-lines-default);
}
@media (max-width: 599.98px) {
    .lw-task-row {
        grid-template-columns: minmax(0, 1fr);
        gap: 6px;
    }
    .lw-task-row .lw-task-acts {
        justify-content: flex-start;
    }
    /* The due chip at its own width under the title. */
    .lw-task-row > :nth-child(2) {
        justify-self: start;
    }
}
.lw-task-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 14px;
}
.lw-task-label {
    font-size: 12px;
    color: var(--mud-palette-text-secondary);
}
.lw-task-pick {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 6px 10px;
    border: 1px solid var(--mud-palette-lines-inputs);
    border-radius: 4px;
}
.lw-task-segs {
    align-self: flex-start;
}
.lw-task-kv {
    display: grid;
    grid-template-columns: 90px minmax(0, 1fr);
    gap: 6px 12px;
    margin: 0;
    font-size: 14px;
}
.lw-task-kv dt {
    color: var(--mud-palette-text-secondary);
}
.lw-task-kv dd {
    margin: 0;
}
.lw-task-note {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}
.lw-task-meta .mud-link {
    font-size: inherit;
    line-height: inherit;
}

/* ============================================================================
   Loading states (#13183; Daniel, Nov 26-27; prototype v213 board 1g). One timing everywhere (LoadTiming: nothing for
   300 ms, then at least 400 ms; "Still loading…" at 8 s; the error card at 30 s), the shared skeletons (LwPageSkeleton,
   LwTableSkeleton, LwCardSkeleton), the 3 px top bar, busy buttons (LwBusyButton), long tasks (LwTaskProgress), the error
   card (LwLoadError) and a table's status line (LwTableStatus). prefers-reduced-motion: static grey shapes, a still bar.
   ============================================================================ */

/* The top bar: 3 px under the app bar while any region is visibly loading (LoadingBar in MainLayout). */
.lw-topbar {
    position: fixed;
    left: 0;
    right: 0;
    top: calc(var(--lw-bar-top) + var(--lw-conn-on, 0px));
    height: 3px;
    overflow: hidden;
    z-index: 1301;
    background: color-mix(in srgb, var(--mud-palette-primary) 14%, transparent);
    pointer-events: none;
}

.lw-topbar::before,
.lw-reload-line::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 35%;
    border-radius: 2px;
    background: var(--mud-palette-primary);
    animation: lw-bar-run 1.1s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@keyframes lw-bar-run {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(300%);
    }
}

/* A skeleton keeps its space for its first 300 ms (nothing jumps) but shows nothing (fast loads never flicker). */
.lw-skel {
    position: relative;
    display: block;
    width: 100%;
}

.lw-skel:not(.lw-skel-on) {
    visibility: hidden;
}

.lw-skel .mud-skeleton {
    display: block;
    background-color: #e9edf3;
    border-radius: 4px;
    transform: none;
}

.lw-skel .mud-skeleton.lw-skel-tile {
    border-radius: 8px;
}

.lw-skel .mud-skeleton-wave::after {
    background: linear-gradient(90deg, rgba(255, 255, 255, 0) 0, rgba(255, 255, 255, 0.75) 50%, rgba(255, 255, 255, 0) 100%);
}

.lw-skel-gap {
    margin-bottom: 10px;
}

.lw-skel-gap-lg {
    margin-bottom: 16px;
}

.lw-skel-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.lw-skel-row > .mud-skeleton {
    max-width: 100%;
}

.lw-skel-tiles {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

@media (max-width: 899.98px) {
    .lw-skel-tiles {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

table.lw-skel-grid {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    background: var(--mud-palette-surface);
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 8px;
}

table.lw-skel-grid th {
    height: 37px;
    padding: 0 12px;
    text-align: left;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--mud-palette-text-secondary);
    border-bottom: 1px solid var(--mud-palette-lines-default);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

table.lw-skel-grid td {
    height: 38px;
    padding: 0 12px;
    border-bottom: 1px solid color-mix(in srgb, var(--mud-palette-lines-default) 60%, transparent);
}

table.lw-skel-grid tr:last-child td {
    border-bottom: 0;
}

table.lw-skel-grid td .mud-skeleton {
    height: 10px !important;
}

/* "Still loading… This is taking longer than usual." over the skeleton, with Try again. */
.lw-skel-slow {
    position: absolute;
    left: 50%;
    top: 48px;
    transform: translateX(-50%);
    z-index: 4;
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: calc(100% - 24px);
    box-sizing: border-box;
    padding: 10px 14px;
    background: var(--mud-palette-surface);
    border: 1px solid #f0d3a8;
    border-left: 4px solid #e0a040;
    border-radius: 6px;
    box-shadow: 0 6px 18px rgba(16, 24, 40, 0.12);
    font-size: 0.8125rem;
    color: var(--mud-palette-text-primary);
    visibility: visible;
}

@media (max-width: 599.98px) {
    .lw-skel-slow {
        flex-wrap: wrap;
        justify-content: center;
        text-align: center;
        width: calc(100% - 24px);
    }
}

/* Busy buttons: both labels share one grid cell, so the button keeps its width; the colour stays while busy. */
.lw-busy-labels {
    display: inline-grid;
    align-items: center;
    justify-items: center;
}

.lw-busy-labels > span {
    grid-area: 1 / 1;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.lw-busy-labels > span.lw-busy-hide {
    visibility: hidden;
}

.mud-progress-circular.lw-busy-spin {
    width: 14px !important;
    height: 14px !important;
    color: inherit;
    flex: none;
}

.lw-busy-btn.lw-busy-on {
    cursor: progress;
}

.lw-busy-btn.lw-busy-ok.mud-button-filled {
    background-color: #2e7d32 !important;
    border-color: #2e7d32;
    color: #ffffff !important;
}

.lw-busy-btn.lw-busy-ok:not(.mud-button-filled) {
    color: #2e7d32 !important;
}

/* The error card: in place of the content, never a popup. */
.lw-load-error {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    max-width: 560px;
    margin: 28px auto 0;
    padding: 18px 20px;
    box-sizing: border-box;
    background: var(--mud-palette-surface);
    border: 1px solid #f2c4c4;
    border-radius: 8px;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.06);
}

.lw-load-error-icon {
    flex: none;
    width: 34px !important;
    height: 34px !important;
    padding: 7px;
    box-sizing: border-box;
    border-radius: 50%;
    background: #fbe9e9;
}

.lw-load-error-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.lw-load-error-body > strong {
    font-size: 0.9375rem;
}

.lw-load-error-body > span {
    font-size: 0.8125rem;
    color: var(--mud-palette-text-secondary);
}

.lw-load-error-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.lw-load-error-ref {
    font-size: 0.75rem;
    color: var(--mud-palette-text-secondary);
}

.lw-load-error-ref b,
.lw-load-error-refid {
    font-family: Consolas, "SFMono-Regular", monospace;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--mud-palette-text-primary);
    background: color-mix(in srgb, var(--mud-palette-text-primary) 6%, transparent);
    border-radius: 4px;
    padding: 1px 6px;
}

.lw-load-error.lw-load-error-compact {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    max-width: none;
    margin: 0;
    padding: 0;
    border: 0;
    background: none;
    box-shadow: none;
    font-size: 0.75rem;
    color: #8e1d1d;
}

/* A table re-reading its rows: the rows stay, dimmed, with a thin line under the header (LwTable with a LoadState). */
.lw-reloading .mud-table-body,
.lw-reloading > tbody {
    opacity: 0.45;
    transition: opacity 0.2s;
}

.lw-reload-line {
    position: relative;
    height: 2px;
    overflow: hidden;
    background: color-mix(in srgb, var(--mud-palette-primary) 14%, transparent);
}

.lw-reload-line::before {
    width: 30%;
}

/* A list's status line: "Loading 25 of 1,284 loans…", "Updated just now". */
.lw-table-status {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    min-height: 32px;
    box-sizing: border-box;
    padding: 4px 2px;
    font-size: 0.75rem;
    color: var(--mud-palette-text-secondary);
}

.lw-table-status.lw-table-status-busy {
    color: var(--mud-palette-primary);
}

.lw-table-status.lw-table-status-slow {
    color: #7a4800;
}

.lw-table-status.lw-table-status-err {
    color: #8e1d1d;
}

/* The status line inside a list's count line ("Showing 12 of 40 loans · Updated just now"). */
.lw-table-status.lw-table-status-inline {
    display: inline-flex;
    min-height: 0;
    padding: 0;
    margin-left: 6px;
    vertical-align: middle;
}

.lw-table-status.lw-table-status-inline:not(:empty)::before {
    content: "·";
    margin-right: 2px;
    color: var(--mud-palette-text-secondary);
}

.lw-table-status.lw-table-status-inline .mud-button-root {
    padding: 0 6px;
    min-width: 0;
}

/* Long tasks: named steps, the time so far, Keep working after 10 s. */
.lw-longtask {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 14px 16px;
    background: var(--mud-palette-surface);
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 8px;
    box-shadow: 0 4px 14px rgba(16, 24, 40, 0.07);
    animation: lw-enter var(--lw-duration-base) var(--lw-ease);
}

.lw-longtask-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.lw-longtask-clock {
    font-variant-numeric: tabular-nums;
    color: var(--mud-palette-text-secondary);
    font-size: 0.8125rem;
}

.lw-longtask-who {
    margin-top: -8px;
    color: var(--mud-palette-text-secondary);
    font-size: 0.75rem;
}

.lw-longtask-steps {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.lw-longtask-steps li {
    display: flex;
    gap: 10px;
    align-items: center;
    font-size: 0.8125rem;
}

.lw-longtask-steps li small {
    margin-left: auto;
    color: var(--mud-palette-text-secondary);
    font-size: 0.75rem;
    font-variant-numeric: tabular-nums;
}

.lw-longtask-steps li.lw-longtask-step-next {
    color: var(--mud-palette-text-disabled);
}

.lw-longtask-steps li.lw-longtask-step-now {
    font-weight: 700;
    color: var(--mud-palette-primary);
}

.lw-longtask-ico {
    flex: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    font-size: 0.75rem;
    font-weight: 800;
}

.lw-longtask-ico-done {
    background: #e8f3e9;
    color: #2e7d32;
}

.lw-longtask-ico-now {
    background: color-mix(in srgb, var(--mud-palette-primary) 12%, transparent);
    color: var(--mud-palette-primary);
}

.lw-longtask-ico-next {
    border: 2px solid var(--mud-palette-lines-default);
}

.lw-longtask-ico-bad {
    background: #fbe9e9;
    color: #c62828;
}

.lw-longtask-keep {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    padding: 10px 12px;
    border-radius: 6px;
    background: color-mix(in srgb, var(--mud-palette-primary) 10%, transparent);
    color: var(--mud-palette-primary);
    font-size: 0.8125rem;
    font-weight: 600;
    animation: lw-enter var(--lw-duration-base) var(--lw-ease);
}

.lw-longtask-bg {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    align-self: flex-start;
    padding: 5px 12px;
    border-radius: 14px;
    background: color-mix(in srgb, var(--mud-palette-primary) 10%, transparent);
    color: var(--mud-palette-primary);
    font-size: 0.75rem;
    font-weight: 700;
}

.lw-longtask-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* Dark theme: the grey shapes and the tints. */
.lw-theme-dark .lw-skel .mud-skeleton {
    background-color: #2a3242;
}

.lw-theme-dark .lw-skel .mud-skeleton-wave::after {
    background: linear-gradient(90deg, rgba(255, 255, 255, 0) 0, rgba(255, 255, 255, 0.08) 50%, rgba(255, 255, 255, 0) 100%);
}

.lw-theme-dark .lw-load-error {
    border-color: #6a2a2a;
}

.lw-theme-dark .lw-load-error-icon,
.lw-theme-dark .lw-longtask-ico-bad {
    background: #3d1d1d;
}

.lw-theme-dark .lw-longtask-ico-done {
    background: #1d3320;
    color: #8fcf98;
}

.lw-theme-dark .lw-load-error.lw-load-error-compact,
.lw-theme-dark .lw-table-status.lw-table-status-err {
    color: #f4a5a5;
}

.lw-theme-dark .lw-table-status.lw-table-status-slow {
    color: #f0c987;
}

.lw-theme-dark .lw-skel-slow {
    border-color: #5c4318;
    border-left-color: #e0a040;
}

/* Reduced motion: static grey shapes, a still bar, a slower spinner. */
@media (prefers-reduced-motion: reduce) {
    .lw-skel .mud-skeleton-wave::after {
        animation: none;
        display: none;
    }

    .lw-topbar::before,
    .lw-reload-line::before {
        animation: none;
        width: 100%;
        opacity: 0.55;
    }

    .lw-reconnect,
    .lw-longtask,
    .lw-longtask-keep {
        animation: none;
    }

    .lw-reconnect-spin,
    .mud-progress-circular.lw-busy-spin {
        animation-duration: 2.4s;
    }
}
/* Settings › Communications & system › Marketing texts › Campaigns (#13143; prototype v232 board 8e). */
.lw-mc-scroll {
    overflow-x: auto;
}
.lw-mc-table td {
    vertical-align: top;
}
.lw-mc-name {
    min-width: 240px;
    white-space: normal;
}
.lw-mc-aud {
    min-width: 180px;
    white-space: normal;
}
.lw-mc-when {
    white-space: nowrap;
}
.lw-mc-bad {
    border-color: var(--mud-palette-error);
}
.lw-mc-fields {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 12px;
    padding: 12px 0 4px;
}
.lw-mc-est {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 10px 12px;
    margin: 8px 0 12px;
    border-radius: 6px;
    background: var(--mud-palette-background-gray);
    font-size: 0.875rem;
}
.lw-mc-start {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
}
.lw-mc-date {
    flex: 0 1 200px;
}
.lw-mc-test {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding-top: 12px;
    margin-top: 8px;
    border-top: 1px solid var(--mud-palette-lines-default);
}
.lw-mc-phone {
    flex: 0 1 220px;
}
.lw-mc-warn {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}
.lw-mc-warn > span {
    flex: 1 1 220px;
}
/* Client file Activity and SMS history tags (#13144 RingCentral, #13142/#13143 Marketing; prototype v232 board 6). */
.lw-atag {
    display: inline-block;
    margin-left: 6px;
    padding: 0 6px;
    border-radius: 3px;
    font-size: 0.6875rem;
    font-weight: 700;
    vertical-align: 1px;
    background: var(--mud-palette-background-gray);
    color: var(--mud-palette-text-primary);
}
.lw-atag-rc {
    background: #e6f2f7;
    color: #004077;
}
.lw-atag-mk {
    background: #efe8f7;
    color: #5a3d8a;
}
.lw-act-from {
    font-size: 0.8125rem;
}
/* Settings › Communications & system › RingCentral texts (#13144). */
.lw-rc-table td {
    vertical-align: middle;
}
.lw-rc-number {
    white-space: nowrap;
}
/* Emails from clients (#13167; prototype v232 boards 1, 6 and 8e). */
.lw-ib-add {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}
.lw-ib-add .mud-input-control {
    min-width: 240px;
}
.lw-ce-count {
    display: inline-block;
    min-width: 22px;
    margin-left: 6px;
    padding: 0 7px;
    border-radius: 11px;
    background: var(--mud-palette-primary);
    color: var(--mud-palette-primary-text);
    font-size: 0.75rem;
    font-weight: 700;
    text-align: center;
}
.lw-ce-empty {
    margin: 0;
    padding: 14px 16px;
    font-size: 0.875rem;
    color: var(--mud-palette-text-secondary);
}
.lw-ce-row {
    display: grid;
    justify-items: start;
    justify-content: start;
    width: 100%;
    gap: 2px;
    padding: 10px 16px;
    border: 0;
    border-top: 1px solid var(--mud-palette-lines-default);
    background: transparent;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
}
.lw-ce-row:hover {
    background: var(--mud-palette-action-default-hover);
}
.lw-ce-from {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: baseline;
    font-size: 0.875rem;
}
.lw-ce-from span {
    color: var(--mud-palette-text-secondary);
    font-size: 0.8125rem;
}
.lw-ce-subj {
    font-size: 0.875rem;
}
.lw-ce-dlg-top {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}
.lw-ce-item {
    display: grid;
    gap: 4px;
    padding: 12px;
    margin-bottom: 10px;
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 6px;
}
.lw-ce-item-top {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 6px;
}
.lw-ce-prev {
    font-size: 0.8125rem;
    color: var(--mud-palette-text-secondary);
}
.lw-ce-acts {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
}
.lw-ce-acts-end {
    justify-content: flex-end;
}
.lw-ce-attach {
    display: grid;
    gap: 6px;
    padding: 10px;
    border-radius: 6px;
    background: var(--mud-palette-background-gray);
}
.lw-ce-pick {
    display: flex;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 8px;
    padding: 6px 8px;
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 4px;
    background: var(--mud-palette-surface);
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
}
.lw-ce-pick span {
    color: var(--mud-palette-text-secondary);
    font-size: 0.8125rem;
}
.lw-ce-picked {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 6px;
}
.lw-act-mail {
    display: grid;
    gap: 2px;
    margin-top: 4px;
}
.lw-act-mail-acts {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.lw-act-mail-body {
    padding: 8px 10px;
    border-left: 3px solid var(--mud-palette-lines-default);
    white-space: pre-wrap;
    font-size: 0.875rem;
}
.lw-act-mail-files {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}
.lw-act-mail-file {
    font-size: 0.8125rem;
}
