/**
 * 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-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{font-family:monospace;-webkit-user-select:text;user-select:text;white-space:pre}.xterm .xterm-accessibility-tree>div{transform-origin:left;width:fit-content}.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}.xterm .xterm-scrollable-element>.scrollbar{cursor:default}.xterm .xterm-scrollable-element>.scrollbar>.scra{cursor:pointer;font-size:11px!important}.xterm .xterm-scrollable-element>.visible{opacity:1;background:#0000;transition:opacity .1s linear;z-index:11}.xterm .xterm-scrollable-element>.invisible{opacity:0;pointer-events:none}.xterm .xterm-scrollable-element>.invisible.fade{transition:opacity .8s linear}.xterm .xterm-scrollable-element>.shadow{position:absolute;display:none}.xterm .xterm-scrollable-element>.shadow.top{display:block;top:0;left:3px;height:3px;width:100%;box-shadow:var(--vscode-scrollbar-shadow, #000) 0 6px 6px -6px inset}.xterm .xterm-scrollable-element>.shadow.left{display:block;top:3px;left:0;height:100%;width:3px;box-shadow:var(--vscode-scrollbar-shadow, #000) 6px 0 6px -6px inset}.xterm .xterm-scrollable-element>.shadow.top-left-corner{display:block;top:0;left:0;height:3px;width:3px}.xterm .xterm-scrollable-element>.shadow.top.left{box-shadow:var(--vscode-scrollbar-shadow, #000) 6px 0 6px -6px inset}:root{--bg-main: #0b0f19;--bg-card: rgba(17, 24, 39, .75);--bg-card-hover: rgba(24, 32, 53, .9);--bg-darker: #060911;--bg-input: #131b2e;--border-color: rgba(56, 189, 248, .15);--border-color-glow: rgba(56, 189, 248, .4);--text-main: #f1f5f9;--text-muted: #94a3b8;--text-dim: #64748b;--neon-cyan: #00f2fe;--neon-blue: #38bdf8;--neon-green: #10b981;--neon-emerald: #059669;--neon-purple: #a855f7;--neon-amber: #f59e0b;--neon-rose: #f43f5e;--neon-red: #ef4444;--shadow-glow: 0 0 15px rgba(0, 242, 254, .15);--shadow-glow-red: 0 0 15px rgba(239, 68, 68, .2);--shadow-card: 0 8px 32px 0 rgba(0, 0, 0, .37);--radius-sm: 6px;--radius-md: 10px;--radius-lg: 14px}*{box-sizing:border-box;margin:0;padding:0}body{font-family:Inter,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif;background-color:var(--bg-main);background-image:radial-gradient(at 0% 0%,rgba(56,189,248,.08) 0px,transparent 50%),radial-gradient(at 100% 100%,rgba(168,85,247,.06) 0px,transparent 50%);color:var(--text-main);min-height:100vh;line-height:1.5;-webkit-font-smoothing:antialiased}code,pre,.font-mono{font-family:Fira Code,JetBrains Mono,monospace}.app-layout{max-width:1440px;margin:0 auto;padding:20px 24px 60px}.header-bar{display:flex;flex-direction:column;gap:16px;margin-bottom:24px;padding-bottom:20px;border-bottom:1px solid var(--border-color)}@media (min-width: 768px){.header-bar{flex-direction:row;justify-content:space-between;align-items:center}}.brand-section{display:flex;align-items:center;gap:14px}.brand-icon{width:44px;height:44px;background:linear-gradient(135deg,#00f2fe33,#a855f733);border:1px solid var(--neon-cyan);border-radius:var(--radius-md);display:flex;align-items:center;justify-content:center;box-shadow:var(--shadow-glow);color:var(--neon-cyan)}.brand-title{font-size:1.4rem;font-weight:700;letter-spacing:-.5px;display:flex;align-items:center;gap:8px}.brand-badge{font-size:.65rem;font-weight:600;padding:2px 8px;border-radius:9999px;background:#00f2fe1f;color:var(--neon-cyan);border:1px solid rgba(0,242,254,.3);text-transform:uppercase;letter-spacing:.5px}.brand-subtitle{font-size:.85rem;color:var(--text-muted)}.header-actions{display:flex;align-items:center;gap:12px;flex-wrap:wrap}.status-pill{display:inline-flex;align-items:center;gap:6px;padding:4px 10px;border-radius:9999px;font-size:.75rem;font-weight:600}.status-pill.online,.status-pill.running,.status-pill.success{background:#10b98126;color:var(--neon-green);border:1px solid rgba(16,185,129,.3)}.status-pill.stopped,.status-pill.failed,.status-pill.exited{background:#ef444426;color:var(--neon-red);border:1px solid rgba(239,68,68,.3)}.status-pill.restarting,.status-pill.running-deploy{background:#f59e0b26;color:var(--neon-amber);border:1px solid rgba(245,158,11,.3)}.status-dot{width:7px;height:7px;border-radius:50%;background:currentColor;box-shadow:0 0 8px currentColor}.pulse{animation:pulse-dot 2s infinite}@keyframes pulse-dot{0%{opacity:1;transform:scale(1)}50%{opacity:.4;transform:scale(1.2)}to{opacity:1;transform:scale(1)}}.system-metrics-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:16px;margin-bottom:24px}.metric-card{background:var(--bg-card);-webkit-backdrop-filter:blur(12px);backdrop-filter:blur(12px);border:1px solid var(--border-color);border-radius:var(--radius-md);padding:16px;box-shadow:var(--shadow-card);transition:all .2s ease}.metric-card:hover{border-color:var(--border-color-glow);transform:translateY(-2px)}.metric-header{display:flex;justify-content:space-between;align-items:center;font-size:.8rem;color:var(--text-muted);margin-bottom:8px}.metric-value{font-size:1.4rem;font-weight:700;color:var(--text-main);display:flex;align-items:baseline;gap:6px}.metric-sub{font-size:.75rem;color:var(--text-dim);font-weight:400}.progress-bar-bg{height:6px;background:#ffffff14;border-radius:9999px;overflow:hidden;margin-top:10px}.progress-bar-fill{height:100%;border-radius:9999px;transition:width .5s ease-out}.progress-cyan{background:linear-gradient(90deg,#00f2fe,#38bdf8)}.progress-purple{background:linear-gradient(90deg,#a855f7,#c084fc)}.progress-green{background:linear-gradient(90deg,#10b981,#34d399)}.progress-amber{background:linear-gradient(90deg,#f59e0b,#fbbf24)}.tabs-nav{display:flex;gap:8px;margin-bottom:20px;border-bottom:1px solid var(--border-color);padding-bottom:12px;overflow-x:auto}.tab-btn{display:flex;align-items:center;gap:8px;background:transparent;border:1px solid transparent;color:var(--text-muted);padding:8px 16px;border-radius:var(--radius-sm);font-size:.9rem;font-weight:600;cursor:pointer;transition:all .2s ease;white-space:nowrap}.tab-btn:hover{color:var(--text-main);background:#ffffff0d}.tab-btn.active{color:var(--neon-cyan);background:#00f2fe1a;border-color:#00f2fe4d;box-shadow:var(--shadow-glow)}.cards-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(340px,1fr));gap:18px}.container-card{background:var(--bg-card);-webkit-backdrop-filter:blur(12px);backdrop-filter:blur(12px);border:1px solid var(--border-color);border-radius:var(--radius-lg);padding:20px;box-shadow:var(--shadow-card);display:flex;flex-direction:column;justify-content:space-between;gap:16px;transition:all .2s ease}.container-card:hover{border-color:var(--border-color-glow);background:var(--bg-card-hover)}.container-card-header{display:flex;justify-content:space-between;align-items:flex-start;gap:10px}.container-title{font-size:1.05rem;font-weight:700;color:var(--text-main);word-break:break-all}.container-image{font-size:.75rem;color:var(--text-muted);margin-top:4px}.container-meta{display:flex;flex-direction:column;gap:6px;font-size:.8rem;color:var(--text-muted);background:#00000040;padding:10px 12px;border-radius:var(--radius-sm);border:1px solid rgba(255,255,255,.04)}.meta-row{display:flex;justify-content:space-between;align-items:center}.meta-label{color:var(--text-dim)}.ports-badge-group{display:flex;flex-wrap:wrap;gap:4px}.port-badge{background:#38bdf826;color:var(--neon-blue);border:1px solid rgba(56,189,248,.3);padding:2px 6px;border-radius:4px;font-size:.7rem}.card-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap;border-top:1px solid rgba(255,255,255,.06);padding-top:14px}.btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;padding:8px 14px;border-radius:var(--radius-sm);font-size:.85rem;font-weight:600;cursor:pointer;transition:all .2s ease;border:1px solid transparent;outline:none}.btn-primary{background:linear-gradient(135deg,#00f2fe,#38bdf8);color:#060911;font-weight:700}.btn-primary:hover{filter:brightness(1.15);box-shadow:var(--shadow-glow)}.btn-secondary{background:#ffffff14;color:var(--text-main);border-color:#ffffff26}.btn-secondary:hover{background:#ffffff24}.btn-success{background:#10b98126;color:var(--neon-green);border-color:#10b9814d}.btn-success:hover{background:#10b98140}.btn-danger{background:#ef444426;color:var(--neon-red);border-color:#ef44444d}.btn-danger:hover{background:#ef444440}.btn-sm{padding:5px 10px;font-size:.75rem}.modal-overlay{position:fixed;top:0;right:0;bottom:0;left:0;background:#060911d9;-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);display:flex;align-items:center;justify-content:center;padding:20px;z-index:999}.modal-content{background:var(--bg-card);border:1px solid var(--border-color-glow);border-radius:var(--radius-lg);box-shadow:var(--shadow-card),var(--shadow-glow);width:100%;max-width:680px;max-height:90vh;display:flex;flex-direction:column;overflow:hidden}.modal-header{padding:18px 22px;border-bottom:1px solid var(--border-color);display:flex;justify-content:space-between;align-items:center}.modal-title{font-size:1.2rem;font-weight:700;display:flex;align-items:center;gap:8px}.modal-body{padding:22px;overflow-y:auto;display:flex;flex-direction:column;gap:16px}.modal-footer{padding:16px 22px;border-top:1px solid var(--border-color);display:flex;justify-content:flex-end;gap:10px}.form-group{display:flex;flex-direction:column;gap:6px}.form-label{font-size:.8rem;font-weight:600;color:var(--text-muted)}.form-input,.form-textarea{background:var(--bg-input);border:1px solid var(--border-color);border-radius:var(--radius-sm);color:var(--text-main);padding:10px 14px;font-size:.9rem;outline:none;transition:all .2s ease}.form-input:focus,.form-textarea:focus{border-color:var(--neon-cyan);box-shadow:var(--shadow-glow)}.form-textarea{font-family:Fira Code,monospace;font-size:.8rem;resize:vertical;min-height:120px}.terminal-window{background:#04060a;border:1px solid rgba(56,189,248,.25);border-radius:var(--radius-md);padding:16px;font-family:Fira Code,monospace;font-size:.8rem;color:#a7f3d0;max-height:480px;overflow-y:auto;white-space:pre-wrap;word-break:break-all;line-height:1.45}.terminal-line{margin-bottom:2px}.ops-table-wrapper{background:var(--bg-card);border:1px solid var(--border-color);border-radius:var(--radius-lg);overflow:hidden;box-shadow:var(--shadow-card)}.ops-table{width:100%;border-collapse:collapse;text-align:left;font-size:.85rem}.ops-table th{background:#0006;padding:12px 16px;color:var(--text-muted);font-weight:600;border-bottom:1px solid var(--border-color)}.ops-table td{padding:14px 16px;border-bottom:1px solid rgba(255,255,255,.04)}.ops-table tr:hover td{background:#ffffff05}::-webkit-scrollbar{width:6px;height:6px}::-webkit-scrollbar-track{background:#0003}::-webkit-scrollbar-thumb{background:#38bdf84d;border-radius:3px}::-webkit-scrollbar-thumb:hover{background:var(--neon-cyan)}.ops-swal-popup{background:#0d1527!important;border:1px solid var(--border-color-glow)!important;border-radius:var(--radius-lg)!important;box-shadow:var(--shadow-card),var(--shadow-glow)!important;padding:24px!important}.ops-swal-title{color:var(--text-main)!important;font-size:1.25rem!important;font-weight:700!important}.ops-swal-html{color:var(--text-muted)!important;font-size:.9rem!important;line-height:1.5!important}.ops-swal-btn{margin:0 6px!important}.ops-swal-toast{background:#0e1626!important;border:1px solid var(--border-color-glow)!important;box-shadow:0 4px 20px #00000080,var(--shadow-glow)!important;border-radius:var(--radius-md)!important}.stack-card{background:#0d1527d9;border:1px solid var(--border-color);border-radius:var(--radius-lg);padding:20px;box-shadow:var(--shadow-card);display:flex;flex-direction:column;gap:16px;transition:all .2s ease}.stack-card:hover{border-color:var(--border-color-glow)}.stack-card-header{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:12px;padding-bottom:14px;border-bottom:1px solid rgba(255,255,255,.06)}.stack-title-group{display:flex;align-items:center;gap:10px}.stack-title{font-size:1.2rem;font-weight:700;color:var(--neon-cyan)}.stack-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.view-mode-toggle{display:inline-flex;background:#00000059;border:1px solid var(--border-color);border-radius:var(--radius-sm);padding:3px;gap:4px}.view-mode-btn{background:transparent;border:none;color:var(--text-muted);padding:5px 12px;border-radius:var(--radius-sm);font-size:.8rem;font-weight:600;cursor:pointer;transition:all .2s ease;display:flex;align-items:center;gap:6px}.view-mode-btn.active{background:#00f2fe26;color:var(--neon-cyan);box-shadow:var(--shadow-glow)}
