/* =====================================================================
   项目中枢 · 样式
   设计语言参考 Apple Human Interface Guidelines：
   大圆角、克制阴影、充足留白、跟随系统的浅色/深色。
   ===================================================================== */

/* ── 设计令牌 ─────────────────────────────────────────────────────── */
:root {
  --bg:            #f5f5f7;
  --bg-elevated:   #ffffff;
  --bg-sunken:     #ececee;
  --nav-bg:        rgba(255, 255, 255, .72);
  --card:          #ffffff;
  --card-hover:    #ffffff;
  --text:          #1d1d1f;
  --text-2:        #6e6e73;
  --text-3:        #8e8e93;
  --separator:     rgba(0, 0, 0, .08);
  --accent:        #0071e3;
  --accent-soft:   rgba(0, 113, 227, .1);
  --green:         #34c759;
  --orange:        #ff9500;
  --red:           #ff3b30;
  --purple:        #af52de;
  --teal:          #30b0c7;
  --shadow-sm:     0 1px 2px rgba(0, 0, 0, .04), 0 2px 8px rgba(0, 0, 0, .04);
  --shadow-md:     0 4px 12px rgba(0, 0, 0, .06), 0 12px 32px rgba(0, 0, 0, .08);
  --shadow-lg:     0 8px 24px rgba(0, 0, 0, .10), 0 24px 64px rgba(0, 0, 0, .12);
  --radius:        22px;
  --radius-sm:     14px;
  --radius-lg:     30px;
  --ease:          cubic-bezier(.22, 1, .36, 1);
  --nav-h:         64px;
  --maxw:          1320px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:            #000000;
    --bg-elevated:   #1c1c1e;
    --bg-sunken:     #0a0a0a;
    --nav-bg:        rgba(20, 20, 22, .72);
    --card:          #1c1c1e;
    --card-hover:    #242426;
    --text:          #f5f5f7;
    --text-2:        #a1a1a6;
    --text-3:        #8e8e93;
    --separator:     rgba(255, 255, 255, .1);
    --accent:        #0a84ff;
    --accent-soft:   rgba(10, 132, 255, .16);
    --green:         #30d158;
    --orange:        #ff9f0a;
    --red:           #ff453a;
    --purple:        #bf5af2;
    --teal:          #40c8e0;
    --shadow-sm:     0 1px 2px rgba(0, 0, 0, .5);
    --shadow-md:     0 4px 16px rgba(0, 0, 0, .6);
    --shadow-lg:     0 8px 32px rgba(0, 0, 0, .7);
  }
}

/* ── 基础 ─────────────────────────────────────────────────────────── */
* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro SC", "SF Pro Display",
               "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue",
               system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "tnum" 1;
}

::selection { background: var(--accent-soft); }

a { color: inherit; text-decoration: none; }

button { font: inherit; color: inherit; cursor: pointer; }

h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -.02em; }

img { display: block; max-width: 100%; }

svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* 滚动条 */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--text-3) 40%, transparent);
  border-radius: 6px;
  border: 3px solid transparent;
  background-clip: content-box;
}
::-webkit-scrollbar-thumb:hover { background: color-mix(in srgb, var(--text-3) 65%, transparent); background-clip: content-box; }

/* ── 顶部导航 ─────────────────────────────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  background: var(--nav-bg);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--separator);
}

.nav-inner {
  max-width: var(--maxw);
  height: 100%;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }

.brand-mark {
  width: 38px; height: 38px;
  flex: 0 0 38px;
  border-radius: 11px;
  background: linear-gradient(160deg, #2f9bff, #0071e3 55%, #0a5cc4);
  color: #fff;
  display: grid; place-items: center;
  font-size: 20px; font-weight: 700;
  letter-spacing: -.03em;
  box-shadow: 0 2px 8px rgba(0, 113, 227, .35), inset 0 1px 0 rgba(255, 255, 255, .3);
}

.brand-text { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.brand-text strong { font-size: 15.5px; font-weight: 600; letter-spacing: -.01em; }
.brand-text em { font-size: 12px; font-style: normal; color: var(--text-3); white-space: nowrap; }

/* iOS 分段控件 */
.segmented {
  position: relative;
  display: flex;
  padding: 3px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--text-3) 16%, transparent);
  flex: 0 0 auto;
}

.segmented-thumb {
  position: absolute;
  top: 3px; left: 3px;
  height: calc(100% - 6px);
  border-radius: 9px;
  background: var(--bg-elevated);
  box-shadow: 0 1px 3px rgba(0, 0, 0, .12), 0 1px 1px rgba(0, 0, 0, .06);
  transition: transform .34s var(--ease), width .34s var(--ease);
  will-change: transform, width;
}

.seg-btn {
  position: relative;
  z-index: 1;
  border: 0;
  background: none;
  padding: 8px 22px;
  border-radius: 9px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-2);
  transition: color .2s ease;
  white-space: nowrap;
}
.seg-btn.is-active { color: var(--text); font-weight: 600; }

/* ── 布局 ─────────────────────────────────────────────────────────── */
.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 40px 24px 80px;
}

.view { display: none; animation: fade-in .4s var(--ease); }
.view.is-active { display: block; }

@keyframes fade-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}

/* ── 首页 Hero ────────────────────────────────────────────────────── */
.hero { margin-bottom: 34px; }

.hero-title {
  font-size: clamp(30px, 4.4vw, 46px);
  letter-spacing: -.035em;
  line-height: 1.08;
}

.hero-sub {
  margin: 10px 0 0;
  font-size: 17px;
  color: var(--text-2);
  letter-spacing: -.01em;
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 34px;
  margin-top: 26px;
}

.hero-stat { display: flex; align-items: baseline; gap: 7px; }
.hero-stat b {
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -.03em;
  font-variant-numeric: tabular-nums;
}
.hero-stat span { font-size: 13.5px; color: var(--text-3); }

/* ── 工具条：分类 + 搜索 ──────────────────────────────────────────── */
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  min-width: 0;
}

.chip {
  border: 1px solid var(--separator);
  background: var(--bg-elevated);
  color: var(--text-2);
  padding: 7px 15px;
  border-radius: 100px;
  font-size: 13.5px;
  font-weight: 500;
  transition: all .2s var(--ease);
  white-space: nowrap;
}
.chip:hover { border-color: color-mix(in srgb, var(--text-3) 45%, transparent); color: var(--text); }
.chip.is-active {
  background: var(--text);
  color: var(--bg);
  border-color: transparent;
  font-weight: 600;
}
.chip .chip-n {
  opacity: .5;
  margin-left: 5px;
  font-variant-numeric: tabular-nums;
}

.search {
  position: relative;
  display: flex;
  align-items: center;
  flex: 0 1 240px;
}
.search svg {
  position: absolute;
  left: 12px;
  width: 16px; height: 16px;
  color: var(--text-3);
  stroke-width: 2.2;
  pointer-events: none;
}
.search input {
  width: 100%;
  font: inherit;
  font-size: 14px;
  padding: 9px 14px 9px 34px;
  border-radius: 100px;
  border: 1px solid var(--separator);
  background: var(--bg-elevated);
  color: var(--text);
  outline: none;
  transition: border-color .2s, box-shadow .2s;
  -webkit-appearance: none;
}
.search input::placeholder { color: var(--text-3); }
.search input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3.5px var(--accent-soft);
}
.search input::-webkit-search-cancel-button { -webkit-appearance: none; }

/* ── 项目大图卡片 ─────────────────────────────────────────────────── */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 28px;
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--separator);
  transition: transform .42s var(--ease), box-shadow .42s var(--ease), border-color .3s;
  will-change: transform;
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}
.card:active { transform: translateY(-2px) scale(.995); }

.card:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px var(--accent-soft), var(--shadow-lg);
}

/* 封面 */
.card-media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--bg-sunken);
}

/* 封面图：加载完成前是透明的，露出下面的渐变兜底；
   加载完成后淡入，避免「渐变闪一下」的观感。 */
.card-media img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  opacity: 0;
  transition: opacity .55s var(--ease), transform .6s var(--ease);
}
.card-media img.is-loaded { opacity: 1; }
.card:hover .card-media img { transform: scale(1.045); }

/* 无封面时的渐变兜底（在图片下层，只有图片加载失败时才露出来） */
.card-media .fallback {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: grid;
  place-items: center;
  font-size: 56px;
  background: linear-gradient(150deg,
              color-mix(in srgb, var(--fc) 90%, #fff 10%),
              color-mix(in srgb, var(--fc) 55%, #000 45%));
}
.card-media .fallback span { filter: drop-shadow(0 4px 12px rgba(0,0,0,.25)); }

/* 封面底部渐变，让图标与状态更清晰 */
.card-media::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 46%;
  z-index: 2;
  background: linear-gradient(to top, rgba(0, 0, 0, .34), transparent);
  pointer-events: none;
}

.card-icon {
  position: absolute;
  left: 16px; bottom: 14px;
  width: 38px; height: 38px;
  border-radius: 11px;
  display: grid; place-items: center;
  font-size: 19px;
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 3px 10px rgba(0, 0, 0, .18);
  z-index: 3;
  backdrop-filter: blur(8px);
}

.card-status {
  position: absolute;
  right: 14px; top: 14px;
  display: flex; align-items: center; gap: 6px;
  padding: 5px 11px 5px 9px;
  border-radius: 100px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .01em;
  color: #fff;
  background: rgba(0, 0, 0, .42);
  backdrop-filter: blur(12px) saturate(160%);
  -webkit-backdrop-filter: blur(12px) saturate(160%);
  z-index: 3;
}
.card-status i {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 7px var(--green);
  flex: 0 0 7px;
}
.card-status.is-warn i { background: var(--orange); box-shadow: 0 0 7px var(--orange); }
.card-status.is-down i { background: var(--red); box-shadow: 0 0 7px var(--red); }
.card-status.is-static i { background: #fff; box-shadow: 0 0 6px rgba(255,255,255,.9); }

/* 卡片正文 */
.card-body {
  padding: 18px 20px 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-title {
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -.022em;
  line-height: 1.3;
  display: flex;
  align-items: center;
  gap: 7px;
}
.card-title .arrow {
  width: 15px; height: 15px;
  stroke-width: 2.6;
  color: var(--text-3);
  opacity: 0;
  transform: translate(-4px, 2px);
  transition: all .3s var(--ease);
  flex: 0 0 15px;
}
.card:hover .card-title .arrow { opacity: 1; transform: translate(0, 0); }

.card-desc {
  margin: 8px 0 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-2);
  letter-spacing: -.005em;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 15px;
  padding-top: 14px;
  border-top: 1px solid var(--separator);
}
.card-tags span {
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text-3);
  background: var(--bg-sunken);
  padding: 3.5px 9px;
  border-radius: 6px;
  letter-spacing: .01em;
}

.card-note {
  margin: 12px 0 0;
  font-size: 12px;
  color: var(--orange);
  display: flex;
  gap: 6px;
  align-items: flex-start;
  line-height: 1.45;
}

.empty {
  text-align: center;
  color: var(--text-3);
  padding: 70px 0;
  font-size: 15px;
}

/* ── 骨架屏 ───────────────────────────────────────────────────────── */
.skeleton { pointer-events: none; }
.skeleton .sk {
  background: linear-gradient(90deg,
              var(--bg-sunken) 25%, color-mix(in srgb, var(--bg-sunken) 55%, var(--card)) 50%, var(--bg-sunken) 75%);
  background-size: 200% 100%;
  animation: sk-wave 1.4s ease-in-out infinite;
  border-radius: 8px;
}
@keyframes sk-wave { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* ── 管理后台 ─────────────────────────────────────────────────────── */
.admin-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 30px;
}

.admin-actions { display: flex; align-items: center; gap: 14px; }

.live-dot {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  color: var(--text-2);
  font-weight: 500;
}
.live-dot i {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--green);
  animation: pulse 2.2s ease-in-out infinite;
}
.live-dot.is-stale i { background: var(--orange); animation: none; }
.live-dot.is-error i { background: var(--red); animation: none; }

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--green) 55%, transparent); }
  50%      { box-shadow: 0 0 0 6px transparent; }
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--separator);
  background: var(--bg-elevated);
  color: var(--text);
  padding: 9px 16px;
  border-radius: 11px;
  font-size: 14px;
  font-weight: 500;
  transition: all .2s var(--ease);
}
.btn svg { width: 15px; height: 15px; }
.btn:hover { background: var(--bg-sunken); }
.btn:active { transform: scale(.97); }
.btn.is-busy svg { animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* KPI 卡片 */
.kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(196px, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.kpi {
  background: var(--card);
  border: 1px solid var(--separator);
  border-radius: var(--radius-sm);
  padding: 17px 18px 15px;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.kpi-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--text-3);
  font-weight: 500;
  margin-bottom: 9px;
  letter-spacing: .01em;
}
.kpi-label .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); flex: 0 0 7px; }

.kpi-value {
  font-size: 27px;
  font-weight: 600;
  letter-spacing: -.035em;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.kpi-value small { font-size: 15px; font-weight: 500; color: var(--text-3); margin-left: 2px; letter-spacing: 0; }

.kpi-foot {
  margin-top: 7px;
  font-size: 12px;
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
}

.kpi-bar {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 3px;
  background: var(--bg-sunken);
}
.kpi-bar b {
  display: block;
  height: 100%;
  background: var(--accent);
  border-radius: 0 3px 3px 0;
  transition: width .5s var(--ease), background .3s;
}

/* 面板 */
.charts {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}
@media (max-width: 1080px) { .charts { grid-template-columns: 1fr 1fr; } }
@media (max-width: 720px)  { .charts { grid-template-columns: 1fr; } }

.panel {
  background: var(--card);
  border: 1px solid var(--separator);
  border-radius: var(--radius-sm);
  padding: 18px 20px 20px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 16px;
}
.charts .panel { margin-bottom: 0; }

.panel-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.panel-head h2 { font-size: 15.5px; font-weight: 600; letter-spacing: -.015em; }
.panel-meta { font-size: 12px; color: var(--text-3); font-variant-numeric: tabular-nums; }

.panel-donuts {
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: 10px;
}

/* 折线图 */
.spark { width: 100%; height: 132px; }
.spark svg { width: 100%; height: 100%; overflow: visible; }
.spark .grid-line { stroke: var(--separator); stroke-width: 1; stroke-dasharray: 3 5; }
.spark .area { fill: url(#sparkGrad); stroke: none; }
.spark .line { stroke: var(--accent); stroke-width: 2.2; stroke-linejoin: round; stroke-linecap: round; }
.spark .end-dot { fill: var(--accent); stroke: var(--card); stroke-width: 2.5; }
.spark .axis-label { fill: var(--text-3); font-size: 10px; font-family: inherit; stroke: none; }

/* 环形图 */
.donut-box { display: flex; flex-direction: column; align-items: center; gap: 9px; }
.donut { position: relative; width: 104px; height: 104px; }
.donut svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.donut .track { fill: none; stroke: var(--bg-sunken); stroke-width: 10; }
.donut .value {
  fill: none;
  stroke-width: 10;
  stroke-linecap: round;
  transition: stroke-dasharray .6s var(--ease), stroke .3s;
}
.donut .donut-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 1.15;
}
.donut .donut-center b { font-size: 21px; font-weight: 600; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.donut .donut-center span { font-size: 10.5px; color: var(--text-3); margin-top: 2px; }
.donut-caption { font-size: 12.5px; color: var(--text-2); font-weight: 500; text-align: center; }
.donut-caption em { display: block; font-style: normal; font-size: 11px; color: var(--text-3); margin-top: 2px; font-variant-numeric: tabular-nums; }

/* 磁盘条 */
.bars { display: flex; flex-direction: column; gap: 15px; }
.bar-row { display: flex; flex-direction: column; gap: 7px; }
.bar-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 13px;
  gap: 10px;
}
.bar-top .mount { font-weight: 600; letter-spacing: -.01em; }
.bar-top .usage { font-variant-numeric: tabular-nums; color: var(--text-2); font-size: 12.5px; }
.bar-track { height: 7px; border-radius: 100px; background: var(--bg-sunken); overflow: hidden; }
.bar-fill {
  height: 100%;
  border-radius: 100px;
  background: var(--accent);
  transition: width .5s var(--ease), background .3s;
}
.bar-fill.is-warn { background: var(--orange); }
.bar-fill.is-danger { background: var(--red); }
.bar-sub { font-size: 11.5px; color: var(--text-3); font-variant-numeric: tabular-nums; }

/* 表格 */
.table-wrap { overflow-x: auto; margin: 0 -20px; padding: 0 20px; }

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

.table th {
  text-align: left;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: .045em;
  padding: 0 12px 10px;
  border-bottom: 1px solid var(--separator);
  white-space: nowrap;
  user-select: none;
}
.table th[data-sort] { cursor: pointer; transition: color .2s; }
.table th[data-sort]:hover { color: var(--text); }
.table th.num, .table td.num { text-align: right; }
.table th.is-sorted { color: var(--accent); }
.table th.is-sorted::after { content: " ↓"; font-size: 10px; }
.table th.is-sorted.asc::after { content: " ↑"; }

.table td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--separator);
  vertical-align: middle;
  font-variant-numeric: tabular-nums;
}
.table tbody tr { transition: background .15s; }
.table tbody tr:hover { background: var(--bg-sunken); }
.table tbody tr:last-child td { border-bottom: 0; }

.cell-proj { display: flex; align-items: center; gap: 10px; min-width: 210px; }
.cell-proj .ico {
  width: 30px; height: 30px;
  border-radius: 9px;
  display: grid; place-items: center;
  font-size: 15px;
  background: color-mix(in srgb, var(--fc) 16%, transparent);
  flex: 0 0 30px;
}
.cell-proj .nm { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.cell-proj .nm b { font-weight: 500; font-size: 13.5px; letter-spacing: -.01em; }
.cell-proj .nm span { font-size: 11px; color: var(--text-3); }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 100px;
  white-space: nowrap;
}
.badge i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: 0 0 6px; }
.badge.ok      { color: var(--green);  background: color-mix(in srgb, var(--green) 13%, transparent); }
.badge.warn    { color: var(--orange); background: color-mix(in srgb, var(--orange) 14%, transparent); }
.badge.down    { color: var(--red);    background: color-mix(in srgb, var(--red) 13%, transparent); }
.badge.idle    { color: var(--text-3); background: color-mix(in srgb, var(--text-3) 13%, transparent); }
.badge.static  { color: var(--accent); background: var(--accent-soft); }

.meter {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  justify-content: flex-end;
}
.meter .track {
  width: 42px; height: 5px;
  border-radius: 100px;
  background: var(--bg-sunken);
  overflow: hidden;
  flex: 0 0 42px;
}
.meter .track b {
  display: block; height: 100%;
  border-radius: 100px;
  background: var(--accent);
  transition: width .4s var(--ease);
}
.meter .track b.is-warn { background: var(--orange); }
.meter .track b.is-danger { background: var(--red); }
.meter .val { min-width: 52px; text-align: right; }

.port-pill {
  display: inline-block;
  font-size: 11px;
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;
  padding: 2.5px 7px;
  border-radius: 6px;
  background: var(--bg-sunken);
  color: var(--text-2);
  margin-right: 4px;
}
.port-pill.up { background: color-mix(in srgb, var(--green) 14%, transparent); color: var(--green); }
.port-pill.down { background: color-mix(in srgb, var(--red) 12%, transparent); color: var(--red); text-decoration: line-through; }

.table-total {
  margin-top: 14px;
  padding-top: 13px;
  border-top: 1px solid var(--separator);
  font-size: 12.5px;
  color: var(--text-2);
  display: flex;
  flex-wrap: wrap;
  gap: 6px 22px;
  font-variant-numeric: tabular-nums;
}
.table-total b { color: var(--text); font-weight: 600; }

.table-compact td, .table-compact th { padding: 8px 12px; font-size: 13px; }

/* 服务卡片 */
.svc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(268px, 1fr));
  gap: 13px;
}
.svc {
  border: 1px solid var(--separator);
  border-radius: var(--radius-sm);
  padding: 15px 16px;
  display: flex;
  flex-direction: column;
  gap: 11px;
  background: var(--bg-sunken);
}
.svc-top { display: flex; align-items: center; gap: 11px; }
.svc-top .ico {
  width: 34px; height: 34px;
  border-radius: 10px;
  display: grid; place-items: center;
  font-size: 17px;
  background: color-mix(in srgb, var(--fc) 18%, transparent);
  flex: 0 0 34px;
}
.svc-top .nm { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.svc-top .nm b { font-size: 14px; font-weight: 600; letter-spacing: -.015em; }
.svc-top .nm span { font-size: 11.5px; color: var(--text-3); }
.svc-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  font-variant-numeric: tabular-nums;
}
.svc-metrics div { display: flex; flex-direction: column; gap: 2px; }
.svc-metrics b { font-size: 14.5px; font-weight: 600; letter-spacing: -.02em; }
.svc-metrics span { font-size: 10.5px; color: var(--text-3); }
.svc-desc { font-size: 12px; color: var(--text-2); line-height: 1.5; }

/* 键值 */
.kv {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 14px 26px;
}
.kv-item { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.kv-item span { font-size: 11.5px; color: var(--text-3); }
.kv-item b {
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: -.01em;
  overflow-wrap: anywhere;
}

/* ── 页脚 / 提示 ──────────────────────────────────────────────────── */
.foot {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px 46px;
  font-size: 12.5px;
  color: var(--text-3);
  display: flex;
  align-items: center;
  gap: 8px;
}
.foot a { color: var(--text-3); text-decoration: underline; text-underline-offset: 3px; }
.foot a:hover { color: var(--text); }
.foot-sep { opacity: .5; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 34px;
  transform: translate(-50%, 20px);
  background: rgba(0, 0, 0, .82);
  color: #fff;
  font-size: 13.5px;
  padding: 11px 20px;
  border-radius: 100px;
  backdrop-filter: blur(12px);
  opacity: 0;
  transition: all .35s var(--ease);
  z-index: 200;
  pointer-events: none;
  max-width: 88vw;
}
.toast.is-show { opacity: 1; transform: translate(-50%, 0); }

/* ── 响应式 ───────────────────────────────────────────────────────── */
@media (max-width: 720px) {
  .nav-inner { padding: 0 16px; gap: 12px; }
  .brand-text em { display: none; }
  .seg-btn { padding: 8px 15px; font-size: 13.5px; }
  .wrap { padding: 26px 16px 64px; }
  .grid { grid-template-columns: 1fr; gap: 20px; }
  .hero-stats { gap: 10px 24px; }
  .kpis { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .kpi-value { font-size: 22px; }
  .panel { padding: 16px 15px 17px; }
  .table-wrap { margin: 0 -15px; padding: 0 15px; }
  .foot { padding: 0 16px 36px; }
  .donut { width: 92px; height: 92px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
