/* Sổ Kế Toán Bích Huệ (bichhue): only what kit v1.10 lacks, plus layout glue. Tokens only, no colour literals.
   Every part here is a row of KIT_GAPS.md. */

/* 1. Statement photo beside the entry grid (Gõ cạnh ảnh, Đọc ảnh tự động): KIT_GAPS #1 */
.bh-split {
  display: grid;
  grid-template-columns: minmax(22rem, 5fr) 7fr;
  gap: var(--sp-4);
  align-items: start;
}
.bh-split > * { min-width: 0; }
@media (max-width: 64rem) { .bh-split { grid-template-columns: 1fr; } }

.bh-viewer {
  position: sticky;
  top: calc(var(--topbar-real-h, var(--topbar-h)) + var(--sp-3));
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - var(--topbar-real-h, var(--topbar-h)) - var(--sp-6));
  background: var(--surface);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.bh-viewer-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-2) var(--sp-3);
  border-bottom: 1px solid var(--panel-border);
}
.bh-viewer-page { margin-inline-end: auto; font-weight: 600; font-variant-numeric: tabular-nums; }
.bh-viewer-stage {
  flex: 1;
  min-height: 18rem;
  overflow: auto;
  padding: var(--sp-4);
  background: var(--sunk);
}
.bh-scan {
  width: 100%;
  min-width: 20rem;
  margin-inline: auto;
  padding: var(--sp-4);
  background: var(--surface);
  color: var(--text);
  font-size: var(--fs-xs);
  line-height: var(--lh-tight);
  box-shadow: var(--sh-2);
  transform: rotate(var(--bh-rot, 0deg)) scale(var(--bh-zoom, 1));
  transform-origin: top center;
  transition: transform var(--dur-2) var(--ease);
}
@media (prefers-reduced-motion: reduce) { .bh-scan { transition: none; } }
.bh-scan-head { display: flex; justify-content: space-between; gap: var(--sp-3); padding-bottom: var(--sp-2); border-bottom: 1px solid var(--text); }
.bh-scan-head strong { display: block; font-size: var(--fs-sm); }
.bh-scan-row {
  display: grid;
  grid-template-columns: 1.6rem 4.6rem 1fr 4.4rem 4.4rem 4.8rem;
  gap: var(--sp-1);
  padding: var(--sp-1) var(--sp-1);
  border-bottom: 1px dotted var(--muted);
  font-variant-numeric: tabular-nums;
}
.bh-scan-row > :nth-child(n+4) { text-align: end; }
.bh-scan-row-head { font-weight: 700; border-bottom-style: solid; }
.bh-scan-row[aria-current="true"] { background: var(--primary-tint); outline: 2px solid var(--primary); outline-offset: -1px; }
.bh-scan-foot { padding-top: var(--sp-2); color: var(--muted); text-align: center; }

/* 2. A cell the machine read and nobody has checked yet ("Chưa kiểm"): KIT_GAPS #2 */
.tbl-grid td.bh-unchecked { background: var(--warn-bg); box-shadow: inset 0 0 0 1px var(--warn-line); }
.tbl-grid td.bh-unchecked .cell-input { text-decoration: underline dotted var(--warn); text-underline-offset: 0.2em; }

/* 3. A reconciliation row that matches stays quiet, a row that differs stands out (Đối chiếu tự động, Đối chiếu ngân hàng): KIT_GAPS #3 */
.tbl tr.bh-quiet > * { color: var(--muted); }
.tbl tr.bh-quiet .tag { opacity: 0.85; }
.tbl tr.bh-loud > th, .tbl tr.bh-loud > td { font-weight: 600; }

/* 4. The tax portal's captcha picture with the box to type it: KIT_GAPS #4 */
.bh-captcha {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 10rem;
  min-height: var(--tap);
  padding: var(--sp-2) var(--sp-4);
  border: 1px solid var(--field-border);
  border-radius: var(--radius-sm);
  background: repeating-linear-gradient(-28deg, var(--sunk) 0 6px, var(--surface) 6px 12px);
  font-family: var(--font-heading);
  font-size: var(--fs-xl);
  font-weight: 700;
  letter-spacing: 0.32em;
  font-style: italic;
  color: var(--heading);
  user-select: none;
}
