.error-boundary{display:flex;align-items:center;justify-content:center;min-height:100vh;padding:var(--spacing-lg);background-color:var(--bg-secondary)}.error-boundary-content{max-width:600px;text-align:center;background-color:var(--bg-primary);padding:var(--spacing-xl);border-radius:var(--radius-xl);box-shadow:var(--shadow-lg)}.error-icon{font-size:4rem;margin-bottom:var(--spacing-lg)}.error-boundary-content h1{font-size:1.875rem;font-weight:700;color:var(--text-primary);margin-bottom:var(--spacing-md)}.error-message{font-size:1rem;color:var(--text-secondary);margin-bottom:var(--spacing-lg);line-height:1.6}.error-details{margin:var(--spacing-lg) 0;text-align:left}.error-details summary{cursor:pointer;font-weight:500;color:var(--text-primary);padding:var(--spacing-sm);background-color:var(--bg-secondary);border-radius:var(--radius-sm);-webkit-user-select:none;user-select:none}.error-details summary:hover{background-color:var(--bg-tertiary)}.error-details pre{margin-top:var(--spacing-sm);padding:var(--spacing-md);background-color:var(--bg-secondary);border:1px solid var(--border-color);border-radius:var(--radius-md);overflow-x:auto;font-size:.75rem;font-family:var(--font-mono);color:var(--text-secondary);line-height:1.5}.error-actions{display:flex;gap:var(--spacing-md);justify-content:center;flex-wrap:wrap}@media (max-width: 480px){.error-boundary-content{padding:var(--spacing-lg)}.error-icon{font-size:3rem}.error-boundary-content h1{font-size:1.5rem}.error-actions{flex-direction:column}.error-actions .btn{width:100%}}.logo-container{display:inline-flex;align-items:center;gap:var(--spacing-sm)}.logo-image{object-fit:contain;display:block}.logo-full{height:100%}.logo-icon{height:100%;width:auto}.logo-small{height:24px}.logo-small .logo-text{font-size:.875rem;font-weight:600}.logo-medium{height:40px}.logo-medium .logo-text{font-size:1.25rem;font-weight:700}.logo-large{height:60px}.logo-large .logo-text{font-size:2rem;font-weight:700}.logo-text{color:var(--text-primary);white-space:nowrap;-webkit-user-select:none;user-select:none}.auth-logo-container{margin-bottom:var(--spacing-lg);display:flex;justify-content:center}.auth-logo-container .logo-container{flex-direction:column;gap:var(--spacing-md)}.auth-logo-container .logo-image{height:80px;width:auto}.auth-logo-container .logo-text{font-size:2rem;font-weight:700;color:var(--primary-color)}.sidebar-header .logo-container{margin-bottom:var(--spacing-md)}.sidebar-header .logo-image{height:36px;width:auto}.sidebar-header .logo-text{font-size:1.5rem;font-weight:700;color:var(--primary-color)}@media (max-width: 480px){.logo-large{height:48px}.logo-large .logo-text{font-size:1.5rem}.auth-logo-container .logo-image{height:60px}.auth-logo-container .logo-text{font-size:1.5rem}}.auth-container{min-height:100vh;display:flex;align-items:center;justify-content:center;background:linear-gradient(135deg,var(--bg-secondary) 0%,var(--bg-tertiary) 100%);padding:var(--spacing-lg)}.auth-card{background-color:var(--bg-primary);border-radius:var(--radius-xl);box-shadow:var(--shadow-lg);width:100%;max-width:420px;padding:var(--spacing-xl)}.auth-header{text-align:center;margin-bottom:var(--spacing-xl)}.auth-logo{font-size:2rem;font-weight:700;color:var(--primary-color);margin-bottom:var(--spacing-sm)}.auth-subtitle{color:var(--text-secondary);font-size:.9375rem}.auth-form{display:flex;flex-direction:column;gap:var(--spacing-md)}.form-group{display:flex;flex-direction:column;gap:var(--spacing-xs)}.form-group label{font-size:.875rem;font-weight:500;color:var(--text-primary)}.form-group input{padding:.75rem;border:1px solid var(--border-color);border-radius:var(--radius-md);background-color:var(--bg-primary);color:var(--text-primary);font-size:.9375rem;transition:all .2s ease}.form-group input:focus{outline:none;border-color:var(--primary-color);box-shadow:0 0 0 3px #10a37f1a}.form-group input::placeholder{color:var(--text-tertiary)}.form-hint{font-size:.75rem;color:var(--text-secondary)}.form-footer{display:flex;justify-content:flex-end;margin-top:calc(var(--spacing-sm) * -1)}.error-message{display:flex;align-items:center;gap:var(--spacing-sm);padding:var(--spacing-md);background-color:#fee2e2;border:1px solid #fecaca;border-radius:var(--radius-md);color:#991b1b;font-size:.875rem}.error-icon{flex-shrink:0}.divider{display:flex;align-items:center;text-align:center;margin:var(--spacing-lg) 0;color:var(--text-tertiary);font-size:.875rem}.divider:before,.divider:after{content:"";flex:1;border-bottom:1px solid var(--border-color)}.divider span{padding:0 var(--spacing-md)}.auth-switch{text-align:center;color:var(--text-secondary);font-size:.9375rem;margin-top:var(--spacing-lg)}@media (max-width: 480px){.auth-container{padding:var(--spacing-md)}.auth-card{padding:var(--spacing-lg)}.auth-logo{font-size:1.75rem}}.chat-layout{display:flex;height:100vh;overflow:hidden}.sidebar{width:280px;background-color:var(--bg-secondary);border-right:1px solid var(--border-color);display:flex;flex-direction:column;flex-shrink:0}.sidebar-header{padding:var(--spacing-lg);border-bottom:1px solid var(--border-color)}.sidebar-logo{font-size:1.5rem;font-weight:700;color:var(--primary-color);margin-bottom:var(--spacing-md)}.new-chat-button{width:100%;display:flex;align-items:center;justify-content:center;gap:var(--spacing-sm);padding:.75rem;background-color:var(--primary-color);color:#fff;border:none;border-radius:var(--radius-md);cursor:pointer;font-size:.875rem;font-weight:500;transition:background-color .2s ease}.new-chat-button:hover{background-color:var(--primary-hover)}.new-chat-button svg{width:18px;height:18px}.sidebar-content{flex:1;overflow-y:auto;padding:var(--spacing-md)}.session-list{display:flex;flex-direction:column;gap:var(--spacing-xs)}.empty-sessions{text-align:center;color:var(--text-tertiary);font-size:.875rem;padding:var(--spacing-xl) var(--spacing-md)}.session-item{display:flex;align-items:center;gap:var(--spacing-sm);padding:var(--spacing-md);border-radius:var(--radius-md);cursor:pointer;transition:all .2s ease;position:relative}.session-item:hover{background-color:var(--bg-tertiary)}.session-item.active{background-color:var(--bg-tertiary);box-shadow:inset 2px 0 0 var(--primary-color)}.session-icon{font-size:1.25rem;flex-shrink:0}.session-info{flex:1;min-width:0}.session-title{font-size:.875rem;font-weight:500;color:var(--text-primary);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.session-meta{font-size:.75rem;color:var(--text-tertiary)}.delete-session-button{padding:.25rem;background:transparent;border:none;cursor:pointer;color:var(--text-tertiary);opacity:0;transition:all .2s ease;border-radius:var(--radius-sm)}.session-item:hover .delete-session-button{opacity:1}.delete-session-button:hover{background-color:var(--danger-color);color:#fff}.delete-session-button svg{width:16px;height:16px}.sidebar-footer{padding:var(--spacing-md);border-top:1px solid var(--border-color);display:flex;align-items:center;justify-content:space-between;gap:var(--spacing-sm)}.user-info{display:flex;align-items:center;gap:var(--spacing-sm);flex:1;min-width:0}.user-avatar{width:36px;height:36px;border-radius:50%;background-color:var(--primary-color);color:#fff;display:flex;align-items:center;justify-content:center;font-weight:600;flex-shrink:0}.user-details{flex:1;min-width:0}.user-name{font-size:.875rem;font-weight:500;color:var(--text-primary);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.sign-out-button{padding:.5rem;background:transparent;border:none;cursor:pointer;color:var(--text-secondary);transition:all .2s ease;border-radius:var(--radius-sm)}.sign-out-button:hover{background-color:var(--bg-tertiary);color:var(--text-primary)}.sign-out-button svg{width:20px;height:20px}.chat-main{flex:1;display:flex;flex-direction:column;overflow:hidden}.chat-header{padding:var(--spacing-md) var(--spacing-lg);border-bottom:1px solid var(--border-color);display:flex;align-items:center;gap:var(--spacing-md);background-color:var(--bg-primary)}.toggle-sidebar-button{padding:.5rem;background:transparent;border:none;cursor:pointer;color:var(--text-secondary);border-radius:var(--radius-sm);transition:all .2s ease}.toggle-sidebar-button:hover{background-color:var(--bg-secondary);color:var(--text-primary)}.toggle-sidebar-button svg{width:20px;height:20px}.mode-selector{display:flex;gap:var(--spacing-sm);flex:1}.mode-button{display:flex;align-items:center;gap:var(--spacing-sm);padding:.625rem var(--spacing-md);background-color:transparent;border:1px solid var(--border-color);border-radius:var(--radius-md);cursor:pointer;transition:all .2s ease;position:relative;flex:1}.mode-button:hover{background-color:var(--bg-secondary);border-color:var(--text-tertiary)}.mode-button.active{background-color:var(--mode-color, var(--primary-color));border-color:var(--mode-color, var(--primary-color));color:#fff}.mode-icon{font-size:1.25rem}.mode-info{display:flex;flex-direction:column;align-items:flex-start;text-align:left}.mode-label{font-size:.875rem;font-weight:600}.mode-description{font-size:.75rem;opacity:.8}.mode-indicator{position:absolute;bottom:-1px;left:0;right:0;height:2px;background-color:currentColor}.chat-messages{flex:1;overflow-y:auto;padding:var(--spacing-lg);background-color:var(--bg-primary)}.message-list{max-width:800px;margin:0 auto;display:flex;flex-direction:column;gap:var(--spacing-lg)}.empty-state{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;text-align:center;color:var(--text-secondary)}.empty-icon{width:80px;height:80px;margin-bottom:var(--spacing-lg);color:var(--text-tertiary)}.empty-icon svg{width:100%;height:100%}.empty-state h3{font-size:1.5rem;margin-bottom:var(--spacing-sm);color:var(--text-primary)}.empty-state p{font-size:.9375rem}.message-item{display:flex;gap:var(--spacing-md);animation:fadeIn .3s ease}@keyframes fadeIn{0%{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}.message-avatar{flex-shrink:0}.avatar{width:36px;height:36px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-weight:600;font-size:.875rem}.user-avatar{background-color:var(--secondary-color);color:#fff}.bot-avatar{background-color:var(--primary-color);color:#fff}.bot-avatar svg{width:20px;height:20px}.message-content{flex:1;min-width:0}.message-header{display:flex;align-items:center;gap:var(--spacing-sm);margin-bottom:var(--spacing-xs)}.message-role{font-size:.875rem;font-weight:600;color:var(--text-primary)}.message-time{font-size:.75rem;color:var(--text-tertiary)}.message-body{font-size:.9375rem;line-height:1.6;color:var(--text-primary)}.message-body p{margin-bottom:var(--spacing-sm)}.message-body p:last-child{margin-bottom:0}.message-body pre{background-color:var(--bg-secondary);padding:var(--spacing-md);border-radius:var(--radius-md);overflow-x:auto;font-family:var(--font-mono);font-size:.875rem}.message-body code{font-family:var(--font-mono);font-size:.875rem;background-color:var(--bg-secondary);padding:.125rem .25rem;border-radius:var(--radius-sm)}.message-body pre code{background-color:transparent;padding:0}.streaming-indicator,.loading-dots{display:flex;gap:.25rem;padding:var(--spacing-sm) 0}.streaming-indicator .dot,.loading-dots .dot{width:8px;height:8px;background-color:var(--text-tertiary);border-radius:50%;animation:pulse 1.4s infinite ease-in-out}.streaming-indicator .dot:nth-child(2),.loading-dots .dot:nth-child(2){animation-delay:.2s}.streaming-indicator .dot:nth-child(3),.loading-dots .dot:nth-child(3){animation-delay:.4s}@keyframes pulse{0%,80%,to{opacity:.3;transform:scale(.8)}40%{opacity:1;transform:scale(1)}}.loading-message{display:flex;gap:var(--spacing-md)}.error-badge{display:inline-block;padding:.25rem .5rem;background-color:#fee2e2;color:#991b1b;border-radius:var(--radius-sm);font-size:.75rem;font-weight:500;margin-top:var(--spacing-sm)}.tool-recommendations{margin-top:var(--spacing-lg);padding:var(--spacing-lg);background-color:var(--bg-secondary);border-radius:var(--radius-lg)}.tool-recommendations h4{font-size:1rem;font-weight:600;margin-bottom:var(--spacing-md);color:var(--text-primary)}.tool-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(250px,1fr));gap:var(--spacing-md)}.tool-card{background-color:var(--bg-primary);border:1px solid var(--border-color);border-radius:var(--radius-md);padding:var(--spacing-md);transition:all .2s ease}.tool-card:hover{box-shadow:var(--shadow-md);transform:translateY(-2px)}.tool-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:var(--spacing-sm)}.tool-header h5{font-size:.9375rem;font-weight:600;color:var(--text-primary)}.free-badge{padding:.125rem .5rem;background-color:var(--success-color);color:#fff;border-radius:var(--radius-sm);font-size:.6875rem;font-weight:600;text-transform:uppercase}.tool-description{font-size:.875rem;color:var(--text-secondary);margin-bottom:var(--spacing-sm);line-height:1.5}.tool-tags{display:flex;flex-wrap:wrap;gap:var(--spacing-xs);margin-bottom:var(--spacing-md)}.tag{padding:.125rem .5rem;background-color:var(--bg-tertiary);color:var(--text-secondary);border-radius:var(--radius-sm);font-size:.75rem}.tool-link{display:inline-flex;align-items:center;gap:.25rem;color:var(--primary-color);font-size:.875rem;font-weight:500;text-decoration:none;transition:color .2s ease}.tool-link:hover{color:var(--primary-hover)}.research-sources{margin-top:var(--spacing-lg);padding:var(--spacing-lg);background-color:var(--bg-secondary);border-radius:var(--radius-lg)}.research-sources h4{font-size:1rem;font-weight:600;margin-bottom:var(--spacing-md);color:var(--text-primary)}.source-list{list-style:none;display:flex;flex-direction:column;gap:var(--spacing-md)}.source-item{padding:var(--spacing-md);background-color:var(--bg-primary);border:1px solid var(--border-color);border-radius:var(--radius-md)}.source-item a{color:var(--primary-color);font-weight:500;text-decoration:none;font-size:.9375rem}.source-item a:hover{text-decoration:underline}.source-excerpt{font-size:.875rem;color:var(--text-secondary);margin-top:var(--spacing-xs);line-height:1.5}.attachments{margin-top:var(--spacing-lg)}.attachments h4{font-size:1rem;font-weight:600;margin-bottom:var(--spacing-md);color:var(--text-primary)}.attachment-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:var(--spacing-md)}.attachment-card{display:flex;align-items:center;gap:var(--spacing-sm);padding:var(--spacing-md);background-color:var(--bg-secondary);border:1px solid var(--border-color);border-radius:var(--radius-md);text-decoration:none;color:var(--text-primary);transition:all .2s ease}.attachment-card:hover{background-color:var(--bg-tertiary);box-shadow:var(--shadow-sm)}.attachment-icon{font-size:1.5rem}.attachment-info{flex:1;min-width:0}.attachment-name{display:block;font-size:.875rem;font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.attachment-size{display:block;font-size:.75rem;color:var(--text-tertiary)}.chat-input{padding:var(--spacing-lg);border-top:1px solid var(--border-color);background-color:var(--bg-primary)}.message-input-container{max-width:800px;margin:0 auto}.message-input-wrapper{display:flex;align-items:flex-end;gap:var(--spacing-sm);padding:var(--spacing-sm);background-color:var(--bg-secondary);border:1px solid var(--border-color);border-radius:var(--radius-lg);transition:border-color .2s ease}.message-input-wrapper:focus-within{border-color:var(--primary-color)}.message-textarea{flex:1;min-height:24px;max-height:200px;padding:.5rem;background:transparent;border:none;resize:none;font-size:.9375rem;color:var(--text-primary);line-height:1.5;outline:none;font-family:inherit}.message-textarea::placeholder{color:var(--text-tertiary)}.send-button{padding:.5rem;background-color:var(--primary-color);color:#fff;border:none;border-radius:var(--radius-md);cursor:pointer;transition:all .2s ease;display:flex;align-items:center;justify-content:center}.send-button:hover:not(:disabled){background-color:var(--primary-hover)}.send-button:disabled{opacity:.5;cursor:not-allowed}.send-button svg{width:20px;height:20px}.input-hint{margin-top:var(--spacing-xs);text-align:center}.input-hint span{font-size:.75rem;color:var(--text-tertiary)}.sidebar-overlay{display:none}@media (max-width: 768px){.sidebar{position:fixed;left:-280px;top:0;bottom:0;width:240px;z-index:1000;box-shadow:var(--shadow-lg);transition:left .3s ease}.chat-layout .sidebar{left:-280px}.sidebar-open{left:0!important}.sidebar-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background-color:#00000080;z-index:999;animation:fadeIn .2s ease}.chat-main{width:100%}.chat-header{padding:var(--spacing-sm) var(--spacing-md);flex-wrap:wrap}.toggle-sidebar-button{order:-1}.mode-selector{width:100%;display:flex;justify-content:center;gap:var(--spacing-xs);order:1;margin-top:var(--spacing-sm)}.mode-button{flex:0 1 auto;padding:.5rem .75rem;min-width:auto;border-radius:20px}.mode-info{flex-direction:row;align-items:center;gap:.25rem}.mode-description{display:none}.mode-label{font-size:.75rem}.mode-icon{font-size:1rem}.chat-messages{padding:var(--spacing-md);display:flex;flex-direction:column;justify-content:center}.message-list{max-width:100%}.chat-input{padding:var(--spacing-md)}.tool-grid,.attachment-grid{grid-template-columns:1fr}.avatar{width:32px;height:32px}.message-body{font-size:.875rem}}@media (max-width: 480px){.sidebar{width:200px;left:-200px}.mode-button{padding:.375rem .5rem}.mode-label{display:none}.mode-icon{font-size:1.125rem}}.app-container{height:100vh;display:flex;flex-direction:column}.btn{display:inline-flex;align-items:center;justify-content:center;gap:var(--spacing-sm);padding:.75rem 1.5rem;font-size:.875rem;font-weight:500;line-height:1.25rem;border-radius:var(--radius-md);border:1px solid transparent;cursor:pointer;transition:all .2s ease;font-family:inherit;white-space:nowrap}.btn:disabled{opacity:.5;cursor:not-allowed}.btn-primary{background-color:var(--primary-color);color:#fff;border-color:var(--primary-color)}.btn-primary:hover:not(:disabled){background-color:var(--primary-hover);border-color:var(--primary-hover)}.btn-secondary{background-color:transparent;color:var(--text-primary);border-color:var(--border-color)}.btn-secondary:hover:not(:disabled){background-color:var(--bg-secondary)}.btn-google{background-color:#fff;color:var(--text-primary);border-color:var(--border-color);box-shadow:var(--shadow-sm)}.btn-google:hover:not(:disabled){background-color:var(--bg-secondary);box-shadow:var(--shadow-md)}.btn svg{width:20px;height:20px}.link-text{color:var(--text-secondary);text-decoration:none;font-size:.875rem;transition:color .2s ease}.link-text:hover{color:var(--text-primary)}.link-primary{color:var(--primary-color);text-decoration:none;font-weight:500;transition:color .2s ease}.link-primary:hover{color:var(--primary-hover);text-decoration:underline}input,textarea,select{font-family:inherit;font-size:inherit;line-height:inherit}@media (max-width: 768px){.btn{padding:.625rem 1.25rem;font-size:.8125rem}}:root{--primary-color: #10a37f;--primary-hover: #0d8c6d;--secondary-color: #0084ff;--danger-color: #ef4444;--warning-color: #f59e0b;--success-color: #10b981;--bg-primary: #ffffff;--bg-secondary: #f7f7f8;--bg-tertiary: #ececf1;--border-color: #d9d9e3;--text-primary: #353740;--text-secondary: #6e6e80;--text-tertiary: #acacbe;--shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, .05);--shadow-md: 0 4px 6px -1px rgba(0, 0, 0, .1);--shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, .1);--spacing-xs: .25rem;--spacing-sm: .5rem;--spacing-md: 1rem;--spacing-lg: 1.5rem;--spacing-xl: 2rem;--radius-sm: .375rem;--radius-md: .5rem;--radius-lg: .75rem;--radius-xl: 1rem;--font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;--font-mono: "SF Mono", Monaco, "Cascadia Code", "Roboto Mono", Consolas, "Courier New", monospace}@media (prefers-color-scheme: dark){:root{--bg-primary: #202123;--bg-secondary: #343541;--bg-tertiary: #444654;--border-color: #565869;--text-primary: #ececf1;--text-secondary: #c5c5d2;--text-tertiary: #8e8ea0}}*{margin:0;padding:0;box-sizing:border-box}html,body{height:100%;font-family:var(--font-sans);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}body{background-color:var(--bg-primary);color:var(--text-primary);line-height:1.6}#root{height:100%}::-webkit-scrollbar{width:8px;height:8px}::-webkit-scrollbar-track{background:var(--bg-secondary)}::-webkit-scrollbar-thumb{background:var(--border-color);border-radius:var(--radius-lg)}::-webkit-scrollbar-thumb:hover{background:var(--text-tertiary)}.loading-screen{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100vh;gap:var(--spacing-md)}.loading-spinner{width:40px;height:40px;border:3px solid var(--bg-tertiary);border-top-color:var(--primary-color);border-radius:50%;animation:spin 1s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}.text-center{text-align:center}.text-primary{color:var(--primary-color)}.text-danger{color:var(--danger-color)}.mt-sm{margin-top:var(--spacing-sm)}.mt-md{margin-top:var(--spacing-md)}.mt-lg{margin-top:var(--spacing-lg)}.mb-sm{margin-bottom:var(--spacing-sm)}.mb-md{margin-bottom:var(--spacing-md)}.mb-lg{margin-bottom:var(--spacing-lg)}
