/* GENERATED by scripts/port_pi_components.py from Project_Intelligence_Dashboard.html @ 7afb7bb.
   Verbatim copies of PI's components — change PI, then re-run. Do not edit here. */

/* ── table layout controls (PI) ── */
/* ── Table layout controls (ported from Fleet Intelligence, Nik 2026-09-01):
   drag a heading to move a column, drag its right edge to resize, right-click
   it to freeze/unfreeze (pin-left). Layouts persist per table per browser.
   Same interaction grammar as Fleet: green drop-edge indicators, sticky .frz
   block on the left, context menu on the heading. */
/* NOT scoped to .tbl-scroll: the tabs wrap tables in five different classes
   (pivot-scroll, txn-scroll, code-tbl-wrap, bpivot-scroll, tbl-scroll) and
   some in none — the first ship scoped these and the Actual tab got nothing
   (found live, 2026-09-01). Sticky pins to the nearest scrolling ancestor,
   whatever its class. */
th[draggable] { cursor:grab; }
th.pt-dropL { box-shadow:inset 2px 0 0 #1a9a52; }
th.pt-dropR { box-shadow:inset -2px 0 0 #1a9a52; }
td.ptfrz { position:sticky; z-index:1; background:var(--card,#252323); }
thead th.ptfrz { position:sticky; z-index:12; background:var(--dark,#1C1A1B); }
body.premium-tables tbody tr:nth-child(even) td.ptfrz { background:#2a292c; }
body.light td.ptfrz { background:#fff; }
body.light.premium-tables tbody tr:nth-child(even) td.ptfrz { background:#f7f8fa; }
th.ptfrz-edge, td.ptfrz-edge { box-shadow:inset -2px 0 0 var(--bdr2,#3a3a3e); }
/* Once a table has customised widths (fixed layout), narrowed cells CLIP to an
   ellipsis instead of forcing the column wide — hover shows the full text. */
table[data-pt-fixed] th, table[data-pt-fixed] td {
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.pt-hide { display:none !important; }
/* Grips need a positioned th. .tbl-scroll ths are sticky already; other
   table families are not guaranteed to be, so give enhanced ths a default. */
table[data-pt-enh] thead th { position:sticky; top:0; }
.pt-grip { position:absolute; top:0; right:0; width:7px; height:100%; cursor:col-resize; user-select:none; }
.pt-grip:hover { background:rgba(209,33,40,.35); }
#pt-colmenu { position:fixed; z-index:900; display:none; background:var(--dark,#1C1A1B);
  border:1px solid var(--bdr2,#3a3a3e); border-radius:8px; box-shadow:0 8px 24px rgba(0,0,0,.5);
  padding:4px; min-width:180px; font-family:var(--fb); font-size:11px; }
#pt-colmenu button { display:block; width:100%; text-align:left; background:none; border:0;
  padding:7px 10px; border-radius:6px; cursor:pointer; color:var(--t1,#f5f5f5); font:inherit; }
#pt-colmenu button:hover { background:rgba(209,33,40,.14); color:var(--ct-red,#D12128); }

/* Project List rows: neutralize ALL background tints (hover, selected,
   clickable-row, data-row:hover) so every row reads as the same color as
   the table background. The earlier wine-colored highlight was coming from
   inherited .data-row:hover / .clickable-row rules; this override wins
   because it's table-scoped. Pinned columns 1+2 still need the explicit
   --navy background since they're position:sticky and have to stay opaque
   on top of the scrolling columns. */
.projlist-tbl tr.data-row td,
.projlist-tbl tr.data-row:hover td,
.projlist-tbl tr.data-row.clickable-row:hover td,
.projlist-tbl tr.data-row.selected td {
  background: transparent !important;
  box-shadow: none !important;
  border-left: none !important;
}
.projlist-tbl tr.data-row td:nth-child(1),
.projlist-tbl tr.data-row td:nth-child(2),
.projlist-tbl tr.data-row:hover td:nth-child(1),
.projlist-tbl tr.data-row:hover td:nth-child(2) {
  background: var(--navy) !important;
  background-image: none !important;
}

/* Project List: freeze the first two columns (Project ID + Description) so
   they stay in view while horizontally scrolling through the EVMS columns.
   Data-row cells use --navy (matches body backdrop in both themes; was
   incorrectly --card #fff before, which is only defined for body.light and
   turned the pinned cells white in dark mode). Headers use --dark (matches
   the existing sticky header bar). z-index layering: pinned header > pinned
   data > regular header > regular data. */
.projlist-tbl th:nth-child(1),
.projlist-tbl td:nth-child(1) {
  position: sticky; left: 0;
  background: var(--navy); z-index: 5;
  box-shadow: 1px 0 0 var(--bdr);
}
.projlist-tbl th:nth-child(2),
.projlist-tbl td:nth-child(2) {
  position: sticky; left: 100px;
  background: var(--navy); z-index: 5;
  box-shadow: 1px 0 0 var(--bdr);
}
/* Header cells in pinned columns need higher z-index than non-pinned headers
   (z-index:10 set globally) so they stay on top in the corner. */
.tbl-scroll .projlist-tbl thead th:nth-child(1),
.tbl-scroll .projlist-tbl thead th:nth-child(2) {
  z-index: 15;
  background: var(--dark);
}
/* Footer total row keeps its faint highlight even when pinned. */
.projlist-tbl tr.projlist-total td:nth-child(1),
.projlist-tbl tr.projlist-total td:nth-child(2) {
  background: var(--dark);
}
/* Hover: the global `.data-row:hover td` rule (line ~407) uses translucent
   var(--hover) with !important, which makes pinned cells see-through and
   exposes the scrolling content behind them (reported on PJ908 et al.).
   Layer the hover tint OVER an opaque navy base so the sticky cells stay
   solid while still showing the hover lift. */
.projlist-tbl tr.data-row:hover td:nth-child(1),
.projlist-tbl tr.data-row:hover td:nth-child(2) {
  background: linear-gradient(var(--hover), var(--hover)), var(--navy) !important;
}
.projlist-tbl tr.projlist-total:hover td:nth-child(1),
.projlist-tbl tr.projlist-total:hover td:nth-child(2) {
  background: linear-gradient(var(--hover), var(--hover)), var(--dark) !important;
}
.tbl-scroll td {
  padding:5px 8px; border-bottom:1px solid var(--bdr);
  font-family:var(--fb); font-size:10px; color:var(--t1);
  white-space:nowrap;
}
.tbl-scroll td.num {
  text-align:right; font-family:var(--fm); font-size:10px;
}
.tbl-scroll tr:hover td { background:var(--hover); }
.tbl-scroll tr.total td {
  font-weight:700; border-top:2px solid var(--bdr2);
  background:var(--panel);
}

/* ── multi-select dropdown (PI) ── */
/* ── MULTI-SELECT DROPDOWN ── */
.ms-wrap { position:relative; display:inline-block; min-width:200px; }
.ms-btn { display:flex; align-items:center; justify-content:space-between; gap:4px;
  background:rgba(255,255,255,.06); border:1px solid rgba(255,255,255,.20);
  color:#f5f5f5; font-family:var(--fb); font-size:11px; font-weight:400;
  padding:3px 8px; border-radius:3px; cursor:pointer; height:25px; min-width:200px;
  user-select:none; transition:border-color .12s; }
.ms-btn:hover, .ms-btn.open { border-color:var(--ct-red); }
.ms-btn .ms-arrow { font-size:8px; color:var(--t3); transition:transform .15s; }
.ms-btn.open .ms-arrow { transform:rotate(180deg); }
.ms-btn .ms-count { font-family:var(--fm); font-size:8px; background:rgba(209,33,40,.2); color:var(--ct-red); padding:1px 5px; border-radius:2px; }
.ms-drop { display:none; position:absolute; top:100%; left:0; z-index:500; min-width:240px; max-height:280px;
  background:var(--card,#252323); border:1px solid var(--bdr2); border-radius:3px; margin-top:2px;
  box-shadow:0 8px 24px rgba(0,0,0,.4); overflow:hidden; }
.ms-drop.show { display:block; }
.ms-search { width:100%; border:none; border-bottom:1px solid var(--bdr); background:transparent;
  color:var(--t1); font-family:var(--fb); font-size:10px; padding:6px 8px; outline:none; }
.ms-search::placeholder { color:var(--t3); }
.ms-actions { display:flex; gap:0; border-bottom:1px solid var(--bdr); }
.ms-actions button { flex:1; border:none; background:transparent; color:var(--t3); font-family:var(--fb);
  font-size:8px; font-weight:600; text-transform:uppercase; letter-spacing:.5px; padding:4px; cursor:pointer; }
.ms-actions button:hover { color:var(--ct-red); background:rgba(209,33,40,.06); }
.ms-list { overflow-y:auto; max-height:200px; }
.ms-item { display:flex; align-items:center; gap:6px; padding:4px 8px; cursor:pointer; font-family:var(--fb); font-size:10px; color:var(--t2); transition:background .08s; }
.ms-item:hover { background:rgba(255,255,255,.06); }
.ms-item.checked { color:var(--t1); }
.ms-item .ms-check { width:12px; height:12px; border:1px solid var(--bdr2); border-radius:2px; display:flex; align-items:center; justify-content:center; font-size:8px; flex-shrink:0; }
.ms-item.checked .ms-check { background:var(--ct-red); border-color:var(--ct-red); color:#fff; }
/* The include-closed control, mirrored inside the Project dropdown (Nik
   2026-08-26) — that is where you stand when you go looking for a closed job,
   so it is styled as a dropdown row rather than a slicer-bar pill. Same state
   as the bar copy; both are painted by refreshClosedToggle(). */
.ms-toggle { display:flex; align-items:center; gap:6px; padding:5px 8px; cursor:pointer;
  user-select:none; border-bottom:1px solid var(--bdr); font-family:var(--fb);
  font-size:10px; color:var(--t2); white-space:nowrap; }
.ms-toggle:hover { background:rgba(255,255,255,.06); }
.ms-toggle input { width:12px; height:12px; margin:0; accent-color:var(--ct-red); cursor:pointer; }
.ms-toggle:has(input:checked) { color:var(--t1); background:rgba(209,33,40,.10); }
.ms-toggle.loading { opacity:.65; cursor:progress; }
.ms-apply-row { border-top:1px solid var(--bdr); padding:4px 8px; }
.ms-apply { width:100%; border:none; background:var(--ct-red); color:#fff; font-family:var(--fh); font-size:9px;
  font-weight:600; text-transform:uppercase; letter-spacing:.6px; padding:5px; border-radius:2px; cursor:pointer; }
.ms-apply:hover { background:var(--ct-red-dark,#B51D23); }


/* Sticky first column on act-pivot */
.act-pivot td:first-child { position:sticky; left:0; z-index:1; background:var(--card,#252323); }
.act-pivot .grp-hdr td:first-child { background:rgba(255,255,255,.03); }
.act-pivot .grp-total td:first-child { background:var(--panel,rgba(255,255,255,.04)); }
.grp-hdr.open .grp-icon { display:inline-block; }
.grp-child.show { display:table-row; }

/* ── right-click menu (PI) ── */

/* Custom right-click menu — native menu is blocked across the dashboard
   (except in text fields); this is our replacement. Theme-aware via the same
   --panel/--bdr/--t* tokens the tables use, so it flips with light/dark. */
.pi-ctx-menu{
  position:fixed; z-index:10050; min-width:214px; max-width:340px; padding:6px;
  background:var(--panel,#1b1718); border:1px solid var(--bdr2,rgba(255,255,255,.14));
  border-radius:12px; box-shadow:0 18px 48px rgba(0,0,0,.5),0 2px 8px rgba(0,0,0,.4);
  -webkit-backdrop-filter:blur(14px) saturate(1.2); backdrop-filter:blur(14px) saturate(1.2);
  font-family:var(--fb),'Montserrat',sans-serif;
  opacity:0; transform:scale(.97) translateY(-4px); transform-origin:top left;
  transition:opacity .12s ease, transform .12s ease; user-select:none;
}
.pi-ctx-menu.open{opacity:1; transform:scale(1) translateY(0);}
.pi-ctx-header{
  display:flex; align-items:center; padding:7px 10px 8px; margin-bottom:4px;
  font-size:10px; font-weight:700; letter-spacing:.05em; text-transform:uppercase;
  color:var(--t3,rgba(255,255,255,.45)); border-bottom:1px solid var(--bdr,rgba(255,255,255,.08));
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
.pi-ctx-item{
  display:flex; align-items:center; gap:10px; width:100%; box-sizing:border-box;
  padding:9px 11px; border:0; background:transparent; cursor:pointer; border-radius:8px;
  text-align:left; color:var(--t1,rgba(255,255,255,.9)); font-size:12.5px; font-weight:600;
  font-family:inherit; letter-spacing:.01em; transition:background .12s ease, color .12s ease;
}
.pi-ctx-item:hover{ background:rgba(209,33,40,.14); color:var(--ct-red,#D12128); }
.pi-ctx-item .pi-ctx-ico{ display:flex; flex:0 0 15px; color:var(--ct-red,#D12128); opacity:.85; }
.pi-ctx-item:hover .pi-ctx-ico{ opacity:1; }
.pi-ctx-item.disabled{ opacity:.42; cursor:default; }
.pi-ctx-item.disabled:hover{ background:transparent; color:var(--t1,#fff); }
.pi-ctx-sep{ height:1px; background:var(--bdr,rgba(255,255,255,.08)); margin:5px 6px; }
/* Quick project switcher (Nik 2026-07-16): right-click → type → Enter. A
   faster, more intuitive alternate to the header Project dropdown — filters
   the whole dashboard to the picked project. */
.pi-ctx-projsw{ padding:4px 6px 2px; width:292px; }
.pi-ctx-projsw input{
  width:100%; box-sizing:border-box; padding:8px 10px; border-radius:8px;
  border:1px solid var(--bdr2,rgba(255,255,255,.14)); background:rgba(255,255,255,.05);
  color:var(--t1,#fff); font-family:var(--fb),'Montserrat',sans-serif; font-size:12px;
  outline:none; transition:border-color .12s ease;
}
body.light .pi-ctx-projsw input{ background:rgba(0,0,0,.04); }
.pi-ctx-projsw input:focus{ border-color:var(--ct-red,#D12128); }
.pi-ctx-projsw input::placeholder{ color:var(--t3,rgba(255,255,255,.4)); }
.pi-ctx-projsw-list{ margin-top:3px; }
.pi-ctx-projsw-row{
  display:block; width:100%; box-sizing:border-box; text-align:left; border:0; background:transparent;
  padding:7px 10px; border-radius:7px; cursor:pointer; color:var(--t1,rgba(255,255,255,.9));
  font-family:var(--fb),'Montserrat',sans-serif; font-size:11.5px;
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
.pi-ctx-projsw-row .id{ font-family:var(--fm); font-weight:600; }
.pi-ctx-projsw-row .nm{ color:var(--t3,rgba(255,255,255,.45)); }
.pi-ctx-projsw-row.hot, .pi-ctx-projsw-row:hover{ background:rgba(209,33,40,.14); }
.pi-ctx-projsw-row.hot .nm, .pi-ctx-projsw-row:hover .nm{ color:inherit; }
.pi-ctx-projsw-none{ padding:7px 10px; font-size:11px; color:var(--t3,rgba(255,255,255,.45)); }
body.pi-mobile .pi-ctx-menu{ display:none; }
