/**
 * 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: #0f1216;--panel: #171b21;--border: #2a303a;--text: #e6e9ee;--muted: #8b95a5;--accent: #3b82f6;--danger: #ef4444;--ok: #22c55e;color-scheme:dark;font-family:system-ui,-apple-system,Segoe UI,Roboto,sans-serif;font-size:14px}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--text)}a{color:var(--accent);text-decoration:none}h1,h2{margin:0 0 12px}input,select,button,.button{font:inherit;color:var(--text);background:var(--panel);border:1px solid var(--border);border-radius:6px;padding:6px 10px}button,.button{cursor:pointer;background:var(--accent);border-color:var(--accent);color:#fff;display:inline-block}button:disabled,.button.disabled{opacity:.5;pointer-events:none}button.link{background:none;border:none;color:var(--accent);padding:4px 6px}button.link.danger{color:var(--danger)}button.tab{background:none;border-color:transparent;color:var(--muted)}button.tab.active{color:var(--text);border-color:var(--border)}label{display:flex;flex-direction:column;gap:4px;color:var(--muted)}table{width:100%;border-collapse:collapse}th,td{text-align:left;padding:8px;border-bottom:1px solid var(--border)}th{color:var(--muted);font-weight:500}pre{background:#0a0c0f;padding:10px;border-radius:6px;overflow-x:auto}.mono{font-family:Consolas,Menlo,monospace}.muted{color:var(--muted)}.error{color:var(--danger)}.spacer{flex:1}.row{display:flex;align-items:center;gap:10px;margin-bottom:12px}.row.wrap{flex-wrap:wrap;align-items:flex-end}.center{min-height:100vh;display:flex;align-items:center;justify-content:center}.card{background:var(--panel);border:1px solid var(--border);border-radius:10px;padding:20px;margin-bottom:16px}.login{width:340px;display:flex;flex-direction:column;gap:12px}.topbar{display:flex;align-items:center;gap:12px;padding:8px 16px;background:var(--panel);border-bottom:1px solid var(--border)}.topbar nav{display:flex;gap:8px}.topbar nav a{color:var(--muted);padding:4px 8px;border-radius:6px}.topbar nav a.active{color:var(--text);background:var(--bg)}.brand{font-weight:700;letter-spacing:1px;color:var(--text)}main{padding:20px;max-width:1200px;margin:0 auto}.dot{display:inline-block;width:10px;height:10px;border-radius:50%}.dot.on{background:var(--ok)}.dot.off{background:#4b5563}.actions{white-space:nowrap;text-align:right}.session{height:100vh;display:flex;flex-direction:column}.status{font-size:13px;padding:2px 8px;border-radius:10px;background:var(--bg)}.status.connected{color:var(--ok)}.status.waiting{color:#eab308}.status.closed{color:var(--danger)}.rate{min-width:70px;text-align:right;font-variant-numeric:tabular-nums}.banner{padding:8px 16px;background:#3b1d1d;color:#fecaca}.screen{flex:1;min-height:0;align-items:center;justify-content:center;background:#000}.screen canvas{outline:none}.screen canvas.control{cursor:crosshair}.shell{flex:1;min-height:0;padding:6px;background:#111418}.clipnote{display:flex;align-items:center;gap:10px;padding:6px 16px;background:#1e293b;font-size:13px}.clipnote textarea{flex:1;height:32px;font:inherit;background:var(--bg);color:var(--text);border:1px solid var(--border);border-radius:6px}.files{flex:1;display:flex;flex-direction:column;padding:12px 16px;min-height:0}.files .path{flex:1}.filelist{flex:1;overflow:auto;border:1px dashed transparent;border-radius:8px}.filelist.drag{border-color:var(--accent);background:#172033}.filelist tr:hover{background:#1a1f27}.transfers{border-top:1px solid var(--border);padding-top:8px;display:flex;flex-direction:column;gap:4px;max-height:30%;overflow:auto}.transfer{display:grid;grid-template-columns:1fr 160px 1fr auto;gap:10px;align-items:center;font-size:13px}label.button{flex-direction:row;color:#fff}h3{margin:16px 0 6px;font-size:15px}
