/* finance-bank: Giao dịch ngân hàng (fb-*) & Lệnh nạp / USDT (ft-*) */
.fb-head-act { gap: 8px; flex-wrap: wrap; }
.fb-tip { margin-bottom: 12px; }
.fb-tips { margin: 0 0 12px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.fb-trend { font-style: normal; font-weight: 700; }
.fb-tip > div, .fb-tips .cu-tip > div { min-width: 0; }

/* Biểu đồ cột chồng */
.fb-chart-card { padding: 12px 16px; }
.fb-chart-card > summary { cursor: pointer; list-style: none; display: flex; gap: 8px; align-items: baseline; }
.fb-chart-card > summary::-webkit-details-marker { display: none; }
.fb-chart-card > summary::before { content: '▸'; color: var(--muted); transition: transform .15s; display: inline-block; }
.fb-chart-card[open] > summary::before { transform: rotate(90deg); }
.fb-chart { display: flex; align-items: flex-end; gap: 3px; margin-top: 12px; padding-bottom: 18px; }
.fb-col { flex: 1; min-width: 0; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; position: relative; }
.fb-col:hover .fb-bar { filter: brightness(1.08); outline: 2px solid rgb(11 74 158 / 18%); }
.fb-bar { display: flex; flex-direction: column-reverse; border-radius: 4px 4px 1px 1px; overflow: hidden; background: #eef2f8; }
.fb-bar i { display: block; min-height: 1px; }
.fb-col > span { position: absolute; bottom: -18px; left: 50%; transform: translateX(-50%); font-size: 10px; color: var(--muted); white-space: nowrap; }
.c-auto { background: var(--accent); } .c-man { background: var(--brand-2); } .c-un { background: #f59e0b; } .c-ig { background: #cbd5e1; } .c-usdt { background: #d97706; }
.fb-leg { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 10px; font-size: 12px; color: var(--muted); }
.fb-leg span { display: inline-flex; align-items: center; gap: 6px; }
.fb-leg i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.fb-leg b { color: var(--text); }

/* Bộ lọc */
.fb-filters { margin: 10px 0 8px; flex-wrap: wrap; gap: 8px; }
.fb-filters input[type=text] { width: 130px; }
.fb-date { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.fb-date input { width: auto; }
.fb-sum { gap: 6px; margin: 6px 2px 8px; align-items: baseline; flex-wrap: wrap; }

/* Danh sách */
.fb-row, .ft-row { display: grid; gap: 12px; align-items: center; padding: 10px 14px; border-top: 1px solid var(--line); cursor: pointer; }
.fb-row { grid-template-columns: 34px 112px 120px minmax(0, 2.2fr) minmax(180px, 1.2fr) 150px; }
.ft-row { grid-template-columns: 34px 160px minmax(0, 1.2fr) 120px minmax(0, 1.3fr) minmax(160px, 1.1fr) 190px; }
.fb-row:hover, .ft-row:hover { background: #f8fafd; }
.fb-row.on, .ft-row.on { background: #eef4ff; }
.fb-row.cm-head, .ft-row.cm-head { cursor: default; }
.fb-row.cm-head:hover, .ft-row.cm-head:hover { background: var(--surface-2); }
.fb-row.st-unmatched { box-shadow: inset 3px 0 0 #f59e0b; }
.ft-row.st-submitted { box-shadow: inset 3px 0 0 #f59e0b; }
.fb-row.st-ignored, .fb-row.st-other_account, .ft-row.st-cancelled, .ft-row.st-rejected { color: var(--muted); }
.fb-amt b, .ft-amt b { font-size: 15px; font-variant-numeric: tabular-nums; }
.fb-row.st-matched .fb-amt b { color: var(--ok); }
.fb-main, .fb-stc, .ft-cust, .ft-pay, .ft-st, .ft-code { min-width: 0; }
.fb-content { font-size: 13px; line-height: 1.45; word-break: break-word; }
.fb-content mark { background: #fef3c7; color: #92400e; border-radius: 4px; padding: 0 3px; font-weight: 700; }
.fb-content-lg { font-size: 15px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.fb-ref { margin-top: 2px; }
.fb-st { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 2px; }
.fb-act { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }
.fb-act .btn { white-space: nowrap; }
.fb-txid { word-break: break-all; margin-top: 2px; }
.fb-txid code { font-size: 12px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; }
.fb-match { margin-top: 4px; color: #047857; background: #ecfdf5; border-radius: 6px; padding: 2px 6px; display: inline-block; }
.ft-code .pill { font-size: 11px; }

/* Gợi ý khớp */
.fb-sugs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.fb-sug { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; border: 1px dashed #93c5fd; background: #f5f9ff; border-radius: 999px; padding: 3px 10px 3px 4px; font: inherit; font-size: 12px; cursor: pointer; color: var(--text); }
.fb-sug:hover:not(:disabled) { border-style: solid; border-color: var(--brand-2); background: #eaf2ff; }
.fb-sug:disabled { cursor: default; }
.fb-sug .ellipsis { max-width: 160px; }
.fb-sug em { font-style: normal; color: #1d4ed8; font-weight: 600; }
.fb-sug.hi { border-color: #6ee7b7; background: #f0fdf7; }
.fb-score { flex: none; font-size: 11px; font-weight: 800; border-radius: 999px; padding: 1px 7px; background: #e2e8f0; color: #334155; font-variant-numeric: tabular-nums; }
.fb-score.hi { background: #d1fae5; color: #047857; } .fb-score.mid { background: #dbeafe; color: #1d4ed8; } .fb-score.lo { background: #f1f5f9; color: var(--muted); }
.fb-nosug { margin-top: 4px; font-style: italic; }

/* Modal gán / chọn */
.fb-txsum { display: grid; gap: 8px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin-bottom: 12px; }
.fb-big { font-size: 22px; font-variant-numeric: tabular-nums; }
.fb-lbl { font-size: 12px; font-weight: 700; color: #334155; text-transform: uppercase; letter-spacing: .03em; margin: 12px 0 6px; }
.fb-pick, .fb-apply { display: grid; gap: 6px; }
.fb-apply { max-height: 55vh; overflow: auto; }
.fb-opt { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; cursor: pointer; background: var(--surface); }
.fb-opt > div { flex: 1; }
.fb-opt:hover { border-color: var(--brand-2); }
.fb-opt:has(input:checked) { border-color: var(--brand-2); background: #eef4ff; box-shadow: 0 0 0 1px var(--brand-2); }
.fb-opt input { width: 18px; height: 18px; flex: none; margin: 0; }
.fb-presets { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.fb-presets .chip { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 4px 12px; font: inherit; font-size: 13px; cursor: pointer; }
.fb-presets .chip:hover, .fb-presets .chip.on { border-color: var(--brand-2); color: var(--brand-2); background: #eff6ff; }
.fb-preview { margin-top: 10px; font-size: 13px; background: var(--surface-2); border-radius: 8px; padding: 8px 10px; }
.ft-qr { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 16px; align-items: center; }
.ft-qr img { border-radius: 12px; border: 1px solid var(--line); background: #fff; }
.ft-qr .fact b { word-break: break-all; }

@media (max-width: 1200px) {
  .fb-row { grid-template-columns: 34px 100px 110px minmax(0, 1fr) 170px 120px; }
  .ft-row { grid-template-columns: 34px 150px minmax(0, 1fr) 110px minmax(0, 1fr) 150px 180px; }
}
@media (max-width: 900px) {
  .fb-filters input[type=search] { flex-basis: 100%; }
  .ft-row { grid-template-columns: 34px 140px minmax(0, 1fr) 110px 150px 170px; }
  .ft-row > .ft-cust { display: none; }
}
@media (max-width: 700px) {
  .fb-head-act { width: 100%; }
  .fb-filters input[type=text] { flex: 1 1 40%; width: auto; min-width: 0; }
  .fb-filters select { flex: 1; }
  .fb-filters #fb-sort { flex-basis: 100%; }
  .fb-date { flex: 1 1 40%; min-width: 0; }
  .fb-date input { flex: 1; min-width: 0; }
  .fb-row.cm-head, .ft-row.cm-head { display: none; }
  .fb-row { grid-template-columns: 28px minmax(0, 1fr) auto; grid-template-areas: "ck time amt" ". main main" ". st act"; row-gap: 6px; column-gap: 8px; }
  .fb-row > .cm-ck { grid-area: ck; align-self: start; }
  .fb-row > .fb-time { grid-area: time; display: flex; gap: 6px; align-items: baseline; min-width: 0; }
  .fb-row > .fb-amt { grid-area: amt; }
  .fb-row > .fb-main { grid-area: main; }
  .fb-row > .fb-stc { grid-area: st; }
  .fb-row > .fb-act { grid-area: act; align-self: end; }
  .ft-row { grid-template-columns: 28px minmax(0, 1fr) auto; grid-template-areas: "ck code amt" ". cust cust" ". pay pay" ". st act"; row-gap: 6px; column-gap: 8px; }
  .ft-row > .ft-cust { display: block; grid-area: cust; }
  .ft-row > .cm-ck { grid-area: ck; align-self: start; }
  .ft-row > .ft-code { grid-area: code; }
  .ft-row > .ft-amt { grid-area: amt; align-self: start; }
  .ft-row > .ft-pay { grid-area: pay; }
  .ft-row > .ft-st { grid-area: st; }
  .ft-row > .fb-act { grid-area: act; align-self: end; }
  .fb-sug .ellipsis { max-width: 110px; }
  .ft-qr { grid-template-columns: 1fr; justify-items: center; }
}
