.doc-selector-btn{background:#fff;border:1px solid #e2e8f0;border-radius:8px;padding:8px 16px;font-size:14px;color:#475569;cursor:pointer;display:flex;align-items:center;gap:8px;transition:all .2s}.doc-selector-btn:hover{border-color:#000;color:#000}.doc-selector-modal-overlay{position:fixed;inset:0;background:#00000080;display:flex;justify-content:center;align-items:center;z-index:1000;-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px)}.doc-selector-modal{background:#fff;border-radius:16px;width:90vw;height:90vh;max-width:1600px;box-shadow:0 20px 25px -5px #0000001a,0 10px 10px -5px #0000000a;display:flex;flex-direction:column;animation:modalFadeIn .2s ease-out;overflow:hidden}@keyframes modalFadeIn{0%{opacity:0;transform:scale(.98)}to{opacity:1;transform:scale(1)}}.modal-header{padding:20px 24px;border-bottom:1px solid #e2e8f0;display:flex;align-items:center;justify-content:space-between;background:#fff}.modal-header h3{margin:0;font-size:18px;font-weight:600;color:#1e293b}.view-toggle{display:flex;background:#f1f5f9;padding:4px;border-radius:8px;margin-right:auto;margin-left:24px}.view-btn{padding:6px 12px;border:none;background:transparent;border-radius:6px;font-size:13px;color:#64748b;cursor:pointer;transition:all .2s}.view-btn.active{background:#fff;color:#0f172a;box-shadow:0 1px 2px #0000000d}.close-btn{background:transparent;border:none;font-size:24px;color:#94a3b8;cursor:pointer;padding:4px;line-height:1;border-radius:4px}.close-btn:hover{color:#1e293b;background:#f1f5f9}.modal-content{flex:1;overflow-y:auto;padding:24px;background:#f8fafc}.spaces-list{display:flex;flex-direction:column;gap:16px}.space-list-item{background:#fff;border-radius:12px;border:1px solid #e2e8f0;overflow:hidden}.space-list-item-header{padding:12px 16px;background:#f8fafc;border-bottom:1px solid #e2e8f0;display:flex;align-items:center;gap:12px}.documents-list-view{padding:8px 0}.document-list-item{display:flex;align-items:center;padding:8px 16px;gap:12px;border-bottom:1px solid #f1f5f9}.document-list-item:last-child{border-bottom:none}.document-list-item .document-name-small{flex:1;font-size:14px;color:#334155}.status-dot{width:10px;height:10px;border-radius:50%;flex-shrink:0}.status-dot.green{background-color:#22c55e;box-shadow:0 0 0 2px #22c55e33}.status-dot.red{background-color:#ef4444;opacity:.6}.status-dot.gray{background-color:#cbd5e1}.spaces-grid{display:flex;flex-direction:column;gap:32px;width:100%}.space-card{background:transparent;border:none;border-radius:0;overflow:visible;width:100%}.space-card-header{padding:0 0 16px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid #e2e8f0;margin-bottom:20px}.space-info-left{display:flex;align-items:center;gap:12px}.space-icon-large{font-size:24px}.space-title{margin:0;font-size:16px;font-weight:600;color:#1e293b}.space-stats{font-size:12px;color:#64748b;margin-top:2px}.space-checkbox-input{width:18px;height:18px;cursor:pointer}.documents-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:20px;width:100%}.document-card{background:#fff;border:1px solid #e2e8f0;border-radius:12px;padding:16px;transition:all .2s;position:relative;display:flex;flex-direction:column;min-height:160px;justify-content:space-between}.document-card:hover{border-color:#94a3b8;box-shadow:0 10px 15px -3px #0000001a,0 4px 6px -2px #0000000d;transform:translateY(-2px)}.document-card-header{display:flex;justify-content:space-between;align-items:flex-start;margin-bottom:12px;width:100%}.document-icon-wrapper{display:flex;align-items:center;gap:8px}.document-icon-small{font-size:28px}.document-checkbox{width:16px;height:16px;cursor:pointer}.document-name-small{font-size:15px;font-weight:600;color:#1e293b;margin-bottom:8px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.document-meta-small{font-size:13px;color:#64748b;margin-bottom:auto}.document-card-actions{display:flex;justify-content:flex-end;padding-top:12px;border-top:1px solid #f1f5f9;margin-top:12px}.refresh-btn{background:transparent;border:none;cursor:pointer;padding:6px;border-radius:4px;font-size:14px;color:#94a3b8;transition:all .2s}.refresh-btn:hover{background:#f1f5f9;color:#3b82f6}.loading,.error{text-align:center;padding:40px;color:#64748b}:root{--bg-color: #f9f9f9;--sidebar-width: 240px;--right-panel-collapsed-width: 60px;--right-panel-expanded-width: calc(100vw / 3);--text-primary: #333;--text-secondary: #666;--border-color: #e0e0e0;--accent-color: #333;--btn-bg: #222;--btn-text: #fff}*{box-sizing:border-box;margin:0;padding:0;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif}body,html{height:100%;width:100%;background-color:var(--bg-color);overflow:hidden}#login-container{position:fixed;top:0;left:0;width:100%;height:100%;background:#fff;display:flex;justify-content:center;align-items:center;z-index:1000}.login-box{width:360px;padding:40px;background:#fff;border-radius:12px;box-shadow:0 10px 30px #00000014;text-align:center;border:1px solid var(--border-color)}.login-box h2{margin-bottom:24px;font-weight:600}.input-group{margin-bottom:16px;text-align:left}.input-group label{display:block;margin-bottom:8px;font-size:14px;color:var(--text-secondary)}.input-group input{width:100%;padding:10px 12px;border:1px solid #ddd;border-radius:6px;font-size:14px;transition:border .2s}.input-group input:focus{border-color:var(--accent-color);outline:none}.btn-primary{width:100%;padding:12px;background-color:var(--btn-bg);color:var(--btn-text);border:none;border-radius:6px;font-size:14px;cursor:pointer;transition:opacity .2s}.btn-primary:hover{opacity:.9}.error-msg{color:#d32f2f;font-size:12px;margin-top:10px;display:none}#app-container{display:flex;height:100vh;background:linear-gradient(135deg,#f8fafc,#f1f5f9);margin-right:32px}.sidebar{width:var(--sidebar-width);background:linear-gradient(180deg,#fff,#f8fafc);border-right:1px solid #e2e8f0;display:flex;flex-direction:column;box-shadow:2px 0 8px #0000000a;position:relative;z-index:10}.logo{font-size:20px;font-weight:700;display:flex;align-items:center;gap:8px;margin-bottom:30px;padding:24px 20px 0;color:#1e293b}.logo svg{width:24px;height:24px;color:#000}.create-btn{display:flex;align-items:center;justify-content:center;gap:8px;padding:12px 16px;margin:0 20px 20px;border:2px solid #e2e8f0;border-radius:12px;background:linear-gradient(135deg,#fff,#f8fafc);cursor:pointer;font-size:14px;font-weight:600;color:#475569;transition:all .3s ease;box-shadow:0 2px 8px #0000000a}.create-btn:hover{border-color:#000;color:#000;transform:translateY(-1px);box-shadow:0 4px 16px #6366f126}.nav-group{margin-bottom:20px;padding:0 20px}.nav-title{font-size:12px;color:#999;margin-bottom:10px;padding-left:10px}.nav-item{padding:12px 16px;border-radius:12px;cursor:pointer;font-size:14px;color:#64748b;display:flex;align-items:center;gap:10px;margin-bottom:4px;transition:all .2s ease;position:relative}.nav-item-content{flex:1;cursor:pointer}.nav-item-delete{background:none;border:none;color:#94a3b8;cursor:pointer;font-size:16px;font-weight:700;padding:4px 8px;border-radius:4px;opacity:0;transition:all .2s ease;line-height:1}.nav-item:hover .nav-item-delete{opacity:1}.nav-item-delete:hover{color:#ef4444;background:#ef44441a}.nav-item.active{background:linear-gradient(135deg,#000,#333);color:#fff;font-weight:600;box-shadow:0 4px 12px #6366f140;transform:translate(4px)}.nav-item.active .nav-item-delete{display:none}.nav-item:hover:not(.active){background-color:#f1f5f9;color:#334155;transform:translate(2px)}.sidebar-footer{margin-top:auto;padding:20px;display:flex;align-items:center;gap:16px;border-top:1px solid #e2e8f0}.clear-cache-btn{background:linear-gradient(135deg,#f1f5f9,#e2e8f0);border:1px solid #cbd5e1;color:#475569;padding:8px 12px;border-radius:8px;font-size:13px;cursor:pointer;font-weight:500;transition:all .2s ease;white-space:nowrap}.clear-cache-btn:hover{background:linear-gradient(135deg,#e2e8f0,#cbd5e1);border-color:#94a3b8;transform:translateY(-1px)}.main-content{flex:1;background:linear-gradient(135deg,#fff,#fafbfc);display:flex;flex-direction:column;padding:0;position:relative;height:100vh;overflow:hidden;margin-right:0}.header-area{padding:32px 60px 24px;background:#fffc;-webkit-backdrop-filter:blur(20px);backdrop-filter:blur(20px);border-bottom:1px solid #e2e8f0;position:relative;z-index:5}.breadcrumb{font-size:36px;font-weight:800;margin-bottom:12px;background:linear-gradient(135deg,#1e293b,#334155);-webkit-background-clip:text;-webkit-text-fill-color:transparent;background-clip:text;line-height:1.2}.description{font-size:16px;color:#64748b;line-height:1.6;max-width:600px;font-weight:400}.chat-input-area{border-top:1px solid #e2e8f0;border-radius:0;padding:20px 60px;background:#fffffff2;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);flex-shrink:0}.chat-input-area:before{content:"";position:absolute;inset:0;z-index:-1;border-radius:20px;background:#fffffff2;-webkit-backdrop-filter:blur(20px);backdrop-filter:blur(20px)}.chat-input-area:hover{box-shadow:0 12px 48px #0000001f}.chat-input-area textarea{width:100%;border:none;resize:none;height:24px;font-size:16px;outline:none;color:#1e293b;font-family:inherit;line-height:1.5;margin-bottom:16px;background:transparent}.chat-input-area textarea::placeholder{color:#94a3b8;font-weight:400}.input-actions{display:flex;justify-content:space-between;align-items:center}.action-left{display:flex;gap:16px;color:#64748b;font-size:14px}.action-btn{background:linear-gradient(135deg,#000,#333);color:#fff;padding:12px 24px;border-radius:12px;border:none;font-size:14px;font-weight:600;cursor:pointer;display:flex;align-items:center;gap:8px;transition:all .3s ease;box-shadow:0 4px 16px #6366f140}.action-btn:hover{transform:translateY(-2px);box-shadow:0 8px 24px #6366f159}.tag-pill{display:inline-flex;align-items:center;gap:6px;background:linear-gradient(135deg,#f1f5f9,#e2e8f0);padding:6px 12px;border-radius:20px;font-size:12px;color:#475569;font-weight:500;margin-right:8px;border:1px solid #cbd5e1}.drawer-toggle{position:fixed;right:0;top:50%;transform:translateY(-50%);background:linear-gradient(135deg,#fff,#fafbfc);border:1px solid #e2e8f0;border-right:none;border-radius:8px 0 0 8px;width:32px;height:64px;cursor:pointer;display:flex;align-items:center;justify-content:center;font-size:16px;color:#64748b;box-shadow:-2px 2px 8px #00000014;transition:all .3s ease;z-index:101}.drawer-toggle:hover{background:linear-gradient(135deg,#f8fafc,#f1f5f9);color:#6366f1;box-shadow:-4px 4px 16px #0000001f}.drawer-toggle.collapsed{right:0}.drawer-toggle.expanded{right:calc(100vw / 3)}.right-panel{position:fixed;right:0;top:0;height:100vh;background:linear-gradient(135deg,#fff,#fafbfc);border-left:1px solid #e2e8f0;box-shadow:-4px 0 16px #00000014;transition:width .3s ease,transform .3s ease;z-index:100;display:flex;flex-direction:column;overflow:hidden}.right-panel.collapsed{width:0;border-left:none}.right-panel.expanded{width:calc(100vw / 3)}.panel-header{display:flex;justify-content:space-between;align-items:center;padding:20px 24px;border-bottom:1px solid #e2e8f0;background:#fffffff2;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);position:sticky;top:0;z-index:10}.panel-title{font-size:18px;font-weight:700;color:#1e293b}.panel-toggle{background:none;border:none;cursor:pointer;color:#64748b;font-size:16px;padding:8px 12px;border-radius:6px;transition:all .2s ease;display:flex;align-items:center;justify-content:center}.panel-toggle:hover{background:#6366f11a;color:#6366f1}.panel-content{flex:1;overflow-y:auto;padding:0 24px 24px;max-height:calc(100vh - 80px)}@media(max-width:1200px){.right-panel.expanded{width:40vw}.drawer-toggle.expanded{right:40vw}}@media(max-width:768px){.right-panel.expanded{width:50vw}.drawer-toggle.expanded{right:50vw}#app-container{margin-right:32px}}@media(max-width:480px){.right-panel.expanded{width:70vw}.drawer-toggle.expanded{right:70vw}#app-container{margin-right:32px}}.section-title{font-size:16px;font-weight:700;margin-bottom:16px;color:#1e293b}.file-item{display:flex;align-items:center;background:linear-gradient(135deg,#f8fafc,#f1f5f9);padding:12px 16px;border-radius:12px;margin-bottom:8px;font-size:14px;border:1px solid #e2e8f0;transition:all .2s ease}.file-item:hover{background:linear-gradient(135deg,#f1f5f9,#e2e8f0);transform:translate(2px)}.file-icon{margin-right:12px;color:#64748b;font-size:16px}.file-name{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#334155;font-weight:500}.file-remove{cursor:pointer;color:#94a3b8;font-weight:700;padding:4px;border-radius:4px;transition:all .2s ease}.file-remove:hover{color:#ef4444;background:#ef44441a}.upload-btn,.add-url-btn{background:linear-gradient(135deg,#f1f5f9,#e2e8f0);color:#475569;border:1px solid #cbd5e1;padding:8px 16px;border-radius:8px;font-size:13px;cursor:pointer;margin-top:12px;transition:all .3s ease;font-weight:500}.upload-btn:hover,.add-url-btn:hover{background:linear-gradient(135deg,#e2e8f0,#cbd5e1);border-color:#94a3b8;transform:translateY(-1px)}.toggle-row{display:flex;justify-content:space-between;align-items:flex-start;margin-bottom:24px;padding:16px;background:#fff9;border-radius:12px;border:1px solid #e2e8f0;transition:all .2s ease}.toggle-row:hover{background:#fffc;transform:translateY(-1px);box-shadow:0 4px 12px #0000000d}.toggle-label{font-size:15px;font-weight:600;margin-bottom:6px;color:#1e293b}.toggle-desc{font-size:13px;color:#64748b;line-height:1.5;padding-right:16px;max-width:280px}.switch{position:relative;display:inline-block;width:44px;height:24px;flex-shrink:0}.switch input{opacity:0;width:0;height:0}.slider{position:absolute;cursor:pointer;inset:0;background:linear-gradient(135deg,#e2e8f0,#cbd5e1);transition:.4s;border-radius:24px;box-shadow:inset 0 2px 4px #0000001a}.slider:before{position:absolute;content:"";height:18px;width:18px;left:3px;bottom:3px;background:#fff;transition:.4s;border-radius:50%;box-shadow:0 2px 4px #0003}input:checked+.slider{background:linear-gradient(135deg,#000,#333);box-shadow:0 0 8px #6366f14d}input:checked+.slider:before{transform:translate(20px)}.edit-btn-bottom{margin-top:auto;background:linear-gradient(135deg,#f1f5f9,#e2e8f0);border:1px solid #cbd5e1;padding:12px 24px;text-align:center;border-radius:12px;cursor:pointer;font-size:14px;font-weight:600;color:#475569;transition:all .3s ease;width:100%}.edit-btn-bottom:hover{background:linear-gradient(135deg,#e2e8f0,#cbd5e1);border-color:#94a3b8;transform:translateY(-2px);box-shadow:0 4px 16px #0000001a}.documents-section{margin-bottom:32px}.section-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:16px}.documents-list{max-height:300px;overflow-y:auto}.document-item{display:flex;align-items:center;background:linear-gradient(135deg,#f8fafc,#f1f5f9);padding:12px 16px;border-radius:12px;margin-bottom:8px;border:1px solid #e2e8f0;transition:all .2s ease}.document-item:hover{background:linear-gradient(135deg,#f1f5f9,#e2e8f0);transform:translate(2px)}.document-icon{font-size:20px;margin-right:12px;flex-shrink:0}.document-info{flex:1;min-width:0}.document-name{font-weight:500;color:#334155;margin-bottom:2px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.document-meta{font-size:12px;color:#64748b;margin-bottom:2px}.document-description{font-size:12px;color:#94a3b8;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.document-actions{display:flex;gap:8px;flex-shrink:0}.action-btn{background:none;border:none;cursor:pointer;padding:4px 8px;border-radius:4px;font-size:14px;transition:all .2s ease;opacity:.7}.action-btn:hover{opacity:1;background:#0000000d}.delete-btn:hover{background:#ef44441a;color:#ef4444}.empty-state{text-align:center;padding:40px 20px;color:#94a3b8}.empty-text{font-size:16px;font-weight:500;margin-bottom:8px}.settings-section,.toggles-section{margin-bottom:24px}.modal-overlay{position:fixed;inset:0;background:#00000080;display:flex;align-items:center;justify-content:center;z-index:1000;-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px)}.modal-content{background:#fff;border-radius:16px;box-shadow:0 20px 60px #00000026;max-width:500px;width:90%;max-height:90vh;overflow-y:auto;position:relative}.modal-header{display:flex;justify-content:space-between;align-items:center;padding:24px 24px 0;margin-bottom:24px}.modal-header h3{font-size:20px;font-weight:600;color:#1e293b;margin:0}.modal-close{background:none;border:none;font-size:24px;cursor:pointer;color:#94a3b8;padding:4px;border-radius:4px;transition:all .2s ease}.modal-close:hover{color:#64748b;background:#0000000d}.modal-body{padding:0 24px}.modal-footer{display:flex;justify-content:flex-end;gap:12px;padding:24px;border-top:1px solid #e2e8f0;margin-top:24px}.btn-secondary{background:#f3f4f6;color:#374151;border:1px solid #d1d5db;padding:10px 20px;border-radius:8px;font-size:14px;cursor:pointer;transition:all .2s ease}.btn-secondary:hover{background:#e5e7eb;border-color:#9ca3af}.loading-container{display:flex;align-items:center;justify-content:center;height:100vh;background:linear-gradient(135deg,#f8fafc,#f1f5f9);position:fixed;inset:0;z-index:9999}.loading-spinner{display:flex;flex-direction:column;align-items:center;gap:24px;color:#000;font-size:18px;font-weight:600}.loading-spinner:before{content:"";width:48px;height:48px;border:4px solid #e2e8f0;border-top:4px solid #000000;border-radius:50%;animation:spin 1s linear infinite}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.error-container{display:flex;align-items:center;justify-content:center;height:100vh;background:linear-gradient(135deg,#fef2f2,#fee2e2);position:fixed;inset:0;z-index:9999}.error-message{background:#fff;padding:48px;border-radius:20px;box-shadow:0 20px 60px #ef444426;text-align:center;max-width:400px;border:1px solid #fecaca}.error-message h3{color:#dc2626;font-size:24px;font-weight:700;margin-bottom:16px}.error-message p{color:#7f1d1d;font-size:16px;margin-bottom:32px;line-height:1.5}.error-message button{background:linear-gradient(135deg,#dc2626,#b91c1c);color:#fff;border:none;padding:12px 32px;border-radius:12px;font-size:16px;font-weight:600;cursor:pointer;transition:all .3s ease;box-shadow:0 4px 16px #dc262640}.error-message button:hover{transform:translateY(-2px);box-shadow:0 8px 24px #dc262659}#creation-container{display:flex;height:100%}.creation-main{flex:1;display:flex;flex-direction:column;background-color:#fff;overflow-y:auto}.creation-header{display:flex;justify-content:flex-end;align-items:center;padding:20px 40px;gap:20px;border-bottom:1px solid var(--border-color);position:sticky;top:0;background:#fff;z-index:10}.login-btn{padding:8px 16px;background-color:#f5f5f5;border-radius:6px;font-size:14px;cursor:pointer;border:1px solid #e0e0e0}.creation-form{padding:40px 80px;max-width:800px;width:100%}.creation-form h1{font-size:28px;font-weight:600;margin-bottom:8px;color:#333}.creation-form .subtitle{color:#999;margin-bottom:40px}.creation-form .section{margin-bottom:35px}.file-tags-container{display:flex;flex-wrap:wrap;gap:12px;margin-bottom:16px}.file-tag{display:flex;align-items:center;background-color:#f5f5f5;border:1px solid #e0e0e0;border-radius:6px;padding:8px 12px;font-size:13px;color:#444}.file-tag .remove-tag{margin-left:8px;cursor:pointer;color:#999;font-weight:700}.upload-btn-creation{background-color:#333;color:#fff;border:none;padding:8px 16px;border-radius:6px;font-size:13px;cursor:pointer}.constraints-input{width:100%;padding:10px 0;border:none;border-bottom:1px solid #ddd;font-size:14px;outline:none;background:transparent}.constraints-input::placeholder{color:#ccc}.login-page{display:flex;min-height:100vh;background:linear-gradient(135deg,#f8fafc,#e2e8f0)}.login-left{flex:1.2;display:flex;flex-direction:column;justify-content:center;align-items:center;padding:60px 80px;background:linear-gradient(135deg,#fff,#f8fafc);position:relative;overflow:hidden}.login-left:before{content:"";position:absolute;top:-50%;left:-50%;width:200%;height:200%;background:radial-gradient(circle,rgba(99,102,241,.05) 0%,transparent 70%);pointer-events:none}.brand-section{text-align:center;margin-bottom:60px;position:relative;z-index:1}.logo{display:flex;align-items:center;justify-content:center;gap:16px;font-size:32px;font-weight:700;margin-bottom:40px;color:#1e293b;position:relative;z-index:1}.logo svg{width:48px;height:48px;color:#000}.brand-section h1{font-size:48px;font-weight:800;margin-bottom:20px;line-height:1.1;color:#1e293b;background:linear-gradient(135deg,#1e293b,#475569);-webkit-background-clip:text;-webkit-text-fill-color:transparent;background-clip:text}.brand-section p{font-size:20px;color:#64748b;max-width:400px;line-height:1.6;font-weight:400}.hero-image{position:relative;z-index:1}.placeholder-illustration{display:flex;flex-direction:column;align-items:center;gap:32px}.illustration-row{display:flex;gap:40px;align-items:center}.icon-item{display:flex;flex-direction:column;align-items:center;gap:12px;padding:24px;background:#fffc;border-radius:16px;min-width:100px;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);border:1px solid rgba(255,255,255,.2);box-shadow:0 8px 32px #0000001a;transition:transform .3s ease,box-shadow .3s ease}.icon-item:hover{transform:translateY(-4px);box-shadow:0 12px 40px #00000026}.icon-item span{font-size:32px;filter:drop-shadow(0 2px 4px rgba(0,0,0,.1))}.icon-label{font-size:14px;color:#475569;font-weight:600;text-align:center}.login-right{flex:.8;display:flex;align-items:center;justify-content:center;padding:40px;background:#fff;min-width:420px;position:relative}.login-right:before{content:"";position:absolute;left:0;top:0;bottom:0;width:1px;background:linear-gradient(to bottom,transparent 0%,#e2e8f0 20%,#e2e8f0 80%,transparent 100%)}.login-container{width:100%;max-width:400px;background:#fff;border-radius:20px;box-shadow:0 20px 60px #0000001a;border:1px solid rgba(226,232,240,.5);overflow:hidden;-webkit-backdrop-filter:blur(20px);backdrop-filter:blur(20px)}.login-card{box-shadow:none!important;border:none!important;background:transparent!important;padding:48px 40px!important}.login-title{font-size:28px!important;font-weight:700!important;color:#1e293b!important;text-align:center!important;margin-bottom:12px!important}.login-subtitle{text-align:center!important;color:#64748b!important;margin-bottom:32px!important;font-size:16px!important}.login-footer{text-align:center!important;margin-top:24px!important}@media(max-width:1200px){.login-left{flex:1.1;padding:50px 60px}.brand-section h1{font-size:42px}.brand-section p{font-size:18px}}@media(max-width:1024px){.login-left{padding:50px 40px}.brand-section h1{font-size:38px}.brand-section p{font-size:16px}.illustration-row{gap:30px}.icon-item{padding:20px;min-width:80px}}@media(max-width:768px){.login-page{flex-direction:column}.login-left{flex:none;padding:40px 20px;min-height:60vh;border-right:none;border-bottom:1px solid #e2e8f0}.brand-section h1{font-size:32px}.brand-section p{font-size:16px}.hero-image{margin-top:20px}.illustration-row{gap:20px}.icon-item{padding:16px;min-width:70px}.login-right{flex:none;padding:40px 20px;min-height:40vh;min-width:auto}.login-container{max-width:100%}.login-card{padding:32px 24px!important}}@media(max-width:480px){.login-left{padding:30px 15px}.logo{font-size:24px;margin-bottom:24px}.logo svg{width:32px;height:32px}.brand-section h1{font-size:28px}.brand-section p{font-size:14px}.hero-image{margin-top:20px}.illustration-row{flex-direction:column;gap:16px}.login-right{padding:20px 15px}.login-card{padding:24px 16px!important}}.toast-container{position:fixed;top:20px;right:20px;z-index:9999;display:flex;flex-direction:column;gap:10px}.toast{background:#fff;border-radius:12px;padding:16px 20px;box-shadow:0 8px 32px #0000001f;border-left:4px solid;display:flex;align-items:center;gap:12px;min-width:300px;max-width:500px;animation:slideInRight .3s ease-out;-webkit-backdrop-filter:blur(20px);backdrop-filter:blur(20px)}.toast.success{border-left-color:#10b981;background:linear-gradient(135deg,#10b9811a,#ffffffe6)}.toast.error{border-left-color:#ef4444;background:linear-gradient(135deg,#ef44441a,#ffffffe6)}.toast.warning{border-left-color:#f59e0b;background:linear-gradient(135deg,#f59e0b1a,#ffffffe6)}.toast.info{border-left-color:#000;background:linear-gradient(135deg,#6366f11a,#ffffffe6)}.toast-icon{font-size:20px;flex-shrink:0}.toast-content{flex:1}.toast-title{font-weight:600;font-size:14px;margin-bottom:2px;color:#1e293b}.toast-message{font-size:13px;color:#64748b;line-height:1.4}.toast-close{background:none;border:none;cursor:pointer;color:#94a3b8;font-size:16px;padding:4px;border-radius:4px;transition:all .2s ease}.toast-close:hover{color:#64748b;background:#0000000d}@keyframes slideInRight{0%{transform:translate(100%);opacity:0}to{transform:translate(0);opacity:1}}.toast.fade-out{animation:fadeOut .3s ease-out forwards}@keyframes fadeOut{0%{transform:translate(0);opacity:1}to{transform:translate(100%);opacity:0}}.document-selector{position:relative;display:inline-block}.doc-selector-btn{background:linear-gradient(135deg,#f1f5f9,#e2e8f0);border:1px solid #cbd5e1;border-radius:20px;padding:6px 12px;font-size:12px;color:#475569;cursor:pointer;display:flex;align-items:center;gap:6px;font-weight:500;transition:all .2s ease;margin-right:8px;margin-bottom:8px}.doc-selector-btn:hover{background:linear-gradient(135deg,#e2e8f0,#cbd5e1);border-color:#94a3b8;transform:translateY(-1px);box-shadow:0 4px 12px #0000001a}.doc-selector-modal-overlay{position:fixed;inset:0;background:#00000080;display:flex;align-items:center;justify-content:center;z-index:10000;-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px)}.doc-selector-modal{background:#fff;border-radius:16px;box-shadow:0 20px 60px #0003;width:95vw;max-width:1000px;height:85vh;max-height:700px;display:flex;flex-direction:column;overflow:hidden;z-index:2001;margin:20px}.modal-header{display:flex;justify-content:space-between;align-items:center;padding:20px 24px;border-bottom:1px solid #e2e8f0;background:linear-gradient(135deg,#f8fafc,#f1f5f9);flex-shrink:0;gap:16px}.modal-header h3{margin:0;font-size:20px;font-weight:600;color:#1e293b;flex:1}.view-toggle{display:flex;background:#e2e8f0;border-radius:8px;padding:4px;flex-shrink:0}.view-btn{background:transparent;border:none;padding:6px 12px;border-radius:6px;cursor:pointer;font-size:13px;font-weight:500;color:#475569;transition:all .2s ease}.view-btn.active{background:#fff;color:#1e293b;box-shadow:0 1px 3px #0000001a}.close-btn{background:none;border:none;font-size:20px;cursor:pointer;color:#94a3b8;padding:4px;border-radius:4px;transition:all .2s ease}.close-btn:hover{color:#64748b;background:#0000000d}.modal-content{flex:1;overflow-y:auto;padding:0;min-height:0}.spaces-list{display:flex;flex-direction:column;gap:16px;padding:16px}.space-list-item{background:#fff;border:1px solid #e2e8f0;border-radius:12px;padding:16px;transition:all .2s ease}.space-list-item:hover{box-shadow:0 4px 16px #00000014;transform:translateY(-1px)}.space-list-item-header{display:flex;align-items:center;gap:12px;padding-bottom:12px;margin-bottom:12px;border-bottom:1px solid #f1f5f9}.documents-list-view{display:flex;flex-direction:column;gap:8px}.document-list-item .document-checkbox{width:14px!important;height:14px!important;margin-right:4px}.document-list-item .document-name-small{flex:1;text-align:left;white-space:normal;line-height:1.3}.document-list-item .document-meta-small{flex-shrink:0;min-width:60px;text-align:right;font-size:11px}.tree-header{display:none}.stats{font-size:11px;color:#64748b;font-weight:400}.spaces-grid{display:grid;grid-template-columns:1fr;gap:16px;padding:16px}.space-card{background:#fff;border:1px solid #e2e8f0;border-radius:12px;padding:16px;box-shadow:0 2px 8px #0000000d;transition:all .2s ease}.space-card:hover{box-shadow:0 4px 16px #0000001a;transform:translateY(-2px)}.space-card-header{display:flex;align-items:center;margin-bottom:12px;padding-bottom:12px;border-bottom:1px solid #f1f5f9}.space-icon-large{font-size:24px;margin-right:12px;color:#64748b}.space-title-section{flex:1}.space-title{margin:0 0 4px;font-size:16px;font-weight:600;color:#1e293b}.space-stats{font-size:12px;color:#64748b}.space-checkbox{margin-left:12px}.space-checkbox input[type=checkbox]{width:16px;height:16px;cursor:pointer}.documents-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(120px,1fr));gap:8px}.document-card{background:#f8fafc;border:1px solid #e2e8f0;border-radius:8px;padding:8px;text-align:center;transition:all .2s ease;cursor:default;position:relative}.document-card:hover{background:#f1f5f9;border-color:#cbd5e1}.document-card-actions{position:absolute;top:4px;right:4px}.refresh-btn{background:none;border:none;cursor:pointer;color:#94a3b8;font-size:12px;padding:2px;border-radius:4px;transition:all .2s ease;line-height:1}.refresh-btn:hover{color:#334155;background:#0000000d}.refresh-btn:disabled{cursor:not-allowed;animation:spin 1s linear infinite}.document-list-item{display:flex;align-items:center;gap:10px;padding:8px 8px 8px 30px;border-radius:8px;transition:background-color .2s ease}.document-list-item:hover{background-color:#f8fafc}.refresh-btn-list{background:none;border:none;cursor:pointer;color:#94a3b8;font-size:14px;padding:4px;border-radius:4px;transition:all .2s ease;line-height:1;margin-left:auto}.refresh-btn-list:hover{color:#334155;background:#0000000d}.refresh-btn-list:disabled{cursor:not-allowed;animation:spin 1s linear infinite}.document-icon-small{font-size:16px}.document-checkbox{width:12px!important;height:12px!important}.document-name-small{font-size:11px;font-weight:500;color:#334155;margin-bottom:2px;line-height:1.2;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.document-meta-small{font-size:10px;color:#64748b}.loading,.error{text-align:center;padding:40px 20px;color:#64748b}.error{color:#ef4444}@media(max-width:1200px){.doc-selector-modal{width:calc(100vw - 40px);height:calc(100vh - 40px);max-width:none;max-height:none}.spaces-grid{grid-template-columns:1fr;gap:12px}}@media(max-width:768px){.toast-container{top:10px;right:10px;left:10px}.toast{min-width:auto;max-width:none}.doc-selector-modal{width:calc(100vw - 20px);height:calc(100vh - 20px);border-radius:8px;margin:10px}.modal-header{padding:16px 20px}.modal-header h3{font-size:18px}.spaces-grid{grid-template-columns:1fr;gap:10px;padding:12px}.space-card{padding:12px}.documents-grid{grid-template-columns:repeat(auto-fill,minmax(100px,1fr))}}@media(max-width:480px){.doc-selector-modal{width:calc(100vw - 10px);height:calc(100vh - 10px);border-radius:0;margin:5px}.modal-header{padding:12px 16px}.modal-header h3{font-size:16px}.spaces-grid{grid-template-columns:1fr;padding:8px}.space-card{padding:10px}.documents-grid{grid-template-columns:repeat(auto-fill,minmax(90px,1fr));gap:6px}}.login-prompt-container{display:flex;align-items:center;justify-content:center;height:100vh;background:linear-gradient(135deg,#f8fafc,#f1f5f9)}.login-prompt{background:#fff;padding:48px;border-radius:20px;box-shadow:0 20px 60px #0000001a;text-align:center;max-width:400px;border:1px solid rgba(226,232,240,.5)}.login-prompt h3{color:#1e293b;font-size:24px;font-weight:700;margin-bottom:16px}.login-prompt p{color:#64748b;font-size:16px;margin-bottom:32px;line-height:1.5}.login-prompt-actions{display:flex;gap:16px;justify-content:center}.login-prompt-actions .btn-primary{padding:12px 32px;background:linear-gradient(135deg,#000,#333);color:#fff;border:none;border-radius:12px;font-size:16px;font-weight:600;cursor:pointer;transition:all .3s ease;box-shadow:0 4px 16px #6366f140}.login-prompt-actions .btn-primary:hover{transform:translateY(-2px);box-shadow:0 8px 24px #6366f159}.chat-history{flex:1;overflow-y:auto;padding:20px 60px;max-height:calc(100vh - 300px)}.chat-empty{display:flex;flex-direction:column;align-items:center;justify-content:center;height:200px;color:#94a3b8;text-align:center}.empty-icon{font-size:48px;margin-bottom:16px;opacity:.5}.empty-text{font-size:18px;font-weight:600;margin-bottom:8px}.empty-subtext{font-size:14px}.chat-message{display:flex;margin-bottom:24px;max-width:80%}.chat-message.user{margin-left:auto;flex-direction:row-reverse}.chat-message.assistant{margin-right:auto}.message-content{padding:16px 20px;border-radius:16px;max-width:600px;line-height:1.6}.chat-message.user .message-content{background:linear-gradient(135deg,#000,#333);color:#fff;border-bottom-right-radius:4px}.chat-message.assistant .message-content{background:linear-gradient(135deg,#f8fafc,#f1f5f9);color:#1e293b;border:1px solid #e2e8f0;border-bottom-left-radius:4px}.markdown-content{font-size:15px}.markdown-content strong{font-weight:600;color:#1e293b}.markdown-content em{font-style:italic;color:#475569}.markdown-content code{background:#0000001a;padding:2px 6px;border-radius:4px;font-family:Monaco,Menlo,Ubuntu Mono,monospace;font-size:14px}.message-documents{margin-top:12px;padding-top:12px;border-top:1px solid rgba(0,0,0,.08);display:flex;flex-wrap:wrap;gap:8px}.chat-message.user .message-documents{border-top-color:#fff3}.document-tag{display:inline-block;background:#0000000d;color:#475569;padding:4px 10px;border-radius:12px;font-size:12px;font-weight:500;max-width:200px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;cursor:default}.chat-message.user .document-tag{background:#ffffff26;color:#ffffffe6}.message-time{font-size:11px;color:#94a3b8;margin-top:4px;text-align:center;min-width:40px}.chat-message.user .message-time{text-align:right}.chat-message.assistant .message-time{text-align:left}.selected-count{font-size:12px;color:#64748b;background:#6366f11a;padding:4px 8px;border-radius:12px;border:1px solid rgba(99,102,241,.2)}.cache-notification{position:fixed;top:100px;right:20px;z-index:1000;padding:12px 16px;border-radius:8px;font-size:14px;font-weight:500;box-shadow:0 4px 12px #00000026;animation:slideInFromRight .3s ease-out}.cache-notification.success{background:linear-gradient(135deg,#10b981,#059669);color:#fff;border:1px solid #10b981}.cache-notification.warning{background:linear-gradient(135deg,#f59e0b,#d97706);color:#fff;border:1px solid #f59e0b}@keyframes slideInFromRight{0%{transform:translate(100%);opacity:0}to{transform:translate(0);opacity:1}}@media(max-width:768px){.chat-history{padding:20px;max-height:calc(100vh - 250px)}.chat-message{max-width:90%}.message-content{padding:12px 16px;font-size:14px}}
