:root {
  --bg: #eef3ef;
  --ink: #17211b;
  --muted: #647067;
  --line: #cfd8cf;
  --accent: #1d6b52;
  --accent-2: #b74228;
  --panel: #fbfcf8;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Microsoft YaHei", "Noto Sans SC", sans-serif;
  background:
    linear-gradient(120deg, rgba(29,107,82,.12), transparent 38%),
    linear-gradient(310deg, rgba(183,66,40,.10), transparent 36%),
    var(--bg);
  color: var(--ink);
}

.shell {
  width: min(1120px, calc(100vw - 36px));
  margin: 0 auto;
  padding: 36px 0 60px;
}

.shell.wide {
  width: min(1580px, calc(100vw - 28px));
}

.hero {
  min-height: 180px;
  display: flex;
  align-items: end;
  border-bottom: 1px solid var(--line);
  margin-bottom: 22px;
  justify-content: space-between;
  gap: 20px;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0;
  color: var(--accent-2);
  font-weight: 700;
}

h1 { font-size: clamp(32px, 5vw, 58px); margin: 0 0 10px; }
h2 { margin: 0; }
.subtle { color: var(--muted); }
.error { color: var(--accent-2); font-weight: 700; }

.panel {
  background: rgba(251,252,248,.9);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 20px;
  margin: 18px 0;
}

.summary p {
  font-size: 16px;
  line-height: 1.7;
}

label {
  display: block;
  font-weight: 700;
  margin-bottom: 10px;
}

textarea {
  width: 100%;
  min-height: 220px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 14px;
  font: 14px Consolas, monospace;
  resize: vertical;
}

.form-row, .filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 14px;
}

input, select {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 12px;
  background: white;
}

.check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: var(--muted);
  font-weight: 700;
}

.check input {
  width: 16px;
  height: 16px;
}

button {
  border: 0;
  border-radius: 6px;
  background: var(--accent);
  color: white;
  padding: 11px 18px;
  font-weight: 700;
  cursor: pointer;
}

button.danger {
  background: #a83324;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px;
}

.login-panel {
  width: min(420px, 100%);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 28px;
}

.login-panel input,
.login-panel button {
  width: 100%;
  margin-bottom: 14px;
}

.status-line {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 6px 0 10px;
}

.status-badge {
  display: inline-flex;
  min-width: 86px;
  justify-content: center;
  border-radius: 999px;
  padding: 7px 12px;
  color: white;
  background: #69746d;
  font-weight: 800;
}

.status-badge.running,
.status-badge.pending {
  background: #b35b14;
}

.status-badge.done {
  background: var(--accent);
}

.status-badge.failed {
  background: #a83324;
}

.progress {
  width: min(520px, 80vw);
  height: 12px;
  background: #d7ded5;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
}

.progress span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), #61a37f);
  transition: width .4s ease;
}

.button-link {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  border-radius: 6px;
  background: var(--accent-2);
  color: white;
  padding: 0 14px;
  text-decoration: none;
  font-weight: 700;
}

.button-link.ghost,
button.secondary {
  background: #e6ebe4;
  color: var(--ink);
  border: 1px solid var(--line);
}

.review-form {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  min-width: 180px;
}

.review-form input,
.review-form select {
  width: 100%;
  padding: 7px 8px;
}

.review-form button,
button.secondary {
  padding: 8px 10px;
  margin-top: 6px;
}

.task-list {
  display: grid;
  gap: 8px;
}

.task-item {
  display: grid;
  grid-template-columns: 180px 90px 90px 1fr;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
  border-top: 1px solid var(--line);
  padding: 12px 0;
}

.topbar {
  display: flex;
  gap: 24px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  margin-bottom: 18px;
}

.topbar a {
  color: var(--accent);
  font-weight: 700;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin: 16px 0;
}

.grid-two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.mini-table {
  max-height: 320px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.mini-table table {
  min-width: 760px;
}

.metric {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
}

.metric span { display: block; color: var(--muted); }
.metric strong { font-size: 30px; }

.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

table {
  width: 100%;
  min-width: 1280px;
  border-collapse: collapse;
}

th, td {
  border-bottom: 1px solid var(--line);
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
  font-size: 13px;
}

th {
  position: sticky;
  top: 0;
  background: #dde8de;
  z-index: 1;
}

code {
  font-family: Consolas, monospace;
  font-weight: 700;
}

small { color: var(--muted); }
.risk { font-weight: 700; color: var(--accent-2); }

@media (max-width: 720px) {
  .task-item { grid-template-columns: 1fr; }
  .topbar { align-items: flex-start; }
  .filters input, .filters select, .filters button { width: 100%; }
  .grid-two { grid-template-columns: 1fr; }
}
