:root {
  --bg: #f5f7fa;
  --panel: #ffffff;
  --primary: #1890ff;
  --primary-dark: #096dd9;
  --text: #1f2937;
  --muted: #6b7280;
  --line: #e5e7eb;
  --sidebar: #111827;
  --sidebar-soft: #1f2937;
  --success: #16a34a;
  --warning: #d97706;
  --danger: #dc2626;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
  font-size: 14px;
}
button, input, select, textarea { font: inherit; }
.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: var(--bg);
}
.login-card, .card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.login-card {
  width: min(420px, calc(100vw - 32px));
  padding: 28px;
}
.login-card h1 { margin: 0 0 8px; font-size: 24px; }
.login-card p { margin: 0 0 22px; color: var(--muted); }
.layout { min-height: 100vh; display: flex; }
.sidebar {
  width: 232px;
  position: fixed;
  inset: 0 auto 0 0;
  background: var(--sidebar);
  color: #cbd5e1;
  display: flex;
  flex-direction: column;
}
.brand {
  height: 64px;
  display: flex;
  align-items: center;
  padding: 0 20px;
  color: #fff;
  font-size: 17px;
  font-weight: 650;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.nav { padding: 12px; display: grid; gap: 4px; }
.nav button {
  width: 100%;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #cbd5e1;
  padding: 11px 12px;
  text-align: left;
  cursor: pointer;
}
.nav button.active, .nav button:hover {
  background: var(--sidebar-soft);
  color: #fff;
}
.main { margin-left: 232px; min-width: 0; flex: 1; }
.topbar {
  height: 64px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 5;
}
.topbar h1 { margin: 0; font-size: 20px; font-weight: 650; }
.status-line { display: flex; align-items: center; gap: 12px; color: var(--muted); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--success); display: inline-block; }
.content { padding: 24px; }
.grid { display: grid; gap: 16px; }
.stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.card { padding: 18px; }
.card h2 { margin: 0 0 14px; font-size: 16px; }
.stat-label { color: var(--muted); margin-bottom: 8px; }
.stat-value { font-size: 28px; font-weight: 700; }
.toolbar { display: flex; gap: 10px; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
label { display: grid; gap: 7px; color: #374151; }
input, select, textarea {
  width: 100%;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  padding: 9px 11px;
  background: #fff;
  color: var(--text);
}
textarea { min-height: 118px; resize: vertical; }
.actions { display: flex; gap: 10px; margin-top: 14px; }
.btn {
  border: 1px solid #d1d5db;
  background: #f3f4f6;
  color: #374151;
  border-radius: 6px;
  padding: 9px 14px;
  cursor: pointer;
}
.btn.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn.primary:hover { background: var(--primary-dark); }
.btn:disabled { opacity: .6; cursor: not-allowed; }
.table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: 8px; }
table { width: 100%; border-collapse: collapse; min-width: 760px; background: #fff; }
th, td { padding: 12px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { background: #fafafa; color: #4b5563; font-weight: 650; }
tr:last-child td { border-bottom: 0; }
.badge { display: inline-flex; align-items: center; border-radius: 999px; padding: 2px 8px; font-size: 12px; background: #eef2ff; color: #3730a3; }
.badge.done { background: #ecfdf5; color: #047857; }
.badge.running, .badge.pending { background: #eff6ff; color: #1d4ed8; }
.badge.failed { background: #fef2f2; color: #b91c1c; }
.muted { color: var(--muted); }
.mono { font-family: Consolas, "SFMono-Regular", Menlo, monospace; word-break: break-all; }
.pager { display: flex; justify-content: flex-end; padding-top: 12px; color: var(--muted); }
.result { max-width: 420px; white-space: pre-wrap; color: #4b5563; }
.two-col { grid-template-columns: minmax(0, 1fr) minmax(360px, .6fr); }
.notice { padding: 12px 14px; border: 1px solid #bfdbfe; border-radius: 8px; background: #eff6ff; color: #1e40af; }
@media (max-width: 920px) {
  .sidebar { width: 188px; }
  .main { margin-left: 188px; }
  .stats, .two-col, .form-grid { grid-template-columns: 1fr; }
}
