/* SentraFlow Dashboard Enhancements CSS */

/* Real-time indicator */
.real-time-indicator {
    position: fixed;
    top: 80px;
    right: 20px;
    background: linear-gradient(45deg, #28a745, #20c997);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    box-shadow: 0 2px 10px rgba(40, 167, 69, 0.3);
    z-index: 1000;
    animation: pulse 2s infinite;
}

.real-time-indicator.paused {
    background: linear-gradient(45deg, #ffc107, #fd7e14);
    animation: none;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(40, 167, 69, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(40, 167, 69, 0); }
    100% { box-shadow: 0 0 0 0 rgba(40, 167, 69, 0); }
}

/* Enhanced metric cards */
.metric-card {
    transition: all 0.3s ease;
    border: none;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    overflow: hidden;
    position: relative;
}

.metric-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.metric-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(45deg, var(--bs-primary), var(--bs-secondary));
}

.metric-card .metric-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--bs-primary);
    transition: color 0.3s ease;
}

.metric-card.trending-up .metric-value {
    color: var(--bs-success);
}

.metric-card.trending-down .metric-value {
    color: var(--bs-danger);
}

/* Enhanced charts container */
.chart-container {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 24px;
    position: relative;
}

.chart-container .chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f8f9fa;
}

.chart-container .chart-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #2c3e50;
    margin: 0;
}

.chart-controls {
    display: flex;
    gap: 8px;
}

.chart-controls .btn-sm {
    padding: 4px 8px;
    font-size: 0.75rem;
}

/* Advanced progress bars */
.progress-enhanced {
    height: 8px;
    border-radius: 4px;
    background-color: #e9ecef;
    overflow: hidden;
    position: relative;
}

.progress-enhanced .progress-bar {
    background: linear-gradient(45deg, var(--bs-primary), var(--bs-secondary));
    position: relative;
    animation: progressShine 2s infinite;
}

@keyframes progressShine {
    0% { background-position: -200px 0; }
    100% { background-position: calc(200px + 100%) 0; }
}

.progress-enhanced .progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: -200px;
    width: 200px;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: progressShine 2s infinite;
}

/* Notification enhancements */
.notification-badge {
    position: relative;
    top: -2px;
    font-size: 0.7rem;
    min-width: 18px;
    height: 18px;
    padding: 0;
    border-radius: 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    animation: notificationPulse 1s infinite;
}

@keyframes notificationPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* Keyboard shortcuts tooltip */
.keyboard-shortcuts {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 10px 15px;
    border-radius: 8px;
    font-size: 0.75rem;
    z-index: 1000;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.keyboard-shortcuts.show {
    opacity: 1;
    transform: translateY(0);
}

.keyboard-shortcuts kbd {
    background: #fff;
    color: #000;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.7rem;
    margin: 0 2px;
}

/* Loading states */
.loading-shimmer {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* Status indicators */
.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 6px;
}

.status-indicator.online {
    background: #28a745;
    box-shadow: 0 0 6px rgba(40, 167, 69, 0.6);
    animation: statusPulse 2s infinite;
}

.status-indicator.offline {
    background: #dc3545;
}

.status-indicator.warning {
    background: #ffc107;
}

@keyframes statusPulse {
    0% { box-shadow: 0 0 6px rgba(40, 167, 69, 0.6); }
    50% { box-shadow: 0 0 6px rgba(40, 167, 69, 0.2); }
    100% { box-shadow: 0 0 6px rgba(40, 167, 69, 0.6); }
}

/* Enhanced tooltips */
.tooltip-enhanced {
    position: relative;
    cursor: help;
}

.tooltip-enhanced::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.75rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
    z-index: 1000;
}

.tooltip-enhanced:hover::after {
    opacity: 1;
}

/* Mobile responsive enhancements */
@media (max-width: 768px) {
    .metric-card {
        margin-bottom: 16px;
    }
    
    .metric-card .metric-value {
        font-size: 2rem;
    }
    
    .chart-container {
        padding: 16px;
        margin-bottom: 16px;
    }
    
    .real-time-indicator {
        top: 60px;
        right: 10px;
        padding: 6px 12px;
        font-size: 0.7rem;
    }
    
    .keyboard-shortcuts {
        display: none; /* Hide on mobile */
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .chart-container {
        background: #2d3748;
        color: #e2e8f0;
    }
    
    .chart-container .chart-title {
        color: #e2e8f0;
    }
    
    .chart-container .chart-header {
        border-bottom-color: #4a5568;
    }
    
    .metric-card {
        background: #2d3748;
        color: #e2e8f0;
    }
    
    .loading-shimmer {
        background: linear-gradient(90deg, #4a5568 25%, #2d3748 50%, #4a5568 75%);
    }
}

/* Export button styling */
.export-controls {
    position: fixed;
    top: 120px;
    right: 20px;
    z-index: 999;
}

.export-controls .dropdown-menu {
    min-width: 160px;
}

.export-controls .dropdown-item {
    padding: 8px 16px;
    font-size: 0.875rem;
}

.export-controls .dropdown-item:hover {
    background-color: var(--bs-primary);
    color: white;
}