/* Cheques tab. Uses the board's colours and buttons from styles.css. */
#cheques .chq-sum table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
#cheques .chq-sum th { text-align: right; font-weight: 500; font-size: .85rem; color: var(--muted); padding: 2px 0 6px; }
#cheques .chq-sum td { padding: 6px 0 6px 10px; vertical-align: top; border-top: 1px dashed var(--line); text-align: right; white-space: nowrap; }
#cheques .chq-sum td:first-child { padding-left: 0; text-align: left; font-weight: 600; white-space: normal; }
#cheques .chq-firms { margin: 8px 0; }
#cheques .chq-firms button { padding: 7px 14px; border-radius: 999px; }
#cheques .chq { position: relative; }
#cheques .chq-row { display: flex; gap: 12px; align-items: flex-start; }
#cheques .chq-body { flex: 1; min-width: 0; }
#cheques .chq-line { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; align-items: baseline; }
#cheques .chq-amt { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
#cheques .chq-edit { font-size: .9rem; color: var(--muted); }
.chq-thumb { width: 104px; height: 48px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); background: var(--line); cursor: zoom-in; flex: none; }
.chq-nophoto { display: inline-flex; align-items: center; justify-content: center; color: var(--muted); font-size: .8rem; cursor: default; }
.chq-big { display: block; width: 100%; aspect-ratio: 16 / 7; object-fit: contain; max-height: 46vh; margin: 0 auto 8px; border-radius: 8px; background: var(--line); }
.chq-two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
#cheques .chq-sum td .meta { display: block; }
@media (max-width: 420px) { #cheques .chq-sum table { font-size: .86rem; } #cheques .chq-sum td { padding-left: 6px; } }

/* Cheques on a request card */
.chq-files { list-style: none; padding: 0; margin: 10px 0; }
.chq-files li { display: flex; gap: 10px; align-items: center; padding: 8px 0; border-top: 1px dashed var(--line); cursor: pointer; }
.chq-files .chq-body { flex: 1; min-width: 0; }
.chq-files .chq-line { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.chq-files .chq-line strong { min-width: 0; overflow-wrap: break-word; }
.chq-amt { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.chq-use { margin: 6px 0 0; border-collapse: collapse; font-size: .92rem; }
.chq-use td { padding: 2px 12px 2px 0; white-space: nowrap; }
.chq-use td.chq-amt { text-align: right; }

/* Camera for many cheques at once */
dialog.chq-cam { width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; border-radius: 0; padding: 0;
  background: #000; color: #fff; overflow: hidden; }
dialog.chq-cam[open] { display: flex; flex-direction: column; }
dialog.chq-cam::backdrop { background: #000; }
.chq-cam .cam-view { position: relative; flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; }
.chq-cam video { width: 100%; height: 100%; object-fit: cover; }
.chq-cam .cam-flash { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; }
.chq-cam .cam-flash.go { animation: camflash .25s ease-out; }
@keyframes camflash { from { opacity: .8; } to { opacity: 0; } }
.chq-cam .cam-off { padding: 24px; width: 100%; }
.chq-cam .cam-top { position: absolute; top: 0; left: 0; right: 0; display: flex; align-items: center; gap: 12px;
  padding: calc(env(safe-area-inset-top) + 8px) 12px 8px; background: linear-gradient(rgba(0,0,0,.55), transparent); }
.chq-cam .cam-x { background: rgba(0,0,0,.4); color: #fff; width: 48px; height: 48px; border-radius: 50%; padding: 0; font-size: 1.2rem; }
.chq-cam .cam-count { font-weight: 600; }
.chq-cam .cam-strip { display: flex; gap: 8px; overflow-x: auto; padding: 8px 12px; min-height: 72px; background: #000; }
.chq-cam .cam-thumb { position: relative; flex: none; }
.chq-cam .cam-thumb img { width: 56px; height: 56px; object-fit: cover; border-radius: 8px; border: 2px solid #fff; display: block; }
.chq-cam .cam-thumb button { position: absolute; top: -10px; right: -10px; width: 28px; height: 28px; min-width: 28px; min-height: 28px;
  padding: 0; border-radius: 50%; background: #c0392b; color: #fff; font-size: .8rem; }
.chq-cam .cam-thumb button::before { content: ''; position: absolute; inset: -8px; }
.chq-cam .cam-bar { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px;
  padding: 10px 16px calc(env(safe-area-inset-bottom) + 14px); background: #000; }
.chq-cam .cam-side { justify-self: start; width: 52px; height: 52px; border-radius: 12px; background: #222; display: flex;
  align-items: center; justify-content: center; font-size: 1.5rem; cursor: pointer; }
.chq-cam .cam-shutter { width: 76px; height: 76px; border-radius: 50%; background: #fff; border: 5px solid #888; box-shadow: 0 0 0 3px #fff; padding: 0; }
.chq-cam .cam-shutter:active { transform: scale(.92); }
.chq-cam .cam-send { justify-self: end; min-height: 52px; border-radius: 26px; padding: 0 18px; font-weight: 700; }
.chq-snap { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 16px 0; }
.chq-snap > * { text-align: center; }
.chq-plan td:first-child { white-space: normal; }
.chq-firmsum { margin: 6px 0 0; }
.chq-doubt { color: var(--redo, #b45309); white-space: normal; }
.chq-files .chq-fix { min-height: 44px; padding-left: 0; }
.chq-wait { margin: 6px 0 0; }
