[hidden] { display: none !important; }
:root {
  --bg: #f5f6f8; --card: #fff; --ink: #1d2330; --muted: #6b7280; --line: #e3e6eb;
  --brand: #1f5fbf; --brand-soft: #e8f0fc; --ok: #1a7f4b; --warn: #b26b00; --bad: #c0392b;
  --radius: 8px;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink);
  font: 14px/1.6 -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0 0 8px; line-height: 1.3; }
h2 { font-size: 18px; } h3 { font-size: 15px; }
.topbar { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 10px 16px; background: var(--card); border-bottom: 1px solid var(--line); }
.topbar .logo { font-weight: 700; font-size: 16px; }
.topbar .spacer { flex: 1; }
.topbar .who { color: var(--muted); font-size: 13px; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 16px; }
.grid { display: grid; grid-template-columns: 340px 1fr; gap: 16px; align-items: start; }
@media (max-width: 860px) { .grid { grid-template-columns: 1fr; } }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-bottom: 16px; }
.muted { color: var(--muted); } .small { font-size: 12px; }
label { display: block; font-weight: 600; margin: 10px 0 4px; }
input[type=text], input[type=password], input[type=number], select, textarea {
  width: 100%; padding: 8px 10px; border: 1px solid var(--line); border-radius: 6px; font: inherit; background: #fff; color: inherit; }
textarea { resize: vertical; min-height: 160px; }
button, .btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 14px;
  border: 1px solid var(--brand); background: var(--brand); color: #fff; border-radius: 6px; font: inherit; cursor: pointer; }
button.secondary, .btn.secondary { background: #fff; color: var(--brand); }
button.ghost { background: transparent; border-color: var(--line); color: var(--ink); }
button.danger { background: #fff; border-color: var(--bad); color: var(--bad); }
button:disabled { opacity: .55; cursor: not-allowed; }
button.sm { padding: 4px 10px; font-size: 13px; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.list { list-style: none; margin: 0; padding: 0; }
.list li { padding: 10px; border: 1px solid var(--line); border-radius: 6px; margin-bottom: 8px; cursor: pointer; background: #fff; }
.list li.active { border-color: var(--brand); background: var(--brand-soft); }
.list li .t { font-weight: 600; word-break: break-all; }
.badge { display: inline-block; min-width: 22px; padding: 0 7px; border-radius: 10px; font-size: 12px; font-weight: 700; text-align: center; line-height: 20px; }
.g-A { background: #dff3e7; color: var(--ok); } .g-B { background: #e3edfb; color: var(--brand); }
.g-C { background: #fff1d6; color: var(--warn); } .g-D { background: #f8e0dd; color: var(--bad); }
.status-running, .status-pending { color: var(--brand); } .status-error { color: var(--bad); }
.kv { display: grid; grid-template-columns: 110px 1fr; gap: 4px 12px; }
.kv div:nth-child(odd) { color: var(--muted); }
@media (max-width: 480px) { .kv { grid-template-columns: 88px 1fr; } }
.section-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.script { border: 1px solid var(--line); border-radius: 6px; padding: 10px; margin-bottom: 8px; background: #fafbfc; }
.script .txt { white-space: pre-wrap; margin: 6px 0; }
.script .meta { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.notice { background: #fff8e6; border: 1px solid #f3dca3; border-radius: var(--radius); padding: 12px 14px; }
.error-box { background: #fdecea; border: 1px solid #f5c2bd; color: var(--bad); border-radius: 6px; padding: 8px 12px; }
.progress { display: flex; gap: 6px; flex-wrap: wrap; margin: 8px 0; }
.progress span { padding: 2px 8px; border-radius: 10px; background: #eef0f3; color: var(--muted); font-size: 12px; }
.progress span.done { background: #dff3e7; color: var(--ok); }
.progress span.now { background: var(--brand-soft); color: var(--brand); font-weight: 600; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { text-align: left; padding: 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; white-space: nowrap; }
.table-wrap { overflow-x: auto; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; overflow-x: auto; }
.tabs button { background: transparent; color: var(--muted); border: none; border-bottom: 2px solid transparent; border-radius: 0; }
.tabs button.on { color: var(--brand); border-bottom-color: var(--brand); font-weight: 600; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; }
.stat .n { font-size: 22px; font-weight: 700; }
.center-card { max-width: 380px; margin: 10vh auto; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.sources li { margin-bottom: 4px; word-break: break-all; }
.empty { text-align: center; color: var(--muted); padding: 40px 0; }
.modal-bg { position: fixed; inset: 0; background: rgba(0,0,0,.35); display: flex; align-items: center; justify-content: center; padding: 16px; z-index: 50; }
.modal { background: #fff; border-radius: var(--radius); padding: 20px; max-width: 560px; width: 100%; max-height: 90vh; overflow: auto; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: #1d2330; color: #fff; padding: 8px 16px; border-radius: 6px; z-index: 60; }
ul.plain { margin: 4px 0; padding-left: 20px; }
.doc { max-width: 760px; margin: 0 auto; padding: 24px 16px; }
.doc h1 { font-size: 22px; } .doc h2 { margin-top: 20px; }
