/* 孤峰云服务器监控 - 浅色卡片主题（贴合 Beszel 浅色模式） */
:root {
  --bg: #f4f6fa;
  --card: #ffffff;
  --line: #e6e9f0;
  --text: #1c2333;
  --muted: #6b7486;
  --green: #22c55e;
  --red: #ef4444;
  --amber: #f59e0b;
  --blue: #3b82f6;
  --accent: #3b82f6;
  --grad: linear-gradient(90deg, #3b82f6, #22c55e);
  --shadow: 0 2px 10px rgba(28, 35, 51, .06);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  min-height: 100vh;
}

/* ---------- 顶栏 ---------- */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 28px;
  background: var(--card);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 10;
}
.brand { display: flex; align-items: center; gap: 10px; }
.logo { width: 26px; height: 26px; color: var(--blue); }
.brand-text { font-size: 17px; font-weight: 700; letter-spacing: .3px; }

.status-pill {
  display: flex; align-items: center; gap: 8px;
  background: var(--bg); border: 1px solid var(--line);
  padding: 6px 14px; border-radius: 999px;
  font-size: 13px; color: var(--muted);
}
.status-pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); }
.status-pill.warn .dot { background: var(--amber); }
.status-pill.err  .dot { background: var(--red); }

/* ---------- 卡片网格 ---------- */
.grid {
  display: grid;
  gap: 18px;
  padding: 26px 28px 40px;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  max-width: 1300px;
  margin: 0 auto;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 22px;
  box-shadow: var(--shadow);
}
.card.empty { color: var(--muted); text-align: center; padding: 60px; }

/* 卡片头部 */
.card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.cstatus { display: flex; align-items: center; gap: 5px; font-size: 12px; color: var(--muted); }
.cstatus .dot { width: 9px; height: 9px; border-radius: 50%; }
.cstatus.up .dot { background: var(--green); }
.cstatus.down .dot { background: var(--red); }
.cname-first { flex: 1; }
.cname-first .title { font-size: 17px; font-weight: 700; }
.cname-first .sub { font-size: 12px; color: var(--muted); margin-top: 2px; }

/* 指标行：标签 + 进度条 */
.metric { margin-top: 16px; }
.metric-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; }
.metric-name { font-size: 13px; color: var(--text); font-weight: 500; }
.metric-val { font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
.metric-val small { font-size: 11px; font-weight: 400; color: var(--muted); margin-left: 2px; }

.progress { height: 10px; background: #eef1f7; border-radius: 999px; overflow: hidden; }
.progress > i { display: block; height: 100%; width: 0; border-radius: 999px; background: var(--blue); transition: width .8s ease; }
.progress.green > i { background: linear-gradient(90deg, #10b981, #22c55e); }
.progress.amber > i { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.progress.red > i { background: linear-gradient(90deg, #ef4444, #f87171); }
.progress.gray > i { background: #cbd5e1; }

/* 负载三项内联 */
.inline-vals { display: flex; gap: 6px; font-size: 13px; color: var(--muted); }
.inline-vals b { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }

/* 网络速率 */
.net-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.net-item .val { font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; }
.net-item .lb { font-size: 12px; color: var(--muted); margin-top: 2px; }

/* 页脚 */
.footer { text-align: center; color: var(--muted); font-size: 12px; padding-bottom: 30px; }

@media (max-width: 640px) {
  .grid { grid-template-columns: 1fr; padding: 18px; }
}