@import url('https://fonts.googleapis.com/css2?family=Lora:ital,wght@0,400..700;1,400..700&family=Plus+Jakarta+Sans:ital,wght@0,200..800;1,200..800&display=swap'); :root { /* Premium Rich Dark Palette - Midnight Amethyst Theme */ --bg-deep: #05020c; --bg-surface: #0c081f; --bg-surface-elevated: #17113b; --sidebar-bg: #080515; /* Jewel Primary & Accents - Royalty Amethyst and Empire Amber/Gold */ --primary: #a855f7; --primary-glow: rgba(168, 85, 247, 0.45); --accent: #f59e0b; --accent-glow: rgba(245, 158, 11, 0.35); /* Text */ --text-primary: #f8fafc; --text-secondary: #cbd5e1; --text-muted: #71717a; /* Premium Glassmorphism */ --glass-bg: rgba(12, 8, 31, 0.75); --glass-border: rgba(168, 85, 247, 0.16); --glass-blur: blur(16px); /* Utility */ --border-radius: 14px; --transition-fast: 0.25s cubic-bezier(0.4, 0, 0.2, 1); --transition-slow: 0.45s cubic-bezier(0.4, 0, 0.2, 1); --shadow-sm: 0 4px 8px -1px rgba(0, 0, 0, 0.2); --shadow-lg: 0 12px 24px -3px rgba(0, 0, 0, 0.4); } * { box-sizing: border-box; -webkit-font-smoothing: antialiased; } body { margin: 0; padding: 0; background-color: var(--bg-deep); color: var(--text-primary); font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif; overflow: hidden; height: 100vh; height: 100dvh; } h1, h2, h3, .brand-font { font-family: 'Lora', serif; } /* Layout */ .App { display: flex; height: 100vh; height: 100dvh; width: 100vw; background: radial-gradient(circle at 50% -20%, rgba(168, 85, 247, 0.15) 0%, rgba(245, 158, 11, 0.04) 40%, var(--bg-deep) 80%); } .App.blurred { filter: blur(8px); pointer-events: none; } /* Sidebar Styling */ .sidebar { width: 280px; background: var(--sidebar-bg); border-right: 1px solid var(--glass-border); display: flex; flex-direction: column; transition: transform var(--transition-slow), width var(--transition-slow); z-index: 100; position: relative; overflow: hidden; flex-shrink: 0; } .sidebar.collapsed { width: 0; border-right: none; } .sidebar-content { display: flex; flex-direction: column; height: 100%; width: 280px; /* Fixed width for content to prevent squishing */ padding: 1.5rem 1rem; } .sidebar-header { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 2rem; padding: 0 0.5rem; } .sidebar-header h2 { font-size: 1.25rem; font-weight: 600; margin: 0; background: linear-gradient(135deg, var(--accent) 0%, #d946ef 50%, var(--primary) 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; } .new-chat-btn { width: 100%; padding: 0.875rem; background: var(--primary); color: white; border: none; border-radius: var(--border-radius); font-weight: 600; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 0.5rem; transition: all var(--transition-fast); box-shadow: 0 4px 12px var(--primary-glow); margin-bottom: 1.5rem; } .new-chat-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 16px var(--primary-glow); background: #4f46e5; } .document-list-container { flex: 1; overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--glass-border) transparent; } .document-list-container::-webkit-scrollbar { width: 6px; } .document-list-container::-webkit-scrollbar-thumb { background-color: var(--glass-border); border-radius: 10px; } .list-section { margin-bottom: 2rem; } .list-section h3 { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); margin-bottom: 0.75rem; padding-left: 0.5rem; } .session-item, .doc-item { display: flex; align-items: center; gap: 0.75rem; padding: 0.75rem; border-radius: 10px; cursor: pointer; transition: all var(--transition-fast); color: var(--text-secondary); margin-bottom: 0.25rem; position: relative; border: 1px solid transparent; } .session-item:hover, .doc-item:hover { background: rgba(255, 255, 255, 0.03); color: var(--text-primary); border-color: var(--glass-border); } .session-item.active { background: rgba(99, 102, 241, 0.1); color: var(--primary); border-color: rgba(99, 102, 241, 0.2); } .session-title, .doc-name { flex: 1; font-size: 0.875rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .doc-info { display: flex; flex-direction: column; flex: 1; min-width: 0; } .doc-date { font-size: 0.7rem; color: var(--text-muted); } .delete-btn { opacity: 0; transition: opacity var(--transition-fast); padding: 4px; color: var(--text-muted); background: none; border: none; cursor: pointer; } .session-item:hover .delete-btn, .doc-item:hover .delete-btn { opacity: 1; } .delete-btn:hover { color: #ef4444; } .sidebar-footer { margin-top: auto; padding-top: 0.75rem; border-top: 1px solid var(--glass-border); } .user-profile { display: flex; flex-direction: column; padding: 0.75rem; border-radius: var(--border-radius); background: transparent; transition: all var(--transition-fast); border: 1px solid transparent; } .user-profile:hover { background: rgba(255, 255, 255, 0.03); border-color: var(--glass-border); } .user-profile.expanded { background: var(--bg-surface-elevated); border-color: var(--primary-glow); box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25); } .user-profile-header { display: flex; align-items: center; width: 100%; gap: 0.75rem; } .user-avatar { width: 36px; height: 36px; background: linear-gradient(135deg, var(--primary), var(--accent)); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: white; font-weight: 600; font-size: 0.9rem; box-shadow: 0 0 10px rgba(168, 85, 247, 0.3); } .user-info-basic { flex: 1; min-width: 0; } .username-display { font-size: 0.9rem; font-weight: 600; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .user-profile-details { margin-top: 0.75rem; padding-top: 0.75rem; border-top: 1px solid rgba(255, 255, 255, 0.05); display: flex; flex-direction: column; gap: 0.5rem; animation: fadeInFast 0.2s ease-out; } @keyframes fadeInFast { from { opacity: 0; transform: translateY(-5px); } to { opacity: 1; transform: translateY(0); } } .user-detail-item { display: flex; flex-direction: column; gap: 2px; } .detail-label { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); } .detail-value { font-size: 0.8rem; color: var(--text-secondary); word-break: break-all; } .logout-action-btn { display: flex; align-items: center; justify-content: center; gap: 0.5rem; font-size: 0.85rem; font-weight: 600; border-radius: 8px; background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important; box-shadow: 0 4px 10px rgba(239, 68, 68, 0.2) !important; } .logout-action-btn:hover { background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%) !important; box-shadow: 0 6px 15px rgba(239, 68, 68, 0.35) !important; transform: translateY(-1px); } /* Main Chat Area */ .chat-main { flex: 1; display: flex; flex-direction: column; position: relative; background: transparent; min-width: 0; } .chat-header { height: calc(4rem + env(safe-area-inset-top, 0px)); padding-top: env(safe-area-inset-top, 0px); padding-left: 2rem; padding-right: 2rem; display: flex; align-items: center; justify-content: space-between; background: rgba(10, 12, 16, 0.4); backdrop-filter: var(--glass-blur); border-bottom: 1px solid var(--glass-border); z-index: 50; } .header-left { display: flex; align-items: center; gap: 1rem; } .sidebar-toggle { background: none; border: none; color: var(--text-secondary); cursor: pointer; padding: 8px; display: flex; align-items: center; justify-content: center; border-radius: 8px; transition: all var(--transition-fast); } .sidebar-toggle:hover { background: var(--bg-surface-elevated); color: var(--text-primary); } .chat-header h1 { font-size: 1.125rem; font-weight: 600; margin: 0; color: var(--text-primary); } .chat-messages { flex: 1; overflow-y: auto; padding: 2rem; display: flex; flex-direction: column; gap: 1.5rem; scrollbar-width: thin; } .chat-messages::-webkit-scrollbar { width: 6px; } .chat-messages::-webkit-scrollbar-thumb { background: var(--glass-border); border-radius: 10px; } /* Message Bubbles */ .message-bubble { max-width: 80%; display: flex; flex-direction: column; padding: 1.25rem; border-radius: 1.25rem; font-size: 0.95rem; line-height: 1.6; position: relative; animation: messageIn 0.3s ease-out forwards; } @keyframes messageIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } } .message-bubble.user { align-self: flex-end; background: var(--primary); color: white; border-bottom-right-radius: 4px; box-shadow: 0 4px 15px var(--primary-glow); } .message-bubble.assistant { align-self: flex-start; background: var(--bg-surface-elevated); color: var(--text-primary); border-bottom-left-radius: 4px; border: 1px solid var(--glass-border); display: flex !important; flex-direction: row !important; align-items: flex-start; gap: 1rem; font-size: 0.88rem; /* Smaller font size for assistant responses */ } .message-bubble.error { align-self: flex-start; background: linear-gradient(135deg, rgba(239, 68, 68, 0.08) 0%, rgba(239, 68, 68, 0.03) 100%); color: #fca5a5; border-bottom-left-radius: 4px; border: 1px solid rgba(239, 68, 68, 0.22); padding: 1rem 1.25rem; max-width: 85%; box-shadow: 0 4px 15px rgba(239, 68, 68, 0.08); } .error-body { display: flex; flex-direction: column; gap: 0.5rem; width: 100%; } .error-header { display: flex; align-items: center; gap: 0.5rem; font-weight: 600; color: #f87171; font-size: 0.9rem; } .error-header-icon { flex-shrink: 0; color: #f87171; } .error-details { font-size: 0.85rem; color: #fca5a5; padding-left: 0.25rem; } .error-details ul { margin: 0; padding-left: 1.25rem; } .error-details li { margin-bottom: 0.25rem; line-height: 1.4; word-break: break-all; } .error-details li:last-child { margin-bottom: 0; } .message-content { flex: 1; min-width: 0; } /* Premium Markdown Formatting in Chat */ .message-content p { margin: 0 0 0.8rem 0; line-height: 1.62; } .message-content p:last-child { margin-bottom: 0; } .message-content h1, .message-content h2, .message-content h3, .message-content h4 { color: var(--text-primary); font-weight: 700; margin: 1.25rem 0 0.6rem 0; line-height: 1.3; font-family: 'Plus Jakarta Sans', sans-serif; } .message-content h1 { font-size: 1.15rem; } .message-content h2 { font-size: 1.05rem; } .message-content h3 { font-size: 0.95rem; } .message-content ul, .message-content ol { margin: 0 0 0.8rem 0; padding-left: 1.25rem; } .message-content li { margin-bottom: 0.4rem; line-height: 1.6; } .message-content li:last-child { margin-bottom: 0; } .message-content strong { color: var(--accent); /* Elegant Empire Gold accent color for key legal citations and bold terms */ font-weight: 600; } .message-content blockquote { margin: 0.8rem 0; padding: 0.5rem 1rem; border-left: 3px solid var(--primary); background: rgba(168, 85, 247, 0.05); border-radius: 6px; font-style: italic; color: var(--text-secondary); } .message-content pre { background: rgba(0, 0, 0, 0.35); border: 1px solid var(--glass-border); padding: 0.75rem 1rem; border-radius: 10px; overflow-x: auto; margin: 0.8rem 0; } .message-content code { font-family: 'Fira Code', Consolas, Monaco, monospace; font-size: 0.8rem; background: rgba(255, 255, 255, 0.06); padding: 2px 6px; border-radius: 4px; color: #f8fafc; } .message-content pre code { background: none; padding: 0; border-radius: 0; color: inherit; } .message-content table { width: 100%; border-collapse: collapse; margin: 0.8rem 0; font-size: 0.8rem; } .message-content th, .message-content td { padding: 0.6rem 0.8rem; border: 1px solid rgba(255, 255, 255, 0.08); text-align: left; } .message-content th { background: rgba(255, 255, 255, 0.04); font-weight: 600; color: var(--text-primary); } .message-content tr:nth-child(even) { background: rgba(255, 255, 255, 0.01); } .speak-btn { background: rgba(255, 255, 255, 0.03); border: 1px solid var(--glass-border); color: var(--text-muted); width: 32px; height: 32px; border-radius: 8px; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: all var(--transition-fast); flex-shrink: 0; margin-top: 2px; } .speak-btn:hover { background: rgba(255, 255, 255, 0.08); color: var(--text-primary); border-color: var(--glass-border); } .speak-btn.speaking { background: rgba(99, 102, 241, 0.1); color: var(--primary); border-color: var(--primary); animation: pulse 1.5s infinite; } @keyframes pulse { 0% { opacity: 1; } 50% { opacity: 0.6; } 100% { opacity: 1; } } /* Welcome / Empty state */ .welcome-screen { max-width: 580px; margin: auto; text-align: center; padding: 2.5rem 2rem; background: rgba(12, 8, 31, 0.4); border: 1px solid rgba(168, 85, 247, 0.12); border-radius: 24px; backdrop-filter: blur(20px); box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4); animation: cardFadeIn 0.6s cubic-bezier(0.4, 0, 0.2, 1); display: flex; flex-direction: column; align-items: center; gap: 1.25rem; } .welcome-screen h2 { font-size: 2rem; font-weight: 700; margin: 0; background: linear-gradient(135deg, #ffffff 0%, #cbd5e1 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; font-family: 'Lora', serif; } .welcome-subtitle { font-size: 0.9rem; color: var(--text-secondary); max-width: 480px; margin: 0; line-height: 1.5; } /* System Pills Row */ .system-pills-row { display: flex; justify-content: center; flex-wrap: wrap; gap: 0.75rem; width: 100%; margin: 0.25rem 0; } .system-pill { display: flex; align-items: center; gap: 0.5rem; padding: 0.5rem 1rem; background: rgba(168, 85, 247, 0.04); border: 1px solid rgba(168, 85, 247, 0.15); border-radius: 99px; color: var(--text-secondary); font-size: 0.8rem; font-weight: 500; cursor: default; transition: all var(--transition-fast); user-select: none; } .system-pill:hover { border-color: rgba(168, 85, 247, 0.3); background: rgba(168, 85, 247, 0.06); color: var(--text-primary); } .pill-icon { color: var(--primary); flex-shrink: 0; } /* Start Chat Button */ .start-chat-btn { display: inline-flex; align-items: center; justify-content: center; padding: 0.75rem 2rem; font-size: 0.95rem; font-weight: 600; color: white; background: linear-gradient(135deg, var(--primary) 0%, #7c3aed 100%); border: none; border-radius: 12px; cursor: pointer; transition: all var(--transition-fast); box-shadow: 0 4px 15px rgba(168, 85, 247, 0.25); margin-top: 0.25rem; } .start-chat-btn:hover { background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%); box-shadow: 0 6px 20px rgba(168, 85, 247, 0.4); transform: translateY(-1px); } @media (max-width: 768px) { .system-pills-row { flex-direction: column; align-items: center; gap: 0.5rem; } } /* Chat Input Bar */ .chat-input-area { padding: 1.5rem 2rem 2rem; background: linear-gradient(to bottom, transparent, var(--bg-deep)); } .chat-input-wrapper { max-width: 800px; margin: 0 auto; background: var(--bg-surface); border: 1px solid var(--glass-border); border-radius: 1.25rem; padding: 0.5rem; display: flex; align-items: center; gap: 0.5rem; box-shadow: var(--shadow-lg); transition: border-color var(--transition-fast); } .chat-input-wrapper:focus-within { border-color: var(--primary); } .chat-input-wrapper input { flex: 1; min-width: 0; /* Prevent browser min-width from causing flex container overflow */ background: none; border: none; padding: 0.75rem; color: var(--text-primary); font-size: 1rem; outline: none; } .icon-btn { background: none; border: none; color: var(--text-muted); padding: 0.6rem; cursor: pointer; border-radius: 10px; transition: all var(--transition-fast); display: flex; align-items: center; justify-content: center; } .icon-btn:hover:not(:disabled) { background: var(--bg-surface-elevated); color: var(--text-primary); } .send-btn { background: var(--primary); color: white; width: 56px; height: 40px; border-radius: 12px; display: flex; align-items: center; justify-content: center; border: none; cursor: pointer; transition: all var(--transition-fast); box-shadow: 0 4px 10px var(--primary-glow); flex-shrink: 0; } .send-btn:hover:not(:disabled) { transform: scale(1.05); background: #4f46e5; } .send-btn:disabled { opacity: 0.5; cursor: not-allowed; box-shadow: none; } /* Loading Effects */ .loading-overlay { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.8); backdrop-filter: blur(8px); z-index: 1000; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.5rem; } .loader-ring { width: 60px; height: 60px; border: 3px solid rgba(255, 255, 255, 0.05); border-top: 3px solid var(--primary); border-radius: 50%; animation: spin 1s linear infinite; box-shadow: 0 0 15px var(--primary-glow); } @keyframes spin { to { transform: rotate(360deg); } } .loading-dots:after { content: ' .'; animation: dots 1.5s infinite; } @keyframes dots { 0%, 20% { content: ' .'; } 40% { content: ' ..'; } 60% { content: ' ...'; } 80%, 100% { content: ''; } } /* Unique Split-Screen Auth Page */ .auth-screen { display: flex; width: 100vw; height: 100vh; background: #04020a; overflow: hidden; } .auth-graphic-side { flex: 1.2; background: radial-gradient(circle at 30% 20%, rgba(168, 85, 247, 0.22) 0%, rgba(245, 158, 11, 0.06) 40%, #04020a 100%); display: flex; flex-direction: column; justify-content: center; padding: 5rem; position: relative; border-right: 1px solid rgba(168, 85, 247, 0.1); overflow: hidden; } .auth-graphic-side::before { content: ''; position: absolute; top: -20%; left: -20%; width: 60%; height: 60%; background: radial-gradient(circle, rgba(168, 85, 247, 0.15) 0%, transparent 60%); filter: blur(80px); animation: floatOrb 8s infinite alternate ease-in-out; } @keyframes floatOrb { 0% { transform: translate(0, 0) scale(1); } 100% { transform: translate(30px, 20px) scale(1.1); } } .graphic-brand { display: flex; align-items: center; gap: 1rem; margin-bottom: 3.5rem; z-index: 10; } .graphic-brand-logo { width: 48px; height: 48px; background: linear-gradient(135deg, var(--primary), var(--accent)); border-radius: 12px; display: flex; align-items: center; justify-content: center; box-shadow: 0 0 20px rgba(168, 85, 247, 0.35); flex-shrink: 0; } .graphic-brand-name { font-family: 'Outfit', sans-serif; font-size: 1.5rem; font-weight: 700; background: linear-gradient(135deg, var(--accent) 0%, #d946ef 50%, var(--primary) 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; letter-spacing: -0.02em; } .graphic-content { z-index: 10; max-width: 550px; animation: fadeIn 0.8s ease-out; } .graphic-content h2 { font-size: 2.75rem; font-weight: 800; line-height: 1.25; margin-bottom: 1.5rem; background: linear-gradient(to right, #ffffff, #d8b4fe); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; font-family: 'Outfit', sans-serif; } .graphic-content p { font-size: 1.05rem; color: var(--text-secondary); line-height: 1.7; margin-bottom: 3rem; } .feature-highlights { display: flex; flex-direction: column; gap: 1.5rem; } .feature-item { display: flex; align-items: center; gap: 1rem; } .feature-icon-wrapper { width: 38px; height: 38px; border-radius: 10px; background: rgba(168, 85, 247, 0.08); border: 1px solid rgba(168, 85, 247, 0.15); display: flex; align-items: center; justify-content: center; color: var(--primary); flex-shrink: 0; } .feature-text { font-size: 0.95rem; color: var(--text-secondary); font-weight: 500; } .auth-form-side { flex: 1; background: #04020a; display: flex; align-items: center; justify-content: center; padding: 3rem; position: relative; } .auth-form-side::after { content: ''; position: absolute; bottom: -20%; right: -20%; width: 50%; height: 50%; background: radial-gradient(circle, rgba(245, 158, 11, 0.06) 0%, transparent 60%); filter: blur(80px); } .auth-card { width: 100%; max-width: 490px; padding: 3rem; background: rgba(12, 8, 31, 0.5); backdrop-filter: blur(20px); border: 1px solid rgba(168, 85, 247, 0.12); border-radius: 24px; box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5); animation: cardFadeIn 0.6s cubic-bezier(0.4, 0, 0.2, 1); z-index: 10; } @keyframes cardFadeIn { from { opacity: 0; transform: translateY(20px) scale(0.98); } to { opacity: 1; transform: translateY(0) scale(1); } } .auth-card h1 { font-size: 2rem; font-weight: 700; margin-bottom: 0.5rem; text-align: center; background: linear-gradient(135deg, #ffffff 0%, #cbd5e1 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; } .auth-subtitle { text-align: center; color: var(--text-secondary); margin-bottom: 2rem; font-size: 0.9rem; line-height: 1.5; } .form-group { margin-bottom: 1.25rem; } .form-group label { display: block; font-size: 0.8rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 0.5rem; color: var(--text-muted); } .form-group input { width: 100%; padding: 0.875rem 1rem; background: rgba(5, 2, 12, 0.6); border: 1px solid rgba(168, 85, 247, 0.15); border-radius: 12px; color: white; outline: none; transition: all var(--transition-fast); } .form-group input:focus { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(168, 85, 247, 0.15); } .auth-btn { width: 100%; padding: 1rem; background: linear-gradient(135deg, var(--primary) 0%, #7c3aed 100%); color: white; border: none; border-radius: 12px; font-size: 1rem; font-weight: 600; cursor: pointer; transition: all var(--transition-fast); margin-top: 1rem; box-shadow: 0 4px 15px rgba(168, 85, 247, 0.3); } .auth-btn:hover:not(:disabled) { background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%); box-shadow: 0 6px 20px rgba(168, 85, 247, 0.45); transform: translateY(-1px); } .auth-btn:disabled { opacity: 0.6; cursor: not-allowed; } .toggle-auth { text-align: center; margin-top: 1.5rem; font-size: 0.875rem; color: var(--text-secondary); } .toggle-auth span { color: var(--primary); cursor: pointer; font-weight: 600; transition: color var(--transition-fast); } .toggle-auth span:hover { color: #c084fc; text-decoration: underline; } /* Responsiveness */ @media (max-width: 1024px) { .auth-graphic-side { display: none; } .auth-form-side { flex: 1; padding: 2rem; } } /* Voice Button recording animation */ .voice-btn.recording { background: rgba(239, 68, 68, 0.1); color: #ef4444; } .voice-stop-icon { width: 12px; height: 12px; background: currentColor; border-radius: 2px; } /* Premium Selector Panel (Inspired by ڈیزائن) */ .selector-panel { background: var(--bg-surface); border: 1px solid var(--glass-border); border-radius: 1.5rem; max-width: 800px; margin: 0 auto 1.5rem; padding: 1.5rem; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3); animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1); } @keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } } .selector-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; padding: 0 0.5rem; } .selector-header h3 { font-size: 1.25rem; font-weight: 600; margin: 0; color: var(--text-primary); } .selector-pagination { font-size: 0.875rem; color: var(--text-muted); font-family: 'Plus Jakarta Sans', sans-serif; letter-spacing: 0.05em; } .selector-list { display: flex; flex-direction: column; max-height: 220px; overflow-y: auto; } .selector-item { display: flex; align-items: center; gap: 1.25rem; padding: 1.25rem 1.5rem; cursor: pointer; transition: all var(--transition-fast); border-bottom: 1px solid rgba(255, 255, 255, 0.05); position: relative; } .selector-item:last-child { border-bottom: none; } .selector-item:hover { background: rgba(255, 255, 255, 0.03); } .selector-item.active { background: rgba(99, 102, 241, 0.08); } .item-number { width: 32px; height: 32px; background: #1a1d24; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 0.875rem; font-weight: 600; color: var(--text-secondary); flex-shrink: 0; } .selector-item.active .item-number { background: var(--primary); color: white; box-shadow: 0 0 10px var(--primary-glow); } .item-info { flex: 1; min-width: 0; } .item-name { font-size: 1rem; font-weight: 500; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: color var(--transition-fast); } .selector-item:hover .item-name, .selector-item.active .item-name { color: var(--text-primary); } .item-arrow { color: var(--text-muted); opacity: 0.3; transition: all var(--transition-fast); } .selector-item:hover .item-arrow, .selector-item.active .item-arrow { opacity: 1; color: var(--primary); transform: translateX(4px); } .selector-footer { padding: 1.5rem 0.5rem 0.5rem; border-top: 1px solid rgba(255, 255, 255, 0.05); display: flex; justify-content: center; } .selector-confirm-btn { width: 100%; padding: 1rem; background: var(--primary); color: white; border: none; border-radius: 12px; font-size: 1rem; font-weight: 600; cursor: pointer; transition: all var(--transition-fast); box-shadow: 0 4px 15px var(--primary-glow); display: flex; align-items: center; justify-content: center; gap: 0.75rem; } .selector-confirm-btn:hover { background: #4f46e5; transform: translateY(-2px); box-shadow: 0 8px 25px var(--primary-glow); } .selector-confirm-btn:active { transform: translateY(0); } .library-nav-btn { width: 100%; padding: 0.875rem; background: transparent; color: var(--text-secondary); border: 1px solid var(--glass-border); border-radius: var(--border-radius); font-weight: 500; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 0.5rem; transition: all var(--transition-fast); margin-bottom: 1.5rem; } .library-nav-btn:hover { background: rgba(255, 255, 255, 0.05); color: var(--text-primary); border-color: var(--primary-glow); } .library-nav-btn.active { background: var(--bg-surface-elevated); border-color: var(--primary); color: var(--primary); box-shadow: 0 0 15px var(--primary-glow); } .library-main-container { flex: 1; display: flex; flex-direction: column; background: transparent; min-width: 0; } .library-container { padding: 2rem; flex: 1; overflow-y: auto; } .library-header-actions { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2rem; gap: 1.5rem; } .search-bar { flex: 1; max-width: 500px; background: var(--bg-surface); border: 1px solid var(--glass-border); padding: 0.75rem 1rem; border-radius: 12px; display: flex; align-items: center; gap: 0.75rem; color: var(--text-muted); } .search-bar input { background: none; border: none; color: var(--text-primary); font-size: 0.95rem; flex: 1; outline: none; } .stat-chip { padding: 0.5rem 1rem; background: rgba(16, 185, 129, 0.1); color: var(--accent); border: 1px solid var(--accent-glow); border-radius: 30px; font-size: 0.85rem; font-weight: 600; display: flex; align-items: center; gap: 8px; } .library-table-wrapper { background: var(--bg-surface); border: 1px solid var(--glass-border); border-radius: 1.25rem; overflow: hidden; overflow-x: auto; box-shadow: var(--shadow-lg); } .library-table { width: 100%; border-collapse: collapse; text-align: left; } .library-table th { padding: 1.25rem; background: rgba(255, 255, 255, 0.02); color: var(--text-muted); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; font-weight: 600; border-bottom: 1px solid var(--glass-border); } .library-table td { padding: 1.25rem; border-bottom: 1px solid rgba(255, 255, 255, 0.03); font-size: 0.9rem; vertical-align: middle; } .library-table th:first-child, .library-table td:first-child { max-width: 320px; } .doc-primary-cell { display: flex; align-items: center; gap: 0.75rem; min-width: 0; } .doc-icon-small { width: 32px; height: 32px; background: rgba(99, 102, 241, 0.1); color: var(--primary); border-radius: 8px; display: flex; align-items: center; justify-content: center; } .doc-name { font-weight: 500; color: var(--text-primary); } .library-table .doc-name { white-space: normal; word-break: break-all; overflow-wrap: break-word; } .metadata-cell { display: flex; align-items: center; gap: 8px; color: var(--text-secondary); } .chat-link-btn { background: rgba(255, 255, 255, 0.03); border: 1px solid var(--glass-border); color: var(--text-secondary); padding: 6px 12px; border-radius: 8px; cursor: pointer; display: flex; align-items: center; gap: 8px; transition: all var(--transition-fast); font-size: 0.85rem; max-width: 200px; } .chat-link-btn:hover { background: rgba(99, 102, 241, 0.1); color: var(--primary); border-color: var(--primary); } .chat-link-btn span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .delete-row-btn { background: rgba(239, 68, 68, 0.05); border: 1px solid transparent; color: var(--text-muted); width: 36px; height: 36px; border-radius: 8px; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: all var(--transition-fast); } .delete-row-btn:hover { background: rgba(239, 68, 68, 0.15); color: #ef4444; border-color: rgba(239, 68, 68, 0.2); } .library-loader { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 5rem; gap: 1.5rem; color: var(--text-secondary); } .empty-library { text-align: center; padding: 8rem 2rem; color: var(--text-secondary); } .empty-library h3 { color: var(--text-primary); margin-bottom: 0.5rem; } .message-citation { margin-top: 1rem; padding-top: 0.75rem; border-top: 1px solid var(--glass-border); font-size: 0.8rem; color: var(--text-secondary); font-family: 'Plus Jakarta Sans', sans-serif; font-style: italic; line-height: 1.4; white-space: pre-wrap; word-break: break-all; overflow-wrap: break-word; } .message-content hr { border: 0; height: 1px; background: var(--glass-border); margin: 1rem 0; } .message-content .highlight-active { background: rgba(147, 51, 234, 0.1); border-radius: 4px; } .message-content .highlight-word { background: rgba(147, 51, 234, 0.4); color: #fff; border-radius: 2px; box-shadow: 0 0 10px rgba(147, 51, 234, 0.5); padding: 0 2px; } mark.highlight-word { background: rgba(147, 51, 234, 0.4) !important; color: #fff !important; border-radius: 2px; box-shadow: 0 0 10px rgba(147, 51, 234, 0.5); padding: 0 2px; text-decoration: none; } mark.highlight-sentence { background: rgba(147, 51, 234, 0.2) !important; color: inherit !important; border-radius: 4px; box-shadow: 0 0 8px rgba(147, 51, 234, 0.3); padding: 0 4px; text-decoration: none; transition: background 0.3s ease; } /* ========================================= Mobile & Tablet Responsiveness ========================================= */ @media (max-width: 768px) { /* Make sidebar a drawer on mobile */ .sidebar { position: fixed; top: 0; left: 0; height: 100vh; z-index: 1000; transform: translateX(0); box-shadow: 10px 0 30px rgba(0, 0, 0, 0.5); } .sidebar.collapsed { transform: translateX(-100%); width: 280px; /* Keep width so content doesn't squish during animation */ } /* Make sure the main app area takes full width when sidebar is overlaying */ .App { position: relative; } .chat-header, .library-main-container header { padding: 0 1rem; } .chat-messages { padding: 1rem; } .chat-input-area { padding: 1rem; } .chat-input-wrapper { padding: 0.25rem; } .message-bubble { max-width: 90%; } .welcome-screen { margin: 1rem; padding: 1.5rem 1rem; } .library-container { padding: 1rem; } .library-header-actions { flex-direction: column; align-items: stretch; gap: 1rem; } .search-bar { max-width: 100%; } /* Table responsiveness (Stacked cards layout) */ .library-table-wrapper { background: transparent; border: none; box-shadow: none; overflow: visible; } .library-table, .library-table thead, .library-table tbody, .library-table th, .library-table td, .library-table tr { display: block; width: 100%; } .library-table thead { display: none; /* Hide header on mobile */ } .library-table tr { background: var(--bg-surface); border: 1px solid var(--glass-border); border-radius: 1.25rem; padding: 1.25rem; margin-bottom: 1.25rem; box-shadow: var(--shadow-sm); } .library-table td { display: flex; justify-content: space-between; align-items: center; padding: 0.65rem 0; border-bottom: 1px solid rgba(255, 255, 255, 0.04); font-size: 0.85rem; white-space: normal; } .library-table td:last-child { border-bottom: none; padding-bottom: 0; margin-top: 0.25rem; } /* Document cell acts as header of the card */ .library-table td[data-label="Document"] { display: block; border-bottom: 1px solid var(--glass-border); padding-bottom: 0.75rem; margin-bottom: 0.25rem; } .library-table td[data-label="Document"]::before { display: none; } .doc-primary-cell { width: 100%; } .doc-name { white-space: normal; word-break: break-all; font-size: 0.95rem; } /* Add labels on the left of each cell */ .library-table td::before { content: attr(data-label); font-size: 0.75rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; } .sidebar-close-btn { display: flex !important; } .sidebar-backdrop { display: block; position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background: rgba(0, 0, 0, 0.4); backdrop-filter: blur(4px); z-index: 999; animation: fadeIn 0.3s ease; } .auth-screen { overflow-y: auto; height: auto; min-height: 100vh; } } /* Sidebar close button hidden on desktop */ .sidebar-close-btn { background: rgba(255, 255, 255, 0.04); border: 1px solid var(--glass-border); color: var(--text-secondary); cursor: pointer; display: none; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 8px; margin-left: auto; transition: all var(--transition-fast); } .sidebar-close-btn:hover { background: rgba(255, 255, 255, 0.1); color: var(--text-primary); border-color: rgba(168, 85, 247, 0.4); transform: scale(1.05); } /* Sidebar backdrop hidden on desktop */ .sidebar-backdrop { display: none; } @keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } } /* Extra small mobile screens */ @media (max-width: 480px) { .auth-form-side { padding: 1.5rem 1rem; } .auth-card { padding: 1.75rem 1.25rem; border-radius: 16px; } .auth-card h1 { font-size: 1.6rem; } .welcome-screen h2 { font-size: 1.6rem; } .welcome-subtitle { font-size: 0.85rem; } .system-pill { padding: 0.4rem 0.8rem; font-size: 0.75rem; } } /* Background Embedding Status & Mini-Spinner */ .embedding-status { display: flex; align-items: center; gap: 0.75rem; padding: 0.75rem 1rem; background: var(--bg-surface-elevated); border: 1px solid rgba(168, 85, 247, 0.2); border-radius: 12px; margin-bottom: 0.75rem; color: var(--text-secondary); font-size: 0.9rem; animation: pulse-border 2s infinite ease-in-out; } .mini-spinner { width: 16px; height: 16px; border: 2px solid rgba(168, 85, 247, 0.15); border-top: 2px solid var(--primary); border-radius: 50%; animation: spin 0.8s linear infinite; } @keyframes pulse-border { 0%, 100% { border-color: rgba(168, 85, 247, 0.2); } 50% { border-color: rgba(168, 85, 247, 0.55); } }