body { min-height: 100vh; }
.header { position: sticky; top: 0; z-index: 10; }
.container { padding: 12px 20px; }
.page-heading { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; }
.page-heading h1 { font-size: 16px; font-weight: 600; white-space: nowrap; }
.stats-grid { display: flex; margin-left: auto; gap: 12px; }
.stat-card { padding-right: 12px; border-right: 1px solid var(--line); display: flex; flex-direction: row-reverse; align-items: baseline; gap: 6px; white-space: nowrap; }
.stat-card:last-child { border-right: 0; }
.stat-value { font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
.stat-label { color: var(--muted); font-size: 12px; }
.overview-columns { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 20px; align-items: start; }
.overview-columns > .section:last-child { border-left: 1px solid var(--line); padding-left: 16px; }
.section { min-width: 0; }
.section-header { min-height: 28px; display: flex; justify-content: space-between; align-items: center; }
.section-title { font-size: 13px; font-weight: 600; }
.btn-link { color: var(--muted); font-size: 12px; }
.btn-link:hover { color: var(--accent); text-decoration: underline; }
.task-list, .worker-list { border-top: 1px solid var(--line); }
.task-item, .worker-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--line); min-height: 54px; }
.task-item { cursor: pointer; }
.task-item:hover { background: var(--soft); }
.task-info, .worker-info { flex: 1; min-width: 0; }
.task-info { display: flex; flex-direction: column; gap: 1px; }
.task-spec { order: -1; }
.task-spec { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.task-id { font: 11px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--muted); overflow-wrap: anywhere; }
.task-machine { font-size: 10px; color: var(--muted); margin-top: 2px; }
.task-meta { display: flex; align-items: center; gap: 10px; flex: none; }
.stage-badge { color: var(--muted); font: 12px ui-monospace, Menlo, monospace; }
.status-badge { font-size: 11px; color: var(--muted); padding: 2px 6px; border-radius: 3px; white-space: nowrap; }
.status-badge.running { color: #315aab; background: #eff4fd; }
.status-badge.passed { color: var(--success); background: #eef7f1; }
.status-badge.failed { color: var(--danger); background: #fdf0f0; }
.worker-id { display: block; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.worker-stage { margin-top: 3px; color: var(--muted); font: 11px ui-monospace, Menlo, monospace; }
.worker-meta { margin-top: 3px; color: var(--muted); font-size: 10px; }
.worker-group-header { padding: 10px 0 6px; color: var(--muted); font-size: 11px; font-weight: 600; border-bottom: 1px solid var(--line); margin-top: 8px; }
.worker-group-header:first-child { margin-top: 0; }
.worker-status { display: flex; align-items: center; gap: 6px; flex: none; }
.status-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--muted); }
.status-dot.online { background: var(--success); }
.status-dot.offline { background: var(--danger); }
.worker-tasks { font-size: 11px; color: var(--muted); }
.worker-item { width:100%; border:0; border-bottom:1px solid var(--line); background:transparent; text-align:left; cursor:pointer; }
.worker-item:hover { background:var(--soft); }
.worker-item .worker-meta { display:block; }
.task-meta { flex-wrap:wrap; }
.page-heading button, .task-pagination button, .task-filters input, .task-filters select { min-height: 30px; padding: 4px 8px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; font-size: 12px; }
.page-heading button:hover, .task-pagination button:hover:not(:disabled) { background: var(--soft); }
.task-filters { display: grid; grid-template-columns: minmax(140px, 1fr) 100px 90px minmax(110px, 160px); gap: 6px; margin: 6px 0 8px; }
.task-filters input, .task-filters select { width: 100%; }
.task-pagination { justify-content: flex-end; margin: 8px 0; font-size: 12px; color: var(--muted); }
.task-pagination button:disabled { cursor: default; }
@media (max-width: 900px) {
  .overview-columns { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .overview-columns > .section:last-child { border-left: 0; padding-left: 0; }
}
@media (max-width: 600px) {
  .container { padding: 10px 12px; }
  .page-heading { flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
  .page-heading button { margin-left: auto; }
  .stats-grid { order: 1; flex-basis: 100%; justify-content: flex-end; gap: 8px; }
  .stat-card { padding-right: 8px; gap: 4px; }
  .stat-card:last-child { padding-right: 0; }
  .stat-label { font-size: 11px; }
  .task-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .task-meta { gap: 4px; max-width: 100px; justify-content: flex-end; }
  .task-item { gap: 8px; }
}
