/* ============ GEM RADAR — тёмная тема терминала ============ */
:root {
  --bg: #0b0e13;
  --bg-panel: #11151d;
  --bg-elev: #171c26;
  --bg-hover: #1c2230;
  --border: #232b3a;
  --text: #e6eaf2;
  --muted: #8b94a7;
  --green: #22d3a0;
  --red: #ff5c6c;
  --amber: #ffb020;
  --blue: #4f9dff;
  --violet: #a78bfa;
  --mono: "JetBrains Mono", "Cascadia Code", Consolas, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--text);
  font: 14px/1.5 -apple-system, "Segoe UI", Inter, Roboto, sans-serif;
  min-height: 100vh;
  zoom: 1.05;
}

.num { text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.hidden { display: none !important; }

/* ---------- topbar ---------- */
.topbar {
  display: flex; align-items: center; gap: 10px; flex-wrap: nowrap;
  padding: 10px 16px;
  background: linear-gradient(180deg, #121722, #0d1118);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 30;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-logo { width: 38px; height: 38px; border-radius: 10px; display: block; box-shadow: 0 0 12px rgba(0,255,136,.35); }
.brand-name { font-weight: 800; letter-spacing: 2px; font-size: 14px; }
.brand-sub { color: var(--muted); font-size: 9.5px; }

.add-form { display: flex; gap: 6px; flex: 1 1 280px; min-width: 240px; max-width: 460px; }
.add-form input {
  flex: 1; min-width: 0; padding: 7px 10px; border-radius: 8px;
  background: var(--bg-elev); border: 1px solid var(--border);
  color: var(--text); font-family: var(--mono); font-size: 12px; outline: none;
}
.add-form input:focus { border-color: var(--blue); }
.add-form select {
  padding: 7px 8px; border-radius: 8px; flex-shrink: 0; font-size: 11px;
  background: var(--bg-elev); border: 1px solid var(--border); color: var(--text);
}
.add-form button {
  padding: 7px 14px; border: none; border-radius: 8px; cursor: pointer;
  background: var(--green); color: #06251c; font-weight: 700; font-size: 12px;
  transition: filter .15s; flex-shrink: 0; white-space: nowrap;
}
.add-form button:hover { filter: brightness(1.1); }
.add-form button:disabled { opacity: .5; cursor: wait; }

.poll-status { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 11px; margin-left: auto; font-family: var(--mono); white-space: nowrap; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.dot-live { background: var(--green); box-shadow: 0 0 8px var(--green); animation: pulse 2s infinite; }
@keyframes pulse { 50% { opacity: .4; } }

/* ---------- чип базы инфлов ---------- */
.infl-chip {
  position: relative; display: flex; align-items: center;
  color: var(--muted); font-size: 12px; cursor: default;
  padding: 6px 12px; border: 1px solid var(--border); border-radius: 999px;
  background: var(--bg-panel); transition: border-color .15s, color .15s;
}
.infl-chip:hover { border-color: var(--accent, #7c6cff); color: var(--text); }
.infl-chip b { color: var(--text); margin-left: 2px; }
.infl-tooltip {
  position: absolute; top: calc(100% + 10px); right: 0; z-index: 60;
  width: 300px; padding: 14px 16px; border-radius: 12px;
  background: var(--bg-panel); border: 1px solid var(--border);
  box-shadow: 0 12px 40px rgba(0,0,0,.5);
  opacity: 0; visibility: hidden; transform: translateY(-4px);
  transition: opacity .15s, transform .15s, visibility .15s;
  pointer-events: none;
}
.infl-chip:hover .infl-tooltip { opacity: 1; visibility: visible; transform: translateY(0); pointer-events: auto; }
.infl-tooltip .tt-title { font-size: 12px; font-weight: 700; color: var(--text); margin-bottom: 10px; letter-spacing: .3px; }
.infl-tooltip .tt-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; margin-bottom: 10px; }
.infl-tooltip .tt-cell-label { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; }
.infl-tooltip .tt-cell-value { font-size: 14px; font-weight: 700; color: var(--text); }
.infl-tooltip .tt-cell-value.pos { color: var(--green); }
.infl-tooltip .tt-cell-value.neg { color: var(--red, #ff5c6c); }
.infl-tooltip .tt-top { border-top: 1px solid var(--border); padding-top: 8px; }
.infl-tooltip .tt-top-title { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; margin-bottom: 6px; }
.infl-tooltip .tt-row { display: flex; justify-content: space-between; gap: 8px; font-size: 11px; padding: 2px 0; }
.infl-tooltip .tt-row a { color: var(--accent, #7c6cff); text-decoration: none; pointer-events: auto; }
.infl-tooltip .tt-row a:hover { text-decoration: underline; }
.infl-tooltip .tt-row .tt-pnl { font-weight: 700; }
.infl-tooltip .tt-row .tt-pnl.pos { color: var(--green); }
.infl-tooltip .tt-row .tt-pnl.neg { color: var(--red, #ff5c6c); }
.infl-tooltip .tt-updated { margin-top: 8px; font-size: 10px; color: var(--muted); }

/* чип прогресса датасета (шапка) */
.ds-tooltip { width: 340px; }
#ds-pct.ds-low { color: var(--red, #ff5c6c); }
#ds-pct.ds-mid { color: var(--yellow, #f5c542); }
#ds-pct.ds-done { color: var(--green); }
.ds-bar-row { display: flex; align-items: center; gap: 8px; padding: 3px 0; font-size: 11px; }
.ds-bar-label { flex: 0 0 128px; color: var(--muted); }
.ds-bar-track { flex: 1; height: 6px; border-radius: 3px; background: var(--border); overflow: hidden; }
.ds-bar-fill { display: block; height: 100%; border-radius: 3px; background: var(--accent, #7c6cff); transition: width .3s; }
.ds-bar-fill.full { background: var(--green); }
.ds-bar-val { flex: 0 0 64px; text-align: right; color: var(--text); font-weight: 700; }

/* чип кошельков RayBot в ленте */
.wallet-chip {
  display: inline-block; padding: 0 5px; margin-left: 2px;
  border: 1px solid var(--border); border-radius: 999px;
  font-size: 9px; color: var(--accent, #7c6cff); cursor: help;
  white-space: nowrap;
}

/* +N поздних кошельков (догнали после сигнала) — зелёный, мелкий */
.late-chip {
  display: inline-block; padding: 0 4px; margin-left: 2px;
  border: 1px solid var(--green); border-radius: 999px;
  font-size: 9px; font-weight: 700; color: var(--green); cursor: help;
  white-space: nowrap;
}

/* ---------------- вкладка «👛 Кошельки RayBot» ---------------- */
.w-rank { font-size: 15px; width: 44px; }
.wallet-cell { display: flex; flex-direction: column; gap: 1px; }
.wallet-name { font-weight: 700; font-size: 13px; }
.wallet-addr { font-size: 10px; font-family: var(--mono); }
tr.wallet-row td { padding-top: 9px; padding-bottom: 9px; }
.w-gems { color: var(--yellow, #f5c542); font-weight: 700; }
.w-profit { font-weight: 700; font-size: 13px; }
.wr-badge {
  display: inline-block; min-width: 44px; text-align: center;
  padding: 2px 8px; border-radius: 999px; font-weight: 700; font-size: 11px;
  border: 1px solid var(--border);
}
.wr-hot  { color: var(--green);  border-color: color-mix(in srgb, var(--green) 45%, transparent);  background: color-mix(in srgb, var(--green) 10%, transparent); }
.wr-mid  { color: var(--yellow, #f5c542); border-color: color-mix(in srgb, var(--yellow, #f5c542) 45%, transparent); background: color-mix(in srgb, var(--yellow, #f5c542) 10%, transparent); }
.wr-cold { color: var(--muted); }

/* ---------- main / panels ---------- */
main { padding: 20px 22px 60px; }
.panel { background: var(--bg-panel); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; }
.panel-head {
  display: flex; justify-content: flex-start; align-items: center; gap: 18px;
  padding: 10px 14px; border-bottom: 1px solid var(--border);
}
.panel-head h2 { font-size: 14px; font-weight: 700; letter-spacing: .4px; }
.panel-head-left { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; min-width: 0; }
.panel-head-right { display: flex; align-items: center; gap: 8px; }
#feed-showall { margin-left: auto; margin-right: auto; }
#last-update { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); }
.panel-head { position: relative; }

/* ---------- фильтр источников сигналов + винрейт ---------- */
.source-chips { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.src-chip {
  padding: 3px 9px; border-radius: 999px; cursor: pointer; font-size: 10.5px; font-weight: 700;
  background: var(--bg-elev); border: 1px solid var(--border); color: var(--muted);
  transition: all .15s; white-space: nowrap;
}
.src-chip:hover { color: var(--text); border-color: var(--muted); }
.src-chip.active { color: var(--text); border-color: var(--blue); background: rgba(79, 157, 255, .12); }
.src-chip .wr { margin-left: 5px; font-family: var(--mono); font-weight: 700; }
.src-chip .wr.wr-good { color: var(--green); }
.src-chip .wr.wr-mid { color: var(--amber); }
.src-chip .wr.wr-bad { color: var(--red); }
.src-chip .wr.wr-none { color: var(--muted); }
/* кликабельная часть винрейта внутри чипа: подчёркиваем точками, курсор — смена окна */
.src-chip .src-wr { cursor: ew-resize; border-bottom: 1px dotted currentColor; padding-bottom: 1px; }
.src-chip .src-wr:hover { filter: brightness(1.35); }
/* ---------- гайд ---------- */
.btn-guide {
  padding: 7px 14px; border-radius: 9px; cursor: pointer; font-size: 12px; font-weight: 700;
  background: var(--bg-elev); border: 1px solid var(--border); color: var(--muted);
  transition: all .15s; white-space: nowrap;
}
.btn-guide:hover { color: var(--text); border-color: var(--blue); }
.btn-icon { padding: 7px 10px; }
.export-box { display: flex; align-items: center; gap: 6px; }
.export-box select {
  padding: 6px 8px; border-radius: 8px; font-size: 11px;
  background: var(--bg-elev); border: 1px solid var(--border); color: var(--muted); outline: none; cursor: pointer;
}
.guide-overlay {
  position: fixed; inset: 0; background: rgba(4, 8, 14, .7); z-index: 60;
}
.guide {
  position: fixed; top: 3vh; bottom: 3vh; left: 50%; transform: translateX(-50%);
  width: min(860px, 94vw); z-index: 61; display: flex; flex-direction: column;
  background: var(--bg-panel); border: 1px solid var(--border); border-radius: 14px;
  box-shadow: 0 20px 80px rgba(0, 0, 0, .6);
}
.guide-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px; border-bottom: 1px solid var(--border);
}
.guide-title { font-size: 16px; font-weight: 800; }
/* Легенда меток: та же модалка, но уже и компактнее (16.11) */
.guide.legend { width: min(640px, 94vw); top: 5vh; bottom: 5vh; }
.guide.legend .guide-body { font-size: 12.5px; }
.guide.legend .guide-body h3 { margin: 14px 0 6px; }
.guide-body { padding: 10px 26px 30px; overflow-y: auto; font-size: 13px; line-height: 1.6; }
.guide-body h3 { margin: 22px 0 8px; color: var(--blue); font-size: 14px; }
.guide-body p { margin: 6px 0; }
.guide-body ul, .guide-body ol { margin: 6px 0; padding-left: 20px; }
.guide-body li { margin: 4px 0; }
.guide-body code {
  background: var(--bg-elev); border: 1px solid var(--border); border-radius: 5px;
  padding: 1px 5px; font-family: var(--mono); font-size: 11px;
}
.guide-nav {
  display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 4px;
  position: sticky; top: -10px; background: var(--bg-panel); padding: 8px 0;
  border-bottom: 1px solid var(--border); z-index: 2;
}
.guide-nav a {
  font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 999px;
  background: var(--bg-elev); border: 1px solid var(--border); color: var(--muted); text-decoration: none;
}
.guide-nav a:hover { color: var(--text); border-color: var(--blue); }
.guide-table { width: 100%; border-collapse: collapse; margin: 8px 0; }
.guide-table td {
  border: 1px solid var(--border); padding: 7px 10px; vertical-align: top; font-size: 12px;
}
.guide-table td:first-child { white-space: nowrap; font-weight: 600; width: 1%; background: var(--bg-elev); }
.guide-foot {
  display: flex; align-items: center; gap: 10px; justify-content: center;
  margin-top: 26px; padding-top: 16px; border-top: 1px solid var(--border);
}
.guide-foot .muted { font-size: 11px; }
.guide-download { cursor: pointer; padding: 8px 18px; font-size: 13px; border-color: var(--blue); color: var(--text); }

/* ---------- печать гайда в PDF ---------- */
@media print {
  body.print-guide { background: #fff !important; }
  body.print-guide > *:not(#guide) { display: none !important; }
  body.print-guide #guide {
    position: static; transform: none; top: auto; bottom: auto; left: auto;
    width: 100%; max-width: 100%; border: none; box-shadow: none; border-radius: 0;
    background: #fff; color: #1a1a1a;
  }
  body.print-guide #guide .guide-head { border-color: #e5e7eb; color: #111; }
  body.print-guide #guide .guide-head .btn-ghost { display: none; }
  body.print-guide #guide .guide-body { overflow: visible; color: #222; font-size: 12px; line-height: 1.55; }
  body.print-guide #guide h3 { color: #1d4ed8; page-break-after: avoid; }
  body.print-guide #guide .guide-nav,
  body.print-guide #guide .guide-foot { display: none; }
  body.print-guide #guide .guide-table { page-break-inside: auto; }
  body.print-guide #guide .guide-table tr { page-break-inside: avoid; }
  body.print-guide #guide .guide-table td { border-color: #d1d5db; color: #222; font-size: 11px; }
  body.print-guide #guide .guide-table td:first-child { background: #f3f4f6; color: #111; }
  body.print-guide #guide code { background: #f3f4f6; border-color: #e5e7eb; color: #333; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ---------- лента: период + сортировка ---------- */
.feed-window { display: flex; align-items: center; gap: 2px; margin-left: 10px; }
.feed-window-label { font-size: 10px; margin-right: 4px; }
.feed-window button {
  padding: 3px 8px; border-radius: 7px; cursor: pointer; font-size: 10px; font-weight: 700;
  background: transparent; border: 1px solid transparent; color: var(--muted);
}
.feed-window button:hover { color: var(--text); }
.feed-window button.active { color: var(--text); background: var(--bg-elev); border-color: var(--border); }
.th-sort { cursor: pointer; user-select: none; white-space: nowrap; }
.th-sort:hover { color: var(--text); }
#mp-arrow { color: var(--blue); }
.mp-dur { font-size: 10px; font-family: var(--mono); margin-top: 1px; }
.feed-showall {
  padding: 3px 10px; border-radius: 7px; cursor: pointer; font-size: 10px; font-weight: 700;
  background: var(--bg-elev); border: 1px solid var(--border); color: var(--muted);
}
.feed-showall:hover { color: var(--text); border-color: var(--muted); }

/* ---------- вкладка «Лидерборд» ---------- */
.lb-rank { font-size: 15px; }
.lb-profit { font-weight: 800; color: var(--green); font-family: var(--mono); }
.lb-row { cursor: default; }
.lb-row.lb-tracked { cursor: pointer; }
.lb-row.lb-tracked:hover td { background: var(--bg-elev); }
.src-tag {
  font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 999px;
  background: var(--bg-elev); border: 1px solid var(--border); color: var(--muted);
}
#lb-table td { border-bottom: 1px solid var(--border); }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 12px; }
thead th {
  text-align: left; color: var(--muted); font-weight: 600; font-size: 10px;
  text-transform: uppercase; letter-spacing: .3px;
  padding: 8px 7px; border-bottom: 1px solid var(--border); white-space: nowrap;
}
/* шапка ленты сигналов: все колонки ровно по центру */
#tokens-table thead th { text-align: center; }
/* и значения в ленте тоже по центру + раздвинуты */
#tokens-table tbody td { text-align: center; padding-left: 9px; padding-right: 9px; }
#tokens-table tbody td.num { text-align: center; }
/* оттолкнуть токен от колонки времени */
#tokens-table td:nth-child(2) { padding-left: 18px; text-align: left; }
tbody td { padding: 7px 7px; border-bottom: 1px solid #1a2130; white-space: nowrap; vertical-align: middle; }
tbody tr { cursor: pointer; transition: background .12s; }
tbody tr:hover { background: var(--bg-hover); }

.tok-cell { display: flex; align-items: center; gap: 8px; }
.tok-icon { width: 26px; height: 26px; border-radius: 7px; object-fit: cover; background: var(--bg-elev); flex: none; }
.tok-icon-fallback { display: flex; align-items: center; justify-content: center; color: var(--muted); font-weight: 700; }
.tok-name { font-weight: 700; }
.tok-sub { color: var(--muted); font-size: 10px; font-family: var(--mono); }

.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px; border-radius: 20px; font-size: 11px; font-weight: 700;
  font-family: var(--mono);
}
.badge-good { background: rgba(34, 211, 160, .14); color: var(--green); }
.badge-warning { background: rgba(255, 176, 32, .14); color: var(--amber); }
.badge-danger { background: rgba(255, 92, 108, .14); color: var(--red); }
.badge-neutral { background: rgba(139, 148, 167, .14); color: var(--muted); }
.badge-blue { background: rgba(79, 157, 255, .14); color: var(--blue); }

.x-up { color: var(--green); font-family: var(--mono); font-weight: 700; }
.x-down { color: var(--red); font-family: var(--mono); font-weight: 700; }

.row-actions { display: flex; gap: 6px; }
.icon-btn {
  background: none; border: 1px solid var(--border); border-radius: 6px;
  color: var(--muted); cursor: pointer; padding: 4px 8px; font-size: 12px;
}
.icon-btn:hover { color: var(--text); border-color: var(--muted); }
.ca-copy { padding: 0 4px; font-size: 10px; line-height: 14px; vertical-align: middle; }
.sig-time { font-size: 11px; line-height: 1.25; white-space: nowrap; }
.sig-time .sig-date { opacity: .65; font-size: 10px; }

.empty { padding: 60px 20px; text-align: center; color: var(--muted); }
.empty-icon { font-size: 42px; margin-bottom: 12px; }

/* ---------- переключатель видов ---------- */
.view-tabs { display: flex; gap: 8px; margin-bottom: 14px; }
.view-tab {
  padding: 8px 18px; border-radius: 10px; cursor: pointer; font-size: 13px; font-weight: 700;
  background: var(--bg-panel); border: 1px solid var(--border); color: var(--muted);
  transition: color .15s, border-color .15s;
}
.view-tab:hover { color: var(--text); }
.view-tab.active { color: var(--text); border-color: var(--blue); background: var(--bg-elev); }

/* ---------- вкладка «Инфлы» ---------- */
.infl-filters { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.infl-filters input[type="text"], .infl-filters input[type="number"], .infl-filters select {
  padding: 7px 10px; border-radius: 8px; font-size: 12px;
  background: var(--bg-elev); border: 1px solid var(--border); color: var(--text); outline: none;
}
.infl-filters input[type="text"] { width: 190px; font-family: var(--mono); }
.infl-filters input[type="number"] { width: 100px; }
.infl-filters input:focus { border-color: var(--blue); }
.infl-check { display: flex; align-items: center; gap: 5px; font-size: 12px; color: var(--muted); cursor: pointer; white-space: nowrap; }
.infl-check input { accent-color: var(--green); }

.infl-sort { cursor: pointer; user-select: none; }
.infl-sort:hover { color: var(--text); }

.infl-cell { display: flex; align-items: center; gap: 10px; }
.infl-avatar { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; background: var(--bg-elev); flex: none; }
.infl-avatar-fallback { display: flex; align-items: center; justify-content: center; color: var(--muted); font-weight: 700; }
.infl-name { font-weight: 700; }
.infl-name a { color: var(--text); text-decoration: none; }
.infl-name a:hover { color: var(--blue); }
.infl-handle { color: var(--muted); font-size: 11px; }
.infl-wallet { font-family: var(--mono); font-size: 11px; }
.infl-wallet a { color: var(--muted); text-decoration: none; }
.infl-wallet a:hover { color: var(--blue); }

.insider-badge {
  display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 10px;
  font-size: 10px; font-weight: 700; background: rgba(167, 139, 250, .16); color: var(--violet);
}

.nearly-badge {
  display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 10px;
  font-size: 10px; font-weight: 700; background: rgba(148, 163, 184, .12); color: var(--muted);
}

.looser-badge {
  display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 10px;
  font-size: 10px; font-weight: 700; background: rgba(250, 204, 21, .14); color: #facc15;
}

.candidate-badge {
  display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 10px;
  font-size: 10px; font-weight: 700; background: rgba(52, 211, 153, .16); color: var(--green);
  cursor: help;
}
.infl-row.candidate-row { background: linear-gradient(90deg, rgba(52, 211, 153, .06), transparent 60%); }

/* автотоп среди инфлов (с 16.11): те же критерии, что у топ-кошельков RayBot —
   снайпер (≥4 сделок, ≥2 гемов, винрейт ≥25%) / кит (≥5 гемов, винрейт ≥15%) */
.autotop-badge {
  display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 10px;
  font-size: 10px; font-weight: 700; background: rgba(52, 211, 153, .16); color: var(--green);
  cursor: help;
}
.infl-row.autotop-row { background: linear-gradient(90deg, rgba(52, 211, 153, .05), transparent 60%); }
.gem-mark { margin-left: 5px; font-size: 10px; cursor: help; }
.infl-gems-cell { font-weight: 700; color: var(--amber, #f59e0b); }
.infl-score-cell { font-family: var(--mono); font-size: 11px; }

/* автотоп-инфлы в ленте (16.11): ⚡ снайперы / 🐋 киты прямо в карточке токена */
.infltop-badge {
  display: inline-block; margin-left: 5px; padding: 0 6px; border-radius: 8px;
  font-size: 10px; font-weight: 700; background: rgba(52, 211, 153, .14); color: var(--green);
  cursor: help; white-space: nowrap;
}
tr.infltop-row { background: linear-gradient(90deg, rgba(52, 211, 153, .045), transparent 55%); }

/* ленивый рендер вкладки Инфлы (16.11): сентинел догрузки + спиннер сделок */
.infl-more-row td {
  text-align: center; color: var(--muted); font-size: 11px; padding: 12px;
  cursor: default; user-select: none; letter-spacing: .04em;
}
.infl-trades-loading { padding: 18px; text-align: center; color: var(--muted); font-size: 12px; }

tr.infl-detail-row { cursor: default; }
tr.infl-detail-row:hover { background: transparent; }
tr.infl-detail-row td { padding: 0 12px 12px; white-space: normal; }
.infl-trades {
  background: var(--bg-elev); border: 1px solid var(--border); border-radius: 10px;
  padding: 10px 14px; font-size: 12px;
}
.infl-trades table { font-size: 12px; }
.infl-trades thead th { padding: 6px 10px; font-size: 10px; }
.infl-trades tbody td { padding: 6px 10px; }
.infl-trades tbody tr { cursor: default; }
.infl-trades tbody tr:hover { background: transparent; }

.status-bought, .status-holding { color: var(--green); font-weight: 600; }
.status-sold { color: var(--muted); }
.status-accumulating { color: var(--amber); font-weight: 600; }

/* ---------- smart money ---------- */
.smart-badge {
  display: inline-flex; align-items: center; gap: 3px; margin-left: 8px;
  padding: 1px 8px; border-radius: 10px; font-size: 10px; font-weight: 700;
  background: rgba(167, 139, 250, .18); color: var(--violet);
  border: 1px solid rgba(167, 139, 250, .35);
  box-shadow: 0 0 10px rgba(167, 139, 250, .25);
  cursor: default;
}
tr.smart-row { background: rgba(167, 139, 250, .05); box-shadow: inset 3px 0 0 var(--violet); }
tr.smart-row:hover { background: rgba(167, 139, 250, .10); }
.smart-filter { margin-right: 14px; }
.smart-mark {
  display: inline-block; margin-left: 6px; padding: 1px 6px; border-radius: 8px;
  font-size: 10px; font-weight: 700; background: rgba(167, 139, 250, .18); color: var(--violet);
}

/* переключатель «smart money» во вкладке Инфлы */
.smart-toggle {
  margin-left: 12px; padding: 4px 12px; border-radius: 999px; cursor: pointer;
  font-size: 11px; font-weight: 700; vertical-align: middle;
  background: var(--bg-elev); border: 1px solid var(--border); color: var(--muted);
  transition: all .15s;
}
.smart-toggle:hover { color: var(--violet); border-color: rgba(167, 139, 250, .5); }
.smart-toggle.active {
  background: rgba(167, 139, 250, .18); color: var(--violet);
  border-color: rgba(167, 139, 250, .6);
  box-shadow: 0 0 12px rgba(167, 139, 250, .3);
}

/* ---------- drawer ---------- */
.drawer-overlay {
  position: fixed; inset: 0; background: rgba(4, 6, 10, .6); z-index: 40;
  backdrop-filter: blur(2px);
}
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 50;
  width: min(880px, 96vw);
  background: var(--bg-panel); border-left: 1px solid var(--border);
  display: flex; flex-direction: column;
  box-shadow: -20px 0 60px rgba(0, 0, 0, .5);
}
.drawer-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 20px; border-bottom: 1px solid var(--border); gap: 12px;
}
.drawer-title { display: flex; align-items: center; gap: 12px; min-width: 0; }
.drawer-actions { display: flex; gap: 8px; }
.btn-ghost {
  background: var(--bg-elev); border: 1px solid var(--border); color: var(--text);
  padding: 7px 12px; border-radius: 8px; cursor: pointer; font-size: 12px;
}
.btn-ghost:hover { border-color: var(--muted); }
.btn-ghost:disabled { opacity: .5; cursor: wait; }

.tabs { display: flex; gap: 2px; padding: 0 20px; border-bottom: 1px solid var(--border); overflow-x: auto; }
.tab {
  background: none; border: none; color: var(--muted); padding: 11px 14px;
  cursor: pointer; font-size: 13px; font-weight: 600; white-space: nowrap;
  border-bottom: 2px solid transparent;
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--green); border-bottom-color: var(--green); }

.drawer-body { flex: 1; overflow-y: auto; padding: 20px; }

/* ---------- карточки внутри drawer ---------- */
.grid { display: grid; gap: 12px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }

.card { background: var(--bg-elev); border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; }
.card-label { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .5px; margin-bottom: 5px; }
.card-value { font-size: 19px; font-weight: 800; font-family: var(--mono); font-variant-numeric: tabular-nums; }
.card-sub { color: var(--muted); font-size: 11px; margin-top: 3px; }

.section-title { font-size: 13px; font-weight: 700; margin: 22px 0 10px; color: var(--text); display: flex; align-items: center; gap: 8px; }
.section-title::after { content: ""; flex: 1; height: 1px; background: var(--border); }

.metric-row { display: grid; grid-template-columns: 220px 1fr 70px; align-items: center; gap: 12px; padding: 7px 0; }
.metric-name { font-size: 12px; }
.metric-name small { display: block; color: var(--muted); font-size: 10px; }
.metric-bar-wrap { height: 8px; background: #0d1119; border-radius: 6px; overflow: hidden; }
.metric-bar { height: 100%; border-radius: 6px; }
.metric-score { text-align: right; font-family: var(--mono); font-size: 12px; }

.kv-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.kv-table th, .kv-table td { padding: 7px 10px; border-bottom: 1px solid #1a2130; text-align: right; font-family: var(--mono); }
.kv-table th:first-child, .kv-table td:first-child { text-align: left; font-family: inherit; }
.kv-table th { color: var(--muted); font-weight: 600; font-size: 11px; text-transform: uppercase; }
th.dev-sort { cursor: pointer; user-select: none; white-space: nowrap; }
th.dev-sort:hover { color: var(--text); }

.influ-table td a { color: var(--blue); text-decoration: none; }
.influ-table td a:hover { text-decoration: underline; }
.influ-avatar { width: 24px; height: 24px; border-radius: 50%; vertical-align: middle; margin-right: 8px; background: var(--bg-elev); }

.pos { color: var(--green); }
.neg { color: var(--red); }

.check { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; padding: 4px 10px; border-radius: 8px; background: var(--bg-elev); border: 1px solid var(--border); margin: 0 6px 6px 0; }

.chart-wrap { background: var(--bg-elev); border: 1px solid var(--border); border-radius: 10px; padding: 14px; }
#price-chart { width: 100%; height: 320px; display: block; }
.chart-legend { display: flex; gap: 18px; margin-top: 10px; font-size: 11px; color: var(--muted); }
.chart-legend i { width: 12px; height: 3px; display: inline-block; border-radius: 2px; margin-right: 5px; vertical-align: middle; }

pre.raw-json {
  background: #0a0d12; border: 1px solid var(--border); border-radius: 10px;
  padding: 14px; font-size: 11px; font-family: var(--mono); overflow: auto;
  max-height: 420px; color: #9fb4d8;
}
details { margin-bottom: 12px; }
summary { cursor: pointer; font-weight: 700; font-size: 13px; padding: 6px 0; }

.snap-select { background: var(--bg-elev); color: var(--text); border: 1px solid var(--border); border-radius: 8px; padding: 6px 10px; font-size: 12px; }

/* ---------- toast ---------- */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: var(--bg-elev); border: 1px solid var(--border); color: var(--text);
  padding: 12px 20px; border-radius: 10px; z-index: 100; font-size: 13px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, .5); max-width: 90vw;
}
.toast.error { border-color: var(--red); }
.toast.ok { border-color: var(--green); }

@media (max-width: 720px) {
  .topbar { gap: 12px; }
  .poll-status { margin-left: 0; }
  main { padding: 12px; }
}

/* ---------- доступ (админка) ---------- */
.user-chip { display: flex; align-items: center; gap: 6px; margin-left: 6px; font-size: 13px;
  background: var(--bg-elev); border: 1px solid var(--border); border-radius: 10px; padding: 5px 6px 5px 12px; }
.access-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; padding: 16px; }
.access-block { background: var(--bg-elev); border: 1px solid var(--border); border-radius: 12px; padding: 16px; }
.access-block h3 { margin: 0 0 12px; font-size: 14px; }
.access-form { display: flex; gap: 8px; margin-top: 12px; }
.access-form-col { flex-direction: column; }
.access-row { display: flex; gap: 8px; }
.access-form input { flex: 1; background: var(--bg); border: 1px solid var(--border); border-radius: 8px;
  color: var(--text); padding: 8px 10px; font-size: 13px; outline: none; }
.access-form button { background: linear-gradient(135deg, #4f7cff, #7a4fff); border: 0; border-radius: 8px;
  color: #fff; font-weight: 600; padding: 8px 16px; cursor: pointer; }
.access-note { font-size: 11px; margin-top: 10px; line-height: 1.5; }
.access-actions button { font-size: 12px; }
.toast.err { border-color: var(--red); }
@media (max-width: 900px) { .access-grid { grid-template-columns: 1fr; } }

/* Возраст токена на момент сигнала (колонка ленты) */
.age-fresh { color: var(--green); font-weight: 600; }
.age-old { color: var(--muted); }

/* ---------- гем-скоринг: метки «потенциальный гем» / «слабый сигнал» ---------- */
.gem-chip {
  display: inline-flex; align-items: center; gap: 3px; margin-left: 6px;
  padding: 1px 8px; border-radius: 10px; font-size: 10px; font-weight: 700;
  background: rgba(52, 211, 153, .16); color: var(--green, #34d399);
  border: 1px solid rgba(52, 211, 153, .4);
  box-shadow: 0 0 10px rgba(52, 211, 153, .25);
  cursor: help; white-space: nowrap;
}
.gem-chip.confirmed {
  background: rgba(245, 197, 66, .16); color: var(--yellow, #f5c542);
  border-color: rgba(245, 197, 66, .45);
  box-shadow: 0 0 10px rgba(245, 197, 66, .25);
}
.gem-chip.weak {
  background: rgba(148, 163, 184, .12); color: var(--muted, #94a3b8);
  border-color: rgba(148, 163, 184, .3); box-shadow: none;
}
.gem-chip.yellow {
  background: rgba(245, 197, 66, .14); color: var(--yellow, #f5c542);
  border-color: rgba(245, 197, 66, .4);
  box-shadow: 0 0 8px rgba(245, 197, 66, .18);
}
/* Вторая цифра чипа светофора — слой импульса (0..50): ≥25 жирным зелёным
   (подтверждён), ниже 25 — серым, «—» пока пост-снап не снят (18.11). */
.gem-chip .cs.up { color: #4ade80; text-shadow: 0 0 6px rgba(74, 222, 128, .6); }
.gem-chip .cs.weak { opacity: .65; font-weight: 600; }
.gem-chip .cs.wait { opacity: .45; font-weight: 500; }
tr.gem-row { background: rgba(52, 211, 153, .05); box-shadow: inset 3px 0 0 var(--green, #34d399); }
tr.gem-row:hover { background: rgba(52, 211, 153, .10); }
tr.weak-row { opacity: .72; }

/* вне зоны охоты (16.11): строка видна, но блёклая — не крадёт внимание.
   Сильнее weak-row, так что даже подсветки строк почти не видно. */
tr.oof-row { opacity: .38; filter: saturate(.4); }
tr.oof-row:hover { opacity: .85; filter: none; }
.oof-badge {
  display: inline-block; margin-left: 6px; padding: 1px 6px; border-radius: 8px;
  font-size: 10px; font-weight: 700; background: rgba(148, 163, 184, .14); color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, .3); cursor: default; vertical-align: 1px;
}

/* ранний импульс (17.11): цена первые 2 минуты после сигнала, живьём */
.early-badge {
  display: inline-block; margin-left: 6px; padding: 1px 6px; border-radius: 8px;
  font-size: 10px; font-weight: 800; background: rgba(249, 115, 22, .16); color: #fb923c;
  border: 1px solid rgba(249, 115, 22, .4); cursor: default; vertical-align: 1px;
  animation: early-pulse 1.6s ease-in-out infinite;
}
@keyframes early-pulse {
  0%, 100% { box-shadow: 0 0 0 rgba(249, 115, 22, 0); }
  50% { box-shadow: 0 0 8px rgba(249, 115, 22, .45); }
}

/* строка точности светофора в тултипе датасета (15.11) */
.ds-scor { font-size: 12px; color: #cbd5e1; line-height: 1.5; }

/* метки топа у кошельков (15.11): ★ ручной / ⚡ авто */
.w-top { display: inline-flex; gap: 4px; margin-left: 6px; vertical-align: 2px; }
.w-top-badge { display: inline-block; border-radius: 4px; padding: 0 5px; font-size: 10px; font-weight: 600; line-height: 16px; white-space: nowrap; }
.w-top-manual { color: #f5c542; background: rgba(245, 197, 66, .13); border: 1px solid rgba(245, 197, 66, .38); }
.w-top-auto { color: #34d399; background: rgba(52, 211, 153, .11); border: 1px solid rgba(52, 211, 153, .32); }

/* значок «кит» (15.11) */
.w-top-whale { color: #60a5fa; background: rgba(96, 165, 250, .12); border: 1px solid rgba(96, 165, 250, .35); }

/* кастомные hover-подсказки (15.11): наводишь на [data-tip] — подсвечивает */
[data-tip] { position: relative; }
[data-tip]::after {
  content: attr(data-tip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 6px);
  transform: translateX(-50%);
  background: #0b1220;
  color: #e2e8f0;
  border: 1px solid #334155;
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 11px;
  font-weight: 400;
  line-height: 1.45;
  white-space: normal;
  width: max-content;
  max-width: 250px;
  text-align: left;
  opacity: 0;
  pointer-events: none;
  transition: opacity .12s ease;
  z-index: 60;
  box-shadow: 0 4px 14px rgba(0,0,0,.4);
}
[data-tip]:hover::after { opacity: 1; }
/* авто-переворот (16.11): значки в первом ряду — иначе тултип обрезает шапка панели */
[data-tip].tip-below::after {
  bottom: auto;
  top: calc(100% + 6px);
}

/* ---------------- Пэпертрейд (19.11) ---------------- */
.paper-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; }
.at-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; margin: 10px 0 4px; }
.at-master-row { gap: 14px; }
.at-state { font-size: 15px; letter-spacing: .08em; min-width: 52px; text-align: center; padding: 2px 10px; border-radius: 6px; transition: .25s; background: rgba(248,113,113,.15); color: #f87171; border: 1px solid rgba(248,113,113,.4); }
.at-state.on { background: rgba(74,222,128,.15); color: #4ade80; border-color: rgba(74,222,128,.5); text-shadow: 0 0 8px rgba(74,222,128,.7); }
.at-switch { position: relative; display: inline-block; width: 66px; height: 32px; flex: none; }
.at-switch input { opacity: 0; width: 0; height: 0; }
.at-slider { position: absolute; inset: 0; border-radius: 32px; cursor: pointer; transition: .25s;
  background: rgba(248,113,113,.18); border: 1px solid rgba(248,113,113,.5); box-shadow: inset 0 0 8px rgba(248,113,113,.25); }
.at-slider::before { content: ''; position: absolute; width: 24px; height: 24px; left: 4px; top: 3px; border-radius: 50%;
  background: #f87171; box-shadow: 0 0 10px rgba(248,113,113,.8); transition: .25s; }
.at-switch input:checked + .at-slider { background: rgba(74,222,128,.18); border-color: rgba(74,222,128,.6);
  box-shadow: inset 0 0 8px rgba(74,222,128,.3), 0 0 14px rgba(74,222,128,.35); }
.at-switch input:checked + .at-slider::before { transform: translateX(33px); background: #4ade80; box-shadow: 0 0 14px rgba(74,222,128,.95); }
@media (max-width: 1100px) { .at-grid { grid-template-columns: 1fr; } }
@media (max-width: 1100px) { .paper-grid { grid-template-columns: 1fr; } }
.paper-block { background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.07); border-radius: 10px; padding: 14px 16px; }
.paper-block h3 { margin: 0 0 10px; font-size: 14px; }
.paper-block h4 { margin: 14px 0 6px; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; opacity: .6; }
.paper-form { display: flex; flex-direction: column; gap: 8px; }
.paper-row { display: flex; align-items: center; gap: 10px; font-size: 13px; flex-wrap: wrap; }
.paper-row > span:first-child { min-width: 170px; opacity: .85; }
.paper-master { background: rgba(74,222,128,.08); border: 1px solid rgba(74,222,128,.25); border-radius: 8px; padding: 8px 10px; }
.paper-inline { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; }
.paper-mini { width: 74px; }
.paper-mid { width: 110px; }
.paper-row input[type="number"], .pp-leg input[type="number"] {
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12);
  border-radius: 6px; color: inherit; padding: 4px 8px; font-size: 13px;
}
.paper-row input[type="number"]:focus, .pp-leg input[type="number"]:focus { outline: none; border-color: var(--accent, #4f7cff); }
.paper-equity { font-weight: 700; font-size: 14px; margin-right: 10px; color: var(--green, #4ade80); }
.live-badge { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 12px; letter-spacing: .5px; margin-right: 10px; user-select: none; }
.live-badge.on { color: var(--green); }
.live-badge.off { color: rgba(255,255,255,.45); }
.dot-off { background: rgba(255,255,255,.25); }
.paper-legs { margin: 6px 0 8px 22px; display: flex; flex-direction: column; gap: 6px; }
.pp-leg { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.paper-stats { margin-top: 12px; border-top: 1px solid rgba(255,255,255,.08); padding-top: 10px; display: flex; flex-direction: column; gap: 6px; }
.pp-stat-row { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; flex-wrap: wrap; }
.pp-team-chip { display: inline-block; background: rgba(255,255,255,.06); border-radius: 6px; padding: 2px 8px; margin: 2px 4px 2px 0; font-size: 12px; }
.paper-positions { margin-bottom: 14px; }
.paper-pos-tabs { display: flex; gap: 6px; margin-bottom: 10px; }
.paper-pos-tabs button {
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1); color: inherit;
  border-radius: 6px; padding: 4px 14px; font-size: 13px; cursor: pointer;
}
.paper-pos-tabs button.active { background: rgba(79,124,255,.2); border-color: var(--accent, #4f7cff); }
.pp-legs-info { font-size: 11px; opacity: .65; }
.pp-leg-error input.paper-mini { border-color: var(--red, #f87171) !important; box-shadow: 0 0 6px rgba(248,113,113,.35); }
.pp-leg-hint { font-size: 11px; font-weight: 700; color: var(--red, #f87171); white-space: nowrap; }
.pp-legs-status { font-size: 12px; font-weight: 600; margin: 2px 0 6px 22px; }
.pp-legs-status.ok { color: var(--green, #4ade80); }
.pp-legs-status.warn { color: #fbbf24; }
.pp-legs-status.err { color: var(--red, #f87171); }
.pp-mcap { font-size: 11px; opacity: .8; }
.at-h3-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.at-h3-spacer { flex: 1; }
.at-h3-row .btn-ghost { font-size: 11px; padding: 3px 8px; white-space: nowrap; }
.at-h3-row button.btn-ghost { opacity: .75; }
.pp-sell-btn {
  font-size: 11px; font-weight: 700; padding: 2px 8px; margin-left: 6px;
  border-radius: 8px; border: 1px solid rgba(248,113,113,.5);
  background: rgba(248,113,113,.12); color: var(--red, #f87171); cursor: pointer;
  white-space: nowrap;
}
.pp-sell-btn:hover { background: rgba(248,113,113,.28); }
.pp-sell-btn:disabled { opacity: .45; cursor: default; }
.paper-head-col { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.paper-strat-balances { display: flex; gap: 5px; flex-wrap: wrap; justify-content: flex-end; }
.pp-bal-chip {
  font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 10px;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); white-space: nowrap;
}
.pp-bal-chip.pos { border-color: rgba(74,222,128,.4); }
.pp-bal-chip.neg { border-color: rgba(248,113,113,.4); }
.pos { color: var(--green, #4ade80); }
.neg { color: var(--red, #f87171); }
/* кнопка «показать все N» — прижата вправо, выглядит второстепенной */
.paper-pos-tabs button#pp-showall { margin-left: auto; opacity: .75; }
.at-top-grid { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 1400px) { .at-top-grid { grid-template-columns: 1fr; } }
/* внутри узкой колонки авто-блока настройки стекаются вертикально */
.at-top-grid .at-grid { grid-template-columns: 1fr; }

/* ---- страница «Кошельки-источники» (реестр, автотасовка) ---- */
.reg-filters { display: flex; gap: 6px; flex-wrap: wrap; }
.reg-filter {
  padding: 5px 12px; border-radius: 8px; border: 1px solid var(--border, #2a2f3a);
  background: transparent; color: var(--text, #cfd6e4); cursor: pointer; font-size: 12px;
}
.reg-filter.active { background: var(--accent, #4ade80); color: #0b0e14; border-color: transparent; font-weight: 700; }
.reg-count { opacity: .75; }

.reg-zone { margin: 10px; border: 1px solid var(--border, #232936); border-radius: 12px; overflow: hidden; }
.reg-zone-head {
  display: flex; align-items: baseline; gap: 12px; padding: 10px 14px;
  background: rgba(255, 255, 255, .02); cursor: default; user-select: none;
}
.reg-zone-head[data-zone="D"] { cursor: pointer; }
.reg-zone-title { font-weight: 700; font-size: 13px; }
.reg-zone-hint { font-size: 11px; flex: 1; }
.reg-none { padding: 10px 16px; font-size: 12px; }

.reg-row {
  display: flex; align-items: stretch; gap: 0; padding: 8px 14px 8px 0;
  border-top: 1px solid rgba(255, 255, 255, .04); cursor: pointer;
}
.reg-row:hover { background: rgba(255, 255, 255, .03); }
.reg-strip { width: 4px; margin-right: 12px; border-radius: 2px; flex: none; }
.reg-z-B .reg-strip { background: #4ade80; }
.reg-z-A .reg-strip { background: #60a5fa; }
.reg-z-C .reg-strip { background: #facc15; }
.reg-z-D .reg-strip { background: #6b7280; }
.reg-z-D { opacity: .55; }
.reg-z-D b { text-decoration: line-through; }

.reg-line1 { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; }
.reg-line2 { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 4px; font-size: 12px; }
.reg-cell { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.reg-cell b { font-weight: 700; }

.reg-badge {
  font-size: 10px; font-weight: 800; letter-spacing: .4px; padding: 2px 7px; border-radius: 6px;
}
.reg-b-active { background: rgba(74, 222, 128, .15); color: #4ade80; }
.reg-b-cand { background: rgba(96, 165, 250, .15); color: #60a5fa; }
.reg-b-grace { background: rgba(250, 204, 21, .15); color: #facc15; }
.reg-b-removed { background: rgba(107, 114, 128, .2); color: #9ca3af; }

.reg-sel { display: inline-flex; align-items: center; gap: 6px; }
.reg-sel-bar {
  display: inline-block; width: 64px; height: 7px; border-radius: 4px;
  background: rgba(255, 255, 255, .08); overflow: hidden; vertical-align: middle;
}
.reg-sel-bar span { display: block; height: 100%; background: linear-gradient(90deg, #60a5fa, #4ade80); border-radius: 4px; }

.reg-reasons { margin-top: 5px; display: flex; gap: 6px; flex-wrap: wrap; font-size: 11px; }
.reg-fail {
  padding: 2px 7px; border-radius: 6px;
  background: rgba(248, 113, 113, .1); color: #f87171;
}

.reg-spark { display: block; }
.reg-topmark { font-size: 12px; }
.reg-pin { font-size: 11px; }

/* боковая панель */
.reg-overlay {
  position: fixed; inset: 0; background: rgba(0, 0, 0, .5); z-index: 90;
}
.reg-panel {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(560px, 94vw);
  background: var(--bg2, #141923); border-left: 1px solid var(--border, #232936);
  z-index: 95; display: flex; flex-direction: column;
}
.reg-panel-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; border-bottom: 1px solid var(--border, #232936); font-size: 14px;
}
.reg-panel-body { padding: 12px 16px; overflow-y: auto; flex: 1; font-size: 13px; }
.reg-addr { font-family: var(--mono, monospace); font-size: 11px; word-break: break-all; display: flex; gap: 8px; align-items: center; }
.reg-addr a { color: var(--accent, #4ade80); text-decoration: none; }
.reg-panel-status { margin-top: 8px; font-weight: 700; font-size: 13px; }
.reg-metrics {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 10px;
}
.reg-metrics div { display: flex; flex-direction: column; background: rgba(255, 255, 255, .03); border-radius: 8px; padding: 6px 9px; }
.reg-metrics .muted { font-size: 10px; }
.reg-trades { width: 100%; font-size: 11px; border-collapse: collapse; }
.reg-trades th, .reg-trades td { padding: 4px 6px; text-align: left; border-bottom: 1px solid rgba(255, 255, 255, .05); }
.reg-trades .num { text-align: right; }
.reg-hist { margin-top: 4px; font-size: 11px; }
.reg-hist-row { padding: 3px 0; border-bottom: 1px dashed rgba(255, 255, 255, .05); }
.reg-personal {
  margin-top: 14px; padding: 8px 10px; border-radius: 8px;
  background: rgba(255, 255, 255, .03); display: flex; gap: 12px; flex-wrap: wrap; font-size: 12px;
}
/* ---- параметры сигнала на странице «Кошельки» ---- */
.sig-params {
  display: flex; gap: 14px; flex-wrap: wrap; align-items: center;
  margin: 8px 10px 0; padding: 8px 12px; border: 1px solid var(--border, #232936);
  border-radius: 10px; background: rgba(255, 255, 255, .02); font-size: 12px;
}
.sig-params-title { font-weight: 700; }
.sig-params label { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.sig-params input, .sig-params select {
  background: rgba(255, 255, 255, .05); border: 1px solid var(--border, #2a2f3a);
  border-radius: 6px; color: inherit; padding: 3px 6px; font-size: 12px;
}
