/* Live Dashboard Section - Completely Separate CSS with Unique Class Names */
#live-dashboard {
    background: linear-gradient(135deg, #f8fafc 0%, white 100%);
    border-top: 1px solid rgba(99, 102, 241, 0.1);
    padding: 80px 0;
}

.mesh-dashboard-container {
    margin-top: 40px;
}

.mesh-stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-bottom: 40px;
    align-items: stretch;
}

.mesh-stat-card {
    background: white;
    padding: 24px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.06);
    display: flex;
    align-items: center;
    gap: 16px;
    min-height: 100px;
    overflow: hidden;
}

.mesh-stat-icon {
    width: 48px;
    height: 48px;
    background: #6957db;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
    overflow: hidden;
}

.mesh-stat-icon i {
    width: 14px;
    height: 14px;
}

.mesh-stat-content {
    flex: 1;
    min-width: 0;
}

.mesh-stat-number {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1e293b;
    line-height: 1;
    margin-bottom: 4px;
    white-space: nowrap;
}

.mesh-stat-label {
    font-size: 0.75rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}



.mesh-dashboard-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
}

.mesh-dashboard-panel {
    background: white;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.06);
    overflow: hidden;
}

.mesh-panel-header {
    background: #f8fafc;
    padding: 16px 24px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mesh-panel-header h3 {
    color: #1e293b;
    margin: 0;
    font-size: 1.125rem;
    font-weight: 600;
}

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

.mesh-filter-btn {
    padding: 8px 12px;
    border: 1px solid #e2e8f0;
    background: white;
    color: #64748b;
    border-radius: 8px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.mesh-filter-btn.active {
    background: #6957db;
    color: white;
    border-color: #6957db;
}

.mesh-view-all-btn {
    padding: 8px 12px;
    background: #6957db;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.mesh-view-all-btn:hover {
    background: #5855c7;
}

.mesh-activity-feed {
    padding: 24px;
}

.mesh-activity-item {
    display: flex;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid #e2e8f0;
}

.mesh-activity-item:last-child {
    border-bottom: none;
}

.mesh-activity-time {
    font-size: 0.75rem;
    color: #64748b;
    min-width: 60px;
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
}

.mesh-activity-content {
    display: flex;
    gap: 16px;
    flex: 1;
}

.mesh-activity-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
    overflow: hidden;
}

.mesh-activity-icon.alert {
    background: #dc2626;
}

.mesh-activity-icon.success {
    background: #16a34a;
}

.mesh-activity-icon.info {
    background: #2563eb;
}

.mesh-activity-icon i {
    width: 10px;
    height: 10px;
}

.mesh-activity-details {
    flex: 1;
}

.mesh-activity-title {
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 4px;
    font-size: 0.875rem;
}

.mesh-activity-desc {
    color: #64748b;
    margin-bottom: 8px;
    font-size: 0.75rem;
}

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

.mesh-tag {
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mesh-tag.high {
    background: #fee2e2;
    color: #dc2626;
}

.mesh-tag.medium {
    background: #fef3c7;
    color: #d97706;
}

.mesh-tag.low {
    background: #dcfce7;
    color: #166534;
}

.mesh-tag.policy {
    background: #dbeafe;
    color: #2563eb;
}

.mesh-tag.user {
    background: #f3e8ff;
    color: #7c3aed;
}

.mesh-policy-summary {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    padding: 24px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.mesh-policy-stat {
    text-align: center;
}

.mesh-policy-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: #6957db;
    line-height: 1;
    margin-bottom: 4px;
}

.mesh-policy-label {
    font-size: 0.75rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mesh-policy-chart {
    padding: 24px;
}

.mesh-chart-title {
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 24px;
    text-align: center;
}

.mesh-chart-bars {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.mesh-chart-bar {
    display: flex;
    align-items: center;
    gap: 16px;
}

.mesh-bar-label {
    width: 60px;
    font-size: 0.75rem;
    color: #64748b;
    text-transform: capitalize;
}

.mesh-bar-container {
    flex: 1;
    height: 8px;
    background: #e2e8f0;
    border-radius: 20px;
    overflow: hidden;
}

.mesh-bar-fill {
    height: 100%;
    border-radius: 20px;
    transition: width 0.3s ease;
}

.mesh-bar-fill.critical {
    background: #dc2626;
}

.mesh-bar-fill.high {
    background: #ea580c;
}

.mesh-bar-fill.medium {
    background: #d97706;
}

.mesh-bar-fill.low {
    background: #16a34a;
}

.mesh-bar-value {
    width: 30px;
    text-align: right;
    font-weight: 600;
    color: #1e293b;
    font-size: 0.75rem;
}

/* Company Logo Styling */
.mesh-company-logo-svg {
    width: 32px;
    height: 32px;
    margin-bottom: 8px;
}

/* Fix Toggle Switch Colors */
.mesh-rule-toggle {
    width: 44px;
    height: 24px;
    background: #e5e7eb;
    border-radius: 20px;
    position: relative;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid #d1d5db;
}

.mesh-rule-toggle.active {
    background: #6957db;
    border-color: #6957db;
}

.mesh-toggle-switch {
    width: 18px;
    height: 18px;
    background: white;
    border-radius: 50%;
    position: absolute;
    top: 2px;
    left: 2px;
    transition: transform 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.mesh-toggle-switch.active {
    transform: translateX(22px);
}

/* Filter Functionality */
.mesh-activity-item {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.mesh-activity-item.filtered-out {
    opacity: 0.3;
    transform: scale(0.95);
    pointer-events: none;
}

.mesh-activity-item.filtered-out .mesh-activity-content {
    filter: grayscale(0.5);
}

/* Mobile Responsiveness for Dashboard */
@media (max-width: 768px) {
    .mesh-stats-row {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
    
    .mesh-dashboard-content {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .mesh-policy-summary {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}
