/**
 * NSRP - Components Stylesheet
 * Additional styles for charts, modals, and UI components
 */

/* ============================================
   Simple Chart Styles
   ============================================ */
.simple-chart {
    width: 100%;
    padding: 1rem 0;
}

.chart-bar {
    margin-bottom: 1rem;
}

.bar-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}

.bar-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    height: 24px;
    background: var(--bg-tertiary);
    border-radius: 4px;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 1s ease;
}

.bar-value {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-right: 0.5rem;
}

/* ============================================
   Line Chart Styles
   ============================================ */
.simple-line-chart {
    position: relative;
    height: 200px;
    padding: 20px 0;
}

.chart-points {
    position: relative;
    height: 100%;
}

.point-container {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    transform: translateX(-50%);
    bottom: 30px;
}

.point {
    width: 10px;
    height: 10px;
    background: var(--primary-light);
    border-radius: 50%;
    position: absolute;
    box-shadow: 0 0 10px var(--primary-light);
}

.point-value {
    position: absolute;
    top: -25px;
    font-size: 0.8rem;
    color: var(--text-primary);
}

.point-label {
    position: absolute;
    bottom: -25px;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.chart-line {
    position: absolute;
    top: 20px;
    left: 0;
    width: 100%;
    height: calc(100% - 60px);
}

/* ============================================
   Scenario Preview Modal
   ============================================ */
.scenario-preview {
    padding: 0.5rem 0;
}

.scenario-preview h4 {
    color: var(--primary-light);
    margin-bottom: 0.75rem;
}

.scenario-preview p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.preview-details {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding: 1rem;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
}

.preview-details .detail {
    font-size: 0.9rem;
}

.preview-details strong {
    color: var(--text-muted);
}

.objectives {
    padding: 1rem;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
}

.objectives strong {
    color: var(--text-primary);
    display: block;
    margin-bottom: 0.5rem;
}

.objectives ul {
    margin: 0;
    padding-left: 1.25rem;
}

.objectives li {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

/* ============================================
   Results Modal
   ============================================ */
.results-container {
    padding: 0.5rem 0;
}

.results-header {
    text-align: center;
    padding: 2rem;
    border-radius: var(--radius-lg);
    margin-bottom: 1.5rem;
}

.results-header.excellent {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(16, 185, 129, 0.1));
    border: 1px solid var(--success-color);
}

.results-header.good {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(59, 130, 246, 0.1));
    border: 1px solid var(--info-color);
}

.results-header.average {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(245, 158, 11, 0.1));
    border: 1px solid var(--warning-color);
}

.results-header.pass {
    background: linear-gradient(135deg, rgba(100, 116, 139, 0.2), rgba(100, 116, 139, 0.1));
    border: 1px solid var(--text-muted);
}

.results-header.fail {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.2), rgba(239, 68, 68, 0.1));
    border: 1px solid var(--danger-color);
}

.results-grade {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
}

.results-percentage {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary-light);
}

.results-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.result-stat {
    padding: 1rem;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    text-align: center;
}

.result-stat .stat-label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.result-stat .stat-value {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

.results-decisions {
    margin-bottom: 1.5rem;
}

.results-decisions h4 {
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    font-size: 1rem;
}

.decision-summary {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    margin-bottom: 0.5rem;
}

.decision-summary.optimal {
    border-left: 3px solid var(--success-color);
}

.phase-num {
    font-size: 0.8rem;
    color: var(--text-muted);
    min-width: 50px;
}

.decision-name {
    flex: 1;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.decision-score {
    font-weight: 600;
    font-size: 0.9rem;
}

.decision-score.positive {
    color: var(--success-color);
}

.decision-score.negative {
    color: var(--danger-color);
}

.results-recommendations h4 {
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    font-size: 1rem;
}

.results-recommendations ul {
    margin: 0;
    padding-left: 1.25rem;
}

.results-recommendations li {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

/* ============================================
   Emergency Modal
   ============================================ */
.emergency-modal {
    text-align: center;
}

.emergency-warning {
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.2), rgba(127, 29, 29, 0.2));
    border-radius: var(--radius-lg);
    margin-bottom: 1rem;
}

.emergency-warning i {
    font-size: 3rem;
    color: var(--danger-color);
    margin-bottom: 0.5rem;
}

.emergency-warning h4 {
    color: var(--danger-color);
    margin: 0;
}

.emergency-modal ul {
    text-align: left;
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.emergency-modal li {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.warning-text {
    color: var(--warning-color);
    font-weight: 500;
}

/* ============================================
   Contact Options
   ============================================ */
.contact-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.contact-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1.5rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition-fast);
}

.contact-btn:hover {
    background: var(--bg-card);
    border-color: var(--primary-light);
}

.contact-btn i {
    font-size: 1.5rem;
    color: var(--primary-light);
}

.contact-btn span {
    font-size: 0.95rem;
    color: var(--text-primary);
    font-weight: 500;
}

.contact-btn small {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ============================================
   Situation Updates
   ============================================ */
.update-item.positive {
    color: var(--success-color);
}

.update-item.negative {
    color: var(--danger-color);
}

/* ============================================
   No Data Message
   ============================================ */
.no-data {
    text-align: center;
    color: var(--text-muted);
    padding: 2rem;
}

/* ============================================
   Flash Animation
   ============================================ */
@keyframes flash {
    0%, 100% { background-color: var(--bg-primary); }
    50% { background-color: rgba(239, 68, 68, 0.1); }
}

/* ============================================
   Performance Analysis
   ============================================ */
.performance-overview {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.performance-stat {
    background: var(--bg-tertiary);
    padding: 1.5rem;
    border-radius: var(--radius-md);
    text-align: center;
}

.performance-stat .stat-value {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-light);
    margin-bottom: 0.5rem;
}

.performance-stat .stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.category-breakdown {
    background: var(--bg-tertiary);
    padding: 1.5rem;
    border-radius: var(--radius-md);
}

.category-breakdown h4 {
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.category-stat {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.cat-label {
    width: 120px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.cat-bar {
    flex: 1;
    height: 8px;
    background: var(--bg-secondary);
    border-radius: 4px;
    overflow: hidden;
}

.cat-fill {
    height: 100%;
    background: var(--primary-light);
    border-radius: 4px;
    transition: width 0.5s ease;
}

.cat-value {
    width: 50px;
    text-align: right;
    font-weight: 600;
    color: var(--text-primary);
}

/* ============================================
   Profile Modal
   ============================================ */
.profile-modal {
    text-align: center;
}

.profile-header {
    padding: 2rem;
    background: linear-gradient(135deg, var(--bg-tertiary), var(--bg-secondary));
    border-radius: var(--radius-lg);
    margin-bottom: 1.5rem;
}

.profile-avatar {
    font-size: 4rem;
    color: var(--primary-light);
    margin-bottom: 1rem;
}

.profile-header h3 {
    color: var(--text-primary);
    margin: 0 0 0.5rem 0;
    font-size: 1.5rem;
}

.profile-role {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: var(--primary-color);
    color: white;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.profile-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.profile-stat {
    padding: 1rem;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
}

.profile-stat .stat-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-light);
}

.profile-stat .stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.profile-info {
    text-align: left;
}

.profile-info .info-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    margin-bottom: 0.5rem;
}

.profile-info .info-row i {
    color: var(--primary-light);
    width: 20px;
}

.profile-info .info-row span {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* ============================================
   Keyboard Shortcuts Modal
   ============================================ */
.keyboard-shortcuts {
    padding: 0.5rem 0;
}

.shortcut-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    margin-bottom: 0.5rem;
}

.shortcut-item kbd {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.85rem;
    color: var(--primary-light);
    box-shadow: 0 2px 0 var(--border-color);
}

.shortcut-item span {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* ============================================
   Loading States & Skeleton Loaders
   ============================================ */
.skeleton {
    background: linear-gradient(90deg,
        var(--bg-tertiary) 25%,
        var(--bg-secondary) 50%,
        var(--bg-tertiary) 75%
    );
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: var(--radius-md);
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.skeleton-card {
    height: 120px;
    margin-bottom: 1rem;
}

.skeleton-line {
    height: 16px;
    margin-bottom: 0.5rem;
}

.skeleton-line.short {
    width: 60%;
}

.skeleton-line.medium {
    width: 80%;
}

.skeleton-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
}

/* Loading spinner */
.loading-spinner {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.loading-spinner::after {
    content: '';
    width: 40px;
    height: 40px;
    border: 3px solid var(--bg-tertiary);
    border-top-color: var(--primary-light);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* ============================================
   Enhanced Dashboard Widgets
   ============================================ */
.widget-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    transition: var(--transition-fast);
}

.widget-card:hover {
    border-color: var(--primary-light);
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.1);
}

.widget-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.widget-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-primary);
    font-weight: 600;
}

.widget-title i {
    color: var(--primary-light);
}

.widget-actions {
    display: flex;
    gap: 0.5rem;
}

.widget-content {
    min-height: 100px;
}

/* Progress Ring */
.progress-ring {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto;
}

.progress-ring svg {
    transform: rotate(-90deg);
}

.progress-ring circle {
    fill: none;
    stroke-width: 8;
}

.progress-ring .ring-bg {
    stroke: var(--bg-tertiary);
}

.progress-ring .ring-progress {
    stroke: var(--primary-light);
    stroke-linecap: round;
    transition: stroke-dashoffset 0.5s ease;
}

.progress-ring .ring-value {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

/* Quick Stats Row */
.quick-stats {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.quick-stat {
    flex: 1;
    min-width: 80px;
    padding: 0.75rem;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    text-align: center;
}

.quick-stat .value {
    display: block;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-light);
}

.quick-stat .label {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Status Indicator */
.status-indicator-dot {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.status-indicator-dot.online {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success-color);
}

.status-indicator-dot.offline {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger-color);
}

.status-indicator-dot.warning {
    background: rgba(245, 158, 11, 0.15);
    color: var(--warning-color);
}

.status-indicator-dot::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* ============================================
   Responsive Adjustments
   ============================================ */
@media (max-width: 768px) {
    .performance-overview {
        grid-template-columns: repeat(2, 1fr);
    }

    .profile-stats {
        grid-template-columns: 1fr;
    }

    .contact-options {
        grid-template-columns: 1fr;
    }

    .preview-details {
        grid-template-columns: 1fr;
    }

    .results-stats {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .performance-overview {
        grid-template-columns: 1fr;
    }

    .shortcut-item {
        flex-direction: column;
        text-align: center;
    }
}

/* ============================================
   Enhanced Visual Dashboard Components
   ============================================ */

/* Animated Gradient Border Card */
.gradient-card {
    position: relative;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    overflow: hidden;
}

.gradient-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6, #ec4899, #f59e0b);
    background-size: 300% 100%;
    animation: gradient-shift 3s ease infinite;
}

@keyframes gradient-shift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* System Health Widget */
.system-health-widget {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
}

.health-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.health-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 600;
    color: var(--text-primary);
}

.health-title i {
    color: #10b981;
    font-size: 1.25rem;
}

.health-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.75rem;
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.health-status.warning {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
}

.health-status.critical {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.health-metrics {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.health-metric {
    padding: 1rem;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
}

.metric-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.metric-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.metric-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.metric-bar {
    height: 6px;
    background: var(--bg-secondary);
    border-radius: 3px;
    overflow: hidden;
}

.metric-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.5s ease;
}

.metric-fill.good { background: linear-gradient(90deg, #10b981, #059669); }
.metric-fill.warning { background: linear-gradient(90deg, #f59e0b, #d97706); }
.metric-fill.danger { background: linear-gradient(90deg, #ef4444, #dc2626); }

/* Activity Timeline */
.activity-timeline {
    position: relative;
    padding-left: 1.5rem;
}

.activity-timeline::before {
    content: '';
    position: absolute;
    left: 7px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border-color);
}

.timeline-item {
    position: relative;
    padding-bottom: 1.5rem;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-dot {
    position: absolute;
    left: -1.5rem;
    top: 4px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 3px solid var(--primary-light);
    z-index: 1;
}

.timeline-dot.success { border-color: #10b981; }
.timeline-dot.warning { border-color: #f59e0b; }
.timeline-dot.danger { border-color: #ef4444; }
.timeline-dot.info { border-color: #3b82f6; }

.timeline-content {
    background: var(--bg-tertiary);
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    margin-left: 0.5rem;
}

.timeline-title {
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.timeline-time {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

/* Threat Overview Cards */
.threat-overview-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.threat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    text-align: center;
    transition: var(--transition-fast);
    cursor: pointer;
}

.threat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.threat-card.critical {
    border-color: rgba(239, 68, 68, 0.5);
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1), var(--bg-card));
}

.threat-card.high {
    border-color: rgba(245, 158, 11, 0.5);
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), var(--bg-card));
}

.threat-card.medium {
    border-color: rgba(59, 130, 246, 0.5);
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), var(--bg-card));
}

.threat-card.low {
    border-color: rgba(16, 185, 129, 0.5);
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), var(--bg-card));
}

.threat-icon {
    width: 50px;
    height: 50px;
    margin: 0 auto 0.75rem;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.threat-card.critical .threat-icon { background: rgba(239, 68, 68, 0.2); color: #ef4444; }
.threat-card.high .threat-icon { background: rgba(245, 158, 11, 0.2); color: #f59e0b; }
.threat-card.medium .threat-icon { background: rgba(59, 130, 246, 0.2); color: #3b82f6; }
.threat-card.low .threat-icon { background: rgba(16, 185, 129, 0.2); color: #10b981; }

.threat-count {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
}

.threat-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
}

/* Live Counter Animation */
.live-counter {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.live-counter::before {
    content: '';
    width: 8px;
    height: 8px;
    background: #ef4444;
    border-radius: 50%;
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* Network Status Panel */
.network-status {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
}

.network-node {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
}

.node-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.node-icon.server { background: rgba(59, 130, 246, 0.2); color: #3b82f6; }
.node-icon.firewall { background: rgba(239, 68, 68, 0.2); color: #ef4444; }
.node-icon.database { background: rgba(16, 185, 129, 0.2); color: #10b981; }
.node-icon.api { background: rgba(139, 92, 246, 0.2); color: #8b5cf6; }
.node-icon.storage { background: rgba(245, 158, 11, 0.2); color: #f59e0b; }
.node-icon.network { background: rgba(6, 182, 212, 0.2); color: #06b6d4; }

.node-info {
    flex: 1;
    min-width: 0;
}

.node-name {
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.node-status {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.node-status.online { color: #10b981; }
.node-status.offline { color: #ef4444; }
.node-status.degraded { color: #f59e0b; }

/* World Threat Map Mini Stats */
.map-mini-stats {
    display: flex;
    gap: 0.5rem;
    padding: 0.75rem;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-md);
}

.map-stat {
    padding: 0.5rem 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-sm);
    text-align: center;
}

.map-stat .value {
    font-size: 1.1rem;
    font-weight: 700;
    color: white;
}

.map-stat .label {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
}

/* Animated Background Patterns */
.pattern-bg {
    position: relative;
    overflow: hidden;
}

.pattern-bg::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: radial-gradient(rgba(59, 130, 246, 0.1) 1px, transparent 1px);
    background-size: 20px 20px;
    pointer-events: none;
}

/* Glassmorphism Cards */
.glass-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
}

/* Notification Badge */
.notification-badge {
    position: relative;
}

.notification-badge::after {
    content: attr(data-count);
    position: absolute;
    top: -8px;
    right: -8px;
    min-width: 18px;
    height: 18px;
    background: #ef4444;
    color: white;
    font-size: 0.7rem;
    font-weight: 600;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}

/* Glow Effects */
.glow-effect {
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.3);
}

.glow-effect.danger {
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.3);
}

.glow-effect.success {
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.3);
}

.glow-effect.warning {
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.3);
}

/* Card Hover Animations */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

/* Pulse Ring Animation */
.pulse-ring {
    position: relative;
}

.pulse-ring::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid var(--primary-light);
    transform: translate(-50%, -50%);
    animation: pulse-ring 2s ease-out infinite;
}

@keyframes pulse-ring {
    0% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
    100% { transform: translate(-50%, -50%) scale(1.5); opacity: 0; }
}

/* Typing Animation */
.typing-animation {
    display: inline-block;
    overflow: hidden;
    border-right: 2px solid var(--primary-light);
    white-space: nowrap;
    animation: typing 3s steps(40, end), blink-caret 0.75s step-end infinite;
}

@keyframes typing {
    from { width: 0; }
    to { width: 100%; }
}

@keyframes blink-caret {
    from, to { border-color: transparent; }
    50% { border-color: var(--primary-light); }
}

/* Fade In Up Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Fade In Animation */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Scale In Animation */
@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Slide In From Right */
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Data Grid */
.data-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

/* Info Banner */
.info-banner {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(139, 92, 246, 0.15));
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: var(--radius-lg);
    margin-bottom: 1.5rem;
}

.info-banner i {
    font-size: 1.5rem;
    color: var(--primary-light);
}

.info-banner-content {
    flex: 1;
}

.info-banner-title {
    font-weight: 600;
    color: var(--text-primary);
}

.info-banner-text {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* Responsive Adjustments for New Components */
@media (max-width: 1024px) {
    .threat-overview-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .network-status {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

    .network-status {
        grid-template-columns: 1fr;
    }

    .health-metrics {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   Light Theme
   ============================================ */
body.light-theme {
    --bg-primary: #f8fafc;
    --bg-secondary: #e2e8f0;
    --bg-tertiary: #cbd5e1;
    --bg-card: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --border-color: #cbd5e1;
    --primary-light: #2563eb;
}

body.light-theme .header {
    background: linear-gradient(135deg, #1e40af, #3b82f6);
}

body.light-theme .main-nav {
    background: #ffffff;
    border-bottom: 1px solid var(--border-color);
}

body.light-theme .nav-btn {
    color: #475569;
}

body.light-theme .nav-btn:hover,
body.light-theme .nav-btn.active {
    background: rgba(59, 130, 246, 0.1);
    color: #2563eb;
}

body.light-theme .dashboard-card,
body.light-theme .stat-card,
body.light-theme .admin-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

body.light-theme .modal {
    background: #ffffff;
    color: #1e293b;
}

body.light-theme .modal-header {
    border-bottom: 1px solid #e2e8f0;
}

body.light-theme .notification {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    color: #1e293b;
}

body.light-theme .login-container {
    background: #ffffff;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

body.light-theme input,
body.light-theme select,
body.light-theme textarea {
    background: #f1f5f9;
    border-color: #cbd5e1;
    color: #1e293b;
}

body.light-theme .footer {
    background: #1e293b;
}

/* ============================================
   Settings Modal Styles
   ============================================ */
.settings-modal-content {
    padding: 0.5rem 0;
}

.settings-section {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.settings-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.settings-section h4 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-size: 1rem;
}

.settings-section h4 i {
    color: var(--primary-light);
}

.setting-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    margin-bottom: 0.5rem;
}

.setting-item span {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--bg-secondary);
    transition: 0.3s;
    border-radius: 26px;
}

.toggle-slider::before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

.toggle-switch input:checked + .toggle-slider {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
}

.toggle-switch input:checked + .toggle-slider::before {
    transform: translateX(24px);
}

.shortcuts-grid {
    display: grid;
    gap: 0.5rem;
}

.shortcut-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0.75rem;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.shortcut-row kbd {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.8rem;
    color: var(--primary-light);
    box-shadow: 0 2px 0 var(--border-color);
}

/* ============================================
   Theme Toggle Button
   ============================================ */
.theme-toggle-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.theme-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(15deg);
}

/* ============================================
   Quick Search Modal
   ============================================ */
.quick-search-container {
    min-width: 400px;
}

.search-input-wrapper {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
}

.search-input-wrapper i {
    color: var(--text-muted);
}

.search-input-wrapper input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-size: 1rem;
}

.search-results {
    max-height: 300px;
    overflow-y: auto;
}

.search-hint {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
}

.search-hint p {
    margin-bottom: 1rem;
}

.search-shortcuts {
    display: flex;
    gap: 1rem;
    justify-content: center;
    font-size: 0.85rem;
}

.search-result-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: background 0.2s;
}

.search-result-item:hover,
.search-result-item.active {
    background: var(--bg-tertiary);
}

.search-result-item i:first-child {
    color: var(--primary-light);
    font-size: 1.1rem;
    width: 24px;
}

.result-info {
    flex: 1;
}

.result-title {
    color: var(--text-primary);
    font-weight: 500;
}

.result-subtitle {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.search-result-item i:last-child {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.no-results {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
}

.no-results i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    opacity: 0.5;
}

/* ============================================
   Enhanced Button Styles
   ============================================ */
.btn-sm {
    padding: 0.4rem 0.75rem;
    font-size: 0.85rem;
}

.btn-group {
    display: flex;
    gap: 0.5rem;
}

/* ============================================
   Additional Mobile Improvements
   ============================================ */
@media (max-width: 480px) {
    .quick-search-container {
        min-width: 100%;
    }

    .setting-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .info-banner {
        flex-direction: column;
        text-align: center;
    }

    .info-banner .btn-secondary {
        width: 100%;
    }
}
