/* 节点与调度相关页面的专属样式（2026-11 改版）：nd- 节点与集群 / up- 节点升级 / al- 安全告警 / dv- DNS 调度 / icp- 备案检测 / ag- 聚合 CDN */

/* ---------- 通用小件 ---------- */
.nd-ml6 { margin-left: 6px; }
.nd-w70 { width: 70px; } .nd-w90 { width: 90px; } .nd-w110 { width: 110px; } .nd-w160 { width: 160px; }
.nd-scroll { overflow-x: auto; }
.nd-tbl .acts .btn.ghost { border-color: transparent; background: transparent; box-shadow: none; }
.nd-tbl .acts .btn.ghost:hover { background: var(--hover); }
.nd-tbl .acts .btn.ghost.danger { color: var(--crit); } .nd-tbl .acts .btn.ghost.danger:hover { background: var(--crit-bg); }
.nd-tbl .cell-main .badge { font-weight: 500; vertical-align: 1px; }
.nd-tbl td.num .cell-sub { font-size: inherit; }
.nd-tbl .meter + .meter { margin-top: 5px; }
.nd-col-load { width: 170px; }
.nd-dotname { display: inline-flex; align-items: center; gap: 8px; }
.nd-row-off td { color: var(--faint); } .nd-row-off .cell-main { color: var(--dim); }

/* ---------- 节点页：筛选栏右侧汇总 ---------- */
.nd-sum { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 6px 18px; font-size: 13px; color: var(--dim); }
.nd-sum > span { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.nd-sum b { font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; }

/* ---------- 节点卡片 ---------- */
.nd-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.nd-card { display: flex; flex-direction: column; min-width: 0; padding: 16px 18px 0; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); box-shadow: var(--shadow); cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.nd-card:hover { border-color: var(--line-3); box-shadow: var(--shadow-md); }
.nd-card-h { display: flex; align-items: flex-start; gap: 10px; }
.nd-id { flex: 1; min-width: 0; }
.nd-name { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; font-weight: 600; line-height: 1.4; color: var(--text); }
.nd-name:hover { text-decoration: none; } .nd-card:hover .nd-name { color: var(--accent); }
.nd-ip { display: block; margin-top: 2px; font: 12.5px/1.4 var(--mono); color: var(--dim); }
.nd-card-h .badge { flex: none; margin-top: 1px; }
.nd-meters { display: grid; gap: 7px; margin-top: 16px; }
.nd-net { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 14px; padding: 10px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.nd-net > div { min-width: 0; } .nd-net > div + div { padding-left: 12px; border-left: 1px solid var(--line); }
.nd-net span { display: block; font-size: 12px; color: var(--dim); }
.nd-net b { display: block; margin-top: 1px; overflow: hidden; text-overflow: ellipsis; font-size: 13.5px; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--text); white-space: nowrap; }
.nd-meta { display: grid; gap: 7px; margin-top: 12px; font-size: 13px; }
.nd-meta > div { display: flex; align-items: center; gap: 8px; min-width: 0; min-height: 22px; }
.nd-meta .k { flex: none; width: 34px; font-size: 12px; color: var(--dim); }
.nd-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; } .nd-tags:empty { display: none; }
.nd-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: auto -18px 0; padding: 10px 18px; border-top: 1px solid var(--line); border-radius: 0 0 var(--r) var(--r); background: var(--panel-2); font-size: 12.5px; }
.nd-meta + .nd-foot, .nd-tags + .nd-foot { margin-top: 14px; }
.nd-card > .nd-foot { margin-top: auto; } .nd-card > .nd-meta, .nd-card > .nd-tags { margin-bottom: 14px; } .nd-card > .nd-meta:has(+ .nd-tags) { margin-bottom: 0; }
.nd-foot > span { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.nd-pending { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; margin-top: 16px; padding-bottom: 18px; font-size: 13px; }
.nd-card.idle { background: var(--panel-2); box-shadow: none; }
.nd-card.down { border-color: var(--crit-line); }
.nd-card.down .nd-meters, .nd-card.down .nd-net { opacity: .45; }
.nd-down { margin-top: 12px; padding: 7px 10px; border-radius: 6px; background: var(--crit-bg); color: var(--crit-soft, var(--crit)); font-size: 12.5px; font-weight: 500; }
.nd-down + .nd-meters { margin-top: 12px; }

/* ---------- 节点页抽屉 ---------- */
.nd-dhead { display: flex; align-items: flex-start; gap: 20px; margin-bottom: 20px; }
.nd-lead { margin: 0 0 12px; font-size: 13px; line-height: 1.6; color: var(--dim); }
.nd-inset { margin-bottom: 20px; padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel-2); }
.nd-inset .field:last-of-type { margin-bottom: 0; }
.nd-inline { display: flex; align-items: flex-start; gap: 16px; }
.nd-inline .field { margin-bottom: 0; } .nd-inline > .chk { margin-top: 27px; background: var(--panel); height: 34px; padding: 0 12px; }
.nd-inset-f { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.nd-pick-kw { margin-bottom: 8px; } .nd-pick-kw .inp { width: 240px; padding-left: 32px; } .nd-pick-kw svg { top: 7px; }
.nd-pick { max-height: 264px; overflow: auto; border: 1px solid var(--line-2); border-radius: var(--rc); background: var(--panel); }
.nd-pick-row { display: flex; align-items: center; gap: 12px; min-height: 42px; padding: 5px 12px; border-bottom: 1px solid var(--line); }
.nd-pick-row:last-child { border-bottom: 0; } .nd-pick-row:hover { background: var(--row-hover, var(--hover)); }
.nd-pick-n { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; cursor: pointer; }
.nd-pick-n input { accent-color: var(--primary); flex: none; } .nd-pick-n b { font-weight: 500; }
.nd-pick-none { padding: 20px; text-align: center; font-size: 13px; color: var(--dim); }
.nd-dpanel { box-shadow: none; }
.nd-state { display: grid; gap: 8px; margin-bottom: 4px; font-size: 13px; line-height: 1.6; }
.nd-state-h, .nd-state-l { display: grid; grid-template-columns: 68px minmax(0, 1fr); gap: 12px; }
.nd-state-l { font-size: 12.5px; color: var(--text-2); }
.nd-custom { border-bottom: 0; }
.nd-fs { min-width: 0; margin: 0; padding: 0; border: 0; } .nd-fs.off { opacity: .55; }
.opt-row + .nd-fs { margin-top: 12px; }
.nd-fs > .form-sec:first-child { margin-top: 0; }
.nd-sec-act { display: flex; align-items: center; gap: 10px; }
.nd-opt-last { border-bottom: 0; margin-bottom: 6px; }
.nd-opt-solo { margin: 4px 0 0; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--rc); }
.nd-opt-solo:first-child, .nd-opt-solo:last-child { padding: 14px 16px; border-bottom: 1px solid var(--line); }
.nd-dl { grid-template-columns: repeat(4, minmax(0, 1fr)); padding: 16px 18px; border-radius: var(--rc); background: var(--panel-2); }
.nd-dl-wide { grid-column: 1 / -1; }
.nd-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.nd-save { display: flex; align-items: center; gap: 16px; margin-top: -4px; } .nd-save .help { flex: 1; font-size: 12.5px; color: var(--dim); line-height: 1.55; }
.nd-req { grid-template-columns: 84px 1fr; gap: 10px 16px; line-height: 1.6; }
@media (max-width: 640px) { .nd-dl { grid-template-columns: repeat(2, minmax(0, 1fr)); } .nd-dhead { flex-direction: column; } .nd-inline { flex-direction: column; } .nd-inline > .chk { margin-top: 0; } }

/* ---------- 节点页：筛选与列表 ---------- */
.nd-gsel { width: 150px; }
.nd-tcp { margin-top: 5px; font-size: 12px; }
.nd-tbl td.num, .nd-tbl td.num .cell-sub { white-space: nowrap; }
.nd-tbl a.cell-main { color: var(--text); cursor: pointer; } .nd-tbl a.cell-main:hover { color: var(--accent); text-decoration: none; }

/* ---------- 节点详情抽屉 ---------- */
.nd-dbar { margin-top: 0; }
.nd-cnt { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; margin-left: 6px; padding: 0 5px; border-radius: 9px; background: var(--crit-bg); color: var(--crit); font-size: 11.5px; font-weight: 600; font-variant-numeric: tabular-nums; }
.nd-dtabs { margin: 18px 0 20px; }
.nd-hist { margin-bottom: 8px; padding: 16px 18px 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); }
.nd-hist-h { display: flex; align-items: flex-start; gap: 12px; }
.nd-hist-h h3 { margin: 0; font-size: 15px; font-weight: 600; }
.nd-hist-h p { margin: 3px 0 0; font-size: 12.5px; color: var(--dim); }
.nd-hstats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 16px 0 4px; border: 1px solid var(--line); border-radius: var(--rc); background: var(--panel-2); }
.nd-hstats > div { min-width: 0; padding: 10px 14px; } .nd-hstats > div + div { border-left: 1px solid var(--line); }
.nd-hstats span { display: block; font-size: 12px; color: var(--dim); }
.nd-hstats b { display: block; margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 17px; font-weight: 650; font-variant-numeric: tabular-nums; letter-spacing: -.01em; color: var(--text); }
.nd-hstats small { display: block; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11.5px; color: var(--dim); }
.nd-chart-t { display: flex; align-items: baseline; gap: 8px; margin: 16px 0 6px; }
.nd-chart-t b { font-size: 13px; font-weight: 600; color: var(--text); } .nd-chart-t span { font-size: 12px; color: var(--dim); }
.nd-chart { min-height: 200px; } .nd-chart.sm { min-height: 160px; }
.nd-chart.loading { border-radius: var(--rc); background: var(--panel-2); }
.nd-hempty { margin-top: 8px; }
.nd-card-sec + .nd-card-sec { margin-top: 32px; }
.nd-reopts { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.nd-reopts .chk { height: 32px; padding: 0 12px; }
.nd-dl + .form-sec { margin-top: 28px; }
@media (max-width: 640px) { .nd-hstats { grid-template-columns: repeat(2, minmax(0, 1fr)); } .nd-hstats > div:nth-child(3) { border-left: 0; } .nd-hstats > div:nth-child(n+3) { border-top: 1px solid var(--line); } .nd-hist-h { flex-wrap: wrap; } }

/* ---------- 成员与线路抽屉 ---------- */
.nd-mhead { display: flex; align-items: center; gap: 16px; margin-bottom: 12px; }
.nd-mstats { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; border: 1px solid var(--line); border-radius: var(--rc); background: var(--panel-2); }
.nd-mstats > div { padding: 9px 16px; } .nd-mstats > div + div { border-left: 1px solid var(--line); }
.nd-mstats span { display: block; font-size: 12px; color: var(--dim); }
.nd-mstats b { display: block; margin-top: 2px; font-size: 17px; font-weight: 650; font-variant-numeric: tabular-nums; color: var(--text); }
.nd-mstats b small { font-size: 13px; font-weight: 500; color: var(--dim); }
.nd-mstats b.nd-mstats-t { font-size: 14px; font-weight: 600; line-height: 1.55; }
.nd-mhead + .nd-lead { margin-bottom: 18px; }
.nd-pick-cnt { margin-left: 8px; font-weight: 400; color: var(--accent); }
.nd-pick-row.on { background: var(--accent-soft); }
.nd-mtbl tr.nd-grp td { padding-top: 9px; padding-bottom: 9px; background: var(--panel-2); border-bottom: 1px solid var(--line); }
.nd-mtbl tbody tr.nd-grp:hover td { background: var(--panel-2); }
.nd-mtbl tbody + tbody tr.nd-grp td { border-top: 1px solid var(--line); }
.nd-grp-in { display: flex; align-items: center; gap: 10px; } .nd-grp-in .sp { flex: 1; }
.nd-grp-fb { font-size: 12.5px; color: var(--dim); }
.nd-grp-n { font-size: 12.5px; color: var(--dim); } .nd-grp-n b { font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; }
@media (max-width: 640px) { .nd-mhead { flex-direction: column; align-items: stretch; } }

/* ---------- 节点升级 ---------- */
.up-v-t { font-size: 18px; letter-spacing: 0; line-height: 1.45; } .up-v-t .badge { font-size: 13px; vertical-align: 3px; }
.up-run.paused { border-color: var(--crit-line); }
.up-form { display: flex; align-items: flex-end; gap: 24px; flex-wrap: wrap; }
.up-form .field { margin-bottom: 0; }
.up-scope { flex: 1; min-width: 280px; }
.up-hint { margin-left: 8px; font-weight: 400; color: var(--dim); }
.up-groups { display: flex; flex-wrap: wrap; gap: 8px; }
.up-groups .chk { height: 34px; padding: 0 12px; background: var(--panel); }
.up-groups .chk.on { border-color: var(--accent-line); background: var(--accent-soft); color: var(--accent); }
.up-form-r { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.up-batch { width: 110px; }
.up-acts { display: flex; gap: 8px; }
.up-prog { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 12px; font-size: 13px; }
.up-prog > span { display: inline-flex; align-items: center; gap: 8px; } .up-prog b { font-variant-numeric: tabular-nums; }
.up-scroll { overflow-x: auto; }
.up-tbl th.up-ck, .up-tbl td.up-ck { width: 40px; padding-right: 0; }
.up-tbl input[type=checkbox] { accent-color: var(--primary); }
.up-tbl tr.up-row-on td { background: var(--accent-soft); }
.up-ml6 { margin-left: 6px; }
.up-note { max-width: 360px; }

.icp-grid { grid-template-columns: minmax(0, 1fr) 340px; align-items: start; }
.icp-tbl { overflow-x: auto; }
@media (max-width: 1280px) { .icp-grid { grid-template-columns: minmax(0, 1fr); } }

.nd-net small.nd-in { display: block; font-size: 11.5px; color: var(--dim); font-family: var(--mono, monospace); }
.nd-netnote { margin: 0 0 10px; font-size: 12.5px; color: var(--dim); }

/* 成员与线路：按线路一行，节点小标签显示实际占比 */
.nd-ltbl td { vertical-align: middle; padding-top: 10px; padding-bottom: 10px; }
.nd-lcol { width: 150px; white-space: nowrap; }
.nd-lcol .nd-grp-fb { display: block; margin-top: 2px; }
.nd-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.nd-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border: 1px solid var(--line-2); border-radius: 6px; background: var(--bg-2); cursor: pointer; font-size: 13px; line-height: 1.4; }
.nd-chip:hover, .nd-chip.on { border-color: var(--accent-line); background: var(--accent-soft); }
.nd-chip b { font-family: var(--mono, monospace); color: var(--accent); }
.nd-chip em { font-style: normal; font-size: 12px; color: var(--warn); }
.nd-chip small { color: var(--dim); font-size: 11px; }
.nd-chip.bk { border-style: dashed; }
.nd-chip.off { opacity: .55; }
.nd-chip.bad em { color: var(--crit); }

/* 节点卡片（紧凑）：4 列等宽对齐，标签在上、数值在下 */
.nd-grid { gap: 12px; }
.nd-card { padding: 14px 16px 0; }
.nd-kv { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); row-gap: 10px; margin-top: 12px; padding: 10px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.nd-kv > div { min-width: 0; padding-left: 8px; border-left: 1px solid var(--line); }
.nd-kv > div:nth-child(4n+1) { padding-left: 0; border-left: 0; }
.nd-kv span { display: block; font-size: 11.5px; color: var(--dim); line-height: 1.4; }
.nd-kv b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12.5px; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -.1px; color: var(--text); line-height: 1.5; }
.nd-kv .crit b { color: var(--crit); }
.nd-card.down .nd-kv { opacity: .45; }
.nd-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 10px 0 12px; min-width: 0; font-size: 12.5px; }
.nd-line-g { max-width: 40%; color: var(--dim); }
.nd-card > .nd-foot { margin: auto -16px 0; padding: 8px 16px; font-size: 12.5px; }
.nd-rename .inp { flex: 1; max-width: 320px; }

/* 集群表：操作精简 + 更多菜单 */
.nd-gtbl td { vertical-align: middle; }
.nd-gtbl .copy-text, .nd-gtbl .copytext { display: inline-flex; align-items: center; gap: 6px; }
.nd-gacts { white-space: nowrap; text-align: right; }
.nd-more { position: relative; display: inline-block; }
.nd-menu { position: absolute; right: 0; top: calc(100% + 4px); z-index: 20; min-width: 132px; padding: 4px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--panel); box-shadow: var(--shadow-md); text-align: left; }
.nd-menu a { display: block; padding: 7px 10px; border-radius: 6px; font-size: 13px; color: var(--text); cursor: pointer; }
.nd-menu a:hover { background: var(--bg-2); text-decoration: none; }
.nd-menu a.danger { color: var(--crit); }

/* 升级记录 */
.up-htbl td { vertical-align: middle; padding-top: 9px; padding-bottom: 9px; }
.up-htbl tr.up-h-bad td:first-child { box-shadow: inset 3px 0 0 var(--crit); }
.up-hmore { padding: 10px 16px; border-top: 1px solid var(--line); text-align: center; }
