/* FrpDeck 1.0 —— 通用组件 */

.shell { position: relative; z-index: 1; min-height: 100vh; }
.wrap { max-width: 1480px; margin: 0 auto; padding: 30px 32px 90px; }

/* ---------- 顶栏 ---------- */
.topbar {
  position: sticky; top: 0; z-index: 30; height: var(--top-h);
  background: var(--topbar); backdrop-filter: blur(18px) saturate(150%); -webkit-backdrop-filter: blur(18px) saturate(150%);
  border-bottom: 1px solid var(--line);
}
/* 顶栏内容和下面的页面对齐：同样最宽 1480 像素、左右各留 32 像素 */
.topbar-in { max-width: 1480px; height: 100%; margin: 0 auto; padding: 0 32px; display: flex; align-items: center; gap: 20px; }
.brand { display: flex; align-items: center; gap: 12px; flex: none; background: none; border: 0; padding: 0; }
.brand-lockup { display: flex; }
.brand-lockup .fd-logo { height: 28px; width: auto; transition: transform .3s var(--spring), filter .3s; }
.brand:hover .brand-lockup .fd-logo { transform: translateY(-1px); filter: drop-shadow(0 6px 14px color-mix(in srgb, var(--logo-main) 40%, transparent)); }
.brand .ver { font: 600 10.5px/1 var(--mono); color: var(--muted); padding: 4px 7px; border-radius: 99px; border: 1px solid var(--line-2); }
.nav { position: relative; display: flex; gap: 2px; margin-left: 6px; padding: 4px; border-radius: 99px; }
.nav .slider { position: absolute; top: 4px; bottom: 4px; left: 0; width: 0; border-radius: 99px; background: var(--hover); box-shadow: inset 0 0 0 1px var(--line-2); transition: opacity .2s; pointer-events: none; } /* 位置和宽度由 main.js 的两个弹簧驱动 */
.nav button {
  position: relative; display: flex; align-items: center; gap: 7px; padding: 7px 14px; border: 0; background: none;
  border-radius: 99px; color: var(--muted); font-weight: 600; font-size: 14px; transition: color .2s;
  flex: none; white-space: nowrap; word-break: keep-all;
}
.nav-label{white-space:nowrap;word-break:keep-all;line-height:20px}
.topbar-in>.nav{flex:none;min-width:max-content}
.brand .ver{max-width:112px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:none}
.top-actions{flex:none;white-space:nowrap}
.top-actions>.icon-btn,.top-actions>.pop-anchor{flex:none}
.topbar .lic-badge{flex:none;max-width:150px;white-space:nowrap}
.topbar .lic-badge .t{display:block;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.topbar .lic-badge b{white-space:nowrap}
.nav button:hover { color: var(--text); }
.nav button.on { color: var(--text); }
.nav button svg.i { width: 15px; height: 15px; opacity: .85; }
.tab-badge { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; display: inline-grid; place-items: center; font: 700 10.5px/1 var(--mono); color: #fff; background: var(--crit); box-shadow: 0 0 0 3px color-mix(in srgb, var(--crit) 22%, transparent); }
.tab-badge.gold { background: var(--gold); color: var(--gold-ink); box-shadow: none; }
.top-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.icon-btn {
  width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; border: 0; color: var(--muted);
  background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); transition: color .2s, background .2s, box-shadow .2s, transform .2s var(--spring);
}
.icon-btn:hover { color: var(--text); background: var(--hover); box-shadow: inset 0 0 0 1px var(--line-2); }
.icon-btn:active { transform: scale(.94); }
.icon-btn.on { color: var(--pri); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--pri) 45%, transparent); background: color-mix(in srgb, var(--pri) 10%, transparent); }
.lic-badge {
  display: flex; align-items: center; gap: 7px; height: 34px; padding: 0 13px 0 10px; border-radius: 99px; border: 0;
  font-size: 13px; font-weight: 650; color: var(--muted); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line-2); transition: transform .2s var(--spring), box-shadow .2s;
}
.lic-badge:hover { transform: translateY(-1px); box-shadow: inset 0 0 0 1px var(--line-2), 0 6px 18px -10px rgba(0, 0, 0, .5); }
.lic-badge.pro { color: var(--text); background: linear-gradient(110deg, color-mix(in srgb, var(--gold) 20%, transparent), color-mix(in srgb, var(--gold) 8%, transparent)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--gold) 45%, transparent); }
.lic-badge.pro b { background: linear-gradient(110deg, #FFF1D0, #E6BE7A, #C99A4E); -webkit-background-clip: text; background-clip: text; color: transparent; font-weight: 800; }
html[data-mode="light"] .lic-badge.pro b { background: linear-gradient(110deg, #C99A4E, #A8792F, #8F6424); -webkit-background-clip: text; background-clip: text; }
.lic-badge svg.i { color: var(--gold); }

/* ---------- 弹出菜单 ---------- */
.pop-anchor { position: relative; }
.pop {
  position: absolute; z-index: 40; top: calc(100% + 8px); right: 0; min-width: 220px; padding: 8px; border-radius: 14px;
  background: var(--surface-solid); box-shadow: inset 0 0 0 1px var(--line-2), 0 24px 50px -14px rgba(0, 0, 0, .55);
  animation: pop .22s var(--ease); transform-origin: top right;
}
html[data-mode="light"] .pop { box-shadow: inset 0 0 0 1px var(--line-2), 0 24px 50px -18px rgba(40, 30, 10, .3); }
.pop.left { right: auto; left: 0; transform-origin: top left; }
.pop-t { font-size: 11.5px; color: var(--faint); padding: 6px 10px; letter-spacing: .06em; }
.pop-i { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; border-radius: 9px; background: none; text-align: left; font-size: 13.5px; color: var(--text); }
.pop-i:hover { background: var(--hover); }
.pop-i.on { background: color-mix(in srgb, var(--pri) 13%, transparent); }
.pop-i .ck { margin-left: auto; color: var(--pri); }
.pop-i.danger { color: var(--crit); }
.pop hr { border: 0; border-top: 1px solid var(--line); margin: 6px 4px; }
.pop .row { display: flex; gap: 6px; padding: 4px 6px 2px; }
.pop .row button { flex: 1; padding: 7px 0; border: 0; border-radius: 9px; background: none; box-shadow: inset 0 0 0 1px var(--line); color: var(--muted); font-size: 12.5px; }
.pop .row button.on { color: var(--text); background: var(--hover); box-shadow: inset 0 0 0 1px var(--line-2); }
.swd { width: 22px; height: 22px; border-radius: 7px; flex: none; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .18); }

/* ---------- 页头 ---------- */
.page-head { display: flex; align-items: flex-end; gap: 24px; margin-bottom: 22px; flex-wrap: wrap; }
.eyebrow { font: 600 11.5px/1 var(--font); letter-spacing: .26em; color: var(--pri); margin-bottom: 10px; text-transform: uppercase; }
.h1 {
  font-size: 32px; line-height: 1.15; font-weight: 800; letter-spacing: .3px;
  background: var(--heading); background-size: 250% 100%; -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: textShine 8s ease-in-out infinite alternate;
}
.desc { color: var(--muted); margin-top: 7px; max-width: 720px; }
.head-acts { display: flex; gap: 10px; margin-left: auto; align-items: center; flex-wrap: wrap; }

/* ---------- 卡片 ---------- */
.card {
  position: relative; border-radius: var(--r-lg); background: linear-gradient(180deg, var(--sheen, transparent), transparent 46%), var(--surface);
  backdrop-filter: blur(16px) saturate(120%); -webkit-backdrop-filter: blur(16px) saturate(120%);
  box-shadow: inset 0 0 0 1px var(--line), inset 0 1px 0 rgba(255, 255, 255, .045), var(--shadow);
  transition: box-shadow .3s var(--std), transform .3s var(--ease);
}
.card.pad { padding: 20px 22px; }
/* 鼠标在卡片上时，跟着鼠标的一团柔光 */
.card.glowy::after {
  content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .3s;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), color-mix(in srgb, var(--pri) 9%, transparent), transparent 60%);
}
.card.glowy:hover::after { opacity: 1; }
.card.glowy:hover { box-shadow: inset 0 0 0 1px var(--line-2), inset 0 1px 0 rgba(255, 255, 255, .05), var(--shadow); }
.card-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.card-title { font-size: 15.5px; font-weight: 750; display: flex; align-items: center; gap: 9px; }
.card-sub { font-size: 12.5px; color: var(--muted); }
.card-head > .card-sub { min-width: 3em; } /* 标题行放不下时整块换到下一行，不要被挤成一个字一行 */
.ico-t { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; flex: none; color: var(--pri); background: color-mix(in srgb, var(--pri) 14%, transparent); }
.ico-t.good { color: var(--good); background: color-mix(in srgb, var(--good) 14%, transparent); }
.ico-t.warn { color: var(--warn); background: color-mix(in srgb, var(--warn) 14%, transparent); }
.ico-t.crit { color: var(--crit); background: color-mix(in srgb, var(--crit) 14%, transparent); }
.ico-t.sec { color: var(--sec); background: color-mix(in srgb, var(--sec) 15%, transparent); }
.ico-t.gold { color: var(--gold); background: color-mix(in srgb, var(--gold) 15%, transparent); }
.ico-t svg.i { width: 15px; height: 15px; }

/* ---------- 按钮 ---------- */
.btn {
  position: relative; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 38px; padding: 0 16px;
  border-radius: 99px; border: 0; font-weight: 650; font-size: 13.5px; color: var(--text); white-space: nowrap;
  background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line-2);
  transition: transform .2s var(--spring), box-shadow .2s, background .2s, color .2s, opacity .2s;
}
.btn:hover { transform: translateY(-1px); background: var(--hover); text-decoration: none; }
.btn:active { transform: translateY(0) scale(.97); }
.btn.pri { color: var(--on-pri); background: var(--btn); box-shadow: var(--btn-shadow), inset 0 1px 0 rgba(255, 255, 255, .35); }
.btn.pri::after { content: ''; position: absolute; top: 0; bottom: 0; width: 40%; left: 0; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .45), transparent); transform: translateX(-130%) skewX(-18deg); }
.btn.pri:hover::after { animation: shine .9s var(--ease); }
.btn.gold { color: #1E1405; background: linear-gradient(180deg, #F3D49C, #D9A95A); box-shadow: 0 8px 22px -10px rgba(230, 190, 122, .6), inset 0 1px 0 rgba(255, 255, 255, .4); }
.btn.ghost { background: none; box-shadow: none; color: var(--muted); }
.btn.ghost:hover { color: var(--text); background: var(--hover); }
.btn.danger { color: var(--crit); }
.btn.sm { height: 32px; padding: 0 12px; font-size: 12.5px; gap: 6px; }
.btn.xs { height: 26px; padding: 0 9px; font-size: 12px; gap: 5px; }
.btn.icon { width: 32px; padding: 0; }
.btn.block { width: 100%; height: 44px; font-size: 14.5px; }
.btn:disabled { opacity: .45; pointer-events: none; }
.btn .spin { margin-right: 2px; }
.lock-i { color: var(--gold); }

/* ---------- 表单 ---------- */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; min-width: 0; }
.field > label, .flabel { font-size: 12.5px; font-weight: 650; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.field .opt { font-weight: 500; color: var(--faint); }
input[type=text], input[type=password], input[type=number], input[type=date], input[type=search], select, textarea {
  width: 100%; height: 40px; padding: 0 12px; border-radius: 11px; border: 0; outline: 0; background: var(--bg-2);
  box-shadow: inset 0 0 0 1px var(--line-2); color: var(--text); transition: box-shadow .2s, background .2s;
}
html[data-mode="dark"] input[type=text], html[data-mode="dark"] input[type=password], html[data-mode="dark"] input[type=number],
html[data-mode="dark"] input[type=date], html[data-mode="dark"] input[type=search], html[data-mode="dark"] select, html[data-mode="dark"] textarea { background: rgba(255, 255, 255, .035); }
textarea { height: auto; min-height: 150px; padding: 10px 12px; font-family: var(--code); font-size: 12.5px; line-height: 1.6; resize: vertical; }
input:focus, select:focus, textarea:focus { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--pri) 65%, transparent), 0 0 0 3px color-mix(in srgb, var(--pri) 10%, transparent); }
/* 带候选项的输入框：去掉浏览器画的下拉三角，候选分组在下面列出来了 */
input[list]::-webkit-calendar-picker-indicator { display: none !important; }
input::placeholder, textarea::placeholder { color: var(--faint); }
select { appearance: none; -webkit-appearance: none; padding-right: 32px; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 17px) 17px, calc(100% - 12px) 17px; background-size: 5px 5px; background-repeat: no-repeat; }
.hint { font-size: 12px; color: var(--faint); line-height: 1.5; }
.warn-t { font-size: 12px; color: var(--warn); }
.inline { display: flex; gap: 8px; align-items: center; }
.inline > input, .inline > select { flex: 1; min-width: 0; }
.inline .unit { color: var(--muted); font-size: 13px; }
.checkline { display: flex; align-items: flex-start; gap: 10px; font-size: 13.5px; color: var(--text); margin: 4px 0 12px; cursor: pointer; line-height: 1.45; }
.checkline > span > .faint.mini { display: block; margin-top: 2px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.sec-t { font-size: 12px; font-weight: 700; letter-spacing: .12em; color: var(--faint); margin: 18px 0 10px; display: flex; align-items: center; gap: 10px; }
.sec-t::after { content: ''; flex: 1; height: 1px; background: var(--line); }

/* 自绘复选框 */
input[type=checkbox] { appearance: none; -webkit-appearance: none; width: 17px; height: 17px; flex: none; margin: 1px 0 0; border-radius: 5px; box-shadow: inset 0 0 0 1.5px var(--line-2); background: transparent; display: inline-grid; place-items: center; cursor: pointer; transition: background .15s, box-shadow .15s; }
input[type=checkbox]:checked { background: var(--pri); box-shadow: none; }
input[type=checkbox]:checked::after { content: ''; width: 9px; height: 5px; border-left: 2.2px solid var(--on-pri); border-bottom: 2.2px solid var(--on-pri); transform: translateY(-1px) rotate(-45deg); }
input[type=checkbox]:indeterminate { background: var(--pri); box-shadow: none; }
input[type=checkbox]:indeterminate::after { content: ''; width: 8px; height: 2px; background: var(--on-pri); border-radius: 2px; }

/* 开关 */
.sw { position: relative; display: inline-block; width: 40px; height: 23px; flex: none; }
.sw input { position: absolute; opacity: 0; inset: 0; margin: 0; width: 100%; height: 100%; cursor: pointer; z-index: 1; }
.sw .track { position: absolute; inset: 0; border-radius: 99px; background: var(--line-2); transition: background .25s, box-shadow .25s; }
/* 圆点左右两侧分别过渡：前沿先到、后沿后跟，移动时被拉长 */
.sw .knob { position: absolute; top: 3px; left: 3px; right: 20px; height: 17px; border-radius: 99px; background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .3); transition: left .26s var(--sp-snap), right .42s var(--sp-out), background .25s; }
html[data-mode="dark"] .sw .knob { background: #CFC6B8; }
.sw input:checked ~ .track { background: var(--btn); box-shadow: 0 0 14px -3px color-mix(in srgb, var(--pri) 70%, transparent); }
.sw input:checked ~ .knob { left: 20px; right: 3px; background: #fff; transition: right .26s var(--sp-snap), left .42s var(--sp-out), background .25s; }
.sw input:disabled { cursor: not-allowed; }
.sw input:disabled ~ .track { opacity: .55; }

/* 分段选择 */
.seg { position: relative; isolation: isolate; display: inline-flex; padding: 3px; border-radius: 12px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.seg button { position: relative; display: flex; align-items: center; gap: 6px; padding: 6px 12px; border: 0; border-radius: 9px; background: none; font-size: 13px; font-weight: 600; color: var(--muted); transition: color .2s, background .2s; }
.seg button:hover { color: var(--text); }
.seg button.on { color: var(--text); }
/* 选中底色画在 ::before 上；切换时 motion.js 改 --sl、--sr，让底色从旧按钮滑过来 */
.seg button.on::before { content: ''; position: absolute; z-index: -1; top: 0; bottom: 0; left: var(--sl, 0px); right: var(--sr, 0px); border-radius: inherit; background: var(--hover); box-shadow: inset 0 0 0 1px var(--line-2), 0 4px 14px -8px rgba(0, 0, 0, .6); pointer-events: none; }
.seg button em { font-style: normal; font: 700 11px/1 var(--mono); opacity: .7; }
.seg.sm button { padding: 4px 9px; font-size: 12px; }

/* ---------- 状态胶囊、标签 ---------- */
.pill { display: inline-flex; align-items: center; gap: 7px; height: 26px; padding: 0 10px 0 9px; border-radius: 99px; font-size: 12.5px; font-weight: 650; white-space: nowrap; color: var(--muted); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); border: 0; transition: color .3s var(--std), background-color .3s var(--std), box-shadow .3s var(--std); }
.pill .dot, .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none; }
.pill.good { color: var(--good); }
.pill.good .dot { animation: ping 2.4s var(--std) infinite; }
.pill.warn { color: var(--warn); }
.pill.crit { color: var(--crit); background: color-mix(in srgb, var(--crit) 9%, transparent); }
.pill.crit .dot { animation: blink2 1.2s ease 1; }
.pill.off { color: var(--faint); }
.pill.ext { color: var(--sec); }
.pill.pri { color: var(--pri); }
.pill.gold { color: var(--gold); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--gold) 40%, transparent); }
.pill .ms { font: 600 11.5px/1 var(--mono); color: var(--muted); font-variant-numeric: tabular-nums; }
.pill.btnlike { cursor: pointer; transition: transform .2s var(--spring), background .2s; }
.pill.btnlike:hover { transform: translateY(-1px); background: var(--hover); }
.pill.btnlike:disabled { cursor: default; transform: none; }
.fast { color: #FACC15; display: inline-flex; }
.fast svg.i { width: 12px; height: 12px; fill: currentColor; stroke: none; }
.chip { display: inline-flex; align-items: center; gap: 6px; font: 500 12.5px/1 var(--mono); padding: 6px 8px; border-radius: 8px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); color: var(--text); white-space: nowrap; }
.chip button { border: 0; background: none; padding: 0; color: var(--faint); display: inline-flex; }
.chip button:hover { color: var(--pri); }
.lc { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 650; padding: 3px 7px; border-radius: 6px; white-space: nowrap; font-variant-numeric: tabular-nums; color: var(--text); background: color-mix(in srgb, var(--rail, var(--pri)) 14%, transparent); }
.lc .ld, .ld { width: 7px; height: 7px; border-radius: 50%; background: var(--rail, var(--pri)); flex: none; display: inline-block; }
.lc.z { opacity: .4; }
.tag { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 650; padding: 3px 8px; border-radius: 7px; color: var(--muted); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); white-space: nowrap; }
.tag.good { color: var(--good); } .tag.warn { color: var(--warn); } .tag.crit { color: var(--crit); }
.tag.gold { color: var(--gold); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--gold) 40%, transparent); }
.kbd { font: 600 11px/1 var(--code); color: var(--muted); padding: 4px 6px; border-radius: 6px; box-shadow: inset 0 0 0 1px var(--line-2); background: var(--surface-2); }
.flag { font-size: 16px; line-height: 1; }

/* ---------- 统计块 ---------- */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.stat { padding: 15px 17px; border-radius: 16px; }
.stat .k { font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.stat .v { font-size: 25px; font-weight: 800; letter-spacing: -.3px; margin-top: 6px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.stat .v small { font-size: 12.5px; font-weight: 600; color: var(--muted); letter-spacing: 0; }
.stat .sub { font-size: 12px; color: var(--muted); margin-top: 3px; display: flex; gap: 10px; flex-wrap: wrap; }
.stack { height: 6px; border-radius: 99px; overflow: hidden; display: flex; margin-top: 9px; background: var(--line); }
.stack i { display: block; height: 100%; transform-origin: left; animation: growX .9s var(--ease) both; }
.stat.clickable { cursor: pointer; }
.stat.clickable:hover { transform: translateY(-2px); }

/* ---------- 横幅 ---------- */
.banner { display: flex; align-items: center; gap: 14px; padding: 13px 16px; border-radius: 14px; margin-bottom: 14px; font-size: 13.5px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); backdrop-filter: blur(14px); animation: fadeUp .45s var(--ease) both; }
.banner > svg.i { flex: none; }
.banner .grow { flex: 1; min-width: 0; }
.banner.info > svg.i { color: var(--pri); }
.banner.crit { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--crit) 45%, transparent); background: color-mix(in srgb, var(--crit) 8%, var(--surface)); }
.banner.crit > svg.i { color: var(--crit); }
.banner.ext { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--sec) 40%, transparent); }
.banner.ext > svg.i { color: var(--sec); }
.banner.pro { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--gold) 45%, transparent); background: linear-gradient(110deg, color-mix(in srgb, var(--gold) 10%, var(--surface)), var(--surface)); }
.banner.pro > svg.i { color: var(--gold); }
.banner-acts { display: flex; gap: 8px; flex: none; flex-wrap: wrap; }

/* ---------- 表格 ---------- */
.tblwrap { overflow-x: auto; border-radius: var(--r-lg); }
table.t { width: 100%; border-collapse: separate; border-spacing: 0; }
table.t th { position: sticky; top: 0; z-index: 2; font-size: 12.5px; font-weight: 650; color: var(--muted); text-align: left; padding: 12px 10px; white-space: nowrap; background: color-mix(in srgb, var(--surface-solid) 85%, transparent); border-bottom: 1px solid var(--line); }
table.t th:first-child { border-top-left-radius: var(--r-lg); }
table.t th:last-child { border-top-right-radius: var(--r-lg); }
table.t th .h { display: inline-flex; align-items: center; gap: 5px; border: 0; background: none; padding: 0; color: inherit; font: inherit; }
table.t th .h.sortable { cursor: pointer; }
table.t th .h.sortable:hover { color: var(--text); }
table.t th .h svg.i { width: 13px; height: 13px; opacity: .4; }
table.t th.sorted { color: var(--pri); }
table.t th.sorted .h svg.i { opacity: 1; }
table.t th .tagx { font-size: 10.5px; font-weight: 700; padding: 2px 6px; border-radius: 5px; background: color-mix(in srgb, var(--pri) 15%, transparent); color: var(--pri); }
table.t td { padding: 10px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; white-space: nowrap; transition: background .2s; }
table.t tr:last-child td { border-bottom: 0; }
table.t tbody tr:hover td { background: var(--hover); }
table.t tr.sel td { background: color-mix(in srgb, var(--pri) 6%, transparent); }
table.t tr.bad td:first-child { box-shadow: inset 3px 0 0 var(--crit); }
table.t tr.dim td > * { opacity: .5; }
table.t tr.grp td { padding: 9px 12px 7px; background: var(--surface-2); font-size: 12.5px; font-weight: 700; color: var(--muted); letter-spacing: .03em; cursor: pointer; user-select: none; }
table.t tr.grp .gl { display: inline-flex; align-items: center; gap: 8px; }
table.t tr.grp .gl em { font-style: normal; font-weight: 600; color: var(--faint); }
table.t tr.grp svg.i { transition: transform .25s var(--ease); }
table.t tr.grp.closed svg.i { transform: rotate(-90deg); }
table.t tr.dragging td { opacity: .35; }
table.t tr.drop-before td { box-shadow: inset 0 2px 0 var(--pri); }
.row-move { transition: transform .35s var(--ease); }
.row-enter-from, .row-leave-to { opacity: 0; }
.row-enter-active, .row-leave-active { transition: opacity .25s; }
.grip { color: var(--faint); cursor: grab; display: inline-flex; padding: 4px; border-radius: 6px; }
.grip:hover { color: var(--text); background: var(--hover); }
.grip.off { opacity: .25; cursor: default; }

/* 批量操作条 */
.bulk { position: fixed; z-index: 35; left: 50%; bottom: 26px; transform: translateX(-50%); display: flex; align-items: center; gap: 4px; padding: 8px 8px 8px 18px; border-radius: 99px; background: var(--surface-solid); box-shadow: inset 0 0 0 1px var(--line-2), 0 20px 50px -12px rgba(0, 0, 0, .6); animation: pop .3s var(--ease); max-width: calc(100vw - 24px); overflow-x: auto; }
.bulk .n { font-weight: 700; margin-right: 10px; font-size: 13.5px; white-space: nowrap; }
.bulk .n b { color: var(--pri); }
.bulk button.bi { display: flex; align-items: center; gap: 7px; padding: 8px 13px; border: 0; border-radius: 99px; background: none; font-size: 13px; font-weight: 650; color: var(--text); white-space: nowrap; }
.bulk button.bi:hover { background: var(--hover); }
.bulk button.bi.danger { color: var(--crit); }

/* ---------- 弹窗、抽屉 ---------- */
.overlay { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 20px; background: rgba(0, 0, 0, .5); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); animation: fadeIn .2s ease; }
html[data-mode="light"] .overlay { background: rgba(30, 20, 5, .22); }
.modal { width: min(620px, 100%); max-height: calc(100vh - 40px); display: flex; flex-direction: column; border-radius: 20px; background: var(--surface-solid); box-shadow: inset 0 0 0 1px var(--line-2), 0 40px 90px -20px rgba(0, 0, 0, .6); animation: pop .28s var(--ease); }
.modal.wide { width: min(760px, 100%); }
.modal > header { display: flex; align-items: center; gap: 12px; padding: 18px 22px; font-size: 16px; font-weight: 750; border-bottom: 1px solid var(--line); }
.modal > header .x { margin-left: auto; }
.modal > .content { padding: 18px 22px; overflow-y: auto; }
.modal > footer { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 22px; border-top: 1px solid var(--line); }
.overlay.side { place-items: stretch end; padding: 0; }
.drawer { width: min(560px, 100vw); height: 100vh; display: flex; flex-direction: column; background: var(--surface-solid); box-shadow: inset 1px 0 0 var(--line-2), -30px 0 80px -30px rgba(0, 0, 0, .6); animation: drawer .38s var(--ease); }
.drawer > header { display: flex; align-items: center; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--line); font-size: 16px; font-weight: 750; }
.drawer > header .x { margin-left: auto; }
.drawer > .content { flex: 1; overflow-y: auto; padding: 8px 22px 22px; }
.drawer > footer { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 22px; border-top: 1px solid var(--line); }

/* ---------- 提示消息 ---------- */
.toasts { position: fixed; z-index: 90; top: 76px; right: 20px; display: flex; flex-direction: column; gap: 10px; width: min(380px, calc(100vw - 32px)); pointer-events: none; }
.toast { position: relative; overflow: hidden; display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px 14px; border-radius: 14px; font-size: 13.5px; line-height: 1.5; background: var(--surface-solid); box-shadow: inset 0 0 0 1px var(--line-2), 0 18px 40px -16px rgba(0, 0, 0, .55); animation: toastIn .3s var(--ease); pointer-events: auto; }
.toast > svg.i { margin-top: 2px; }
.toast.ok > svg.i { color: var(--good); } .toast.err > svg.i { color: var(--crit); } .toast.info > svg.i { color: var(--pri); }
.toast .bar { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: currentColor; opacity: .35; transform-origin: left; animation: countdown linear both; }
.toast.ok .bar { color: var(--good); } .toast.err .bar { color: var(--crit); } .toast.info .bar { color: var(--pri); }

/* ---------- 其它 ---------- */
.empty { padding: 44px 24px; text-align: center; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 12px; }
.empty .art { width: 66px; height: 66px; border-radius: 20px; display: grid; place-items: center; color: var(--pri); background: color-mix(in srgb, var(--pri) 11%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--pri) 25%, transparent); }
.empty .art svg.i { width: 28px; height: 28px; stroke-width: 1.6; }
.empty h3 { color: var(--text); font-size: 16px; }
.ok-line { display: flex; align-items: center; gap: 8px; color: var(--good); font-size: 13.5px; }
.form-err { padding: 10px 12px; border-radius: 11px; font-size: 13px; color: var(--crit); background: color-mix(in srgb, var(--crit) 9%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--crit) 30%, transparent); margin: 8px 0 12px; }
.code-wrap { position: relative; margin: 10px 0; }
pre.code { margin: 0; padding: 14px 16px; border-radius: 12px; overflow-x: auto; font: 12.5px/1.65 var(--code); background: var(--bg-2); box-shadow: inset 0 0 0 1px var(--line); color: var(--text); white-space: pre; }
html[data-mode="dark"] pre.code { background: rgba(0, 0, 0, .28); }
.code-wrap .copy { position: absolute; top: 8px; right: 8px; }
details.faq { border-radius: 12px; padding: 0 14px; box-shadow: inset 0 0 0 1px var(--line); margin-bottom: 8px; background: var(--surface-2); transition: background .2s; }
details.faq[open] { background: var(--hover); }
details.faq > summary { list-style: none; cursor: pointer; padding: 12px 0; font-weight: 650; display: flex; align-items: center; gap: 10px; }
details.faq > summary::-webkit-details-marker { display: none; }
details.faq > summary::after { content: ''; margin-left: auto; width: 7px; height: 7px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform .25s var(--ease); }
details.faq[open] > summary::after { transform: rotate(-135deg); }
details.faq > div { padding: 0 0 14px; color: var(--muted); }
details.faq > div p + p { margin-top: 8px; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; margin: 0; font-size: 13px; }
.kv dt { color: var(--faint); white-space: nowrap; }
.kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.bar-track { height: 8px; border-radius: 99px; background: var(--line); overflow: hidden; }
.bar-fill { display: block; height: 100%; border-radius: 99px; background: var(--btn); transform-origin: left; animation: growX .9s var(--ease) both; transition: background-color .4s var(--std); }
/* fd-bar：浅色前沿和主体两层，宽度由 motion.js 的弹簧驱动 */
.fd-bar { position: relative; display: block; }
.fd-bar .bar-fill { position: absolute; left: 0; top: 0; bottom: 0; animation: none; }
.fd-bar .lead { opacity: .32; }
.fd-num { font-variant-numeric: tabular-nums; }
/* 文字切换：旧文字模糊淡出，新文字模糊淡入 */
.swap-t { display: inline-block; }
.swap-enter-active, .swap-leave-active { transition: opacity .14s var(--std), filter .14s var(--std), transform .22s var(--sp-out); }
.swap-enter-from { opacity: 0; filter: blur(3px); transform: translateY(4px); }
.swap-leave-to { opacity: 0; filter: blur(3px); transform: translateY(-4px); }
.bar-fill.good { background: var(--good); } .bar-fill.warn { background: var(--warn); } .bar-fill.crit { background: var(--crit); }
[data-tip] { position: relative; }
[data-tip]:hover::before { content: attr(data-tip); position: absolute; z-index: 50; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%); width: max-content; max-width: 280px; white-space: normal; padding: 7px 10px; border-radius: 9px; font-size: 12px; font-weight: 500; line-height: 1.5; color: var(--text); background: var(--surface-solid); box-shadow: inset 0 0 0 1px var(--line-2), 0 10px 30px -10px rgba(0, 0, 0, .55); pointer-events: none; animation: pop .18s var(--ease); text-align: left; }

/* 手机：底部导航 */
.bnav { display: none; }
@media (min-width: 861px) and (max-width: 1320px) {
  :root{--top-h:112px}
  .topbar-in{display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-rows:56px 48px;gap:0 16px;padding:0 24px}
  .topbar-in>.brand{grid-column:1;grid-row:1;justify-self:start}
  .topbar-in>.top-actions{grid-column:2;grid-row:1}
  .topbar-in>.nav{grid-column:1/-1;grid-row:2;justify-self:center;margin:0}
  .nav button{font-size:13px;gap:7px;padding:7px 15px}
  .nav .tab-badge{font-size:10px;margin-left:2px}
}
@media (max-width: 860px) {
  .wrap { padding: 20px 16px 110px; }
  .topbar-in { padding: 0 16px; gap: 10px; }
  .top-actions{gap:6px}.top-actions .icon-btn{width:32px;height:34px;flex:none}.topbar .lic-badge{height:34px;min-width:32px;padding:0 8px}
  .bnav .nav-label{line-height:18px;white-space:nowrap}
  .topbar .nav, .topbar .lic-badge span.t { display: none; }
  .brand-lockup .fd-logo { height: 24px; }
  .bnav { display: flex; position: fixed; z-index: 30; left: 0; right: 0; bottom: 0; padding: 8px 10px calc(8px + env(safe-area-inset-bottom)); background: var(--topbar); backdrop-filter: blur(18px) saturate(150%); -webkit-backdrop-filter: blur(18px) saturate(150%); border-top: 1px solid var(--line); justify-content: space-around; }
  .bnav button { position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; border: 0; background: none; color: var(--faint); font-size: 11px; font-weight: 600; padding: 4px 8px; border-radius: 12px; }
  .bnav button.on { color: var(--pri); }
  .bnav button svg.i { width: 20px; height: 20px; }
  .bnav .tab-badge { position: absolute; top: -2px; right: 2px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid2 { grid-template-columns: 1fr; }
  .h1 { font-size: 26px; }
  .overlay { padding: 0; place-items: end stretch; }
  .modal { width: 100%; max-height: 92vh; border-radius: 22px 22px 0 0; animation: sheet .35s var(--ease); }
  .bulk { bottom: 84px; }
  .toasts { top: 70px; right: 12px; left: 12px; width: auto; }
}
/* Shared overview information: palettes change appearance, not available modules. */
.mini-hero-meta{display:flex;align-items:center;gap:18px;flex-wrap:wrap;font-size:11px;color:var(--faint);margin-top:8px}
.mini-line-uptime{color:var(--faint);font-size:11px;margin-top:10px}
.mini-freshness{font-size:11px;margin-top:10px}
.mini-route-card{padding:20px 24px 0;margin-bottom:20px}
.mini-route-card .card-head{margin:0;gap:12px}
.mini-route-choice{display:flex;align-items:center;gap:8px;font-size:11px;color:var(--faint)}
.mini-route-choice>span{white-space:nowrap}
.mini-route-choice select{max-width:180px;min-height:35px;padding:5px 9px;font-size:12px}
.mini-route{list-style:none;padding:0;margin:20px 0 16px;display:grid;grid-template-columns:repeat(var(--nodes),minmax(0,1fr));gap:18px}
.mini-route li{min-width:0;position:relative;display:flex;flex-direction:column;align-items:flex-start;gap:4px}
.mini-route-icon{display:flex;align-items:center;width:100%;height:35px;margin-bottom:7px}
.mini-route-icon>svg{width:32px;height:32px;padding:7px;background:var(--surface-2);border-radius:9px;color:var(--pri)}
.mini-route-icon>span{position:absolute;top:0;right:8px;color:var(--faint);font-size:9px;padding-left:4px;background:var(--surface);z-index:1}
.mini-route li:not(:last-child)::after,.mini-route li:not(:last-child)::before{content:'';position:absolute;left:44px;right:-8px;top:16px;height:1px;background:var(--line)}
.mini-route li:not(:last-child)::before{top:20px}
.mini-route b{font-size:12px;font-weight:600;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.mini-route-value{font-size:10px;color:var(--faint);max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.mini-route small{display:flex;align-items:center;gap:5px;font-size:10px;color:var(--muted);margin-top:5px}
.mini-route .dot{width:4px;height:4px;color:var(--off);background:currentColor}
.mini-route .dot.good{color:var(--good)}
.mini-route .dot.warn{color:var(--warn)}
.mini-route .dot.crit{color:var(--crit)}
.mini-route-flow{position:absolute;left:44px;right:-8px;top:17px;height:3px;overflow:hidden;pointer-events:none}
.mini-route-flow i{position:absolute;left:0;top:0;width:18%;height:3px;background:var(--pri);border-radius:4px;opacity:0}
.flowing .mini-route-flow i{animation:overview-path-flow 5.6s ease-in-out infinite}
.mini-route li:nth-child(2) .mini-route-flow i{animation-delay:.6s}
.mini-route li:nth-child(3) .mini-route-flow i{animation-delay:1.2s}
.mini-route li:nth-child(4) .mini-route-flow i{animation-delay:1.8s}
@keyframes overview-path-flow{0%,8%{transform:translateX(-100%);opacity:0}15%{opacity:.7}72%{transform:translateX(560%);opacity:.7}80%,100%{transform:translateX(560%);opacity:0}}
.mini-route-foot{display:flex;align-items:center;justify-content:space-between;gap:14px;border-top:1px solid var(--line);padding:10px 0;color:var(--faint);font-size:10px}
.mini-route-foot button{display:flex;align-items:center;gap:5px;white-space:nowrap;font-size:11px}
.mini-route-fixed{font-size:12px;color:var(--muted);max-width:180px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.mini-route-metrics{display:grid;grid-template-columns:repeat(auto-fit,minmax(145px,1fr));gap:12px;margin:0 0 14px;padding-top:13px;border-top:1px solid var(--line)}
.mini-route-metrics>div{min-width:0;display:flex;flex-direction:column;gap:3px}
.mini-route-metrics span{font-size:10.5px;color:var(--muted)}
.mini-route-metrics b{font-size:12.5px;font-weight:650;color:var(--text);font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
.mini-route-metrics small{font-size:10px;color:var(--faint);overflow-wrap:anywhere}
.mini-route-apps{display:flex;align-items:center;gap:10px;flex-wrap:wrap;border-top:1px solid var(--line);padding:12px 0}
.mini-route-apps-label{font-size:11px;color:var(--muted);flex:none}
.mini-route-app-list{display:flex;align-items:center;flex-wrap:wrap;gap:7px;min-width:0}
.mini-route-app-list button{display:flex;align-items:center;gap:9px;max-width:230px;padding:6px 9px;border:1px solid var(--line);border-radius:8px;background:var(--surface-2);color:var(--text);font-size:11px;cursor:pointer}
.mini-route-app-list button:hover{border-color:var(--pri)}
.mini-route-app-list button>b{color:var(--muted);font:500 10.5px var(--mono);white-space:nowrap}
@media(max-width:860px){.mini-route-metrics{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.mini-route-fixed{max-width:115px;font-size:11px}.mini-route-apps{align-items:flex-start}.mini-route-app-list button{max-width:100%}}
@media(max-width:860px){
 .mini-route-card{padding:14px 16px 0}
 .mini-route-card .card-head{gap:8px}
 .mini-route-card .card-title{font-size:13px}
 .mini-route-choice>span{display:none}
 .mini-route-choice select{max-width:128px;font-size:11px;min-height:40px}
 .mini-route-card .card-head>.btn{min-height:40px;padding-inline:9px;font-size:11px}
 .mini-route{gap:6px;margin:17px 0}
 .mini-route li{align-items:center;gap:5px;text-align:center}
 .mini-route-icon{justify-content:center;width:32px;height:32px;margin-bottom:0}
 .mini-route-icon>span,.mini-route-value{display:none}
 .mini-route b{font-size:10px;letter-spacing:-.2px}
 .mini-route small{font-size:0;gap:0;line-height:1;margin-top:1px}
 .mini-route li:not(:last-child)::before,.mini-route li:not(:last-child)::after,.mini-route-flow{left:calc(50% + 19px);right:calc(-50% + 10px)}
 .mini-route-foot{font-size:9px;align-items:flex-start}
 .mini-route-foot>span{max-width:65%}
}
@media(max-width:420px){.mini-route-card .card-head>.btn{padding-inline:7px}.mini-route-choice select{max-width:108px}.mini-route-choice{margin-left:auto}.mini-route-foot>span{max-width:60%}}
@media(prefers-reduced-motion:reduce){.mini-route-flow i{animation:none!important}}
