/**
 * 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{--background: 42 100% 97%;--foreground: 25 26% 11%;--card: 0 0% 100%;--card-foreground: 25 26% 11%;--primary: 33 100% 50%;--primary-foreground: 24 92% 10%;--secondary: 38 64% 91%;--secondary-foreground: 24 32% 17%;--muted: 38 48% 92%;--muted-foreground: 28 16% 42%;--border: 34 34% 83%;--ring: 33 100% 50%;--radius: 8px}*{box-sizing:border-box}html,body,#root{min-height:100%}body{margin:0;background:hsl(var(--background));color:hsl(var(--foreground));font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif}button{font:inherit}.shell{min-height:100dvh;color:hsl(var(--foreground));background:linear-gradient(180deg,#fff9eb,#ffecd1 52%,#ffdec2)}.mobile-stage{min-height:100dvh;width:100%;overflow:hidden;background:hsl(var(--background))}.screen{min-height:100dvh;display:flex;flex-direction:column;padding:20px}.login-screen{justify-content:space-between}.topbar,.dashboard-header{display:flex;align-items:center;justify-content:space-between}.dashboard-header{border-bottom:1px solid hsl(var(--border));padding-bottom:16px}.brand-mark{display:grid;width:44px;height:44px;place-items:center;border-radius:var(--radius);background:hsl(var(--primary));color:hsl(var(--primary-foreground));box-shadow:0 10px 26px #cc5f002e;font-size:13px;font-weight:800;letter-spacing:0}.brand-mark.small{width:36px;height:36px;font-size:11px}.pill{border:1px solid hsl(var(--border));border-radius:999px;background:#ffffffb3;color:hsl(var(--muted-foreground));padding:5px 12px;font-size:12px;font-weight:600}.login-main{display:grid;gap:28px}.copy-stack{display:grid;gap:12px}.eyebrow{width:max-content;border-radius:999px;background:hsl(var(--primary) / .18);color:hsl(var(--primary-foreground));padding:5px 12px;font-size:12px;font-weight:800}h1{margin:0;max-width:420px;font-size:40px;line-height:1.05;font-weight:720;letter-spacing:0;text-wrap:balance}p{margin:0}.copy-stack p{max-width:360px;color:hsl(var(--muted-foreground));font-size:16px;line-height:1.7}.footer-note{color:hsl(var(--muted-foreground));font-size:12px}.card{border:1px solid hsl(var(--border));border-radius:var(--radius);background:hsl(var(--card));color:hsl(var(--card-foreground));box-shadow:0 1px 2px #2118120a}.card-header{display:grid;gap:7px;padding:20px 20px 14px}.card-title{margin:0;font-size:18px;line-height:1;font-weight:700}.card-description{color:hsl(var(--muted-foreground));font-size:14px}.card-content{padding:0 20px 20px}.button{min-height:44px;border:0;border-radius:var(--radius);display:inline-flex;align-items:center;justify-content:center;gap:10px;padding:0 16px;cursor:pointer;font-size:14px;font-weight:750;transition:background .16s ease,opacity .16s ease,transform .16s ease}.button:disabled{cursor:not-allowed;opacity:.55}.button-default{background:hsl(var(--primary));color:hsl(var(--primary-foreground))}.button-default:hover:not(:disabled){background:#eb7900}.button-ghost{background:transparent;color:hsl(var(--foreground))}.button-ghost:hover{background:hsl(var(--secondary))}.button-symbol{display:grid;width:22px;height:22px;place-items:center;border-radius:6px;background:hsl(var(--primary-foreground));color:hsl(var(--primary));font-size:9px;font-weight:900}.button-symbol{width:auto;padding:0 12px}.button-size-sm{min-height:36px}.full-width{width:100%}.identity{display:flex;align-items:center;gap:12px}.identity-title{font-size:14px;font-weight:750}.identity-subtitle{margin-top:2px;color:hsl(var(--muted-foreground));font-size:12px}.dashboard-screen{gap:20px}.empty-state{flex:1;display:grid;place-content:center;justify-items:center;gap:12px;text-align:center}.empty-icon{display:grid;width:48px;height:48px;place-items:center;border-radius:var(--radius);background:hsl(var(--primary));color:hsl(var(--primary-foreground));font-size:13px;font-weight:900}.empty-state h1{font-size:25px}.empty-state p{max-width:290px;color:hsl(var(--muted-foreground));font-size:14px;line-height:1.6}.scope-note{color:hsl(var(--muted-foreground));font-size:11px}@media(min-width:768px){.shell{display:grid;place-items:stretch center;padding:0}.mobile-stage{aspect-ratio:.618 / 1;min-height:100dvh;height:100dvh;width:auto;border-left:1px solid hsl(var(--border));border-right:1px solid hsl(var(--border));border-radius:0;box-shadow:none}.screen{min-height:100%;padding:24px}}.button-size-icon{min-height:40px;min-width:40px;padding:0 12px}.profile-wrap{position:relative}.profile-trigger{display:inline-flex;max-width:176px;min-height:40px;align-items:center;gap:9px;border:1px solid hsl(var(--border));border-radius:var(--radius);background:#ffffffc7;color:hsl(var(--foreground));padding:4px 9px 4px 4px;cursor:pointer}.profile-trigger-text{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px;font-weight:750}.avatar{display:grid;width:32px;height:32px;flex:0 0 auto;place-items:center;border-radius:var(--radius);background:hsl(var(--primary));color:hsl(var(--primary-foreground));font-size:11px;font-weight:900;letter-spacing:0}.avatar.large{width:42px;height:42px;font-size:13px}.profile-panel{position:absolute;z-index:10;top:calc(100% + 10px);right:0;width:min(312px,calc(100vw - 40px));display:grid;gap:14px;border:1px solid hsl(var(--border));border-radius:var(--radius);background:hsl(var(--card));box-shadow:0 18px 44px #21181224;padding:14px}.profile-panel-head{display:flex;align-items:center;gap:12px;min-width:0}.profile-name{max-width:210px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:14px;font-weight:800}.profile-email{max-width:210px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:hsl(var(--muted-foreground));font-size:12px}.field-label{color:hsl(var(--muted-foreground));font-size:12px;font-weight:700}.text-input{width:100%;min-height:42px;border:1px solid hsl(var(--border));border-radius:var(--radius);background:#ffffffd1;color:hsl(var(--foreground));padding:0 11px;font:inherit;font-size:14px;outline:none}.text-input:focus{border-color:hsl(var(--ring));box-shadow:0 0 0 3px hsl(var(--ring) / .18)}.profile-facts{display:grid;gap:8px}.fact-row{display:grid;gap:4px;border-top:1px solid hsl(var(--border));padding-top:8px}.fact-row span{color:hsl(var(--muted-foreground));font-size:11px;font-weight:700}.fact-row strong{max-height:54px;overflow:auto;color:hsl(var(--foreground));font-size:12px;font-weight:650;line-height:1.45;overflow-wrap:anywhere}.auth-loader-screen{display:grid;place-items:center;background:hsl(var(--background))}.loader-stack{display:grid;justify-items:center;gap:14px;color:hsl(var(--muted-foreground));font-size:13px;font-weight:700}.loader-mark{display:grid;width:52px;height:52px;place-items:center;border-radius:var(--radius);background:hsl(var(--primary));color:hsl(var(--primary-foreground));box-shadow:0 14px 34px #cc5f002e;font-size:14px;font-weight:900;letter-spacing:0}.loader-dots{display:inline-flex;gap:6px}.loader-dots span{width:7px;height:7px;border-radius:999px;background:hsl(var(--primary));animation:loader-pulse .9s ease-in-out infinite}.loader-dots span:nth-child(2){animation-delay:.12s}.loader-dots span:nth-child(3){animation-delay:.24s}@keyframes loader-pulse{0%,to{opacity:.35;transform:translateY(0)}50%{opacity:1;transform:translateY(-3px)}}.workspace-empty{flex:1;display:grid;align-content:center;justify-items:center;gap:14px;text-align:center}.workspace-empty h1{font-size:27px}.workspace-empty p{max-width:320px;color:hsl(var(--muted-foreground));font-size:14px;line-height:1.6}.error-text,.workspace-error{color:#b62616;font-size:12px;line-height:1.5;overflow-wrap:anywhere}.workspace-error{margin:8px 14px 0;border:1px solid hsl(6 70% 82%);border-radius:var(--radius);background:#ffedeb;padding:8px 10px}.workspace-screen{min-height:100dvh;height:100dvh;display:grid;grid-template-rows:auto 1fr auto;overflow:hidden;background:hsl(var(--background))}.workspace-screen .dashboard-header{margin:0 20px;padding:20px 0 14px}.workspace-pane{min-height:0;overflow:auto;padding:16px 20px 14px}.pane-header{display:flex;align-items:baseline;justify-content:space-between;gap:12px;margin-bottom:14px}.pane-header h1{font-size:20px}.pane-header p{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:hsl(var(--muted-foreground));font-size:11px}.workspace-tabs{display:grid;grid-template-columns:repeat(5,1fr);gap:4px;border-top:1px solid hsl(var(--border));background:#ffffffd6;padding:8px 8px max(8px,env(safe-area-inset-bottom))}.workspace-tabs button{min-width:0;min-height:42px;border:0;border-radius:var(--radius);background:transparent;color:hsl(var(--muted-foreground));cursor:pointer;font-size:11px;font-weight:800;text-transform:capitalize}.workspace-tabs button.active{background:hsl(var(--primary));color:hsl(var(--primary-foreground))}.workspace-status-card{display:flex;align-items:center;gap:12px;border:1px solid hsl(var(--border));border-radius:var(--radius);background:hsl(var(--card));padding:14px}.workspace-status-card h1{font-size:20px}.workspace-status-card p{margin-top:4px;color:hsl(var(--muted-foreground));font-size:12px;overflow-wrap:anywhere}.status-dot{width:12px;height:12px;border-radius:999px;background:#f29e0d;box-shadow:0 0 0 5px #f29e0d29}.status-dot.running{background:#28af60;box-shadow:0 0 0 5px #28af6029}.status-dot.stopped{background:#cc2b19;box-shadow:0 0 0 5px #cc2b1929}.codex-pane{display:grid;align-content:stretch;gap:0}.codex-console-mock{display:grid;gap:8px;border-radius:var(--radius);background:#1d1611;color:#fff3d6;padding:14px;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:12px;line-height:1.55;overflow-wrap:anywhere}.workspace-actions{display:flex;align-items:center;justify-content:space-between;gap:10px}.text-link{color:hsl(var(--foreground));font-size:13px;font-weight:800;text-decoration:none}.file-list{display:grid;gap:6px}.file-row{display:flex;align-items:center;gap:10px;width:100%;min-height:44px;border:1px solid hsl(var(--border));border-radius:var(--radius);background:hsl(var(--card));color:hsl(var(--foreground));padding:0 12px;text-align:left;cursor:pointer;font-weight:700}.file-row span{width:38px;color:hsl(var(--muted-foreground));font-size:10px;font-weight:900}.editor-pane{display:grid;grid-template-rows:auto 1fr}.editor-surface{min-height:0;height:100%;border:1px solid hsl(var(--border));border-radius:var(--radius);overflow:hidden;background:#1e1e1e}.editor-surface textarea{width:100%;height:100%;min-height:360px;border:0;resize:none;background:#1e1e1e;color:#d4d4d4;padding:14px;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:13px;outline:none}.preview-pane{display:grid;grid-template-rows:auto 1fr}.preview-pane iframe{width:100%;height:100%;min-height:0;border:1px solid hsl(var(--border));border-radius:var(--radius);background:#fff}.devtools-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px}.devtools-grid div{min-height:92px;border:1px solid hsl(var(--border));border-radius:var(--radius);background:hsl(var(--card));padding:12px;color:hsl(var(--muted-foreground));font-size:12px;font-weight:800}.inline-loader{flex:1;display:grid;place-content:center;justify-items:center;gap:12px;color:hsl(var(--muted-foreground));font-size:13px;font-weight:800}@media(min-width:768px){.workspace-screen{min-height:100%;height:100%}.workspace-screen .dashboard-header{margin:0 24px;padding-top:24px}.workspace-pane{padding-left:24px;padding-right:24px}.terminal-pane{padding-left:0;padding-right:0}}.terminal-pane{display:grid;grid-template-rows:auto auto minmax(0,1fr);gap:0;overflow:hidden;padding:0}.terminal-header{display:flex;align-items:center;justify-content:space-between;gap:10px;border-bottom:1px solid hsl(var(--border));padding:8px 12px}.terminal-title{display:flex;align-items:center;gap:10px;min-width:0}.terminal-title h1{font-size:16px}.terminal-title p{margin-top:2px;max-width:210px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:hsl(var(--muted-foreground));font-size:10px}.agent-bar{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:4px;border-bottom:1px solid hsl(var(--border));background:#ffffffc7;padding:6px}.agent-bar button{min-width:0;min-height:34px;border:0;border-radius:5px;background:transparent;color:hsl(var(--muted-foreground));cursor:pointer;font-size:10px;font-weight:900}.agent-bar button.active{background:hsl(var(--primary));color:hsl(var(--primary-foreground))}.ai-terminal-stack{position:relative;min-height:0;height:100%}.terminal-slot{position:absolute;top:0;right:0;bottom:0;left:0;display:none;min-height:0}.terminal-slot.active{display:block}.terminal-shell{min-height:0;height:100%;display:grid;grid-template-rows:auto 1fr;border:0;border-radius:0;overflow:hidden;background:#050505}.terminal-connection{border-bottom:1px solid hsl(24 18% 18%);background:#0d0b08;color:#f3b13f;padding:5px 8px;font-size:10px;font-weight:800;text-transform:uppercase}.terminal-mount{min-height:0;height:100%;padding:0}.terminal-mount .xterm{height:100%}.terminal-mount .xterm-viewport{overflow-y:auto}.live-file-tree{min-height:0;border:1px solid hsl(var(--border));border-radius:var(--radius);background:hsl(var(--card));overflow:auto}.file-tree-root{padding:6px}.file-empty,.editor-empty{display:grid;min-height:180px;place-items:center;color:hsl(var(--muted-foreground));font-size:13px;font-weight:700}.tree-row{display:flex;align-items:center;gap:7px;width:100%;min-height:30px;border:0;border-radius:5px;background:transparent;color:hsl(var(--foreground));cursor:pointer;font-size:13px;text-align:left}.tree-row:hover,.tree-row.active{background:hsl(var(--secondary))}.tree-twist{width:10px;color:hsl(var(--muted-foreground));font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:10px}.tree-kind{width:32px;flex:0 0 auto;color:hsl(var(--muted-foreground));font-size:9px;font-weight:900}.tree-name{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:700}.git-mark{margin-left:auto;padding-right:4px;font-size:10px;font-weight:900}.git-mark.M{color:#da8e0b}.git-mark.A,.git-mark.U{color:#28af60}.git-mark.D{color:#cc2b19}.git-mark.R{color:#853ecc}.editor-toolbar{align-items:center}.editor-actions{display:inline-flex;align-items:center;gap:8px;color:hsl(var(--muted-foreground));font-size:11px;font-weight:750}.dirty-dot{width:8px;height:8px;border-radius:999px;background:hsl(var(--primary))}.preview-placeholder{display:grid;min-height:340px;place-content:center;justify-items:center;gap:12px;text-align:center}.preview-placeholder h1{font-size:22px}.preview-placeholder p{max-width:270px;color:hsl(var(--muted-foreground));font-size:13px;line-height:1.55}.project-bar{display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:8px;border-bottom:1px solid hsl(var(--border));padding:8px 20px;background:#ffffffb8}.project-bar label{display:flex;align-items:center;gap:8px;min-width:0}.project-bar span{color:hsl(var(--muted-foreground));font-size:10px;font-weight:900;text-transform:uppercase}.project-bar input{min-width:0;height:34px;border:1px solid hsl(var(--border));border-radius:var(--radius);background:hsl(var(--card));color:hsl(var(--foreground));padding:0 9px;font:inherit;font-size:12px;font-weight:750}.workspace-panes{position:relative;min-height:0;overflow:hidden}.pane-shell{position:absolute;top:0;right:0;bottom:0;left:0;display:none;min-height:0}.pane-shell.active{display:block}.pane-shell>.workspace-pane{height:100%}@media(min-width:768px){.project-bar{padding-left:24px;padding-right:24px}}.workspace-screen{display:flex;flex-direction:column}.workspace-panes{flex:1 1 auto}.tls-notice{border:1px solid hsl(38 72% 78%);border-radius:var(--radius);background:#fff6e0;color:#593821;padding:8px 10px;font-size:11px;font-weight:700;line-height:1.45}.tls-notice strong{overflow-wrap:anywhere}
