/* 窗口管理：后端状态、伴侣、工作机（拖动排序 / 左滑移除）、tmux 里还没接的窗口、接入新工作机 */
.wm { flex: 1; min-height: 0; overflow-y: auto; padding: 18px 18px calc(28px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 16px; }
.be { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 16px; }
.be .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--ok); flex: none; }
.be.bad .dot { background: var(--err-ink); }
.be .t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.be .t b { font-size: 14px; font-weight: 500; }
.be .t small { font-family: var(--font-mono); font-size: 11px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.be button { height: 32px; padding: 0 12px; border-radius: 16px; font-size: 12.5px; }
.wm-label { display: flex; align-items: center; justify-content: space-between; font-size: 12px; font-weight: 500; letter-spacing: .2em; color: var(--ink-3); margin-bottom: -6px; }
.wm-label small { font-size: 11.5px; font-weight: 400; letter-spacing: 0; }

.comp-card { border-radius: 18px; padding: 14px 16px; display: flex; flex-direction: column; gap: 12px; }
.comp-card .top { display: flex; align-items: center; gap: 12px; }
.comp-card .ava { width: 44px; height: 44px; font-family: var(--font-serif); font-size: 18px; font-weight: 700; }
.comp-card .top .t { display: flex; flex-direction: column; flex: 1; }
.comp-card .top .t b { font-size: 16px; font-weight: 700; }
.comp-card .top .t small { font-size: 12px; color: var(--ink-3); }
.kv { display: grid; grid-template-columns: 72px minmax(0, 1fr); row-gap: 10px; font-size: 13px; align-items: center; }
.kv > span:nth-child(odd) { color: var(--ink-3); }
.kv .mono { font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.btn-row { display: flex; gap: 8px; }
.btn-row button { flex: 1; height: 38px; border-radius: 12px; font-size: 13px; text-align: center; }

/* 工作机列表 */
.wl-list { border-radius: 18px; padding: 4px; display: flex; flex-direction: column; position: relative; }
.wrow-wrap { position: relative; overflow: hidden; border-radius: 14px; }
.wrow-wrap + .wrow-wrap { border-top: 2px solid transparent; border-image: var(--crease) 1; }
.wrow-wrap:not(.swiping) .wrow-del { visibility: hidden; }   /* 不滑的时候藏起来，免得边上透出红色 */
.wrow-del { position: absolute; right: 0; top: 0; bottom: 0; width: 84px; display: flex; align-items: center; justify-content: center; color: #fff; background: var(--err-ink); font-size: 13px; }
.wrow { position: relative; display: flex; align-items: center; gap: 8px; min-height: 64px; padding-right: 6px; background: var(--paper); transition: transform .25s var(--ease-paper); touch-action: pan-y; }
.wrow.dragging { z-index: 5; transition: none; box-shadow: var(--raise-l); border-radius: 14px; }
.wrow .handle { width: 30px; height: 44px; display: flex; align-items: center; justify-content: center; flex: none; color: var(--ink-4); cursor: grab; touch-action: none; }
.wrow .handle svg { width: 14px; height: 14px; }
.wrow .ava { width: 34px; height: 34px; border-radius: 10px; font-family: var(--font-mono); font-size: 12px; font-weight: 500; flex: none; }
.wrow.off .ava { background: var(--well-2); box-shadow: var(--well-in-s); color: var(--ink-3); }
.wrow .t { flex: 1; min-width: 0; display: flex; flex-direction: column; text-align: left; }
.wrow .t span { display: flex; align-items: center; gap: 6px; }
.wrow .t b { font-size: 15px; font-weight: 700; }
.wrow .t small { font-family: var(--font-mono); font-size: 11px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wrow > svg { width: 14px; height: 14px; color: var(--ink-3); flex: none; }
.st-pill { font-style: normal; height: 20px; padding: 0 8px; border-radius: 10px; font-size: 11px; display: inline-flex; align-items: center; background: var(--well); color: var(--ink-3); }
.st-pill.online { background: #E4EDE3; color: #3F6A47; }
.st-pill.busy { background: #F5E1D7; color: var(--accent-ink); }
.wm-empty { padding: 18px 12px; font-size: 13px; color: var(--ink-3); }

/* 还没接的窗口 */
.free { border-radius: 16px; padding: 4px 12px; }
.free-row { display: flex; align-items: center; gap: 10px; min-height: 52px; }
.free-row + .free-row { border-top: 2px solid transparent; border-image: var(--crease) 1; }
.free-row .mono { flex: 1; min-width: 0; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.free-row .mono small { font-size: 11.5px; color: var(--ink-3); }
.free-row button { height: 32px; padding: 0 14px; border-radius: 16px; font-size: 12.5px; flex: none; }
.wm-tip { margin: 2px 4px 0; font-size: 12px; line-height: 1.7; color: var(--ink-3); }

/* 接入新工作机 */
.nw { display: flex; flex-direction: column; gap: 14px; }
.nw .field > span { width: 56px; }
.nw-sub { font-size: 13px; color: var(--ink-3); margin-bottom: -6px; }
.nw-opts { display: flex; flex-direction: column; gap: 8px; }
.nw-opt { display: flex; align-items: center; gap: 12px; min-height: 50px; padding: 0 14px; border-radius: 14px; background: var(--well); box-shadow: var(--well-in-s); text-align: left; }
.nw-opt .mark { width: 20px; height: 20px; border-radius: 50%; flex: none; background: var(--well-2); box-shadow: var(--well-in-s); display: flex; align-items: center; justify-content: center; }
.nw-opt[aria-checked="true"] { background: var(--paper); box-shadow: var(--raise-s); }
.nw-opt[aria-checked="true"] .mark { background: var(--accent); box-shadow: none; }
.nw-opt[aria-checked="true"] .mark::after { content: ''; width: 7px; height: 7px; border-radius: 50%; background: #fff; }
.nw-opt .mono { font-size: 13.5px; }
.nw-opt .mono + .mono { font-size: 11.5px; color: var(--ink-3); }
.nw-opt .tag { margin-left: auto; align-self: center; }
.agent-seg { display: flex; gap: 8px; }
.agent-seg button { flex: 1; height: 40px; border-radius: 12px; font-size: 13.5px; text-align: center; color: var(--ink-2); background: var(--well); box-shadow: var(--well-in-s); }
.agent-seg button[aria-checked="true"] { background: var(--paper); box-shadow: var(--raise-s); color: var(--ink); font-weight: 700; }
.probe { border-radius: 12px; padding: 12px 14px; font-family: var(--font-mono); font-size: 11.5px; line-height: 1.7; color: var(--deep-ink-2); min-height: 44px; }
.probe .ok { color: #A8D3A6; }
.probe .no { color: var(--deep-err); }
.nw-btns { display: flex; gap: 10px; }
.nw-btns button { flex: 1; height: 50px; border-radius: 25px; font-size: 15px; text-align: center; }
.nw-btns .btn-accent { flex: 1.4; font-size: 16px; }
.nw-btns button[disabled] { opacity: .45; cursor: default; }
