:root {
  color-scheme: dark;
  --bg: #101318;
  --panel: #171c23;
  --line: #2b333e;
  --text: #e4e9ef;
  --muted: #9aa8b8;
  --green: #56d6a0;
  --amber: #e6b66b;
  --blue: #76aaff;
  --red: #ee9b9b;
}
* { box-sizing: border-box; }
html { scroll-padding-top: 90px; }
body { margin: 0; background: var(--bg); color: var(--text); font: 13px/1.65 "Noto Sans CJK SC", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif; }
button, input, select { font: inherit; }
button, .button { color: var(--text); cursor: pointer; background: #222b37; border: 1px solid #435168; border-radius: 5px; padding: 9px 13px; min-height: 40px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; }
button:hover, .button:hover { background: #303d50; border-color: #738bad; }
button:active, .button:active { background: #374b66; }
button:disabled { color: #9ca8b9; cursor: not-allowed; background: #20262e; border-color: #343e4d; }
.primary { background: #315eaf; border-color: #527bc5; color: #fff; }
.primary:hover { background: #3a6cc2; }
.quiet { background: transparent; }
.danger { color: #ffb3b3; border-color: #915c60; background: #2b2024; }
.danger:hover { background: #482c32; border-color: #ba7c83; }
a { color: #b1ceff; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: #d6e5ff; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 4px; }
.management-login { min-height: 100vh; min-height: 100svh; display: grid; place-items: center; padding: 40px 16px; }
.terminal-login { width: min(100%, 440px); }
.terminal-login > .brand { flex-wrap: wrap; margin-bottom: 28px; }
.terminal-login-panel { background: var(--panel); border: 1px solid var(--line); padding: 30px; }
.terminal-login-panel h1 { font-size: 25px; margin-bottom: 8px; }
.terminal-login-panel form { display: grid; gap: 20px; margin-top: 28px; }
.terminal-login-panel label { display: grid; gap: 8px; font-size: 13px; }
.terminal-login-panel input { font-size: 16px; min-height: 44px; }
.terminal-login-panel button { width: 100%; min-height: 44px; margin-top: 4px; }
.terminal-login-panel .login-error { border: 1px solid #915c60; background: #2b2024; color: #ffb3b3; padding: 12px; margin-top: 20px; overflow-wrap: anywhere; }
.terminal-login-foot { color: var(--muted); font-size: 12px; margin-top: 20px; text-align: center; }
@media (max-width: 440px) { .terminal-login-panel { padding: 24px 20px; } .terminal-login > .brand { gap: 10px; font-size: 18px; } .terminal-login > .brand > span { display: block; flex-basis: 100%; margin-left: 37px; } }
button svg, .button svg { width: 16px; height: 16px; }
h1, h2, h3, p, dl { margin: 0; }
h1 { font-size: 23px; font-weight: 600; letter-spacing: -.02em; line-height: 1.4; }
h2 { font-size: 15px; font-weight: 550; }
h3 { font-size: 13px; font-weight: 550; }
small { display: block; color: var(--muted); font-size: 12px; line-height: 1.6; }
.muted, dt { color: var(--muted); }
.positive { color: var(--green); }
.warning { color: var(--amber); }
.negative { color: var(--red); }
.number { text-align: right; font-variant-numeric: tabular-nums; }
.identifier { overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.sr-only, .skip-link:not(:focus) { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link:focus { position: fixed; z-index: 20; top: 8px; left: 8px; background: var(--panel); padding: 10px; }
[hidden] { display: none !important; }
.topbar { min-height: 70px; background: #151920; padding: 14px 28px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--text); font-size: 18px; font-weight: 650; text-decoration: none; flex-shrink: 0; }
.brand > svg { color: var(--amber); }
.brand > span { border-left: 1px solid #45505e; margin-left: 6px; padding-left: 16px; color: var(--muted); font-size: 12px; font-weight: 400; }
.top-utilities { display: flex; align-items: center; gap: 20px; }
.connection, .status { font-size: 12px; display: inline-flex; align-items: center; gap: 7px; }
.connection i, .status i { width: 6px; height: 6px; background: currentColor; border-radius: 50%; flex: 0 0 auto; }
.app-layout { display: grid; grid-template-columns: 184px minmax(0,1fr); }
.sidebar { background: #151920; border-right: 1px solid var(--line); padding: 24px 14px; display: flex; flex-direction: column; gap: 6px; position: sticky; top: 0; height: 100vh; }
.nav-link { display: flex; align-items: center; gap: 12px; padding: 12px 14px; color: var(--muted); border-radius: 5px; text-decoration: none; }
.nav-link svg { height: 18px; width: 18px; flex-shrink: 0; }
.nav-link.active { background: #26334a; color: #c2d8ff; }
.nav-link:hover { background: #212936; }
.sidebar-note { margin-top: auto; padding: 26px 12px 4px; font-size: 12px; color: var(--muted); }
.sidebar-note p { margin: 8px 0 16px; }
.management { min-width: 0; padding: 26px 28px; max-width: 1920px; width: 100%; margin: 0 auto; }
.page-heading { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; gap: 18px; }
.page-heading p { color: var(--muted); font-size: 12px; margin-top: 5px; }
.updated { text-align: right; font-variant-numeric: tabular-nums; }
.notice, .error { padding: 14px 18px; margin: 0 0 22px; border: 1px solid #4f7294; background: #1e2e40; border-radius: 5px; overflow-wrap: anywhere; }
.error { background: #332328; border-color: #9b646b; color: #ffb3b3; }
.metrics { display: grid; grid-template-columns: 1.2fr 1fr 1fr 1fr; background: var(--panel); border: 1px solid var(--line); }
.metric { padding: 20px 22px; border-right: 1px solid var(--line); min-width: 0; }
.metric:last-child { border: 0; }
.metric h2 { color: var(--muted); font-size: 12px; font-weight: 400; margin-bottom: 7px; }
.metric-value { font-size: 28px; font-weight: 550; letter-spacing: -.02em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.metric-value > span { color: var(--muted); font-size: 12px; margin-left: 8px; font-weight: 400; }
.metric p { color: var(--muted); font-size: 12px; margin-top: 7px; }
.runtime-counts { display: flex; gap: 24px; }
.runtime-counts strong { display: block; font-size: 24px; font-weight: 500; line-height: 1.8; }
.runtime-counts span { display: block; font-size: 12px; color: var(--muted); }
.snapshot-note { color: var(--muted); font-size: 12px; margin: 10px 0 22px; }
.panel { border: 1px solid var(--line); background: var(--panel); min-width: 0; margin-bottom: 20px; }
.section-heading { display: flex; justify-content: space-between; align-items: center; padding: 15px 18px; gap: 12px; flex-wrap: wrap; }
.section-heading > span, .section-heading > a { font-size: 12px; }
.section-heading h2 > .status { margin-left: 12px; font-weight: 400; }
.pending-label { display: inline-block; font-size: 12px; color: #d2bd96; border: 1px solid #65583e; background: #29251f; padding: 2px 7px; border-radius: 3px; }
.chart-toolbar { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 10px 18px; display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.chart-tabs { display: flex; gap: 12px; }
.chart-tabs button { background: transparent; border-color: transparent; color: var(--muted); }
.chart-tabs button[aria-selected="true"] { color: #bed6ff; background: #26334a; }
.chart-ranges { display: flex; gap: 4px; }
.chart-ranges button { padding: 4px 9px; font-size: 12px; min-height: 34px; background: transparent; }
.chart-body { display: grid; grid-template-columns: minmax(0,1fr) 250px; }
.chart-canvas { position: relative; min-height: 218px; padding: 26px 18px; }
.chart-canvas > svg { position: absolute; inset: 25px 18px; width: calc(100% - 36px); height: calc(100% - 50px); }
.chart-canvas path { fill: none; stroke: #2c3542; stroke-width: 1; }
.chart-empty { position: relative; min-height: 164px; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 8px; text-align: center; background: #171c23e8; }
.chart-empty strong { font-size: 14px; font-weight: 500; }
.chart-empty span { color: var(--muted); font-size: 12px; max-width: 50ch; }
.chart-summary { border-left: 1px solid var(--line); padding: 16px 20px; }
.chart-summary > div + div { margin-top: 12px; }
dt { font-size: 12px; }
dd { margin: 4px 0 0; font-size: 15px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
dd small { display: inline; font-size: 12px; font-weight: 400; }
.panel-note { padding: 11px 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.groups { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 18px; }
#groups > .section-heading { padding: 0 0 12px; }
.group { margin-bottom: 0; }
.group-heading { padding: 12px 17px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.group-heading span { font-size: 12px; color: var(--muted); }
.group-account { display: grid; grid-template-columns: 38px 84px minmax(0,1fr) auto; align-items: center; gap: 12px; padding: 13px 17px; text-decoration: none; color: var(--text); border-top: 1px solid #252e39; }
.group-account:first-of-type { border-top: 0; }
.group-account:hover { background: #212c3e; color: var(--text); }
.group-account > strong { font-size: 16px; }
.group-account .number small { display: inline; }
.stage { color: #bec9d7; font-size: 12px; }
.selected { background: #202d42; }
.group-account.selected { outline: 1px solid #648cc4; outline-offset: -1px; }
.table-scroll { max-width: 100%; overflow: auto; max-height: 520px; scrollbar-color: #617188 #171c23; }
table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 12px; font-variant-numeric: tabular-nums; text-align: left; white-space: nowrap; }
th, td { padding: 12px 14px; border-bottom: 1px solid #29323e; vertical-align: top; }
thead th { position: sticky; top: 0; z-index: 1; color: var(--muted); background: #141920; font-weight: 400; }
tbody th { font-weight: 500; }
td:first-child, th:first-child { padding-left: 18px; }
td:last-child, th:last-child { padding-right: 18px; }
td .market-id { display: block; max-width: 290px; overflow: hidden; text-overflow: ellipsis; }
td .identifier { max-width: 290px; white-space: normal; }
.spare-accounts summary { padding: 13px 18px; }
.workspace { display: grid; grid-template-columns: minmax(0,1fr) 310px; align-items: start; gap: 18px; }
.workspace-main, .workspace-side { min-width: 0; }
.workbench-tabs { display: flex; flex-wrap: wrap; gap: 22px; padding: 0 18px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.workbench-tabs a { padding: 12px 0; font-size: 12px; text-decoration: none; }
.workbench-tabs a:first-child { border-bottom: 2px solid var(--blue); }
.facts { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); padding: 18px; gap: 20px; }
.facts dd { font-size: 15px; font-weight: 500; }
.facts small { margin-top: 5px; }
.facts dd > small { display: block; }
.market-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.execution-pair { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); padding: 0 18px 18px; gap: 12px; }
.execution-leg { background: #12171e; border: 1px solid #303b49; padding: 13px; }
.execution-leg .section-heading { padding: 0 0 14px; }
.execution-leg p { font-size: 12px; margin-top: 12px; }
.inline-facts { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
.signal-grid { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); border-top: 1px solid var(--line); }
.signal-item { padding: 16px 18px; }
.signal-item + .signal-item { border-left: 1px solid var(--line); }
.signal-item h3 { color: var(--muted); font-weight: 400; margin-bottom: 8px; }
.signal-item strong { font-size: 17px; font-weight: 500; }
.signal-item p { font-size: 12px; color: var(--muted); margin-top: 12px; }
.order-tools { display: flex; gap: 14px; align-items: end; padding: 0 18px 16px; flex-wrap: wrap; }
.order-tools label:first-child { flex: 1 1 180px; }
.order-tools > span { font-size: 12px; padding-bottom: 8px; }
.empty { padding: 22px 18px; color: var(--muted); }
.panel-content { padding: 0 16px 16px; }
.panel-content p { margin: 0 0 14px; font-size: 12px; }
.panel-content > a { font-size: 12px; }
.panel-content form { display: grid; }
.event { padding: 14px 16px; border-top: 1px solid var(--line); }
.event h3 { margin-bottom: 7px; }
.event p { font-size: 12px; color: var(--muted); margin-top: 6px; overflow-wrap: anywhere; }
.event p.negative { color: var(--red); }
.event p.warning { color: var(--amber); }
.group-actions-row { display: flex; align-items: center; gap: 8px; margin: 12px 0; flex-wrap: wrap; }
.group-actions-row > span { min-width: 44px; font-size: 12px; }
.group-actions-row form { margin: 0; }
.group-actions-row button { padding: 7px 9px; font-size: 12px; }
form { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; margin: 14px 0; }
label { display: grid; gap: 6px; font-size: 12px; min-width: 0; }
input, select { border: 1px solid #52627a; border-radius: 5px; padding: 9px 10px; color: var(--text); background: #11171f; width: 100%; max-width: 100%; min-width: 0; min-height: 40px; caret-color: var(--blue); }
input::placeholder { color: #9ca8b9; }
input:disabled, select:disabled { color: #9ca8b9; border-color: #3c4655; background: #20262e; cursor: not-allowed; }
form[data-pending="1"] { opacity: .8; }
.stacked-form { display: grid; }
.settings-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; border-top: 1px solid var(--line); }
.settings-grid > div { padding: 18px; min-width: 0; }
.settings-grid > div + div { border-left: 1px solid var(--line); }
.settings-grid h3 { margin-bottom: 14px; }
.settings-grid p { font-size: 12px; margin: 10px 0; }
.settings-grid form > label { flex: 1 1 180px; }
.form-row { display: flex; flex-wrap: wrap; gap: 10px; }
.form-row form { margin: 4px 0; }
summary { cursor: pointer; font-size: 12px; padding: 12px 0; color: #b9cfee; }
summary:hover { color: #e0ebff; }
details[open] > summary { margin-bottom: 6px; }
ul { padding-left: 18px; }
li { margin: 8px 0; }
footer { display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; color: var(--muted); font-size: 12px; padding: 4px 0 10px; }
::selection { background: #345c8a; color: #fff; }
@media (min-width: 1800px) { .metrics { grid-template-columns: 1.3fr 1fr 1fr 1fr; } }
@media (max-width: 1400px) { .management { padding: 24px 20px; } .group-account { grid-template-columns: 32px 75px minmax(0,1fr); gap: 8px; } .group-account > .number { grid-column: 3; } .group-account > .stage { grid-column: 3; } .group-account > .status { align-self: start; } .metric { padding: 18px 16px; } .facts { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media (max-width: 1200px) { .workspace { grid-template-columns: minmax(0,1fr); } .workspace-side { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px; } .settings-grid { grid-template-columns: 1fr 1fr; } .settings-grid > div:last-child { grid-column: 1/-1; border-left: 0; border-top: 1px solid var(--line); } .metric-value { font-size: 25px; } }
@media (max-width: 900px) { html { scroll-padding-top: 20px; } .app-layout { display: block; } .sidebar { position: static; height: auto; flex-direction: row; overflow-x: auto; padding: 10px 16px; border-right: 0; border-bottom: 1px solid var(--line); gap: 4px; } .nav-link { flex-shrink: 0; padding: 9px 12px; } .nav-link svg { display: none; } .sidebar-note { display: none; } .metrics { grid-template-columns: 1fr 1fr; } .metric:nth-child(2) { border-right: 0; } .metric:nth-child(-n+2) { border-bottom: 1px solid var(--line); } .topbar { padding: 14px 20px; } .brand > span { display: none; } .runtime-counts { gap: 30px; } }
@media (max-width: 600px) { .management { padding: 20px 14px; } .topbar { padding: 12px 14px; gap: 10px; } .brand { font-size: 16px; gap: 8px; } .top-utilities { gap: 8px; } .connection { display: none; } .page-heading { align-items: start; } h1 { font-size: 21px; } .updated { font-size: 11px; max-width: 138px; } .metric { padding: 15px 12px; } .metric-value { font-size: 24px; } .metric-value > span { margin-left: 4px; font-size: 11px; } .runtime-counts { gap: 16px; } .runtime-counts strong { font-size: 22px; } .groups { grid-template-columns: minmax(0,1fr); gap: 12px; } .group-account { grid-template-columns: 32px 74px minmax(0,1fr) auto; } .group-account > .stage, .group-account > .number { grid-column: auto; } .group-account > .number { font-size: 12px; } .group-account > .number small { display: block; } .chart-body { grid-template-columns: minmax(0,1fr); } .chart-summary { border-left: 0; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 16px; } .chart-summary > div + div { margin-top: 0; } .chart-canvas { min-height: 200px; } .chart-empty { min-height: 146px; } .chart-toolbar { padding: 10px 12px; } .chart-tabs { gap: 4px; } .chart-tabs button { padding: 8px; } .workspace-side { display: block; } .execution-pair { grid-template-columns: minmax(0,1fr); } .signal-grid { grid-template-columns: minmax(0,1fr); } .signal-item + .signal-item { border-left: 0; border-top: 1px solid var(--line); } .settings-grid { grid-template-columns: minmax(0,1fr); } .settings-grid > div + div { border-left: 0; border-top: 1px solid var(--line); } .settings-grid > div:last-child { grid-column: auto; } .section-heading { padding: 14px; } .section-heading > .muted { max-width: 100%; overflow-wrap: anywhere; } .facts { padding: 16px 14px; gap: 18px 14px; } .workbench-tabs { gap: 18px; padding: 0 14px; } .order-tools label { flex: 1 1 100%; } .panel-content form > button { width: 100%; } .settings form > button { width: 100%; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; } }
