.revenue-ledger{display:flex;flex-direction:column;gap:24px;min-width:0;color:var(--text-hi)}
.rl-heading{display:flex;align-items:center;justify-content:space-between;gap:24px;padding:4px 0 8px}
.rl-eyebrow{font-size:10px;letter-spacing:1.8px;font-weight:700;color:var(--text-lo);margin-bottom:12px}.rl-eyebrow span{padding:0 8px;color:var(--accent)}
.rl-heading h1{font-family:var(--font-display);font-size:28px;letter-spacing:-.8px;line-height:1.25;margin:0 0 9px;font-weight:650}
.rl-heading p{color:var(--text-mid);font-size:13px;margin:0;line-height:1.6}.rl-heading p strong{font-weight:500;color:var(--text-hi)}
.rl-summary{display:flex;align-items:flex-end;gap:28px;margin-left:auto;min-width:0}
.rl-stat{display:flex;flex-direction:column;gap:3px;text-align:right;cursor:default}
.rl-stat-label{font-size:11px;color:var(--text-mid);white-space:nowrap}
.rl-stat strong{font-size:18px;line-height:1.25;font-weight:600;letter-spacing:-.3px;font-variant-numeric:tabular-nums;white-space:nowrap}/* Money is coloured by what it is, on the totals and in the tables: income
   green, expenses red, net balance blue (its sign says whether it is a loss). */
.revenue-ledger{--rl-income:var(--success);--rl-expense:var(--danger);--rl-net:#4da3ff}
.rl-stat-income strong,.rl-grid .rl-amount-income{color:var(--rl-income)}
.rl-stat-expense strong,.rl-grid .rl-amount-expense{color:var(--rl-expense)}
.rl-stat-net strong,.rl-grid .rl-amount-net{color:var(--rl-net)}
.rl-sheet{border-radius:16px;overflow:hidden;background:var(--surface-1);min-width:0}
.rl-sheet-title{padding:20px 22px 4px;display:flex;align-items:center;justify-content:space-between;gap:14px}.rl-sheet-title>div{display:flex;align-items:center;gap:10px;min-width:0}.rl-sheet-title h2{font-size:14px;font-weight:600;margin:0}.rl-sheet-icon{color:var(--text-mid);display:flex}.rl-count{font-size:10px;color:var(--text-mid);padding:3px 8px;background:var(--surface-2);border-radius:6px;white-space:nowrap}.rl-currency{font-size:11px;color:var(--text-lo)}
.rl-toolbar{padding:16px 22px;display:flex;align-items:center;gap:12px;flex-wrap:wrap}.rl-search{display:flex;align-items:center;gap:10px;background:var(--surface-2);border:1px solid transparent;border-radius:8px;padding:0 12px;color:var(--text-lo);width:300px;max-width:100%;height:38px}.rl-search input{font:inherit;font-size:12px;outline:0;border:0;color:var(--text-hi);background:transparent;width:100%;min-width:0}.rl-search:focus-within{border-color:var(--accent)}.rl-search input::placeholder{color:var(--text-lo)}
.rl-year{display:flex;align-items:center;gap:9px;font-size:11px;color:var(--text-mid)}.rl-year select{font:inherit;font-size:12px;color:var(--text-hi);background:var(--surface-2);border:1px solid transparent;border-radius:8px;padding:9px 26px 9px 10px;cursor:pointer}.rl-tools{display:flex;align-items:center;gap:8px;margin-left:auto}.rl-refresh{display:grid;place-items:center;width:36px;height:36px;background:var(--surface-2);border:0;border-radius:50%;color:var(--text-mid);cursor:pointer}.rl-refresh:hover{background:var(--surface-3);color:var(--text-hi)}
/* The page is at least as tall as the window (it starts 100px down, and stops
   above the "Create New Client" bar), and the table's frame takes whatever the
   heading, title and toolbar leave. So the card fills the screen like the
   Clients table however few rows it has, in both views and at any width, and
   its bottom scrollbar is always in view. The frame never drops below 240px:
   when the headings need most of the window (a phone), the page grows and
   scrolls instead of squeezing the table away. */
.revenue-ledger{min-height:calc(100vh - 162px)}
.rl-sheet{flex:1 1 auto;display:flex;flex-direction:column}
.rl-sheet>.rl-state{flex:1 1 auto;display:flex;flex-direction:column;align-items:center;justify-content:center}
.rl-grid-scroll{flex:1 1 0;min-height:240px;overflow:auto;overscroll-behavior-x:contain}.rl-grid{border-collapse:separate;border-spacing:0;width:100%;font-size:12px;white-space:nowrap;line-height:1.5}.rl-grid th,.rl-grid td{border-right:1px solid var(--hairline);border-bottom:1px solid var(--hairline);padding:16px 20px;text-align:left}.rl-grid tr>*:last-child{border-right:0}.rl-grid thead th{position:sticky;top:0;z-index:1;background:var(--surface-2);padding:0;font-weight:500;color:var(--text-mid);border-top:0;border-bottom:1px solid var(--hairline)}.rl-grid thead button{padding:13px 20px;display:flex;align-items:center;gap:16px;justify-content:space-between;width:100%;border:0;background:transparent;color:inherit;font:inherit;cursor:pointer}.rl-grid thead button span{color:var(--text-lo);font-size:12px}.rl-grid thead button .rl-sort-active{color:var(--accent)}.rl-grid thead .rl-action-head{min-width:115px}
.rl-grid .rl-rownum{text-align:center;padding:12px 13px;width:45px;color:var(--text-lo);font-size:10px;background:rgba(255,255,255,.012);font-variant-numeric:tabular-nums}.rl-grid thead .rl-rownum{background:var(--surface-2)}.rl-grid tbody tr:nth-child(even){background:rgba(255,255,255,.012)}.rl-grid tbody tr:hover{background:var(--accent-wash)}.rl-grid .rl-money{text-align:right;font-variant-numeric:tabular-nums}.rl-grid .rl-money button{justify-content:flex-end}.rl-grid tfoot{position:sticky;bottom:0;z-index:1;background:var(--surface-2);font-weight:600}.rl-grid tfoot th,.rl-grid tfoot td{border-top:1px solid var(--hairline);border-bottom:0;padding-top:16px;padding-bottom:16px}.rl-month-link{background:transparent;border:0;padding:0;color:var(--text-hi);font:inherit;font-weight:550;cursor:pointer;text-align:left}.rl-month-link:hover{color:var(--accent);text-decoration:underline}.rl-open{border:0;background:none;color:var(--text-mid);font:inherit;font-size:11px;padding:0;cursor:pointer}.rl-open span{margin-left:12px;color:var(--accent)}.rl-open:hover{color:var(--accent)}
.rl-sheet-footer{padding:14px 22px;display:flex;align-items:center;justify-content:space-between;gap:12px;font-size:11px;color:var(--text-lo)}.rl-note{margin:-10px 0 0;font-size:11px;line-height:1.6;color:var(--text-lo)}.rl-state{padding:58px 24px;text-align:center;color:var(--text-mid)}.rl-state h2{font-size:16px;color:var(--text-hi);font-weight:500;margin:14px 0 8px}.rl-state p{font-size:13px;margin:0 0 20px}.rl-loader{margin:auto;width:22px;height:22px;border:2px solid var(--hairline-strong);border-top-color:var(--accent);border-radius:50%;animation:rl-spin 1s linear infinite}@keyframes rl-spin{to{transform:rotate(360deg)}}
.rl-back{align-self:flex-start;background:none;border:0;padding:0;color:var(--text-mid);font:inherit;font-size:12px;cursor:pointer}.rl-back:hover{color:var(--accent)}.rl-back span{padding:0 10px;color:var(--text-lo)}.rl-tabs{display:flex;align-items:center;gap:2px;background:var(--surface-2);border:0;padding:3px;border-radius:8px}.rl-tabs button{background:transparent;border:0;border-radius:5px;padding:6px 10px;color:var(--text-mid);font:inherit;font-size:11px;cursor:pointer}.rl-tabs button[aria-pressed=true]{background:var(--surface-3);color:var(--accent)}.rl-badge{display:inline-block;padding:3px 8px;border-radius:5px;font-size:10px}.rl-badge-income{color:var(--success);background:rgba(124,226,124,.08)}.rl-badge-expense{color:#e7a27c;background:rgba(231,162,124,.08)}.rl-dash{color:var(--text-lo)}.rl-transactions td,.rl-transactions thead button{padding:13px 16px}.rl-transactions .rl-remarks{max-width:260px;white-space:normal;min-width:150px;font-size:11px;color:var(--text-mid);overflow-wrap:anywhere}.rl-transactions{min-width:1220px}.rl-pagination{display:flex;align-items:center;gap:12px}.rl-pagination button{font:inherit;background:var(--surface-2);border:0;border-radius:6px;padding:5px 9px;color:var(--text-hi);cursor:pointer}.revenue-ledger button:disabled{opacity:.4;cursor:default}.revenue-ledger button:focus-visible,.revenue-ledger select:focus-visible,.rl-grid-scroll:focus-visible{outline:2px solid var(--accent);outline-offset:-2px}.rl-sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}.revenue-analytics-back{margin-bottom:20px}
@media(max-width:900px){.rl-heading{flex-wrap:wrap}.rl-summary{order:3;width:100%;margin-left:0;gap:24px}.rl-stat{text-align:left}.rl-stat strong{font-size:17px}.rl-search{flex:1;min-width:180px}.rl-grid{min-width:670px}.rl-transactions{min-width:1220px}.rl-heading h1{font-size:25px}}
@media(max-width:600px){.revenue-ledger{gap:18px}.rl-heading{align-items:flex-start;gap:12px}.rl-heading h1{font-size:22px}.rl-heading p{font-size:12px}.rl-eyebrow{font-size:8px;letter-spacing:1.3px}.rl-summary{flex-wrap:wrap;gap:10px 20px}.rl-stat strong{font-size:16px}.rl-sheet-title{padding:16px}.rl-currency{display:none}.rl-toolbar{padding:14px;gap:10px}.rl-search{width:100%;flex-basis:100%}.rl-tools{margin-left:auto}.rl-sheet-footer{padding:12px 16px;flex-wrap:wrap}.rl-tabs button{padding:6px 7px}.rl-count{font-size:9px}.rl-note{font-size:10px}.rl-heading>button{font-size:12px;padding-left:13px;padding-right:13px;flex-shrink:0}}
@media(prefers-reduced-motion:reduce){.rl-loader{animation:none}}
/* Title row carries the search and filters (RevenueLedger.jsx). */
.rl-sheet-title{padding:16px 22px;flex-wrap:wrap;row-gap:12px}
.rl-sheet-title>.rl-toolbar{padding:0;margin-left:auto;flex:1 1 560px;justify-content:flex-end;min-width:0}
.rl-sheet-title>.rl-toolbar .rl-search{width:260px;flex:0 1 260px}
.rl-sheet-title>.rl-toolbar .rl-tools{margin-left:0}
.rl-sheet-title .rl-currency{margin-left:4px}
@media(max-width:900px){.rl-sheet-title>.rl-toolbar{flex-basis:100%;justify-content:flex-start}.rl-sheet-title>.rl-toolbar .rl-search{flex:1 1 180px;width:auto}.rl-sheet-title>.rl-toolbar .rl-tools{margin-left:auto}}
@media(max-width:600px){.rl-sheet-title{padding:16px}.rl-sheet-title>.rl-toolbar .rl-search{flex-basis:100%}}
