/* Bank tab. Uses the board's colours and buttons from styles.css. */
#bank .bk-drop { display: block; text-align: center; padding: 16px; font-size: 1.05rem; margin: 6px 0; }
#bank h2 { margin: 18px 0 4px; font-size: 1.1rem; }
#bank .bk-facts { font-size: .92rem; margin-top: 4px; }
#bank .bk-warn { color: var(--warn); }
#bank .bk-ok { color: var(--ok); }
#bank .bk-spare { margin: 8px 0; }
#bank .bk-spare button, #bank .bk-chips button { padding: 7px 12px; border-radius: 999px; font-size: .9rem; }
#bank .bk-new { display: block; width: 100%; margin: 8px 0 4px; }
#bank .bk-chips { margin: 12px 0 6px; }
#bank .bk-total { justify-content: space-between; margin: 6px 0 0; }
#bank #bkQ { width: 100%; margin: 6px 0 0; }
#bank .bk-list { padding: 4px 12px; }
#bank .bk-row { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "date amt" "text text"; gap: 2px 10px; padding: 9px 0; border-top: 1px dashed var(--line); align-items: start; }
#bank .bk-date { grid-area: date; }
#bank .bk-text { grid-area: text; }
#bank .bk-amt { grid-area: amt; }
#bank .bk-amt .meta { display: inline; margin-left: 8px; }
#bank .bk-total button { padding: 7px 12px; font-size: .9rem; }
#bank #bkBack { padding-left: 0; }
#bank .bk-row:first-child { border-top: 0; }
#bank .bk-date { color: var(--muted); font-size: .88rem; white-space: nowrap; }
#bank .bk-text { min-width: 0; overflow-wrap: anywhere; font-size: .93rem; }
#bank .bk-text .pill { margin-left: 6px; }
#bank .bk-mode { margin: 0 6px 0 0 !important; font-size: .72rem; padding: 1px 6px; }
#bank .bk-amt { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
#bank .bk-amt.in { color: var(--ok); }
#bank .bk-amt .meta { font-weight: 400; font-size: .8rem; }
.bk-two { width: 100%; border-collapse: collapse; margin: 8px 0; font-variant-numeric: tabular-nums; }
.bk-two td { padding: 6px 0; border-top: 1px dashed var(--line); }
.bk-two td:last-child { text-align: right; font-weight: 600; white-space: nowrap; padding-left: 12px; }
.bk-ok { color: var(--ok); }
#bank #bkInt .row { align-items: center; }
#bank #bkInt h3 { margin: 0; }
#bank #bkRate { margin-left: auto; padding: 7px 12px; font-size: .9rem; }
.bk-int { width: 100%; border-collapse: collapse; margin: 8px 0 0; font-size: .9rem; font-variant-numeric: tabular-nums; }
.bk-int th { text-align: right; font-weight: 400; color: var(--muted); font-size: .8rem; padding: 4px 0 4px 8px; }
.bk-int td { text-align: right; padding: 6px 0 6px 8px; border-top: 1px dashed var(--line); }
.bk-int th:first-child, .bk-int td:first-child { text-align: left; padding-left: 0; }
.bk-bad { color: var(--bad); font-weight: 700; }
#bank .bk-dates { margin: 8px 0 0; gap: 10px; }
#bank .bk-dates label { flex: 1; font-size: .85rem; color: var(--muted); }
#bank .bk-dates input { width: 100%; margin: 2px 0 0; }
.bk-int td:not(:first-child) { white-space: nowrap; }
@media (max-width: 480px) { .bk-int { font-size: .8rem; } .bk-int th { font-size: .72rem; } }
#bank a[data-file] { display: inline-block; padding: 10px 0; min-height: 44px; overflow-wrap: anywhere; color: var(--brand); text-decoration: none; }
#bank .bk-remove { margin-top: 8px; color: var(--bad); border-color: var(--bad); }
#bank .bk-row { grid-template-areas: "date amt" "text text" "why why"; }
#bank .bk-why { grid-area: why; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
#bank .bk-why .pill { font-size: .85rem; padding: 3px 10px; }
#bank .bk-fix { padding: 6px 12px; font-size: .88rem; }
#bank .bk-rest { display: block; width: 100%; margin: 22px 0 4px; text-align: left; color: var(--muted); border-color: var(--line); }
#bank .bk-find h3 { margin: 0; }
#bank .bk-find .bk-dates { flex-wrap: nowrap; }
#bank .bk-find .bk-dates input { min-width: 0; }
#bank .bk-find .bk-list { padding: 0; }
#bank .bk-find .bk-total { display: flex; align-items: baseline; gap: 10px; margin-top: 12px; }
#bank .bk-upto { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 12px; font-size: .85rem; }
#bank .bk-find input { min-height: 44px; }

/* Find a payment: a found entry opens in full; parties as chips; a way to the party's ledger. */
#bank .bk-hit { grid-template-columns: auto 1fr auto; grid-template-areas: "date text amt"; align-items: center; min-height: 44px; padding: 6px 0; cursor: pointer; }
#bank .bk-hit .bk-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#bank .bk-month { display: grid; grid-template-columns: 1fr auto auto; gap: 12px; align-items: center; width: 100%; min-height: 48px; padding: 0 4px; margin: 0; background: transparent; color: inherit; border: 0; border-top: 1px solid var(--line); border-radius: 0; text-align: left; font-size: .95rem; }
#bank .bk-month b { font-variant-numeric: tabular-nums; }
#bank .bk-find .bk-total b { font-variant-numeric: tabular-nums; }
#bank .bk-party { display: block; }
#bank .bk-led { grid-area: led; justify-self: start; min-height: 44px; padding: 0 14px; margin-top: 4px; background: transparent; color: var(--brand); border: 1px solid var(--line); border-radius: 999px; font-size: .9rem; }
#bank .bk-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 4px; }
#bank .bk-chip { min-height: 44px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: inherit; font-size: .9rem; text-align: left; }
#bank .bk-chip[aria-pressed="true"] { background: var(--brand); border-color: var(--brand); color: var(--brand-text); }
dialog.bk-hitbox td { overflow-wrap: anywhere; vertical-align: top; padding: 5px 8px 5px 0; }
dialog.bk-hitbox td:first-child { white-space: nowrap; }
dialog.bk-hitbox .bk-two td:last-child { white-space: normal; text-align: left; font-weight: 500; }
dialog.bk-hitbox button { min-height: 44px; }
/* An overdraft: what is ready to use, with what is drawn small under it. A loan: what was borrowed. */
#bank .bk-avail { margin-top: 8px; font-size: 1rem; color: var(--ok); font-variant-numeric: tabular-nums; }
#bank .bk-avail b { font-size: 1.45rem; }
#bank .bk-loan .bk-avail { color: inherit; }
#bank .bk-used { font-size: .86rem; color: var(--muted); font-variant-numeric: tabular-nums; }
#bank .bk-used.bk-over { color: var(--bad); font-weight: 600; }
#bank .bk-mail .row { align-items: center; justify-content: space-between; }
#bank .bk-mail h3 { margin: 0; }
#bank .bk-addr { font-weight: 700; font-size: 1.05rem; overflow-wrap: anywhere; margin: 2px 0 6px; }
#bank .bk-code { margin: 6px 0; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; }
#bank .bk-code strong { font-size: 1.15rem; letter-spacing: .04em; margin-left: 6px; }
#bank .bk-mrow { display: flex; gap: 10px; align-items: center; justify-content: space-between; padding: 8px 0; border-top: 1px dashed var(--line); }
#bank .bk-mrow > div { min-width: 0; }
#bank .bk-mwhen { color: var(--muted); font-size: .88rem; }
#bank .bk-mtext { overflow-wrap: anywhere; font-size: .93rem; }
#bank .bk-mrow button { flex: none; min-height: 44px; }
#bank .bk-mail #bkMailCopy, #bank .bk-code button { min-height: 44px; }
#bank .bk-mmore { display: block; width: 100%; min-height: 44px; }
/* Bank SMS alerts: when and which account, the name the bank wrote, the amount, and whether a statement has it. */
#bank .bk-sms .bk-sright { flex: none; text-align: right; font-size: .86rem; font-variant-numeric: tabular-nums; }
#bank .bk-sms .bk-amt { font-size: 1rem; font-weight: 700; }
#bank .bk-sms .bk-sok { color: var(--muted); }
/* Usable funds: every account's ready money, the total, then the limits and loans taken off. */
#bank .bk-usable h3 { margin: 0; }
#bank .bk-usable > .bk-avail { margin-top: 2px; }
#bank .bk-usable > .bk-avail b { font-size: 1.7rem; }
#bank .bk-usable table { width: 100%; border-collapse: collapse; margin-top: 8px; font-variant-numeric: tabular-nums; }
#bank .bk-usable td { padding: 7px 0; border-top: 1px dashed var(--line); overflow-wrap: anywhere; }
#bank .bk-usable td:last-child { text-align: right; white-space: nowrap; padding-left: 10px; font-weight: 600; }
#bank .bk-usable .bk-less td:last-child { color: var(--bad); }
#bank .bk-usable .bk-net td { border-top: 2px solid var(--line); font-weight: 700; font-size: 1.05rem; color: inherit; }
#bank .bk-usable .bk-net td:last-child { color: inherit; }
#bank .bk-avail.bk-minus { color: var(--bad); }
#bank .bk-acct button, #bank .bk-acct .btn { min-height: 44px; }
dialog.bk-more { width: min(480px, 94vw); }
dialog.bk-more table { width: 100%; }
dialog.bk-more .btn { min-height: 44px; display: inline-flex; align-items: center; }
dialog.bk-more tr.bk-warn td:last-child { color: var(--bad); }
#bank .bk-usable .bk-neg td:last-child { color: var(--bad); }
#bank .bk-usable .bk-rate { white-space: nowrap; font-size: .86rem; }
#bank .bk-usable .bk-age { display: block; font-size: .8rem; font-weight: 500; color: var(--muted); }
#bank .bk-usable .bk-age.bk-warn { color: var(--warn); }
dialog.bk-more .row { align-items: center; }
dialog.bk-more .row .btn { margin: 0; }

/* Find a payment: the local name over an answer, and earlier years folded under this year. */
#bank .bk-local, #find .bk-local { font-weight: 700; font-size: 1.1rem; margin-top: 12px; overflow-wrap: anywhere; }
.bk-early { display: block; width: 100%; min-height: 44px; margin-top: 12px; }
#bank .bk-confirm { display: block; text-align: center; margin: 6px 0; min-height: 44px; }
