:root {
  color-scheme: light;
  --bg: #f6f7f9;
  --surface: #fff;
  --text: #172033;
  --muted: #5e6a7d;
  --border: #d8dee8;
  --primary: #1769e0;
  font-family: Arial, "Microsoft YaHei", sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--text); background: var(--bg); font-size: 14px; line-height: 1.5; }
.page { width: min(1440px, calc(100% - 40px)); margin: auto; padding: 24px 0 40px; }
.page-nav { display: flex; gap: 8px; margin-bottom: 24px; }
.page-nav a { padding: 8px 14px; color: var(--muted); text-decoration: none; border-radius: 6px; }
.page-nav a[aria-current] { color: #0f56bf; background: #e7effd; font-weight: 600; }
.page-nav a:hover { background: #e7effd; }
.topbar { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 18px; }
h1 { font-size: 24px; line-height: 1.25; margin: 0; }
.subtitle { color: var(--muted); margin: 6px 0 0; }
button { font: inherit; min-height: 40px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); color: var(--text); padding: 8px 14px; cursor: pointer; white-space: nowrap; }
button:hover { border-color: #aeb8c8; background: #f0f4fa; }
button.primary { color: #fff; background: var(--primary); border-color: var(--primary); }
button.primary:hover { background: #0f56bf; }
button.danger { color: #b52d2d; border-color: #e3b6b6; }
button:disabled { opacity: .5; cursor: not-allowed; }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 3px solid #7daef2; outline-offset: 3px; }
input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--primary); cursor: pointer; }
.notice { padding: 14px 16px; border: 1px solid #cbdcf5; border-radius: 8px; background: #eef5ff; color: #33547f; margin-bottom: 20px; }
.notice strong { display: block; margin-bottom: 3px; }
.summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 22px; }
.metric { padding: 14px 16px; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; }
.metric b { display: block; font-size: 26px; line-height: 1.3; }
.metric span, .muted { color: var(--muted); }
.toolbar, .selection, .actions { display: flex; align-items: center; gap: 12px; }
.toolbar { justify-content: space-between; margin-bottom: 12px; flex-wrap: wrap; }
.actions { gap: 8px; flex-wrap: wrap; }
.checkline { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.table-wrap { overflow: auto; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; }
table { width: 100%; min-width: 1060px; border-collapse: collapse; }
th, td { padding: 16px 14px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
th { background: #eef2f7; color: #38445a; font-size: 12px; }
.select-column { width: 60px; }
tr:last-child td { border-bottom: 0; }
tr.selected { background: #f4f8ff; }
.task-name { font-size: 15px; }
.detail { display: block; color: var(--muted); margin-top: 5px; font-size: 12px; }
.status { display: inline-block; padding: 3px 9px; border-radius: 5px; white-space: nowrap; font-size: 12px; font-weight: 600; background: #eef1f5; color: var(--muted); }
.status.scheduled { background: #e9f1ff; color: #1555ad; }
.status.polling, .status.running { background: #e8f5ef; color: #096442; }
.status.stopping { background: #fff2d6; color: #805400; }
.task-error { max-width: 240px; color: #b52d2d; overflow-wrap: anywhere; }
.error-banner { padding: 12px 14px; margin-bottom: 12px; background: #fff0ef; border: 1px solid #edc0bd; border-radius: 6px; color: #a12d26; }
.empty { text-align: center; padding: 36px; color: var(--muted); }
.footnote { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; margin-top: 14px; font-size: 12px; color: var(--muted); }
.toast { position: fixed; right: 20px; bottom: 20px; max-width: calc(100vw - 40px); padding: 12px 16px; background: #172033; color: white; border-radius: 8px; box-shadow: 0 8px 24px #17203322; }
[hidden] { display: none !important; }
@media (max-width: 700px) {
  .page { width: calc(100% - 24px); padding-top: 16px; }
  .summary { grid-template-columns: repeat(2, 1fr); }
  .topbar { flex-direction: column; }
  .toolbar > .actions { width: 100%; }
  .toolbar > .actions button { flex: 1; }
  .page-nav { margin-bottom: 18px; }
}

.test-result { white-space: pre-wrap; overflow-wrap: anywhere; max-width: 440px; max-height: 300px; overflow: auto; font-size: 12px; }
details summary { cursor: pointer; color: var(--primary); }

.page-nav { flex-wrap: wrap; }
