/* ===============================================
   SINet - Dashboard Styles
   =============================================== */

/* Welcome Banner (Enhanced) */
.welcome-banner {
    color: white;
    padding: 40px;
    border-radius: var(--radius);
    margin-bottom: 30px;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.welcome-banner::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGNpcmNsZSBjeD0iMiIgY3k9IjIiIHI9IjIiIGZpbGw9InJnYmEoMjU1LDI1NSwyNTUsMC4xKSIvPjwvc3ZnPg==');
    opacity: 0.3;
}

.welcome-content {
    position: relative;
    z-index: 1;
}

.welcome-title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 10px;
}

.welcome-subtitle {
    font-size: 18px;
    opacity: 0.9;
    max-width: 600px;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--bg-card);
    padding: 25px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    transition: transform var(--transition-normal);
    border: 1px solid var(--border-color);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-right: 20px;
}

.stat-icon.blue { background: #e0f2fe; color: #0284c7; }
.stat-icon.purple { background: #f3e8ff; color: #9333ea; }
.stat-icon.amber { background: #fef3c7; color: #d97706; }
.stat-icon.green { background: #dcfce7; color: #166534; }

.stat-info h3 {
    font-size: 28px;
    font-weight: 700;
    margin: 0;
}

.stat-info p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
}

/* Dashboard Row - Packets Chart & Active Satellites */
.dashboard-row {
    display: flex;
    flex-wrap: wrap;
    margin-right: -15px;
    margin-left: -15px;
}

.dashboard-col-chart {
    flex: 0 0 70%;
    max-width: 70%;
    padding-right: 15px;
    padding-left: 15px;
}

.dashboard-col-sidebar {
    flex: 0 0 30%;
    max-width: 30%;
    padding-right: 15px;
    padding-left: 15px;
}

/* Mobile Responsive Styles */
@media (max-width: 992px) {
    .dashboard-col-chart,
    .dashboard-col-sidebar {
        flex: 0 0 100%;
        max-width: 100%;
        margin-bottom: 20px;
    }
    
    .dashboard-col-sidebar {
        margin-bottom: 0;
    }
}

@media (max-width: 768px) {
    .welcome-banner {
        padding: 25px;
    }
    
    .welcome-title {
        font-size: 22px;
    }
    
    .welcome-subtitle {
        font-size: 14px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 12px;
    }
    
    .stat-card {
        padding: 15px;
    }
    
    .stat-icon {
        width: 45px;
        height: 45px;
        font-size: 18px;
        margin-right: 12px;
    }
    
    .stat-info h3 {
        font-size: 22px;
    }
    
    .stat-info p {
        font-size: 12px;
    }
    
    /* Reduce items shown on mobile for satellites list */
    .satellites-list .satellite-badge:nth-child(n+5) {
        display: none;
    }
    
    /* Show the "+more" badge on mobile */
    .satellites-list .satellite-badge:last-child {
        display: inline-flex !important;
    }
    
    .chart-container {
        padding: 15px;
    }
    
    .chart-container h3 {
        font-size: 16px;
    }
    
    #packetsChart {
        height: 250px !important;
    }
    
    .visualization-body {
        height: 300px;
    }
}

@media (max-width: 576px) {
    .welcome-banner {
        padding: 20px;
    }
    
    .welcome-title {
        font-size: 18px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    /* Reduce items shown on small mobile for satellites list */
    .satellites-list .satellite-badge:nth-child(n+4) {
        display: none;
    }
    
    .satellites-list .satellite-badge:last-child {
        display: inline-flex !important;
    }
    
    #packetsChart {
        height: 200px !important;
    }
    
    .visualization-body {
        height: 250px;
    }
}

/* Quick Actions */
.action-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.action-card {
    background: var(--bg-card);
    padding: 20px;
    border-radius: var(--radius);
    text-align: center;
    text-decoration: none;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-sm);
}

.action-card:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.action-card:hover i {
    color: white;
}

.action-card i {
    font-size: 32px;
    color: var(--primary-color);
    margin-bottom: 15px;
    transition: color var(--transition-normal);
}

.action-card h4 {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
}

/* Activity Section */
.activity-section {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 25px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.section-title {
    font-size: 20px;
    font-weight: 600;
    margin: 0;
}

.activity-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.activity-item {
    display: flex;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid var(--border-color);
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    color: var(--text-secondary);
}

.activity-details {
    flex: 1;
}

.activity-text {
    font-weight: 500;
    margin-bottom: 4px;
}

.activity-time {
    font-size: 12px;
    color: var(--text-secondary);
}

/* 3D Visualization / Satvis Frame */
.visualization-container {
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    overflow: hidden;
    margin-bottom: 30px;
}

.visualization-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-bottom: 1px solid var(--border-color);
}

.visualization-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 10px;
}

.visualization-header h3 i {
    color: #60a5fa;
}

.visualization-controls {
    display: flex;
    gap: 10px;
}

.visualization-controls .btn {
    padding: 6px 12px;
    font-size: 13px;
    border-radius: 6px;
    transition: all var(--transition-normal);
}

.visualization-body {
    position: relative;
    width: 100%;
    height: 500px;
    background: #0a0a1a;
}

.satvis-frame {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

.satvis-frame-fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9999;
}

/* Fullscreen button styling */
.btn-fullscreen {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
}

.btn-fullscreen:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

/* Loading overlay for visualization */
.viz-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 10, 26, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10;
    color: #fff;
}

.viz-loading-overlay .spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: #60a5fa;
    border-radius: 50%;
    animation: viz-spin 1s linear infinite;
}

@keyframes viz-spin {
    to { transform: rotate(360deg); }
}

.viz-loading-overlay p {
    margin-top: 15px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
}
