/**
 * 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: #fbf9e6;--panel: #fffef6;--panel2: #f4f1d8;--border: #e4dfb8;--text: #2a2a1f;--muted: #7a7659;--accent: #2f81f7;--accent2: #1f6feb;--green: #1a7f37;--red: #c4341c;--amber: #9a6700}*{box-sizing:border-box}body{margin:0;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif;background:var(--bg);color:var(--text)}a{color:var(--accent);text-decoration:none}button{font:inherit;cursor:pointer;border:1px solid var(--border);background:var(--panel2);color:var(--text);padding:8px 14px;border-radius:7px;transition:.15s}button:hover{border-color:var(--accent)}button.primary{background:var(--accent2);border-color:var(--accent2)}button.primary:hover{background:var(--accent)}button.danger{color:var(--red);border-color:#5c2b2b}button.danger:hover{background:#341818}button:disabled{opacity:.5;cursor:not-allowed}input,select,textarea{font:inherit;background:var(--bg);color:var(--text);border:1px solid var(--border);border-radius:7px;padding:9px 11px;width:100%}label{display:block;font-size:13px;color:var(--muted);margin:10px 0 4px}.layout{display:flex;min-height:100vh}.sidebar{width:230px;background:var(--panel);border-right:1px solid var(--border);padding:18px 14px;display:flex;flex-direction:column;gap:4px}.brand{font-weight:700;font-size:17px;margin-bottom:18px;display:flex;gap:8px;align-items:center}.navlink{padding:9px 12px;border-radius:7px;color:var(--muted);display:flex;gap:9px;align-items:center}.navlink:hover{background:var(--panel2);color:var(--text)}.navlink.active{background:var(--accent2);color:#fff}.sidebar .spacer{flex:1}.userbox{font-size:13px;color:var(--muted);border-top:1px solid var(--border);padding-top:12px}.main{flex:1;padding:26px 32px;overflow:auto}h1{font-size:22px;margin:0 0 4px}.subtle{color:var(--muted);font-size:14px;margin-bottom:22px}.grid{display:grid;gap:16px;grid-template-columns:repeat(auto-fill,minmax(290px,1fr))}.card{background:var(--panel);border:1px solid var(--border);border-radius:12px;padding:18px}.card h3{margin:0 0 4px;font-size:16px;display:flex;align-items:center;gap:8px}.card .host{color:var(--muted);font-size:13px;font-family:monospace}.card .actions{display:flex;gap:8px;margin-top:16px}.badge{font-size:11px;padding:2px 8px;border-radius:20px;border:1px solid var(--border);text-transform:uppercase;letter-spacing:.04em}.badge.prod{background:#fbe3df;color:#b42318;border-color:#f3c4bd}.badge.staging{background:#fdf0cf;color:#9a6700;border-color:#f0dca0}.badge.dev{background:#dff5e3;color:#1a7f37;border-color:#b7e4c0}.dot{width:9px;height:9px;border-radius:50%;display:inline-block}.dot.online{background:var(--green)}.dot.offline{background:var(--red)}.dot.unknown{background:var(--muted)}table{width:100%;border-collapse:collapse;font-size:14px}th,td{text-align:left;padding:9px 10px;border-bottom:1px solid var(--border)}th{color:var(--muted);font-weight:600;font-size:12px;text-transform:uppercase}tr.danger td{background:#f8514914}.statgrid{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:14px;margin-bottom:24px}.stat{background:var(--panel);border:1px solid var(--border);border-radius:12px;padding:16px 18px}.stat .n{font-size:28px;font-weight:700}.stat .l{color:var(--muted);font-size:13px}.login-wrap{display:flex;align-items:center;justify-content:center;min-height:100vh}.login-card{width:360px;background:var(--panel);border:1px solid var(--border);border-radius:14px;padding:30px}.error{color:var(--red);font-size:13px;margin-top:10px}.ok{color:var(--green);font-size:13px;margin-top:10px}.modal-bg{position:fixed;top:0;right:0;bottom:0;left:0;background:#0009;display:flex;align-items:center;justify-content:center;z-index:50}.modal{background:var(--panel);border:1px solid var(--border);border-radius:14px;padding:24px;width:460px;max-height:90vh;overflow:auto}.row{display:flex;gap:12px}.row>*{flex:1}.pill{display:inline-block;font-size:12px;padding:2px 8px;border:1px solid var(--border);border-radius:20px;margin:2px}.toolbar{display:flex;gap:10px;margin-bottom:16px;align-items:center}.toolbar input{max-width:280px}.term-host{height:calc(100vh - 150px);background:#000;border:1px solid var(--border);border-radius:10px;padding:8px}.flex-between{display:flex;justify-content:space-between;align-items:center}.console-grid{display:grid;gap:12px}.pane{display:flex;flex-direction:column;background:#000;border:1px solid var(--border);border-radius:10px;overflow:hidden}.pane-head{display:flex;justify-content:space-between;align-items:center;gap:8px;padding:6px 10px;background:#11110a;border-bottom:1px solid var(--border)}.pane-head .t{color:#d8d2a8;font-size:12px;font-family:monospace}.pane-head .x{color:var(--muted);cursor:pointer;border:none;background:transparent;padding:2px 6px}.pane-head .x:hover{color:var(--red)}.pane .term-host{height:100%;border:none;border-radius:0;flex:1}
