/* ==========================================================================
   BiaoZi.Store · Midnight 控制台主题
   黑色背景 · 紧凑专业布局 · 手绘 Logo 与图标
   用户中心与管理后台共用（类名与 user.js / admin.js 输出一致）
   ========================================================================== */
:root {
  color-scheme: dark;
  --bg: #000;
  --bg-1: #0a0a0b;
  --bg-2: #0f0f11;
  --bg-3: #151518;
  --bg-4: #1c1c20;
  --line: #1d1d21;
  --line-2: #27272c;
  --line-3: #36363d;
  --fg: #ededef;
  --fg-2: #c8c8ce;
  --muted: #8b8b94;
  --faint: #62626b;
  --accent: #f7c948;
  --accent-soft: rgba(247, 201, 72, .12);
  --ok: #3ecf8e;
  --ok-soft: rgba(62, 207, 142, .12);
  --bad: #f2555a;
  --bad-fg: #ff8a8e;
  --bad-soft: rgba(242, 85, 90, .12);
  --warn: #f5a524;
  --warn-soft: rgba(245, 165, 36, .12);
  --info: #52a8ff;
  --info-soft: rgba(82, 168, 255, .1);
  --r-sm: 6px;
  --r: 8px;
  --r-lg: 12px;
  --shadow: 0 1px 0 rgba(255, 255, 255, .03) inset, 0 8px 24px rgba(0, 0, 0, .35);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei UI", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
  --mono: "JetBrains Mono", "Cascadia Code", "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --side: 236px;
  font-family: var(--font);
  font-size: 15px;
  font-weight: 400;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--fg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
::selection { background: rgba(247, 201, 72, .3); color: #fff; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--fg); text-decoration: none; text-underline-offset: 3px; }
a:hover { color: #fff; text-decoration: underline; text-decoration-color: var(--line-3); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
* { scrollbar-width: thin; scrollbar-color: #2c2c32 transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #26262b; border-radius: 10px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: #34343b; }

h1, h2, h3, p { margin-top: 0; }
h1 { font-size: 1.6rem; line-height: 1.25; font-weight: 650; letter-spacing: -.01em; margin-bottom: 0; }
h2 { font-size: 1.07rem; line-height: 1.4; font-weight: 600; margin-bottom: 8px; }
h3 { font-size: .98rem; font-weight: 600; margin: 18px 0 8px; }
p { margin-bottom: 12px; }
.muted, small { color: var(--muted); }
small { font-size: .87rem; }
strong { font-weight: 600; }
hr { border: 0; border-top: 1px solid var(--line); margin: 20px 0; }
code {
  font-family: var(--mono);
  font-size: .88em;
  color: var(--fg);
  background: var(--bg-3);
  border: 1px solid var(--line-2);
  padding: .08em .4em;
  border-radius: 5px;
}

/* ==========================================================================
   按钮
   ========================================================================== */
button, .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 34px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: var(--r);
  background: var(--fg);
  color: #0a0a0b;
  font-size: .93rem;
  font-weight: 550;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
  text-decoration: none;
  transition: background .15s, border-color .15s, color .15s, transform .08s, box-shadow .15s;
}
button:hover, .btn:hover { background: #fff; color: #000; text-decoration: none; }
button:active, .btn:active { transform: translateY(1px); }
button:disabled, button:disabled:hover {
  opacity: .45;
  cursor: not-allowed;
  transform: none;
}
.secondary, .btn.secondary {
  background: var(--bg-3);
  color: var(--fg);
  border-color: var(--line-2);
}
.secondary:hover, .btn.secondary:hover { background: var(--bg-4); border-color: var(--line-3); color: #fff; }
.danger, .btn.danger {
  background: var(--bad-soft);
  color: var(--bad-fg);
  border-color: rgba(242, 85, 90, .3);
}
.danger:hover, .btn.danger:hover { background: rgba(242, 85, 90, .2); color: #ffb1b4; border-color: rgba(242, 85, 90, .5); }
.text, .btn.text {
  background: transparent;
  color: var(--muted);
  border-color: transparent;
  padding: 0 10px;
}
.text:hover, .btn.text:hover { background: var(--bg-3); color: var(--fg); }
.btn.accent { background: var(--accent); color: #1a1405; }
.btn.accent:hover { background: #ffd866; color: #000; }
.btn.lg { min-height: 42px; padding: 0 20px; font-size: 1rem; border-radius: 10px; }

/* ==========================================================================
   表单
   ========================================================================== */
label {
  display: block;
  color: var(--fg-2);
  font-size: .9rem;
  font-weight: 500;
  margin-bottom: 14px;
}
input, select, textarea {
  display: block;
  width: 100%;
  min-height: 36px;
  margin-top: 6px;
  padding: 7px 11px;
  background: var(--bg-1);
  color: var(--fg);
  border: 1px solid var(--line-2);
  border-radius: var(--r);
  font-size: .93rem;
  font-weight: 400;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
input::placeholder, textarea::placeholder { color: var(--faint); }
input:hover, select:hover, textarea:hover { border-color: var(--line-3); }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: #6b5a24;
  box-shadow: 0 0 0 3px rgba(247, 201, 72, .14);
}
input[readonly] { background: var(--bg-2); color: var(--fg-2); }
input:disabled, select:disabled, textarea:disabled { opacity: .5; cursor: not-allowed; }
select {
  appearance: none;
  padding-right: 34px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238b8b94' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'><path d='M6.5 9.6c1.9 1.6 3.7 3.4 5.5 5.2 1.9-1.9 3.7-3.6 5.6-5.3'/></svg>");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 15px;
}
select option { background: var(--bg-2); color: var(--fg); }
textarea { min-height: 110px; resize: vertical; font-family: var(--mono); font-size: .88rem; line-height: 1.6; }
input[type="checkbox"] {
  appearance: none;
  display: inline-grid;
  place-items: center;
  width: 17px;
  height: 17px;
  min-height: 0;
  margin: 0 9px 0 0;
  padding: 0;
  vertical-align: -3px;
  border-radius: 5px;
  background: var(--bg-1);
  border: 1px solid var(--line-3);
  cursor: pointer;
}
input[type="checkbox"]:checked {
  background: var(--accent) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231a1405' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'><path d='M5.6 12.6c1.5 1.3 2.8 2.7 4 4.2 2.6-3.8 5.2-7 8.6-10'/></svg>") center/13px no-repeat;
  border-color: var(--accent);
}
label:has(> input[type="checkbox"]) { display: flex; align-items: center; color: var(--fg); font-weight: 400; }
input[type="file"] { padding: 5px; cursor: pointer; }
input[type="file"]::file-selector-button {
  margin-right: 12px;
  height: 26px;
  padding: 0 11px;
  border: 1px solid var(--line-3);
  border-radius: var(--r-sm);
  background: var(--bg-4);
  color: var(--fg);
  font-size: .85rem;
  cursor: pointer;
}
fieldset {
  margin: 0 0 14px;
  padding: 12px 14px 4px;
  border: 1px solid var(--line-2);
  border-radius: var(--r);
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 0 12px;
  max-height: 260px;
  overflow: auto;
}
legend { padding: 0 6px; color: var(--muted); font-size: .86rem; }
fieldset label { margin-bottom: 10px; }

.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.wide { grid-column: 1 / -1; }

/* ==========================================================================
   品牌
   ========================================================================== */
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--fg);
  font-size: 1.02rem;
  font-weight: 650;
  letter-spacing: -.01em;
}
.brand:hover { color: #fff; text-decoration: none; }
.brand img { width: 34px; height: 34px; flex: none; }
.brand small {
  display: block;
  margin-top: 1px;
  font-size: .8rem;
  font-weight: 400;
  letter-spacing: .02em;
  color: var(--muted);
}

/* ==========================================================================
   侧边栏
   ========================================================================== */
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 20;
  width: var(--side);
  display: flex;
  flex-direction: column;
  padding: 18px 12px 14px;
  background: var(--bg-1);
  border-right: 1px solid var(--line);
  overflow-y: auto;
}
.sidebar .brand { padding: 0 8px 4px; }
.sidebar nav { display: grid; gap: 2px; margin-top: 20px; }
.sidebar nav .nav-group {
  margin: 14px 10px 4px;
  color: var(--faint);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .08em;
}
.sidebar nav .nav-group:first-child { margin-top: 0; }
.sidebar nav a {
  --ico: none;
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 34px;
  padding: 0 10px;
  border-radius: var(--r);
  color: var(--muted);
  font-size: .93rem;
  font-weight: 500;
  transition: background .12s, color .12s;
}
.sidebar nav a::before {
  content: "";
  flex: none;
  width: 18px;
  height: 18px;
  background: currentColor;
  -webkit-mask: var(--ico) center / contain no-repeat;
  mask: var(--ico) center / contain no-repeat;
  opacity: .9;
}
.sidebar nav a:hover { background: var(--bg-3); color: var(--fg); text-decoration: none; }
.sidebar nav a.active { background: var(--bg-4); color: #fff; }
.sidebar nav a.active::before { background: var(--accent); opacity: 1; }
.sidebar nav a.active::after {
  content: "";
  position: absolute;
  left: -12px;
  top: 8px;
  bottom: 8px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--accent);
}

/* 手绘风导航图标（按 data-page 匹配） */
.sidebar nav a[data-page="dashboard"] { --ico: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M5.2 4.3c4.6-.4 9.2-.3 13.8 0 1 .1 1.5.7 1.5 1.7v3.4c0 1-.6 1.6-1.6 1.6-4.6.2-9.1.2-13.7 0-.9 0-1.5-.6-1.5-1.6V5.9c0-.9.6-1.5 1.5-1.6zM5.2 13.2c4.6-.3 9.2-.2 13.8 0 1 .1 1.5.7 1.5 1.7v3.3c0 1-.6 1.6-1.6 1.6-4.6.2-9.1.2-13.7 0-.9 0-1.5-.6-1.5-1.6v-3.4c0-.9.6-1.5 1.5-1.6z'/><path d='M7.5 7.6h.1M7.5 16.5h.1M11 7.6h5M11 16.5h5'/></svg>"); }
.sidebar nav a[data-page="plans"] { --ico: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M3.8 7.6 12 3.6l8.2 4v8.8L12 20.4l-8.2-4z'/><path d='M3.8 7.6 12 11.7l8.2-4.1M12 11.7v8.7M7.9 5.6l8.2 4.1'/></svg>"); }
.sidebar nav a[data-page="keys"] { --ico: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='8' cy='15' r='4.6'/><path d='M11.3 11.7 19.6 3.6M16.4 6.7l2.4 2.3M14 9.1l2 1.9'/></svg>"); }
.sidebar nav a[data-page="snapshots"] { --ico: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M4.3 8.2c1.2-.1 2.4-.1 3.4-.2l1.7-2.6c1.8-.2 3.6-.2 5.3 0L16.4 8c1.1 0 2.2.1 3.3.2.8.1 1.3.6 1.3 1.4v8.2c0 .8-.5 1.4-1.4 1.4-5.1.3-10.2.3-15.2 0-.8 0-1.4-.6-1.4-1.4V9.6c0-.8.5-1.3 1.3-1.4z'/><circle cx='12' cy='13.4' r='3.3'/></svg>"); }
.sidebar nav a[data-page="ledger"] { --ico: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M6 3.6c4-.3 8-.3 12 0 .7 0 1.1.5 1.1 1.2v15.6l-2.4-1.5-2.3 1.5-2.4-1.5-2.4 1.5-2.3-1.5-2.4 1.5V4.8c0-.7.4-1.1 1.1-1.2z'/><path d='M8.6 8.6h6.8M8.6 12.4h4.6'/></svg>"); }
.sidebar nav a[data-page="jobs"] { --ico: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M10 6.2h10M10 12.1h10M10 18h7M3.8 6.3l1.3 1.3 2.4-2.6M3.8 12.2l1.3 1.3 2.4-2.6M4.4 18h1.8'/></svg>"); }
.sidebar nav a[data-page="tokens"] { --ico: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M8.2 7.4C6.6 8.9 5.2 10.4 3.8 12c1.4 1.6 2.8 3.1 4.4 4.6M15.8 7.4c1.6 1.5 3 3 4.4 4.6-1.4 1.6-2.8 3.1-4.4 4.6M13.4 5.4c-.9 4.4-1.8 8.8-2.8 13.2'/></svg>"); }
.sidebar nav a[data-page="vms"] { --ico: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M4.4 4.3c5.1-.4 10.1-.4 15.2 0 .9.1 1.4.6 1.4 1.5v8.6c0 .9-.6 1.5-1.4 1.5-5.1.3-10.1.3-15.2 0-.9 0-1.4-.6-1.4-1.5V5.8c0-.9.5-1.4 1.4-1.5z'/><path d='M8.5 20.2h7M12 16v4.1M7.4 9l2.2 1.6-2.2 1.6M12 12.4h3.4'/></svg>"); }
.sidebar nav a[data-page="users"] { --ico: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='9' cy='8.3' r='3.6'/><path d='M2.8 19.6c.4-3.6 2.8-5.6 6.2-5.6s5.8 2 6.2 5.6M15.6 4.9a3.3 3.3 0 0 1 0 6.6M17.6 14.3c2 .6 3.3 2.4 3.6 5.2'/></svg>"); }
.sidebar nav a[data-page="bindings"] { --ico: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M10.2 13.8a4.2 4.2 0 0 0 6.1.3l3-3a4.3 4.3 0 0 0-6-6l-1.4 1.3'/><path d='M13.8 10.2a4.2 4.2 0 0 0-6.1-.3l-3 3a4.3 4.3 0 0 0 6 6l1.3-1.3'/></svg>"); }
.sidebar nav a[data-page="proxies"] { --ico: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='12' cy='12' r='8.6'/><path d='M3.6 12h16.8M12 3.4c3.2 3.4 3.2 13.8 0 17.2M12 3.4c-3.2 3.4-3.2 13.8 0 17.2'/></svg>"); }
.sidebar nav a[data-page="egress"] { --ico: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M14.2 3.8h6v6M20.2 3.8l-8.8 8.8'/><path d='M18.2 14.2v4.4c0 .9-.5 1.5-1.4 1.5-3.9.2-7.8.2-11.6 0-.8 0-1.4-.6-1.4-1.4-.2-3.9-.2-7.8 0-11.6 0-.9.6-1.4 1.5-1.4h4.3'/></svg>"); }
.sidebar nav a[data-page="audit"] { --ico: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M2.6 12.2C4.9 8 8.2 5.6 12 5.6s7.1 2.4 9.4 6.6c-2.3 4.1-5.6 6.4-9.4 6.4s-7.1-2.3-9.4-6.4z'/><circle cx='12' cy='12.1' r='3'/></svg>"); }
.sidebar nav a[data-page="queue"] { --ico: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M12 3.6c2.9 1.3 5.7 2.7 8.4 4.2-2.7 1.5-5.5 2.9-8.4 4.2-2.9-1.3-5.7-2.7-8.4-4.2C6.3 6.3 9.1 4.9 12 3.6z'/><path d='M3.8 12.2c2.7 1.4 5.4 2.7 8.2 4 2.8-1.3 5.5-2.6 8.2-4M3.8 16.4c2.7 1.4 5.4 2.7 8.2 4 2.8-1.3 5.5-2.6 8.2-4'/></svg>"); }
.sidebar nav a[data-page="settings"] { --ico: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M3.8 7h9.4M18.6 7h1.6M3.8 17h3.6M12.8 17h7.4'/><circle cx='15.9' cy='7' r='2.6'/><circle cx='10.1' cy='17' r='2.6'/></svg>"); }

.nav-bottom {
  margin-top: auto;
  padding: 12px 10px 2px;
  border-top: 1px solid var(--line);
  color: var(--faint);
  font-size: .82rem;
  line-height: 1.7;
}

/* ==========================================================================
   主区域 / 顶栏
   ========================================================================== */
main {
  margin-left: var(--side);
  min-height: 100dvh;
  padding: 0 28px 48px;
  max-width: calc(1680px + var(--side));
}
.top {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0 -28px 22px;
  padding: 14px 28px 13px;
  background: rgba(0, 0, 0, .78);
  border-bottom: 1px solid var(--line);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
}
.top h1 { font-size: 1.32rem; font-weight: 650; }
.eyebrow {
  display: block;
  color: var(--muted);
  font-size: .82rem;
  font-weight: 500;
  letter-spacing: .02em;
  margin-bottom: 2px;
}
.top-right { display: flex; align-items: center; gap: 8px; font-size: .9rem; }
.top-right > span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding: 0 12px 0 4px;
  margin-right: 4px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  color: var(--fg-2);
}
.top-right > span::before {
  content: "";
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--bg-4) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f7c948' stroke-width='1.9' stroke-linecap='round'><circle cx='12' cy='9.4' r='3.4'/><path d='M5.8 18.8c1-3 3.3-4.6 6.2-4.6s5.2 1.6 6.2 4.6'/></svg>") center/18px no-repeat;
}
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 14px; }
.toolbar > a { font-weight: 500; color: var(--accent); }
.toolbar > a:hover { color: #ffd866; }
.toolbar > small { margin-left: auto; }
#view > p.muted { font-size: .9rem; max-width: 1100px; }

/* ==========================================================================
   面板 / 统计 / 主机卡片
   ========================================================================== */
.panel, .stat, .vm-card {
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
}
.panel { padding: 18px 20px; margin: 16px 0; }
.panel > h2 { margin-bottom: 6px; }
.panel > form { margin-top: 12px; }

.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat {
  --dot: var(--accent);
  position: relative;
  padding: 14px 16px 12px;
  overflow: hidden;
}
.stat:nth-child(2) { --dot: var(--ok); }
.stat:nth-child(3) { --dot: var(--info); }
.stat:nth-child(4) { --dot: #b48cff; }
.stat::after {
  content: "";
  position: absolute;
  right: -30px;
  top: -30px;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--dot), transparent 70%);
  opacity: .1;
}
.stat > span { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: .86rem; }
.stat > span::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--dot); flex: none; }
.stat strong {
  display: block;
  margin-top: 6px;
  font-size: 1.65rem;
  font-weight: 650;
  line-height: 1.2;
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
}
.stat strong small { font-size: .86rem; font-weight: 400; color: var(--muted); letter-spacing: 0; margin-left: 2px; }

.vm-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 440px), 1fr)); gap: 14px; }
.vm-card { padding: 16px 18px; transition: border-color .15s; }
.vm-card:hover { border-color: var(--line-2); }
.vm-card > .eyebrow { color: var(--accent); font-weight: 600; }
.vm-card > h2 { font-size: 1.12rem; margin-bottom: 0; }
.vm-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.vm-head h2 { font-size: 1.07rem; margin-bottom: 3px; }
.vm-head .eyebrow { color: var(--accent); font-weight: 600; }
.vm-head .code { font-family: var(--mono); font-size: .84rem; color: var(--muted); overflow-wrap: anywhere; }
.specs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 14px 0 10px; }
.specs span {
  padding: 8px 10px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r);
  color: var(--muted);
  font-size: .8rem;
}
.specs strong { display: block; margin-top: 2px; color: var(--fg); font-size: .98rem; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.vm-card > p { font-size: .88rem; margin-bottom: 10px; }
.vm-card > button { margin-top: 4px; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.vm-card .actions { padding-top: 12px; border-top: 1px solid var(--line); }
.actions button { min-height: 30px; padding: 0 11px; font-size: .87rem; }
.actions .muted { font-size: .84rem; padding: 0 4px; }
.feature-disabled {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border: 1px dashed var(--line-3);
  border-radius: var(--r);
  color: var(--faint);
  font-size: .84rem;
}
.runtime-value { font-family: var(--mono); font-variant-numeric: tabular-nums; letter-spacing: -.02em; white-space: nowrap; }
.stat .runtime-value { font-size: clamp(1.25rem, 1.8vw, 1.6rem); }
.runtime-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0 0 8px; color: var(--muted); font-size: .84rem; font-variant-numeric: tabular-nums; }
.runtime-meta span:empty { display: none; }
.runtime-meta [data-clock-status]::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 7px; border-radius: 50%; background: var(--faint); vertical-align: 2px; }
.runtime-meta [data-state="running"] { color: var(--ok); }
.runtime-meta [data-state="running"]::before { background: var(--ok); box-shadow: 0 0 0 3px var(--ok-soft); }
.runtime-meta [data-state="stale"], .runtime-meta [data-state="expired"] { color: var(--warn); }
.runtime-meta [data-state="stale"]::before, .runtime-meta [data-state="expired"]::before { background: var(--warn); }

/* ==========================================================================
   表格
   ========================================================================== */
.table-wrap {
  overflow-x: auto;
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
}
table { width: 100%; border-collapse: collapse; text-align: left; font-size: .9rem; white-space: nowrap; }
thead th {
  position: sticky;
  top: 0;
  padding: 9px 14px;
  background: var(--bg-2);
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: .82rem;
  font-weight: 550;
  letter-spacing: .02em;
}
td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: top; max-width: 520px; white-space: normal; overflow-wrap: break-word; }
tbody tr { transition: background .1s; }
tbody tr:hover { background: var(--bg-2); }
tr:last-child td { border-bottom: 0; }
td small { font-size: .82rem; line-height: 1.6; }
td strong { font-weight: 600; }
td button { min-height: 28px; padding: 0 10px; font-size: .84rem; margin: 2px 4px 2px 0; }
td .badge { margin: 1px 0 3px; }
.proxy-address { font-family: var(--mono); font-size: .85rem; white-space: nowrap; }
.cell-title { white-space: nowrap; }
#key-results > p { margin: 10px 2px 0; }

.empty { padding: 44px 20px; text-align: center; color: var(--muted); font-size: .9rem; }
.empty::before {
  content: "";
  display: block;
  width: 64px;
  height: 52px;
  margin: 0 auto 12px;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 52' fill='none' stroke='%2362626b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M8.6 14.2c15.4-.8 31.3-.8 46.8 0 1.6.1 2.5 1 2.5 2.6l.4 27c0 1.6-.9 2.6-2.5 2.7-15.6.6-31.4.6-47 0-1.6-.1-2.5-1-2.5-2.6l.1-27.2c0-1.5.8-2.4 2.2-2.5z'/><path d='M6.8 27.6c5.5.1 11 0 16.5-.2 1.1 3.8 4.6 6.4 8.7 6.4s7.6-2.6 8.7-6.4c5.5.2 11 .3 16.6.1M14 8.4l2.6-5M32 6.6V1.8M50 8.4l-2.6-5'/></svg>") center/contain no-repeat;
}
.empty strong { display: block; color: var(--fg); font-size: 1rem; margin-bottom: 4px; }
.empty p { margin: 4px 0 12px; }

/* ==========================================================================
   徽章 / 提示
   ========================================================================== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 22px;
  padding: 0 9px;
  border-radius: 999px;
  background: var(--ok-soft);
  color: #6ee7b0;
  font-size: .8rem;
  font-weight: 550;
  white-space: nowrap;
  vertical-align: middle;
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.bad { background: var(--bad-soft); color: var(--bad-fg); }
.badge.warn { background: var(--warn-soft); color: #ffc261; }
.badge.mute { background: var(--bg-4); color: var(--muted); }

.info {
  position: relative;
  margin: 0 0 14px;
  padding: 10px 14px 10px 40px;
  background: var(--info-soft);
  border: 1px solid rgba(82, 168, 255, .22);
  border-radius: var(--r);
  color: #b8d8ff;
  font-size: .88rem;
}
.info::before {
  content: "";
  position: absolute;
  left: 13px;
  top: 11px;
  width: 17px;
  height: 17px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round'><path d='M12 3.2c5 0 8.8 3.8 8.8 8.8s-3.8 8.8-8.8 8.8-8.8-3.8-8.8-8.8S7 3.2 12 3.2z'/><path d='M12 11v5.4M12 7.6v.1'/></svg>") center/contain no-repeat;
  mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round'><path d='M12 3.2c5 0 8.8 3.8 8.8 8.8s-3.8 8.8-8.8 8.8-8.8-3.8-8.8-8.8S7 3.2 12 3.2z'/><path d='M12 11v5.4M12 7.6v.1'/></svg>") center/contain no-repeat;
}
.panel .info, dialog .info { margin: 10px 0 14px; }
.error { color: var(--bad-fg); font-size: .88rem; margin: 10px 0; white-space: pre-wrap; }
.error:empty { display: none; }
#view > .error, p.error { padding: 10px 14px; background: var(--bad-soft); border: 1px solid rgba(242, 85, 90, .28); border-radius: var(--r); }
td .error { margin: 6px 0 0; font-size: .82rem; }

/* ==========================================================================
   登录
   ========================================================================== */
.login {
  min-height: 100dvh;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, .85fr);
  background: var(--bg);
}
.login-copy {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 44px 6vw 40px;
  border-right: 1px solid var(--line);
  overflow: hidden;
  background:
    radial-gradient(700px 420px at 20% 18%, rgba(247, 201, 72, .09), transparent 70%),
    linear-gradient(var(--bg), var(--bg));
}
.login-copy::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(ellipse at 30% 40%, #000 20%, transparent 75%);
  mask-image: radial-gradient(ellipse at 30% 40%, #000 20%, transparent 75%);
}
.login-copy::after {
  content: "";
  position: absolute;
  right: 9%;
  bottom: 16%;
  width: clamp(120px, 15vw, 210px);
  aspect-ratio: 1;
  background: url("favicon.svg") center / contain no-repeat;
  opacity: .92;
  transform: rotate(8deg);
  filter: drop-shadow(0 30px 60px rgba(247, 201, 72, .18));
  pointer-events: none;
}
.login-copy > * { position: relative; z-index: 1; }
.login-copy .brand img { width: 40px; height: 40px; }
.login-copy h1 {
  margin: auto 0 16px;
  max-width: 560px;
  font-size: clamp(2rem, 3.4vw, 2.9rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -.02em;
}
.login-copy p { max-width: 460px; color: var(--muted); font-size: 1.02rem; margin-bottom: 0; }
.login-footer { margin-top: auto; padding-top: 40px; color: var(--faint); font-size: .85rem; }
.login-box {
  align-self: center;
  justify-self: center;
  width: min(380px, calc(100% - 48px));
  padding: 30px 0;
}
.login-box .eyebrow { color: var(--accent); font-weight: 600; }
.login-box h2 { font-size: 1.5rem; font-weight: 650; margin: 2px 0 20px; }
.login-box button[type="submit"] { width: 100%; min-height: 40px; margin-top: 6px; }
.login-box p small { font-size: .84rem; }
.login-box > p:last-child { text-align: center; margin: 14px 0 0; }

/* ==========================================================================
   弹窗
   ========================================================================== */
dialog {
  position: fixed;
  inset: 0;
  margin: auto;
  width: min(720px, calc(100vw - 32px));
  max-height: min(88dvh, 900px);
  padding: 22px 24px 18px;
  overflow: auto;
  background: var(--bg-1);
  color: var(--fg);
  border: 1px solid var(--line-2);
  border-radius: 14px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .7), 0 0 0 1px rgba(255, 255, 255, .02);
}
dialog[open] { animation: dlg .18s ease-out; }
dialog::backdrop { background: rgba(0, 0, 0, .72); backdrop-filter: blur(3px); }
dialog h2 { font-size: 1.15rem; margin-bottom: 14px; padding-right: 44px; }
dialog form > button[type="submit"], dialog form > button:not([type]) { margin-top: 4px; }
dialog p + button, dialog label + button, dialog textarea + button { margin: 0 6px 10px 0; }
dialog .actions { margin-top: 8px; }
dialog pre { margin: 8px 0 12px; }
:is(#close-dialog, .dialog-close) {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  min-height: 32px;
  height: 32px;
  padding: 0;
  font-size: 0;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--r);
}
:is(#close-dialog, .dialog-close)::before {
  content: "";
  width: 16px;
  height: 16px;
  background: var(--muted);
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round'><path d='M6 6.2c4 3.8 8 7.8 12 11.6M18 6c-4 4-8 8-12 12'/></svg>") center/contain no-repeat;
  mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round'><path d='M6 6.2c4 3.8 8 7.8 12 11.6M18 6c-4 4-8 8-12 12'/></svg>") center/contain no-repeat;
}
:is(#close-dialog, .dialog-close):hover { background: var(--bg-4); border-color: var(--line-2); }
:is(#close-dialog, .dialog-close):hover::before { background: var(--fg); }

.code, pre { font-family: var(--mono); font-variant-numeric: tabular-nums; }
pre {
  margin: 0 0 12px;
  padding: 12px 14px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r);
  color: #d6e9dd;
  font-size: .85rem;
  line-height: 1.65;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  max-height: 380px;
  overflow: auto;
}
.terminal { position: relative; height: 380px; padding: 10px; background: #050506; border: 1px solid var(--line-2); border-radius: var(--r); }

/* ==========================================================================
   Toast / 骨架 / 进度
   ========================================================================== */
#toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 100;
  display: none;
  max-width: 420px;
  padding: 11px 16px 11px 38px;
  background: var(--bg-3);
  border: 1px solid var(--line-2);
  border-radius: 10px;
  color: var(--fg);
  font-size: .9rem;
  box-shadow: 0 16px 40px rgba(0, 0, 0, .6);
}
#toast::before {
  content: "";
  position: absolute;
  left: 14px;
  top: 50%;
  width: 14px;
  height: 14px;
  margin-top: -7px;
  background: var(--accent);
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M12 1.5c.9 5.6 4.4 9.6 10.5 10.5-6.1.9-9.6 4.9-10.5 10.5C11.1 16.9 7.6 12.9 1.5 12 7.6 11.1 11.1 7.1 12 1.5z'/></svg>") center/contain no-repeat;
  mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M12 1.5c.9 5.6 4.4 9.6 10.5 10.5-6.1.9-9.6 4.9-10.5 10.5C11.1 16.9 7.6 12.9 1.5 12 7.6 11.1 11.1 7.1 12 1.5z'/></svg>") center/contain no-repeat;
}
#toast.show { display: block; animation: toast .2s ease-out; }
.skip { position: absolute; left: 12px; top: -80px; z-index: 200; padding: 8px 12px; background: var(--accent); color: #000; border-radius: var(--r); }
.skip:focus { top: 12px; }
.skeleton {
  height: 220px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: linear-gradient(100deg, var(--bg-1) 30%, var(--bg-3) 50%, var(--bg-1) 70%) 0 0 / 300% 100%;
  animation: shimmer 1.3s linear infinite;
}
.progress { height: 6px; margin: 8px 0 12px; background: var(--bg-4); border-radius: 99px; overflow: hidden; }
.progress-bar { height: 100%; background: var(--accent); border-radius: 99px; }
.progress-bar.indeterminate { width: 38%; animation: travel 1.4s ease-in-out infinite alternate; }
.mobile-menu { display: none; }
[hidden], #network-custom-label[hidden] { display: none !important; }

/* ==========================================================================
   后台 Key 查询筛选
   ========================================================================== */
.filterbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  padding: 10px;
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
}
.filterbar label { margin: 0; }
.filterbar input, .filterbar select { margin: 0; min-height: 34px; }
.filterbar .search { flex: 1 1 280px; position: relative; }
.filterbar .search input {
  padding-left: 34px;
  background: var(--bg) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238b8b94' stroke-width='2.2' stroke-linecap='round'><path d='M10.6 4.2c3.7-.1 6.5 2.7 6.5 6.4s-2.8 6.4-6.5 6.4-6.4-2.8-6.4-6.4 2.7-6.3 6.4-6.4zM15.4 15.6c1.6 1.4 3.1 2.9 4.5 4.4'/></svg>") 11px center / 16px no-repeat;
}
.filterbar select { width: auto; min-width: 138px; background-color: var(--bg); }
.filterbar .count { margin-left: auto; padding: 0 6px; color: var(--muted); font-size: .86rem; white-space: nowrap; }
.filterbar .count b { color: var(--fg); font-weight: 600; }
.seg { display: inline-flex; padding: 3px; gap: 2px; background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 10px; }
.seg button { min-height: 28px; padding: 0 12px; background: transparent; color: var(--muted); border: 0; border-radius: 7px; font-size: .88rem; }
.seg button:hover { background: var(--bg-4); color: var(--fg); }
.seg button.on { background: var(--bg-4); color: #fff; box-shadow: 0 0 0 1px var(--line-3) inset; }
.seg button em { font-style: normal; color: var(--faint); margin-left: 4px; font-variant-numeric: tabular-nums; }
.seg button.on em { color: var(--accent); }
.toolbar .spacer { flex: 1; }
.cell-title { font-weight: 600; color: var(--fg); }
.cell-sub { display: block; color: var(--muted); font-size: .82rem; line-height: 1.6; }
.meter { width: 150px; height: 5px; margin: 6px 0 4px; background: var(--bg-4); border-radius: 99px; overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--ok); border-radius: 99px; }
.meter.low i { background: var(--warn); }
.meter.out i { background: var(--bad); }
mark { background: rgba(247, 201, 72, .25); color: #fff; border-radius: 3px; padding: 0 1px; }
.no-match { padding: 34px 20px; text-align: center; color: var(--muted); background: var(--bg-1); border: 1px dashed var(--line-2); border-radius: var(--r-lg); }

/* ==========================================================================
   网页终端
   ========================================================================== */
dialog.terminal-dialog { width: min(1120px, 96vw); max-height: 94dvh; padding: 20px; }
dialog.terminal-dialog[open] { display: flex; flex-direction: column; overflow: hidden; }
.terminal-dialog #dialog-content { overflow-y: auto; min-height: 0; scrollbar-gutter: stable; }
.terminal-dialog #close-dialog { z-index: 6; }
dialog.terminal-expanded { width: 96vw; max-width: 1640px; }
.terminal-workspace { min-width: 0; }
.terminal-heading { position: sticky; top: 0; z-index: 4; display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding: 0 48px 10px 0; margin-bottom: 8px; background: var(--bg-1); }
.terminal-label { color: var(--accent); font-size: .76rem; font-weight: 600; letter-spacing: .14em; }
.terminal-heading h2 { font-size: 1.2rem; padding: 0; margin: 2px 0 2px; }
.terminal-host { margin: 0; color: var(--muted); font-family: var(--mono); font-size: .84rem; overflow-wrap: anywhere; }
.terminal-host span { color: var(--accent); }
.terminal-status { display: inline-flex; align-items: center; gap: 7px; height: 26px; padding: 0 10px; margin-top: 4px; border-radius: 999px; background: var(--warn-soft); color: #ffc261; font-size: .82rem; font-weight: 550; white-space: nowrap; }
.terminal-status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.terminal-status[data-state=connected] { background: var(--ok-soft); color: #6ee7b0; }
.terminal-status[data-state=error] { background: var(--bad-soft); color: var(--bad-fg); }
.terminal-status[data-state=closed] { background: var(--bg-4); color: var(--muted); }
.terminal-toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }
.terminal-tools { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; min-width: 0; }
.terminal-tools button, .terminal-keybar button, .terminal-paste button { min-height: 30px; padding: 0 11px; font-size: .85rem; }
.terminal-tool-divider { height: 20px; border-left: 1px solid var(--line-2); margin: 0 4px; }
.terminal-font-label { display: flex; align-items: center; gap: 7px; margin: 0; font-size: .85rem; color: var(--muted); }
.terminal-font-label select { width: 70px; min-height: 30px; padding: 0 26px 0 9px; margin: 0; font-size: .85rem; }
.terminal-screen { background: #050506; border: 1px solid var(--line-2); border-radius: 10px; overflow: hidden; }
.terminal-screen-bar { display: flex; align-items: center; gap: 12px; padding: 8px 12px; background: var(--bg-2); border-bottom: 1px solid var(--line); color: var(--muted); font-family: var(--mono); font-size: .78rem; }
.terminal-lights { display: flex; gap: 6px; }
.terminal-lights i { display: block; width: 10px; height: 10px; border-radius: 50%; background: #ff5f57; }
.terminal-lights i:nth-child(2) { background: #febc2e; }
.terminal-lights i:nth-child(3) { background: #28c840; }
.terminal-dimensions { margin-left: auto; }
.terminal-canvas { height: clamp(280px, 48dvh, 560px); min-width: 0; padding: 10px 10px 4px; }
.terminal-expanded .terminal-canvas { height: clamp(300px, 64dvh, 860px); }
.terminal-canvas .xterm { height: 100%; padding: 0; }
.terminal-canvas .xterm-helper-textarea { border: 0; border-radius: 0; box-shadow: none; padding: 0; margin: 0; min-height: 0; }
.terminal-keybar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 12px 0 10px; }
.terminal-keybar > span { margin-right: 4px; color: var(--muted); font-size: .84rem; }
.terminal-keybar button { min-width: 44px; background: var(--bg-3); color: var(--fg); border-color: var(--line-2); font-family: var(--mono); }
.terminal-keybar button:hover { background: var(--bg-4); color: #fff; }
.terminal-paste { padding-top: 10px; border-top: 1px solid var(--line); }
.terminal-paste summary { color: var(--fg-2); cursor: pointer; font-size: .88rem; }
.terminal-paste label { margin-top: 10px; font-size: .86rem; }
.terminal-paste textarea { min-height: 84px; }
.terminal-footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px 18px; margin-top: 12px; color: var(--faint); font-size: .8rem; }
.terminal-message { color: var(--ok); }
.terminal-copy-helper { position: fixed; left: 0; top: 0; width: 1px; height: 1px; opacity: .01; }

/* ==========================================================================
   动效
   ========================================================================== */
@keyframes dlg { from { opacity: 0; transform: translateY(6px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes toast { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes shimmer { to { background-position: -300% 0; } }
@keyframes travel { from { transform: translateX(-20%); } to { transform: translateX(180%); } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ==========================================================================
   响应式
   ========================================================================== */
@media (max-width: 1200px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .specs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  :root { --side: 0px; }
  .sidebar {
    position: sticky;
    top: 0;
    width: auto;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    padding: 10px 16px 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    overflow: visible;
  }
  .sidebar .brand { padding: 0; }
  .sidebar nav { display: flex; width: 100%; margin: 10px -16px 0; padding: 0 16px 8px; overflow-x: auto; gap: 4px; }
  .sidebar nav .nav-group { display: none; }
  .sidebar nav a { flex: none; min-height: 32px; white-space: nowrap; }
  .sidebar nav a.active::after { left: 10px; right: 10px; top: auto; bottom: -8px; width: auto; height: 2px; border-radius: 2px; }
  .nav-bottom { display: none; }
  main { margin-left: 0; padding: 0 16px 40px; }
  .top { position: static; margin: 0 -16px 16px; padding: 14px 16px; background: transparent; backdrop-filter: none; }
  .top-right > span { display: none; }
  .login { grid-template-columns: 1fr; }
  .login-copy { padding: 26px 16px 28px; border-right: 0; border-bottom: 1px solid var(--line); }
  .login-copy::after { width: 84px; right: 16px; top: 18px; bottom: auto; }
  .login-copy h1 { margin: 34px 0 10px; font-size: 1.85rem; }
  .login-footer { display: none; }
  .login-box { width: calc(100% - 32px); }
}
@media (max-width: 640px) {
  .grid { grid-template-columns: 1fr; }
  .stats { gap: 10px; }
  .stat strong { font-size: 1.4rem; }
  .top h1 { font-size: 1.2rem; }
  th, td { padding: 9px 11px; }
  dialog { padding: 18px 16px 14px; }
  dialog.terminal-dialog { padding: 16px 12px; }
  .terminal-heading { flex-wrap: wrap; padding-right: 40px; }
  .terminal-tool-divider { display: none; }
  .terminal-canvas { height: 44dvh; min-height: 240px; padding: 8px 6px 4px; }
  .terminal-keybar > span { flex-basis: 100%; }
  .filterbar .count { margin-left: 0; }
  #toast { left: 16px; right: 16px; bottom: 16px; max-width: none; }
}
