/**
 * 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-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{font-family:monospace;-webkit-user-select:text;user-select:text;white-space:pre}.xterm .xterm-accessibility-tree>div{transform-origin:left;width:fit-content}.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}.xterm .xterm-scrollable-element>.scrollbar{cursor:default}.xterm .xterm-scrollable-element>.scrollbar>.scra{cursor:pointer;font-size:11px!important}.xterm .xterm-scrollable-element>.visible{opacity:1;background:#0000;transition:opacity .1s linear;z-index:11}.xterm .xterm-scrollable-element>.invisible{opacity:0;pointer-events:none}.xterm .xterm-scrollable-element>.invisible.fade{transition:opacity .8s linear}.xterm .xterm-scrollable-element>.shadow{position:absolute;display:none}.xterm .xterm-scrollable-element>.shadow.top{display:block;top:0;left:3px;height:3px;width:100%;box-shadow:var(--vscode-scrollbar-shadow, #000) 0 6px 6px -6px inset}.xterm .xterm-scrollable-element>.shadow.left{display:block;top:3px;left:0;height:100%;width:3px;box-shadow:var(--vscode-scrollbar-shadow, #000) 6px 0 6px -6px inset}.xterm .xterm-scrollable-element>.shadow.top-left-corner{display:block;top:0;left:0;height:3px;width:3px}.xterm .xterm-scrollable-element>.shadow.top.left{box-shadow:var(--vscode-scrollbar-shadow, #000) 6px 0 6px -6px inset}:root{color-scheme:dark;--bg: #0f1115;--surface: #171a21;--surface-2: #1f2330;--border: #2a2f3d;--text: #e8eaf0;--text-muted: #9aa1b2;--accent: #5b8def;--accent-hover: #4a7ce0;--danger: #e35d6a;font-family:system-ui,-apple-system,Segoe UI,Roboto,sans-serif}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--text)}.centered-page{min-height:100vh;display:flex;align-items:center;justify-content:center;padding:24px}.card{background:var(--surface);border:1px solid var(--border);border-radius:12px;padding:32px;width:100%;max-width:440px;display:flex;flex-direction:column;gap:16px}.card.wizard{max-width:560px}h1{margin:0;font-size:1.4rem}h2{margin:0;font-size:1.15rem}.subtitle{margin:-8px 0 0;color:var(--text-muted);font-size:.9rem}label{display:flex;flex-direction:column;gap:6px;font-size:.85rem;color:var(--text-muted)}input{background:var(--surface-2);border:1px solid var(--border);border-radius:8px;padding:10px 12px;color:var(--text);font-size:.95rem}input:focus{outline:2px solid var(--accent);outline-offset:1px}button{background:var(--accent);color:#fff;border:none;border-radius:8px;padding:10px 16px;font-size:.95rem;cursor:pointer}button:hover:not(:disabled){background:var(--accent-hover)}button:disabled{opacity:.6;cursor:not-allowed}button.secondary{background:transparent;border:1px solid var(--border);color:var(--text)}.error{color:var(--danger);font-size:.85rem;margin:0}.hint{color:var(--text-muted);font-size:.8rem;margin:0}.wizard-steps{list-style:none;display:flex;gap:8px;padding:0;margin:0 0 8px;font-size:.8rem;color:var(--text-muted)}.wizard-steps li{padding:4px 10px;border-radius:999px;border:1px solid var(--border)}.wizard-steps li.active{color:var(--text);border-color:var(--accent)}.wizard-step,.wizard-step form{display:flex;flex-direction:column;gap:12px}.wizard-nav{display:flex;justify-content:space-between;margin-top:8px}.role-options{display:flex;flex-direction:column;gap:10px}.role-option{display:flex;flex-direction:column;align-items:flex-start;gap:4px;background:var(--surface-2);border:1px solid var(--border);border-radius:10px;padding:12px 14px;text-align:left}.role-option span{color:var(--text-muted);font-size:.82rem;font-weight:400}.role-option.selected{border-color:var(--accent)}.summary{list-style:none;padding:0;margin:0;display:flex;flex-direction:column;gap:6px;font-size:.9rem}.wide-page{min-height:100vh;padding:24px;max-width:1100px;margin:0 auto;display:flex;flex-direction:column;gap:20px}.page-header{display:flex;align-items:center;justify-content:space-between}.page-header .subtitle{margin-top:4px}.panel{background:var(--surface);border:1px solid var(--border);border-radius:12px;padding:20px 24px;display:flex;flex-direction:column;gap:14px}table{width:100%;border-collapse:collapse;font-size:.9rem}th{text-align:left;color:var(--text-muted);font-weight:400;font-size:.78rem;text-transform:uppercase;letter-spacing:.03em;padding:6px 10px;border-bottom:1px solid var(--border)}td{padding:8px 10px;border-bottom:1px solid var(--border);vertical-align:middle}tr:last-child td{border-bottom:none}.row-actions{display:flex;gap:6px;flex-wrap:wrap}.row-actions button,.icon-button{padding:5px 10px;font-size:.82rem}.badge{display:inline-block;padding:2px 8px;border-radius:999px;font-size:.75rem;border:1px solid var(--border)}.badge.running{border-color:#3ba55c;color:#3ba55c}.badge.stopped,.badge.exited{border-color:var(--text-muted);color:var(--text-muted)}.badge.crashed,.badge.dead{border-color:var(--danger);color:var(--danger)}.copyable{display:inline-flex;align-items:center;gap:6px;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:.85rem;background:var(--surface-2);border:1px solid var(--border);border-radius:6px;padding:2px 6px}.copyable button{padding:2px 8px;font-size:.72rem}.breadcrumb{display:flex;flex-wrap:wrap;gap:4px;font-size:.85rem;color:var(--text-muted)}.breadcrumb button{background:none;color:var(--accent);padding:0;font-size:.85rem}.breadcrumb button:hover{background:none;text-decoration:underline}.toolbar{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.file-upload-label{display:inline-flex;align-items:center;background:var(--accent);color:#fff;border-radius:8px;padding:10px 16px;font-size:.95rem;cursor:pointer}.file-upload-label:hover{background:var(--accent-hover)}.file-upload-label input{display:none}
