/* agents screen styles (team round, 23.11.2026). Loaded after screens.css; prefix screen-only classes. */

/* ---- List: one card per agent. Two cards per row at 992 px; names and addresses wrap, never cut. ---- */
.ag-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: var(--sp-4); align-items: stretch; }
.ag-grid > * { min-width: 0; }
.ag-card .ag-hd { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; align-items: start; gap: 12px; }
.ag-title { min-width: 0; padding-top: 1px; }
.ag-name { font-weight: 700; font-size: var(--fs-md); line-height: 1.35; overflow-wrap: break-word; }
.ag-addr { margin-top: 2px; font-family: var(--font-mono); font-size: var(--fs-xs); color: var(--text-muted); overflow-wrap: anywhere; }
.ag-ver { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; margin-top: 2px; font-size: var(--fs-xs); color: var(--text-muted); }
.ag-ver { min-height: 18px; }
.ag-ver .pill { height: 18px; padding-top: 0; padding-bottom: 0; font-size: 11px; }
.ag-card .ag-hd > .pill { margin-top: 2px; }
.ag-card .ag-facts .k { white-space: normal; overflow: visible; }
.ag-upd { display: flex; align-items: center; gap: 6px; font-size: var(--fs-xs); color: #93C5FD; }
.ag-upd svg { width: 13px; height: 13px; flex: none; }
.ag-upd.none { color: var(--text-muted); }
.ag-card .ag-foot { margin-top: auto; }

/* ---- Detail ---- */
/* Three current values in one card, one column each. */
.ag-res { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 0; }
.ag-res-i { padding: 16px 20px; display: flex; flex-direction: column; gap: 4px; }
.ag-res-i + .ag-res-i { border-left: 1px solid var(--border-subtle); }
.ag-res-k { font-size: var(--fs-xs); color: var(--text-muted); }
.ag-res-v { font-family: var(--font-mono); font-size: 22px; font-weight: 700; line-height: 1.2; }
.ag-res-v.warning { color: #FCD34D; }

/* Assigned Devices (wide) beside Identity (narrow). */
.ag-ov { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: var(--sp-4); align-items: stretch; }
.ag-devs { display: flex; flex-direction: column; }
.ag-dev { display: grid; grid-template-columns: 24px minmax(0, 1.1fr) minmax(0, 0.8fr) minmax(0, 1.5fr) 150px; align-items: center; gap: 12px; padding: 9px 10px; border-top: 1px solid var(--border-subtle); color: inherit; text-decoration: none; font-size: var(--fs-sm); line-height: 1.4; }
.ag-dev.hd { border-top: none; padding-top: 0; font-size: var(--fs-xs); color: var(--text-muted); }
a.ag-dev:hover { background: var(--bg-hover); }
.ag-dev > * { min-width: 0; overflow-wrap: break-word; }
.ag-dev .ic-s { display: inline-flex; align-items: center; justify-content: center; color: var(--text-muted); }
.ag-dev .ic-s svg { width: 15px; height: 15px; }
.ag-dev svg.ic { width: 12px; height: 12px; vertical-align: -1px; }
.ag-where .mono { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.ag-kv { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 10px 16px; margin: 0; font-size: var(--fs-sm); line-height: 1.5; }
.ag-kv dt { color: var(--text-muted); }
.ag-kv dd { margin: 0; min-width: 0; overflow-wrap: break-word; }
.ag-kv dd.mono { font-size: var(--fs-xs); line-height: 21px; font-weight: 400; overflow-wrap: anywhere; }

/* Diagnostics: one row per check, result on the right of the row. */
.ag-check { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, auto) auto; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 8px; background: var(--bg-elevated); font-size: var(--fs-sm); }
.ag-check-t { min-width: 0; }
.ag-check-r { text-align: right; min-width: 0; }
.ag-check-r svg { width: 12px; height: 12px; vertical-align: -1px; }
.ag-running { display: inline-flex; align-items: center; gap: 6px; }
.ag-running .spinner { width: 12px; height: 12px; }
