:root {
  --bg: #1b1d26; --panel: #252836; --text: #e8e9ef; --muted: #9094a8; --line: #343850;
  --working: #3d85c6; --waiting_approval: #e5484d; --done: #46a758; --idle: #9094a8;
  --stuck: #f5a524; --ended: #555a70;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.4 system-ui, sans-serif; }
header { display: flex; gap: 16px; align-items: center; padding: 10px 16px; background: var(--panel); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
h1 { font-size: 18px; margin: 0; }
h2 { font-size: 13px; margin: 0 0 8px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
h2 small { text-transform: none; letter-spacing: 0; }
.spacer { flex: 1; }
label { color: var(--muted); font-size: 13px; }
input, select, button { background: var(--bg); color: var(--text); border: 1px solid var(--line); border-radius: 6px; padding: 5px 8px; font: inherit; }
input[type=number] { width: 56px; }
button { cursor: pointer; }
#capacity { font-weight: 600; padding: 3px 10px; border-radius: 12px; background: var(--bg); border: 1px solid var(--line); }
#capacity.over { background: var(--stuck); color: #1b1d26; }
#conn { font-size: 12px; padding: 2px 8px; border-radius: 10px; }
#conn.on { background: #1f3d2a; color: #8fe3a4; }
#conn.off { background: #4a2326; color: #f6a5a8; }
main { display: flex; gap: 16px; padding: 16px; align-items: flex-start; flex-wrap: wrap; }
canvas { background: #2b2f42; border: 1px solid var(--line); border-radius: 8px; max-width: 100%; height: auto; }
aside { flex: 1; min-width: 280px; display: flex; flex-direction: column; gap: 16px; }
section { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 12px; }
ul { list-style: none; margin: 0; padding: 0; max-height: 260px; overflow: auto; }
li { padding: 5px 0; border-bottom: 1px solid var(--line); display: flex; gap: 8px; align-items: baseline; }
li:last-child { border: 0; }
li .t { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
li .p { color: var(--muted); font-size: 12px; }
.badge { font-size: 11px; padding: 1px 7px; border-radius: 9px; color: #fff; white-space: nowrap; }
#newtask { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
#newtask input { flex: 1; min-width: 140px; }
.legend { line-height: 2; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin: 0 6px 0 12px; }
.dot.working { background: var(--working); } .dot.waiting_approval { background: var(--waiting_approval); }
.dot.done { background: var(--done); } .dot.idle { background: var(--idle); }
.dot.stuck { background: var(--stuck); } .dot.ended { background: var(--ended); }
