/* Báo cáo doanh thu (revenue.js) — dùng lại thanh lọc / thẻ số / tab của Hoa hồng (commissions.css). */
#appView .rv-bar .rv-xlsx { margin-left:auto; }
/* 16/11: ô vừa khít nội dung — bỏ chia đều 4 cột (ô ngắn để trống, ô dài bị xuống dòng giữa chừng, zoom càng to càng loạn). */
#appView .rv-stats { display:flex; flex-wrap:wrap; align-items:center; gap:4px 0; }
#appView .rv-stats .hub-stat { flex:0 0 auto; }
#appView .rv-stats .hub-stat small { white-space:nowrap; }
#appView .rv-stats .hub-stat small { font-size:12px; color:#6F655A; }
#appView .rv-table td.r, #appView .rv-table th.r { text-align:right; white-space:nowrap; font-variant-numeric:tabular-nums; }
#appView .rv-table td.b { font-weight:700; }
/* Cột số: tiêu đề căn giữa, khối số (rv-n, cùng bề rộng trong cột — revenue.js alignCols) nằm giữa ô, số căn phải trong khối.
   Cột chữ (Mặt hàng, Sales, Phòng, Tháng): tiêu đề căn trái theo chữ bên dưới. */
#appView .hh-box .rv-table thead th.r, #appView .hh-box .rv-table td.r { text-align:center; }
#appView .hh-box .rv-table thead th.l { text-align:left; }
#appView .rv-table .rv-n { display:inline-block; text-align:right; }
#appView .rv-table tr.rv-group, #appView .rv-table tr[data-sale], #appView .rv-table tr[data-month] { cursor:pointer; }
#appView .rv-table tr.rv-group td { background:#FBF7F1; }
#appView .rv-table tr.rv-group:hover td, #appView .rv-table tr[data-sale]:hover td, #appView .rv-table tr[data-month]:hover td { background:#F5EDE1; }
#appView .rv-caret { display:inline-block; width:16px; color:#a9783a; }
#appView .rv-table tr.rv-item td.l { padding-left:34px; color:#3f3a33; }
#appView .rv-table tfoot td { font-weight:700; }
/* Chi tiết một Sales (xổ dưới dòng): phiếu lập trong kỳ + khoản thu trong kỳ. */
#appView .rv-table tr.rv-detail > td { padding:4px 16px 18px 34px; background:#fff; cursor:default; }
#appView .rv-detail-box h4 { margin:14px 0 8px; font-size:13px; font-weight:700; color:#25211C; }
#appView .rv-detail-box .rv-none { margin:0; font-size:13px; color:#6F655A; }
#appView .rv-sub { width:100%; border-collapse:collapse; font-size:13px; border:1px solid #EFE9DD; border-radius:8px; }
#appView .rv-sub th { padding:7px 10px; background:#FBF7F1; color:#6F655A; font-weight:600; text-align:left; white-space:nowrap; border-bottom:1px solid #EFE9DD; }
#appView .rv-sub td { padding:7px 10px; border-bottom:1px solid #F3EEE6; vertical-align:top; }
#appView .hh-box .rv-sub th.rv-amt, #appView .hh-box .rv-sub td.rv-amt { text-align:center; white-space:nowrap; font-variant-numeric:tabular-nums; }
#appView .rv-sub .nw { white-space:nowrap; }
#appView .rv-sub .rv-svc { min-width:220px; color:#3f3a33; }
#appView .rv-sub tfoot td { font-weight:700; background:#FBF7F1; border-bottom:0; }
#appView .rv-link { padding:0; border:0; background:none; min-height:0; color:#a9783a; font:inherit; font-weight:600; text-decoration:underline; cursor:pointer; }
@media (max-width: 760px) {
  #appView .rv-stats { gap:2px 0; }
  #appView .rv-bar .rv-xlsx { margin-left:0; }
  #appView .rv-table td.l, #appView .rv-table th.l { white-space:nowrap; }
}

/* Nâng cấp Báo cáo doanh thu (15/11/2026): chip chọn nhanh kỳ, nhãn so sánh kỳ trước, thanh tỷ trọng ngay trong ô Doanh thu. */
#appView .rv-quick { display: flex; gap: 6px; flex-wrap: wrap; margin: 2px 0 14px; }
#appView .rv-quick button { min-height: 32px; padding: 0 14px; border: 1px solid #E4DACA; border-radius: 999px; background: #fff; color: #6F655A; font-size: 12.5px; font-weight: 600; cursor: pointer; transition: border-color .15s ease, background .15s ease, color .15s ease; }
#appView .rv-quick button:hover { border-color: #CDBFA4; color: #8a5f2a; }
#appView .rv-quick button.is-on { background: #a9783a; border-color: #a9783a; color: #fff; }
#appView .rv-stats .hub-stat small .rv-delta { font-weight: 700; }
#appView .rv-stats .hub-stat small .rv-delta.up { color: #1F5E2E; }
#appView .rv-stats .hub-stat small .rv-delta.down { color: #9B2F23; }
#appView .rv-stats .hub-stat small .rv-delta-ref { color: #9A9186; }
/* customers.css có quy tắc không gắn #appView ".hub-stat span { display:block; margin-bottom:8px }" — bắt cả span delta này
   thành block riêng dòng, làm cụm so sánh kỳ trước vỡ 3 dòng (lỗi Chủ dự án 16/11). Ép lại inline. */
#appView .rv-stats .hub-stat small .rv-delta, #appView .rv-stats .hub-stat small .rv-delta-ref { display: inline; margin: 0; font-size: inherit; }
/* Thanh tỷ trọng ngay trong ô Doanh thu (thay biểu đồ rời — Chủ dự án 15/11): số là chính,
   thanh mảnh phía dưới = tỷ lệ so với dòng lớn nhất của bảng, kèm % so với tổng. */
#appView .rv-table .rv-n { text-align: right; }
#appView .rv-share { display: block; font-size: 11px; font-weight: 600; color: #9A9186; }
#appView .rv-meter { display: block; width: 100%; min-width: 72px; height: 4px; margin-top: 3px; border-radius: 99px; background: #F3EEE6; overflow: hidden; }
#appView .rv-meter i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #c4955a, #a9783a); }
#appView .rv-table tr:hover .rv-meter i { background: linear-gradient(90deg, #a9783a, #8a5f2a); }
