/* TB Bot Monitoring Dashboard - Black/White Design System */
#botpanel-admin {
  --tb-bg: #000000;
  --tb-surface: #080808;
  --tb-surface-2: #0d0d0d;
  --tb-surface-3: #111111;
  --tb-border: #222222;
  --tb-border-soft: #171717;
  --tb-text: #ffffff;
  --tb-muted: #9a9a9a;
  --tb-dim: #5f5f5f;
  --tb-hover: #151515;
  --tb-active: #ffffff;
  --tb-danger: #5f1118;
  --tb-danger-text: #d8b8bc;
  --tb-green: #7ac99a;
  --tb-red: #d16b72;
  --tb-amber: #c6924e;
  --tb-blue: #7fa6d8;
  --tb-cyan: #7fc8d6;
  --tb-shadow: rgba(255, 255, 255, 0.05);
  --p-bg: var(--tb-bg);
  --p-card: var(--tb-surface);
  --p-card2: var(--tb-surface-2);
  --p-border: var(--tb-border);
  --p-muted: var(--tb-muted);
  --p-dim: var(--tb-dim);
  --p-green: var(--tb-green);
  --p-red: var(--tb-red);
  --p-sans: Aptos, "Segoe UI Variable", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --p-mono: Aptos, "Segoe UI Variable", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  min-height: calc(100vh - 76px);
  padding: 24px 28px 30px;
  background: var(--tb-bg);
  color: var(--tb-text);
  font-family: var(--p-sans);
  font-weight: 560;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

#botpanel-admin * {
  box-sizing: border-box;
  letter-spacing: 0;
}

#botpanel-admin .tb-shell {
  width: min(100%, 1540px);
  max-width: 1540px;
  margin: 0 auto;
  min-width: 0;
}

.tb-monitor-shell {
  display: grid;
  gap: 18px;
  min-width: 0;
}

#botpanel-admin section,
#botpanel-admin article,
#botpanel-admin .tb-card,
#botpanel-admin .tb-card-body,
#botpanel-admin .tb-scanner-section,
#botpanel-admin .tb-scanner-card {
  min-width: 0;
  max-width: 100%;
}

.tb-monitor-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 24px;
  border: 1px solid var(--tb-border);
  border-radius: 16px;
  background: linear-gradient(180deg, #0b0b0b 0%, #050505 100%);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.38);
}

.tb-monitor-titleblock {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.tb-monitor-titleblock h1 {
  margin: 0;
  color: var(--tb-text);
  font: 760 28px/1.08 var(--p-sans);
}

.tb-monitor-titleblock p {
  max-width: 820px;
  margin: 0;
  color: var(--tb-muted);
  font-size: 14px;
  line-height: 1.65;
}

.tb-monitor-badges,
.tb-monitor-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.tb-monitor-actions {
  justify-content: flex-end;
}

.tb-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 27px;
  padding: 6px 10px;
  border: 1px solid var(--tb-border);
  border-radius: 999px;
  background: var(--tb-surface-2);
  color: var(--tb-muted);
  font: 700 10px/1 var(--p-sans);
  text-transform: uppercase;
  white-space: nowrap;
}

.tb-chip-white {
  border-color: #343434;
  background: #101010;
  color: var(--tb-text);
}

.tb-chip-locked {
  border-color: #242424;
  background: #090909;
  color: #777777;
}

.tb-chip-red {
  border-color: #562029;
  background: #160609;
  color: var(--tb-danger-text);
}

.tb-bot-controls {
  padding: 0;
  border: 0;
  background: transparent;
}

.tb-control-btn {
  min-width: 112px;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 9px 13px 9px 10px;
  border: 1px solid var(--tb-border);
  border-radius: 12px;
  background: var(--tb-surface);
  color: var(--tb-text);
  cursor: pointer;
  text-align: left;
  transition: background .16s ease, border-color .16s ease, color .16s ease, transform .16s ease, box-shadow .16s ease;
}

.tb-control-btn:hover {
  transform: translateY(-1px);
  border-color: #3a3a3a;
  background: var(--tb-hover);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.24);
}

.tb-control-start {
  border-color: #d6d6d6;
  background: #d6d6d6;
  color: #080808;
}

.tb-control-stop {
  color: var(--tb-text);
  background: #0a0a0a;
}

.tb-control-icon {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border-radius: 8px;
  background: #151515;
  color: var(--tb-muted);
}

.tb-control-start .tb-control-icon {
  color: #000000;
  background: rgba(0, 0, 0, 0.08);
}

.tb-control-copy {
  display: grid;
  gap: 0;
  line-height: 1;
}

.tb-control-copy b {
  font: 750 12px/1 var(--p-sans);
}

.tb-control-copy small {
  color: #777777;
  font: 600 10px/1.1 var(--p-sans);
  white-space: nowrap;
}

.tb-control-btn:disabled {
  opacity: .32;
  color: #707070;
  background: #080808;
  border-color: #1d1d1d;
  cursor: not-allowed;
  filter: grayscale(1);
  transform: none;
  box-shadow: none;
}

.tb-status-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.tb-stat-card,
.tb-card,
.tb-scanner-stats div,
.tb-mini-metric,
.tb-execution-box {
  border: 1px solid var(--tb-border);
  border-radius: 16px;
  background: var(--tb-surface);
}

.tb-stat-card {
  min-height: 92px;
  display: grid;
  align-content: space-between;
  padding: 15px;
  transition: background .16s ease, border-color .16s ease;
}

.tb-stat-card:hover,
.tb-card:hover {
  border-color: #303030;
  background: #0a0a0a;
}

.tb-stat-card span,
.tb-mini-metric small,
.tb-scanner-stats span,
.tb-execution-box span,
.tb-data-k {
  color: var(--tb-dim);
  font: 740 10px/1.25 var(--p-sans);
  text-transform: uppercase;
  letter-spacing: .04em;
}

.tb-stat-card strong {
  color: var(--tb-text);
  font: 760 15px/1.25 var(--p-sans);
  overflow-wrap: anywhere;
}

.muted,
.tb-stat-card strong.muted {
  color: var(--tb-muted);
}

.green,
.tb-data-v.green,
.tb-stat-card strong.green {
  color: var(--tb-green);
}

.red,
.tb-data-v.red,
.tb-stat-card strong.red {
  color: var(--tb-red);
}

.tb-data-v.amber,
.amber {
  color: var(--tb-amber);
}

.tb-data-v.blue,
.blue {
  color: var(--tb-blue);
}

.tb-monitor-main {
  display: grid;
  grid-template-columns: minmax(0, 1.48fr) minmax(340px, .62fr);
  gap: 18px;
  align-items: stretch;
}

.tb-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.22);
  transition: background .16s ease, border-color .16s ease;
}

.tb-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--tb-border-soft);
  background: #090909;
}

.tb-card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 18px 20px 20px;
}

.tb-card-title {
  margin: 0;
  color: var(--tb-text);
  font: 740 15px/1.25 var(--p-sans);
}

.tb-card-sub {
  margin-top: 4px;
  color: var(--tb-muted);
  font-size: 12px;
  line-height: 1.5;
}

.tb-chart-head-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.tb-chart-candidate-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  min-width: 0;
}

.tb-chart-candidate-strip[hidden] {
  display: none !important;
}

.tb-chart-candidate-strip span {
  min-width: 0;
  display: grid;
  gap: 5px;
  padding: 9px 10px;
  border: 1px solid var(--tb-border);
  border-radius: 8px;
  background: #050505;
}

.tb-chart-candidate-strip small {
  color: var(--tb-dim);
  font: 700 10px/1 var(--p-sans);
}

.tb-chart-candidate-strip b {
  min-width: 0;
  overflow: hidden;
  color: var(--tb-text);
  font: 760 12px/1.2 var(--p-sans);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tb-mini-metric {
  min-width: 112px;
  display: grid;
  gap: 6px;
  padding: 10px 11px;
}

.tb-mini-metric b,
.tb-data-v,
.tb-scanner-stats b,
.tb-symbol-main,
.tb-symbol-price,
.tb-num {
  color: var(--tb-text);
  font-family: var(--p-mono);
  font-variant-numeric: tabular-nums;
}

.tb-terminal-chart {
  flex: 1;
  min-height: 590px;
  width: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
  border: 1px solid var(--tb-border);
  border-radius: 16px;
  background: #030303;
}

.tb-monitor-chart .tb-card-body {
  display: flex;
}

.tb-monitor-chart .tb-chart-canvas {
  min-height: 490px;
}

.tb-chart-toolbar {
  min-height: 54px;
  display: grid;
  grid-template-columns: minmax(150px, .55fr) minmax(360px, 1.45fr);
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--tb-border-soft);
  background: #070707;
}

.tb-chart-symbol {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.tb-symbol-main {
  font-weight: 800;
}

.tb-symbol-price {
  color: var(--tb-muted);
}

.tb-chart-legend {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px 12px;
  flex-wrap: wrap;
  color: var(--tb-muted);
  font-size: 10px;
  font-weight: 650;
  white-space: nowrap;
}

.tb-chart-legend span,
.tb-legend-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.tb-legend-toggle {
  border: 0;
  background: transparent;
  color: var(--tb-muted);
  font: 700 10px/1 var(--p-sans);
  padding: 0;
  cursor: pointer;
  opacity: .6;
}

.tb-legend-toggle.active,
.tb-legend-toggle:hover {
  color: var(--tb-text);
  opacity: 1;
}

.tb-legend-dot {
  width: 8px;
  height: 8px;
  display: inline-block;
  border-radius: 50%;
}

.tb-legend-dot.candle { background: linear-gradient(135deg, var(--tb-green) 0 50%, var(--tb-red) 50% 100%); color: var(--tb-green); }
.tb-legend-dot.ott { background: var(--tb-amber); color: var(--tb-amber); }
.tb-legend-dot.mavg { background: var(--tb-cyan); color: var(--tb-cyan); }
.tb-legend-dot.ema { background: var(--tb-blue); color: var(--tb-blue); }
.tb-legend-dot.sr { background: linear-gradient(135deg, var(--tb-green) 0 50%, var(--tb-red) 50% 100%); color: var(--tb-green); }
.tb-legend-dot.raw { background: rgba(198, 146, 78, .42); color: rgba(198, 146, 78, .42); }
.tb-legend-dot.bot { background: var(--tb-green); color: var(--tb-green); }

.tb-chart-canvas {
  flex: 1;
  position: relative;
}

.tb-chart-loading {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, .62);
  color: var(--tb-muted);
  font: 700 12px/1 var(--p-sans);
  transition: opacity .16s ease, visibility .16s ease;
}

.tb-chart-loading.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.tb-chart-footer {
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 14px;
  border-top: 1px solid var(--tb-border-soft);
  background: #060606;
  color: var(--tb-dim);
  font: 700 10px/1.2 var(--p-mono);
  text-transform: uppercase;
}

.tb-hover-tooltip {
  position: absolute;
  z-index: 5;
  min-width: 218px;
  display: grid;
  gap: 5px;
  padding: 10px 12px;
  border: 1px solid #2a2a2a;
  border-radius: 10px;
  background: rgba(5, 5, 5, .94);
  box-shadow: 0 18px 42px rgba(0, 0, 0, .42);
  pointer-events: none;
}

.tb-hover-tooltip div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  color: var(--tb-muted);
  font-size: 10px;
}

.tb-hover-tooltip b {
  color: var(--tb-text);
  font: 800 10px/1.2 var(--p-mono);
  text-align: right;
}

.tb-price-label-layer {
  position: absolute;
  top: 0;
  right: 8px;
  bottom: 0;
  z-index: 6;
  width: 124px;
  pointer-events: none;
}

.tb-price-tag {
  position: absolute;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 7px;
  min-height: 18px;
  min-width: 72px;
  padding: 2px 6px;
  border-left: 2px solid;
  border-radius: 4px;
  background: rgba(3, 7, 18, .9);
  color: var(--tb-text);
  font: 800 9px/1.05 var(--p-mono);
  white-space: nowrap;
  box-shadow: 0 6px 16px rgba(0, 0, 0, .2);
  backdrop-filter: blur(6px);
}

.tb-price-tag::before {
  content: "";
  position: absolute;
  top: 50%;
  right: 100%;
  width: 10px;
  height: 1px;
  background: currentColor;
  opacity: .65;
}

.tb-price-tag b {
  color: currentColor;
}

.tb-price-tag span {
  color: currentColor;
  opacity: .82;
}

.tb-side-stack {
  display: grid;
  gap: 14px;
  align-content: start;
}

.tb-opportunity-symbol {
  margin-bottom: 8px;
  color: var(--tb-text);
  font: 760 22px/1.18 var(--p-mono);
}

.tb-opportunity-score {
  margin-bottom: 14px;
  color: var(--tb-muted);
  font: 700 12px/1.25 var(--p-mono);
}

.tb-opportunity-quality {
  display: grid;
  gap: 6px;
  margin-bottom: 14px;
}

.tb-opportunity-quality .tb-data-row {
  min-height: 30px;
  padding: 7px 0;
}

.tb-execution-box {
  display: grid;
  gap: 5px;
  margin-bottom: 14px;
  padding: 13px;
  background: #0b0b0b;
}

.tb-execution-box b {
  color: var(--tb-text);
  font: 760 13px/1.2 var(--p-mono);
}

.tb-execution-box small,
.tb-data-desc,
.tb-check-list li {
  color: var(--tb-muted);
}

.tb-check-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tb-check-list li {
  position: relative;
  padding-left: 16px;
  font-size: 12px;
  line-height: 1.45;
}

.tb-check-list li::before {
  content: "";
  position: absolute;
  top: .55em;
  left: 0;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ffffff;
  opacity: .72;
}

.tb-data-row {
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--tb-border-soft);
}

.tb-data-row:last-child {
  border-bottom: 0;
}

.tb-data-v {
  font: 700 12px/1.25 var(--p-mono);
  text-align: right;
}

.tb-data-v.muted {
  color: var(--tb-muted);
}

.tb-data-desc {
  margin-top: 4px;
  padding-top: 10px;
  border-top: 1px solid var(--tb-border-soft);
  font-size: 11px;
  line-height: 1.5;
}

.tb-scanner-card .tb-card-head {
  align-items: flex-start;
}

.tb-filter-tabs {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 6px;
}

.tb-filter-tabs button,
.tb-btn,
.tb-profile-card summary em {
  min-height: 33px;
  border: 1px solid var(--tb-border);
  border-radius: 999px;
  background: #090909;
  color: var(--tb-muted);
  font: 700 10.5px/1 var(--p-sans);
  text-transform: uppercase;
  cursor: pointer;
  transition: background .16s ease, border-color .16s ease, color .16s ease, transform .16s ease;
}

.tb-filter-tabs button {
  padding: 8px 11px;
}

.tb-filter-tabs button:hover,
.tb-filter-tabs button.active {
  border-color: #3d3d3d;
  background: #141414;
  color: var(--tb-text);
}

.tb-scanner-stats {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.tb-scanner-stats div {
  display: grid;
  gap: 6px;
  padding: 12px;
  border-radius: 14px;
  background: #090909;
}

.tb-scanner-insights {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, .96fr) minmax(0, 1.05fr);
  gap: 18px;
  margin-bottom: 18px;
}

.tb-scanner-insights .tb-scanner-stats {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.tb-scanner-funnel-card {
  margin-bottom: 0;
}

.tb-funnel-stats {
  margin-bottom: 12px;
}

.tb-funnel-decision {
  padding: 11px 12px;
  border: 1px solid rgba(148, 163, 184, .18);
  border-radius: 14px;
  background: #070707;
  color: var(--tb-muted);
  font-size: 12px;
  font-weight: 760;
}

.tb-funnel-decision.success {
  border-color: rgba(34, 197, 94, .28);
  color: #86efac;
}

.tb-funnel-decision.warning {
  border-color: rgba(198, 146, 78, .22);
  color: #d4b27a;
}

.tb-funnel-top-blockers {
  margin-top: 8px;
  color: var(--tb-dim);
  font-size: 12px;
  line-height: 1.45;
}

.tb-funnel-reasons {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--tb-border-soft);
  border-radius: 14px;
  background: #070707;
}

.tb-funnel-reasons > span {
  color: var(--tb-dim);
  font-size: 11px;
  font-weight: 720;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.tb-funnel-reasons div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tb-funnel-reasons div span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 28px;
  padding: 6px 9px;
  border: 1px solid rgba(148, 163, 184, .18);
  border-radius: 999px;
  background: #0b0b0b;
}

.tb-funnel-reasons em {
  color: var(--tb-muted);
  font-style: normal;
  font-size: 12px;
}

.tb-funnel-reasons b {
  color: var(--tb-text);
  font-family: var(--p-mono);
  font-size: 12px;
}

.tb-rejection-bars {
  display: grid;
  gap: 9px;
  margin-top: 12px;
}

.tb-rejection-row {
  display: grid;
  gap: 7px;
}

.tb-rejection-row > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--tb-muted);
  font-size: 12px;
}

.tb-rejection-row b {
  color: var(--tb-text);
  font-family: var(--p-mono);
  font-size: 12px;
}

.tb-rejection-row i {
  display: block;
  height: 5px;
  width: 100%;
  overflow: hidden;
  border-radius: 999px;
  background: #111111;
}

.tb-rejection-row i::before {
  content: "";
  display: block;
  width: var(--w, 0%);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(209, 107, 114, .54), rgba(198, 146, 78, .46));
}

.tb-quality-list {
  display: grid;
  gap: 8px;
}

.tb-table-wrap {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  border: 1px solid var(--tb-border-soft);
  border-radius: 14px;
  background: #050505;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
}

.tb-log-table {
  min-width: 1080px;
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 12px;
}

.tb-scanner-table {
  min-width: 1320px;
}

.tb-scanner-card .tb-table-wrap {
  max-height: 440px;
  overflow-y: auto;
}

.tb-log-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 11px 12px;
  border-bottom: 1px solid var(--tb-border);
  background: #0b0b0b;
  color: var(--tb-dim);
  font: 760 10px/1.2 var(--p-sans);
  text-align: left;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.tb-log-table td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--tb-border-soft);
  color: var(--tb-muted);
  vertical-align: middle;
}

.tb-log-table tbody tr:hover {
  background: #0b0b0b;
}

.tb-log-table td:first-child,
.tb-scanner-table td:first-child {
  color: var(--tb-text);
  font-family: var(--p-mono);
}

.tb-row-best {
  background: rgba(34, 197, 94, .08);
  box-shadow: inset 2px 0 0 var(--tb-green);
}

.tb-row-muted {
  opacity: .5;
}

.tb-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 5px 9px;
  border: 1px solid var(--tb-border);
  border-radius: 999px;
  background: #090909;
  color: var(--tb-muted);
  font: 720 10px/1 var(--p-sans);
  text-transform: uppercase;
  white-space: nowrap;
}

.tb-badge.success {
  border-color: rgba(34, 197, 94, .42);
  background: rgba(34, 197, 94, .12);
  color: #86efac;
}

.tb-badge.error {
  border-color: rgba(239, 68, 68, .42);
  background: rgba(239, 68, 68, .12);
  color: #fca5a5;
}

.tb-badge.neutral {
  border-color: rgba(59, 130, 246, .34);
  background: rgba(59, 130, 246, .10);
  color: #93c5fd;
}

.tb-badge.warning,
.tb-badge.info {
  border-color: rgba(198, 146, 78, .28);
  background: rgba(198, 146, 78, .08);
  color: #d4b27a;
}

.tb-table-empty {
  padding: 28px 12px;
  text-align: center;
  color: var(--tb-dim);
}

.tb-ops-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 18px;
  align-items: stretch;
}

.tb-two-col-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 24px;
}

.tb-empty {
  display: grid;
  gap: 5px;
  padding: 18px;
  border: 1px solid var(--tb-border-soft);
  border-radius: 14px;
  background: #070707;
  color: var(--tb-muted);
  text-align: left;
}

.tb-position-empty {
  min-height: 360px;
  align-content: center;
  justify-items: center;
  text-align: center;
}

.tb-position-empty[hidden] {
  display: none !important;
}

#tb-position-empty strong {
  color: var(--tb-text);
  font: 760 16px/1.3 var(--p-sans);
}

#tb-position-empty span {
  color: var(--tb-muted);
  font-size: 12px;
}

.tb-position-list[hidden],
#tb-position-actions[hidden] {
  display: none !important;
}

.tb-card-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 16px;
}

.tb-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
}

.tb-btn:hover {
  border-color: #3d3d3d;
  background: #141414;
  color: var(--tb-text);
  transform: translateY(-1px);
}

.tb-btn:disabled {
  opacity: .36;
  cursor: not-allowed;
  transform: none;
}

.tb-btn-danger:not(:disabled) {
  border-color: #55202a;
  background: #130609;
  color: var(--tb-danger-text);
}

.tb-panel-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.tb-log-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.tb-filter-input {
  min-height: 36px;
  width: 230px;
  border: 1px solid var(--tb-border);
  border-radius: 999px;
  background: #070707;
  color: var(--tb-text);
  padding: 0 13px;
  font: 600 12px/1 var(--p-sans);
}

.tb-filter-input::placeholder {
  color: var(--tb-dim);
}

.tb-live-log-card .tb-table-wrap {
  max-height: 390px;
}

.tb-profile-card {
  overflow: visible;
}

.tb-profile-card summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 18px;
  border-radius: 16px;
  cursor: pointer;
  list-style: none;
}

.tb-profile-card summary::-webkit-details-marker {
  display: none;
}

.tb-profile-card summary span {
  display: grid;
  gap: 5px;
}

.tb-profile-card summary b {
  color: var(--tb-text);
  font: 740 14px/1.25 var(--p-sans);
}

.tb-profile-card summary small {
  color: var(--tb-muted);
  font: 700 11px/1.35 var(--p-mono);
}

.tb-profile-card summary em {
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  font-style: normal;
  white-space: nowrap;
}

.tb-profile-card[open] summary em {
  color: var(--tb-text);
  border-color: #3d3d3d;
  background: #141414;
}

.tb-profile-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0 24px;
  border-top: 1px solid var(--tb-border-soft);
}

.tb-profile-grid div {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 0;
  border-bottom: 1px solid var(--tb-border-soft);
}

.tb-profile-grid span {
  color: var(--tb-muted);
  font-size: 11px;
}

.tb-profile-grid b {
  color: var(--tb-text);
  font: 700 11px/1.3 var(--p-mono);
  text-align: right;
}

.tb-profile-note {
  margin: 14px 0 0;
  padding: 12px;
  border: 1px solid var(--tb-border-soft);
  border-radius: 14px;
  background: #070707;
  color: var(--tb-muted);
  font-size: 12px;
  line-height: 1.5;
}

.tb-recommend-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 0, 0, .72);
}

.tb-recommend-modal.open {
  display: flex;
}

.tb-recommend-dialog {
  width: min(480px, 100%);
  padding: 20px;
  border: 1px solid var(--tb-border);
  border-radius: 16px;
  background: var(--tb-surface);
  box-shadow: 0 30px 70px rgba(0, 0, 0, .45);
}

.tb-recommend-modal-head h3 {
  margin: 0 0 8px;
  color: var(--tb-text);
  font: 760 16px/1.25 var(--p-sans);
}

.tb-recommend-modal-head p {
  margin: 0;
  color: var(--tb-muted);
  font-size: 12px;
  line-height: 1.6;
}

.tb-recommend-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 18px;
}

@media (max-width: 1280px) {
  .tb-status-grid,
  .tb-scanner-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .tb-scanner-insights {
    grid-template-columns: 1fr;
  }

  .tb-monitor-main,
  .tb-ops-grid {
    grid-template-columns: 1fr;
  }

  .tb-chart-toolbar {
    grid-template-columns: 1fr;
  }

  .tb-profile-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  #botpanel-admin {
    padding: 14px 12px 24px;
  }

  .tb-monitor-header {
    flex-direction: column;
    padding: 18px;
  }

  .tb-monitor-actions {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .tb-control-btn {
    width: 100%;
  }

  .tb-status-grid,
  .tb-scanner-stats,
  .tb-two-col-list,
  .tb-profile-grid {
    grid-template-columns: 1fr;
  }

  .tb-scanner-insights .tb-scanner-stats {
    grid-template-columns: 1fr;
  }

  .tb-terminal-chart {
    min-height: 430px;
  }

  .tb-monitor-chart .tb-chart-canvas {
    min-height: 330px;
  }

  .tb-card-head,
  .tb-panel-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .tb-filter-tabs {
    justify-content: flex-start;
  }

  .tb-log-tools {
    align-items: stretch;
    flex-direction: column;
  }

  .tb-filter-input {
    width: 100%;
  }
}

/* 2026-05 bot panel düzenleme: sabit üst hizalama ve derli toplu alt paneller */
#botpanel-admin {
  --tb-radius-panel: 8px;
  --tb-top-panel-height: 720px;
  --tb-card-pad-x: 18px;
  --tb-card-pad-y: 16px;
  --p-sans: Aptos, "Segoe UI Variable", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --p-mono: Aptos, "Segoe UI Variable", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  font-feature-settings: "cv02", "cv03", "cv04", "tnum";
  text-rendering: geometricPrecision;
}

#botpanel-admin .tb-shell {
  width: min(100%, 1480px);
  max-width: 1480px;
}

#botpanel-admin .tb-monitor-shell {
  gap: 16px;
}

#botpanel-admin .tb-monitor-header,
#botpanel-admin .tb-stat-card,
#botpanel-admin .tb-card,
#botpanel-admin .tb-scanner-stats div,
#botpanel-admin .tb-mini-metric,
#botpanel-admin .tb-execution-box,
#botpanel-admin .tb-table-wrap,
#botpanel-admin .tb-empty,
#botpanel-admin .tb-funnel-decision,
#botpanel-admin .tb-funnel-reasons,
#botpanel-admin .tb-profile-note,
#botpanel-admin .tb-recommend-dialog {
  border-radius: var(--tb-radius-panel);
}

#botpanel-admin .tb-monitor-header,
#botpanel-admin .tb-card,
#botpanel-admin .tb-stat-card {
  background: #050505;
  border-color: #202020;
  box-shadow: 0 18px 46px rgba(0, 0, 0, .26);
}

#botpanel-admin .tb-card:hover,
#botpanel-admin .tb-stat-card:hover {
  background: #070707;
  border-color: #343434;
}

#botpanel-admin .tb-card-head {
  min-height: 62px;
  padding: 15px var(--tb-card-pad-x) 13px;
  background: #080808;
  border-bottom-color: #1b1b1b;
}

#botpanel-admin .tb-card-body {
  min-height: 0;
  padding: var(--tb-card-pad-y) var(--tb-card-pad-x);
}

#botpanel-admin .tb-card-title {
  font-size: 14px;
  font-weight: 720;
  line-height: 1.2;
}

#botpanel-admin .tb-card-sub {
  color: #8d8d8d;
  font-size: 11.5px;
  font-weight: 520;
}

#botpanel-admin .tb-status-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

#botpanel-admin .tb-stat-card {
  min-height: 82px;
  padding: 13px 14px;
}

#botpanel-admin .tb-stat-card span,
#botpanel-admin .tb-mini-metric small,
#botpanel-admin .tb-scanner-stats span,
#botpanel-admin .tb-execution-box span,
#botpanel-admin .tb-data-k {
  color: #797979;
  letter-spacing: 0;
  font-weight: 680;
  text-transform: none;
}

#botpanel-admin #tb-performance-empty {
  display: none !important;
}

#botpanel-admin .tb-monitor-main {
  grid-template-columns: minmax(0, 1fr) 392px;
  gap: 16px;
  align-items: start;
}

#botpanel-admin .tb-monitor-chart,
#botpanel-admin .tb-opportunity-card {
  align-self: start;
  height: var(--tb-top-panel-height);
  max-height: var(--tb-top-panel-height);
  min-height: 0;
}

#botpanel-admin .tb-monitor-chart .tb-card-head {
  display: grid;
  grid-template-columns: minmax(78px, .14fr) minmax(0, 1fr);
  align-items: center;
  gap: 12px;
}

#botpanel-admin .tb-chart-candidate-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(92px, 1fr));
  gap: 6px;
}

#botpanel-admin .tb-chart-candidate-strip[hidden] {
  display: none !important;
}

#botpanel-admin .tb-mini-metric {
  min-width: 0;
  min-height: 50px;
  padding: 8px 9px;
  background: #050505;
  border-color: #202020;
}

#botpanel-admin .tb-mini-metric b {
  max-width: 100%;
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#botpanel-admin .tb-monitor-chart .tb-card-body {
  overflow: hidden;
}

#botpanel-admin .tb-terminal-chart {
  flex: 1 1 auto;
  height: 100%;
  min-height: 0;
  border-radius: var(--tb-radius-panel);
  background: #020202;
}

#botpanel-admin .tb-monitor-chart .tb-chart-canvas {
  flex: 1 1 auto;
  height: 100%;
  min-height: 0;
}

#botpanel-admin .tb-chart-toolbar {
  grid-template-columns: minmax(132px, .48fr) minmax(0, 1.52fr);
  min-height: 50px;
  padding: 10px 12px;
  background: #050505;
}

#botpanel-admin .tb-chart-legend {
  gap: 8px 10px;
  min-width: 0;
}

#botpanel-admin .tb-chart-footer {
  min-height: 34px;
  padding: 8px 12px;
  background: #050505;
}

#botpanel-admin .tb-side-stack {
  display: contents;
}

#botpanel-admin .tb-opportunity-card {
  grid-column: 2;
  grid-row: 1;
  width: 100%;
}

#botpanel-admin .tb-opportunity-card .tb-card-body {
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-color: #555 #080808;
  scrollbar-width: thin;
}

#botpanel-admin .tb-opportunity-symbol {
  font-size: 20px;
  line-height: 1.12;
  overflow-wrap: anywhere;
}

#botpanel-admin .tb-opportunity-score {
  margin-bottom: 12px;
}

#botpanel-admin .tb-opportunity-quality {
  gap: 4px;
}

#botpanel-admin .tb-opportunity-quality .tb-data-row,
#botpanel-admin .tb-decision-list .tb-data-row,
#botpanel-admin .tb-quality-list .tb-data-row {
  min-height: 34px;
  padding: 8px 0;
}

#botpanel-admin .tb-decision-card {
  grid-column: auto;
  grid-row: auto;
  width: 100%;
  max-height: none;
}

#botpanel-admin .tb-decision-card .tb-card-body {
  overflow: visible;
}

#botpanel-admin .tb-decision-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

#botpanel-admin .tb-decision-list .tb-data-row {
  min-height: 58px;
  align-items: flex-start;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  padding: 9px 11px;
  border: 1px solid #1f1f1f;
  border-radius: var(--tb-radius-panel);
  background: #070707;
}

#botpanel-admin .tb-decision-list .tb-data-v {
  text-align: left;
}

#botpanel-admin .tb-execution-box {
  padding: 12px;
  background: #080808;
  border-color: #242424;
}

#botpanel-admin .tb-check-list {
  gap: 8px;
}

#botpanel-admin .tb-check-list li::before {
  background: #d8d8d8;
}

#botpanel-admin .tb-scanner-section,
#botpanel-admin .tb-report-section,
#botpanel-admin .tb-log-section,
#botpanel-admin .tb-decision-section {
  display: grid;
  gap: 16px;
}

#botpanel-admin .tb-scanner-insights {
  grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr) minmax(0, 1fr);
  align-items: stretch;
  gap: 16px;
  margin-bottom: 0;
}

#botpanel-admin .tb-scanner-insights .tb-card {
  min-height: 260px;
}

#botpanel-admin .tb-scanner-insights .tb-card-body {
  justify-content: space-between;
}

#botpanel-admin .tb-scanner-stats {
  gap: 8px;
  margin-bottom: 12px;
}

#botpanel-admin .tb-scanner-stats div {
  min-height: 66px;
  padding: 11px 12px;
  background: #080808;
  border-color: #202020;
}

#botpanel-admin .tb-scanner-stats b {
  font-size: 15px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

#botpanel-admin .tb-funnel-reasons,
#botpanel-admin .tb-funnel-decision,
#botpanel-admin .tb-empty,
#botpanel-admin .tb-profile-note {
  background: #070707;
  border-color: #222222;
}

#botpanel-admin .tb-rejection-row i {
  height: 6px;
  background: #151515;
}

#botpanel-admin .tb-rejection-row i::before {
  background: linear-gradient(90deg, #f3f3f3, #8f8f8f);
}

#botpanel-admin .tb-scanner-card .tb-card-head,
#botpanel-admin .tb-forward-report-card .tb-card-head,
#botpanel-admin .tb-live-log-card .tb-card-head {
  display: grid;
  grid-template-columns: minmax(250px, 1fr) minmax(280px, auto);
  align-items: start;
}

#botpanel-admin .tb-filter-tabs {
  gap: 6px;
}

#botpanel-admin .tb-filter-tabs button,
#botpanel-admin .tb-btn,
#botpanel-admin .tb-profile-card summary em {
  min-height: 31px;
  border-radius: 999px;
  background: #050505;
  border-color: #262626;
  color: #9b9b9b;
  font-size: 10px;
}

#botpanel-admin .tb-filter-tabs button:hover,
#botpanel-admin .tb-filter-tabs button.active {
  background: #d4d4d4;
  border-color: #d4d4d4;
  color: #080808;
}

#botpanel-admin .tb-table-wrap {
  max-width: 100%;
  background: #030303;
  border-color: #202020;
  overflow: auto;
  scrollbar-color: #4b4b4b #080808;
  scrollbar-width: thin;
  contain: inline-size;
}

#botpanel-admin .tb-log-table {
  border-collapse: separate;
  border-spacing: 0;
}

#botpanel-admin .tb-log-table th {
  background: #080808;
  color: #9a9a9a;
  border-bottom-color: #252525;
  font-weight: 690;
  letter-spacing: 0;
}

#botpanel-admin .tb-log-table td {
  color: #b8b8b8;
  border-bottom-color: #161616;
  font-size: 11.5px;
  line-height: 1.45;
}

#botpanel-admin .tb-log-table tbody tr:hover {
  background: #0c0c0c;
}

#botpanel-admin .tb-scanner-card .tb-table-wrap {
  max-height: 430px;
}

#botpanel-admin .tb-ops-grid {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: start;
  gap: 16px;
}

#botpanel-admin .tb-position-card,
#botpanel-admin .tb-performance-card {
  height: 520px;
  max-height: 520px;
  min-height: 0;
}

#botpanel-admin .tb-position-card .tb-card-body,
#botpanel-admin .tb-performance-card .tb-card-body {
  overflow-y: auto;
  scrollbar-color: #555 #080808;
  scrollbar-width: thin;
}

#botpanel-admin .tb-symbol-performance-card {
  grid-column: 1 / -1;
}

#botpanel-admin .tb-two-col-list {
  gap: 9px;
}

#botpanel-admin .tb-two-col-list .tb-data-row {
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid #1f1f1f;
  border-radius: var(--tb-radius-panel);
  background: #070707;
}

#botpanel-admin .tb-data-v {
  min-width: 0;
  overflow-wrap: anywhere;
}

#botpanel-admin .tb-report-stats {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

#botpanel-admin .tb-forward-report-card .tb-table-wrap,
#botpanel-admin .tb-live-log-card .tb-table-wrap,
#botpanel-admin .tb-symbol-performance-card .tb-table-wrap {
  max-height: 360px;
}

#botpanel-admin .tb-panel-toolbar {
  padding: 10px;
  border: 1px solid #1f1f1f;
  border-radius: var(--tb-radius-panel);
  background: #060606;
}

#botpanel-admin .tb-filter-input {
  border-radius: var(--tb-radius-panel);
  background: #030303;
  border-color: #272727;
}

#botpanel-admin .tb-profile-card summary {
  padding: 15px 18px;
  border-radius: var(--tb-radius-panel);
  background: #050505;
}

#botpanel-admin .tb-profile-grid {
  gap: 10px;
  border-top: 0;
}

#botpanel-admin .tb-profile-grid div {
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid #1f1f1f;
  border-radius: var(--tb-radius-panel);
  background: #070707;
}

@media (max-width: 1320px) {
  #botpanel-admin .tb-scanner-stats,
  #botpanel-admin .tb-report-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  #botpanel-admin .tb-status-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  #botpanel-admin .tb-ops-grid {
    grid-template-columns: 1fr;
  }

  #botpanel-admin .tb-monitor-chart,
  #botpanel-admin .tb-opportunity-card {
    height: 660px;
    max-height: 660px;
  }

  #botpanel-admin .tb-scanner-insights {
    grid-template-columns: 1fr;
  }

  #botpanel-admin .tb-opportunity-card,
  #botpanel-admin .tb-decision-card {
    grid-column: auto;
    grid-row: auto;
  }

  #botpanel-admin .tb-decision-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  #botpanel-admin .tb-position-card,
  #botpanel-admin .tb-performance-card {
    height: 560px;
    max-height: 560px;
  }

  #botpanel-admin .tb-scanner-card .tb-card-head,
  #botpanel-admin .tb-forward-report-card .tb-card-head,
  #botpanel-admin .tb-live-log-card .tb-card-head {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  #botpanel-admin {
    --tb-top-panel-height: 560px;
    --tb-card-pad-x: 14px;
    --tb-card-pad-y: 14px;
  }

  #botpanel-admin .tb-monitor-header,
  #botpanel-admin .tb-card-head,
  #botpanel-admin .tb-panel-toolbar,
  #botpanel-admin .tb-profile-card summary {
    align-items: stretch;
    flex-direction: column;
  }

  #botpanel-admin .tb-status-grid,
  #botpanel-admin .tb-scanner-stats,
  #botpanel-admin .tb-report-stats,
  #botpanel-admin .tb-two-col-list,
  #botpanel-admin .tb-profile-grid {
    grid-template-columns: 1fr;
  }

  #botpanel-admin .tb-monitor-chart,
  #botpanel-admin .tb-opportunity-card {
    height: var(--tb-top-panel-height);
    max-height: var(--tb-top-panel-height);
  }

  #botpanel-admin .tb-monitor-chart .tb-card-head {
    grid-template-columns: 1fr;
  }

  #botpanel-admin .tb-chart-candidate-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #botpanel-admin .tb-decision-list {
    grid-template-columns: 1fr;
  }

  #botpanel-admin .tb-chart-toolbar {
    grid-template-columns: 1fr;
  }

  #botpanel-admin .tb-chart-legend {
    justify-content: flex-start;
  }

  #botpanel-admin .tb-chart-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  #botpanel-admin .tb-log-tools,
  #botpanel-admin .tb-filter-input {
    width: 100%;
  }
}
