/* NEW-157 — Xem nhanh nhóm "tien": Phiếu thu (receipts.js), Đề xuất chi (expenses.js).
   File RIÊNG của nhóm này (index.html đã nạp sẵn, sau peek.css). Lớp CSS tiền tố .qv-<màn>- (VD .qv-opp-, .qv-cl-); chỉ dùng biến màu của app.css
   (sáng + tối). Phần dùng chung cho mọi màn ⇒ ghi lại để bước gộp đưa vào peek.css, KHÔNG sửa peek.css ở đây. */

/* ---- Phiếu thu (.qv-rc-) ---- */
.qv-rc-content dd, .qv-rc-note dd, .qv-ex-note dd { display: block; white-space: pre-wrap; }   /* nội dung chuyển khoản / ghi chú nhiều dòng giữ xuống dòng */
.qv-rc-left dd { font-weight: 700; }
.qv-rc-bar { margin: 12px 0 0; }
.peek-receipts .qv-form > .qv-fields { margin: 0 0 14px; }   /* form Sửa: dòng "Nội dung chuyển khoản" (chỉ xem) tách khỏi ô Người chuyển */   /* thanh "đã phân bổ / đã hoàn" (lớp rc-bar của receipts.css) dưới khối Tiền */
/* Gợi ý khớp khách: điểm (màu của .rc-score trang phiếu, nhỏ lại) · khách + lý do · nút "Gán khách này" (xuống dòng khi bảng hẹp) */
.qv-rc-sugs li.qv-rc-sug { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; align-items: center; gap: 6px 10px; }
.qv-rc-sug .rc-score { width: 32px; height: 32px; font-size: 13px; }
.qv-rc-sb { min-width: 0; overflow-wrap: anywhere; }
.qv-rc-why { display: block; font-size: 13px; color: var(--ink); margin-top: 2px; }
.qv-rc-code { white-space: nowrap; }   /* mã dự án / báo giá không ngắt giữa "PJ-" / "000001" */
.qv-editing .qv-rc-sug .btn { display: none; }   /* đang sửa: thao tác (vẽ lại bảng) tạm ẩn — như .qv-acts */
@media (max-width: 479.98px) {
  .qv-rc-sugs li.qv-rc-sug { grid-template-columns: 32px minmax(0, 1fr); }
  .qv-rc-sug .btn { grid-column: 2; justify-self: start; }
}
@media (pointer: coarse) {
  .qv-rc-sug .btn { min-height: 44px; }
  /* link trong hộp tình trạng ("Phân bổ … ở trang đầy đủ ›") — đường duy nhất đi phân bổ: vùng chạm 44 px (lõi peek.css mới nâng .qv-f dd a, .qv-more) */
  .peek-receipts .qv-links a, .peek-expense-requests .qv-links a { display: inline-flex; align-items: center; min-height: 44px; }
}

/* ---- Đề xuất chi (.qv-ex-) ---- */
.qv-ex-total dd { font-weight: 700; }
.qv-ex-ln { font-weight: 600; }
.qv-ex-sub { font-size: 13px; color: var(--muted); }
/* Ô "Dự án": tên link + mã (một dự án) hoặc nhiều dự án nối <br> — KHÔNG để dd flex chia thành cột; mã không ngắt giữa "PJ-" / "000001" */
.qv-ex-proj dd { display: block; }
.qv-ex-proj dd .muted { white-space: nowrap; }

/* ---- Form sửa: ô nhiều dòng (ghi chú) chiếm cả hàng, cao vừa đủ ---- */
.peek-receipts .qv-form .field:has(textarea), .peek-expense-requests .qv-form .field:has(textarea) { grid-column: 1 / -1; }
.peek-receipts .qv-form textarea, .peek-expense-requests .qv-form textarea { width: 100%; min-height: 72px; resize: vertical; }
@media (max-width: 767.98px), (pointer: coarse) {
  .peek-receipts .qv-form textarea, .peek-expense-requests .qv-form textarea,
  .peek-expense-requests .qv-form input[type=date] { font-size: 16px; min-height: 44px; }   /* iOS không phóng to khi chạm; vùng bấm 44 px */
}

/* ---- Thanh bước: bảng hẹp (điện thoại, máy tính bảng dọc: bảng ~500 px) + nhãn dài ("Đã phân bổ một phần", "Chờ kế toán duyệt", 5 bước khi bị
   trả về) ⇒ nhãn xuống dòng trong ô thay vì bị cắt mất bước hiện tại. Rộng đủ thì vẫn một dòng như trang đầy đủ. ---- */
.peek-receipts .qv-stb .fv-stb, .peek-expense-requests .qv-stb .fv-stb { height: auto; min-height: 32px; }
.peek-receipts .qv-stb .fv-stb .path-step, .peek-expense-requests .qv-stb .fv-stb .path-step {
  flex: 1 1 auto; min-width: min-content; justify-content: center; padding: 5px 16px 5px 20px; line-height: 1.25; text-align: center; white-space: normal; }
/* Nhãn một từ ("Nháp") từng bị cắt còn "Nhá": mũi tên ::after (hình thoi đặc, nền của bước) lấn ~15 px vào mép phải của chính bước đó ⇒
   chừa padding-right ≥ 15 px (trừ bước cuối — không có mũi tên); min-width: min-content (form_view.css đặt 0) ⇒ ô không hẹp hơn từ dài nhất. */
.peek-receipts .qv-stb .fv-stb .path-step:last-child, .peek-expense-requests .qv-stb .fv-stb .path-step:last-child { padding-right: 12px; }
@media (max-width: 767.98px) {
  .peek-receipts .qv-stb .fv-stb .path-step, .peek-expense-requests .qv-stb .fv-stb .path-step { padding: 4px 15px 4px 14px; font-size: 12px; }
  .peek-receipts .qv-stb .fv-stb .path-step:first-child, .peek-expense-requests .qv-stb .fv-stb .path-step:first-child { padding-left: 8px; }
  .peek-receipts .qv-stb .fv-stb .path-step:last-child, .peek-expense-requests .qv-stb .fv-stb .path-step:last-child { padding-right: 8px; }
}
