:root {
  --bg: #0b1020;
  --panel: #121a31;
  --panel-2: #0f1730;
  --text: #eaf1ff;
  --muted: #97a4c2;
  --line: #223056;
  --accent: #56a4ff;
  --good: #2ecc71;
  --bad: #ff6b6b;
  --warn: #f7b955;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Inter, system-ui, sans-serif;
  background: linear-gradient(180deg, #08101f, #111932);
  color: var(--text);
}
.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 24px;
}
.hero, .panel, .card {
  background: rgba(18, 26, 49, 0.92);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.22);
}
.hero {
  padding: 24px;
  display: flex;
  justify-content: space-between;
  align-items: start;
  margin-bottom: 20px;
}
.hero h1 { margin: 0 0 8px; }
.hero p { margin: 0; color: var(--muted); max-width: 760px; line-height: 1.6; }
.tag {
  padding: 10px 14px;
  border-radius: 999px;
  background: #13294f;
  color: #93c2ff;
  font-size: 13px;
}
.panel { padding: 20px; margin-bottom: 20px; }
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
}
label { display: flex; flex-direction: column; gap: 8px; color: var(--muted); font-size: 14px; }
input, select, button {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 14px;
}
input, select {
  background: var(--panel-2);
  color: var(--text);
}
button {
  background: linear-gradient(135deg, #2f80ff, #4fafff);
  color: white;
  border: none;
  cursor: pointer;
  font-weight: 700;
}
button:hover { filter: brightness(1.05); }
.actions { margin-top: 16px; display: flex; gap: 12px; align-items:center; flex-wrap:wrap; }
.live-strip {
  display:flex; gap:10px; align-items:center; flex-wrap:wrap;
  background:#0d1530; border:1px solid var(--line); border-radius:12px; padding:10px 14px;
}
#livePrice { font-size: 20px; }
.muted-dot { color: var(--muted); font-size: 13px; }
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.metric {
  background: #0d1530;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
}
.metric .k { color: var(--muted); font-size: 13px; margin-bottom: 8px; }
.metric .v { font-size: 24px; font-weight: 800; }
.columns {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 16px;
}
.card { padding: 18px; }
.card h3 { margin-top: 0; }
pre {
  white-space: pre-wrap;
  word-break: break-word;
  background: #0a1227;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  line-height: 1.55;
  overflow: auto;
}
.hidden { display: none; }
.good { color: var(--good); }
.bad { color: var(--bad); }
.warn { color: var(--warn); }
.draft-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.draft-controls {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
#aiBox p { margin: 8px 0; color: var(--muted); line-height: 1.65; }
#aiBox ul { padding-left: 18px; }
.market-head h2 { margin: 0; }
.watchlist-table {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}
.watch-card {
  background: #0d1530;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
}
.watch-card .sym { font-weight: 800; margin-bottom: 6px; }
.watch-card .price { font-size: 22px; font-weight: 800; margin-bottom: 8px; }
.watch-card .meta { color: var(--muted); font-size: 13px; line-height: 1.6; }
#priceChart, #rsiChart, #macdChart, #backtestCurve {
  width: 100%;
  height: auto;
  background: #0a1227;
  border: 1px solid var(--line);
  border-radius: 12px;
}
@media (max-width: 900px) {
  .columns { grid-template-columns: 1fr; }
  .hero { flex-direction: column; gap: 12px; }
}
