* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: #f5f6f8; color: #1f2328; font-size: 14px; line-height: 1.6;
}
button, input, textarea, select { font-family: inherit; font-size: 14px; }
button { cursor: pointer; border-radius: 6px; border: 1px solid #d0d7de; background: #fff; padding: 6px 14px; }
button:hover { background: #f3f4f6; }
button.primary { background: #1f6feb; border-color: #1f6feb; color: #fff; }
button.primary:hover { background: #1a5fd0; }
button.ghost { background: transparent; }
button:disabled { opacity: .5; cursor: not-allowed; }
input, textarea {
  width: 100%; padding: 8px 10px; border: 1px solid #d0d7de;
  border-radius: 6px; margin-bottom: 12px; background: #fff;
}
textarea { font-family: ui-monospace, Consolas, monospace; font-size: 13px; }
label { display: block; font-size: 13px; color: #57606a; margin-bottom: 4px; }

.login-wrap { display: flex; align-items: center; justify-content: center; min-height: 100vh; }
.login-card { background: #fff; padding: 2.5rem 2rem; border-radius: 12px; border: 1px solid #d0d7de; width: 360px; }
.login-card h1 { font-size: 20px; font-weight: 600; margin-bottom: 4px; }
.login-card .sub { color: #57606a; font-size: 13px; margin-bottom: 1.5rem; }
.msg { font-size: 13px; margin-top: 8px; min-height: 20px; }
.msg.err { color: #cf222e; }
.msg.ok { color: #1a7f37; }

.topbar {
  display: flex; align-items: center; gap: 24px;
  background: #fff; border-bottom: 1px solid #d0d7de; padding: 0 24px; height: 56px;
  position: sticky; top: 0; z-index: 10;
}
.brand { font-weight: 600; font-size: 15px; white-space: nowrap; }
.tabs { display: flex; gap: 4px; flex: 1; }
.tab { border: none; background: transparent; padding: 6px 14px; border-radius: 6px; color: #57606a; }
.tab.active { background: #eaf2ff; color: #1f6feb; font-weight: 500; }
.user { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #57606a; }

.container { max-width: 1180px; margin: 0 auto; padding: 24px; }
h2 { font-size: 16px; font-weight: 600; margin: 1.5rem 0 .75rem; }
h3 { font-size: 14px; font-weight: 600; margin-bottom: .75rem; }
.hint { color: #57606a; font-size: 13px; margin-bottom: 1rem; }

.metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.metric { background: #fff; border: 1px solid #d0d7de; border-radius: 8px; padding: 14px 16px; }
.metric .label { font-size: 12px; color: #57606a; }
.metric .value { font-size: 24px; font-weight: 600; margin-top: 4px; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.card { background: #fff; border: 1px solid #d0d7de; border-radius: 8px; padding: 16px; }
.card h3 { display: flex; align-items: center; justify-content: space-between; }
.pname { font-weight: 600; }
.pmeta { font-size: 12px; color: #57606a; margin: 6px 0; }
.pmeta div { display: flex; justify-content: space-between; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

.badge { font-size: 12px; padding: 2px 8px; border-radius: 10px; background: #eaeef2; color: #57606a; font-weight: 400; }
.badge.ok { background: #dafbe1; color: #1a7f37; }
.badge.warn { background: #fff8c5; color: #9a6700; }
.badge.bad { background: #ffebe9; color: #cf222e; }
.badge.off { background: #eaeef2; color: #57606a; }

.table-wrap { background: #fff; border: 1px solid #d0d7de; border-radius: 8px; overflow: auto; max-height: 620px; margin-top: 1rem; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { text-align: left; padding: 10px 12px; background: #f6f8fa; border-bottom: 1px solid #d0d7de; position: sticky; top: 0; font-weight: 500; }
td { padding: 8px 12px; border-bottom: 1px solid #eaeef2; vertical-align: top; }
tbody tr:hover { background: #f6f8fa; }
.dots { display: flex; gap: 3px; flex-wrap: wrap; }
.dot { width: 8px; height: 8px; border-radius: 2px; background: #eaeef2; }
.dot.on { background: #1a7f37; }

.runs { background: #fff; border: 1px solid #d0d7de; border-radius: 8px; padding: 8px 16px; max-height: 340px; overflow: auto; }
.run { padding: 8px 0; border-bottom: 1px solid #eaeef2; font-size: 13px; display: flex; gap: 12px; }
.run:last-child { border-bottom: none; }
.run .t { color: #57606a; font-family: ui-monospace, monospace; font-size: 12px; white-space: nowrap; }
.preview { background: #f6f8fa; padding: 12px; border-radius: 6px; font-size: 12px; overflow: auto; max-height: 240px; margin-top: 12px; }
