:root{--base-font-size: 12px;--app-scale: 1}*{margin:0;padding:0;box-sizing:border-box}body{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif;background:#f8fafc;color:#1e293b;line-height:1.6;height:100vh;overflow:hidden;margin:0;padding:0;font-size:var(--base-font-size)}.loading-indicator{position:fixed;top:0;left:0;width:100%;height:100%;background:#f8fafc;display:flex;flex-direction:column;align-items:center;justify-content:center;z-index:10000;transition:opacity .3s ease,visibility .3s ease}.loading-indicator.hidden{opacity:0;visibility:hidden;pointer-events:none}.loading-spinner{width:48px;height:48px;border:4px solid #e2e8f0;border-top-color:#3b82f6;border-radius:50%;animation:spin 1s linear infinite;margin-bottom:16px}.loading-text{font-size:14px;color:#64748b;font-weight:500;animation:pulse 1.5s ease-in-out infinite}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}@keyframes pulse{0%,to{opacity:1}50%{opacity:.5}}.app{height:100vh;display:flex;flex-direction:column;transition:transform .2s ease}.header{background:#fff;border-bottom:1px solid #e2e8f0;padding:12px 16px;flex-shrink:0}.header-main{display:flex;justify-content:space-between;align-items:center;gap:12px}.user-info{display:flex;align-items:center;gap:8px;min-width:0;flex-shrink:0}.user-info button{display:inline-block;visibility:visible;opacity:1;white-space:nowrap}h1{font-size:16px;font-weight:600;color:#0f172a;margin:0;display:flex;align-items:center;gap:8px}.tagline{font-size:11px;color:#64748b;margin:0;white-space:nowrap}.tabs{display:flex;background:#fff;border-bottom:1px solid #e2e8f0;padding:0 16px;flex-shrink:0}.tab-button{flex:1;padding:10px 12px;border:none;background:none;font-size:11px;color:#64748b;cursor:pointer;display:flex;align-items:center;gap:6px;justify-content:center;border-bottom:2px solid transparent;transition:all .2s ease}.tab-button:hover:not(.active){color:#3b82f6;background:#3b82f60d}.tab-button.active:hover{background:transparent!important}.tab-button.active{color:#3b82f6;border-bottom-color:#3b82f6;border-bottom-width:2px;border-bottom-style:solid;font-weight:500;background:transparent!important}.content{flex:1;display:flex;flex-direction:column;overflow:hidden;padding:0;min-height:0}.tab-content{display:none;flex:1;overflow:hidden;flex-direction:column}.tab-content.active{display:flex}#chatTab.active{display:flex;flex-direction:column;flex:1;min-height:0}#chatTab .agent-controls{order:-1;flex-shrink:0}#traitsTab,#pipelinesTab,#marketplaceTab{overflow-y:auto;min-height:0}.chat-messages{flex:1;overflow-y:auto;padding:16px;background:#f8fafc;min-height:0;display:flex;flex-direction:column;gap:12px}.message{max-width:85%;padding:8px 12px;border-radius:8px;line-height:1.4;word-wrap:break-word;animation:fadeIn .3s ease;font-size:11px;align-self:flex-start;margin:0}@keyframes fadeIn{0%{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}.message.user{align-self:flex-end;background:#3b82f6;color:#fff;border:none;border-bottom-right-radius:4px;box-shadow:0 1px 2px #3b82f633}.message.ai{align-self:flex-start;background:#fff;color:#1e293b;border:1px solid #e2e8f0;border-bottom-left-radius:4px;box-shadow:0 1px 2px #0000000d}.message.error{align-self:flex-start;background:#fef2f2;color:#991b1b;border:1px solid #fecaca;border-bottom-left-radius:4px;box-shadow:0 1px 2px #ef44441a}.message.system{align-self:flex-start;background:#f8fafc;color:#1e293b;border:1px solid #e2e8f0;border-bottom-left-radius:4px;box-shadow:0 1px 2px #0000000d;padding:8px 10px;margin-bottom:6px;max-width:85%}.message.system .message-content{font-size:10px;line-height:1.4;margin:0;padding:0}.message.system .message-content div{margin-bottom:2px;line-height:1.3}.message.system .message-content div:last-child{margin-bottom:0}.quick-query-btn{padding:4px 8px;border:1px solid #e2e8f0;border-radius:4px;background:#fff;color:#475569;font-size:9px;cursor:pointer;transition:all .2s ease;font-family:inherit;font-weight:500;white-space:nowrap}.quick-query-btn:hover{background:#3b82f6;color:#fff;border-color:#3b82f6;transform:translateY(-1px);box-shadow:0 1px 3px #3b82f64d}.quick-query-btn:active{transform:translateY(0);box-shadow:0 1px 2px #3b82f633}.message.success{align-self:flex-start;background:#f0fdf4;color:#166534;border:1px solid #bbf7d0;border-bottom-left-radius:4px;box-shadow:0 1px 2px #22c55e1a}.message.loading{align-self:flex-start;background:#f7fafc;color:#64748b;border:1px dashed #cbd5e0;border-bottom-left-radius:4px}.message-content{white-space:pre-wrap;line-height:1.4;margin:0;padding:0}.message.system .message-content,.message.ai .message-content{padding:0}.message.assistant{align-self:flex-start;background:#fff;color:#1e293b;border:1px solid #e2e8f0;border-bottom-left-radius:4px;box-shadow:0 1px 2px #0000000d}.timestamp{font-size:9px;color:#94a3b8;margin-top:4px;text-align:right}.chat-input-container{display:flex;flex-direction:column;gap:8px;padding:12px 16px;border-top:1px solid #e2e8f0;background:#fff;flex-shrink:0}.input-row{display:flex;gap:8px}.quick-queries-section{display:flex;flex-direction:column;gap:6px;padding-bottom:8px;border-bottom:1px solid #f1f5f9}.quick-queries-label{font-size:9px;color:#64748b;font-weight:500}.quick-queries-buttons{display:flex;flex-wrap:wrap;gap:4px}#messageInput{flex:1;padding:8px 12px;border:1px solid #e2e8f0;border-radius:6px;font-size:14px;font-family:inherit;resize:none;overflow-y:hidden;min-height:40px;max-height:200px;line-height:1.5;transition:height .1s ease}#messageInput:focus{outline:none;border-color:#3b82f6;box-shadow:0 0 0 2px #3b82f61a}.input-row{display:flex;gap:8px;align-items:flex-end}button:not(.tab-button):not(.quick-query-btn):not(.btn-primary):not(.btn-secondary):not(.btn-execute){padding:8px 16px;background:#3b82f6;color:#fff;border:none;border-radius:6px;cursor:pointer;font-size:11px;font-weight:500;transition:all .2s ease}button:not(.tab-button):not(.quick-query-btn):not(.btn-primary):not(.btn-secondary):not(.btn-execute):hover:not(:disabled){background:#2563eb;transform:translateY(-1px)}button:not(.tab-button):not(.quick-query-btn):not(.btn-primary):not(.btn-secondary):not(.btn-execute):disabled{background:#cbd5e0;cursor:not-allowed;transform:none}.btn-primary{background:#3b82f6;color:#fff;border:none;padding:8px 12px;border-radius:6px;font-size:11px;cursor:pointer;font-weight:500;transition:all .2s ease}.btn-primary:hover:not(:disabled){background:#2563eb;transform:translateY(-1px)}.btn-secondary{background:#f1f5f9;color:#475569;border:1px solid #e2e8f0;padding:6px 10px;border-radius:6px;font-size:11px;cursor:pointer;transition:all .2s ease;min-width:36px;display:flex;align-items:center;justify-content:center}.btn-secondary:hover{background:#e2e8f0;border-color:#cbd5e0}#parsePageButton{padding:6px 8px;font-size:14px;line-height:1}.btn-execute{background:#10b981;color:#fff;border:none;padding:6px 10px;border-radius:4px;font-size:10px;cursor:pointer;transition:all .2s ease}.btn-execute:hover:not(:disabled){background:#059669;transform:translateY(-1px)}.btn-execute:disabled{background:#94a3b8;cursor:not-allowed;transform:none}.trait-btn{padding:4px 8px;border:none;border-radius:4px;font-size:10px;cursor:pointer;transition:all .2s ease}.trait-btn-edit{background:#3b82f6;color:#fff}.trait-btn-edit:hover{background:#2563eb}.trait-btn-delete{background:#ef4444;color:#fff}.trait-btn-delete:hover{background:#dc2626}.trait-btn-history{background:#8b5cf6;color:#fff}.trait-btn-history:hover{background:#7c3aed}.section-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:16px;padding:16px;flex-shrink:0}.section-header h2{margin:0;font-size:14px;font-weight:600;color:#0f172a}.traits-container{padding:16px;flex:1;overflow-y:auto;min-height:0}.traits-header{display:flex;justify-content:space-between;margin-bottom:16px}.search-input{width:100%;padding:8px 12px;border:1px solid #e2e8f0;border-radius:6px;font-size:11px;background:#fff;font-family:inherit}.search-input:focus{outline:none;border-color:#3b82f6;box-shadow:0 0 0 2px #3b82f61a}.traits-actions{display:flex;gap:8px}.traits-count{font-size:11px;color:#64748b;margin-bottom:16px}.traits-grid{display:grid;gap:12px}.trait-card{background:#fff;border:1px solid #e2e8f0;border-radius:8px;padding:12px;transition:all .2s ease}.trait-card:hover{border-color:#3b82f6;box-shadow:0 2px 8px #3b82f61a}.trait-header{display:flex;justify-content:space-between;align-items:flex-start;margin-bottom:8px}.trait-name{margin:0 0 2px;font-size:13px;font-weight:600;color:#0f172a}.trait-version{font-size:10px;color:#64748b;background:#f1f5f9;padding:1px 4px;border-radius:3px;display:inline-block;margin-left:4px}.compute-indicator{padding:4px 6px;border-radius:4px;font-size:10px;color:#fff;font-weight:600;min-width:24px;text-align:center}.trait-description{margin:0 0 8px;font-size:11px;color:#475569;line-height:1.4}.trait-meta{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:8px;font-size:10px}.trait-category{background:#f1f5f9;color:#475569;padding:2px 6px;border-radius:4px;text-transform:uppercase;font-weight:500}.ai-badge{background:linear-gradient(135deg,#667eea,#764ba2);color:#fff;padding:2px 6px;border-radius:4px;font-size:9px;font-weight:600;text-transform:lowercase}.trait-type-badge{padding:2px 6px;border-radius:4px;font-size:10px;font-weight:500;background:#dbeafe;color:#1e40af}.trait-tag{background:#f1f5f9;color:#64748b;padding:2px 6px;border-radius:3px;font-size:9px;font-weight:400}.trait-actions-enhanced{display:flex;gap:4px;margin-top:8px}.traits-list,.pipelines-list,.packs-list{flex:1;overflow-y:auto;padding:16px;display:flex;flex-direction:column;gap:12px;min-height:0}.trait-item,.pipeline-item,.pack-item{padding:12px;background:#fff;border:1px solid #e2e8f0;border-radius:8px;transition:all .2s ease}.trait-item{display:flex;flex-direction:column}.trait-item>div:first-child{cursor:pointer}.trait-item:hover,.pipeline-item:hover,.pack-item:hover{border-color:#3b82f6;box-shadow:0 2px 8px #3b82f61a}.modal-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background:#00000080;display:flex;align-items:center;justify-content:center;z-index:1000;padding:20px}.modal-content{background:#fff;border-radius:8px;max-width:700px;width:100%;max-height:90vh;display:flex;flex-direction:column;box-shadow:0 10px 25px #0003;overflow:hidden}.modal-header{display:flex;justify-content:space-between;align-items:center;padding:16px 20px;border-bottom:1px solid #e2e8f0}.modal-header h3{margin:0;font-size:16px;font-weight:600;color:#0f172a}.modal-close{background:none;border:none;font-size:24px;cursor:pointer;color:#64748b;padding:0;width:24px;height:24px;display:flex;align-items:center;justify-content:center;border-radius:4px;transition:all .2s ease}.modal-close:hover{background:#f1f5f9;color:#1e293b}.modal-body{flex:1;overflow-y:auto;padding:20px}.version-manager{width:100%}.version-list{display:flex;flex-direction:column;gap:8px}.version-item{display:flex;justify-content:space-between;align-items:center;padding:12px;border:1px solid #f3f4f6;border-radius:6px;transition:all .2s ease}.version-item:hover{border-color:#e2e8f0;background:#f8fafc}.version-footer{padding:8px 16px;text-align:center;font-size:9px;color:#94a3b8;background:#f8fafc;border-top:1px solid #e2e8f0;flex-shrink:0;font-family:Monaco,Menlo,Courier New,monospace;-webkit-user-select:none;user-select:none;cursor:default}.version-footer:hover{color:#64748b;background:#f1f5f9}.workspace-selector{margin-top:8px;padding-top:8px;border-top:1px solid #e2e8f0}.workspace-selector select{width:100%;padding:6px 8px;border:1px solid #e2e8f0;border-radius:4px;font-size:12px;background:#fff;color:#1e293b;cursor:pointer}.workspace-selector select:hover{border-color:#3b82f6}.workspace-selector select:focus{outline:none;border-color:#3b82f6;box-shadow:0 0 0 3px #3b82f61a}.workspace-selector button{margin-top:6px;padding:6px 12px;font-size:11px;width:100%;border:1px solid #e2e8f0;border-radius:4px;background:#fff;color:#64748b;cursor:pointer;transition:all .2s ease}.workspace-selector button:hover{background:#f1f5f9;border-color:#3b82f6;color:#3b82f6}.domain-filter-btn{padding:4px 8px;border:1px solid #e2e8f0;border-radius:4px;background:#fff!important;cursor:pointer;font-size:11px;color:#64748b!important;transition:all .2s ease}.domain-filter-btn:hover:not(.active){background:#f8fafc!important;border-color:#cbd5e1;color:#475569!important}.domain-filter-btn.active{background:#3b82f6!important;border-color:#3b82f6!important;color:#fff!important}.pipeline-card:hover{box-shadow:0 2px 8px #0000001a}.agent-controls{background:#f8f9fa!important;border-bottom:1px solid #e2e8f0!important;flex-shrink:0!important;display:none!important;width:100%!important;visibility:hidden!important;opacity:0!important;position:relative!important;z-index:10!important;min-height:60px!important;padding:8px!important;margin:0!important}#chatTab .agent-controls{order:-1!important;flex-shrink:0!important}.agent-controls select{font-size:11px;padding:4px 8px;border:1px solid #e2e8f0;border-radius:4px;background:#fff;color:#1e293b;cursor:pointer;transition:border-color .2s ease}.agent-controls select:hover{border-color:#3b82f6}.agent-controls select:focus{outline:none;border-color:#3b82f6;box-shadow:0 0 0 2px #3b82f61a}.agent-controls label{display:block;font-size:10px;color:#64748b;margin-bottom:2px;font-weight:500}.section-header{display:flex;justify-content:space-between;align-items:center;padding:12px 16px;border-bottom:1px solid #e2e8f0;background:#fff}.section-header h2{font-size:14px;font-weight:600;color:#0f172a}#systemHealthStatus{margin-top:8px}#systemHealthStatus>div{margin-bottom:8px;padding:8px;border-radius:4px;font-size:11px;line-height:1.5}#systemHealthStatus strong{display:block;margin-bottom:4px;font-weight:600}
