*{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}.view-panel{flex:3;border-right:1px solid #333;display:flex;flex-direction:column;overflow:hidden}.tab-bar{display:flex;gap:2px;padding:.75rem .75rem 0;background:#12122a;border-bottom:1px solid #333;flex-shrink:0}.tab-btn{padding:.5rem 1.2rem;border:1px solid #333;border-bottom:none;border-radius:8px 8px 0 0;background:#1a1a2e;color:#888;font-size:.85rem;font-weight:500;cursor:pointer;transition:all .2s;font-family:inherit}.tab-btn:hover{color:#e0e0e0;background:#252542}.tab-btn.active{color:#fff;background:#252542;border-color:#4ecdc4;border-bottom-color:#252542}.tab-btn.active:after{content:"";display:block;height:1px;background:#252542;margin-top:.5rem}.tab-content{flex:1;position:relative;overflow:hidden}.tab-iframe{width:100%;height:100%;border:none;display:none;background:#fff}.tab-iframe.active{display:block}.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}}.modal-overlay{position:fixed;top:0;left:0;width:100%;height:100%;background:#000000b3;z-index:2000;display:flex;align-items:center;justify-content:center}.modal-overlay.hidden{display:none}.modal-panel{background:#1a1a2e;border:1px solid #333;border-radius:16px;width:90%;max-width:800px;max-height:85vh;display:flex;flex-direction:column;box-shadow:0 8px 40px #0009}.modal-header{display:flex;justify-content:space-between;align-items:center;padding:1rem 1.5rem;background:linear-gradient(135deg,#4ecdc4,#ff6b6b);color:#fff;border-radius:16px 16px 0 0}.modal-header h3{margin:0;color:#fff;font-size:1.1rem}.modal-header button{background:none;border:none;color:#fff;font-size:1.2rem;cursor:pointer;opacity:.8;padding:.2rem .5rem}.modal-header button:hover{opacity:1}.modal-body{flex:1;overflow-y:auto;padding:1rem 1.5rem}.modal-tab-bar{display:flex;gap:2px;border-bottom:1px solid #333;margin-bottom:1rem}.modal-tab-btn{padding:.5rem 1.2rem;border:none;background:transparent;color:#888;font-size:.9rem;font-weight:500;cursor:pointer;border-bottom:2px solid transparent;transition:all .2s;font-family:inherit}.modal-tab-btn:hover{color:#e0e0e0}.modal-tab-btn.active{color:#4ecdc4;border-bottom-color:#4ecdc4}.modal-tab-content{display:none}.modal-tab-content.active{display:block}.admin-section{margin-bottom:1.5rem}.admin-section h4{color:#4ecdc4;font-size:.95rem;margin-bottom:.6rem}.admin-form{display:flex;gap:.5rem;flex-wrap:wrap;align-items:center}.admin-form input{padding:.5rem .7rem;border:1px solid #444;border-radius:6px;background:#0a0a1a;color:#e0e0e0;font-size:.85rem;font-family:inherit;outline:none;flex:1;min-width:120px}.admin-form input:focus{border-color:#4ecdc4}.admin-form button{padding:.5rem 1rem;border:none;border-radius:6px;background:linear-gradient(135deg,#4ecdc4,#ff6b6b);color:#fff;font-weight:600;font-size:.85rem;cursor:pointer;transition:opacity .2s;white-space:nowrap}.admin-form button:hover{opacity:.9}.admin-list{max-height:300px;overflow-y:auto}.admin-list-item{display:flex;justify-content:space-between;align-items:center;padding:.6rem .8rem;margin-bottom:.3rem;background:#252542;border-radius:8px;gap:.5rem}.admin-item-info{display:flex;align-items:center;gap:.6rem;flex:1;min-width:0}.admin-item-info strong{color:#e0e0e0;font-size:.88rem;white-space:nowrap}.admin-item-name{color:#888;font-size:.8rem;white-space:nowrap}.admin-item-role{font-size:.75rem;padding:.15rem .5rem;border-radius:8px;background:#4ecdc4;color:#0a0a1a;font-weight:600;white-space:nowrap}.admin-item-actions{display:flex;gap:.3rem;flex-shrink:0}.admin-item-actions button{padding:.3rem .6rem;border-radius:4px;font-size:.75rem;cursor:pointer;font-family:inherit;transition:opacity .2s;white-space:nowrap}.admin-btn-pw{border:1px solid #4ecdc4;background:transparent;color:#4ecdc4}.admin-btn-pw:hover{background:#4ecdc4;color:#0a0a1a}.admin-btn-del{border:1px solid #ff6b6b;background:transparent;color:#ff6b6b}.admin-btn-del:hover{background:#ff6b6b;color:#fff}.admin-group-item{flex-direction:column;align-items:stretch}.admin-group-members{display:flex;gap:.3rem;flex-wrap:wrap;margin:.3rem 0}.group-member{display:inline-flex;align-items:center;gap:.2rem;padding:.2rem .5rem;background:#1a1a2e;border:1px solid #444;border-radius:12px;font-size:.78rem;color:#e0e0e0;cursor:pointer;transition:border-color .2s}.group-member:hover{border-color:#ff6b6b}.admin-group-add select{width:100%;padding:.4rem .6rem;border:1px solid #444;border-radius:6px;background:#0a0a1a;color:#e0e0e0;font-size:.8rem;font-family:inherit;outline:none}.admin-group-add select:focus{border-color:#4ecdc4}#admin-btn{border-color:#ff6b6b;color:#ff6b6b;font-weight:600}#admin-btn:hover{background:#ff6b6b;color:#fff}.tab-content-inner{width:100%;height:100%;display:none;background:#1a1a2e}.tab-content-inner.active{display:block}.chat-full{display:flex;flex-direction:column;height:100%}.chat-full-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;flex-shrink:0}.chat-full-header select{padding:.3rem .6rem;border:1px solid rgba(255,255,255,.3);border-radius:6px;background:#0003;color:#fff;font-size:.8rem;font-family:inherit;cursor:pointer;outline:none;max-width:280px}.chat-full-header select option{background:#1a1a2e;color:#e0e0e0}.chat-full-messages{flex:1;overflow-y:auto;padding:.8rem;display:flex;flex-direction:column;gap:.6rem}.chat-links{margin-top:10px;padding-top:8px;border-top:1px solid rgba(255,255,255,.1)}.chat-links-title{font-size:.72rem;color:#888;margin-bottom:4px}.chat-link-item{display:block;font-size:.8rem;color:#4ecdc4;text-decoration:none;padding:3px 0;transition:opacity .15s;word-break:break-all}.chat-link-item:hover{opacity:.8;text-decoration:underline}.chat-link-disabled{color:#666!important;cursor:default}.chat-link-disabled:hover{opacity:1!important;text-decoration:none!important}.chat-clear-btn{padding:.25rem .6rem;border:1px solid rgba(255,255,255,.3);border-radius:6px;background:#ffffff1f;color:#fff;font-size:.75rem;cursor:pointer;transition:background .2s,border-color .2s;font-family:inherit;white-space:nowrap;margin-left:6px;flex-shrink:0}.chat-clear-btn:hover{background:#ff50504d;border-color:#ff6b6b}.chat-full-input{display:flex;gap:.5rem;padding:.6rem .8rem;border-top:1px solid #333;align-items:flex-end;flex-shrink:0}.chat-full-input 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}.chat-full-input textarea:focus{border-color:#4ecdc4}.chat-full-input 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;align-self:stretch}.chat-full-input button:hover{opacity:.9}.chat-full-input button:disabled{opacity:.4;cursor:not-allowed}.chat-img-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:8px;margin-bottom:10px;max-width:100%}.chat-img-grid .chat-img-item{position:relative;border-radius:8px;overflow:hidden;border:1px solid #444;cursor:pointer;aspect-ratio:16 / 12;background:#1a1a2e}.chat-img-grid .chat-img-item img{width:100%;height:100%;object-fit:cover;display:block;transition:transform .15s ease}.chat-img-grid .chat-img-item:hover img{transform:scale(1.03)}.chat-img-grid .chat-img-item .chat-img-label{position:absolute;bottom:0;left:0;right:0;padding:4px 8px;background:#000000b3;color:#ccc;font-size:.7rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.chat-img-grid .chat-img-item.img-error{outline:2px dashed #ff6b6b;opacity:.5}.ai-config-form label:first-of-type{margin-top:0}.ai-config-form label{display:block;font-size:.8rem;color:#aaa;margin-top:12px;margin-bottom:3px}.ai-config-form input[type=text],.ai-config-form input[type=number]{width:100%;padding:.5rem .7rem;border:1px solid #444;border-radius:6px;background:#0a0a1a;color:#e0e0e0;font-size:.85rem;font-family:inherit;box-sizing:border-box;outline:none;transition:border-color .2s}.ai-config-form input[type=text]:focus,.ai-config-form input[type=number]:focus{border-color:#4ecdc4}.cfg-checkbox-label{display:flex!important;align-items:center;gap:8px;cursor:pointer;color:#ccc!important;font-size:.85rem!important}.cfg-checkbox-label input[type=checkbox]{width:18px;height:18px;accent-color:#4ecdc4;cursor:pointer}.cfg-save-btn{margin-top:16px;padding:.6rem 1.5rem;border:none;border-radius:8px;background:linear-gradient(135deg,#4ecdc4,#ff6b6b);color:#fff;font-weight:600;font-size:.9rem;cursor:pointer;transition:opacity .2s}.cfg-save-btn:hover{opacity:.9}.cfg-save-msg{margin-left:12px;font-size:.85rem;color:#4ecdc4}.sessions-toolbar{display:flex;align-items:center;margin-bottom:10px}.sessions-refresh-btn{padding:.4rem .9rem;border:1px solid #4ecdc4;border-radius:6px;background:transparent;color:#4ecdc4;font-size:.85rem;cursor:pointer;font-family:inherit;transition:background .2s}.sessions-refresh-btn:hover{background:#4ecdc4;color:#0a0a1a}.sessions-table-container{max-height:350px;overflow-y:auto}.sessions-table{width:100%;border-collapse:collapse;font-size:.82rem}.sessions-table th{text-align:left;padding:.5rem .6rem;background:#12122a;color:#4ecdc4;font-weight:600;font-size:.78rem;text-transform:uppercase;letter-spacing:.5px;border-bottom:1px solid #333;position:sticky;top:0;z-index:1}.sessions-table td{padding:.4rem .6rem;border-bottom:1px solid #2a2a3e;color:#ccc}.sessions-table tr:hover td{background:#252542}.session-row{transition:background .15s;cursor:default}.session-active{border-left:3px solid #4ecdc4}.session-username{color:#4ecdc4!important;font-weight:600;cursor:pointer!important}.session-username:hover{text-decoration:underline}.session-status-active{color:#4ecdc4;font-weight:600;font-size:.75rem;padding:.15rem .4rem;border:1px solid #4ecdc4;border-radius:4px}.session-status-inactive{color:#888;font-size:.75rem;padding:.15rem .4rem;border:1px solid #555;border-radius:4px}.session-info-box{background:#1a1a2e;border:1px solid #333;border-radius:8px;padding:.8rem 1rem;margin-bottom:10px;line-height:1.8;font-size:.85rem}.session-info-box div{color:#ccc}.session-info-box strong{color:#e0e0e0}.sessions-log-table{margin-top:6px}.sessions-log-table th{font-size:.72rem;padding:.35rem .5rem}.sessions-log-table td{font-size:.78rem;padding:.3rem .5rem;color:#aaa}.sessions-log-table td:nth-child(2){color:#4ecdc4;font-weight:500}.sessions-back-btn{padding:.3rem .7rem;border:1px solid #888;border-radius:4px;background:transparent;color:#ccc;font-size:.8rem;cursor:pointer;font-family:inherit;margin-bottom:10px;transition:background .2s}.sessions-back-btn:hover{background:#333;color:#fff}.config-full{display:flex;flex-direction:column;height:100%}.config-full-header{padding:.8rem 1rem;background:linear-gradient(135deg,#4ecdc4,#ff6b6b);color:#fff;font-weight:600;font-size:.95rem;flex-shrink:0}.config-full-body{flex:1;overflow-y:auto;padding:1rem}#view-sessions .config-full-body{display:flex;flex-direction:column}#view-sessions #session-detail-section{margin-top:16px;border-top:1px solid #333;padding-top:12px}#sessions-table th{cursor:pointer;-webkit-user-select:none;user-select:none;position:relative;padding-right:1.2rem!important}#sessions-table th:hover{color:#6ef5ec}.sort-arrow{display:inline-block;width:0;height:0;margin-left:4px;vertical-align:middle;border-left:4px solid transparent;border-right:4px solid transparent}.sort-asc .sort-arrow{border-bottom:6px solid #4ecdc4;border-top:none}.sort-desc .sort-arrow{border-top:6px solid #4ecdc4;border-bottom:none}th:not(.sort-asc):not(.sort-desc) .sort-arrow{border-bottom:5px solid #555;border-top:none;opacity:.4}th:not(.sort-asc):not(.sort-desc):hover .sort-arrow{opacity:.8}.sessions-filter-input{padding:.4rem .7rem;border:1px solid #444;border-radius:6px;background:#0a0a1a;color:#e0e0e0;font-size:.82rem;font-family:inherit;outline:none;flex:1;max-width:220px;margin-left:auto;transition:border-color .2s}.sessions-filter-input:focus{border-color:#4ecdc4}.sessions-filter-input::placeholder{color:#666}.admin-item-ssh{font-size:.78rem;color:#aaa;white-space:nowrap;background:#1a1a2e;padding:.15rem .5rem;border-radius:4px;border:1px solid #333;display:inline-flex;align-items:center;gap:3px}.admin-btn-ssh{border:1px solid #c9a84c;background:transparent;color:#c9a84c}.admin-btn-ssh:hover{background:#c9a84c;color:#0a0a1a}.admin-item-tabs{font-size:.78rem;color:#aaa;white-space:nowrap;background:#1a1a2e;padding:.15rem .5rem;border-radius:4px;border:1px solid #333;display:inline-flex;align-items:center;gap:3px;max-width:180px;overflow:hidden;text-overflow:ellipsis}.admin-btn-tabs{border:1px solid #7c5cbf;background:transparent;color:#7c5cbf}.admin-btn-tabs:hover{background:#7c5cbf;color:#fff}.session-terminate-btn{padding:.15rem .4rem;border:1px solid #ff6b6b;border-radius:3px;background:transparent;color:#ff6b6b;font-size:.7rem;cursor:pointer;margin-left:4px;vertical-align:middle;line-height:1;transition:background .15s,color .15s}.session-terminate-btn:hover{background:#ff6b6b;color:#fff}#change-pw-btn{border-color:#c9a84c;color:#c9a84c;font-weight:500}#change-pw-btn:hover{background:#c9a84c;color:#0a0a1a}
