:root { --accent:#176c53; --canvas:#f3f5f4; }
body { background:var(--canvas); }
.account-switcher {display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin:0 0 24px;padding:16px;background:#fff;border:1px solid #dce5df;border-radius:12px}
.account-switcher select {font:inherit;max-width:100%;padding:10px;border:1px solid #cad8cf;border-radius:8px;background:#f7faf8}
.account-switcher .muted {font-size:12px}
.account-overview {display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,360px),1fr));gap:16px;margin-bottom:28px}
.account-summary {min-width:0;padding:20px;border:1px solid #dce5df;border-radius:12px;background:white;overflow-wrap:anywhere}
.account-summary.selected {border-color:#176c53;box-shadow:inset 0 3px #176c53}
.account-summary header {display:flex;justify-content:space-between;align-items:start;gap:12px}
.account-summary h3 {margin:0 0 6px}.account-summary small {color:var(--muted)}
.account-summary-metrics {display:flex;flex-wrap:wrap;gap:20px;margin:20px 0}
.account-summary-metrics span {display:flex;flex-direction:column;gap:8px;font-size:12px;color:var(--muted)}
.account-summary-metrics strong {font-size:19px;color:#213c30}
.account-summary .position-grid {grid-template-columns:1fr}.account-summary .position-card {box-shadow:none}
.external-mode {display:flex;align-items:flex-start;gap:10px;margin:18px 0;padding:14px;background:#fff6e5;border:1px solid #efd39b;border-radius:8px;line-height:1.6}.external-mode input {margin-top:4px}.external-mode small {display:block;color:var(--muted);font-size:12px}
[hidden] { display:none !important; }
.topbar { background:white; padding:22px clamp(20px,4vw,60px); min-height:92px; }
main { max-width:1600px; margin:auto; padding:0 clamp(16px,4vw,60px) 50px; }
.workspace-nav { display:flex; gap:8px; align-items:center; padding:22px 0; flex-wrap:wrap; }
button { font:inherit; padding:10px 15px; border:1px solid transparent; border-radius:8px; background:var(--accent); color:white; cursor:pointer; }
button:disabled { opacity:.45; cursor:not-allowed; }
button:focus-visible, input:focus-visible { outline:3px solid #7abdaa; outline-offset:2px; }
.workspace-nav button { background:transparent; color:var(--muted); }
.workspace-nav button[aria-selected=true] { background:#172b24; color:white; }
#beijing-clock { margin-left:auto; color:var(--muted); font-size:12px; }
.panel, .paper-panel { background:white; border:1px solid #e0e7e3; border-radius:12px; padding:24px; margin-bottom:22px; }
.live-heading { display:flex; align-items:center; justify-content:space-between; gap:20px; padding:8px 0 22px; }
.live-heading h2 { font-size:28px; font-weight:650; margin:7px 0 9px; }
.state-badge { padding:9px 14px; background:#e9eeeb; color:#53615a; border-radius:30px; white-space:nowrap; }
.state-badge.running { background:#d9f0e4; color:#176c53; }
.notice { background:#edf2ef; border-left:3px solid #8fa79a; padding:14px 17px; line-height:1.7; border-radius:6px; margin:0 0 20px; }
.notice.warning { background:#fff3de; border-color:#d49629; }
.live-metrics { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:16px; margin-bottom:24px; }
.live-metrics article { background:white; border:1px solid #e0e7e3; padding:22px; border-radius:12px; display:flex; flex-direction:column; gap:12px; }
.live-metrics span,.live-metrics small { color:var(--muted); font-size:12px; }
.live-metrics strong { font-size:29px; font-weight:650; font-variant-numeric:tabular-nums; }
.live-bottom-grid { display:grid; grid-template-columns:minmax(0,1fr) 300px; gap:22px; align-items:start; }
.live-bottom-grid .position-grid { grid-template-columns:repeat(auto-fit,minmax(240px,1fr)); }
.risk-big { font-size:24px; margin:20px 0 14px; }
.risk-panel dl { display:grid; grid-template-columns:1fr auto; gap:12px; font-size:13px; margin:22px 0; }
.risk-panel dt { color:var(--muted); }.risk-panel dd { margin:0; font-variant-numeric:tabular-nums; }
.risk-panel button { width:100%; margin-top:14px; }
.risk-panel p { font-size:12px; line-height:1.7; margin-top:16px; }
button.secondary { background:#edf1ee; color:#244337; }
button.danger-outline { color:#b32f38; background:white; border-color:#e3b4b9; }
.empty-state { text-align:center; padding:60px 16px; color:#43584b; line-height:2; background:#f8faf9; border:1px dashed #d9e3dc; border-radius:10px; }
.empty-state small { color:var(--muted); }
.settings-divider { height:1px; background:var(--line); margin:28px 0; }
.form-help { color:var(--muted); font-size:13px; line-height:1.8; margin:14px 0 20px; }
.limits-form { display:grid; grid-template-columns:repeat(3,minmax(150px,1fr)); gap:18px; margin:20px 0; align-items:end; }
.limits-form label { display:flex; flex-direction:column; gap:8px; font-size:13px; color:var(--muted); }
.limits-form input { font:inherit; padding:12px; border:1px solid #d9e2dc; border-radius:7px; width:100%; }
.account-form { margin-top:18px; gap:16px; }.account-form input { font-size:15px; }
.account-controls { padding-top:12px; }.account-panel { margin-top:0; }
details { margin-top:20px; } summary { padding:12px 0; cursor:pointer; color:var(--muted); }
#audit-list { font-size:12px; line-height:1.8; overflow-wrap:anywhere; }
#toast { position:fixed; bottom:26px; left:50%; transform:translateX(-50%); max-width:min(90vw,680px); background:#213c30; color:white; padding:15px 23px; border-radius:10px; z-index:100; box-shadow:0 6px 26px #0002; }
.protection-label { padding:8px 12px; background:#edf5f0; color:#246044; margin-top:15px; border-radius:6px; font-size:12px; }
.protection-label.bad { background:#fff0e8; color:#9a481c; }
.order-reason { max-width:400px; white-space:normal; line-height:1.5; }
body.auth-locked #account-panel { max-width:620px; margin:60px auto; padding:36px; }
body.auth-locked .account-form label { width:100%; } body.auth-locked .account-form button { width:100%; }
body.auth-locked main > nav, body.auth-locked main > section:not(.account-panel) { display:none; }
@media(max-width:1050px) { .live-bottom-grid{grid-template-columns:1fr}.live-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}.limits-form{grid-template-columns:repeat(2,minmax(0,1fr))} }
@media(max-width:600px) { .topbar{flex-wrap:wrap;gap:12px}h1{font-size:20px}.workspace-nav{gap:2px}.workspace-nav button{padding:9px 11px;font-size:13px}#beijing-clock{width:100%;margin:8px 0 0}.live-heading h2{font-size:22px}.live-heading{align-items:flex-start}.live-metrics{gap:10px}.live-metrics article{padding:16px}.live-metrics strong{font-size:24px}.panel,.paper-panel{padding:18px}.limits-form{grid-template-columns:1fr}.account-form label{min-width:0;width:100%}.status-line{font-size:12px}.state-badge{font-size:12px;padding:7px 10px} }
