:root {
  --bg: #0b0f17; --panel: #121826; --panel2: #182033; --line: #243049; --text: #e6ebf5; --muted: #8a96ad;
  --green: #22c55e; --green-bg: rgba(34,197,94,.12); --red: #ef4444; --red-bg: rgba(239,68,68,.12);
  --amber: #f59e0b; --blue: #60a5fa; --radius: 12px;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; font-size: 14px;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); }
a { color: var(--blue); }
button, input, select { font: inherit; color: inherit; }
button { background: var(--panel2); border: 1px solid var(--line); border-radius: 8px; padding: 7px 12px; cursor: pointer; }
button:hover { border-color: var(--blue); }
button.primary { background: #2563eb; border-color: #2563eb; color: #fff; }
button.danger { border-color: var(--red); color: var(--red); }
input, select { background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; width: 100%; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.up { color: var(--green); } .down { color: var(--red); }

header { display: flex; align-items: center; gap: 12px; padding: 10px 16px; border-bottom: 1px solid var(--line); background: var(--panel); position: sticky; top: 0; z-index: 10; flex-wrap: wrap; }
header .brand { font-weight: 700; font-size: 16px; margin-right: 8px; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: var(--panel2); border: 1px solid var(--line); font-size: 12px; white-space: nowrap; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.dot.on { background: var(--green); box-shadow: 0 0 6px var(--green); } .dot.off { background: var(--red); } .dot.warn { background: var(--amber); }
nav { display: flex; gap: 4px; margin-left: auto; }
nav button { background: transparent; border-color: transparent; }
nav button.active { background: var(--panel2); border-color: var(--line); }

main { padding: 16px; max-width: 1500px; margin: 0 auto; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 1000px) { .grid2 { grid-template-columns: 1fr; } nav { margin-left: 0; width: 100%; overflow-x: auto; } }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.card h2 { margin: 0 0 12px; font-size: 15px; display: flex; align-items: center; gap: 8px; justify-content: space-between; }
.card h3 { margin: 16px 0 8px; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
section { display: none; } section.active { display: block; }
.stack > * + * { margin-top: 16px; }

.banner { border-radius: var(--radius); padding: 14px 16px; border: 1px solid var(--line); background: var(--panel2); }
.banner.warn { border-color: var(--amber); }
.signal { border-radius: var(--radius); padding: 18px; border: 2px solid; position: relative; }
.signal.long { border-color: var(--green); background: linear-gradient(135deg, var(--green-bg), transparent 60%); }
.signal.short { border-color: var(--red); background: linear-gradient(135deg, var(--red-bg), transparent 60%); }
.signal .title { font-size: 22px; font-weight: 800; letter-spacing: .01em; }
.signal .sub { color: var(--muted); margin-top: 2px; }
.levels { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
@media (max-width: 600px) { .levels { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.lv { background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 10px; }
.lv .k { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.lv .v { font-size: 20px; font-weight: 700; margin-top: 2px; }
.lv .s { font-size: 12px; color: var(--muted); margin-top: 2px; }
.lv.sl .v { color: var(--red); } .lv.tg .v { color: var(--green); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.chip { font-size: 12px; padding: 3px 8px; border-radius: 6px; background: var(--bg); border: 1px solid var(--line); }
.status-tag { position: absolute; top: 14px; right: 14px; }

.price { font-size: 30px; font-weight: 800; }
.gauge { height: 10px; border-radius: 6px; background: linear-gradient(90deg, var(--red), #3b4252 45%, #3b4252 55%, var(--green)); position: relative; margin: 8px 0 4px; }
.gauge .needle { position: absolute; top: -4px; width: 4px; height: 18px; background: #fff; border-radius: 2px; transform: translateX(-2px); transition: left .4s; }
.gauge-labels { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); }
.verdict { margin-top: 10px; padding: 10px 12px; border-radius: 10px; background: var(--bg); border: 1px solid var(--line); }
.votes { display: grid; gap: 6px; }
.vote { display: grid; grid-template-columns: 110px 54px 1fr; gap: 8px; align-items: center; font-size: 13px; }
.bar { height: 6px; background: var(--bg); border-radius: 4px; position: relative; overflow: hidden; }
.bar i { position: absolute; top: 0; bottom: 0; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { padding: 6px 8px; border-bottom: 1px solid var(--line); text-align: right; white-space: nowrap; }
th:first-child, td:first-child { text-align: left; }
th { color: var(--muted); font-weight: 500; font-size: 12px; }
tr.atm td { background: rgba(96,165,250,.08); }
.kv { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.kv div { background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 8px; }
.kv b { display: block; font-size: 15px; margin-top: 2px; }
.kv span { font-size: 11px; color: var(--muted); text-transform: uppercase; }
.table-wrap { overflow-x: auto; }
#chart { height: 420px; }
.tabs { display: flex; gap: 6px; }
.tabs button.active { border-color: var(--blue); }
.form { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.form label { display: grid; gap: 4px; font-size: 12px; color: var(--muted); }
.toast { position: fixed; bottom: 16px; right: 16px; background: var(--panel2); border: 1px solid var(--line); padding: 10px 14px; border-radius: 10px; display: none; z-index: 50; }
.disclaimer { font-size: 12px; color: var(--muted); margin: 24px 0 8px; line-height: 1.5; }
.login { max-width: 360px; margin: 12vh auto; }
code { background: var(--bg); padding: 2px 6px; border-radius: 6px; border: 1px solid var(--line); }
.ready { background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 12px; }
.ready-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.ready-head .pct { font-size: 28px; font-weight: 800; }
.pbar { height: 12px; border-radius: 6px; background: var(--panel2); overflow: hidden; margin: 8px 0 12px; }
.pbar i { display: block; height: 100%; border-radius: 6px; transition: width .4s; }
.scores { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) 2fr; gap: 8px; align-items: stretch; }
.scores > div { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 8px; }
.scores span { display: block; font-size: 11px; color: var(--muted); text-transform: uppercase; }
.scores b { display: block; font-size: 17px; margin-top: 2px; }
.sparkbox .spark { width: 100%; height: 48px; display: block; }
.sparkbox span { text-transform: none; font-size: 11px; margin-top: 2px; }
@media (max-width: 600px) { .scores { grid-template-columns: repeat(3, minmax(0, 1fr)); } .sparkbox { grid-column: 1 / -1; } }
.checks { display: grid; gap: 6px; margin-top: 12px; }
.chk { display: grid; grid-template-columns: 18px 150px minmax(0, 1fr) minmax(0, 1.4fr); grid-template-areas: "m l c n" ". b b b"; column-gap: 8px; row-gap: 3px; font-size: 13px; align-items: center; }
.chk .mark { grid-area: m; color: var(--amber); font-weight: 700; } .chk.ok .mark { color: var(--green); }
.chk .lbl { grid-area: l; } .chk .cur { grid-area: c; } .chk .need { grid-area: n; font-size: 12px; }
.chk .mini { grid-area: b; height: 4px; }
@media (max-width: 600px) { .chk { grid-template-columns: 18px minmax(0, 1fr); grid-template-areas: "m l" ". c" ". n" ". b"; } }
