/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── PALETTE (reduced neon intensity) ── */
:root {
  --bg:      #03030a;
  --bg2:     #080818;
  --bg3:     #0c0c24;
  --border:  #14143a;
  --border2: #1e1e5a;
  --cyan:    #00ffe5;
  --pink:    #ff2d78;
  --purple:  #b44dff;
  --yellow:  #f5c518;
  --green:   #00e5a0;
  --red:     #ff3a57;
  --text:    #c8d0f0;
  --text2:   #5a6090;
  --text3:   #3a4070;
  --neon-glow: 0 0 6px rgba(0,255,229,0.15), 0 0 20px rgba(0,255,229,0.05);
  --pink-glow: 0 0 6px rgba(255,45,120,0.15), 0 0 20px rgba(255,45,120,0.05);
}

html, body, #app {
  height: 100%;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', 'Courier New', monospace;
  font-size: 12px;
}

/* Subtle scanline overlay */
#app {
  display: flex;
  flex-direction: column;
  position: relative;
}
#app::after {
  content: '';
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(0deg, transparent, transparent 3px, rgba(0,255,229,0.006) 3px, rgba(0,255,229,0.006) 6px);
  pointer-events: none;
  z-index: 9999;
}

.hidden-info { display: none !important; }
.hidden-metric { display: none !important; }

/* ── TOP BAR ── */
#topbar {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
  height: 44px;
  background: linear-gradient(180deg, #0a0a20, #060614);
  border-bottom: 1px solid var(--border2);
  box-shadow: 0 2px 12px rgba(0,0,0,0.4);
}

#app-title {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}
.brand-glow {
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 3px;
  color: var(--cyan);
  text-shadow: 0 0 8px rgba(0,255,229,0.4);
}
.brand-sub {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 4px;
  color: var(--pink);
  text-shadow: 0 0 5px rgba(255,45,120,0.3);
}

#coin-tabs { display: flex; gap: 3px; }
.tab {
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--text2);
  padding: 4px 14px;
  cursor: pointer;
  font-family: inherit;
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
  transition: all .15s;
  border-radius: 2px;
}
.tab:hover { border-color: var(--cyan); color: var(--cyan); }
.tab.active { background: #001a1a; border-color: var(--cyan); color: var(--cyan); box-shadow: 0 0 6px #00ffe540; }

#coin-identity { display: flex; align-items: baseline; gap: 10px; flex: 1; }
#coin-name  { font-size: 11px; color: var(--text2); letter-spacing: 1px; }
#coin-price { font-size: 22px; font-weight: bold; color: var(--cyan); text-shadow: 0 0 6px #00ffe560; letter-spacing: 1px; }
.up   { color: var(--green) !important; }
.down { color: var(--red) !important; }
.neutral { color: var(--text2); }

#sys-info { display: flex; gap: 8px; align-items: center; flex-shrink: 0; }
.status-pill {
  font-size: 10px;
  font-weight: bold;
  padding: 2px 10px;
  border: 1px solid var(--border2);
  background: rgba(10,10,30,0.8);
  color: var(--text2);
  letter-spacing: 0.5px;
  border-radius: 2px;
}
.acc-pill { color: var(--yellow); border-color: rgba(245,197,24,0.25); }
.email-pill { color: var(--cyan); font-size: 9px; font-weight: normal; opacity: 0.8; }

.top-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border2);
  padding: 3px 10px;
  font-size: 14px;
  background: rgba(11, 18, 34, 0.66);
  color: var(--text);
  cursor: pointer;
  font-family: inherit;
  border-radius: 2px;
}
.action-pill { color: var(--cyan); background: rgba(0,255,229,0.05); }
.action-pill:hover { background: rgba(0,255,229,0.12); }

/* ── HERO SIGNAL STRIP ── */
#hero-signal {
  flex-shrink: 0;
  height: 56px;
  background: linear-gradient(135deg, #050520, #0a0a30);
  border-bottom: 1px solid var(--border2);
  box-shadow: inset 0 0 40px rgba(0,0,0,0.5);
}
#hero-signal-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 100%;
  padding: 0 20px;
}
#big-move-alert {
  font-weight: bold;
  font-size: 12px;
  color: var(--red);
  text-shadow: 0 0 6px #ff3a5760;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#big-move-alert.alert-on { color: #ffb347; text-shadow: 0 0 8px rgba(255,179,71,0.5); }

.hero-dir {
  font-size: 32px;
  font-weight: 900;
  letter-spacing: 3px;
  color: var(--text2);
}
.hero-dir.up { color: var(--green); text-shadow: 0 0 12px rgba(0,229,160,0.5); }
.hero-dir.down { color: var(--red); text-shadow: 0 0 12px rgba(255,58,87,0.5); }

.hero-conf {
  font-size: 24px;
  font-weight: bold;
  color: var(--yellow);
  text-shadow: 0 0 8px rgba(245,197,24,0.3);
}

.hero-status {
  font-size: 14px;
  font-weight: bold;
  letter-spacing: 2px;
  padding: 3px 14px;
  border: 1px solid var(--border2);
  background: rgba(10,10,30,0.6);
  border-radius: 2px;
}

.hero-countdown {
  font-size: 20px;
  font-weight: bold;
  color: var(--purple);
  text-shadow: 0 0 6px rgba(180,77,255,0.3);
  margin-left: auto;
  letter-spacing: 1px;
}

.hero-sep {
  color: var(--border2);
  font-size: 18px;
  opacity: 0.4;
  margin: 0 4px;
}

.hero-timer {
  font-size: 12px;
  color: var(--text2);
  letter-spacing: 0.5px;
}
.hero-timer b {
  font-size: 16px;
  color: var(--yellow);
  letter-spacing: 1px;
}

.hero-mini-pred {
  font-size: 12px;
  font-weight: bold;
  color: var(--text3);
  padding: 2px 8px;
  border-radius: 3px;
  background: rgba(90,96,144,0.12);
  letter-spacing: 0.5px;
}
.hero-mini-pred.up { color: var(--green); background: rgba(0,229,160,0.08); }
.hero-mini-pred.down { color: var(--red); background: rgba(255,58,87,0.08); }

/* ── NEWS TICKER ── */
#news-ticker {
  flex-shrink: 0;
  height: 20px;
  background: #040410;
  border-bottom: 1px solid var(--border);
  overflow: hidden;
  white-space: nowrap;
  display: flex;
  align-items: center;
}
#news-text {
  display: inline-block;
  font-size: 9px;
  color: #c4a832;
  letter-spacing: 0.5px;
  animation: news-scroll 50s linear infinite;
  padding-left: 100%;
  opacity: 0.75;
}
@keyframes news-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}

/* ── METRICS BAR ── */
#metrics-bar {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  padding: 0 12px;
  height: 34px;
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  gap: 0;
}
.metric-group {
  display: flex;
  align-items: center;
  gap: 0;
}
.metric-sep {
  width: 1px;
  height: 18px;
  background: var(--border2);
  margin: 0 8px;
  flex-shrink: 0;
}
.metric {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0 10px;
  white-space: nowrap;
}
.metric:first-child { padding-left: 0; }
.metric label { font-size: 8px; color: var(--text3); letter-spacing: 1px; text-transform: uppercase; }
.metric > span { font-size: 11px; color: var(--text); font-weight: bold; }
.metric > span.warn { color: var(--yellow); }

/* ── MAIN CONTENT ── */
#content { flex: 1; display: flex; min-height: 0; transition: all 0.3s ease; }
#content.full-width { flex-direction: column; }
#content.full-width #chart-panel { flex: 1; width: 100%; border-right: none; }
#content.full-width #side-panel { display: none; }

/* ── CHART PANEL ── */
#chart-panel {
  flex: 0 0 60%;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--border2);
  min-height: 0;
}
#snake-chart {
  flex: 1 1 auto;
  min-height: 280px;
  width: 100%;
  display: block;
  border-bottom: 1px solid var(--border2);
}
#chart-label {
  flex-shrink: 0;
  padding: 4px 12px;
  font-size: 9px;
  letter-spacing: 2px;
  color: var(--text3);
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
}
#chart {
  flex: 0 0 auto;
  min-height: 160px;
  width: 100%;
  display: block;
  border-bottom: 1px solid var(--border2);
}
#chart-panel canvas { background: #03030a; }

/* ── SIDE PANEL ── */
#side-panel { flex: 0 0 40%; display: flex; flex-direction: column; overflow-y: auto; }

/* ── SIGNAL CARD ── */
.signal-card {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border2);
  background: linear-gradient(135deg, var(--bg2), rgba(12,12,40,0.9));
}
.signal-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.signal-title {
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text3);
  font-weight: bold;
}
.signal-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}
.signal-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  font-size: 10px;
}
.signal-meta-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 4px 0;
  font-size: 10px;
}
.meta-label { color: var(--text3); font-size: 8px; letter-spacing: 1px; text-transform: uppercase; }
.meta-val { color: var(--text); font-weight: bold; }
.signal-reasoning { font-size: 10px; color: var(--text2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 4px; line-height: 1.5; }

.action-tag {
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 2px;
  padding: 2px 10px;
  margin-left: auto;
  border-radius: 2px;
}
.action-tag.BUY, .action-label.BUY { color: #00ffb2; text-shadow: 0 0 6px rgba(0,255,178,0.3); }
.action-tag.SELL, .action-label.SELL { color: #ff5e8f; text-shadow: 0 0 6px rgba(255,94,143,0.3); }
.action-tag.BUY-STRONG, .action-label.BUY-STRONG { color: #00e5a0; text-shadow: 0 0 8px rgba(0,229,160,0.4); }
.action-tag.SELL-STRONG, .action-label.SELL-STRONG { color: #ff36ab; text-shadow: 0 0 8px rgba(255,54,171,0.4); }
.action-tag.HOLD, .action-label.HOLD { color: var(--text2); }

.badge {
  font-size: 7px;
  padding: 1px 5px;
  background: var(--pink);
  color: #fff;
  letter-spacing: 1px;
  border-radius: 2px;
  animation: pulse 1.5s ease-in-out infinite;
}
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.4} }

/* ── PREDICTION ELEMENTS ── */
.dir-arrow { font-size: 26px; line-height: 1; }
.dir-arrow.UP   { color: var(--green); text-shadow: 0 0 8px var(--green); }
.dir-arrow.DOWN { color: var(--red);   text-shadow: 0 0 8px var(--red); }
.dir-arrow.neutral { color: var(--text2); }

.dir-label { font-size: 20px; font-weight: bold; letter-spacing: 2px; }
.dir-label.UP   { color: var(--green); }
.dir-label.DOWN { color: var(--red); }
.dir-label.neutral { color: var(--text2); }

.action-label { font-size: 12px; font-weight: bold; color: var(--cyan); text-shadow: 0 0 6px #00ffe560; margin-left: 10px; }

.conf-pct { font-size: 18px; color: var(--yellow); text-shadow: 0 0 6px #f5c51860; margin-left: auto; }
.conf-bar-wrap { height: 4px; background: var(--bg3); border: 1px solid var(--border); overflow: hidden; margin: 4px 0; border-radius: 2px; }
.conf-bar { height: 100%; transition: width 0.5s ease; }
.conf-bar.UP   { background: linear-gradient(90deg, var(--green), var(--cyan)); box-shadow: 0 0 4px var(--green); }
.conf-bar.DOWN { background: linear-gradient(90deg, var(--red), var(--pink)); box-shadow: 0 0 4px var(--red); }
.conf-bar.neutral { background: var(--text3); }

/* Micro gauge */
.micro-gauge-wrap { margin: 6px 0; border: 1px solid var(--border); background: linear-gradient(90deg, #0c0d21, #101335); padding: 4px 6px; border-radius: 2px; }
.micro-gauge-track { position: relative; height: 14px; display: grid; grid-template-columns: 1fr 1fr 1fr; overflow: hidden; border: 1px solid var(--border2); border-radius: 2px; }
.micro-gauge-segment { display: flex; align-items: center; justify-content: center; font-size: 8px; color: #a1a7c9; }
.micro-gauge-segment:nth-child(1) { background: rgba(255,58,87,0.12); color: #ff9eb2; }
.micro-gauge-segment:nth-child(2) { background: rgba(103,112,255,0.08); color: #9aa2c9; }
.micro-gauge-segment:nth-child(3) { background: rgba(0,229,160,0.12); color: #8ef1cb; }
.micro-gauge-thumb { position: absolute; top: 0; width: 2px; height: 100%; background: #fff; box-shadow: 0 0 6px rgba(255,255,255,0.7); transition: left 0.2s ease; }
.micro-gauge-text { margin-top: 2px; font-size: 10px; color: var(--text); font-weight: bold; text-align: center; }

/* ── WINDOW CARDS ── */
.win-card {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border2);
  background: linear-gradient(135deg, rgba(6,6,20,0.95), rgba(12,12,40,0.95));
  border-left: 3px solid var(--cyan);
}
.win-card.big-window {
  border-left-color: var(--cyan);
  box-shadow: inset 0 0 20px rgba(0,255,229,0.02);
}
.win-card-header { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.win-card-title { font-size: 10px; letter-spacing: 2px; color: var(--cyan); text-transform: uppercase; font-weight: bold; text-shadow: 0 0 4px rgba(0,255,229,0.2); }
.win-entry-delta { font-size: 11px; font-weight: bold; }

.pred-direction-row { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.pred-direction-row.pred-hero .dir-arrow { font-size: 30px; }
.pred-direction-row.pred-hero .dir-label { font-size: 24px; }
.pred-direction-row.pred-hero .conf-pct { font-size: 22px; }

.pred-card-title { font-size: 9px; letter-spacing: 2px; text-transform: uppercase; color: var(--text3); margin-bottom: 4px; display: flex; align-items: center; gap: 8px; }
.pred-row-label { font-size: 7px; letter-spacing: 2px; color: var(--text3); text-transform: uppercase; margin-bottom: 2px; margin-top: 6px; }
.pred-reasoning { font-size: 9px; color: var(--text2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.6; }

/* Time bar */
.time-bar-row { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.time-bar-wrap { flex: 1; height: 4px; background: var(--bg3); border: 1px solid var(--border); overflow: hidden; border-radius: 2px; }
.time-bar { height: 100%; background: linear-gradient(90deg, var(--purple), var(--cyan)); transition: width 0.9s linear; box-shadow: 0 0 4px var(--purple); }
.time-remaining { font-size: 14px; color: var(--purple); font-weight: bold; min-width: 40px; text-align: right; text-shadow: 0 0 6px var(--purple); }

/* Win/Lose bar */
.win-lose-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
  font-size: 10px;
  border-top: 1px solid var(--border);
  margin-top: 4px;
}

/* ── BUY NOW STRIP ── */
.buy-now-strip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 10px;
  margin: 4px -14px;
  background: linear-gradient(90deg, rgba(90,96,144,0.08), rgba(90,96,144,0.04));
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  font-size: 10px;
}
.buy-now-strip.active {
  background: linear-gradient(90deg, rgba(0,229,160,0.15), rgba(0,255,229,0.08));
  border-color: rgba(0,229,160,0.3);
  animation: buyNowPulse 1.5s ease-in-out infinite;
}
@keyframes buyNowPulse {
  0%,100% { box-shadow: inset 0 0 10px rgba(0,229,160,0.1); }
  50% { box-shadow: inset 0 0 20px rgba(0,229,160,0.25); }
}
.buy-now-label {
  font-weight: 900;
  letter-spacing: 2px;
  color: var(--text3);
  font-size: 11px;
}
.buy-now-label.active {
  color: var(--green);
  text-shadow: 0 0 8px rgba(0,229,160,0.6);
  font-size: 13px;
}
.buy-now-score {
  color: var(--yellow);
  font-weight: bold;
  font-size: 11px;
}
.buy-now-shares {
  color: var(--text2);
  font-size: 10px;
  margin-left: auto;
  letter-spacing: 0.5px;
}
.win-lose-bar .wl-label { color: var(--text3); font-size: 8px; letter-spacing: 1px; text-transform: uppercase; }
.win-lose-bar .wl-entry { color: var(--text2); }
.win-lose-bar .wl-now { font-weight: bold; }
.win-lose-bar .wl-delta { font-weight: bold; margin-left: auto; font-size: 12px; }
.wl-status { font-size: 10px; font-weight: bold; letter-spacing: 2px; padding: 2px 8px; border-radius: 2px; }
.wl-status.winning { background: rgba(255,58,87,0.12); color: var(--red); border: 1px solid rgba(255,58,87,0.3); text-shadow: 0 0 4px var(--red); }
.wl-status.losing  { background: rgba(0,229,160,0.12); color: var(--green); border: 1px solid rgba(0,229,160,0.3); text-shadow: 0 0 4px var(--green); }
.wl-status.flat    { background: var(--bg3); color: var(--text2); border: 1px solid var(--border); }

/* ── COLLAPSIBLE DETAILS ── */
.card-details, .scalp-details {
  margin-top: 6px;
  border-top: 1px solid var(--border);
  padding-top: 4px;
}
.card-details summary, .scalp-details summary {
  cursor: pointer;
  font-size: 9px;
  letter-spacing: 1px;
  color: var(--text3);
  text-transform: uppercase;
  padding: 4px 0;
  user-select: none;
}
.card-details summary:hover, .scalp-details summary:hover {
  color: var(--cyan);
}
.card-details[open], .scalp-details[open] {
  padding-bottom: 4px;
}

/* ── BOTTOM SECTION ── */
#bottom-section {
  flex-shrink: 0;
  border-top: 1px solid var(--border2);
  background: var(--bg2);
}
#chart-history {
  padding: 8px 12px;
}
#chart-history.show { display: block; }

/* ── HISTORY STRIPS (colored blocks) ── */
.history-strip {
  margin-bottom: 8px;
}
.history-strip-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}
.history-strip-title {
  color: var(--cyan);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.acc-badge {
  color: var(--text3);
  font-size: 10px;
}
.history-blocks {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
}
.hist-block {
  width: 16px;
  height: 16px;
  border-radius: 2px;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  position: relative;
}
.hist-block:hover {
  transform: scale(1.3);
  z-index: 2;
}
.hist-win {
  background: var(--green);
  box-shadow: 0 0 4px rgba(0,229,160,0.4);
}
.hist-win:hover { box-shadow: 0 0 10px rgba(0,229,160,0.7); }
.hist-loss {
  background: var(--red);
  box-shadow: 0 0 4px rgba(255,58,87,0.4);
}
.hist-loss:hover { box-shadow: 0 0 10px rgba(255,58,87,0.7); }
@keyframes hist-pop {
  0% { transform: scale(0); opacity: 0; }
  50% { transform: scale(1.4); }
  100% { transform: scale(1); opacity: 1; }
}
.hist-flash { animation: hist-pop 0.5s ease-out; }

/* ── HISTORY MODAL ── */
.hist-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  z-index: 9999;
  justify-content: center;
  align-items: center;
}
.hist-modal-overlay.open { display: flex; }
.hist-modal-box {
  background: linear-gradient(135deg, #0a0a1e, #0d0d2a);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 20px 24px;
  max-width: 420px;
  width: 90%;
  position: relative;
  box-shadow: 0 0 30px rgba(0,255,229,0.15);
}
.hist-modal-close {
  position: absolute;
  top: 8px;
  right: 12px;
  background: none;
  border: none;
  color: var(--text3);
  font-size: 22px;
  cursor: pointer;
}
.hist-modal-close:hover { color: var(--red); }
.modal-title {
  font-size: 14px;
  color: var(--text);
  margin: 0 0 14px;
  letter-spacing: 1px;
}
.modal-win { color: var(--green); font-weight: 700; }
.modal-loss { color: var(--red); font-weight: 700; }
.modal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.modal-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.modal-item label {
  color: var(--text3);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.modal-item span {
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
}
.modal-item span.up { color: var(--green); }
.modal-item span.down { color: var(--red); }
.modal-item.full { grid-column: 1 / -1; }
.modal-reasoning {
  font-size: 11px !important;
  font-weight: 400 !important;
  color: var(--text2) !important;
  line-height: 1.5;
}

/* ── CHAT ── */
.chat-toggle-btn {
  display: block;
  width: 100%;
  padding: 8px 14px;
  background: linear-gradient(135deg, var(--bg2), rgba(12,12,40,0.9));
  border: none;
  border-top: 1px solid var(--border);
  color: var(--text3);
  font-family: inherit;
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  cursor: pointer;
  text-align: left;
}
.chat-toggle-btn:hover { color: var(--cyan); }

#chat-card.chat-collapsed { display: none; }

#chat-messages {
  min-height: 80px;
  max-height: 140px;
  overflow-y: auto;
  background: rgba(0,0,0,0.2);
  border: 1px solid var(--border);
  padding: 6px 8px;
  font-size: 11px;
  line-height: 1.5;
  border-radius: 2px;
}
#chat-messages .chat-row { margin-bottom: 4px; }
#chat-messages .chat-name { color: var(--cyan); font-weight: 700; margin-right: 4px; }
#chat-messages .chat-from-llm .chat-name { color: var(--yellow); }
.chat-message { display: inline; color: var(--text); }
.chat-entry-row {
  display: grid;
  grid-template-columns: 1fr 2.5fr auto;
  gap: 4px;
  margin-top: 6px;
}
#chat-username, #chat-input {
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  padding: 6px 10px;
  outline: none;
  font-family: inherit;
  font-size: 11px;
  border-radius: 2px;
}
#chat-send {
  border: none;
  background: var(--cyan);
  color: #000;
  padding: 0 12px;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: bold;
  font-size: 10px;
  font-family: inherit;
  border-radius: 2px;
}
#chat-send:hover { background: #82ffe9; }

/* ── HISTORY ── */
#history-section { display: flex; flex-direction: column; overflow: hidden; }
.history-empty { display: flex; align-items: center; justify-content: center; padding: 20px; color: var(--text2); font-size: 11px; background: rgba(40,48,80,0.2); }
.history-block { display: flex; flex-direction: column; min-height: 0; border-top: 1px solid var(--border2); }
.history-header { flex-shrink: 0; display: flex; justify-content: space-between; align-items: center; padding: 4px 10px; background: var(--bg2); border-bottom: 1px solid var(--border); font-size: 9px; letter-spacing: 1px; color: var(--text3); text-transform: uppercase; }
.history-header .acc-badge { color: var(--yellow); font-weight: bold; font-size: 10px; }
.table-wrap { overflow-y: auto; max-height: 140px; }

.history-spark { display: flex; gap: 2px; padding: 3px 10px; }
.history-spark .dot { width: 8px; height: 8px; border-radius: 50%; }
.history-spark .up { background: var(--green); box-shadow: 0 0 3px var(--green); }
.history-spark .down { background: var(--red); box-shadow: 0 0 3px var(--red); }
.history-spark .neutral { background: var(--text3); }

table { width: 100%; border-collapse: collapse; font-size: 11px; }
thead th { position: sticky; top: 0; background: var(--bg3); color: var(--text3); font-weight: normal; letter-spacing: 1px; padding: 3px 8px; text-align: left; border-bottom: 1px solid var(--border); font-size: 8px; }
tbody tr { border-bottom: 1px solid var(--border); }
tbody tr:hover { background: rgba(0,255,229,0.02); }
tbody td { padding: 3px 8px; color: var(--text); }
tbody td.ok   { color: var(--green); font-size: 13px; text-shadow: 0 0 4px var(--green); }
tbody td.bad  { color: var(--red);   font-size: 13px; text-shadow: 0 0 4px var(--red); }

@keyframes newrow { 0%{background:rgba(0,255,229,0.06)} 100%{background:transparent} }
tr.flash-new { animation: newrow 1.2s ease-out; }

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 3px; height: 3px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 2px; }

/* ── FOOTER BRANDING ── */
#dash-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 6px 12px;
  background: var(--bg);
  border-top: 1px solid var(--border);
  font-size: 10px;
  color: var(--text3);
  letter-spacing: 0.5px;
  flex-shrink: 0;
}
.footer-brand {
  color: var(--cyan);
  font-weight: 700;
  text-transform: lowercase;
  letter-spacing: 1px;
}
.footer-contact {
  color: var(--text2);
}
.footer-sep {
  color: var(--border2);
}
.footer-copy {
  color: var(--text3);
  opacity: 0.7;
}

/* ── THEME COMPAT ── */
body.theme-cyberpunk { /* default */ }
body.theme-matrix { --cyan:#30f530; --pink:#38a8a8; --green:#80ff80; --red:#ff4040; }
body.theme-solarized { --cyan:#2aa198; --pink:#d33682; --green:#859900; --red:#dc322f; }
body.theme-neutral { --cyan:#3ab0ff; --pink:#ff85b4; --green:#43d18f; --red:#ff5c6b; }

/* ── LAYOUT COMPAT ── */
body.layout-compact #chart-panel { flex: 0 0 70% !important; }
body.layout-compact #side-panel  { flex: 0 0 30% !important; }
body.layout-focused #content { flex-direction: column; }
body.layout-focused #chart-panel { flex: 1 0 auto; width: 100%; border-right: none; }
body.layout-focused #side-panel  { display: none; }
body.layout-split #chart-panel { flex: 0 0 60%; }
body.layout-split #side-panel  { flex: 0 0 40%; display: flex; }

#content, #chart-panel, #side-panel, .signal-card, .win-card { transition: all 220ms ease; }

/* locked feature compat */
.locked-feature { opacity: 0.62; filter: saturate(0.35); border-style: dashed !important; }
.muted-pill { color: var(--text2); }

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  body.layout-split #content, body.layout-compact #content { flex-direction: column; }
  body.layout-split #side-panel, body.layout-compact #side-panel { display: none; }
  #hero-signal { height: auto; min-height: 48px; }
  #hero-signal-inner { flex-wrap: wrap; padding: 8px 12px; gap: 12px; }
  .hero-dir { font-size: 24px; }
  .hero-conf { font-size: 18px; }
}

/* Short pred compat */
.short-preds { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.pred-card.short { padding: 6px; font-size: 11px; }
.pred-card.short .dir-arrow { font-size: 18px; }
.pred-card { padding: 8px 12px; border-bottom: 1px solid var(--border); background: var(--bg2); }

/* premium panel compat */
#elite-micro-panel.premium { background: linear-gradient(135deg, rgba(4,5,20,0.95), rgba(11,10,48,0.95)); border: 1px solid rgba(0,255,229,0.2); }
#micro-action-big { font-size: 18px; font-weight: 800; text-align: center; }
