/* Evidence Record and Disbursement Rail pages. */
.app-page { background: var(--page-tint); background-image: radial-gradient(var(--dotgrid) 1px, transparent 1px); background-size: 22px 22px; padding-bottom: 120px; }
body.app .site-footer { background: var(--bg); }
.muted { color: var(--muted); }
.app-head { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 48px; align-items: end; padding-bottom: 36px; border-bottom: 1px dashed var(--line); margin-bottom: 36px; }
.app-head .h-xl { margin: 14px 0 16px; }
.app-head .soft { color: var(--faint); }
.app-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.app-stats div { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; }
.app-stats small, .field > span, .kv2 dt { font-family: var(--mono); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.app-stats b { display: block; font-size: 22px; font-weight: 600; letter-spacing: -0.02em; margin-top: 2px; font-variant-numeric: tabular-nums; }
.banner { display: flex; gap: 12px; align-items: center; padding: 14px 18px; border-radius: 14px; border: 1px dashed var(--warn-line); background: var(--warn-bg); color: var(--warn-ink); font-size: 14px; margin-bottom: 24px; }
.banner b { color: inherit; }
.app-grid { display: grid; grid-template-columns: minmax(0, 460px) minmax(0, 1fr); gap: 24px; align-items: start; }
.app-grid > * { min-width: 0; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 20px; box-shadow: 0 24px 70px var(--shadow); }
.card > header { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; }
.card h2 { margin: 0; font-size: 19px; font-weight: 600; letter-spacing: -0.01em; }
.card p.note-line { margin: 12px 0 0; font-size: 12px; color: var(--muted); line-height: 1.5; }
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field input, .field select, .field textarea { width: 100%; min-width: 0; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); color: var(--ink); padding: 11px 13px; font-size: 15px; outline: 0; transition: border-color .2s, box-shadow .2s; }
.field textarea { font-family: var(--mono); font-size: 12.5px; line-height: 1.6; min-height: 150px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); }
.field .hint { font-size: 12px; color: var(--muted); }
.field .hint b { color: var(--ink-2); font-weight: 600; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.seg { display: inline-grid; grid-auto-flow: column; background: var(--panel); border-radius: 999px; padding: 4px; }
.seg button { height: 34px; padding: 0 16px; border-radius: 999px; font-size: 14px; font-weight: 500; color: var(--muted); }
.seg button[aria-pressed='true'] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 4px var(--shadow-2); }
.go { width: 100%; height: 52px; border-radius: 14px; background: var(--ink); color: var(--on-ink); font-size: 15.5px; font-weight: 600; transition: background .2s, box-shadow .2s, opacity .2s; }
.go:not(:disabled):hover, .go.blue { background: var(--blue); color: #fff; }
.go:not(:disabled):hover { box-shadow: 0 10px 30px var(--blue-glow); }
.go:disabled { opacity: .45; cursor: not-allowed; }
.mini { height: 30px; padding: 0 12px; border-radius: 999px; border: 1px dashed var(--dash); font-size: 12.5px; font-weight: 500; white-space: nowrap; background: var(--surface); }
.mini:hover { border-color: var(--blue); color: var(--blue); }
.mini.blue { background: var(--blue); border: 1px solid var(--blue); color: #fff; }
.mini:disabled { opacity: .5; cursor: not-allowed; }
.msg { font-size: 13.5px; margin-top: 12px; line-height: 1.5; }
.msg:empty { display: none; }
.msg .box { padding: 10px 12px; border-radius: 12px; background: var(--panel); }
.msg .box.ok { background: var(--ok-bg); color: var(--ok-ink); }
.msg .box.bad { background: var(--bad-bg); color: var(--bad-ink); }
.msg .box.info { background: var(--blue-soft); color: var(--blue-ink); }
.msg a { text-decoration: underline; text-underline-offset: 2px; }
.acct { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; font-family: var(--mono); font-size: 12px; color: var(--muted); }
.acct button { font-family: var(--sans); font-size: 12px; color: var(--muted); text-decoration: underline; }
.kv2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0 0 14px; }
.kv2 div { border: 1px dashed var(--line); border-radius: 12px; padding: 10px 12px; min-width: 0; }
.kv2 .wide { grid-column: 1 / -1; }
.kv2 .wide dd { white-space: normal; font-weight: 500; line-height: 1.45; }
.kv2 dd { margin: 3px 0 0; font-size: 14.5px; font-weight: 600; font-variant-numeric: tabular-nums; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sec-h { display: flex; justify-content: space-between; align-items: end; gap: 16px; flex-wrap: wrap; margin: 56px 0 14px; }
.sec-h h2 { margin: 0; font-size: 26px; font-weight: 500; letter-spacing: -0.02em; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chips button { height: 32px; padding: 0 13px; border-radius: 999px; border: 1px dashed var(--dash); background: var(--surface); font-size: 12.5px; }
.chips button[aria-pressed='true'] { background: var(--ink); color: var(--on-ink); border: 1px solid var(--ink); }
.tbl-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; }
.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; min-width: 760px; }
.tbl th { text-align: left; font-family: var(--mono); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 500; padding: 13px 16px; border-bottom: 1px solid var(--line); background: var(--surface-2); white-space: nowrap; }
.tbl td { padding: 13px 16px; border-bottom: 1px dashed var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl .r { text-align: right; }
.tbl small { display: block; font-family: var(--mono); font-size: 11px; color: var(--muted); }
.tbl .stk { display: flex; align-items: center; gap: 10px; }
.tbl .stk img { width: 28px; height: 28px; border-radius: 8px; }
.tbl a.lnk { font-family: var(--mono); font-size: 12px; }
.tbl a.lnk:hover { color: var(--blue); }
.st { display: inline-block; font-family: var(--mono); font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; padding: 3px 8px; border-radius: 6px; background: var(--panel); color: var(--ink-2); white-space: nowrap; }
.st.right { background: var(--ok-bg); color: var(--ok-ink); }
.st.wrong { background: var(--bad-bg); color: var(--bad-ink); }
.st.open { background: var(--blue-soft); color: var(--blue-ink); }
.st.due { background: var(--warn-bg); color: var(--warn-ink); }
.empty { padding: 28px 16px; text-align: center; color: var(--muted); font-size: 14px; }
.howto { display: grid; gap: 12px; }
.howto li { color: var(--ink-2); font-size: 14px; line-height: 1.6; }
.howto ol { margin: 0; padding-left: 18px; display: grid; gap: 8px; }
.preview-lines { font-family: var(--mono); font-size: 12px; max-height: 180px; overflow: auto; border: 1px dashed var(--line); border-radius: 12px; padding: 10px 12px; margin-bottom: 14px; display: grid; gap: 3px; }
.preview-lines .bad { color: var(--bad-ink); }
@media (max-width: 980px) {
  .app-head, .app-grid { grid-template-columns: minmax(0, 1fr); gap: 24px; }
}
@media (max-width: 520px) {
  .app-stats { grid-template-columns: 1fr 1fr; }
  .row2, .kv2 { grid-template-columns: 1fr; }
}
