/**
 * 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,.xterm .xterm-message{position:absolute;left:0;top:0;bottom:0;right:0;z-index:10;color:transparent;pointer-events:none}.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}.app{display:flex;height:100vh;background:#0a0a0f;overflow:hidden}.main-content{flex:1;display:flex;flex-direction:column;overflow:hidden}.content-area{flex:1;overflow:auto;padding:20px;display:flex;flex-direction:column;gap:20px}.dashboard-grid{display:grid;grid-template-columns:1fr 1fr 1fr;gap:20px;min-height:0}@media (max-width: 1400px){.dashboard-grid{grid-template-columns:1fr 1fr}}@media (max-width: 900px){.dashboard-grid{grid-template-columns:1fr}}.panel{background:#16162a;border:1px solid #2a2a4a;border-radius:12px;padding:20px;animation:fadeIn .3s ease-out}@keyframes fadeIn{0%{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}.panel-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:16px;padding-bottom:12px;border-bottom:1px solid #2a2a4a}.panel-title{font-size:14px;font-weight:600;text-transform:uppercase;letter-spacing:.05em;color:#94a3b8;display:flex;align-items:center;gap:8px}.panel-icon{font-size:18px}.status-dot{width:8px;height:8px;border-radius:50%;display:inline-block}.status-dot.running{background:#22c55e;box-shadow:0 0 8px #22c55e}.status-dot.ready{background:#06b6d4;box-shadow:0 0 8px #06b6d4}.status-dot.busy{background:#f59e0b;box-shadow:0 0 8px #f59e0b}.status-dot.error{background:#ef4444;box-shadow:0 0 8px #ef4444}.status-dot.offline{background:#64748b}.agent-card{background:#12121a;border:1px solid #2a2a4a;border-radius:8px;padding:16px;transition:all .3s ease;position:relative;overflow:hidden}.agent-card:hover{border-color:#6366f1;transform:translateY(-2px);box-shadow:0 0 20px #6366f14d}.agent-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px}.agent-name{font-size:16px;font-weight:700;color:#f1f5f9}.agent-role{font-size:11px;text-transform:uppercase;letter-spacing:.08em;color:#6366f1;background:#6366f11a;padding:4px 8px;border-radius:4px}.agent-activity{font-size:13px;color:#94a3b8;font-family:JetBrains Mono,monospace;margin-bottom:8px}.agent-pulse{display:flex;align-items:center;gap:6px;font-size:11px;color:#64748b}.pulse-ring{width:6px;height:6px;border-radius:50%;background:#22c55e;animation:pulseGlow 2s infinite}@keyframes pulseGlow{0%,to{box-shadow:0 0 5px #22c55e80}50%{box-shadow:0 0 15px #22c55ecc,0 0 30px #22c55e4d}}.log-container{background:#12121a;border:1px solid #2a2a4a;border-radius:12px;overflow:hidden;display:flex;flex-direction:column;height:400px}.log-container.fullscreen{height:calc(100vh - 200px)}.log-header{display:flex;align-items:center;justify-content:space-between;padding:12px 16px;background:#1a1a2e;border-bottom:1px solid #2a2a4a}.log-title{font-size:13px;font-weight:600;color:#94a3b8;display:flex;align-items:center;gap:8px}.log-actions{display:flex;gap:8px}.log-btn{background:#16162a;border:1px solid #2a2a4a;color:#94a3b8;padding:4px 10px;border-radius:4px;font-size:11px;cursor:pointer;transition:all .2s}.log-btn:hover{background:#6366f1;color:#fff;border-color:#6366f1}.log-content{flex:1;overflow-y:auto;padding:12px 16px;font-family:JetBrains Mono,monospace;font-size:12px;line-height:1.6}.log-entry{display:flex;gap:12px;padding:2px 0;animation:slideIn .2s ease-out}@keyframes slideIn{0%{transform:translate(-20px);opacity:0}to{transform:translate(0);opacity:1}}.log-time{color:#64748b;min-width:80px;flex-shrink:0}.log-level{min-width:40px;text-align:center;font-weight:600;text-transform:uppercase;font-size:10px;padding:1px 4px;border-radius:3px}.log-level.info{color:#06b6d4;background:#06b6d41a}.log-level.warn{color:#f59e0b;background:#f59e0b1a}.log-level.error{color:#ef4444;background:#ef44441a}.log-level.success{color:#22c55e;background:#22c55e1a}.log-message{color:#f1f5f9;word-break:break-all}.chat-panel{display:flex;flex-direction:column;height:100%;background:#16162a;border:1px solid #2a2a4a;border-radius:12px;overflow:hidden}.chat-header{display:flex;align-items:center;justify-content:space-between;padding:16px 20px;background:#1a1a2e;border-bottom:1px solid #2a2a4a}.chat-title{font-size:14px;font-weight:600;color:#f1f5f9}.chat-messages{flex:1;overflow-y:auto;padding:20px;display:flex;flex-direction:column;gap:12px}.chat-message{max-width:80%;padding:12px 16px;border-radius:12px;animation:fadeIn .3s ease-out}.chat-message.user{align-self:flex-end;background:#6366f1;color:#fff}.chat-message.agent{align-self:flex-start;background:#12121a;border:1px solid #2a2a4a}.chat-message .sender{font-size:11px;font-weight:600;margin-bottom:4px;text-transform:uppercase;letter-spacing:.05em}.chat-message .content{font-size:14px;line-height:1.5}.chat-input-area{display:flex;gap:12px;padding:16px 20px;background:#1a1a2e;border-top:1px solid #2a2a4a}.chat-input{flex:1;background:#0a0a0f;border:1px solid #2a2a4a;border-radius:8px;padding:10px 14px;color:#f1f5f9;font-size:14px;outline:none;transition:border-color .2s}.chat-input:focus{border-color:#6366f1}.chat-send{background:#6366f1;border:none;color:#fff;padding:10px 20px;border-radius:8px;font-weight:600;cursor:pointer;transition:all .2s}.chat-send:hover{background:#818cf8;transform:scale(1.05)}.control-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:12px}.control-btn{display:flex;align-items:center;gap:10px;padding:14px 16px;background:#12121a;border:1px solid #2a2a4a;border-radius:8px;color:#f1f5f9;font-size:13px;font-weight:500;cursor:pointer;transition:all .2s;text-align:left}.control-btn:hover{background:#1e1e3a;border-color:#6366f1;transform:translateY(-1px)}.control-btn .icon{font-size:18px}.metric-card{background:#12121a;border:1px solid #2a2a4a;border-radius:8px;padding:16px;text-align:center}.metric-value{font-size:28px;font-weight:700;color:#6366f1;font-family:JetBrains Mono,monospace}.metric-label{font-size:11px;text-transform:uppercase;letter-spacing:.08em;color:#64748b;margin-top:4px}.metric-bar{width:100%;height:4px;background:#1a1a2e;border-radius:2px;margin-top:8px;overflow:hidden}.metric-fill{height:100%;border-radius:2px;transition:width .5s ease,background-color .3s}.sidebar{width:260px;background:#12121a;border-right:1px solid #2a2a4a;display:flex;flex-direction:column;padding:20px}.sidebar-logo{display:flex;align-items:center;gap:12px;margin-bottom:32px;padding-bottom:20px;border-bottom:1px solid #2a2a4a}.sidebar-logo .icon{font-size:28px}.sidebar-logo .text{font-size:16px;font-weight:700;color:#f1f5f9}.sidebar-logo .sub{font-size:11px;color:#6366f1;font-weight:500}.nav-item{display:flex;align-items:center;gap:12px;padding:12px 14px;border-radius:8px;cursor:pointer;transition:all .2s;margin-bottom:4px;color:#94a3b8;font-size:14px;font-weight:500}.nav-item:hover{background:#1e1e3a;color:#f1f5f9}.nav-item.active{background:#6366f126;color:#6366f1;border:1px solid rgba(99,102,241,.3)}.nav-item .icon{font-size:18px}.connection-status{margin-top:auto;padding-top:20px;border-top:1px solid #2a2a4a;display:flex;align-items:center;gap:8px;font-size:12px;color:#64748b}.connection-status.connected{color:#22c55e}.connection-status .dot{width:8px;height:8px;border-radius:50%;background:currentColor}.header{display:flex;align-items:center;justify-content:space-between;padding:16px 24px;background:#12121a;border-bottom:1px solid #2a2a4a}.header-title{font-size:20px;font-weight:700;color:#f1f5f9}.header-subtitle{font-size:13px;color:#64748b;margin-top:2px}.header-actions{display:flex;gap:12px}.header-btn{display:flex;align-items:center;gap:8px;padding:8px 16px;background:#16162a;border:1px solid #2a2a4a;border-radius:8px;color:#94a3b8;font-size:13px;cursor:pointer;transition:all .2s}.header-btn:hover{background:#6366f1;color:#fff;border-color:#6366f1}*{margin:0;padding:0;box-sizing:border-box}:root{--bg-primary: #0a0a0f;--bg-secondary: #12121a;--bg-tertiary: #1a1a2e;--bg-card: #16162a;--bg-hover: #1e1e3a;--border-color: #2a2a4a;--accent-primary: #6366f1;--accent-secondary: #8b5cf6;--accent-success: #22c55e;--accent-warning: #f59e0b;--accent-danger: #ef4444;--accent-info: #06b6d4;--text-primary: #f1f5f9;--text-secondary: #94a3b8;--text-muted: #64748b;--font-mono: "JetBrains Mono", monospace;--font-sans: "Inter", sans-serif;--shadow-glow: 0 0 20px rgba(99, 102, 241, .3);--shadow-card: 0 4px 6px -1px rgba(0, 0, 0, .3)}body{font-family:var(--font-sans);background:var(--bg-primary);color:var(--text-primary);min-height:100vh;overflow:hidden}::-webkit-scrollbar{width:6px;height:6px}::-webkit-scrollbar-track{background:var(--bg-secondary)}::-webkit-scrollbar-thumb{background:var(--border-color);border-radius:3px}::-webkit-scrollbar-thumb:hover{background:var(--accent-primary)}@keyframes pulse-glow{0%,to{box-shadow:0 0 5px #6366f180}50%{box-shadow:0 0 20px #6366f1cc,0 0 40px #6366f14d}}@keyframes spin-slow{0%{transform:rotate(0)}to{transform:rotate(360deg)}}@keyframes slide-in{0%{transform:translate(-20px);opacity:0}to{transform:translate(0);opacity:1}}@keyframes fade-in{0%{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}@keyframes typing{0%,to{opacity:1}50%{opacity:.3}}.typing-indicator span{animation:typing 1.4s infinite;display:inline-block;margin:0 2px}.typing-indicator span:nth-child(2){animation-delay:.2s}.typing-indicator span:nth-child(3){animation-delay:.4s}
