/* ---------- FINANCE ---------- */
/* Page head: serif title, one warn-dot status line from the real invoice balances, two actions. */
html body.workspace-framed.rt-route:not(#_):not(._) #panel-finance .finance-header { padding: 0; margin-block-end: 10px; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-finance .finance-header-copy { display: flex; flex-direction: column; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-finance .finance-header-copy > h1 { order: 0; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-finance .finance-status { order: 1; display: flex; flex-wrap: wrap; align-items: center; gap: 0 4px; margin: 10px 0 0; font-size: 15px; line-height: 1.5; color: var(--at-ink); text-shadow: var(--at-text-shadow); font-variant-numeric: tabular-nums; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-finance .finance-status[hidden] { display: none; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-finance .finance-status strong { font-weight: 600; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-finance .finance-status-dot { inline-size: 8px; block-size: 8px; margin-inline-end: 8px; border-radius: 50%; background: var(--at-green); flex: 0 0 auto; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-finance .finance-status-dot[data-tone="warn"] { background: var(--at-amber); box-shadow: 0 0 0 4px var(--at-amber-soft); }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-finance .finance-status-sep { color: var(--at-ink-3); }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-finance .finance-header-copy > .finance-lead { order: 2; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-finance > .finance-caption { margin: 0 0 16px; color: var(--at-ink-3); }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-finance > .finance-feedback:not(:empty) { margin: 0 0 12px; color: var(--at-green-text); }
/* Dashboard: two floating panels with serif figures (Today's "Money waiting" language) */
html body.workspace-framed.rt-route:not(#_):not(._) #panel-finance .finance-dashboard { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(300px, 1fr); gap: 16px; align-items: stretch; margin: 0 0 22px; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-finance .finance-dashboard[hidden] { display: none; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-finance .finance-tile { box-sizing: border-box; min-inline-size: 0; padding: 18px 22px 20px; border: 1px solid var(--at-line); border-radius: var(--at-r-lg); background: var(--at-pane); box-shadow: var(--at-sheen), var(--at-shadow); color: var(--at-ink); }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-finance .finance-tile-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-block-size: 32px; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-finance .finance-tile-head h2 { margin: 0; font-family: var(--at-sans); font-size: 16px; font-weight: 600; line-height: 1.35; letter-spacing: 0; color: var(--at-ink); }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-finance .finance-tile-link { display: inline-flex; align-items: center; gap: 6px; min-block-size: 44px; margin-inline-end: -8px; padding: 0 8px; border-radius: 10px; color: var(--at-ink-3); font-size: 13px; font-weight: 500; text-decoration: none; transition: background-color var(--at-fast) var(--at-ease), color var(--at-fast) var(--at-ease); }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-finance .finance-tile-link::after { content: ""; inline-size: 6px; block-size: 6px; border: solid currentColor; border-width: 1.5px 1.5px 0 0; transform: rotate(45deg); }
html[dir="rtl"] body.workspace-framed.rt-route:not(#_):not(._) #panel-finance .finance-tile-link::after { transform: rotate(-135deg); }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-finance .finance-tile-link:hover { background: var(--at-fill-1); color: var(--at-ink); }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-finance .finance-figures { display: grid; grid-auto-flow: column; grid-template-rows: auto auto auto; grid-auto-columns: max-content; align-items: end; gap: 4px 44px; margin: 12px 0 0; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-finance .finance-figure { display: grid; grid-row: span 3; grid-template-rows: subgrid; gap: 4px; min-inline-size: 0; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-finance .finance-figure > .finance-figure-value { align-self: last baseline; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-finance .finance-month { display: flex; flex-direction: column; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-finance .finance-month > .finance-goal { margin-block-start: auto; padding-block-start: 20px; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-finance .finance-figure-extra { display: flex; flex-direction: column; gap: 2px; align-self: start; min-block-size: 0; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-finance .finance-figure-extra:empty { display: none; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-finance .finance-figure-label { font-size: 13px; color: var(--at-ink-3); }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-finance .finance-figure-value { font-family: var(--at-serif); font-size: 32px; font-weight: 400; line-height: 1.05; letter-spacing: -.015em; color: var(--at-ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-finance .finance-figure.is-lead .finance-figure-value { font-size: clamp(40px, 3.4vw, 50px); line-height: 1; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-finance .finance-figure.is-amber .finance-figure-value { color: var(--at-amber); }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-finance .finance-figure-also { font-size: 14px; font-weight: 500; color: var(--at-ink-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-finance .finance-figure-note { font-size: 13px; color: var(--at-ink-3); }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-finance .finance-tile-note { margin: 10px 0 0; max-inline-size: 60ch; font-size: 13px; line-height: 1.55; color: var(--at-ink-3); }
html[lang="ar"] body.workspace-framed.rt-route:not(#_):not(._) #panel-finance .finance-figure-value { font-family: var(--at-sans); font-weight: 500; font-size: 26px; line-height: 1.3; letter-spacing: 0; }
html[lang="ar"] body.workspace-framed.rt-route:not(#_):not(._) #panel-finance .finance-figure.is-lead .finance-figure-value { font-size: clamp(30px, 2.6vw, 36px); }
/* the "received against still open" bar with its legend */
html body.workspace-framed.rt-route:not(#_):not(._) #panel-finance .finance-goal { margin: 20px 0 0; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-finance .finance-goal-track { display: flex; gap: 3px; block-size: 8px; border-radius: 999px; background: var(--at-fill-2); overflow: hidden; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-finance .finance-goal-seg { display: block; block-size: 100%; border-radius: 999px; background: var(--at-green); }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-finance .finance-goal-seg[data-part="waiting"] { background: var(--at-blue); }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-finance .finance-goal-seg[data-part="overdue"] { background: var(--at-amber); }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-finance .finance-goal-legend { display: flex; flex-wrap: wrap; gap: 6px 22px; margin: 12px 0 0; padding: 0; list-style: none; font-size: 13px; color: var(--at-ink-2); }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-finance .finance-goal-legend li { display: inline-flex; align-items: center; gap: 8px; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-finance .finance-goal-legend bdi { color: var(--at-ink); font-weight: 600; font-variant-numeric: tabular-nums; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-finance .finance-goal-dot { inline-size: 8px; block-size: 8px; border-radius: 3px; background: var(--at-green); }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-finance .finance-goal-legend [data-part="waiting"] .finance-goal-dot { background: var(--at-blue); }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-finance .finance-goal-legend [data-part="overdue"] .finance-goal-dot { background: var(--at-amber); }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-finance .finance-goal .finance-tile-note { margin-block-start: 8px; }
/* the open invoices list inside "Money waiting" */
html body.workspace-framed.rt-route:not(#_):not(._) #panel-finance .finance-waiting-list { margin: 14px 0 0; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-finance .finance-waiting-row:not(:disabled) { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 14px; inline-size: calc(100% + 16px); min-block-size: 58px; margin: 0 -8px; padding: 8px !important; border: 0 !important; border-radius: 12px !important; background: transparent !important; box-shadow: none !important; color: var(--at-ink); text-align: start; font-weight: 400; transform: none !important; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-finance .finance-waiting-row:disabled { display: flex; align-items: center; justify-content: space-between; gap: 14px; inline-size: 100%; min-block-size: 58px; text-align: start; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-finance .finance-waiting-row + .finance-waiting-row::before { content: ""; position: absolute; inset-block-start: 0; inset-inline: 8px; block-size: 1px; background: var(--at-line-2); transition: opacity var(--at-fast) var(--at-ease); }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-finance .finance-waiting-row:not(:disabled):hover { background: var(--at-hover) !important; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-finance .finance-waiting-row:hover::before, html body.workspace-framed.rt-route:not(#_):not(._) #panel-finance .finance-waiting-row:hover + .finance-waiting-row::before { opacity: 0; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-finance .finance-waiting-copy { display: flex; flex-direction: column; gap: 2px; min-inline-size: 0; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-finance .finance-waiting-copy strong { overflow: hidden; font-size: 15px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-finance .finance-waiting-copy small { font-size: 13px; color: var(--at-ink-3); }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-finance .finance-waiting-row[data-tone="late"] .finance-waiting-copy small { color: var(--at-amber); }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-finance .finance-waiting-amount { flex: 0 0 auto; font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-finance .finance-waiting-row[data-tone="late"] .finance-waiting-amount { color: var(--at-amber); }
/* Room tabs: the transaction type as a segmented control on the scrim */
html body.workspace-framed.rt-route:not(#_):not(._) #panel-finance .finance-rooms { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 2px; max-inline-size: 100%; margin: 0 0 14px; padding: 4px; border: 1px solid var(--at-line); border-radius: 14px; background: var(--at-glass-2); box-shadow: var(--at-sheen); }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-finance .finance-rooms:empty { display: none; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-finance .finance-room:not(:disabled) { display: inline-flex; align-items: center; gap: 8px; min-block-size: 44px; padding: 0 16px !important; border: 1px solid transparent !important; border-radius: 10px !important; background: transparent !important; box-shadow: none !important; color: var(--at-ink-2) !important; font-size: 14px; font-weight: 500; white-space: nowrap; transform: none !important; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-finance .finance-room:not(:disabled):hover:not([aria-pressed="true"]) { background: var(--at-hover) !important; color: var(--at-ink) !important; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-finance .finance-room[aria-pressed="true"]:not(:disabled) { background: var(--at-glass-strong) !important; color: var(--at-ink) !important; font-weight: 600; box-shadow: 0 1px 3px rgb(0 0 0 / .25), var(--at-sheen) !important; }
html[data-theme="light"] body.workspace-framed.rt-route:not(#_):not(._) #panel-finance .finance-room[aria-pressed="true"]:not(:disabled) { background: #fff !important; box-shadow: 0 1px 3px rgb(30 60 45 / .12) !important; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-finance .finance-room-count { font-size: 13px; font-weight: 500; color: var(--at-ink-3); font-variant-numeric: tabular-nums; }
/* List + inspector */
html body.workspace-framed.rt-route:not(#_):not(._) #panel-finance .finance-workspace { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(300px, 1fr); gap: 16px; align-items: start; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-finance .finance-ledger { box-sizing: border-box; min-inline-size: 0; padding: 12px 12px 8px; border: 1px solid var(--at-line); border-radius: var(--at-r-lg); background: var(--at-pane); box-shadow: var(--at-sheen), var(--at-shadow); }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-finance.finance-suite .finance-ledger #finance-results { padding: 0 !important; border: 0 !important; border-radius: 0 !important; background: transparent !important; box-shadow: none !important; }
/* DENSITY 2 · Finance: with no transaction open the details pane is a narrow hint column; the ledger takes the room. */
@media (min-width: 1001px) {
  html body.workspace-framed.rt-route:not(#_):not(._) #panel-finance .finance-workspace:has(> .finance-detail:not([data-kind])):not(#_) { grid-template-columns: minmax(0, 1fr) minmax(260px, 340px); }
  html body.workspace-framed.rt-route:not(#_):not(._) #panel-finance .finance-dashboard:has(> .finance-waiting > .finance-tile-note:nth-child(2):last-child):not(#_) { grid-template-columns: minmax(0, 1fr) minmax(260px, 340px); }
}
html body.workspace-framed.rt-route:not(#_):not(._) #panel-finance :is(.finance-tile, .finance-detail, .finance-report):not(#_) { padding: 16px 20px; }
/* toolbar: search with an icon, the filters chip, a quiet clear */
html body.workspace-framed.rt-route:not(#_):not(._) #panel-finance .finance-filter-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; padding: 0 0 12px !important; border-bottom: 1px solid var(--at-line) !important; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-finance .finance-filter-bar > .finance-field { position: relative; flex: 1 1 260px; min-inline-size: 0; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-finance .finance-filter-bar > .finance-field > span { position: absolute; inline-size: 1px; block-size: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-finance .finance-filter-bar > .finance-field::before { content: ""; position: absolute; inset-inline-start: 14px; inset-block-start: 50%; inline-size: 16px; block-size: 16px; margin-block-start: -8px; background: var(--at-ink-3); pointer-events: none; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") center / contain no-repeat; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-finance .finance-filter-bar > .finance-field input:not(:disabled) { inline-size: 100%; padding-inline-start: 40px; background: var(--at-fill-1) !important; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-finance .finance-filters { flex: 0 0 auto; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-finance .finance-filters > summary { display: inline-flex !important; align-items: center; gap: 8px; min-block-size: 44px; padding: 0 14px !important; border: 1px solid var(--at-line) !important; border-radius: 12px !important; font-size: 14px; font-weight: 500; cursor: pointer; list-style: none; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-finance .finance-filters > summary::-webkit-details-marker { display: none; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-finance .finance-filters > summary::before { content: ""; inline-size: 14px; block-size: 14px; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M4 6h16M7 12h10M10 18h4'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M4 6h16M7 12h10M10 18h4'/%3E%3C/svg%3E") center / contain no-repeat; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-finance .finance-filters[open] { flex: 1 1 100%; order: 3; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-finance .finance-filters[open] > summary { background: var(--at-fill-2) !important; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-finance .finance-filter-fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; padding: 12px 0 4px; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-finance #finance-reset:not(:disabled) { border-color: transparent !important; background: transparent !important; box-shadow: none !important; color: var(--at-ink-2) !important; font-size: 13px; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-finance #finance-reset:not(:disabled):hover { background: var(--at-hover) !important; color: var(--at-ink) !important; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-finance .finance-filter-bar + .finance-error:not(:empty) { margin: 8px 4px 0; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-finance#panel-finance :is(.finance-feedback,.finance-error) { font-size: 14px; line-height: 1.65; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-finance .finance-results-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0; padding: 14px 8px 8px; border: 0; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-finance .finance-results-head h2 { margin: 0; font-size: 12px !important; font-weight: 600 !important; letter-spacing: .08em !important; text-transform: uppercase !important; color: var(--at-ink-3) !important; }
html[lang="ar"] body.workspace-framed.rt-route:not(#_):not(._) #panel-finance .finance-results-head h2 { font-size: 13px !important; letter-spacing: 0 !important; text-transform: none !important; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-finance .finance-results-head .finance-count { background: transparent !important; box-shadow: none !important; padding: 0 !important; color: var(--at-ink-3) !important; font-size: 13px !important; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-finance .finance-results > .finance-empty { padding: 40px 16px !important; }
/* Linear-density rows: kind mark, two-line copy, dot+word chip, tinted amount */
html body.workspace-framed.rt-route:not(#_):not(._) #panel-finance .finance-row { display: grid !important; grid-template-columns: 32px minmax(0, 1fr) auto auto; align-items: center; gap: 14px !important; min-block-size: 58px; padding: 8px !important; flex-wrap: nowrap; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-finance .finance-row::before { inset-inline: 54px 8px !important; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-finance .finance-row-mark { position: relative; inline-size: 32px; block-size: 32px; border-radius: 10px; background: var(--at-fill-2); }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-finance .finance-row-mark::after { content: ""; position: absolute; inset: 8px; background: var(--at-ink-2); -webkit-mask: var(--finance-glyph) center / contain no-repeat; mask: var(--finance-glyph) center / contain no-repeat; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-finance .finance-row { --finance-glyph: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 17 17 7M9 7h8v8'/%3E%3C/svg%3E"); }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-finance .finance-row:is([data-kind="income"], [data-kind="payment"]) { --finance-glyph: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M17 7 7 17M15 17H7V9'/%3E%3C/svg%3E"); }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-finance .finance-row[data-kind="refund"] { --finance-glyph: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 14 4 9l5-5'/%3E%3Cpath d='M4 9h10a6 6 0 0 1 0 12h-2'/%3E%3C/svg%3E"); }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-finance .finance-row:is([data-kind="income"], [data-kind="payment"]) .finance-row-mark { background: var(--at-green-soft); }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-finance .finance-row:is([data-kind="income"], [data-kind="payment"]) .finance-row-mark::after { background: var(--at-green-text); }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-finance .finance-row[data-kind="refund"] .finance-row-mark { background: var(--at-amber-soft); }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-finance .finance-row[data-kind="refund"] .finance-row-mark::after { background: var(--at-amber); }
html[dir="rtl"] body.workspace-framed.rt-route:not(#_):not(._) #panel-finance .finance-row-mark::after { transform: scaleX(-1); }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-finance .finance-row-copy { display: flex; flex-direction: column; gap: 2px; min-inline-size: 0; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-finance .finance-row-copy strong { overflow: hidden; font-size: 15px; font-weight: 500; line-height: 1.35; color: var(--at-ink); text-overflow: ellipsis; white-space: nowrap; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-finance .finance-row-copy small { overflow: hidden; font-size: 13px; line-height: 1.45; color: var(--at-ink-3); text-overflow: ellipsis; white-space: nowrap; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-finance .finance-row-chip { display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px; border-radius: 7px; background: var(--at-fill-2); color: var(--at-ink-2); font-size: 12px; font-weight: 500; line-height: 1.5; white-space: nowrap; }
html[lang="ar"] body.workspace-framed.rt-route:not(#_):not(._) #panel-finance .finance-row-chip { font-size: 13px; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-finance .finance-row-chip::before { content: ""; inline-size: 6px; block-size: 6px; border-radius: 50%; background: currentColor; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-finance .finance-row-chip:is([data-kind="income"], [data-kind="payment"]) { background: var(--at-green-soft); color: var(--at-green-text); }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-finance .finance-row-chip[data-kind="refund"] { background: var(--at-amber-soft); color: var(--at-amber); }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-finance .finance-row-chip[data-kind="archived"] { background: transparent; box-shadow: inset 0 0 0 1px var(--at-line); color: var(--at-ink-3); }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-finance .finance-row .finance-money { min-inline-size: 7.5em; font-size: 15px; font-weight: 600; color: var(--at-ink); text-align: end; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-finance .finance-row:is([data-kind="income"], [data-kind="payment"]) .finance-money { color: var(--at-green-text); }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-finance .finance-row[data-kind="refund"] .finance-money { color: var(--at-amber); }
/* the inspector */
html body.workspace-framed.rt-route:not(#_):not(._) #panel-finance .finance-detail { position: sticky; inset-block-start: 16px; padding: 22px 22px 18px !important; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-finance .finance-detail > h2:only-of-type:not(#finance-detail-heading) { margin: 0 0 6px; padding: 0; border: 0; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-finance .finance-detail > .finance-eyebrow { display: inline-flex; margin: 0 0 12px; font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--at-ink-3); }
html[lang="ar"] body.workspace-framed.rt-route:not(#_):not(._) #panel-finance .finance-detail > .finance-eyebrow { font-size: 13px; letter-spacing: 0; text-transform: none; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-finance #finance-detail-heading { margin: 0 0 6px !important; padding: 0 !important; border: 0 !important; font-family: var(--at-serif) !important; font-size: 30px !important; font-weight: 400 !important; line-height: 1.1 !important; letter-spacing: -.01em !important; overflow-wrap: anywhere; }
html[lang="ar"] body.workspace-framed.rt-route:not(#_):not(._) #panel-finance #finance-detail-heading { font-family: var(--at-sans) !important; font-weight: 500 !important; font-size: 24px !important; line-height: 1.35 !important; letter-spacing: 0 !important; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-finance .finance-detail-amount { margin: 6px 0 18px; font-family: var(--at-serif); font-size: 44px; font-weight: 400; line-height: 1; letter-spacing: -.02em; color: var(--at-ink); font-variant-numeric: tabular-nums; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-finance .finance-detail:is([data-kind="income"], [data-kind="payment"]) .finance-detail-amount { color: var(--at-green-text); }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-finance .finance-detail[data-kind="refund"] .finance-detail-amount { color: var(--at-amber); }
html[lang="ar"] body.workspace-framed.rt-route:not(#_):not(._) #panel-finance .finance-detail-amount { font-family: var(--at-sans); font-weight: 500; font-size: 30px; line-height: 1.3; letter-spacing: 0; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-finance .finance-detail > .finance-properties { display: grid; grid-template-columns: minmax(0, auto) minmax(0, 1fr); margin: 0 0 16px; gap: 0 !important; border-block-start: 1px solid var(--at-line-2); }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-finance .finance-detail > .finance-properties > :is(dt, dd) { margin: 0; padding: 11px 0; border-block-end: 1px solid var(--at-line-2); font-size: 14px; line-height: 1.45; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-finance .finance-detail > .finance-properties > dt { padding-inline-end: 16px; color: var(--at-ink-3); }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-finance .finance-detail > .finance-properties > dd { color: var(--at-ink); text-align: end; overflow-wrap: anywhere; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-finance .finance-detail > .finance-caption { margin: 0 0 12px; font-size: 13px; color: var(--at-ink-3); }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-finance .finance-detail > .finance-actions { justify-content: flex-start; margin: 0 0 12px; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-finance .finance-history > summary { display: flex; align-items: center; min-block-size: 44px; color: var(--at-ink-2); font-size: 13px; cursor: pointer; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-finance .finance-history ol { margin: 4px 0 0; padding-inline-start: 18px; display: grid; gap: 12px; font-size: 13px; color: var(--at-ink-2); }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-finance .finance-history li { display: grid; gap: 2px; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-finance .finance-history li strong { color: var(--at-ink); font-weight: 500; }
/* cash by currency, below the work: a quiet totals panel */
html body.workspace-framed.rt-route:not(#_):not(._) #panel-finance #finance-report:not(:empty) { margin: 16px 0 0; padding: 18px 20px !important; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-finance #finance-report .finance-cash-table caption { padding: 0 0 12px; font-size: 15px; font-weight: 600; color: var(--at-ink); text-align: start; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-finance #finance-report .finance-cash-table :is(th, td) { padding: 11px 10px !important; border: 0 !important; border-block-end: 1px solid var(--at-line-2) !important; background: transparent !important; font-size: 14px; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-finance #finance-report .finance-cash-table thead th { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--at-ink-3); border-block-end-color: var(--at-line) !important; }
html[lang="ar"] body.workspace-framed.rt-route:not(#_):not(._) #panel-finance #finance-report .finance-cash-table thead th { font-size: 13px; letter-spacing: 0; text-transform: none; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-finance #finance-report .finance-cash-table td { font-variant-numeric: tabular-nums; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-finance #finance-report .finance-cash-table tbody tr:hover :is(th, td) { background: var(--at-hover) !important; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-finance #finance-report .finance-breakdown > summary { display: flex; align-items: center; min-block-size: 44px; margin-block-start: 8px; color: var(--at-ink-2); font-size: 13px; font-weight: 500; cursor: pointer; }
@media (max-width: 1100px) {
  html body.workspace-framed.rt-route:not(#_):not(._) #panel-finance .finance-dashboard, html body.workspace-framed.rt-route:not(#_):not(._) #panel-finance .finance-workspace { grid-template-columns: minmax(0, 1fr); }
  html body.workspace-framed.rt-route:not(#_):not(._) #panel-finance .finance-detail { position: static; }
}
@media (max-width: 760px) {
  html body.workspace-framed.rt-route:not(#_):not(._) #panel-finance .finance-header { margin-block-end: 8px; }
  html body.workspace-framed.rt-route:not(#_):not(._) #panel-finance .finance-dashboard { gap: 12px; margin-block-end: 16px; }
  html body.workspace-framed.rt-route:not(#_):not(._) #panel-finance .finance-tile { padding: 16px; }
  html body.workspace-framed.rt-route:not(#_):not(._) #panel-finance .finance-figures { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 28px; }
  html body.workspace-framed.rt-route:not(#_):not(._) #panel-finance .finance-figure { display: flex; flex-direction: column; gap: 4px; }
  html body.workspace-framed.rt-route:not(#_):not(._) #panel-finance .finance-figure > .finance-figure-value { align-self: flex-start; }
  html body.workspace-framed.rt-route:not(#_):not(._) #panel-finance .finance-figure.is-lead { flex: 1 1 100%; }
  html body.workspace-framed.rt-route:not(#_):not(._) #panel-finance .finance-figure-value { font-size: 28px; }
  html body.workspace-framed.rt-route:not(#_):not(._) #panel-finance .finance-rooms { display: flex; flex-wrap: nowrap; inline-size: 100%; overflow-x: auto; scrollbar-width: none; }
  html body.workspace-framed.rt-route:not(#_):not(._) #panel-finance .finance-rooms { gap: 0; padding: 3px; }
  html body.workspace-framed.rt-route:not(#_):not(._) #panel-finance .finance-room:not(:disabled) { flex: 1 0 auto; justify-content: center; gap: 5px; padding: 0 9px !important; font-size: 14px; }
  html body.workspace-framed.rt-route:not(#_):not(._) #panel-finance .finance-ledger { padding: 10px 8px 6px; }
  html body.workspace-framed.rt-route:not(#_):not(._) #panel-finance .finance-filter-bar > .finance-field { flex-basis: 100%; }
  html body.workspace-framed.rt-route:not(#_):not(._) #panel-finance .finance-row { grid-template-columns: 32px minmax(0, 1fr) auto; gap: 12px !important; }
  html body.workspace-framed.rt-route:not(#_):not(._) #panel-finance .finance-row-chip { display: none; }
  html body.workspace-framed.rt-route:not(#_):not(._) #panel-finance .finance-row .finance-money { min-inline-size: 0; font-size: 14px; }
  html body.workspace-framed.rt-route:not(#_):not(._) #panel-finance .finance-detail { padding: 18px 16px !important; }
  html body.workspace-framed.rt-route:not(#_):not(._) #panel-finance .finance-detail-amount { font-size: 36px; }
}
/* ---------- FINANCE · bento r2 (work pages) ---------- */
/* An empty ledger is one strip under the list head, not a 40px-padded centred line. */
html body.workspace-framed.rt-route:not(#_):not(._) #panel-finance .finance-results > .finance-empty:not([hidden]):not(#_) {
  display: flex !important; flex-direction: row; align-items: center; justify-content: flex-start; min-height: 52px; margin: 4px 0 0; padding-block: 8px !important; padding-inline: 14px !important; border-radius: 12px !important; background: var(--at-fill-1) !important; font-size: var(--at-fs-title); font-weight: 600; color: var(--at-ink); text-align: start;
}
@media (min-width: 1101px) {
  /* Nothing recorded and nothing selected: the ledger takes the row; no second pane asks to select a transaction that does not exist. */
  html body.workspace-framed.rt-route:not(#_):not(._) #panel-finance .finance-workspace:has(> .finance-ledger .finance-results > .finance-empty):has(> .finance-detail:not([data-kind])):not(#_) { grid-template-columns: minmax(0, 1fr); }
  html body.workspace-framed.rt-route:not(#_):not(._) #panel-finance .finance-workspace:has(> .finance-ledger .finance-results > .finance-empty) > .finance-detail:not([data-kind]):not(#_) { display: none !important; }
  /* Rows but no selection: the details pane runs the ledger's height, its hint at the top. With a selection it stays sticky. */
  html body.workspace-framed.rt-route:not(#_):not(._) #panel-finance .finance-workspace:not(#_) { align-items: stretch; }
  html body.workspace-framed.rt-route:not(#_):not(._) #panel-finance .finance-workspace > .finance-detail[data-kind]:not(#_) { align-self: start; }
  html body.workspace-framed.rt-route:not(#_):not(._) #panel-finance .finance-workspace > .finance-detail:not([data-kind]):not(#_) { position: static; box-sizing: border-box; }
}
@media (prefers-reduced-motion: no-preference) {
  html body.workspace-framed.rt-route:not(#_):not(._) #panel-finance .finance-row:not(:disabled):not(#_):active { transform: scale(.995); transition: transform 100ms var(--at-ease); }
}
