Spaces:
Paused

nexus / frontend /apps /internal /src /components /KnowledgeBase.module.css
dushyantsingh0
backend stabilization
235f8ef
Raw History Blame Contribute Delete
17.5 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: var(--banner-gradient);
border-radius: var(--radius-lg);
padding: 60px;
color: white;
box-shadow: 0 10px 30px rgba(30, 64, 175, 0.2);
position: relative;
overflow: hidden;
}
.bannerContent {
position: relative;
z-index: 1;
max-width: 800px;
}
.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;
}
.missionBanner h1 {
font-size: 42px;
font-weight: 900;
letter-spacing: -0.03em;
margin-bottom: 12px;
text-transform: uppercase;
}
.description {
font-size: 18px;
opacity: 0.8;
margin-bottom: 40px;
font-weight: 500;
}
/* Search Controls */
.searchControls {
display: flex;
gap: 16px;
align-items: center;
}
.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.1);
backdrop-filter: blur(8px);
border: 1px solid rgba(255, 255, 255, 0.2);
border-radius: 16px;
padding: 18px 20px 18px 56px;
color: white;
font-size: 16px;
outline: none;
transition: all 0.2s;
}
.searchWrapper input:focus {
background: rgba(255, 255, 255, 0.15);
border-color: rgba(255, 255, 255, 0.4);
}
.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: white;
padding: 6px;
border-radius: 14px;
border: 1px solid var(--border-subtle);
width: fit-content;
}
.navItem {
padding: 10px 24px;
border-radius: 10px;
border: none;
background: none;
color: var(--text-muted);
font-size: 13px;
font-weight: 700;
cursor: pointer;
}
.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(400px, 1fr));
gap: 32px;
}
.articleCard {
background: white;
border: 1px solid var(--border-subtle);
border-radius: var(--radius-lg);
padding: 32px;
cursor: pointer;
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
display: flex;
flex-direction: column;
gap: 20px;
}
.articleCard:hover {
transform: translateY(-6px);
box-shadow: 0 20px 40px rgba(0,0,0,0.06);
border-color: var(--primary);
}
.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; }
.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: white;
border-radius: 20px;
border: 2px dashed #E2E8F0;
padding: 60px;
text-align: center;
min-height: 500px;
}
.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: 20px 0; background: #1E293B; padding: 20px; border-radius: 12px; overflow-x: auto; }
.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;
margin-bottom: 24px;
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;
}
.insightType {
font-size: 10px;
font-weight: 900;
color: var(--primary);
text-transform: uppercase;
letter-spacing: 0.1em;
display: block;
margin-bottom: 16px;
}
.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;
}