/**
 * 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{color-scheme:light dark;--bg: #0f1117;--panel: #161922;--border: #2a2e3a;--text: #e5e7eb;--text-dim: #9ca3af;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif}*{box-sizing:border-box}html,body,#root{height:100%;margin:0}body{background:var(--bg);color:var(--text)}.app-shell{display:flex;height:100vh}.sidebar{width:200px;flex-shrink:0;background:var(--panel);border-right:1px solid var(--border);display:flex;flex-direction:column;padding:16px 0}.sidebar-title{padding:0 16px 16px;font-size:14px;font-weight:600}.sidebar-nav{display:flex;flex-direction:column;gap:2px}.sidebar-link{padding:10px 16px;color:var(--text-dim);text-decoration:none;font-size:13px;border-left:3px solid transparent}.sidebar-link:hover{background:#ffffff08;color:var(--text)}.sidebar-link.active{color:var(--text);border-left-color:#2a78d6;background:#2a78d614}.page-content{flex:1;min-width:0;height:100vh;overflow:hidden;display:flex;flex-direction:column}.app{display:flex;flex-direction:column;height:100%}.dashboard{flex:1;overflow-y:auto;padding:24px}.dashboard h1{font-size:15px;font-weight:600;margin:0 0 20px}.dashboard-error{color:#e34948;font-size:13px}.dashboard-uptime{margin-top:16px;color:var(--text-dim);font-size:12px}.kpi-row{display:flex;gap:16px;flex-wrap:wrap}.kpi-row-centered{justify-content:center}.metric-tile{background:var(--panel);border:1px solid var(--border);border-radius:8px;padding:16px;min-width:240px;flex:1}.metric-tile-label{font-size:12px;color:var(--text-dim);margin-bottom:6px}.metric-tile-value{font-size:28px;font-weight:600;margin-bottom:10px}.metric-meter-track{height:8px;border-radius:999px;background:#ffffff0f;overflow:hidden;margin-bottom:10px}.metric-meter-fill{height:100%;min-width:8px;border-radius:0 4px 4px 0;transition:width .3s ease}.metric-sparkline-wrap{position:relative;width:100%;height:32px}.metric-sparkline{display:block;width:100%;height:100%;overflow:visible}.metric-sparkline-dot{position:absolute;left:100%;width:8px;height:8px;border-radius:50%;transform:translate(-50%,-50%);box-shadow:0 0 0 2px var(--panel);pointer-events:none}.metric-tile-secondary{margin-top:8px;font-size:11px;color:var(--text-dim)}.container-status-card{background:var(--panel);border:1px solid var(--border);border-radius:10px;padding:18px;min-width:280px;max-width:380px;display:flex;flex-direction:column;gap:14px}.container-header-group{display:flex;flex-direction:column;gap:4px}.container-status-header{display:flex;align-items:center;justify-content:space-between;gap:12px}.container-name{font-size:14px;font-weight:600}.container-id{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:11px;color:var(--text-dim)}.status-badge{display:inline-flex;align-items:center;gap:6px;padding:4px 10px;border-radius:999px;border:1px solid;font-size:11px;font-weight:600;text-transform:uppercase;white-space:nowrap;flex-shrink:0}.status-dot{width:6px;height:6px;border-radius:50%;flex-shrink:0}.container-divider{border-top:1px solid var(--border)}.container-stat-row{display:flex;gap:24px}.container-stat-value{font-size:18px;font-weight:600;margin-top:2px}.container-resource{display:flex;flex-direction:column;gap:6px}.container-resource-row{display:flex;align-items:baseline;justify-content:space-between}.container-resource-value{font-size:12px;font-weight:600}.container-actions{display:flex;align-items:center;justify-content:flex-end;gap:8px;min-height:30px}.action-button{background:transparent;border:1px solid var(--border);color:var(--text);padding:7px 14px;border-radius:7px;font-size:12px;font-weight:500;cursor:pointer}.action-button:hover:not(:disabled){border-color:var(--text-dim)}.action-button:disabled{opacity:.35;color:var(--text-dim);border-color:var(--border);cursor:not-allowed}.action-button.danger{border-color:#d03b3b80;color:#d03b3b}.action-button.danger:hover:not(:disabled){border-color:#d03b3b}.action-confirm-row{display:flex;align-items:center;gap:8px;font-size:12px;color:var(--text-dim)}.action-spinner{font-size:12px;color:var(--text-dim);margin-left:auto}.exec-terminal-overlay{position:fixed;top:0;right:0;bottom:0;left:0;background:#0009;display:flex;align-items:center;justify-content:center;z-index:100}.exec-terminal-panel{background:#1e1e1e;border:1px solid var(--border);border-radius:10px;width:min(900px,90vw);height:min(560px,80vh);display:flex;flex-direction:column;overflow:hidden}.exec-terminal-header{display:flex;align-items:center;justify-content:space-between;padding:10px 14px;border-bottom:1px solid var(--border);font-size:12px;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;color:var(--text-dim)}.exec-terminal-body{flex:1;padding:8px;overflow:hidden}.filter-bar{padding:12px 16px;border-bottom:1px solid var(--border);background:var(--panel);display:flex;flex-direction:column;gap:10px}.filter-bar-row{display:flex;align-items:center;gap:12px}.filter-bar h1{font-size:15px;font-weight:600;margin:0;flex:1}.level-chips{display:flex;gap:6px}.level-chip{background:transparent;border:none;padding:0;cursor:pointer;opacity:.4;transition:opacity .15s}.level-chip.active{opacity:1}.level-badge{display:inline-block;flex-shrink:0;padding:2px 8px;border-radius:999px;font-size:11px;font-weight:600;text-transform:uppercase;border:1px solid}.search-input{flex:1;max-width:360px;background:var(--bg);border:1px solid var(--border);color:var(--text);padding:6px 10px;border-radius:6px;font-size:13px}.visible-count{color:var(--text-dim);font-size:12px;white-space:nowrap}.export-button{background:transparent;border:1px solid var(--border);color:var(--text);padding:6px 12px;border-radius:6px;font-size:12px;text-decoration:none;white-space:nowrap;cursor:pointer}.export-button:hover{border-color:var(--text-dim)}.connection-badge{display:flex;align-items:center;gap:6px;font-size:12px;color:var(--text-dim)}.connection-dot{width:8px;height:8px;border-radius:50%}.log-table-wrapper{position:relative;flex:1;overflow:hidden}.log-table-scroll{height:100%;overflow-y:auto;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:12.5px}.log-row{display:flex;align-items:center;gap:10px;padding:4px 16px;border-bottom:1px solid var(--border);white-space:nowrap;overflow:hidden}.log-timestamp{color:var(--text-dim);flex-shrink:0;white-space:nowrap}.log-context{color:#60a5fa;flex-shrink:0;max-width:220px;overflow:hidden;text-overflow:ellipsis}.log-message{color:var(--text);overflow:hidden;text-overflow:ellipsis}.jump-to-latest{position:absolute;bottom:16px;left:50%;transform:translate(-50%);background:#3b82f6;color:#fff;border:none;padding:8px 16px;border-radius:999px;cursor:pointer;font-size:12px;box-shadow:0 4px 12px #0000004d}
