/* ===== Админка: балансы (таблица/карточки/окна — из admin-users/admin-deposits.css) ===== */
.balances-view { display: none !important; }
body.mode-balances .chat-view { display: none !important; }
body.mode-balances .balances-view { display: block !important; }
.bl-pane[hidden] { display: none !important; }
#bl-tabs button { display: inline-flex; align-items: center; gap: 8px; }
#bl-tabs svg { width: 17px; height: 17px; }

.bl-check { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; color: #4b5563; cursor: pointer; white-space: nowrap; }
.bl-check input { accent-color: #3b5bfd; width: 16px; height: 16px; }
.bl-u { display: flex; align-items: center; gap: 12px; }
.bl-acc { font-size: 11.5px; }
.bl-amber { color: #d97706 !important; }
.bl-manage {
  padding: 7px 14px; border-radius: 9px; border: 1.5px solid #c9d2ff; background: #fff; cursor: pointer;
  color: #3b5bfd; font: inherit; font-size: 13px; font-weight: 700; white-space: nowrap;
}
.bl-manage:hover { background: #eef1ff; }

/* выбор пользователя */
.bl-lbl { margin: 4px 0 8px; font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #8b93a7; }
.bl-pick { position: relative; max-width: 560px; margin-bottom: 16px; }
.bl-pick .us-search input { background: #fff; border-color: #e3e6ee; padding-right: 40px; font-size: 15px; height: 46px; }
.bl-pick-x { position: absolute; right: 8px; top: 8px; display: grid; place-items: center; width: 30px; height: 30px; border: 0; border-radius: 8px; background: none; cursor: pointer; color: #9ca3af; }
.bl-pick-x:hover { background: #f1f2f6; color: #374151; }
.bl-pick-x svg { width: 16px; height: 16px; }
.bl-pick-x[hidden], .bl-drop[hidden] { display: none; }
.bl-drop {
  position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 20; padding: 6px; border-radius: 14px;
  background: #fff; border: 1px solid #e8eaf2; box-shadow: 0 16px 40px rgba(17, 24, 39, .14);
}
.bl-opt { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px; border: 0; border-radius: 10px; background: none; cursor: pointer; font: inherit; text-align: left; }
.bl-opt:hover { background: #f4f5fa; }
.bl-opt .mono { font-size: 11.5px; }
.bl-none { padding: 14px; text-align: center; color: #9ca3af; font-size: 13.5px; }
.bl-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 56px 16px; text-align: center; color: #8b93a7; font-size: 13.5px; }
.bl-empty .ds-ic { margin-bottom: 8px; }
.bl-empty b { font-size: 16px; color: #111827; }

/* карточка */
.ds-card.bl-user { display: flex; align-items: center; gap: 14px; padding: 16px 20px; margin-bottom: 16px; }
.bl-user .pn-mid { flex: 1; }
.bl-name { font-size: 16px; font-weight: 700; color: #0f172a; }
.bl-tiles { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.bl-tile { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; border-radius: 16px; background: #fff; border: 1px solid #e8eaf2; }
.bl-tile span { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #8b93a7; }
.bl-tile b { font-size: 24px; font-weight: 800; letter-spacing: -.02em; color: #0f172a; font-variant-numeric: tabular-nums; }
.bl-tile small { font-size: 11.5px; color: #a3aab9; }
.bl-tile.green { background: linear-gradient(135deg, #fff, #f0fbf6); border-color: #cdeedd; } .bl-tile.green b { color: #059669; }
.bl-tile.amber { background: linear-gradient(135deg, #fff, #fff8ec); border-color: #fbe3bc; } .bl-tile.amber b { color: #d97706; }
.bl-tile.red { background: linear-gradient(135deg, #fff, #fef3f3); border-color: #fbd5d5; } .bl-tile.red b { color: #dc2626; }
.bl-tile.blue { background: linear-gradient(135deg, #fff, #f1f4ff); border-color: #d6ddff; } .bl-tile.blue b { color: #3b5bfd; }

/* операции */
.ds-card.bl-ops { margin-bottom: 22px; overflow: hidden; }
.bl-op-tabs { display: flex; gap: 2px; padding: 0 12px; border-bottom: 1px solid #f0f1f6; overflow-x: auto; }
.bl-op-tabs button {
  position: relative; flex: none; display: inline-flex; align-items: center; gap: 8px; padding: 15px 14px; border: 0; background: none; cursor: pointer;
  color: #8b93a7; font: inherit; font-size: 14px; font-weight: 700;
}
.bl-op-tabs button svg { width: 18px; height: 18px; }
.bl-op-tabs button.on::after { content: ''; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2.5px; border-radius: 3px 3px 0 0; background: currentColor; }
.bl-op-tabs button.on.credit { color: #059669; }
.bl-op-tabs button.on.debit { color: #dc2626; }
.bl-op-tabs button.on.freeze { color: #d97706; }
.bl-op-tabs button.on.unfreeze { color: #3b5bfd; }
.bl-form { padding: 20px; max-width: 760px; }
.bl-row { display: flex; gap: 16px; align-items: flex-end; flex-wrap: wrap; }
.bl-field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 16px; }
.bl-field > span { font-size: 11.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: #8b93a7; }
.bl-amount { width: 260px; min-height: 0; font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; }
.bl-form .kr-text:focus { border-color: #3b5bfd; }
.bl-preview { flex: 1; min-width: 240px; margin-bottom: 16px; display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.bl-preview div { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; color: #6b7280; }
.bl-preview b { color: #374151; font-variant-numeric: tabular-nums; }
.bl-preview em { font-style: normal; }
.bl-preview em.pos { color: #059669; } .bl-preview em.neg { color: #dc2626; }
.bl-over { display: flex !important; justify-content: flex-start !important; align-items: center; gap: 6px; color: #d97706 !important; font-weight: 600; }
.bl-over svg { width: 15px; height: 15px; }
.bl-cats { display: flex; flex-wrap: wrap; gap: 8px; }
.bl-cat { display: inline-flex; align-items: center; gap: 8px; padding: 9px 13px; border-radius: 10px; border: 1.5px solid #eef0f4; cursor: pointer; font-size: 13.5px; font-weight: 600; color: #374151; }
.bl-cat:has(input:checked) { border-color: #3b5bfd; background: #eef1ff; color: #2b44d6; }
.bl-cat input { accent-color: #3b5bfd; margin: 0; }
.bl-go {
  display: inline-flex; align-items: center; gap: 8px; padding: 13px 22px; border-radius: 12px; border: 0; cursor: pointer; color: #fff;
  font: inherit; font-size: 15px; font-weight: 800; transition: transform .1s, box-shadow .15s;
}
.bl-go svg { width: 18px; height: 18px; }
.bl-go:active { transform: scale(.98); }
.bl-go.credit, .bl-yes.credit { background: linear-gradient(135deg, #10b981, #34d399); box-shadow: 0 6px 18px rgba(16, 185, 129, .3); color: #fff; }
.bl-go.debit, .bl-yes.debit { background: linear-gradient(135deg, #ef4444, #f87171); box-shadow: 0 6px 18px rgba(239, 68, 68, .3); color: #fff; }
.bl-go.freeze, .bl-yes.freeze { background: linear-gradient(135deg, #f59e0b, #fbbf24); box-shadow: 0 6px 18px rgba(245, 158, 11, .3); color: #fff; }
.bl-go.unfreeze, .bl-yes.unfreeze { background: linear-gradient(135deg, #3b5bfd, #6d84ff); box-shadow: 0 6px 18px rgba(59, 91, 253, .3); color: #fff; }
.bl-note { margin-top: 12px; font-size: 12.5px; color: #8b93a7; }
#bl-err { margin: 0 0 12px; }

/* история */
.bl-hist-h h3 { margin: 0 0 10px; font-size: 17px; }
.bl-op { font-size: 13.5px; }
.bl-op.credit, .bl-op.deposit { color: #059669; }
.bl-op.debit, .bl-op.withdrawal, .bl-op.trade_liquidation { color: #dc2626; }
.bl-op.freeze, .bl-op.unfreeze, .bl-op.trade_admin_close { color: #d97706; }
.bl-note-cell { max-width: 320px; white-space: normal; font-size: 12.5px; color: #4b5563; }

/* подтверждение */
.us-dialog.bl-dialog { max-width: 440px; }
.bl-dialog .ban-box { text-align: left; margin-bottom: 14px; background: #f7f8fc; border-color: #eceef5; }
.bl-ic.credit { background: #e6f7ef; color: #059669; } .bl-ic.debit { background: #feecec; color: #dc2626; }
.bl-ic.freeze { background: #fff4e0; color: #d97706; } .bl-ic.unfreeze { background: #eaeeff; color: #3b5bfd; }

@media (max-width: 1280px) { .bl-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 820px) {
  .bl-tiles { grid-template-columns: 1fr 1fr; }
  .bl-tile b { font-size: 20px; }
  .ds-card.bl-user { flex-wrap: wrap; }
  .bl-amount { width: 100%; }
  .bl-form { padding: 16px; }
  .bl-go { width: 100%; justify-content: center; }
}

.bl-all-h { padding: 14px 20px; border-bottom: 1px solid #f0f1f6; font-size: 13px; color: #8b93a7; }
.us-table tr.bl-pick-row { cursor: pointer; }
.us-table tr.bl-pick-row:hover .bl-manage { background: #eef1ff; }

.bl-violet { color: #7c3aed !important; }
.bl-tile.violet { background: linear-gradient(135deg, #fff, #f6f1ff); border-color: #e4d6ff; } .bl-tile.violet b { color: #7c3aed; }
.bl-op-tabs button.on.bonus { color: #7c3aed; } .bl-op-tabs button.on.bonusx { color: #9333ea; }
.bl-go.bonus, .bl-yes.bonus, .bl-go.bonusx, .bl-yes.bonusx { background: linear-gradient(135deg, #7c3aed, #a78bfa); box-shadow: 0 6px 18px rgba(124, 58, 237, .3); color: #fff; }
.bl-ic.bonus, .bl-ic.bonusx { background: #f1eaff; color: #7c3aed; }
.bl-op.bonus_add, .bl-op.bonus_remove, .bl-op.bonus_use { color: #7c3aed; }
#bl-totals.ds-grid.g4 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
@media (max-width: 1280px) { #bl-totals.ds-grid.g4 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 820px) { #bl-totals.ds-grid.g4 { grid-template-columns: 1fr 1fr; } }
