/* ===== Админка: пользователи (каркас .dash/.ds-* — из admin-dash.css) ===== */
.users-view { display: none !important; }
body.mode-users .chat-view, body.mode-users .kyc-view { display: none !important; }
body.mode-users .users-view { display: block !important; }

.us-refresh {
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; cursor: pointer;
  border: 1px solid #e8eaf2; background: #fff; color: #6b7280; transition: color .15s, border-color .15s;
}
.us-refresh:hover { color: #3b5bfd; border-color: #c9d2ff; }
.us-refresh svg { width: 18px; height: 18px; }
.us-refresh.spin svg { animation: kr-spin .8s linear infinite; }

.ds-card.us-stat { display: flex; align-items: center; gap: 16px; padding: 18px 20px; }
.us-stat .ds-ic { width: 50px; height: 50px; border-radius: 14px; }
.us-stat .ds-ic svg { width: 24px; height: 24px; }
.us-stat .ds-lbl { margin-top: 4px; }

/* --- Панель фильтров --- */
.ds-card.us-table { overflow: hidden; }
.us-tools { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; padding: 16px; border-bottom: 1px solid #f0f1f6; }
.us-search { position: relative; flex: 1 1 260px; display: block; }
.us-search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 17px; height: 17px; color: #9ca3af; }
.us-search input {
  width: 100%; padding: 10px 12px 10px 38px; outline: none;
  border: 1.5px solid #eef0f4; border-radius: 11px; background: #f7f8fb;
  font: inherit; font-size: 14px; transition: border-color .15s, background .15s;
}
.us-search input:focus { border-color: #3b5bfd; background: #fff; }
.seg.us-seg { margin: 0; }
.seg.us-seg button { flex: none; padding: 7px 12px; font-size: 12.5px; }
.us-select {
  appearance: none; padding: 9px 34px 9px 12px; border-radius: 11px; cursor: pointer; outline: none;
  border: 1.5px solid #eef0f4; font: inherit; font-size: 13px; font-weight: 600; color: #374151;
  background: #f7f8fb url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") right 10px center / 15px no-repeat;
}
.us-select:focus { border-color: #3b5bfd; }

/* --- Таблица --- */
.us-scroll { overflow-x: auto; }
.us-table table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.us-table th {
  padding: 11px 14px; text-align: left; white-space: nowrap;
  font-size: 11.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: #9ca3af;
  background: #fafbfd; border-bottom: 1px solid #f0f1f6;
}
.us-table td { padding: 12px 14px; border-bottom: 1px solid #f3f4f8; vertical-align: middle; }
.us-table tbody tr { transition: background .12s; }
.us-table tbody tr:hover { background: #fafbff; }
.us-table tbody tr:last-child td { border-bottom: 0; }
.us-table .r { text-align: right; }
.us-table th:first-child, .us-table td:first-child { padding-left: 20px; }
.us-table th:last-child, .us-table td:last-child { padding-right: 20px; }
.us-user { display: flex; align-items: center; gap: 12px; min-width: 210px; max-width: 280px; }
.money { font-variant-numeric: tabular-nums; white-space: nowrap; font-weight: 600; color: #374151; }
.money.strong { color: #0f172a; font-weight: 700; }
.money.pos { color: #059669; }
.money.neg { color: #dc2626; }
.dim { color: #a3aab9; font-weight: 500; }
.nowrap { white-space: nowrap; }
tr.banned .us-user, tr.banned .money { opacity: .55; }

.pres { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; font-size: 13px; color: #8b93a7; }
.pres i { width: 8px; height: 8px; border-radius: 50%; background: #cfd4df; }
.pres.on { color: #059669; font-weight: 600; }
.pres.on i { background: #10b981; box-shadow: 0 0 0 0 rgba(16, 185, 129, .5); animation: us-pulse 2s infinite; }
@keyframes us-pulse { 70% { box-shadow: 0 0 0 7px rgba(16, 185, 129, 0); } 100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); } }

.ban-why {
  max-width: 190px; margin-top: 5px; font-size: 12px; line-height: 1.35; color: #b91c1c;
  overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.ban-why.none { color: #a3aab9; font-style: italic; }
.ban-box {
  margin: 4px 0 14px; padding: 12px 14px; border-radius: 12px; text-align: left;
  background: #fef6f6; border: 1px solid #fde2e2; display: flex; flex-direction: column; gap: 8px;
}
.ban-box div { display: flex; gap: 12px; font-size: 13px; }
.ban-box span { flex: none; width: 96px; color: #8b93a7; }
.ban-box b { flex: 1; min-width: 0; color: #0f172a; font-weight: 600; word-break: break-word; }
.ban-box i { color: #a3aab9; font-weight: 500; }
.frz { display: inline-grid; place-items: center; width: 22px; height: 22px; margin-left: 6px; vertical-align: middle; border-radius: 7px; background: #eaf4ff; color: #2563eb; }
.frz svg { width: 13px; height: 13px; }

.act-cell { text-align: right; }
.us-act {
  display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; cursor: pointer;
  border: 1px solid transparent; background: transparent; transition: background .15s, border-color .15s;
}
.us-act svg { width: 18px; height: 18px; }
.us-act span { display: none; }
.us-act.ban { color: #ef4444; }
.us-act.ban:hover { background: #fef2f2; border-color: #fecaca; }
.us-act.unban { color: #10b981; }
.us-act.unban:hover { background: #ecfdf5; border-color: #a7f3d0; }

.us-empty { padding: 56px 16px !important; text-align: center; color: #9ca3af; font-size: 14px; }

.us-foot { display: flex; align-items: center; justify-content: space-between; padding: 12px 20px; border-top: 1px solid #f0f1f6; font-size: 13px; color: #8b93a7; }
.us-pager { display: flex; gap: 6px; }
.us-pager button {
  display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; cursor: pointer;
  border: 1px solid #e8eaf2; background: #fff; color: #374151;
}
.us-pager button svg { width: 16px; height: 16px; }
.us-pager button:disabled { opacity: .4; cursor: default; }

/* --- Диалог блокировки --- */
.us-modal {
  position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 16px;
  background: rgba(15, 23, 42, .45); backdrop-filter: blur(3px); animation: kr-fade .15s ease-out;
}
.us-dialog {
  width: 100%; max-width: 420px; padding: 26px 24px 22px; border-radius: 20px; background: #fff; text-align: center;
  box-shadow: 0 30px 80px rgba(15, 23, 42, .3); animation: us-pop .18s cubic-bezier(.2, .8, .2, 1);
}
@keyframes us-pop { from { transform: scale(.95); opacity: 0; } }
.us-dlg-ic { display: grid; place-items: center; width: 56px; height: 56px; margin: 0 auto 14px; border-radius: 16px; }
.us-dlg-ic svg { width: 26px; height: 26px; }
.us-dlg-ic.bad { background: #feecec; color: #dc2626; }
.us-dlg-ic.ok { background: #e6f7ef; color: #059669; }
.us-dialog h3 { margin: 0 0 8px; font-size: 18px; }
.us-dlg-who { margin: 0 0 10px; font-weight: 700; color: #0f172a; }
.us-dlg-who small { display: block; margin-top: 2px; font-weight: 500; font-size: 12.5px; color: #8b93a7; }
.us-dlg-txt { margin: 0 0 16px; font-size: 13.5px; line-height: 1.5; color: #6b7280; }
.us-dialog .kr-text { margin-bottom: 14px; text-align: left; }
.us-dialog .kr-text:focus { border-color: #ef4444; }
.us-dialog .kr-btn { padding: 12px; font-size: 14px; }
.us-dlg-err { margin: -4px 0 12px; font-size: 13px; color: #dc2626; }
.us-dlg-err[hidden] { display: none; }

.us-toast {
  position: fixed; left: 50%; bottom: 28px; z-index: 110; transform: translateX(-50%);
  padding: 11px 18px; border-radius: 12px; background: #0f172a; color: #fff; font-size: 14px; font-weight: 600;
  box-shadow: 0 12px 30px rgba(15, 23, 42, .3); animation: us-pop .18s ease-out; transition: opacity .3s;
}
.us-toast.out { opacity: 0; }

/* --- Мобилка: строки → карточки --- */
@media (max-width: 820px) {
  .rail { gap: 0 !important; justify-content: space-around !important; padding-left: 6px !important; padding-right: 6px !important; }
  .rail-btn { width: 44px; }
  .us-stat { padding: 14px 16px !important; }
  .us-tools { padding: 12px; }
  .seg.us-seg { width: 100%; overflow-x: auto; }
  .seg.us-seg button { flex: 1 1 auto; padding: 7px 6px; font-size: 12px; }
  .us-select { width: 100%; }
  .us-table thead { display: none; }
  .us-table table, .us-table tbody, .us-table tr, .us-table td { display: block; }
  .us-table tbody tr { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; padding: 14px 16px; border-bottom: 1px solid #f0f1f6; }
  .us-table td { padding: 0 !important; border: 0; text-align: left !important; }
  .us-table td[data-l]::before { content: attr(data-l); display: block; margin-bottom: 3px; font-size: 10.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: #a3aab9; }
  .us-table td:first-child { grid-column: 1 / -1; }
  .us-table td:first-child::before { display: none; }
  .us-user { max-width: none; }
  .act-cell { grid-column: 1 / -1; }
  .us-act { width: 100%; height: 40px; display: flex; gap: 8px; justify-content: center; border-color: currentColor; font: inherit; font-size: 13.5px; font-weight: 700; }
  .us-act span { display: inline; }
  .us-empty { grid-column: 1 / -1; }
  .us-foot { padding: 12px 16px; }
}

.us-table tr.us-row { cursor: pointer; }

.kyc-step { margin-top: 4px; font-size: 11.5px; color: #8a91a3; white-space: nowrap; }
