*{margin:0;padding:0;box-sizing:border-box}body{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,sans-serif;background:linear-gradient(135deg,#667eea,#764ba2);min-height:100vh;padding:20px;color:#333}.container{max-width:1400px;margin:0 auto;background:#fff;border-radius:20px;box-shadow:0 20px 40px #0000001a;overflow:hidden}.header{background:linear-gradient(135deg,#4f46e5,#7c3aed);color:#fff;padding:30px;text-align:center}.header h1{font-size:2.5rem;font-weight:700;margin-bottom:10px}.header p{opacity:.9;font-size:1.1rem}.main-content{padding:40px}.view-toggle{display:flex;justify-content:space-between;align-items:center;margin-bottom:30px;padding-bottom:20px;border-bottom:2px solid #e2e8f0}.header-buttons{display:flex;gap:10px}.view-title{font-size:1.8rem;font-weight:600;color:#1e293b}.btn{padding:12px 24px;border:none;border-radius:8px;cursor:pointer;font-weight:600;font-size:14px;transition:all .3s ease;text-transform:uppercase;letter-spacing:.5px}.btn:disabled{opacity:.5;cursor:not-allowed}.btn-primary{background:linear-gradient(135deg,#4f46e5,#7c3aed);color:#fff;box-shadow:0 4px 15px #4f46e54d}.btn-primary:hover:not(:disabled){transform:translateY(-2px);box-shadow:0 8px 25px #4f46e566}.btn-secondary{background:#6b7280;color:#fff}.btn-secondary:hover:not(:disabled){background:#4b5563}.btn-danger{background:#ef4444;color:#fff}.btn-danger:hover:not(:disabled){background:#dc2626}.btn-small{padding:6px 12px;font-size:12px;text-transform:none;letter-spacing:normal}.table-view{display:block}.table-container{background:#f8fafc;border-radius:15px;padding:30px;border:1px solid #e2e8f0;overflow-x:auto}.bots-table{width:100%;border-collapse:collapse;background:#fff;border-radius:10px;overflow:hidden;box-shadow:0 4px 15px #0000000d}.bots-table th{background:linear-gradient(135deg,#4f46e5,#7c3aed);color:#fff;padding:15px;text-align:left;font-weight:600;font-size:.875rem;text-transform:uppercase;letter-spacing:.5px}.bots-table td{padding:15px;border-bottom:1px solid #e5e7eb;vertical-align:top}.bots-table tr:hover{background:#f9fafb;cursor:pointer}.bot-name{font-weight:600;color:#1e293b;margin-bottom:4px}.bot-id-container{display:flex;align-items:center;gap:8px}.bot-id{font-size:.75rem;color:#6b7280;font-family:Monaco,Courier New,monospace;flex:1}.copy-btn{background:none;border:none;cursor:pointer;padding:2px 4px;border-radius:3px;font-size:.75rem;color:#6b7280;transition:all .2s ease;display:flex;align-items:center;justify-content:center;min-width:20px;height:20px}.copy-btn:hover{background:#e5e7eb;color:#4f46e5;transform:scale(1.1)}.copy-btn:active{transform:scale(.95)}.model-badge{background:#4f46e5;color:#fff;padding:4px 8px;border-radius:4px;font-size:.75rem;font-weight:500}.temp-badge{background:#10b981;color:#fff;padding:4px 8px;border-radius:4px;font-size:.75rem;font-weight:500}.action-buttons{display:flex;gap:8px}.action-buttons .btn{padding:6px 12px;font-size:12px}.empty-state{text-align:center;padding:60px 20px;color:#6b7280}.empty-state h3{font-size:1.5rem;margin-bottom:10px;color:#374151}.form-view{display:none}.form-section{background:#f8fafc;border-radius:15px;padding:30px;border:1px solid #e2e8f0;max-width:900px;margin:0 auto}.form-section-header{margin-bottom:25px;padding-bottom:15px;border-bottom:2px solid #e2e8f0}.form-section-header h3{color:#1e293b;font-size:1.4rem;font-weight:600;margin-bottom:5px}.section-description{color:#6b7280;font-size:.9rem;margin:0}.form-group{margin-bottom:20px}.form-group label{display:block;margin-bottom:8px;font-weight:500;color:#374151}.form-group input,.form-group select,.form-group textarea{width:100%;padding:12px 16px;border:2px solid #e5e7eb;border-radius:8px;font-size:14px;transition:all .3s ease;font-family:inherit}.form-group input:focus,.form-group select:focus,.form-group textarea:focus{outline:none;border-color:#4f46e5;box-shadow:0 0 0 3px #4f46e51a}.form-group textarea{resize:vertical;min-height:100px}.form-row{display:grid;grid-template-columns:1fr 1fr;gap:15px}.customization-tabs{display:flex;gap:2px;margin-bottom:25px;background:#e5e7eb;border-radius:8px;padding:4px}.tab-button{flex:1;padding:12px 16px;border:none;background:transparent;cursor:pointer;border-radius:6px;font-weight:500;color:#6b7280;transition:all .3s ease}.tab-button.active{background:#fff;color:#4f46e5;box-shadow:0 2px 4px #0000001a}.tab-button:hover:not(.active){color:#374151}.tab-content{display:none}.tab-content.active{display:block}.color-input-group{display:flex;gap:10px;align-items:center}.color-input-group input[type=color]{width:50px;height:45px;border:none;border-radius:6px;cursor:pointer;padding:0}.color-input-group input[type=text]{flex:1;font-family:Monaco,Courier New,monospace;font-size:13px}.suggestion-item{display:grid;grid-template-columns:1fr 1fr 1fr auto;gap:10px;align-items:center;margin-bottom:10px;padding:15px;background:#fff;border:1px solid #e5e7eb;border-radius:8px}.suggestion-title,.suggestion-desc,.suggestion-prompt{font-size:13px;padding:8px 12px}.checkbox-group{display:flex;align-items:center;gap:8px}.checkbox-group input[type=checkbox]{width:auto;margin:0}.preview-section{background:#fff;padding:20px;border-radius:10px;border:1px solid #e5e7eb}.url-preview{align-items:center;gap:5px;padding:12px;background:#f3f4f6;border:1px solid #d1d5db;border-radius:6px;font-family:Monaco,Courier New,monospace;font-size:13px;word-break:break-all}.url-base{color:#6b7280}.url-id{color:#4f46e5;font-weight:600}.preview-demo{margin-top:20px;padding:20px;background:linear-gradient(135deg,#667eea,#764ba2);border-radius:12px;color:#fff;text-align:center;transition:all .3s ease}.preview-header{display:flex;align-items:center;justify-content:center;gap:10px;margin-bottom:15px;font-size:1.1rem;font-weight:600}.preview-content h3{font-size:1.3rem;margin-bottom:8px;font-weight:300}.preview-content p{opacity:.9;font-size:.9rem}.file-upload{position:relative;display:inline-block;width:100%}.file-upload input[type=file]{display:none}.file-upload-btn{display:block;width:100%;padding:12px 16px;background:#f3f4f6;border:2px dashed #d1d5db;border-radius:8px;text-align:center;cursor:pointer;transition:all .3s ease}.file-upload-btn:hover{background:#e5e7eb;border-color:#9ca3af}.file-list{margin-top:10px;font-size:.875rem;color:#6b7280}.file-item{background:#e5e7eb;padding:5px 10px;border-radius:4px;margin:5px 0;display:flex;justify-content:space-between;align-items:center}.file-item button{background:#ef4444;color:#fff;border:none;border-radius:3px;padding:2px 6px;cursor:pointer;font-size:.75rem}.existing-files-container{background:#fff;border:1px solid #e5e7eb;border-radius:8px;padding:15px;margin-top:8px}.existing-files-list{display:flex;flex-direction:column;gap:10px}.existing-file-item{display:flex;justify-content:space-between;align-items:center;padding:12px;background:#f9fafb;border:1px solid #e5e7eb;border-radius:6px;transition:all .3s ease}.existing-file-item:hover{background:#f3f4f6}.file-info{flex:1;display:flex;flex-direction:column;gap:4px}.file-name{font-weight:500;color:#374151;font-size:.875rem}.file-details{display:flex;gap:12px;font-size:.75rem;color:#6b7280}.file-size{background:#e5e7eb;padding:2px 6px;border-radius:3px}.file-status{padding:2px 6px;border-radius:3px;font-weight:500;text-transform:capitalize}.status-processed{background:#d1fae5;color:#065f46}.status-in_progress{background:#fef3c7;color:#92400e}.status-failed{background:#fee2e2;color:#991b1b}.file-date{color:#9ca3af}.no-files-message{text-align:center;padding:20px;color:#6b7280;font-style:italic}.access-view{display:none}.access-management-container{background:#f8fafc;border-radius:15px;padding:30px;border:1px solid #e2e8f0;max-width:900px;margin:0 auto}.add-user-form-section{margin-bottom:30px;padding-bottom:20px;border-bottom:1px solid #e5e7eb}.add-user-form-section h4,.user-list-section h4{color:#374151;font-size:1.2rem;margin-bottom:15px}.add-user-form{display:flex;gap:10px}.add-user-form input{flex:1;padding:12px 16px;border:2px solid #e5e7eb;border-radius:8px;font-size:14px}.add-user-form input:focus{outline:none;border-color:#4f46e5;box-shadow:0 0 0 3px #4f46e51a}.user-access-list{display:flex;flex-direction:column;gap:10px}.user-access-item{display:flex;justify-content:space-between;align-items:center;padding:12px 16px;background:#fff;border:1px solid #e5e7eb;border-radius:8px}.user-id{font-family:Monaco,Courier New,monospace;font-size:.9rem;color:#374151}.loading{display:none;text-align:center;padding:20px;color:#6b7280}.spinner{border:3px solid #f3f3f6;border-top:3px solid #4f46e5;border-radius:50%;width:30px;height:30px;animation:spin 1s linear infinite;margin:0 auto 10px}.spinner-small{border:2px solid #f3f3f6;border-top:2px solid #4f46e5;border-radius:50%;width:16px;height:16px;animation:spin 1s linear infinite}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.success-message,.error-message{padding:12px 16px;border-radius:8px;margin-bottom:20px;font-weight:500}.success-message{background:#d1fae5;color:#065f46;border:1px solid #a7f3d0}.error-message{background:#fee2e2;color:#991b1b;border:1px solid #fecaca}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.generated-insights{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:12px 0}.generated-insight-panel{min-width:0;padding:1rem 1.25rem;overflow:hidden;border:.5px solid #e1e0d9;border-radius:12px;background:#fff}.generated-insight-header{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:12px}.generated-insight-heading{min-width:0}.generated-insight-heading h3{color:#0b0b0b;font-size:13px;font-weight:500;line-height:1.35}.generated-insight-heading p{margin-top:4px;color:#898781;font-size:11px;line-height:1.4}.generated-insight-actions{display:flex;flex-shrink:0;gap:4px}.generated-insight-action{width:28px;height:28px;display:flex;align-items:center;justify-content:center;border:1px solid #e1e0d9;border-radius:6px;background:#f5f4f0;color:#52514e;cursor:pointer}.generated-insight-action:hover{border-color:#6b4fe0;background:#eeeafd;color:#5639c8}.generated-insight-action.danger:hover{border-color:#fecaca;background:#fff1f2;color:#b91c1c}.generated-insight-action:focus-visible{outline:3px solid rgba(42,120,214,.35);outline-offset:2px}.generated-insight-chart{position:relative;height:240px}.generated-insight-query{margin-top:12px;border-top:1px solid #e1e0d9;color:#52514e;font-size:11px}.generated-insight-query summary{padding-top:9px;cursor:pointer}.generated-insight-query pre{max-height:150px;margin:8px 0 0;padding:9px;overflow:auto;border-radius:6px;background:#f5f4f0;color:#3f3e3b;font-family:Monaco,Courier New,monospace;font-size:10px;line-height:1.5;white-space:pre-wrap;overflow-wrap:anywhere}.insights-chat-widget{position:fixed;right:clamp(20px,4vw,48px);bottom:24px;z-index:40}.insights-chat-toggle{width:52px;height:52px;display:flex;align-items:center;justify-content:center;border:0;border-radius:50%;background:#6b4fe0;color:#fff;cursor:pointer;box-shadow:0 8px 22px #4f46e559;transition:transform .2s ease,box-shadow .2s ease}.insights-chat-toggle:hover{transform:translateY(-2px);box-shadow:0 11px 26px #4f46e573}.insights-chat-toggle:focus-visible,.insights-chat-close:focus-visible,.insights-chat-send:focus-visible,.insights-chat-suggestion-list button:focus-visible{outline:3px solid rgba(42,120,214,.35);outline-offset:2px}.insights-chat-popup{position:absolute;right:0;bottom:66px;width:min(380px,calc(100vw - 32px));max-height:min(620px,calc(100vh - 40px));display:flex;flex-direction:column;overflow:hidden;background:#fff;border:1px solid #e0dfd8;border-radius:12px;box-shadow:0 14px 36px #0f172a2e}.insights-chat-popup[hidden]{display:none}.insights-chat-header{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:13px 15px;background:#6b4fe0;color:#fff}.insights-chat-heading{display:flex;align-items:center;gap:8px}.insights-chat-star{font-size:20px;line-height:1}.insights-chat-heading h3{font-size:14px;font-weight:600}.insights-chat-heading p{margin-top:2px;color:#ffffffb8;font-size:11px}.insights-chat-close{padding:0 2px;border:0;background:transparent;color:#fffc;cursor:pointer;font-size:24px;line-height:1}.insights-chat-messages{display:flex;flex-direction:column;gap:9px;min-height:150px;max-height:270px;overflow-y:auto;padding:13px;background:#fff}.insights-chat-message{display:flex;flex-direction:column;align-items:flex-start}.insights-chat-message.user{align-items:flex-end}.insights-chat-bubble{max-width:91%;padding:8px 10px;border:1px solid #e0dfd8;border-radius:10px 10px 10px 2px;background:#f0efec;color:#0b0b0b;font-size:12px;line-height:1.5;white-space:pre-wrap;overflow-wrap:anywhere}.insights-chat-message.user .insights-chat-bubble{border-color:#6b4fe0;border-radius:10px 10px 2px;background:#6b4fe0;color:#fff}.insights-chat-message.error .insights-chat-bubble{border-color:#fecaca;background:#fff1f2;color:#991b1b}.insights-chat-message.steering .insights-chat-bubble{border-style:dashed}.insights-chat-steering-status{margin-top:3px;color:#898781;font-size:10px}.insights-chat-processing{display:flex;align-items:center;gap:7px;padding:0 13px 9px;color:#52514e;font-size:11px}.insights-chat-processing[hidden]{display:none}.insights-chat-spinner{width:13px;height:13px;border:2px solid #e0dfd8;border-top-color:#6b4fe0;border-radius:50%;animation:spin .8s linear infinite}.insights-chat-suggestions{padding:0 11px 10px}.insights-chat-suggestions p{margin-bottom:6px;color:#898781;font-size:10px;letter-spacing:.04em;text-transform:uppercase}.insights-chat-suggestion-list{display:flex;flex-wrap:wrap;gap:5px}.insights-chat-suggestion-list button{padding:5px 9px;border:1px solid #c3c2b7;border-radius:16px;background:#f5f4f0;color:#52514e;cursor:pointer;font-size:11px}.insights-chat-create-suggestions{padding-top:1px}.insights-chat-create-suggestions .insights-chat-suggestion-list button{border-color:#a3c97a;background:#eaf3de;color:#3b6d11}.insights-chat-create-suggestions .insights-chat-suggestion-list button:hover{border-color:#6d9f33;background:#dfefc9;color:#2e560d}.insights-chat-form{display:flex;align-items:center;gap:7px;padding:9px 11px;border-top:1px solid #e0dfd8;background:#fff}.insights-chat-form input{min-width:0;flex:1;padding:8px 12px;border:1px solid #c3c2b7;border-radius:20px;outline:none;background:#f5f4f0;color:#0b0b0b;font:inherit;font-size:12px}.insights-chat-form input:focus{border-color:#6b4fe0;box-shadow:0 0 0 3px #6b4fe01f}.insights-chat-send{width:32px;height:32px;display:flex;align-items:center;justify-content:center;flex-shrink:0;border:0;border-radius:50%;background:#6b4fe0;color:#fff;cursor:pointer}.insights-chat-send:hover{background:#5639c8}.file-citation{background:#e0e7ff;color:#3730a3;padding:2px 6px;border-radius:4px;font-size:.75rem;margin:0 2px;display:inline-block}@media (max-width: 768px){.main-content{padding:20px}.form-row{grid-template-columns:1fr}.header h1{font-size:2rem}.view-toggle{flex-direction:column;gap:15px;text-align:center}.header-buttons{justify-content:center}.table-container{padding:15px}.bots-table{font-size:.875rem}.bots-table th,.bots-table td{padding:10px 8px}.existing-file-item{flex-direction:column;align-items:flex-start;gap:10px}.file-details{flex-wrap:wrap}.existing-file-item .btn{align-self:flex-end}.suggestion-item{grid-template-columns:1fr;gap:8px}.color-input-group{flex-direction:column;align-items:stretch}.color-input-group input[type=color]{width:100%}.customization-tabs{flex-direction:column}.form-section{padding:20px}.add-user-form{flex-direction:column}.insights-view>.view-toggle{margin-bottom:15px}#insights-dashboard>div,#insights-dashboard>div>div,#insights-dashboard>div>div>div{min-width:0}#insights-dashboard>div:first-of-type,#insights-dashboard>div:nth-of-type(2),#insights-dashboard>div:nth-of-type(3){grid-template-columns:1fr!important}#insights-dashboard>div:last-of-type{grid-template-columns:1fr!important}.generated-insights{grid-template-columns:1fr}#insights-dashboard canvas{max-width:100%}}.login-container{min-height:100vh;display:flex;justify-content:center;align-items:center;background:linear-gradient(135deg,#667eea,#764ba2);padding:20px}.login-card{background:#fff;border-radius:20px;box-shadow:0 20px 40px #0000001a;padding:40px;max-width:450px;width:100%;text-align:center}.login-header h1{font-size:2.5rem;font-weight:700;margin-bottom:10px;color:#1e293b}.login-header p{color:#6b7280;font-size:1.1rem;margin-bottom:30px}.login-content p{color:#374151;margin-bottom:30px;line-height:1.6}.login-buttons{display:flex;flex-direction:column;gap:15px}.login-btn{width:100%;padding:15px 25px;font-size:16px;border-radius:10px;font-weight:600;transition:all .3s ease}.login-btn:hover{transform:translateY(-2px);box-shadow:0 8px 25px #4f46e54d}.header{background:linear-gradient(135deg,#4f46e5,#7c3aed);color:#fff;padding:20px 30px;box-shadow:0 2px 10px #0000001a}.header-content{display:flex;justify-content:space-between;align-items:center;max-width:1400px;margin:0 auto}.header-title h1{font-size:2.2rem;font-weight:700;margin-bottom:5px}.header-title p{opacity:.9;font-size:1rem;margin:0}.user-menu{display:flex;align-items:center;gap:20px}.user-profile{display:flex;align-items:center;gap:12px;background:#ffffff1a;padding:8px 16px;border-radius:50px;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);border:1px solid rgba(255,255,255,.2)}.user-avatar{width:40px;height:40px;border-radius:50%;background:#fff3;display:flex;align-items:center;justify-content:center;font-weight:600;font-size:16px;color:#fff;border:2px solid rgba(255,255,255,.3)}.user-details{display:flex;flex-direction:column;text-align:left}.user-name{font-weight:600;font-size:.95rem;margin-bottom:2px;color:#fff}.user-email{font-size:.8rem;opacity:.85;color:#ffffffe6}.user-actions{display:flex;gap:10px}.btn-logout{background:#ffffff26;border:1px solid rgba(255,255,255,.25);color:#fff;padding:10px 18px;font-size:14px;font-weight:500;border-radius:8px;display:flex;align-items:center;gap:6px;transition:all .3s ease;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px)}.btn-logout:hover{background:#ffffff40;border-color:#fff6;transform:translateY(-1px);box-shadow:0 4px 12px #00000026}.btn-logout:active{transform:translateY(0)}.logout-icon{font-size:16px;transform:rotate(45deg)}.user-profile:before{content:"";position:absolute;top:8px;right:8px;width:8px;height:8px;background:#10b981;border-radius:50%;border:2px solid white;box-shadow:0 0 0 2px #10b9814d}.user-profile{position:relative}.app-container{min-height:100vh}@media (max-width: 768px){.login-card{margin:10px;padding:30px 20px}.login-header h1{font-size:2rem}.header-content{flex-direction:column;gap:15px;text-align:center}.user-menu{flex-direction:column;gap:10px}.user-info{text-align:center}}.user-profile-dropdown{position:absolute;padding-top:2%}.user-profile-trigger{display:flex;align-items:center;gap:12px;background:#ffffff1a;padding:8px 12px;border-radius:50px;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);border:1px solid rgba(255,255,255,.2);cursor:pointer;transition:all .3s ease;color:#fff}.user-profile-trigger:hover{background:#ffffff26;border-color:#ffffff4d}.dropdown-arrow{transition:transform .3s ease;opacity:.7}.user-profile-trigger.active .dropdown-arrow{transform:rotate(180deg)}.user-dropdown-menu{position:absolute;top:calc(100% + 8px);right:0;background:#fff;border-radius:12px;box-shadow:0 10px 40px #00000026;border:1px solid rgba(0,0,0,.1);min-width:280px;opacity:0;visibility:hidden;transform:translateY(-10px);transition:all .3s ease;z-index:1000}.user-dropdown-menu.active{opacity:1;visibility:visible;transform:translateY(0)}.dropdown-header{padding:16px;display:flex;align-items:center;gap:12px;background:linear-gradient(135deg,#f8fafc,#f1f5f9);border-radius:12px 12px 0 0}.user-avatar-large{width:48px;height:48px;border-radius:50%;background:linear-gradient(135deg,#4f46e5,#7c3aed);display:flex;align-items:center;justify-content:center;font-weight:600;font-size:18px;color:#fff}.user-info-large{flex:1}.user-name-large{font-weight:600;font-size:.95rem;color:#1e293b;margin-bottom:2px}.user-email-large{font-size:.8rem;color:#64748b}.dropdown-divider{height:1px;background:linear-gradient(90deg,transparent 0%,#e2e8f0 50%,transparent 100%);margin:0 12px}.dropdown-items{padding:8px 0}.dropdown-item{display:flex;align-items:center;gap:12px;width:100%;padding:12px 16px;border:none;background:none;cursor:pointer;transition:all .2s ease;font-size:.9rem;color:#374151;text-align:left}.dropdown-item:hover{background:#f8fafc;color:#1e293b}.dropdown-item.logout-item{color:#dc2626}.dropdown-item.logout-item:hover{background:#fef2f2;color:#b91c1c}.dropdown-icon{font-size:16px;width:20px;text-align:center}.dropdown-overlay{position:fixed;top:0;left:0;right:0;bottom:0;z-index:999;background:transparent}@media (max-width: 768px){.user-dropdown-menu{right:-20px;left:-20px;min-width:auto;width:calc(100vw - 40px);max-width:320px}.dropdown-header{padding:12px}.user-avatar-large{width:40px;height:40px;font-size:16px}}
