.header{display:flex;align-items:center;justify-content:space-between;padding:1rem 1.5rem;background:linear-gradient(135deg,#1e3a5f,#0f172a);color:#fff;box-shadow:0 2px 10px #0000001a;position:relative}.header-left{display:flex;align-items:center;gap:1rem}.header-logo{display:flex;align-items:center;justify-content:center;width:52px;height:52px;background:#fff;border-radius:50%;overflow:hidden;padding:3px}.header-logo img{width:100%;height:100%;object-fit:contain}.header-text h1{font-size:1.5rem;font-weight:700;letter-spacing:-.025em}.header-text p{font-size:.875rem;opacity:.8;margin-top:.125rem}.header-right{display:flex;align-items:center;gap:.75rem}.settings-btn{display:flex;align-items:center;justify-content:center;width:40px;height:40px;border:none;background:#ffffff1a;color:#fff;border-radius:8px;cursor:pointer;transition:all .2s}.settings-btn:hover{background:#fff3}.settings-panel{position:absolute;top:100%;right:1rem;width:320px;background:#fff;color:#1e293b;border-radius:12px;box-shadow:0 10px 40px #0003;z-index:100;padding:1rem;margin-top:.5rem}.settings-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:1rem;padding-bottom:.75rem;border-bottom:1px solid #e2e8f0}.settings-header h3{display:flex;align-items:center;gap:.5rem;font-size:1rem;font-weight:600;color:#1e293b}.close-btn{display:flex;align-items:center;justify-content:center;width:28px;height:28px;border:none;background:#f1f5f9;color:#64748b;border-radius:6px;cursor:pointer;transition:all .2s}.close-btn:hover{background:#e2e8f0;color:#334155}.kb-info{display:flex;justify-content:space-around;padding:.75rem;background:#f0fdf4;border-radius:8px;margin-bottom:1rem;font-size:.875rem;color:#047857}.kb-upload-zone{display:flex;flex-direction:column;align-items:center;gap:.5rem;padding:1.25rem;border:2px dashed #10b981;border-radius:10px;background:#ecfdf5;color:#059669;cursor:pointer;transition:all .2s}.kb-upload-zone:hover{border-color:#059669;background:#d1fae5}.kb-upload-zone span{font-size:.875rem;font-weight:500}.kb-upload-zone small{font-size:.75rem;opacity:.8}.kb-note{margin-top:.75rem;font-size:.75rem;color:#64748b;text-align:center}.sidebar{width:280px;background:#fff;border-right:1px solid #e2e8f0;padding:1rem;display:flex;flex-direction:column;gap:1rem;overflow-y:auto}.new-chat-btn{display:flex;align-items:center;justify-content:center;gap:.5rem;padding:.75rem;border:1px solid #3b82f6;border-radius:8px;background:#3b82f6;color:#fff;font-size:.875rem;font-weight:600;cursor:pointer;transition:all .2s}.new-chat-btn:hover{background:#2563eb;border-color:#2563eb}.chat-history{flex:1;min-height:120px;max-height:300px;overflow-y:auto;border-bottom:1px solid #e2e8f0;padding-bottom:.75rem;margin-bottom:.5rem}.chat-history h3{display:flex;align-items:center;gap:.375rem;font-size:.75rem;font-weight:600;text-transform:uppercase;letter-spacing:.05em;color:#64748b;margin-bottom:.5rem}.chat-history ul{list-style:none;margin:0;padding:0}.chat-item{display:flex;align-items:center;gap:.5rem;padding:.625rem .75rem;border-radius:8px;cursor:pointer;transition:all .15s;margin-bottom:.375rem;background:#f8fafc}.chat-item:hover{background:#f1f5f9}.chat-item.active{background:#eff6ff;border:1px solid #bfdbfe}.chat-item-content{flex:1;min-width:0}.chat-title{display:block;font-size:.8125rem;font-weight:500;color:#334155;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.chat-meta{display:flex;align-items:center;gap:.375rem;font-size:.6875rem;color:#94a3b8}.delete-chat-btn{padding:.25rem;border:none;background:none;color:#94a3b8;cursor:pointer;border-radius:4px;opacity:0;transition:all .15s}.chat-item:hover .delete-chat-btn{opacity:1}.delete-chat-btn:hover{color:#dc2626;background:#fee2e2}.upload-zone{display:flex;flex-direction:column;align-items:center;gap:.5rem;padding:1.5rem;border:2px dashed #cbd5e1;border-radius:12px;cursor:pointer;transition:all .2s;color:#64748b}.upload-zone:hover{border-color:#3b82f6;background:#eff6ff;color:#3b82f6}.upload-zone.dragging{border-color:#2563eb;background:#dbeafe}.upload-zone span{font-size:.875rem;font-weight:500}.upload-zone small{font-size:.75rem;opacity:.7}.upload-zone.kb-upload{border-color:#a7f3d0;background:#ecfdf5;color:#059669}.upload-zone.kb-upload:hover{border-color:#10b981;background:#d1fae5;color:#047857}.upload-zone.kb-upload.dragging{border-color:#059669;background:#a7f3d0}.kb-stats{padding:.75rem;background:#f0fdf4;border-radius:8px;border:1px solid #bbf7d0}.kb-stats h3{font-size:.75rem;font-weight:600;text-transform:uppercase;letter-spacing:.05em;color:#059669;margin-bottom:.5rem}.kb-stats .stats-info{display:flex;justify-content:space-between;font-size:.875rem;color:#047857;font-weight:500}.uploaded-files{flex:1;overflow-y:auto}.uploaded-files h3,.task-selector h3{font-size:.75rem;font-weight:600;text-transform:uppercase;letter-spacing:.05em;color:#64748b;margin-bottom:.75rem}.uploaded-files .no-files{font-size:.875rem;color:#94a3b8;text-align:center;padding:1rem}.uploaded-files ul{list-style:none}.uploaded-files li{display:flex;align-items:center;gap:.5rem;padding:.625rem .75rem;background:#f1f5f9;border-radius:8px;margin-bottom:.5rem;font-size:.875rem}.uploaded-files li span{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.uploaded-files li small{font-size:.75rem;color:#64748b}.task-buttons{display:flex;flex-direction:column;gap:.5rem}.task-btn{display:flex;align-items:center;gap:.5rem;padding:.625rem .875rem;border:1px solid #e2e8f0;border-radius:8px;background:#fff;cursor:pointer;font-size:.875rem;font-weight:500;color:#475569;transition:all .2s}.task-btn:hover{background:#f8fafc;border-color:#cbd5e1}.task-btn.active{background:#3b82f6;border-color:#3b82f6;color:#fff}.clear-btn{display:flex;align-items:center;justify-content:center;gap:.5rem;padding:.625rem;border:1px solid #fecaca;border-radius:8px;background:#fef2f2;color:#dc2626;font-size:.875rem;font-weight:500;cursor:pointer;transition:all .2s}.clear-btn:hover{background:#fee2e2}.letter-type-selector{padding:.75rem;background:#fef3c7;border-radius:8px;border:1px solid #fcd34d}.letter-type-selector h3{font-size:.75rem;font-weight:600;text-transform:uppercase;letter-spacing:.05em;color:#92400e;margin-bottom:.5rem}.letter-type-dropdown{width:100%;padding:.5rem .75rem;border:1px solid #fbbf24;border-radius:6px;background:#fff;font-size:.875rem;color:#1e293b;cursor:pointer}.letter-type-dropdown:focus{outline:none;border-color:#f59e0b;box-shadow:0 0 0 2px #f59e0b33}.letter-type-desc{display:block;margin-top:.375rem;font-size:.75rem;color:#92400e}.message{display:flex;gap:.75rem;max-width:85%}.message.user{flex-direction:row-reverse;margin-left:auto}.message-avatar{display:flex;align-items:center;justify-content:center;width:36px;height:36px;border-radius:10px;flex-shrink:0}.message.user .message-avatar{background:#3b82f6;color:#fff}.message.assistant .message-avatar{background:#1e3a5f;color:#fff}.message-content{padding:.875rem 1rem;border-radius:12px;line-height:1.6}.message.user .message-content{background:#3b82f6;color:#fff;border-bottom-right-radius:4px}.message.assistant .message-content{background:#fff;border:1px solid #e2e8f0;border-bottom-left-radius:4px}.message-text p{margin:0}.message-text p+p{margin-top:.5rem}.message-text h1,.message-text h2,.message-text h3{margin:.75rem 0 .5rem;font-weight:600}.message-text h1{font-size:1.25rem}.message-text h2{font-size:1.125rem}.message-text h3{font-size:1rem}.message-text strong{font-weight:600}.message-text code{background:#f1f5f9;padding:.125rem .375rem;border-radius:4px;font-family:Consolas,Monaco,monospace;font-size:.875em}.message.user .message-text code{background:#fff3}.message-text pre{background:#1e293b;color:#e2e8f0;padding:.75rem 1rem;border-radius:8px;overflow-x:auto;margin:.5rem 0}.message-text pre code{background:none;padding:0;color:inherit}.message-text blockquote{border-left:3px solid #3b82f6;margin:.5rem 0;padding-left:1rem;color:#64748b}.message-text table{border-collapse:collapse;margin:.5rem 0;width:100%}.message-text th,.message-text td{border:1px solid #e2e8f0;padding:.5rem;text-align:left}.message-text th{background:#f8fafc;font-weight:600}.copy-btn{display:flex;align-items:center;gap:4px;margin-top:.5rem;padding:.25rem .5rem;background:transparent;border:1px solid #e2e8f0;border-radius:6px;font-size:.75rem;color:#64748b;cursor:pointer;transition:all .2s}.copy-btn:hover{background:#f1f5f9;color:#475569}.message-sources{display:flex;flex-wrap:wrap;gap:.375rem;margin-top:.75rem;padding-top:.75rem;border-top:1px solid #e2e8f0;font-size:.75rem;color:#64748b;align-items:center}.source-tag{display:inline-block;padding:.25rem .5rem;background:#f1f5f9;border-radius:4px;font-size:.7rem}.message-text ul,.message-text ol{margin:.5rem 0;padding-left:1.25rem}.message-text li{margin:.25rem 0}.message-text li>p{margin:0}.chat-area{flex:1;display:flex;flex-direction:column;background:#f8fafc;overflow:hidden}.messages-container{flex:1;overflow-y:auto;padding:1.5rem;display:flex;flex-direction:column;gap:1rem}.input-form{padding:1rem 1.5rem 1.25rem;background:#fff;border-top:1px solid #e2e8f0}.suggestions{display:flex;flex-wrap:wrap;gap:.5rem;margin-bottom:.75rem;align-items:center}.suggestions-icon{color:#3b82f6;flex-shrink:0}.suggestion-chip{padding:.5rem .875rem;background:#f0f7ff;border:1px solid #bfdbfe;border-radius:20px;font-size:.8125rem;color:#1e40af;cursor:pointer;transition:all .2s;white-space:nowrap}.suggestion-chip:hover{background:#dbeafe;border-color:#93c5fd;transform:translateY(-1px)}.input-container{display:flex;gap:.75rem;align-items:flex-end}.input-container textarea{flex:1;padding:.875rem 1rem;border:1px solid #e2e8f0;border-radius:12px;font-family:inherit;font-size:.9375rem;resize:none;min-height:48px;max-height:200px;line-height:1.5;transition:border-color .2s,box-shadow .2s}.input-container textarea:focus{outline:none;border-color:#3b82f6;box-shadow:0 0 0 3px #3b82f626}.input-container textarea:disabled{background:#f1f5f9;cursor:not-allowed}.input-container button{display:flex;align-items:center;justify-content:center;width:48px;height:48px;background:#3b82f6;color:#fff;border:none;border-radius:12px;cursor:pointer;transition:background .2s}.input-container button:hover:not(:disabled){background:#2563eb}.input-container button:disabled{background:#94a3b8;cursor:not-allowed}.input-hint{margin-top:.5rem;font-size:.75rem;color:#94a3b8;text-align:center}.typing-indicator{display:flex;align-items:center;gap:3px;padding:.5rem 0;color:#64748b;font-size:.875rem}.typing-indicator .typing-text{margin-right:4px}.typing-indicator .dot{width:6px;height:6px;background:#64748b;border-radius:50%;animation:bounce 1.4s infinite ease-in-out both}.typing-indicator .dot:nth-child(2){animation-delay:-.32s}.typing-indicator .dot:nth-child(3){animation-delay:-.16s}@keyframes bounce{0%,80%,to{transform:scale(.6);opacity:.4}40%{transform:scale(1);opacity:1}}.app{display:flex;flex-direction:column;height:100vh;background:#f8fafc}.main-container{display:flex;flex:1;overflow:hidden}.status-bar{display:flex;justify-content:space-between;padding:.5rem 1.5rem;background:#e2e8f0;font-size:.75rem;color:#64748b;border-top:1px solid #cbd5e1}*{margin:0;padding:0;box-sizing:border-box}body{font-family:Inter,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif;background:#f8fafc;color:#1e293b;height:100vh;overflow:hidden}#root{height:100%}::-webkit-scrollbar{width:6px}::-webkit-scrollbar-track{background:#f1f5f9}::-webkit-scrollbar-thumb{background:#cbd5e1;border-radius:3px}::-webkit-scrollbar-thumb:hover{background:#94a3b8}
