/* ═══════════════════════════════════════════════════════════════════
   LỊCH SỬ BILL — module POS (dựng lại 15/10/2026 theo mockup
   docs/POS/POS Lich su bill.html). Tiền tố `pbh-`; token khai trên `.pbh`.
   CSS CẤP MODULE dùng chung cho Lịch sử bill · Danh sách order · Thu ngân (15/10/2026).
   Mọi selector nằm dưới `.pbh` ⇒ ⛔ đụng class toàn cục. Khai ở App.razor kèm ?v=.
   ═══════════════════════════════════════════════════════════════════ */
.pbh {
    --pbh-bg: var(--ez-bg, #f8f6f0);
    --pbh-card: #fffdf9;
    --pbh-line: #ece6d9;
    --pbh-line-2: #e2d9c6;
    --pbh-soft: #f1ece2;
    --pbh-ink: #2a2620;
    --pbh-mute: #7a7264;
    --pbh-faint: #a69e8f;
    --pbh-gold: #9a6514;
    --pbh-gold-soft: #f6ead3;
    --pbh-green: #3f6b4e;
    --pbh-red: #b0443f;
    background: var(--pbh-bg);
    color: var(--pbh-ink);
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 14px;
    min-height: 100%;
    padding: 24px 28px 36px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.pbh .pbh-head { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.pbh .pbh-title { flex: 1; min-width: 240px; display: flex; flex-direction: column; gap: 4px; }
.pbh .pbh-title h1 { margin: 0; font-size: 26px; font-weight: 700; letter-spacing: -.01em; }
.pbh .pbh-sub { font-size: 13.5px; color: var(--pbh-mute); }

.pbh .pbh-outlet {
    display: flex; flex-direction: column; gap: 1px;
    border: 1px solid var(--pbh-line-2); background: var(--pbh-card);
    border-radius: 10px; padding: 4px 10px 4px 12px; min-width: 200px; margin: 0;
}
.pbh .pbh-outlet-k { font-size: 10px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--pbh-faint); }
.pbh .pbh-outlet select { border: 0; background: transparent; font-size: 13.5px; font-weight: 600; color: var(--pbh-ink); padding: 0; outline: none; }

.pbh .pbh-btn {
    display: inline-flex; align-items: center; justify-content: center;
    height: 38px; padding: 0 16px; border: 1px solid var(--pbh-line-2); background: var(--pbh-card);
    border-radius: 10px; font-size: 13.5px; color: var(--pbh-ink); cursor: pointer; text-decoration: none; white-space: nowrap;
}
.pbh .pbh-btn:hover { background: #fbf6ec; color: var(--pbh-ink); }
.pbh .pbh-btn:disabled { opacity: .5; cursor: default; }
.pbh .pbh-btn.primary { background: var(--pbh-green); border-color: var(--pbh-green); color: #fff; font-weight: 600; }
.pbh .pbh-btn.primary:hover { background: #355c42; color: #fff; }
.pbh .pbh-btn.danger { color: var(--pbh-red); border-color: #e7c4c0; }
.pbh .pbh-btn.danger:hover { background: var(--pbh-red); color: #fff; }

/* ── Hộp lọc ── */
.pbh .pbh-filter {
    background: var(--pbh-card); border: 1px solid var(--pbh-line); border-radius: 14px;
    padding: 14px; display: flex; flex-direction: column; gap: 12px;
}
.pbh .pbh-row { display: flex; gap: 10px; align-items: center; }
.pbh .pbh-row.wrap { flex-wrap: wrap; gap: 8px; }
.pbh .pbh-row.dashed { border-top: 1px dashed var(--pbh-line); padding-top: 11px; min-height: 30px; }
.pbh .pbh-grow { flex: 1; }
.pbh .pbh-vsep { width: 1px; height: 22px; background: var(--pbh-line-2); margin: 0 2px; }
.pbh .pbh-lbl { font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--pbh-faint); }

.pbh .pbh-search-wrap { position: relative; flex: 1; min-width: 0; }
.pbh .pbh-search {
    display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 12px;
    border: 1.5px solid var(--pbh-line-2); border-radius: 11px; background: #fff;
}
.pbh .pbh-search.focus { border-color: #c98a2e; box-shadow: 0 0 0 3px rgba(201, 138, 46, .15); }
.pbh .pbh-search-ico { width: 13px; height: 13px; border: 2px solid #9a8f7c; border-radius: 50%; flex: none; }
.pbh .pbh-search input { flex: 1; min-width: 0; border: 0; outline: none; font-size: 14.5px; background: none; color: var(--pbh-ink); }
.pbh .pbh-search input::placeholder { color: var(--pbh-faint); }
.pbh .pbh-x {
    border: 0; background: var(--pbh-soft); width: 24px; height: 24px; border-radius: 50%;
    cursor: pointer; color: var(--pbh-mute); font-size: 15px; line-height: 1; flex: none;
}
.pbh .pbh-sug {
    position: absolute; top: 52px; left: 0; right: 0; z-index: 30;
    background: #fff; border: 1px solid var(--pbh-line); border-radius: 12px;
    box-shadow: 0 18px 40px rgba(60, 40, 10, .16); padding: 10px;
    display: grid; grid-template-columns: 1fr 1fr; gap: 14px;
}
.pbh .pbh-sug-col { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pbh .pbh-sug-h { font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--pbh-faint); padding: 2px 8px 6px; }
.pbh .pbh-sug-i {
    display: flex; gap: 10px; align-items: center; padding: 7px 8px; border: 0; background: none;
    border-radius: 8px; cursor: pointer; text-align: left; font-size: 13px; color: var(--pbh-ink);
}
.pbh .pbh-sug-i:hover { background: #f8f3e9; }
.pbh .pbh-sug-i code { font-family: 'JetBrains Mono', monospace; font-size: 12px; color: var(--pbh-gold); background: var(--pbh-gold-soft); padding: 1px 6px; border-radius: 5px; }
.pbh .pbh-sug-i span { color: var(--pbh-mute); }
.pbh .pbh-sug-empty { font-size: 12.5px; color: var(--pbh-faint); padding: 4px 8px; }

.pbh .pbh-seg { display: flex; background: var(--pbh-soft); border-radius: 10px; padding: 3px; gap: 2px; flex: none; }
.pbh .pbh-seg button {
    border: 0; background: none; height: 36px; padding: 0 12px; border-radius: 8px;
    font-size: 13px; color: var(--pbh-mute); cursor: pointer; white-space: nowrap;
}
.pbh .pbh-seg button.on { background: #fff; color: var(--pbh-ink); font-weight: 600; box-shadow: 0 1px 2px rgba(60, 40, 10, .12); }
.pbh .pbh-range { display: flex; align-items: center; gap: 6px; flex: none; color: var(--pbh-mute); }
.pbh .pbh-range input {
    height: 40px; border: 1px solid var(--pbh-line-2); border-radius: 10px; background: #fff;
    padding: 0 8px; font-size: 13px; color: var(--pbh-ink);
}

.pbh .pbh-chip {
    display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px;
    border: 1px solid var(--pbh-line-2); background: #fff; border-radius: 999px;
    font-size: 13px; color: var(--pbh-ink); cursor: pointer; white-space: nowrap;
}
.pbh .pbh-chip b { font-weight: 600; color: var(--pbh-faint); }
.pbh .pbh-chip .dot { width: 7px; height: 7px; border-radius: 50%; }
.pbh .pbh-chip.on { background: var(--pbh-ink); border-color: var(--pbh-ink); color: #fff; }
.pbh .pbh-chip.on b { color: rgba(255, 255, 255, .7); }
.pbh .pbh-chip.m { border-radius: 8px; }
.pbh .pbh-sort { height: 34px; border: 1px solid var(--pbh-line-2); border-radius: 9px; background: #fff; padding: 0 8px; font-size: 13px; color: var(--pbh-ink); }

.pbh .pbh-preset {
    display: inline-flex; gap: 5px; align-items: center; height: 28px; padding: 0 10px;
    border: 1px dashed var(--pbh-line-2); background: transparent; border-radius: 8px;
    font-size: 12.5px; color: var(--pbh-mute); cursor: pointer;
}
.pbh .pbh-preset:hover { border-style: solid; color: var(--pbh-ink); background: #fff; }
.pbh .pbh-preset b { color: var(--pbh-faint); font-weight: 600; }
.pbh .pbh-active {
    display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 4px 0 10px;
    background: var(--pbh-gold-soft); color: var(--pbh-gold); border-radius: 8px; font-size: 12.5px; font-weight: 600;
}
.pbh .pbh-active button { border: 0; background: none; color: var(--pbh-gold); cursor: pointer; font-size: 15px; padding: 0 4px; }
.pbh .pbh-result { font-size: 12.5px; color: var(--pbh-mute); }
.pbh .pbh-link { border: 0; background: none; color: var(--pbh-gold); font-size: 13px; font-weight: 600; cursor: pointer; padding: 0; }

/* ── KPI ── */
.pbh .pbh-kpis {
    display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
    background: var(--pbh-card); border: 1px solid var(--pbh-line); border-radius: 14px;
}
.pbh .pbh-kpi { padding: 14px 18px; border-left: 1px solid var(--pbh-line); display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.pbh .pbh-kpi:first-child { border-left: 0; }
.pbh .pbh-kpi .k { font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--pbh-faint); }
.pbh .pbh-kpi .v { font-size: 26px; font-weight: 700; letter-spacing: -.01em; }
.pbh .pbh-kpi .v small { font-size: 13px; font-weight: 500; color: var(--pbh-mute); }
.pbh .pbh-kpi .v.warn { color: var(--pbh-red); }
.pbh .pbh-kpi .s { font-size: 12px; color: var(--pbh-mute); }

/* ── Danh sách + chi tiết ── */
.pbh .pbh-main { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-items: start; }
.pbh .pbh-main.has-detail { grid-template-columns: minmax(0, 1fr) 440px; }
.pbh .pbh-list { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.pbh .pbh-empty {
    background: var(--pbh-card); border: 1px dashed #d8ccb3; border-radius: 14px; padding: 48px 20px;
    text-align: center; display: flex; flex-direction: column; gap: 8px; align-items: center; color: var(--pbh-mute);
}
.pbh .pbh-empty .t { font-size: 16px; font-weight: 600; color: var(--pbh-ink); }

.pbh .pbh-day { background: var(--pbh-card); border: 1px solid var(--pbh-line); border-radius: 14px; overflow: hidden; }
.pbh .pbh-day-h { display: flex; align-items: center; gap: 10px; padding: 11px 18px; background: #f6efe1; border-bottom: 1px solid var(--pbh-line); }
.pbh .pbh-day-h .t { flex: 1; font-size: 14px; font-weight: 600; }
.pbh .pbh-day-h .m { font-size: 13px; color: var(--pbh-mute); }
.pbh .pbh-day-h .m b { color: var(--pbh-ink); }

.pbh .pbh-bill {
    display: grid; grid-template-columns: 4px 150px minmax(0, 1fr) 150px 130px 92px; gap: 14px;
    align-items: center; padding: 12px 18px 12px 0; border-bottom: 1px solid var(--pbh-soft); cursor: pointer;
}
.pbh .pbh-bill:last-child { border-bottom: 0; }
.pbh .pbh-bill:hover { background: #fbf6ec; }
.pbh .pbh-bill.sel { background: #fbf3e2; }
.pbh .pbh-bill .bar { align-self: stretch; }
.pbh .pbh-bill .no { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.pbh .pbh-bill .no .id { font-family: 'JetBrains Mono', monospace; font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pbh .pbh-bill .no .tm { font-size: 12px; color: #8a8170; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pbh .pbh-bill .who { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.pbh .pbh-bill .tags { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.pbh .pbh-bill .pos { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: #5a5346; background: var(--pbh-soft); padding: 2px 8px; border-radius: 5px; }
.pbh .pbh-bill .pos i { width: 7px; height: 7px; border-radius: 2px; display: inline-block; }
.pbh .pbh-bill .tbl { font-size: 12px; font-weight: 600; color: var(--pbh-gold); background: var(--pbh-gold-soft); padding: 2px 8px; border-radius: 5px; }
.pbh .pbh-bill .tbl.rm { color: #3d6a92; background: #dde8f2; }
.pbh .pbh-bill .gn { font-size: 13px; font-weight: 500; }
.pbh .pbh-bill .pv { font-size: 12.5px; color: var(--pbh-mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pbh .pbh-bill .mt { display: flex; gap: 4px; flex-wrap: wrap; }
.pbh .pbh-bill .mt .none { font-size: 12px; color: var(--pbh-faint); }
.pbh .pbh-bill .amt { text-align: right; display: flex; flex-direction: column; gap: 2px; }
.pbh .pbh-bill .amt span { font-size: 15px; font-weight: 700; }
.pbh .pbh-bill .amt span.void { text-decoration: line-through; color: var(--pbh-faint); }
.pbh .pbh-bill .amt small { font-size: 11.5px; color: var(--pbh-red); }

.pbh .pm { font-size: 11.5px; font-weight: 600; padding: 3px 7px; border-radius: 5px; white-space: nowrap; }
.pbh .pm.cash { color: #2f5a3d; background: #e3efe6; }
.pbh .pm.qr { color: #8a5a10; background: #f6ead3; }
.pbh .pm.card { color: #3d6a92; background: #dde8f2; }
.pbh .pm.tf { color: #604886; background: #e9e1f1; }
.pbh .pm.folio { color: #9c3f3a; background: #f6dedb; }
.pbh .pm.wallet { color: #6e4f36; background: #ebdfd1; }
.pbh .pm.other { color: #5a5346; background: var(--pbh-soft); }

.pbh .st { justify-self: end; font-size: 11.5px; font-weight: 600; padding: 4px 9px; border-radius: 999px; white-space: nowrap; }
.pbh .st.paid { color: #2f5a3d; background: #e3efe6; }
.pbh .st.closed { color: #4f6b58; background: #edf1ec; }
.pbh .st.partial { color: #3d6a92; background: #dde8f2; }
.pbh .st.open { color: #8a5a10; background: #f6ead3; }
.pbh .st.voided { color: var(--pbh-red); background: #f6dedb; }

.pbh .pbh-pager { display: flex; align-items: center; gap: 8px; justify-content: flex-end; font-size: 13px; color: var(--pbh-mute); }
.pbh .pbh-pager span { flex: 1; }
.pbh .pbh-pager button { height: 32px; padding: 0 12px; border: 1px solid var(--pbh-line-2); background: #fff; border-radius: 8px; cursor: pointer; font-size: 13px; }
.pbh .pbh-pager button:disabled { opacity: .45; cursor: default; }

/* ── Khung chi tiết ── */
.pbh .pbh-detail-back { display: none; }
.pbh .pbh-detail {
    position: sticky; top: 12px; background: var(--pbh-card); border: 1px solid var(--pbh-line);
    border-radius: 14px; overflow: hidden; display: flex; flex-direction: column;
    max-height: calc(100vh - 90px);
}
.pbh .pbh-detail .d-head { padding: 16px 18px; border-bottom: 1px solid var(--pbh-line); background: #fff; display: flex; flex-direction: column; gap: 10px; }
.pbh .pbh-detail .d-top { display: flex; align-items: center; gap: 10px; }
.pbh .pbh-detail .d-top .id { flex: 1; font-family: 'JetBrains Mono', monospace; font-size: 14px; font-weight: 700; }
.pbh .pbh-detail .d-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 5px 14px; font-size: 12.5px; color: var(--pbh-mute); }
.pbh .pbh-detail .d-grid b { color: var(--pbh-ink); font-weight: 600; margin-left: 4px; }
.pbh .pbh-detail .d-note { margin: 12px 18px 0; font-size: 12.5px; color: var(--pbh-gold); background: var(--pbh-gold-soft); border: 1px solid #ecd9b1; border-radius: 9px; padding: 8px 10px; }
.pbh .pbh-detail .d-body { overflow-y: auto; min-height: 0; }
.pbh .pbh-detail .d-sec { padding: 12px 18px; display: flex; flex-direction: column; gap: 4px; }
.pbh .pbh-detail .d-sec + .d-sec { border-top: 1px solid var(--pbh-soft); }
.pbh .pbh-detail .d-h { font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--pbh-faint); margin-bottom: 4px; }
.pbh .pbh-detail .muted { font-size: 13px; color: var(--pbh-faint); }
.pbh .pbh-detail .d-item { display: grid; grid-template-columns: minmax(0, 1fr) 40px 100px; gap: 8px; align-items: center; padding: 5px 0; }
.pbh .pbh-detail .d-item .n { display: flex; flex-direction: column; min-width: 0; font-size: 13.5px; }
.pbh .pbh-detail .d-item .n small { font-size: 11.5px; color: var(--pbh-faint); }
.pbh .pbh-detail .d-item .q { font-size: 13px; color: var(--pbh-mute); text-align: right; }
.pbh .pbh-detail .d-item .a { font-size: 13.5px; font-weight: 600; text-align: right; }
.pbh .pbh-detail .d-item.x { opacity: .5; text-decoration: line-through; }
.pbh .pbh-detail .d-sum { display: flex; justify-content: space-between; font-size: 13px; color: var(--pbh-mute); padding: 2px 0; }
.pbh .pbh-detail .d-sum.big { margin-top: 6px; padding-top: 8px; border-top: 1px solid var(--pbh-line); font-size: 15px; font-weight: 700; color: var(--pbh-ink); }
.pbh .pbh-detail .d-sum.big span:last-child { color: var(--pbh-gold); }
.pbh .pbh-detail .d-sum.due { color: var(--pbh-red); font-weight: 600; }
.pbh .pbh-detail .d-pay { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--pbh-line); border-radius: 9px; background: #fff; }
.pbh .pbh-detail .d-pay .ref { flex: 1; font-size: 12px; color: var(--pbh-mute); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pbh .pbh-detail .d-tl { display: grid; grid-template-columns: 40px 10px 1fr; gap: 8px; align-items: start; padding: 3px 0; font-size: 12.5px; }
.pbh .pbh-detail .d-tl .t { color: var(--pbh-faint); font-family: 'JetBrains Mono', monospace; font-size: 12px; }
.pbh .pbh-detail .d-tl i { width: 8px; height: 8px; border-radius: 50%; margin-top: 5px; display: inline-block; }
.pbh .pbh-detail .d-foot { display: flex; gap: 8px; padding: 12px 18px; border-top: 1px solid var(--pbh-line); background: #fbf8f1; }
.pbh .pbh-detail .d-foot .pbh-btn { flex: 1; }

/* ── Màn hẹp: khung chi tiết thành tấm trượt từ đáy ── */
@media (max-width: 1180px) {
    .pbh .pbh-main.has-detail { grid-template-columns: minmax(0, 1fr); }
    .pbh .pbh-detail-back { display: block; position: fixed; inset: 0; background: rgba(42, 33, 24, .35); z-index: 1100; }
    .pbh .pbh-detail {
        position: fixed; left: 0; right: 0; bottom: 0; top: auto; z-index: 1101;
        max-height: 88vh; border-radius: 16px 16px 0 0;
    }
}

@media (max-width: 959px) {
    .pbh { padding: 14px 14px 90px; gap: 12px; }
    .pbh .pbh-title h1 { font-size: 22px; }
    .pbh .pbh-sub { display: none; }
    .pbh .pbh-head > .pbh-btn { display: none; }
    .pbh .pbh-outlet { flex: 1; }
    .pbh .pbh-filter > .pbh-row:first-child { flex-wrap: wrap; }
    .pbh .pbh-search-wrap { flex-basis: 100%; }
    .pbh .pbh-search input { font-size: 16px; }
    .pbh .pbh-sug { grid-template-columns: 1fr; }
    .pbh .pbh-range { display: none; }
    .pbh .pbh-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .pbh .pbh-kpi:nth-child(3) { border-left: 0; }
    .pbh .pbh-kpi:nth-child(n+3) { border-top: 1px solid var(--pbh-line); }
    .pbh .pbh-kpi .v { font-size: 21px; }
    .pbh .pbh-bill { grid-template-columns: 4px minmax(0, 1fr) auto; gap: 4px 10px; padding: 10px 12px 10px 0; }
    .pbh .pbh-bill .bar { grid-column: 1; grid-row: 1 / 4; }
    .pbh .pbh-bill .no { grid-column: 2; grid-row: 1; }
    .pbh .pbh-bill .amt { grid-column: 3; grid-row: 1; }
    .pbh .pbh-bill .who { grid-column: 2 / 4; grid-row: 2; }
    .pbh .pbh-bill .mt { grid-column: 2; grid-row: 3; }
    .pbh .pbh-bill .st { grid-column: 3; grid-row: 3; }
    .pbh .pbh-detail .d-foot { padding-bottom: calc(12px + env(safe-area-inset-bottom)); }
}

/* ═══ Trạng thái order (Danh sách order) ═══ */
.pbh .st.new { color: #8a5a10; background: #f6ead3; }
.pbh .st.serving { color: #3d6a92; background: #dde8f2; }
.pbh .st.done { color: #2f5a3d; background: #e3efe6; }
.pbh .st.cancelled { color: var(--pbh-red); background: #f6dedb; }

/* ═══ Dòng order ═══ */
.pbh .pbh-ord-wrap { border-bottom: 1px solid var(--pbh-soft); }
.pbh .pbh-ord-wrap:last-child { border-bottom: 0; }
.pbh .pbh-ord-wrap.open { background: #fbf6ec; }
.pbh .pbh-ord {
    display: grid; grid-template-columns: 4px 150px minmax(0, 1fr) 56px 110px 150px 150px; gap: 14px;
    align-items: center; padding: 12px 18px 12px 0; cursor: pointer;
}
.pbh .pbh-ord:hover { background: #fbf6ec; }
.pbh .pbh-ord .bar { align-self: stretch; }
.pbh .pbh-ord .no { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.pbh .pbh-ord .no .id { font-family: 'JetBrains Mono', monospace; font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pbh .pbh-ord .no .tm { font-size: 12px; color: #8a8170; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pbh .pbh-ord .who { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.pbh .pbh-ord .tags { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.pbh .pbh-ord .pos { font-size: 12px; color: #5a5346; background: var(--pbh-soft); padding: 2px 8px; border-radius: 5px; }
.pbh .pbh-ord .tbl, .pbh .pbh-pay .tbl { font-size: 12px; font-weight: 600; color: var(--pbh-gold); background: var(--pbh-gold-soft); padding: 2px 8px; border-radius: 5px; white-space: nowrap; }
.pbh .pbh-ord .gn, .pbh .pbh-pay .gn { font-size: 13px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pbh .pbh-ord .pv { font-size: 12.5px; color: var(--pbh-mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pbh .pbh-ord .qty { font-size: 12.5px; color: var(--pbh-mute); text-align: right; white-space: nowrap; }
.pbh .pbh-ord .amt, .pbh .pbh-pay .amt { text-align: right; }
.pbh .pbh-ord .amt span, .pbh .pbh-pay .amt span { font-size: 15px; font-weight: 700; }
.pbh .pbh-ord .amt span.void { text-decoration: line-through; color: var(--pbh-faint); }
.pbh .pbh-ord .stw { display: flex; gap: 6px; align-items: center; }
.pbh .pbh-ord .age { font-size: 12px; color: var(--pbh-mute); }
.pbh .pbh-ord .age.late { color: var(--pbh-red); font-weight: 600; }
.pbh .pbh-ord .act { justify-self: end; text-align: right; }
.pbh .pbh-ord .note { font-size: 12.5px; color: var(--pbh-mute); text-decoration: none; }
.pbh .pbh-ord .note.warn { color: var(--pbh-gold); font-weight: 600; }
.pbh .pbh-ord .note.mute { color: var(--pbh-faint); }
.pbh .pbh-billlink {
    display: inline-flex; align-items: center; height: 30px; padding: 0 10px; border: 1px solid var(--pbh-line-2);
    border-radius: 8px; background: #fff; font-family: 'JetBrains Mono', monospace; font-size: 12px; color: var(--pbh-ink);
    text-decoration: none; white-space: nowrap;
}
.pbh .pbh-billlink:hover { border-color: #c98a2e; color: var(--pbh-gold); }
.pbh .pbh-ord-x { padding: 0 18px 12px 168px; display: flex; flex-direction: column; gap: 2px; }
.pbh .pbh-ord-x .ln { display: grid; grid-template-columns: minmax(0, 1fr) 60px 50px 110px; gap: 10px; font-size: 13px; padding: 4px 0; border-bottom: 1px dashed var(--pbh-line); }
.pbh .pbh-ord-x .ln:last-child { border-bottom: 0; }
.pbh .pbh-ord-x .ln .r { font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--pbh-faint); }
.pbh .pbh-ord-x .ln .q { color: var(--pbh-mute); text-align: right; }
.pbh .pbh-ord-x .ln b { text-align: right; }
.pbh .pbh-ord-x .ln.x { opacity: .5; text-decoration: line-through; }
.pbh .pbh-ord-x .muted { font-size: 12.5px; color: var(--pbh-faint); padding: 4px 0; }

/* ═══ Thu ngân: khối tiền vào két + thẻ phương thức ═══ */
.pbh .pbh-cash-top { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 2fr); gap: 14px; }
.pbh .pbh-cash-hero {
    background: var(--pbh-green); color: #fff; border-radius: 14px; padding: 22px 24px;
    display: flex; flex-direction: column; gap: 6px; justify-content: space-between;
}
.pbh .pbh-cash-hero .k { font-size: 11.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; opacity: .8; }
.pbh .pbh-cash-hero .v { font-size: 48px; font-weight: 700; letter-spacing: -.02em; line-height: 1; }
.pbh .pbh-cash-hero .v small { font-size: 16px; font-weight: 500; opacity: .8; margin-left: 4px; }
.pbh .pbh-cash-hero .s { font-size: 12.5px; opacity: .9; }
.pbh .pbh-cash-hero .g { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; padding-top: 12px; margin-top: 8px; border-top: 1px solid rgba(255, 255, 255, .18); }
.pbh .pbh-cash-hero .g small { display: block; font-size: 10.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; opacity: .75; }
.pbh .pbh-cash-hero .g b { font-size: 18px; }
.pbh .pbh-mcards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.pbh .pbh-mcard {
    text-align: left; border: 1.5px solid var(--pbh-line); background: var(--pbh-card); border-radius: 12px; padding: 12px 14px;
    display: flex; flex-direction: column; gap: 6px; cursor: pointer; min-width: 0; font: inherit; color: inherit;
}
.pbh .pbh-mcard:hover { border-color: var(--pbh-line-2); background: #fff; }
.pbh .pbh-mcard.on { border-color: #c98a2e; background: #fff; }
.pbh .pbh-mcard.zero { opacity: .55; }
.pbh .pbh-mcard .h { display: flex; gap: 6px; align-items: center; font-size: 12px; color: var(--pbh-faint); }
.pbh .pbh-mcard .v { font-size: 21px; font-weight: 700; }
.pbh .pbh-mcard .track { display: block; height: 5px; background: var(--pbh-soft); border-radius: 3px; overflow: hidden; }
.pbh .pbh-mcard .track span { display: block; height: 5px; border-radius: 3px; }
.pbh .pbh-mcard .s { font-size: 12px; color: var(--pbh-mute); }

/* ═══ Dòng một lần thu ═══ */
.pbh .pbh-pay {
    display: grid; grid-template-columns: 4px 48px 120px 150px minmax(0, 1fr) minmax(0, 150px) 110px 110px; gap: 12px;
    align-items: center; padding: 11px 18px 11px 0; border-bottom: 1px solid var(--pbh-soft); cursor: pointer;
}
.pbh .pbh-pay:last-child { border-bottom: 0; }
.pbh .pbh-pay:hover { background: #fbf6ec; }
.pbh .pbh-pay.sel { background: #fbf3e2; }
.pbh .pbh-pay .bar { align-self: stretch; }
.pbh .pbh-pay .tm { font-family: 'JetBrains Mono', monospace; font-size: 12.5px; color: var(--pbh-mute); }
.pbh .pbh-pay .id { font-family: 'JetBrains Mono', monospace; font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pbh .pbh-pay .mt { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; }
.pbh .pbh-pay .split { font-size: 11px; font-weight: 600; color: #604886; background: #efe8f6; padding: 2px 6px; border-radius: 5px; white-space: nowrap; }
.pbh .pbh-pay .who { display: flex; align-items: center; gap: 6px; min-width: 0; }
.pbh .pbh-pay .ref { font-size: 12px; color: var(--pbh-mute); font-family: 'JetBrains Mono', monospace; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pbh .pbh-pay .nv { font-size: 12.5px; color: var(--pbh-mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Khung chi tiết đang mở ⇒ ẩn cột mã giao dịch để cột khách đủ chỗ (mã GD vẫn ở khung chi tiết). */
@media (min-width: 960px) {
    .pbh .pbh-main.has-detail .pbh-pay { grid-template-columns: 4px 48px 120px 140px minmax(0, 1fr) 100px 104px; }
    .pbh .pbh-main.has-detail .pbh-pay .ref { display: none; }
}
.pbh .pbh-total {
    display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-radius: 14px;
    background: var(--pbh-card); border: 1px solid var(--pbh-line); font-size: 13.5px; font-weight: 600;
}
.pbh .pbh-total span:first-child { flex: 1; }
.pbh .pbh-total .m { font-weight: 400; color: var(--pbh-mute); }
.pbh .pbh-total b { font-size: 17px; }

/* Khung chi tiết của Thu ngân: đầu xanh "khoản thu đang xem" */
.pbh .pbh-detail .d-cash { background: var(--pbh-green); color: #fff; padding: 16px 18px; display: flex; flex-direction: column; gap: 3px; }
.pbh .pbh-detail .d-cash .d-top .k { flex: 1; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; opacity: .8; }
.pbh .pbh-detail .d-cash .pbh-x { background: rgba(255, 255, 255, .18); color: #fff; }
.pbh .pbh-detail .d-cash b { font-size: 26px; }
.pbh .pbh-detail .d-cash span { font-size: 13px; opacity: .92; }
.pbh .pbh-detail .d-cash .sub { font-size: 12px; opacity: .8; }
.pbh .pbh-detail .d-sec .d-top .id { flex: 1; font-family: 'JetBrains Mono', monospace; font-size: 13.5px; font-weight: 700; }
.pbh .pbh-detail .d-pay.cur { border-color: #c98a2e; background: #fdf6e8; }

/* Theo nhân viên thu */
.pbh .pbh-staff { background: var(--pbh-card); border: 1px solid var(--pbh-line); border-radius: 14px; padding: 14px 18px; display: flex; flex-direction: column; gap: 8px; }
.pbh .pbh-staff .h { font-size: 14px; font-weight: 600; }
.pbh .pbh-staff .h small { font-weight: 400; font-size: 12px; color: var(--pbh-mute); margin-left: 6px; }
.pbh .pbh-staff .r { display: grid; grid-template-columns: minmax(120px, 1fr) 60px minmax(0, 2fr) 70px; gap: 10px; align-items: center; font-size: 13px; }
.pbh .pbh-staff .r .c { font-size: 12px; color: var(--pbh-mute); text-align: right; }
.pbh .pbh-staff .r .track { height: 7px; background: var(--pbh-soft); border-radius: 4px; overflow: hidden; }
.pbh .pbh-staff .r .track span { display: block; height: 7px; border-radius: 4px; background: var(--pbh-green); }
.pbh .pbh-staff .r b { text-align: right; }

.pbh .pbh-toast {
    position: fixed; right: 20px; bottom: 20px; z-index: 1300; background: var(--pbh-green); color: #fff;
    padding: 10px 16px; border-radius: 10px; font-size: 13.5px; box-shadow: 0 10px 30px rgba(42, 33, 24, .25);
}
.pbh .pbh-toast.err { background: var(--pbh-red); }

@media (max-width: 1280px) {
    .pbh .pbh-cash-top { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 959px) {
    .pbh .pbh-ord { grid-template-columns: 4px minmax(0, 1fr) auto; gap: 4px 10px; padding: 10px 12px 10px 0; }
    .pbh .pbh-ord .bar { grid-column: 1; grid-row: 1 / 4; }
    .pbh .pbh-ord .no { grid-column: 2; grid-row: 1; }
    .pbh .pbh-ord .amt { grid-column: 3; grid-row: 1; }
    .pbh .pbh-ord .who { grid-column: 2 / 4; grid-row: 2; }
    .pbh .pbh-ord .stw { grid-column: 2; grid-row: 3; }
    .pbh .pbh-ord .act { grid-column: 3; grid-row: 3; }
    .pbh .pbh-ord .qty { display: none; }
    .pbh .pbh-ord-x { padding: 0 12px 10px 16px; }
    .pbh .pbh-mcards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .pbh .pbh-cash-hero .v { font-size: 38px; }
    .pbh .pbh-pay { grid-template-columns: 4px minmax(0, 1fr) auto; gap: 4px 10px; padding: 10px 12px 10px 0; }
    .pbh .pbh-pay .bar { grid-column: 1; grid-row: 1 / 4; }
    .pbh .pbh-pay .mt { grid-column: 2; grid-row: 1; }
    .pbh .pbh-pay .amt { grid-column: 3; grid-row: 1; }
    .pbh .pbh-pay .who { grid-column: 2 / 4; grid-row: 2; }
    .pbh .pbh-pay .tm { grid-column: 2; grid-row: 3; }
    .pbh .pbh-pay .id { grid-column: 3; grid-row: 3; text-align: right; }
    .pbh .pbh-pay .ref, .pbh .pbh-pay .nv { display: none; }
    .pbh .pbh-staff .r { grid-template-columns: minmax(0, 1fr) 70px; }
    .pbh .pbh-staff .r .track { grid-column: 1 / -1; grid-row: 2; }
    .pbh .pbh-staff .r .c { display: none; }
}

/* POS-G01-03 — thẻ từ chối ở Lịch sử bill · Danh sách order · Thu ngân (cùng khuôn .pbd-deny scoped của Chi tiết bill). */
.pbh .pbd-deny {
    padding: 12px 14px;
    border: 1px solid #e3b4ad;
    background: #fbefed;
    color: #8a2d22;
    border-radius: 8px;
    font-size: 13.5px;
}
