/* ============================================================
   NPS 管理面板 - 样式表
   ============================================================ */
:root {
  --primary: #4f6bf6;
  --primary-dark: #3b55e0;
  --primary-soft: #eef1fe;
  --accent: #7b5cf5;
  --grad: linear-gradient(135deg, #4f6bf6, #7b5cf5);
  --bg: #f3f5fb;
  --card: #ffffff;
  --line: #e8ecf5;
  --text: #1f2937;
  --text-2: #64748b;
  --text-3: #94a3b8;
  --success: #12b76a;
  --success-bg: #e8f9f0;
  --danger: #d92d20;
  --danger-bg: #fee9e7;
  --warn: #b45309;
  --warn-bg: #fef4e6;
  --sidebar-w: 248px;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 1px 3px rgba(16, 24, 40, .06);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
}
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }

/* ---------- 布局 ---------- */
.layout { display: flex; min-height: 100vh; }
.main { flex: 1; margin-left: var(--sidebar-w); display: flex; flex-direction: column; min-width: 0; }
.content { flex: 1; padding: 26px 30px 40px; max-width: 1440px; width: 100%; margin: 0 auto; }
.page-foot { text-align: center; color: var(--text-3); font-size: 12px; padding: 16px 0 26px; }

/* ---------- 侧边栏 ---------- */
.sidebar {
  position: fixed; left: 0; top: 0; bottom: 0; width: var(--sidebar-w);
  background: linear-gradient(180deg, #101a38 0%, #0b1230 60%, #0a0f28 100%);
  color: #cbd5e1; display: flex; flex-direction: column; z-index: 50;
}
.brand { display: flex; align-items: center; gap: 12px; padding: 22px 22px 18px; }
.brand-logo {
  width: 40px; height: 40px; border-radius: 12px; background: var(--grad);
  color: #fff; font-weight: 800; font-size: 20px; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 16px rgba(79, 107, 246, .45);
}
.brand-text b { display: block; color: #f8fafc; font-size: 16px; letter-spacing: .5px; }
.brand-text small { color: #64748b; font-size: 11px; letter-spacing: 1px; }

.nav { flex: 1; padding: 8px 14px; overflow-y: auto; }
.nav-item {
  display: flex; align-items: center; gap: 12px; padding: 11px 14px; margin: 3px 0;
  border-radius: 10px; color: #94a3b8; font-size: 14px; position: relative; transition: all .18s;
}
.nav-item:hover { color: #e2e8f0; background: rgba(255, 255, 255, .05); }
.nav-item.active { color: #fff; background: var(--grad); box-shadow: 0 6px 18px rgba(79, 107, 246, .35); }
.nav-item svg { flex: none; opacity: .9; }

.sidebar-foot { padding: 16px; border-top: 1px solid rgba(255, 255, 255, .07); display: flex; align-items: center; gap: 10px; }
.foot-user { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.avatar {
  width: 36px; height: 36px; border-radius: 50%; background: var(--grad); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 700; flex: none;
}
.foot-info { min-width: 0; }
.foot-info b { display: block; color: #e2e8f0; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.foot-info small { color: #64748b; font-size: 11px; }
.foot-logout { color: #64748b; padding: 8px; border-radius: 8px; display: flex; }
.foot-logout:hover { color: #f87171; background: rgba(248, 113, 113, .1); }

.sidebar-mask { display: none; position: fixed; inset: 0; background: rgba(2, 8, 32, .5); z-index: 40; }

/* ---------- 顶栏 ---------- */
.topbar {
  display: flex; align-items: center; gap: 16px; padding: 18px 30px;
  background: rgba(255, 255, 255, .82); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 30;
}
.page-title { font-size: 19px; font-weight: 700; color: #0f172a; flex: 1; }
.topbar-right { display: flex; align-items: center; gap: 12px; }
.role-chip { font-size: 12px; padding: 4px 12px; border-radius: 999px; font-weight: 600; }
.role-admin { background: var(--primary-soft); color: var(--primary); }
.role-user { background: var(--warn-bg); color: var(--warn); }
.cfg-alert {
  display: inline-flex; align-items: center; gap: 7px; font-size: 12px; color: #b42318;
  background: var(--danger-bg); padding: 5px 12px; border-radius: 999px; font-weight: 600;
}
.cfg-dot { width: 7px; height: 7px; border-radius: 50%; background: #ef4444; animation: blink 1.2s infinite; }
@keyframes blink { 50% { opacity: .3; } }

.burger { display: none; border: 1px solid var(--line); background: #fff; border-radius: 10px; width: 38px; height: 38px; cursor: pointer; padding: 9px; }
.burger span { display: block; height: 2px; background: var(--text-2); border-radius: 2px; margin: 3px 0; }

/* ---------- 卡片 ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 22px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.card-head h2 { font-size: 15.5px; font-weight: 700; color: #0f172a; display: flex; align-items: center; gap: 8px; }
.card-head h2 .h-ico { color: var(--primary); display: inline-flex; }
.card-head .sub { color: var(--text-3); font-size: 12.5px; font-weight: 400; margin-top: 2px; }
.card-body { padding: 22px; }
.card-body.tight { padding: 0; }

/* ---------- 统计卡 ---------- */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; margin-bottom: 22px; }
.stat-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 20px 22px; display: flex; align-items: center; gap: 16px;
  transition: transform .18s, box-shadow .18s;
}
.stat-card:hover { transform: translateY(-3px); box-shadow: 0 10px 26px rgba(16, 24, 40, .09); }
.stat-ico {
  width: 50px; height: 50px; border-radius: 14px; display: flex; align-items: center; justify-content: center;
  color: #fff; background: var(--grad); flex: none;
}
.stat-ico.c2 { background: linear-gradient(135deg, #0ea5e9, #22d3ee); }
.stat-ico.c3 { background: linear-gradient(135deg, #10b981, #34d399); }
.stat-ico.c4 { background: linear-gradient(135deg, #f59e0b, #fbbf24); }
.stat-ico.c5 { background: linear-gradient(135deg, #f43f5e, #fb7185); }
.stat-meta { min-width: 0; }
.stat-num { font-size: 25px; font-weight: 800; color: #0f172a; line-height: 1.25; white-space: nowrap; }
.stat-label { color: var(--text-2); font-size: 12.5px; }

/* ---------- 表格 ---------- */
.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; min-width: 640px; }
.tbl th {
  text-align: left; padding: 12px 16px; font-size: 12px; font-weight: 600; color: var(--text-2);
  background: #f8fafc; border-bottom: 1px solid var(--line); white-space: nowrap;
}
.tbl td { padding: 13px 16px; border-bottom: 1px solid #f1f4fa; color: var(--text); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr { transition: background .12s; }
.tbl tbody tr:hover { background: #f8faff; }
.tbl .mono { font-family: ui-monospace, SFMono-Regular, Consolas, "Courier New", monospace; font-size: 12.5px; color: #475569; }
.cell-strong { font-weight: 600; color: #0f172a; }
.cell-dim { color: var(--text-3); font-size: 12.5px; }
.cell-ell { max-width: 260px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tbl-empty { text-align: center; padding: 46px 20px !important; color: var(--text-3); }
.tbl-empty .big { font-size: 34px; display: block; margin-bottom: 8px; opacity: .45; }

/* ---------- 徽章 ---------- */
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.badge .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge-success { background: var(--success-bg); color: #0f7b47; }
.badge-danger  { background: var(--danger-bg); color: #b42318; }
.badge-gray    { background: #f2f4f7; color: #475467; }
.badge-blue    { background: var(--primary-soft); color: var(--primary); }
.badge-warn    { background: var(--warn-bg); color: var(--warn); }
.badge-purple  { background: #f4eefe; color: #7b5cf5; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  border: 0; cursor: pointer; font-family: inherit; font-size: 13.5px; font-weight: 600;
  padding: 9px 18px; border-radius: 10px; color: #fff; background: var(--grad);
  transition: all .15s; white-space: nowrap; text-decoration: none;
}
.btn:hover { filter: brightness(1.07); color: #fff; box-shadow: 0 6px 16px rgba(79, 107, 246, .35); }
.btn:disabled { opacity: .55; cursor: not-allowed; box-shadow: none; }
.btn-outline { background: #fff; color: var(--text-2); border: 1px solid #d8dfeb; }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); box-shadow: none; background: var(--primary-soft); }
.btn-danger { background: linear-gradient(135deg, #ef4444, #f97316); }
.btn-danger:hover { box-shadow: 0 6px 16px rgba(239, 68, 68, .35); }
.btn-ghost-danger { background: #fff; border: 1px solid #f3c6c2; color: #c0362c; }
.btn-ghost-danger:hover { background: var(--danger-bg); color: #b42318; box-shadow: none; }
.btn-sm { padding: 5px 12px; font-size: 12.5px; border-radius: 8px; }
.btn-block { width: 100%; }
.actions { display: flex; gap: 6px; flex-wrap: wrap; }

/* 文本小按钮 */
.mini-btn {
  border: 1px dashed #cbd5e1; background: #f8fafc; color: var(--text-2); font-size: 12px;
  padding: 3px 9px; border-radius: 7px; cursor: pointer; font-family: inherit;
}
.mini-btn:hover { color: var(--primary); border-color: var(--primary); background: var(--primary-soft); }
.mini-btn.copied { color: #0f7b47; border-color: #0f7b47; }

/* ---------- 表单 ---------- */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 20px; }
.form-grid .full { grid-column: 1 / -1; }
.field label { display: block; font-size: 13px; font-weight: 600; color: #334155; margin-bottom: 6px; }
.field label .req { color: var(--danger); margin-left: 3px; }
.field .tip { color: var(--text-3); font-size: 12px; margin-top: 5px; line-height: 1.5; }
.ipt, select.ipt, textarea.ipt {
  width: 100%; padding: 10px 13px; border: 1px solid #d8dfeb; border-radius: 10px;
  font-family: inherit; font-size: 13.5px; color: var(--text); background: #fff; outline: none; transition: all .15s;
}
.ipt:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(79, 107, 246, .14); }
textarea.ipt { min-height: 84px; resize: vertical; line-height: 1.6; }
.ipt::placeholder { color: #b6c0d4; }
.form-foot { display: flex; gap: 12px; margin-top: 22px; align-items: center; }
.check-line { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: #334155; cursor: pointer; user-select: none; }
.check-line input { width: 16px; height: 16px; accent-color: var(--primary); cursor: pointer; }
.pwd-wrap { position: relative; }
.pwd-wrap .ipt { padding-right: 40px; }
.eye {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%); border: 0; background: none;
  cursor: pointer; color: var(--text-3); font-size: 13px; padding: 4px;
}
.eye.on { color: var(--primary); }

/* 折叠高级选项 */
details.adv { border: 1px dashed #d8dfeb; border-radius: 10px; padding: 12px 16px; }
details.adv summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--text-2); user-select: none; }
details.adv .form-grid { margin-top: 16px; }

/* ---------- 标签页 ---------- */
.tabs { display: inline-flex; align-items: center; gap: 4px; background: #eef1f8; padding: 5px; border-radius: 11px; max-width: 100%; min-width: 0; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; -ms-overflow-style: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { padding: 7px 16px; border-radius: 8px; font-size: 13px; font-weight: 600; color: var(--text-2); flex: 0 0 auto; white-space: nowrap; }
.tab:hover { color: var(--primary); }
.tab.active { background: #fff; color: var(--primary); box-shadow: 0 2px 6px rgba(16, 24, 40, .08); }

/* ---------- 搜索栏 ---------- */
.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.search-box { position: relative; }
.search-box .ipt { padding-left: 34px; width: 240px; }
.search-box svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--text-3); }

/* ---------- 分页 ---------- */
.pagination { display: flex; align-items: center; gap: 6px; padding: 16px 20px; flex-wrap: wrap; }
.pg { min-width: 32px; padding: 6px 11px; border-radius: 8px; font-size: 13px; color: var(--text-2); background: #fff; border: 1px solid var(--line); text-align: center; }
.pg:hover { border-color: var(--primary); color: var(--primary); }
.pg.active { background: var(--grad); color: #fff; border-color: transparent; font-weight: 600; }
.pg.disabled { pointer-events: none; opacity: .45; }
.pg-ell { color: var(--text-3); padding: 0 2px; }

/* ---------- 消息提示 ---------- */
#toastBox { position: fixed; top: 20px; right: 20px; z-index: 200; display: flex; flex-direction: column; gap: 10px; }
.toast {
  display: flex; align-items: center; gap: 10px; min-width: 240px; max-width: 380px;
  background: #fff; border-radius: 12px; padding: 13px 18px; font-size: 13.5px; font-weight: 500;
  box-shadow: 0 10px 34px rgba(2, 8, 32, .16); border-left: 4px solid var(--primary);
  animation: slideIn .3s ease; word-break: break-all;
}
.toast-success { border-color: var(--success); }
.toast-error   { border-color: var(--danger); }
.toast-success .toast-ico { color: var(--success); }
.toast-error .toast-ico   { color: var(--danger); }
.toast-ico { font-weight: 800; }
.toast.hide { animation: slideOut .4s ease forwards; }
@keyframes slideIn { from { transform: translateX(30px); opacity: 0; } }
@keyframes slideOut { to { transform: translateX(30px); opacity: 0; } }

/* ---------- 空状态 & 提示块 ---------- */
.empty { text-align: center; padding: 60px 20px; color: var(--text-3); }
.empty .big { font-size: 42px; display: block; margin-bottom: 12px; opacity: .4; }
.notice { display: flex; gap: 12px; padding: 14px 18px; border-radius: 12px; font-size: 13.5px; margin-bottom: 22px; align-items: flex-start; }
.notice-info { background: var(--primary-soft); color: #3b4fc0; border: 1px solid #d9e0fc; }
.notice-warn { background: var(--warn-bg); color: var(--warn); border: 1px solid #fde4bd; }

/* ---------- 键值展示 / 代码 ---------- */
.kv-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px; }
.kv { display: flex; justify-content: space-between; gap: 12px; background: #f8fafc; border: 1px solid #eef1f8; padding: 9px 14px; border-radius: 10px; font-size: 13px; }
.kv b { color: var(--text-2); font-weight: 500; white-space: nowrap; }
.kv span { color: var(--text); font-weight: 600; text-align: right; word-break: break-all; }
.code-chip {
  display: inline-flex; align-items: center; gap: 6px; background: #f1f4fa; border: 1px solid #e4e9f3;
  font-family: ui-monospace, Consolas, monospace; font-size: 12px; color: #475569;
  padding: 3px 9px; border-radius: 7px; max-width: 100%; overflow: hidden;
}
.code-chip code { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- 流量条形图 ---------- */
.flow-chart { display: flex; flex-direction: column; gap: 13px; }
.flow-row { display: grid; grid-template-columns: 150px 1fr 110px; align-items: center; gap: 12px; font-size: 13px; }
.flow-name { color: #334155; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.flow-track { height: 9px; background: #eef1f8; border-radius: 999px; overflow: hidden; }
.flow-bar { height: 100%; border-radius: 999px; background: var(--grad); min-width: 3px; transition: width .6s ease; }
.flow-val { color: var(--text-2); text-align: right; font-size: 12.5px; }

/* ---------- 登录页 ---------- */
.login-bg {
  min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px;
  background: linear-gradient(135deg, #0f1b3d 0%, #16215c 50%, #4f46e5 130%);
  position: relative; overflow: hidden; font-family: var(--font);
}
.login-bg::before, .login-bg::after {
  content: ""; position: absolute; border-radius: 50%; filter: blur(70px); opacity: .5;
}
.login-bg::before { width: 420px; height: 420px; background: #4f6bf6; top: -120px; right: -80px; }
.login-bg::after { width: 360px; height: 360px; background: #7b5cf5; bottom: -110px; left: -70px; opacity: .35; }
.login-card {
  position: relative; z-index: 2; width: 100%; max-width: 420px; background: #fff;
  border-radius: 20px; padding: 42px 40px 34px; box-shadow: 0 30px 70px rgba(2, 8, 32, .5);
}
.login-logo { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.login-logo .brand-logo { width: 46px; height: 46px; font-size: 23px; }
.login-logo b { font-size: 21px; color: #0f172a; }
.login-card .sub { color: var(--text-3); font-size: 13px; margin-bottom: 28px; }
.login-field { margin-bottom: 16px; }
.login-field label { display: block; font-size: 13px; font-weight: 600; color: #334155; margin-bottom: 7px; }
.login-foot { margin-top: 20px; text-align: center; color: var(--text-3); font-size: 12.5px; }
.login-err {
  background: var(--danger-bg); color: #b42318; border: 1px solid #f6c6c2;
  padding: 10px 14px; border-radius: 10px; font-size: 13px; margin-bottom: 16px;
}
.login-ok {
  background: var(--success-bg); color: #0f7b47; border: 1px solid #b7e6cd;
  padding: 10px 14px; border-radius: 10px; font-size: 13px; margin-bottom: 16px;
}

/* ---------- 响应式 ---------- */
@media (max-width: 960px) {
  .sidebar { transform: translateX(-100%); transition: transform .25s ease; }
  .sidebar.open { transform: translateX(0); }
  .sidebar-mask.show { display: block; }
  .main { margin-left: 0; }
  .burger { display: block; }
  .content { padding: 18px 16px 30px; }
  .topbar { padding: 14px 16px; }
  .form-grid { grid-template-columns: 1fr; }
  .search-box .ipt { width: 100%; }
  .search-box { flex: 1; }
  .flow-row { grid-template-columns: 110px 1fr 90px; }
}

/* ---------- 服务端切换器 ---------- */
.srv-form { display: inline-flex; }
.srv-switch {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 4px 8px 4px 12px;
  border: 1px solid var(--line); border-radius: 999px; background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .05);
  transition: border-color .15s, box-shadow .15s;
}
.srv-switch:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(79, 107, 246, .14); }
.srv-switch .sw-ico { color: var(--primary); display: inline-flex; }
.srv-switch .sw-label { font-size: 12px; font-weight: 600; color: var(--text-3); white-space: nowrap; }
.srv-switch select {
  -webkit-appearance: none; appearance: none; border: 0; outline: none;
  background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") no-repeat right 2px center;
  padding: 6px 20px 6px 2px; font-family: inherit; font-size: 13px; font-weight: 700; color: #0f172a;
  max-width: 168px; cursor: pointer;
}
.srv-switch select:focus { outline: none; }
@media (max-width: 960px) {
  .srv-switch .sw-label { display: none; }
  .srv-switch select { max-width: 112px; }
}

/* ---------- 延迟徽标（服务端管理） ---------- */
.lat { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; padding: 3px 10px; border-radius: 999px; min-width: 74px; justify-content: center; }
.lat::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.lat-ok   { color: #059669; background: rgba(16, 185, 129, .13); }
.lat-mid  { color: #b45309; background: rgba(245, 158, 11, .15); }
.lat-slow { color: #b42318; background: rgba(239, 68, 68, .12); }
.lat-off  { color: #64748b; background: rgba(100, 116, 139, .14); }

/* ===== 系统资源卡片（仪表盘） ===== */
.res-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(250px,1fr));gap:14px;margin-bottom:16px}
.res-card{background:#fff;border:1px solid #e6eaf2;border-radius:12px;padding:14px 16px 15px;display:flex;flex-direction:column;gap:12px}
.res-head{display:flex;justify-content:space-between;align-items:center;gap:8px}
.res-name{font-size:13px;font-weight:700;color:#334155;display:flex;align-items:center;gap:7px;flex:none}
.res-name::before{content:'';width:8px;height:8px;border-radius:50%;background:var(--rc)}
.res-sub{font-size:11px;color:#94a3b8;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.res-main{display:flex;align-items:center;gap:16px}
.res-ring{position:relative;width:92px;height:92px;flex:none}
.res-ring svg{width:100%;height:100%;transform:rotate(-90deg);display:block}
.res-ring .ring-bg{fill:none;stroke:#eef2f8;stroke-width:10}
.res-ring .ring-val{fill:none;stroke:var(--rc);stroke-width:10;stroke-linecap:round;stroke-dasharray:326.73;stroke-dashoffset:326.73;transition:stroke-dashoffset .7s ease}
.ring-txt{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center}
.ring-txt b{font-size:17px;font-weight:700;color:#1e293b;line-height:1.1}
.ring-txt i{font-style:normal;font-size:10px;color:#94a3b8;margin-top:2px}
.res-stats{list-style:none;margin:0;padding:0;flex:1;min-width:0;display:flex;flex-direction:column;gap:8px}
.res-stats li{display:flex;justify-content:space-between;align-items:baseline;gap:10px;font-size:12px;color:#94a3b8}
.res-stats b{font-weight:600;font-size:12px;color:#334155;text-align:right;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.res-bar .bar-label{display:flex;justify-content:space-between;font-size:11px;color:#94a3b8;margin-bottom:5px}
.bar-track{height:6px;border-radius:3px;background:#eef2f8;overflow:hidden}
.bar-fill{display:block;height:100%;width:0;border-radius:3px;background:var(--rc);transition:width .7s ease}
.res-cpu{--rc:#3b82f6}
.res-mem{--rc:#10b981}
.res-load{--rc:#f59e0b}
.res-net{--rc:#0ea5e9}

/* 表单高级设置折叠面板 */
form details.adv{grid-column:1/-1;border:1px solid #e2e8f0;border-radius:10px;padding:12px 14px 4px;background:#f8fafc}
form details.adv summary{cursor:pointer;font-weight:600;font-size:13px;color:#64748b;user-select:none}
form details.adv[open] summary{padding-bottom:8px;border-bottom:1px dashed #e2e8f0;margin-bottom:10px}
form details.adv .form-grid{margin-top:8px}
