* { box-sizing: border-box; font-family: Inter, system-ui, sans-serif; }

body {
  margin: 0;
  background: #212121;
  color: #E5E7EB;
}

.app { display: flex; height: 100vh; }

/* Sidebar */
.sidebar {
  width: 220px;
  background: #181818;
  padding: 20px;
  position: relative;
  z-index: 200;
}
.logo .title { font-weight: 700; }
.logo .sub { font-size: 12px; color: #9CA3AF; margin-top: 6px; }



/* Плашка продлений */


.status-failed {
  background: rgba(239,68,68,.15);
  color: #EF4444;
}

.status-check {
  background: rgba(59,130,246,.15);
  color: #3B82F6;
}

/* ===== Sidebar navigation (redesigned) ===== */
.sidebar-nav{
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 14px;
}

.nav{
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;

  padding: 10px 12px;
  border-radius: 14px;

  background: transparent;
  border: 1px solid transparent;

  color: #9CA3AF;
  cursor: pointer;

  transition: background .15s ease, color .15s ease, border-color .15s ease;
}

.nav__icon{
  width: 36px;
  height: 36px;
  border-radius: 12px;

  display: inline-grid;
  place-items: center;

  background: #151515;
  border: 1px solid #212121;
  flex-shrink: 0;

  transition: transform .15s ease, background .15s ease, border-color .15s ease;
}

.nav svg{
  width: 18px;
  height: 18px;
  display: block;
}

.nav__label{
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .2px;
}

.nav:hover{
  background: rgba(148,163,184,.06);
  color: #E5E7EB;
  border-color: #2a2a2a;
}

.nav:hover .nav__icon{
  transform: translateY(-1px);
  background: #1a1a1a;
  border-color: #2a2a2a;
}

.nav.active{
  background: rgba(37,99,235,.12);
  color: #ffffff;
  border-color: rgba(37,99,235,.22);
  position: relative;
}



.nav.active .nav__icon{
  background: rgba(37,99,235,.16);
  border-color: rgba(37,99,235,.28);
}

.main {
  flex: 1;
  padding: 20px;
  position: relative;
  z-index: 50;
}

.header { margin-bottom: 20px; }

/* Summary cards */
.summary-card {
  background: #181818;
  border: 1px solid #212121;
  border-radius: 12px;
  padding: 10px 14px;
  min-width: 160px;
  margin-bottom: 14px;
}
.summary-card.accent { border-color: #212121; }

.summary-label {
  font-size: 11px;
  color: #9CA3AF;
}
.summary-value {
  cursor: pointer;
  position: relative;
  font-size: 18px;
  font-weight: 600;
  margin-top: 4px;
}
.summary-value:hover { opacity: 0.8; }

/* Section title */
.section-title {
  margin: 0 0 12px;
  font-size: 16px;
  font-weight: 600;
  color: #E5E7EB;
}

.table--payouts td:nth-child(2) {
  font-weight: 800;
letter-spacing: .4px;
  font-size: 13px;
  color: #E5E7EB;
}

/* Сумма в статистике */
.table--stats td:nth-child(3) {
  font-weight: 800;
letter-spacing: .4px;
  font-size: 13px;
  color: #E57EB;
}

.status-badge {
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  display: inline-block;
  white-space: nowrap;
}

/* В обработке — бирюза */
.status-processing {
  background: rgba(20, 184, 166, 0.15);
  color: #2DD4BF;
}

/* Выполнено — зелёный */
.status-done {
  background: rgba(34, 197, 94, 0.15);
  color: #22C55E;
}

/* Отменено — красный */
.status-cancel {
  background: rgba(239, 68, 68, 0.15);
  color: #EF4444;
}

/* Table wrapper (important for mobile) */
.table-wrap {
  background: #181818;
  border-radius: 14px;
  overflow-x: auto;
  overflow-y: hidden;
  border: 1px solid #0B1220;
  -webkit-overflow-scrolling: touch;
}

.icon-btn.pdf {
  color: #DC2626; /* основной красный */
}

.icon-btn.pdf:hover {
  color: #EF4444; /* светлее при наведении */
  background: #2b0f12;
}

/* Tables */
.table {
  width: 100%;
  border-collapse: collapse;
}
.table--payouts { min-width: 1100px; }
.table--stats { min-width: 760px; }

th, td {
  padding: 10px 8px;
  line-height: 1.35;
  font-size: 12px;
  border-bottom: 1px solid #212121;
  vertical-align: middle;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
th { color: #9CA3AF; text-align: left; }

table thead {
  background: #181818;
  box-shadow: inset 0 -1px 0 #212121, 0 4px 12px rgba(0,0,0,0.35);
}
table thead th {
  color: #E5E7EB;
  font-weight: 600;
  padding: 10px 8px;
  border-bottom: 1px solid #212121;
}

/* Requisites cell */
.req-cell { cursor: pointer; }
.req-cell:hover { opacity: 0.85; }

/* Bank cell */
.bank-cell {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.bank-cell img { width: 20px; height: 20px; object-fit: contain; }

/* Actions cell */
.actions-cell {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-start;
  white-space: nowrap;
}

/* Icon buttons */
.icon-btn {
  width: 36px;
  height: 36px;
  min-width: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;

  background: #212121;
  border: 1px solid #212121;
  border-radius: 10px;
  cursor: pointer;

  font-size: 16px;
  line-height: 1;

  color: #ffffff; /* ← скрепка белая */
}

.icon-btn:hover {
  background: #9A9A9A;
}

.icon-btn svg {
  width: 18px;
  height: 18px;
  display: block;
}

.icon-btn { color: white; }
.icon-btn.danger { color: #EF4444; }

/* крестик */

.icon-btn.danger:hover {
  background: #2b0f12;
}

/* PDF button (kept as small button) */
.btn {
  background: #2563EB;
  border: none;
  color: white;
  padding: 8px 10px;
  border-radius: 9px;
  font-size: 12px;
  cursor: pointer;
  white-space: nowrap;
  display: inline-block;
  text-decoration: none;
}
.btn:hover { filter: brightness(1.08); }

/* Bank search input */
.bank-search { width: 170px; }
.bank-search-input {
  width: 100%;
  background: #181818;
  color: #fff;
  border: 1px solid #212121;
  border-radius: 10px;
  padding: 7px 10px;
  font-size: 13px;
  cursor: text;
  outline: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.bank-search-list { display: none; }

/* Copy toast */
.copy-toast {
  position: fixed;
  background: #111827;
  border: 1px solid #1F2937;
  color: #E5E7EB;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 12px;
  white-space: nowrap;
  opacity: 0;
  transform: translateY(6px);
  pointer-events: none;
  transition: opacity .15s ease, transform .15s ease;
  z-index: 9999;
}
.copy-toast.show { opacity: 1; transform: translateY(0); }

/* Stats layout */
.stats-grid {
  display: flex;
  gap: 14px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

/* Mobile: tighter paddings */
@media (max-width: 700px) {
  th, td { padding: 10px 8px; }
}

/* ===== Modal ===== */
.modal[hidden] { display: none; }

.modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
}

.modal__backdrop{
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.55);
}

.modal__card{
  position: relative;
  width: min(560px, calc(100% - 24px));
  margin: 80px auto;
  background: #181818;
  border: 1px solid #212121;
  border-radius: 14px;
  box-shadow: 0 18px 50px rgba(0,0,0,.55);
  padding: 14px;
}

.modal__head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.modal__title{
  font-size: 15px;
  font-weight: 700;
  color: #E5E7EB;
}

.modal__sub{
  margin-top: 2px;
  font-size: 12px;
  color: #9CA3AF;
}

.modal__body{ margin-bottom: 14px; }

.upload-box{
  border: 1px dashed #181818;
  border-radius: 12px;
  padding: 16px;
  background: rgba(12,12,12);
}

.upload-box.dragover{
  border-color: #2DD4BF;
  background: rgba(255,184,166,.12);
}

.upload-box__text{
  font-size: 13px;
  color: #E5E7EB;
  margin-bottom: 12px;
}

.upload-actions{
  display:flex;
  align-items:center;
  gap: 12px;
  flex-wrap: wrap;
}






/* строка поиска выплаты */
.search-row { padding: 40px !important; text-align: center; color: #9CA3AF; }
.search-wrap { display: inline-flex; align-items: center; gap: 10px; font-size: 13px; }

.spinner{
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid rgba(156,163,175,.35);
  border-top-color: rgba(156,163,175,1);
  animation: spin .8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* плашки */
.badge-time { background: rgba(59,130,246,.15); color: #60A5FA; }
.badge-prolong { background: rgba(168,85,247,.15); color: #C084FC; }

/* имя pdf */
.pdf-name{
  font-size: 12px;
  color: #9CA3AF;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}






.icon-btn.send {
  color: #22C55E;
}
.icon-btn.send:hover {
  background: rgba(34,197,94,.12);
  border-color: rgba(34,197,94,.35);
}


.upload-file{
  font-size: 12px;
  color: #9CA3AF;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.modal__footer{
  display:flex;
  justify-content:flex-end;
}
/* ===== Cancel modal ===== */
.cancel-reasons{
  display:flex;
  flex-direction:column;
  gap:10px;
}

.cancel-reason{
  display:flex;
  align-items:center;
  gap:10px;
  width:100%;
  padding:12px 12px;
  border-radius:12px;
  border:1px solid #212121;
  background: rgba(148,163,184,.06);
  color:#E5E7EB;
  cursor:pointer;
  text-align:left;
}

.cancel-reason:hover{
  background: rgba(148,163,184,.10);
}

.cancel-reason.active{
  border-color: rgba(239,68,68,.55);
  background: rgba(239,68,68,.10);
}

.cancel-reason__icon{
  width:22px;
  display:inline-flex;
  justify-content:center;
}

.cancel-reason__text{
  font-size:13px;
}

.btn.danger{
  background: rgba(239,68,68,.18);
  border: 1px solid rgba(239,68,68,.35);
  color:#EF4444;
}

.btn.danger:disabled{
  opacity:.45;
  cursor:not-allowed;
}
.req-blur {
  filter: blur(6px);
  user-select: none;
  pointer-events: none;
}

.massmo-cell { cursor: pointer; }
.massmo-cell:hover { opacity: .85; }


.req-cell.locked {
  cursor: default;
}

.bank-search.locked {
  opacity: .55;
  pointer-events: none; /* полностью блокируем клики по input */
}

.icon-btn.claim {
  color: #60A5FA;
}
.icon-btn.claim:hover {
  background: rgba(59,130,246,.12);
  border-color: rgba(59,130,246,.35);
}
.icon-btn.unclaim {
  color: #FBBF24; /* янтарный */
}

.icon-btn.unclaim:hover {
  background: rgba(251,191,36,.12);
  border-color: rgba(251,191,36,.35);
}
/* ===== Added: sidebar footer ===== */
.sidebar-footer {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 16px;
}

.btn-ghost {
  background: transparent;
  border: 1px solid #2a2a2a;
  color: #9CA3AF;
}
.btn-ghost:hover {
  color: #fff;
  background: #212121;
}

/* ===== Added: tabs ===== */
.tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.tab {
  background: #181818;
  border: 1px solid #212121;
  color: #9CA3AF;
  padding: 8px 10px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 12px;
}
.tab:hover { filter: brightness(1.08); }
.tab.active {
  background: #212121;
  color: #fff;
  border-color: #2a2a2a;
}

/* ===== Added: settings ===== */
.settings-card{
  background: #181818;
  border: 1px solid #212121;
  border-radius: 14px;
  padding: 14px;
  max-width: 560px;
}

.settings-sub{
  font-size: 12px;
  color: #9CA3AF;
  margin-bottom: 12px;
}

.profile-list{
  display: grid;
  gap: 10px;
  margin: 10px 0 14px;
}

.profile-item{
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 10px;
  border: 1px solid #212121;
  border-radius: 12px;
  background: #151515;
  cursor: pointer;
}
.profile-item input{ transform: scale(1.15); }
.profile-item__name{
  font-size: 13px;
  color: #E5E7EB;
}

.settings-actions{
  display: flex;
  align-items: center;
  gap: 12px;
}
.settings-status{
  font-size: 12px;
  color: #9CA3AF;
}

/* ===== Added: login form ===== */
.form { display: grid; gap: 12px; }
.field { display: grid; gap: 6px; }
.field__label { font-size: 12px; color: #9CA3AF; }

.input{
  width: 100%;
  background: #121212;
  color: #fff;
  border: 1px solid #212121;
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 13px;
  outline: none;
}
.input:focus{
  border-color: #2a2a2a;
  filter: brightness(1.08);
}

.form-error{
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.22);
  color: #EF4444;
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 12px;
}

.hint{
  margin-top: 14px;
  padding: 12px 14px;
  background: #181818;
  border: 1px solid #212121;
  border-radius: 12px;
  color: #9CA3AF;
  font-size: 12px;
}

.muted{ color: #9CA3AF; }

/* ===== Bank modal ===== */
.bank-card { max-width: 520px; }

.bank-searchbox{
  display:flex; align-items:center; gap:10px;
  background:#121212;
  border:1px solid #181818;
  border-radius:12px;
  padding:10px 12px;
  margin-bottom:12px;
}
.bank-searchbox__icon{ opacity:.7; }
.bank-searchbox__input{
  width:100%;
  background:transparent;
  border:none;
  outline:none;
  color:#fff;
  font-size:13px;
}

.bank-list{ display:grid; gap:8px; }

.bank-item{
  display:flex; align-items:center; gap:10px;
  width:100%;
  background:#121212;
  border:1px solid #181818;
  border-radius:12px;
  padding:10px 12px;
  cursor:pointer;
  color:#fff;
}
.bank-item:hover{ filter:brightness(1.08); }

.bank-item__dot{
  width:14px; height:14px; border-radius:999px;
  border:2px solid #212121;
  background:transparent;
  flex:0 0 auto;
}
.bank-item__icon{
  width:22px; height:22px; object-fit:contain;
}
.bank-item__name{ font-size:13px; }

.bank-pick-btn{
  width:100%;
  text-align:left;
  background:transparent;
  border:none;
  padding:0;
  cursor:pointer;
}
.bank-pick-btn.locked{
  cursor:not-allowed;
  opacity:.6;
}
.bank-pick-placeholder{
  color:#9CA3AF;
  font-size:13px;
}
/* ===== FIX: icon buttons svg ===== */
.icon-btn {
  color: #E5E7EB; /* чтобы currentColor был виден */
}

.icon-btn svg {
  width: 18px;
  height: 18px;
  display: block;
}

.icon-btn svg path {
  stroke: currentColor;
}

.tg-check {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #0b1220;
  border: 1px solid #1f2a44;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .18s ease;
}

.tg-check svg {
  width: 18px;
  height: 18px;
}

/* enqueue */
.tg-check-blue {
  color: #3b82f6;
}

.tg-check-blue:hover {
  background: #172554;
  border-color: #3b82f6;
  transform: scale(1.05);
}

/* send */
.tg-check-green {
  color: #22c55e;
}

.tg-check-green:hover {
  background: #052e16;
  border-color: #22c55e;
  transform: scale(1.05);
}

.tg-check:active {
  transform: scale(0.9);
}

/* FIX: bank text color */
.bank-item {
  color: #E5E7EB;         /* общий цвет для строки в модалке */
}

.bank-item__name {
  color: inherit;         /* наследуем от .bank-item */
}

/* FIX: bank picker button (в таблице) */
.bank-pick-btn {
  color: #E5E7EB;         /* чтобы текст не становился чёрным */
}

.bank-cell span {
  color: inherit;         /* на всякий случай */
}

/* ===== Unified action buttons (TG/Linear style) ===== */
.action-btn{
  width: 34px;
  height: 34px;
  min-width: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;

  border-radius: 10px;
  background: #1a1a1a;
  border: 1px solid #262626;

  cursor: pointer;
  transition: transform .16s ease, background .16s ease, border-color .16s ease, color .16s ease;
  color: #E5E7EB;
}

.action-btn svg{
  width: 18px;
  height: 18px;
  display: block;
}

.action-btn svg path{
  stroke: currentColor;
}

.action-btn:hover{
  background: #222;
  border-color: #2f2f2f;
  transform: translateY(-1px);
}

.action-btn:active{
  transform: scale(.92);
}

/* Variants */
.action-btn--blue{  color:#60A5FA; }
.action-btn--blue:hover{  background: rgba(59,130,246,.14); border-color: rgba(59,130,246,.35); }

.action-btn--green{ color:#22C55E; }
.action-btn--green:hover{ background: rgba(34,197,94,.14); border-color: rgba(34,197,94,.35); }

.action-btn--amber{ color:#FBBF24; }
.action-btn--amber:hover{ background: rgba(251,191,36,.14); border-color: rgba(251,191,36,.35); }

.action-btn--red{   color:#EF4444; }
.action-btn--red:hover{   background: rgba(239,68,68,.14); border-color: rgba(239,68,68,.35); }

/* Optional: disable look */
.action-btn:disabled{
  opacity:.45;
  cursor:not-allowed;
  transform:none;
}
.tg-x-red { color:#ef4444; }
.tg-x-red:hover { background:#2b0f12; border-color: rgba(239,68,68,.35); transform: scale(1.05); }

/* ===== requisites badge ===== */

.req-badge {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 8px;

  background: #0b1220;
  border: 1px solid #1f2a44;

  font-size: 12px;
  font-weight: 600;
  letter-spacing: .3px;

  color: #dbeafe;
  cursor: pointer;

  transition: all .15s ease;
}

.req-badge:hover {
  background: #111a33;
  border-color: #2f3d6b;
}

.req-cell.locked .req-badge {
  opacity: .55;
  cursor: default;
}
/* ===== bank badge ===== */

.bank-badge{
  display:inline-block;
  padding:6px 10px;
  border-radius:8px;

  background:#0b1220;
  border:1px solid #1f2a44;

  font-size:12px;
  font-weight:600;
  letter-spacing:.3px;

  color:#dbeafe;
}

.bank-badge--empty{
  color:#60A5FA;
  border-color:#2f3d6b;
}

.bank-badge--empty:hover{
  background:#111a33;
}

/* ===== Unified badges (req / bank / massmo) ===== */

.req-badge,
.bank-badge,
.massmo-badge,
.bank-cell {
  display: inline-flex;
  align-items: center;
  gap: 8px;

  padding: 6px 10px;
  border-radius: 10px;

  background: #212121;
  border: 1px solid #181818;

  font-size: 12px;
  font-weight: 600;
  letter-spacing: .3px;

  color: #dbeafe;

  transition: background .15s ease, border-color .15s ease, opacity .15s ease;
}

/* hover (кликабельные) */
.req-badge:hover,
.massmo-badge:hover,
.bank-badge--empty:hover {
  background: #424242;
  border-color: #636363;
}

/* пустая “Выбрать банк” */
.bank-badge--empty {
  color: #dbeafe;
  border-color: #424242;
}

/* когда locked — не кликается */
.req-cell.locked .req-badge {
  opacity: .55;
  cursor: default;
}

/* MassMo ID — явно кликабельно */
.massmo-badge {
  cursor: pointer;
}

/* bank button делаем "прозрачной", чтобы выглядело как плашка внутри */
.bank-pick-btn{
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
}

/* когда locked — приглушаем плашку банка и блокируем кнопку */
.bank-pick-btn.locked {
  opacity: .55;
  pointer-events: none;
}

/* иконки банка внутри плашки */
.bank-cell img { width: 18px; height: 18px; object-fit: contain; }

.rate-badge{
  display:inline-flex;
  align-items:center;

  padding:6px 10px;
  border-radius:10px;

  background:#212121;
  border:1px solid #181818;

  font-size:12px;
  font-weight:600;
  letter-spacing:.3px;

  color:#dbeafe;
  
  
}
/* ===== amount badge (без hover) ===== */

.amount-badge{
  display:inline-flex;
  align-items:center;

  padding:6px 10px;
  border-radius:10px;

  background:#333333;
  border:2px solid #212121;

  font-size:12px;
  font-weight:700;
  letter-spacing:.3px;

  color:#dbeafe;
}

/* ===== camera button on summary card ===== */
/* ===== Summary head + inline camera ===== */
.summary-head{
  display:flex;
  align-items:center;
  gap:8px;
}

.cam-btn.cam-btn--inline{
  position: static;        /* убрать absolute */
  width: 26px;
  height: 26px;
  border-radius: 8px;

  background: #212121;
  border: 1px solid #2a2a2a;
  color: #9CA3AF;

  display:inline-flex;
  align-items:center;
  justify-content:center;

  cursor:pointer;
}

.cam-btn.cam-btn--inline:hover{
  background:#111a33;
  border-color:#2f3d6b;
  color:#E5E7EB;
}

.cam-btn.cam-btn--inline svg{
  width: 15px;
  height: 15px;
  display:block;
}

/* ===== Toggle switch ===== */
.settings-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
}

.settings-row__title{
  font-size:13px;
  font-weight:700;
  color:#E5E7EB;
}

.settings-row__sub{
  margin-top:4px;
  font-size:12px;
  color:#9CA3AF;
}

.switch{
  position:relative;
  display:inline-block;
  width:48px;
  height:28px;
  flex:0 0 auto;
}

.switch input{
  opacity:0;
  width:0;
  height:0;
}

.switch__slider{
  position:absolute;
  cursor:pointer;
  inset:0;
  background:#212121;
  border:1px solid #2a2a2a;
  border-radius:999px;
  transition:all .15s ease;
}

.switch__slider:before{
  content:"";
  position:absolute;
  height:22px;
  width:22px;
  left:3px;
  top:50%;
  transform:translateY(-50%);
  background:#9CA3AF;
  border-radius:50%;
  transition:all .15s ease;
}

.switch input:checked + .switch__slider{
  background: rgba(34,197,94,.18);
  border-color: rgba(34,197,94,.35);
}

.switch input:checked + .switch__slider:before{
  transform:translate(20px,-50%);
  background:#22C55E;
}

.bank-card {
  max-width: 520px;
}

/* ограничение списка до 6 банков + скролл */
.bank-card{
  --bank-row-h: 52px; /* высота одной строки банка (подгони если надо) */
  --bank-gap: 8px;    /* должно совпадать с gap у .bank-list */
}

.bank-list{
  display: grid;
  gap: var(--bank-gap);

  /* 6 строк + 5 промежутков между ними */
  max-height: calc(var(--bank-row-h) * 6 + var(--bank-gap) * 5);
  overflow-y: auto;

  padding-right: 6px;       /* чтобы контент не прилипал к скроллу */
  overscroll-behavior: contain;
}

/* фиксируем высоту айтема, чтобы ровно 6 помещалось */
.bank-item{
  min-height: var(--bank-row-h);
}

/* (опционально) аккуратный скролл */
.bank-list::-webkit-scrollbar { width: 6px; }
.bank-list::-webkit-scrollbar-thumb { background: #26324f; border-radius: 999px; }
.bank-list::-webkit-scrollbar-track { background: transparent; }

.action-btn--green {
  color: #22C55E;
}

.action-btn--green:hover {
  background: rgba(34,197,94,.12);
  border-color: rgba(34,197,94,.35);
}

.processing-until.time-warn {
  border-color: rgba(245, 158, 11, .55);
  box-shadow: 0 0 0 2px rgba(245, 158, 11, .10) inset;
}

.processing-until .bang {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 6px;
  font-weight: 900;
  font-size: 14px;
  line-height: 1;
  color: #f59e0b;
}

/* привязанная заявка */
tr.row-claimed {
  background: rgba(59, 130, 246, 0.08); /* мягкий синий */
  transition: background .2s ease;
}

/* при наведении немного ярче */
tr.row-claimed:hover {
  background: rgba(59, 130, 246, 0.14);
}
tr.row-done {
  background: rgba(34, 197, 94, 0.08);
  transition: background .2s ease;
}

tr.row-done:hover {
  background: rgba(34, 197, 94, 0.14);
}

tr.row-failed {
  background: rgba(239, 68, 68, 0.08);
  transition: background .2s ease;
}

tr.row-failed:hover {
  background: rgba(239, 68, 68, 0.14);
}
/* ===== Pretty switch (hard) ===== */
.switch{
  display:inline-flex !important;
  align-items:center !important;
  gap:10px !important;
  cursor:pointer;
  user-select:none;
  -webkit-tap-highlight-color: transparent;
  color:#94a3b8;
  font-size:13px;
}

.switch input{
  position:absolute !important;
  opacity:0 !important;
  pointer-events:none !important;
}

.switch-ui{
  flex:0 0 44px !important;
  width:44px !important;
  min-width:44px !important;
  height:26px !important;
  border-radius:999px !important;
  background:rgba(148,163,184,.28) !important;
  border:1px solid rgba(148,163,184,.25) !important;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.25) !important;
  position:relative !important;
  transition: background .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.switch-ui::before{
  content:"";
  position:absolute;
  top:50%;
  left:3px;
  width:20px;
  height:20px;
  border-radius:999px;
  transform:translateY(-50%);
  background:#0b0d10;
  border:1px solid rgba(255,255,255,.10);
  box-shadow: 0 6px 14px rgba(0,0,0,.45);
  transition: transform .18s ease, background .18s ease;
}

.switch-text{
  white-space:nowrap;
  opacity:.95;
}

/* checked (ВАЖНО: input сразу перед switch-ui) */
.switch input:checked + .switch-ui{
  background: rgba(34,197,94,.35) !important;
  border-color: rgba(34,197,94,.45) !important;
  box-shadow: 0 0 0 3px rgba(34,197,94,.12) !important;
}
.switch input:checked + .switch-ui::before{
  transform: translate(18px, -50%);
}

/* focus */
.switch input:focus-visible + .switch-ui{
  outline:2px solid rgba(59,130,246,.55);
  outline-offset:2px;
}
.summary-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.summary-header {
  display: flex;
  align-items: center;
}

.summary-header .switch {
  margin-left: auto;
}
.summary-header .switch {
  margin-left: auto;
  margin-right: 90px;
}

.switch {
  margin-bottom: 12px; /* подгони под себя */
}

/* ===== Sidebar polish ===== */
.sidebar{
  background: linear-gradient(180deg, #161616 0%, #141414 100%);
}

.logo{
  padding-bottom: 12px;
  border-bottom: 1px solid #212121;
  margin-bottom: 12px;
}


/* ===== Premium: auto-collapse sidebar on narrow screens ===== */
@media (max-width: 920px){
  .sidebar{
    width: 78px;
    padding: 16px 12px;
  }

  .sidebar-title,
  .sidebar-sub{
    display: none;
  }

  .sidebar-nav{
    margin-top: 10px;
  }

  .nav{
    padding: 10px;
    justify-content: center;
  }

  .nav__label{
    display: none;
  }

  .nav__icon{
    width: 42px;
    height: 42px;
    border-radius: 14px;
  }

  .nav.active::before{
    left: 6px;
    top: 10px;
    bottom: 10px;
  }

  /* Tooltip */
  .nav{
    position: relative;
  }
  .nav::after{
    content: attr(data-tip);
    position: absolute;
    left: calc(100% + 10px);
    top: 50%;
    transform: translateY(-50%);
    background: #0f0f0f;
    border: 1px solid #2a2a2a;
    color: #E5E7EB;
    font-size: 12px;
    font-weight: 600;
    padding: 8px 10px;
    border-radius: 10px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity .12s ease, transform .12s ease;
    z-index: 500;
    box-shadow: 0 14px 40px rgba(0,0,0,.45);
  }
  .nav:hover::after{
    opacity: 1;
    transform: translateY(-50%) translateX(0);
  }
}

/* ===== Ultra narrow: make sidebar scrollable if needed ===== */
@media (max-width: 420px){
  .sidebar{
    width: 70px;
    padding: 12px 10px;
  }
  .nav__icon{
    width: 40px;
    height: 40px;
  }
}


/* ===== Manual collapse (toggle) ===== */
.sidebar{
  transition: width .18s ease, padding .18s ease;
}

.sidebar-collapse{
  margin-top: 10px;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: inline-grid;
  place-items: center;

  background: #151515;
  border: 1px solid #212121;
  color: #9CA3AF;
  cursor: pointer;

  transition: background .15s ease, border-color .15s ease, color .15s ease, transform .15s ease;
}

.sidebar-collapse:hover{
  background: #1a1a1a;
  border-color: #2a2a2a;
  color: #E5E7EB;
}

.sidebar-collapse svg{
  width: 18px;
  height: 18px;
  display: block;
}

/* collapsed state */
.sidebar.is-collapsed{
  width: 78px;
  padding: 16px 12px;
}

.sidebar.is-collapsed .sidebar-title__full,
.sidebar.is-collapsed .sidebar-sub{
  display: none;
}

.sidebar-title__mark{
  display: none;
  font-weight: 800;
  letter-spacing: .4px;
}

.sidebar.is-collapsed .sidebar-title__mark{
  display: inline-block;
}

.sidebar.is-collapsed .sidebar-nav{
  margin-top: 10px;
}

.sidebar.is-collapsed .nav{
  padding: 10px;
  justify-content: center;
}

.sidebar.is-collapsed .nav__label{
  display: none;
}

.sidebar.is-collapsed .nav__icon{
  width: 42px;
  height: 42px;
  border-radius: 14px;
}

.sidebar.is-collapsed .nav.active::before{
  left: 6px;
  top: 10px;
  bottom: 10px;
}

/* Tooltip in collapsed mode (even on wide screens) */
.sidebar.is-collapsed .nav{
  position: relative;
}

.sidebar.is-collapsed .nav::after{
  content: attr(data-tip);
  position: absolute;
  left: calc(100% + 10px);
  top: 50%;
  transform: translateY(-50%);
  background: #0f0f0f;
  border: 1px solid #2a2a2a;
  color: #E5E7EB;
  font-size: 12px;
  font-weight: 600;
  padding: 8px 10px;
  border-radius: 10px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity .12s ease, transform .12s ease;
  z-index: 500;
  box-shadow: 0 14px 40px rgba(0,0,0,.45);
}

.sidebar.is-collapsed .nav:hover::after{
  opacity: 1;
}

.sidebar-title{
  display: flex;
  align-items: center;
  justify-content: center;
  height: 48px;
}

.sidebar-title__mark{
  display: none;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 1px;
  color: #ffffff;
}

.sidebar.is-collapsed .sidebar-title{
  justify-content: center;
}

.sidebar.is-collapsed .sidebar-title__mark{
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.nav-logout{
  margin-top: auto;
  color: #F87171;
}

.nav-logout:hover{
  background: rgba(239,68,68,.12);
  border-color: rgba(239,68,68,.25);
  color: #fff;
}

.nav-logout .nav__icon{
  background: rgba(239,68,68,.08);
  border-color: rgba(239,68,68,.2);
}

/* ===== Modern Settings UI ===== */

.settings{
  max-width: 760px;
}

/* Заголовки секций чуть выразительнее */
.settings .section-title{
  margin-top: 6px;
  margin-bottom: 12px;
  font-size: 18px;
  letter-spacing: .2px;
}

/* Карточки: мягкий градиент + тень */
.settings-card{
  background: linear-gradient(180deg, rgba(24,24,24,1) 0%, rgba(18,18,18,1) 100%);
  border: 1px solid rgba(42,42,42,.9);
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 14px 40px rgba(0,0,0,.35);
  max-width: 100%;
}

/* Ряд уведомлений: выравнивание и отступы */
.settings-row{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 6px 2px;
}

.settings-row__title{
  font-size: 14px;
  font-weight: 700;
}

.settings-row__sub{
  font-size: 12px;
  line-height: 1.35;
  opacity: .9;
}

/* Статусы внутри карточек */
.settings-status{
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(42,42,42,.7);
  color: #9CA3AF;
}

/* Тумблер: чуть компактнее и “чище” */
.switch{
  width: 46px;
  height: 26px;
}

.switch__slider{
  background: rgba(33,33,33,1);
  border: 1px solid rgba(42,42,42,1);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.25);
}

.switch__slider:before{
  height: 20px;
  width: 20px;
  left: 3px;
  background: #A3A3A3;
}

.switch input:checked + .switch__slider{
  background: rgba(34,197,94,.18);
  border-color: rgba(34,197,94,.35);
}

.switch input:checked + .switch__slider:before{
  transform: translate(20px,-50%);
  background: #22C55E;
}

/* Токены: современный selectable row */
.profile-list{
  gap: 10px;
}

.profile-item{
  background: rgba(21,21,21,.75);
  border: 1px solid rgba(42,42,42,.85);
  border-radius: 14px;
  padding: 12px 12px;
  transition: transform .12s ease, border-color .12s ease, background .12s ease;
}

.profile-item:hover{
  background: rgba(148,163,184,.06);
  border-color: rgba(148,163,184,.20);
  transform: translateY(-1px);
}

/* Чекбокс делаем аккуратнее (без кастомной разметки) */
.profile-item input[type="checkbox"]{
  width: 18px;
  height: 18px;
  transform: none;         /* убираем текущий scale */
  accent-color: #2563EB;   /* современный нативный стиль */
}

/* Кнопка "Сохранить" чуть “премиум” */
#profiles-save.btn{
  border-radius: 12px;
  padding: 10px 14px;
  box-shadow: 0 12px 26px rgba(37,99,235,.18);
}
/* ===== Sidebar user card ===== */

.sidebar-user-card{
  margin: 8px 0 14px 0;

  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;

  padding: 0;              /* убираем внутренние отступы */
  background: transparent; /* убираем фон */
  border: none;            /* убираем рамку */
  box-shadow: none;        /* убираем тень */
}

.sidebar-user-card__icon{
  width: 28px;
  height: 28px;
  border-radius: 10px;

  display: inline-grid;
  place-items: center;

  background: rgba(37,99,235,.15);
  border: 1px solid rgba(37,99,235,.35);

  color: #60A5FA;
}

.sidebar-user-card__icon svg{
  width: 16px;
  height: 16px;
}

.sidebar-user-card__name{
  font-size: 15px;
  letter-spacing: .3px;
}

/* ===== Collapsed avatar mode ===== */

.sidebar.is-collapsed .sidebar-user-card{
  padding: 0;
  background: transparent;
  border: none;
  box-shadow: none;
}

.sidebar.is-collapsed .sidebar-user-card__icon{
  display: none;
}

.sidebar.is-collapsed .sidebar-user-card__name{
  display: none;
}

/* Кружок с первой буквой */
.sidebar.is-collapsed .sidebar-user-card::after{
  content: attr(data-initial);
  width: 24px;
  height: 24px;
  border-radius: 50%;

  display: flex;
  align-items: center;
  justify-content: center;

  font-size: 12px;
  font-weight: 800;

  color: #fff;

  background: linear-gradient(135deg,#2563EB,#1D4ED8);
  box-shadow: 0 10px 25px rgba(37,99,235,.35);
}

/* ===== Sidebar brand card ===== */
.logo{
  padding-bottom: 12px;
  border-bottom: 1px solid #212121;
  margin-bottom: 12px;
}

/* плашка вокруг названия */
.sidebar-title{
  display: flex;
  align-items: center;
  justify-content: center;

  padding: 12px 12px;
  border-radius: 16px;

  background: linear-gradient(180deg, #1a1a1a 0%, #141414 100%);
  border: 1px solid #212121;
  box-shadow: 0 12px 34px rgba(0,0,0,.35);

  text-align: center;
}

/* текст внутри */
.sidebar-title__full{
  font-size: 16px;
  font-weight: 800;
  letter-spacing: .6px;
  color: #E5E7EB;
}

/* на всякий — если где-то еще .logo .title используется */
.logo .title{
  font-weight: 800;
}

.sidebar-title{
  margin-bottom: 20px;
}

.sidebar.is-collapsed .sidebar-collapse{
  margin: 12px auto;
}
.sidebar-collapse{
  margin: 12px auto 16px auto;
}
#users-list{
  display: flex;
  flex-direction: column;
  gap: 12px; /* расстояние между пользователями */
}
#users-list{
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.user-row{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;

  padding: 12px 14px;
  border-radius: 14px;

  background: rgba(21,21,21,.75);
  border: 1px solid rgba(42,42,42,.85);
}

.user-row__name{
  font-size: 14px;
  font-weight: 700;
  color: #E5E7EB;
}

.user-row__meta{
  display: flex;
  align-items: center;
  gap: 8px;
}

.user-badge{
  font-size: 12px;
  font-weight: 700;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid transparent;
  white-space: nowrap;
}

.user-badge--online{
  color: #22C55E;
  background: rgba(34,197,94,.12);
  border-color: rgba(34,197,94,.25);
}

.user-badge--offline{
  color: #9CA3AF;
  background: rgba(148,163,184,.08);
  border-color: rgba(148,163,184,.18);
}
.user-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 12px;
}

.user-row__name{
  color: #E5E7EB !important;
  font-size: 14px;
  font-weight: 700;
  flex: 1;              /* чтобы занимало место слева */
  min-width: 0;         /* чтобы работал ellipsis */
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.user-row__meta{
  flex-shrink: 0;
}
.nav[data-page="users"]{
  display: none !important;
}