:root {
  color-scheme: light;
  --bg: #f3f6fa;
  --surface: #fff;
  --text: #172438;
  --muted: #66768a;
  --line: #dce4ee;
  --accent: #2463cf;
  --soft: #eaf1ff;
  --success: #117547;
  --warning: #986400;
  --danger: #b52b30;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.6 "Segoe UI","Microsoft YaHei UI",system-ui,sans-serif; }
main { max-width: 1440px; margin: auto; padding: 32px; }
h1,h2,p { margin-top: 0; }
h1 { font-size: clamp(29px,3vw,40px); line-height: 1.3; letter-spacing: -.03em; margin-bottom: 10px; }
h2 { font-size: 19px; margin-bottom: 6px; }
button,input,select { font: inherit; color: inherit; }
button,input,select { border: 1px solid var(--line); background: var(--surface); border-radius: 9px; padding: 9px 12px; min-height: 42px; }
input,select { min-width: 0; }
button { cursor: pointer; }
button:hover { border-color: var(--accent); }
button:disabled { opacity: .5; cursor: default; }
button:focus-visible,input:focus-visible,select:focus-visible { outline: 3px solid #b6d0ff; outline-offset: 2px; }
.primary { background: var(--accent); color: white; border-color: var(--accent); font-weight: 600; }
.muted,.fine-print { color: var(--muted); }
.eyebrow { color: var(--accent); font-size: 13px; font-weight: 650; display: inline-block; margin-bottom: 15px; }
.login-layout { min-height: min(780px,calc(100vh - 64px)); display: grid; grid-template-columns: 1.2fr 1fr; gap: 70px; align-items: center; max-width: 1100px; margin: auto; }
.intro h1 { font-size: clamp(34px,4vw,49px); line-height: 1.4; }
.intro > p { max-width: 420px; color: var(--muted); }
.intro-points { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 32px; }
.intro-points span { background: var(--soft); color: var(--accent); padding: 7px 11px; border-radius: 99px; font-size: 13px; }
.login-card { background: var(--surface); padding: 36px; border: 1px solid var(--line); border-radius: 20px; box-shadow: 0 15px 50px #2437580a; }
.login-card label { display: block; margin: 20px 0 6px; font-size: 14px; }
.login-card input,.login-card button { width: 100%; }
.login-card button { margin-top: 10px; }
.fine-print { font-size: 12px; margin: 20px 0 0; }
.message { font-size: 13px; min-height: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.message:empty { display: none; }
.danger { color: var(--danger); }
.topbar,.account-actions,.status-line,.panel-head,.pagination,.dialog-head { display: flex; gap: 14px; justify-content: space-between; align-items: center; }
.topbar { align-items: flex-start; margin-bottom: 16px; }
.account-actions { flex-wrap: wrap; justify-content: flex-end; }
.badge { display: inline-block; font-size: 12px; color: var(--accent); background: var(--soft); padding: 4px 10px; border-radius: 99px; white-space: nowrap; }
.status-line { justify-content: flex-start; color: var(--muted); font-size: 13px; margin-bottom: 16px; flex-wrap: wrap; }
.status-line button { margin-left: auto; min-height: 34px; padding: 5px 10px; font-size: 12px; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--warning); flex: none; }
.dot.fresh { background: var(--success); }
.metrics { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 15px; margin: 20px 0 24px; }
.metric { background: var(--surface); border: 1px solid var(--line); border-radius: 13px; padding: 20px; min-height: 154px; }
.metric h2 { color: var(--muted); font-size: 13px; font-weight: 500; }
.value { font-size: clamp(23px,2.4vw,31px); font-weight: 700; margin: 8px 0; letter-spacing: -.03em; }
.metric p { font-size: 12px; color: var(--muted); white-space: pre-line; margin: 0; }
.metrics.stale .metric { border-style: dashed; }
.tasks-panel { background: var(--surface); border: 1px solid var(--line); border-radius: 15px; padding: 22px; }
.panel-head .muted { font-size: 12px; margin: 0; }
.filters { display: flex; gap: 9px; margin: 20px 0 8px; flex-wrap: wrap; }
.filters input { flex: 1 1 220px; }
.task { padding: 20px 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: minmax(220px,1.2fr) minmax(240px,1.2fr) minmax(130px,.7fr); gap: 24px; }
.task:last-child { border-bottom: none; }
.task-name { font-size: 15px; font-weight: 650; overflow-wrap: anywhere; }
.task-id { font-size: 11px; color: var(--muted); overflow-wrap: anywhere; font-family: Consolas,monospace; margin: 6px 0; }
.task-meta,.task-times { color: var(--muted); font-size: 12px; }
.task-facts { font-size: 12px; }
.task-facts p { margin: 0 0 5px; }
.state-RUNNING { color: var(--accent); background: var(--soft); }
.state-QUEUED,.state-UNKNOWN { color: var(--warning); background: #fff3d8; }
.state-FAILED { color: var(--danger); background: #ffedee; }
.state-SUCCEEDED { color: var(--success); background: #e9f8ef; }
.task button { font-size: 12px; min-height: 34px; padding: 5px 9px; margin-top: 10px; }
progress { width: 100%; height: 9px; accent-color: var(--accent); }
.empty { text-align: center; padding: 46px 12px; color: var(--muted); }
.pagination { justify-content: center; margin-top: 18px; font-size: 13px; }
footer { color: var(--muted); font-size: 12px; padding: 18px 0 0; }
dialog { width: min(960px,calc(100vw - 30px)); max-height: calc(100vh - 40px); padding: 20px; border: 1px solid var(--line); border-radius: 14px; color: var(--text); background: var(--surface); }
dialog::backdrop { background: #13243c70; }
.dialog-head { margin-bottom: 16px; }
.dialog-head h2 { overflow-wrap: anywhere; font-size: 16px; }
pre { white-space: pre-wrap; overflow-wrap: anywhere; font: 12px/1.7 Consolas,monospace; }
@media(max-width:900px) {
  main { padding: 22px; }
  .login-layout { grid-template-columns: 1fr; gap: 25px; max-width: 520px; }
  .intro h1 { font-size: 34px; }
  .intro-points { margin-top: 15px; }
  .topbar { display: block; }
  .account-actions { justify-content: flex-start; }
  .metrics { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .task { grid-template-columns: 1fr 1fr; }
  .task-times { grid-column: 1/-1; }
}
@media(max-width:560px) {
  main { padding: 16px; }
  .login-card { padding: 26px; }
  .metrics { grid-template-columns: 1fr; }
  .metric { min-height: 0; }
  .panel-head { display: block; }
  .task { grid-template-columns: 1fr; gap: 12px; }
  .task-times { grid-column: auto; }
  .tasks-panel { padding: 16px; }
  .filters select { flex: 1 1 120px; }
}
