/* ============================================================
   Bots page — 1:1 with design screenshot
   ============================================================ */
.bt {
  --bt-card: #14171C;
  --bt-line: #21262E;
  --bt-muted: #848E9C;
  --bt-white: #EAECEF;
  --bt-gold: #F0B90B;
  --bt-green: #0ECB81;
  --bt-red: #F6465D;
}

/* ---------- Title row ---------- */
.bt-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin: 0 0 11px;
}
.bt-head-l {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
}
.bt-head-ico {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  color: var(--bt-gold);
  background: rgba(240, 185, 11, 0.12);
  border: 1px solid rgba(240, 185, 11, 0.22);
  margin-top: 2px;
}
.bt-h1 {
  margin: 0;
  font-size: 21px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: #fff;
}
.bt-h1-sub {
  margin: 3px 0 0;
  font-size: 10.5px;
  line-height: 1.35;
  color: var(--bt-muted);
  white-space: nowrap;
}
.bt-create {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--bt-gold);
  color: #0B0E11;
  font-size: 11.5px;
  font-weight: 700;
  white-space: nowrap;
  margin-top: 3px;
}
.bt-create svg { width: 13px; height: 13px; stroke-width: 3; }

/* ---------- Summary strip ---------- */
.bt-summary {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: var(--bt-card);
  border: 1px solid var(--bt-line);
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 12px;
}
.bt-sum {
  padding: 12px 10px 13px;
  position: relative;
  z-index: 1;
}
.bt-sum + .bt-sum { border-left: 1px solid var(--bt-line); }
.bt-sum-k {
  font-size: 9.5px;
  font-weight: 500;
  color: var(--bt-muted);
  white-space: nowrap;
}
.bt-sum-v {
  margin-top: 7px;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.bt-sum-v.xl { font-size: 19px; }
.bt-sum-d {
  margin-top: 5px;
  font-size: 9.5px;
  font-weight: 500;
}
.bt-sum-ghost {
  position: absolute;
  top: 50%;
  left: 26%;
  transform: translate(-50%, -50%);
  opacity: 0.045;
  z-index: 0;
  pointer-events: none;
}

/* ---------- Filter tabs ---------- */
.bt-filters {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-bottom: 1px solid var(--bt-line);
  margin-bottom: 11px;
}
.bt-tabs {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.bt-tabs::-webkit-scrollbar { display: none; }
.bt-tab {
  position: relative;
  flex-shrink: 0;
  padding: 9px 1px 11px;
  font-size: 12px;
  font-weight: 500;
  color: var(--bt-muted);
  white-space: nowrap;
}
.bt-tab.is-on { color: var(--bt-gold); font-weight: 600; }
.bt-tab.is-on::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  border-radius: 2px 2px 0 0;
  background: var(--bt-gold);
}
.bt-filter-btn {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: var(--bt-muted);
  margin-bottom: 4px;
}
.bt-filter-btn svg { width: 15px; height: 15px; }

/* ---------- Bot rows ---------- */
.bt-row {
  display: grid;
  grid-template-columns: 32px minmax(0, 1.3fr) minmax(0, 0.62fr) minmax(0, 0.66fr) 52px 32px;
  align-items: center;
  gap: 5px;
  background: var(--bt-card);
  border: 1px solid var(--bt-line);
  border-radius: 12px;
  padding: 11px 9px;
  margin-bottom: 8px;
}
.bt-row .crypto-avatar { width: 32px; height: 32px; font-size: 13px; }

.bt-row-id { min-width: 0; }
.bt-pair {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: nowrap;
  min-width: 0;
}
.bt-pair .nm {
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.bt-badge {
  flex-shrink: 0;
  font-size: 8px;
  font-weight: 700;
  padding: 2px 5px;
  border-radius: 4px;
  line-height: 1.25;
  white-space: nowrap;
}
.bt-badge-fut { background: rgba(240, 185, 11, 0.15); color: var(--bt-gold); }
.bt-badge-spot { background: rgba(14, 203, 129, 0.15); color: var(--bt-green); }
.bt-meta {
  margin-top: 4px;
  font-size: 9px;
  color: var(--bt-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bt-state {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 5px;
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: 0.03em;
}
.bt-state i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}
.bt-state.on { color: var(--bt-green); }
.bt-state.pause { color: var(--bt-gold); }
.bt-state.off { color: var(--bt-muted); }

.bt-col-k {
  font-size: 8.5px;
  color: var(--bt-muted);
  white-space: nowrap;
}
.bt-col-v {
  margin-top: 5px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}
.bt-col-d {
  margin-top: 4px;
  font-size: 8.5px;
  font-weight: 500;
  white-space: nowrap;
}
.bt-spark {
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  padding-top: 12px;
}
.bt-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.bt-actions .k { font-size: 8.5px; color: var(--bt-muted); }
.bt-actions .dots {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  color: var(--bt-white);
}
.bt-actions .dots svg { width: 15px; height: 15px; }

/* ---------- Promo ---------- */
.bt-promo {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bt-card);
  border: 1px solid var(--bt-line);
  border-radius: 14px;
  padding: 12px;
  margin: 11px 0;
}
.bt-promo-art { flex-shrink: 0; }
.bt-promo-body { min-width: 0; flex: 1; }
.bt-promo-body h3 {
  margin: 0;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--bt-gold);
}
.bt-promo-body p {
  margin: 4px 0 0;
  font-size: 9.5px;
  line-height: 1.4;
  color: var(--bt-muted);
}
.bt-promo-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  padding: 9px 14px;
  border-radius: 9px;
  border: 1px solid var(--bt-gold);
  color: var(--bt-gold);
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

/* ---------- Performance overview ---------- */
.bt-perf {
  background: var(--bt-card);
  border: 1px solid var(--bt-line);
  border-radius: 14px;
  padding: 12px;
  margin-bottom: 4px;
}
.bt-perf-h {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.bt-perf-h h2 {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  letter-spacing: -0.01em;
}
.bt-range {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 9px;
  border-radius: 9px;
  background: #16191F;
  border: 1px solid #262B33;
  color: var(--bt-white);
  font-size: 10.5px;
  font-weight: 500;
  white-space: nowrap;
}
.bt-range svg { width: 12px; height: 12px; color: var(--bt-muted); }

.bt-perf-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin: 12px 0 4px;
  padding: 11px 0;
  border-top: 1px solid var(--bt-line);
  border-bottom: 1px solid var(--bt-line);
}
.bt-perf-stat { padding: 0 9px; }
.bt-perf-stat + .bt-perf-stat { border-left: 1px solid var(--bt-line); }
.bt-perf-stat .k {
  display: block;
  font-size: 9.5px;
  color: var(--bt-muted);
  white-space: nowrap;
}
.bt-perf-stat .v {
  display: block;
  margin-top: 6px;
  font-size: 13.5px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
}
.bt-perf-chart {
  width: 100%;
  height: 178px;
  margin-top: 8px;
}

.bt-text-green { color: var(--bt-green); }
.bt-text-red { color: var(--bt-red); }
.bt-text-gold { color: var(--bt-gold); }
.bt-text-muted { color: var(--bt-muted); }

@media (max-width: 430px) {
  .bt-h1-sub { font-size: 9.5px; }
  .bt-create { padding: 9px 10px; font-size: 10.5px; }
  .bt-sum { padding: 11px 7px 12px; }
  .bt-sum-k { font-size: 8.5px; }
  .bt-sum-v { font-size: 12.5px; }
  .bt-sum-v.xl { font-size: 17px; }
  .bt-perf-stat { padding: 0 6px; }
  .bt-perf-stat .v { font-size: 12px; }
}
