Spaces:
Paused

miracle / frontend /apps /internal /src /components /AnalyticsDashboard.module.css
dushyantsingh0
fix forensics filtering logic on both frontend and backend
cb0eb6e
Raw History Blame Contribute Delete
16.2 kB
.container {
padding: var(--layout-padding);
background-color: var(--bg-dark);
min-height: 100vh;
display: flex;
flex-direction: column;
gap: var(--section-gap);
animation: fadeIn 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes fadeIn {
from { opacity: 0; transform: translateY(20px); }
to { opacity: 1; transform: translateY(0); }
}
.topFilterBar {
display: flex;
justify-content: flex-end;
margin-bottom: 8px;
}
.rangeSelector {
display: flex;
gap: 1px;
background: var(--bg-hover);
padding: 4px;
border-radius: 12px;
border: 1px solid var(--border-subtle);
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}
.rangeBtn {
padding: 6px 16px;
border: none;
background: transparent;
font-size: 10px;
font-weight: 800;
color: var(--text-muted);
border-radius: 8px;
cursor: pointer;
transition: all 0.2s ease;
letter-spacing: 0.05em;
}
.rangeBtn:hover {
background: rgba(0, 0, 0, 0.03);
color: var(--text-main);
}
.rangeBtnActive {
background: var(--bg-card) !important;
color: var(--primary) !important;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}
/* 2. Vitals Row */
.vitalsRow {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
gap: 20px;
}
.vitalCard {
background: var(--bg-card);
border: 1px solid var(--border-subtle);
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
border-radius: 16px;
padding: 24px;
display: flex;
align-items: center;
gap: 20px;
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.vitalCard:hover {
transform: translateY(-4px);
border-color: var(--primary);
box-shadow: 0 12px 30px rgba(0, 0, 0, 0.06);
}
.vitalIcon {
width: 52px;
height: 52px;
border-radius: 16px;
display: flex;
align-items: center;
justify-content: center;
font-size: 24px;
flex-shrink: 0;
}
.vitalMeta {
display: flex;
flex-direction: column;
}
.vitalLabel {
font-size: 10px;
font-weight: 800;
color: var(--text-muted);
letter-spacing: 0.1em;
text-transform: uppercase;
}
.vitalValue {
font-size: 32px;
font-weight: 900;
color: var(--text-main);
line-height: 1.1;
margin: 6px 0;
}
.vitalValue {
font-size: clamp(24px, 4vw, 32px);
}
.vitalSub {
font-size: 11px;
font-weight: 700;
color: var(--text-dim);
}
/* 3. Sentinel Master (AI Narrative + Strategy) */
.sentinelMaster {
display: grid;
grid-template-columns: 1fr 340px;
gap: 1px;
background: var(--bg-card);
backdrop-filter: blur(24px);
border-radius: 32px;
overflow: hidden;
border: 1px solid var(--border-subtle);
box-shadow: 0 40px 100px -20px rgba(0, 0, 0, 0.05);
position: relative;
}
@media (max-width: 1280px) {
.sentinelMaster {
grid-template-columns: 1fr;
}
.strategicActions {
border-left: none !important;
border-top: 1px solid var(--border-subtle);
}
}
.sentinelMaster::before {
content: '';
position: absolute;
top: 0; left: 0; right: 0; bottom: 0;
background: radial-gradient(circle at 70% 30%, rgba(139, 92, 246, 0.08) 0%, transparent 70%),
radial-gradient(circle at 10% 80%, rgba(59, 130, 246, 0.05) 0%, transparent 60%);
pointer-events: none;
}
.sentinelBody {
padding: clamp(24px, 5vw, 48px);
background: var(--bg-card);
}
.strategicActions {
background: var(--bg-hover);
padding: clamp(24px, 5vw, 48px) 32px;
display: flex;
flex-direction: column;
gap: 24px;
border-left: 1px solid var(--border-subtle);
}
.sentinelMasterFull {
background: var(--bg-card);
backdrop-filter: blur(24px);
border-radius: 32px;
padding: clamp(24px, 5vw, 48px);
border: 1px solid var(--border-subtle);
box-shadow: 0 40px 100px -20px rgba(0, 0, 0, 0.05);
position: relative;
overflow: hidden;
}
.sentinelMasterFull::before {
content: '';
position: absolute;
top: 0; left: 0; right: 0; bottom: 0;
background: radial-gradient(circle at 70% 30%, rgba(139, 92, 246, 0.08) 0%, transparent 70%),
radial-gradient(circle at 10% 80%, rgba(59, 130, 246, 0.05) 0%, transparent 60%);
pointer-events: none;
}
.strategicActions label {
font-size: 10px;
font-weight: 900;
color: var(--primary);
letter-spacing: 0.2em;
display: flex;
align-items: center;
gap: 8px;
}
.narrativeBox {
margin-top: 32px;
background: var(--bg-card);
padding: clamp(24px, 4vw, 40px);
border-radius: 24px;
border: 1px solid var(--border-subtle);
position: relative;
box-shadow: inset 0 2px 20px rgba(0, 0, 0, 0.02), 0 10px 30px rgba(0, 0, 0, 0.04);
}
.narrativeBox::before {
content: '✦';
position: absolute;
top: 12px;
right: 24px;
font-size: 24px;
color: var(--primary);
opacity: 0.4;
filter: drop-shadow(0 0 12px var(--primary-glow));
}
/* Narrative inner styles are now handled primarily by NexusMarkdown */
.narrativeBox p {
font-size: 14.5px !important;
font-weight: 500 !important;
line-height: 1.7 !important;
color: var(--text-main) !important;
margin-bottom: 20px !important;
}
.narrativeBox strong {
font-weight: 700 !important;
color: var(--primary) !important;
}
.narrativeBox ul, .narrativeBox ol {
margin: 16px 0 !important;
}
.narrativeBox li {
font-size: 14px !important;
font-weight: 500 !important;
margin-bottom: 10px !important;
}
.narrativeBox h1, .narrativeBox h2, .narrativeBox h3 {
font-size: 16px !important;
font-weight: 800 !important;
margin: 24px 0 12px 0 !important;
color: var(--text-main) !important;
font-family: var(--font-heading) !important;
}
.actionList {
display: flex;
flex-direction: column;
gap: 16px;
}
.actionItem {
display: flex;
gap: 16px;
padding: 20px;
background: var(--bg-card);
border-radius: 16px;
border: 1px solid var(--border-subtle);
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.actionItem:hover {
background: var(--bg-hover);
transform: translateX(8px);
border-color: rgba(139, 92, 246, 0.3);
box-shadow: 0 10px 20px -8px rgba(0, 0, 0, 0.05);
}
.actionBullet {
width: 24px;
height: 24px;
background: linear-gradient(135deg, #7c3aed, #4f46e5);
color: white;
border-radius: 8px;
display: flex;
align-items: center;
justify-content: center;
font-size: 11px;
font-weight: 900;
flex-shrink: 0;
box-shadow: 0 4px 12px rgba(124, 58, 237, 0.4);
}
.actionItem p {
font-size: 13px;
font-weight: 600;
color: var(--text-muted);
line-height: 1.5;
margin: 0;
}
/* 4. Intelligence Grid (Lower Cards) */
.intelligenceGrid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
gap: 32px;
}
.gridCard {
background: var(--bg-card);
border: 1px solid var(--border-subtle);
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
border-radius: 20px;
padding: 32px;
display: flex;
flex-direction: column;
gap: 24px;
min-height: 420px;
transition: all 0.3s ease;
}
.cardHeader {
display: flex;
align-items: center;
gap: 16px;
border-bottom: 1px solid var(--border-subtle);
padding-bottom: 20px;
}
.headerIcon {
color: var(--primary);
flex-shrink: 0;
}
.headerText h3 {
font-size: 14px;
font-weight: 900;
color: var(--text-main);
letter-spacing: 0.05em;
margin: 0;
}
.headerText span {
font-size: 11px;
color: var(--text-muted);
font-weight: 600;
}
.cardBody {
flex: 1;
display: flex;
flex-direction: column;
gap: 24px;
}
/* 5. Chart Aesthetics */
.areaTrendWrapper {
width: 100%;
position: relative;
}
.categoryStack {
display: flex;
flex-direction: column;
gap: 16px;
}
.categoryRow {
display: flex;
flex-direction: column;
gap: 6px;
}
.catLabelRow {
display: flex;
justify-content: space-between;
align-items: center;
font-size: 12px;
font-weight: 700;
color: var(--text-main);
}
.catBarBack {
height: 6px;
background: var(--bg-hover);
border-radius: 3px;
overflow: hidden;
}
.catBarFill {
height: 100%;
background: linear-gradient(90deg, #3B82F6, #60A5FA);
border-radius: 3px;
transition: width 1s ease-out;
}
.velocityBadge {
font-size: 8px;
font-weight: 900;
padding: 2px 6px;
border-radius: 4px;
text-transform: uppercase;
}
/* 6. High-Intensity Colors */
.surge { background: #FEF2F2; color: var(--error); border: 1px solid #FEE2E2; }
.stable { background: #F0FDF4; color: var(--success); border: 1px solid #DCFCE7; }
.declining { background: var(--bg-hover); color: var(--text-muted); border: 1px solid var(--border-subtle); }
/* 7. Talent & Thermal Metadata */
.staffMeta {
display: flex;
flex-wrap: wrap;
gap: 10px;
}
.staffPill {
display: flex;
align-items: center;
gap: 6px;
background: var(--bg-hover);
padding: 6px 12px;
border-radius: 99px;
font-size: 10px;
font-weight: 800;
color: var(--text-muted);
}
.staffDot {
width: 6px;
height: 6px;
background: var(--success);
border-radius: 50%;
box-shadow: 0 0 8px rgba(16, 185, 129, 0.5);
}
.moreStaff {
font-size: 10px;
font-weight: 700;
color: var(--text-dim);
padding: 6px;
}
.auditMiniList {
display: flex;
flex-direction: column;
gap: 12px;
}
.auditMiniItem {
display: flex;
gap: 16px;
padding: 12px;
background: var(--bg-panel);
border-radius: 12px;
cursor: pointer;
transition: all 0.2s ease;
border: 1px solid transparent;
}
.auditMiniItem:hover {
background: white;
border-color: rgba(124, 58, 237, 0.3);
transform: translateX(4px);
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}
.auditMetaSide {
display: flex;
flex-direction: column;
flex-shrink: 0;
width: 50px;
}
.auditTime {
font-size: 10px;
font-weight: 800;
color: var(--text-main);
}
.auditTimeSub {
font-size: 10px;
color: var(--text-muted);
}
.auditContentSide {
display: flex;
flex-direction: column;
gap: 4px;
min-width: 0;
}
.auditTitle {
font-size: 12px;
font-weight: 700;
color: var(--text-main);
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.auditAction {
font-size: 9px;
font-weight: 900;
color: var(--primary);
letter-spacing: 0.05em;
}
/* 8. Pulse Components */
.loadingContainer {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
height: 80vh;
position: relative;
}
.loadingPulse {
width: 80px;
height: 80px;
background: var(--primary);
border-radius: 50%;
filter: blur(40px);
opacity: 0.3;
animation: globalPulse 2s infinite ease-in-out;
}
.loadingGlow {
position: absolute;
width: 120px;
height: 120px;
border: 1px solid var(--primary);
border-radius: 50%;
opacity: 0.1;
animation: globalOrb 4s infinite linear;
}
@keyframes globalPulse {
0%, 100% { transform: scale(1); opacity: 0.3; }
50% { transform: scale(1.5); opacity: 0.1; }
}
@keyframes globalOrb {
from { transform: rotate(0deg); }
to { transform: rotate(360deg); }
}
.loadingContainer span {
margin-top: 24px;
font-size: 14px;
font-weight: 900;
color: var(--primary);
letter-spacing: 0.2em;
text-transform: uppercase;
}
.gridCard:hover {
transform: translateY(-4px) scale(1.01);
background: var(--bg-hover);
border-color: rgba(139, 92, 246, 0.2);
box-shadow: 0 30px 60px -12px rgba(0, 0, 0, 0.08);
}
.cardNeuralConclusion {
margin-top: auto;
padding-top: 20px;
border-top: 1px dashed var(--border-subtle);
display: flex;
align-items: flex-start;
gap: 12px;
}
.cardNeuralConclusion span {
font-size: 10.5px;
line-height: 1.6;
color: var(--text-muted);
font-weight: 600;
font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
letter-spacing: -0.01em;
}
.neuralGlow {
color: #8B5CF6;
filter: drop-shadow(0 0 8px rgba(139, 92, 246, 0.4));
animation: neuralPulse 2s infinite ease-in-out;
flex-shrink: 0;
margin-top: 2px;
}
@keyframes neuralPulse {
0%, 100% { opacity: 0.6; transform: scale(1); }
50% { opacity: 1; transform: scale(1.3); }
}
/* 9. User Metrics Section */
.userMetricsSection {
background: var(--bg-card);
border: 1px solid var(--border-subtle);
border-radius: 24px;
padding: 32px;
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
}
.sectionHeader {
margin-bottom: 24px;
display: flex;
justify-content: space-between;
align-items: flex-end;
gap: 20px;
}
.sectionTitleGroup {
display: flex;
flex-direction: column;
}
.sectionHeader h3 {
font-size: 14px;
font-weight: 900;
color: var(--text-main);
letter-spacing: 0.05em;
margin-bottom: 4px;
}
.sectionHeader p {
font-size: 11px;
color: var(--text-muted);
font-weight: 600;
}
.tableWrapper {
overflow-x: auto;
}
.metricsTable {
width: 100%;
border-collapse: separate;
border-spacing: 0 8px;
}
.metricsTable th {
text-align: left;
padding: 12px 16px;
font-size: 10px;
font-weight: 900;
color: var(--text-muted);
letter-spacing: 0.1em;
text-transform: uppercase;
}
.metricsTable tr td {
padding: 16px;
background: var(--bg-hover);
transition: all 0.2s ease;
}
.metricsTable tr td:first-child {
border-top-left-radius: 12px;
border-bottom-left-radius: 12px;
}
.metricsTable tr td:last-child {
border-top-right-radius: 12px;
border-bottom-right-radius: 12px;
}
.metricsTable tr:hover td {
background: var(--bg-card);
transform: translateY(-1px);
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
}
.userNameCell {
display: flex;
align-items: center;
gap: 12px;
font-weight: 700;
color: var(--text-main);
font-size: 13px;
}
.userAvatar {
width: 32px;
height: 32px;
border-radius: 10px;
background: linear-gradient(135deg, var(--primary), #6366f1);
color: white;
display: flex;
align-items: center;
justify-content: center;
font-size: 14px;
font-weight: 900;
}
.countCell {
font-weight: 800;
color: var(--text-main);
font-family: var(--font-mono);
}
.slaPill {
display: inline-flex;
padding: 4px 12px;
border-radius: 8px;
font-size: 11px;
font-weight: 800;
}
.narrativeCellTd {
max-width: 380px;
}
.narrativeCell {
display: flex;
flex-direction: column;
gap: 6px;
}
.tierBadge {
display: inline-flex;
align-items: center;
padding: 2px 8px;
border-radius: 6px;
font-size: 9px;
font-weight: 900;
letter-spacing: 0.1em;
text-transform: uppercase;
width: fit-content;
line-height: 1.6;
}
.narrativeText {
font-size: 12px;
color: var(--text-dim);
line-height: 1.55;
font-weight: 500;
}
.inlineSparkle {
color: var(--primary);
flex-shrink: 0;
margin-top: 2px;
}
/* Tooltip & Micro-interactions */
.chartTooltip {
position: absolute;
background: var(--bg-popover);
backdrop-filter: blur(8px);
padding: 10px 14px;
border-radius: 10px;
color: white;
pointer-events: none;
font-family: var(--font-mono);
z-index: 1000;
transform: translate(-50%, -100%);
border: 1px solid rgba(255, 255, 255, 0.15);
box-shadow: 0 15px 30px -10px rgba(0, 0, 0, 0.4);
display: flex;
flex-direction: column;
gap: 4px;
white-space: nowrap;
transition: opacity 0.15s ease;
}
.tooltipDate {
font-size: 9px;
text-transform: uppercase;
color: var(--text-muted);
letter-spacing: 0.08em;
font-weight: 700;
}
.tooltipValue {
font-size: 15px;
font-weight: 900;
display: flex;
align-items: baseline;
gap: 5px;
color: white;
}
.tooltipValue span {
font-size: 9px;
opacity: 0.7;
font-weight: 700;
}
.miniTrendContainer {
margin-left: auto;
}
.regenerateButton {
display: flex;
align-items: center;
gap: 8px;
padding: 8px 16px;
background: var(--primary-glow);
border: 1px solid var(--primary);
border-radius: 12px;
color: var(--primary);
font-size: 10px;
font-weight: 900;
cursor: pointer;
transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
letter-spacing: 0.1em;
margin-left: auto;
text-transform: uppercase;
}
.regenerateButton:hover:not(:disabled) {
background: var(--primary);
color: white;
transform: translateY(-2px);
box-shadow: 0 4px 12px var(--primary-glow);
}
.regenerateButton:disabled {
opacity: 0.6;
cursor: not-allowed;
border-color: var(--border-subtle);
background: var(--bg-hover);
color: var(--text-dim);
}
.spinning {
animation: spin 1s linear infinite;
}
.spin {
animation: spin 1s linear infinite;
}
@keyframes spin {
to { transform: rotate(360deg); }
}