/**
 * 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: #0f1115;--panel: #171a21;--panel-hover: #1d2129;--border: #2a2e38;--text: #e4e6eb;--muted: #8b8f9a;--accent: #4f8cff;--accent-hover: #6ba0ff;--ok: #3ecf8e;--err: #ff5c5c;--warn: #e0a83e;--sidebar-width: 220px}*{box-sizing:border-box}body{margin:0;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif;background:var(--bg);color:var(--text)}a{color:inherit;text-decoration:none}h1,h2,h3{font-weight:600;margin:0 0 .3rem}h1{font-size:1.3rem}h2{font-size:1.05rem}p.subtitle{color:var(--muted);margin:0 0 1.5rem;font-size:.85rem}.app-shell{display:flex;min-height:100vh}.sidebar{width:var(--sidebar-width);background:var(--panel);border-right:1px solid var(--border);padding:1.2rem .8rem;position:sticky;top:0;height:100vh;display:flex;flex-direction:column}.sidebar .brand{font-weight:700;font-size:1.05rem;padding:0 .5rem 1.2rem}.sidebar nav{display:flex;flex-direction:column;gap:.2rem;flex:1}.sidebar nav a{padding:.55rem .7rem;border-radius:6px;font-size:.88rem;color:var(--muted);display:flex;align-items:center;gap:.55rem}.sidebar nav a:hover{background:var(--panel-hover);color:var(--text)}.sidebar nav a.active{background:var(--accent);color:#fff}.sidebar .footer{padding:.5rem}.main{flex:1;padding:1.8rem 2.2rem;max-width:1080px}.topbar{display:flex;justify-content:space-between;align-items:flex-start;margin-bottom:1.5rem}.card{background:var(--panel);border:1px solid var(--border);border-radius:10px;padding:1.25rem;margin-bottom:1.25rem}.card-title{display:flex;justify-content:space-between;align-items:center;margin-bottom:.9rem}.grid{display:grid;gap:1rem}.grid.cols-2{grid-template-columns:1fr 1fr}.grid.cols-3{grid-template-columns:repeat(3,1fr)}@media (max-width: 800px){.grid.cols-2,.grid.cols-3{grid-template-columns:1fr}}label{display:block;font-size:.78rem;color:var(--muted);margin-bottom:.3rem}input,select,textarea{width:100%;background:#0d0f13;border:1px solid var(--border);color:var(--text);padding:.55rem .6rem;border-radius:6px;font-size:.88rem;margin-bottom:.9rem;font-family:inherit}input:focus,select:focus{outline:none;border-color:var(--accent)}small.hint{color:var(--muted);display:block;margin-top:-.6rem;margin-bottom:.9rem;font-size:.76rem}button{background:var(--accent);color:#fff;border:none;padding:.55rem 1.05rem;border-radius:6px;font-size:.85rem;cursor:pointer;font-weight:500}button:hover{background:var(--accent-hover)}button:disabled{opacity:.5;cursor:not-allowed}button.secondary{background:#2a2e38}button.secondary:hover{background:#333947}button.danger{background:#5a2323}button.danger:hover{background:#712c2c}.btn-row{display:flex;gap:.5rem;flex-wrap:wrap}.badge{display:inline-flex;align-items:center;gap:.35rem;padding:.2rem .6rem;border-radius:20px;font-size:.76rem;font-weight:600}.badge.ok{background:#3ecf8e26;color:var(--ok)}.badge.err{background:#ff5c5c26;color:var(--err)}.badge.warn{background:#e0a83e26;color:var(--warn)}.badge.muted{background:#8b8f9a26;color:var(--muted)}.dot{width:7px;height:7px;border-radius:50%;background:currentColor}.client-card{background:var(--panel);border:1px solid var(--border);border-radius:10px;padding:1rem 1.1rem;cursor:pointer;transition:border-color .15s}.client-card:hover{border-color:var(--accent)}.client-card .name{font-weight:600;margin-bottom:.3rem}.client-card .meta{color:var(--muted);font-size:.78rem}table{width:100%;border-collapse:collapse;font-size:.85rem}th,td{text-align:left;padding:.5rem .6rem;border-bottom:1px solid var(--border)}th{color:var(--muted);font-weight:500;font-size:.76rem;text-transform:uppercase;letter-spacing:.03em}.logs-box{background:#0a0b0e;border:1px solid var(--border);border-radius:6px;padding:.8rem;height:420px;overflow-y:auto;font-family:SF Mono,Consolas,monospace;font-size:.76rem;white-space:pre-wrap}.logline{padding:1px 0;line-height:1.5}.logline .ts{color:var(--muted)}.logline .level{font-weight:600;padding:0 .35rem;margin:0 .3rem}.logline .level.WARNING{color:var(--warn)}.logline .level.ERROR,.logline .level.CRITICAL{color:var(--err)}.logline .level.INFO{color:var(--muted)}.logline .logger{color:#6b90c9}.logline.continuation{color:var(--muted);padding-left:1.2rem}.logline .http-ok{color:var(--ok)}.logline .http-err{color:var(--err)}.toast-container{position:fixed;bottom:1.5rem;right:1.5rem;display:flex;flex-direction:column;gap:.6rem;z-index:1000;max-width:360px}.toast{background:var(--panel);border:1px solid var(--border);border-left:3px solid var(--accent);border-radius:8px;padding:.7rem .9rem;font-size:.82rem;box-shadow:0 4px 16px #0000004d}.toast.ok{border-left-color:var(--ok)}.toast.err{border-left-color:var(--err)}.toast .toast-title{font-weight:600;margin-bottom:.15rem}.toast .toast-detail{color:var(--muted);font-size:.78rem;word-break:break-word}.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;background:#0009;display:flex;align-items:center;justify-content:center;z-index:900}.modal{background:var(--panel);border:1px solid var(--border);border-radius:10px;padding:1.5rem;width:380px}.login-screen{max-width:360px;margin:6rem auto 0}.error-text{color:var(--err);font-size:.82rem;margin-top:-.5rem;margin-bottom:.9rem}.empty-state{color:var(--muted);font-size:.85rem;padding:1rem 0}.loading{color:var(--muted);font-size:.85rem}
