/**
 * Dashboard Overview Styles
 * Matching the design from the provided image
 */

/* Dashboard Overview Container */
.dashboard-overview {
    padding: 24px;
    background: linear-gradient(135deg, var(--theme-bg-primary, #0a0a0a) 0%, #1a1a2e 50%, #16213e 100%);
    min-height: 100vh;
    color: var(--theme-text-primary, #ffffff);
    position: relative;
    overflow: hidden;
}

.dashboard-overview::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 80%, rgba(0, 255, 255, 0.03) 0%, transparent 50%),
                radial-gradient(circle at 80% 20%, rgba(255, 0, 255, 0.03) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.dashboard-overview > * {
    position: relative;
    z-index: 1;
}

/* Welcome Section */
.welcome-section {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 32px;
    padding: 32px 0;
    animation: fadeInUp 0.8s ease-out;
}

.welcome-content h1.welcome-title {
    font-size: 2.8rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--theme-accent, #00ffff) 0%, #00e6e6 50%, #00cccc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0 0 12px 0;
    line-height: 1.2;
    text-shadow: 0 0 30px rgba(0, 255, 255, 0.3);
    animation: glow 2s ease-in-out infinite alternate;
}

.welcome-content .welcome-subtitle {
    font-size: 1.2rem;
    color: var(--theme-text-secondary, #e0e0e0);
    margin: 0;
    line-height: 1.5;
    opacity: 0.9;
    animation: fadeIn 1s ease-out 0.3s both;
}

.quick-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.screen-limit-warning {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(255, 0, 255, 0.1);
    border: 1px solid rgba(255, 0, 255, 0.3);
    border-radius: 8px;
    color: #ff00ff;
    font-size: 0.9rem;
    font-weight: 500;
}

.warning-icon {
    font-size: 1.2rem;
    font-weight: bold;
}

.quick-action-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.quick-action-btn.primary {
    background: #0066cc;
    color: white;
}

.quick-action-btn.primary:hover {
    background: #0052a3;
    transform: translateY(-2px);
}

.quick-action-btn.secondary {
    background: var(--theme-bg-tertiary, #2a2a2a);
    color: var(--theme-text-primary, #ffffff);
    border: 1px solid var(--theme-border-subtle, rgba(255, 255, 255, 0.1));
}

.quick-action-btn.secondary:hover {
    background: var(--theme-bg-surface, rgba(26, 26, 26, 0.8));
    border-color: var(--theme-border-primary, rgba(0, 230, 230, 0.3));
}

.btn-icon {
    font-size: 1.1rem;
}

/* Statistics Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-bottom: 40px;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.stat-card {
    background: linear-gradient(135deg, var(--theme-bg-secondary, #1a1a1a) 0%, rgba(26, 26, 46, 0.8) 100%);
    border: 1px solid var(--theme-border-subtle, rgba(255, 255, 255, 0.1));
    border-radius: 16px;
    padding: 28px;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 255, 255, 0.05) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.stat-card:hover {
    border-color: var(--theme-border-primary, rgba(0, 230, 230, 0.4));
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 230, 230, 0.15), 
                0 0 20px rgba(0, 255, 255, 0.1);
}

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

.stat-icon {
    font-size: 2.2rem;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: var(--theme-bg-tertiary, #2a2a2a);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.stat-icon::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.2) 0%, transparent 70%);
    transition: all 0.4s ease;
    transform: translate(-50%, -50%);
    border-radius: 50%;
}

.stat-card:hover .stat-icon::before {
    width: 100%;
    height: 100%;
}

.stat-icon.monitor-icon {
    background: linear-gradient(135deg, rgba(0, 102, 204, 0.3) 0%, rgba(0, 102, 204, 0.1) 100%);
    color: #0066cc;
    box-shadow: 0 0 20px rgba(0, 102, 204, 0.2);
}

.stat-icon.chart-icon {
    background: linear-gradient(135deg, rgba(255, 0, 255, 0.3) 0%, rgba(255, 0, 255, 0.1) 100%);
    color: #ff00ff;
    box-shadow: 0 0 20px rgba(255, 0, 255, 0.2);
}

.stat-icon.active-icon {
    background: linear-gradient(135deg, rgba(255, 170, 0, 0.3) 0%, rgba(255, 170, 0, 0.1) 100%);
    color: #ffaa00;
    box-shadow: 0 0 20px rgba(255, 170, 0, 0.2);
}

.stat-icon.plan-icon {
    background: linear-gradient(135deg, rgba(0, 230, 230, 0.3) 0%, rgba(0, 230, 230, 0.1) 100%);
    color: #00e6e6;
    box-shadow: 0 0 20px rgba(0, 230, 230, 0.2);
}

.stat-content {
    flex: 1;
}

.stat-number {
    font-size: 2.4rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--theme-text-primary, #ffffff) 0%, #e0e0e0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    margin-bottom: 6px;
    transition: all 0.3s ease;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
}

.stat-number.plan-text {
    background: linear-gradient(135deg, var(--theme-accent, #00ffff) 0%, #00e6e6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 20px rgba(0, 255, 255, 0.3);
}

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

.stat-label {
    font-size: 1rem;
    font-weight: 500;
    color: var(--theme-text-primary, #ffffff);
    margin-bottom: 4px;
}

.stat-sublabel {
    font-size: 0.85rem;
    color: var(--theme-text-tertiary, #b0b0b0);
}

/* Section Headers */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--theme-accent, #00ffff);
    margin: 0;
}

.view-all-link {
    color: var(--theme-accent, #00ffff);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.view-all-link:hover {
    color: var(--theme-primary, #00e6e6);
}

/* Recent Activity */
.recent-activity {
    margin-bottom: 40px;
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

.activity-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 16px;
    background: linear-gradient(135deg, var(--theme-bg-secondary, #1a1a1a) 0%, rgba(26, 26, 46, 0.8) 100%);
    border: 1px solid var(--theme-border-subtle, rgba(255, 255, 255, 0.1));
    border-radius: 16px;
    padding: 24px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.activity-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 255, 255, 0.03) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.activity-item:hover {
    border-color: var(--theme-border-primary, rgba(0, 230, 230, 0.4));
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 230, 230, 0.1);
}

.activity-item:hover::before {
    opacity: 1;
}

.activity-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 102, 204, 0.2);
    border-radius: 8px;
    color: #0066cc;
}

.activity-icon .icon {
    font-size: 1.5rem;
}

.activity-content {
    flex: 1;
}

.activity-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--theme-text-primary, #ffffff);
    margin-bottom: 4px;
}

.activity-description {
    font-size: 0.9rem;
    color: var(--theme-text-secondary, #e0e0e0);
    margin-bottom: 8px;
}

.activity-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
}

.status-label {
    color: var(--theme-text-tertiary, #b0b0b0);
}

.status {
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: 500;
    font-size: 0.8rem;
}

.status.active {
    background: rgba(0, 255, 136, 0.2);
    color: #00ff88;
}

.status.inactive {
    background: rgba(255, 71, 87, 0.2);
    color: #ff4757;
}

.last-updated {
    color: var(--theme-text-tertiary, #b0b0b0);
}

.activity-actions {
    display: flex;
    gap: 8px;
}

.btn {
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background: #0066cc;
    color: white;
}

.btn-primary:hover {
    background: #0052a3;
}

.btn-secondary {
    background: var(--theme-bg-tertiary, #2a2a2a);
    color: var(--theme-text-primary, #ffffff);
    border: 1px solid var(--theme-border-subtle, rgba(255, 255, 255, 0.1));
}

.btn-secondary:hover {
    background: var(--theme-bg-surface, rgba(26, 26, 26, 0.8));
    border-color: var(--theme-border-primary, rgba(0, 230, 230, 0.3));
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.8rem;
}

/* System Status */
.system-status {
    margin-bottom: 40px;
    animation: fadeInUp 0.8s ease-out 0.6s both;
}

.status-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.status-item {
    display: flex;
    align-items: center;
    gap: 16px;
    background: linear-gradient(135deg, var(--theme-bg-secondary, #1a1a1a) 0%, rgba(26, 26, 46, 0.8) 100%);
    border: 1px solid var(--theme-border-subtle, rgba(255, 255, 255, 0.1));
    border-radius: 16px;
    padding: 24px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.status-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 255, 255, 0.03) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.status-item:hover {
    border-color: var(--theme-border-primary, rgba(0, 230, 230, 0.4));
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0, 230, 230, 0.1);
}

.status-item:hover::before {
    opacity: 1;
}

.status-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}

.status-indicator.online {
    background: #00ff88;
    box-shadow: 0 0 12px rgba(0, 255, 136, 0.6);
    animation: pulse-green 2s ease-in-out infinite;
}

.status-indicator.warning {
    background: #ffaa00;
    box-shadow: 0 0 12px rgba(255, 170, 0, 0.6);
    animation: pulse-orange 2s ease-in-out infinite;
}

.status-indicator.offline {
    background: #ff4757;
    box-shadow: 0 0 12px rgba(255, 71, 87, 0.6);
    animation: pulse-red 2s ease-in-out infinite;
}

.status-content {
    flex: 1;
}

.status-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--theme-text-primary, #ffffff);
    margin-bottom: 4px;
}

.status-description {
    font-size: 0.9rem;
    color: var(--theme-text-secondary, #e0e0e0);
}

/* Empty State */
.empty-activity {
    text-align: center;
    padding: 60px 20px;
    background: var(--theme-bg-secondary, #1a1a1a);
    border: 1px solid var(--theme-border-subtle, rgba(255, 255, 255, 0.1));
    border-radius: 12px;
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-activity h3 {
    font-size: 1.5rem;
    color: var(--theme-text-primary, #ffffff);
    margin-bottom: 8px;
}

.empty-activity p {
    color: var(--theme-text-secondary, #e0e0e0);
    margin-bottom: 24px;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .dashboard-overview {
        padding: 16px;
    }
    
    .welcome-section {
        flex-direction: column;
        gap: 16px;
        align-items: flex-start;
    }
    
    .welcome-content h1.welcome-title {
        font-size: 2rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .quick-actions {
        flex-wrap: wrap;
        gap: 12px;
    }
    
    .activity-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .activity-actions {
        width: 100%;
        justify-content: flex-end;
    }
}

@media (max-width: 480px) {
    .quick-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .quick-action-btn {
        width: 100%;
        justify-content: center;
    }
    
    .activity-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
}

/* ============================================================================
   ANIMATIONS
   ============================================================================ */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes glow {
    0% {
        text-shadow: 0 0 30px rgba(0, 255, 255, 0.3);
    }
    100% {
        text-shadow: 0 0 40px rgba(0, 255, 255, 0.6), 0 0 60px rgba(0, 255, 255, 0.3);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Staggered animations for stat cards */
.stat-card:nth-child(1) { animation-delay: 0.1s; }
.stat-card:nth-child(2) { animation-delay: 0.2s; }
.stat-card:nth-child(3) { animation-delay: 0.3s; }
.stat-card:nth-child(4) { animation-delay: 0.4s; }

/* Floating animation for icons */
.stat-icon {
    animation: float 3s ease-in-out infinite;
}

.stat-icon:nth-child(odd) {
    animation-delay: 0.5s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-5px);
    }
}

@keyframes pulse-green {
    0%, 100% {
        box-shadow: 0 0 12px rgba(0, 255, 136, 0.6);
    }
    50% {
        box-shadow: 0 0 20px rgba(0, 255, 136, 0.8), 0 0 30px rgba(0, 255, 136, 0.4);
    }
}

@keyframes pulse-orange {
    0%, 100% {
        box-shadow: 0 0 12px rgba(255, 170, 0, 0.6);
    }
    50% {
        box-shadow: 0 0 20px rgba(255, 170, 0, 0.8), 0 0 30px rgba(255, 170, 0, 0.4);
    }
}

@keyframes pulse-red {
    0%, 100% {
        box-shadow: 0 0 12px rgba(255, 71, 87, 0.6);
    }
    50% {
        box-shadow: 0 0 20px rgba(255, 71, 87, 0.8), 0 0 30px rgba(255, 71, 87, 0.4);
    }
}
