/*
    The Recurring area (Forecast, Bills & Subscriptions, Needs Review, the Checkup dialog): the web port of the mobile
    RecurringSummaryPage and its views. Reads the transaction popups' tokens (transaction-popups.css, --tx-*) so light and
    dark match the rest of the admin, plus the area's own accents below. Prefixes: rc- (the area), nr- (the Needs Review
    deck, card and rows). Layouts are CSS grids that fall to one column under 992px.
*/

:root {
    --rc-bills: hsl(calc(247.83deg + var(--ci-accent-shift, 0deg)) 76.3% 58.63%);
    --rc-bills-rgb: var(--ci-rgb-primary-light);
    --rc-subscriptions: #0D9488;
    --rc-installments: #B45309;
    --rc-early: #0369A1;
    --rc-early-soft: #E0F2FE;
    --rc-frequent: #F59E0B;
    --rc-monthly: hsl(calc(247.83deg + var(--ci-accent-shift, 0deg)) 76.3% 58.63%);
    --rc-less-often: #0D9488;
    --rc-irregular: #94A3B8;
    --rc-large: #E11D48;
    --rc-large-soft: #FFE4E6;
    --rc-accent-soft: hsl(calc(249deg + var(--ci-accent-shift, 0deg)) 100% 96.08%);
    --rc-positive-soft: #DCFCE7;
    --rc-caution-soft: #FEF3C7;
    --rc-critical-soft: #FEE2E2;
    --rc-neutral-soft: #EEF0F6;
    --rc-partner-soft: rgba(217, 119, 6, .14);
    --rc-card: #FFFFFF;
    --rc-card-border: #DFE7F5;
    --rc-row: #F5F8FD;
    --rc-row-hover: #EBF1FB;
    --rc-hero: linear-gradient(158deg, #E3EEFD 0%, #F0F6FE 55%, #FFFFFF 100%);
    --rc-hero-border: #B5CFF6;
    --rc-hero-soft: rgba(37, 99, 235, .10);
    --rc-shadow: 0 10px 30px rgba(31, 42, 68, .08);
    --rc-text: var(--tx-text);
    --rc-muted: var(--tx-muted);
    --rc-light: var(--tx-light-text);
    --rc-line: var(--tx-border);
    --rc-surface: var(--tx-surface);
    --rc-today: hsl(calc(247.83deg + var(--ci-accent-shift, 0deg)) 76.3% 58.63% / .10);
    --rc-selection: hsl(calc(247.83deg + var(--ci-accent-shift, 0deg)) 76.3% 58.63% / .55);
}

[data-bs-theme="dark"] {
    --rc-early: #38BDF8;
    --rc-early-soft: rgba(56, 189, 248, .16);
    --rc-large: #FB7185;
    --rc-large-soft: rgba(251, 113, 133, .18);
    --rc-accent-soft: hsl(calc(247.94deg + var(--ci-accent-shift, 0deg)) 83.95% 68.24% / .18);
    --rc-positive-soft: rgba(34, 197, 94, .16);
    --rc-caution-soft: rgba(251, 191, 36, .18);
    --rc-critical-soft: rgba(248, 113, 113, .18);
    --rc-neutral-soft: rgba(255, 255, 255, .08);
    --rc-partner-soft: rgba(251, 191, 36, .14);
    --rc-card: #151B28;
    --rc-card-border: #2B3045;
    --rc-row: rgba(255, 255, 255, .05);
    --rc-row-hover: rgba(255, 255, 255, .09);
    --rc-hero: linear-gradient(158deg, #1E3A68 0%, #162B4F 55%, #151B28 100%);
    --rc-hero-border: #24406A;
    --rc-hero-soft: rgba(96, 165, 250, .14);
    --rc-shadow: 0 10px 30px rgba(0, 0, 0, .28);
    --rc-today: hsl(calc(247.94deg + var(--ci-accent-shift, 0deg)) 83.95% 68.24% / .16);
    --rc-selection: hsl(calc(246.79deg + var(--ci-accent-shift, 0deg)) 100% 79.22% / .7);
    --rc-irregular: #64748B;
}

/* ------------------------------------------------------------------ Page frame, heading and menu */

.rc-page {
    font-family: var(--tx-font-text);
    color: var(--rc-text);
}

.rc-page .tx-glyph { line-height: 1; }

.rc-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem 1.5rem;
    margin-bottom: 1rem;
}

.rc-head-copy { min-width: 0; max-width: 62ch; }

.rc-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--tx-primary);
}

.rc-title { margin: .15rem 0 .25rem; font-family: var(--tx-font); font-size: 1.65rem; font-weight: 700; line-height: 1.15; }

.rc-desc { margin: 0; color: var(--rc-muted); font-size: .95rem; line-height: 1.45; }

.rc-head-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; }

/* Header actions (the Checkup launcher and the pages' Refresh): the admin header-action look shared with Financial
   Intelligence (css/admin-header-actions.css): flat 36px face in the page color, 1px hairline, 12px radius, violet
   glyph, accent-soft fill on hover, no shadows. The --ci-act-* tokens switch for dark mode. */
.rc-launcher,
.rc-ghost-btn {
    display: inline-flex;
    align-items: center;
    height: var(--ci-act-height, 36px);
    border: 1px solid var(--ci-act-border, hsl(calc(247.66deg + var(--ci-accent-shift, 0deg)) 100% 90.78%));
    border-radius: var(--ci-act-radius, 12px);
    background: var(--ci-act-bg, #fff);
    color: var(--ci-act-text, #0B0F19);
    font-family: var(--ci-act-font);
    line-height: 1;
    white-space: nowrap;
    box-shadow: none;
    cursor: pointer;
    transition: background-color .15s ease, border-color .15s ease, transform .15s ease;
}

.rc-launcher:hover:not(:disabled),
.rc-launcher:focus-visible,
.rc-ghost-btn:hover:not(:disabled),
.rc-ghost-btn:focus-visible {
    outline: none;
    border-color: var(--ci-act-hover-border, hsl(calc(247.83deg + var(--ci-accent-shift, 0deg)) 76.3% 58.63%));
    background: var(--ci-act-accent-soft, hsl(calc(246.92deg + var(--ci-accent-shift, 0deg)) 100% 94.9%));
}

.rc-launcher:active:not(:disabled),
.rc-ghost-btn:active:not(:disabled) { transform: scale(.97); }

.rc-launcher:disabled,
.rc-ghost-btn:disabled { opacity: .55; cursor: default; }

.rc-launcher {
    gap: .5rem;
    padding: 0 .85rem 0 .3rem;
    text-align: left;
}

/* Launchers rendered as links (Reports' Intelligence / AI briefings) never show the link underline, in any state. */
a.rc-launcher,
a.rc-launcher:link,
a.rc-launcher:visited,
a.rc-launcher:hover,
a.rc-launcher:focus,
a.rc-launcher:focus-visible,
a.rc-launcher:active,
a.rc-launcher *
{
    text-decoration: none;
}

.rc-launcher-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 8px;
    background: var(--ci-act-accent-soft, hsl(calc(246.92deg + var(--ci-accent-shift, 0deg)) 100% 94.9%));
    color: var(--ci-act-accent, hsl(calc(247.83deg + var(--ci-accent-shift, 0deg)) 76.3% 58.63%));
    font-size: .85rem;
    transition: background-color .15s ease, color .15s ease;
}

.rc-launcher:hover:not(:disabled) .rc-launcher-icon,
.rc-launcher:focus-visible .rc-launcher-icon {
    background: var(--ci-act-accent, hsl(calc(247.83deg + var(--ci-accent-shift, 0deg)) 76.3% 58.63%));
    color: #fff;
}

.rc-launcher-copy { display: flex; flex-direction: column; gap: .1rem; line-height: 1.1; }

.rc-launcher-copy strong { font-size: .8rem; font-weight: 600; color: var(--ci-act-text, #0B0F19); }

.rc-launcher-copy small { font-size: .66rem; font-weight: 500; color: var(--ci-act-muted, #565973); }

.rc-ghost-btn {
    gap: .45rem;
    padding: 0 .9rem;
    font-size: .82rem;
    font-weight: 500;
}

.rc-ghost-btn .tx-glyph,
.rc-ghost-btn i { color: var(--ci-act-accent, hsl(calc(247.83deg + var(--ci-accent-shift, 0deg)) 76.3% 58.63%)); font-size: .9rem; }

.rc-glass-btn {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .5rem .9rem;
    border: 1px solid var(--rc-line);
    border-radius: 999px;
    background: var(--rc-card);
    color: var(--rc-text);
    font-size: .85rem;
    font-weight: 700;
    transition: border-color .15s ease, background .15s ease;
}

.rc-glass-btn:hover:not(:disabled) { border-color: var(--tx-primary); }

.rc-menu {
    display: flex;
    gap: .35rem;
    margin: 0 0 1.25rem;
    padding: .3rem;
    border-radius: 999px;
    background: var(--rc-surface);
    overflow-x: auto;
    scrollbar-width: none;
    width: fit-content;
    max-width: 100%;
}

.rc-menu::-webkit-scrollbar { display: none; }

.rc-menu-item {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    flex: 0 0 auto;
    padding: .55rem 1rem;
    border-radius: 999px;
    color: var(--rc-muted);
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
    text-decoration: none;
    white-space: nowrap;
    transition: background .15s ease, color .15s ease, box-shadow .15s ease;
}

.rc-menu-item:hover { color: var(--rc-text); }

.rc-menu-item.active {
    color: var(--tx-seg-selected-text);
    background: var(--tx-seg-pill);
    box-shadow: 0 4px 12px var(--tx-seg-pill-shadow);
}

.rc-menu-item.active .tx-glyph { color: var(--tx-seg-selected-glyph); }

.rc-menu-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 10px;
    background: var(--tx-primary);
    color: #fff;
    font-size: .7rem;
    font-weight: 800;
    letter-spacing: 0;
}

/* The section menu on the shared segmented menu (links): as wide as its labels, a scrolling track on a phone. */
.tx-seg.rc-menu-seg { margin: 0 0 1.25rem; min-width: min(100%, 580px); }

@media (max-width: 575.98px) {
    .tx-seg.tx-seg-inline.rc-menu-seg { display: grid; width: 100%; grid-auto-columns: minmax(150px, 1fr); overflow-x: auto; scrollbar-width: none; }
    .tx-seg.tx-seg-inline.rc-menu-seg::-webkit-scrollbar { display: none; }
    .tx-seg.tx-seg-inline.rc-menu-seg .tx-seg-pill { width: max(150px, calc((100% - 8px) / var(--tx-seg-count, 3))); }
}

/* Needs Review's segments and Cards / List next to the headline, the windows in a hero, the inactive tabs. */
.tx-seg.rc-tabs-seg { flex: 0 1 auto; }
.tx-seg.rc-tabs-seg.tx-seg-scroll { width: 100%; }
.tx-seg.rc-mode-seg .tx-seg-item { height: 34px; }
.tx-seg.rc-window-seg { flex: 0 0 auto; margin-left: auto; }

/* A review card's status: the editor's stacked status segments, a touch shorter inside the card. */
.tx-seg.rse-status.nr-status-seg .tx-seg-item { height: 46px; padding: 6px 2px; font-size: 11px; }
.tx-seg.rse-status.nr-status-seg .tx-seg-item .tx-glyph { font-size: 13px; }

.rc-host-notice { position: fixed; inset: auto 0 0 0; z-index: 1300; pointer-events: none; }

.rc-host-notice .tx-snackbar { position: fixed; pointer-events: auto; }

/* ------------------------------------------------------------------ Grids */

.rc-grid { display: grid; gap: 1rem; align-items: start; }

.rc-grid-2 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }

/* Same 1:1 track as .rc-grid-2 so the forecast column lines up exactly with the Recurring Pulse above it. */
.rc-grid-forecast { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }

.rc-grid-inactive { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }

.rc-grid-top { margin-bottom: 1rem; }

.rc-col { display: flex; flex-direction: column; gap: 1rem; min-width: 0; }

.rc-lead { min-width: 0; }

.rc-lead > * { margin-bottom: 0; }

@media (max-width: 991.98px) {
    .rc-grid-2, .rc-grid-forecast, .rc-grid-inactive { grid-template-columns: minmax(0, 1fr); }

    /* One column: flatten both columns into the grid so Pulse and the calendar stay on top
       (Pulse, Calendar, then the forecast) instead of Pulse, forecast, Calendar, guidance. */
    .rc-grid-forecast-led > .rc-col { display: contents; }
    .rc-grid-forecast-led > .rc-col > .rc-lead { order: -1; }
}

/* ------------------------------------------------------------------ Cards, rows, chips */

.rc-card {
    padding: 16px;
    background: var(--rc-card);
    border: 1px solid var(--rc-card-border);
    border-radius: 20px;
    box-shadow: var(--rc-shadow);
    min-width: 0;
}

.rc-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: .75rem;
    margin-bottom: 12px;
}

.rc-card-titles { display: flex; align-items: center; gap: 10px; min-width: 0; }

.rc-card-text { min-width: 0; }

.rc-card-title { margin: 0; font-family: var(--tx-font); font-size: 15px; font-weight: 600; line-height: 1.25; }

.rc-eyebrow-title { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--rc-muted); }

.rc-card-caption { margin: 2px 0 0; font-size: 12px; line-height: 1.35; color: var(--rc-muted); }

.rc-card-actions { display: flex; align-items: center; gap: .5rem; flex: 0 0 auto; }

.rc-card-body { min-width: 0; }

.rc-card-intro { margin: 0 0 10px; font-size: 13px; line-height: 1.45; }

.rc-chip-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 36px;
    height: 36px;
    border-radius: 11px;
    font-size: 15px;
    color: var(--tx-primary);
    background: var(--rc-accent-soft);
}

.rc-chip-lg { width: 44px; height: 44px; border-radius: 14px; font-size: 18px; }

.rc-chip-glass { background: var(--tx-glass); }

.rc-tone-accent { color: var(--tx-primary); background: var(--rc-accent-soft); }
.rc-tone-neutral { color: var(--tx-primary); background: var(--rc-accent-soft); }
.rc-tone-positive, .rc-tone-reviewed { color: var(--tx-positive); background: var(--rc-positive-soft); }
.rc-tone-caution { color: var(--tx-caution); background: var(--rc-caution-soft); }
.rc-tone-critical { color: var(--tx-critical); background: var(--rc-critical-soft); }
.rc-tone-muted { color: var(--rc-muted); background: var(--rc-neutral-soft); }
.rc-tone-early { color: var(--rc-early); background: var(--rc-early-soft); }
.rc-tone-bills { color: var(--rc-bills); background: var(--rc-accent-soft); }
.rc-tone-subscriptions { color: var(--rc-subscriptions); background: rgba(13, 148, 136, .14); }
.rc-tone-installments, .rc-kind-installments { color: var(--rc-installments); background: var(--rc-caution-soft); }
.rc-tone-frequent { color: var(--rc-frequent); background: rgba(245, 158, 11, .16); }
.rc-tone-monthly { color: var(--rc-monthly); background: var(--rc-accent-soft); }
.rc-tone-less-often { color: var(--rc-less-often); background: rgba(13, 148, 136, .14); }
.rc-tone-irregular { color: var(--rc-irregular); background: rgba(148, 163, 184, .18); }

.rc-tone-text-accent { color: var(--tx-primary); }
.rc-tone-text-positive, .rc-tone-text-reviewed { color: var(--tx-positive); }
.rc-tone-text-caution { color: var(--tx-caution); }
.rc-tone-text-critical, .rc-tone-text-negative { color: var(--tx-critical); }
.rc-tone-text-neutral { color: var(--rc-text); }
.rc-tone-text-text { color: var(--rc-text); }
.rc-tone-text-muted { color: var(--rc-muted); }
.rc-tone-text-early { color: var(--rc-early); }

.rc-tone-bg-accent, .rc-tone-bg-neutral { background: var(--tx-primary); }
.rc-tone-bg-positive, .rc-tone-bg-reviewed { background: var(--tx-positive); }
.rc-tone-bg-caution { background: var(--tx-caution); }
.rc-tone-bg-critical, .rc-tone-bg-negative { background: var(--tx-critical); }
.rc-tone-bg-muted { background: var(--rc-light); }
.rc-tone-bg-early { background: var(--rc-early); }
.rc-tone-bg-text { background: var(--rc-text); }

.rc-kind-bg-bills { background: var(--rc-bills); }
.rc-kind-bg-subscriptions { background: var(--rc-subscriptions); }
.rc-kind-bg-installments { background: var(--rc-installments); }

.rc-muted { color: var(--rc-muted); }

.rc-rows { display: flex; flex-direction: column; gap: 8px; }

.rc-rows-tight { gap: 4px; }

.rc-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    width: 100%;
    padding: 10px 12px;
    border: 0;
    border-radius: 14px;
    background: var(--rc-row);
    color: var(--rc-text);
    text-align: left;
    font: inherit;
}

.rc-row-btn, .rc-row-clickable { cursor: pointer; transition: background .15s ease; }

.rc-row-btn:hover:not(:disabled), .rc-row-clickable:hover { background: var(--rc-row-hover); }

.rc-row-btn:disabled { cursor: default; }

.rc-row-text { display: flex; flex-direction: column; gap: 2px; flex: 1 1 auto; min-width: 0; }

.rc-row-title-line { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }

.rc-row-title { font-family: var(--tx-font); font-size: 14px; font-weight: 600; line-height: 1.3; min-width: 0; overflow-wrap: anywhere; }

.rc-row-amount { flex: 0 0 auto; font-family: var(--tx-font); font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }

.rc-row-amount small { font-size: 11px; font-weight: 500; margin-left: 4px; }

.rc-row-detail { font-size: 13px; line-height: 1.4; color: var(--rc-muted); }

.rc-row-caption { font-size: 12px; line-height: 1.35; color: var(--rc-light); }

.rc-row-items { font-size: 12px; color: var(--rc-muted); }

.rc-row-due { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--rc-muted); }

.rc-row-chevron { align-self: center; flex: 0 0 auto; color: var(--rc-light); font-size: 12px; }

.rc-strike { text-decoration: line-through; color: var(--rc-muted); }

.rc-metric {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex: 0 0 auto;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

.rc-bullets { margin: 4px 0 0; padding-left: 18px; font-size: 12px; line-height: 1.45; color: var(--rc-muted); }

.rc-tags, .rc-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }

.rc-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 9px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
}

.rc-tag .tx-glyph { font-size: 10px; }

.rc-tag-neutral { color: var(--tx-pill-text); background: var(--tx-pill-bg); }
.rc-tag-positive { color: var(--tx-positive); background: var(--rc-positive-soft); }
.rc-tag-caution { color: var(--tx-caution); background: var(--rc-caution-soft); }
.rc-tag-critical, .rc-tag-negative { color: var(--tx-critical); background: var(--rc-critical-soft); }
.rc-tag-partner { color: var(--rc-text); background: var(--rc-partner-soft); }
.rc-tag-early { color: var(--rc-early); background: var(--rc-early-soft); }
.rc-tag-subscription { color: var(--tx-primary); background: var(--rc-accent-soft); }

.rc-link-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--tx-primary);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.rc-link-btn:hover { background: var(--rc-accent-soft); }

.rc-more { margin-top: 8px; }

.rc-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid var(--rc-line);
    border-radius: 50%;
    background: var(--rc-card);
    color: var(--rc-text);
    font-size: 14px;
    cursor: pointer;
}

.rc-icon-btn:hover:not(:disabled) { border-color: var(--tx-primary); color: var(--tx-primary); }

.rc-icon-btn:disabled { opacity: .5; cursor: default; }

.rc-spin { animation: rc-spin 1s linear infinite; }

@keyframes rc-spin { to { transform: rotate(360deg); } }

.rc-bar { display: block; width: 100%; height: 8px; overflow: hidden; border-radius: 999px; background: var(--rc-neutral-soft); }

.rc-bar-thin { height: 5px; }

.rc-bar-fill { display: block; height: 100%; border-radius: 999px; background: var(--tx-primary); transition: width .3s ease; }

.rc-subhead { margin: 12px 0 6px; font-family: var(--tx-font); font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--rc-muted); }

.rc-subhead-line { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 8px 0; }

.rc-subhead-line .rc-subhead { margin: 0; }

.rc-subhead-area { margin: 0; }

.rc-allclear { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 14px; background: var(--rc-positive-soft); color: var(--tx-positive); font-size: 13px; font-weight: 600; }

.rc-notes { margin: 0; padding-left: 18px; font-size: 12px; line-height: 1.5; color: var(--rc-light); }

.rc-legend { display: flex; flex-wrap: wrap; gap: 8px 14px; margin-top: 8px; font-size: 12px; color: var(--rc-muted); }

.rc-legend-item { display: inline-flex; align-items: center; gap: 6px; }

.rc-legend-item strong { color: var(--rc-text); }

.rc-legend-btn { padding: 2px 6px; border: 0; border-radius: 8px; background: transparent; color: inherit; font: inherit; cursor: pointer; }

.rc-legend-btn:hover { background: var(--rc-neutral-soft); }

.rc-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--rc-light); flex: 0 0 auto; }

.rc-dot-you { background: #2563EB; }
.rc-dot-partner { background: #D97706; }
.rc-dot-bills { background: var(--rc-bills); }
.rc-dot-large { background: var(--rc-large); }
.rc-dot-income { background: var(--tx-positive); }
.rc-dot-payday-mark { width: auto; height: auto; background: transparent; color: var(--tx-positive); font-weight: 800; }
.rc-dot-payday-ring { background: transparent; border: 2px solid var(--tx-positive); }

.rc-hint { margin: 6px 0 0; font-size: 11px; color: var(--rc-light); }

.rc-validation { margin: 6px 0 0; font-size: 12px; color: var(--tx-critical); }

.rc-warning { display: flex; align-items: flex-start; gap: 8px; margin-top: 6px; padding: 8px 10px; border-radius: 10px; background: var(--rc-critical-soft); color: var(--tx-critical); font-size: 12px; line-height: 1.4; }

.rc-count-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 26px; height: 26px; padding: 0 8px; border-radius: 13px; font-size: 12px; font-weight: 800; }

/* ------------------------------------------------------------------ States (loading, error, empty) */

.rc-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 28px 20px;
    text-align: center;
    background: var(--rc-card);
    border: 1px dashed var(--rc-card-border);
    border-radius: 20px;
}

.rc-state-glyph { display: inline-flex; align-items: center; justify-content: center; width: 52px; height: 52px; border-radius: 16px; font-size: 20px; }

.rc-state-title { font-family: var(--tx-font); font-size: 15px; font-weight: 600; }

.rc-state-message { margin-top: 2px; font-size: 13px; line-height: 1.45; color: var(--rc-muted); max-width: 48ch; }

.rc-state-extra { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 4px; }

.rc-state-deck { max-width: 560px; margin: 0 auto; }

/* Loading state: bones in place of the old spinner (the Dashboard's dsh-bone sweep; shapes only here). */
.rc-state-shimmer { align-items: stretch; gap: 12px; padding: 18px; text-align: left; border-style: solid; }
.rc-state-bone-head { display: flex; align-items: center; gap: 12px; }
.rc-state-bone-glyph { flex: 0 0 auto; width: 44px; height: 44px; border-radius: 14px; }
.rc-state-bone-lines { display: flex; flex-direction: column; gap: 8px; flex: 1 1 auto; min-width: 0; }
.rc-state-bone-row { display: flex; align-items: center; gap: 10px; padding: 6px 0; }
.rc-state-bone-dot { flex: 0 0 auto; width: 28px; height: 28px; border-radius: 9px; }
.rc-state-bone-end { flex: 0 0 auto; width: 3rem; height: 11px; margin-left: auto; }

.rc-spinner {
    display: inline-block;
    width: 22px;
    height: 22px;
    border: 3px solid hsl(calc(247.83deg + var(--ci-accent-shift, 0deg)) 76.3% 58.63% / .2);
    border-top-color: var(--tx-primary);
    border-radius: 50%;
    animation: rc-spin .8s linear infinite;
}

.rc-spinner-sm { width: 14px; height: 14px; border-width: 2px; }

/* ------------------------------------------------------------------ Heroes, pills, tiles */

.rc-hero {
    position: relative;
    padding: 18px;
    border: 1px solid var(--rc-hero-border);
    border-radius: 22px;
    background: var(--rc-hero);
    box-shadow: var(--rc-shadow);
    overflow: hidden;
}

.rc-hero-top { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; margin-bottom: 10px; }

.rc-hero-kicker { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1 1 auto; }

.rc-eyebrow-sm { font-family: var(--tx-font); font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--rc-muted); }

.rc-hero-asof { font-size: 12px; color: var(--rc-light); }

.rc-hero-figure { font-family: var(--tx-font); font-size: 38px; font-weight: 700; line-height: 1.1; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }

.rc-hero-figure small { font-size: 14px; font-weight: 500; color: var(--rc-muted); margin-left: 4px; }

.rc-hero-sub { margin-top: 4px; font-size: 13px; color: var(--rc-muted); }

.rc-hero-headline { margin: 10px 0 0; font-size: 14px; line-height: 1.45; }

.rc-hero-headline-lg { font-family: var(--tx-font); font-size: 22px; font-weight: 600; line-height: 1.25; margin-top: 4px; }

.rc-hero-line { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 13px; }

.rc-hero-line.rc-kind-installments { background: transparent; }

.rc-hero-bar { margin-top: 12px; }

.rc-hero-bar-head { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 6px; font-size: 12px; font-weight: 600; }

.rc-pills { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; margin-top: 14px; }

.rc-pill {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 10px 12px;
    border-radius: 14px;
    background: var(--tx-hero-tile);
    border-left: 4px solid var(--rc-light);
    min-width: 0;
}

.rc-pill-label { font-family: var(--tx-font); font-size: 10px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--rc-muted); }

.rc-pill-value { font-family: var(--tx-font); font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums; }

.rc-pill-caption { font-size: 11px; color: var(--rc-light); }

.rc-pill-bills { border-left-color: var(--rc-bills); }
.rc-pill-subscriptions { border-left-color: var(--rc-subscriptions); }
.rc-pill-installments { border-left-color: var(--rc-installments); }
.rc-pill-neutral { border-left-color: var(--rc-light); }
.rc-pill-positive { border-left-color: var(--tx-positive); }
.rc-pill-caution { border-left-color: var(--tx-caution); }
.rc-pill-critical { border-left-color: var(--tx-critical); }

.rc-savings-pill { display: inline-flex; align-items: center; gap: 8px; margin-top: 12px; padding: 8px 12px; border-radius: 999px; background: var(--rc-positive-soft); color: var(--tx-positive); font-size: 13px; font-weight: 700; }

.rc-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }

.rc-tile {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
    padding: 12px;
    border: 0;
    border-radius: 16px;
    background: var(--tx-hero-tile);
    color: var(--rc-text);
    text-align: left;
    cursor: pointer;
    transition: transform .15s ease, box-shadow .15s ease;
}

.rc-tile:hover { transform: translateY(-1px); box-shadow: var(--rc-shadow); }

.rc-tile-glyph { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 10px; font-size: 13px; color: var(--tx-primary); background: var(--rc-accent-soft); }

.rc-tile-positive .rc-tile-glyph { color: var(--tx-positive); background: var(--rc-positive-soft); }
.rc-tile-caution .rc-tile-glyph { color: var(--tx-caution); background: var(--rc-caution-soft); }

.rc-tile-title { margin-top: 4px; font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--rc-muted); }

.rc-tile-value { font-family: var(--tx-font); font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; }

.rc-tile-caption { font-size: 11px; color: var(--rc-light); }

@media (max-width: 575.98px) {
    .rc-tiles { grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); }
    .rc-hero-figure { font-size: 30px; }
}

.rc-mix { margin-top: 4px; }

.rc-mix-bar { display: flex; height: 10px; overflow: hidden; border-radius: 999px; background: var(--rc-neutral-soft); }

.rc-mix-seg { display: block; height: 100%; }

.rc-chart-note { margin: 6px 0 0; font-size: 11px; color: var(--rc-light); }

.rc-chart-axis-labels { display: flex; justify-content: space-between; margin-top: 4px; font-size: 11px; color: var(--rc-light); }

/* ------------------------------------------------------------------ Tasks (action items, next steps) */

.rc-task { display: flex; flex-direction: column; gap: 8px; padding: 10px 12px; border-radius: 14px; background: var(--rc-row); }

.rc-task-main { display: flex; align-items: flex-start; gap: 12px; }

.rc-task-actions { display: flex; flex-wrap: wrap; gap: 6px; padding-left: 48px; }

.rc-task-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 32px;
    padding: 4px 12px;
    border: 1px solid var(--rc-line);
    border-radius: 999px;
    background: var(--rc-card);
    color: var(--rc-text);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: border-color .15s ease, background .15s ease, color .15s ease;
}

.rc-task-btn:hover:not(:disabled) { border-color: var(--tx-primary); color: var(--tx-primary); }

.rc-task-btn:disabled { opacity: .55; cursor: default; }

.rc-task-btn-done { color: var(--tx-positive); border-color: var(--tx-positive); }

.rc-task-btn-done:hover:not(:disabled) { background: var(--rc-positive-soft); color: var(--tx-positive); border-color: var(--tx-positive); }

.rc-task-btn-view { margin-left: auto; }

.rc-task-btn-primary { background: var(--tx-primary); border-color: var(--tx-primary); color: #fff; }

.rc-task-btn-primary:hover:not(:disabled) { background: var(--tx-thumb-on); color: #fff; }

.rc-done-list { margin-top: 10px; display: flex; flex-direction: column; gap: 6px; }

@media (max-width: 575.98px) {
    .rc-task-actions { padding-left: 0; }
}

/* ------------------------------------------------------------------ Split bar, tree map, due map, slices */

/* Who pays for what: the couple share bar with the Snapshot seam blend (CoupleShareBar, couple-share-bar.css). */
.rc-split-bar { display: flex; height: 14px; overflow: hidden; border-radius: 999px; background: var(--rc-neutral-soft); }

.rc-treemap { position: relative; width: 100%; aspect-ratio: 1.6; margin-bottom: 12px; border-radius: 16px; overflow: hidden; background: var(--rc-neutral-soft); }

.rc-treemap-tile { position: absolute; display: flex; flex-direction: column; justify-content: flex-end; gap: 1px; padding: 8px; box-sizing: border-box; border: 2px solid var(--rc-card); overflow: hidden; }

.rc-treemap-label { font-family: var(--tx-font); font-size: 12px; font-weight: 600; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.rc-treemap-detail { font-size: 10.5px; opacity: .9; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.rc-treemap-center { position: absolute; top: 10px; right: 12px; display: flex; flex-direction: column; align-items: flex-end; padding: 6px 10px; border-radius: 12px; background: var(--tx-glass); backdrop-filter: blur(6px); font-family: var(--tx-font); font-weight: 700; font-size: 15px; }

.rc-treemap-center small { font-size: 10px; font-weight: 500; color: var(--rc-muted); }

.rc-slice { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto auto; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 10px; font-size: 13px; }

.rc-slice:nth-child(odd) { background: var(--rc-row); }

.rc-slice-label { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.rc-slice-count { font-size: 11px; color: var(--rc-light); }

.rc-slice-amount { font-variant-numeric: tabular-nums; font-weight: 600; }

.rc-slice-share { font-size: 12px; color: var(--rc-muted); min-width: 36px; text-align: right; }

.rc-duemap { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }

.rc-duecell { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; aspect-ratio: 1; border-radius: 10px; background: var(--rc-neutral-soft); font-size: 11px; color: var(--rc-text); border: 2px solid transparent; }

.rc-duecell-strong { color: #fff; }

.rc-duecell-payday { border-color: var(--tx-positive); }

.rc-duecell-day { font-weight: 700; }

.rc-duecell-amount { font-size: 9.5px; opacity: .9; font-variant-numeric: tabular-nums; }

.rc-heat-scale { display: inline-block; width: 44px; height: 10px; border-radius: 5px; background: linear-gradient(90deg, rgba(var(--rc-bills-rgb), .18), rgba(var(--rc-bills-rgb), 1)); }

.rc-donut-wrap { position: relative; }

.rc-donut-center { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; font-family: var(--tx-font); font-size: 20px; font-weight: 700; pointer-events: none; }

.rc-donut-center small { font-size: 11px; font-weight: 500; color: var(--rc-muted); }

.rc-category-amount { display: flex; flex-direction: column; align-items: flex-end; text-align: right; }

.rc-category-amount strong { font-family: var(--tx-font); font-size: 15px; font-variant-numeric: tabular-nums; }

.rc-category-amount small { font-size: 11px; color: var(--rc-light); }

.rc-category .rc-bar, .rc-bucket .rc-bar { margin-bottom: 10px; }

.rc-today-headline { margin: 0 0 4px; font-family: var(--tx-font); font-size: 16px; font-weight: 600; line-height: 1.35; }

/* ------------------------------------------------------------------ Dialogs (Checkup, price history, day, threshold, pause) */

.e-dialog.rc-dialog { border-radius: 22px; }

.rc-dialog-root { display: flex; flex-direction: column; height: 100%; min-height: 0; font-family: var(--tx-font-text); color: var(--rc-text); background: var(--tx-page); }

.rc-dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px 12px; }

.rc-dialog-titles { display: flex; align-items: center; gap: 12px; min-width: 0; }

.rc-dialog-title { margin: 0; font-family: var(--tx-font); font-size: 18px; font-weight: 600; line-height: 1.25; }

.rc-dialog-subtitle { margin: 2px 0 0; font-size: 12px; color: var(--rc-muted); }

.rc-dialog-actions { display: flex; gap: 8px; flex: 0 0 auto; }

.rc-dialog-menu { padding: 0 18px 12px; }

.rc-dialog-scroll { flex: 1 1 auto; min-height: 0; overflow: auto; padding: 4px 18px 18px; }

.rc-dialog-notes { margin-top: 14px; }

.rc-dialog-snackbar { position: relative; }

.rc-dialog-buttons { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }

.rc-threshold, .rc-pause { padding: 20px; gap: 10px; }

.rc-threshold .rc-dialog-title, .rc-pause .rc-dialog-title { margin-bottom: 4px; }

.rc-quickpicks { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 12px 0; }

.rc-quickpick { padding: 10px 0; border: 1px solid var(--rc-line); border-radius: 12px; background: var(--rc-card); color: var(--rc-text); font-weight: 700; font-size: 13px; cursor: pointer; }

.rc-quickpick-selected, .rc-quickpick:hover { border-color: var(--tx-primary); color: var(--tx-primary); background: var(--rc-accent-soft); }

.rc-amount-currency { padding-left: 12px; color: var(--rc-muted); font-weight: 600; align-self: center; }

.rc-option-list { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }

.rc-option { padding: 12px 14px; border: 1px solid var(--rc-line); border-radius: 12px; background: var(--rc-card); color: var(--rc-text); text-align: left; font-size: 14px; font-weight: 600; cursor: pointer; }

.rc-option:hover { border-color: var(--tx-primary); background: var(--rc-accent-soft); }

.rc-history-summary { display: flex; flex-direction: column; gap: 10px; padding: 14px; margin-bottom: 12px; border-radius: 16px; background: var(--rc-hero); border: 1px solid var(--rc-hero-border); }

.rc-history-ends { display: flex; align-items: center; justify-content: center; gap: 16px; }

.rc-history-end { display: flex; flex-direction: column; align-items: center; gap: 2px; }

.rc-history-amount { font-family: var(--tx-font); font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; }

.rc-history-arrow { font-size: 18px; color: var(--rc-light); }

.rc-history-net { display: flex; align-items: center; justify-content: center; gap: 10px; font-size: 12px; }

.rc-history-empty { padding: 8px 0 12px; font-size: 13px; }

/* ------------------------------------------------------------------ Pulse card */

.rc-pulse { background: var(--rc-hero); border-color: var(--rc-hero-border); }

.rc-pulse-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }

.rc-pulse-body { display: flex; flex-direction: column; gap: 14px; }

.rc-pulse-headline { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

.rc-pulse-headline-text { flex: 1 1 auto; min-width: 0; }

.rc-pulse-amount { font-family: var(--tx-font); font-size: 26px; font-weight: 700; line-height: 1.15; font-variant-numeric: tabular-nums; }

.rc-pulse-amount small { font-size: 13px; font-weight: 500; color: var(--rc-muted); margin-left: 4px; }

.rc-pulse-detail { font-size: 13px; color: var(--rc-muted); }

.rc-pulse-payday { align-self: flex-start; }

.rc-pulse-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 8px; font-size: 12px; }

/* Checkup call to action: a quiet row card like the mobile one (icon tile, title + caption, round chevron), not a filled button. */
.rc-cta { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; border: 1px solid var(--rc-card-border); border-radius: 16px; background: var(--rc-row); color: var(--rc-text); text-align: left; cursor: pointer; transition: background-color .15s ease, border-color .15s ease, transform .15s ease; }

.rc-cta:hover { background: var(--rc-row-hover); border-color: rgba(var(--rc-bills-rgb), .35); transform: translateY(-1px); }

.rc-cta:focus-visible { outline: 2px solid var(--tx-primary); outline-offset: 2px; }

.rc-cta-icon { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; width: 36px; height: 36px; border-radius: 10px; background: var(--tx-primary); color: #fff; font-size: 15px; }

.rc-cta-text { display: flex; flex: 1 1 auto; min-width: 0; flex-direction: column; gap: 2px; }

.rc-cta-text strong { font-family: var(--tx-font); font-size: 14px; font-weight: 600; color: var(--rc-text); }

.rc-cta-text small { font-size: 12px; color: var(--rc-muted); }

.rc-cta-chevron { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; width: 28px; height: 28px; border-radius: 50%; background: var(--rc-accent-soft); color: var(--tx-primary); font-size: 11px; transition: transform .15s ease; }

.rc-cta:hover .rc-cta-chevron { transform: translateX(2px); }

/* ------------------------------------------------------------------ Smart signals carousel */

/*
    Urgency palette (the Dashboard and Liabilities rails' rule: the color is the urgency). Red is critical, orange is
    needs-attention-soon, aqua is informational, green is good news. --rc-sig fills the accent bar, corner badge and arrow
    chip; --rc-sig-ink colors text on the tinted card, so it stays readable in both themes.
*/
:root {
    --rc-sig-critical: #DC2626;
    --rc-sig-critical-ink: #B91C1C;
    --rc-sig-warning: #EA580C;
    --rc-sig-warning-ink: #C2410C;
    --rc-sig-info: #0891B2;
    --rc-sig-info-ink: #0E7490;
    --rc-sig-positive: #16A34A;
    --rc-sig-positive-ink: #15803D;
}

[data-bs-theme="dark"] {
    --rc-sig-critical: #EF4444;
    --rc-sig-critical-ink: #F87171;
    --rc-sig-warning: #F97316;
    --rc-sig-warning-ink: #FB923C;
    --rc-sig-info: #06B6D4;
    --rc-sig-info-ink: #22D3EE;
    --rc-sig-positive: #22C55E;
    --rc-sig-positive-ink: #4ADE80;
}

.rc-sig-critical { --rc-sig: var(--rc-sig-critical); --rc-sig-ink: var(--rc-sig-critical-ink); }
.rc-sig-warning { --rc-sig: var(--rc-sig-warning); --rc-sig-ink: var(--rc-sig-warning-ink); }
.rc-sig-info, .rc-sig-subscription { --rc-sig: var(--rc-sig-info); --rc-sig-ink: var(--rc-sig-info-ink); }
.rc-sig-positive { --rc-sig: var(--rc-sig-positive); --rc-sig-ink: var(--rc-sig-positive-ink); }

/*
    Calm rail tokens. The cards sit on a neutral surface (white in light, a faint glass in dark) with only a whisper of
    their urgency in the top-left corner; the urgency itself is carried by the slim accent bar, the glyph badge, the
    metric and the action's arrow chip, so seven critical signals read as a list, not a wall of red. The section takes a
    slight hero-style gradient (the Pulse card's recipe at a fraction of its strength) plus a faint urgency glow.
*/
:root {
    --rc-signals-hero: linear-gradient(158deg, #EDF2FC 0%, #F5F8FE 50%, #FFFFFF 100%);
    --rc-signals-border: #DCE5F5;
    --rc-signals-glow: 5%;
    --rc-signals-btn: rgba(255, 255, 255, .78);
    --rc-signal-surface: #FFFFFF;
    --rc-signal-border: #E3E9F4;
    --rc-signal-divider: #EDF1F8;
    --rc-signal-wash: 7%;
    --rc-signal-shadow: 0 1px 2px rgba(15, 23, 42, .04);
    --rc-signal-hover-shadow: 0 8px 22px rgba(31, 42, 68, .09);
    --rc-signal-action-bg: #F4F7FC;
}

[data-bs-theme="dark"] {
    --rc-signals-hero: linear-gradient(158deg, #1B2640 0%, #171F32 50%, #151B28 100%);
    --rc-signals-border: #262F47;
    --rc-signals-glow: 6%;
    --rc-signals-btn: rgba(255, 255, 255, .04);
    --rc-signal-surface: rgba(255, 255, 255, .035);
    --rc-signal-border: rgba(255, 255, 255, .07);
    --rc-signal-divider: rgba(255, 255, 255, .06);
    --rc-signal-wash: 10%;
    --rc-signal-shadow: none;
    --rc-signal-hover-shadow: 0 10px 24px rgba(0, 0, 0, .3);
    --rc-signal-action-bg: rgba(255, 255, 255, .05);
}

/* The section: the slight hero gradient, with the rail's urgency as a faint glow from the top-left. */
.rc-signals {
    margin-bottom: 1rem;
    padding: 14px 16px 12px;
    border-color: var(--rc-signals-border);
    background:
        radial-gradient(120% 160% at 0% 0%, color-mix(in srgb, var(--rc-sig) var(--rc-signals-glow), transparent) 0%, transparent 55%),
        var(--rc-signals-hero);
}

/* Compact header, matching the Liabilities Smart Signals section; the chip and headline keep the rail's urgency. */
.rc-signals .rc-card-head { align-items: center; margin-bottom: 12px; }

.rc-signals .rc-card-title { font-size: 14px; }

.rc-signals .rc-card-caption { font-size: 13px; font-weight: 600; color: var(--rc-sig-ink); }

.rc-signals .rc-chip-icon { width: 30px; height: 30px; border-radius: 9px; font-size: 13px; color: var(--rc-sig-ink); background: color-mix(in srgb, var(--rc-sig) 14%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--rc-sig) 24%, transparent); }

/* Arrows: only while the cards run off the edge (chipInCardRail sets data-rail-overflow), dimmed at either end. */
.rc-carousel-nav { gap: 6px; visibility: hidden; opacity: 0; transition: opacity .2s ease, visibility 0s linear .2s; }

.rc-signals[data-rail-overflow="true"] .rc-carousel-nav { visibility: visible; opacity: 1; transition: opacity .2s ease; }

.rc-signals .rc-icon-btn { width: 30px; height: 30px; font-size: 11px; background: var(--rc-signals-btn); border-color: var(--rc-signal-border); color: var(--rc-muted); transition: color .15s ease, border-color .15s ease, opacity .15s ease; }

.rc-signals .rc-icon-btn:disabled { opacity: .35; }

/* The rail: no scrollbar, snap to cards, click-and-hold to drag, and soft edge fades on whichever side has more. */
.rc-carousel {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
    padding: 3px 2px 6px;
    margin: -3px -2px 0;
    outline: none;
}

/* The scrollbar goes only once chipInCardRail has attached (it writes data-rail-overflow), so if the script never loads
   the rail still scrolls by its scrollbar. */
.rc-signals[data-rail-overflow] .rc-carousel { scrollbar-width: none; -ms-overflow-style: none; }

.rc-signals[data-rail-overflow] .rc-carousel::-webkit-scrollbar { display: none; }

.rc-carousel:focus-visible { outline: 2px solid var(--tx-primary); outline-offset: -2px; border-radius: 14px; }

.rc-signals[data-rail-overflow="true"] .rc-carousel { cursor: grab; }

.rc-carousel[data-rail-dragging] { cursor: grabbing; user-select: none; -webkit-user-select: none; }

.rc-carousel[data-rail-dragging] .rc-signal { cursor: grabbing; transform: none; }

.rc-signals[data-rail-can-next="true"] .rc-carousel {
    -webkit-mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 44px), transparent 100%);
    mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 44px), transparent 100%);
}

.rc-signals[data-rail-can-prev="true"] .rc-carousel {
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 44px, #000 100%);
    mask-image: linear-gradient(90deg, transparent 0, #000 44px, #000 100%);
}

.rc-signals[data-rail-can-prev="true"][data-rail-can-next="true"] .rc-carousel {
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 44px, #000 calc(100% - 44px), transparent 100%);
    mask-image: linear-gradient(90deg, transparent 0, #000 44px, #000 calc(100% - 44px), transparent 100%);
}

/* A card: neutral surface, a whisper of the urgency from the top-left, a neutral hairline that takes the accent on hover,
   a slim inset accent bar and a soft glyph badge. */
.rc-signal {
    --rc-sig: var(--rc-sig-info);
    --rc-sig-ink: var(--rc-sig-info-ink);
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex: 0 0 248px;
    min-height: 124px;
    padding: 12px 14px 11px 17px;
    border: 1px solid var(--rc-signal-border);
    border-radius: 14px;
    background:
        radial-gradient(140% 110% at 0% 0%, color-mix(in srgb, var(--rc-sig) var(--rc-signal-wash), transparent) 0%, transparent 62%),
        var(--rc-signal-surface);
    box-shadow: var(--rc-signal-shadow);
    color: var(--rc-text);
    text-align: left;
    scroll-snap-align: start;
    cursor: pointer;
    overflow: hidden;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.rc-signal:hover, .rc-signal:focus-visible { transform: translateY(-1px); border-color: color-mix(in srgb, var(--rc-sig) 34%, var(--rc-signal-border)); box-shadow: var(--rc-signal-hover-shadow); }

.rc-signal:focus-visible { outline: 2px solid color-mix(in srgb, var(--rc-sig) 60%, transparent); outline-offset: -2px; }

.rc-signal-critical { --rc-sig: var(--rc-sig-critical); --rc-sig-ink: var(--rc-sig-critical-ink); }
.rc-signal-warning { --rc-sig: var(--rc-sig-warning); --rc-sig-ink: var(--rc-sig-warning-ink); }
.rc-signal-subscription { --rc-sig: var(--rc-sig-info); --rc-sig-ink: var(--rc-sig-info-ink); }
.rc-signal-positive { --rc-sig: var(--rc-sig-positive); --rc-sig-ink: var(--rc-sig-positive-ink); }

.rc-signal-accent { position: absolute; left: 0; top: 14px; bottom: 14px; width: 3px; border-radius: 0 3px 3px 0; background: var(--rc-sig); opacity: .9; }

/* The glyph badge: a soft tint of the urgency with the glyph in its ink, tucked into the top-right corner. */
.rc-signal-glyph {
    position: absolute;
    top: 10px;
    right: 10px;
    display: inline-grid;
    place-items: center;
    width: 24px;
    height: 24px;
    border-radius: 8px;
    background: color-mix(in srgb, var(--rc-sig) 14%, transparent);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--rc-sig) 20%, transparent);
    color: var(--rc-sig-ink);
    font-size: 10px;
}

/* NEW: a quiet pill in the card's own urgency color with a pulsing dot. */
.rc-signal-new { display: inline-flex; align-items: center; gap: 4px; align-self: center; flex: 0 0 auto; padding: 1px 6px 1px 5px; border-radius: 999px; background: color-mix(in srgb, var(--rc-sig) 12%, transparent); color: var(--rc-sig-ink); font-size: 8px; font-weight: 800; letter-spacing: .09em; line-height: 1.4; }

.rc-signal-new-dot { width: 4px; height: 4px; border-radius: 50%; background: var(--rc-sig); box-shadow: 0 0 0 2px color-mix(in srgb, var(--rc-sig) 22%, transparent); animation: rc-signal-pulse 1.8s ease-in-out infinite; }

@keyframes rc-signal-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: .45; transform: scale(.8); }
}

/* Title row: one line, ellipsized, with the NEW pill inline, clear of the badge. */
.rc-signal-row { display: flex; align-items: center; gap: 6px; min-width: 0; min-height: 24px; padding-right: 30px; }

.rc-signal-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--tx-font); font-size: 13px; font-weight: 600; line-height: 1.3; color: var(--rc-text); }

.rc-signal-message { font-size: 12px; line-height: 1.4; color: var(--rc-muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* Footer: a hairline, then the metric (in the urgency's ink), the due label and the action. */
.rc-signal-footer { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: auto; padding-top: 9px; border-top: 1px solid var(--rc-signal-divider); font-size: 11px; }

.rc-signal-metric { font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--rc-sig-ink); }

.rc-signal-due { display: inline-flex; align-items: center; gap: 4px; color: var(--rc-muted); }

/* The action: a neutral ghost pill with the urgency only in its arrow chip; it takes the accent when the card is hovered. */
.rc-signal-action { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; min-width: 0; padding: 2px 2px 2px 10px; border-radius: 999px; background: var(--rc-signal-action-bg); border: 1px solid var(--rc-signal-border); color: var(--rc-muted); font-size: 11px; font-weight: 600; letter-spacing: .01em; white-space: nowrap; transition: background-color .18s ease, border-color .18s ease, color .18s ease; }

.rc-signal-action-label { overflow: hidden; text-overflow: ellipsis; }

.rc-signal-action-arrow { display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center; width: 18px; height: 18px; border-radius: 50%; background: color-mix(in srgb, var(--rc-sig) 16%, transparent); color: var(--rc-sig-ink); font-size: 8px; transition: background-color .18s ease, color .18s ease, transform .18s ease; }

.rc-signal:hover .rc-signal-action, .rc-signal:focus-visible .rc-signal-action { background: color-mix(in srgb, var(--rc-sig) 10%, transparent); border-color: color-mix(in srgb, var(--rc-sig) 30%, transparent); color: var(--rc-sig-ink); }

.rc-signal:hover .rc-signal-action-arrow, .rc-signal:focus-visible .rc-signal-action-arrow { background: var(--rc-sig); color: #fff; transform: translateX(1px); }

.rc-signal-bone { gap: 10px; cursor: default; }

.rc-signal-bone:hover { transform: none; box-shadow: var(--rc-signal-shadow); border-color: var(--rc-signal-border); }

.rc-signal-bone .tx-skeleton-block { display: block; height: 12px; border-radius: 6px; background: var(--tx-skeleton-bone); }

.rc-signal-bone .tx-skeleton-block:first-child { width: 60%; }

@media (max-width: 575.98px) {
    .rc-signal { flex-basis: 228px; }
}

@media (prefers-reduced-motion: reduce) {
    .rc-signal-new-dot { animation: none; }
    .rc-carousel-nav, .rc-signal-action-arrow { transition: none; }
}

/* ------------------------------------------------------------------ Calendar */

.rc-range-pill { padding: 4px 10px; border-radius: 999px; background: var(--rc-accent-soft); color: var(--tx-primary); font-size: 11px; font-weight: 700; white-space: nowrap; }

.rc-calendar-headers { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; margin-bottom: 4px; font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--rc-light); text-align: center; }

.rc-calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }

.rc-day {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    min-height: 104px;
    padding: 6px;
    border: 2px solid transparent;
    border-radius: 14px;
    background: var(--rc-row);
    color: var(--rc-text);
    text-align: left;
    cursor: default;
    transition: background .15s ease, border-color .15s ease;
}

.rc-day-active { cursor: pointer; }

.rc-day-active:hover { background: var(--rc-row-hover); }

.rc-day-today { background: var(--rc-today); }

.rc-day-selected { border-color: var(--rc-selection); }

.rc-day-top { display: flex; align-items: center; justify-content: space-between; }

.rc-day-number { font-family: var(--tx-font); font-size: 13px; font-weight: 700; }

.rc-day-today .rc-day-number { color: var(--tx-primary); }

.rc-day-payday { font-size: 12px; font-weight: 800; color: var(--tx-positive); }

.rc-day-logos { position: relative; width: 24px; }

.rc-day-logo { position: absolute; left: 0; display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--rc-card); background: var(--rc-card); overflow: hidden; }

.rc-day-logo .rc-logo { width: 18px; height: 18px; font-size: 8px; }

.rc-day-logo-more { background: var(--rc-neutral-soft); color: var(--rc-muted); font-size: 9px; font-weight: 800; }

.rc-day-pill { margin-top: auto; align-self: flex-start; padding: 2px 7px; border-radius: 8px; font-size: 10.5px; font-weight: 800; font-variant-numeric: tabular-nums; }

.rc-day-pill-bills { color: var(--tx-primary); background: var(--rc-accent-soft); }

.rc-day-pill-large { color: var(--rc-large); background: var(--rc-large-soft); }

.rc-day-pill-income { color: var(--tx-positive); background: var(--rc-positive-soft); }

.rc-day-bone .tx-skeleton-block { display: block; height: 100%; min-height: 60px; border-radius: 10px; background: var(--tx-skeleton-bone); }

.rc-calendar-legend { margin-top: 10px; }

@media (max-width: 575.98px) {
    .rc-day { min-height: 84px; padding: 4px; }
    .rc-day-pill { font-size: 9.5px; padding: 2px 5px; }
}

/* ------------------------------------------------------------------ Forecast */

.rc-windows { display: inline-flex; gap: 4px; padding: 3px; border-radius: 999px; background: var(--tx-seg-track); }

.rc-window { padding: 6px 12px; border: 0; border-radius: 999px; background: transparent; color: var(--tx-seg-text); font-size: 12px; font-weight: 700; cursor: pointer; }

.rc-window-selected { background: var(--tx-seg-pill); color: var(--tx-seg-selected-text); box-shadow: 0 2px 8px var(--tx-seg-pill-shadow); }

.rc-banner { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; border: 1px solid var(--rc-card-border); border-radius: 16px; background: var(--rc-card); color: var(--rc-text); text-align: left; cursor: pointer; }

.rc-banner-caution { border-color: rgba(180, 83, 9, .35); background: var(--rc-caution-soft); }

.rc-banner-text { display: flex; flex-direction: column; gap: 2px; flex: 1 1 auto; min-width: 0; font-size: 13px; }

.rc-banner-text strong { font-family: var(--tx-font); font-weight: 600; }

.rc-period { padding: 10px 12px; border-radius: 14px; background: var(--rc-row); }

.rc-period-heaviest { box-shadow: inset 0 0 0 1px rgba(180, 83, 9, .35); }

.rc-period-bars { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }

.rc-period-bar { display: grid; grid-template-columns: 90px minmax(0, 1fr); align-items: center; gap: 8px; }

.rc-period-bar-label { font-size: 11px; color: var(--rc-muted); white-space: nowrap; }

.rc-grouping { position: relative; }

.rc-menu-pop { position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; display: flex; flex-direction: column; gap: 2px; min-width: 260px; padding: 6px; border: 1px solid var(--rc-card-border); border-radius: 14px; background: var(--rc-card); box-shadow: var(--rc-shadow); }

.rc-menu-pop-item { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; border: 0; border-radius: 10px; background: transparent; color: var(--rc-text); text-align: left; cursor: pointer; }

.rc-menu-pop-item:hover { background: var(--rc-row-hover); }

.rc-menu-pop-selected { background: var(--rc-accent-soft); }

.rc-menu-pop-title { font-size: 13px; font-weight: 700; }

.rc-menu-pop-detail { font-size: 11.5px; color: var(--rc-muted); }

.rc-group + .rc-group { margin-top: 12px; }

.rc-group-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 6px; }

.rc-group-title { font-family: var(--tx-font); font-size: 13px; font-weight: 600; }

.rc-group-caption { margin-left: 8px; font-size: 11.5px; color: var(--rc-muted); }

.rc-group-amount { font-family: var(--tx-font); font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }

.rc-date-chip { display: flex; flex-direction: column; align-items: center; justify-content: center; flex: 0 0 auto; width: 40px; height: 44px; border-radius: 12px; background: var(--rc-card); border: 1px solid var(--rc-line); }

.rc-date-chip-today { background: var(--rc-accent-soft); border-color: transparent; color: var(--tx-primary); }

.rc-date-chip-month { font-size: 9px; font-weight: 800; letter-spacing: .06em; }

.rc-date-chip-day { font-family: var(--tx-font); font-size: 16px; font-weight: 700; line-height: 1.1; }

/* ------------------------------------------------------------------ Bills & Subscriptions */

.rc-area-menu { margin-bottom: 1rem; }

.rc-area-menu .tx-seg { max-width: 760px; }

.rc-tabs { display: flex; flex-wrap: wrap; gap: 6px; padding: 4px; border-radius: 999px; background: var(--rc-surface); width: fit-content; max-width: 100%; }

.rc-tab { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border: 0; border-radius: 999px; background: transparent; color: var(--tx-seg-text); font-size: 13px; font-weight: 700; cursor: pointer; }

.rc-tab-selected { background: var(--tx-seg-pill); color: var(--tx-seg-selected-text); box-shadow: 0 2px 8px var(--tx-seg-pill-shadow); }

.rc-tab-count { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--rc-neutral-soft); font-size: 11px; font-weight: 800; }

.rc-tab-count-accent { background: var(--tx-primary); color: #fff; }

.rc-inactive-item { padding: 12px; }

.rc-inactive-item .rc-row { padding: 0; background: transparent; }

.rc-inactive-actions { padding-left: 50px; margin-top: 8px; }

.rc-inactive-detail { margin: 6px 0 0 50px; }

@media (max-width: 575.98px) {
    .rc-inactive-actions, .rc-inactive-detail { padding-left: 0; margin-left: 0; }
}

/* ------------------------------------------------------------------ Needs Review page */

.rc-review-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 10px 16px; margin-bottom: 1rem; }

.rc-review-headline { margin: 0; font-family: var(--tx-font); font-size: 18px; font-weight: 600; }

.rc-review-titles p { margin: 2px 0 0; font-size: 13px; }

.rc-mode { display: inline-flex; gap: 2px; padding: 3px; border-radius: 999px; background: var(--rc-surface); }

.rc-mode-btn { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 30px; border: 0; border-radius: 999px; background: transparent; color: var(--tx-seg-text); cursor: pointer; }

.rc-mode-selected { background: var(--tx-seg-pill); color: var(--tx-seg-selected-glyph); box-shadow: 0 2px 8px var(--tx-seg-pill-shadow); }

.rc-deck-area { max-width: 560px; margin: 0 auto 1rem; }

.rc-deck-strip { min-height: 68px; display: flex; align-items: center; margin-bottom: 8px; }

.rc-progress { display: flex; flex-direction: column; gap: 6px; width: 100%; }

.rc-progress-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }

.rc-progress-position { font-size: 13px; font-weight: 700; color: var(--rc-text); }

.rc-progress-pct { font-size: 12px; font-weight: 700; color: var(--tx-positive); font-variant-numeric: tabular-nums; }

.rc-progress-text { font-size: 12px; color: var(--rc-muted); text-align: center; }

/* Segmented bar: one box per card. Done = green, skipped = amber, on screen = accent with a soft halo, rest = track. */
.rc-steps { display: flex; gap: 4px; width: 100%; height: 10px; }

.rc-step { flex: 1 1 0; min-width: 0; border-radius: 4px; background: var(--rc-neutral-soft); box-shadow: inset 0 0 0 1px var(--rc-card-border); transition: background-color .25s ease, box-shadow .25s ease, transform .25s ease; }

.rc-step-done { background: var(--tx-positive); box-shadow: none; }

.rc-step-skipped { background: var(--tx-caution); box-shadow: none; opacity: .85; }

.rc-step-current { background: var(--tx-primary); box-shadow: 0 0 0 3px var(--rc-accent-soft); transform: scaleY(1.2); }

.rc-bar-progress { height: 10px; box-shadow: inset 0 0 0 1px var(--rc-card-border); }

.rc-toast { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px 8px 14px; border-radius: 12px; background: var(--tx-confirm-accept); color: #fff; font-size: 13px; }

.rc-toast span:first-child { flex: 1 1 auto; }

.rc-toast-undo { padding: 4px 10px; border: 0; border-radius: 8px; background: rgba(255, 255, 255, .18); color: #fff; font-weight: 700; cursor: pointer; }

.rc-toast-close { padding: 4px 6px; border: 0; background: transparent; color: #fff; cursor: pointer; }

.rc-toast-floating { position: fixed; left: 50%; bottom: 24px; z-index: 1200; width: min(480px, calc(100vw - 32px)); transform: translateX(-50%); box-shadow: var(--tx-dialog-shadow); }

.rc-list-area { display: flex; flex-direction: column; gap: 10px; }

.rc-summary-strip { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; padding: 12px 14px; border-radius: 16px; background: var(--rc-hero); border: 1px solid var(--rc-hero-border); }

.rc-summary-text { display: flex; flex-direction: column; gap: 2px; font-size: 13px; }

.rc-summary-text strong { font-family: var(--tx-font); font-weight: 600; }

.rc-summary-text span { color: var(--rc-muted); }

.rc-list-intro { margin: 0; font-size: 12.5px; }

.rc-review-rows { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 380px), 1fr)); gap: 10px; }

/* ------------------------------------------------------------------ Needs Review rows */

.nr-row { display: flex; flex-direction: column; gap: 8px; padding: 12px; }

.nr-row-main { position: relative; display: flex; align-items: flex-start; gap: 12px; width: 100%; padding: 0; border: 0; background: transparent; color: var(--rc-text); text-align: left; font: inherit; cursor: pointer; }

.nr-row-dot { position: absolute; left: 30px; top: 28px; display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--rc-card); color: #fff; font-size: 8px; }

.nr-row-text { display: flex; flex-direction: column; gap: 2px; flex: 1 1 auto; min-width: 0; }

.nr-row-subtitle { font-size: 12.5px; font-weight: 600; }

.nr-row-actions { display: flex; justify-content: flex-end; gap: 6px; }

.nr-row-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 4px 12px; border: 1px solid var(--rc-line); border-radius: 999px; background: var(--rc-card); color: var(--rc-text); font-size: 12px; font-weight: 600; cursor: pointer; }

.nr-row-btn:hover { border-color: var(--tx-primary); color: var(--tx-primary); }

.nr-row-btn-reviewed { color: var(--tx-positive); border-color: var(--tx-positive); }

.nr-row-btn-reviewed:hover { background: var(--rc-positive-soft); color: var(--tx-positive); border-color: var(--tx-positive); }

.nr-row-btn-accent { color: var(--tx-primary); border-color: var(--tx-primary); }

/* ------------------------------------------------------------------ Needs Review deck */

.nr-deck { display: flex; flex-direction: column; align-items: center; gap: 14px; }

.nr-stack { position: relative; width: 100%; height: clamp(520px, 68vh, 720px); outline: none; touch-action: pan-y; user-select: none; -webkit-user-select: none; }

.nr-stack:focus-visible { outline: 2px solid var(--tx-primary); outline-offset: 6px; border-radius: 24px; }

.nr-slot { position: absolute; inset: 0; }

.nr-slot-back { transform: translate3d(0, 24px, 0) scale(.94); opacity: .7; pointer-events: none; }

.nr-slot-front { z-index: 2; will-change: transform; }

.nr-card { height: 100%; border-radius: 24px; }

.nr-card-surface { position: relative; display: flex; flex-direction: column; height: 100%; overflow: hidden; border: 1px solid var(--rc-card-border); border-radius: 24px; background: var(--rc-card); box-shadow: var(--rc-shadow); }

.nr-card-dragging .nr-card-surface { box-shadow: 0 24px 48px rgba(31, 42, 68, .18); }

.nr-head { padding: 14px 16px 10px; background: linear-gradient(180deg, var(--rc-hero-soft) 0%, transparent 100%); }

.nr-head-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 0; border: 0; background: transparent; color: var(--rc-text); text-align: left; font: inherit; cursor: pointer; }

.nr-logo-host { position: relative; flex: 0 0 auto; }

.nr-pen-badge { position: absolute; right: -4px; bottom: -4px; display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--rc-card); background: var(--tx-primary); color: #fff; font-size: 8px; }

.nr-head-text { display: flex; flex-direction: column; gap: 2px; flex: 1 1 auto; min-width: 0; }

.nr-name { font-family: var(--tx-font); font-size: 17px; font-weight: 600; line-height: 1.25; overflow-wrap: anywhere; }

.nr-meta { font-size: 12px; color: var(--rc-muted); }

.nr-head-amount { display: flex; flex-direction: column; align-items: flex-end; flex: 0 0 auto; }

.nr-amount { font-family: var(--tx-font); font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; }

.nr-cadence { font-size: 11px; color: var(--rc-muted); }

.nr-chips { display: flex; align-items: center; gap: 6px; margin-top: 10px; }

.nr-chip { display: inline-flex; align-items: center; gap: 5px; padding: 4px 9px; border-radius: 10px; font-size: 10.5px; font-weight: 700; white-space: nowrap; }

.nr-chip .tx-glyph { font-size: 10px; }

.nr-chip-critical { color: var(--tx-nr-critical); background: var(--tx-critical-soft); }
.nr-chip-warning { color: var(--tx-nr-warning); background: var(--tx-nr-warning-soft); }
.nr-chip-info { color: var(--tx-nr-info); background: var(--tx-nr-info-soft); }
.nr-chip-muted { color: var(--rc-muted); background: var(--rc-neutral-soft); }
.nr-chip-positive { color: var(--tx-positive); background: var(--rc-positive-soft); }

.nr-chip-forecast { min-width: 0; overflow: hidden; text-overflow: ellipsis; }

.nr-open { display: inline-flex; align-items: center; gap: 4px; margin-left: auto; padding: 4px 8px 4px 10px; border: 1px solid var(--rc-line); border-radius: 999px; background: var(--rc-card); color: var(--rc-text); font-size: 11px; font-weight: 700; cursor: pointer; white-space: nowrap; }

.nr-open:hover { border-color: var(--tx-primary); color: var(--tx-primary); }

.nr-body { display: flex; flex-direction: column; gap: 12px; flex: 1 1 auto; min-height: 0; padding: 12px 16px 16px; overflow: auto; overscroll-behavior: contain; }

.nr-issue-row { display: flex; align-items: flex-start; gap: 12px; }

.nr-issue-glyph { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; width: 36px; height: 36px; border-radius: 11px; font-size: 15px; }

.nr-issue-text { min-width: 0; }

.nr-headline { margin: 0; font-family: var(--tx-font); font-size: 15px; font-weight: 600; line-height: 1.3; }

.nr-summary { margin: 4px 0 0; font-size: 13px; line-height: 1.45; color: var(--rc-muted); }

.nr-step-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; }

.nr-step-btn { display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border: 0; border-radius: 999px; background: var(--tx-primary); color: #fff; font-size: 13px; font-weight: 700; cursor: pointer; }

.nr-step-btn:hover { background: var(--tx-thumb-on); }

.nr-more-link { padding: 6px 8px; border: 0; background: transparent; color: var(--tx-primary); font-size: 12px; font-weight: 700; cursor: pointer; }

.nr-charges { margin-top: auto; }

.nr-bars { height: 70px; }

.nr-charges-caption { margin: 6px 0 0; font-size: 11.5px; color: var(--rc-muted); }

.nr-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }

.nr-tile { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 10px 12px; border: 0; border-radius: 14px; background: var(--tx-nr-tile); color: var(--rc-text); text-align: left; font: inherit; cursor: pointer; }

.nr-tile:hover { box-shadow: inset 0 0 0 1px var(--tx-primary); }

.nr-tile-label { display: inline-flex; align-items: center; gap: 5px; font-size: 10.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--rc-muted); }

.nr-tile-label .tx-glyph { font-size: 9px; }

.nr-tile-value { display: inline-flex; align-items: center; gap: 6px; font-family: var(--tx-font); font-size: 13.5px; font-weight: 600; min-width: 0; overflow-wrap: anywhere; }

.nr-tile-edited .nr-tile-label { color: var(--tx-primary); }

.nr-segments { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; padding: 4px; border-radius: 14px; background: var(--tx-seg-track); }

.nr-segment { display: inline-flex; flex-direction: column; align-items: center; gap: 3px; padding: 7px 4px; border: 0; border-radius: 11px; background: transparent; color: var(--tx-seg-text); font-size: 11px; font-weight: 700; cursor: pointer; }

.nr-segment-selected { background: var(--rc-card); box-shadow: 0 2px 8px var(--tx-seg-pill-shadow); }

.nr-segment-selected.nr-segment-active { color: var(--tx-nr-active); }
.nr-segment-selected.nr-segment-paused { color: var(--tx-nr-paused); }
.nr-segment-selected.nr-segment-cancelled { color: var(--tx-nr-cancelled); }
.nr-segment-selected.nr-segment-archived { color: var(--tx-nr-archived); }

.nr-status-hint { margin: 6px 0 0; font-size: 11.5px; color: var(--rc-muted); text-align: center; }

.nr-card-readonly .nr-segment { cursor: not-allowed; }

.nr-stamp { position: absolute; top: 18px; display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border: 3px solid currentColor; border-radius: 10px; font-family: var(--tx-font); font-size: 18px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; opacity: 0; pointer-events: none; background: var(--rc-card); }

.nr-stamp-right { left: 18px; color: var(--tx-nr-reviewed); transform: rotate(-12deg); opacity: var(--nr-stamp-right, 0); }

.nr-stamp-left { right: 18px; color: var(--tx-critical); transform: rotate(12deg); opacity: var(--nr-stamp-left, 0); }

.nr-card-back .nr-stamp { display: none; }

.nr-deck-buttons { display: flex; align-items: center; justify-content: center; gap: 22px; padding: 4px 0 8px; }

.nr-deck-btn { display: inline-flex; align-items: center; justify-content: center; width: 58px; height: 58px; border: 2px solid var(--rc-line); border-radius: 50%; background: var(--rc-card); font-size: 20px; cursor: pointer; transition: transform .15s ease, box-shadow .15s ease; box-shadow: var(--rc-shadow); }

.nr-deck-btn:hover { transform: translateY(-2px); }

.nr-deck-btn-skip { color: var(--tx-critical); border-color: var(--tx-critical); }

.nr-deck-btn-reviewed { color: var(--tx-nr-reviewed); border-color: var(--tx-nr-reviewed); }

.nr-deck-btn-details { width: 46px; height: 46px; font-size: 15px; color: var(--tx-primary); border-color: var(--tx-primary); }

.nr-deck-busy .nr-deck-btn { opacity: .85; }

.nr-deck-armed .nr-slot-front { filter: saturate(1.1); }

@media (max-width: 575.98px) {
    .nr-stack { height: clamp(480px, 72vh, 640px); }
    .nr-deck-btn { width: 50px; height: 50px; font-size: 18px; }
    .nr-deck-btn-details { width: 42px; height: 42px; }
}

@media (prefers-reduced-motion: reduce) {
    .rc-launcher, .rc-tile, .rc-signal, .rc-signal-action, .rc-cta, .nr-deck-btn, .rc-bar-fill, .rc-step { transition: none; }
    .rc-spin, .rc-spinner { animation-duration: 1.5s; }
}

/* ------------------------------------------------------------------------------------------------------------------
   Needs Review quick view (the mobile editor sheet): slides up from the bottom over a scrim. One column on narrow
   screens; on wide screens the review (what we noticed, next steps, recent charges) sits beside the settings (status,
   details, note). The footer (links and save buttons) stays in view.
   ------------------------------------------------------------------------------------------------------------------ */
html.rc-scroll-locked,
html.rc-scroll-locked body { overflow: hidden; }

.nrq-overlay {
    position: fixed;
    inset: 0;
    z-index: 1049;
    background: rgba(11, 15, 25, .48);
    animation: nrq-fade-in 240ms ease-out both;
}

.nrq-sheet {
    position: fixed;
    left: 50%;
    bottom: 0;
    z-index: 1050;
    display: flex;
    flex-direction: column;
    width: min(1080px, 100vw);
    max-height: min(92vh, 980px);
    max-height: min(92dvh, 980px);
    transform: translateX(-50%);
    border: 1px solid var(--rc-card-border);
    border-bottom: 0;
    border-radius: 24px 24px 0 0;
    background: var(--tx-page);
    color: var(--tx-text);
    box-shadow: var(--tx-dialog-shadow);
    outline: none;
    overflow: hidden;
    animation: nrq-slide-up 240ms cubic-bezier(.2, .8, .2, 1) both;
}

.nrq-overlay.nrq-closing { animation: nrq-fade-out 240ms ease-in both; pointer-events: none; }
.nrq-sheet.nrq-closing { animation: nrq-slide-down 240ms ease-in both; pointer-events: none; }

/* The editor's own spacing (recurring-stream-editor.css resets these under .rse). */
.nrq-sheet p,
.nrq-sheet h2,
.nrq-sheet h3,
.nrq-sheet h4 { margin: 0; }

@keyframes nrq-slide-up {
    from { transform: translate(-50%, calc(100% + 16px)); }
    to { transform: translate(-50%, 0); }
}

@keyframes nrq-slide-down {
    from { transform: translate(-50%, 0); }
    to { transform: translate(-50%, calc(100% + 16px)); }
}

@keyframes nrq-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes nrq-fade-out {
    from { opacity: 1; }
    to { opacity: 0; }
}

.nrq-grip {
    flex: none;
    align-self: center;
    width: 56px;
    height: 5px;
    margin: 10px 0 2px;
    border-radius: 999px;
    background: var(--tx-border);
}

.nrq-head {
    flex: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 8px 20px 12px;
    border-bottom: 1px solid var(--tx-border);
}

.nrq-head-row {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.nrq-head-text {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.nrq-name {
    margin: 0;
    overflow: hidden;
    font-family: Poppins, Manrope, sans-serif;
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nrq-meta {
    margin: 0;
    overflow: hidden;
    color: var(--tx-muted);
    font-size: .82rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nrq-close {
    display: inline-flex;
    flex: none;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border: 1px solid var(--tx-border);
    border-radius: 50%;
    background: var(--tx-surface);
    color: var(--tx-text);
    cursor: pointer;
}

.nrq-close:hover { border-color: var(--tx-primary); color: var(--tx-primary); }

.nrq-chips { margin: 0; }

.nrq-body {
    flex: 1 1 auto;
    min-height: 0;
    padding: 16px 20px 20px;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.nrq-readonly { margin-bottom: 12px; }

.nrq-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 32px 16px;
    text-align: center;
}

.nrq-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
}

.nrq-col {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
}

.nrq-foot {
    flex: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px 20px calc(14px + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid var(--tx-border);
    background: var(--tx-page);
}

.nrq-foot .rse-validation { margin: 0; }

.nrq-foot-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px 16px;
}

.nrq-links {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 16px;
}

.nrq-save {
    display: flex;
    flex: 1 1 320px;
    justify-content: flex-end;
    gap: 10px;
}

.nrq-save .rse-save-primary { flex: 0 1 320px; min-width: 200px; }

.nrq-confirm-scrim {
    position: absolute;
    inset: 0;
    z-index: 5;
    background: rgba(11, 15, 25, .36);
}

.nrq-confirm {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 6;
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: min(420px, calc(100% - 32px));
    padding: 20px;
    transform: translate(-50%, -50%);
    border: 1px solid var(--rc-card-border);
    border-radius: 20px;
    background: var(--tx-page);
    box-shadow: var(--tx-dialog-shadow);
}

.nrq-confirm-title {
    margin: 0;
    font-family: Poppins, Manrope, sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
}

.nrq-confirm-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.tx-btn.nrq-confirm-critical { background: var(--tx-critical); border-color: var(--tx-critical); }

/* The deck's front card opens the quick view when clicked. */
.nr-slot-front .nr-body { cursor: pointer; }

@media (min-width: 992px) {
    .nrq-sheet { bottom: 16px; border-bottom: 1px solid var(--rc-card-border); border-radius: 24px; }
    .nrq-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; gap: 16px; }
    .nrq-body { padding: 18px 24px 24px; }
    .nrq-head, .nrq-foot { padding-left: 24px; padding-right: 24px; }
    .nrq-foot { padding-bottom: 16px; }
}

@media (max-width: 575.98px) {
    .nrq-sheet { max-height: 96vh; max-height: 96dvh; border-radius: 20px 20px 0 0; }
    .nrq-head, .nrq-body, .nrq-foot { padding-left: 14px; padding-right: 14px; }
    .nrq-save { flex-basis: 100%; }
    .nrq-save .rse-save-primary { flex: 1 1 auto; min-width: 0; }
}

@media (prefers-reduced-motion: reduce) {
    .nrq-sheet, .nrq-overlay, .nrq-sheet.nrq-closing, .nrq-overlay.nrq-closing { animation-duration: 1ms; }
}



/* The Daily Summary day sheet (DashboardBottomSheet, the Accounts sheet's slide-up shell): sized to its rows up to
   90vh, the sheet itself scrolls, in the area's page surface. Element + two classes outrank the shell's scoped rules. */
section.dbs-sheet.rc-day-sheet {
    width: min(560px, calc(100vw - 1rem));
    padding: .65rem 1rem 1.25rem;
    background: var(--tx-page);
    color: var(--rc-text);
}

.rc-day-sheet-root { height: auto; background: transparent; }

.rc-day-sheet-root .rc-dialog-head { padding: 0 4px 12px; }

.rc-day-sheet-root .rc-dialog-scroll { overflow: visible; padding: 0 0 4px; }

/* Dark theme: the close "X" sat dark-on-dark against the sheet; lift the glyph and its ring. */
[data-bs-theme="dark"] .rc-day-sheet-root .rc-icon-btn {
    color: #F1F2FA;
    border-color: rgba(255, 255, 255, .28);
}

[data-bs-theme="dark"] .rc-day-sheet-root .rc-icon-btn:hover:not(:disabled) {
    color: #fff;
    border-color: var(--tx-primary);
}

@media (max-width: 575.98px) {
    section.dbs-sheet.rc-day-sheet { width: 100%; }
}
