/**
 * ============================================================================
 * DASHBOARD ENHANCED V2 STYLES
 * ============================================================================
 */

/* Dashboard Header */
.dashboard-header-v2 {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    color: white;
}

.dashboard-title-section h1 {
    margin: 0 0 8px 0;
    font-size: 28px;
    font-weight: 700;
    color: white;
}

.dashboard-title-section .subtitle {
    margin: 0;
    font-size: 14px;
    opacity: 0.9;
    color: rgba(255, 255, 255, 0.9);
}

.dashboard-controls {
    display: flex;
    gap: 12px;
    align-items: center;
}

.dashboard-controls .filter-select {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
}

.dashboard-controls .filter-select option {
    background: #1f2937;
    color: white;
}

.dashboard-controls .btn-primary {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.dashboard-controls .btn-primary:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Executive Summary Grid */
.executive-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

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

.exec-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.exec-card-icon {
    width: 64px;
    height: 64px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: white;
    flex-shrink: 0;
}

.exec-card-content {
    flex: 1;
    min-width: 0;
}

.exec-card-label {
    font-size: 13px;
    color: #6b7280;
    font-weight: 500;
    margin-bottom: 4px;
}

.exec-card-value {
    font-size: 32px;
    font-weight: 700;
    color: #1f2937;
    line-height: 1;
    margin-bottom: 8px;
}

.exec-card-detail {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    font-size: 12px;
}

.exec-card-trend {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    font-weight: 500;
}

.exec-card-trend.positive {
    color: #10b981;
}

.exec-card-trend.negative {
    color: #ef4444;
}

.exec-card-trend i {
    font-size: 12px;
}

/* Main Charts Grid */
.dashboard-main-charts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 24px;
    margin-bottom: 30px;
}

/* Secondary Charts Grid */
.dashboard-secondary-charts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 24px;
    margin-bottom: 30px;
}

/* Chart Card */
.chart-card {
    background: white;
    padding: 0;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.chart-card-header {
    padding: 20px 24px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chart-card-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
    display: flex;
    align-items: center;
    gap: 8px;
}

.chart-card-header h3 i {
    color: #667eea;
}

.chart-legend {
    display: flex;
    gap: 16px;
    font-size: 13px;
}

.chart-container {
    padding: 24px;
    height: 320px;
    position: relative;
}

/* Insights Grid */
.dashboard-insights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin-bottom: 30px;
}

.insight-card {
    background: white;
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    display: flex;
    gap: 16px;
}

.insight-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: white;
    flex-shrink: 0;
}

.insight-content {
    flex: 1;
}

.insight-content h4 {
    margin: 0 0 12px 0;
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
}

.insight-content ul {
    margin: 0;
    padding-left: 20px;
    list-style: none;
}

.insight-content li {
    position: relative;
    padding-left: 8px;
    margin-bottom: 8px;
    font-size: 14px;
    color: #6b7280;
    line-height: 1.5;
}

.insight-content li:before {
    content: "•";
    position: absolute;
    left: -12px;
    color: #667eea;
    font-weight: bold;
}

.insight-content li:last-child {
    margin-bottom: 0;
}

/* Badge Styles */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    line-height: 1;
}

.badge-success {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.badge-warning {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

.badge-danger {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.badge-primary {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .dashboard-main-charts {
        grid-template-columns: 1fr;
    }
    
    .dashboard-secondary-charts {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
}

@media (max-width: 768px) {
    .dashboard-header-v2 {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    
    .dashboard-controls {
        width: 100%;
        flex-direction: column;
    }
    
    .dashboard-controls .filter-select,
    .dashboard-controls .btn-primary {
        width: 100%;
    }
    
    .executive-summary-grid {
        grid-template-columns: 1fr;
    }
    
    .dashboard-secondary-charts {
        grid-template-columns: 1fr;
    }
    
    .chart-container {
        height: 280px;
    }
    
    .exec-card {
        flex-direction: column;
        text-align: center;
    }
    
    .exec-card-detail {
        justify-content: center;
    }
}

/* Loading State */
.dashboard-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 400px;
    color: #6b7280;
}

.dashboard-loading i {
    font-size: 48px;
    margin-bottom: 16px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}
