/* Table view: one frozen shared header; every row is a grid using the shared --cols template. */
.hub-table-wrap{position:relative;overflow:auto;max-height:calc(100vh - 230px);min-width:0;background:transparent;border:0;border-radius:0}
.hub-table{font-size:13px;color:var(--hub-text,#1f2430);width:max-content;margin-inline:auto}
.hub-tr{display:grid;grid-template-columns:var(--cols);height:32px;align-items:stretch}
.hub-thead{position:sticky;top:0;z-index:6;background:var(--hub-surface-2,#f6f7fb)}
.hub-th,.hub-td{box-sizing:border-box;border-right:1px solid var(--hub-border,#e3e6ee);border-bottom:1px solid var(--hub-border,#e3e6ee);border-left:0;border-top:0;padding:0 8px;display:flex;align-items:center;min-width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;background:inherit}
.hub-th{position:relative;font-size:12px;font-weight:500;color:var(--hub-text-muted,#6b7280);gap:4px;background:var(--hub-surface-2,#f6f7fb);cursor:grab;border-top:1px solid var(--hub-border,#e3e6ee)}
.hub-td{background:var(--hub-surface,#fff)}
.hub-th:first-child,.hub-td:first-child{border-left:1px solid var(--hub-border,#e3e6ee)}
.hub-th.is-pinned,.hub-td.is-pinned{position:sticky;z-index:3}
.hub-thead .is-pinned{z-index:7}
.hub-th-sel,.hub-td-sel{justify-content:center;padding:0}
.hub-th-label{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis}
.hub-th-sort,.hub-th-menu{border:0;background:transparent;cursor:pointer;color:inherit;font-size:12px;padding:0 2px;position:relative}
.hub-th-sort.is-on{color:var(--hub-primary,#4f46e5)}
.hub-sort-badge{display:inline-block;min-width:14px;height:14px;line-height:14px;margin-left:2px;border-radius:7px;background:var(--hub-primary,#4f46e5);color:#fff;font-size:10px;text-align:center}
.hub-resize{position:absolute;right:0;top:0;bottom:0;width:6px;cursor:col-resize}
.hub-resize:hover{background:var(--hub-primary,#4f46e5);opacity:.4}
.hub-row:hover .hub-td{background:var(--hub-hover,#f3f4fb)}
.hub-row.is-selected .hub-td{background:var(--hub-selected,#eceeff)}
.hub-td:focus-visible{outline:2px solid var(--hub-primary,#4f46e5);outline-offset:-2px}
.hub-td.is-editing{padding:0;overflow:visible}
.hub-cell-input{width:100%;height:100%;box-sizing:border-box;border:2px solid var(--hub-primary,#4f46e5);padding:0 6px;font:inherit;background:#fff;color:inherit;outline:0}
.hub-td[data-editable="1"]{cursor:text}
.hub-task-link{color:var(--hub-primary,#4f46e5);text-decoration:none;overflow:hidden;text-overflow:ellipsis}
.hub-task-link:hover{text-decoration:underline}
.hub-title-cell{display:flex;align-items:center;min-width:0;gap:4px;overflow:hidden}
.hub-sub-toggle{border:0;background:none;cursor:pointer;padding:0 2px}
.hub-group{overflow:clip;margin-bottom:0}
.hub-group-bar{display:flex;align-items:center;gap:8px;height:30px;background:var(--hub-surface-2,#f6f7fb);border-bottom:1px solid var(--hub-border,#e3e6ee);position:sticky;left:0}
.hub-group-toggle{border:0;background:none;cursor:pointer;font-size:14px;color:var(--hub-primary,#4f46e5)}
.hub-group-count{font-size:12px;color:var(--hub-text-muted,#6b7280)}
.hub-spacer{flex:1}
.hub-link{border:0;background:none;color:var(--hub-primary,#4f46e5);font-size:12px;cursor:pointer;padding:4px 10px}
.hub-add-row{height:32px;display:flex;align-items:center;border-bottom:1px solid var(--hub-border,#e3e6ee);padding-left:44px;position:sticky;left:0}
.hub-add-input{height:26px;width:320px;max-width:80vw}
.hub-pill-chip{display:inline-block;max-width:100%;overflow:hidden;text-overflow:ellipsis;padding:1px 8px;border-radius:6px;font-size:11px;font-weight:600;line-height:18px}
.hub-pill-chip.is-solid{font-size:11px;font-weight:700;letter-spacing:.02em}
.hub-assignees{display:inline-flex;gap:6px;align-items:center;overflow:hidden}
.hub-assignee{display:inline-flex;align-items:center;gap:4px}
.hub-avatar-sm{display:inline-flex;align-items:center;justify-content:center;width:20px;height:20px;border-radius:50%;background:#e0e4ff;font-size:9px;font-weight:600;flex:none}
.hub-empty{padding:16px;color:var(--hub-text-muted,#6b7280)}
.hub-bulk-bar{position:fixed;left:50%;bottom:20px;transform:translateX(-50%);z-index:50;display:flex;gap:6px;align-items:center;flex-wrap:wrap;max-width:calc(100vw - 24px);padding:8px 12px;background:var(--hub-navy,#1b2540);color:#fff;border-radius:10px;box-shadow:0 8px 28px rgba(0,0,0,.3)}
.hub-bulk-bar .hub-btn{background:rgba(255,255,255,.12);color:#fff;border-color:transparent}
.hub-bulk-count{font-weight:600;margin-right:6px}
.hub-pick{display:flex;flex-direction:column;gap:6px;padding:6px}
.hub-pick-list{max-height:240px;overflow:auto;display:flex;flex-direction:column}
.hub-group-footer{height:28px;background:var(--hub-surface-2,#f6f7fb);font-size:12px;color:var(--hub-text-muted,#6b7280)}
.hub-group-footer .hub-td{background:var(--hub-surface-2,#f6f7fb)}
.hub-group-grip{cursor:grab;color:#9aa0b4;user-select:none}
.hub-group.is-drop{outline:2px dashed var(--hub-primary,#4f46e5);outline-offset:-2px}
.hub-table-wrap.is-wrap .hub-row{height:auto;min-height:32px}
.hub-table-wrap.is-wrap .hub-row .hub-td{white-space:normal;overflow:visible;text-overflow:clip;word-break:break-word;padding-top:4px;padding-bottom:4px}
.hub-pick-item.is-active{background:var(--hub-hover,#eceeff)}
.hub-pick-item.is-current{font-weight:600}
.hub-menu-sub{display:block;font-size:11px;color:var(--hub-text-muted,#6b7280)}
/* The fixed bulk bar must never cover the last rows or the "Load more" control. */
.hub-list-content:has(.hub-bulk-bar){padding-bottom:76px}
body:has(.hub-bulk-bar) .hub-load-more-slot{padding-bottom:76px}

/* ---- Blueprint compliance corrections ------------------------------------------------------- */
/* Trailing always-visible "+" (Explore Fields & Columns) */
.hub-th-add{justify-content:center;padding:0;cursor:default;border-right:0}
.hub-add-col{width:26px;height:26px;border:1px solid var(--hub-border,#e3e6ee);border-radius:6px;background:var(--hub-surface,#fff);color:var(--hub-primary,#4f46e5);font-size:16px;line-height:1;cursor:pointer}
.hub-add-col:hover,.hub-add-col:focus-visible{background:var(--hub-hover,#eceeff)}
.hub-td-end{border-right:0;background:var(--hub-surface,#fff)}
/* Groups are visibly separate sections sharing the column geometry */
.hub-table-body{display:flex;flex-direction:column;gap:32px;padding:12px 0 8px;background:var(--hub-canvas,#f5f7fa)}
.hub-group{border:1px solid var(--hub-border,#e3e6ee);border-radius:8px;overflow:clip;margin-bottom:0;background:var(--hub-surface,#fff)}
.hub-group-flat{border:0;border-radius:0}
.hub-group-bar{display:grid;grid-template-columns:36px minmax(0,1fr);align-items:center;height:32px;border-bottom:1px solid var(--hub-border,#e3e6ee);position:sticky;left:0}
.hub-group-selcell{display:flex;align-items:center;justify-content:center}
.hub-group-head{display:flex;align-items:center;gap:6px;min-width:0;height:100%}
.hub-group-head .hub-group-toggle{display:inline-flex;align-items:center;justify-content:center;flex:none;width:14px;height:22px;padding:0;margin:0;line-height:1;vertical-align:middle}
.hub-group-head .hub-pill-chip{display:inline-flex;align-items:center;min-height:18px;vertical-align:middle}
.hub-group-footer{border-top:1px solid var(--hub-border,#e3e6ee)}
.hub-group-footer .hub-td{border-bottom:0}
.hub-add-task{padding:4px 0;font-weight:600}
.hub-add-input{width:100%;max-width:none}
.hub-calc{display:flex;justify-content:flex-end;gap:6px;width:100%;border:0;background:transparent;color:var(--hub-text-muted,#6b7280);font:inherit;font-size:12px;cursor:pointer;padding:0 2px;align-items:center}
.hub-calc .hub-calc-hint{opacity:0}
.hub-group-footer:hover .hub-calc-hint,.hub-calc:focus-visible .hub-calc-hint{opacity:.8}
.hub-calc-val{font-weight:600;color:var(--hub-text,#1f2430)}
.hub-menu-sep{height:1px;background:var(--hub-border,#e3e6ee);margin:4px 0}
/* Right-side Fields panel */
.hub-fields-drawer{position:fixed;top:0;right:0;bottom:0;width:340px;max-width:100vw;z-index:60;background:var(--hub-surface,#fff);border-left:1px solid var(--hub-border,#e3e6ee);box-shadow:-8px 0 24px rgba(20,28,60,.12);overflow:auto}
.hub-fields-body{display:flex;flex-direction:column;gap:8px;padding:14px}
.hub-fields-top{display:flex;align-items:center;gap:8px}.hub-fields-top h2{font-size:15px;margin:0}
.hub-fields-actions{display:flex;gap:8px}
.hub-field-type{font-size:11px;color:var(--hub-text-muted,#6b7280);margin-left:auto;margin-right:8px}
.hub-lib-list{display:flex;flex-direction:column}
.hub-th.is-drop-target{box-shadow:inset 3px 0 0 var(--hub-primary,#4f46e5)}
.hub-th-sort:disabled{opacity:.35;cursor:not-allowed}
.hub-query-error{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin:8px 0;padding:8px 12px;border:1px solid #f1b4b4;background:#fdf0f0;color:#8a1f1f;border-radius:8px;font-size:13px}
.hub-query-error-msg{flex:1;min-width:220px}

/* Short-date text editor with a small native calendar trigger; the editable text is M/D/YY. */
.hub-td.is-editing:has(.hub-date-picker-trigger){display:flex;align-items:center;background:var(--hub-surface,#fff)}
.hub-td.is-editing .hub-date-picker-trigger{flex:0 0 26px;width:26px;min-width:26px;height:30px;padding:0;border:0;background:var(--hub-surface,#fff);color:transparent;font-size:0;cursor:pointer}
.hub-td.is-editing:has(.hub-date-picker-trigger) .hub-cell-input{flex:1;min-width:0;width:auto}

/* White workspace, distinct headers, striped rows and framed add-task composer. */
.hub-table-body{background:var(--hub-bg,#fff)}
.hub-thead,.hub-th{background:var(--hub-head,#f8fafc)}
.hub-group-bar{background:var(--hub-head,#f8fafc)}
.hub-group-rows>.hub-row:nth-child(even)>.hub-td{background:var(--hub-head,#f8fafc)}
.hub-group-rows>.hub-row.is-selected>.hub-td{background:var(--hub-primary-soft,#edf0ff)}
.hub-group-rows>.hub-row:hover>.hub-td{background:var(--hub-hover,#f1f5fa)}
.hub-group-footer{background:var(--hub-surface,#fff)}
.hub-group-footer .hub-td{background:var(--hub-surface,#fff)}
.hub-add-task{display:inline-flex;align-items:center;min-height:24px;border:0;border-radius:0;padding:2px 0;margin:0;background:transparent;text-align:left}
.hub-add-task:hover{background:transparent;text-decoration:underline}
.hub-group-head .hub-group-toggle{width:22px;height:28px;margin:0;padding:0;font-size:0;color:var(--hub-text-muted,#778297)}
.hub-group-head .hub-group-toggle::before{content:"";display:block;width:7px;height:7px;border-right:2px solid currentColor;border-bottom:2px solid currentColor;transform:translateY(-2px) rotate(45deg);transition:transform .12s}
.hub-group-head .hub-group-toggle[aria-expanded="false"]::before{transform:rotate(-45deg)}

.hub-sort-menu-control{display:flex;align-items:center;gap:7px;padding:7px 9px;border-bottom:1px solid var(--hub-border,#e4e9f0)}
.hub-sort-menu-control>span{font-weight:600;flex:1}
.hub-sort-menu-control .hub-btn{min-width:30px;padding:4px 6px;justify-content:center}

/* Owner lock: Add Task is a separate, truly borderless full-width action row.
   Neither its parent group nor the action has exterior or column-cell borders. */
.hub-table-body > .hub-group{border:0;border-radius:0;overflow:visible}
.hub-table-body > .hub-group > .hub-group-bar{border-left:1px solid var(--hub-border,#e3e6ee);border-right:1px solid var(--hub-border,#e3e6ee);border-top:1px solid var(--hub-border,#e3e6ee)}
.hub-add-task-row{width:100%;height:32px;display:flex;align-items:stretch;background:transparent;border:0!important;outline:0;box-shadow:none;position:relative}
.hub-add-task-row .hub-add-task{width:100%;height:100%;min-height:32px;display:flex;align-items:center;gap:5px;padding:0 10px 0 var(--hub-add-task-offset,80px);margin:0;border:0!important;border-radius:0!important;outline-offset:-2px;background:transparent;color:var(--hub-text-muted,#778297);font-weight:400;font-size:12px;text-align:left;text-decoration:none;box-shadow:none}
.hub-add-task-row .hub-add-task:hover{background:var(--hub-hover,#f1f5fa);text-decoration:none;color:var(--hub-primary,#5268d9)}
.hub-add-task-row .hub-add-task-plus{font-size:16px;line-height:1;flex:0 0 auto}
.hub-add-task-row .hub-add-input{width:calc(100% - var(--hub-add-task-offset,80px) - 12px);max-width:none;margin-left:var(--hub-add-task-offset,80px);align-self:center;height:28px}

/* Single full-width action + calculations row, deliberately without cell-box lines. */
.hub-group-footer{height:34px;min-height:34px;background:transparent!important;border:0!important;outline:0;box-shadow:none}
.hub-group-footer .hub-footer-slot{min-width:0;display:flex;align-items:center;overflow:hidden;padding:0 8px;border:0!important;outline:0;box-shadow:none;background:transparent}
.hub-group-footer .hub-footer-select,.hub-group-footer .hub-footer-end{padding:0}
.hub-group-footer .hub-footer-slot[data-col="title"]{padding-left:8px}
.hub-group-footer .hub-add-task{width:auto;min-height:30px;margin:0;padding:0 2px;display:inline-flex;gap:5px;align-items:center;border:0!important;background:transparent;text-decoration:none;font-weight:400;color:var(--hub-text-muted,#778297)}
.hub-group-footer .hub-add-task:hover{color:var(--hub-primary,#5268d9);text-decoration:none}
.hub-group-footer .hub-add-input{height:28px;width:100%;min-width:130px}
.hub-group-footer .hub-footer-slot .hub-calc{width:100%;border:0!important;justify-content:flex-end}
.hub-group-footer:hover .hub-calc-hint,.hub-calc:focus-visible .hub-calc-hint{opacity:.8}

/* Match footer positioning to pinned task cells, without restoring cell borders.
   The opaque surface prevents scrolled calculation text bleeding through the pinned action. */
.hub-group-footer .hub-footer-slot.is-pinned{position:sticky;z-index:4;background:var(--hub-surface,#fff);border:0!important;box-shadow:none}
.hub-group-footer .hub-footer-select.is-pinned{z-index:5}

/* Pin the group header's CONTENT, not its full-width bar. A full-width sticky
   bar leaves the label offscreen because its child remains at the scroll origin.
   Keep selection checkbox, chevron, status pill, task count, and drag handle
   together at the visible left edge without affecting row/column scroll. */
.hub-table-body > .hub-group > .hub-group-bar,
.hub-table-body .hub-group-bar{
  display:flex;
  align-items:center;
  position:relative;
  left:auto;
  min-width:100%;
}
.hub-group-bar > .hub-group-selcell{
  position:sticky;
  left:0;
  z-index:4;
  width:36px;
  flex:0 0 36px;
  align-self:stretch;
  background:var(--hub-head,#f8fafc);
}
.hub-group-bar > .hub-group-head{
  position:sticky;
  /* Selection track (36px) plus the bar's 8px flex gap. */
  left:calc(36px + 8px);
  z-index:4;
  width:max-content;
  flex:0 0 auto;
  background:var(--hub-head,#f8fafc);
  padding-right:10px;
}


/* Center compact tables in available width; overwide tables scroll from the left. */
.hub-table-wrap{width:100%}
.hub-table-wrap>.hub-table{width:max-content;margin-inline:auto}

/* Accepted table refinements: legible typography, subtle corners, no unused header controls. */
.hub-table{font-size:13px;border-radius:8px}
.hub-thead{border-radius:8px 8px 0 0}
.hub-thead>.hub-th:first-child{border-top-left-radius:8px}
.hub-thead>.hub-th:last-child{border-top-right-radius:8px}
.hub-table-body>.hub-group>.hub-group-bar{border-radius:7px 7px 0 0}
.hub-table-body .hub-group-bar{border-radius:6px}
.hub-th{font-size:13px;gap:5px}
.hub-th-label{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis}
.hub-th-sort{flex:0 0 auto}
.hub-pill-chip{font-size:12px;line-height:18px}
.hub-group-head .hub-pill-chip{font-size:11px}
.hub-td.hub-cell-align-center{justify-content:center;text-align:center}
.hub-td.hub-cell-align-right{justify-content:flex-end;text-align:right}
.hub-td.hub-cell-align-left{justify-content:flex-start;text-align:left}
.hub-td.hub-cell-align-center .hub-title-cell,
.hub-td.hub-cell-align-right .hub-title-cell{width:100%;justify-content:inherit}
.hub-group-move{display:inline-flex;align-items:center;gap:2px;margin-left:6px}
.hub-group-move button{width:23px;height:23px;padding:0;border:1px solid var(--hub-border,#e3e6ee);border-radius:5px;background:var(--hub-surface,#fff);color:var(--hub-text-muted,#6b7280);font-size:14px}
.hub-group-move button:hover{background:var(--hub-hover,#eef0ff);color:var(--hub-primary,#5268d9)}
/* Single-line icon items, no distracting explanatory subtitle columns. */
.hub-column-menu{font-size:13px;min-width:0}
.hub-column-menu .hub-column-action{min-height:34px;padding:7px 10px;gap:11px;white-space:nowrap}
.hub-column-menu .hub-menu-icon{width:19px;text-align:center;flex-shrink:0;font-size:16px;color:var(--hub-text-muted,#778297)}
.hub-column-menu .hub-menu-label{flex:1;min-width:0;padding:0;color:inherit;font-size:13px;letter-spacing:0;text-transform:none;font-weight:450}
.hub-column-menu .hub-menu-chevron,.hub-column-menu .hub-menu-check{font-size:15px;color:var(--hub-primary,#5268d9)}
.hub-column-menu .hub-menu-flyout-parent{position:relative}
.hub-column-menu .hub-menu-flyout{display:none;position:absolute;top:-7px;left:calc(100% + 4px);min-width:200px;padding:6px;background:var(--hub-surface,#fff);border:1px solid var(--hub-border,#e3e6ee);border-radius:8px;box-shadow:var(--hub-shadow,0 8px 20px rgba(0,0,0,.12));z-index:10}
.hub-column-menu.flyout-left .hub-menu-flyout{left:auto;right:calc(100% + 4px)}
.hub-column-menu .hub-menu-flyout-parent:hover>.hub-menu-flyout,
.hub-column-menu .hub-menu-flyout-parent:focus-within>.hub-menu-flyout,
.hub-column-menu .hub-menu-flyout-parent.is-open>.hub-menu-flyout{display:flex;flex-direction:column}
.hub-column-menu .hub-menu-flyout .hub-column-action{min-height:32px}

/* Owner-approved 14px minimum for readable table text, controls and badges.
   Icon glyphs, numeric sort-order markers and avatars retain their own sizing. */
.hub-table,.hub-th,.hub-td,.hub-group-count,.hub-group-footer,
.hub-group-footer .hub-footer-slot,.hub-group-footer .hub-add-task,
.hub-add-task-row .hub-add-task,.hub-link,.hub-calc,
.hub-pill-chip,.hub-pill-chip.is-solid,.hub-group-head .hub-pill-chip,
.hub-column-menu,.hub-column-menu .hub-menu-label,
.hub-column-menu .hub-column-action,.hub-pick-item,
.hub-pick-search,.hub-field-type,.hub-query-error {font-size:14px}
.hub-pill-chip,.hub-pill-chip.is-solid{line-height:20px}
.hub-group-head .hub-pill-chip{min-height:20px}

/* Group status is a compact label, not full-size table text. */
.hub-group-head .hub-pill-chip{font-size:12px;line-height:18px;min-height:18px}

/* Standard Comments column. Icon-only while the count is zero, icon+count once the task
   has comments. The whole cell is the button, so it is reachable with the keyboard. */
.hub-comments-cell{display:inline-flex;align-items:center;gap:5px;height:26px;padding:0 5px;border:0;border-radius:6px;background:none;color:var(--hub-text,#111827);font:inherit;font-size:14px;line-height:1;cursor:pointer}
.hub-comments-cell:hover{background:var(--hub-hover,#f3f4fb)}
.hub-comments-cell:focus-visible{outline:2px solid var(--hub-primary,#5268d9);outline-offset:1px}
.hub-comments-cell .hub-monochrome-icon{font-size:15px;color:var(--hub-text-muted,#778297)}
.hub-comments-cell:hover .hub-monochrome-icon{color:var(--hub-primary,#5268d9)}
.hub-comments-count{font-variant-numeric:tabular-nums;font-size:13px;color:var(--hub-text,#111827)}
.hub-td.is-comments-open{outline:2px solid var(--hub-primary,#5268d9);outline-offset:-2px}
