/* ──────────────────────────────────────────────────────────────────────
   Agents page — flat list with kind column
   ────────────────────────────────────────────────────────────────────── */

.ag-pane {
  display: flex;
  flex-direction: column;
  height: 100vh;
  background: var(--paper-card);
  overflow: hidden;
}

.pg-hdr {
  padding: 22px 32px 16px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 20px;
  align-items: end;
  border-bottom: 1px solid var(--rule-soft);
}
.pg-title {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.1;
  margin: 0;
  font-variation-settings: "opsz" 30, "wdth" 100;
  color: var(--ink);
}
.pg-stats {
  margin-top: 8px;
  font-size: 13px;
  color: var(--ink-3);
}
.pg-stats .num { color: var(--ink-2); font-weight: 600; font-variant-numeric: tabular-nums; }
.pg-stats .sep { color: var(--ink-4); margin: 0 6px; }
.pg-stats .urgent { color: var(--brick); font-weight: 600; }
.pg-stats .running { color: var(--clay); font-weight: 600; }
.pg-hdr .right { display: flex; gap: 6px; }

.pg-chips {
  padding: 14px 32px 8px;
  display: flex; gap: 6px; flex-wrap: wrap;
  border-bottom: 1px solid var(--rule-soft);
}
.pg-chips .chip {
  font-family: var(--sans);
  font-size: 12.5px;
  font-weight: 500;
  padding: 4px 11px;
  background: transparent;
  color: var(--ink-3);
  border: 1px solid var(--rule);
  border-radius: 999px;
  cursor: pointer;
  letter-spacing: -0.003em;
  transition: background 120ms ease, color 120ms ease, border-color 120ms ease;
}
.pg-chips .chip:hover { color: var(--ink); border-color: var(--rule-strong); }
.pg-chips .chip.on {
  background: var(--pill-on-bg);
  color: var(--pill-on-fg);
  border-color: var(--pill-on-bg);
}
.pg-chips .chip .ct {
  font-family: var(--mono);
  color: var(--ink-4);
  margin-left: 5px;
  font-weight: 400;
}
.pg-chips .chip.on .ct { color: var(--pill-on-fg-muted); }

.pg-list {
  flex: 1; min-height: 0;
  overflow-y: auto;
  padding: 8px 0 24px;
}
.pg-empty {
  padding: 64px 32px;
  text-align: center;
  color: var(--ink-3);
  font-size: 13px;
  font-style: italic;
}

.pg-row {
  display: grid;
  grid-template-columns: 1.5fr 90px 1.1fr 140px 110px;
  align-items: center;
  gap: 18px;
  padding: 10px 32px;
  cursor: pointer;
  position: relative;
  transition: background 120ms ease;
}
.pg-row:hover { background: var(--paper-2); }
.pg-row.failed-row .nm { color: var(--brick); }
.pg-row .nm {
  font-size: 14.5px;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.008em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pg-row .kind {
  font-size: 11.5px;
  font-weight: 500;
  white-space: nowrap;
  color: var(--ink-3);
}
.pg-row .kind.eph { color: var(--steel); }
.pg-row .kind.per { color: var(--plum); }
.pg-row .teams {
  display: flex; gap: 4px; flex-wrap: wrap;
}
.pg-row .t-chip {
  font-size: 11.5px;
  padding: 2px 8px;
  background: var(--paper-2);
  color: var(--ink-3);
  border-radius: 3px;
  font-weight: 500;
  white-space: nowrap;
}
.pg-row:hover .t-chip { background: var(--paper-card); }
.pg-row .teams .none {
  font-size: 11.5px;
  color: var(--ink-4);
  font-style: italic;
  font-weight: 400;
}

.pg-row .state {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 12.5px;
  color: var(--ink-3);
  font-weight: 500;
  white-space: nowrap;
}
.pg-row .state .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--ink-4);
  flex-shrink: 0;
}
.pg-row .state.active { color: var(--moss); }
.pg-row .state.active .dot { background: var(--moss); }
.pg-row .state.idle .dot { background: var(--ink-4); }
.pg-row .state.spawning,
.pg-row .state.resuming,
.pg-row .state.suspending { color: var(--clay); }
.pg-row .state.spawning .dot,
.pg-row .state.resuming .dot,
.pg-row .state.suspending .dot { background: var(--clay); }
.pg-row .state.suspended { color: var(--plum); }
.pg-row .state.suspended .dot { background: var(--plum); }
.pg-row .state.failed { color: var(--brick); }
.pg-row .state.failed .dot { background: var(--brick); }

.pg-row .actions {
  display: flex; gap: 2px;
  justify-self: end;
}
.pg-row .actions button {
  background: transparent; border: 0;
  cursor: pointer;
  color: var(--ink-4);
  padding: 5px 7px;
  border-radius: 3px;
  display: inline-flex; align-items: center; justify-content: center;
  transition: color 120ms ease, background 120ms ease;
}
.pg-row:hover .actions button { color: var(--ink-3); }
.pg-row .actions button:hover { color: var(--ink); background: var(--paper-card); }

/* "More" menu */
.row-menu {
  position: fixed;
  background: var(--paper-card);
  border-radius: var(--radius);
  box-shadow:
    0 1px 2px rgba(22,24,28,0.06),
    0 16px 36px -8px rgba(22,24,28,0.22);
  border: 1px solid var(--rule);
  min-width: 220px;
  z-index: 30;
  padding: 5px 0;
}
.row-menu .item {
  display: grid;
  grid-template-columns: 18px 1fr;
  align-items: center;
  gap: 12px;
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-2);
  cursor: pointer;
  letter-spacing: -0.003em;
}
.row-menu .item:hover { background: var(--paper-2); color: var(--ink); }
.row-menu .item .ico {
  color: var(--ink-3);
  display: inline-flex; align-items: center; justify-content: center;
}
.row-menu .item:hover .ico { color: var(--ink); }
.row-menu .item.primary { color: var(--clay); font-weight: 600; }
.row-menu .item.primary .ico { color: var(--clay); }
.row-menu .item.primary:hover { background: var(--clay-soft); }
.row-menu .item.danger { color: var(--brick); }
.row-menu .item.danger .ico { color: var(--brick); }
.row-menu .item.danger:hover { background: var(--brick-bg); color: var(--brick); }
.row-menu .divider {
  height: 1px;
  background: var(--rule);
  margin: 5px 0;
}
