:root{--app-bg: #222426;--bar-bg: #2e3135;--panel-bg: #25282b;--panel-alt: #292c30;--console-bg: #1c1e20;--table-header-bg: #32363a;--row-odd: #24272a;--row-even: #292c2f;--row-hover: #343a40;--row-selected: #244b70;--row-selected-focus: #2c6293;--separator: #42474c;--border: #454a4f;--text: #eceff2;--text-muted: #adb5bd;--disabled: #717b84;--accent: #448cd8;--focus: #6fb5ff;--success: #5bb57c;--warning: #e4b35b;--danger: #d96d6d;--font-ui: system-ui, "Segoe UI", Arial, sans-serif;--font-mono: ui-monospace, "Cascadia Mono", Consolas, monospace;--corner: 2px;--row-height: 28px;--tree-row-height: 26px;--icon-button-size: 34px}*{box-sizing:border-box}html,body{margin:0;padding:0;height:100%;overflow:hidden;background:var(--app-bg);color:var(--text);font-family:var(--font-ui);font-size:12.5px;font-weight:400}button,input,select,textarea{font-family:var(--font-ui);font-size:12.5px;color:var(--text)}::-webkit-scrollbar{width:12px;height:12px}::-webkit-scrollbar-thumb{background:var(--separator);border:3px solid transparent;background-clip:content-box}::-webkit-scrollbar-track{background:transparent}:focus-visible{outline:2px solid var(--focus);outline-offset:-2px}#app{display:flex;flex-direction:column;height:100%}.icon-btn{width:var(--icon-button-size);height:var(--icon-button-size);min-width:var(--icon-button-size);min-height:var(--icon-button-size);display:inline-flex;align-items:center;justify-content:center;background:transparent;color:var(--text);border:1px solid transparent;border-radius:var(--corner);padding:0;cursor:pointer;transition:background-color .12s ease,border-color .12s ease}.icon-btn:hover:not(:disabled){background:var(--row-hover);border-color:var(--border)}.icon-btn:active:not(:disabled){background:var(--separator)}.icon-btn:disabled{color:var(--disabled);cursor:default}.icon-btn.active{background:var(--row-selected);border-color:var(--accent)}.text-btn{height:26px;padding:0 10px;cursor:pointer;background:var(--panel-alt);color:var(--text);border:1px solid var(--border);border-radius:var(--corner);transition:background-color .12s ease}.text-btn:hover:not(:disabled){background:var(--row-hover)}.text-btn:disabled{color:var(--disabled);cursor:default}.text-btn.danger{border-color:var(--danger);color:var(--danger)}.text-btn.primary{background:var(--row-selected);border-color:var(--accent)}.menubar{height:28px;flex:0 0 28px;display:flex;align-items:stretch;background:var(--bar-bg);border-bottom:1px solid var(--border);padding:0 2px;user-select:none}.menubar .menu-item{display:inline-flex;align-items:center;padding:0 10px;cursor:default;border-radius:var(--corner);border:none;background:none;height:100%}.menubar .menu-item:hover,.menubar .menu-item.open{background:var(--row-hover)}.menu-dropdown{position:fixed;z-index:1000;min-width:260px;background:var(--panel-bg);border:1px solid var(--border);border-radius:var(--corner);padding:4px;box-shadow:0 4px 14px #00000080}.menu-row{display:flex;align-items:center;gap:8px;width:100%;padding:5px 10px;border:none;background:none;text-align:left;cursor:pointer;border-radius:var(--corner);color:var(--text)}.menu-row:hover:not(:disabled),.menu-row:focus-visible{background:var(--row-hover);outline:none}.menu-row:disabled{color:var(--disabled);cursor:default}.menu-row .accel{margin-left:auto;color:var(--text-muted);font-size:11.5px}.menu-sep{height:1px;background:var(--separator);margin:4px 6px}.menu-row .ri{width:18px;display:inline-flex;justify-content:center}.toolbar{height:42px;flex:0 0 42px;display:flex;align-items:center;gap:2px;background:var(--bar-bg);border-bottom:1px solid var(--border);padding:0 6px;overflow-x:auto;overflow-y:hidden;scrollbar-width:none}.toolbar::-webkit-scrollbar{display:none}.toolbar .tb-divider{width:1px;height:26px;background:var(--separator);margin:0 4px;flex:0 0 1px}.quickconnect{height:42px;flex:0 0 42px;display:flex;align-items:center;gap:6px;background:var(--bar-bg);border-bottom:1px solid var(--border);padding:0 6px}.quickconnect label{color:var(--text-muted);font-size:11.5px}.quickconnect input,.quickconnect select{height:28px;background:var(--console-bg);border:1px solid var(--border);border-radius:var(--corner);padding:0 8px;min-width:0}.quickconnect input:focus,.quickconnect select:focus{border-color:var(--focus);outline:none}.quickconnect .qc-grow{flex:1 1 160px}.quickconnect .qc-protocol{width:90px}.quickconnect .qc-user,.quickconnect .qc-pass{flex:1 1 110px}.quickconnect .qc-port{width:70px}.console-wrap{background:var(--bar-bg);border-bottom:1px solid var(--border);display:flex;flex-direction:column}.console-head{height:26px;flex:0 0 26px;display:flex;align-items:center;gap:6px;padding:0 6px;border-bottom:1px solid var(--separator);color:var(--text-muted);font-size:11.5px}.console-head .spacer{flex:1}.console{flex:1 1 auto;overflow-y:auto;background:var(--console-bg);font-family:var(--font-mono);font-size:12px;padding:2px 0}.console .log-line{display:flex;gap:8px;padding:1px 8px;white-space:pre-wrap;word-break:break-all}.console .log-line:hover{background:var(--row-hover)}.console .log-time{color:var(--text-muted);flex:0 0 auto}.console .log-src{flex:0 0 auto;min-width:44px;text-align:center}.console .log-src.src-ui{color:var(--accent)}.console .log-src.src-mcp{color:var(--warning)}.console .log-src.src-system{color:var(--text-muted)}.console .log-src.src-automation{color:var(--success)}.console .log-line.sev-failed .log-msg,.console .log-line.sev-cancelled .log-msg{color:var(--danger)}.console .log-line.sev-completed .log-msg{color:var(--success)}.console .log-line.sev-requested .log-msg,.console .log-line.sev-progress .log-msg,.console .log-tools{color:var(--text-muted)}.workspace{flex:1 1 auto;display:flex;min-height:0}.pane{flex:1 1 50%;display:flex;flex-direction:column;min-width:290px;background:var(--panel-bg)}.workspace-divider{flex:0 0 6px;cursor:col-resize;background:linear-gradient(to right,transparent 2px,var(--separator) 2px,var(--separator) 4px,transparent 4px)}.workspace-divider:hover{background:var(--accent)}.pane-head{height:26px;flex:0 0 26px;display:flex;align-items:center;gap:6px;padding:0 6px;background:var(--bar-bg);border-bottom:1px solid var(--border)}.pane-head .pane-title{font-weight:600;font-size:12px;color:var(--text-muted);letter-spacing:.4px}.pane-head .conn-label{color:var(--text);display:inline-flex;gap:4px;align-items:center;min-width:0}.pane-head .spacer{flex:1}.pathbar{height:34px;flex:0 0 34px;display:flex;align-items:center;gap:2px;padding:0 4px;background:var(--panel-alt);border-bottom:1px solid var(--border)}.pathbar input{flex:1;height:26px;min-width:40px;background:var(--console-bg);color:var(--text);border:1px solid var(--border);border-radius:var(--corner);padding:0 8px;font-family:var(--font-mono);font-size:12px}.pathbar input:focus{border-color:var(--focus);outline:none}.pathbar input.stale{border-color:var(--warning)}.pane-body{flex:1 1 auto;display:flex;flex-direction:column;min-height:0}.tree{overflow:auto;background:var(--panel-bg);border-bottom:1px solid var(--separator);user-select:none}.tree-row{display:flex;align-items:center;gap:5px;height:var(--tree-row-height);padding:0 6px;cursor:pointer;white-space:nowrap;border-radius:var(--corner)}.tree-row:nth-child(odd){background:var(--row-odd)}.tree-row:nth-child(2n){background:var(--row-even)}.tree-row:hover{background:var(--row-hover)}.tree-row.selected{background:var(--row-selected)}.tree-row .twist{width:14px;flex:0 0 14px;display:inline-flex;justify-content:center;color:var(--text-muted)}.tree-row .tname{overflow:hidden;text-overflow:ellipsis}.vsplit{height:6px;flex:0 0 6px;cursor:row-resize;background:linear-gradient(to bottom,transparent 2px,var(--separator) 2px,var(--separator) 4px,transparent 4px)}.vsplit:hover{background:var(--accent)}.filelist{flex:1 1 auto;overflow:auto;min-height:0;position:relative;outline:none}table.filetable{border-collapse:separate;border-spacing:0;table-layout:fixed;min-width:100%}.filetable thead th{position:sticky;top:0;z-index:2;height:24px;background:var(--table-header-bg);color:var(--text);font-size:12px;font-weight:600;text-align:left;padding:0 8px;border-bottom:1px solid var(--border);border-right:1px solid var(--separator);cursor:pointer;user-select:none;white-space:nowrap;overflow:hidden}.filetable thead th .sort-arrow{color:var(--accent);font-size:10px;margin-left:3px}.filetable td{height:var(--row-height);padding:0 8px;font-size:12.5px;border-right:1px solid var(--separator);border-bottom:1px solid rgba(0,0,0,.12);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--text)}.filetable tbody tr{height:var(--row-height)}.filetable tbody tr:nth-child(odd) td{background:var(--row-odd)}.filetable tbody tr:nth-child(2n) td{background:var(--row-even)}.filetable tbody tr:hover td{background:var(--row-hover)}.filetable tbody tr.selected td{background:var(--row-selected)}.filetable tbody tr.focused td{outline:1px solid var(--row-selected-focus);outline-offset:-1px}.filetable tbody tr{cursor:default}.fname-cell{display:flex;align-items:center;gap:7px;min-width:0}.fname-cell .nm{overflow:hidden;text-overflow:ellipsis}.num{text-align:right;font-variant-numeric:tabular-nums;color:var(--text-muted)}.muted{color:var(--text-muted)}.diff-local-only td{box-shadow:inset 3px 0 0 var(--warning)}.diff-remote-only td{box-shadow:inset 3px 0 0 var(--accent)}.diff-same td{box-shadow:inset 3px 0 0 var(--success)}.diff-different td{box-shadow:inset 3px 0 0 var(--danger)}.badge{display:inline-flex;align-items:center;gap:4px;font-size:11px;color:var(--text-muted)}.summary-strip{height:24px;flex:0 0 24px;display:flex;align-items:center;padding:0 8px;background:var(--bar-bg);border-top:1px solid var(--border);color:var(--text-muted);font-size:11.5px;gap:10px;white-space:nowrap;overflow:hidden}.empty-state{position:absolute;inset:0;display:flex;flex-direction:column;gap:8px;align-items:center;justify-content:center;color:var(--text-muted);pointer-events:none;padding:20px;text-align:center}.empty-state i{font-size:34px;width:auto;height:auto}.empty-state .warn{color:var(--warning)}.queue-wrap{background:var(--bar-bg);border-top:1px solid var(--border);display:flex;flex-direction:column}.queue-head{display:flex;align-items:center;gap:4px;padding:2px 6px;border-bottom:1px solid var(--separator)}.queue-tabs{display:flex;gap:2px}.queue-tab{height:24px;padding:0 12px;display:inline-flex;align-items:center;gap:6px;background:none;border:1px solid transparent;border-radius:var(--corner);cursor:pointer;color:var(--text-muted)}.queue-tab.active{background:var(--panel-alt);border-color:var(--border);color:var(--text)}.queue-head .spacer{flex:1}.queue-table-wrap{flex:1 1 auto;overflow:auto;background:var(--panel-bg)}.qprogress{position:relative;background:var(--console-bg);border:1px solid var(--border);height:14px;min-width:90px;border-radius:var(--corner);overflow:hidden}.qprogress .fill{position:absolute;inset:0 auto 0 0;background:var(--accent)}.qprogress.indeterminate .fill{width:30%!important;animation:qind 1.2s linear infinite}@keyframes qind{0%{left:-30%}to{left:100%}}.qprogress .pct{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;font-size:10.5px;color:var(--text)}.status-completed{color:var(--success)}.status-failed{color:var(--danger)}.status-cancelled,.status-skipped{color:var(--text-muted)}.status-running,.status-connecting,.status-preparing{color:var(--accent)}.status-retrying,.status-pausing{color:var(--warning)}.statusbar{height:24px;flex:0 0 24px;display:flex;align-items:center;gap:10px;background:var(--bar-bg);border-top:1px solid var(--border);padding:0 8px;font-size:11.5px;color:var(--text-muted);user-select:none}.statusbar .left,.statusbar .mid,.statusbar .right{display:inline-flex;align-items:center;gap:10px;min-width:0}.statusbar .left{flex:1 1 30%}.statusbar .mid{flex:1 1 30%;justify-content:center}.statusbar .right{flex:1 1 40%;justify-content:flex-end}.statusbar .conn-dot{width:8px;height:8px;background:var(--disabled);display:inline-block;border-radius:var(--corner)}.statusbar .conn-dot.on{background:var(--success)}.dialog-backdrop{position:fixed;inset:0;background:#00000073;z-index:2000;display:flex;align-items:center;justify-content:center;padding:24px}.dialog{background:var(--panel-bg);border:1px solid var(--border);border-radius:3px;min-width:380px;max-width:min(860px,94vw);max-height:90vh;display:flex;flex-direction:column;box-shadow:0 10px 34px #0000008c}.dialog.wide{width:860px}.dialog.narrow{min-width:340px;max-width:460px}.dialog-head{height:36px;flex:0 0 36px;display:flex;align-items:center;gap:8px;padding:0 10px;background:var(--bar-bg);border-bottom:1px solid var(--border);font-weight:600}.dialog-head .spacer{flex:1}.dialog-body{flex:1 1 auto;overflow:auto;padding:12px}.dialog-foot{flex:0 0 auto;display:flex;align-items:center;gap:8px;padding:10px 12px;border-top:1px solid var(--separator);justify-content:flex-end}.dialog-foot .spacer{flex:1}.form-row{display:flex;align-items:center;gap:8px;margin-bottom:10px}.form-row label{flex:0 0 130px;color:var(--text-muted)}.form-row input,.form-row select,.form-row textarea{flex:1;height:28px;background:var(--console-bg);color:var(--text);border:1px solid var(--border);border-radius:var(--corner);padding:0 8px;min-width:0}.form-row textarea{height:auto;min-height:90px;padding:6px 8px;font-family:var(--font-mono);resize:vertical}.form-row input:focus,.form-row select:focus,.form-row textarea:focus{border-color:var(--focus);outline:none}.form-row input[type=checkbox]{flex:0 0 auto;height:auto}.form-check{display:flex;gap:6px;align-items:center;margin-bottom:8px;color:var(--text)}.warn-box{border:1px solid var(--warning);color:var(--warning);padding:8px 10px;margin-bottom:10px;border-radius:var(--corner);font-size:12px;display:flex;gap:8px;align-items:flex-start}.danger-box{border-color:var(--danger);color:var(--danger)}.result-box{background:var(--console-bg);border:1px solid var(--border);border-radius:var(--corner);font-family:var(--font-mono);font-size:12px;padding:8px;white-space:pre-wrap;word-break:break-all;max-height:46vh;overflow:auto;margin-top:8px}.result-table{width:100%;border-collapse:collapse;font-size:12px}.result-table th,.result-table td{border:1px solid var(--separator);padding:3px 7px;text-align:left}.result-table th{background:var(--table-header-bg);position:sticky;top:0}.result-table tbody tr:nth-child(odd){background:var(--row-odd)}.result-table tbody tr:nth-child(2n){background:var(--row-even)}.kbd{font-family:var(--font-mono);background:var(--console-bg);border:1px solid var(--border);border-bottom-width:2px;padding:0 5px;font-size:11px}.ctx-menu{position:fixed;z-index:3000;min-width:230px;background:var(--panel-bg);border:1px solid var(--border);border-radius:var(--corner);padding:4px;box-shadow:0 4px 16px #00000080}.mobile-header,.mobile-switch,.mobile-actionbar{display:none}.sheet-backdrop{position:fixed;inset:0;background:#00000080;z-index:2200}.sheet{position:fixed;left:0;right:0;bottom:0;z-index:2300;background:var(--panel-bg);border-top:1px solid var(--border);max-height:90vh;height:86vh;display:flex;flex-direction:column;border-radius:3px 3px 0 0;transition:transform .13s ease}.sheet.grabber{height:22px;flex:0 0 22px;display:flex;align-items:center;justify-content:center;cursor:grab}.sheet.grabber:before{content:"";width:44px;height:4px;background:var(--separator)}.sheet-head{display:flex;align-items:center;gap:8px;padding:0 10px 6px;font-weight:600}.sheet-head .spacer{flex:1}.sheet-body{flex:1 1 auto;overflow:auto;padding:0 10px 10px}@media(max-width:767px){:root{--icon-button-size: 40px}.menubar,.quickconnect{display:none}.mobile-header{display:flex;height:48px;flex:0 0 48px;align-items:center;gap:6px;background:var(--bar-bg);border-bottom:1px solid var(--border);padding:0 4px}.mobile-header .mh-title{flex:1;text-align:center;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}.mobile-switch{display:flex;height:42px;flex:0 0 42px;background:var(--bar-bg);border-bottom:1px solid var(--border)}.mobile-switch button{flex:1;border:none;background:none;color:var(--text-muted);font-size:13px;font-weight:600;border-bottom:2px solid transparent;border-radius:0}.mobile-switch button.active{color:var(--text);border-bottom-color:var(--accent);background:var(--panel-alt)}.workspace{flex-direction:column}.workspace-divider{display:none}.pane{min-width:0;display:none;flex-basis:auto}.pane.mobile-active{display:flex;flex:1 1 auto}.tree-wrap{display:none}.tree-wrap.mobile-open{display:block;position:fixed;inset:138px 0 52px;z-index:1500;border:1px solid var(--border);background:var(--panel-bg)}.filetable td,.filetable thead th{padding:0 6px}.filelist .mrow{height:44px;display:flex;align-items:center;gap:10px;padding:0 10px;border-bottom:1px solid rgba(0,0,0,.2)}.filelist .mrow:nth-child(odd){background:var(--row-odd)}.filelist .mrow:nth-child(2n){background:var(--row-even)}.filelist .mrow.selected{background:var(--row-selected)}.filelist .mrow .m-main{flex:1;min-width:0;display:flex;flex-direction:column}.filelist .mrow .m-name{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.filelist .mrow .m-sub{color:var(--text-muted);font-size:11px}.mobile-actionbar{display:flex;height:52px;flex:0 0 52px;align-items:center;justify-content:space-around;background:var(--bar-bg);border-top:1px solid var(--border)}.console-wrap{height:140px!important}.queue-wrap{height:200px!important}}@media(min-width:768px)and (max-width:1099px){.toolbar{overflow-x:auto}}@media(prefers-reduced-motion:reduce){*{transition:none!important;animation:none!important}}.hidden{display:none!important}.toolbar-hidden .console-wrap,.toolbar-hidden .queue-wrap{display:none}
