/* BCLMA Admin. Light-blue wordmark on BCLMA navy; accents from the BCLMA palette
   (rust #C16237, gold #B7A92C, lime #99C926, forest #4F6E18). Money in tabular figures. */
:root {
  --navy: #00325F;
  --ink: #0F2540;
  --ink-soft: #4F6178;
  --brand: #96ADC5;
  --action: #00325F;
  --action-hover: #00244A;
  --lime: #99C926;
  --ground: #DBE1E6;
  --paper: #FFFFFF;
  --line: #CBD4DE;
  --ok: #4F6E18;
  --ok-bg: #EAF3D6;
  --wait: #6B6216;
  --wait-bg: #F4F0CF;
  --danger: #A9502A;
  --radius: 10px;
  --font: "Figtree", "Segoe UI", system-ui, -apple-system, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--ground); color: var(--ink); font: 400 1rem/1.5 var(--font); }
a { color: var(--action); text-underline-offset: 2px; }
a:hover { color: var(--action-hover); }
:focus-visible { outline: 3px solid var(--lime); outline-offset: 2px; }
h1 { font-size: 1.75rem; line-height: 1.2; font-weight: 600; letter-spacing: -0.01em; margin: 0 0 .5rem; }
h2 { font-size: 1.25rem; font-weight: 600; margin: 2.5rem 0 1rem; }

/* header */
.top { background: var(--navy); color: #fff; }
.top-inner { max-width: 56rem; margin: 0 auto; padding: .75rem 1.25rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.mark { display: flex; align-items: flex-end; gap: .75rem; text-decoration: none; }
.mark img { height: 2.1rem; width: auto; display: block; }
.mark-sub { display: grid; line-height: 1.15; color: var(--brand); font-size: .8rem; padding-bottom: .05rem; }
.mark-sub strong { color: #fff; font-weight: 600; font-size: .95rem; }
.nav { display: flex; align-items: center; gap: 1.25rem; flex-wrap: wrap; position: relative; }
.nav > a, .nav summary { text-decoration: none; color: #DCE5EF; font-weight: 500; }
.nav > a:hover, .nav summary:hover { color: #fff; }
.nav > a.here { color: #fff; box-shadow: inset 0 -3px 0 var(--lime); padding-bottom: .2rem; }
.nav form { margin: 0; }

/* header menus (details/summary; see app/nav.py) */
.menu { position: relative; }
.menu summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: .3rem; padding-bottom: .2rem; border-radius: 4px; user-select: none; }
.menu summary::-webkit-details-marker { display: none; }
.menu.here > summary { color: #fff; box-shadow: inset 0 -3px 0 var(--lime); }
.menu[open] > summary { color: #fff; }
.menu .caret { width: .45rem; height: .45rem; border: solid currentColor; border-width: 0 2px 2px 0; transform: translateY(-2px) rotate(45deg); margin-left: .15rem; transition: transform .15s; }
.menu[open] .caret { transform: translateY(1px) rotate(-135deg); }
.menu-icon summary { position: relative; padding: .15rem .1rem .3rem; }
.menu-icon .icon { display: block; }
.nav > :not(.menu-icon) + .menu-icon { margin-left: .5rem; }
.menu .dot { position: absolute; top: 0; right: -.2rem; width: .6rem; height: .6rem; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 2px var(--navy); }
.menu-panel { position: absolute; z-index: 20; top: calc(100% + .5rem); left: 0; min-width: 12rem; background: var(--paper); color: var(--ink); border-radius: var(--radius); box-shadow: 0 10px 30px rgba(0, 20, 45, .25); padding: .4rem 0; display: grid; }
.menu-icon .menu-panel { left: auto; right: 0; }
.menu-panel a, .menu-panel .linkish { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .55rem 1rem; color: var(--ink); text-decoration: none; font-weight: 500; white-space: nowrap; width: 100%; text-align: left; font: inherit; font-weight: 500; }
.menu-panel a:hover, .menu-panel .linkish:hover { background: var(--ground); color: var(--ink); }
.menu-panel a.here { box-shadow: inset 4px 0 0 var(--lime); background: #F1F4F7; color: var(--navy); font-weight: 600; }
.menu-panel .badge { background: var(--navy); color: #fff; }
.menu-head { margin: 0 0 .3rem; padding: .35rem 1rem .6rem; border-bottom: 1px solid var(--line); display: grid; line-height: 1.3; }
.menu-head span { color: var(--ink-soft); font-size: .88rem; }
.menu-panel form { border-top: 1px solid var(--line); margin-top: .3rem; padding-top: .3rem; }

.page { max-width: 56rem; margin: 0 auto; padding: 2rem 1.25rem 7rem; }
.narrow { max-width: 30rem; }
.lede { color: var(--ink-soft); margin: 0 0 1.5rem; max-width: 40rem; }
.hint { color: var(--ink-soft); font-size: .9rem; margin: 0; }
.crumb { margin: 0 0 .75rem; font-size: .95rem; }
.after { margin-top: 1.5rem; color: var(--ink-soft); }
.head-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: .25rem; }
.head-row h1 { margin: 0; }

/* messages */
.notice { background: var(--ok-bg); color: var(--ok); border-radius: var(--radius); padding: .75rem 1rem; margin: 0 0 1.5rem; font-weight: 500; }
.problem { background: #F8E7DF; color: var(--danger); border-radius: var(--radius); padding: .75rem 1rem; margin: 0 0 1.5rem; }
.problem p { margin: 0; }
.problem p + p { margin-top: .25rem; }
.empty { background: var(--paper); border: 1px dashed var(--line); border-radius: var(--radius); padding: 2rem 1.5rem; color: var(--ink-soft); }
.empty p { margin: 0; }

/* forms */
.stack { display: grid; gap: 1.1rem; }
label, .field-label { display: grid; gap: .35rem; font-weight: 500; font-size: .95rem; }
input, select { font: inherit; color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: 8px; padding: .7rem .8rem; width: 100%; min-height: 2.9rem; }
input:focus, select:focus { border-color: var(--action); outline: none; box-shadow: 0 0 0 3px rgba(150,173,197,.5); }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.money-input { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); }
.money-input span { padding-left: .8rem; color: var(--ink-soft); }
.money-input input { border: 0; font-variant-numeric: tabular-nums; }
.money-input:focus-within { border-color: var(--action); box-shadow: 0 0 0 3px rgba(150,173,197,.5); }
.money-input input:focus { box-shadow: none; }
input.code { font-size: 1.75rem; letter-spacing: .4em; text-align: center; font-variant-numeric: tabular-nums; }
.check { display: flex; align-items: center; gap: .6rem; font-weight: 500; }
.check input { width: 1.2rem; min-height: 0; height: 1.2rem; }
.drop { border: 2px dashed var(--brand); border-radius: var(--radius); padding: 1.25rem; background: var(--paper); font-weight: 400; }
.drop-title { font-weight: 600; color: var(--action); }
.drop-hint { color: var(--ink-soft); font-size: .9rem; }
.drop input { border: 0; padding: .25rem 0; min-height: 0; }
.actions { display: flex; align-items: center; gap: .75rem 1.25rem; flex-wrap: wrap; }
.copy-row { display: flex; gap: .5rem; margin-bottom: 1rem; }
.for-picker { margin-bottom: 1.5rem; max-width: 22rem; }

button, .button { font: inherit; font-weight: 600; border-radius: 8px; padding: .7rem 1.2rem; min-height: 2.9rem; border: 1px solid var(--line); background: var(--paper); color: var(--ink); cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; white-space: nowrap; }
.primary { background: var(--action); border-color: var(--action); color: #fff; }
.primary:hover { background: var(--action-hover); color: #fff; }
button:disabled { opacity: .5; cursor: not-allowed; }
.small { min-height: 0; padding: .35rem .7rem; font-size: .9rem; font-weight: 500; }
.linkish { background: none; border: 0; padding: 0; min-height: 0; color: var(--action); font-weight: 500; text-decoration: underline; text-underline-offset: 2px; }
.danger { color: var(--danger); }
.push-right { margin-left: auto; display: flex; gap: .5rem; flex-wrap: wrap; }
.edit-note { background: var(--paper); border: 1px solid var(--line); border-left: 4px solid var(--brand); border-radius: var(--radius); padding: 1rem 1.25rem; display: grid; gap: .75rem; justify-items: start; }
.edit-note p { margin: 0; }
.danger-button { color: var(--danger); border-color: #E2B9A6; background: var(--paper); }
.danger-button:hover { background: #F8E7DF; color: var(--danger); }

/* the tally: one expense per line, amounts lined up like a till tape */
.tally { list-style: none; margin: 0; padding: 0; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius) var(--radius) 0 0; }
.tally-row { display: grid; grid-template-columns: 1fr auto 7.5rem; align-items: center; gap: 1rem; padding: .9rem 1.1rem; border-bottom: 1px solid var(--line); }
.tally-row:last-child { border-bottom: 0; }
.tally-row.pick { grid-template-columns: auto 1fr auto 7.5rem; }
.tally-row.pick input { width: 1.3rem; height: 1.3rem; min-height: 0; accent-color: var(--action); }
.tally-main { display: grid; gap: .1rem; min-width: 0; font-size: 1rem; cursor: inherit; }
.tally-desc { font-weight: 500; color: var(--ink); text-decoration: none; overflow-wrap: anywhere; }
a.tally-desc:hover { color: var(--action); text-decoration: underline; }
.tally-date { color: var(--ink-soft); font-size: .88rem; font-weight: 400; }
.amount { font-variant-numeric: tabular-nums; font-weight: 600; font-size: 1.1rem; text-align: right; white-space: nowrap; }
.tally-foot { position: sticky; bottom: 0; display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 1rem; padding: 1rem 1.1rem; background: var(--navy); color: #fff; border-radius: 0 0 var(--radius) var(--radius); }
.tally-foot.static { position: static; grid-template-columns: 1fr auto; }
.tally-foot .total { font-size: 1.6rem; font-weight: 700; letter-spacing: -0.01em; }
.tally-count { color: var(--brand); }
.tally-foot .primary { background: var(--lime); border-color: var(--lime); color: var(--navy); }
.tally-foot .primary:hover { background: #ADD94A; color: var(--navy); }

.thumbs { display: flex; gap: .35rem; }
.thumb { width: 2.75rem; height: 2.75rem; border-radius: 6px; overflow: hidden; border: 1px solid var(--line); display: grid; place-items: center; background: var(--ground); text-decoration: none; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb .doc { font-size: .72rem; font-weight: 700; color: var(--action); }
.no-receipt { font-size: .85rem; color: var(--wait); }
.attached { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.attached li { display: flex; align-items: center; gap: .75rem; }
.fname { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 400; }

/* work lists: approvals and payments */
.worklist { list-style: none; margin: 0; padding: 0; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); }
.worklist > li { display: grid; grid-template-columns: 1fr 7.5rem auto; align-items: center; gap: .75rem 1rem; padding: .9rem 1.1rem; border-bottom: 1px solid var(--line); }
.worklist > li:last-child { border-bottom: 0; }
.worklist .pay-row { grid-template-columns: 1fr 7.5rem; }
.work-main { display: grid; gap: .1rem; text-decoration: none; min-width: 0; }
.work-title { font-weight: 600; color: var(--ink); }
.work-main:hover .work-title { color: var(--action); text-decoration: underline; }
.work-sub { color: var(--ink-soft); font-size: .88rem; }
.pay-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: flex-start; gap: .75rem 1.5rem; }
.pay-section { margin-bottom: 2.5rem; }
.pay-section h2 { margin-top: 0; display: flex; align-items: center; gap: .5rem; }
.count { font-size: .85rem; font-weight: 600; background: var(--paper); border: 1px solid var(--line); border-radius: 999px; padding: .05rem .55rem; color: var(--ink-soft); }
.tick { margin: 0; }
.tick .check { background: var(--wait-bg); color: var(--wait); border-radius: 8px; padding: .55rem .8rem; font-weight: 600; cursor: pointer; }
.tick .check:has(input:checked) { background: var(--ok-bg); color: var(--ok); }
.tick .check input { accent-color: var(--ok); }
details.pay summary { cursor: pointer; font-weight: 600; color: var(--action); padding: .55rem 0; }
details.pay[open] { flex-basis: 100%; }
.pay-form { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) auto; gap: .75rem; align-items: end; background: #F6F8FB; border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; margin-top: .25rem; }
.action-box { background: var(--paper); border: 1px solid var(--line); border-left: 4px solid var(--lime); border-radius: var(--radius); padding: 1.1rem 1.25rem; margin: 0 0 1.5rem; display: grid; gap: 1rem; }
.action-box p { margin: 0; }
.action-box .tick { justify-self: start; }
.action-box > .stack, form.action-box { grid-template-columns: 1fr auto; align-items: end; }
.after-tally { margin-top: 1.5rem; }
.note { background: var(--paper); border-radius: var(--radius); padding: .75rem 1rem; margin: 0 0 1.5rem; }

/* officer notice and nav counts */
.banner { display: block; background: var(--lime); color: var(--navy); text-decoration: none; }
.banner strong, .banner span { display: block; max-width: 56rem; margin: 0 auto; padding: 0 1.25rem; }
.banner strong { padding-top: .7rem; }
.banner span { padding-bottom: .7rem; font-size: .92rem; }
.banner:hover { background: #ADD94A; color: var(--navy); }
.badge { display: inline-block; min-width: 1.35rem; padding: 0 .35rem; border-radius: 999px; background: var(--lime); color: var(--navy); font-size: .78rem; font-weight: 700; text-align: center; line-height: 1.35rem; margin-left: .15rem; }

/* receipt picker */
.pick-btn { justify-self: start; margin-top: .5rem; border: 1px solid var(--brand); color: var(--action); }
.picked { list-style: none; margin: .5rem 0 0; padding: 0; display: grid; gap: .5rem; }
.picked li { display: flex; align-items: center; gap: .75rem; }
.picked img, .picked .doc { width: 2.75rem; height: 2.75rem; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); display: grid; place-items: center; font-size: .72rem; font-weight: 700; color: var(--action); background: var(--ground); flex: none; }
.drop { display: grid; gap: .2rem; transition: background .15s, border-color .15s; }
.drop.dragging { background: #EAF3D6; border-color: var(--lime); border-style: solid; }
.drag-only { display: none; }
@media (hover: hover) and (pointer: fine) { .drag-only { display: inline; } }

/* payees and bills */
.wide-ish { max-width: 38rem; }
.flag { background: #F8E7DF; color: var(--danger); border-radius: 8px; padding: .55rem .8rem; margin: 0 0 1rem; font-weight: 600; }
.flag-inline { color: var(--danger); font-weight: 600; font-size: .85rem; white-space: nowrap; }
.flag-row { display: flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: center; justify-content: space-between; }
.flag-row span { flex: 1 1 18rem; }
.note-link { display: block; background: var(--paper); border-left: 4px solid var(--lime); border-radius: var(--radius); padding: .75rem 1rem; margin: 0 0 1.25rem; text-decoration: none; color: var(--ink); }
.note-link strong { color: var(--action); text-decoration: underline; }
.small-link { font-size: .88rem; font-weight: 600; margin-left: .4rem; }
.ok-inline { color: var(--ok); font-weight: 600; font-size: .85rem; }
.mono { font-variant-numeric: tabular-nums; letter-spacing: .04em; }
.pre { white-space: pre-line; }
.pay-to { background: var(--paper); border: 1px solid var(--line); border-left: 4px solid var(--navy); border-radius: var(--radius); padding: 1rem 1.25rem; margin: 0 0 1.5rem; }
.pay-to-head { display: flex; justify-content: space-between; gap: 1rem; margin-bottom: .5rem; }
.pay-to-facts { display: flex; flex-wrap: wrap; gap: .75rem 2rem; margin: 0; }
.pay-to-facts dt { font-size: .82rem; color: var(--ink-soft); }
.pay-to-facts dd { margin: 0; font-weight: 600; font-size: 1.05rem; }
.trio { display: grid; grid-template-columns: 5rem 7rem 1fr; gap: .75rem; }
.pay-fields { display: grid; gap: 1rem; }
fieldset.new-payee { border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); padding: 1rem 1.1rem; margin: 0; display: grid; gap: .9rem; }
fieldset.new-payee legend { font-weight: 600; padding: 0 .3rem; }
[hidden] { display: none !important; }
textarea { font: inherit; color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: 8px; padding: .7rem .8rem; width: 100%; resize: vertical; }
textarea:focus { border-color: var(--action); outline: none; box-shadow: 0 0 0 3px rgba(150,173,197,.5); }
.filters { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0 0 1rem; }
.filters a { text-decoration: none; padding: .35rem .8rem; border-radius: 999px; background: var(--paper); color: var(--ink); font-size: .9rem; font-weight: 500; border: 1px solid var(--line); }
.filters a.on { background: var(--navy); color: #fff; border-color: var(--navy); }
.search { display: flex; gap: .5rem; align-items: center; margin: 0 0 1rem; max-width: 30rem; }
.invoice-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius) var(--radius) 0 0; padding: 1rem 1.1rem; display: grid; gap: .75rem; }
.invoice-desc { margin: 0; font-weight: 500; }
.invoice-files .thumb { width: 4.5rem; height: 4.5rem; }
.field-hint { margin-top: -.75rem; }
.inline-form { display: flex; gap: .5rem; margin-top: .5rem; max-width: 30rem; }
.account-edit summary { cursor: pointer; font-weight: 600; color: var(--action); }
.plain-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.plain-list li { display: flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: center; }
.plain-list .amount { font-size: 1rem; }
h2 + .flag { margin-top: -.25rem; }
form h2 { margin: 1.5rem 0 0; }

/* GST */
.gst-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: .5rem .75rem; }
.gst-row .small { min-height: 2.9rem; }
.gst-row label { flex: 1 1 9rem; max-width: 11rem; }
.gst-note { font-size: .82rem; color: var(--brand); }

/* card charges */
.button-row { display: flex; flex-wrap: wrap; gap: .5rem; }
fieldset.paid-by { border: 0; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
fieldset.paid-by legend { font-weight: 500; font-size: .95rem; padding: 0; margin-bottom: .4rem; }
.option { display: flex; gap: .7rem; align-items: flex-start; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: .85rem 1rem; cursor: pointer; font-weight: 400; }
.option input { width: 1.15rem; height: 1.15rem; min-height: 0; margin-top: .15rem; accent-color: var(--navy); flex: none; }
.option > span { display: grid; gap: .15rem; }
.option > span > span { color: var(--ink-soft); font-size: .88rem; }
.option:has(input:checked) { border-color: var(--navy); box-shadow: inset 0 0 0 1px var(--navy); }
.card-month { margin-bottom: 2rem; }
.card-month h2 { margin: 0 0 .75rem; }
.card-group { margin-bottom: 1.25rem; }
.card-head { display: flex; justify-content: space-between; align-items: baseline; background: var(--navy); color: #fff; padding: .6rem 1.1rem; border-radius: var(--radius) var(--radius) 0 0; }
.card-head .amount { font-size: 1.15rem; }
.card-group .worklist { border-radius: 0 0 var(--radius) var(--radius); border-top: 0; }
.card-group .worklist > li { grid-template-columns: 1fr 7.5rem auto; }

/* month end */
.worklist .stmt-row { grid-template-columns: 1fr 14rem auto; }
.checklist { list-style: none; margin: 0; padding: 0; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); }
.checklist > li { padding: .8rem 1.1rem .8rem 2.6rem; border-bottom: 1px solid var(--line); position: relative; font-weight: 500; }
.checklist > li:last-child { border-bottom: 0; }
.checklist > li::before { content: "!"; position: absolute; left: 1rem; top: .8rem; width: 1.1rem; height: 1.1rem; border-radius: 50%; background: #F8E7DF; color: var(--danger); font-size: .75rem; font-weight: 700; display: grid; place-items: center; }
.checklist > li.done { color: var(--ink-soft); font-weight: 400; }
.checklist > li.done::before { content: "✓"; background: var(--ok-bg); color: var(--ok); }
.checklist .sub { margin: .4rem 0 0; padding-left: 1rem; font-weight: 400; font-size: .92rem; }
.grid.stmt-lines td { white-space: normal; vertical-align: top; overflow-wrap: anywhere; }
.grid.stmt-lines td:first-child, .grid.stmt-lines td.amount { white-space: nowrap; }
.grid.stmt-lines td:nth-child(2) { min-width: 14rem; }
.line-actions form { display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; margin: 0; }
.line-actions select { width: auto; min-height: 0; padding: .3rem .4rem; font-size: .85rem; }
.summary-link { cursor: pointer; font-weight: 600; color: var(--action); }

/* file viewer */
.viewer-bar { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; margin-bottom: 1rem; }
.viewer-name { font-weight: 600; flex: 1 1 12rem; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.viewer-nav { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.viewer { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; }
.viewer-img { display: block; max-width: 100%; max-height: 80vh; margin: 0 auto; }
.viewer-frame { display: block; width: 100%; height: 80vh; border: 0; background: #fff; }
.email-frame { height: 65vh; border-top: 1px solid var(--line); }
.viewer-text { white-space: pre-wrap; font: .95rem/1.55 var(--font); margin: 0; }
.email-head { display: grid; gap: .25rem; margin: 0 0 1rem; }
.email-head > div { display: grid; grid-template-columns: 6.5rem 1fr; gap: .5rem; }
.email-head dt { color: var(--ink-soft); font-size: .88rem; }
.email-head dd { margin: 0; overflow-wrap: anywhere; }
.grid.csv td { font-size: .88rem; }
.viewer-strip { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1rem; }
.viewer-strip a { width: 3.5rem; height: 3.5rem; border: 2px solid var(--line); border-radius: 8px; overflow: hidden; display: grid; place-items: center; background: var(--paper); text-decoration: none; }
.viewer-strip a.on { border-color: var(--navy); }
.viewer-strip img { width: 100%; height: 100%; object-fit: cover; }
.viewer-strip .doc, .thumb .doc { font-size: .7rem; font-weight: 700; color: var(--action); }

/* tables */
.table-wrap { overflow-x: auto; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); }
.grid { width: 100%; border-collapse: collapse; }
.grid th, .grid td { text-align: left; padding: .75rem 1rem; border-bottom: 1px solid var(--line); white-space: nowrap; }
.grid th { font-size: .88rem; font-weight: 600; color: var(--ink-soft); background: #F7F9FC; }
.grid tr:last-child td { border-bottom: 0; }
.grid .num { text-align: right; }
.grid td.amount { font-size: 1rem; }
.grid form { margin: 0; }
tr.inactive td { color: var(--ink-soft); }

.status { display: inline-block; font-size: .85rem; font-weight: 600; padding: .2rem .6rem; border-radius: 999px; background: var(--ground); color: var(--ink-soft); }
.status-submitted { background: var(--wait-bg); color: var(--wait); }
.status-paid { background: var(--ok-bg); color: var(--ok); }
.status-approved { background: #E0E9F3; color: var(--navy); }
.status-initiated { background: #F8E7DF; color: var(--danger); }

.facts { display: flex; flex-wrap: wrap; gap: 1rem 2.5rem; margin: 1rem 0 1.5rem; }
.facts dt { font-size: .85rem; color: var(--ink-soft); }
.facts dd { margin: 0; font-weight: 500; }

@media (max-width: 640px) {
  .page { padding-top: 1.25rem; }
  .nav { width: 100%; gap: 1rem; }
  .menu { position: static; }
  .menu-panel, .menu-icon .menu-panel { left: 0; right: 0; min-width: 0; }
  .nav > :not(.menu-icon) + .menu-icon { margin-left: auto; }
  .mark-sub span { display: none; }
  h1 { font-size: 1.5rem; }
  .pair { grid-template-columns: 1fr; }
  .tally-row { grid-template-columns: 1fr auto; }
  .tally-row .thumbs, .tally-row .no-receipt { grid-column: 1; grid-row: 2; }
  .tally-row .amount { grid-column: 2; grid-row: 1; }
  .tally-row.pick { grid-template-columns: auto 1fr auto; }
  .tally-row.pick .thumbs, .tally-row.pick .no-receipt { grid-column: 2; grid-row: 2; }
  .tally-row.pick .amount { grid-column: 3; grid-row: 1; }
  .tally-foot { grid-template-columns: 1fr auto; }
  .tally-foot .button, .tally-foot button { grid-column: 1 / -1; }
  .head-row .button { width: 100%; }
  .worklist > li { grid-template-columns: 1fr auto; }
  .worklist > li > .button { grid-column: 1 / -1; }
  .worklist .stmt-row { grid-template-columns: 1fr auto; }
  .pay-form { grid-template-columns: 1fr; }
  .trio { grid-template-columns: 1fr 1fr; }
  fieldset.paid-by { grid-template-columns: 1fr; }
  .card-group .worklist > li { grid-template-columns: 1fr auto; }
  .trio label:last-child { grid-column: 1 / -1; }
  form.action-box { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
@media print {
  .nav, .crumb, .after, .tally-foot .primary { display: none; }
  .top { background: #fff; } .top .mark-sub strong { color: var(--navy); }
  body { background: #fff; }
  .tally-foot { background: #fff; color: var(--ink); border: 1px solid var(--line); position: static; }
}
