/* money-deposits.css - the Deposits room of the Money hub (page layout only).
   Every colour, size and space is a token, so both themes follow. Reusable pieces
   (banners, chips, tables, empty states, skeletons) are the ds-* classes of
   design-system.css; only the room's own arrangement lives here.
   The tone classes are chips on a soft wash: text on a wash takes the -ink token
   (the note on --success-ink in design-system.css), because ds-chip-success and
   ds-chip-warn print the fill colour, which is too light to read at 12px. */
/* The period toggle, the tiles and the head row are the Money page's shared pieces
   (.money-roomhead, .money-seg, .money-stats in money.html, 2026-10-21 redesign). */
.dep-banners:not(:empty) { margin-bottom: var(--s-4); }
.dep-banners .ds-banner + .ds-banner { margin-top: var(--s-2); }
.dep-banner-actions { margin-top: var(--s-2); }

.dep-block { margin-bottom: var(--s-6); }
.dep-block-head { margin-bottom: var(--s-3); }
.dep-h { margin: 0 0 var(--s-1); font-size: var(--text-md); font-weight: 650; letter-spacing: var(--tracking-snug); }
.dep-block-head .money-kpi-note:empty, [data-dep-extra]:empty, [data-dep-note]:empty { display: none; }

.dep-tone-ok { background: var(--success-soft); color: var(--success-ink); border-color: transparent; }
.dep-tone-warn { background: var(--warn-soft); color: var(--warn-ink); border-color: transparent; }
.dep-tone-bad { background: var(--danger-soft); color: var(--danger-ink); border-color: transparent; }
.dep-tone-info { background: var(--accent-soft); color: var(--accent-ink); border-color: transparent; }

.dep-cell { min-width: 0; overflow-wrap: anywhere; }
.dep-nowrap { white-space: nowrap; }
.dep-banners .ds-banner-danger .ds-banner-title { font-size: var(--text-md); }
.dep-note { max-width: 36ch; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.dep-note.is-full { display: block; max-width: 60ch; overflow: visible; }
/* (.ds-table tbody td sets color and padding at a higher specificity, so these rules name the table too.) */
.dep-table tbody tr.dep-muted td { color: var(--ink-2); background: var(--surface-2); }
.dep-fail { color: var(--danger-ink); }

/* The expander is a real button that looks like the date cell. */
.dep-row { cursor: pointer; }
.dep-exp { display: inline-flex; align-items: center; gap: var(--s-2); min-height: 44px; padding: 0; background: none; border: 0; color: var(--ink); font: inherit; font-weight: 600; text-align: left; cursor: pointer; }
.dep-exp:focus-visible { outline: 2px solid var(--brand-royal); outline-offset: 2px; border-radius: var(--r-xs); }
.dep-chev { color: var(--ink-3); transition: transform var(--dur-fast) var(--ease); }
.dep-exp[aria-expanded="true"] .dep-chev { transform: rotate(90deg); }

.dep-detail:hover { background: transparent; }
.dep-table tbody tr.dep-detail > td { padding: var(--s-3) var(--s-4) var(--s-4); background: var(--surface-2); }
.dep-panel > * + * { margin-top: var(--s-3); }
.dep-panel .ds-table-wrap { background: var(--surface); }
.dep-total { display: flex; justify-content: space-between; gap: var(--s-3); margin-top: var(--s-2); padding: var(--s-3) var(--s-4); border: 1px solid var(--border-subtle); border-radius: var(--r-md); background: var(--surface); font-weight: 700; }
.dep-more, .dep-trunc { margin-top: var(--s-3); }
.dep-skel-row { height: 44px; margin-bottom: var(--s-2); }

/* Between the phone layout (stacked, below 641px) and a full desktop the table keeps a
   readable width and scrolls sideways inside .ds-table-scroll. Without a floor the
   browser squeezes the columns (the cells may break anywhere, so their minimum width is
   one letter) and a name, a job or a note is drawn one character per line. Chips never
   break. */
.dep-table .ds-chip { white-space: nowrap; }
@media (min-width: 641px) {
  .dep-table { min-width: 860px; }
  .dep-table td[data-label="Type"] { min-width: 13rem; }
  .dep-table td[data-label="Customer"] { min-width: 8rem; }
  .dep-table td[data-label="Job"] { min-width: 5.5rem; }
}
@media (max-width: 640px) {
  .dep-nowrap { white-space: normal; }
  .dep-cell { text-align: right; }
  .ds-cell-primary .dep-cell { text-align: left; }
  .ds-table td.dep-detail-cell { display: block; }
  .ds-table td.dep-detail-cell::before { content: none; }
}
