        /* Enhanced Earthquake Monitoring Styles */
        :root {
            --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
            --card-shadow-hover: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
            --transition-speed: 0.2s;
        }

        .module-card {
            background: var(--card-bg-1);
            border-radius: 10px;
            box-shadow: var(--card-shadow);
            border: 1px solid var(--border-color-1);
            overflow: hidden;
            margin-bottom: 1.5rem;
            transition: box-shadow var(--transition-speed) ease;
        }

        .module-card:hover {
            box-shadow: var(--card-shadow-hover);
        }

        .module-card-header {
            padding: 1.25rem 1.5rem;
            border-bottom: 1px solid var(--border-color-1);
            background: var(--bg-color-1);
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .module-card-header h2 {
            margin: 0;
            font-size: 1.1rem;
            font-weight: 700;
            color: var(--text-color-1);
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }

        /* Map Container */
        .map-wrapper {
            position: relative;
            width: 100%;
            height: 600px;
            border-radius: 8px;
            overflow: hidden;
            border: 1px solid var(--border-color-1);
            box-shadow: var(--card-shadow);
        }
        
        #earthquakeMap { width: 100%; height: 100%; }
        
        .map-overlay-controls {
            position: absolute;
            top: 1.25rem;
            right: 1.25rem;
            z-index: 1000;
            display: flex;
            flex-direction: column;
            gap: 0.75rem;
        }
        
        .earthquake-control-btn {
            background: var(--card-bg-1);
            border: 1px solid var(--border-color-1);
            border-radius: 8px;
            padding: 0.75rem 1rem;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 0.5rem;
            font-size: 0.85rem;
            font-weight: 600;
            color: var(--text-color-1);
            box-shadow: 0 4px 12px rgba(0,0,0,0.1);
            transition: all var(--transition-speed) ease;
        }
        
        .earthquake-control-btn:hover {
            transform: translateY(-2px);
            border-color: var(--primary-color-1);
            color: var(--primary-color-1);
        }
        
        .map-legend {
            position: absolute;
            bottom: 1.25rem;
            left: 1.25rem;
            background: var(--card-bg-1);
            padding: 1rem;
            border-radius: 10px;
            box-shadow: var(--card-shadow);
            border: 1px solid var(--border-color-1);
            z-index: 1000;
            min-width: 180px;
        }
        
        .legend-title {
            font-size: 0.75rem;
            font-weight: 700;
            text-transform: uppercase;
            color: var(--text-secondary-1);
            margin-bottom: 0.75rem;
            letter-spacing: 0.5px;
        }
        
        .legend-item {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            margin-bottom: 0.5rem;
            font-size: 0.85rem;
            font-weight: 500;
        }
        
        .legend-color {
            width: 12px;
            height: 12px;
            border-radius: 50%;
            border: 2px solid white;
            box-shadow: 0 0 0 1px rgba(0,0,0,0.1);
        }

        /* Statistics Grid */
        .stat-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 1.5rem;
            margin-bottom: 1.5rem;
        }
        
        .stat-card {
            background: var(--card-bg-1);
            padding: 1.5rem;
            border-radius: 10px;
            border: 1px solid var(--border-color-1);
            box-shadow: var(--card-shadow);
            transition: transform var(--transition-speed) ease;
        }
        
        .stat-card:hover { transform: translateY(-3px); border-color: var(--primary-color-1); }
        
        .stat-label { font-size: 0.85rem; font-weight: 600; color: var(--text-secondary-1); margin-bottom: 0.5rem; }
        .stat-value { font-size: 2rem; font-weight: 700; color: var(--text-color-1); line-height: 1; }

        /* --- NEW AI RISK PANEL STYLES (Refactored) --- */
        .ai-glass-panel {
            background:
                radial-gradient(1200px 280px at 10% -10%, rgba(139, 92, 246, 0.35), transparent 60%),
                radial-gradient(1000px 320px at 90% 120%, rgba(56, 189, 248, 0.18), transparent 60%),
                linear-gradient(145deg, rgba(29, 21, 56, 0.95), rgba(37, 25, 66, 0.98));
            border-radius: 14px;
            margin-bottom: 1.5rem;
            color: white;
            overflow: hidden;
            box-shadow: 0 20px 35px rgba(15, 23, 42, 0.35), inset 0 1px 0 rgba(255,255,255,0.05);
            border: 1px solid rgba(139, 92, 246, 0.35);
            backdrop-filter: blur(10px);
            transition: border-color 0.3s ease, box-shadow 0.3s ease;
        }

        .ai-glass-panel.critical-alert {
            border-color: #F44336;
            box-shadow: 0 0 20px rgba(244, 67, 54, 0.25), 0 20px 35px rgba(15, 23, 42, 0.4);
        }

        .qc-risk-header {
            padding: 1.25rem 1.5rem;
            display: flex;
            justify-content: space-between;
            align-items: center;
            cursor: pointer;
            background: linear-gradient(90deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02));
            border-bottom: 1px solid rgba(255,255,255,0.12);
            transition: background 0.2s, border-color 0.2s;
        }

        .qc-risk-header:hover {
            background: linear-gradient(90deg, rgba(255,255,255,0.09), rgba(255,255,255,0.04));
            border-bottom-color: rgba(167, 139, 250, 0.5);
        }

        .qc-risk-title-wrap {
            display: flex;
            align-items: center;
            gap: 1rem;
        }

        .qc-risk-title {
            margin: 0;
            font-size: 1rem;
            font-weight: 700;
            color: #f5f3ff;
        }

        .qc-risk-meta {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            margin-top: 0.3rem;
            font-size: 0.75rem;
            color: #c4b5fd;
        }

        .qc-risk-actions {
            display: flex;
            align-items: center;
            gap: 0.8rem;
        }

        .qc-ai-icon {
            background: rgba(139, 92, 246, 0.2);
            border: 1px solid rgba(196, 181, 253, 0.35);
            padding: 0.55rem;
            border-radius: 10px;
            color: #ddd6fe;
        }

        .qc-ai-icon i {
            font-size: 1rem;
        }

        .qc-reanalyze-btn {
            background: rgba(255,255,255,0.12);
            border-color: rgba(255,255,255,0.22);
            color: #f8fafc;
            border-radius: 999px;
            padding: 0.45rem 0.95rem;
            font-size: 0.74rem;
            letter-spacing: 0.4px;
        }

        .qc-reanalyze-btn:hover {
            border-color: rgba(196, 181, 253, 0.9);
            color: #e9d5ff;
            box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2);
        }

        .qc-reanalyze-btn:disabled {
            opacity: 0.72;
            cursor: not-allowed;
            transform: none;
            box-shadow: none;
        }

        /* Collapsible Transition */
        .qc-risk-content {
            padding: 1.5rem;
            background: transparent;
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
            gap: 1.5rem;
            max-height: 1000px; /* Max height for transition */
            opacity: 1;
            transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
            overflow: hidden;
        }

        .ai-glass-panel.minimized .qc-risk-content {
            max-height: 0;
            opacity: 0;
            padding-top: 0;
            padding-bottom: 0;
        }

        .ai-glass-panel.minimized #qcRiskChevron {
            transform: rotate(-90deg);
        }

        #qcRiskChevron {
            transition: transform 0.3s ease;
            color: #c4b5fd;
        }

        .qc-risk-badge {
            padding: 0.35rem 0.85rem;
            border-radius: 4px;
            font-weight: 700;
            font-size: 0.75rem;
            text-transform: uppercase;
            letter-spacing: 1px;
            background: rgba(255,255,255,0.1);
            border: 1px solid rgba(255,255,255,0.2);
            display: inline-flex;
            align-items: center;
            gap: 6px;
        }

        .ai-glass-panel[data-risk="critical"] .qc-risk-badge {
            background: rgba(220, 38, 38, 0.2);
            border-color: rgba(248, 113, 113, 0.6);
        }

        .ai-glass-panel[data-risk="high"] .qc-risk-badge {
            background: rgba(245, 158, 11, 0.2);
            border-color: rgba(251, 191, 36, 0.6);
        }

        .ai-glass-panel[data-risk="moderate"] .qc-risk-badge {
            background: rgba(59, 130, 246, 0.2);
            border-color: rgba(96, 165, 250, 0.6);
        }

        .live-pulse {
            width: 8px;
            height: 8px;
            background-color: #00ff00;
            border-radius: 50%;
            display: inline-block;
            box-shadow: 0 0 0 rgba(0, 255, 0, 0.4);
            animation: pulse-green 2s infinite;
        }

        @keyframes pulse-green {
            0% { box-shadow: 0 0 0 0 rgba(0, 255, 0, 0.4); }
            70% { box-shadow: 0 0 0 6px rgba(0, 255, 0, 0); }
            100% { box-shadow: 0 0 0 0 rgba(0, 255, 0, 0); }
        }

        .ai-mono-text {
            font-family: 'Courier New', Courier, monospace;
            font-size: 0.9rem;
            line-height: 1.6;
            color: #d1d5db;
        }

        .risk-section h4 {
            font-size: 0.85rem;
            margin: 0 0 0.75rem 0;
            display: flex;
            align-items: center;
            gap: 0.5rem;
            color: #a78bfa; /* Light purple */
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }

        .risk-info-box {
            background: rgba(9, 9, 20, 0.36);
            padding: 1rem;
            border-radius: 6px;
            border: 1px solid rgba(196, 181, 253, 0.2);
            min-height: 80px;
            box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
        }

        .recommendation-item {
            background: rgba(148, 163, 184, 0.12);
            padding: 0.75rem 1rem;
            border-radius: 6px;
            font-size: 0.85rem;
            margin-bottom: 0.5rem;
            border-left: 3px solid #34d399;
            color: #ecfeff;
        }

        /* Animations */
        @keyframes pulse-ring {
            0% { transform: scale(1); opacity: 0.7; }
            70% { transform: scale(2.5); opacity: 0; }
            100% { transform: scale(1); opacity: 0; }
        }
        
        .quake-pulse::after {
            content: '';
            position: absolute;
            width: 100%; height: 100%;
            background: inherit; border-radius: 50%;
            animation: pulse-ring 1.5s infinite;
        }

        .table-responsive { overflow-x: auto; width: 100%; }
        .data-table th { background: var(--bg-color-1); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.5px; }

        @media (max-width: 768px) {
            .stat-grid { grid-template-columns: 1fr 1fr; }
            .qc-risk-content { grid-template-columns: 1fr; }
            .map-wrapper { height: 400px; }
            .qc-risk-title-wrap { gap: 0.65rem; }
            .qc-risk-title { font-size: 0.92rem; }
            .qc-risk-header { padding: 1rem; }
            .qc-reanalyze-btn span { display: none; }
        }
    
