/* =============================================================================
   Accounts (Accounts audit, 13 Nov 2026) — the Chart of Accounts, the account
   form and window, the Account Statement, the Journal and the General Ledger.

   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 chart ---------- */
/* A locked account has no Delete; its slot is kept, empty, so the balance column
   stays one column down the whole tree. */
body.acc-fullscreen .acctree__nob{display:inline-flex;visibility:hidden;pointer-events:none}
/* A group folds from anywhere on its row. */
body.acc-fullscreen .acctree__row--grp[data-acc]{cursor:pointer}
/* A balance against its account's nature is the one figure on the tree worth a colour. */
body.acc-fullscreen .acctree__val.is-neg{color:var(--acc-red, #b42318)}
/* Switched off: still there, still totalled, visibly out of use. */
body.acc-fullscreen .acctree__row.is-off :is(.acctree__code,.acctree__name){opacity:.55}

/* ---------- the ledger grid ---------- */
/* A group's statement names the sub-account each line was posted to. */
body.acc-fullscreen .ledger__acct{
  display:inline-block;margin-inline-end:6px;padding:0 6px;border-radius:5px;
  background:var(--acc-band, #eff4fa);font-size:.92em;font-weight:600;white-space:nowrap;
}
body.acc-fullscreen .ledger__acct .acclink{color:var(--acc-ink-2, #344054)}
/* The General Ledger is a run of tables, one per account: one width per column
   (ledgerCols {fixed}) so Debit is in the same place in every one of them. */
body.acc-fullscreen .acc-gl table.acctable{table-layout:fixed;width:100%}
body.acc-fullscreen .acc-gl table.acctable td:not(.t-num){white-space:normal;overflow-wrap:anywhere}
body.acc-fullscreen .acc-gl table.acctable :is(th,td).t-rn{width:44px}

/* ---------- the Account Statement's bar ---------- */
body.acc-fullscreen .acc-stmt-pick{display:flex;align-items:center;gap:8px;flex:1 1 360px;min-width:260px;max-width:640px}
body.acc-fullscreen .acc-stmt-pick > select{flex:1 1 auto;min-width:0}
body.acc-fullscreen .acc-stmt-pick .cbo{flex:1 1 auto;min-width:0}
body.acc-fullscreen .acc-stmt-nav{margin:0;padding:3px;border-radius:10px;flex:0 0 auto;border-inline-start:1px solid var(--acc-line)}
body.acc-fullscreen .acc-stmt-nav .vch-nav__b{width:32px;height:30px}
body.acc-fullscreen .acc-stmt-nav .vch-nav__no{min-width:0;padding:0 6px}
body.acc-fullscreen .acc-stmt-nav .vch-nav__no small{white-space:nowrap}

/* ---------- the Journal ---------- */
body.acc-fullscreen .jrn-screen .inv-filter select{min-width:240px}
body.acc-fullscreen .jrn-screen table.acctable{table-layout:fixed;width:100%}
body.acc-fullscreen .jrn-screen .acctable td{max-width:none}
/* An entry's own row: a band across the grid, a firm rule above it, so each
   entry reads as a block and its lines as belonging to it. */
body.acc-fullscreen .jrn-screen tr.jrn-head > td{
  background:var(--acc-band, #eff4fa);border-top:1px solid var(--acc-line-firm, #b9c4d4);font-weight:600;
}
body.acc-fullscreen .jrn-screen tr.jrn-head:first-child > td{border-top:0}
body.acc-fullscreen .jrn-screen tr.jrn-head:hover > td{background:var(--acc-band-hi, #e2ebf7)}
body.acc-fullscreen .jrn-screen tr.jrn-head.is-draft > td{opacity:.75}
body.acc-fullscreen .jrn-screen tr.jrn-line > td{background:var(--acc-surface, #fff);border-top:0;padding-block:6px}
body.acc-fullscreen .jrn-screen tr.jrn-line > td:nth-child(4){padding-inline-start:18px}
body.acc-fullscreen .jrn-screen td.jrn-memo{white-space:normal;overflow-wrap:anywhere;font-weight:600}
body.acc-fullscreen .jrn-screen td.jrn-memo .acclink{color:var(--acc-ink)}
body.acc-fullscreen .jrn-screen .acctable :is(td,th).t-act{white-space:nowrap}

/* ---------- the account form ---------- */
body.acc-fullscreen .mdl--vch-account .acct-note{margin:0;color:#93370d;background:#fffaeb;border:1px solid #fedf89;
  border-radius:var(--acc-r, 10px);padding:9px 12px}
body.acc-fullscreen .mdl--vch-account .acct-note[hidden]{display:none}
body.acc-fullscreen .mdl--vch-account :is(input,select):disabled{background:var(--acc-band, #eff4fa);color:var(--acc-ink-soft);cursor:not-allowed}
body.acc-fullscreen .mdl--vch-account .accsw.is-invalid{border-color:var(--acc-red, #b42318)}

/* ---------- the account and entry windows ---------- */
body.acc-fullscreen :is(.mdl--acctview,.mdl--entryview) .mdl__f--win{flex-wrap:wrap;row-gap:8px}
body.acc-fullscreen :is(.mdl--acctview,.mdl--entryview) .mdl__f--win > button{white-space:nowrap;min-width:0;padding-inline:16px}
body.acc-fullscreen :is(.mdl--acctview,.mdl--entryview) .mdl__f--win > .accwin__close{min-width:88px}

@media (max-width:760px){
  body.acc-fullscreen .acc-stmt-pick{flex:1 1 100%;max-width:none;min-width:0}
  body.acc-fullscreen .jrn-screen .inv-filter,
  body.acc-fullscreen .jrn-screen .inv-filter select{width:100%;min-width:0}
  /* On a phone the grid keeps its columns and scrolls sideways, as the statement
     does; squeezed to the screen it broke account names a letter at a time. */
  body.acc-fullscreen .jrn-screen table.acctable{table-layout:auto;min-width:900px}
  body.acc-fullscreen .acc-gl table.acctable{min-width:980px}
}
@media print{
  body.acc-fullscreen .acc-stmt-nav{display:none}
}
