/* ════════════════════════════════════════════════════════════════════════
   AUTO-RADAR · AI Top Pairs — старая раскладка в нашем cinematic языке
   ════════════════════════════════════════════════════════════════════════ */

.radar2-page-content {
  max-width: none;
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 56px);
}
.radar2-page-content > .radar2-statusbar { margin-top: auto; }

/* ───── Toolbar (одна строка как на старом скрине) ─────────────────────── */
.radar2-toolbar {
  position: relative;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  padding: 12px 18px;
  background:
    repeating-linear-gradient(135deg, rgba(255,255,255,0.012) 0 2px, transparent 2px 5px),
    linear-gradient(180deg, rgba(255,255,255,0.04) 0%, rgba(255,255,255,0.01) 100%),
    #121217;
  border: 1px solid rgba(255,255,255,0.16);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.05),
    0 6px 14px -10px rgba(0,0,0,0.9);
  margin-bottom: 8px;
}
.radar2-tb-title {
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  font-weight: 700;
  color: #fff;
  display: flex; align-items: center; gap: 8px;
}
.radar2-live {
  font-size: 9px;
  letter-spacing: 0.18em;
  padding: 2px 6px;
  background: rgba(107,255,154,0.16);
  color: #4dd986;
  border: 1px solid rgba(107,255,154,0.45);
  font-weight: 700;
  animation: radar2Pulse 1.6s ease-in-out infinite;
}
@keyframes radar2Pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.55; } }
.radar2-tb-divider { width: 1px; height: 18px; background: rgba(255,255,255,0.15); }

.radar2-tb-grp { display: flex; align-items: center; gap: 6px; }
.radar2-tb-lbl {
  font-size: 9px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
}
.radar2-tb-chip {
  padding: 4px 9px;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.22);
  color: rgba(255,255,255,0.7);
  font-family: inherit;
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  cursor: pointer;
}
.radar2-tb-chip.on { color: #fff; border-color: rgba(255,255,255,0.7); background: rgba(255,255,255,0.06); }
.radar2-tb-chip.disabled { opacity: 0.35; cursor: not-allowed; }
.radar2-tb-chip.disabled::after {
  content: '99+';
  margin-left: 4px;
  font-size: 7px;
  padding: 1px 3px;
  background: #ff5a5a;
  color: #fff;
  letter-spacing: 0.04em;
}
.radar2-tb-select {
  height: 28px;
  padding: 0 28px 0 12px !important;
  min-width: 170px;
  background-color: transparent !important;
  background-image:
    linear-gradient(180deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0.01) 100%),
    linear-gradient(45deg, transparent 50%, rgba(255,255,255,0.7) 50%),
    linear-gradient(135deg, rgba(255,255,255,0.7) 50%, transparent 50%) !important;
  background-position: 0 0, calc(100% - 14px) 12px, calc(100% - 9px) 12px !important;
  background-size: 100% 100%, 5px 5px, 5px 5px !important;
  background-repeat: no-repeat !important;
  background-color: #0e0e13 !important;
  border: 1px solid rgba(255,255,255,0.22) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04) !important;
  font-family: 'Space Mono', ui-monospace, monospace !important;
  font-size: 11px !important;
  color: #fff !important;
  letter-spacing: 0.06em !important;
  cursor: pointer;
  border-radius: 0 !important;
  appearance: none !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  outline: none !important;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}
.radar2-tb-select:hover {
  border-color: rgba(255,255,255,0.45) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06), 0 0 8px rgba(255,255,255,0.1) !important;
}
.radar2-tb-select:focus {
  border-color: #fff !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 0 10px rgba(255,255,255,0.18) !important;
}
.radar2-tb-select option { background: #0a0a0a; color: #fff; padding: 4px; }
.radar2-tb-select.narrow { min-width: 100px; }
.radar2-tb-select-caret { color: rgba(255,255,255,0.5); font-size: 9px; }
.radar2-tb-checkbox { display: flex; align-items: center; gap: 6px; cursor: pointer; user-select: none; }
.radar2-tb-checkbox-box {
  width: 14px; height: 14px;
  border: 1px solid rgba(255,255,255,0.45);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 10px;
  color: #4dd986;
  background: rgba(0,0,0,0.4);
}
.radar2-tb-checkbox-lbl {
  font-size: 10px;
  letter-spacing: 0.18em;
  color: #fff;
  text-transform: uppercase;
}
.radar2-tb-updated { font-size: 10px; color: rgba(255,255,255,0.5); letter-spacing: 0.06em; }
.radar2-tb-updated b { color: #fff; font-weight: 400; font-family: 'Space Mono', ui-monospace, monospace; letter-spacing: 0.08em; }
.radar2-tb-spacer { flex: 1; }
.radar2-tb-btn {
  padding: 4px 12px;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.45);
  color: #fff;
  font-family: inherit;
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  cursor: pointer;
}
.radar2-tb-btn.prism { border-color: rgba(255,255,255,0.7); background: rgba(255,255,255,0.06); }
.radar2-tb-btn.prism:hover { background: rgba(255,255,255,0.12); box-shadow: 0 0 10px rgba(255,255,255,0.25); }
.radar2-tb-icon-btn {
  width: 26px; height: 26px;
  border: 1px solid rgba(255,255,255,0.25);
  background: transparent;
  color: rgba(255,255,255,0.7);
  font-family: inherit;
  font-size: 12px;
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
}
.radar2-tb-icon-btn.on { color: #ffd84d; border-color: #ffd84d; }
.radar2-tb-lang {
  padding: 4px 10px;
  border: 1px solid rgba(255,255,255,0.25);
  background: transparent;
  color: rgba(255,255,255,0.7);
  font-family: inherit;
  font-size: 10px;
  letter-spacing: 0.18em;
  cursor: pointer;
}

/* ───── Eyebrow строка под toolbar ─────────────────────────────────────── */
.radar2-eyebrow {
  font-size: 10px;
  letter-spacing: 0.04em;
  color: rgba(255,255,255,0.45);
  margin: 6px 4px 18px;
}

/* ───── Section heading ────────────────────────────────────────────────── */
.radar2-section-h {
  display: flex; align-items: center; gap: 8px;
  font-size: 10px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.6);
  margin: 0 0 10px;
  padding: 8px 12px;
  background:
    linear-gradient(90deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0.02) 40%, transparent 100%),
    #0e0e13;
  border: 1px solid rgba(255,255,255,0.1);
  border-left: 2px solid rgba(255,255,255,0.5);
  font-weight: 400;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}
.radar2-section-h::before {
  content: '▤';
  color: rgba(255,255,255,0.4);
  font-size: 12px;
  margin-right: 2px;
}
.radar2-section-h.watchlist {
  color: rgba(255,210,120,0.84);
  border-left-color: rgba(255,185,82,0.76);
  background:
    linear-gradient(90deg, rgba(255,185,82,0.08) 0%, rgba(255,185,82,0.035) 42%, transparent 100%),
    #0f0f12;
}
.radar2-section-h.watchlist::before {
  content: '◇';
  color: rgba(255,185,82,0.72);
}

/* ───── Grid ───────────────────────────────────────────────────────────── */
.radar2-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 22px;
}

/* ───── Card ───────────────────────────────────────────────────────────── */
.radar2-card {
  position: relative;
  background:
    /* мягкая диагональная текстура — едва заметная */
    repeating-linear-gradient(
      135deg,
      rgba(255,255,255,0.012) 0 2px,
      transparent 2px 5px
    ),
    /* верхний свет — карточка как будто "приподнята" */
    linear-gradient(
      180deg,
      rgba(255,255,255,0.045) 0%,
      rgba(255,255,255,0.018) 28%,
      rgba(255,255,255,0.008) 100%
    ),
    #131318;
  border: 1px solid rgba(255,255,255,0.14);
  /* тонкая внутренняя подсветка сверху + outer shadow для глубины */
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.06),
    inset 0 0 0 1px rgba(255,255,255,0.015),
    0 1px 0 rgba(0,0,0,0.6),
    0 6px 14px -8px rgba(0,0,0,0.9);
  display: flex;
  flex-direction: column;
  transition: border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}
.radar2-card:hover {
  border-color: rgba(255,255,255,0.45);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.08),
    0 1px 0 rgba(0,0,0,0.6),
    0 10px 22px -10px rgba(0,0,0,0.95),
    0 0 0 1px rgba(255,255,255,0.06);
  transform: translateY(-1px);
}
.radar2-card.ai {
  border-color: rgba(107,255,154,0.5);
  box-shadow:
    inset 0 1px 0 rgba(107,255,154,0.18),
    0 1px 0 rgba(0,0,0,0.6),
    0 10px 22px -10px rgba(0,0,0,0.95),
    0 0 18px -4px rgba(107,255,154,0.18);
}
.radar2-card.watch {
  border-color: rgba(255,185,82,0.45);
  box-shadow:
    inset 0 1px 0 rgba(255,185,82,0.12),
    0 1px 0 rgba(0,0,0,0.6),
    0 10px 22px -10px rgba(0,0,0,0.95),
    0 0 18px -5px rgba(255,185,82,0.16);
}

/* card head: "Best for X" */
.radar2-card-head {
  padding: 6px 10px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.7);
  background: rgba(255,255,255,0.03);
}
.radar2-card-head em { color: #fff; font-style: normal; font-weight: 700; }

/* AI ribbon — мягкий приглушённый зелёный с прозрачностью */
.radar2-ai-ribbon {
  display: flex; align-items: center; gap: 6px;
  padding: 4px 10px;
  background: linear-gradient(90deg, rgba(77,217,134,0.32), rgba(77,217,134,0.18));
  color: #b8ffd1;
  border-bottom: 1px solid rgba(77,217,134,0.5);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-shadow: 0 0 4px rgba(77,217,134,0.4);
}
.radar2-ai-ribbon::before { content: '◆'; color: #4dd986; }
.radar2-watch-ribbon {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: linear-gradient(90deg, rgba(255,185,82,0.24), rgba(255,185,82,0.11));
  border-bottom: 1px solid rgba(255,185,82,0.42);
  color: #ffd68d;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.radar2-watch-ribbon::before { content: '◇'; color: #ffb952; }

/* symbol row + score block */
.radar2-sym-row {
  display: flex; justify-content: space-between; align-items: stretch;
  padding: 10px 12px 8px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.radar2-sym {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #fff;
}
.radar2-sym-sub {
  display: block;
  font-size: 9px;
  letter-spacing: 0.18em;
  color: rgba(255,255,255,0.4);
  text-transform: uppercase;
  margin-top: 2px;
  font-weight: 400;
}
.radar2-score {
  position: relative;
  min-width: 64px;
  display: flex; align-items: center; justify-content: flex-end;
  padding: 2px 8px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.18);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #fff;
  overflow: hidden;
}
.radar2-score-fill {
  position: absolute; top: 0; left: 0; bottom: 0;
  background: rgba(255,255,255,0.18);
  z-index: 0;
}
.radar2-score-val { position: relative; z-index: 1; }

/* stats list — табличный вид как на старом скрине */
.radar2-stats {
  display: flex;
  flex-direction: column;
  padding: 6px 12px 8px;
  gap: 4px;
}
.radar2-stat-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 11px;
  letter-spacing: 0.04em;
  color: rgba(255,255,255,0.55);
}
.radar2-stat-lbl { font-size: 10px; letter-spacing: 0.06em; color: rgba(255,255,255,0.55); }
.radar2-stat-val { font-family: 'Space Mono', ui-monospace, monospace; color: #fff; font-weight: 700; }
.radar2-stat-val.exch { letter-spacing: 0.08em; text-transform: uppercase; font-size: 11px; }
.radar2-stat-val.exch em { font-style: normal; color: rgba(255,255,255,0.85); text-decoration: underline; text-decoration-color: rgba(255,255,255,0.4); text-underline-offset: 3px; }
.radar2-stat-val.exch .radar2-ex-link {
  color: rgba(255,255,255,0.88);
  text-decoration: underline;
  text-decoration-color: rgba(255,255,255,0.42);
  text-underline-offset: 3px;
  transition: color 120ms ease, text-decoration-color 120ms ease, text-shadow 120ms ease;
}
.radar2-stat-val.exch .radar2-ex-link:hover,
.radar2-stat-val.exch .radar2-ex-link:focus-visible {
  color: #fff;
  text-decoration-color: #6bff9a;
  text-shadow: 0 0 8px rgba(107,255,154,0.35);
  outline: none;
}
.radar2-stat-val.exch span.arrow { color: rgba(255,255,255,0.5); margin: 0 4px; }
.radar2-stat-val.pos { color: #6bff9a; }
.radar2-stat-val.neg { color: #ff7b7b; }
.radar2-stat-val.warn { color: #ffb347; }

/* footer button */
.radar2-card-foot {
  padding: 8px 10px;
  border-top: 1px solid rgba(255,255,255,0.06);
  display: flex; justify-content: flex-start; gap: 6px;
}
.radar2-card-bt {
  padding: 4px 10px;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.3);
  color: rgba(255,255,255,0.85);
  font-family: inherit;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  cursor: pointer;
}
.radar2-card-bt:hover { color: #fff; border-color: rgba(255,255,255,0.7); background: rgba(255,255,255,0.05); }

/* ───── Footer status bar ──────────────────────────────────────────────── */
.radar2-statusbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 14px;
  background: rgba(0,0,0,0.55);
  border: 1px solid rgba(255,255,255,0.12);
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
  margin-top: 6px;
}
.radar2-status-l, .radar2-status-r, .radar2-status-c { display: flex; align-items: center; gap: 8px; }
.radar2-status-dot { width: 6px; height: 6px; background: #6bff9a; box-shadow: 0 0 6px #6bff9a; }
.radar2-status-c { color: rgba(255,255,255,0.4); letter-spacing: 0.08em; text-transform: none; font-size: 10px; }
.radar2-status-c b { color: rgba(255,255,255,0.7); font-weight: 400; }
.radar2-sypher-mark {
  color: #fff !important;
  font-weight: 700;
  letter-spacing: 0.32em;
  font-size: 10px;
  text-shadow: 0 0 6px rgba(255,255,255,0.5);
}
.radar2-sypher-sep { color: rgba(255,255,255,0.35); margin: 0 8px; }
.radar2-statusbar b { color: rgba(255,255,255,0.85); font-weight: 700; }

/* ───── Mobile ─────────────────────────────────────────────────────────── */
@media (max-width: 1280px) {
  .radar2-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 960px) {
  .radar2-grid { grid-template-columns: repeat(2, 1fr); }
  .radar2-toolbar { gap: 8px; }
}
@media (max-width: 640px) {
  .radar2-grid { grid-template-columns: 1fr; }
}

/* ───── Risk badges (entry edge / slippage / low volume etc) ───────────── */
.radar2-risks {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 4px 12px 8px;
  border-top: 1px dashed rgba(255,170,80,0.22);
}
.radar2-risk {
  font-family: inherit;
  font-size: 9px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 2px 6px;
  background: rgba(255,170,80,0.1);
  border: 1px solid rgba(255,170,80,0.4);
  color: #ffb878;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

/* ───── Cinematic RadarSelect dropdown ──────────────────────────────────── */
.radar2-sel-wrap { position: relative; display: inline-block; min-width: 140px; }
.radar2-sel-trigger {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; height: 28px;
  padding: 0 10px;
  background: rgba(0,0,0,0.5);
  border: 1px solid rgba(255,255,255,0.25);
  color: #fff;
  font-family: 'Space Mono', ui-monospace, monospace;
  font-size: 11px; letter-spacing: 0.06em;
  cursor: pointer;
  transition: border-color 140ms ease, background 140ms ease;
  text-align: left;
}
.radar2-sel-trigger:hover { border-color: rgba(255,255,255,0.55); }
.radar2-sel-trigger.open { border-color: rgba(255,255,255,0.7); background: rgba(0,0,0,0.7); }
.radar2-sel-val { color: #fff; text-transform: uppercase; letter-spacing: 0.04em; }
.radar2-sel-caret { color: rgba(255,255,255,0.55); font-size: 10px; margin-left: 8px; }
.radar2-sel-menu {
  position: absolute; top: calc(100% + 4px); left: 0; min-width: 100%;
  z-index: 90;
  max-height: 320px; overflow-y: auto;
  background:
    repeating-linear-gradient(135deg, rgba(255,255,255,0.012) 0 2px, transparent 2px 5px),
    linear-gradient(180deg, rgba(255,255,255,0.045) 0%, rgba(255,255,255,0.018) 28%, rgba(255,255,255,0.008) 100%),
    #131318;
  border: 1px solid rgba(255,255,255,0.32);
  box-shadow: 0 0 0 1px rgba(0,0,0,0.6), 0 18px 36px -12px rgba(0,0,0,0.9);
  padding: 4px 0;
  white-space: nowrap;
}
.radar2-sel-opt {
  display: block; width: 100%;
  padding: 6px 14px;
  background: transparent; border: 0; outline: none;
  color: rgba(255,255,255,0.85);
  font-family: 'Space Mono', ui-monospace, monospace;
  font-size: 11px; letter-spacing: 0.04em;
  text-align: left; text-transform: uppercase;
  cursor: pointer;
  transition: background 100ms ease, color 100ms ease;
}
.radar2-sel-opt:hover { background: rgba(255,255,255,0.06); color: #fff; }
.radar2-sel-opt.on { color: #fff; background: rgba(255,255,255,0.08); }
.radar2-sel-opt.on::before { content: '◆ '; color: #fff; }

/* Multi-select extras */
.radar2-sel-multi { min-width: 180px; }
.radar2-sel-actions {
  display: flex; gap: 4px;
  padding: 4px 8px 6px;
  border-bottom: 1px dashed rgba(255,255,255,0.12);
  margin-bottom: 4px;
}
.radar2-sel-action {
  flex: 1;
  padding: 4px 6px;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.18);
  color: rgba(255,255,255,0.6);
  font-family: 'Space Mono', ui-monospace, monospace;
  font-size: 9px; letter-spacing: 0.18em; text-transform: uppercase;
  cursor: pointer;
  transition: all 120ms ease;
}
.radar2-sel-action:hover { border-color: rgba(255,255,255,0.5); color: #fff; }
.radar2-sel-opt.multi { display: flex; align-items: center; gap: 8px; }
.radar2-sel-opt.multi::before { content: none; }
.radar2-sel-check {
  display: inline-block;
  width: 12px; text-align: center;
  color: rgba(255,255,255,0.4);
  font-size: 11px;
}
.radar2-sel-opt.multi.on .radar2-sel-check { color: #fff; }
.radar2-sel-opt.multi.on { background: rgba(255,255,255,0.06); }
