:root {
  color-scheme: dark;
  --page: #141718;
  --side: #101313;
  --surface: #1d2222;
  --field: #111616;
  --line: #303837;
  --text: #e3e9e6;
  --muted: #8c9c97;
  --jade: #77c6a7;
  --jade-dark: #143c2f;
  --gold: #c3af76;
  --red: #ee9696;
  --radius: 6px;
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", system-ui, sans-serif;
  font-size: 14px;
  letter-spacing: 0;
}
* { box-sizing: border-box; }
html { min-width: 0; }
body { margin: 0; background: var(--page); color: var(--text); line-height: 1.6; min-height: 100vh; }
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; letter-spacing: 0; }
button, a, input, textarea { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .7; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible { outline: 2px solid var(--jade); outline-offset: 3px; }
svg { width: 18px; height: 18px; flex: 0 0 18px; stroke-width: 1.7; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: 224px; border-right: 1px solid var(--line); background: var(--side); display: flex; flex-direction: column; }
.brand { display: flex; gap: 11px; align-items: center; min-height: 92px; padding: 18px 22px; }
.brand img { flex: 0 0 38px; image-rendering: auto; }
.brand strong { display: block; font-size: 21px; font-weight: 600; line-height: 1.4; }
.brand small { color: var(--muted); font-size: 11px; display: block; margin-top: 3px; white-space: nowrap; }
.brand-scene { height: 116px; background: url("backdrop.png") 55% 62% / cover no-repeat; border-block: 1px solid #2a3430; opacity: .82; }
nav { padding: 26px 12px; display: flex; gap: 7px; flex-direction: column; }
.nav-link { display: flex; align-items: center; gap: 11px; color: var(--muted); padding: 11px 14px; border-radius: 4px; min-height: 43px; }
.nav-link:hover { color: var(--text); background: #202725; }
.nav-link.active { color: var(--jade); background: #193229; box-shadow: inset 2px 0 var(--jade); }
.sidebar-footer { padding: 22px 26px; margin-top: auto; border-top: 1px solid var(--line); }
.eyebrow { color: var(--muted); font-size: 11px; margin: 0 0 7px; }
.group-number { display: block; color: var(--gold); font-family: Consolas, "SFMono-Regular", monospace; font-size: 20px; font-weight: 500; }
.footer-tag { display: flex; align-items: center; gap: 7px; color: #71847b; font-size: 11px; margin-top: 20px; }
.footer-tag svg { width: 13px; height: 13px; flex-basis: 13px; }
.workspace { margin-left: 224px; min-height: 100vh; display: flex; flex-direction: column; }
.topbar { min-height: 64px; display: flex; align-items: center; justify-content: space-between; padding: 12px 36px; border-bottom: 1px solid var(--line); }
.breadcrumb { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 14px; }
.breadcrumb strong { color: #c3cfca; font-weight: 400; }
.breadcrumb span { color: #51615a; }
.quiet-label { font-size: 11px; color: var(--muted); }
main { width: 100%; min-width: 0; max-width: 1340px; padding: 32px 36px 44px; margin: 0 auto; flex: 1; }
.workspace-footer { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 15px 36px; border-top: 1px solid var(--line); color: #62716a; font-size: 11px; }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 26px; }
h1 { font-size: 25px; line-height: 1.4; margin: 0; font-weight: 500; }
h2 { font-size: 15px; font-weight: 600; margin: 0; }
.status-pill { display: inline-flex; align-items: center; gap: 7px; padding: 4px 10px; border: 1px solid #46504a; color: var(--gold); background: #252820; border-radius: 4px; font-size: 11px; white-space: nowrap; }
.status-pill i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.status-pill.live { color: var(--jade); border-color: #315847; background: #172e24; }
.metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.metric { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; min-height: 137px; }
.metric-label { display: flex; align-items: center; gap: 8px; font-size: 11px; color: var(--muted); }
.metric-label svg { color: var(--gold); width: 15px; height: 15px; flex-basis: 15px; }
.metric strong { display: block; margin-top: 11px; font-size: 23px; font-weight: 500; line-height: 1.3; overflow-wrap: anywhere; }
.metric small { display: block; color: var(--muted); font-size: 11px; margin-top: 6px; }
.section { margin-top: 28px; border-top: 1px solid var(--line); padding-top: 22px; }
.page-heading + .section, .notice + .section { margin-top: 0; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.section-heading > svg { color: var(--gold); }
.muted { color: var(--muted); }
.small { font-size: 11px; }
.text-link { display: inline-flex; gap: 5px; align-items: center; color: var(--jade); font-size: 12px; }
.text-link svg { width: 14px; height: 14px; flex-basis: 14px; }
.details-list { margin: 0; }
.details-list > div { display: grid; grid-template-columns: 126px minmax(0, 1fr); gap: 18px; padding: 12px 0; border-bottom: 1px solid #262f2c; }
.details-list dt { color: var(--muted); font-size: 12px; }
.details-list dd { margin: 0; font-size: 12px; }
.mono { font-family: Consolas, "SFMono-Regular", "Microsoft YaHei", monospace; font-size: 12px; }
.breakable { overflow-wrap: anywhere; }
.table-scroll { overflow-x: auto; width: 100%; }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: 12px; }
th { color: var(--muted); font-weight: 400; padding: 10px 14px; background: #1b2120; font-size: 11px; white-space: nowrap; }
td { border-bottom: 1px solid #29332f; padding: 11px 14px; white-space: nowrap; height: 48px; }
td:first-child, th:first-child { padding-left: 12px; }
.empty-table { color: var(--muted); text-align: center; height: 90px; }
.table-badge { display: inline-block; border: 1px solid #385b49; color: var(--jade); margin-left: 9px; padding: 0 5px; font-size: 10px; line-height: 18px; border-radius: 3px; }
.hash-cell abbr { color: #7e9288; text-decoration: none; cursor: help; }
.align-right { text-align: right; }
.form-stack { display: flex; flex-direction: column; gap: 19px; min-width: 0; }
.form-stack label { display: flex; flex-direction: column; gap: 7px; min-width: 0; color: #b0beb7; font-size: 12px; overflow-wrap: anywhere; }
input:not([type=file]), textarea { width: 100%; min-width: 0; max-width: 100%; border: 1px solid #3b4741; background: var(--field); color: var(--text); padding: 10px 12px; border-radius: 4px; min-height: 42px; outline: none; transition: border-color .15s; }
input:not([type=file]):focus, textarea:focus { border-color: var(--jade); }
input::placeholder { color: #64756c; }
input[type=number] { appearance: textfield; }
textarea { resize: vertical; min-height: 100px; line-height: 1.65; }
.settings-form { max-width: 760px; }
.account-form { max-width: 620px; }
.input-row { display: flex; gap: 17px; min-width: 0; }
.input-row > label { flex: 1; }
.input-row > .port-field { max-width: 130px; }
.form-rule { border-top: 1px solid #2d3732; margin: 4px 0 0; }
.form-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; margin-top: 3px; }
.button { border: 1px solid var(--line); background: #25312b; color: var(--text); border-radius: 4px; min-height: 41px; display: inline-flex; gap: 8px; align-items: center; justify-content: center; padding: 9px 17px; font-size: 12px; }
.button.primary { border-color: #77c6a7; background: var(--jade); color: #0d2720; font-weight: 600; }
.button:hover { filter: brightness(1.08); }
.button svg { width: 16px; height: 16px; flex-basis: 16px; }
.full-width { width: 100%; }
.icon-button { display: inline-flex; align-items: center; justify-content: center; border: 1px solid #354039; background: #19211d; color: #a6b9ac; width: 33px; height: 33px; padding: 0; border-radius: 4px; }
.icon-button:hover { border-color: var(--jade); color: var(--jade); }
.logout-form { display: flex; margin: 0; }
.notice { display: flex; align-items: flex-start; gap: 9px; font-size: 12px; padding: 12px 14px; border-radius: 4px; border: 1px solid; margin-bottom: 22px; line-height: 1.7; overflow-wrap: anywhere; }
.notice svg { margin-top: 2px; width: 16px; height: 16px; flex-basis: 16px; }
.notice-error { background: #362124; color: var(--red); border-color: #654047; }
.notice-success { background: #1a3026; color: #b2d9be; border-color: #355443; }
.warning { color: var(--gold); }
.version-field { max-width: 220px; }
.file-input-surface { display: flex; gap: 11px; align-items: center; min-width: 0; padding: 16px; border: 1px dashed #4e6456; background: #18251e; border-radius: 4px; flex-wrap: wrap; }
.file-input-surface > svg { color: var(--jade); }
input[type=file] { max-width: calc(100% - 32px); font-size: 12px; color: transparent; width: 110px; }
input[type=file]::file-selector-button { font: inherit; color: #bfd0c3; border: 1px solid #55675c; padding: 6px 12px; background: #28392e; border-radius: 4px; cursor: pointer; }
[data-file-name] { color: #899f8f; font-family: Consolas, "Microsoft YaHei", monospace; font-size: 11px; min-width: 0; overflow-wrap: anywhere; flex: 1 1 220px; }
.auth-page main { display: flex; align-items: flex-start; padding-top: 62px; padding-bottom: 65px; }
.auth-surface { max-width: 400px; width: 100%; min-width: 0; margin: 0 auto; }
.auth-surface .eyebrow { color: var(--gold); margin-top: 20px; }
.auth-surface h1 { margin-bottom: 26px; overflow-wrap: anywhere; }
.auth-surface .form-stack { gap: 17px; }
.auth-surface .button { margin-top: 5px; }
.section-marker { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; border: 1px solid #526d5c; color: var(--jade); border-radius: 6px; background: #23372b; }
.section-marker svg { width: 21px; height: 21px; }
@media (max-width: 1090px) {
  .sidebar { width: 204px; }
  .workspace { margin-left: 204px; }
  .brand { padding-inline: 17px; }
  main { padding-inline: 24px; }
  .topbar, .workspace-footer { padding-inline: 24px; }
  .metric { padding-inline: 16px; }
  .metrics { gap: 12px; }
  .metric strong { font-size: 20px; }
}
@media (max-width: 800px) {
  .sidebar { position: static; width: 100%; border-right: 0; border-bottom: 1px solid var(--line); flex-direction: row; flex-wrap: wrap; }
  .brand { min-height: 76px; padding: 14px 20px; flex: 1; min-width: 0; order: 0; }
  .brand strong { font-size: 19px; }
  .brand-scene { display: none; }
  nav { width: 100%; padding: 0 12px 10px; flex-direction: row; gap: 4px; overflow-x: auto; order: 2; }
  .nav-link { justify-content: center; padding: 9px 11px; font-size: 12px; gap: 6px; flex: 1; white-space: nowrap; min-height: 37px; }
  .nav-link svg { width: 16px; height: 16px; flex-basis: 16px; }
  .nav-link.active { box-shadow: inset 0 -2px var(--jade); }
  .sidebar-footer { border: 0; margin: 0; padding: 13px 20px 13px 0; text-align: right; align-self: center; order: 1; }
  .sidebar-footer .eyebrow { font-size: 10px; }
  .group-number { font-size: 17px; }
  .footer-tag { display: none; }
  .workspace { margin-left: 0; min-height: calc(100vh - 124px); }
  .topbar { min-height: 51px; padding: 9px 20px; }
  main { padding: 24px 20px 35px; }
  .workspace-footer { padding-inline: 20px; }
  .auth-page main { padding-top: 40px; }
  .auth-page .workspace { min-height: calc(100vh - 76px); }
  .metric { padding: 16px 13px; min-height: 130px; }
  .metric strong { font-size: 18px; }
}
@media (max-width: 550px) {
  .brand { gap: 9px; padding-inline: 15px; }
  .brand img { width: 32px; height: 32px; flex-basis: 32px; }
  .brand strong { font-size: 18px; }
  .brand small { font-size: 10px; }
  .sidebar-footer { padding-right: 15px; }
  nav { padding-inline: 7px; gap: 3px; }
  .nav-link { font-size: 11px; padding-inline: 4px; gap: 4px; }
  .nav-link svg { width: 15px; height: 15px; flex-basis: 15px; }
  main { padding-inline: 16px; }
  .topbar, .workspace-footer { padding-inline: 16px; }
  .page-heading { margin-bottom: 22px; }
  h1 { font-size: 23px; }
  .metrics { grid-template-columns: 1fr; gap: 10px; }
  .metric { display: grid; grid-template-columns: 1fr 1fr; gap: 3px 10px; min-height: 82px; padding: 15px 17px; }
  .metric-label { grid-column: 1; align-self: center; }
  .metric strong { margin-top: 0; grid-column: 2; grid-row: 1; align-self: center; text-align: right; }
  .metric small { grid-column: 1 / -1; margin-top: 4px; }
  .details-list > div { grid-template-columns: 93px minmax(0, 1fr); gap: 12px; }
  .input-row { gap: 10px; flex-wrap: wrap; }
  .input-row > label { flex-basis: 100%; }
  .input-row > .port-field { flex-basis: 100%; max-width: none; }
  .section { margin-top: 23px; padding-top: 19px; }
  .account-form .input-row { gap: 18px; }
  .workspace-footer { font-size: 10px; }
  .auth-page main { padding-top: 30px; }
}
