:root {
  --bg: #0c1117;
  --panel: #141b24;
  --line: #243042;
  --text: #e8eef6;
  --muted: #8b9bb0;
  --green: #3dcc8a;
  --red: #f07178;
  --amber: #e0b25c;
  --blue: #6ea8fe;
  --live: #ff5d5d;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.45 ui-sans-serif, system-ui, -apple-system, sans-serif; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.92em; }
.top {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 16px 20px; border-bottom: 1px solid var(--line); position: sticky; top: 0;
  background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(8px); z-index: 2;
}
.brand { display: flex; gap: 12px; align-items: center; }
.logo { width: 12px; height: 12px; border-radius: 50%; background: var(--green); box-shadow: 0 0 10px var(--green); }
h1 { margin: 0; font-size: 18px; letter-spacing: 0.02em; }
.sub, .muted, footer { color: var(--muted); }
.status-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.badge {
  border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px; font-size: 12px; text-transform: uppercase;
  letter-spacing: 0.06em;
}
.badge.paper { color: var(--amber); border-color: #5a4720; }
.badge.live { color: var(--live); border-color: #6a2020; background: #2a1010; }
.badge.on { color: var(--green); border-color: #1e5a3d; }
.badge.off { color: var(--muted); }
.badge.warn { color: var(--amber); }
.badge.crit { color: var(--red); border-color: #6a2020; }
.banner { margin: 12px 20px 0; padding: 10px 12px; border-radius: 8px; background: #2a1010; color: #ffc9c9; }
.kpis { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; padding: 16px 20px 0; }
.kpi { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; min-width: 0; }
.kpi .label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.kpi .value { font-size: 20px; font-variant-numeric: tabular-nums; margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pos { color: var(--green); }
.neg { color: var(--red); }
tr.is-active td { background: #1c2736; }
.grid-2 { display: grid; grid-template-columns: 1.2fr 1fr; gap: 12px; padding: 12px 20px; }
.chart-grid { display: grid; grid-template-columns: 1.7fr 1fr; gap: 12px; padding: 12px 20px 0; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 14px; margin: 0 20px 12px; }
.grid-2 .panel, .chart-grid .panel { margin: 0; }
.chart-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.symbol-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.symbol-tab {
  background: transparent; color: var(--muted); border: 1px solid var(--line); border-radius: 8px;
  padding: 4px 10px; cursor: pointer; font-size: 12px;
}
.symbol-tab.is-active { color: var(--text); background: #1c2736; border-color: #3a4d66; }
.legend { display: flex; gap: 12px; flex-wrap: wrap; color: var(--muted); font-size: 11px; margin: 0 0 8px; }
.legend i { display: inline-block; width: 10px; height: 3px; border-radius: 2px; margin-right: 5px; vertical-align: middle; }
#price-chart { width: 100%; height: 280px; display: block; }
#volume-chart { width: 100%; height: 64px; display: block; margin-top: 4px; }
#score-chart { width: 100%; height: 72px; display: block; margin-top: 4px; }
.score-meter { position: relative; height: 10px; background: #1a2330; border-radius: 99px; margin: 10px 0 14px; overflow: hidden; }
.score-meter .fill { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--text); }
.score-meter .zone-buy { position: absolute; top: 0; bottom: 0; right: 0; background: #143528; }
.score-meter .zone-sell { position: absolute; top: 0; bottom: 0; left: 0; background: #3a1518; }
.score-hero { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.score-hero .big { font-size: 28px; font-variant-numeric: tabular-nums; }
.comp { display: grid; grid-template-columns: 120px 1fr 52px; gap: 8px; align-items: center; margin: 6px 0; font-size: 12px; }
.comp .bar { height: 8px; background: #1a2330; border-radius: 99px; overflow: hidden; position: relative; }
.comp .bar span { display: block; height: 100%; border-radius: 99px; }
.ind-table { width: 100%; margin-top: 10px; }
.ind-table td:last-child { text-align: right; }
.why { margin: 12px 0 0; font-size: 12px; color: var(--muted); }
.why strong { color: var(--text); font-weight: 600; }
h2 { margin: 0 0 10px; font-size: 13px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); font-weight: 600; }
canvas { width: 100%; height: 160px; display: block; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
th, td { text-align: left; padding: 7px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600; }
td.wrap { white-space: normal; max-width: 420px; }
.pill { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 11px; text-transform: uppercase; }
.pill.buy, .pill.filled { background: #143528; color: var(--green); }
.pill.sell, .pill.canceled, .pill.rejected { background: #3a1518; color: var(--red); }
.pill.hold { background: #243042; color: var(--muted); }
.empty { margin: 8px 0 0; }
.tabs { display: flex; gap: 6px; padding: 4px 20px; flex-wrap: wrap; }
.tab {
  background: transparent; color: var(--muted); border: 1px solid var(--line); border-radius: 8px;
  padding: 6px 12px; cursor: pointer;
}
.tab.is-active { color: var(--text); background: var(--panel); border-color: #3a4d66; }
.news { list-style: none; margin: 0; padding: 0; }
.news li { padding: 8px 0; border-bottom: 1px solid var(--line); }
.news a { color: var(--blue); text-decoration: none; }
footer { padding: 8px 20px 24px; font-size: 12px; }
@media (max-width: 860px) {
  .grid-2, .chart-grid { grid-template-columns: 1fr; }
  .top { flex-direction: column; align-items: flex-start; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #price-chart { height: 220px; }
}
