:root { --bg:#131722; --panel:#1e222d; --line:#2a2e39; --text:#d1d4dc; --muted:#787b86; --acc:#2962ff; }
* { box-sizing: border-box; }
html, body { margin:0; height:100%; background:var(--bg); color:var(--text); font:13px -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Ubuntu,sans-serif; }
body { display:flex; flex-direction:column; }
header { display:flex; flex-wrap:wrap; gap:8px; align-items:center; padding:6px 8px; border-bottom:1px solid var(--line); background:var(--bg); }
select, input, button { background:var(--panel); color:var(--text); border:1px solid var(--line); border-radius:4px; padding:4px 8px; font:inherit; }
button { cursor:pointer; } button:hover { border-color:#434651; }
.seg { display:flex; } .seg button { border-radius:0; margin-left:-1px; } .seg button:first-child { border-radius:4px 0 0 4px; } .seg button:last-child { border-radius:0 4px 4px 0; }
.seg button.on, .ind.on button { background:var(--acc); border-color:var(--acc); color:#fff; }
#inds { display:flex; flex-wrap:wrap; gap:6px; }
.ind { display:inline-flex; } .ind button:first-child { border-radius:4px 0 0 4px; } .ind button:last-child { border-radius:0 4px 4px 0; margin-left:-1px; padding:4px 6px; }
#custom { padding:6px 8px; border-bottom:1px solid var(--line); } #custom form { display:flex; gap:6px; }
main { position:relative; flex:1; min-height:0; }
#chart { position:absolute; inset:0; }
#legend { position:absolute; left:10px; top:6px; z-index:5; pointer-events:none; }
#ohlc { font-size:13px; } #msg { color:#f7a600; margin-top:4px; }
.up { color:#26a69a; } .dn { color:#ef5350; } .muted { color:var(--muted); }
#acatTable { position:absolute; right:72px; top:8px; z-index:5; background:rgba(0,0,0,.7); border-collapse:collapse; font-size:12px; }
#acatTable td { border:1px solid #333; padding:2px 6px; color:#fff; }
footer { display:flex; flex-wrap:wrap; gap:14px; padding:4px 8px; border-top:1px solid var(--line); font-size:11px; color:var(--muted); }
footer a { color:var(--muted); }
dialog { background:var(--panel); color:var(--text); border:1px solid var(--line); border-radius:6px; width:min(520px,95vw); max-height:85vh; padding:14px; }
dialog::backdrop { background:rgba(0,0,0,.5); }
dialog h3 { margin:0 0 8px; } fieldset { border:1px solid var(--line); border-radius:4px; margin:0 0 10px; padding:6px 10px; }
legend { color:var(--muted); padding:0 4px; }
dialog label { display:flex; justify-content:space-between; align-items:center; gap:10px; margin:5px 0; }
dialog label.chk { justify-content:flex-start; } dialog label select, dialog label input[type=number], dialog label input[type=text] { width:52%; }
.row { display:flex; gap:8px; margin-top:8px; }
@media (max-width:700px) { header { gap:5px; } #acatTable { right:60px; font-size:11px; } footer span:last-child { display:none; } }
