/* 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; }
.btn[disabled] { opacity: 0.55; cursor: default; }
.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); }
.insp-empty { color: var(--ink-2); font-size: 12.5px; padding: 30px 6px; text-align: center; }

.btn { font-size: 12.5px; font-weight: 600; padding: 6px 12px; border-radius: 7px; border: 1px solid var(--line); background: var(--tile); color: var(--ink); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 6px; white-space: nowrap; }
.btn:hover { background: var(--card-hover); }
.btn.primary { background: var(--sel); border-color: var(--sel); color: var(--on-sel); }
.btn.small { font-size: 11.5px; padding: 3px 9px; border-radius: 6px; }
.tbl-wrap { overflow-x: auto; }

@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 16px 16px; }
  .inspector { padding: 16px; }
  .tbl th { top: 0; }
  .list-bar { position: static; }
  .search { flex: 1 1 100%; min-width: 0; }
}
.tbl tbody tr[aria-selected="true"] .pill { background: rgba(255, 255, 255, 0.22); }
/* Bảng trong trang danh sách: không bọc cuộn ngang ở màn rộng để tiêu đề cột dính theo vùng cuộn của trang */
.list-main .tbl-wrap { overflow: visible; }
@media (max-width: 1100px) { .list-main .tbl-wrap { overflow-x: auto; } .list-main .tbl th { position: static; } }
.list-main .tbl { table-layout: fixed; }
.list-main .tbl td { max-width: none; }
@media (max-width: 1100px) { .list-main .tbl { min-width: 760px; } }
