/* Monitoring Dashboard Styles */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    padding: 40px;
}

/* Header */
.monitoring-header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 2px solid #f0f0f0;
}

.monitoring-header h1 {
    font-size: 2.5rem;
    color: #2d3748;
    margin-bottom: 10px;
}

.subtitle {
    color: #718096;
    font-size: 1.1rem;
    margin-bottom: 20px;
}

.status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    background: #f7fafc;
    border-radius: 20px;
    font-weight: 500;
}

.status-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #48bb78;
    animation: pulse 2s infinite;
}

.status-dot.error {
    background: #f56565;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 25px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.6);
}

.stat-icon {
    font-size: 2.5rem;
}

.stat-content h3 {
    font-size: 0.9rem;
    font-weight: 500;
    opacity: 0.9;
    margin-bottom: 5px;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    margin: 5px 0;
}

.stat-unit {
    font-size: 0.85rem;
    opacity: 0.8;
}

/* App Status */
.app-status-section {
    margin-bottom: 40px;
}

.app-status-section h2 {
    font-size: 1.8rem;
    color: #2d3748;
    margin-bottom: 20px;
}

.app-status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.app-status-card {
    background: #f7fafc;
    padding: 20px;
    border-radius: 12px;
    border-left: 4px solid #48bb78;
    transition: all 0.3s ease;
}

.app-status-card.down {
    border-left-color: #f56565;
}

.app-status-card:hover {
    background: #edf2f7;
    transform: translateX(5px);
}

.app-status-card h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: #2d3748;
}

.app-status-badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    background: #c6f6d5;
    color: #22543d;
    margin-bottom: 15px;
}

.app-status-badge.down {
    background: #fed7d7;
    color: #742a2a;
}

.app-metric {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #e2e8f0;
}

.app-metric:last-child {
    border-bottom: none;
}

.app-metric-label {
    color: #718096;
    font-size: 0.9rem;
}

.app-metric-value {
    font-weight: 600;
    color: #2d3748;
}

/* Charts */
.charts-section {
    margin-bottom: 40px;
}

.chart-container {
    background: #f7fafc;
    padding: 30px;
    border-radius: 15px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.chart-container h2 {
    font-size: 1.5rem;
    color: #2d3748;
    margin-bottom: 20px;
}

/* System Metrics */
.system-metrics-section {
    margin-bottom: 40px;
}

.system-metrics-section h2 {
    font-size: 1.8rem;
    color: #2d3748;
    margin-bottom: 20px;
}

.system-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
}

.system-card {
    text-align: center;
    padding: 30px;
    background: #f7fafc;
    border-radius: 15px;
    transition: transform 0.3s ease;
}

.system-card:hover {
    transform: scale(1.05);
}

.system-card h3 {
    font-size: 1.2rem;
    color: #2d3748;
    margin-bottom: 20px;
}

.progress-circle {
    width: 120px;
    height: 120px;
    margin: 0 auto;
    border-radius: 50%;
    background: conic-gradient(#667eea 0deg, #e2e8f0 0deg);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.progress-circle::before {
    content: '';
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: white;
    position: absolute;
}

.progress-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2d3748;
    position: relative;
    z-index: 1;
}

/* Geographic Section */
.geo-section {
    margin-bottom: 40px;
}

.geo-section h2 {
    font-size: 1.8rem;
    color: #2d3748;
    margin-bottom: 20px;
}

.geo-chart-container {
    background: #f7fafc;
    padding: 30px;
    border-radius: 15px;
    max-width: 800px;
    margin: 0 auto;
}

/* Tech Stack */
.tech-stack-section {
    margin-bottom: 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    border-radius: 15px;
}

.tech-stack-section h2 {
    color: white;
    margin-bottom: 20px;
}

.tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.tech-item {
    padding: 15px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    backdrop-filter: blur(10px);
}

.tech-item strong {
    display: block;
    margin-bottom: 5px;
    opacity: 0.9;
}

/* Footer */
.monitoring-footer {
    text-align: center;
    padding-top: 30px;
    border-top: 2px solid #f0f0f0;
    color: #718096;
}

.back-link {
    display: inline-block;
    margin-top: 15px;
    padding: 10px 25px;
    background: #667eea;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    transition: background 0.3s ease;
}

.back-link:hover {
    background: #764ba2;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 20px;
    }

    .monitoring-header h1 {
        font-size: 1.8rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .stat-card {
        padding: 20px;
    }

    .chart-container {
        padding: 20px;
    }

    .system-grid {
        grid-template-columns: 1fr;
    }
}

/* Loading Animation */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

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