mkcart / frontend /src /styles /EnhancedAnalytics.module.css
Kumar
updated
c2efbe6
.enhanced-analytics {
padding: 32px 40px;
min-height: 100vh;
background: transparent;
color: #ffffff;
}
.analytics-header {
display: flex;
justify-content: space-between;
align-items: flex-start;
margin-bottom: 32px;
padding: 24px;
background: rgba(255, 255, 255, 0.1);
backdrop-filter: blur(30px);
border: 1px solid rgba(255, 255, 255, 0.15);
border-radius: 20px;
}
.header-left h1 {
font-size: 2.4rem;
font-weight: 800;
margin: 0 0 8px 0;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
background-clip: text;
letter-spacing: -0.03em;
}
.header-left p {
font-size: 1.1rem;
color: rgba(255, 255, 255, 0.8);
margin: 0 0 16px 0;
font-weight: 500;
}
.live-indicator {
display: flex;
align-items: center;
gap: 8px;
font-size: 0.9rem;
color: rgba(255, 255, 255, 0.7);
}
.live-dot {
width: 8px;
height: 8px;
background: #10b981;
border-radius: 50%;
animation: pulse 2s infinite;
}
@keyframes pulse {
0%, 100% { opacity: 1; transform: scale(1); }
50% { opacity: 0.7; transform: scale(1.2); }
}
.header-right {
display: flex;
align-items: center;
gap: 16px;
}
.period-select {
background: rgba(255, 255, 255, 0.1);
border: 1px solid rgba(255, 255, 255, 0.2);
color: #fff;
padding: 12px 16px;
border-radius: 12px;
font-size: 0.95rem;
font-weight: 500;
cursor: pointer;
backdrop-filter: blur(15px);
transition: all 0.3s ease;
}
.period-select:focus {
outline: none;
border-color: rgba(59, 130, 246, 0.5);
box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}
.export-btn {
display: flex;
align-items: center;
gap: 8px;
background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(30, 64, 175, 0.2));
border: 1px solid rgba(59, 130, 246, 0.3);
color: #fff;
padding: 12px 20px;
border-radius: 12px;
font-size: 0.95rem;
font-weight: 600;
cursor: pointer;
backdrop-filter: blur(15px);
transition: all 0.3s ease;
}
.export-btn:hover {
background: linear-gradient(135deg, rgba(59, 130, 246, 0.3), rgba(30, 64, 175, 0.3));
transform: translateY(-2px);
box-shadow: 0 8px 24px rgba(59, 130, 246, 0.3);
}
.real-time-metrics {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
gap: 24px;
margin-bottom: 32px;
}
.real-time-metric {
background: rgba(255, 255, 255, 0.1);
backdrop-filter: blur(25px);
border: 1px solid rgba(255, 255, 255, 0.15);
border-radius: 16px;
padding: 24px;
display: flex;
align-items: center;
gap: 16px;
transition: all 0.3s ease;
position: relative;
overflow: hidden;
}
.real-time-metric::before {
content: '';
position: absolute;
top: 0;
left: 0;
right: 0;
height: 3px;
background: linear-gradient(90deg, var(--metric-color), transparent);
opacity: 0;
transition: opacity 0.3s ease;
}
.real-time-metric:hover::before {
opacity: 1;
}
.real-time-metric:hover {
background: rgba(255, 255, 255, 0.15);
border-color: rgba(255, 255, 255, 0.25);
transform: translateY(-4px);
box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
}
.metric-icon {
width: 56px;
height: 56px;
border-radius: 12px;
display: flex;
align-items: center;
justify-content: center;
box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
transition: all 0.3s ease;
}
.real-time-metric:hover .metric-icon {
transform: scale(1.1) rotate(5deg);
}
.metric-content {
flex: 1;
}
.metric-content h4 {
font-size: 0.9rem;
color: rgba(255, 255, 255, 0.7);
margin: 0 0 8px 0;
font-weight: 500;
text-transform: uppercase;
letter-spacing: 0.05em;
}
.metric-value {
display: flex;
align-items: center;
gap: 12px;
}
.metric-value .value {
font-size: 1.8rem;
font-weight: 700;
color: #fff;
}
.trend {
display: flex;
align-items: center;
gap: 4px;
padding: 4px 8px;
border-radius: 8px;
font-size: 0.8rem;
font-weight: 600;
}
.trend.up {
background: rgba(16, 185, 129, 0.2);
color: #10b981;
border: 1px solid rgba(16, 185, 129, 0.3);
}
.trend.down {
background: rgba(239, 68, 68, 0.2);
color: #ef4444;
border: 1px solid rgba(239, 68, 68, 0.3);
}
.charts-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
gap: 24px;
margin-bottom: 32px;
}
.enhanced-chart-card {
background: rgba(255, 255, 255, 0.1);
backdrop-filter: blur(25px);
border: 1px solid rgba(255, 255, 255, 0.15);
border-radius: 20px;
padding: 24px;
transition: all 0.3s ease;
position: relative;
overflow: hidden;
}
.enhanced-chart-card::before {
content: '';
position: absolute;
top: 0;
left: 0;
right: 0;
height: 4px;
background: linear-gradient(90deg, var(--chart-color), transparent);
opacity: 0;
transition: opacity 0.3s ease;
}
.enhanced-chart-card:hover::before {
opacity: 1;
}
.enhanced-chart-card:hover {
background: rgba(255, 255, 255, 0.15);
border-color: rgba(255, 255, 255, 0.25);
transform: translateY(-6px);
box-shadow: 0 16px 40px rgba(0, 0, 0, 0.2);
}
.chart-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 20px;
}
.chart-header h3 {
font-size: 1.3rem;
font-weight: 700;
color: #fff;
margin: 0;
}
.chart-actions {
display: flex;
gap: 8px;
}
.chart-type-btn {
width: 36px;
height: 36px;
border-radius: 8px;
background: rgba(255, 255, 255, 0.1);
border: 1px solid rgba(255, 255, 255, 0.2);
color: rgba(255, 255, 255, 0.7);
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
transition: all 0.3s ease;
backdrop-filter: blur(10px);
}
.chart-type-btn:hover {
background: rgba(255, 255, 255, 0.2);
color: #fff;
transform: scale(1.1);
}
.chart-type-btn.active {
background: linear-gradient(135deg, #3b82f6, #1e40af);
border-color: rgba(59, 130, 246, 0.5);
color: #fff;
box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}
.chart-container {
width: 100%;
border-radius: 12px;
overflow: hidden;
}
.performance-metrics {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
gap: 24px;
}
.metric-card {
background: rgba(255, 255, 255, 0.1);
backdrop-filter: blur(25px);
border: 1px solid rgba(255, 255, 255, 0.15);
border-radius: 16px;
padding: 24px;
transition: all 0.3s ease;
position: relative;
overflow: hidden;
}
.metric-card::before {
content: '';
position: absolute;
top: 0;
left: 0;
right: 0;
height: 3px;
background: linear-gradient(90deg, #3b82f6, #1e40af);
opacity: 0;
transition: opacity 0.3s ease;
}
.metric-card:hover::before {
opacity: 1;
}
.metric-card:hover {
background: rgba(255, 255, 255, 0.15);
border-color: rgba(255, 255, 255, 0.25);
transform: translateY(-4px);
box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
}
.metric-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 16px;
}
.metric-header h3 {
font-size: 1.1rem;
font-weight: 600;
color: rgba(255, 255, 255, 0.9);
margin: 0;
}
.metric-value {
font-size: 2.2rem;
font-weight: 800;
color: #fff;
margin-bottom: 12px;
letter-spacing: -0.02em;
}
.metric-trend {
display: flex;
align-items: center;
gap: 6px;
font-size: 0.9rem;
font-weight: 500;
}
.metric-trend.positive {
color: #10b981;
}
.metric-trend.negative {
color: #ef4444;
}
.analytics-loading {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
min-height: 60vh;
color: #fff;
}
.analytics-loading .loading-spinner {
margin-bottom: 24px;
color: #3b82f6;
}
.analytics-loading h2 {
font-size: 1.5rem;
font-weight: 600;
color: rgba(255, 255, 255, 0.8);
margin: 0;
}
@media (max-width: 1200px) {
.charts-grid {
grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
gap: 20px;
}
.real-time-metrics {
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
gap: 20px;
}
}
@media (max-width: 768px) {
.enhanced-analytics {
padding: 20px 24px;
}
.analytics-header {
flex-direction: column;
gap: 20px;
align-items: flex-start;
}
.header-left h1 {
font-size: 2rem;
}
.header-right {
width: 100%;
justify-content: space-between;
}
.charts-grid {
grid-template-columns: 1fr;
gap: 20px;
}
.real-time-metrics {
grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
gap: 16px;
}
.performance-metrics {
grid-template-columns: 1fr;
gap: 20px;
}
}
@media (max-width: 480px) {
.enhanced-analytics {
padding: 16px 20px;
}
.header-left h1 {
font-size: 1.8rem;
}
.real-time-metrics {
grid-template-columns: 1fr;
}
.metric-value .value {
font-size: 1.5rem;
}
.metric-value {
font-size: 1.8rem;
}
}
@keyframes fadeInUp {
from {
opacity: 0;
transform: translateY(30px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
@keyframes slideInLeft {
from {
opacity: 0;
transform: translateX(-30px);
}
to {
opacity: 1;
transform: translateX(0);
}
}
@keyframes slideInRight {
from {
opacity: 0;
transform: translateX(30px);
}
to {
opacity: 1;
transform: translateX(0);
}
}
.recharts-line-dot {
animation: pulse 2s infinite;
}
.recharts-bar-rectangle {
transition: all 0.3s ease;
}
.recharts-bar-rectangle:hover {
opacity: 0.8;
transform: scale(1.05);
}
.enhanced-analytics::-webkit-scrollbar {
width: 8px;
}
.enhanced-analytics::-webkit-scrollbar-track {
background: rgba(255, 255, 255, 0.05);
border-radius: 4px;
}
.enhanced-analytics::-webkit-scrollbar-thumb {
background: linear-gradient(180deg, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.1));
border-radius: 4px;
border: 1px solid rgba(255, 255, 255, 0.1);
}
.enhanced-analytics::-webkit-scrollbar-thumb:hover {
background: linear-gradient(180deg, rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0.2));
}