:root {
  --bg: #070b14;
  --panel: #121826;
  --line: #243049;
  --text: #e8edf7;
  --muted: #8b97b0;
  --accent: #3ddc84;
  --danger: #ff5c7a;
  --gold: #f5b942;
  --blue: #4ea1ff;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: Segoe UI, system-ui, sans-serif; background: var(--bg); color: var(--text); }
a { color: var(--gold); }
select, input { background: #0d1424; border: 1px solid var(--line); color: var(--text); padding: 8px 10px; border-radius: 8px; width: 100%; }
button, .ghost { background: var(--accent); color: #062014; border: 0; padding: 9px 12px; border-radius: 8px; font-weight: 700; cursor: pointer; text-decoration: none; display: inline-block; }
.ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }
.muted { color: var(--muted); font-size: 13px; }
.topbar { display: flex; gap: 14px; justify-content: space-between; align-items: center; padding: 10px 16px; border-bottom: 1px solid var(--line); background: #0d1322; flex-wrap: wrap; }
.brand { display: flex; gap: 10px; align-items: center; }
.brand img { width: 40px; height: 40px; border-radius: 8px; object-fit: cover; }
.metrics { display: flex; gap: 18px; }
.metrics small { display: block; color: var(--muted); }
.actions, .tf-row, .cat-row, .branches { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.tf-row { padding: 0; }
.tf-row button, .cat, .branches button { background: #1a2338; color: var(--text); }
.tf-row button.active, .cat.active, .branches button.active { background: var(--gold); color: #1a1404; }
.cat-row { padding: 8px 16px 0; }
.branches { padding: 8px 16px 12px; }
.tv-wrap { padding: 0 16px; }
#tv { width: 100%; height: min(58vh, 620px); border: 0; border-radius: 10px; background: #000; display: block; }
.analysis-wrap { margin: 12px 16px; padding: 12px; }
.analysis-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.analysis-wrap h2, .panel h2 { margin: 0 0 10px; font-size: 15px; color: var(--muted); }
.smc-stage { position: relative; width: 100%; height: min(62vh, 560px); background: #131722; border-radius: 8px; overflow: hidden; }
#smc-chart { position: absolute; inset: 0; }
#smc-overlay { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 2; }
.smc-intent { position: absolute; top: 10px; right: 72px; z-index: 3; pointer-events: none; text-align: right; max-width: min(42%, 320px); }
.smc-intent b { display: inline-block; padding: 7px 12px; border-radius: 8px; font-size: 16px; letter-spacing: 0.04em; }
.smc-intent span { display: block; margin-top: 6px; font-size: 12px; color: #d1d4dc; text-shadow: 0 1px 2px #131722; }
.smc-intent.BUY b { background: #26a69a; color: #062014; }
.smc-intent.SELL b { background: #ef5350; color: #fff; }
.smc-intent.HOLD b { background: #2a2e39; color: #d1d4dc; border: 1px solid #434651; }
.smc-legend { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; margin-top: 8px; font-size: 12px; color: var(--muted); }
.smc-legend i { display: inline-block; width: 12px; height: 8px; border-radius: 2px; margin-right: 6px; opacity: 0.85; }
#candle-source { background: #1e222d; color: #d1d4dc; }
.desk-grid { display: grid; grid-template-columns: 1.2fr 1fr 0.9fr; gap: 12px; padding: 0 16px 16px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 14px; margin: 0 16px 12px; }
.desk-grid .panel { margin: 0; }
.settings { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.chk { flex-direction: row; align-items: center; gap: 8px; display: flex; font-size: 13px; color: var(--muted); }
.chk input { width: auto; }
.span2 { grid-column: 1 / -1; }
.steps { margin: 0; padding-left: 18px; }
.steps li { margin: 0 0 12px; }
.steps b { color: var(--gold); }
.quote-card { margin-top: 12px; padding: 12px; background: #0d1424; border-radius: 10px; border: 1px solid var(--line); }
.acct .big { font-size: 28px; font-weight: 800; }
.score-head { font-size: 18px; font-weight: 800; color: var(--accent); }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { text-align: left; padding: 7px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
.badge { padding: 2px 8px; border-radius: 999px; font-size: 11px; text-transform: lowercase; }
.inzone, .in-zone { background: #16351f; color: var(--accent); }
.waiting { background: #2a3146; color: var(--muted); }
.mitigated { background: #3a2430; color: var(--danger); }
.BUY { color: var(--accent); }
.SELL { color: var(--danger); }
.HOLD { color: var(--muted); }
.auth-body { min-height: 100vh; display: grid; place-items: center; }
.auth-card { width: min(420px, 92vw); background: var(--panel); padding: 28px; border-radius: 16px; border: 1px solid var(--line); }
.auth-card form { display: grid; gap: 12px; }
.auth-card .logo { width: 72px; height: 72px; object-fit: cover; border-radius: 12px; }
.apk-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #01875f;
  color: #fff;
  border: 0;
  padding: 8px 12px;
  border-radius: 8px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
.apk-btn img { width: 22px; height: 22px; display: block; }
.apk-btn:hover { filter: brightness(1.08); color: #fff; }
.auth-card .apk-btn { margin-top: 16px; justify-content: center; width: 100%; }
.api-url { font-family: Consolas, monospace; background: #0d1424; padding: 10px 12px; border-radius: 8px; word-break: break-all; color: var(--gold); }
.error { color: var(--danger); }
label { display: grid; gap: 6px; font-size: 13px; color: var(--muted); }
@media (max-width: 1100px) { .desk-grid { grid-template-columns: 1fr; } #tv { height: 42vh; } }
