/* KPI Dashboard Styles */

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

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e2e8f0;
}

.dashboard-header h1 {
    font-size: 32px;
    font-weight: 700;
    color: #2d3748;
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 0;
}

.header-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.header-actions select {
    padding: 10px 15px;
    border: 1px solid #cbd5e0;
    border-radius: 8px;
    font-size: 14px;
    min-width: 150px;
}

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

.kpi-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: all 0.3s ease;
}

.kpi-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.kpi-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: white;
}

.kpi-icon.blue { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); }
.kpi-icon.green { background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%); }
.kpi-icon.orange { background: linear-gradient(135deg, #fa8c16 0%, #ff6b35 100%); }
.kpi-icon.purple { background: linear-gradient(135deg, #a044ff 0%, #6a3093 100%); }
.kpi-icon.teal { background: linear-gradient(135deg, #13547a 0%, #80d0c7 100%); }
.kpi-icon.red { background: linear-gradient(135deg, #eb3349 0%, #f45c43 100%); }

.kpi-content {
    flex: 1;
}

.kpi-content h5 {
    font-size: 14px;
    font-weight: 600;
    color: #718096;
    margin: 0 0 8px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.kpi-value {
    font-size: 28px;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 8px;
}

.kpi-trend {
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
}

.kpi-trend.trend-up {
    color: #38a169;
}

.kpi-trend.trend-down {
    color: #e53e3e;
}

.kpi-trend.trend-neutral {
    color: #718096;
}

/* Alerts Section */
.alerts-section {
    background: white;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.alerts-section h3 {
    font-size: 20px;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alerts-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.alert-item {
    padding: 20px;
    border-radius: 10px;
    border-left: 4px solid;
}

.alert-item.severity-high {
    background: #fff5f5;
    border-color: #e53e3e;
}

.alert-item.severity-medium {
    background: #fffaf0;
    border-color: #dd6b20;
}

.alert-item.severity-low {
    background: #f0f9ff;
    border-color: #3182ce;
}

.alert-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.alert-title {
    font-weight: 600;
    font-size: 16px;
    color: #2d3748;
}

.alert-time {
    font-size: 12px;
    color: #a0aec0;
}

.alert-message {
    color: #4a5568;
    margin-bottom: 12px;
    line-height: 1.5;
}

/* Chart Section */
.chart-section {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.chart-section h3 {
    font-size: 20px;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 20px;
}

.chart-container {
    position: relative;
    height: 400px;
}

/* Loading State */
.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    gap: 20px;
}

.loading-state p {
    font-size: 16px;
    color: #718096;
}

/* Empty State */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    text-align: center;
    padding: 40px;
}

.empty-state h3 {
    font-size: 24px;
    font-weight: 600;
    color: #2d3748;
    margin: 20px 0 10px;
}

.empty-state p {
    font-size: 16px;
    color: #718096;
    max-width: 500px;
    line-height: 1.6;
}

/* Auth Required State */
.auth-required {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 500px;
}

.auth-card {
    background: white;
    border-radius: 12px;
    padding: 50px;
    text-align: center;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    max-width: 500px;
}

.auth-card h2 {
    font-size: 28px;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 15px;
}

.auth-card p {
    font-size: 16px;
    color: #718096;
    margin-bottom: 30px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }

    .header-actions {
        width: 100%;
        flex-direction: column;
    }

    .header-actions select,
    .header-actions button {
        width: 100%;
    }

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

    .kpi-card {
        flex-direction: column;
        text-align: center;
    }

    .chart-container {
        height: 300px;
    }
}
