/* 终端：页面安静，终端本身是深色的“窗口” */
.main:has(.crew-workspace){max-width:none;padding:32px 40px 24px}
.crew-workspace{min-width:0;display:flex;flex-direction:column}
.crew-heading{display:flex;align-items:flex-end;justify-content:space-between;gap:16px;margin-bottom:20px}
.crew-eyebrow{font-size:13px;color:var(--ink-3);margin-bottom:6px}
.crew-heading h1{margin:0;font-size:30px;line-height:1.2;font-weight:650;letter-spacing:-.02em;overflow-wrap:anywhere}
.crew-heading p{font-size:13px;color:var(--ink-3);margin:8px 0 0}
.crew-local{display:inline-flex;align-items:center;gap:7px;font-size:12.5px;color:var(--ink-3);white-space:nowrap}
.crew-local i{width:7px;height:7px;border-radius:50%;background:var(--done)}
.crew-toolbar{display:flex;align-items:center;gap:12px;justify-content:space-between;padding:8px 8px 8px 16px;background:var(--surface);border-radius:14px;box-shadow:var(--shadow-1)}
.crew-directory{display:flex;align-items:center;gap:12px;min-width:0;flex:1;max-width:720px;font-size:12.5px;color:var(--ink-3);white-space:nowrap}
.crew-directory select{flex:1;min-width:0;height:34px;font:12.5px/1.5 var(--mono);text-overflow:ellipsis;box-shadow:none;background-color:var(--surface-2)}
.crew-launch{display:flex;gap:8px;flex-shrink:0}.crew-launch .btn{height:34px}
.crew-alert{margin-top:12px;padding:10px 14px;border-radius:var(--r-s);color:var(--block);background:color-mix(in srgb,var(--block) 9%,transparent);font-size:12.5px;overflow-wrap:anywhere}
.crew-session-bar{display:flex;justify-content:space-between;align-items:center;gap:12px;margin:22px 0 10px}
.crew-session-bar>div{display:flex;align-items:center;gap:10px}
.crew-section-label{font-size:15px;font-weight:650}
.crew-count{font-size:12.5px;color:var(--ink-3)}
.crew-session-bar .crew-view{gap:2px;padding:3px;background:var(--surface-2);border-radius:10px}
.crew-view button{height:26px;padding:0 10px;border:0;border-radius:7px;background:transparent;color:var(--ink-3);font-size:12.5px;cursor:pointer}
.crew-view button[aria-pressed=true]{background:var(--surface);color:var(--ink);font-weight:550;box-shadow:var(--shadow-1)}
.crew-session-tabs{display:flex;gap:6px;overflow-x:auto;min-width:0;padding:2px 2px 12px;scrollbar-width:thin}
.crew-session-tab{flex:0 0 auto;display:flex;align-items:center;gap:8px;height:34px;padding:0 12px;border:0;border-radius:10px;background:transparent;color:var(--ink-2);font-size:12.5px;cursor:pointer;box-shadow:inset 0 0 0 1px var(--rule-2)}
.crew-session-tab small{font-size:11.5px;color:var(--ink-3)}
.crew-session-tab:hover{background:var(--surface)}
.crew-session-tab[aria-pressed=true]{background:var(--surface);color:var(--ink);font-weight:550;box-shadow:var(--shadow-1)}
.crew-terminals{display:grid;grid-template-columns:minmax(0,1fr);gap:12px;min-width:0}.crew-terminals.is-split{grid-template-columns:repeat(2,minmax(0,1fr))}
.crew-terminal{min-width:0;display:flex;flex-direction:column;background:#141413;border-radius:14px;overflow:hidden;box-shadow:0 0 0 1px rgba(0,0,0,.25),0 18px 40px -16px rgba(0,0,0,.45)}
.crew-terminal-head{display:flex;align-items:center;gap:10px;padding:0 12px;min-height:40px;background:#1C1C1A;color:#E6E4DE;flex-wrap:wrap}
.crew-terminal-head strong{font-size:12.5px;font-weight:600;min-width:0;max-width:40%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.crew-process-state{display:inline-flex;align-items:center;gap:6px;font-size:11.5px;color:#9C998F}
.crew-process-state::before{content:'';width:6px;height:6px;border-radius:50%;background:#77746B}
.crew-terminal[data-state=connected] .crew-process-state::before{background:#4FC08A}.crew-terminal[data-state=offline] .crew-process-state{color:#E2B86A}
.crew-stop,.crew-resume,.crew-rename{height:24px;padding:0 8px;border:0;border-radius:6px;background:transparent;color:#B5B2A8;font-size:11.5px;cursor:pointer}
.crew-stop{margin-left:auto}.crew-stop:hover{color:#FFB4A9;background:rgba(255,120,100,.12)}.crew-stop:disabled{opacity:.45;cursor:default}
.crew-resume{color:#E2C88F}.crew-rename:hover,.crew-resume:hover{color:#fff;background:rgba(255,255,255,.08)}
.crew-terminal-path{padding:5px 14px;background:#181816;color:#7C796F;font:11px/1.5 var(--mono);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.crew-terminal-notice{padding:7px 14px;color:#E2C88F;background:#2A2518;font-size:12px;overflow-wrap:anywhere}
.crew-terminal-host{height:clamp(260px,calc(100dvh - 380px),900px);min-width:0;padding:0;overflow:hidden}.crew-terminal-host .xterm{height:100%;padding:12px 10px 10px 14px}.crew-terminal-host .xterm-viewport{scrollbar-width:thin;scrollbar-color:#3A3935 #141413}
.crew-empty{min-height:360px;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;border-radius:18px;background:var(--surface);box-shadow:var(--shadow-1);padding:32px 20px;color:var(--ink-3)}
.crew-empty-mark{display:grid;place-items:center;width:52px;height:52px;margin-bottom:18px;border-radius:14px;background:#1C1C1A;color:#E6E4DE;font:500 18px/1 var(--mono)}
.crew-empty h2{margin:0 0 6px;font-size:16px;font-weight:650;color:var(--ink)}
.crew-empty p{margin:0 0 14px;font-size:13px;line-height:1.8}
.crew-footer{display:flex;justify-content:space-between;gap:16px;margin-top:14px;font-size:11.5px;color:var(--ink-3)}.crew-footer span:last-child{white-space:nowrap}
.crew-session-search{display:block;margin:0 0 10px;max-width:360px}
.crew-session-search input,.crew-project-search{width:100%;height:32px;font-size:12.5px}
.crew-project-list{max-height:52vh;overflow:auto}
.crew-session-tab[hidden],.crew-project-list a[hidden],.crew-rename-form[hidden]{display:none}
.crew-rename-form{display:flex;gap:6px;padding:8px 12px;background:#1C1C1A}
.crew-rename-form input{min-width:0;flex:1;height:28px;font-size:12.5px}
.crew-rename-form .btn{height:28px}
.crew-terminals.is-grid .crew-terminal-host{height:clamp(200px,calc((100dvh - 460px)/2),450px)}
@media(max-width:1100px){.main:has(.crew-workspace){padding:24px 20px}.crew-toolbar{flex-wrap:wrap}.crew-directory{flex-basis:100%;max-width:none}.crew-terminals.is-split{grid-template-columns:minmax(0,1fr)}.crew-terminals.is-split .crew-terminal-host,.crew-terminals.is-grid .crew-terminal-host{height:380px}.crew-footer{flex-wrap:wrap;gap:4px}}
@media(max-width:600px){.main:has(.crew-workspace){padding:18px 12px}.crew-heading h1{font-size:24px}.crew-local{display:none}.crew-launch{width:100%}.crew-launch .btn{flex:1}.crew-terminal-host{height:440px}.crew-footer span:last-child{display:none}}
