:root {
  --bg: #f5f7fa;
  --card: #ffffff;
  --border: #e5e9f0;
  --text: #1f2937;
  --text-2: #6b7280;
  --brand: #2563eb;
  --brand-soft: #eff4ff;
  --ok: #16a34a;
  --ok-soft: #ecfdf3;
  --warn: #d97706;
  --warn-soft: #fffbeb;
  --err: #dc2626;
  --err-soft: #fef2f2;
  --radius: 14px;
  --shadow: 0 1px 3px rgba(16, 24, 40, 0.06), 0 1px 2px rgba(16, 24, 40, 0.04);
}

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

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

/* 顶栏 */
.topbar {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}
.topbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  width: 40px; height: 40px; border-radius: 10px;
  background: linear-gradient(135deg, #2563eb, #4f46e5);
  box-shadow: var(--shadow);
}
.brand h1 { font-size: 19px; font-weight: 700; }
.subtitle { font-size: 12.5px; color: var(--text-2); }
.topbar-actions { display: flex; align-items: center; gap: 12px; }
.updated-at { font-size: 12.5px; color: var(--text-2); }
.btn {
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--brand);
  padding: 7px 16px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  transition: all .15s;
}
.btn:hover { background: var(--brand-soft); border-color: var(--brand); }
.btn:disabled { opacity: .6; cursor: not-allowed; }

.container { max-width: 1200px; margin: 0 auto; padding: 24px; }

/* 总览状态条 */
.overview {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
}
.stat {
  flex: 1 1 120px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 18px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}
.stat .stat-num { font-size: 24px; font-weight: 700; }
.stat .stat-label { font-size: 12.5px; color: var(--text-2); }
.stat.total .stat-num { color: var(--text); }
.stat.ok .stat-num { color: var(--ok); }
.stat.warn .stat-num { color: var(--warn); }
.stat.err .stat-num { color: var(--err); }

/* 板块卡片 */
.boards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
@media (max-width: 980px) { .boards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .boards { grid-template-columns: 1fr; } }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 180px;
}
.card.wide { grid-column: 1 / -1; min-height: 0; }

/* 运营系统：仪表盘小组件 */
.ops-widgets {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
}
.ops-widget {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  text-decoration: none;
  color: var(--text);
  transition: all .15s;
}
.ops-widget:hover { border-color: var(--brand); background: var(--brand-soft); }
.ops-icon { color: var(--brand); }
.ops-icon svg { width: 20px; height: 20px; }
.ops-title { font-size: 13.5px; font-weight: 600; color: var(--text); }
.ops-sheet { font-size: 12px; color: var(--text-2); }
.card-head { display: flex; align-items: flex-start; gap: 12px; }
.card-icon {
  width: 40px; height: 40px; flex: none;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: var(--brand);
  background: var(--brand-soft);
}
.card-icon svg { width: 22px; height: 22px; }
.card-title { font-size: 15.5px; font-weight: 700; flex: 1; }
.card-status {
  flex: none;
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12px; font-weight: 600;
  padding: 3px 10px; border-radius: 999px;
}
.status-ok { background: var(--ok-soft); color: var(--ok); }
.status-degraded { background: var(--warn-soft); color: var(--warn); }
.status-error { background: var(--err-soft); color: var(--err); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }

.card-body { font-size: 13.5px; color: var(--text-2); flex: 1; }
.card-body ul { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.card-body li { padding-left: 14px; position: relative; }
.card-body li::before {
  content: ""; position: absolute; left: 0; top: 9px;
  width: 6px; height: 6px; border-radius: 50%; background: var(--brand);
}
.kv { display: flex; justify-content: space-between; gap: 8px; padding: 3px 0; }
.kv .k { color: var(--text-2); }
.kv .v { color: var(--text); font-weight: 600; text-align: right; }
.meta-line { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.chip {
  font-size: 12px; background: var(--brand-soft); color: var(--brand);
  padding: 2px 9px; border-radius: 999px;
}
.note { font-size: 13px; color: var(--text-2); }

.card-foot { margin-top: auto; }
.link-btn {
  display: inline-block;
  border: 1px solid var(--brand);
  color: var(--brand);
  background: var(--card);
  padding: 7px 16px;
  border-radius: 8px;
  font-size: 13.5px;
  text-decoration: none;
  transition: all .15s;
}
.link-btn:hover { background: var(--brand); color: #fff; }

.task-list { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.task-list li { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text); }
.task-list .t-name { flex: 1; }
.task-list .t-sched { color: var(--text-2); font-size: 12px; }
.pill { width: 8px; height: 8px; border-radius: 50%; }
.pill.ok { background: var(--ok); }
.pill.err { background: var(--err); }
.pill.pending { background: var(--warn); }

.loading { text-align: center; color: var(--text-2); padding: 60px 0; }
.footer { text-align: center; color: var(--text-2); font-size: 12px; padding: 24px; }
