/**
 * Copyright (c) 2014 The xterm.js authors. All rights reserved.
 * Copyright (c) 2012-2013, Christopher Jeffrey (MIT License)
 * https://github.com/chjj/term.js
 * @license MIT
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in
 * all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 * THE SOFTWARE.
 *
 * Originally forked from (with the author's permission):
 *   Fabrice Bellard's javascript vt100 for jslinux:
 *   http://bellard.org/jslinux/
 *   Copyright (c) 2011 Fabrice Bellard
 *   The original design remains. The terminal itself
 *   has been extended to include xterm CSI codes, among
 *   other features.
 */.xterm{cursor:text;position:relative;user-select:none;-ms-user-select:none;-webkit-user-select:none}.xterm.focus,.xterm:focus{outline:none}.xterm .xterm-helpers{position:absolute;top:0;z-index:5}.xterm .xterm-helper-textarea{padding:0;border:0;margin:0;position:absolute;opacity:0;left:-9999em;top:0;width:0;height:0;z-index:-5;white-space:nowrap;overflow:hidden;resize:none}.xterm .composition-view{background:#000;color:#fff;display:none;position:absolute;white-space:nowrap;z-index:1}.xterm .composition-view.active{display:block}.xterm .xterm-viewport{background-color:#000;overflow-y:scroll;cursor:default;position:absolute;right:0;left:0;top:0;bottom:0}.xterm .xterm-screen{position:relative}.xterm .xterm-screen canvas{position:absolute;left:0;top:0}.xterm .xterm-scroll-area{visibility:hidden}.xterm-char-measure-element{display:inline-block;visibility:hidden;position:absolute;top:0;left:-9999em;line-height:normal}.xterm.enable-mouse-events{cursor:default}.xterm.xterm-cursor-pointer,.xterm .xterm-cursor-pointer{cursor:pointer}.xterm.column-select.focus{cursor:crosshair}.xterm .xterm-accessibility:not(.debug),.xterm .xterm-message{position:absolute;left:0;top:0;bottom:0;right:0;z-index:10;color:transparent;pointer-events:none}.xterm .xterm-accessibility-tree:not(.debug) *::selection{color:transparent}.xterm .xterm-accessibility-tree{-webkit-user-select:text;user-select:text;white-space:pre}.xterm .live-region{position:absolute;left:-9999px;width:1px;height:1px;overflow:hidden}.xterm-dim{opacity:1!important}.xterm-underline-1{text-decoration:underline}.xterm-underline-2{text-decoration:double underline}.xterm-underline-3{text-decoration:wavy underline}.xterm-underline-4{text-decoration:dotted underline}.xterm-underline-5{text-decoration:dashed underline}.xterm-overline{text-decoration:overline}.xterm-overline.xterm-underline-1{text-decoration:overline underline}.xterm-overline.xterm-underline-2{text-decoration:overline double underline}.xterm-overline.xterm-underline-3{text-decoration:overline wavy underline}.xterm-overline.xterm-underline-4{text-decoration:overline dotted underline}.xterm-overline.xterm-underline-5{text-decoration:overline dashed underline}.xterm-strikethrough{text-decoration:line-through}.xterm-screen .xterm-decoration-container .xterm-decoration{z-index:6;position:absolute}.xterm-screen .xterm-decoration-container .xterm-decoration.xterm-decoration-top-layer{z-index:7}.xterm-decoration-overview-ruler{z-index:8;position:absolute;top:0;right:0;pointer-events:none}.xterm-decoration-top{z-index:2;position:relative}:root{--bg: #0d1017;--bg-1: #11161f;--bg-2: #161c27;--bg-3: #1d2533;--border: #232c3b;--text: #cfd8e3;--text-dim: #8a97a8;--accent: #5b9dff;--accent-2: #3d7ce0;--danger: #e5534b;--success: #3fb950;--radius: 8px}*{box-sizing:border-box}html,body,#root{height:100%;margin:0}body{background:var(--bg);color:var(--text);font:14px/1.45 -apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif}button{font:inherit;cursor:pointer}input,select,textarea{font:inherit}a{color:var(--accent);text-decoration:none}.muted{color:var(--text-dim)}.small{font-size:12px}.btn{border:1px solid var(--border);background:var(--bg-2);color:var(--text);padding:8px 14px;border-radius:var(--radius);display:inline-flex;align-items:center;gap:8px;justify-content:center}.btn:hover{background:var(--bg-3)}.btn:disabled{opacity:.5;cursor:not-allowed}.btn.primary{background:var(--accent-2);border-color:var(--accent-2);color:#fff}.btn.primary:hover:not(:disabled){background:var(--accent)}.btn.ghost{background:transparent}.btn.ghost.on{background:var(--bg-3);color:var(--accent)}.btn.small{padding:5px 10px;font-size:12px;border-radius:6px}.btn.google{background:#fff;color:#1f1f1f;border-color:#dadce0;width:100%}.btn.google:hover{background:#f5f6f7}.icon-btn{background:transparent;border:none;color:var(--text-dim);padding:4px 6px;border-radius:6px;line-height:1}.icon-btn:hover{background:var(--bg-3);color:var(--text)}.alert{padding:9px 12px;border-radius:var(--radius);margin-bottom:12px;font-size:13px}.alert.error{background:#e5534b1f;color:#ff9a93;border:1px solid rgba(229,83,75,.3)}.alert.success{background:#3fb9501f;color:#87e596;border:1px solid rgba(63,185,80,.3)}.toast{position:fixed;bottom:20px;left:50%;transform:translate(-50%);padding:10px 18px;border-radius:var(--radius);z-index:100;box-shadow:0 8px 30px #0006;font-size:13px}.toast.error{background:#3a1d1c;color:#ff9a93;border:1px solid rgba(229,83,75,.4)}.toast.success{background:#142a18;color:#87e596;border:1px solid rgba(63,185,80,.4)}.center-screen{height:100%;display:grid;place-items:center;padding:20px}.auth-card{width:360px;max-width:100%;background:var(--bg-1);border:1px solid var(--border);border-radius:14px;padding:28px}.auth-brand{text-align:center;margin-bottom:22px}.auth-logo{font-size:30px;color:var(--accent);font-weight:700}.auth-brand h1{margin:6px 0 2px;font-size:22px}.auth-form{display:flex;flex-direction:column;gap:12px}.auth-form label,.modal-body label{display:flex;flex-direction:column;gap:5px;font-size:13px;color:var(--text-dim)}.auth-form input,.modal-body input,.modal-body select,.modal-body textarea{background:var(--bg);border:1px solid var(--border);color:var(--text);padding:9px 11px;border-radius:7px;outline:none}.auth-form input:focus,.modal-body input:focus,.modal-body select:focus,.modal-body textarea:focus{border-color:var(--accent)}.auth-form .btn{margin-top:4px}.divider{text-align:center;margin:16px 0;position:relative;color:var(--text-dim);font-size:12px}.divider:before{content:"";position:absolute;top:50%;left:0;right:0;height:1px;background:var(--border)}.divider span{background:var(--bg-1);padding:0 10px;position:relative}.auth-switch{text-align:center;margin-top:16px;font-size:13px}.auth-switch button{background:none;border:none;color:var(--accent);padding:0}.spinner{width:28px;height:28px;border:3px solid var(--border);border-top-color:var(--accent);border-radius:50%;animation:spin .8s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}.workspace{height:100%;display:flex;flex-direction:column}.topbar{height:46px;flex:none;display:flex;align-items:center;justify-content:space-between;padding:0 14px;background:var(--bg-1);border-bottom:1px solid var(--border)}.brand{font-weight:600;display:flex;align-items:center;gap:8px}.brand-logo{color:var(--accent);font-weight:700}.topbar-right{display:flex;align-items:center;gap:12px}.workspace-body{flex:1;display:flex;min-height:0}.sidebar{width:250px;flex:none;background:var(--bg-1);border-right:1px solid var(--border);display:flex;flex-direction:column;min-height:0}.sidebar-header{display:flex;align-items:center;justify-content:space-between;padding:10px 12px;font-size:12px;text-transform:uppercase;letter-spacing:.05em;color:var(--text-dim);border-bottom:1px solid var(--border)}.conn-list{overflow-y:auto;flex:1}.conn-empty{padding:20px 14px;font-size:13px;text-align:center;line-height:1.6}.conn-item{display:flex;align-items:center;gap:9px;padding:9px 12px;cursor:pointer;border-bottom:1px solid rgba(35,44,59,.5)}.conn-item:hover{background:var(--bg-2)}.conn-item.active{background:var(--bg-3)}.conn-item.active .conn-name{color:#fff}.conn-dot{width:8px;height:8px;border-radius:50%;background:var(--accent);flex:none}.conn-meta{flex:1;min-width:0}.conn-name{font-size:13px;font-weight:500;display:flex;align-items:center;gap:6px}.conn-sub{font-size:11px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.conn-actions{display:none;gap:2px}.conn-item:hover .conn-actions{display:flex}.badge{font-size:9px;background:var(--bg);border:1px solid var(--border);border-radius:4px;padding:0 4px;color:var(--text-dim)}.main{flex:1;display:flex;flex-direction:column;min-width:0;min-height:0}.empty-main{align-items:center;justify-content:center}.main-top{flex:1;display:flex;min-height:0}.tree-col{width:280px;flex:none;border-right:1px solid var(--border);display:flex;min-height:0}.editor-col{flex:1;min-width:0;display:flex}.terminal-col{height:34%;min-height:140px;border-top:1px solid var(--border);display:flex}.filetree{display:flex;flex-direction:column;width:100%;min-height:0}.filetree-header{display:flex;align-items:center;justify-content:space-between;padding:8px 10px;border-bottom:1px solid var(--border);flex:none}.filetree-title{font-size:12px;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.filetree-actions{display:flex;gap:2px}.filetree-actions button{background:transparent;border:none;color:var(--text-dim);font-size:12px;padding:3px 5px;border-radius:5px}.filetree-actions button:hover{background:var(--bg-3);color:var(--text)}.filetree-body{overflow:auto;flex:1;padding:4px 0}.tree-row{display:flex;align-items:center;gap:5px;padding:3px 8px;cursor:pointer;font-size:13px;white-space:nowrap;-webkit-user-select:none;user-select:none}.tree-row:hover{background:var(--bg-2)}.tree-row.active{background:var(--bg-3);color:#fff}.tree-caret{width:12px;color:var(--text-dim);font-size:10px;flex:none}.tree-icon{font-size:12px;flex:none}.tree-name{overflow:hidden;text-overflow:ellipsis}.tree-spin{color:var(--text-dim)}.tree-empty{font-size:12px;color:var(--text-dim);padding:3px 8px}.context-menu{position:fixed;z-index:200;background:var(--bg-2);border:1px solid var(--border);border-radius:8px;padding:4px;min-width:150px;box-shadow:0 10px 30px #00000080;display:flex;flex-direction:column}.context-menu button{background:transparent;border:none;color:var(--text);text-align:left;padding:7px 10px;border-radius:5px;font-size:13px}.context-menu button:hover:not(:disabled){background:var(--bg-3)}.context-menu button:disabled{opacity:.4;cursor:not-allowed}.context-menu button.danger{color:#ff9a93}.context-sep{height:1px;background:var(--border);margin:4px 0}.editor-col,.editor-pane{width:100%}.editor-pane{display:flex;flex-direction:column;min-height:0;flex:1}.editor-empty{flex:1;display:grid;place-items:center;text-align:center;color:var(--text-dim)}.editor-empty-logo{font-size:40px;color:var(--border);margin-bottom:10px}.editor-tabbar{display:flex;align-items:center;justify-content:space-between;background:var(--bg-1);border-bottom:1px solid var(--border);flex:none;min-height:40px}.tab-strip{display:flex;align-items:stretch;overflow-x:auto;flex:1;min-width:0}.tab-strip::-webkit-scrollbar{height:6px}.editor-tab{display:flex;align-items:center;gap:8px;padding:0 10px 0 14px;height:40px;font-size:12px;cursor:pointer;border-right:1px solid var(--border);white-space:nowrap;flex:none}.editor-tab:hover{background:var(--bg-2)}.editor-tab.active{background:var(--bg);border-bottom:2px solid var(--accent)}.tab-name{color:var(--text-dim)}.editor-tab.active .tab-name{color:#fff}.dirty-dot{color:var(--accent);font-size:10px}.tab-close{font-size:11px;color:var(--text-dim);border-radius:4px;padding:1px 4px;line-height:1}.tab-close:hover{background:var(--bg-3);color:var(--text)}.tab-close.dirty{color:var(--accent)}.editor-tab-actions{display:flex;align-items:center;gap:10px;padding:0 12px;flex:none}.terminal-pane{display:flex;flex-direction:column;width:100%;background:#0d1017;min-height:0}.terminal-header{display:flex;align-items:center;justify-content:space-between;padding:5px 12px;background:var(--bg-1);border-bottom:1px solid var(--border);flex:none}.terminal-body{flex:1;min-height:0;padding:6px 8px;overflow:hidden}.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;background:#0000008c;display:grid;place-items:center;z-index:150;padding:20px}.modal{width:480px;max-width:100%;max-height:90vh;overflow-y:auto;background:var(--bg-1);border:1px solid var(--border);border-radius:12px}.modal-header{display:flex;align-items:center;justify-content:space-between;padding:16px 18px;border-bottom:1px solid var(--border)}.modal-header h2{margin:0;font-size:17px}.modal-body{padding:18px;display:flex;flex-direction:column;gap:14px}.modal>.alert{margin:14px 18px 0}.modal-body .row{display:flex;gap:12px}.modal-body .row .grow{flex:1}.modal-body label.check{flex-direction:row;align-items:center;gap:7px;align-self:flex-end;padding-bottom:9px;color:var(--text)}.modal-body textarea{font-family:ui-monospace,Menlo,Consolas,monospace;font-size:12px;resize:vertical}.modal-footer{display:flex;align-items:center;gap:10px;margin-top:4px}.modal-footer .spacer{flex:1}.user-menu{position:relative}.user-trigger{display:flex;align-items:center;gap:8px;background:transparent;border:1px solid transparent;color:var(--text);padding:4px 8px 4px 4px;border-radius:8px}.user-trigger:hover{background:var(--bg-2);border-color:var(--border)}.user-avatar{width:26px;height:26px;border-radius:50%;flex:none;object-fit:cover}.user-avatar.fallback{display:grid;place-items:center;background:var(--accent-2);color:#fff;font-size:12px;font-weight:600}.user-label{font-size:13px;max-width:160px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.user-trigger .caret{color:var(--text-dim);font-size:10px}.user-dropdown{position:absolute;top:calc(100% + 6px);right:0;min-width:220px;z-index:200;background:var(--bg-2);border:1px solid var(--border);border-radius:10px;padding:6px;box-shadow:0 12px 34px #00000080;display:flex;flex-direction:column}.user-dropdown>button{background:transparent;border:none;color:var(--text);text-align:left;padding:8px 10px;border-radius:6px;font-size:13px}.user-dropdown>button:hover{background:var(--bg-3)}.user-dropdown>button.danger{color:#ff9a93}.user-dropdown-head{padding:8px 10px 10px;border-bottom:1px solid var(--border);margin-bottom:4px}.user-name{font-weight:600;font-size:13px}.account-section{display:flex;flex-direction:column;gap:12px;padding-bottom:16px;border-bottom:1px solid var(--border)}.account-section:last-child{border-bottom:none;padding-bottom:0}.account-section-title{font-size:12px;text-transform:uppercase;letter-spacing:.05em;color:var(--text-dim)}.sso-row{display:flex;align-items:center;justify-content:space-between;font-size:13px}.badge.ok{color:#87e596;border-color:#3fb95066}.sidebar-hint{padding:8px 12px;border-top:1px solid var(--border);flex:none}
