Spaces:
3SCError404
/
Paused

nexus / frontend /apps /internal /src /components /KnowledgeBase.module.css
dushyantsingh0
feat: refine knowledge library UI - inline nav and left-aligned filters
74639ef
Raw History Blame Contribute Delete
21.3 kB
.container { padding: 40px; background-color: var(--bg-dark); min-height: calc(100vh - 120px); display: flex; flex-direction: column; gap: 40px; } /* 1. Mission Banner */ .missionBanner { background: radial-gradient(circle at top right, #7c3aed, #4f46e5), var(--hero-mesh); background-size: 200% 200%; animation: meshGradient 20s ease infinite; border-radius: var(--radius-lg); padding: 80px 40px; color: white; box-shadow: 0 30px 60px rgba(0, 0, 0, 0.15); position: relative; overflow: hidden; display: flex; flex-direction: column; align-items: center; text-align: center; } @keyframes meshGradient { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } } .bannerContent { position: relative; z-index: 1; max-width: 900px; width: 100%; display: flex; flex-direction: column; align-items: center; } .headerBadge { display: inline-block; font-size: 10px; font-weight: 900; background: rgba(255, 255, 255, 0.2); padding: 4px 10px; border-radius: 4px; margin-bottom: 24px; letter-spacing: 0.1em; } .headerMainRow { display: flex; align-items: center; justify-content: center; gap: 32px; margin-bottom: 16px; width: 100%; } .missionBanner h1 { font-size: 44px; font-weight: 950; letter-spacing: -0.04em; margin: 0; text-transform: uppercase; background: linear-gradient(to bottom, #ffffff 30%, rgba(255,255,255,0.85)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; text-shadow: 0 4px 12px rgba(0,0,0,0.1); } .description { font-size: 19px; color: rgba(255, 255, 255, 0.9); margin-bottom: 48px; font-weight: 500; max-width: 600px; } /* Search Controls */ .searchControls { display: flex; gap: 16px; align-items: center; width: 100%; max-width: 720px; } .searchWrapper { position: relative; flex: 1; } .searchIcon { position: absolute; left: 20px; top: 50%; transform: translateY(-50%); color: rgba(255, 255, 255, 0.5); } .searchWrapper input { width: 100%; background: rgba(255, 255, 255, 0.08); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); border: 1px solid rgba(255, 255, 255, 0.15); border-radius: 20px; padding: 22px 24px 22px 64px; color: white; font-size: 17px; outline: none; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); box-shadow: 0 10px 30px rgba(0,0,0,0.1); } .searchWrapper input::placeholder { color: rgba(255, 255, 255, 0.6); } .searchWrapper input:focus { background: rgba(255, 255, 255, 0.12); border-color: rgba(255, 255, 255, 0.5); box-shadow: 0 15px 40px rgba(0,0,0,0.25); transform: translateY(-2px); } .searchPulse { position: absolute; right: 20px; top: 50%; transform: translateY(-50%); display: flex; align-items: center; gap: 8px; font-size: 10px; font-weight: 800; color: #6EE7B7; } .newIntelBtn { background: white; color: var(--primary); border: none; padding: 18px 28px; border-radius: 16px; font-weight: 800; cursor: pointer; display: flex; align-items: center; gap: 10px; text-transform: uppercase; font-size: 12px; } /* AI Suggestions */ .suggestions { display: flex; align-items: center; gap: 12px; margin-top: 24px; flex-wrap: wrap; } .sLabel { font-size: 10px; font-weight: 900; color: rgba(255, 255, 255, 0.6); letter-spacing: 0.1em; white-space: nowrap; } .sChip { background: rgba(255, 255, 255, 0.1); border: 1px solid rgba(255, 255, 255, 0.2); color: white; padding: 6px 14px; border-radius: 20px; font-size: 11px; font-weight: 700; cursor: pointer; transition: all 0.2s; white-space: nowrap; } .sChip:hover { background: rgba(255, 255, 255, 0.25); border-color: rgba(255, 255, 255, 0.5); transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.1); } /* Category Nav */ .categoryNav { display: flex; gap: 8px; background: rgba(255, 255, 255, 0.8); backdrop-filter: blur(12px); padding: 6px; border-radius: 16px; border: 1px solid var(--border-subtle); width: fit-content; margin: -30px 0 0 0; /* Aligned to left */ z-index: 10; box-shadow: 0 10px 30px rgba(0,0,0,0.05); } .navItem { padding: 10px 24px; border-radius: 10px; border: none; background: none; color: var(--text2); /* Slate-600 for better contrast on white */ font-size: 13px; font-weight: 700; cursor: pointer; transition: all 0.2s; } .navItem.active { background: var(--primary); color: white; } /* Articles Grid */ .contentArea { flex: 1; display: flex; flex-direction: column; } .articlesGrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 24px; } .articleCard { background: rgba(255, 255, 255, 0.8); backdrop-filter: blur(8px); border: 1px solid var(--border-subtle); border-radius: var(--radius-lg); padding: 24px; cursor: pointer; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); display: flex; flex-direction: column; gap: 16px; } .articleCard:hover { transform: translateY(-8px); box-shadow: 0 25px 50px rgba(0, 0, 0, 0.08); border-color: var(--primary); background: linear-gradient(to bottom right, #ffffff, #f8fafc); } .cardHeader { display: flex; justify-content: space-between; align-items: center; } .typeBadge { display: flex; align-items: center; gap: 6px; font-size: 9px; font-weight: 900; color: var(--primary); background: var(--bg-hover); padding: 4px 10px; border-radius: 6px; } .statusDot { width: 8px; height: 8px; border-radius: 50%; } .statusDot.live { background: #34D399; } .statusDot.draft { background: #94A3B8; } .cardBody h3 { font-size: 20px; font-weight: 800; color: var(--text-main); margin: 12px 0 10px; } .catBadge { font-size: 10px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; } .snippet { font-size: 14px; color: var(--text-muted); line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; } .cardFooter { display: flex; justify-content: space-between; padding-top: 20px; border-top: 1px solid var(--bg-hover); } .telemetry span { font-size: 10px; font-weight: 800; color: var(--text-muted); display: block; } /* Pagination */ .pagination { display: flex; justify-content: center; align-items: center; gap: 24px; margin-top: 40px; padding: 20px; } .pageBtn { background: white; border: 1px solid var(--border-subtle); width: 48px; height: 48px; border-radius: 12px; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: all 0.2s; } .pageBtn:hover:not(:disabled) { background: var(--bg-hover); color: var(--primary); transform: translateY(-2px); } .pageBtn:disabled { opacity: 0.3; cursor: not-allowed; } .pageInfo { display: flex; align-items: center; gap: 8px; font-size: 11px; font-weight: 900; color: var(--text-muted); letter-spacing: 0.1em; } .pageNum { color: var(--text-main); font-size: 14px; min-width: 1.2em; text-align: center; } /* Dossier Side Drawer */ .drawerBackdrop { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.4); backdrop-filter: blur(4px); z-index: 1000; } .dossierDrawer { position: fixed; top: 0; right: 0; width: 50%; height: 100%; background: white; z-index: 1001; box-shadow: -20px 0 50px rgba(0,0,0,0.1); display: flex; flex-direction: column; } /* Compact Dossier Header */ .dossierHeader { padding: 24px 32px; border-bottom: 1px solid var(--border-subtle); background: #F8FAFC; flex-shrink: 0; } .metaTop { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; } .headerRight { display: flex; align-items: center; gap: 16px; } .metaLabel { font-size: 9px; font-weight: 900; color: var(--primary); letter-spacing: 0.2em; opacity: 0.6; } .closeDrawer { background: none; border: none; cursor: pointer; color: var(--text-muted); transition: 0.2s; padding: 4px; } .closeDrawer:hover { color: var(--text-main); transform: rotate(90deg); } .titleViewRow, .titleEditRow { display: flex; justify-content: space-between; align-items: center; gap: 20px; } .dossierHeader h2 { font-size: 24px; font-weight: 800; color: var(--text-main); letter-spacing: -0.01em; margin: 0; flex: 1; } .statusBadge { display: flex; align-items: center; gap: 6px; font-size: 10px; font-weight: 800; padding: 4px 10px; border-radius: 20px; white-space: nowrap; } .badgeLive { background: #ECFDF5; color: #059669; } .badgeDraft { background: #F1F5F9; color: #64748B; } .deployInsightBtn { background: #6366F1; color: white; border: none; padding: 6px 14px; border-radius: 8px; font-weight: 800; font-size: 11px; cursor: pointer; display: flex; align-items: center; gap: 8px; transition: all 0.2s; } .deployInsightBtn:hover { background: #4F46E5; transform: translateY(-2px); } .editTitleInput { background: white; border: 1px solid var(--border-subtle); font-size: 18px; font-weight: 700; flex: 1; color: var(--text-main); outline: none; padding: 8px 16px; border-radius: 10px; } .deployBtn { background: var(--primary); color: white; border: none; padding: 10px 20px; border-radius: 10px; font-weight: 800; font-size: 12px; cursor: pointer; display: flex; align-items: center; gap: 8px; transition: all 0.2s; min-width: 100px; justify-content: center; } .btnSuccess { background: #10B981 !important; } .btnError { background: #EF4444 !important; } .modeToggle { background: #E2E8F0; padding: 2px; border-radius: 8px; display: flex; } .modeBtn { padding: 4px 10px; border-radius: 6px; border: none; background: none; font-size: 10px; font-weight: 800; color: var(--text-muted); cursor: pointer; display: flex; align-items: center; gap: 4px; } .modeBtn.activeMode { background: white; color: var(--text-main); box-shadow: 0 1px 3px rgba(0,0,0,0.1); } /* Compact Editor Toolbar */ .compactToolbar { padding: 12px 32px; display: flex; gap: 24px; background: white; border-bottom: 1px solid var(--border-subtle); align-items: center; flex-shrink: 0; } .toolbarGroup { display: flex; align-items: center; gap: 8px; } .toolbarGroup label { font-size: 9px; font-weight: 900; color: var(--text-muted); margin: 0; } .toolbarGroup select { padding: 4px 8px; border-radius: 6px; border: 1px solid var(--border-subtle); font-size: 11px; font-weight: 600; } .miniToggles { display: flex; gap: 4px; background: #F1F5F9; padding: 2px; border-radius: 6px; } .miniToggle { padding: 4px 8px; border-radius: 4px; border: none; background: none; font-size: 9px; font-weight: 800; cursor: pointer; display: flex; align-items: center; gap: 4px; color: var(--text-muted); } .miniToggle.activeToggle { background: white; color: var(--primary); box-shadow: 0 1px 2px rgba(0,0,0,0.05); } .miniRetract { margin-left: auto; background: none; border: none; color: #EF4444; font-size: 10px; font-weight: 800; cursor: pointer; display: flex; align-items: center; gap: 6px; opacity: 0.7; } .miniRetract:hover { opacity: 1; } /* Fixed Layout Containers */ .dossierBody { flex: 1; display: flex; flex-direction: column; overflow: hidden; position: relative; } .viewInterface, .editInterface { flex: 1; display: flex; flex-direction: column; overflow: hidden; } .viewScrollArea, .editScrollArea { flex: 1; overflow-y: auto; padding: 32px; background: white; } .telemetryBar { display: flex; gap: 32px; background: #F8FAFC; padding: 12px 32px; border-bottom: 1px solid var(--border-subtle); flex-shrink: 0; } .telItem label { display: block; font-size: 8px; font-weight: 900; color: var(--text-muted); margin-bottom: 2px; } .telItem span { font-size: 11px; font-weight: 700; color: var(--text-main); } .markdownContent { line-height: 1.8; color: var(--text-main); } .markdownContent h1, .markdownContent h2 { margin-bottom: 16px; border-bottom: 1px solid var(--border-subtle); padding-bottom: 8px; font-weight: 800; } .editArea { width: 100%; height: 100%; border: none; resize: none; font-family: 'JetBrains Mono', 'Fira Code', monospace; font-size: 14px; line-height: 1.6; outline: none; background: #FAFAFA; } /* Empty/Loading */ .emptyState { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; background: rgba(255, 255, 255, 0.5); border-radius: 20px; border: 1px dashed var(--border-hi); padding: 40px; text-align: center; min-height: 300px; } .loadingPulse { width: 40px; height: 40px; background: var(--primary); border-radius: 50%; animation: pulseS 2s infinite; } @keyframes pulseS { 0% { transform: scale(0.9); opacity: 0.6; } 50% { transform: scale(1.1); opacity: 0.2; } 100% { transform: scale(0.9); opacity: 0.6; } } .mermaidContainer { margin: 32px 0; background: #F8FAFC; padding: 32px; border-radius: 20px; border: 1px solid var(--border-subtle); box-shadow: 0 10px 30px rgba(0,0,0,0.02); display: flex; justify-content: center; position: relative; overflow: hidden; min-height: 100px; } .mermaidLoading { width: 100%; height: 200px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; color: var(--text-muted); } .loaderPulse { width: 40px; height: 40px; border-radius: 50%; border: 3px solid var(--primary); border-top-color: transparent; animation: spin 1s linear infinite; } .mermaidError { width: 100%; background: #FFF5F5; border: 1px solid #FECACA; border-radius: 16px; padding: 32px; color: #DC2626; } .errorHeader { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; } .errorBadge { background: #FEE2E2; color: #B91C1C; padding: 4px 10px; border-radius: 6px; font-size: 10px; font-weight: 900; letter-spacing: 0.1em; } .errorTitle { font-size: 16px; font-weight: 800; margin: 0; } .errorMessage { font-size: 14px; line-height: 1.6; margin-bottom: 24px; opacity: 0.8; } .rawSchemaToggle { background: white; border: 1px solid #FECACA; color: #B91C1C; padding: 8px 16px; border-radius: 8px; font-size: 12px; font-weight: 700; cursor: pointer; transition: all 0.2s; display: flex; align-items: center; gap: 8px; } .rawSchemaToggle:hover { background: #FEE2E2; } .rawSchemaBox { margin-top: 16px; background: #0F172A; color: #F8FAFC; padding: 24px; border-radius: 12px; font-family: 'JetBrains Mono', 'Fira Code', monospace; font-size: 12px; line-height: 1.6; white-space: pre-wrap; overflow-x: auto; border: 1px solid rgba(255,255,255,0.05); box-shadow: inset 0 2px 4px rgba(0,0,0,0.2); } .spin { animation: spin 1s linear infinite; } @keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } } /* 5. AI Insight Block */ .aiInsightBox { background: linear-gradient(135deg, #EEF2FF 0%, #F5F3FF 100%); border: 1px solid #E0E7FF; border-radius: 16px; padding: 24px; margin-bottom: 32px; position: relative; overflow: hidden; } .aiInsightBox::before { content: ''; position: absolute; top: 0; left: 0; width: 4px; height: 100%; background: var(--primary); } .insightHeader { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; } .insightLabel { font-size: 10px; font-weight: 900; color: var(--primary); letter-spacing: 0.1em; text-transform: uppercase; } .insightText { font-size: 15px; line-height: 1.6; color: #1E293B; font-weight: 500; font-style: italic; } /* 6. AI Growth Center Enhancements */ .headerTabs { display: flex; gap: 4px; background: rgba(255, 255, 255, 0.1); padding: 4px; border-radius: 12px; width: fit-content; border: 1px solid rgba(255, 255, 255, 0.1); } .tab { padding: 8px 20px; border-radius: 8px; border: none; background: none; color: rgba(255, 255, 255, 0.6); font-size: 11px; font-weight: 800; cursor: pointer; transition: all 0.2s; display: flex; align-items: center; gap: 8px; } .tab.activeTab { background: white; color: var(--primary); box-shadow: 0 4px 12px rgba(0,0,0,0.1); } .growthGrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(450px, 1fr)); gap: 32px; flex: 1; } .growthGrid > .emptyState { grid-column: 1 / -1; } .insightCard { background: white; border: 1px solid var(--border-subtle); border-radius: var(--radius-lg); padding: 32px; display: flex; flex-direction: column; gap: 24px; position: relative; overflow: hidden; transition: all 0.3s; } .insightCard::after { content: ''; position: absolute; top: 0; right: 0; width: 100px; height: 100px; background: radial-gradient(circle at top right, rgba(99, 102, 241, 0.05) 0%, transparent 70%); pointer-events: none; } .insightContent h3 { font-size: 20px; font-weight: 800; color: var(--text-main); margin-bottom: 8px; } .insightHeaderRow { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; } .insightType { font-size: 10px; font-weight: 900; color: var(--primary); text-transform: uppercase; letter-spacing: 0.1em; } .insightDept { font-size: 9px; font-weight: 800; color: #6366f1; background: #f5f3ff; padding: 2px 8px; border-radius: 4px; } .reasoningBox { background: #F8FAFC; padding: 16px; border-radius: 12px; border-left: 3px solid var(--primary); } .reasoningLabel { display: block; font-size: 10px; font-weight: 900; color: var(--text-muted); margin-bottom: 6px; } .reasoningText { font-size: 13px; color: var(--text-main); line-height: 1.5; font-style: italic; } .confidenceSection { display: flex; flex-direction: column; gap: 8px; } .confHeader { display: flex; justify-content: space-between; align-items: center; } .confHeader label { font-size: 10px; font-weight: 900; color: var(--text-muted); } .confValue { font-size: 12px; font-weight: 800; color: var(--primary); } .confMeter { height: 6px; background: #E2E8F0; border-radius: 3px; overflow: hidden; } .confFill { height: 100%; background: linear-gradient(to right, #818CF8, #6366F1); border-radius: 3px; } .insightActions { display: flex; gap: 12px; margin-top: auto; } .applyBtn { flex: 2; background: var(--primary); color: white; border: none; padding: 12px; border-radius: 10px; font-weight: 800; font-size: 12px; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px; transition: all 0.2s; } .applyBtn:hover { background: #4F46E5; transform: translateY(-2px); box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2); } .dismissBtn { flex: 1; background: #F1F5F9; color: #64748B; border: none; padding: 12px; border-radius: 10px; font-weight: 800; font-size: 11px; cursor: pointer; transition: all 0.2s; } .dismissBtn:hover { background: #E2E8F0; color: #475569; } .sourceTag { font-size: 9px; font-weight: 700; color: var(--text-muted); background: #F1F5F9; padding: 2px 6px; border-radius: 4px; } /* AI Answer Spotlight */ .resultsContainer { display: flex; flex-direction: column; gap: 32px; width: 100%; } .aiSpotlight { background: white; border: 1px solid var(--border-subtle); border-radius: var(--radius-lg); padding: 40px; position: relative; overflow: hidden; box-shadow: 0 4px 20px rgba(0,0,0,0.03); margin-bottom: 24px; } .aiSpotlight::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 4px; background: var(--banner-gradient); } .spotlightHeader { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; } .spotlightBadge { display: flex; align-items: center; gap: 8px; font-size: 11px; font-weight: 800; color: var(--primary); background: var(--bg-hover); padding: 6px 14px; border-radius: 8px; letter-spacing: 0.1em; } .syntheticLag { font-size: 9px; font-weight: 900; color: #10B981; background: #ECFDF5; padding: 4px 8px; border-radius: 4px; letter-spacing: 0.05em; } .answerText { font-size: 16px; line-height: 1.8; color: var(--text-main); font-weight: 500; margin: 0; max-width: 900px; } .answerText p { margin-bottom: 16px; } .answerText ul, .answerText ol { margin-bottom: 16px; padding-left: 24px; } .answerText li { margin-bottom: 8px; } .answerText code { background: var(--bg-hover); padding: 2px 6px; border-radius: 4px; font-family: 'JetBrains Mono', monospace; font-size: 0.9em; color: var(--primary); } .answerText strong { font-weight: 800; color: var(--primary); } .spotlightFooter { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--border-subtle); font-size: 11px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.1em; }
.container {
padding: 40px;
background-color: var(--bg-dark);
min-height: calc(100vh - 120px);
display: flex;
flex-direction: column;
gap: 40px;
}
/* 1. Mission Banner */
.missionBanner {
background: radial-gradient(circle at top right, #7c3aed, #4f46e5), var(--hero-mesh);
background-size: 200% 200%;
animation: meshGradient 20s ease infinite;
border-radius: var(--radius-lg);
padding: 80px 40px;
color: white;
box-shadow: 0 30px 60px rgba(0, 0, 0, 0.15);
position: relative;
overflow: hidden;
display: flex;
flex-direction: column;
align-items: center;
text-align: center;
}
@keyframes meshGradient {
0% { background-position: 0% 50%; }
50% { background-position: 100% 50%; }
100% { background-position: 0% 50%; }
}
.bannerContent {
position: relative;
z-index: 1;
max-width: 900px;
width: 100%;
display: flex;
flex-direction: column;
align-items: center;
}
.headerBadge {
display: inline-block;
font-size: 10px;
font-weight: 900;
background: rgba(255, 255, 255, 0.2);
padding: 4px 10px;
border-radius: 4px;
margin-bottom: 24px;
letter-spacing: 0.1em;
}
.headerMainRow {
display: flex;
align-items: center;
justify-content: center;
gap: 32px;
margin-bottom: 16px;
width: 100%;
}
.missionBanner h1 {
font-size: 44px;
font-weight: 950;
letter-spacing: -0.04em;
margin: 0;
text-transform: uppercase;
background: linear-gradient(to bottom, #ffffff 30%, rgba(255,255,255,0.85));
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
text-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
.description {
font-size: 19px;
color: rgba(255, 255, 255, 0.9);
margin-bottom: 48px;
font-weight: 500;
max-width: 600px;
}
/* Search Controls */
.searchControls {
display: flex;
gap: 16px;
align-items: center;
width: 100%;
max-width: 720px;
}
.searchWrapper {
position: relative;
flex: 1;
}
.searchIcon {
position: absolute;
left: 20px;