/* Trang "Hoá đơn": dùng lại khung của Chi phí thẻ (card-scroll, card-filters, card-msg, seg); chỉ thêm phần riêng. */
.card-filters .btn[disabled] { cursor: default; }
.inv-pdf { font: inherit; font-size: 11px; font-weight: 600; padding: 1px 9px; border: 0; border-radius: 999px; background: var(--blue-s); color: var(--blue); cursor: pointer; }
.inv-pdf + .inv-pdf { margin-left: 4px; }
.inv-pdf:hover, .inv-pdf:focus-visible { background: var(--blue-d); outline: none; }
.inv-nopdf { font-size: 11px; }
.inv-txn { display: inline-block; font-size: 12px; color: var(--ink-2); text-decoration: none; font-variant-numeric: tabular-nums; }
.inv-txn:hover, .inv-txn:focus-visible { color: var(--ink); text-decoration: underline; outline: none; }
.inv-txn.is-matched { color: var(--green); font-weight: 600; }
.inv-lone { font-size: 10.5px; color: var(--orange); font-weight: 600; }
.inv-doc { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; font-size: 12px; font-variant-numeric: tabular-nums; }
.inv-doc + .inv-doc { margin-top: 4px; }
.inv-fx { font-size: 10.5px; color: var(--ink-3); display: block; }
.inv-doc .inv-fx { display: inline; }

/* Dòng Lệch: viền cam bên trái + dòng con giải thích lệch ở đâu */
.inv-grid tr.is-mismatch > td:first-child { box-shadow: inset 3px 0 var(--orange); }
.inv-grid tr.is-missing > td:first-child { box-shadow: inset 3px 0 var(--red); }
.inv-grid tr.is-mismatch:has(+ .inv-why-row) > td { border-bottom: 0; padding-bottom: 4px; }
.inv-why-row > td { padding-top: 0; box-shadow: inset 3px 0 var(--orange); }
.inv-why { list-style: none; margin: 0; padding: 8px 12px; background: var(--orange-s, rgba(255, 149, 0, 0.08)); border-radius: 8px; font-size: 12px; white-space: normal; }
.inv-why > li + li { margin-top: 6px; }
.inv-why ul { margin: 2px 0 0; padding-left: 18px; color: var(--ink-2); }
.inv-why ul li { line-height: 1.5; }

/* Danh sách hoá đơn đã nhận */
.inv-no { display: block; font-size: 11px; }
.inv-mail { max-width: 300px; }
.inv-mail span, .inv-mail small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.inv-match { min-width: 190px; max-width: 280px; }
.inv-reason { display: block; margin-top: 3px; font-size: 11px; color: var(--ink-2); white-space: normal; line-height: 1.4; }

/* Hộp thoại xem PDF */
.inv-viewer { width: min(1000px, calc(100vw - 32px)); height: calc(100dvh - 48px); padding: 0; border: 1px solid var(--line); border-radius: 14px;
  background: var(--win); color: var(--ink); box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3); display: none; flex-direction: column; overflow: hidden; }
.inv-viewer[open] { display: flex; }
.inv-viewer::backdrop { background: rgba(0, 0, 0, 0.45); }
.inv-viewer-head { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; padding: 10px 12px 10px 16px; border-bottom: 1px solid var(--line); }
.inv-viewer-title { flex: 1 1 240px; min-width: 0; font-size: 13px; }
.inv-viewer-title small { display: block; font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.inv-viewer-acts { display: flex; align-items: center; gap: 6px; }
.inv-viewer-acts .insp-close { position: static; font-size: 22px; }
.inv-viewer-body { flex: 1; min-height: 0; display: grid; place-items: center; background: var(--seg-bg); }
.inv-viewer-body iframe { width: 100%; height: 100%; border: 0; background: #fff; }
.inv-viewer-body .is-bad { color: var(--red); }
@media (max-width: 720px) {
  .inv-mail { max-width: 160px; }
  .inv-viewer { width: 100vw; height: 100dvh; max-width: none; max-height: none; border-radius: 0; }
}
