// Enhanced Dashboard Styles
.wcs_home {
    display: flex;
    min-height: 100vh;
    width: 100%;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    overflow-x: hidden;

    .wcs_homeContainer {
        flex: 1;
        width: 100%;
        padding: 1.5rem;
        box-sizing: border-box;
        // max-width: 1400px;
        margin: 0 auto;

        @media (max-width: 768px) {
            padding: 1rem;
        }


        // Loading state styles
        .dashboard-loading {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            min-height: 400px;
            padding: 60px 40px;
            background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
            border-radius: 12px;
            margin: 20px;

            .loading-spinner {
                width: 60px;
                height: 60px;
                border: 5px solid rgba(255, 255, 255, 0.3);
                border-top: 5px solid #3498db;
                border-radius: 50%;
                animation: spin 0.8s linear infinite;
                margin-bottom: 30px;
                box-shadow: 0 4px 15px rgba(52, 152, 219, 0.2);
            }

            .loading-text {
                text-align: center;

                h3 {
                    color: #2c3e50;
                    font-size: 24px;
                    font-weight: 600;
                    margin: 0 0 10px 0;
                    letter-spacing: -0.5px;
                }

                p {
                    color: #5a6c7d;
                    font-size: 15px;
                    margin: 0;
                    font-weight: 400;
                    opacity: 0.9;
                }
            }
        }

        @keyframes spin {
            0% {
                transform: rotate(0deg);
            }

            100% {
                transform: rotate(360deg);
            }
        }

        // Optional: Add a subtle fade-in animation
        .wcs_dashboard_cls {
            animation: fadeIn 0.4s ease-in;
        }

        @keyframes fadeIn {
            from {
                opacity: 0;
                transform: translateY(10px);
            }

            to {
                opacity: 1;
                transform: translateY(0);
            }
        }



        .wcs_dashboard_cls {
            display: flex;
            flex-direction: column;
            gap: 2.5rem;
            width: 100%;

            // Dashboard Sections
            .dashboard-section {
                background: rgba(255, 255, 255, 0.95);
                border-radius: 16px;
                padding: 10px;
                box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
                backdrop-filter: blur(10px);
                border: 1px solid rgba(255, 255, 255, 0.2);
                transition: all 0.3s ease;
                position: relative;
                z-index: 1;

                &:hover {
                    transform: translateY(-2px);
                    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
                    z-index: 10;
                }

                @media (max-width: 768px) {
                    padding: 1.5rem;
                    border-radius: 12px;
                }

                .section-header {
                    margin-bottom: 2rem;
                    text-align: left;
                    display: flex;
                    flex-direction: column;

                    @media (max-width: 768px) {
                        margin-bottom: 1.5rem;
                    }

                    .section-title {
                        font-size: 1.75rem;
                        font-weight: 700;
                        color: #1a202c;
                        margin: 0 0 0.5rem 0;
                        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
                        -webkit-background-clip: text;
                        -webkit-text-fill-color: transparent;
                        background-clip: text;
                        line-height: 1.2;
                        display: block;

                        @media (max-width: 768px) {
                            font-size: 1.5rem;
                            line-height: 1.3;
                        }
                    }

                    .section-subtitle {
                        font-size: 1rem;
                        color: #718096;
                        margin: 0;
                        font-weight: 400;
                        line-height: 1.4;
                        display: block;

                        @media (max-width: 768px) {
                            font-size: 0.875rem;
                            line-height: 1.5;
                        }
                    }
                }

                // Section-specific styling
                &.overview-section {
                    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
                    // border-left: 4px solid #667eea;
                }

                &.analytics-section {
                    background: linear-gradient(135deg, rgba(16, 185, 129, 0.05) 0%, rgba(5, 150, 105, 0.05) 100%);
                    // border-left: 4px solid #10b981;
                }

                &.security-section {
                    background: linear-gradient(135deg, rgba(239, 68, 68, 0.05) 0%, rgba(220, 38, 38, 0.05) 100%);
                    // border-left: 4px solid #ef4444;
                }

                &.activity-section {
                    background: linear-gradient(135deg, rgba(59, 130, 246, 0.05) 0%, rgba(37, 99, 235, 0.05) 100%);
                    // border-left: 4px solid #3b82f6;
                }

                &.system-section {
                    background: linear-gradient(135deg, rgba(139, 92, 246, 0.05) 0%, rgba(124, 58, 237, 0.05) 100%);
                    // border-left: 4px solid #8b5cf6;
                }
            }

            .wcs_widgets {
                display: flex;
                flex-direction: column;
                gap: 1.5rem;
                padding: 0;
                width: 100%;

                // Widget rows for specific layouts
                .widget_row {
                    display: grid;
                    gap: 1.5rem;
                    width: 100%;

                    // Enhanced widget styling for specific types
                    &.key-metrics {
                        .wcs_widget {
                            background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
                            border: 1px solid rgba(102, 126, 234, 0.1);

                            &:hover {
                                border-color: rgba(102, 126, 234, 0.3);
                                transform: translateY(-4px);
                            }
                        }
                    }

                    &.security-widgets {
                        .wcs_widget {
                            background: linear-gradient(135deg, #ffffff 0%, #fef5f5 100%);
                            border: 1px solid rgba(239, 68, 68, 0.1);

                            &:hover {
                                border-color: rgba(239, 68, 68, 0.3);
                            }
                        }
                    }

                    &.activity-widgets {
                        .wcs_widget {
                            height: auto;
                            background: linear-gradient(135deg, #ffffff 0%, #f0f9ff 100%);
                            border: 1px solid rgba(59, 130, 246, 0.1);

                            &:hover {
                                border-color: rgba(59, 130, 246, 0.3);
                            }
                        }
                    }

                    &.activity-analytics {
                        .wcs_widget {
                            height: 400px;
                            background: linear-gradient(135deg, #ffffff 0%, #f0fdf4 100%);
                            border: 1px solid rgba(16, 185, 129, 0.1);

                            &:hover {
                                border-color: rgba(16, 185, 129, 0.3);
                            }
                        }
                    }

                    // Row with 3 widgets
                    &.widget_row_3 {
                        grid-template-columns: repeat(3, 1fr);

                        @media (max-width: 1024px) {
                            grid-template-columns: repeat(2, 1fr);

                            >*:nth-child(3) {
                                grid-column: 1 / -1;
                            }
                        }

                        @media (max-width: 768px) {
                            grid-template-columns: 1fr;

                            >*:nth-child(3) {
                                grid-column: unset;
                            }
                        }
                    }

                    // Row with 2 widgets
                    &.widget_row_2 {
                        grid-template-columns: repeat(2, 1fr);

                        @media (max-width: 768px) {
                            grid-template-columns: 1fr;
                        }
                    }

                    @media (max-width: 768px) {
                        gap: 1rem;
                    }
                }

                @media (max-width: 768px) {
                    gap: 1rem;
                }
            }



            .wcs_charts {
                width: 100%;

                &.enhanced-chart {
                    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
                    border-radius: 16px;
                    padding: 2rem;
                    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
                    border: 1px solid rgba(16, 185, 129, 0.1);
                    position: relative;
                    z-index: 5;

                    @media (max-width: 768px) {
                        padding: 1.5rem;
                        border-radius: 12px;
                    }
                }
            }

            // System Information Vertical Layout
            .system-info-vertical {
                display: flex;
                flex-direction: column;
                gap: 2rem;
                width: 100%;

                @media (max-width: 768px) {
                    gap: 1.5rem;
                }

                .system-card-full {
                    width: 100%;
                    background: linear-gradient(135deg, #ffffff 0%, #faf5ff 100%);
                    border-radius: 16px;
                    padding: 2rem;
                    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
                    border: 1px solid rgba(139, 92, 246, 0.1);
                    transition: all 0.3s ease;
                    backdrop-filter: blur(10px);
                    position: relative;
                    z-index: 3;

                    &:hover {
                        transform: translateY(-4px);
                        box-shadow: 0 16px 48px rgba(0, 0, 0, 0.12);
                        border-color: rgba(139, 92, 246, 0.3);
                        z-index: 15;
                    }

                    @media (max-width: 768px) {
                        padding: 1.5rem;
                        border-radius: 12px;
                    }

                    @media (max-width: 480px) {
                        padding: 1.25rem;
                    }
                }
            }

            // Legacy grid support (keeping for backward compatibility)
            .system-info-grid {
                display: grid;
                grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
                gap: 1.5rem;

                @media (max-width: 768px) {
                    grid-template-columns: 1fr;
                    gap: 1rem;
                }

                .system-card {
                    background: linear-gradient(135deg, #ffffff 0%, #faf5ff 100%);
                    border-radius: 12px;
                    padding: 1.5rem;
                    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
                    border: 1px solid rgba(139, 92, 246, 0.1);
                    transition: all 0.3s ease;

                    &:hover {
                        transform: translateY(-2px);
                        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
                        border-color: rgba(139, 92, 246, 0.3);
                    }

                    @media (max-width: 768px) {
                        padding: 1.25rem;
                    }
                }
            }
        }


        // All OFF status 
        // Empty State Message Styles
        .dashboard-empty-state {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            min-height: 500px;
            padding: 60px 40px;
            background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
            border-radius: 16px;
            margin: 20px 0;
            box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
            border: 2px dashed #e5e7eb;
            position: relative;
            animation: slideInUp 0.5s ease-out;

            @media (max-width: 768px) {
                min-height: 400px;
                padding: 40px 20px;
            }

            .empty-state-icon {
                margin-bottom: 30px;
                opacity: 0;
                animation: fadeInScale 0.6s ease-out 0.2s forwards;

                svg {
                    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.08));
                }
            }

            .empty-state-title {
                color: #1f2937;
                font-size: 28px;
                font-weight: 700;
                margin: 0 0 16px 0;
                text-align: center;
                opacity: 0;
                animation: fadeInUp 0.6s ease-out 0.3s forwards;

                @media (max-width: 768px) {
                    font-size: 24px;
                }
            }

            .empty-state-description {
                color: #6b7280;
                font-size: 16px;
                margin: 0 0 30px 0;
                text-align: center;
                max-width: 500px;
                line-height: 1.6;
                opacity: 0;
                animation: fadeInUp 0.6s ease-out 0.4s forwards;

                @media (max-width: 768px) {
                    font-size: 14px;
                }
            }

            .empty-state-action {
                display: flex;
                align-items: center;
                gap: 12px;
                padding: 16px 28px;
                background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
                border-radius: 12px;
                border: 1px solid #bfdbfe;
                color: #1e40af;
                font-size: 15px;
                opacity: 0;
                animation: fadeInUp 0.6s ease-out 0.5s forwards;

                @media (max-width: 768px) {
                    flex-direction: column;
                    text-align: center;
                    padding: 16px 20px;
                    font-size: 14px;
                }

                .info-icon {
                    flex-shrink: 0;
                    color: #3b82f6;
                }

                strong {
                    color: #1e3a8a;
                    font-weight: 600;
                }
            }

            .empty-state-dismiss {
                position: absolute;
                top: 20px;
                right: 20px;
                background: transparent;
                border: none;
                color: #9ca3af;
                cursor: pointer;
                padding: 8px;
                border-radius: 8px;
                transition: all 0.2s ease;
                display: flex;
                align-items: center;
                justify-content: center;

                &:hover {
                    background: #f3f4f6;
                    color: #4b5563;
                    transform: rotate(90deg);
                }

                &:active {
                    transform: rotate(90deg) scale(0.95);
                }
            }
        }

        // Animations
        @keyframes slideInUp {
            from {
                opacity: 0;
                transform: translateY(30px);
            }

            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        @keyframes fadeInUp {
            from {
                opacity: 0;
                transform: translateY(20px);
            }

            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        @keyframes fadeInScale {
            from {
                opacity: 0;
                transform: scale(0.8);
            }

            to {
                opacity: 1;
                transform: scale(1);
            }
        }

    }
}

// Additional utility classes
.dashboard_active {
    width: 100%;
}

.wcs_free {
    width: 100%;
}

// Enhanced transitions and animations
.wcs_widgets,
.wcs_charts,
.dashboard-section {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

    100% {
        background-position: 200% 0;
    }
}

// Container max-width for very large screens
@media (min-width: 1920px) {
    .wcs_homeContainer {
        max-width: 1600px;
    }
}

// 7-Day R
olling Analytics Section .rolling-analytics-section {
    margin: 30px 0;

    .section-header {
        margin-bottom: 20px;

        .section-title {
            color: #1f2937;
            font-size: 24px;
            font-weight: 600;
            margin: 0 0 8px 0;
            display: flex;
            align-items: center;
            gap: 12px;

            &::before {
                content: "📊";
                font-size: 28px;
            }
        }

        .section-subtitle {
            color: #6b7280;
            font-size: 14px;
            margin: 0;
            font-weight: 400;
        }
    }
}