:root{font-family:-apple-system,BlinkMacSystemFont,SF Pro Display,SF Pro Text,Inter,system-ui,Segoe UI,sans-serif;line-height:1.5;font-weight:400;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}:root{--spacing-xs: 4px;--spacing-sm: 8px;--spacing-md: 16px;--spacing-lg: 24px;--spacing-xl: 32px;--spacing-2xl: 48px;--radius-sm: 8px;--radius-md: 12px;--radius-lg: 16px;--radius-xl: 20px;--shadow-sm: 0 1px 3px rgba(0, 0, 0, .3);--shadow-md: 0 4px 12px rgba(0, 0, 0, .4);--shadow-lg: 0 8px 24px rgba(0, 0, 0, .5);--panel-hover: rgba(255, 255, 255, .05);--text-tertiary: rgba(255, 255, 255, .4);--input-border: rgba(255, 255, 255, .1);--input-border-focus: var(--accent);--surface: var(--panel);--surface-hover: rgba(255, 255, 255, .05);--bubble-user-bg: var(--accent);--status-success: #34c759;--status-warning: #ff9500;--status-error: #ff3b30;--status-info: var(--accent);--connection-bg: rgba(28, 28, 30, .8);--transition-fast: .15s cubic-bezier(.4, 0, .2, 1);--transition-base: .25s cubic-bezier(.4, 0, .2, 1);--transition-slow: .35s cubic-bezier(.4, 0, .2, 1)}:root,[data-theme=dark]{--bg: #000000;--panel: #1c1c1e;--panel-border: rgba(255, 255, 255, .1);--text: #ffffff;--text-muted: rgba(255, 255, 255, .6);--text-secondary: rgba(255, 255, 255, .8);--accent: #007aff;--accent-hover: #0051d5;--accent-soft: rgba(0, 122, 255, .15);--accent-soft-hover: rgba(0, 122, 255, .25);--input-bg: rgba(28, 28, 30, .6);--input-bg-focus: rgba(28, 28, 30, .8);--card-bg: rgba(15, 23, 42, .7);--scrollbar-thumb: rgba(255, 255, 255, .2);--scrollbar-thumb-hover: rgba(255, 255, 255, .3);--bubble-bot-bg: rgba(0, 122, 255, .15);--bubble-auth-bg: rgba(255, 255, 255, .05)}[data-theme=light]{--bg: #e8e8ea;--panel: #f5f5f7;--panel-border: rgba(0, 0, 0, .08);--panel-hover: rgba(0, 0, 0, .03);--text: #1d1d1f;--text-muted: rgba(0, 0, 0, .6);--text-secondary: rgba(0, 0, 0, .8);--text-tertiary: rgba(0, 0, 0, .4);--accent: #007aff;--accent-hover: #0051d5;--accent-soft: rgba(0, 122, 255, .1);--accent-soft-hover: rgba(0, 122, 255, .15);--input-bg: rgba(0, 0, 0, .03);--input-bg-focus: rgba(0, 0, 0, .05);--input-border: rgba(0, 0, 0, .1);--input-border-focus: var(--accent);--card-bg: #f5f5f7;--surface: #f5f5f7;--surface-hover: rgba(0, 0, 0, .02);--scrollbar-thumb: rgba(0, 0, 0, .15);--scrollbar-thumb-hover: rgba(0, 0, 0, .25);--scrollbar-track: transparent;--bubble-bot-bg: rgba(0, 122, 255, .08);--bubble-user-bg: var(--accent);--bubble-auth-bg: rgba(0, 0, 0, .03);--shadow-sm: 0 1px 2px rgba(0, 0, 0, .05), 0 1px 3px rgba(0, 0, 0, .1);--shadow-md: 0 2px 4px rgba(0, 0, 0, .06), 0 4px 12px rgba(0, 0, 0, .08);--shadow-lg: 0 4px 8px rgba(0, 0, 0, .08), 0 8px 24px rgba(0, 0, 0, .12);--status-success: #34c759;--status-warning: #ff9500;--status-error: #ff3b30;--status-info: var(--accent);--connection-bg: rgba(0, 0, 0, .02)}*,*:before,*:after{box-sizing:border-box}::selection,::-moz-selection,::-webkit-selection,*::selection,*::-moz-selection,*::-webkit-selection{background:#007aff4d;color:var(--text)}:root[data-theme=dark] ::selection,:root[data-theme=dark] ::-moz-selection,:root[data-theme=dark] ::-webkit-selection,:root[data-theme=dark] *::selection,:root[data-theme=dark] *::-moz-selection,:root[data-theme=dark] *::-webkit-selection,:root ::selection,:root ::-moz-selection,:root ::-webkit-selection,:root *::selection,:root *::-moz-selection,:root *::-webkit-selection{background:#007aff4d;color:#fff}[data-theme=light] ::selection,[data-theme=light] ::-moz-selection,[data-theme=light] ::-webkit-selection,[data-theme=light] *::selection,[data-theme=light] *::-moz-selection,[data-theme=light] *::-webkit-selection{background:#007aff40;color:#1d1d1f}*{-webkit-tap-highlight-color:rgba(0,122,255,.2);-webkit-touch-callout:none}*{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}input,textarea,.chat-message,.message-content,.editor-container,.chat-messages,.bubble,.workspace-editor,.profile-form input,.profile-form textarea{-webkit-user-select:text!important;-moz-user-select:text!important;-ms-user-select:text!important;user-select:text!important}html,body{margin:0;padding:0;height:100vh;overflow:hidden;background:var(--bg);color:var(--text)}#root{height:100vh;overflow:hidden}a{color:var(--accent)}a:focus-visible{outline:none}a:focus{outline:none}button{font:inherit;border-radius:var(--radius-md);border:none;background:var(--accent);color:#fff;padding:10px 20px;cursor:pointer;transition:all var(--transition-base);font-weight:500;font-size:15px;letter-spacing:-.01em;outline:none;position:relative;overflow:hidden}button:before{content:"";position:absolute;top:50%;left:50%;width:0;height:0;border-radius:50%;background:#fff3;transform:translate(-50%,-50%);transition:width .6s,height .6s}button:active:before{width:300px;height:300px}button:hover:not(:disabled){background:var(--accent-hover)}button:active:not(:disabled){opacity:.9}button:disabled{opacity:.4;cursor:not-allowed;transform:none}button:focus-visible{outline:none!important;box-shadow:none!important}button:focus{outline:none!important;box-shadow:none!important}button.link{background:transparent;color:var(--accent);padding:0;border:none;text-decoration:underline}table{width:100%;border-collapse:collapse}th,td{padding:10px;border-bottom:1px solid var(--panel-border);text-align:left}.muted{color:var(--text-muted);font-size:14px}.empty-state{display:grid;place-items:center;min-height:240px;border:1px dashed var(--panel-border);border-radius:16px;color:var(--text-muted)}button,a,button:focus,button:focus-visible,button:active,button:hover:focus,button:hover:focus-visible,a:focus,a:focus-visible,a:active,a:hover:focus,a:hover:focus-visible,.link,.link:focus,.link:focus-visible,[role=button],[role=button]:focus,[role=button]:focus-visible{outline:none!important;box-shadow:none!important}.auth-form{display:flex;flex-direction:column;gap:16px}.field{display:flex;flex-direction:column;gap:6px}.field label{font-size:14px;color:var(--text-muted)}.field input,.field select,.profile-form input,.profile-form select,.profile-form textarea,.chat-composer input[type=text],.workspace textarea{border-radius:var(--radius-md);border:1px solid var(--panel-border);background:var(--input-bg, rgba(28, 28, 30, .6));color:var(--text);padding:12px 16px;font:inherit;font-size:15px;transition:all var(--transition-base);outline:none}.field input:focus,.field select:focus,.profile-form input:focus,.profile-form select:focus,.profile-form textarea:focus,.chat-composer input[type=text]:focus,.workspace textarea:focus{border-color:var(--accent);background:var(--input-bg-focus, rgba(28, 28, 30, .8));box-shadow:0 0 0 3px var(--accent-soft)}.chat-composer input[type=text]::placeholder{color:var(--text-muted)}.form-error{color:#f97316;margin:0}.form-hint{color:var(--text-muted);margin-top:4px}.form-alt{text-align:center;color:var(--text-muted);margin:0}.grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(140px,1fr));gap:12px}.card-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:16px}.card{border-radius:16px;border:1px solid var(--panel-border);padding:20px;background:var(--card-bg);box-shadow:var(--shadow-sm)}.quick-actions{list-style:none;padding:0;margin:12px 0 0;display:flex;flex-direction:column;gap:8px;color:var(--text-muted)}.chat-page-wrapper{display:flex;flex-direction:column;height:100vh;padding:var(--spacing-md);overflow:hidden;padding-top:calc(var(--spacing-md) + 80px)}.chat-page{display:flex;flex-direction:column;height:100%;max-height:100%;border-radius:var(--radius-xl);background:var(--panel);backdrop-filter:blur(20px) saturate(180%);-webkit-backdrop-filter:blur(20px) saturate(180%);border:1px solid var(--panel-border);overflow:hidden;box-shadow:var(--shadow-lg);position:relative}.chat-header-actions{display:flex;align-items:center;justify-content:space-between;padding:var(--spacing-sm) var(--spacing-md);border-bottom:1px solid var(--panel-border);gap:var(--spacing-sm);flex-shrink:0}.chat-header-action-left{margin-right:auto}.chat-header-action-right{margin-left:auto}.chat-new-conversation-button,.chat-search-button{background:transparent;border:1px solid var(--panel-border);color:var(--text-muted);padding:var(--spacing-xs) var(--spacing-sm);border-radius:var(--radius-sm);cursor:pointer;display:flex;align-items:center;justify-content:center;transition:all var(--transition-base)}.chat-new-conversation-button:hover:not(:disabled),.chat-search-button:hover{background:var(--accent-soft);border-color:var(--accent);color:var(--accent)}.chat-new-conversation-button:disabled{opacity:.5;cursor:not-allowed}.search-highlight{background:var(--accent-soft)!important;animation:highlight-pulse 2s ease-in-out;border-radius:var(--radius-sm);padding:2px 4px}@keyframes highlight-pulse{0%,to{background:var(--accent-soft)}50%{background:var(--accent-soft-hover)}}.connection-status{display:flex;align-items:center;gap:var(--spacing-sm);padding:var(--spacing-sm) var(--spacing-md);background:var(--connection-bg, rgba(28, 28, 30, .8));border-bottom:1px solid var(--panel-border);font-size:13px;color:var(--text-muted);flex-shrink:0}.connection-indicator{width:8px;height:8px;border-radius:50%;background:var(--text-muted);animation:pulse 2s ease-in-out infinite}.connection-status.status-connecting .connection-indicator{background:orange}.connection-status.status-open .connection-indicator{background:#4ade80;animation:none}.connection-status.status-closed .connection-indicator,.connection-status.status-error .connection-indicator{background:#ef4444}.connection-text{font-weight:500}@keyframes pulse{0%,to{opacity:1}50%{opacity:.5}}.chat-container .chat-page{border-radius:0;background:transparent;backdrop-filter:none;-webkit-backdrop-filter:none;border:none;box-shadow:none}.chat-messages-container{display:flex;flex-direction:column;flex:1;overflow:hidden;min-width:0;min-height:0;position:relative}.chat-messages{flex:1;padding:var(--spacing-lg) var(--spacing-xl);overflow-y:auto;overflow-x:hidden;display:flex;flex-direction:column;gap:var(--spacing-md);min-height:0;max-height:100%;width:100%;scroll-behavior:smooth;user-select:text;-webkit-user-select:text;-moz-user-select:text;-ms-user-select:text}.chat-messages::-webkit-scrollbar{width:8px}.chat-messages::-webkit-scrollbar-track{background:transparent}.chat-messages::-webkit-scrollbar-thumb{background:var(--scrollbar-thumb, rgba(255, 255, 255, .2));border-radius:4px}.chat-messages::-webkit-scrollbar-thumb:hover{background:var(--scrollbar-thumb-hover, rgba(255, 255, 255, .3))}.message-wrapper{display:flex;gap:12px;align-items:flex-start;width:100%;max-width:100%;user-select:text;-webkit-user-select:text;-moz-user-select:text;-ms-user-select:text}.message-wrapper.bot{align-self:flex-start}.message-wrapper.user{align-self:flex-end;flex-direction:row-reverse}.message-wrapper.auth{align-self:center;justify-content:center}.message-avatar{width:32px;height:32px;border-radius:50%;flex-shrink:0;overflow:hidden;background:var(--accent-soft);display:flex;align-items:center;justify-content:center;border:1px solid var(--panel-border)}.message-avatar img{width:100%;height:100%;object-fit:cover}.avatar-placeholder{font-size:20px}.bubble{max-width:85%;width:fit-content;min-width:120px;padding:var(--spacing-md) var(--spacing-lg);border-radius:var(--radius-lg);word-wrap:break-word;word-break:break-word;overflow-wrap:break-word;white-space:pre-wrap;animation:messageSlideIn var(--transition-base) cubic-bezier(.4,0,.2,1);line-height:1.5;font-size:15px;letter-spacing:-.01em;user-select:text;-webkit-user-select:text;-moz-user-select:text;-ms-user-select:text;cursor:text}.bubble.thinking{opacity:.5;font-style:normal;font-weight:400;background:transparent;border:none;padding:var(--spacing-sm) var(--spacing-md);color:var(--text-muted);font-size:14px}.thinking-dots{display:inline-block;animation:thinkingPulse 1.4s ease-in-out infinite;margin-left:2px}@keyframes thinkingPulse{0%,to{opacity:.3}50%{opacity:.7}}@keyframes messageSlideIn{0%{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}.bubble span{display:block;word-wrap:break-word;overflow-wrap:break-word;user-select:text;-webkit-user-select:text;-moz-user-select:text;-ms-user-select:text}.bubble.bot{background:var(--bubble-bot-bg, var(--accent-soft));border:1px solid var(--panel-border);color:var(--text)}.bubble.user{background:var(--bubble-user-bg, var(--accent));border:1px solid var(--bubble-user-bg, var(--accent));color:#fff}.bubble.auth{background:var(--bubble-auth-bg, rgba(255, 255, 255, .05));border:1px solid var(--panel-border);color:var(--text-secondary)}.bubble.context{background:transparent;border:none;color:var(--text);padding:0;overflow:visible}.context-message{width:100%;border-radius:8px;border:none;background:transparent;overflow:hidden}.context-header{width:100%;display:flex;align-items:center;justify-content:space-between;padding:8px 12px;background:transparent;border:none;color:var(--text-muted);cursor:pointer;transition:all .15s ease;text-align:left;font:inherit;font-size:13px;font-weight:400;border-radius:6px}.context-header:hover{background:var(--panel-hover);color:var(--text)}.context-title{font-weight:400;color:inherit;flex:1;letter-spacing:-.01em}.context-toggle{font-size:10px;color:var(--text-muted);margin-left:8px;transition:transform .2s cubic-bezier(.4,0,.2,1);flex-shrink:0;opacity:.5}.context-header:hover .context-toggle{opacity:.8}.context-content{padding:4px 12px 8px;border-top:none;background:transparent;animation:slideDown .25s cubic-bezier(.4,0,.2,1)}@keyframes slideDown{0%{opacity:0;max-height:0;transform:translateY(-4px)}to{opacity:1;max-height:500px;transform:translateY(0)}}.context-description{margin:0;font-size:13px;color:var(--text-muted);line-height:1.5;font-weight:400;letter-spacing:-.01em}.context-description strong{color:var(--text);font-weight:500}.chat-composer{display:flex;gap:var(--spacing-md);padding:var(--spacing-md) var(--spacing-lg);border-top:1px solid var(--panel-border);flex-shrink:0;flex-grow:0;background:var(--panel);backdrop-filter:blur(20px) saturate(180%);-webkit-backdrop-filter:blur(20px) saturate(180%);position:relative;z-index:10;align-items:center}.chat-composer.drag-over{background:var(--accent-soft);border-top:2px dashed var(--accent)}.chat-composer-drag-overlay{position:absolute;inset:0;background:var(--accent-soft);border:2px dashed var(--accent);border-radius:var(--radius-lg);display:flex;align-items:center;justify-content:center;z-index:11;pointer-events:none;backdrop-filter:blur(4px);-webkit-backdrop-filter:blur(4px)}.chat-composer-drag-message{background:var(--card-bg, rgba(15, 23, 42, .95));border:1px solid var(--accent);border-radius:var(--radius-lg);padding:16px 24px;text-align:center}.chat-composer-drag-message p{color:var(--text);font-size:14px;font-weight:500;margin:0}.chat-composer input[type=text]{flex:1}.upload-button{display:flex;align-items:center;justify-content:center;padding:10px;background:var(--accent-soft);border:1px solid var(--accent-soft-hover);border-radius:var(--radius-md);color:var(--accent);cursor:pointer;transition:all var(--transition-base);flex-shrink:0}.upload-button:hover:not(:disabled){background:var(--accent-soft-hover);border-color:var(--accent);color:var(--accent-hover)}.upload-button:disabled{opacity:.4;cursor:not-allowed}.upload-button svg{flex-shrink:0}.send-button{display:flex;align-items:center;gap:6px;padding:10px 20px}.send-button svg{flex-shrink:0}.workspace{display:flex;flex-direction:column;gap:16px;min-height:0;position:relative}.workspace.drag-over{background:var(--accent-soft)}.workspace-drag-overlay{position:absolute;inset:0;background:var(--accent-soft);border:2px dashed var(--accent);border-radius:var(--radius-lg);display:flex;align-items:center;justify-content:center;z-index:10;pointer-events:none;backdrop-filter:blur(4px);-webkit-backdrop-filter:blur(4px)}.workspace-drag-message{background:var(--card-bg);border:1px solid var(--accent);border-radius:var(--radius-lg);padding:24px 32px;text-align:center;box-shadow:var(--shadow-lg)}.workspace-drag-message p{color:var(--text);font-size:16px;font-weight:500;margin:0}.workspace-empty-state{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:40px 20px;text-align:center}.workspace-toolbar{display:flex;justify-content:space-between;align-items:center;border-radius:16px;border:none;padding:12px 20px;background:transparent;flex-shrink:0;position:relative;gap:var(--spacing-md);flex-wrap:wrap}.workspace-search-wrapper{flex:1;min-width:200px;display:flex;align-items:center;gap:var(--spacing-sm);background:var(--input-bg);border:1px solid var(--input-border, var(--panel-border));border-radius:var(--radius-md);padding:var(--spacing-sm) var(--spacing-md);transition:all var(--transition-base)}.workspace-search-wrapper:focus-within{border-color:var(--input-border-focus, var(--accent));box-shadow:0 0 0 3px var(--accent-soft);background:var(--input-bg-focus)}.workspace-search-wrapper svg{color:var(--text-muted);flex-shrink:0}.workspace-search-input{flex:1;background:transparent;border:none;color:var(--text);font-size:14px;outline:none;padding:0}.workspace-search-input::placeholder{color:var(--text-muted)}.workspace-search-clear{background:transparent;border:none;color:var(--text-muted);cursor:pointer;padding:var(--spacing-xs);display:flex;align-items:center;justify-content:center;border-radius:var(--radius-sm);transition:all var(--transition-base)}.workspace-search-clear:hover{background:var(--panel-hover);color:var(--text)}.breadcrumbs{display:flex;gap:8px;flex-wrap:wrap}.toolbar-actions{display:flex;gap:8px}.toolbar-btn{display:flex;align-items:center;gap:6px;padding:8px 16px;font-size:14px;font-weight:500;border-radius:var(--radius-md);transition:all var(--transition-base);background:var(--accent-soft);border:1px solid var(--accent-soft-hover);color:var(--text)}.toolbar-btn:hover{background:var(--panel-hover);border-color:var(--panel-border);color:var(--text)}.toolbar-btn:active{background:var(--panel-hover);opacity:.8}.toolbar-btn svg{flex-shrink:0}.crumb{background:transparent;border:1px solid var(--panel-border);color:var(--text);padding:6px 12px}.workspace-split{display:grid;grid-template-columns:1fr 1fr;gap:16px;height:calc(100vh - 280px);min-height:500px}.workspace-tree{border-radius:var(--radius-lg);border:1px solid var(--panel-border);background:var(--panel);backdrop-filter:blur(20px) saturate(180%);-webkit-backdrop-filter:blur(20px) saturate(180%);padding:var(--spacing-md);flex:1;min-height:0;overflow-y:auto;overflow-x:hidden}.tree-container{display:flex;flex-direction:column;gap:2px;min-height:0}.tree-node{display:flex;flex-direction:column}.tree-item{display:flex;align-items:center;justify-content:space-between;padding:var(--spacing-sm) var(--spacing-md);border-radius:var(--radius-sm);transition:all var(--transition-base);min-height:36px;cursor:pointer;position:relative;outline:2px solid transparent;outline-offset:-2px}.tree-item:focus,.tree-item:focus-visible,.tree-item:focus-within{outline-color:var(--panel);box-shadow:none!important}.tree-item:hover:not(.active){background:var(--panel-hover);outline-color:var(--panel-hover);box-shadow:none!important}.tree-item.active{background:transparent;outline-color:var(--panel);box-shadow:none!important}.tree-item.active:hover{background:var(--panel-hover);outline-color:var(--panel-hover);box-shadow:none!important}.tree-item.active:focus,.tree-item.active:focus-visible,.tree-item.active:focus-within{outline-color:var(--panel)}.tree-item.folder-drag-over{background:var(--panel-hover);border:1px dashed var(--accent)}.tree-item.dragging{opacity:.5;cursor:grabbing!important}.tree-item[draggable=true]{cursor:grab}.tree-item[draggable=true]:active{cursor:grabbing}.tree-item.dragging{opacity:.5;cursor:grabbing}.tree-item-content{display:flex;align-items:center;flex:1;min-width:0}.tree-toggle{background:transparent;border:none;color:var(--text-muted);cursor:pointer;padding:0;width:20px;height:20px;display:flex;align-items:center;justify-content:center;border-radius:4px;transition:all .2s ease;outline:2px solid transparent;outline-offset:-2px;box-shadow:none!important}.tree-toggle:focus,.tree-toggle:focus-visible,.tree-toggle:focus-within{outline-color:transparent;box-shadow:none!important}.tree-toggle:hover{color:var(--text);background:var(--accent-soft);outline-color:var(--accent-soft)}.tree-toggle:active{outline-color:transparent;box-shadow:none!important}.tree-toggle svg{width:14px;height:14px}.tree-name{flex:1;text-align:left;padding:0;margin:0;display:flex;align-items:center;gap:6px;color:#fff;text-decoration:none}.tree-name:hover,.tree-name:visited{text-decoration:none}.tree-name svg,.tree-name span{display:inline-flex;align-items:center;color:#fff}.tree-name.link{color:#fff;text-decoration:none!important;background:transparent;padding:0;border:none}.tree-name.link:hover{text-decoration:none!important}button.link.tree-name{text-decoration:none!important;outline:2px solid transparent;outline-offset:-2px;box-shadow:none!important}button.link.tree-name:hover{text-decoration:none!important;outline-color:var(--panel-hover);box-shadow:none!important}button.link.tree-name:focus,button.link.tree-name:focus-visible,button.link.tree-name:focus-within{outline-color:var(--panel);box-shadow:none!important}button.link.tree-name:active{outline-color:transparent;box-shadow:none!important}.tree-item button{outline:2px solid transparent;outline-offset:-2px;box-shadow:none!important}.tree-item button:focus,.tree-item button:focus-visible,.tree-item button:focus-within{outline-color:var(--panel);box-shadow:none!important}.tree-item button:hover{outline-color:var(--panel-hover);box-shadow:none!important}.tree-item button:active{outline-color:transparent;box-shadow:none!important}.tree-item-content{outline:2px solid transparent;outline-offset:-2px;box-shadow:none!important}.tree-item-content:focus,.tree-item-content:focus-visible,.tree-item-content:focus-within{outline-color:var(--panel);box-shadow:none!important}.tree-item-content:hover{outline-color:var(--panel-hover);box-shadow:none!important}.tree-children{display:flex;flex-direction:column}.tree-actions{display:flex;gap:8px;align-items:center;flex-shrink:0;position:relative}.tree-menu-btn{padding:6px 8px;font-size:12px;display:flex;align-items:center;justify-content:center;min-width:32px;height:32px;background:var(--accent-soft);border:1px solid var(--accent-soft-hover);border-radius:8px;transition:all .2s ease;cursor:pointer;color:#fff}.tree-menu-btn:hover{background:var(--accent-soft-hover);border-color:var(--accent);color:#fff}.tree-menu-btn:active{background:var(--panel-hover);opacity:.8}.tree-menu-btn svg{width:16px;height:16px;color:#fff}.tree-context-menu{position:absolute;top:100%;right:0;margin-top:4px;background:#0f172af2;backdrop-filter:blur(20px) saturate(180%);-webkit-backdrop-filter:blur(20px) saturate(180%);border:1px solid var(--panel-border);border-radius:var(--radius-md);box-shadow:0 4px 12px #0000004d;z-index:100;min-width:160px;padding:4px;display:flex;flex-direction:column;gap:2px;animation:menuFadeIn .15s ease-out}@keyframes menuFadeIn{0%{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:translateY(0)}}.tree-menu-item{display:flex;align-items:center;gap:10px;padding:8px 12px;font-size:14px;color:var(--text);background:transparent;border:none;border-radius:var(--radius-sm);cursor:pointer;transition:all var(--transition-base);text-align:left;width:100%}.tree-menu-item:hover{background:var(--panel-hover);color:var(--text)}.tree-menu-item:active{background:var(--accent-soft-hover)}.tree-menu-item svg{width:14px;height:14px;flex-shrink:0}.tree-menu-item-danger{color:#ef4444}.tree-menu-item-danger:hover{background:#ef44441a;color:#f87171}.tree-action-btn{padding:6px 8px;font-size:12px;display:flex;align-items:center;justify-content:center;min-width:32px;height:32px;background:var(--panel-hover);border:1px solid var(--panel-border);border-radius:8px;transition:all .2s ease}.tree-action-btn:hover{background:var(--panel-hover);border-color:var(--panel-border)}.tree-action-btn:active{background:var(--panel-hover);opacity:.8}.tree-action-btn svg{width:14px;height:14px}.workspace-profiles{border-radius:var(--radius-lg);border:1px solid var(--panel-border);background:var(--panel);backdrop-filter:blur(20px) saturate(180%);-webkit-backdrop-filter:blur(20px) saturate(180%);padding:var(--spacing-md);flex-shrink:0}.workspace-profiles-header{display:flex;align-items:center;justify-content:space-between;gap:var(--spacing-sm);margin-bottom:8px}.profiles-title{margin:0;font-size:15px;font-weight:600;color:var(--text);letter-spacing:-.01em}.profiles-new-btn{display:inline-flex;align-items:center;gap:6px;padding:4px 10px;border-radius:999px;border:1px solid rgba(148,163,184,.4);background:#0f172acc;color:var(--text);font-size:11px;font-weight:500;cursor:pointer;transition:all .2s cubic-bezier(.4,0,.2,1)}.profiles-new-btn:hover{background:#0f172af2;border-color:#94a3b8cc;box-shadow:0 4px 12px #00000059}.profiles-new-btn:active{transform:scale(.97)}.profiles-new-icon{font-size:14px;line-height:1}.profiles-new-label{letter-spacing:.04em;text-transform:uppercase}.profiles-list{display:flex;flex-direction:column;gap:8px}.profile-item{padding:var(--spacing-sm) var(--spacing-md);border-radius:var(--radius-sm);background:var(--accent-soft);border:1px solid var(--panel-border);transition:all var(--transition-base)}.profile-button{width:100%;text-align:left;cursor:pointer;border:1px solid var(--panel-border);background:var(--accent-soft);padding:12px 16px;border-radius:var(--radius-md);transition:all var(--transition-base);display:flex;align-items:center;gap:var(--spacing-sm);font-size:14px;font-weight:500}.profile-button:hover{background:var(--accent-soft-hover);border-color:var(--accent)}.profile-button:active{background:var(--accent-soft);opacity:.9}.profile-name{color:var(--text);font-size:14px}.workspace-editor{border-radius:16px;border:1px solid var(--panel-border);background:#0f172ab3;padding:0;display:flex;flex-direction:column;overflow:hidden}.row-actions{display:flex;gap:8px}.editor-card{display:flex;flex-direction:column;height:100%}.editor-card header{display:flex;align-items:center;justify-content:space-between;padding:16px;border-bottom:1px solid var(--panel-border);flex-shrink:0}.editor-header-left{display:flex;align-items:center;gap:12px;flex:1;min-width:0}.editor-header-left strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.unsaved-indicator{color:#facc15;font-size:12px;font-weight:400}.saving-indicator{color:var(--text-muted);font-size:12px;font-weight:400}.editor-header-actions{display:flex;gap:8px;flex-shrink:0}.workspace-editor textarea{flex:1;width:100%;border:none;background:transparent;color:var(--text);padding:16px;font-family:JetBrains Mono,Fira Code,Consolas,monospace;font-size:14px;line-height:1.6;resize:none;outline:none}.workspace-editor textarea::placeholder{color:var(--text-muted)}.profile-page{display:flex;flex-direction:column;gap:var(--spacing-sm);min-height:0}.profile-header{display:flex;flex-direction:row;align-items:center;gap:var(--spacing-md);padding:var(--spacing-md) var(--spacing-lg);flex-shrink:0;position:relative}.profile-avatar-container{position:relative}.profile-image-download-btn{position:absolute;bottom:8px;right:8px;width:32px;height:32px;display:flex;align-items:center;justify-content:center;border-radius:50%;border:none;background:#0f172ae6;backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);color:var(--text);cursor:pointer;transition:all .2s cubic-bezier(.4,0,.2,1);padding:0;z-index:10;opacity:.8;box-shadow:0 2px 8px #0003}.profile-image-download-btn:hover{background:#0f172af2;opacity:1;transform:scale(1.1);box-shadow:0 4px 12px #0000004d}.profile-image-download-btn:active{transform:scale(.95)}.profile-image-download-btn:focus-visible{outline:none}.profile-avatar{width:125px;height:125px;border-radius:50%;object-fit:cover;border:2px solid var(--panel-border);box-shadow:var(--shadow-md);background:var(--panel);flex-shrink:0}.profile-avatar.placeholder{display:flex;align-items:center;justify-content:center;font-size:50px;font-weight:600;color:var(--text);background:var(--accent-soft);border:2px solid var(--panel-border);flex-shrink:0}.profile-name-section{display:flex;flex-direction:row;align-items:center;gap:var(--spacing-sm);flex:1;min-width:0}.profile-display-name{margin:0;font-size:18px;font-weight:600;color:var(--text);letter-spacing:-.02em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.profile-pronouns{margin:0;font-size:13px;color:var(--text-muted);font-weight:400;white-space:nowrap;padding:2px 8px;background:var(--accent-soft);border-radius:var(--radius-sm)}.profile-form{display:flex;flex-direction:column;gap:var(--spacing-lg);min-height:0;padding:var(--spacing-lg);padding-top:var(--spacing-sm)}.form-section{display:flex;flex-direction:column;gap:var(--spacing-md)}.form-section-title{margin:0;font-size:13px;font-weight:600;color:var(--text-muted);text-transform:uppercase;letter-spacing:.05em;margin-bottom:var(--spacing-xs)}.field-row{display:grid;grid-template-columns:1fr 1fr;gap:var(--spacing-md)}.disabled-input{opacity:.6!important;cursor:not-allowed!important;background:#1c1c1e66!important}.form-message{padding:var(--spacing-md);border-radius:var(--radius-md);font-size:14px;text-align:center}.form-message.success{background:#22c55e26;border:1px solid rgba(34,197,94,.3);color:#4ade80}.form-message.error{background:#ef444426;border:1px solid rgba(239,68,68,.3);color:#f87171}.form-actions{display:flex;justify-content:flex-end;padding-top:var(--spacing-md);border-top:1px solid var(--panel-border)}.save-button{min-width:120px}.chat-auth{min-height:100vh;display:grid;grid-template-columns:minmax(380px,520px) 1fr;background:transparent}.chat-auth-panel{padding:48px;display:flex;flex-direction:column;gap:24px}.chat-auth-panel header h1{margin:8px 0}.chat-auth-panel header p{margin:0}.chat-auth-cta{border:1px solid var(--panel-border);border-radius:16px;padding:16px;background:#22c55e14;display:flex;align-items:center;justify-content:space-between;gap:16px}.chat-auth-hero{display:flex;align-items:center;justify-content:center;padding:48px}.chat-auth-hero .hero-card{border-radius:24px;border:1px solid rgba(255,255,255,.08);background:#020617cc;padding:32px;max-width:480px}.chat-auth-hero ul{margin:0;padding-left:20px;color:var(--text-muted);display:flex;flex-direction:column;gap:8px}@media(max-width:960px){.chat-auth{grid-template-columns:1fr}.chat-auth-hero{display:none}.chat-page{border-radius:0;height:100vh}.chat-messages{padding:var(--spacing-md)}.workspace-split{grid-template-columns:1fr;gap:var(--spacing-md)}}@media(max-width:768px){.app-content,.chat-composer{padding:var(--spacing-sm)}.chat-composer input{font-size:14px;padding:10px 12px}.workspace-tree,.workspace-profiles{padding:var(--spacing-sm)}.tree-item{padding:var(--spacing-xs) var(--spacing-sm);min-height:32px}}@media(max-width:480px){.connection-status{font-size:12px;padding:var(--spacing-xs) var(--spacing-sm)}.chat-messages{padding:var(--spacing-sm);gap:var(--spacing-sm)}.message-wrapper{gap:var(--spacing-sm)}.bubble{padding:var(--spacing-sm) var(--spacing-md);font-size:14px}}.return-button{margin-bottom:16px;background:transparent;border:1px solid var(--panel-border);color:var(--text);padding:8px 16px;border-radius:10px;cursor:pointer;font-size:14px;transition:background .2s}.return-button:hover{background:var(--panel-hover)}.chat-editor{border-radius:16px;border:1px solid var(--panel-border);background:#0f172ab3;display:flex;flex-direction:column;overflow:hidden;min-width:0}.chat-editor .editor-card{display:flex;flex-direction:column;height:100%}.chat-editor .editor-card header{display:flex;align-items:center;justify-content:space-between;padding:16px;border-bottom:1px solid var(--panel-border);flex-shrink:0}.chat-editor .editor-header-left{display:flex;align-items:center;gap:12px;flex:1;min-width:0}.chat-editor .editor-header-left strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.chat-editor .editor-header-actions{display:flex;gap:8px;flex-shrink:0}.chat-editor textarea{flex:1;width:100%;border:none;background:transparent;color:var(--text);padding:16px;font-family:JetBrains Mono,Fira Code,Consolas,monospace;font-size:14px;line-height:1.6;resize:none;outline:none;min-height:0}.chat-editor textarea::placeholder{color:var(--text-muted)}.loading-state{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:var(--spacing-md);padding:var(--spacing-xl);min-height:200px}.loading-state .spinner{width:32px;height:32px;border-radius:50%;border:3px solid rgba(255,255,255,.1);border-top-color:var(--accent);animation:spin 1s linear infinite}.upload-progress{display:flex;align-items:center;gap:var(--spacing-sm);padding:var(--spacing-sm) var(--spacing-md);background:#007aff1a;border-radius:var(--radius-md);margin-bottom:var(--spacing-md)}.upload-progress .spinner{width:16px;height:16px;border-radius:50%;border:2px solid rgba(255,255,255,.2);border-top-color:var(--accent);animation:spin .8s linear infinite}.error-banner{padding:var(--spacing-sm) var(--spacing-md);background:#ef44441a;border:1px solid rgba(239,68,68,.3);border-radius:var(--radius-md);margin-bottom:var(--spacing-md)}@media(max-width:1200px){.workspace-split{grid-template-columns:1fr;height:auto;min-height:400px}.workspace-editor{min-height:400px}.profile-card,.chat-page.chat-with-editor .chat-split{grid-template-columns:1fr}.chat-editor{min-height:400px}}.panel-close-btn{position:absolute;top:12px;right:12px;width:28px;height:28px;display:flex;align-items:center;justify-content:center;border-radius:6px;border:none;background:transparent;color:var(--text-muted);cursor:pointer;transition:all .2s cubic-bezier(.4,0,.2,1);padding:0;z-index:10;opacity:.6}.panel-close-btn:hover{background:#ffffff14;color:var(--text);opacity:1;transform:scale(1.05)}.panel-close-btn:active{transform:scale(.95);background:#ffffff1f}.panel-close-btn:focus-visible{outline:none}.profile-header,.workspace-toolbar{padding-right:48px}.error-boundary{display:flex;align-items:center;justify-content:center;min-height:400px;padding:var(--spacing-xl);background:var(--bg)}.error-boundary-content{max-width:500px;text-align:center;padding:var(--spacing-xl);border-radius:var(--radius-lg);border:1px solid var(--panel-border);background:#1c1c1eb3}.error-boundary-content h2{margin:0 0 var(--spacing-md) 0;color:var(--text);font-size:24px;font-weight:600}.error-boundary-content p{margin:0 0 var(--spacing-lg) 0;color:var(--text-muted);font-size:15px;line-height:1.5}.error-details{margin:var(--spacing-lg) 0;text-align:left;background:#0000004d;border-radius:var(--radius-md);padding:var(--spacing-md)}.error-details summary{cursor:pointer;color:var(--accent);font-size:14px;margin-bottom:var(--spacing-sm);-webkit-user-select:none;user-select:none}.error-details pre{margin:var(--spacing-sm) 0 0 0;padding:var(--spacing-sm);background:#00000080;border-radius:var(--radius-sm);font-size:12px;color:#ff6b6b;overflow-x:auto;white-space:pre-wrap;word-break:break-word}.error-actions{display:flex;gap:var(--spacing-md);justify-content:center;margin-top:var(--spacing-lg)}.error-retry-btn,.error-reload-btn{padding:10px 20px;border-radius:var(--radius-md);font-size:14px;font-weight:500;cursor:pointer;transition:all var(--transition-base);border:none}.error-retry-btn{background:var(--accent);color:#fff}.error-retry-btn:hover{background:var(--accent-hover)}.error-reload-btn{background:transparent;color:var(--text);border:1px solid var(--panel-border)}.error-reload-btn:hover{background:#ffffff0d;border-color:var(--accent)}.loading-screen{width:100%;height:100%;min-height:320px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;color:var(--text-muted)}.loading-screen .spinner{width:40px;height:40px;border-radius:50%;border:4px solid var(--panel-border);border-top-color:var(--accent);animation:spin 1s linear infinite}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.toast-container{position:fixed;top:var(--spacing-md);right:var(--spacing-md);z-index:10000;display:flex;flex-direction:column;gap:var(--spacing-sm);max-width:400px;pointer-events:none}.toast{pointer-events:auto;background:var(--panel);border:1px solid var(--panel-border);border-radius:var(--radius-md);padding:var(--spacing-md);box-shadow:var(--shadow-lg);backdrop-filter:blur(20px) saturate(180%);-webkit-backdrop-filter:blur(20px) saturate(180%);opacity:0;transform:translate(100%);transition:all var(--transition-base);max-width:100%}.toast.visible{opacity:1;transform:translate(0)}.toast-success{border-left:3px solid #4ade80}.toast-error{border-left:3px solid #ef4444}.toast-info{border-left:3px solid var(--accent)}.toast-warning{border-left:3px solid #fbbf24}.toast-content{display:flex;align-items:flex-start;gap:var(--spacing-sm)}.toast-message{flex:1;color:var(--text);font-size:14px;line-height:1.5}.toast-close{background:transparent;border:none;color:var(--text-muted);cursor:pointer;padding:var(--spacing-xs);display:flex;align-items:center;justify-content:center;border-radius:var(--radius-sm);transition:all var(--transition-base);flex-shrink:0}.toast-close:hover{background:#ffffff1a;color:var(--text)}@media(max-width:768px){.toast-container{top:var(--spacing-sm);right:var(--spacing-sm);left:var(--spacing-sm);max-width:none}}
