/**
 * 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{font-family:system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial,sans-serif;line-height:1.5;font-weight:400;color-scheme:light;color:#0f172a;background-color:#f8fafc}body{margin:0}a{color:inherit;text-decoration:none}.container{max-width:1100px;margin:0 auto;padding:20px}.card{background:#fff;border:1px solid #e2e8f0;border-radius:12px;padding:16px}.row{display:flex;gap:12px;align-items:center;flex-wrap:wrap}.space{height:12px}.btn{border:1px solid #0f172a;background:#0f172a;color:#fff;padding:8px 12px;border-radius:10px;cursor:pointer;font-size:14px}.btn.secondary{background:#fff;color:#0f172a}.btn.danger{background:#b91c1c;border-color:#b91c1c;color:#fff}.btn:disabled{opacity:.6;cursor:not-allowed}.input,select,textarea{border:1px solid #cbd5e1;border-radius:10px;padding:8px 10px;font-size:14px;font-family:inherit}.mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:12px}.pill{display:inline-block;padding:2px 10px;border-radius:999px;border:1px solid #cbd5e1;background:#f1f5f9;font-size:12px}.error{color:#b91c1c}.success{color:#15803d}.muted{color:#64748b}.table{width:100%;border-collapse:separate;border-spacing:0;font-size:13px}.table th,.table td{padding:10px;border-bottom:1px solid #e2e8f0;vertical-align:top}.table th{text-align:left;font-size:12px;color:#64748b;font-weight:600;background:#f8fafc}.table tbody tr:hover{background:#f1f5f9}.modalOverlay{position:fixed;top:0;right:0;bottom:0;left:0;background:#0f172a59;display:flex;align-items:center;justify-content:center;padding:20px;z-index:200}.modalCard{width:100%;max-width:560px;background:#fff;border:1px solid #e2e8f0;border-radius:12px;padding:16px;box-shadow:0 24px 60px #0f172a33}.formGroup{display:flex;flex-direction:column;gap:4px;margin-bottom:12px}.formGroup label{font-size:13px;font-weight:600;color:#334155}.pill.status-active{background:#dcfce7;border-color:#86efac;color:#166534}.pill.status-idle{background:#fef9c3;border-color:#fde047;color:#854d0e}.pill.status-stopped{background:#fee2e2;border-color:#fca5a5;color:#991b1b}.pill.status-starting{background:#f1f5f9;border-color:#cbd5e1;color:#475569}.toggle{position:relative;display:inline-block;width:36px;height:20px}.toggle input{opacity:0;width:0;height:0}.toggle .slider{position:absolute;cursor:pointer;top:0;right:0;bottom:0;left:0;background:#cbd5e1;border-radius:20px;transition:background .2s}.toggle .slider:before{content:"";position:absolute;height:14px;width:14px;left:3px;bottom:3px;background:#fff;border-radius:50%;transition:transform .2s}.toggle input:checked+.slider{background:#16a34a}.toggle input:checked+.slider:before{transform:translate(16px)}.terminal-card{background:#0f172a;border:1px solid #1e293b;border-radius:12px;padding:12px;min-height:400px;display:flex;flex-direction:column}.terminal-container{flex:1;min-height:400px}.terminal-container .xterm{height:100%}.terminal-container .xterm-viewport{border-radius:8px}.strategy-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(340px,1fr));gap:12px}.strategy-card{background:#fff;border:1px solid #e2e8f0;border-left:3px solid #cbd5e1;border-radius:10px;padding:14px 16px;cursor:pointer;transition:box-shadow .15s,border-color .15s}.strategy-card:hover{box-shadow:0 2px 8px #0f172a14}.strategy-card.expanded{border-color:#94a3b8;box-shadow:0 2px 8px #0f172a14}.strategy-card-header{display:flex;justify-content:space-between;align-items:center;gap:12px}.strategy-icon{display:inline-flex;align-items:center;justify-content:center;width:36px;height:36px;border-radius:8px;font-size:18px;flex-shrink:0}.strategy-config{background:#fff;border:1px solid #e2e8f0;border-top:none;border-radius:0 0 10px 10px;padding:16px;margin-top:-1px}.strategy-config-section{margin-bottom:12px}.strategy-config-row{display:flex;gap:12px;align-items:flex-end;flex-wrap:wrap}.strategy-select-btn{display:flex;justify-content:space-between;align-items:center;gap:8px;width:100%;background:#fff;cursor:pointer;text-align:left;box-sizing:border-box}.popover{position:absolute;top:100%;left:0;right:0;z-index:200;background:#fff;border:1px solid #e2e8f0;border-radius:10px;padding:8px;box-shadow:0 8px 24px #0f172a1f;margin-top:4px}.popoverList{max-height:280px;overflow-y:auto}.popoverItem{padding:8px 10px;border-radius:6px;cursor:pointer}.popoverItem:hover,.popoverItem.active{background:#f1f5f9}.popoverItem.selected{background:#eff6ff;font-weight:600}.popoverEmpty{padding:12px 10px;color:#94a3b8;font-size:13px}.strategy-popover{position:absolute;top:100%;left:0;right:0;z-index:100;background:#fff;border:1px solid #e2e8f0;border-radius:10px;padding:8px;box-shadow:0 8px 24px #0f172a1f;margin-top:4px}.strategy-popover-list{max-height:240px;overflow-y:auto;margin-top:6px}.strategy-popover-item{padding:6px 8px;border-radius:6px;cursor:pointer;display:flex;justify-content:space-between;align-items:center;gap:8px}.strategy-popover-item:hover{background:#f1f5f9}.strategy-popover-item.selected{background:#eff6ff;font-weight:600}
