/* =============================================================================
   Expenses (Expenses audit, 13 Nov 2026) — Record expense, the Expense List and
   the expense window.

   Its own sheet, not acc-app.css: that one is exported to web/. Every rule is
   scoped to the ledger (body.acc-fullscreen), and reads acc-app.css's --acc-*
   palette rather than restating it.
   ============================================================================= */

/* ---------- the list ---------- */
body.acc-fullscreen .ex-screen .inv-filter select{min-width:260px}
/* One width per column, so Amount sits in the same place whatever the rows say. */
body.acc-fullscreen .ex-screen table.acctable{table-layout:fixed;width:100%}
body.acc-fullscreen .ex-screen .acctable td{max-width:none}
body.acc-fullscreen .ex-screen .acctable td:not(.t-num):not(.t-act):not(.t-rn){white-space:normal;overflow-wrap:anywhere}
body.acc-fullscreen .ex-screen .acctable .t-rn{white-space:nowrap}
body.acc-fullscreen .ex-screen .acctable :is(td,th).t-act{white-space:nowrap}
/* Who was paid, and under it what for: most expenses are typed with only one of the two. */
body.acc-fullscreen .ex-who > .acclink{font-weight:600;color:var(--acc-ink)}
body.acc-fullscreen .ex-who > small{display:block;margin-top:2px;color:var(--acc-ink-mute);font-size:calc(12px * var(--acc-fs, 1));line-height:1.35}
body.acc-fullscreen .ex-who .accpill{margin-inline-start:4px;vertical-align:1px}
/* A category pill wraps rather than running under the next column. */
body.acc-fullscreen .ex-screen .acctable td .accpill{white-space:normal;text-align:start}
/* Reversed: still listed, visibly not counted. */
body.acc-fullscreen .ex-screen tr.is-reversed > td{color:var(--acc-ink-mute)}
body.acc-fullscreen .ex-screen td.t-strike{text-decoration:line-through;text-decoration-thickness:1px;color:var(--acc-ink-mute)}

/* ---------- the form ---------- */
/* The total paid out, as it is typed, and in words. */
body.acc-fullscreen .ex-total{
  display:flex;flex-wrap:wrap;align-items:baseline;gap:4px 10px;margin:0;
  padding:10px 14px;border:1px solid var(--acc-line);border-radius:var(--acc-r, 10px);
  background:var(--acc-band, #eff4fa);
}
body.acc-fullscreen .ex-total[hidden]{display:none}
body.acc-fullscreen .ex-total > span{font-size:calc(12px * var(--acc-fs, 1));color:var(--acc-ink-mute);font-weight:600}
body.acc-fullscreen .ex-total > b{font-size:calc(18px * var(--acc-fs, 1));font-weight:700;color:var(--acc-ink);font-variant-numeric:tabular-nums}
body.acc-fullscreen .ex-total > small{flex:1 1 100%;color:var(--acc-ink-2);font-size:calc(13px * var(--acc-fs, 1))}
/* Amounts read left to right in either language, and right-aligned as figures are. */
body.acc-fullscreen .mdl--vch-expense :is(#ex-amt,#ex-tax){text-align:end;font-variant-numeric:tabular-nums}
body.acc-fullscreen .mdl--vch-expense .mdl__f{flex-wrap:wrap;row-gap:8px}

/* ---------- the window ---------- */
body.acc-fullscreen .mdl .ex-view > .accnote{grid-column:1 / -1;margin:0}
body.acc-fullscreen .mdl--exview .mdl__f--win{flex-wrap:wrap;row-gap:8px}
body.acc-fullscreen .mdl--exview .mdl__f--win > button{white-space:nowrap;min-width:0;padding-inline:16px}
body.acc-fullscreen .mdl--exview .mdl__f--win > .accwin__close{min-width:88px}

@media (max-width:760px){
  body.acc-fullscreen .ex-screen .inv-filter,
  body.acc-fullscreen .ex-screen .inv-filter select{width:100%;min-width:0}
  /* On a phone the list keeps its columns and scrolls sideways, as the journal does. */
  body.acc-fullscreen .ex-screen table.acctable{table-layout:auto;min-width:820px}
}
