/* trade1v1.fun ($1V1) — Clean, Calm, High-Precision Solana Spot Trading Terminal & 1v1 Arena
   Axiom.trade x Linear x FACEIT — Zero visual clutter, crisp 1m–4h charts, instant spot BUY/SELL */

:root {
  color-scheme: dark;
  --bg: #060608;
  --panel: #0b0b0f;
  --row: #121218;
  --border: rgba(255, 255, 255, 0.08);
  --border-hi: rgba(255, 255, 255, 0.16);
  --lime: #b8ff00;
  --red: #ff3b3b;
  --amber: #f59e0b;
  --cyan: #38bdf8;
  --text: #f4f4f6;
  --label: #9ca3af;
  --muted: #646672;
  --font-display: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-ui: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --ease-expo: cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  scrollbar-width: thin;
  scrollbar-color: #272732 #060608;
}

*::-webkit-scrollbar { width: 5px; height: 5px; }
*::-webkit-scrollbar-track { background: #060608; }
*::-webkit-scrollbar-thumb { background: #272732; border-radius: 2px; }

::selection { background: var(--lime); color: #000; }

html, body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 13px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

#shader-bg-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
  opacity: 0.45;
}

.topbar, .view-pane, .modal-mask, .toast-stack {
  position: relative;
  z-index: 1;
}

.topbar {
  background: rgba(8, 8, 11, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.broadcast-strip, .ws-col, .flat-panel, .flat-modal {
  background: rgba(11, 11, 15, 0.94);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.micro-lbl {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--label);
}
.text-lime { color: var(--lime) !important; }
.text-red { color: var(--red) !important; }
.text-amber { color: var(--amber) !important; }
.text-cyan { color: var(--cyan) !important; }
.text-muted { color: var(--muted) !important; }
.text-right { text-align: right; }
.hidden { display: none !important; }

button, input { font-family: inherit; color: inherit; background: none; border: none; outline: none; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }

.status-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--lime);
  margin-right: 4px;
}

/* ================= TOPBAR (48px) ================= */
.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  height: 48px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 14px;
  border-bottom: 1px solid var(--border);
  gap: 12px;
}

.tb-left { display: flex; align-items: center; gap: 12px; justify-self: start; min-width: 0; }
.brand-wrap { display: inline-flex; align-items: center; gap: 8px; flex-shrink: 0; }
.brand-mark { width: 25px; height: 25px; border-radius: 4px; object-fit: cover; display: block; border: 1px solid rgba(184, 255, 0, 0.45); }
.brand-title { font-family: var(--font-display); font-size: 15px; font-weight: 700; letter-spacing: -0.02em; }
.brand-ticker { font-size: 10px; font-weight: 700; padding: 2px 6px; background: var(--lime); color: #000; border-radius: 3px; }
.tb-divider { width: 1px; height: 18px; background: var(--border); }
.tb-metric { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; white-space: nowrap; }
.tb-lbl { font-size: 10px; color: var(--label); letter-spacing: 0.06em; }

.tb-center {
  position: relative;
  display: flex;
  align-items: center;
  justify-self: center;
  height: 48px;
  gap: 2px;
}

.nav-sliding-pill {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 48px;
  width: 80px;
  background: rgba(184, 255, 0, 0.07);
  border-bottom: 2px solid var(--lime);
  transition: transform 0.24s var(--ease-expo), width 0.24s var(--ease-expo);
  pointer-events: none;
  z-index: 0;
}

.tb-tab {
  position: relative;
  z-index: 1;
  height: 48px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--label);
  white-space: nowrap;
  transition: color 0.16s ease;
}
.tb-tab:hover { color: var(--text); }
.tb-tab.active { color: var(--lime); }

.tb-right { display: flex; align-items: center; justify-self: end; gap: 8px; }
.tb-pill-btn {
  height: 30px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--row);
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  transition: border-color 0.16s ease;
}
.tb-pill-btn:hover { border-color: var(--border-hi); }

.tb-connect-btn {
  height: 30px;
  padding: 0 13px;
  background: var(--lime);
  color: #000000;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  white-space: nowrap;
  transition: transform 0.15s ease, opacity 0.15s ease;
}
.tb-connect-btn:hover { opacity: 0.92; transform: translateY(-1px); }

/* ================= VIEWS ================= */
.view-pane { display: none; }
.view-pane.active {
  display: block;
  animation: viewFade 0.2s var(--ease-expo) both;
}
@keyframes viewFade {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ================= BROADCAST STRIP (60px Clean 1v1 Match Header) ================= */
.broadcast-strip {
  height: 60px;
  display: grid;
  grid-template-columns: 1fr 1.2fr 1fr;
  align-items: center;
  padding: 0 14px;
  border-bottom: 1px solid var(--border);
  gap: 16px;
}

.bs-fighter {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 12px;
  background: var(--row);
  border: 1px solid var(--border);
  border-radius: 4px;
}

.bs-meta { display: flex; flex-direction: column; gap: 2px; }
.bs-slot-row { display: flex; align-items: center; gap: 8px; }
.bs-slot-row-right { justify-content: flex-end; }
.bs-wallet { font-family: var(--font-display); font-size: 13px; font-weight: 700; color: var(--text); }
.bs-nums { display: flex; align-items: center; gap: 14px; font-size: 12.5px; }
.bs-stat-col { display: flex; flex-direction: column; gap: 1px; }
.bs-nums strong { font-size: 14.5px; font-weight: 700; }

.slot-claim-btn {
  height: 22px;
  padding: 0 8px;
  background: rgba(184, 255, 0, 0.14);
  border: 1px solid rgba(184, 255, 0, 0.45);
  color: var(--lime);
  font-size: 10px;
  font-weight: 700;
  border-radius: 3px;
  transition: background-color 0.15s ease;
}
.slot-claim-btn:hover { background: var(--lime); color: #000; }

.bs-center { display: flex; flex-direction: column; gap: 6px; }
.bs-center-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.bs-timer { font-size: 19px; font-weight: 700; letter-spacing: 0.04em; color: var(--text); }
.bs-prize { font-size: 10px; font-weight: 700; color: var(--lime); letter-spacing: 0.06em; }

.tug-track {
  position: relative;
  width: 100%;
  height: 4px;
  background: #1a1a22;
  border-radius: 99px;
  display: flex;
  overflow: hidden;
}
.tug-left { height: 100%; background: var(--lime); transition: width 0.3s var(--ease-expo); }
.tug-right { height: 100%; background: var(--red); transition: width 0.3s var(--ease-expo); }
.tug-mid {
  position: absolute;
  top: 0;
  width: 2px;
  height: 100%;
  background: #fff;
  transition: left 0.3s var(--ease-expo);
}

/* ================= TERMINAL WORKSPACE ================= */
.terminal-workspace {
  display: grid;
  grid-template-columns: 236px minmax(0, 1fr) 304px;
  height: calc(100vh - 108px);
  min-height: 540px;
  background: var(--bg);
  overflow: hidden;
}

.ws-col {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-width: 0;
  overflow: hidden;
}

.ws-markets { border-right: 1px solid var(--border); }
.ws-right-rail { border-left: 1px solid var(--border); }

.panel-head {
  height: 36px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
  background: rgba(6, 6, 9, 0.9);
  flex-shrink: 0;
}

.feed-tag { font-size: 10px; font-weight: 700; }

/* Left Column: Token Search & Liquid Solana Markets */
.ca-search-form {
  display: flex;
  border-bottom: 1px solid var(--border);
  background: var(--row);
}
.ca-search-form input {
  flex: 1;
  min-width: 0;
  height: 34px;
  padding: 0 10px;
  font-size: 11px;
}
.ca-search-form button {
  padding: 0 12px;
  font-size: 10px;
  font-weight: 700;
  border-left: 1px solid var(--border);
  color: var(--lime);
}
.ca-search-form button:hover { background: rgba(184, 255, 0, 0.12); }

.markets-scroll { flex: 1; overflow-y: auto; }
.mkt-item {
  padding: 9px 12px;
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 3px;
  cursor: pointer;
  transition: background-color 0.15s ease;
}
.mkt-item:hover { background: var(--row); }
.mkt-item.active {
  background: rgba(184, 255, 0, 0.08);
  border-left: 2px solid var(--lime);
}
.mi-top { display: flex; align-items: center; justify-content: space-between; gap: 6px; font-size: 12px; font-weight: 700; }
.mi-sym-wrap { display: inline-flex; align-items: center; gap: 7px; min-width: 0; }
.mi-img { width: 18px; height: 18px; border-radius: 3px; object-fit: cover; background: var(--bg); }
.mi-bot { display: flex; justify-content: space-between; font-size: 10.5px; color: var(--label); }

/* Skeletons */
.skeleton-row { padding: 11px 12px; border-bottom: 1px solid var(--border); display: flex; flex-direction: column; gap: 7px; }
.sk-line {
  height: 10px;
  border-radius: 2px;
  background: linear-gradient(90deg, #121218 20%, #1d1d26 50%, #121218 80%);
  background-size: 200% 100%;
  animation: shimmerSweep 1.4s linear infinite;
}
.sk-w50 { width: 50%; } .sk-w60 { width: 60%; } .sk-w70 { width: 70%; } .sk-w75 { width: 75%; } .sk-w85 { width: 85%; } .sk-w90 { width: 90%; }
@keyframes shimmerSweep {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Center Column: Chart + Timeframes (1m, 5m, 15m, 1h, 4h) + Positions */
.chart-toolbar {
  height: 44px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
  background: var(--panel);
  gap: 10px;
  flex-shrink: 0;
}

.ct-left { display: flex; align-items: center; gap: 10px; min-width: 0; }
.tok-icon { width: 22px; height: 22px; border-radius: 4px; object-fit: cover; }
.ct-sym { font-family: var(--font-display); font-size: 14px; font-weight: 700; }
.ct-name { font-size: 11.5px; color: var(--label); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 120px; }
.ct-stat { font-size: 11px; color: var(--label); }
.ct-stat strong { color: var(--text); }

.ct-right { display: flex; align-items: center; gap: 6px; }

/* Timeframe Pill Group */
.tf-group {
  display: inline-flex;
  align-items: center;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px;
  gap: 2px;
}
.tf-btn {
  height: 24px;
  padding: 0 8px;
  font-size: 10.5px;
  font-weight: 700;
  color: var(--label);
  border-radius: 3px;
  transition: all 0.14s ease;
}
.tf-btn:hover { color: var(--text); }
.tf-btn.active {
  background: var(--lime);
  color: #000;
}

.ct-toggle, .ct-copy-ca {
  height: 28px;
  padding: 0 9px;
  font-size: 10px;
  font-weight: 700;
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--label);
  background: var(--row);
  transition: all 0.15s ease;
}
.ct-toggle.active {
  background: rgba(184, 255, 0, 0.12);
  color: var(--lime);
  border-color: rgba(184, 255, 0, 0.45);
}
.ct-copy-ca:hover, .ct-toggle:hover { color: var(--text); border-color: var(--border-hi); }

.chart-body {
  position: relative;
  flex: 1;
  min-height: 280px;
  width: 100%;
  background: var(--bg);
  overflow: hidden;
}

.chart-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.chart-layer.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.dex-frame { border: 0; background: var(--bg); }

.bottom-positions {
  height: 185px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  background: var(--panel);
  flex-shrink: 0;
}

.pos-table-scroll, .table-scroll { flex: 1; overflow: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 11.5px; }
.data-table th {
  text-align: left;
  padding: 8px 12px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
  background: rgba(6, 6, 9, 0.95);
  position: sticky;
  top: 0;
  z-index: 2;
}
.data-table td { padding: 9px 12px; border-bottom: 1px solid var(--border); }
.empty-row { padding: 14px 12px !important; }

.inline-empty-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  background: var(--row);
  border: 1px solid var(--border);
  border-radius: 4px;
  flex-wrap: wrap;
}
.ieb-badge {
  padding: 3px 8px;
  background: rgba(184, 255, 0, 0.1);
  border: 1px solid rgba(184, 255, 0, 0.3);
  color: var(--lime);
  font-size: 10px;
  font-weight: 700;
  border-radius: 3px;
}

/* Right Rail: Clean Spot BUY / SELL Execution Ticket */
.rail-section { border-bottom: 1px solid var(--border); display: flex; flex-direction: column; }
.exec-ticket { padding-bottom: 12px; }

.exec-side-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 10px 12px 0;
  gap: 6px;
}
.side-btn {
  height: 34px;
  font-size: 12px;
  font-weight: 700;
  border: 1px solid var(--border);
  background: var(--row);
  color: var(--label);
  border-radius: 4px;
  transition: all 0.15s ease;
}
.side-btn.active.buy {
  background: var(--lime);
  color: #000;
  border-color: var(--lime);
}
.side-btn.active.sell {
  background: var(--red);
  color: #fff;
  border-color: var(--red);
}

.exec-input-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px 4px;
  font-size: 10px;
  color: var(--label);
}
.reset-bal-btn {
  font-size: 10px;
  color: var(--lime);
  text-decoration: underline;
  opacity: 0.85;
}
.reset-bal-btn:hover { opacity: 1; }

.exec-input-row {
  margin: 0 12px;
  height: 38px;
  padding: 0 10px;
  display: flex;
  align-items: center;
  background: var(--bg);
  border: 1px solid var(--border-hi);
  border-radius: 4px;
}
.exec-input-row:focus-within { border-color: var(--lime); }
.exec-input-row input { flex: 1; font-size: 14px; font-weight: 700; }

.pct-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 5px;
  padding: 8px 12px;
}
.pct-btn {
  height: 27px;
  font-size: 10.5px;
  font-weight: 600;
  background: var(--row);
  border: 1px solid var(--border);
  color: var(--label);
  border-radius: 3px;
  transition: all 0.14s ease;
}
.pct-btn:hover { border-color: var(--lime); color: var(--lime); }

.order-summary-strip {
  margin: 0 12px 10px;
  padding: 8px 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 11px;
}
.oss-row { display: flex; justify-content: space-between; }

.btn-primary-flat {
  height: 38px;
  padding: 0 14px;
  background: var(--lime);
  color: #000000;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.03em;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.14s ease, opacity 0.14s ease;
}
.btn-primary-flat:hover:not(:disabled) { opacity: 0.94; transform: translateY(-1px); }
.btn-primary-flat.is-sell {
  background: var(--red);
  color: #ffffff;
}
.exec-ticket .btn-primary-flat { margin: 0 12px; }

.btn-flat-outline {
  height: 36px;
  padding: 0 12px;
  background: var(--row);
  border: 1px solid var(--border-hi);
  color: var(--text);
  font-size: 11px;
  font-weight: 600;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.btn-flat-outline:hover { border-color: var(--lime); color: var(--lime); }

.btn-danger-xs {
  padding: 4px 10px;
  background: var(--red);
  color: #fff;
  font-size: 10.5px;
  font-weight: 700;
  border-radius: 3px;
}
.btn-danger-xs:hover { opacity: 0.9; }

.ai-audit-box {
  margin: 10px 12px 0;
  border: 1px solid rgba(184, 255, 0, 0.35);
  border-radius: 4px;
  background: var(--bg);
}
.ai-audit-head {
  padding: 6px 9px;
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  font-weight: 700;
  border-bottom: 1px solid var(--border);
  color: var(--lime);
}
.ai-audit-list {
  max-height: 76px;
  overflow-y: auto;
  padding: 6px 9px;
  font-size: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.queue-panel { max-height: 165px; }
.queue-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 8px 12px; border-bottom: 1px solid var(--border); }
.queue-actions .btn-primary-flat, .queue-actions .btn-flat-outline { height: 32px; font-size: 10.5px; }
.queue-scroll { overflow-y: auto; padding: 8px 12px; display: flex; flex-direction: column; gap: 5px; }
.q-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  padding: 6px 9px;
  background: var(--row);
  border: 1px solid var(--border);
  border-radius: 3px;
}

.feed-panel { flex: 1; border-bottom: none; overflow: hidden; }
.rail-tabs { display: grid; grid-template-columns: 1fr 1fr; border-bottom: 1px solid var(--border); background: var(--bg); }
.rail-tab {
  height: 34px;
  font-size: 10.5px;
  font-weight: 700;
  color: var(--label);
  border-bottom: 2px solid transparent;
}
.rail-tab.active { color: var(--lime); border-bottom-color: var(--lime); }
.rail-pane { display: none; flex: 1; flex-direction: column; overflow: hidden; }
.rail-pane.active { display: flex; }

.chat-scroll, .tape-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 11.5px;
}
.chat-msg-row { line-height: 1.4; word-break: break-word; padding: 4px 6px; background: var(--row); border-radius: 3px; }
.chat-w { font-family: var(--font-mono); font-size: 10.5px; color: var(--lime); margin-right: 6px; font-weight: 700; }
.chat-form { display: flex; border-top: 1px solid var(--border); background: var(--bg); }
.chat-form input { flex: 1; height: 34px; padding: 0 10px; font-size: 11.5px; }
.chat-form button {
  padding: 0 12px;
  background: var(--row);
  border-left: 1px solid var(--border);
  color: var(--lime);
  font-size: 10.5px;
  font-weight: 700;
}

/* ================= SUBPAGES ================= */
.subpage-shell { max-width: 1280px; margin: 0 auto; padding: 24px 18px 56px; }
.subpage-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 18px;
  gap: 12px;
  flex-wrap: wrap;
}
.subpage-header h1 {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-top: 4px;
}

.split-2-col { display: grid; grid-template-columns: 430px minmax(0, 1fr); gap: 18px; align-items: start; }
.flat-panel { border: 1px solid var(--border); border-radius: 6px; }
.panel-pad { padding: 16px; display: flex; flex-direction: column; gap: 12px; }

.field-block { display: flex; flex-direction: column; gap: 7px; }
.seg-row { display: flex; flex-wrap: wrap; gap: 5px; }
.seg-btn {
  height: 30px;
  padding: 0 12px;
  font-size: 11px;
  font-weight: 600;
  background: var(--row);
  border: 1px solid var(--border);
  color: var(--label);
  border-radius: 4px;
}
.seg-btn.active { background: var(--lime); color: #000; border-color: var(--lime); }

.flat-input {
  height: 36px;
  padding: 0 10px;
  background: var(--bg);
  border: 1px solid var(--border-hi);
  border-radius: 4px;
  font-size: 12.5px;
}
.flat-input:focus { border-color: var(--lime); }

.kv-strip {
  display: flex;
  justify-content: space-between;
  padding: 9px 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 11px;
}
.invite-result {
  padding: 12px;
  background: rgba(184, 255, 0, 0.06);
  border: 1px solid var(--lime);
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.inv-url { font-size: 11.5px; word-break: break-all; }
.inv-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

.duel-room-banner {
  margin-bottom: 18px;
  padding: 14px 18px;
  background: var(--panel);
  border: 1px solid var(--lime);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.drb-left { display: flex; flex-direction: column; gap: 4px; }

.empty-state-card {
  margin: 8px;
  padding: 22px 18px;
  background: var(--row);
  border: 1px solid var(--border);
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
}
.esc-title { font-family: var(--font-display); font-size: 14px; font-weight: 700; color: var(--text); }
.esc-desc { font-size: 11.5px; color: var(--label); max-width: 420px; line-height: 1.45; }

/* VS AI Cards */
.dossier-list { display: flex; flex-direction: column; gap: 10px; }
.dossier-card {
  text-align: left;
  padding: 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: border-color 0.16s ease;
}
.dossier-card:hover { border-color: rgba(184, 255, 0, 0.45); }
.dossier-card.active {
  border-color: var(--lime);
  background: rgba(184, 255, 0, 0.06);
}
.dc-row { display: flex; align-items: center; gap: 12px; }
.dc-3d-box {
  width: 58px;
  height: 58px;
  border-radius: 6px;
  background: var(--row);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.dc-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.dc-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 13px; }
.dc-title-grp { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.dc-badge { font-size: 9.5px; font-weight: 700; padding: 2px 6px; border-radius: 3px; }
.dc-badge.lime { background: rgba(184, 255, 0, 0.14); color: var(--lime); }
.dc-badge.amber { background: rgba(245, 158, 11, 0.14); color: var(--amber); }
.dc-badge.cyan { background: rgba(56, 189, 248, 0.14); color: var(--cyan); }
.dc-rules { display: flex; flex-direction: column; gap: 2px; font-size: 10.5px; color: var(--label); }
.dc-bars { display: flex; flex-direction: column; gap: 4px; margin-top: 2px; }
.stat-bar-row { display: grid; grid-template-columns: 82px 1fr 24px; align-items: center; gap: 8px; font-size: 9.5px; color: var(--label); }
.sbar-track { height: 4px; background: rgba(255, 255, 255, 0.08); border-radius: 99px; overflow: hidden; }
.sbar-fill { height: 100%; width: var(--w, 50%); border-radius: 99px; }
.sbar-fill.lime { background: var(--lime); }
.sbar-fill.amber { background: var(--amber); }
.sbar-fill.cyan { background: var(--cyan); }

.rules-list { display: flex; flex-direction: column; gap: 8px; font-size: 11.5px; color: var(--label); }
.rule-row { display: flex; gap: 10px; padding: 8px 10px; background: var(--bg); border: 1px solid var(--border); border-radius: 4px; }

/* Modals & Toasts */
.modal-mask {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(3, 3, 5, 0.8);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
}
.flat-modal {
  width: 100%;
  max-width: 430px;
  border: 1px solid var(--border-hi);
  border-radius: 6px;
  overflow: hidden;
}
.modal-x { font-size: 10px; font-weight: 700; color: var(--label); padding: 4px 8px; border-radius: 3px; background: var(--row); }
.modal-x:hover { color: var(--text); }
.modal-copy { font-size: 12px; color: var(--label); line-height: 1.5; }
.wallet-btns { display: flex; flex-direction: column; gap: 7px; }
.wallet-row-btn {
  height: 42px;
  padding: 0 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 11.5px;
  font-weight: 700;
}
.wallet-row-btn:hover { border-color: var(--lime); }

.kv-list { display: flex; flex-direction: column; gap: 7px; padding: 12px; background: var(--bg); border: 1px solid var(--border); border-radius: 4px; font-size: 11.5px; }
.kv-row { display: flex; justify-content: space-between; }
.wd-confirm { padding: 10px; background: rgba(184, 255, 0, 0.08); border: 1px solid var(--lime); border-radius: 4px; display: flex; flex-direction: column; gap: 4px; font-size: 11.5px; }

.toast-stack { position: fixed; bottom: 16px; right: 16px; z-index: 400; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.toast-msg {
  padding: 10px 14px;
  background: #10130c;
  color: var(--text);
  border: 1px solid var(--lime);
  font-size: 11.5px;
  font-weight: 700;
  border-radius: 4px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.7);
}

@media (max-width: 1150px) {
  .topbar { grid-template-columns: 1fr auto; height: auto; padding: 8px 10px; }
  .tb-center { grid-column: 1 / -1; height: 38px; overflow-x: auto; width: 100%; justify-content: space-between; }
  .nav-sliding-pill { display: none; }
  .tb-tab { height: 38px; padding: 0 8px; font-size: 10.5px; }
  .tb-tab.active { border-bottom: 2px solid var(--lime); }
  .tb-divider, .tb-metric { display: none; }
  .broadcast-strip { height: auto; grid-template-columns: 1fr; padding: 10px; gap: 10px; }
  .terminal-workspace { grid-template-columns: 1fr; height: auto; overflow: visible; }
  .ws-col { height: auto; }
  .markets-scroll { max-height: 230px; }
  .chart-body { height: 360px; min-height: 360px; }
  .split-2-col { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  #btn-copy-ca { display: none; }
  .ct-name { display: none; }
  .chart-toolbar { height: auto; flex-wrap: wrap; padding: 8px 10px; gap: 6px; }
  .ct-left { width: 100%; flex-wrap: wrap; gap: 6px; }
  .ct-right { width: 100%; flex-wrap: wrap; }
}
