/* Bảng kiểu "Processes" của Pulse: thanh lọc + bảng sắp xếp được + inspector bên phải cho dòng đang chọn. */
.list-page { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 0; margin: -4px -24px -28px; min-height: calc(100% + 32px); }
.list-page.no-inspector { grid-template-columns: minmax(0, 1fr); }
.list-main { min-width: 0; padding: 0 16px 24px 24px; }
.list-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 2px 0 12px; position: sticky; top: 0; background: var(--win); z-index: 2; }
.search { display: flex; align-items: center; gap: 6px; background: var(--seg-bg); border-radius: 8px; padding: 0 9px; height: 28px; min-width: 200px; flex: 0 1 260px; }
.search svg { width: 14px; height: 14px; fill: none; stroke: var(--ink-3); stroke-width: 2; stroke-linecap: round; flex: none; }
.search input { border: 0; background: transparent; font: inherit; font-size: 12.5px; color: var(--ink); outline: none; width: 100%; }
.list-bar .count { margin-left: auto; font-size: 12px; color: var(--ink-2); }

.tbl { width: 100%; border-collapse: collapse; font-size: 12.5px; font-variant-numeric: tabular-nums; }
.tbl th { position: sticky; top: 42px; background: var(--win); z-index: 1; text-align: right; font-weight: 500; font-size: 11.5px; color: var(--ink-2); padding: 6px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; cursor: pointer; user-select: none; }
.tbl th:first-child, .tbl td:first-child { text-align: left; }
.tbl th.is-text, .tbl td.is-text { text-align: left; }
.tbl th[aria-sort] { color: var(--ink); font-weight: 600; }
.tbl th[aria-sort="descending"]::after { content: ' ⌄'; }
.tbl th[aria-sort="ascending"]::after { content: ' ⌃'; }
.tbl td { padding: 5px 8px; text-align: right; white-space: nowrap; border-bottom: 1px solid color-mix(in srgb, var(--line) 55%, transparent); max-width: 260px; overflow: hidden; text-overflow: ellipsis; }
.tbl tbody tr { cursor: pointer; }
.tbl tbody tr:hover td { background: color-mix(in srgb, var(--ink) 4%, transparent); }
.tbl tbody tr[aria-selected="true"] td { background: var(--sel); color: var(--on-sel); }
.tbl tbody tr[aria-selected="true"] td * { color: inherit !important; }
.tbl td .muted, .tbl .muted { color: var(--ink-3); }
.tbl td .hot { color: var(--orange); font-weight: 600; }
.tbl td .bad { color: var(--red); font-weight: 600; }
.name-cell { display: flex; align-items: center; gap: 8px; min-width: 0; }
.name-cell span { overflow: hidden; text-overflow: ellipsis; }
.kind-icon { width: 18px; height: 18px; border-radius: 5px; background: var(--k, var(--gray)); display: grid; place-items: center; flex: none; }
.kind-icon svg { width: 11px; height: 11px; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.pill { display: inline-block; font-size: 11px; font-weight: 600; padding: 1px 8px; border-radius: 999px; background: var(--s); color: var(--c); }

.inspector { border-left: 1px solid var(--line); padding: 14px 18px 24px; min-width: 0; overflow-y: auto; position: sticky; top: 0; max-height: calc(100vh - 60px); }
.insp-head { display: flex; align-items: flex-start; gap: 11px; margin-bottom: 14px; padding-right: 22px; }
.insp-head .kind-icon { width: 34px; height: 34px; border-radius: 9px; }
.insp-head .kind-icon svg { width: 19px; height: 19px; }
.insp-head b { display: block; font-size: 15px; font-weight: 700; word-break: break-word; }
.insp-head small { display: block; font-size: 11.5px; color: var(--ink-2); }
.insp-close { position: absolute; top: 10px; right: 10px; border: 0; background: transparent; color: var(--ink-3); cursor: pointer; font-size: 18px; line-height: 1; padding: 2px 4px; }
.insp-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 14px; }
.insp-actions .btn { width: 100%; white-space: nowrap; }
.btn[disabled] { opacity: 0.55; cursor: default; }
.insp-tile { border-radius: 12px; padding: 10px 12px 12px; background: var(--s); margin-bottom: 10px; }
.insp-tile .tile-head { display: flex; justify-content: space-between; align-items: baseline; font-size: 12.5px; margin-bottom: 8px; }
.insp-tile .tile-head span { color: var(--c); font-weight: 600; }
.insp-tile .tile-head b { font-variant-numeric: tabular-nums; }
.insp-tile .dots { padding: 0; background: transparent; }
.insp-sec { font-size: 11px; font-weight: 600; color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.04em; margin: 16px 0 8px; }
.insp-text { font-size: 12.5px; color: var(--ink); margin: 0 0 8px; }
.insp-text.muted { color: var(--ink-2); }
.steps { margin: 0; padding-left: 18px; font-size: 12.5px; display: flex; flex-direction: column; gap: 5px; }
.insp-empty { color: var(--ink-2); font-size: 12.5px; padding: 30px 6px; text-align: center; }

@media (max-width: 1100px) {
  .list-page { grid-template-columns: minmax(0, 1fr); }
  .inspector { border-left: 0; border-top: 1px solid var(--line); position: relative; max-height: none; padding: 16px 24px; }
}
@media (max-width: 760px) {
  .list-page { margin: -4px -16px -24px; }
  .list-main { padding: 0 0 16px 16px; overflow-x: auto; }
  .inspector { padding: 16px; }
  .tbl th { top: 0; }
  .list-bar { position: static; padding-right: 16px; }
  .list-bar .seg { max-width: 100%; overflow-x: auto; }
  .search { flex: 1 1 100%; }
}
.tbl tbody tr[aria-selected="true"] .pill { background: rgba(255, 255, 255, 0.22); }

/* Gom nhóm trong bảng: dòng tiêu đề nhóm (bấm thu gọn), số dòng, tóm tắt, nút phễu lọc phạm vi */
.group-pick { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-2); }
.group-pick select { font: inherit; font-size: 12.5px; font-weight: 600; color: var(--ink); background: var(--seg-bg); border: 0; border-radius: 7px; padding: 4px 8px; cursor: pointer; }
.tbl tr.grp td { background: var(--card); padding: 7px 8px; border-bottom: 1px solid var(--line); text-align: left; max-width: none; cursor: pointer; }
.tbl tr.grp:hover td { background: var(--card-hover); }
.tbl tr.grp:focus-visible { outline: 2px solid var(--sel); outline-offset: -2px; }
.grp-head { display: flex; align-items: center; gap: 8px; min-width: 0; }
.grp-chev { width: 7px; height: 7px; border-right: 1.7px solid var(--ink-2); border-bottom: 1.7px solid var(--ink-2); transform: rotate(45deg); margin: 0 3px 3px 2px; transition: transform 0.15s; flex: none; }
.tbl tr.grp[aria-expanded="false"] .grp-chev { transform: rotate(-45deg); margin-bottom: 0; }
.grp-head i { width: 9px; height: 9px; border-radius: 3px; background: var(--k); flex: none; }
.grp-head b { font-size: 12.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.grp-count { font-size: 11px; font-weight: 600; color: var(--ink-2); background: var(--seg-bg); border-radius: 999px; padding: 0 7px; }
.grp-sum { margin-left: auto; font-size: 11.5px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.grp-scope { border: 0; background: transparent; width: 24px; height: 22px; border-radius: 6px; display: grid; place-items: center; cursor: pointer; color: var(--ink-3); flex: none; }
.grp-scope:hover { background: var(--seg-bg); color: var(--blue); }
.grp-scope svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }
.list-top { padding: 4px 0 16px; }
.list-bar .btn { margin-left: 4px; }
