*{margin:0;padding:0;box-sizing:border-box}body{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif;background:#0a0a1a;color:#e0e0e0;overflow:hidden;height:100vh}#app{height:100vh;display:flex;align-items:center;justify-content:center}.screen{display:none;width:100%;height:100%}.screen.active{display:flex}.screen.hidden{display:none}#login-screen{flex-direction:column;align-items:center;justify-content:center;position:relative}#logo-container{width:200px;height:200px;margin-bottom:2rem;cursor:pointer}#logo-container canvas{display:block;width:100%;height:100%}.project-title{font-size:2.5rem;font-weight:700;background:linear-gradient(135deg,#ff6b6b,#4ecdc4);-webkit-background-clip:text;-webkit-text-fill-color:transparent;background-clip:text;margin-bottom:.5rem}.project-subtitle{color:#888;margin-bottom:2rem;font-size:1rem}.login-form{display:flex;flex-direction:column;gap:.8rem;width:300px}.login-form input{padding:.8rem 1rem;border:1px solid #333;border-radius:8px;background:#1a1a2e;color:#e0e0e0;font-size:1rem;transition:border-color .3s}.login-form input:focus{outline:none;border-color:#4ecdc4}.login-form button{padding:.8rem;border:none;border-radius:8px;background:linear-gradient(135deg,#ff6b6b,#4ecdc4);color:#fff;font-size:1rem;font-weight:600;cursor:pointer;transition:transform .2s,opacity .2s}.login-form button:hover{transform:translateY(-2px);opacity:.9}.login-form button:active{transform:translateY(0)}.error-message{color:#ff6b6b;margin-top:1rem;font-size:.9rem}.hidden{display:none!important}#dashboard{flex-direction:column}.dashboard-header{display:flex;justify-content:space-between;align-items:center;padding:1rem 2rem;background:#1a1a2e;border-bottom:1px solid #333}.dashboard-header h2{background:linear-gradient(135deg,#ff6b6b,#4ecdc4);-webkit-background-clip:text;-webkit-text-fill-color:transparent;background-clip:text;font-size:1.5rem}.header-right{display:flex;align-items:center;gap:1rem}.header-right button{padding:.4rem 1rem;border:1px solid #555;border-radius:6px;background:transparent;color:#e0e0e0;cursor:pointer;transition:background .2s}.header-right button:hover{background:#333}.dashboard-body{display:flex;flex:1;height:calc(100vh - 60px)}.panel{padding:1rem;overflow-y:auto}.panel h3{margin-bottom:1rem;color:#4ecdc4;font-size:1.1rem}.chat-panel{flex:3;border-right:1px solid #333}#chat-container{height:calc(100% - 2rem)}#rocket-chat-frame{width:100%;height:100%;border-radius:8px;background:#1a1a2e}.files-panel{flex:2}.file-upload{margin-bottom:1rem;padding-bottom:1rem;border-bottom:1px solid #333}#upload-form{display:flex;gap:.5rem}#upload-form input[type=file]{flex:1;color:#e0e0e0}#upload-form button{padding:.5rem 1rem;border:none;border-radius:6px;background:#4ecdc4;color:#0a0a1a;font-weight:600;cursor:pointer}#upload-form button:hover{opacity:.9}.file-list .file-item{display:flex;justify-content:space-between;align-items:center;padding:.6rem;margin-bottom:.4rem;background:#1a1a2e;border-radius:6px;transition:background .2s}.file-list .file-item:hover{background:#252542}.file-item .file-name{font-size:.9rem;word-break:break-all}.file-item .file-size{font-size:.8rem;color:#888;margin-left:.5rem}.file-item .file-date{font-size:.75rem;color:#666}.file-item .download-btn{padding:.3rem .6rem;border:1px solid #4ecdc4;border-radius:4px;background:transparent;color:#4ecdc4;cursor:pointer;text-decoration:none;font-size:.8rem}.file-item .download-btn:hover{background:#4ecdc4;color:#0a0a1a}.loading{color:#666;font-style:italic}.panel-divider{border:none;border-top:1px solid #333;margin:1rem 0}.panel-info{font-size:.82rem;color:#888;margin-bottom:.8rem;line-height:1.4}.knowledge-upload{margin-bottom:.8rem}#knowledge-form{display:flex;gap:.5rem}#knowledge-form input[type=file]{flex:1;color:#e0e0e0;font-size:.85rem}#knowledge-form button{padding:.5rem 1rem;border:none;border-radius:6px;background:#ff6b6b;color:#fff;font-weight:600;cursor:pointer;transition:opacity .2s}#knowledge-form button:hover{opacity:.9}.knowledge-list{max-height:200px;overflow-y:auto}.knowledge-item{display:flex;justify-content:space-between;align-items:center;padding:.5rem;margin-bottom:.3rem;background:#1a1a2e;border-radius:6px}.knowledge-item .doc-name{font-size:.85rem;word-break:break-all}.knowledge-item .doc-meta{font-size:.75rem;color:#888}.knowledge-item .doc-delete{padding:.2rem .5rem;border:1px solid #ff6b6b;border-radius:4px;background:transparent;color:#ff6b6b;cursor:pointer;font-size:.75rem;transition:background .2s}.knowledge-item .doc-delete:hover{background:#ff6b6b;color:#fff}.ai-chat-closed .ai-chat-panel{display:none}#ai-chat-widget{position:fixed;bottom:24px;right:24px;z-index:1000;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif}.ai-chat-toggle{width:56px;height:56px;border:none;border-radius:50%;background:linear-gradient(135deg,#4ecdc4,#ff6b6b);color:#fff;font-size:1.5rem;cursor:pointer;box-shadow:0 4px 20px #4ecdc466;transition:transform .2s,box-shadow .2s;display:flex;align-items:center;justify-content:center}.ai-chat-toggle:hover{transform:scale(1.1);box-shadow:0 6px 28px #4ecdc499}.ai-chat-toggle .ai-icon{line-height:1}.ai-chat-panel{position:absolute;bottom:68px;right:0;width:380px;height:520px;background:#1a1a2e;border:1px solid #333;border-radius:16px;box-shadow:0 8px 40px #0009;display:flex;flex-direction:column;overflow:hidden}.ai-chat-header{display:flex;justify-content:space-between;align-items:center;padding:.8rem 1rem;background:linear-gradient(135deg,#4ecdc4,#ff6b6b);color:#fff;font-weight:600;font-size:.95rem}.ai-chat-header button{background:none;border:none;color:#fff;font-size:1.1rem;cursor:pointer;opacity:.8;transition:opacity .2s}.ai-chat-header button:hover{opacity:1}.ai-chat-messages{flex:1;overflow-y:auto;padding:.8rem;display:flex;flex-direction:column;gap:.6rem}.ai-message{display:flex;gap:.5rem;max-width:90%}.ai-assistant{align-self:flex-start}.ai-user{align-self:flex-end;flex-direction:row-reverse}.ai-avatar{width:28px;height:28px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:.9rem;flex-shrink:0}.ai-assistant .ai-avatar{background:#252542}.ai-user .ai-avatar{background:#4ecdc4}.ai-bubble{padding:.5rem .8rem;border-radius:12px;font-size:.88rem;line-height:1.5;word-break:break-word;white-space:pre-wrap}.ai-assistant .ai-bubble{background:#252542;color:#e0e0e0;border-bottom-left-radius:4px}.ai-user .ai-bubble{background:linear-gradient(135deg,#4ecdc4,#3dbdb5);color:#0a0a1a;border-bottom-right-radius:4px}.ai-chat-input-area{display:flex;gap:.5rem;padding:.6rem .8rem;border-top:1px solid #333;align-items:flex-end}.ai-chat-input-area textarea{flex:1;padding:.5rem .7rem;border:1px solid #444;border-radius:8px;background:#0a0a1a;color:#e0e0e0;font-size:.85rem;font-family:inherit;resize:none;outline:none;transition:border-color .2s}.ai-chat-input-area textarea:focus{border-color:#4ecdc4}.ai-chat-input-area button{padding:.5rem 1rem;border:none;border-radius:8px;background:linear-gradient(135deg,#4ecdc4,#ff6b6b);color:#fff;font-weight:600;font-size:.85rem;cursor:pointer;height:fit-content;transition:opacity .2s}.ai-chat-input-area button:hover{opacity:.9}.ai-chat-input-area button:disabled{opacity:.4;cursor:not-allowed}.ai-typing{display:flex;gap:4px;padding:.5rem .8rem;align-items:center}.ai-typing span{width:6px;height:6px;border-radius:50%;background:#4ecdc4;animation:aiTyping 1.2s infinite}.ai-typing span:nth-child(2){animation-delay:.2s}.ai-typing span:nth-child(3){animation-delay:.4s}@keyframes aiTyping{0%,60%,to{opacity:.3;transform:translateY(0)}30%{opacity:1;transform:translateY(-4px)}}.ai-error{color:#ff6b6b;font-size:.8rem;text-align:center;padding:.3rem}@media(max-width:640px){.ai-chat-panel{width:calc(100vw - 32px);height:60vh;right:-8px}}
