/*
 * CollisionSuite — App-screen primitives (cs-app-screens skill)
 *
 * Opt-in classes only: nothing here restyles an existing page until the page
 * adds the class. The rules were decided 2026-10-21 (living reference:
 * /dev/app-screens/); existing pages adopt them as they are touched.
 *
 * How to use each block: .claude/skills/cs-app-screens/SKILL.md
 *
 *   .stat-value     larger number on a SEPARATE stat card (decided 2026-10-21)
 *   .stat-lead      the screen's answer figure, ~1.3x its siblings (rule 1)
 *   .stat-caption   small grey caption under a stat label (rule 1)
 *   .table-stack    table that becomes two-line rows below 640px (rule 6)
 *   .table-quiet    sentence-case grey table headers, no header band
 *   .empty-frame    an empty section keeps its frame + one sentence (rule 5)
 *
 * Every colour reads from Bootstrap 5.3 theme variables, so light and dark
 * themes both work without per-theme overrides.
 */

/* ── Stat cards ──────────────────────────────────────────────────────────────
 * Stat cards stay SEPARATE cards in a gutter row (decided; the divided
 * one-box strip was rejected). Only the number gets bigger:
 *   <div class="row g-3 mb-4">
 *     <div class="col-6 col-lg-3"><div class="card h-100"><div class="card-body text-center">
 *       <div class="stat-value mb-1">12</div>
 *       <small class="text-muted">Open files</small>
 *     </div></div></div>
 *   </div>
 */
.stat-value {
    font-size: 1.75rem;             /* ~24.5px at the 14px base (was h3 = 1.1rem) */
    font-weight: 500;
    line-height: 1.2;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
.stat-value.stat-lead {             /* rule 1: one per screen */
    font-size: 2.3rem;              /* ~32px */
}
.stat-caption {                     /* rule 1 */
    display: block;
    font-size: 0.75rem;
    color: var(--bs-secondary-color);
    margin-top: 0.1rem;
}
/* Bootstrap's text-warning (#ffc107) is ~1.6:1 on white: unreadable as a
   number. On a stat value it uses the theme-aware emphasis tone instead. */
.stat-value.text-warning { color: var(--bs-warning-text-emphasis) !important; }

@media (max-width: 575.98px) {
    .stat-value { font-size: 1.5rem; }
    .stat-value.stat-lead { font-size: 1.9rem; }
}

/* ── Quiet table headers ─────────────────────────────────────────────────────
 * Sentence-case grey headers at label size, regular weight, no fill band.
 * Right-align numeric headers WITH their values (th.text-end + td.text-end;
 * typography.css already gives .text-end cells tabular numerals).
 */
.table-quiet > thead > tr > th {
    font-size: 0.78rem;
    font-weight: 400;
    color: var(--bs-secondary-color);
    text-transform: none;
    letter-spacing: 0;
    background-color: transparent;
    --bs-table-bg-type: transparent;   /* no stripe/band on the header row */
    white-space: nowrap;
}

/* ── Phone two-line rows ─────────────────────────────────────────────────────
 * Add .table-stack to a <table>. Below 640px each <tr> becomes a two-line row:
 *
 *   line 1:  [.ts-primary identity ............] [.ts-key number] [.ts-action]
 *   line 2:  every other cell, small grey, joined by " · "
 *
 * Fields MOVE to line 2, they are never dropped, so don't put d-none on
 * cells of a stacked table (d-none d-md-table-cell would hide them on phones).
 * Optional per-cell prefix shown only when stacked:
 *   <td><span class="ts-label">Updated </span>4</td>
 * Empty cells vanish on phones so no dangling separator appears.
 * Row clicks (onclick on <tr>) keep working; the thead is visually hidden.
 *
 * .ts-force-stack on any ancestor applies the stacked layout at every width.
 * It exists only so /dev/app-screens/ can show the phone rendering inside a
 * 390px frame on a desktop screen; production markup never uses it.
 */
.ts-label { display: none; }

@media (max-width: 639.98px) {
    .table-stack > thead {
        position: absolute !important;
        width: 1px !important;
        height: 1px !important;
        overflow: hidden !important;
        clip: rect(0, 0, 0, 0) !important;
        white-space: nowrap !important;
    }
    .table-stack,
    .table-stack > tbody { display: block; width: 100%; }
    .table-stack > tbody > tr {
        display: flex;
        flex-wrap: wrap;
        align-items: baseline;
        column-gap: 0.4rem;
        row-gap: 0.1rem;
        padding: 0.55rem 0.75rem;
        border-bottom: var(--bs-border-width) solid var(--bs-border-color);
    }
    .table-stack > tbody > tr:last-child { border-bottom: 0; }
    .table-stack > tbody > tr > td {
        display: block;
        padding: 0;
        border: 0;
        background: transparent;
        box-shadow: none !important;
        min-width: 0;
    }
    .table-stack.table-striped > tbody > tr:nth-of-type(odd) { background-color: var(--bs-table-striped-bg); }
    .table-stack.table-hover > tbody > tr:hover { background-color: var(--bs-table-hover-bg); }
    .table-stack > tbody > tr > td.ts-primary {
        order: 1; flex: 1 1 0; font-weight: 500;
        overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    }
    .table-stack > tbody > tr > td.ts-key {
        order: 2; flex: none; margin-left: auto; text-align: right;
        font-variant-numeric: tabular-nums; white-space: nowrap;
    }
    .table-stack > tbody > tr > td.ts-action { order: 3; flex: none; align-self: center; }
    .table-stack > tbody > tr::after { content: ""; order: 4; flex-basis: 100%; height: 0; }
    .table-stack > tbody > tr > td:not(.ts-primary, .ts-key, .ts-action) {
        order: 5; flex: none; max-width: 100%;
        font-size: 0.78rem; color: var(--bs-secondary-color); text-align: left;
        white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    }
    .table-stack > tbody > tr > td:not(.ts-primary, .ts-key, .ts-action):empty { display: none; }
    .table-stack > tbody > tr > td:not(.ts-primary, .ts-key, .ts-action)
        ~ td:not(.ts-primary, .ts-key, .ts-action):not(:empty)::before {
        content: "\00b7"; margin-right: 0.4rem; color: var(--bs-secondary-color);
    }
    .table-stack > tbody > tr > td small,
    .table-stack > tbody > tr > td .small { font-size: inherit; }
    .table-stack .ts-label { display: inline; }
    .table-stack > tbody > tr > td[colspan] { flex-basis: 100%; }
}

/* Same rules, scoped to the demo frame (kept in sync with the block above). */
.ts-force-stack .table-stack > thead {
    position: absolute !important; width: 1px !important; height: 1px !important;
    overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important;
}
.ts-force-stack .table-stack,
.ts-force-stack .table-stack > tbody { display: block; width: 100%; }
.ts-force-stack .table-stack > tbody > tr {
    display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 0.4rem; row-gap: 0.1rem;
    padding: 0.55rem 0.75rem; border-bottom: var(--bs-border-width) solid var(--bs-border-color);
}
.ts-force-stack .table-stack > tbody > tr:last-child { border-bottom: 0; }
.ts-force-stack .table-stack > tbody > tr > td {
    display: block; padding: 0; border: 0; background: transparent; box-shadow: none !important; min-width: 0;
}
.ts-force-stack .table-stack > tbody > tr > td.ts-primary {
    order: 1; flex: 1 1 0; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ts-force-stack .table-stack > tbody > tr > td.ts-key {
    order: 2; flex: none; margin-left: auto; text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap;
}
.ts-force-stack .table-stack > tbody > tr > td.ts-action { order: 3; flex: none; align-self: center; }
.ts-force-stack .table-stack > tbody > tr::after { content: ""; order: 4; flex-basis: 100%; height: 0; }
.ts-force-stack .table-stack > tbody > tr > td:not(.ts-primary, .ts-key, .ts-action) {
    order: 5; flex: none; max-width: 100%; font-size: 0.78rem; color: var(--bs-secondary-color);
    text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ts-force-stack .table-stack > tbody > tr > td:not(.ts-primary, .ts-key, .ts-action):empty { display: none; }
.ts-force-stack .table-stack > tbody > tr > td:not(.ts-primary, .ts-key, .ts-action)
    ~ td:not(.ts-primary, .ts-key, .ts-action):not(:empty)::before {
    content: "\00b7"; margin-right: 0.4rem; color: var(--bs-secondary-color);
}
.ts-force-stack .table-stack .ts-label { display: inline; }

/* ── Empty section ───────────────────────────────────────────────────────────
 * An empty block keeps its card + header and says one sentence in the body:
 *   <div class="empty-frame">No follow-ups due this week.</div>
 */
.empty-frame {
    border: var(--bs-border-width) dashed var(--bs-border-color);
    border-radius: var(--bs-border-radius);
    padding: 0.6rem 0.9rem;
    color: var(--bs-secondary-color);
    font-size: 0.85rem;
}

/* ── Whole-row links ─────────────────────────────────────────────────────────
 * A row/card with data-row-href opens that URL on click (static/js/row-link.js);
 * its own buttons, links and inputs keep their behaviour. Hover is a subtle
 * shadow (table rows use .table-hover) — no coloured background.
 */
[data-row-href] { cursor: pointer; transition: box-shadow .15s, background-color .15s; }
[data-row-href]:not(tr):hover { box-shadow: inset 0 0 0 1px var(--bs-border-color), var(--bs-box-shadow-sm); }
[data-row-href]:focus-visible { outline: 2px solid var(--bs-focus-ring-color, var(--bs-primary)); outline-offset: -2px; }
[data-row-href] [data-no-row-click] { cursor: auto; }

/* ── Dot status pills (UI polish pack) ───────────────────────────────────────
 * The documented status badge — `badge bg-X-subtle text-X-emphasis border
 * border-X-subtle` — renders as a rounded pill: tinted fill, a 6px dot in the
 * text colour, no visible border (kept transparent so the size doesn't shift).
 * Existing templates pick it up with no edits.
 *
 * NOT pills (left as plain badges):
 *   .badge-plain        explicit opt-out (counts, IDs, chips)
 *   .rounded-pill       numeric/count pills (sidebar counts use text-bg-danger
 *                       and never match anyway)
 *   .rounded-circle     dot/avatar badges
 *   .position-absolute  overlay counters (notification bell)
 *   .tabular-nums       a number, not a status
 *   .variable-chip      template-variable chips (email templates)
 *   :has(> .bi)         badge already carries its own icon — no second marker
 * Legacy `bg-X-subtle text-X` (no -emphasis) badges are mostly tags and counts
 * (group names, doc types, "{{ n }}" next to headings) and are deliberately
 * not matched.
 */
.badge[class*="bg-"][class*="-subtle"][class*="-emphasis"]:not(.badge-plain):not(.rounded-pill):not(.rounded-circle):not(.position-absolute):not(.tabular-nums):not(.variable-chip):not(:has(> .bi)) {
    border-radius: var(--bs-border-radius-pill);
    border-color: transparent !important;
    font-weight: 500;
    padding-left: 0.6em;
    padding-right: 0.75em;
}
.badge[class*="bg-"][class*="-subtle"][class*="-emphasis"]:not(.badge-plain):not(.rounded-pill):not(.rounded-circle):not(.position-absolute):not(.tabular-nums):not(.variable-chip):not(:has(> .bi))::before {
    content: "";
    display: inline-block;
    width: 6px;
    height: 6px;
    margin-right: 0.4em;
    border-radius: 50%;
    background-color: currentColor;
    vertical-align: 0.12em;
}

/* ── Stat-card sparkline (components/stat_sparkline.html) ─────────────────── */
.stat-spark {
    display: block;
    margin: 0.3rem auto 0;
    overflow: visible;
}
.stat-spark-area { fill: rgba(var(--bs-primary-rgb), 0.12); stroke: none; }
.stat-spark-line {
    fill: none;
    stroke: var(--bs-primary);
    stroke-width: 1.5;
    stroke-linejoin: round;
    stroke-linecap: round;
}
.stat-spark-dot { fill: var(--bs-primary); }

/* ══ Page layouts — one focus per page (2026-11-11) ══════════════════════════
 * Shared pieces for the four page types (List / Detail / Dashboard / Form).
 * Rules + reference templates: CLAUDE.md "Page layouts — one focus per page";
 * living reference: /dev/app-screens/#layouts.
 *
 *   .page-head        title block + one primary button + one Actions menu
 *   .page-answer      the one-line answer under the title
 *   .chip-row         saved views with counts (components/view_chip.html)
 *   .age-bar          small days bar (components/age_bar.html)
 *   .workflow-card    detail page: state + the one next step
 *   .key-facts        fact strip at the foot of a workflow card
 *   .detail-rows      quiet label/value rows inside a card
 *   .quiet-line       a healthy state collapsed to one grey line
 *   .form-section     titled form group: 8px inside, 24px between
 *   .form-lead        the field that is the reason for the form
 */

/* ── Page header ─────────────────────────────────────────────────────────── */
.page-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.5rem 1rem;
    margin-bottom: 1rem;
}
.page-head h1 { margin-bottom: 0; display: flex; align-items: center; flex-wrap: wrap; gap: 0.5rem; }
.page-head .page-head-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.page-answer {
    margin-top: 0.25rem;
    color: var(--bs-secondary-color);
}
.page-answer b,
.page-answer strong { color: var(--bs-emphasis-color); font-weight: 600; font-variant-numeric: tabular-nums; }
.page-answer .text-danger { color: var(--bs-danger-text-emphasis) !important; }

/* ── Saved-view chips ────────────────────────────────────────────────────── */
.chip-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}
.view-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.75rem;
    border: var(--bs-border-width) solid var(--bs-border-color);
    border-radius: var(--bs-border-radius-pill);
    background: var(--bs-body-bg);
    color: var(--bs-secondary-color);
    font-size: 0.82rem;
    line-height: 1.4;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color .15s, color .15s, border-color .15s;
}
.view-chip:hover { color: var(--bs-emphasis-color); background: var(--bs-tertiary-bg); }
.view-chip.active,
.view-chip[aria-current="page"] {
    background: var(--bs-emphasis-color);
    border-color: transparent;
    color: var(--bs-body-bg);
}
.view-chip .chip-count { opacity: .75; font-variant-numeric: tabular-nums; }
.view-chip:focus-visible { outline: 2px solid var(--bs-primary); outline-offset: 2px; }
.chip-row .chip-search { margin-left: auto; min-width: 12rem; max-width: 18rem; }
@media (max-width: 575.98px) {
    .chip-row .chip-search { margin-left: 0; max-width: none; flex: 1 1 100%; }
}

/* ── Age bar ─────────────────────────────────────────────────────────────── */
.age-bar {
    display: inline-block;
    position: relative;
    width: 3rem;
    height: 5px;
    margin-right: 0.4rem;
    border-radius: 3px;
    background: var(--bs-tertiary-bg);
    box-shadow: inset 0 0 0 1px var(--bs-border-color);
    overflow: hidden;
    vertical-align: middle;
}
.age-bar > span {
    position: absolute;
    inset: 0 auto 0 0;
    max-width: 100%;
    border-radius: 3px;
    background: var(--bs-secondary-color);
}
.age-bar.is-warn > span { background: var(--bs-warning); }
.age-bar.is-bad > span { background: var(--bs-danger); }

/* ── Workflow card + key facts ───────────────────────────────────────────── */
.workflow-card .workflow-body {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem 1rem;
    padding: 1rem;
}
.workflow-card .workflow-title { margin: 0; font-size: 1.1rem; font-weight: 600; display: flex; align-items: center; gap: 0.5rem; }
.workflow-card .workflow-summary { margin: 0.25rem 0 0; color: var(--bs-secondary-color); }
.workflow-card .workflow-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.key-facts {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    border-top: var(--bs-border-width) solid var(--bs-border-color);
}
.key-facts > div {
    display: grid;
    gap: 0.1rem;
    min-width: 0;
    padding: 0.5rem 1rem;
    border-right: var(--bs-border-width) solid var(--bs-border-color);
}
.key-facts > div:last-child { border-right: 0; }
.key-facts .key-fact-label { color: var(--bs-secondary-color); font-size: 0.78rem; }
.key-facts .key-fact-value { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 575.98px) {
    .key-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .key-facts > div:nth-child(2n) { border-right: 0; }
    .key-facts > div:nth-child(-n+2) { border-bottom: var(--bs-border-width) solid var(--bs-border-color); }
}

/* ── Quiet label/value rows ──────────────────────────────────────────────── */
.detail-rows { display: grid; }
.detail-rows > div {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
    padding: 0.5rem 1rem;
    border-top: var(--bs-border-width) solid var(--bs-border-color);
}
.detail-rows > div:first-child { border-top: 0; }
.detail-rows > div > :first-child { color: var(--bs-secondary-color); flex: none; }
.detail-rows > div > :last-child { text-align: right; min-width: 0; overflow-wrap: anywhere; }
.detail-rows .detail-rows-sub { display: block; font-size: 0.78rem; color: var(--bs-secondary-color); }

/* ── Quiet line (a healthy state, shrunk) ────────────────────────────────── */
.quiet-line {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.25rem 1rem;
    color: var(--bs-secondary-color);
    font-size: 0.82rem;
    padding: 0.25rem 0;
}
.quiet-line a { color: inherit; text-decoration: none; }
.quiet-line a:hover { color: var(--bs-emphasis-color); text-decoration: underline; }
.quiet-line .quiet-ok::before,
.quiet-line .quiet-bad::before {
    content: "";
    display: inline-block;
    width: 6px;
    height: 6px;
    margin-right: 0.35em;
    border-radius: 50%;
    vertical-align: 0.12em;
}
.quiet-line .quiet-ok::before { background: var(--bs-success); }
.quiet-line .quiet-bad::before { background: var(--bs-danger); }

/* ── Form sections ───────────────────────────────────────────────────────── */
.form-section { display: grid; gap: 0.5rem; }            /* 8px inside a group */
.form-section + .form-section { margin-top: 1.5rem; }     /* 24px between groups */
.form-section > .form-section-title { margin: 0; font-size: 0.95rem; font-weight: 600; }
.form-section > .form-section-hint { margin-top: -0.25rem; color: var(--bs-secondary-color); font-size: 0.82rem; }
.form-lead .form-control,
.form-lead .form-select { font-size: 1.05rem; padding: 0.55rem 0.75rem; }
.form-lead > .form-section-title { font-size: 1.05rem; }
.form-more-toggle { padding-left: 0; padding-right: 0; text-decoration: none; }

/* ══ Shop-native visuals — round 2 (2026-11-11) ══════════════════════════════
 * Small components that make screens read as a body-shop tool. Living
 * reference: /dev/app-screens/#shop-visuals; skill section 8.
 *
 *   .stage-bar        RO stage bar (components/stage_bar.html, ro_stage_bar tag)
 *   .days-bar         days vs target with a tick (components/days_bar.html)
 *   .money-split      headline money with quieter cents (money_split filter)
 *   .payer-mono       payer initials chip, stable colour (payer_monogram tag)
 */

/* ── Stage bar ───────────────────────────────────────────────────────────────
 * Done = accent, current = half-filled accent (a solid inner block, never a
 * gradient), future = neutral. The neutral is mixed from the muted text token
 * so it stays visible on both the light surface and Brand Slate dark. */
.stage-bar { --stage-neutral: color-mix(in srgb, var(--bs-secondary-color) 26%, transparent); }
.stage-bar .stage-track { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 4px; }
.stage-bar .stage-seg {
    display: block;
    position: relative;
    height: 4px;
    border-radius: 2px;
    background: var(--stage-neutral);
    overflow: hidden;
}
.stage-bar .stage-seg.is-done { background: var(--bs-primary); }
.stage-bar .stage-seg.is-now::after {
    content: "";
    position: absolute;
    inset: 0 50% 0 0;
    background: var(--bs-primary);
}
.stage-bar .stage-step { display: grid; gap: 4px; min-width: 0; }
.stage-bar .stage-label {
    font-size: 0.75rem;
    color: var(--bs-secondary-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.stage-bar .stage-step.is-now .stage-label { color: var(--bs-emphasis-color); font-weight: 500; }
.stage-bar .stage-stopped { margin-top: 4px; font-size: 0.8rem; color: var(--bs-emphasis-color); }
.stage-bar:not(.stage-bar-mini) { max-width: 36rem; margin-top: 0.5rem; }

/* Mini (list rows): segments only, then the current step's label. */
.stage-bar-mini { display: inline-flex; align-items: center; gap: 0.5rem; white-space: nowrap; vertical-align: middle; }
.stage-bar-mini .stage-track { width: 4.5rem; gap: 2px; }
.stage-bar-mini .stage-now { font-size: 0.8rem; color: var(--bs-secondary-color); }
@media (max-width: 575.98px) {
    .stage-bar .stage-label { font-size: 0.68rem; }
}

/* ── Days-in-shop bar ────────────────────────────────────────────────────────
 * components/days_bar.html (days_bar / ro_days_in_shop tags). The bar's full
 * width is the danger line (target x 1.5); the tick marks the target. Grey
 * under target, amber past it, red at 1.5x — colour only when it means work. */
.days-bar-wrap { display: inline-flex; align-items: center; gap: 0.4rem; white-space: nowrap; vertical-align: middle; font-variant-numeric: tabular-nums; }
.days-bar {
    position: relative;
    display: inline-block;
    width: 3.5rem;
    height: 6px;
    border-radius: 3px;
    background: color-mix(in srgb, var(--bs-secondary-color) 18%, transparent);
}
.days-bar .days-fill {
    position: absolute;
    inset: 0 auto 0 0;
    max-width: 100%;
    border-radius: 3px;
    background: var(--bs-secondary-color);
}
.days-bar.is-warn .days-fill { background: var(--bs-warning); }
.days-bar.is-bad .days-fill { background: var(--bs-danger); }
.days-bar .days-tick {
    position: absolute;
    top: -2px;
    bottom: -2px;
    width: 1.5px;
    margin-left: -0.75px;
    background: var(--bs-emphasis-color);
    opacity: .45;
}
.days-num { min-width: 2.6em; text-align: right; }

/* ── Quieter cents ───────────────────────────────────────────────────────────
 * {{ amount|money_split }} — headline/lead money only, never table cells.
 * Dollars read first; cents drop to ~70% in the muted token (not opacity). */
.money-split { font-variant-numeric: tabular-nums; white-space: nowrap; }
.money-split .money-cents {
    font-size: 0.68em;
    font-weight: 500;
    color: var(--bs-secondary-color);
    letter-spacing: 0;
}

/* ── Payer monograms ─────────────────────────────────────────────────────────
 * components/payer_monogram.html (payer_monogram tag). Identity colour, not
 * status: the palette avoids the accent teal and red/amber/green. Light chips
 * carry white initials (>= 5.7:1), dark-theme chips dark initials (>= 8:1).
 * Colour index comes from payers/monogram.py (crc32 of the payer's key). */
.payer-mono { display: inline-flex; align-items: center; gap: 0.4rem; margin-right: 0.35rem; vertical-align: middle; max-width: 100%; }
.payer-mono .pm-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pm-chip {
    flex: none;
    display: inline-grid;
    place-items: center;
    width: 1.35rem;
    height: 1.35rem;
    border-radius: 50%;
    font-size: 0.62rem;
    font-weight: 600;
    line-height: 1;
    letter-spacing: 0.02em;
    color: #fff;
    background: var(--pm-bg);
    user-select: none;
}
.payer-mono-lg .pm-chip { width: 1.75rem; height: 1.75rem; font-size: 0.75rem; }
.pm-0 { --pm-bg: #2f5fc4; }
.pm-1 { --pm-bg: #4a4fbf; }
.pm-2 { --pm-bg: #7546b8; }
.pm-3 { --pm-bg: #9b3a78; }
.pm-4 { --pm-bg: #b0412e; }
.pm-5 { --pm-bg: #875610; }
.pm-6 { --pm-bg: #2b7048; }
.pm-7 { --pm-bg: #4e5a6e; }
.pm-chip.pm-self {
    --pm-bg: var(--bs-tertiary-bg);
    color: var(--bs-secondary-color);
    box-shadow: inset 0 0 0 1px var(--bs-border-color);
    font-size: 0.75rem;
}
[data-bs-theme="dark"] .pm-chip { color: #16171c; }
[data-bs-theme="dark"] .pm-0 { --pm-bg: #8fb0f0; }
[data-bs-theme="dark"] .pm-1 { --pm-bg: #a9abf2; }
[data-bs-theme="dark"] .pm-2 { --pm-bg: #c2a3ef; }
[data-bs-theme="dark"] .pm-3 { --pm-bg: #eba0cf; }
[data-bs-theme="dark"] .pm-4 { --pm-bg: #f2a493; }
[data-bs-theme="dark"] .pm-5 { --pm-bg: #e0bb7a; }
[data-bs-theme="dark"] .pm-6 { --pm-bg: #8fd3a8; }
[data-bs-theme="dark"] .pm-7 { --pm-bg: #b3bccb; }
[data-bs-theme="dark"] .pm-chip.pm-self { color: var(--bs-secondary-color); }

/* A short number input that holds a count of days (e.g. "Keep files … days"
 * on the synced folder form). */
.input-days { width: 6rem; }
