/**
 * 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: #0b0f14;--card: #131a22;--card-2: #1a232e;--text: #e5edf5;--muted: #8ba0b5;--accent: #38bdf8;--up: #22c55e;--degraded: #eab308;--down: #ef4444;--unknown: #64748b}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--text);font-family:system-ui,-apple-system,Segoe UI,Roboto,sans-serif;-webkit-tap-highlight-color:transparent}.app{max-width:560px;margin:0 auto;padding:12px 12px 84px}.topbar{display:flex;align-items:center;justify-content:space-between;padding:8px 4px 14px}.topbar h1{font-size:20px;margin:0;letter-spacing:.3px}.topbar .sub{color:var(--muted);font-size:12px}.banner{border-radius:12px;padding:10px 14px;margin-bottom:12px;font-size:14px;font-weight:600}.banner.down{background:#ef444426;color:#fca5a5;border:1px solid rgba(239,68,68,.4)}.banner.info{background:#38bdf81a;color:#7dd3fc;border:1px solid rgba(56,189,248,.3);font-weight:500}.banner.none{background:var(--card);color:var(--muted)}.card{background:var(--card);border-radius:14px;padding:14px;margin-bottom:10px}.hostgrid{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:10px}.stat{background:var(--card-2);border-radius:10px;padding:10px;border:1px solid transparent;color:inherit;text-align:left;font:inherit;width:100%}.stat.tappable{cursor:pointer}.stat.tappable:active{background:#1f2b38}.stat.sel{border-color:var(--accent);background:#14222e}.stat:disabled{cursor:default;opacity:1}.stat-hint{color:var(--muted);font-size:11px;text-align:center;margin-top:8px}.metric-history{margin-top:12px;background:var(--card-2);border-radius:10px;padding:10px}.stat .label{color:var(--muted);font-size:11px;text-transform:uppercase;letter-spacing:.6px}.stat .value{font-size:18px;font-weight:700;margin-top:2px}.meter{height:5px;border-radius:3px;background:#0e141b;margin-top:8px;overflow:hidden}.meter>div{height:100%;border-radius:3px;background:var(--accent)}.meter>div.warn{background:var(--degraded)}.meter>div.crit{background:var(--down)}.svclist{display:grid;grid-template-columns:1fr;gap:8px}.svcrow{display:flex;align-items:center;gap:12px;padding:13px 14px;background:var(--card);border-radius:14px;cursor:pointer;border:none;width:100%;color:inherit;text-align:left;font:inherit}.svcrow:active{background:var(--card-2)}.dot{width:12px;height:12px;border-radius:50%;flex-shrink:0}.dot.up{background:var(--up);box-shadow:0 0 8px #22c55e99}.dot.degraded{background:var(--degraded);box-shadow:0 0 8px #eab30899}.dot.down{background:var(--down);box-shadow:0 0 8px #ef4444b3}.dot.unknown{background:var(--unknown)}.svcname{font-weight:600}.svcmeta{color:var(--muted);font-size:12px;margin-top:2px}.svcstatus{margin-left:auto;font-size:12px;font-weight:700;text-transform:uppercase}.svcstatus.up{color:var(--up)}.svcstatus.degraded{color:var(--degraded)}.svcstatus.down{color:var(--down)}.svcstatus.unknown{color:var(--unknown)}.section-title{color:var(--muted);font-size:12px;text-transform:uppercase;letter-spacing:.8px;margin:16px 4px 8px}.tabs{position:fixed;bottom:0;left:0;right:0;display:flex;background:#0b0f14f2;-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);border-top:1px solid #1d2733;padding-bottom:env(safe-area-inset-bottom)}.tabs button{flex:1;background:none;border:none;color:var(--muted);padding:11px 0 9px;cursor:pointer;display:flex;align-items:center;justify-content:center}.tabs button.active{color:var(--accent)}.tabs button svg{display:block}.tablabel{display:none}.check{display:flex;gap:10px;align-items:baseline;padding:8px 0;border-bottom:1px solid #1d2733}.check:last-child{border-bottom:none}.check .type{font-size:13px;font-weight:600;min-width:120px}.check .detail{color:var(--muted);font-size:13px}.detail-head{display:flex;align-items:center;gap:12px;margin-bottom:6px}.back{background:none;border:none;color:var(--accent);cursor:pointer;padding:6px 6px 6px 0;display:flex;align-items:center}.btnrow{display:flex;gap:10px;margin-top:12px}.btn{flex:1;padding:12px;border-radius:12px;border:none;font-weight:700;font-size:14px;cursor:pointer;background:var(--card-2);color:var(--text)}.btn.danger{background:#ef44442e;color:#fca5a5}.btn:disabled{opacity:.5}.logs{background:#05080c;border-radius:10px;padding:10px;margin-top:12px;font-family:ui-monospace,Consolas,monospace;font-size:11px;line-height:1.5;white-space:pre-wrap;word-break:break-all;max-height:45vh;overflow-y:auto;color:#9fb3c8}.event{padding:10px 2px;border-bottom:1px solid #1d2733}.event .line{font-size:14px;font-weight:600}.event .meta{color:var(--muted);font-size:12px;margin-top:2px}.label{color:var(--muted);font-size:11px;text-transform:uppercase;letter-spacing:.6px}.chart-toolbar{display:flex;align-items:center;justify-content:space-between;margin-bottom:10px}.rangebtns{display:flex;gap:4px}.rangebtns button{background:var(--card-2);border:none;color:var(--muted);font-size:12px;font-weight:600;padding:5px 12px;border-radius:999px;cursor:pointer}.rangebtns button.active{color:var(--accent);background:#16303f}.chart-svg{width:100%;height:64px;display:block}.chart-range{display:flex;justify-content:space-between;color:var(--muted);font-size:10px;margin-top:4px}.termview{display:flex;flex-direction:column;height:calc(100vh - 150px)}.termbar{display:flex;align-items:center;gap:8px;padding:4px 2px 10px}.termhost{flex:1;min-height:0;background:#05080c;border-radius:12px;padding:8px;overflow:hidden}.termhost .xterm{height:100%}.field{margin-bottom:14px}.field label{display:block;color:var(--muted);font-size:12px;margin-bottom:6px}.field input{width:100%;padding:12px;border-radius:10px;border:1px solid #243140;background:var(--card-2);color:var(--text);font-size:14px}.hint{color:var(--muted);font-size:12px;line-height:1.5;margin-top:14px}@media (min-width: 768px){.app{max-width:1160px;padding:20px 32px 48px}.tabs{position:static;background:none;border-top:none;-webkit-backdrop-filter:none;backdrop-filter:none;gap:6px;padding:0 0 18px;justify-content:flex-start}.tabs button{flex:0 0 auto;padding:9px 18px 9px 14px;border-radius:999px;background:var(--card);gap:8px}.tabs button svg{width:17px;height:17px}.tablabel{display:inline;font-size:13px;font-weight:600}.tabs button:hover{color:var(--text)}.tabs button.active{background:var(--card-2);color:var(--accent)}.hostgrid{grid-template-columns:repeat(4,1fr)}.svclist{grid-template-columns:repeat(2,1fr);gap:10px}.svcrow:hover{background:var(--card-2)}.btnrow{max-width:420px}.card.settings{max-width:620px}.termview{height:calc(100vh - 190px)}.logs{max-height:55vh;font-size:12px}}@media (min-width: 1200px){.app{max-width:1400px}.svclist{grid-template-columns:repeat(3,1fr)}}
