/* PUI flow panels — triage queue, scheduled-hunt rule editor, integrations hub — plus the "brand" skin
   (the original site's #374B8B blue, one shade deeper than the page so the console reads as a screen). */

.pui.skin-brand {
  --pu-bg: #1f2e66; --pu-bg-2: #23346f; --pu-panel: #2a3c7c; --pu-panel-2: #314588; --pu-raise: #384d93;
  --pu-line: rgba(196, 208, 255, .16); --pu-line-2: rgba(196, 208, 255, .3);
  --pu-text: #f3f5ff; --pu-text-2: #c7d0f2; --pu-muted: #95a2d4;
  --pu-accent: #b3c2ff; --pu-accent-2: #d2dbff; --pu-accent-soft: rgba(179, 194, 255, .17); --pu-on-accent: #1f2e66;
  --pu-mitre: #9aadf5;
  --pu-shadow: 0 12px 30px rgba(10, 18, 55, .45);
}

/* --- triage queue --- */
.tq-tiles { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.tq-tile { padding: 12px 14px; border-left: 3px solid var(--c); display: grid; gap: 2px; }
.tq-tile b { font-size: 24px; font-weight: 700; color: var(--c); line-height: 1.1; }
.tq-tile span { font-size: 12.5px; font-weight: 700; }
.tq-tile small { font-size: 10.5px; color: var(--pu-muted); }
.tq-filters { display: flex; gap: 8px; align-items: center; }
.tq-search { flex: 1; display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px; border: 1px solid var(--pu-line); border-radius: 8px; background: var(--pu-panel); color: var(--pu-muted); font-size: 12px; }
.tq-table { position: relative; overflow: hidden; }
.tq-row { display: grid; grid-template-columns: 1fr 150px 150px 150px 92px 78px; gap: 14px; align-items: center; padding: 10px 16px; border-bottom: 1px solid var(--pu-line); border-left: 3px solid var(--sev, transparent); font-size: 12px; transition: background .3s, box-shadow .3s; }
.tq-row.h { font-size: 9.5px; font-weight: 700; letter-spacing: .12em; color: var(--pu-muted); text-transform: uppercase; border-left-color: transparent; padding-top: 8px; padding-bottom: 8px; }
.tq-row .t { font-weight: 700; font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tq-row .t em { font-style: normal; font-weight: 500; color: var(--pu-muted); }
.tq-row .s { font-size: 10.5px; color: var(--pu-muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tq-row .x { font-family: var(--pu-mono); font-size: 9.5px; padding: 1px 5px; border-radius: 4px; box-shadow: inset 0 0 0 1px var(--pu-line-2); color: var(--pu-text-2); margin-right: 6px; }
.tq-row.new { background: var(--pu-accent-soft); }
.tq-row.hover { background: var(--pu-raise); box-shadow: inset 0 0 0 1px var(--pu-accent); }
.tq-row .nb { font-size: 9px; font-weight: 700; letter-spacing: .1em; color: var(--pu-on-accent); background: var(--pu-accent); padding: 2px 6px; border-radius: 4px; margin-right: 6px; vertical-align: 1px; }
.tq-drawer { position: absolute; top: 0; right: 0; bottom: 0; width: 400px; background: var(--pu-bg-2); border-left: 1px solid var(--pu-line-2); box-shadow: -20px 0 50px rgba(0, 0, 0, .25); padding: 20px 22px; display: flex; flex-direction: column; gap: 14px; }
.tq-drawer h4 { margin: 0; font-size: 16px; line-height: 1.3; }
.tq-drawer p { margin: 0; font-size: 12.5px; color: var(--pu-text-2); line-height: 1.55; }
.tq-kv { display: grid; grid-template-columns: 110px 1fr; gap: 7px 12px; font-size: 12px; }
.tq-kv span { color: var(--pu-muted); }
.tq-kv b { font-weight: 600; font-family: var(--pu-mono); font-size: 11.5px; }

/* --- rule editor (scheduled hunt) --- */
.re-steps { display: flex; gap: 10px; align-items: center; padding: 12px 16px; }
.re-step { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; color: var(--pu-muted); white-space: nowrap; }
.re-step i { font-style: normal; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; box-shadow: inset 0 0 0 1px var(--pu-line-2); }
.re-step.done { color: var(--pu-text-2); }
.re-step.done i { background: var(--pu-ok-soft); color: var(--pu-ok); box-shadow: none; }
.re-step.on { color: var(--pu-text); }
.re-step.on i { background: var(--pu-accent); color: var(--pu-on-accent); box-shadow: none; }
.re-line { flex: 1; height: 2px; background: var(--pu-line-2); min-width: 20px; }
.re-card { padding: 14px 16px; display: grid; gap: 10px; }
.re-card .hd { display: flex; justify-content: space-between; align-items: center; font-size: 13px; font-weight: 700; }
.re-q { font-family: var(--pu-mono); font-size: 12px; padding: 10px 12px; border-radius: 7px; background: var(--pu-bg); box-shadow: inset 0 0 0 1px var(--pu-line); }
.re-q .f { color: var(--pu-cyan); }
.re-q .v { color: var(--pu-high); }
.re-q .o { color: var(--pu-purple); font-weight: 700; }
.re-seg { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; padding: 4px; border-radius: 9px; box-shadow: inset 0 0 0 1px var(--pu-line); }
.re-seg span { text-align: center; padding: 8px 6px; border-radius: 6px; font-size: 12px; color: var(--pu-text-2); transition: background .35s, color .35s, box-shadow .35s; }
.re-seg span.on { background: var(--pu-accent-soft); color: var(--pu-text); font-weight: 700; box-shadow: inset 0 0 0 1px var(--pu-accent); }
.re-pills { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.re-pills span { font-size: 11.5px; padding: 5px 10px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--pu-line-2); color: var(--pu-text-2); transition: all .35s; }
.re-pills span.on { background: var(--pu-high-soft); color: var(--pu-high); box-shadow: inset 0 0 0 1px var(--pu-high); font-weight: 700; }
.re-dest { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.re-dest div { display: flex; align-items: center; gap: 9px; padding: 9px 10px; border-radius: 8px; box-shadow: inset 0 0 0 1px var(--pu-line); font-size: 12px; transition: box-shadow .35s, background .35s; }
.re-dest div i { width: 16px; height: 16px; border-radius: 4px; box-shadow: inset 0 0 0 1.5px var(--pu-line-2); display: grid; place-items: center; flex: none; transition: background .35s; }
.re-dest div.on { box-shadow: inset 0 0 0 1px var(--pu-accent); background: var(--pu-accent-soft); }
.re-dest div.on i { background: var(--pu-accent); box-shadow: none; }
.re-dest div.on i::after { content: ""; width: 8px; height: 4px; border-left: 2px solid var(--pu-on-accent); border-bottom: 2px solid var(--pu-on-accent); transform: rotate(-45deg) translate(1px, -1px); }
.re-dest small { display: block; font-size: 10px; color: var(--pu-muted); }
.re-side { padding: 16px; display: grid; gap: 12px; align-content: start; }
.re-sum { display: grid; gap: 8px; font-size: 12px; }
.re-sum div { display: flex; justify-content: space-between; gap: 10px; }
.re-sum span { color: var(--pu-muted); }
.re-pre { height: 8px; border-radius: 4px; background: var(--pu-line); overflow: hidden; }
.re-pre i { display: block; height: 100%; width: 0; background: var(--pu-ok); }
.re-run { display: grid; grid-template-columns: 44px 1fr auto; gap: 10px; align-items: center; font-size: 11.5px; padding: 9px 10px; border-radius: 7px; background: var(--pu-ok-soft); }
.re-run .mono { color: var(--pu-muted); }

/* --- integrations hub --- */
.ig-svg { position: absolute; inset: 0; overflow: visible; }
.ig-svg path { fill: none; stroke: var(--pu-line-2); stroke-width: 1.8; transition: stroke .3s; }
.ig-svg path.lit { stroke: var(--pu-accent); stroke-dasharray: 5 6; }
.ig-node { position: absolute; display: grid; grid-template-columns: 34px 1fr; gap: 1px 10px; align-items: center; padding: 10px 12px; border-radius: 10px; background: var(--pu-panel); border: 1px solid var(--pu-line-2); box-shadow: var(--pu-shadow); width: 210px; transition: border-color .3s, box-shadow .3s; }
.ig-node .pu-ico { grid-row: span 2; width: 34px; height: 34px; }
.ig-node b { font-size: 13px; }
.ig-node span { font-size: 10.5px; color: var(--pu-muted); }
.ig-node.hit { border-color: var(--pu-accent); box-shadow: 0 0 0 4px var(--pu-accent-soft), var(--pu-shadow); }
.ig-hub { position: absolute; width: 150px; height: 150px; border-radius: 50%; display: grid; place-content: center; text-align: center; background: radial-gradient(circle, var(--pu-raise), var(--pu-panel)); border: 1px solid var(--pu-line-2); box-shadow: 0 0 0 10px var(--pu-accent-soft), var(--pu-shadow); }
.ig-hub .x { width: 26px; height: 26px; margin: 0 auto 8px; position: relative; }
.ig-hub .x::before, .ig-hub .x::after { content: ""; position: absolute; background: var(--pu-crit); }
.ig-hub .x::before { left: 9px; top: 0; width: 8px; height: 26px; }
.ig-hub .x::after { top: 9px; left: 0; width: 26px; height: 8px; }
.ig-hub b { font-size: 13px; }
.ig-hub span { font-size: 10px; color: var(--pu-muted); }
.ig-pk { position: absolute; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; background: var(--pu-accent); box-shadow: 0 0 12px var(--pu-accent); opacity: 0; }
.ig-pk.crit { background: var(--pu-crit); box-shadow: 0 0 12px var(--pu-crit); }
.ig-log { position: absolute; top: 76px; right: 20px; bottom: 20px; width: 470px; display: flex; flex-direction: column; gap: 10px; }
.ig-rows { padding: 4px 0; }
.ig-row { display: grid; grid-template-columns: 62px 1fr 44px; gap: 10px; align-items: center; padding: 8px 14px; border-bottom: 1px solid var(--pu-line); font-size: 11.5px; }
.ig-row:last-child { border-bottom: 0; }
.ig-row .mono { font-size: 10.5px; color: var(--pu-muted); }
.ig-row .ev { font-family: var(--pu-mono); font-size: 10.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ig-row .ev small { display: block; font-family: var(--pu-font); color: var(--pu-muted); font-size: 10.5px; }
.ig-row .ok200 { font-family: var(--pu-mono); font-weight: 700; color: var(--pu-ok); text-align: right; }
.ig-code { font-family: var(--pu-mono); font-size: 10.5px; line-height: 1.65; padding: 12px 14px; border-radius: 8px; background: var(--pu-bg); box-shadow: inset 0 0 0 1px var(--pu-line); color: var(--pu-text-2); white-space: pre; overflow: hidden; }
.ig-code .k { color: var(--pu-accent); }
.ig-code .s { color: var(--pu-high); }
.ig-code .m { color: var(--pu-ok); }
