/**
 * 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:dark}*{box-sizing:border-box}body{margin:0;font-family:-apple-system,PingFang SC,Helvetica Neue,sans-serif;background:#0d1117;color:#d4d9e2}button{font-family:inherit;cursor:pointer}.layout{display:flex;min-height:100vh}.sidebar{width:200px;background:#12161f;border-right:1px solid #232a36;padding:20px 14px;display:flex;flex-direction:column}.logo{font-size:20px;font-weight:700;color:#4f8cff;margin-bottom:24px;letter-spacing:1px}.sidebar nav{display:flex;flex-direction:column;gap:6px;flex:1}.sidebar nav button,.range-row button,.tabs button{background:transparent;border:1px solid transparent;color:#9aa4b5;padding:9px 12px;border-radius:8px;font-size:14px;text-align:left}.sidebar nav button.active{background:#1b2230;color:#4f8cff}.sidebar-footer button{width:100%}.ghost{background:transparent;border:1px solid #2a3140;color:#9aa4b5;padding:6px 12px;border-radius:8px;font-size:13px}.content{flex:1;padding:24px 32px;max-width:1200px}.page-head{display:flex;align-items:center;gap:14px;margin-bottom:18px}.page-head h2{margin:0;font-size:20px}.muted{color:#7c8698}.small{font-size:12px}.error{color:#ef4444;font-size:13px}.login-wrap{min-height:100vh;display:flex;align-items:center;justify-content:center}.login-card{background:#12161f;border:1px solid #232a36;border-radius:14px;padding:32px;width:340px;display:flex;flex-direction:column;gap:8px}.login-card h1{margin:0;color:#4f8cff}.login-card p.muted{margin:0 0 10px}.login-card label{font-size:13px;color:#9aa4b5}.login-card input{background:#0d1117;border:1px solid #2a3140;color:#d4d9e2;border-radius:8px;padding:10px 12px;font-size:14px;outline:none}.login-card input:focus{border-color:#4f8cff}.login-card button{margin-top:10px;background:#4f8cff;border:none;color:#fff;padding:10px;border-radius:8px;font-size:14px}.login-card button:disabled{opacity:.6}.login-card .link-btn{background:transparent;color:#4f8cff;border:none;padding:4px;font-size:13px}.way-toggle{display:flex;gap:4px;background:#0d1117;border-radius:8px;padding:3px}.way-toggle button{flex:1;background:transparent;border:none;color:#7c8698;padding:6px;border-radius:6px;font-size:13px}.way-toggle button.active{background:#1b2230;color:#4f8cff}.code-row{display:flex;gap:6px}.code-row input{flex:1;background:#0d1117;border:1px solid #2a3140;color:#d4d9e2;border-radius:8px;padding:10px 12px;font-size:14px;outline:none}.code-row .ghost{white-space:nowrap}.side-user{font-size:12px;color:#7c8698;margin-bottom:16px;padding-left:2px}.warn-banner{background:#2a2310;border:1px solid #6b5410;color:#fbbf24;border-radius:10px;padding:10px 14px;font-size:13px;margin-bottom:14px}.users-table{width:100%;border-collapse:collapse;margin-top:8px;font-size:13px}.users-table th,.users-table td{text-align:left;padding:8px 6px;border-bottom:1px solid #232a36}.users-table th{color:#7c8698;font-weight:500}.ghost.danger{color:#ef4444;border-color:#6b2222}.create-user-form{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:10px}.create-user-form input{flex:1;min-width:140px}.settings-card form{flex-wrap:wrap}.settings-card input{min-width:160px}.host-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(320px,1fr));gap:16px}.host-card{background:#12161f;border:1px solid #232a36;border-radius:14px;padding:16px;cursor:pointer;transition:border-color .15s}.host-card:hover{border-color:#4f8cff}.host-card.offline{opacity:.55}.host-card-head{display:flex;align-items:center;gap:8px;margin-bottom:12px}.host-card-foot{margin-top:10px}.dot{width:9px;height:9px;border-radius:50%;display:inline-block}.dot.on{background:#22c55e;box-shadow:0 0 6px #22c55e}.dot.off{background:#555}.gauges{display:flex;justify-content:space-between}.gauge{text-align:center}.gauge-label{font-size:12px;color:#7c8698;margin-bottom:6px}.gauge-ring{width:52px;height:52px;border-radius:50%;margin:0 auto;display:grid;place-items:center;font-size:12px;font-weight:600;background:conic-gradient(var(--ring) var(--pct),#232a36 0)}.gauge-ring:before{content:"";grid-area:1/1;width:40px;height:40px;border-radius:50%;background:#12161f}.gauge-ring span{grid-area:1/1;z-index:1}.gauge-sub{font-size:10px;color:#7c8698;margin-top:4px;max-width:70px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.info-strip{display:flex;flex-wrap:wrap;gap:8px 20px;background:#12161f;border:1px solid #232a36;border-radius:10px;padding:10px 14px;font-size:12px;color:#9aa4b5;margin-bottom:14px}.stat-grid{display:flex;gap:14px;flex-wrap:wrap;margin-bottom:16px}.stat{background:#12161f;border:1px solid #232a36;border-radius:10px;padding:12px 16px;min-width:150px}.stat label{display:block;font-size:12px;color:#7c8698;margin-bottom:4px}.stat b{font-size:20px}.stat b small{font-size:11px;color:#7c8698;font-weight:400}.tabs{margin-left:auto;display:flex;gap:6px;background:#12161f;padding:4px;border-radius:10px;border:1px solid #232a36}.tabs button.active,.range-row button.active{background:#1b2230;color:#4f8cff}.range-row{display:flex;gap:8px;margin-bottom:14px}.range-row button{border:1px solid #2a3140;text-align:center}.chart-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px}.chart-card{background:#12161f;border:1px solid #232a36;border-radius:12px;padding:14px}.chart-card h4{margin:0 0 8px;color:#9aa4b5;font-size:13px;font-weight:500}.terminal-wrap{position:relative}.terminal-box{background:#12161f;border:1px solid #232a36;border-radius:12px;padding:8px;height:520px}.term-auth{margin:0 auto}.terminal-wrap .term-auth{margin-top:40px}.settings-card{background:#12161f;border:1px solid #232a36;border-radius:14px;padding:22px;max-width:560px}.settings-card h3{margin:0 0 6px}.settings-card form{display:flex;gap:8px;margin:10px 0}.settings-card input{flex:1;background:#0d1117;border:1px solid #2a3140;color:#d4d9e2;border-radius:8px;padding:9px 12px;font-size:13px}.settings-card button{background:#4f8cff;border:none;color:#fff;padding:9px 16px;border-radius:8px;font-size:13px}.settings-card hr{border:none;border-top:1px solid #232a36;margin:18px 0}.settings-card pre{background:#0d1117;border:1px solid #232a36;border-radius:8px;padding:12px;font-size:12px;overflow-x:auto;color:#9aa4b5}.settings-card .mail-fields{display:flex;flex-direction:column;gap:12px}.settings-card .mail-fields label{display:block;font-size:12px;color:#7c8698;margin-bottom:4px}.settings-card .mail-fields label code{color:#9aa4b5;font-size:11px;background:#0d1117;border:1px solid #232a36;border-radius:4px;padding:1px 5px;margin-left:4px}.token-panel{border:1px dashed #3a3326;border-radius:10px;padding:14px 16px;margin-top:12px;background:#79b57f0a}.token-panel pre{background:#0d1117;border:1px solid #232a36;border-radius:8px;padding:10px 12px;font-size:12px;overflow-x:auto;color:#d4d9e2;margin:8px 0;-webkit-user-select:all;user-select:all}.host-card .ghost{font-size:12px;padding:4px 10px;background:transparent;border:1px solid #2a3140;color:#9aa4b5;border-radius:6px;cursor:pointer}.host-card .ghost:hover{color:#d4d9e2;border-color:#4f8cff}.host-card .ghost.danger:hover{color:#ef4444;border-color:#ef4444}
