/* Kết quả đối soát — DÙNG CHUNG app (/reconciliation) và Partner (/b/:shopId/reconcile), đi cùng user/public/js/reconcileView.js.
   Chỉ cấu trúc riêng của khối kết quả; khung/thẻ/bảng/nút dùng ui-* (user/public/css/ui.css) + token. */
/* Nhãn kênh đứng đầu mỗi khối — tên kênh thuần text (dự án không dùng icon kênh),
   nền brand cho "Tổng cộng", nền trung tính cho từng sàn. */
.channel-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.channel-badge { font-weight: 800; font-size: var(--fs-lg); padding: 4px 14px; border-radius: var(--ui-r-inner); background: var(--ui-surface-2); color: var(--ui-text); border: 1px solid var(--ui-line); }
.channel-badge.badge-total { background: var(--brand-primary); color: var(--ui-on-brand); border-color: var(--brand-primary); }

/* Nhãn loại đơn trong bảng danh sách (nhiều nhãn / 1 ô) — sắc thái ngữ nghĩa từ .ui-badge */
.type-tag { margin-right: 3px; }

/* Cây phễu đơn hàng (Khách tạo → ship → giao → hoàn/thành công): dòng thụt lề theo cấp */
.funnel { border: 1px solid var(--ui-line-soft); border-radius: var(--ui-r-inner); overflow: hidden; }
.funnel-row { display: flex; justify-content: space-between; align-items: center; padding: 6px 14px; border-bottom: 1px solid var(--ui-line-soft); }
.funnel-row.d0 { background: var(--ui-surface-2); padding-left: 14px; }
.funnel-row.d1 { padding-left: 40px; }
.funnel-row.d2 { padding-left: 66px; }
.funnel-row.d3 { padding-left: 92px; }
.funnel-row.d4 { padding-left: 118px; }
.funnel-row strong { font-variant-numeric: tabular-nums; }
.funnel-row .lbl { font-weight: 500; }
.funnel-row .lbl.b { font-weight: 800; }
.funnel-row .sub { color: var(--ui-muted-2); font-weight: 400; font-size: var(--fs-xs); }
.funnel-row .branch { color: var(--ui-muted-2); }

/* Dòng lý do "chưa đối soát xong" + dòng theo shop — bấm mở danh sách đơn */
.recon-reason { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 14px; border-bottom: 1px solid var(--ui-line-soft); cursor: pointer; }
.recon-reason:hover { background: rgba(var(--brand-primary-rgb), 0.04); }
.recon-reason .amt { font-variant-numeric: tabular-nums; }
/* Vượt hạn mức (Partner có trần) — không bấm mở được, chỉ lời nhắc + nút mua thêm */
.recon-over { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 14px; border-bottom: 1px solid var(--ui-line-soft); }
.recon-over .amt { font-variant-numeric: tabular-nums; display: inline-flex; align-items: center; gap: 8px; }
.recon-caret { color: var(--ui-muted-2); font-size: 0.8em; }
.recon-shop-box { margin: 0 0 10px; border: 1px solid var(--ui-line-soft); border-radius: var(--ui-r-inner); overflow: hidden; }
.recon-shop-box .hd { padding: 8px 14px; background: var(--ui-surface-2); color: var(--ui-muted); font-weight: 700; font-size: var(--fs-sm); }
.recon-shop-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 7px 14px; border-bottom: 1px solid var(--ui-line-soft); }
.recon-shop-row .amt { font-variant-numeric: tabular-nums; }
.recon-shop-row .reason-inline { margin-left: 12px; }
.recon-reason .amt strong + strong, .recon-shop-row .amt strong + strong { margin-left: 14px; }
.sum-lead { font-weight: 800; color: var(--ui-text); }

/* Khối "tiền đã về": 2–3 ô số nằm ngang */
.cash-tiles { display: flex; gap: 10px; flex-wrap: wrap; }
.cash-tile { flex: 1; min-width: 150px; padding: 10px 14px; border: 1px solid var(--ui-line-soft); border-radius: var(--ui-r-inner); }
.cash-tile .t { color: var(--ui-muted); font-size: var(--fs-xs); font-weight: 700; }
.cash-tile .v { font-size: var(--fs-lg); font-weight: 800; font-variant-numeric: tabular-nums; }
.cash-tile .s { color: var(--ui-muted-2); font-size: var(--fs-xs); }

/* Hàng lọc loại đơn trong card danh sách đơn */
.tf { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-base); color: var(--ui-text); cursor: pointer; user-select: none; }
.tf input { width: 16px; height: 16px; cursor: pointer; accent-color: var(--brand-primary); }
.tf-cnt { color: var(--brand-primary); font-weight: 800; }
.tf-row { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin: 4px 0 14px; padding-bottom: 12px; border-bottom: 1px dashed var(--ui-line); }

/* Bảng chỉ 2 cột (bảng phí) — không cần kéo hết chiều ngang card */
.fee-table td:last-child, .fee-table th:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.fee-table tr.total > td { font-weight: 800; background: var(--ui-surface-2); }
/* Header bảng bấm được để sắp xếp (dựng động trong JS) */
.srt, .rsort { cursor: pointer; user-select: none; white-space: nowrap; }
.srt.on, .rsort.on { color: var(--brand-primary); }
.srt .tip { cursor: help; opacity: .55; font-size: 0.82em; margin-left: 3px; }
.srt .car { font-size: 0.8em; opacity: .35; }
.srt.on .car, .rsort.on .car { opacity: 1; }
.recon-list { display: none; }
.cell-mono { font-family: var(--font-mono); }
.col-lost { min-width: 150px; }
.search-line { margin: 0 0 12px; }
.search-line .ui-search { display: inline-block; width: 100%; max-width: 360px; vertical-align: middle; }
