:root{--bg: #08121a;--panel: #0f1a1f;--panel-2: #142329;--line: #1c2c33;--line-strong: #273a42;--text: #e7eff1;--muted: #8fa3ab;--accent: #4fd8c4;--accent-ink: #032621;--accent-soft: rgba(79, 216, 196, .12);--buy: #3ed1b9;--sell: #ed6a7d;--sell-strong: #e04d64;--warn-bg: #2e2a14;--warn-text: #f1d58a;--error: #ff7a8c;--ok: #4fd8c4;color-scheme:dark;font-family:Inter,system-ui,-apple-system,Segoe UI,Roboto,Helvetica Neue,sans-serif;font-size:13px;line-height:1.35}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--text);-webkit-font-smoothing:antialiased}h1,h2,h3{margin:0 0 .6rem;font-weight:600}h2{font-size:1.15rem}h3{font-size:.95rem}a{color:var(--accent)}button{font:inherit;padding:.35rem .75rem;border:1px solid var(--line-strong);border-radius:6px;background:var(--panel-2);color:var(--text);cursor:pointer}button:hover:not(:disabled){border-color:var(--accent)}button:disabled{opacity:.45;cursor:default}button:focus-visible,input:focus-visible,select:focus-visible,a:focus-visible{outline:2px solid var(--accent);outline-offset:1px}button.primary{background:var(--accent);border-color:var(--accent);color:var(--accent-ink);font-weight:600}button.primary:hover:not(:disabled){filter:brightness(1.08)}button.big{font-size:1rem;padding:.65rem 1.5rem}button.danger{background:var(--sell-strong);border-color:var(--sell-strong);color:#fff}button.link{border:0;padding:0;background:none;color:inherit;font-weight:600}input,select{font:inherit;padding:.45rem .6rem;border:1px solid var(--line-strong);border-radius:6px;background:var(--bg);color:var(--text);width:100%;font-variant-numeric:tabular-nums}input:hover,select:hover{border-color:#3a5058}input[aria-invalid=true]{border-color:var(--sell)}input.short{width:6.5rem;padding:.25rem .45rem}select{width:auto;padding:.25rem .45rem}label{display:flex;flex-direction:column;gap:.3rem;flex:1;color:var(--muted);font-size:.92em}fieldset{border:0;padding:0;margin:0;min-width:0}.muted{color:var(--muted)}.small{font-size:.85em}.mono{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;word-break:break-all}.warn{background:var(--warn-bg);color:var(--warn-text);padding:.4rem .7rem;border-radius:6px}.error{color:var(--error)}.ok{color:var(--ok)}.center{text-align:center;margin-top:20vh}.row{display:flex;gap:.5rem;align-items:center}.order-form .row{align-items:stretch}.row.end{justify-content:flex-end}.row.actions{margin-top:1rem}.confirm{margin-top:1rem;padding:.9rem;border:1px solid var(--sell);border-radius:8px;background:var(--panel-2)}.shell{min-height:100vh;display:flex;flex-direction:column}.topbar{display:flex;align-items:center;gap:1.8rem;height:48px;padding:0 1rem;background:var(--bg);border-bottom:1px solid var(--line)}.topbar nav{display:flex;gap:1.4rem;flex:1}.topbar nav a{text-decoration:none;color:var(--text);font-weight:500;opacity:.8}.topbar nav a:hover{opacity:1}.topbar nav a.active{color:var(--accent);opacity:1}.brand{display:inline-flex;align-items:center;gap:.55rem;font-weight:700;font-size:1.05rem;letter-spacing:-.01em}.brand-accent{color:var(--accent)}.logo{display:block;flex:0 0 auto}.badge{padding:.15rem .5rem;border-radius:4px;background:var(--accent-soft);color:var(--accent);font-size:.8rem;font-weight:600}.user{padding:.35rem .8rem;border-radius:8px;background:var(--panel-2);border:1px solid var(--line-strong);font-weight:600;white-space:nowrap}.page{flex:1;display:flex;flex-direction:column;padding:4px;min-height:0}.panel{background:var(--panel);border-radius:6px;min-width:0;min-height:0}.card{padding:1rem 1.2rem;margin:.6rem}.card.narrow{max-width:640px}.pad{padding:.8rem 1rem;margin:0}.panel-head{display:flex;align-items:center;justify-content:space-between;gap:.5rem;padding:0 .8rem;height:38px;border-bottom:1px solid var(--line)}.panel-title{font-weight:600;padding:.55rem 0;border-bottom:2px solid var(--text);margin-bottom:-1px}.terminal{flex:1;display:grid;gap:4px;grid-template-columns:minmax(0,1fr) 250px 300px;grid-template-rows:auto minmax(360px,1fr) minmax(180px,250px) auto;grid-template-areas:"symbol symbol form" "chart markets form" "bottom bottom account" "status status status";min-height:calc(100vh - 56px)}.symbol-bar{grid-area:symbol;display:flex;flex-wrap:wrap;align-items:center;gap:.6rem 2rem;padding:.6rem 1rem}.symbol-name{display:flex;flex-direction:column}.symbol-name strong{font-size:1.35rem;letter-spacing:-.01em}.stat{display:flex;flex-direction:column;gap:.1rem}.stat .muted{text-decoration:underline dotted var(--line-strong);text-underline-offset:3px}.stat strong{font-weight:500;font-variant-numeric:tabular-nums}.symbol-bar .warn{margin:0 0 0 auto}.chart-area{grid-area:chart;display:flex;flex-direction:column}.chart-card{flex:1;display:flex;flex-direction:column;min-height:0}.chart-toolbar{display:flex;align-items:center;gap:1rem;height:38px;padding:0 .6rem;border-bottom:1px solid var(--line)}.timeframes{display:flex;gap:.15rem}.timeframes button{border:0;background:none;color:var(--muted);padding:.25rem .5rem}.timeframes button:hover:not(:disabled){color:var(--text)}.timeframes button[aria-pressed=true]{color:var(--accent);font-weight:600}.chart{flex:1;min-height:320px;width:100%}.markets{grid-area:markets;overflow-y:auto}.markets tbody tr{cursor:pointer}.order-form{grid-area:form;padding:0 .9rem .9rem;display:flex;flex-direction:column;gap:.6rem}.order-form form{display:flex;flex-direction:column;gap:.75rem}.kind-tabs{display:flex;border-bottom:1px solid var(--line);margin:0 -.9rem;padding:0 .9rem}.kind-tabs button{flex:1;border:0;border-radius:0;background:none;color:var(--muted);height:38px;border-bottom:2px solid transparent;margin-bottom:-1px}.kind-tabs button[aria-pressed=true]{color:var(--text);font-weight:600;border-bottom-color:var(--text)}.side-toggle{display:flex;padding:3px;gap:3px;border-radius:8px;background:var(--panel-2)}.side-toggle button{flex:1;border:0;background:none;color:var(--text);font-weight:600;padding:.45rem}.side-toggle button.buy[aria-pressed=true]{background:var(--buy);color:var(--accent-ink)}.side-toggle button.sell[aria-pressed=true]{background:var(--sell);color:#fff}.kv{display:grid;grid-template-columns:1fr auto;gap:.35rem 1rem;margin:0}.kv dt{color:var(--muted)}.kv dd{margin:0;text-align:right;font-variant-numeric:tabular-nums;font-weight:500}button.submit{margin-top:.3rem;padding:.6rem;border:0;border-radius:8px;font-weight:600}button.submit.buy{background:var(--buy);color:var(--accent-ink)}button.submit.sell{background:var(--sell);color:#fff}.bottom{grid-area:bottom;display:flex;flex-direction:column}.tab-body{flex:1;overflow:auto}.account-panel{grid-area:account;display:flex;flex-direction:column;padding-bottom:.8rem;overflow-y:auto}.account-panel .figure{display:flex;justify-content:space-between;padding:.3rem .9rem}.figure strong{font-variant-numeric:tabular-nums;font-weight:500}.button-link{margin:.6rem .9rem 0;padding:.45rem;border:1px solid var(--accent);border-radius:8px;text-align:center;text-decoration:none;font-weight:600}.button-link:hover{background:var(--accent-soft)}.statusbar{grid-area:status;display:flex;justify-content:space-between;align-items:center;gap:1rem;padding:.2rem .4rem;font-size:.85rem}.online{display:inline-flex;align-items:center;gap:.35rem;padding:.1rem .5rem;border:1px solid var(--line-strong);border-radius:6px;color:var(--muted)}.online .dot{width:7px;height:7px;border-radius:50%;background:var(--muted)}.online.live{border-color:var(--accent);color:var(--accent)}.online.live .dot{background:var(--accent)}@media(max-width:1100px){.terminal{grid-template-columns:minmax(0,1fr) 300px;grid-template-rows:auto minmax(360px,auto) auto auto auto;grid-template-areas:"symbol form" "chart form" "markets account" "bottom bottom" "status status"}}@media(max-width:760px){.terminal{grid-template-columns:minmax(0,1fr);grid-template-rows:none;grid-template-areas:"symbol" "chart" "form" "markets" "account" "bottom" "status"}.topbar{gap:1rem}.badge{display:none}.statusbar{flex-direction:column;align-items:flex-start}}.tabs{display:flex;gap:1.2rem;padding:0 .8rem;height:38px;border-bottom:1px solid var(--line);flex:0 0 auto}.tabs button{border:0;border-radius:0;background:none;padding:0;color:var(--muted);border-bottom:2px solid transparent;margin-bottom:-1px}.tabs button:hover:not(:disabled){color:var(--text)}.tabs button[aria-selected=true]{color:var(--text);font-weight:600;border-bottom-color:var(--accent)}table.grid{border-collapse:collapse;width:100%}table.grid th,table.grid td{padding:.32rem .8rem;white-space:nowrap}table.grid th{text-align:left;color:var(--muted);font-weight:400;font-size:.92em}table.grid tbody tr:hover{background:var(--panel-2)}table.grid td button{padding:.15rem .5rem;font-size:.92em}table.grid .num{text-align:right;font-variant-numeric:tabular-nums}tr.selected{background:var(--accent-soft)}.buy{color:var(--buy)}.sell{color:var(--sell)}.tag{margin-left:.4rem;padding:.05rem .4rem;border-radius:4px;background:var(--accent-soft);color:var(--accent);font-size:.8rem}.overlay{position:fixed;inset:0;z-index:10;display:grid;place-items:center;padding:16px;background:#040a0e9e;-webkit-backdrop-filter:blur(3px);backdrop-filter:blur(3px)}.dialog{width:min(420px,100%);padding:1.6rem 1.6rem 1.2rem;border:1px solid var(--line-strong);border-radius:12px;background:var(--panel);box-shadow:0 24px 60px #00000080;display:flex;flex-direction:column;gap:.9rem}.dialog h2{margin:0;font-size:1.3rem}.dialog p{margin:0}.dialog form{display:flex;flex-direction:column;gap:.8rem}.dialog input{font-size:1rem;padding:.6rem .7rem}
