:root {
  --bg: #f4f5f7; --card: #fff; --text: #1d2330; --muted: #6b7280; --line: #e5e7eb;
  --accent: #2563eb; --accent-ink: #fff; --accent-soft: #dbeafe;
  --payroll: #2563eb; --expenses: #0d9488;
  --ok: #16a34a; --ok-soft: #dcfce7;
  --warn: #d97706; --warn-soft: #fef3c7;
  --danger: #dc2626; --danger-soft: #fee2e2;
  --line-strong: #cbd5e1; --on-solid: #fff;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0f1218; --card: #181c24; --text: #e5e7eb; --muted: #9aa3b2; --line: #2b313c;
  --accent: #60a5fa; --accent-ink: #0b1220; --accent-soft: #1b3150;
  --payroll: #60a5fa; --expenses: #2dd4bf;
  --ok: #4ade80; --ok-soft: #12301d;
  --warn: #fbbf24; --warn-soft: #362709;
  --danger: #f87171; --danger-soft: #3a1717;
  --line-strong: #47505e; --on-solid: #0f1218;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font: 14px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--text); background: var(--bg); }
a { color: var(--accent); text-decoration: none; }
h1, h2, h3 { margin: 0 0 .5rem; font-weight: 600; }
h1 { font-size: 1.25rem; } h2 { font-size: .95rem; }
input, select, textarea { color: var(--text); background-color: var(--card); font: inherit; }
.theme-toggle { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; padding: 0; border: 1px solid var(--line); border-radius: 8px; background: var(--card); color: var(--muted); cursor: pointer; }
.theme-toggle:hover { color: var(--text); border-color: var(--line-strong); }
.theme-toggle svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; display: none; }
:root:not([data-theme-choice]) .icon-system, [data-theme-choice=system] .icon-system, [data-theme-choice=light] .icon-light, [data-theme-choice=dark] .icon-dark { display: block; }
.muted { color: var(--muted); } .small { font-size: .8rem; } .error { color: var(--danger); } .strong { font-weight: 600; } .nowrap { white-space: nowrap; }

/* ---- app shell (same as the other tools) ---- */
body.with-sidebar { display: grid; grid-template-columns: 220px minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; background: var(--card); border-right: 1px solid var(--line); padding: .9rem .7rem; }
.brand { display: flex; align-items: center; gap: .5rem; font-weight: 700; color: var(--text); padding: .2rem .5rem .9rem; font-size: 1rem; }
.brand img { border-radius: 6px; }
.brand small { font-weight: 500; color: var(--muted); font-size: .8rem; margin-left: .3rem; }
.side-nav { display: flex; flex-direction: column; gap: .15rem; }
.side-nav a { display: flex; align-items: center; gap: .6rem; padding: .5rem .6rem; border-radius: 8px; color: var(--text); font-size: .9rem; }
.side-nav a svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; color: var(--muted); }
.side-nav a:hover { background: var(--bg); }
.side-nav a.app { font-weight: 600; }
.side-nav a.app.current { color: var(--text); }
.side-nav a.app.current svg { color: var(--accent); }
.side-nav a.app + a.app { margin-top: .15rem; }
.side-nav a.sub { padding: .38rem .6rem .38rem 2.35rem; font-size: .86rem; margin-top: -.1rem; }
.side-nav .nav-label { padding: .7rem .6rem .2rem 2.35rem; font-size: .7rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.side-nav a.sub.active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.side-foot { margin-top: auto; border-top: 1px solid var(--line); padding-top: .7rem; display: flex; flex-direction: column; gap: .6rem; }
.me { display: flex; align-items: center; gap: .5rem; min-width: 0; }
.me-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.me-text strong { font-size: .85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-tools { display: flex; align-items: center; justify-content: space-between; }
.lang-switch { display: inline-flex; gap: .3rem; align-items: center; font-size: .8rem; }
.lang-switch a { color: var(--muted); font-weight: 600; }
.lang-switch a.active { color: var(--accent); }
.avatar { display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-weight: 700; flex: none; }
.avatar.sm { width: 28px; height: 28px; font-size: .78rem; }
.content { padding: 1.2rem 1.6rem 2rem; max-width: 1280px; width: 100%; }
@media (max-width: 860px) {
  body.with-sidebar { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; flex-direction: row; align-items: center; flex-wrap: wrap; gap: .5rem; padding: .5rem .8rem; border-right: 0; border-bottom: 1px solid var(--line); }
  .brand { padding: 0 .4rem 0 0; }
  .side-nav { flex-direction: row; flex-wrap: wrap; }
  .side-nav a span { display: none; }
  .side-nav a.sub { padding: .4rem .5rem; }
  .side-nav a.sub span { display: inline; }
  .side-foot { margin: 0 0 0 auto; border: 0; padding: 0; flex-direction: row; align-items: center; }
  .me-text { display: none; }
  .content { padding: .8rem; }
}
.topbar { display: flex; align-items: center; justify-content: space-between; padding: .5rem 1rem; background: var(--card); border-bottom: 1px solid var(--line); }
.topbar nav { display: flex; gap: .8rem; align-items: center; }
.page { padding: 1rem; max-width: 1100px; margin: 0 auto; }
.footer { max-width: 1100px; margin: 1rem auto 0; padding: 1rem; font-size: .8rem; color: var(--muted); border-top: 1px solid var(--line); }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: .8rem; flex-wrap: wrap; }
.page-head h1 { margin: 0; }
.page-head h1 .muted { font-weight: 500; }
.page-head .sub { color: var(--muted); font-size: .85rem; margin: .1rem 0 0; max-width: 75ch; }
.crumbs { margin: 0 0 .4rem; font-size: .85rem; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: .9rem 1rem; }
.card + .card, .stats + .card, .notice + .stats { margin-top: .8rem; }
.card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.login { max-width: 440px; margin: 4rem auto; text-align: center; }
.login .btn { margin-top: .5rem; }
.notice { background: var(--warn-soft); color: var(--text); border: 1px solid var(--warn); border-radius: 8px; padding: .5rem .8rem; margin: 0 0 .8rem; font-size: .88rem; }

.btn { display: inline-flex; align-items: center; gap: .35rem; border: 1px solid var(--line); background: var(--card); color: var(--text); padding: .4rem .8rem; border-radius: 6px; cursor: pointer; font: inherit; font-size: .85rem; line-height: 1.2; white-space: nowrap; }
.btn:hover { border-color: var(--line-strong); }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn.small { padding: .25rem .6rem; font-size: .8rem; }
.btn.icon { padding: .2rem .6rem; font-size: 1.1rem; line-height: 1; }
.btn.danger { color: var(--danger); }
.btn:disabled { opacity: .5; cursor: default; }
.btn[hidden] { display: none; }

/* ---- period picker ---- */
.period { display: flex; gap: .4rem; align-items: center; }
.period select { padding: .35rem .5rem; border: 1px solid var(--line); border-radius: 6px; }
.period .step { display: inline-flex; align-items: center; justify-content: center; width: 2rem; height: 2rem; border: 1px solid var(--line); border-radius: 6px; font-size: 1.2rem; line-height: 1; text-decoration: none; color: inherit; }
.period a.step:hover { border-color: var(--line-strong); }
.period span.step { opacity: .35; }
.period .current { min-width: 8.5rem; text-align: center; white-space: nowrap; }
.period .swap { margin-left: .4rem; white-space: nowrap; }

/* ---- tiles ---- */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .6rem; }
@media (max-width: 1000px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .stats { grid-template-columns: 1fr; } }
.stat-tile { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: .6rem .8rem; display: flex; flex-direction: column; gap: .2rem; min-width: 0; }
.stat-tile.total { border-color: var(--accent); }
.stat-label { font-size: .75rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .02em; display: flex; align-items: center; gap: .35rem; }
.stat-value { font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.stat-value strong { font-size: 1.3rem; }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.dot.payroll { background: var(--payroll); } .dot.expenses { background: var(--expenses); }

/* ---- tables ---- */
table { width: 100%; border-collapse: collapse; margin-top: .4rem; }
th, td { text-align: left; padding: .45rem .5rem; font-size: .88rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-size: .75rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .02em; }
tbody tr:hover { background: var(--bg); }
tfoot td { border-bottom: 0; font-size: .85rem; }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
td .sub { color: var(--muted); font-size: .78rem; }
.tag { font-size: .7rem; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 0 .4rem; margin-left: .3rem; white-space: nowrap; }
.tag.warn { color: var(--warn); border-color: var(--warn); }
.share-col { width: 150px; white-space: nowrap; }
.split { display: inline-flex; width: 80px; height: 8px; border-radius: 4px; overflow: hidden; background: var(--line); vertical-align: middle; margin-right: .4rem; }
.split .fill { display: flex; height: 100%; width: 100%; }
.seg { height: 100%; }
.seg.payroll { background: var(--payroll); } .seg.expenses { background: var(--expenses); } .seg.inflow { background: var(--inflow); }
.money-table.months { max-width: 420px; }
@media (max-width: 700px) { .share-col { display: none; } .money-table { display: block; overflow-x: auto; } }

/* ---- entries ---- */
.ledger-actions { display: flex; gap: .6rem; align-items: stretch; flex-wrap: wrap; }
.drop { flex: 1; min-width: 260px; display: flex; align-items: center; gap: .7rem; padding: .7rem .9rem; border: 2px dashed var(--line-strong); border-radius: 8px; cursor: pointer; }
.drop svg { width: 22px; height: 22px; fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.drop:hover, .drop.over { border-color: var(--accent); background: var(--accent-soft); }
.drop.busy { opacity: .6; pointer-events: none; }
.filters { display: flex; gap: .5rem; margin-top: .8rem; flex-wrap: wrap; }
.filters input, .filters select { padding: .35rem .5rem; border: 1px solid var(--line); border-radius: 6px; }
.filters input { flex: 1; min-width: 220px; }
tr.clickable { cursor: pointer; }
tr.clickable:focus { outline: 2px solid var(--accent); outline-offset: -2px; }
.categories input[type=text] { width: 100%; min-width: 220px; padding: .3rem .4rem; border: 1px solid var(--line); border-radius: 6px; }
.categories select { max-width: 320px; padding: .3rem; border: 1px solid var(--line); border-radius: 6px; }
.add-row { display: flex; gap: .5rem; margin-top: .8rem; flex-wrap: wrap; }
.add-row input, .add-row select { padding: .4rem; border: 1px solid var(--line); border-radius: 6px; }
.add-row input { flex: 1; min-width: 220px; max-width: 360px; }

.editor { width: min(760px, calc(100vw - 2rem)); border: 1px solid var(--line); border-radius: 10px; padding: 0; background: var(--card); color: var(--text); }
.editor::backdrop { background: rgba(0, 0, 0, .35); }
.editor form { padding: 1rem 1.1rem; }
.editor-head { display: flex; align-items: center; justify-content: space-between; }
.editor-head h2 { margin: 0; font-size: 1.05rem; }
.form-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .6rem .8rem; margin-top: .8rem; }
.form-grid label { display: flex; flex-direction: column; gap: .2rem; font-size: .8rem; color: var(--muted); font-weight: 600; }
.form-grid label.wide { grid-column: span 2; }
.form-grid input, .form-grid select { padding: .4rem .5rem; border: 1px solid var(--line); border-radius: 6px; font-weight: 400; color: var(--text); }
.form-grid input[readonly] { background: var(--bg); }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } .form-grid label.wide { grid-column: auto; } }
.read-status { margin-top: .7rem; padding: .45rem .7rem; border-radius: 6px; font-size: .85rem; }
.read-status.qr { background: var(--ok-soft); border: 1px solid var(--ok); }
.read-status.text { background: var(--warn-soft); border: 1px solid var(--warn); }
.read-status.none { background: var(--danger-soft); border: 1px solid var(--danger); }
.read-warnings { margin: .4rem 0 0; padding-left: 1.2rem; font-size: .85rem; }
.invoice-line { display: flex; align-items: center; gap: .3rem; flex-wrap: wrap; font-size: .88rem; }
.editor-foot { display: flex; gap: .5rem; align-items: center; margin-top: .6rem; }
.editor-foot .spacer { flex: 1; }

.toast { position: fixed; left: 50%; bottom: 1.5rem; transform: translateX(-50%) translateY(20px); background: var(--text); color: var(--card); padding: .6rem 1rem; border-radius: 8px; opacity: 0; transition: all .2s; pointer-events: none; max-width: 90vw; z-index: 50; }
.toast.show { opacity: 1; transform: translateX(-50%); }
.toast.err { background: var(--danger); }

/* ---- open items ---- */
.side-nav a.sub .count { margin-left: auto; }
.count { display: inline-block; min-width: 1.4rem; padding: 0 .35rem; border-radius: 999px; background: var(--warn); color: var(--on-solid); font-size: .72rem; font-weight: 700; text-align: center; line-height: 1.25rem; }
.count.muted-count { background: var(--line); color: var(--muted); }
.tabs { display: flex; gap: .3rem; margin-bottom: .8rem; border-bottom: 1px solid var(--line); }
.tabs a { padding: .45rem .8rem; color: var(--muted); font-weight: 600; border-bottom: 2px solid transparent; margin-bottom: -1px; display: inline-flex; gap: .4rem; align-items: center; }
.tabs a.active { color: var(--accent); border-bottom-color: var(--accent); }
.items td { vertical-align: top; }
.items td.actions { text-align: right; }
.items .linked a { margin-right: .1rem; }
.items tr:target { background: var(--warn-soft); }
.resolved-note { margin-top: .3rem; font-size: .8rem; color: var(--muted); }
.tag.ok { color: var(--ok); border-color: var(--ok); margin-left: 0; }
.editor.narrow { width: min(480px, calc(100vw - 2rem)); }
.field { display: flex; flex-direction: column; gap: .2rem; font-size: .8rem; color: var(--muted); font-weight: 600; margin-top: .6rem; }
.field textarea, .form-grid textarea { padding: .4rem .5rem; border: 1px solid var(--line); border-radius: 6px; font-weight: 400; resize: vertical; }
.form-grid label.full { grid-column: 1 / -1; }
.flag { color: var(--warn); font-weight: 700; margin-left: .3rem; }
.item-notes { margin: .7rem 0 0; padding: .45rem .7rem; border-radius: 6px; font-size: .85rem; background: var(--warn-soft); border: 1px solid var(--warn); }
.item-notes ul { margin: .2rem 0 0; padding-left: 1.1rem; }
.items th:nth-child(1) { width: 7rem; }
.items th:nth-child(3), .items th:nth-child(4) { width: 8.5rem; }
.items th:nth-child(5) { width: 10.5rem; }

/* ---- monthly ---- */
:root { --inflow: #2a78d6; --outflow: #eb6834; }
:root[data-theme="dark"] { --inflow: #3987e5; --outflow: #d95926; }
.stats.five { grid-template-columns: repeat(5, minmax(0, 1fr)); }
@media (max-width: 1100px) { .stats.five { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 560px) { .stats.five { grid-template-columns: 1fr; } }
.dot.inflow, .swatch.inflow { background: var(--inflow); } .dot.outflow, .swatch.outflow { background: var(--outflow); }
.neg { color: var(--danger); } .pos { color: var(--ok); }
.legend { display: inline-flex; align-items: center; gap: .35rem; font-size: .8rem; color: var(--muted); }
.swatch { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin: 0 .1rem 0 .5rem; vertical-align: -1px; }
.chart { position: relative; margin-top: .4rem; }
.chart svg { width: 100%; height: auto; display: block; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .axis { stroke: var(--line-strong); stroke-width: 1; }
.chart .tick { fill: var(--muted); font-size: 11px; }
.chart .bar.inflow { fill: var(--inflow); } .chart .bar.outflow { fill: var(--outflow); }
.chart .hit { fill: transparent; cursor: default; outline: none; }
.chart .hit.on { fill: var(--text); fill-opacity: .05; }
.tip { position: absolute; background: var(--card); border: 1px solid var(--line-strong); border-radius: 8px; padding: .45rem .6rem; font-size: .8rem; box-shadow: 0 4px 14px rgba(0,0,0,.12); pointer-events: none; min-width: 180px; }
.tip-title { font-weight: 600; margin-bottom: .2rem; }
.tip-line { display: flex; justify-content: space-between; gap: .8rem; flex-direction: row-reverse; }
.tip-line strong { font-variant-numeric: tabular-nums; }
.tip-line .swatch { margin-left: 0; margin-right: .35rem; }
.hire { display: flex; gap: .6rem; flex-wrap: wrap; align-items: flex-end; margin-top: .6rem; }
.hire label { display: flex; flex-direction: column; gap: .2rem; font-size: .8rem; color: var(--muted); font-weight: 600; }
.hire input { padding: .4rem .5rem; border: 1px solid var(--line); border-radius: 6px; width: 12rem; font-weight: 400; }
.hire-result { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .6rem; margin-top: .8rem; }
.hire-result > div { display: flex; flex-direction: column; gap: .15rem; border: 1px solid var(--line); border-radius: 8px; padding: .5rem .7rem; }
.hire-result strong { font-size: 1.2rem; font-variant-numeric: tabular-nums; }
@media (max-width: 640px) { .hire-result { grid-template-columns: 1fr; } }
.hire select { padding: .4rem .5rem; border: 1px solid var(--line); border-radius: 6px; width: 16rem; font-weight: 400; background: var(--card); color: inherit; }
.hire input[readonly] { background: var(--bg); color: var(--muted); }
.hire-conditions { display: flex; flex-wrap: wrap; gap: .3rem; margin: .6rem 0 0; }
.hire-conditions .tag { margin-left: 0; font-size: .75rem; }
.scroll-x { overflow-x: auto; }
.monthly-table td:first-child { white-space: nowrap; }
.monthly-table th.current, .monthly-table td.current { background: var(--accent-soft); }
.monthly-table th a { color: inherit; }
.monthly-table tr.group th { padding-top: .9rem; color: var(--text); font-size: .8rem; }
.monthly-table tr.total td, .monthly-table tr.subtotal td { font-weight: 600; }
.monthly-table tr.person td:first-child, .monthly-table tr.category td:first-child { padding-left: 1.4rem; }
.monthly-table tr.part td { color: var(--muted); font-size: .8rem; }
.monthly-table tr.part td:first-child { padding-left: 1.4rem; font-style: italic; }
.monthly-table tr.result td { font-weight: 700; border-top: 2px solid var(--line-strong); }
.monthly-table tr.cash td { font-weight: 600; }
.monthly-table tr.muted td { color: var(--muted); }
.monthly-table tr.warn td:first-child { color: var(--warn); }
details summary { cursor: pointer; list-style: none; }
details summary h2 { display: inline; }
details summary::before { content: "▸ "; color: var(--muted); }
details[open] summary::before { content: "▾ "; }
.hire-result[hidden] { display: none; }

/* Payroll: a payslip's lines under its person, the import preview's person picker */
.payslip-lines summary { font-size: .8rem; }
.payslip-lines summary::before { content: "▸ "; }
.payslip-lines[open] summary::before { content: "▾ "; }
.payslip-lines table.lines { width: 100%; max-width: 560px; margin: .3rem 0 .2rem; font-size: .8rem; border-collapse: collapse; }
.payslip-lines table.lines td { padding: .15rem .4rem .15rem 0; border: 0; }
.payslip-lines table.lines tr.strong td { border-top: 1px solid var(--line); font-weight: 600; }
#preview select { width: 100%; padding: .3rem .4rem; border: 1px solid var(--line); border-radius: 6px; background: var(--card); color: var(--text); }

/* P&L: projected months faded, a contract's received line under it, the contracts' editor */
.chart .bar.projected { fill-opacity: .4; }
.swatch.projected { background: var(--muted); opacity: .4; }
.col-note { font-size: .65rem; font-weight: 500; text-transform: none; letter-spacing: 0; }
.pnl-table th.projected, .pnl-table td.projected { color: var(--muted); font-style: italic; }
.pnl-table tr.received td { color: var(--muted); font-size: .8rem; }
.pnl-table tr.received td:first-child { padding-left: 1.4rem; font-style: italic; }
.pnl-table tr.stray td:first-child { padding-left: 1.4rem; }
.pnl-table tr.stray td { color: var(--muted); }
.pnl-table tr.group.warn th { color: var(--warn); }
.pnl-table tr.margin td { color: var(--muted); }
.pnl-table td:last-child, .pnl-table th:last-child { border-left: 1px solid var(--line); }
tr.muted-row td { color: var(--muted); }
.warn-text { color: var(--warn); }
.form-grid label.check { flex-direction: row; align-items: center; gap: .4rem; align-self: end; padding-bottom: .4rem; }

/* ---- this month ---- */
.delta { font-size: .78rem; font-weight: 600; margin-left: .35rem; white-space: nowrap; }
.delta.good { color: var(--ok, #1a7f4b); }
.delta.bad { color: var(--danger); }
.stats.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 760px) { .stats.three { grid-template-columns: 1fr; } }
.alert-list { margin: 0; padding-left: 1.1rem; display: flex; flex-direction: column; gap: .45rem; font-size: .9rem; }
.card.alerts { border-left: 3px solid var(--warn); }
.two-col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; align-items: start; }
.two-col > .card { margin: 0; min-width: 0; }
@media (max-width: 1000px) { .two-col { grid-template-columns: 1fr; } }
.tag.product { background: var(--accent-soft); color: var(--accent); }
.chart rect.picked { fill: var(--accent-soft); }
.chart text.tick.strong { font-weight: 700; fill: var(--text); }
.forecast-table td:first-child { white-space: nowrap; }
.forecast-table tr.result td, .forecast-table tr.cash td { font-weight: 600; border-top: 1px solid var(--line-strong); }
.card-head .sync { display: flex; align-items: center; gap: .6rem; }
.by-client tbody.client + tbody.client tr:first-child td { border-top: 1px solid var(--line); }
.by-client .caret { display: inline-block; width: .8rem; color: var(--muted); transition: transform .15s; }
.by-client tr[aria-expanded="true"] .caret { transform: rotate(90deg); }
.by-client tr.invoice td { font-size: .85rem; background: var(--bg); }
.by-client tr.invoice td:first-child { padding-left: 1.6rem; }
