/* RESET & BASE */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #0a0e27;
    --bg-secondary: #16213e;
    --bg-card: #1a1a2e;
    --accent-blue: #00d9ff;
    --accent-green: #00ff88;
    --accent-red: #ff3366;
    --accent-yellow: #ffaa00;
    --text-primary: #ffffff;
    --text-secondary: #a8b2d1;
    --border-color: #0f3460;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, var(--bg-primary) 0%, #16213e 100%);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* HEADER */
.header {
    background: rgba(26, 26, 46, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 2px solid var(--border-color);
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0, 217, 255, 0.1);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo h1 {
    font-size: 24px;
    background: linear-gradient(90deg, var(--accent-blue), var(--accent-green));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 30px rgba(0, 217, 255, 0.5);
}

.nav {
    display: flex;
    gap: 10px;
}

.nav-link {
    padding: 12px 24px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.nav-link:hover {
    background: rgba(0, 217, 255, 0.1);
    border-color: var(--accent-blue);
    color: var(--accent-blue);
}

.nav-link.active {
    background: linear-gradient(90deg, rgba(0, 217, 255, 0.2), rgba(0, 255, 136, 0.2));
    border-color: var(--accent-blue);
    color: var(--accent-blue);
}

/* MAIN CONTENT */
.main-content {
    padding: 40px 0;
}

section {
    margin-bottom: 40px;
}

section h2 {
    font-size: 28px;
    margin-bottom: 24px;
    color: var(--accent-blue);
    text-shadow: 0 0 20px rgba(0, 217, 255, 0.3);
}

/* ALERTS */
.alerts-container {
    display: grid;
    gap: 16px;
}

.alert-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: var(--bg-card);
    border-radius: 12px;
    border-left: 4px solid var(--accent-green);
}

.alert-card.alert-warning {
    border-left-color: var(--accent-yellow);
}

.alert-card.alert-error {
    border-left-color: var(--accent-red);
}

.alert-icon {
    font-size: 32px;
}

.alert-content h3 {
    font-size: 18px;
    margin-bottom: 4px;
}

.alert-content p {
    color: var(--text-secondary);
    font-size: 14px;
}

/* KPIs GRID */
.kpis-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.kpi-card {
    position: relative;
    background: var(--bg-card);
    border-radius: 16px;
    padding: 28px;
    border: 2px solid var(--border-color);
    transition: all 0.3s ease;
    cursor: pointer;
    overflow: hidden;
}

.kpi-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 217, 255, 0.05), rgba(0, 255, 136, 0.05));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.kpi-card:hover::before {
    opacity: 1;
}

.kpi-card:hover {
    transform: translateY(-8px);
    border-color: var(--accent-blue);
    box-shadow: 0 12px 40px rgba(0, 217, 255, 0.2);
}

.kpi-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.kpi-content h3 {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.kpi-value {
    font-size: 36px;
    font-weight: bold;
    background: linear-gradient(90deg, var(--accent-blue), var(--accent-green));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 8px;
}

.kpi-label {
    font-size: 14px;
    color: var(--text-secondary);
}

.kpi-status {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 24px;
}

.status-ok { color: var(--accent-green); }
.status-warning { color: var(--accent-yellow); }
.status-error { color: var(--accent-red); }

.loading {
    animation: pulse 1.5s ease-in-out infinite;
}

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

/* CHART */
.chart-container {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 20px;
    border: 2px solid var(--border-color);
}

.chart-container iframe {
    border-radius: 12px;
}

/* FOOTER */
.footer {
    background: rgba(26, 26, 46, 0.95);
    border-top: 2px solid var(--border-color);
    padding: 20px 0;
    text-align: center;
    color: var(--text-secondary);
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .header .container {
        flex-direction: column;
        gap: 20px;
    }
    
    .nav {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .kpis-grid {
        grid-template-columns: 1fr;
    }
}
