dsh-hive-panel 0.2.3 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/client.js CHANGED
@@ -71,7 +71,7 @@ window.__ModuleLoader__.load({
71
71
 
72
72
  /* ---- inlined from src/panel.js ---- */
73
73
  var HIVE_PANEL = (function () {
74
- // Hive panel — zero-dependency ESM renderer for hive-panel 0.3.2 snapshots.
74
+ // Hive panel — zero-dependency ESM renderer for hive-panel 0.5.0 snapshots.
75
75
  // User-provided values are always written with textContent; no raw HTML is assigned.
76
76
  //
77
77
  // Visible copy is translated through the built-in \`messages\` dictionaries
@@ -108,7 +108,8 @@ const ACTION_META = Object.freeze({
108
108
  remove: { labelKey: "action.remove", helpKey: "help.action.remove" },
109
109
  });
110
110
 
111
- const MIN_PLAN_CARDS = 1;
111
+ const MIN_PLAN_CARDS = 0;
112
+ const DEFAULT_PLAN_CARDS = 50;
112
113
 
113
114
  const PANEL_STYLES = `.hive { position: relative; }
114
115
 
@@ -2057,6 +2058,38 @@ dialog.hive-dialog .hive-dialog-foot { flex: 0 0 auto; }
2057
2058
  dialog.hive-dialog .hive-dialog-body { flex: 1 1 auto; min-height: 0; overflow: auto; }
2058
2059
  .hive-card-run-output { max-height: 20lh; overflow: auto; }
2059
2060
  .hive-card-actions { flex-wrap: wrap; justify-content: flex-end; }
2061
+ /* Virtual lanes: fixed 26px cards, 2px gaps, 28px stride. */
2062
+ .hive-lane-cards {
2063
+ display: block;
2064
+ flex: 1 1 auto;
2065
+ min-height: 0;
2066
+ padding: 7px;
2067
+ overflow-x: hidden;
2068
+ overflow-y: auto;
2069
+ }
2070
+ .hive-lane-virtual { position: relative; width: 100%; min-width: 0; }
2071
+ .hive-lane-virtual .hive-card {
2072
+ position: absolute;
2073
+ left: 0;
2074
+ right: 0;
2075
+ display: flex;
2076
+ align-items: center;
2077
+ height: 26px;
2078
+ min-height: 26px;
2079
+ padding: 2px 8px;
2080
+ overflow: hidden;
2081
+ border-radius: var(--hive-radius-sm);
2082
+ }
2083
+ .hive-lane-virtual .hive-card-title {
2084
+ width: 100%;
2085
+ overflow: hidden;
2086
+ font-size: 12px;
2087
+ line-height: 16px;
2088
+ text-overflow: ellipsis;
2089
+ white-space: nowrap;
2090
+ }
2091
+ .hive-agent-count { font: inherit; cursor: pointer; }
2092
+ .hive-agent-count:disabled { cursor: default; }
2060
2093
  `;
2061
2094
 
2062
2095
  const LANE_LABEL_KEYS = Object.freeze({
@@ -2114,7 +2147,6 @@ const messages = Object.freeze({
2114
2147
  "stats.byRoleTitle": "by role: ",
2115
2148
  "status.actionFailed": "action failed",
2116
2149
  "status.disconnected": "disconnected",
2117
- "agents.empty": "No agents yet.",
2118
2150
  "agents.openAria": "Open agent",
2119
2151
  "agent.idle": "idle",
2120
2152
  "agent.task": "task",
@@ -2272,17 +2304,17 @@ const messages = Object.freeze({
2272
2304
  "help.action.unfreeze": "Resume: agents can claim pending tasks again.",
2273
2305
  "help.action.add": "New task: create a pending task with a role and file scope.",
2274
2306
  "help.action.plan": "Set the Queen a goal: split a goal into tasks, preview the plan, then write it to the board.",
2275
- "help.action.claim": "Claim: lease a pending task for an agent.",
2307
+ "help.action.claim": "Claim: take a pending task for an agent; the claim lasts 5 minutes.",
2276
2308
  "help.action.done": "Done: mark a claimed task complete, optionally with a commit sha.",
2277
2309
  "help.action.fail": "Fail: mark a claimed task failed and record the reason.",
2278
2310
  "help.action.retry": "Retry: put a failed task back in the queue.",
2279
- "help.action.remove": "Delete this task card permanently. A claimed task has to be released or reopened first.",
2311
+ "help.action.remove": "Delete this task permanently. A claimed task has to be released or reopened first.",
2280
2312
  "plan.dialogTitle": "Set the Queen a goal",
2281
2313
  "plan.dialogAria": "Plan tasks from a goal",
2282
2314
  "plan.goal": "Goal",
2283
2315
  "plan.goalHint": "Describe the outcome; the Queen will split it into tasks.",
2284
2316
  "plan.maxCards": "Max tasks",
2285
- "plan.maxCardsHint": "1+",
2317
+ "plan.maxCardsHint": "0 = no limit",
2286
2318
  "plan.preview": "Preview plan",
2287
2319
  "plan.previewAria": "Ask the Queen to draft a task plan without writing it",
2288
2320
  "plan.previewing": "Planning…",
@@ -2302,7 +2334,7 @@ const messages = Object.freeze({
2302
2334
  "plan.deps": "deps",
2303
2335
  "plan.none": "—",
2304
2336
  "plan.goalRequired": "Enter a goal first.",
2305
- "plan.maxInvalid": "Max tasks must be a positive whole number.",
2337
+ "plan.maxInvalid": "Max tasks must be a whole number of 0 or more (0 = no limit).",
2306
2338
  "plan.previewFirst": "Preview the plan before writing tasks.",
2307
2339
  "plan.previewFailed": "Could not read the plan.",
2308
2340
  "plan.applyHint": "The preview is read-only; writing calls plan again with apply=true.",
@@ -2356,7 +2388,6 @@ const messages = Object.freeze({
2356
2388
  "stats.byRoleTitle": "按角色:",
2357
2389
  "status.actionFailed": "操作失败",
2358
2390
  "status.disconnected": "连接断开",
2359
- "agents.empty": "后台暂无智能体。",
2360
2391
  "agents.openAria": "打开智能体",
2361
2392
  "agent.idle": "空闲",
2362
2393
  "agent.task": "任务",
@@ -2514,17 +2545,17 @@ const messages = Object.freeze({
2514
2545
  "help.action.unfreeze": "恢复:恢复认领,智能体可以继续接取待办任务。",
2515
2546
  "help.action.add": "新建任务:添加一条带角色和文件范围的待办任务。",
2516
2547
  "help.action.plan": "给女王设目标:让女王把目标拆成任务计划,预览后再写入看板。",
2517
- "help.action.claim": "认领:以某个智能体的名义短期租下这条待办任务。",
2548
+ "help.action.claim": "认领:以某个智能体的名义接取一条待办任务,认领有效期 5 分钟。",
2518
2549
  "help.action.done": "完成:把已认领的任务标为完成,可选填写提交 SHA。",
2519
2550
  "help.action.fail": "标记失败:把已认领的任务标为失败,并写明原因。",
2520
2551
  "help.action.retry": "重试:把失败或受阻的任务放回队列。",
2521
- "help.action.remove": "永久删除这张任务卡;已认领的任务需要先释放或重开。",
2552
+ "help.action.remove": "永久删除这张任务;已认领的任务需要先释放或重开。",
2522
2553
  "plan.dialogTitle": "给女王设目标",
2523
2554
  "plan.dialogAria": "按目标规划任务",
2524
2555
  "plan.goal": "目标",
2525
2556
  "plan.goalHint": "描述想达成的结果,女王会把它拆成任务。",
2526
2557
  "plan.maxCards": "最大任务数",
2527
- "plan.maxCardsHint": "至少 1",
2558
+ "plan.maxCardsHint": "0 = 不限",
2528
2559
  "plan.preview": "预览计划",
2529
2560
  "plan.previewAria": "让女王先给出任务计划,不写入看板",
2530
2561
  "plan.previewing": "规划中…",
@@ -2544,7 +2575,7 @@ const messages = Object.freeze({
2544
2575
  "plan.deps": "依赖",
2545
2576
  "plan.none": "—",
2546
2577
  "plan.goalRequired": "请先填写目标。",
2547
- "plan.maxInvalid": "最大任务数必须是正整数。",
2578
+ "plan.maxInvalid": "最大任务数必须是 0 或更大的整数。",
2548
2579
  "plan.previewFirst": "请先预览计划,再写入任务。",
2549
2580
  "plan.previewFailed": "无法解析计划。",
2550
2581
  "plan.applyHint": "预览不会写入;写入时会带 apply=true 再调用一次 plan。",
@@ -2554,7 +2585,7 @@ const messages = Object.freeze({
2554
2585
  "toast.dismiss": "关闭",
2555
2586
  "toast.planWritten": "任务已写入",
2556
2587
  "toast.taskRemoved": "任务已删除",
2557
- "toast.pickupHint": "supervisor 会自动接卡。",
2588
+ "toast.pickupHint": "supervisor 会自动接任务。",
2558
2589
  }),
2559
2590
  });
2560
2591
 
@@ -2672,6 +2703,9 @@ function normalizeCard(task) {
2672
2703
  owner: asString(task.owner),
2673
2704
  scope: normalizeScope(task.scope),
2674
2705
  reason: asString(task.reason),
2706
+ stateChangedAt: asString(task.stateChangedAt),
2707
+ createdAt: asString(task.createdAt),
2708
+ updatedAt: asString(task.updatedAt),
2675
2709
  lastRun: normalizeLastRun(task.lastRun),
2676
2710
  };
2677
2711
  }
@@ -3543,6 +3577,7 @@ function mount(root, options = {}) {
3543
3577
  let toastNode = null;
3544
3578
  let stageFilter = "all";
3545
3579
  let stageChipEntries = [];
3580
+ const laneRenderState = new Map();
3546
3581
  let eventsExpanded = false;
3547
3582
  let initBusy = false;
3548
3583
  let initOutput = null;
@@ -3598,6 +3633,13 @@ function mount(root, options = {}) {
3598
3633
  const statsNode = element(doc, "div", "hive-stats");
3599
3634
  bar.appendChild(statsNode);
3600
3635
 
3636
+ const agentsCount = element(doc, "button", "hive-stat hive-agent-count");
3637
+ setAttr(agentsCount, "type", "button");
3638
+ agentsCount.addEventListener("click", () => {
3639
+ if (agentsCount._agent) openAgentDrawer(agentsCount._agent);
3640
+ });
3641
+ bar.appendChild(agentsCount);
3642
+
3601
3643
  const queenBadge = element(doc, "span", "hive-queen-badge is-hidden", "");
3602
3644
  bar.appendChild(queenBadge);
3603
3645
 
@@ -3705,23 +3747,8 @@ function mount(root, options = {}) {
3705
3747
  initPane.appendChild(initCard);
3706
3748
  main.appendChild(initPane);
3707
3749
 
3708
- // Agents strip.
3709
- const agentsStrip = element(doc, "section", "hive-agents-strip");
3710
- setAttr(agentsStrip, "aria-label", translate("pane.agents"));
3711
- const agentsLabel = element(doc, "span", "hive-strip-label", "");
3712
- agentsStrip.appendChild(agentsLabel);
3713
- const agentsCount = element(doc, "span", "hive-count", "0");
3714
- agentsStrip.appendChild(agentsCount);
3715
- const agentPills = element(doc, "div", "hive-agent-pills");
3716
- agentsStrip.appendChild(agentPills);
3717
-
3718
3750
  // Board pane.
3719
3751
  const boardPane = element(doc, "section", "hive-pane hive-board");
3720
- const boardHead = element(doc, "div", "hive-pane-head");
3721
- const boardLabel = element(doc, "span", null, "");
3722
- boardHead.appendChild(boardLabel);
3723
- const boardCount = element(doc, "span", "hive-count", "0");
3724
- boardHead.appendChild(boardCount);
3725
3752
  const stage = element(doc, "div", "hive-stage");
3726
3753
  const stageChips = element(doc, "div", "hive-stage-chips");
3727
3754
  setAttr(stageChips, "aria-label", translate("board.filtersAria"));
@@ -3730,7 +3757,6 @@ function mount(root, options = {}) {
3730
3757
  stage.appendChild(stageChips);
3731
3758
  stage.appendChild(filterEmpty);
3732
3759
  stage.appendChild(lanesNode);
3733
- boardPane.appendChild(boardHead);
3734
3760
  boardPane.appendChild(stage);
3735
3761
  main.appendChild(boardPane);
3736
3762
 
@@ -3757,7 +3783,6 @@ function mount(root, options = {}) {
3757
3783
  frame.appendChild(bar);
3758
3784
  frame.appendChild(freezeSlot);
3759
3785
  frame.appendChild(queenHint);
3760
- frame.appendChild(agentsStrip);
3761
3786
  frame.appendChild(main);
3762
3787
  frame.appendChild(eventsDrawer);
3763
3788
 
@@ -3848,10 +3873,7 @@ function mount(root, options = {}) {
3848
3873
  setAttr(actionsNode, "aria-label", translate("actions.aria"));
3849
3874
  setAttr(helpButton, "title", translate("menu.open"));
3850
3875
  setAttr(helpButton, "aria-label", translate("menu.open"));
3851
- setAttr(agentsStrip, "aria-label", translate("pane.agents"));
3852
3876
  setAttr(stageChips, "aria-label", translate("board.filtersAria"));
3853
- agentsLabel.textContent = translate("pane.agents");
3854
- boardLabel.textContent = translate("pane.board");
3855
3877
  eventsLabel.textContent = translate("pane.events");
3856
3878
  const eventsToggleLabel = eventsExpanded ? translate("events.collapse") : translate("events.showAll");
3857
3879
  setAttr(eventsToggle, "title", eventsToggleLabel);
@@ -4236,7 +4258,7 @@ function mount(root, options = {}) {
4236
4258
  setAttr(maxInput, "min", String(MIN_PLAN_CARDS));
4237
4259
  setAttr(maxInput, "step", "1");
4238
4260
  setAttr(maxInput, "aria-label", translate("plan.maxCards"));
4239
- maxInput.value = "8";
4261
+ maxInput.value = String(DEFAULT_PLAN_CARDS);
4240
4262
  maxField.appendChild(maxInput);
4241
4263
  maxField.appendChild(element(doc, "span", "hive-field-hint", translate("plan.maxCardsHint")));
4242
4264
  row.appendChild(maxField);
@@ -4294,7 +4316,7 @@ function mount(root, options = {}) {
4294
4316
  cards: [],
4295
4317
  previewed: false,
4296
4318
  goal: "",
4297
- maxCards: 8,
4319
+ maxCards: DEFAULT_PLAN_CARDS,
4298
4320
  token: 0,
4299
4321
  busy: false,
4300
4322
  nodes: {
@@ -4880,17 +4902,24 @@ function mount(root, options = {}) {
4880
4902
  }
4881
4903
  }
4882
4904
 
4905
+ /** Read the Max tasks field: a whole number >= 0 (0 = unlimited), or null when invalid. */
4906
+ function readPlanMaxCards(state) {
4907
+ const raw = fieldValue(state.nodes.maxCards).trim();
4908
+ const maxCards = Number(raw);
4909
+ return raw !== "" && Number.isSafeInteger(maxCards) && maxCards >= MIN_PLAN_CARDS ? maxCards : null;
4910
+ }
4911
+
4883
4912
  async function previewPlan() {
4884
4913
  const state = planState;
4885
4914
  if (!state || state.busy) return;
4886
4915
  const goal = fieldValue(state.nodes.goal).trim();
4887
- const maxCards = Number(fieldValue(state.nodes.maxCards));
4916
+ const maxCards = readPlanMaxCards(state);
4888
4917
  if (!goal) {
4889
4918
  setPlanError(state, translate("plan.goalRequired"));
4890
4919
  focusNode(state.nodes.goal);
4891
4920
  return;
4892
4921
  }
4893
- if (!Number.isInteger(maxCards) || maxCards < MIN_PLAN_CARDS) {
4922
+ if (maxCards === null) {
4894
4923
  setPlanError(state, translate("plan.maxInvalid"));
4895
4924
  focusNode(state.nodes.maxCards);
4896
4925
  return;
@@ -4933,12 +4962,12 @@ function mount(root, options = {}) {
4933
4962
  const state = planState;
4934
4963
  if (!state || state.busy) return;
4935
4964
  const goal = fieldValue(state.nodes.goal).trim();
4936
- const maxCards = Number(fieldValue(state.nodes.maxCards));
4965
+ const maxCards = readPlanMaxCards(state);
4937
4966
  if (!state.previewed || state.cards.length === 0) {
4938
4967
  setPlanError(state, translate("plan.previewFirst"));
4939
4968
  return;
4940
4969
  }
4941
- if (!Number.isInteger(maxCards) || maxCards < MIN_PLAN_CARDS) {
4970
+ if (maxCards === null) {
4942
4971
  setPlanError(state, translate("plan.maxInvalid"));
4943
4972
  return;
4944
4973
  }
@@ -5339,6 +5368,15 @@ function mount(root, options = {}) {
5339
5368
  dialog.appendChild(head);
5340
5369
 
5341
5370
  const body = element(doc, "div", "hive-dialog-body hive-card-body");
5371
+ if (Array.isArray(card.scope) && card.scope.length > 0) {
5372
+ const drawerScopes = element(doc, "div", "hive-scopes");
5373
+ for (const scope of card.scope) {
5374
+ const chip = element(doc, "span", "hive-scope", scope);
5375
+ setAttr(chip, "title", scope);
5376
+ drawerScopes.appendChild(chip);
5377
+ }
5378
+ body.appendChild(drawerScopes);
5379
+ }
5342
5380
  const runActions = [];
5343
5381
  body.appendChild(buildRunSection(card.lastRun, runActions));
5344
5382
  dialog.appendChild(body);
@@ -5940,105 +5978,51 @@ function mount(root, options = {}) {
5940
5978
  }
5941
5979
 
5942
5980
  function renderAgents(model) {
5943
- clearNode(agentPills);
5944
5981
  if (model.initialised === false) {
5945
- agentsCount.textContent = "0";
5982
+ agentsCount.className = "hive-stat hive-agent-count is-hidden";
5983
+ agentsCount.textContent = translate("pane.agents") + " 0";
5984
+ agentsCount._agent = null;
5985
+ agentsCount.disabled = true;
5946
5986
  return;
5947
5987
  }
5948
- agentsCount.textContent = String(model.agents.length);
5949
- // A failed board read must never look like an idle swarm: show the CLI
5950
- // diagnostic in the strip instead of the "no agents" empty state.
5951
- if (model.boardError) {
5952
- const error = element(
5953
- doc,
5954
- "span",
5955
- "hive-agents-error",
5956
- summarizeActionOutput(model.boardError, 400) || model.boardError,
5957
- );
5958
- setAttr(error, "title", model.boardError);
5959
- setAttr(error, "role", "status");
5960
- agentPills.appendChild(error);
5961
- }
5962
- if (model.agents.length === 0) {
5963
- if (!model.boardError) {
5964
- agentPills.appendChild(element(doc, "span", "hive-agents-empty", translate("agents.empty")));
5965
- }
5966
- return;
5967
- }
5968
- for (const agent of model.agents) {
5969
- const name = agent.agent || translate("agent.unknown");
5970
- const task = agent.task || translate("agent.idle");
5971
- const pill = element(doc, "button", "hive-agent-pill");
5972
- setAttr(pill, "type", "button");
5973
- const label =
5974
- translate("agents.openAria") +
5975
- " " +
5976
- name +
5977
- " · " +
5978
- (agent.state || translate("agent.idle")) +
5979
- " · " +
5980
- task;
5981
- setAttr(pill, "title", label);
5982
- setAttr(pill, "aria-label", label);
5983
-
5984
- pill.appendChild(element(doc, "span", "hive-agent-pill-name", name));
5985
- const dot = element(doc, "span", "hive-dot is-" + safeClassToken(agent.state));
5986
- setAttr(dot, "title", agent.state || translate("agent.idle"));
5987
- pill.appendChild(dot);
5988
- const taskNode = element(doc, "span", "hive-agent-pill-task", task);
5989
- setAttr(taskNode, "title", task);
5990
- pill.appendChild(taskNode);
5991
-
5992
- pill.addEventListener("click", () => {
5993
- openAgentDrawer(agent);
5988
+ const count = model.agents.length;
5989
+ agentsCount.className = "hive-stat hive-agent-count";
5990
+ agentsCount.textContent = translate("pane.agents") + " " + String(count);
5991
+ const first = count > 0 ? model.agents[0] : null;
5992
+ agentsCount._agent = first;
5993
+ agentsCount.disabled = !first;
5994
+ const message = first
5995
+ ? translate("agents.openAria") + " " + (first.agent || translate("agent.unknown"))
5996
+ : translate("pane.agents");
5997
+ const label = model.boardError || message;
5998
+ setAttr(agentsCount, "title", label);
5999
+ setAttr(agentsCount, "aria-label", label);
6000
+ }
6001
+
6002
+ function renderCard(card, lane, existing) {
6003
+ const node = existing || element(doc, "article", "hive-card");
6004
+ const title = card.title || translate("card.untitled");
6005
+ if (!existing) {
6006
+ setAttr(node, "tabindex", "0");
6007
+ setAttr(node, "role", "button");
6008
+ node.addEventListener("click", () => {
6009
+ if (node._hiveCard) openDrawer(node._hiveCard, node._hiveLane, node);
5994
6010
  });
5995
- agentPills.appendChild(pill);
5996
- }
5997
- }
5998
-
5999
- function renderCard(card, lane) {
6000
- const node = element(doc, "article", "hive-card");
6001
- setAttr(node, "tabindex", "0");
6002
- setAttr(node, "role", "button");
6003
- const openLabel = translate("card.openAria") + " " + (card.title || card.id || translate("card.untitled"));
6004
- setAttr(node, "aria-label", openLabel);
6005
- setAttr(node, "title", openLabel);
6006
-
6007
- node.appendChild(element(doc, "div", "hive-card-title", card.title || translate("card.untitled")));
6008
-
6009
- const meta = [];
6010
- if (card.role) meta.push(translate("card.role") + " " + card.role);
6011
- if (card.owner) meta.push(translate("card.owner") + " " + card.owner);
6012
- if (meta.length) node.appendChild(element(doc, "div", "hive-card-meta", meta.join(" · ")));
6013
-
6014
- if (card.scope.length) {
6015
- const scopes = element(doc, "div", "hive-scopes");
6016
- for (const scope of card.scope) {
6017
- const chip = element(doc, "span", "hive-scope", scope);
6018
- setAttr(chip, "title", scope);
6019
- scopes.appendChild(chip);
6020
- }
6021
- node.appendChild(scopes);
6022
- }
6023
-
6024
- if (card.reason) {
6025
- node.appendChild(element(doc, "div", "hive-reason", card.reason));
6026
- }
6027
-
6028
- const foot = element(doc, "div", "hive-card-foot");
6029
- foot.appendChild(element(doc, "span", "hive-card-id", card.id || translate("card.noId")));
6030
- foot.appendChild(element(doc, "span", "hive-card-state", laneLabel(lane)));
6031
- node.appendChild(foot);
6032
-
6033
- node.addEventListener("click", () => openDrawer(card, lane, node));
6034
- node.addEventListener("keydown", (event) => {
6035
- if (!event || (event.key !== "Enter" && event.key !== " ")) return;
6036
- if (typeof event.preventDefault === "function") event.preventDefault();
6037
- openDrawer(card, lane, node);
6038
- });
6011
+ node.addEventListener("keydown", (event) => {
6012
+ if (!event || (event.key !== "Enter" && event.key !== " ")) return;
6013
+ if (typeof event.preventDefault === "function") event.preventDefault();
6014
+ if (node._hiveCard) openDrawer(node._hiveCard, node._hiveLane, node);
6015
+ });
6016
+ node._hiveTitle = element(doc, "div", "hive-card-title", "");
6017
+ node.appendChild(node._hiveTitle);
6018
+ }
6019
+ node._hiveCard = card;
6020
+ node._hiveLane = lane;
6021
+ node._hiveTitle.textContent = title;
6022
+ setAttr(node, "aria-label", translate("card.openAria") + " " + title);
6023
+ setAttr(node, "title", title);
6039
6024
  return node;
6040
6025
  }
6041
-
6042
6026
  function renderStageChips(model) {
6043
6027
  clearNode(stageChips);
6044
6028
  setAttr(stageChips, "aria-label", translate("board.filtersAria"));
@@ -6079,34 +6063,112 @@ function mount(root, options = {}) {
6079
6063
  if (lastModel) renderLanes(lastModel);
6080
6064
  }
6081
6065
 
6066
+ function cardSortTime(card) {
6067
+ const stateChanged = parseDate(card.stateChangedAt);
6068
+ if (stateChanged) return stateChanged.getTime();
6069
+ const updated = parseDate(card.updatedAt);
6070
+ if (updated) return updated.getTime();
6071
+ const created = parseDate(card.createdAt);
6072
+ if (created) return created.getTime();
6073
+ const id = asString(card.id);
6074
+ const numeric = id.match(/(\d+)$/);
6075
+ return numeric ? Number(numeric[1]) : Number.NaN;
6076
+ }
6077
+
6078
+ function compareCardsNewestFirst(left, right) {
6079
+ const leftTime = cardSortTime(left);
6080
+ const rightTime = cardSortTime(right);
6081
+ if (Number.isFinite(leftTime) && Number.isFinite(rightTime) && leftTime !== rightTime) {
6082
+ return rightTime - leftTime;
6083
+ }
6084
+ if (Number.isFinite(leftTime) !== Number.isFinite(rightTime)) {
6085
+ return Number.isFinite(leftTime) ? -1 : 1;
6086
+ }
6087
+ return asString(right.id).localeCompare(asString(left.id));
6088
+ }
6089
+
6090
+ const LANE_ROW_HEIGHT = 28;
6091
+ const LANE_ROW_BUFFER = 10;
6092
+ const LANE_VIEWPORT_FALLBACK = 480;
6093
+
6094
+ function createLaneState(lane) {
6095
+ const column = element(doc, "section", "hive-lane hive-lane-" + lane);
6096
+ const head = element(doc, "div", "hive-lane-head");
6097
+ head.appendChild(element(doc, "span", "hive-lane-name", laneLabel(lane)));
6098
+ const count = element(doc, "span", "hive-count", "0");
6099
+ head.appendChild(count);
6100
+ column.appendChild(head);
6101
+
6102
+ const list = element(doc, "div", "hive-lane-cards");
6103
+ const inner = element(doc, "div", "hive-lane-virtual");
6104
+ list.appendChild(inner);
6105
+ column.appendChild(list);
6106
+ lanesNode.appendChild(column);
6107
+
6108
+ const state = { lane, column, list, inner, count, cards: [], visible: new Map() };
6109
+ list.addEventListener("scroll", () => renderLaneVirtual(state));
6110
+ return state;
6111
+ }
6112
+
6113
+ function renderLaneVirtual(state) {
6114
+ const cards = state.cards;
6115
+ const total = cards.length;
6116
+ const row = LANE_ROW_HEIGHT;
6117
+ const viewport =
6118
+ Number.isFinite(state.list.clientHeight) && state.list.clientHeight > 0
6119
+ ? state.list.clientHeight
6120
+ : LANE_VIEWPORT_FALLBACK;
6121
+ const scrollTop = Number(state.list.scrollTop) || 0;
6122
+ const start = Math.max(0, Math.floor(scrollTop / row) - LANE_ROW_BUFFER);
6123
+ const end = Math.min(total, Math.ceil((scrollTop + viewport) / row) + LANE_ROW_BUFFER);
6124
+ const height = total === 0 ? 0 : total * row - 2;
6125
+ setStyle(state.inner, "height", String(height) + "px");
6126
+
6127
+ const next = new Map();
6128
+ for (let index = start; index < end; index += 1) {
6129
+ const card = cards[index];
6130
+ const key = String(card.id || "idx:" + index);
6131
+ const entry = state.visible.get(key);
6132
+ const node = renderCard(card, state.lane, entry ? entry.node : null);
6133
+ setStyle(node, "top", String(index * row) + "px");
6134
+ if (!entry) state.inner.appendChild(node);
6135
+ next.set(key, { node, index });
6136
+ }
6137
+ for (const [key, entry] of state.visible) {
6138
+ if (!next.has(key) && entry.node.parentNode) entry.node.parentNode.removeChild(entry.node);
6139
+ }
6140
+ state.visible = next;
6141
+ state.count.textContent = String(total);
6142
+ }
6143
+
6082
6144
  function renderLanes(model) {
6083
- clearNode(lanesNode);
6084
6145
  if (model.initialised === false) {
6085
- boardCount.textContent = "0";
6146
+ clearNode(lanesNode);
6147
+ laneRenderState.clear();
6086
6148
  filterEmpty.textContent = "";
6087
6149
  filterEmpty.className = "hive-filter-empty";
6088
6150
  return;
6089
6151
  }
6090
- boardCount.textContent = String(model.stats.total);
6152
+ const seen = new Set();
6091
6153
  for (const lane of LANE_ORDER) {
6092
- const cards = model.lanes[lane] || [];
6154
+ const cards = [...(model.lanes[lane] || [])].sort(compareCardsNewestFirst);
6155
+ let state = laneRenderState.get(lane);
6156
+ if (!state) {
6157
+ state = createLaneState(lane);
6158
+ laneRenderState.set(lane, state);
6159
+ }
6160
+ state.cards = cards;
6093
6161
  const classes = ["hive-lane", "hive-lane-" + lane];
6094
6162
  if (cards.length === 0) classes.push("is-empty");
6095
6163
  if (stageFilter !== "all" && stageFilter !== lane) classes.push("is-filtered-out");
6096
- const column = element(doc, "section", classes.join(" "));
6097
- const head = element(doc, "div", "hive-lane-head");
6098
- head.appendChild(element(doc, "span", "hive-lane-name", laneLabel(lane)));
6099
- head.appendChild(element(doc, "span", "hive-count", String(cards.length)));
6100
- column.appendChild(head);
6101
-
6102
- const list = element(doc, "div", "hive-lane-cards");
6103
- if (cards.length === 0) {
6104
- list.appendChild(emptyState("—"));
6105
- } else {
6106
- for (const card of cards) list.appendChild(renderCard(card, lane));
6107
- }
6108
- column.appendChild(list);
6109
- lanesNode.appendChild(column);
6164
+ state.column.className = classes.join(" ");
6165
+ renderLaneVirtual(state);
6166
+ seen.add(lane);
6167
+ }
6168
+ for (const [lane, state] of laneRenderState) {
6169
+ if (seen.has(lane)) continue;
6170
+ if (state.column.parentNode) state.column.parentNode.removeChild(state.column);
6171
+ laneRenderState.delete(lane);
6110
6172
  }
6111
6173
 
6112
6174
  const visible = stageFilter === "all" ? model.lanes : { [stageFilter]: model.lanes[stageFilter] || [] };
@@ -6304,6 +6366,9 @@ function mount(root, options = {}) {
6304
6366
  unschedule(timer);
6305
6367
  timer = null;
6306
6368
  }
6369
+ if (typeof doc.removeEventListener === "function") {
6370
+ doc.removeEventListener("visibilitychange", onVisibilityChange);
6371
+ }
6307
6372
  closeHelp(false);
6308
6373
  closePlanDialog(false);
6309
6374
  closeLimitsDialog(false);
@@ -6367,9 +6432,33 @@ function mount(root, options = {}) {
6367
6432
  }
6368
6433
  }
6369
6434
 
6370
- timer = schedule(() => {
6371
- void refresh();
6372
- }, intervalMs);
6435
+ function stopPolling() {
6436
+ if (timer === null) return;
6437
+ unschedule(timer);
6438
+ timer = null;
6439
+ }
6440
+
6441
+ function startPolling() {
6442
+ if (destroyed || timer !== null || doc.hidden) return;
6443
+ timer = schedule(() => {
6444
+ void refresh();
6445
+ }, intervalMs);
6446
+ }
6447
+
6448
+ function onVisibilityChange() {
6449
+ if (destroyed) return;
6450
+ if (doc.hidden) {
6451
+ stopPolling();
6452
+ } else {
6453
+ startPolling();
6454
+ void refresh();
6455
+ }
6456
+ }
6457
+
6458
+ if (typeof doc.addEventListener === "function") {
6459
+ doc.addEventListener("visibilitychange", onVisibilityChange);
6460
+ }
6461
+ startPolling();
6373
6462
  void refresh();
6374
6463
 
6375
6464
  return { setSnapshot, destroy, refresh, rerender };
@@ -6377,7 +6466,7 @@ function mount(root, options = {}) {
6377
6466
 
6378
6467
  return { mount: mount, renderModel: renderModel, messages: messages }
6379
6468
  })()
6380
- var HIVE_PANEL_CSS = "/*\n * hive-panel-ui\n * Dark-first, host-themed through four variables:\n * --hive-bg, --hive-fg, --hive-line, --hive-accent\n * Defaults live on a zero-specificity :root rule and every rule keeps a fallback,\n * so a host can override the variables on :root, body, a wrapper, or .hive.\n */\n\n.hive,\n.hive *,\n.hive *::before,\n.hive *::after {\n box-sizing: border-box;\n}\n\n.hive {\n /* Derived helpers; the four required variables use inline fallbacks. */\n --hive-fg-soft: color-mix(in srgb, var(--hive-fg) 62%, transparent);\n --hive-fg-faint: color-mix(in srgb, var(--hive-fg) 40%, transparent);\n --hive-surface: color-mix(in srgb, var(--hive-fg) 4%, transparent);\n --hive-surface-strong: color-mix(in srgb, var(--hive-fg) 8%, transparent);\n --hive-surface-hover: color-mix(in srgb, var(--hive-fg) 11%, transparent);\n --hive-accent-soft: color-mix(in srgb, var(--hive-accent) 17%, transparent);\n --hive-mono: ui-monospace, \"SFMono-Regular\", \"JetBrains Mono\", Menlo, Consolas, monospace;\n\n display: flex;\n flex-direction: column;\n width: 100%;\n height: 100%;\n min-height: 480px;\n overflow: hidden;\n border: 1px solid var(--hive-line);\n border-radius: var(--hive-radius-lg);\n background: var(--hive-bg);\n color: var(--hive-fg);\n font: 14px/1.5 ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, \"Segoe UI\", sans-serif;\n color-scheme: light dark;\n}\n\n.hive ::selection {\n background: color-mix(in srgb, var(--hive-accent) 35%, transparent);\n}\n\n/* ------------------------------------------------------------------ top bar */\n\n.hive-bar {\n display: flex;\n flex: 0 0 auto;\n flex-wrap: wrap;\n align-items: center;\n gap: 8px 12px;\n padding: 9px 14px;\n border-bottom: 1px solid var(--hive-line);\n background: color-mix(in srgb, var(--hive-fg) 2%, transparent);\n}\n\n.hive-ident {\n display: flex;\n align-items: baseline;\n gap: 8px;\n min-width: 0;\n}\n\n.hive-brand {\n color: var(--hive-accent);\n font-size: 10px;\n font-weight: 750;\n letter-spacing: 0.18em;\n text-transform: uppercase;\n}\n\n.hive-repo {\n max-width: min(34vw, 360px);\n overflow: hidden;\n color: var(--hive-fg-soft);\n font-family: var(--hive-mono);\n font-size: 11.5px;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.hive-time {\n color: var(--hive-fg-soft);\n font-family: var(--hive-mono);\n font-size: 11px;\n font-variant-numeric: tabular-nums;\n white-space: nowrap;\n}\n\n.hive-badge {\n padding: 2px 8px;\n border: 1px solid var(--hive-line);\n border-radius: 999px;\n font-size: 10px;\n font-weight: 650;\n letter-spacing: 0.09em;\n line-height: 1.5;\n text-transform: uppercase;\n white-space: nowrap;\n}\n\n.hive-badge.is-free {\n border-color: color-mix(in srgb, var(--hive-accent) 45%, transparent);\n background: var(--hive-accent-soft);\n color: var(--hive-accent);\n}\n\n.hive-badge.is-freeze {\n border-color: color-mix(in srgb, var(--hive-warn) 45%, transparent);\n background: color-mix(in srgb, var(--hive-warn) 14%, transparent);\n color: var(--hive-warn);\n}\n\n.hive-badge.is-custom {\n color: var(--hive-fg-soft);\n}\n\n.hive-stats {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n gap: 5px;\n min-width: 0;\n}\n\n.hive-stat {\n padding: 1px 7px;\n border: 1px solid transparent;\n border-radius: var(--hive-radius-sm);\n background: var(--hive-surface);\n color: var(--hive-fg-soft);\n font-size: 10.5px;\n font-variant-numeric: tabular-nums;\n line-height: 1.7;\n white-space: nowrap;\n}\n\n.hive-stat strong {\n color: var(--hive-fg);\n font-weight: 650;\n}\n\n.hive-stat.is-total {\n color: var(--hive-fg);\n}\n\n.hive-stat.is-warn {\n color: var(--hive-warn);\n background: color-mix(in srgb, var(--hive-warn) 10%, transparent);\n}\n\n.hive-status {\n color: var(--hive-danger);\n font-size: 10px;\n font-weight: 700;\n letter-spacing: 0.09em;\n text-transform: uppercase;\n white-space: nowrap;\n}\n\n.hive-status:empty {\n display: none;\n}\n\n.hive-status::before {\n content: \"● \";\n font-size: 9px;\n}\n\n.hive-status.is-error {\n color: var(--hive-danger);\n}\n\n.hive-status.is-info {\n color: var(--hive-info);\n}\n\n.hive-actions {\n display: flex;\n flex-wrap: wrap;\n gap: 6px;\n margin-left: auto;\n}\n\n/* ------------------------------------------------------------------ buttons */\n\n.hive-btn {\n appearance: none;\n padding: 4px 10px;\n border: 1px solid var(--hive-line);\n border-radius: var(--hive-radius-md);\n background: var(--hive-surface-strong);\n color: var(--hive-fg);\n font: inherit;\n font-size: 11.5px;\n font-weight: 550;\n line-height: 1.5;\n cursor: pointer;\n transition: border-color 120ms ease, background 120ms ease, color 120ms ease;\n}\n\n.hive-btn:hover {\n border-color: color-mix(in srgb, var(--hive-accent) 55%, var(--hive-line));\n background: var(--hive-accent-soft);\n}\n\n.hive-btn:active {\n transform: translateY(1px);\n}\n\n.hive-btn:focus-visible {\n outline: 2px solid var(--hive-accent);\n outline-offset: 1px;\n}\n\n.hive-btn-ghost {\n padding: 3px 8px;\n border-color: transparent;\n background: transparent;\n color: var(--hive-fg-soft);\n font-size: 11px;\n}\n\n/* ------------------------------------------------------------------- layout */\n\n.hive-main {\n display: grid;\n flex: 1 1 auto;\n grid-template-columns: minmax(185px, 230px) minmax(0, 1fr) minmax(215px, 300px);\n min-height: 0;\n}\n\n.hive-pane {\n display: flex;\n flex-direction: column;\n min-width: 0;\n min-height: 0;\n}\n\n.hive-agents {\n border-right: 1px solid var(--hive-line);\n background: color-mix(in srgb, var(--hive-fg) 1.5%, transparent);\n}\n\n.hive-events {\n border-left: 1px solid var(--hive-line);\n background: color-mix(in srgb, var(--hive-fg) 1.5%, transparent);\n}\n\n.hive-pane-head {\n display: flex;\n flex: 0 0 auto;\n align-items: center;\n gap: 7px;\n padding: 8px 12px;\n border-bottom: 1px solid var(--hive-line);\n color: var(--hive-fg-soft);\n font-size: 10px;\n font-weight: 650;\n letter-spacing: 0.12em;\n text-transform: uppercase;\n}\n\n.hive-hint {\n color: var(--hive-fg-faint);\n font-size: 9.5px;\n font-weight: 500;\n letter-spacing: 0.04em;\n text-transform: none;\n}\n\n.hive-count {\n min-width: 18px;\n margin-left: auto;\n padding: 0 6px;\n border-radius: 999px;\n background: var(--hive-surface);\n color: var(--hive-fg-soft);\n font-family: var(--hive-mono);\n font-size: 10px;\n font-variant-numeric: tabular-nums;\n line-height: 17px;\n text-align: center;\n}\n\n.hive-scroll {\n display: flex;\n flex: 1 1 auto;\n flex-direction: column;\n gap: 7px;\n min-height: 0;\n padding: 10px;\n overflow-x: hidden;\n overflow-y: auto;\n scrollbar-color: var(--hive-line) transparent;\n scrollbar-width: thin;\n}\n\n.hive-empty {\n padding: 14px 10px;\n color: var(--hive-fg-faint);\n font-size: 11px;\n text-align: center;\n}\n\n/* ------------------------------------------------------------------- agents */\n\n.hive-agent {\n padding: 8px 10px;\n border: 1px solid var(--hive-line);\n border-radius: var(--hive-radius-md);\n background: var(--hive-surface);\n}\n\n.hive-agent-head {\n display: flex;\n align-items: center;\n gap: 7px;\n font-weight: 600;\n}\n\n.hive-agent-name {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.hive-dot {\n width: 7px;\n height: 7px;\n flex: 0 0 auto;\n border-radius: 50%;\n background: var(--hive-fg-faint);\n box-shadow: none;\n}\n\n.hive-dot.is-working {\n background: var(--hive-accent);\n box-shadow: none;\n}\n\n.hive-dot.is-idle {\n background: var(--hive-fg-faint);\n}\n\n.hive-dot.is-failed {\n background: var(--hive-danger);\n}\n\n.hive-dot.is-done {\n background: var(--hive-ok);\n}\n\n.hive-meta {\n margin-top: 3px;\n overflow: hidden;\n color: var(--hive-fg-soft);\n font-size: 10.5px;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.hive-agent-files {\n color: var(--hive-fg-faint);\n font-family: var(--hive-mono);\n}\n\n/* -------------------------------------------------------------------- lanes */\n\n.hive-board { background: var(--hive-bg); }\n\n.hive-lanes {\n display: flex;\n flex: 1 1 auto;\n align-items: stretch;\n gap: 9px;\n min-height: 0;\n padding: 10px;\n overflow-x: auto;\n overflow-y: hidden;\n scrollbar-color: var(--hive-line) transparent;\n scrollbar-width: thin;\n}\n\n.hive-lane {\n display: flex;\n flex: 0 0 232px;\n flex-direction: column;\n min-height: 0;\n overflow: hidden;\n border: 1px solid var(--hive-line);\n border-radius: var(--hive-radius-md);\n background: color-mix(in srgb, var(--hive-fg) 2%, transparent);\n}\n\n.hive-lane-head {\n display: flex;\n flex: 0 0 auto;\n align-items: center;\n gap: 7px;\n padding: 8px 10px;\n border-bottom: 1px solid var(--hive-line);\n color: var(--hive-fg-soft);\n font-size: 10px;\n font-weight: 700;\n letter-spacing: 0.1em;\n text-transform: uppercase;\n}\n\n.hive-lane-head::before {\n width: 3px;\n height: 10px;\n border-radius: var(--hive-radius-sm);\n background: var(--hive-fg-faint);\n content: \"\";\n}\n\n.hive-lane-name {\n color: var(--hive-fg);\n}\n\n.hive-lane-pending .hive-lane-head::before {\n background: var(--hive-accent);\n}\n\n.hive-lane-claimed .hive-lane-head::before {\n background: var(--hive-info);\n}\n\n.hive-lane-done .hive-lane-head::before {\n background: var(--hive-ok);\n}\n\n.hive-lane-failed .hive-lane-head::before {\n background: var(--hive-danger);\n}\n\n.hive-lane-cards {\n display: flex;\n flex: 1 1 auto;\n flex-direction: column;\n gap: 7px;\n min-height: 0;\n padding: 7px;\n overflow-x: hidden;\n overflow-y: auto;\n scrollbar-color: var(--hive-line) transparent;\n scrollbar-width: thin;\n}\n\n.hive-card {\n padding: 8px 9px;\n border: 1px solid var(--hive-line);\n border-radius: var(--hive-radius-md);\n background: var(--hive-surface);\n cursor: pointer;\n transition: border-color 120ms ease, background 120ms ease;\n}\n\n.hive-card:hover {\n border-color: color-mix(in srgb, var(--hive-accent) 55%, var(--hive-line));\n background: var(--hive-surface-hover);\n}\n\n.hive-card:focus-visible {\n outline: 2px solid var(--hive-accent);\n outline-offset: 1px;\n}\n\n.hive-card-title {\n overflow-wrap: anywhere;\n font-size: 12.5px;\n font-weight: 600;\n line-height: 1.35;\n}\n\n.hive-card-meta {\n margin-top: 4px;\n color: var(--hive-fg-soft);\n font-size: 10.5px;\n}\n\n.hive-scopes {\n display: flex;\n flex-wrap: wrap;\n gap: 3px;\n margin-top: 6px;\n}\n\n.hive-scope {\n max-width: 100%;\n overflow: hidden;\n padding: 1px 5px;\n border: 1px solid var(--hive-line);\n border-radius: var(--hive-radius-sm);\n background: var(--hive-surface-strong);\n color: var(--hive-fg-soft);\n font-family: var(--hive-mono);\n font-size: 9.5px;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.hive-reason {\n margin-top: 6px;\n padding: 3px 6px;\n overflow-wrap: anywhere;\n border-left: 1px solid var(--hive-danger);\n border-radius: 0 var(--hive-radius-sm) var(--hive-radius-sm) 0;\n background: color-mix(in srgb, var(--hive-danger) 10%, transparent);\n color: color-mix(in srgb, var(--hive-danger) 82%, var(--hive-fg));\n font-size: 10.5px;\n}\n\n.hive-card-foot {\n display: flex;\n justify-content: space-between;\n gap: 6px;\n margin-top: 7px;\n color: var(--hive-fg-faint);\n font-family: var(--hive-mono);\n font-size: 9.5px;\n}\n\n.hive-card-id,\n.hive-card-state {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.hive-card-state {\n text-transform: uppercase;\n}\n\n/* ------------------------------------------------------------------- events */\n\n.hive-event {\n display: grid;\n grid-template-columns: auto minmax(0, 1fr);\n gap: 2px 7px;\n padding: 6px 7px;\n border: 1px solid transparent;\n border-radius: var(--hive-radius-sm);\n background: var(--hive-surface);\n font-size: 10.5px;\n}\n\n.hive-event-time {\n color: var(--hive-fg-faint);\n font-family: var(--hive-mono);\n font-variant-numeric: tabular-nums;\n white-space: nowrap;\n}\n\n.hive-event-kind {\n justify-self: start;\n overflow: hidden;\n color: var(--hive-accent);\n font-weight: 600;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.hive-event-text {\n grid-column: 1 / -1;\n overflow-wrap: anywhere;\n color: var(--hive-fg-soft);\n font-family: var(--hive-mono);\n font-size: 10px;\n}\n\n/* ------------------------------------------------------------------- drawer */\n\n.hive-drawer {\n position: fixed;\n z-index: 2147483000;\n top: 0;\n right: 0;\n bottom: 0;\n display: flex;\n flex-direction: column;\n width: min(440px, 92vw);\n border-left: 1px solid var(--hive-line);\n background: color-mix(in srgb, var(--hive-bg) 97%, var(--hive-fg) 3%);\n color: var(--hive-fg);\n box-shadow: none;\n font: 14px/1.5 ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, \"Segoe UI\", sans-serif;\n color-scheme: light dark;\n animation: hive-drawer-in 150ms ease-out;\n}\n\n.hive-drawer-head {\n display: flex;\n align-items: flex-start;\n gap: 10px;\n padding: 14px;\n border-bottom: 1px solid var(--hive-line);\n}\n\n.hive-drawer-titlebox {\n min-width: 0;\n}\n\n.hive-drawer-eyebrow {\n overflow: hidden;\n color: var(--hive-fg-faint);\n font-family: var(--hive-mono);\n font-size: 9.5px;\n letter-spacing: 0.05em;\n text-overflow: ellipsis;\n text-transform: uppercase;\n white-space: nowrap;\n}\n\n.hive-drawer-title {\n margin: 3px 0 0;\n overflow-wrap: anywhere;\n color: var(--hive-fg);\n font-size: 15px;\n font-weight: 650;\n line-height: 1.35;\n}\n\n.hive-drawer-head .hive-btn-ghost {\n flex: 0 0 auto;\n margin-left: auto;\n}\n\n.hive-drawer-body {\n display: flex;\n flex: 1 1 auto;\n flex-direction: column;\n gap: 10px;\n min-height: 0;\n padding: 14px;\n overflow-y: auto;\n scrollbar-color: var(--hive-line) transparent;\n scrollbar-width: thin;\n}\n\n.hive-actions-row {\n display: flex;\n flex-wrap: wrap;\n gap: 6px;\n}\n\n.hive-note {\n color: var(--hive-fg-faint);\n font-size: 11px;\n}\n\n.hive-section-label {\n margin-top: 2px;\n color: var(--hive-fg-faint);\n font-size: 9.5px;\n font-weight: 650;\n letter-spacing: 0.1em;\n text-transform: uppercase;\n}\n\n.hive-json {\n max-height: 55vh;\n margin: 0;\n padding: 10px;\n overflow: auto;\n border: 1px solid var(--hive-line);\n border-radius: var(--hive-radius-md);\n background: color-mix(in srgb, var(--hive-fg) 3%, transparent);\n color: var(--hive-fg-soft);\n font-family: var(--hive-mono);\n font-size: 10.5px;\n line-height: 1.55;\n overflow-wrap: anywhere;\n scrollbar-color: var(--hive-line) transparent;\n scrollbar-width: thin;\n white-space: pre-wrap;\n}\n\n@keyframes hive-drawer-in {\n from {\n opacity: 0;\n transform: translateX(18px);\n }\n to {\n opacity: 1;\n transform: translateX(0);\n }\n}\n\n@media (prefers-reduced-motion: reduce) {\n .hive-card,\n .hive-btn {\n transition: none;\n }\n\n .hive-drawer {\n animation: none;\n }\n}\n\n/* ------------------------------------------------------------------ compact */\n\n@media (max-width: 920px) {\n .hive {\n min-height: 100dvh;\n height: 100dvh;\n border-radius: 0;\n }\n\n .hive-main {\n grid-template-columns: minmax(0, 1fr);\n grid-template-rows: minmax(110px, 17vh) minmax(280px, 1fr) minmax(120px, 20vh);\n }\n\n .hive-agents {\n border-right: 0;\n border-bottom: 1px solid var(--hive-line);\n }\n\n .hive-events {\n border-top: 1px solid var(--hive-line);\n border-left: 0;\n }\n\n .hive-agent-list {\n flex-direction: row;\n overflow-x: auto;\n overflow-y: hidden;\n }\n\n .hive-agent {\n flex: 0 0 190px;\n }\n\n .hive-drawer {\n width: 100vw;\n }\n}\n/* DSH design-token bridge. Neutral grayscale fallbacks keep standalone pages readable. */\n.hive, .hive-portal, .hive-dialog {\n --hive-bg: var(--dsw-alias-bg-base, #fff);\n --hive-bg-layer-1: var(--dsw-alias-bg-layer-1, #fff);\n --hive-bg-layer-2: var(--dsw-alias-bg-layer-2, #fff);\n --hive-bg-layer-3: var(--dsw-alias-bg-layer-3, #f5f5f5);\n --hive-line: var(--dsw-alias-border-l1, #d9d9d9);\n --hive-line-2: var(--dsw-alias-border-l2, #e8e8e8);\n --hive-fg: var(--dsw-alias-label-primary, #000);\n --hive-fg-soft: var(--dsw-alias-label-secondary, #4d4d4d);\n --hive-fg-faint: var(--dsw-alias-label-tertiary, #808080);\n --hive-accent: var(--dsw-alias-brand-primary, #000);\n --hive-hover: var(--dsw-alias-interactive-bg-hover, #f2f2f2);\n --hive-selected: var(--dsw-alias-border-selected, #000);\n --hive-danger: var(--dsw-alias-state-error-primary, #000);\n --hive-ok: var(--dsw-alias-state-success-primary, #000);\n --hive-warn: var(--dsw-alias-state-warn-primary, #000);\n --hive-info: var(--dsw-alias-brand-primary, #000);\n --hive-radius-sm: var(--dsw-radius-sm, 4px);\n --hive-radius-md: var(--dsw-radius-md, 8px);\n --hive-radius-lg: var(--dsw-radius-lg, 12px);\n --hive-elevation: var(--dsw-elevation-panel, 0 12px 32px rgba(0, 0, 0, 0.18));\n --hive-surface: var(--hive-bg-layer-1);\n --hive-surface-strong: var(--hive-bg-layer-2);\n --hive-surface-hover: var(--hive-hover);\n --hive-accent-soft: color-mix(in srgb, var(--hive-accent) 14%, transparent);\n --hive-label-on-brand: var(--hive-bg);\n --hive-mono: ui-monospace, \"SFMono-Regular\", \"JetBrains Mono\", Menlo, Consolas, monospace;\n}\n\n/* Tokenized component treatment. */\n.hive { background: var(--hive-bg); color: var(--hive-fg); border-color: var(--hive-line); border-radius: var(--hive-radius-lg); }\n.hive-bar { background: var(--hive-bg-layer-1); border-bottom-color: var(--hive-line); gap: 8px; }\n.hive-main,\n.hive-board { background: var(--hive-bg); }\n.hive-agents,\n.hive-events { background: var(--hive-bg-layer-1); border-color: var(--hive-line); }\n.hive-lane { background: var(--hive-bg-layer-1); border-color: var(--hive-line); border-radius: var(--hive-radius-md); }\n.hive-card { background: var(--hive-bg-layer-1); border: 1px solid var(--hive-line); border-radius: var(--hive-radius-md); box-shadow: none; }\n.hive-card:hover { background: var(--hive-hover); border-color: var(--hive-line); }\n.hive-btn { background: transparent; border: 1px solid var(--hive-line); color: var(--hive-fg); border-radius: var(--hive-radius-md); }\n.hive-btn:hover { background: var(--hive-hover); border-color: var(--hive-line); color: var(--hive-fg); }\n.hive-btn-ghost { background: transparent; border-color: transparent; color: var(--hive-fg-soft); }\n.hive-btn-ghost:hover { background: var(--hive-hover); border-color: transparent; color: var(--hive-fg); }\n.hive-btn-danger { background: transparent; border-color: var(--hive-danger); color: var(--hive-danger); }\n.hive-btn-danger:hover:not(:disabled) { background: var(--hive-hover); border-color: var(--hive-danger); color: var(--hive-danger); }\n.hive-settings-primary,\n.hive-add-submit { background: var(--hive-accent); border-color: var(--hive-accent); color: var(--hive-label-on-brand); }\n.hive-settings-primary:hover:not(:disabled),\n.hive-add-submit:hover:not(:disabled) { background: var(--hive-accent); border-color: var(--hive-accent); color: var(--hive-label-on-brand); }\n.hive-settings-secondary { background: transparent; border-color: var(--hive-line); color: var(--hive-fg); }\n.hive-settings-secondary:hover { background: var(--hive-hover); border-color: var(--hive-line); color: var(--hive-fg); }\n.hive-input,\n.hive-textarea,\n.hive-limits-input { background: var(--hive-bg-layer-1); border: 1px solid var(--hive-line); color: var(--hive-fg); border-radius: var(--hive-radius-sm); }\n.hive-input:focus,\n.hive-textarea:focus,\n.hive-limits-input:focus { outline: 1px solid var(--hive-selected); outline-offset: 0; }\n.hive-dialog,\n.hive-add-dialog,\n.hive-settings-dialog,\n.hive-card-dialog { background: var(--hive-bg-layer-2); border: 1px solid var(--hive-line); border-radius: var(--hive-radius-lg); box-shadow: var(--hive-elevation); color: var(--hive-fg); }\n.hive-toast { background: var(--hive-bg-layer-2); border: 1px solid var(--hive-line); border-radius: var(--hive-radius-lg); box-shadow: none; color: var(--hive-fg); }\n.hive-drawer { background: var(--hive-bg-layer-2); border-left: 1px solid var(--hive-line); box-shadow: none; }\n.hive-json,\n.hive-plan-raw,\n.hive-plan-item,\n.hive-scope,\n.hive-init-card,\n.hive-limits-error,\n.hive-settings-note { background: var(--hive-bg-layer-1); border-color: var(--hive-line); border-radius: var(--hive-radius-sm); }\n.hive-limits-row { border-top-color: var(--hive-line-2); }\n.hive-limits-row:not(.is-head):hover { background: var(--hive-hover); }\n.hive-settings-tab[aria-selected=\"true\"] { border-bottom-color: var(--hive-selected); }\n.hive-lane-head,\n.hive-dialog-head,\n.hive-dialog-foot,\n.hive-drawer-head,\n.hive-settings-tabs { border-color: var(--hive-line-2); }\n.hive-freeze-banner { background: transparent; border-bottom-color: var(--hive-warn); color: var(--hive-warn); }\n.hive-freeze-banner .hive-btn { background: transparent; border-color: var(--hive-line); color: var(--hive-fg); }\n.hive-queen-hint { background: var(--hive-bg-layer-1); border-color: var(--hive-line); }\n.hive-supervisor-inline,\n.hive-stat,\n.hive-status,\n.hive-queen-badge {\n display: inline-flex;\n align-items: center;\n gap: 6px;\n height: 22px;\n padding: 0 8px;\n border: 1px solid var(--hive-line);\n border-radius: 999px;\n background: transparent;\n color: var(--hive-fg-soft);\n font-size: 12px;\n font-weight: 400;\n line-height: 1;\n white-space: nowrap;\n}\n.hive-supervisor-inline { gap: 6px; }\n.hive-supervisor-inline-label { color: var(--hive-fg-soft); font-weight: 400; }\n.hive-supervisor-inline-state { display: inline-flex; align-items: center; gap: 6px; color: var(--hive-fg-soft); font-size: 12px; font-weight: 400; }\n.hive-supervisor-inline-state::before { width: 6px; height: 6px; flex: 0 0 6px; border-radius: 50%; background: var(--hive-fg-faint); content: \"\"; }\n.hive-supervisor-inline-state.is-running::before { background: var(--hive-accent); }\n.hive-supervisor-inline-state.is-backoff::before { background: var(--hive-warn); }\n.hive-supervisor-inline-state.is-paused::before { background: var(--hive-fg-faint); }\n.hive-supervisor-inline-resume { height: auto; min-height: 0; padding: 0; border: 0; background: transparent; color: var(--hive-fg-soft); font-size: 12px; line-height: 1; }\n.hive-supervisor-inline-resume:hover { background: transparent; color: var(--hive-fg); }\n.hive-stats { flex-wrap: wrap; gap: 8px; }\n.hive-stat.is-warn { color: var(--hive-fg-soft); background: transparent; }\n.hive-stat strong { color: var(--hive-fg-soft); font-weight: 400; }\n.hive-status { color: var(--hive-fg-soft); }\n.hive-status::before { width: 6px; height: 6px; flex: 0 0 6px; border-radius: 50%; background: var(--hive-danger); content: \"\"; font-size: 0; }\n.hive-status.is-info::before { background: var(--hive-accent); }\n.hive-queen-badge { color: var(--hive-fg-soft); }\n\n\n.hive-portal {\n position: fixed;\n inset: 0;\n z-index: 2147483600;\n pointer-events: none;\n}\n\n.hive-portal > .hive-overlay { pointer-events: auto; }\n\n/* Buttons: two explicit tiers. */\n.hive-btn {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n gap: 6px;\n height: 28px;\n padding: 0 12px;\n border: 1px solid var(--hive-line-2);\n border-radius: var(--hive-radius-md);\n background: transparent;\n color: var(--hive-fg);\n font-size: 14px;\n font-weight: 600;\n line-height: 1.5;\n}\n\n.hive-btn:hover {\n border-color: var(--hive-line-2);\n background: var(--hive-hover);\n color: var(--hive-fg);\n}\n\n.hive-btn-ghost {\n border-color: transparent;\n background: transparent;\n color: var(--hive-fg-soft);\n}\n\n.hive-btn-ghost:hover {\n border-color: transparent;\n background: var(--hive-hover);\n color: var(--hive-fg);\n}\n\n.hive-btn-danger {\n border-color: var(--hive-danger);\n background: transparent;\n color: var(--hive-danger);\n}\n\n.hive-btn-danger:hover:not(:disabled) {\n border-color: var(--hive-danger);\n background: var(--hive-hover);\n color: var(--hive-danger);\n}\n\n.hive-settings-primary,\n.hive-add-submit {\n border-color: var(--hive-accent);\n background: var(--hive-accent);\n color: var(--hive-label-on-brand);\n font-weight: 600;\n}\n\n.hive-settings-primary:hover:not(:disabled),\n.hive-add-submit:hover:not(:disabled) {\n border-color: var(--hive-accent);\n background: color-mix(in srgb, var(--hive-accent) 92%, #000);\n color: var(--hive-label-on-brand);\n}\n\n.hive-settings-primary:active:not(:disabled),\n.hive-add-submit:active:not(:disabled) {\n border-color: var(--hive-accent);\n background: color-mix(in srgb, var(--hive-accent) 84%, #000);\n color: var(--hive-label-on-brand);\n}\n\n.hive-settings-primary:focus-visible,\n.hive-add-submit:focus-visible {\n outline: 2px solid var(--hive-accent);\n outline-offset: 2px;\n}\n\n.hive-settings-secondary {\n border-color: var(--hive-line-2);\n background: transparent;\n color: var(--hive-fg);\n}\n\n.hive-settings-secondary:hover {\n border-color: var(--hive-line-2);\n background: var(--hive-hover);\n color: var(--hive-fg);\n}\n\n.hive-icon-button,\n.hive-dialog-close {\n height: 28px;\n padding: 0;\n border: 0;\n background: transparent;\n color: var(--hive-fg-soft);\n}\n\n.hive-icon-button:hover,\n.hive-dialog-close:hover {\n border: 0;\n background: var(--hive-hover);\n color: var(--hive-fg);\n}\n\n.hive-role-remove {\n height: 28px;\n min-height: 28px;\n padding: 0;\n border-color: transparent;\n background: transparent;\n color: var(--hive-danger);\n}\n\n/* Dialogs are portaled to the document body; keep them above the panel. */\n.hive-dialog,\n.hive-add-dialog,\n.hive-settings-dialog,\n.hive-card-dialog {\n border: 1px solid var(--hive-line);\n background: var(--hive-bg-layer-2);\n box-shadow: var(--dsw-elevation-panel, 0 12px 32px rgba(0, 0, 0, 0.18));\n}\n\n/* toolbar action rhythm */\n.hive-actions { gap: 8px; }\n.hive-actions > .hive-btn { display: inline-flex; align-items: center; gap: 6px; flex: 0 0 auto; }\n\n/* Dialog form containment: portal content must not create horizontal scroll. */\n.hive-portal,\n.hive-portal *,\n.hive-portal *::before,\n.hive-portal *::after { box-sizing: border-box; }\n\n.hive-portal .hive-dialog { max-width: 92vw; overflow-x: hidden; }\n.hive-portal .hive-dialog-head,\n.hive-portal .hive-dialog-body,\n.hive-portal .hive-dialog-foot { padding-left: 16px; padding-right: 16px; }\n.hive-portal .hive-dialog-body { width: auto; min-width: 0; max-width: 100%; }\n.hive-portal .hive-dialog-body > * { margin-left: 0; margin-right: 0; max-width: 100%; min-width: 0; }\n.hive-portal .hive-field,\n.hive-portal .hive-field-row,\n.hive-portal .hive-settings-section,\n.hive-portal .hive-settings-tabpanel,\n.hive-portal .hive-limits-table { width: 100%; max-width: 100%; min-width: 0; margin-left: 0; margin-right: 0; }\n.hive-portal .hive-field-row > .hive-field { width: auto; flex: 1 1 160px; }\n.hive-portal .hive-input,\n.hive-portal .hive-textarea,\n.hive-portal select { width: 100%; min-width: 0; max-width: 100%; }\n.hive-portal .hive-limits-row {\n width: 100%;\n max-width: 100%;\n min-width: 0;\n grid-template-columns: minmax(0, 1fr) 96px 48px 48px 28px;\n}\n.hive-portal .hive-limits-cell,\n.hive-portal .hive-limits-role,\n.hive-portal .hive-dialog-title,\n.hive-portal .hive-card-subline,\n.hive-portal .hive-settings-role-name { min-width: 0; overflow-wrap: anywhere; }\n.hive-portal .hive-dialog-foot { flex-wrap: wrap; }\n\n.hive-portal .hive-dialog-body { overflow-x: hidden; }\n.hive-portal .hive-settings-tabs { flex-wrap: wrap; }\n.hive-portal .hive-card-actions,\n.hive-portal .hive-settings-form-actions { max-width: 100%; }\n\n/* Native <dialog>: top layer, browser-managed backdrop and focus trap. */\n.hive-dialog,\n.hive-dialog *,\n.hive-dialog *::before,\n.hive-dialog *::after { box-sizing: border-box; }\n\ndialog.hive-dialog {\n position: fixed;\n inset: 0;\n margin: auto;\n padding: 0;\n width: min(560px, 100%);\n max-width: 92vw;\n max-height: 80vh;\n overflow: hidden;\n border: 1px solid var(--hive-line);\n border-radius: var(--hive-radius-lg);\n background: var(--hive-bg-layer-2);\n color: var(--hive-fg);\n box-shadow: var(--dsw-elevation-panel, 0 12px 32px rgba(0, 0, 0, 0.18));\n color-scheme: light dark;\n}\n\ndialog.hive-card-dialog { width: min(720px, 92vw); }\n\ndialog.hive-dialog::backdrop {\n background: var(--dsw-alias-bg-mask-1, rgba(0, 0, 0, 0.24));\n backdrop-filter: var(--dsw-mask-blur, none);\n}\n\ndialog.hive-dialog .hive-dialog-head,\ndialog.hive-dialog .hive-dialog-body,\ndialog.hive-dialog .hive-dialog-foot { padding-left: 16px; padding-right: 16px; }\ndialog.hive-dialog .hive-dialog-body { width: auto; min-width: 0; max-width: 100%; overflow-x: hidden; }\ndialog.hive-dialog .hive-dialog-body > * { margin-left: 0; margin-right: 0; max-width: 100%; min-width: 0; }\ndialog.hive-dialog .hive-field,\ndialog.hive-dialog .hive-field-row,\ndialog.hive-dialog .hive-settings-section,\ndialog.hive-dialog .hive-settings-tabpanel,\ndialog.hive-dialog .hive-limits-table { width: 100%; max-width: 100%; min-width: 0; margin-left: 0; margin-right: 0; }\ndialog.hive-dialog .hive-field-row > .hive-field { width: auto; flex: 1 1 160px; }\ndialog.hive-dialog .hive-input,\ndialog.hive-dialog .hive-textarea,\ndialog.hive-dialog select { width: 100%; min-width: 0; max-width: 100%; }\ndialog.hive-dialog .hive-limits-row {\n width: 100%;\n max-width: 100%;\n min-width: 0;\n grid-template-columns: minmax(0, 1fr) 96px 48px 48px 28px;\n}\ndialog.hive-dialog .hive-limits-cell,\ndialog.hive-dialog .hive-limits-role,\ndialog.hive-dialog .hive-dialog-title,\ndialog.hive-dialog .hive-card-subline,\ndialog.hive-dialog .hive-settings-role-name { min-width: 0; overflow-wrap: anywhere; }\ndialog.hive-dialog .hive-dialog-foot { flex-wrap: wrap; }\n\ndialog.hive-dialog {\n display: flex;\n flex-direction: column;\n max-height: 80vh;\n}\ndialog.hive-dialog .hive-dialog-head,\ndialog.hive-dialog .hive-dialog-foot { flex: 0 0 auto; }\ndialog.hive-dialog .hive-dialog-body { flex: 1 1 auto; min-height: 0; overflow: auto; }\n.hive-card-run-output { max-height: 20lh; overflow: auto; }\n.hive-card-actions { flex-wrap: wrap; justify-content: flex-end; }\n\n\n/* The DSH design-token bridge is bundled in panel.css; this file is kept for package layout compatibility. */\n"
6469
+ var HIVE_PANEL_CSS = "/*\n * hive-panel-ui\n * Dark-first, host-themed through four variables:\n * --hive-bg, --hive-fg, --hive-line, --hive-accent\n * Defaults live on a zero-specificity :root rule and every rule keeps a fallback,\n * so a host can override the variables on :root, body, a wrapper, or .hive.\n */\n\n.hive,\n.hive *,\n.hive *::before,\n.hive *::after {\n box-sizing: border-box;\n}\n\n.hive {\n /* Derived helpers; the four required variables use inline fallbacks. */\n --hive-fg-soft: color-mix(in srgb, var(--hive-fg) 62%, transparent);\n --hive-fg-faint: color-mix(in srgb, var(--hive-fg) 40%, transparent);\n --hive-surface: color-mix(in srgb, var(--hive-fg) 4%, transparent);\n --hive-surface-strong: color-mix(in srgb, var(--hive-fg) 8%, transparent);\n --hive-surface-hover: color-mix(in srgb, var(--hive-fg) 11%, transparent);\n --hive-accent-soft: color-mix(in srgb, var(--hive-accent) 17%, transparent);\n --hive-mono: ui-monospace, \"SFMono-Regular\", \"JetBrains Mono\", Menlo, Consolas, monospace;\n\n display: flex;\n flex-direction: column;\n width: 100%;\n height: 100%;\n min-height: 480px;\n overflow: hidden;\n border: 1px solid var(--hive-line);\n border-radius: var(--hive-radius-lg);\n background: var(--hive-bg);\n color: var(--hive-fg);\n font: 14px/1.5 ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, \"Segoe UI\", sans-serif;\n color-scheme: light dark;\n}\n\n.hive ::selection {\n background: color-mix(in srgb, var(--hive-accent) 35%, transparent);\n}\n\n/* ------------------------------------------------------------------ top bar */\n\n.hive-bar {\n display: flex;\n flex: 0 0 auto;\n flex-wrap: wrap;\n align-items: center;\n gap: 8px 12px;\n padding: 9px 14px;\n border-bottom: 1px solid var(--hive-line);\n background: color-mix(in srgb, var(--hive-fg) 2%, transparent);\n}\n\n.hive-ident {\n display: flex;\n align-items: baseline;\n gap: 8px;\n min-width: 0;\n}\n\n.hive-brand {\n color: var(--hive-accent);\n font-size: 10px;\n font-weight: 750;\n letter-spacing: 0.18em;\n text-transform: uppercase;\n}\n\n.hive-repo {\n max-width: min(34vw, 360px);\n overflow: hidden;\n color: var(--hive-fg-soft);\n font-family: var(--hive-mono);\n font-size: 11.5px;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.hive-time {\n color: var(--hive-fg-soft);\n font-family: var(--hive-mono);\n font-size: 11px;\n font-variant-numeric: tabular-nums;\n white-space: nowrap;\n}\n\n.hive-badge {\n padding: 2px 8px;\n border: 1px solid var(--hive-line);\n border-radius: 999px;\n font-size: 10px;\n font-weight: 650;\n letter-spacing: 0.09em;\n line-height: 1.5;\n text-transform: uppercase;\n white-space: nowrap;\n}\n\n.hive-badge.is-free {\n border-color: color-mix(in srgb, var(--hive-accent) 45%, transparent);\n background: var(--hive-accent-soft);\n color: var(--hive-accent);\n}\n\n.hive-badge.is-freeze {\n border-color: color-mix(in srgb, var(--hive-warn) 45%, transparent);\n background: color-mix(in srgb, var(--hive-warn) 14%, transparent);\n color: var(--hive-warn);\n}\n\n.hive-badge.is-custom {\n color: var(--hive-fg-soft);\n}\n\n.hive-stats {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n gap: 5px;\n min-width: 0;\n}\n\n.hive-stat {\n padding: 1px 7px;\n border: 1px solid transparent;\n border-radius: var(--hive-radius-sm);\n background: var(--hive-surface);\n color: var(--hive-fg-soft);\n font-size: 10.5px;\n font-variant-numeric: tabular-nums;\n line-height: 1.7;\n white-space: nowrap;\n}\n\n.hive-stat strong {\n color: var(--hive-fg);\n font-weight: 650;\n}\n\n.hive-stat.is-total {\n color: var(--hive-fg);\n}\n\n.hive-stat.is-warn {\n color: var(--hive-warn);\n background: color-mix(in srgb, var(--hive-warn) 10%, transparent);\n}\n\n.hive-status {\n color: var(--hive-danger);\n font-size: 10px;\n font-weight: 700;\n letter-spacing: 0.09em;\n text-transform: uppercase;\n white-space: nowrap;\n}\n\n.hive-status:empty {\n display: none;\n}\n\n.hive-status::before {\n content: \"● \";\n font-size: 9px;\n}\n\n.hive-status.is-error {\n color: var(--hive-danger);\n}\n\n.hive-status.is-info {\n color: var(--hive-info);\n}\n\n.hive-actions {\n display: flex;\n flex-wrap: wrap;\n gap: 6px;\n margin-left: auto;\n}\n\n/* ------------------------------------------------------------------ buttons */\n\n.hive-btn {\n appearance: none;\n padding: 4px 10px;\n border: 1px solid var(--hive-line);\n border-radius: var(--hive-radius-md);\n background: var(--hive-surface-strong);\n color: var(--hive-fg);\n font: inherit;\n font-size: 11.5px;\n font-weight: 550;\n line-height: 1.5;\n cursor: pointer;\n transition: border-color 120ms ease, background 120ms ease, color 120ms ease;\n}\n\n.hive-btn:hover {\n border-color: color-mix(in srgb, var(--hive-accent) 55%, var(--hive-line));\n background: var(--hive-accent-soft);\n}\n\n.hive-btn:active {\n transform: translateY(1px);\n}\n\n.hive-btn:focus-visible {\n outline: 2px solid var(--hive-accent);\n outline-offset: 1px;\n}\n\n.hive-btn-ghost {\n padding: 3px 8px;\n border-color: transparent;\n background: transparent;\n color: var(--hive-fg-soft);\n font-size: 11px;\n}\n\n/* ------------------------------------------------------------------- layout */\n\n.hive-main {\n display: grid;\n flex: 1 1 auto;\n grid-template-columns: minmax(185px, 230px) minmax(0, 1fr) minmax(215px, 300px);\n min-height: 0;\n}\n\n.hive-pane {\n display: flex;\n flex-direction: column;\n min-width: 0;\n min-height: 0;\n}\n\n.hive-agents {\n border-right: 1px solid var(--hive-line);\n background: color-mix(in srgb, var(--hive-fg) 1.5%, transparent);\n}\n\n.hive-events {\n border-left: 1px solid var(--hive-line);\n background: color-mix(in srgb, var(--hive-fg) 1.5%, transparent);\n}\n\n.hive-pane-head {\n display: flex;\n flex: 0 0 auto;\n align-items: center;\n gap: 7px;\n padding: 8px 12px;\n border-bottom: 1px solid var(--hive-line);\n color: var(--hive-fg-soft);\n font-size: 10px;\n font-weight: 650;\n letter-spacing: 0.12em;\n text-transform: uppercase;\n}\n\n.hive-hint {\n color: var(--hive-fg-faint);\n font-size: 9.5px;\n font-weight: 500;\n letter-spacing: 0.04em;\n text-transform: none;\n}\n\n.hive-count {\n min-width: 18px;\n margin-left: auto;\n padding: 0 6px;\n border-radius: 999px;\n background: var(--hive-surface);\n color: var(--hive-fg-soft);\n font-family: var(--hive-mono);\n font-size: 10px;\n font-variant-numeric: tabular-nums;\n line-height: 17px;\n text-align: center;\n}\n\n.hive-scroll {\n display: flex;\n flex: 1 1 auto;\n flex-direction: column;\n gap: 7px;\n min-height: 0;\n padding: 10px;\n overflow-x: hidden;\n overflow-y: auto;\n scrollbar-color: var(--hive-line) transparent;\n scrollbar-width: thin;\n}\n\n.hive-empty {\n padding: 14px 10px;\n color: var(--hive-fg-faint);\n font-size: 11px;\n text-align: center;\n}\n\n/* ------------------------------------------------------------------- agents */\n\n.hive-agent {\n padding: 8px 10px;\n border: 1px solid var(--hive-line);\n border-radius: var(--hive-radius-md);\n background: var(--hive-surface);\n}\n\n.hive-agent-head {\n display: flex;\n align-items: center;\n gap: 7px;\n font-weight: 600;\n}\n\n.hive-agent-name {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.hive-dot {\n width: 7px;\n height: 7px;\n flex: 0 0 auto;\n border-radius: 50%;\n background: var(--hive-fg-faint);\n box-shadow: none;\n}\n\n.hive-dot.is-working {\n background: var(--hive-accent);\n box-shadow: none;\n}\n\n.hive-dot.is-idle {\n background: var(--hive-fg-faint);\n}\n\n.hive-dot.is-failed {\n background: var(--hive-danger);\n}\n\n.hive-dot.is-done {\n background: var(--hive-ok);\n}\n\n.hive-meta {\n margin-top: 3px;\n overflow: hidden;\n color: var(--hive-fg-soft);\n font-size: 10.5px;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.hive-agent-files {\n color: var(--hive-fg-faint);\n font-family: var(--hive-mono);\n}\n\n/* -------------------------------------------------------------------- lanes */\n\n.hive-board { background: var(--hive-bg); }\n\n.hive-lanes {\n display: flex;\n flex: 1 1 auto;\n align-items: stretch;\n gap: 9px;\n min-height: 0;\n padding: 10px;\n overflow-x: auto;\n overflow-y: hidden;\n scrollbar-color: var(--hive-line) transparent;\n scrollbar-width: thin;\n}\n\n.hive-lane {\n display: flex;\n flex: 0 0 232px;\n flex-direction: column;\n min-height: 0;\n overflow: hidden;\n border: 1px solid var(--hive-line);\n border-radius: var(--hive-radius-md);\n background: color-mix(in srgb, var(--hive-fg) 2%, transparent);\n}\n\n.hive-lane-head {\n display: flex;\n flex: 0 0 auto;\n align-items: center;\n gap: 7px;\n padding: 8px 10px;\n border-bottom: 1px solid var(--hive-line);\n color: var(--hive-fg-soft);\n font-size: 10px;\n font-weight: 700;\n letter-spacing: 0.1em;\n text-transform: uppercase;\n}\n\n.hive-lane-head::before {\n width: 3px;\n height: 10px;\n border-radius: var(--hive-radius-sm);\n background: var(--hive-fg-faint);\n content: \"\";\n}\n\n.hive-lane-name {\n color: var(--hive-fg);\n}\n\n.hive-lane-pending .hive-lane-head::before {\n background: var(--hive-accent);\n}\n\n.hive-lane-claimed .hive-lane-head::before {\n background: var(--hive-info);\n}\n\n.hive-lane-done .hive-lane-head::before {\n background: var(--hive-ok);\n}\n\n.hive-lane-failed .hive-lane-head::before {\n background: var(--hive-danger);\n}\n\n.hive-lane-cards {\n display: flex;\n flex: 1 1 auto;\n flex-direction: column;\n gap: 7px;\n min-height: 0;\n padding: 7px;\n overflow-x: hidden;\n overflow-y: auto;\n scrollbar-color: var(--hive-line) transparent;\n scrollbar-width: thin;\n}\n\n.hive-card {\n padding: 8px 9px;\n border: 1px solid var(--hive-line);\n border-radius: var(--hive-radius-md);\n background: var(--hive-surface);\n cursor: pointer;\n transition: border-color 120ms ease, background 120ms ease;\n}\n\n.hive-card:hover {\n border-color: color-mix(in srgb, var(--hive-accent) 55%, var(--hive-line));\n background: var(--hive-surface-hover);\n}\n\n.hive-card:focus-visible {\n outline: 2px solid var(--hive-accent);\n outline-offset: 1px;\n}\n\n.hive-card-title {\n overflow-wrap: anywhere;\n font-size: 12.5px;\n font-weight: 600;\n line-height: 1.35;\n}\n\n.hive-card-meta {\n margin-top: 4px;\n color: var(--hive-fg-soft);\n font-size: 10.5px;\n}\n\n.hive-scopes {\n display: flex;\n flex-wrap: wrap;\n gap: 3px;\n margin-top: 6px;\n}\n\n.hive-scope {\n max-width: 100%;\n overflow: hidden;\n padding: 1px 5px;\n border: 1px solid var(--hive-line);\n border-radius: var(--hive-radius-sm);\n background: var(--hive-surface-strong);\n color: var(--hive-fg-soft);\n font-family: var(--hive-mono);\n font-size: 9.5px;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.hive-reason {\n margin-top: 6px;\n padding: 3px 6px;\n overflow-wrap: anywhere;\n border-left: 1px solid var(--hive-danger);\n border-radius: 0 var(--hive-radius-sm) var(--hive-radius-sm) 0;\n background: color-mix(in srgb, var(--hive-danger) 10%, transparent);\n color: color-mix(in srgb, var(--hive-danger) 82%, var(--hive-fg));\n font-size: 10.5px;\n}\n\n.hive-card-foot {\n display: flex;\n justify-content: space-between;\n gap: 6px;\n margin-top: 7px;\n color: var(--hive-fg-faint);\n font-family: var(--hive-mono);\n font-size: 9.5px;\n}\n\n.hive-card-id,\n.hive-card-state {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.hive-card-state {\n text-transform: uppercase;\n}\n\n/* ------------------------------------------------------------------- events */\n\n.hive-event {\n display: grid;\n grid-template-columns: auto minmax(0, 1fr);\n gap: 2px 7px;\n padding: 6px 7px;\n border: 1px solid transparent;\n border-radius: var(--hive-radius-sm);\n background: var(--hive-surface);\n font-size: 10.5px;\n}\n\n.hive-event-time {\n color: var(--hive-fg-faint);\n font-family: var(--hive-mono);\n font-variant-numeric: tabular-nums;\n white-space: nowrap;\n}\n\n.hive-event-kind {\n justify-self: start;\n overflow: hidden;\n color: var(--hive-accent);\n font-weight: 600;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.hive-event-text {\n grid-column: 1 / -1;\n overflow-wrap: anywhere;\n color: var(--hive-fg-soft);\n font-family: var(--hive-mono);\n font-size: 10px;\n}\n\n/* ------------------------------------------------------------------- drawer */\n\n.hive-drawer {\n position: fixed;\n z-index: 2147483000;\n top: 0;\n right: 0;\n bottom: 0;\n display: flex;\n flex-direction: column;\n width: min(440px, 92vw);\n border-left: 1px solid var(--hive-line);\n background: color-mix(in srgb, var(--hive-bg) 97%, var(--hive-fg) 3%);\n color: var(--hive-fg);\n box-shadow: none;\n font: 14px/1.5 ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, \"Segoe UI\", sans-serif;\n color-scheme: light dark;\n animation: hive-drawer-in 150ms ease-out;\n}\n\n.hive-drawer-head {\n display: flex;\n align-items: flex-start;\n gap: 10px;\n padding: 14px;\n border-bottom: 1px solid var(--hive-line);\n}\n\n.hive-drawer-titlebox {\n min-width: 0;\n}\n\n.hive-drawer-eyebrow {\n overflow: hidden;\n color: var(--hive-fg-faint);\n font-family: var(--hive-mono);\n font-size: 9.5px;\n letter-spacing: 0.05em;\n text-overflow: ellipsis;\n text-transform: uppercase;\n white-space: nowrap;\n}\n\n.hive-drawer-title {\n margin: 3px 0 0;\n overflow-wrap: anywhere;\n color: var(--hive-fg);\n font-size: 15px;\n font-weight: 650;\n line-height: 1.35;\n}\n\n.hive-drawer-head .hive-btn-ghost {\n flex: 0 0 auto;\n margin-left: auto;\n}\n\n.hive-drawer-body {\n display: flex;\n flex: 1 1 auto;\n flex-direction: column;\n gap: 10px;\n min-height: 0;\n padding: 14px;\n overflow-y: auto;\n scrollbar-color: var(--hive-line) transparent;\n scrollbar-width: thin;\n}\n\n.hive-actions-row {\n display: flex;\n flex-wrap: wrap;\n gap: 6px;\n}\n\n.hive-note {\n color: var(--hive-fg-faint);\n font-size: 11px;\n}\n\n.hive-section-label {\n margin-top: 2px;\n color: var(--hive-fg-faint);\n font-size: 9.5px;\n font-weight: 650;\n letter-spacing: 0.1em;\n text-transform: uppercase;\n}\n\n.hive-json {\n max-height: 55vh;\n margin: 0;\n padding: 10px;\n overflow: auto;\n border: 1px solid var(--hive-line);\n border-radius: var(--hive-radius-md);\n background: color-mix(in srgb, var(--hive-fg) 3%, transparent);\n color: var(--hive-fg-soft);\n font-family: var(--hive-mono);\n font-size: 10.5px;\n line-height: 1.55;\n overflow-wrap: anywhere;\n scrollbar-color: var(--hive-line) transparent;\n scrollbar-width: thin;\n white-space: pre-wrap;\n}\n\n@keyframes hive-drawer-in {\n from {\n opacity: 0;\n transform: translateX(18px);\n }\n to {\n opacity: 1;\n transform: translateX(0);\n }\n}\n\n@media (prefers-reduced-motion: reduce) {\n .hive-card,\n .hive-btn {\n transition: none;\n }\n\n .hive-drawer {\n animation: none;\n }\n}\n\n/* ------------------------------------------------------------------ compact */\n\n@media (max-width: 920px) {\n .hive {\n min-height: 100dvh;\n height: 100dvh;\n border-radius: 0;\n }\n\n .hive-main {\n grid-template-columns: minmax(0, 1fr);\n grid-template-rows: minmax(110px, 17vh) minmax(280px, 1fr) minmax(120px, 20vh);\n }\n\n .hive-agents {\n border-right: 0;\n border-bottom: 1px solid var(--hive-line);\n }\n\n .hive-events {\n border-top: 1px solid var(--hive-line);\n border-left: 0;\n }\n\n .hive-agent-list {\n flex-direction: row;\n overflow-x: auto;\n overflow-y: hidden;\n }\n\n .hive-agent {\n flex: 0 0 190px;\n }\n\n .hive-drawer {\n width: 100vw;\n }\n}\n/* DSH design-token bridge. Neutral grayscale fallbacks keep standalone pages readable. */\n.hive, .hive-portal, .hive-dialog {\n --hive-bg: var(--dsw-alias-bg-base, #fff);\n --hive-bg-layer-1: var(--dsw-alias-bg-layer-1, #fff);\n --hive-bg-layer-2: var(--dsw-alias-bg-layer-2, #fff);\n --hive-bg-layer-3: var(--dsw-alias-bg-layer-3, #f5f5f5);\n --hive-line: var(--dsw-alias-border-l1, #d9d9d9);\n --hive-line-2: var(--dsw-alias-border-l2, #e8e8e8);\n --hive-fg: var(--dsw-alias-label-primary, #000);\n --hive-fg-soft: var(--dsw-alias-label-secondary, #4d4d4d);\n --hive-fg-faint: var(--dsw-alias-label-tertiary, #808080);\n --hive-accent: var(--dsw-alias-brand-primary, #000);\n --hive-hover: var(--dsw-alias-interactive-bg-hover, #f2f2f2);\n --hive-selected: var(--dsw-alias-border-selected, #000);\n --hive-danger: var(--dsw-alias-state-error-primary, #000);\n --hive-ok: var(--dsw-alias-state-success-primary, #000);\n --hive-warn: var(--dsw-alias-state-warn-primary, #000);\n --hive-info: var(--dsw-alias-brand-primary, #000);\n --hive-radius-sm: var(--dsw-radius-sm, 4px);\n --hive-radius-md: var(--dsw-radius-md, 8px);\n --hive-radius-lg: var(--dsw-radius-lg, 12px);\n --hive-elevation: var(--dsw-elevation-panel, 0 12px 32px rgba(0, 0, 0, 0.18));\n --hive-surface: var(--hive-bg-layer-1);\n --hive-surface-strong: var(--hive-bg-layer-2);\n --hive-surface-hover: var(--hive-hover);\n --hive-accent-soft: color-mix(in srgb, var(--hive-accent) 14%, transparent);\n --hive-label-on-brand: var(--hive-bg);\n --hive-mono: ui-monospace, \"SFMono-Regular\", \"JetBrains Mono\", Menlo, Consolas, monospace;\n}\n\n/* Tokenized component treatment. */\n.hive { background: var(--hive-bg); color: var(--hive-fg); border-color: var(--hive-line); border-radius: var(--hive-radius-lg); }\n.hive-bar { background: var(--hive-bg-layer-1); border-bottom-color: var(--hive-line); gap: 8px; }\n.hive-main,\n.hive-board { background: var(--hive-bg); }\n.hive-agents,\n.hive-events { background: var(--hive-bg-layer-1); border-color: var(--hive-line); }\n.hive-lane { background: var(--hive-bg-layer-1); border-color: var(--hive-line); border-radius: var(--hive-radius-md); }\n.hive-card { background: var(--hive-bg-layer-1); border: 1px solid var(--hive-line); border-radius: var(--hive-radius-md); box-shadow: none; }\n.hive-card:hover { background: var(--hive-hover); border-color: var(--hive-line); }\n.hive-btn { background: transparent; border: 1px solid var(--hive-line); color: var(--hive-fg); border-radius: var(--hive-radius-md); }\n.hive-btn:hover { background: var(--hive-hover); border-color: var(--hive-line); color: var(--hive-fg); }\n.hive-btn-ghost { background: transparent; border-color: transparent; color: var(--hive-fg-soft); }\n.hive-btn-ghost:hover { background: var(--hive-hover); border-color: transparent; color: var(--hive-fg); }\n.hive-btn-danger { background: transparent; border-color: var(--hive-danger); color: var(--hive-danger); }\n.hive-btn-danger:hover:not(:disabled) { background: var(--hive-hover); border-color: var(--hive-danger); color: var(--hive-danger); }\n.hive-settings-primary,\n.hive-add-submit { background: var(--hive-accent); border-color: var(--hive-accent); color: var(--hive-label-on-brand); }\n.hive-settings-primary:hover:not(:disabled),\n.hive-add-submit:hover:not(:disabled) { background: var(--hive-accent); border-color: var(--hive-accent); color: var(--hive-label-on-brand); }\n.hive-settings-secondary { background: transparent; border-color: var(--hive-line); color: var(--hive-fg); }\n.hive-settings-secondary:hover { background: var(--hive-hover); border-color: var(--hive-line); color: var(--hive-fg); }\n.hive-input,\n.hive-textarea,\n.hive-limits-input { background: var(--hive-bg-layer-1); border: 1px solid var(--hive-line); color: var(--hive-fg); border-radius: var(--hive-radius-sm); }\n.hive-input:focus,\n.hive-textarea:focus,\n.hive-limits-input:focus { outline: 1px solid var(--hive-selected); outline-offset: 0; }\n.hive-dialog,\n.hive-add-dialog,\n.hive-settings-dialog,\n.hive-card-dialog { background: var(--hive-bg-layer-2); border: 1px solid var(--hive-line); border-radius: var(--hive-radius-lg); box-shadow: var(--hive-elevation); color: var(--hive-fg); }\n.hive-toast { background: var(--hive-bg-layer-2); border: 1px solid var(--hive-line); border-radius: var(--hive-radius-lg); box-shadow: none; color: var(--hive-fg); }\n.hive-drawer { background: var(--hive-bg-layer-2); border-left: 1px solid var(--hive-line); box-shadow: none; }\n.hive-json,\n.hive-plan-raw,\n.hive-plan-item,\n.hive-scope,\n.hive-init-card,\n.hive-limits-error,\n.hive-settings-note { background: var(--hive-bg-layer-1); border-color: var(--hive-line); border-radius: var(--hive-radius-sm); }\n.hive-limits-row { border-top-color: var(--hive-line-2); }\n.hive-limits-row:not(.is-head):hover { background: var(--hive-hover); }\n.hive-settings-tab[aria-selected=\"true\"] { border-bottom-color: var(--hive-selected); }\n.hive-lane-head,\n.hive-dialog-head,\n.hive-dialog-foot,\n.hive-drawer-head,\n.hive-settings-tabs { border-color: var(--hive-line-2); }\n.hive-freeze-banner { background: transparent; border-bottom-color: var(--hive-warn); color: var(--hive-warn); }\n.hive-freeze-banner .hive-btn { background: transparent; border-color: var(--hive-line); color: var(--hive-fg); }\n.hive-queen-hint { background: var(--hive-bg-layer-1); border-color: var(--hive-line); }\n.hive-supervisor-inline,\n.hive-stat,\n.hive-status,\n.hive-queen-badge {\n display: inline-flex;\n align-items: center;\n gap: 6px;\n height: 22px;\n padding: 0 8px;\n border: 1px solid var(--hive-line);\n border-radius: 999px;\n background: transparent;\n color: var(--hive-fg-soft);\n font-size: 12px;\n font-weight: 400;\n line-height: 1;\n white-space: nowrap;\n}\n.hive-supervisor-inline { gap: 6px; }\n.hive-supervisor-inline-label { color: var(--hive-fg-soft); font-weight: 400; }\n.hive-supervisor-inline-state { display: inline-flex; align-items: center; gap: 6px; color: var(--hive-fg-soft); font-size: 12px; font-weight: 400; }\n.hive-supervisor-inline-state::before { width: 6px; height: 6px; flex: 0 0 6px; border-radius: 50%; background: var(--hive-fg-faint); content: \"\"; }\n.hive-supervisor-inline-state.is-running::before { background: var(--hive-accent); }\n.hive-supervisor-inline-state.is-backoff::before { background: var(--hive-warn); }\n.hive-supervisor-inline-state.is-paused::before { background: var(--hive-fg-faint); }\n.hive-supervisor-inline-resume { height: auto; min-height: 0; padding: 0; border: 0; background: transparent; color: var(--hive-fg-soft); font-size: 12px; line-height: 1; }\n.hive-supervisor-inline-resume:hover { background: transparent; color: var(--hive-fg); }\n.hive-stats { flex-wrap: wrap; gap: 8px; }\n.hive-stat.is-warn { color: var(--hive-fg-soft); background: transparent; }\n.hive-stat strong { color: var(--hive-fg-soft); font-weight: 400; }\n.hive-status { color: var(--hive-fg-soft); }\n.hive-status::before { width: 6px; height: 6px; flex: 0 0 6px; border-radius: 50%; background: var(--hive-danger); content: \"\"; font-size: 0; }\n.hive-status.is-info::before { background: var(--hive-accent); }\n.hive-queen-badge { color: var(--hive-fg-soft); }\n\n\n.hive-portal {\n position: fixed;\n inset: 0;\n z-index: 2147483600;\n pointer-events: none;\n}\n\n.hive-portal > .hive-overlay { pointer-events: auto; }\n\n/* Buttons: two explicit tiers. */\n.hive-btn {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n gap: 6px;\n height: 28px;\n padding: 0 12px;\n border: 1px solid var(--hive-line-2);\n border-radius: var(--hive-radius-md);\n background: transparent;\n color: var(--hive-fg);\n font-size: 14px;\n font-weight: 600;\n line-height: 1.5;\n}\n\n.hive-btn:hover {\n border-color: var(--hive-line-2);\n background: var(--hive-hover);\n color: var(--hive-fg);\n}\n\n.hive-btn-ghost {\n border-color: transparent;\n background: transparent;\n color: var(--hive-fg-soft);\n}\n\n.hive-btn-ghost:hover {\n border-color: transparent;\n background: var(--hive-hover);\n color: var(--hive-fg);\n}\n\n.hive-btn-danger {\n border-color: var(--hive-danger);\n background: transparent;\n color: var(--hive-danger);\n}\n\n.hive-btn-danger:hover:not(:disabled) {\n border-color: var(--hive-danger);\n background: var(--hive-hover);\n color: var(--hive-danger);\n}\n\n.hive-settings-primary,\n.hive-add-submit {\n border-color: var(--hive-accent);\n background: var(--hive-accent);\n color: var(--hive-label-on-brand);\n font-weight: 600;\n}\n\n.hive-settings-primary:hover:not(:disabled),\n.hive-add-submit:hover:not(:disabled) {\n border-color: var(--hive-accent);\n background: color-mix(in srgb, var(--hive-accent) 92%, #000);\n color: var(--hive-label-on-brand);\n}\n\n.hive-settings-primary:active:not(:disabled),\n.hive-add-submit:active:not(:disabled) {\n border-color: var(--hive-accent);\n background: color-mix(in srgb, var(--hive-accent) 84%, #000);\n color: var(--hive-label-on-brand);\n}\n\n.hive-settings-primary:focus-visible,\n.hive-add-submit:focus-visible {\n outline: 2px solid var(--hive-accent);\n outline-offset: 2px;\n}\n\n.hive-settings-secondary {\n border-color: var(--hive-line-2);\n background: transparent;\n color: var(--hive-fg);\n}\n\n.hive-settings-secondary:hover {\n border-color: var(--hive-line-2);\n background: var(--hive-hover);\n color: var(--hive-fg);\n}\n\n.hive-icon-button,\n.hive-dialog-close {\n height: 28px;\n padding: 0;\n border: 0;\n background: transparent;\n color: var(--hive-fg-soft);\n}\n\n.hive-icon-button:hover,\n.hive-dialog-close:hover {\n border: 0;\n background: var(--hive-hover);\n color: var(--hive-fg);\n}\n\n.hive-role-remove {\n height: 28px;\n min-height: 28px;\n padding: 0;\n border-color: transparent;\n background: transparent;\n color: var(--hive-danger);\n}\n\n/* Dialogs are portaled to the document body; keep them above the panel. */\n.hive-dialog,\n.hive-add-dialog,\n.hive-settings-dialog,\n.hive-card-dialog {\n border: 1px solid var(--hive-line);\n background: var(--hive-bg-layer-2);\n box-shadow: var(--dsw-elevation-panel, 0 12px 32px rgba(0, 0, 0, 0.18));\n}\n\n/* toolbar action rhythm */\n.hive-actions { gap: 8px; }\n.hive-actions > .hive-btn { display: inline-flex; align-items: center; gap: 6px; flex: 0 0 auto; }\n\n/* Dialog form containment: portal content must not create horizontal scroll. */\n.hive-portal,\n.hive-portal *,\n.hive-portal *::before,\n.hive-portal *::after { box-sizing: border-box; }\n\n.hive-portal .hive-dialog { max-width: 92vw; overflow-x: hidden; }\n.hive-portal .hive-dialog-head,\n.hive-portal .hive-dialog-body,\n.hive-portal .hive-dialog-foot { padding-left: 16px; padding-right: 16px; }\n.hive-portal .hive-dialog-body { width: auto; min-width: 0; max-width: 100%; }\n.hive-portal .hive-dialog-body > * { margin-left: 0; margin-right: 0; max-width: 100%; min-width: 0; }\n.hive-portal .hive-field,\n.hive-portal .hive-field-row,\n.hive-portal .hive-settings-section,\n.hive-portal .hive-settings-tabpanel,\n.hive-portal .hive-limits-table { width: 100%; max-width: 100%; min-width: 0; margin-left: 0; margin-right: 0; }\n.hive-portal .hive-field-row > .hive-field { width: auto; flex: 1 1 160px; }\n.hive-portal .hive-input,\n.hive-portal .hive-textarea,\n.hive-portal select { width: 100%; min-width: 0; max-width: 100%; }\n.hive-portal .hive-limits-row {\n width: 100%;\n max-width: 100%;\n min-width: 0;\n grid-template-columns: minmax(0, 1fr) 96px 48px 48px 28px;\n}\n.hive-portal .hive-limits-cell,\n.hive-portal .hive-limits-role,\n.hive-portal .hive-dialog-title,\n.hive-portal .hive-card-subline,\n.hive-portal .hive-settings-role-name { min-width: 0; overflow-wrap: anywhere; }\n.hive-portal .hive-dialog-foot { flex-wrap: wrap; }\n\n.hive-portal .hive-dialog-body { overflow-x: hidden; }\n.hive-portal .hive-settings-tabs { flex-wrap: wrap; }\n.hive-portal .hive-card-actions,\n.hive-portal .hive-settings-form-actions { max-width: 100%; }\n\n/* Native <dialog>: top layer, browser-managed backdrop and focus trap. */\n.hive-dialog,\n.hive-dialog *,\n.hive-dialog *::before,\n.hive-dialog *::after { box-sizing: border-box; }\n\ndialog.hive-dialog {\n position: fixed;\n inset: 0;\n margin: auto;\n padding: 0;\n width: min(560px, 100%);\n max-width: 92vw;\n max-height: 80vh;\n overflow: hidden;\n border: 1px solid var(--hive-line);\n border-radius: var(--hive-radius-lg);\n background: var(--hive-bg-layer-2);\n color: var(--hive-fg);\n box-shadow: var(--dsw-elevation-panel, 0 12px 32px rgba(0, 0, 0, 0.18));\n color-scheme: light dark;\n}\n\ndialog.hive-card-dialog { width: min(720px, 92vw); }\n\ndialog.hive-dialog::backdrop {\n background: var(--dsw-alias-bg-mask-1, rgba(0, 0, 0, 0.24));\n backdrop-filter: var(--dsw-mask-blur, none);\n}\n\ndialog.hive-dialog .hive-dialog-head,\ndialog.hive-dialog .hive-dialog-body,\ndialog.hive-dialog .hive-dialog-foot { padding-left: 16px; padding-right: 16px; }\ndialog.hive-dialog .hive-dialog-body { width: auto; min-width: 0; max-width: 100%; overflow-x: hidden; }\ndialog.hive-dialog .hive-dialog-body > * { margin-left: 0; margin-right: 0; max-width: 100%; min-width: 0; }\ndialog.hive-dialog .hive-field,\ndialog.hive-dialog .hive-field-row,\ndialog.hive-dialog .hive-settings-section,\ndialog.hive-dialog .hive-settings-tabpanel,\ndialog.hive-dialog .hive-limits-table { width: 100%; max-width: 100%; min-width: 0; margin-left: 0; margin-right: 0; }\ndialog.hive-dialog .hive-field-row > .hive-field { width: auto; flex: 1 1 160px; }\ndialog.hive-dialog .hive-input,\ndialog.hive-dialog .hive-textarea,\ndialog.hive-dialog select { width: 100%; min-width: 0; max-width: 100%; }\ndialog.hive-dialog .hive-limits-row {\n width: 100%;\n max-width: 100%;\n min-width: 0;\n grid-template-columns: minmax(0, 1fr) 96px 48px 48px 28px;\n}\ndialog.hive-dialog .hive-limits-cell,\ndialog.hive-dialog .hive-limits-role,\ndialog.hive-dialog .hive-dialog-title,\ndialog.hive-dialog .hive-card-subline,\ndialog.hive-dialog .hive-settings-role-name { min-width: 0; overflow-wrap: anywhere; }\ndialog.hive-dialog .hive-dialog-foot { flex-wrap: wrap; }\n\ndialog.hive-dialog {\n display: flex;\n flex-direction: column;\n max-height: 80vh;\n}\ndialog.hive-dialog .hive-dialog-head,\ndialog.hive-dialog .hive-dialog-foot { flex: 0 0 auto; }\ndialog.hive-dialog .hive-dialog-body { flex: 1 1 auto; min-height: 0; overflow: auto; }\n.hive-card-run-output { max-height: 20lh; overflow: auto; }\n.hive-card-actions { flex-wrap: wrap; justify-content: flex-end; }\n\n/* Virtual lanes: fixed 26px cards, 2px gaps, 28px stride. */\n.hive-lane-cards {\n display: block;\n flex: 1 1 auto;\n min-height: 0;\n padding: 7px;\n overflow-x: hidden;\n overflow-y: auto;\n}\n.hive-lane-virtual { position: relative; width: 100%; min-width: 0; }\n.hive-lane-virtual .hive-card {\n position: absolute;\n left: 0;\n right: 0;\n display: flex;\n align-items: center;\n height: 26px;\n min-height: 26px;\n padding: 2px 8px;\n overflow: hidden;\n border-radius: var(--hive-radius-sm);\n}\n.hive-lane-virtual .hive-card-title {\n width: 100%;\n overflow: hidden;\n font-size: 12px;\n line-height: 16px;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.hive-agent-count { font: inherit; cursor: pointer; }\n.hive-agent-count:disabled { cursor: default; }\n\n\n/* The DSH design-token bridge is bundled in panel.css; this file is kept for package layout compatibility. */\n"
6381
6470
  function ensureHivePanelCss() {
6382
6471
  if (typeof document === 'undefined') return
6383
6472
  if (document.querySelector('style[data-hive-panel-css]') !== null) return