/**
 * 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: #0b0d10;--bg-panel: #14171b;--bg-panel-raised: #1b1f24;--border: #262b31;--text: #e6e9ec;--text-dim: #8b939c;--accent: #4f8cff;--status-pending: #6b7280;--status-running: #f5a524;--status-done: #22c55e;--status-error: #ef4444;--font-sans: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;--font-mono: "JetBrains Mono", "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace}*{box-sizing:border-box}html,body,#root{height:100%;margin:0}body{background:var(--bg);color:var(--text);font-family:var(--font-sans);font-size:14px}button{font-family:inherit;cursor:pointer}input,select{font-family:inherit;font-size:14px;background:var(--bg);color:var(--text);border:1px solid var(--border);border-radius:6px;padding:8px 10px}input:focus,select:focus,button:focus-visible{outline:2px solid var(--accent);outline-offset:1px}.status-dot{display:inline-block;width:8px;height:8px;border-radius:50%;margin-right:6px}.status-dot.pending{background:var(--status-pending)}.status-dot.running{background:var(--status-running);box-shadow:0 0 6px var(--status-running)}.status-dot.done{background:var(--status-done)}.status-dot.error,.status-dot.cancelled{background:var(--status-error)}.login-screen{height:100%;display:flex;align-items:center;justify-content:center}.login-card{width:320px;background:var(--bg-panel);border:1px solid var(--border);border-radius:10px;padding:28px}.login-card h1{font-size:16px;margin:0 0 4px}.login-card p{color:var(--text-dim);margin:0 0 20px;font-size:13px}.login-card form{display:flex;flex-direction:column;gap:10px}.login-card button{background:var(--accent);color:#fff;border:none;border-radius:6px;padding:9px;font-weight:600}.login-card .error{color:var(--status-error);font-size:13px}.app-shell{height:100%;display:flex;flex-direction:column}.top-nav{display:flex;align-items:center;justify-content:space-between;padding:10px 16px;border-bottom:1px solid var(--border);background:var(--bg-panel)}.top-nav .brand{font-weight:600;letter-spacing:.2px}.top-nav .brand span{color:var(--text-dim);font-weight:400;margin-left:8px}.top-nav button{background:transparent;color:var(--text-dim);border:1px solid var(--border);border-radius:6px;padding:6px 12px}.top-nav button:hover{color:var(--text);border-color:var(--text-dim)}.command-center{flex:1;display:grid;grid-template-columns:220px 1fr;min-height:0}.sidebar{border-right:1px solid var(--border);padding:16px 10px;overflow-y:auto}.sidebar-section-title{color:var(--text-dim);font-size:11px;text-transform:uppercase;letter-spacing:.06em;padding:0 8px;margin-bottom:6px}.sidebar button.category{display:block;width:100%;text-align:left;background:transparent;border:none;color:var(--text-dim);padding:8px;border-radius:6px;font-size:13px;margin-bottom:2px}.sidebar button.category:hover{background:var(--bg-panel-raised);color:var(--text)}.sidebar button.category.active{background:var(--bg-panel-raised);color:var(--text);font-weight:600}.sidebar button.history-link{display:block;width:100%;text-align:left;background:transparent;border:1px dashed var(--border);color:var(--text-dim);padding:8px;border-radius:6px;font-size:13px;margin-top:16px}.main-panel{padding:20px;overflow-y:auto;display:flex;flex-direction:column;gap:16px}.panel-box{background:var(--bg-panel);border:1px solid var(--border);border-radius:10px;padding:16px}.panel-box h2{font-size:13px;color:var(--text-dim);margin:0 0 12px;text-transform:uppercase;letter-spacing:.05em}.function-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:10px}.function-card{background:var(--bg-panel-raised);border:1px solid var(--border);border-radius:8px;padding:12px;text-align:left;color:var(--text)}.function-card:hover{border-color:var(--accent)}.function-card.selected{border-color:var(--accent);box-shadow:0 0 0 1px var(--accent)}.function-card .label{font-weight:600;font-size:13px;margin-bottom:4px;display:flex;align-items:center;justify-content:space-between;gap:6px}.function-card .description{color:var(--text-dim);font-size:12px;line-height:1.4}.extension-badge{font-size:10px;background:#f5a52426;color:var(--status-running);border:1px solid rgba(245,165,36,.4);border-radius:4px;padding:1px 5px;white-space:nowrap}.function-form{display:flex;flex-wrap:wrap;gap:10px;align-items:flex-end}.form-field{display:flex;flex-direction:column;gap:4px;flex:1;min-width:200px}.form-field label{font-size:12px;color:var(--text-dim)}.run-button{background:var(--accent);color:#fff;border:none;border-radius:6px;padding:9px 18px;font-weight:600;white-space:nowrap}.run-button:disabled{opacity:.5;cursor:not-allowed}.form-error{color:var(--status-error);font-size:13px;width:100%}.terminal-wrap{height:320px}.terminal-actions{display:flex;justify-content:flex-end;margin-top:8px}.cancel-button{background:transparent;border:1px solid var(--status-error);color:var(--status-error);border-radius:6px;padding:5px 12px;font-size:12px}.result-summary{display:flex;gap:24px;flex-wrap:wrap;margin-bottom:10px;font-size:13px}.result-summary .metric .label{color:var(--text-dim);font-size:11px;text-transform:uppercase}.result-summary-text{white-space:pre-wrap;font-family:var(--font-mono);font-size:12.5px;background:var(--bg);border:1px solid var(--border);border-radius:6px;padding:10px;max-height:220px;overflow-y:auto}.raw-json-toggle{background:transparent;border:none;color:var(--accent);font-size:12px;padding:0;margin-top:8px}.raw-json{font-family:var(--font-mono);font-size:12px;white-space:pre-wrap;background:var(--bg);border:1px solid var(--border);border-radius:6px;padding:10px;margin-top:8px;max-height:300px;overflow-y:auto}.history-list{display:flex;flex-direction:column;gap:4px}.history-row{display:grid;grid-template-columns:auto 140px 1fr 160px;align-items:center;gap:10px;padding:8px;border-radius:6px;background:transparent;border:1px solid transparent;color:var(--text);text-align:left;font-size:12.5px}.history-row:hover{background:var(--bg-panel-raised);border-color:var(--border)}.history-row .command{color:var(--text-dim)}.history-row .params{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-family:var(--font-mono)}.history-row .time{color:var(--text-dim);text-align:right}.empty-state{color:var(--text-dim);font-size:13px;padding:20px;text-align:center}
