:root {
  --bg: #f4f1ec;
  --panel: #fffdf8;
  --ink: #1d1a16;
  --muted: #6d645a;
  --line: #e4ddd2;
  --accent: #0f6b5c;
  --accent-2: #c45c26;
  --danger: #a33b2b;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(15,107,92,.08), transparent 28%),
    linear-gradient(180deg, #f7f3ee, var(--bg));
  min-height: 100vh;
}
a { color: var(--accent); text-decoration: none; }
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: 240px;
  background: #17352f; color: #f6f1e8; padding: 24px 18px;
  display: flex; flex-direction: column; gap: 18px;
}
.brand { font-size: 18px; font-weight: 700; line-height: 1.4; }
.sidebar nav { display: flex; flex-direction: column; gap: 8px; }
.sidebar a {
  color: #d9d1c4; padding: 10px 12px; border-radius: 10px;
}
.sidebar a.active, .sidebar a:hover { background: rgba(255,255,255,.08); color: #fff; }
.logout { margin-top: auto; }
.logout button, .btn, button[type=submit] {
  border: 0; background: var(--accent); color: #fff;
  padding: 10px 14px; border-radius: 10px; cursor: pointer; font: inherit;
}
.btn.secondary { background: #44544f; }
.btn.danger, button.danger { background: var(--danger); }
.main { margin-left: 240px; padding: 28px; }
.top h1 { margin: 0 0 18px; font-size: 28px; }
.content { display: grid; gap: 18px; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 14px; }
.stat, .panel, .login-card {
  background: var(--panel); border: 1px solid var(--line); border-radius: 16px;
  box-shadow: 0 10px 30px rgba(60,40,20,.04);
}
.stat { padding: 18px; }
.stat .n { font-size: 28px; font-weight: 700; }
.stat .l { color: var(--muted); margin-top: 6px; }
.panel { padding: 18px; }
.panel-h { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.muted { color: var(--muted); }
.form { display: grid; gap: 10px; max-width: 860px; }
input, textarea, select {
  width: 100%; padding: 10px 12px; border-radius: 10px;
  border: 1px solid var(--line); background: #fff; font: inherit;
}
.badge { display: inline-block; padding: 3px 8px; border-radius: 999px; background: #ece7df; font-size: 12px; }
.badge.done { background: #d9efe8; color: #0f6b5c; }
.badge.failed { background: #f3d7d2; color: var(--danger); }
.badge.running, .badge.pending { background: #efe4d4; color: #8a5520; }
.alert { background: #f8e7e2; color: var(--danger); padding: 10px 12px; border-radius: 10px; }
.code {
  white-space: pre-wrap; background: #171513; color: #f4efe7;
  padding: 14px; border-radius: 12px; overflow: auto;
}
.actions { display: flex; gap: 10px; flex-wrap: wrap; }
.login-wrap {
  min-height: 100vh; display: grid; place-items: center; padding: 24px;
  background:
    linear-gradient(135deg, rgba(15,107,92,.18), transparent 40%),
    linear-gradient(180deg, #1b2d29, #0f1a17);
}
.login-card { width: min(420px, 100%); padding: 28px; display: grid; gap: 12px; }
.login-card h1 { margin: 0; }
@media (max-width: 900px) {
  .sidebar { position: static; width: auto; }
  .main { margin-left: 0; }
  .stats { grid-template-columns: 1fr 1fr; }
}
