/* ============================================================
   GEOINT Dashboard - Ultra-Advanced Intelligence Platform
   Glassmorphism + Neon Accents Dark Theme
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;700&display=swap');

:root {
    --bg-primary: #050911;
    --bg-secondary: #0a0f1e;
    --bg-tertiary: #0f1629;
    --bg-card: rgba(10, 15, 30, 0.88);
    --bg-card-solid: #0b1020;
    --bg-hover: rgba(30, 41, 59, 0.4);
    --bg-glass: rgba(12, 20, 38, 0.75);
    --border: rgba(30, 41, 59, 0.5);
    --border-light: rgba(51, 65, 85, 0.4);
    --border-glow: rgba(0, 212, 255, 0.2);
    --text-primary: #f0f4f8;
    --text-secondary: #94a3b8;
    --text-muted: #536179;
    --accent: #00d4ff;
    --accent-dim: rgba(0, 212, 255, 0.1);
    --accent2: #7c3aed;
    --accent-gradient: linear-gradient(135deg, #00d4ff, #7c3aed);
    --blue: #3b82f6;
    --green: #10b981;
    --yellow: #f59e0b;
    --orange: #f97316;
    --red: #ef4444;
    --purple: #8b5cf6;
    --pink: #ec4899;
    --cyan: #06b6d4;
    --critical: #ef4444;
    --high: #f97316;
    --medium: #f59e0b;
    --low: #10b981;
    --info: #3b82f6;
    --radius: 10px;
    --radius-lg: 14px;
    --radius-xl: 18px;
    --shadow: 0 4px 30px rgba(0,0,0,0.5);
    --shadow-glow: 0 0 30px rgba(0, 212, 255, 0.06);
    --shadow-card: 0 4px 20px rgba(0,0,0,0.25), 0 0 40px rgba(0, 212, 255, 0.02);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --glass-blur: blur(20px);
}

/* ===== Light Theme ===== */
[data-theme="light"] {
    --bg-primary: #f0f2f5;
    --bg-secondary: #ffffff;
    --bg-tertiary: #f8f9fb;
    --bg-card: rgba(255, 255, 255, 0.95);
    --bg-card-solid: #ffffff;
    --bg-hover: rgba(0, 0, 0, 0.04);
    --bg-glass: rgba(255, 255, 255, 0.85);
    --border: rgba(0, 0, 0, 0.1);
    --border-light: rgba(0, 0, 0, 0.06);
    --border-glow: rgba(0, 120, 200, 0.15);
    --text-primary: #1a202c;
    --text-secondary: #4a5568;
    --text-muted: #a0aec0;
    --accent: #0078c8;
    --accent-dim: rgba(0, 120, 200, 0.08);
    --accent2: #6d28d9;
    --accent-gradient: linear-gradient(135deg, #0078c8, #6d28d9);
    --shadow: 0 2px 8px rgba(0,0,0,0.08);
    --shadow-glow: 0 0 20px rgba(0, 120, 200, 0.04);
    --shadow-card: 0 2px 8px rgba(0,0,0,0.06);
}
[data-theme="light"] body,
[data-theme="light"] { background: var(--bg-primary); color: var(--text-primary); }
[data-theme="light"] .topbar { background: rgba(255,255,255,0.92); border-bottom-color: var(--border); backdrop-filter: blur(12px); }
[data-theme="light"] .nav-tabs { background: rgba(255,255,255,0.9); border-bottom-color: var(--border); }
[data-theme="light"] .nav-tab { color: var(--text-secondary); }
[data-theme="light"] .nav-tab.active { color: var(--accent); border-bottom-color: var(--accent); }
[data-theme="light"] .panel { background: var(--bg-card); border-color: var(--border); box-shadow: var(--shadow-card); }
[data-theme="light"] .panel-header { border-bottom-color: var(--border); }
[data-theme="light"] .stat-card { background: var(--bg-card); border-color: var(--border); }
[data-theme="light"] .modal { background: var(--bg-card-solid); border-color: var(--border); }
[data-theme="light"] .modal-overlay { background: rgba(0,0,0,0.3); }
[data-theme="light"] .status-bar { background: rgba(255,255,255,0.92); border-top-color: var(--border); }
[data-theme="light"] .filter-bar { background: rgba(0,0,0,0.02); border-bottom-color: var(--border); }
[data-theme="light"] .filter-bar select,
[data-theme="light"] .form-input,
[data-theme="light"] .form-select,
[data-theme="light"] .form-textarea { background: #f8f9fb; color: var(--text-primary); border-color: var(--border); }
[data-theme="light"] .search-box input { background: rgba(0,0,0,0.04); color: var(--text-primary); }
[data-theme="light"] .btn-icon { color: var(--text-secondary); }
[data-theme="light"] .btn-icon:hover { background: rgba(0,0,0,0.06); color: var(--accent); }
[data-theme="light"] .feed-item { border-bottom-color: var(--border); }
[data-theme="light"] .feed-item:hover { background: rgba(0,120,200,0.03); }
[data-theme="light"] .market-row { border-bottom-color: var(--border); }
[data-theme="light"] .market-row:hover { background: rgba(0,120,200,0.03); }
[data-theme="light"] .threat-matrix-row { border-bottom-color: var(--border); }
[data-theme="light"] .alert-item { border-bottom-color: var(--border); }
[data-theme="light"] .event-card { border-bottom-color: var(--border); }
[data-theme="light"] .log-item { border-bottom-color: var(--border); }
[data-theme="light"] .watchlist-item { border-bottom-color: var(--border); }
[data-theme="light"] .crypto-row { border-bottom-color: var(--border); }
[data-theme="light"] .breaking-ticker { background: rgba(239,68,68,0.06); }
[data-theme="light"] .financial-ticker-strip { background: rgba(0,0,0,0.02); border-color: var(--border); }
[data-theme="light"] .toast { background: var(--bg-card-solid); border-color: var(--border); }
[data-theme="light"] .shortcuts-panel { background: var(--bg-card-solid); border-color: var(--border); }
[data-theme="light"] .topbar-brand h1 { color: var(--accent); }
[data-theme="light"] .logo-icon { background: var(--accent-gradient); }

* { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 14px; scroll-behavior: smooth; }

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    overflow-x: hidden;
    min-height: 100vh;
    background-image:
        radial-gradient(ellipse at 5% 15%, rgba(0, 212, 255, 0.04) 0%, transparent 45%),
        radial-gradient(ellipse at 95% 85%, rgba(124, 58, 237, 0.04) 0%, transparent 45%),
        radial-gradient(ellipse at 50% 0%, rgba(0, 100, 200, 0.02) 0%, transparent 60%),
        radial-gradient(ellipse at 50% 50%, rgba(0, 0, 0, 0) 0%, var(--bg-primary) 100%);
    background-attachment: fixed;
}

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: rgba(5, 9, 17, 0.5); }
::-webkit-scrollbar-thumb { background: rgba(51, 65, 85, 0.5); border-radius: 3px; transition: background 0.2s; }
::-webkit-scrollbar-thumb:hover { background: linear-gradient(180deg, rgba(0, 212, 255, 0.5), rgba(124, 58, 237, 0.4)); }

::selection { background: rgba(0, 212, 255, 0.25); color: #fff; }

/* ===== SCAN LINE EFFECT ===== */
body::before {
    content: '';
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 212, 255, 0.008) 2px,
        rgba(0, 212, 255, 0.008) 4px
    );
    pointer-events: none;
    z-index: 9999;
}

/* ===== TOP BAR ===== */
.topbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 56px;
    background: linear-gradient(180deg, rgba(10, 15, 28, 0.97), rgba(8, 12, 24, 0.95));
    backdrop-filter: var(--glass-blur) saturate(180%);
    -webkit-backdrop-filter: var(--glass-blur) saturate(180%);
    border-bottom: 1px solid rgba(30, 41, 59, 0.4);
    display: flex;
    align-items: center;
    padding: 0 24px;
    z-index: 1000;
    gap: 16px;
    box-shadow: 0 4px 30px rgba(0,0,0,0.4), inset 0 -1px 0 rgba(255,255,255,0.03);
}

.topbar::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0, 212, 255, 0.4), rgba(124, 58, 237, 0.3), transparent);
    opacity: 0.6;
}

.topbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.topbar-brand .logo-icon {
    width: 36px; height: 36px;
    background: linear-gradient(135deg, #0055ee, #00bbff, #7c3aed);
    background-size: 200% 200%;
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 13px; font-weight: 800; color: #fff;
    font-family: 'JetBrains Mono', monospace;
    box-shadow: 0 0 20px rgba(0, 102, 255, 0.35), inset 0 1px 0 rgba(255,255,255,0.15);
    animation: logoPulse 4s ease-in-out infinite;
    position: relative;
}

@keyframes logoPulse {
    0%, 100% { box-shadow: 0 0 20px rgba(0, 102, 255, 0.35); background-position: 0% 50%; }
    50% { box-shadow: 0 0 30px rgba(0, 212, 255, 0.5), 0 0 60px rgba(124, 58, 237, 0.15); background-position: 100% 50%; }
}

.topbar-brand h1 {
    font-size: 16px; font-weight: 800; letter-spacing: 3px;
    text-transform: uppercase;
    background: linear-gradient(135deg, #00d4ff, #7c3aed);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text;
}

.topbar-brand .subtitle {
    font-size: 9px; color: var(--text-muted); letter-spacing: 2px;
    font-family: 'JetBrains Mono', monospace;
}

.topbar-center {
    flex: 1; display: flex; align-items: center;
    justify-content: center; gap: 12px;
}

/* Threat Indicator */
.threat-indicator {
    display: flex; align-items: center; gap: 8px;
    padding: 5px 16px; border-radius: 20px;
    font-size: 11px; font-weight: 700; letter-spacing: 1.5px;
    text-transform: uppercase;
    font-family: 'JetBrains Mono', monospace;
}

.threat-indicator.critical { background: rgba(239, 68, 68, 0.12); color: #ef4444; border: 1px solid rgba(239, 68, 68, 0.25); box-shadow: 0 0 20px rgba(239, 68, 68, 0.1); }
.threat-indicator.high { background: rgba(249, 115, 22, 0.12); color: #f97316; border: 1px solid rgba(249, 115, 22, 0.25); }
.threat-indicator.elevated { background: rgba(245, 158, 11, 0.12); color: #f59e0b; border: 1px solid rgba(245, 158, 11, 0.25); }
.threat-indicator.guarded { background: rgba(59, 130, 246, 0.12); color: #3b82f6; border: 1px solid rgba(59, 130, 246, 0.25); }
.threat-indicator.low { background: rgba(16, 185, 129, 0.12); color: #10b981; border: 1px solid rgba(16, 185, 129, 0.25); }

.threat-indicator .pulse {
    width: 8px; height: 8px; border-radius: 50%;
    animation: pulse 2s infinite;
}
.threat-indicator.critical .pulse { background: #ef4444; box-shadow: 0 0 8px #ef4444; }
.threat-indicator.high .pulse { background: #f97316; box-shadow: 0 0 8px #f97316; }
.threat-indicator.elevated .pulse { background: #f59e0b; box-shadow: 0 0 8px #f59e0b; }
.threat-indicator.guarded .pulse { background: #3b82f6; }
.threat-indicator.low .pulse { background: #10b981; }

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

.topbar-right {
    display: flex; align-items: center; gap: 12px; flex-shrink: 0;
}

.topbar-clock {
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px; color: var(--accent); letter-spacing: 1px;
    text-shadow: 0 0 10px rgba(0, 212, 255, 0.3);
}
.topbar-date { font-size: 10px; color: var(--text-muted); font-family: 'JetBrains Mono', monospace; }

.search-box { position: relative; }
.search-box input {
    width: 220px; padding: 8px 14px 8px 34px;
    background: linear-gradient(145deg, rgba(12, 18, 35, 0.9), rgba(17, 26, 46, 0.8));
    border: 1px solid rgba(30, 41, 59, 0.5); border-radius: 10px;
    color: var(--text-primary); font-size: 12px;
    outline: none; transition: var(--transition);
    backdrop-filter: blur(8px);
}
.search-box input:hover { border-color: rgba(51, 65, 85, 0.6); }
.search-box input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-dim), 0 0 25px rgba(0, 212, 255, 0.1);
    width: 280px;
    background: rgba(12, 18, 35, 0.95);
}
.search-box input::placeholder { color: var(--text-muted); }
.search-box .search-icon {
    position: absolute; left: 11px; top: 50%; transform: translateY(-50%);
    color: var(--text-muted); font-size: 12px;
    transition: color 0.2s ease;
}
.search-box input:focus + .search-icon,
.search-box:focus-within .search-icon { color: var(--accent); }

.btn-icon {
    width: 34px; height: 34px; border-radius: 8px;
    border: 1px solid var(--border);
    background: rgba(17, 26, 46, 0.6);
    color: var(--text-secondary); cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: var(--transition); font-size: 14px;
}
.btn-icon:hover {
    background: var(--accent-dim); color: var(--accent);
    border-color: rgba(0, 212, 255, 0.3);
    box-shadow: 0 0 12px rgba(0, 212, 255, 0.15);
}

.sim-btn {
    background: rgba(124, 58, 237, 0.15);
    border-color: rgba(124, 58, 237, 0.3);
    color: #a78bfa;
    font-size: 12px;
    padding: 0 10px;
    width: auto;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 600;
}
.sim-btn:hover {
    background: rgba(124, 58, 237, 0.3);
    box-shadow: 0 0 12px rgba(124, 58, 237, 0.2);
    color: #c4b5fd;
}

/* ===== NAVIGATION TABS ===== */
.nav-tabs {
    position: fixed; top: 56px; left: 0; right: 0;
    height: 44px;
    background: linear-gradient(180deg, rgba(10, 15, 28, 0.95), rgba(8, 12, 22, 0.92));
    backdrop-filter: blur(16px) saturate(150%);
    border-bottom: 1px solid rgba(30, 41, 59, 0.35);
    display: flex; align-items: center;
    padding: 0 20px; gap: 4px; z-index: 999;
    overflow-x: auto;
    box-shadow: 0 2px 10px rgba(0,0,0,0.15);
}

.nav-tab {
    padding: 8px 16px; font-size: 12px; font-weight: 500;
    color: var(--text-muted); cursor: pointer;
    border-radius: 8px; transition: var(--transition);
    white-space: nowrap; border: 1px solid transparent;
    position: relative;
    user-select: none;
    letter-spacing: 0.3px;
}
.nav-tab:hover {
    color: var(--text-primary);
    background: rgba(30, 41, 59, 0.35);
}
.nav-tab.active {
    color: #fff;
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.12), rgba(124, 58, 237, 0.08));
    border-color: rgba(0, 212, 255, 0.2);
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.06), inset 0 1px 0 rgba(255,255,255,0.04);
}
.nav-tab.active::after {
    content: ''; position: absolute;
    bottom: -1px; left: 20%; right: 20%; height: 2px;
    border-radius: 2px;
    background: var(--accent-gradient);
    box-shadow: 0 0 8px rgba(0, 212, 255, 0.4);
}

.nav-tab .badge {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 20px; height: 18px; padding: 0 6px;
    border-radius: 9px; font-size: 9px; font-weight: 700; margin-left: 6px;
    letter-spacing: 0.5px;
}
.nav-tab .badge.red { background: rgba(239, 68, 68, 0.15); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.15); }
.nav-tab .badge.orange { background: rgba(249, 115, 22, 0.15); color: #fb923c; border: 1px solid rgba(249, 115, 22, 0.15); }
.nav-tab .badge.blue { background: rgba(59, 130, 246, 0.15); color: #60a5fa; border: 1px solid rgba(59, 130, 246, 0.15); }
.nav-tab .badge.purple { background: rgba(139, 92, 246, 0.15); color: #a78bfa; border: 1px solid rgba(139, 92, 246, 0.15); }

/* ===== MAIN CONTENT ===== */
.main-content {
    margin-top: 100px; padding: 16px 22px;
    min-height: calc(100vh - 100px);
}
.tab-content { display: none; animation: tabFadeIn 0.5s cubic-bezier(0.4, 0, 0.2, 1); }
.tab-content.active { display: block; }
@keyframes tabFadeIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ===== STATS ROW ===== */
.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px; margin-bottom: 16px;
}

.stat-card {
    background: linear-gradient(145deg, rgba(12, 18, 35, 0.9), rgba(8, 13, 26, 0.95));
    backdrop-filter: var(--glass-blur);
    border: 1px solid rgba(30, 41, 59, 0.4);
    border-radius: var(--radius-lg);
    padding: 18px; transition: var(--transition);
    position: relative; overflow: hidden;
    box-shadow: var(--shadow-card);
}
.stat-card::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
    background: var(--accent-gradient);
    opacity: 0; transition: var(--transition);
}
.stat-card::after {
    content: ''; position: absolute; top: 0; right: 0; width: 100px; height: 100px;
    background: radial-gradient(circle, rgba(0, 212, 255, 0.03) 0%, transparent 70%);
    pointer-events: none;
}
.stat-card:hover {
    border-color: rgba(0, 212, 255, 0.15);
    transform: translateY(-3px);
    box-shadow: 0 8px 32px rgba(0,0,0,0.35), 0 0 20px rgba(0, 212, 255, 0.05);
}
.stat-card:hover::before { opacity: 1; }

.stat-card .stat-header {
    display: flex; align-items: center;
    justify-content: space-between; margin-bottom: 10px;
}
.stat-card .stat-label {
    font-size: 10px; color: var(--text-muted);
    text-transform: uppercase; letter-spacing: 1.5px; font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
}
.stat-card .stat-icon {
    width: 36px; height: 36px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 16px;
}
.stat-card .stat-value {
    font-size: 32px; font-weight: 800;
    color: var(--text-primary); line-height: 1;
    font-family: 'JetBrains Mono', monospace;
}
.stat-card .stat-change {
    font-size: 10px; margin-top: 6px; display: flex;
    align-items: center; gap: 4px;
    font-family: 'JetBrains Mono', monospace;
}
.stat-card .stat-change.up { color: #10b981; }
.stat-card .stat-change.down { color: #ef4444; }
.stat-card .stat-change.neutral { color: var(--text-muted); }
.stat-card .stat-change.danger-up { color: var(--red); }
.stat-card .stat-change.danger-down { color: var(--green); }

/* ===== GRID LAYOUTS ===== */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 350px;
    gap: 14px; margin-bottom: 16px;
}
.dashboard-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 16px; }
.dashboard-grid-3 { display: grid; grid-template-columns: 2fr 1fr; gap: 14px; margin-bottom: 16px; }
.dashboard-grid-4 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; margin-bottom: 16px; }

/* ===== PANEL (Glass Card) ===== */
.panel {
    background: linear-gradient(160deg, rgba(12, 18, 35, 0.9), rgba(8, 12, 25, 0.95));
    backdrop-filter: var(--glass-blur);
    border: 1px solid rgba(30, 41, 59, 0.4);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: var(--transition);
    box-shadow: var(--shadow-card);
}
.panel:hover {
    border-color: rgba(51, 65, 85, 0.5);
    box-shadow: 0 6px 28px rgba(0,0,0,0.3), 0 0 20px rgba(0, 212, 255, 0.03);
}

.panel-header {
    padding: 14px 18px;
    border-bottom: 1px solid rgba(30, 41, 59, 0.35);
    display: flex; align-items: center;
    justify-content: space-between;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.5), rgba(12, 18, 32, 0.3));
}
.panel-title {
    font-size: 10px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 2.5px;
    color: var(--text-secondary);
    display: flex; align-items: center; gap: 8px;
    font-family: 'JetBrains Mono', monospace;
}
.panel-title .dot {
    width: 7px; height: 7px; border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 8px var(--accent), 0 0 20px rgba(0, 212, 255, 0.15);
}
.panel-actions { display: flex; gap: 6px; }

.btn-refresh {
    font-size: 9px; font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: 1px; text-transform: uppercase;
    padding: 4px 10px; border-radius: 4px;
    border: 1px solid rgba(0, 212, 255, 0.25);
    background: rgba(0, 212, 255, 0.08);
    color: var(--accent);
    cursor: pointer;
    transition: all 0.2s;
}
.btn-refresh:hover {
    background: rgba(0, 212, 255, 0.18);
    border-color: var(--accent);
    box-shadow: 0 0 12px rgba(0, 212, 255, 0.15);
}
.btn-refresh:active { transform: scale(0.95); }

.source-badge {
    display: inline-block;
    font-size: 9px;
    font-weight: 500;
    letter-spacing: 0.3px;
    padding: 2px 6px;
    border-radius: 3px;
    background: rgba(0, 212, 255, 0.1);
    color: var(--accent);
    border: 1px solid rgba(0, 212, 255, 0.2);
    vertical-align: middle;
    margin-left: 6px;
    text-transform: none;
}

.panel-body {
    padding: 12px 16px;
    max-height: 500px; overflow-y: auto;
}
.panel-body.no-pad { padding: 0; }
.panel-body.tall { max-height: 700px; }

/* ===== MAP ===== */
.map-panel { overflow: hidden; }
.map-panel-header { border-bottom: 1px solid rgba(0, 212, 255, 0.15); }
.map-panel-header .panel-title .pulse-dot {
    animation: dotPulse 2s ease-in-out infinite;
}
@keyframes dotPulse { 0%,100% { opacity: 1; box-shadow: 0 0 6px var(--accent); } 50% { opacity: 0.4; box-shadow: none; } }

.map-status-badge {
    font-size: 9px;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    color: #10b981;
    letter-spacing: 1px;
    text-transform: uppercase;
    animation: statusFlicker 3s ease-in-out infinite;
}
@keyframes statusFlicker { 0%,90%,100% { opacity: 1; } 95% { opacity: 0.5; } }

.map-container {
    width: 100%; height: min(580px, 55vh);
    position: relative; background: #030810;
    overflow: hidden;
}
#worldMap {
    width: 100%; height: 100%;
    z-index: 1;
}

/* HUD Corner brackets */
.hud-corner {
    position: absolute;
    width: 28px; height: 28px;
    z-index: 600;
    pointer-events: none;
}
.hud-tl { top: 8px; left: 8px; border-top: 2px solid var(--accent); border-left: 2px solid var(--accent); }
.hud-tr { top: 8px; right: 8px; border-top: 2px solid var(--accent); border-right: 2px solid var(--accent); }
.hud-bl { bottom: 8px; left: 8px; border-bottom: 2px solid var(--accent); border-left: 2px solid var(--accent); }
.hud-br { bottom: 8px; right: 8px; border-bottom: 2px solid var(--accent); border-right: 2px solid var(--accent); }

/* Map scanline animation */
.map-scanline {
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent 0%, rgba(0, 212, 255, 0.4) 30%, rgba(0, 212, 255, 0.8) 50%, rgba(0, 212, 255, 0.4) 70%, transparent 100%);
    z-index: 500;
    pointer-events: none;
    animation: mapScan 6s linear infinite;
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.3), 0 0 60px rgba(0, 212, 255, 0.1);
}
@keyframes mapScan {
    0% { top: 0; opacity: 0; }
    5% { opacity: 1; }
    95% { opacity: 1; }
    100% { top: calc(100% - 3px); opacity: 0; }
}

/* HUD Stats - Top Right */
.map-hud-stats {
    position: absolute;
    top: 14px; right: 14px;
    display: flex; flex-direction: column; gap: 6px;
    z-index: 500;
}
.map-hud-card {
    background: rgba(6, 10, 19, 0.88);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 6px;
    padding: 8px 14px;
    min-width: 130px;
    transition: var(--transition);
}
.map-hud-card:hover {
    border-color: rgba(0, 212, 255, 0.5);
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.1);
}
.hud-card-label {
    font-size: 8px;
    font-family: 'JetBrains Mono', monospace;
    color: var(--accent);
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-bottom: 2px;
}
.hud-card-value {
    font-size: 22px;
    font-weight: 800;
    color: #fff;
    font-family: 'JetBrains Mono', monospace;
    line-height: 1;
}

/* Threat Indicator - Top Left */
.map-threat-indicator {
    position: absolute;
    top: 14px; left: 14px;
    z-index: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(6, 10, 19, 0.88);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(30, 41, 59, 0.5);
    border-radius: 6px;
    padding: 10px 16px;
}
.threat-indicator-ring {
    width: 14px; height: 14px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.6);
    animation: threatRingPulse 2s ease-in-out infinite;
}
@keyframes threatRingPulse {
    0%,100% { box-shadow: 0 0 8px currentColor; transform: scale(1); }
    50% { box-shadow: 0 0 20px currentColor; transform: scale(1.15); }
}
.threat-indicator-label {
    font-size: 8px;
    font-family: 'JetBrains Mono', monospace;
    color: var(--text-muted);
    letter-spacing: 1.5px;
}
.threat-indicator-level {
    font-size: 14px;
    font-weight: 800;
    font-family: 'JetBrains Mono', monospace;
    color: #10b981;
    letter-spacing: 1px;
}

/* Modern Legend - Bottom Center */
.map-legend-modern {
    position: absolute;
    bottom: 14px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 500;
    display: flex;
    align-items: center;
    gap: 14px;
    background: rgba(6, 10, 19, 0.88);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(30, 41, 59, 0.5);
    border-radius: 8px;
    padding: 8px 18px;
    font-family: 'JetBrains Mono', monospace;
}
.legend-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 9px;
    color: var(--text-secondary);
    letter-spacing: 0.5px;
}
.legend-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}
.legend-ring {
    background: transparent;
    border: 2px solid;
    width: 10px; height: 10px;
}
.legend-diamond {
    background: #f59e0b;
    border-radius: 2px;
    transform: rotate(45deg);
    width: 8px; height: 8px;
    box-shadow: 0 0 6px rgba(245, 158, 11, 0.5);
}
.legend-count {
    font-weight: 700;
    color: var(--text-primary);
    min-width: 14px;
    text-align: center;
    font-size: 10px;
}
.legend-sep {
    width: 1px;
    height: 16px;
    background: rgba(30, 41, 59, 0.6);
}

/* Coordinates Display - Bottom Right */
.map-coords {
    position: absolute;
    bottom: 14px; right: 14px;
    z-index: 500;
    display: flex; gap: 12px;
    background: rgba(6, 10, 19, 0.75);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(30, 41, 59, 0.4);
    border-radius: 4px;
    padding: 4px 10px;
    font-size: 9px;
    font-family: 'JetBrains Mono', monospace;
    color: var(--text-muted);
    letter-spacing: 0.5px;
}

/* Leaflet popup override (dark theme) */
.leaflet-popup-content-wrapper {
    background: rgba(12, 18, 32, 0.95) !important;
    backdrop-filter: blur(12px);
    border: 1px solid rgba(0, 212, 255, 0.2) !important;
    border-radius: 8px !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), 0 0 20px rgba(0, 212, 255, 0.08) !important;
    color: var(--text-primary) !important;
}
.leaflet-popup-content { margin: 12px 14px !important; font-family: 'Inter', system-ui, sans-serif !important; }
.leaflet-popup-tip { background: rgba(12, 18, 32, 0.95) !important; border: 1px solid rgba(0, 212, 255, 0.2) !important; }
.leaflet-popup-close-button { color: var(--text-secondary) !important; font-size: 18px !important; }
.leaflet-popup-close-button:hover { color: var(--accent) !important; }

/* Leaflet zoom controls override */
.leaflet-control-zoom { border: none !important; }
.leaflet-control-zoom a {
    background: rgba(6, 10, 19, 0.85) !important;
    backdrop-filter: blur(8px);
    border: 1px solid rgba(30, 41, 59, 0.5) !important;
    color: var(--text-primary) !important;
    width: 32px !important; height: 32px !important; line-height: 32px !important;
    font-size: 16px !important;
    transition: var(--transition);
}
.leaflet-control-zoom a:hover {
    background: rgba(0, 212, 255, 0.15) !important;
    border-color: rgba(0, 212, 255, 0.4) !important;
    color: var(--accent) !important;
}

/* Animated marker pulse */
.marker-pulse {
    border-radius: 50%;
    animation: markerPulseAnim 2s ease-out infinite;
}
@keyframes markerPulseAnim {
    0% { box-shadow: 0 0 0 0 currentColor; }
    70% { box-shadow: 0 0 0 12px transparent; }
    100% { box-shadow: 0 0 0 0 transparent; }
}

.infra-marker { background: transparent !important; border: none !important; }

/* ===== NEWS FEED ===== */
.feed-item {
    padding: 14px 18px;
    border-bottom: 1px solid rgba(30, 41, 59, 0.25);
    cursor: pointer; transition: var(--transition);
    position: relative;
    display: flex;
    gap: 14px;
}
.feed-item-body { flex: 1; min-width: 0; }
.feed-thumb {
    flex-shrink: 0;
    width: 130px; height: 85px;
    border-radius: var(--radius);
    overflow: hidden;
    align-self: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}
.feed-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.feed-item:hover .feed-thumb img { transform: scale(1.08); }
.feed-item::before {
    content: ''; position: absolute; left: 0; top: 0; bottom: 0;
    width: 3px; border-radius: 0 3px 3px 0;
    transition: var(--transition); opacity: 0;
}
.feed-item:hover { background: rgba(0, 212, 255, 0.02); }
.feed-item:hover::before { opacity: 1; background: var(--accent); }
.feed-item:last-child { border-bottom: none; }

.feed-item .feed-meta {
    display: flex; align-items: center; gap: 6px;
    margin-bottom: 6px; flex-wrap: wrap;
}
.feed-item .feed-title {
    font-size: 13px; font-weight: 600;
    color: var(--text-primary); line-height: 1.4; margin-bottom: 4px;
}
.feed-item.breaking .feed-title { color: var(--red); }
.feed-item.breaking::before { opacity: 1; background: var(--red); animation: borderPulse 2s infinite; }
@keyframes borderPulse { 0%,100% { opacity: 1; } 50% { opacity: 0.3; } }

.feed-item .feed-summary {
    font-size: 12px; color: var(--text-muted); line-height: 1.5;
    display: -webkit-box; -webkit-line-clamp: 2;
    -webkit-box-orient: vertical; overflow: hidden;
}
.feed-item .feed-footer {
    display: flex; align-items: center; gap: 12px;
    margin-top: 8px; font-size: 10px; color: var(--text-muted);
    font-family: 'JetBrains Mono', monospace;
}

/* ===== TAGS / BADGES ===== */
.tag {
    display: inline-flex; align-items: center;
    padding: 2px 8px; border-radius: 4px;
    font-size: 9px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.5px;
    font-family: 'JetBrains Mono', monospace;
}
.tag.critical { background: rgba(239, 68, 68, 0.15); color: #ef4444; border: 1px solid rgba(239, 68, 68, 0.2); }
.tag.high { background: rgba(249, 115, 22, 0.15); color: #f97316; border: 1px solid rgba(249, 115, 22, 0.2); }
.tag.medium { background: rgba(245, 158, 11, 0.15); color: #f59e0b; border: 1px solid rgba(245, 158, 11, 0.2); }
.tag.low { background: rgba(16, 185, 129, 0.15); color: #10b981; border: 1px solid rgba(16, 185, 129, 0.2); }
.tag.info { background: rgba(59, 130, 246, 0.12); color: #3b82f6; border: 1px solid rgba(59, 130, 246, 0.2); }
.tag.breaking {
    background: rgba(239, 68, 68, 0.2); color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
    animation: flash 1.5s infinite;
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.2);
}
@keyframes flash { 0%,100% { opacity: 1; } 50% { opacity: 0.5; } }
.tag.category { background: rgba(139, 92, 246, 0.12); color: #a78bfa; border: 1px solid rgba(139, 92, 246, 0.15); }
.tag.source { background: rgba(0, 212, 255, 0.08); color: var(--accent); border: 1px solid rgba(0, 212, 255, 0.15); }

.tag-status {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 2px 8px; border-radius: 4px;
    font-size: 9px; font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
    text-transform: uppercase;
}
.tag-status.active { background: rgba(239, 68, 68, 0.12); color: #ef4444; }
.tag-status.developing { background: rgba(245, 158, 11, 0.12); color: #f59e0b; }
.tag-status.escalating { background: rgba(239, 68, 68, 0.18); color: #ff6b6b; animation: flash 2s infinite; }
.tag-status.de_escalating { background: rgba(16, 185, 129, 0.12); color: #10b981; }
.tag-status.resolved { background: rgba(107, 114, 128, 0.12); color: #9ca3af; }
.tag-status.monitoring { background: rgba(59, 130, 246, 0.12); color: #3b82f6; }
.tag-status.investigating { background: rgba(245, 158, 11, 0.12); color: #f59e0b; }
.tag-status.mitigating { background: rgba(139, 92, 246, 0.12); color: #a78bfa; }

/* ===== EVENT CARDS ===== */
.event-card {
    padding: 14px 18px;
    border-bottom: 1px solid rgba(30, 41, 59, 0.3);
    transition: var(--transition); cursor: pointer;
    position: relative;
}
.event-card::before {
    content: ''; position: absolute; left: 0; top: 0; bottom: 0;
    width: 2px; background: var(--accent); opacity: 0; transition: var(--transition);
}
.event-card:hover { background: rgba(0, 212, 255, 0.02); }
.event-card:hover::before { opacity: 0.6; }
.event-card .event-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 8px; }
.event-card .event-title { font-size: 13px; font-weight: 600; color: var(--text-primary); }
.event-card .event-desc { font-size: 12px; color: var(--text-muted); line-height: 1.5; margin-bottom: 8px; }
.event-card .event-meta { display: flex; gap: 6px; flex-wrap: wrap; }

/* ===== ALERT ITEMS ===== */
.alert-item {
    padding: 12px 16px;
    border-bottom: 1px solid rgba(30, 41, 59, 0.4);
    display: flex; align-items: flex-start; gap: 12px;
    transition: var(--transition);
}
.alert-item:hover { background: rgba(0, 212, 255, 0.02); }
.alert-item .alert-icon {
    width: 40px; height: 40px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0; font-size: 18px;
}
.alert-item .alert-icon.critical { background: rgba(239, 68, 68, 0.12); color: #ef4444; box-shadow: 0 0 12px rgba(239, 68, 68, 0.1); }
.alert-item .alert-icon.high { background: rgba(249, 115, 22, 0.12); color: #f97316; }
.alert-item .alert-icon.medium { background: rgba(245, 158, 11, 0.12); color: #f59e0b; }
.alert-item .alert-icon.low { background: rgba(16, 185, 129, 0.12); color: #10b981; }

.alert-item .alert-content { flex: 1; }
.alert-item .alert-title { font-size: 13px; font-weight: 600; color: var(--text-primary); margin-bottom: 4px; }
.alert-item .alert-desc { font-size: 11px; color: var(--text-muted); line-height: 1.4; }
.alert-item .alert-meta { display: flex; gap: 6px; margin-top: 6px; flex-wrap: wrap; }

/* ===== THREAT MATRIX ===== */
.threat-matrix-row {
    display: grid; grid-template-columns: 140px 1fr;
    align-items: center; padding: 12px 16px;
    border-bottom: 1px solid rgba(30, 41, 59, 0.4); gap: 12px;
    transition: var(--transition);
}
.threat-matrix-row:hover { background: rgba(0, 212, 255, 0.02); }
.threat-matrix-row:last-child { border-bottom: none; }
.threat-matrix-row .region-name { font-size: 12px; font-weight: 600; color: var(--text-primary); }
.threat-matrix-row .region-trend { font-size: 10px; color: var(--text-muted); margin-top: 2px; }
.threat-bar-container { display: flex; align-items: center; gap: 8px; }
.threat-bar {
    flex: 1; height: 8px; background: rgba(15, 23, 42, 0.8);
    border-radius: 4px; overflow: hidden;
}
.threat-bar-fill { height: 100%; border-radius: 4px; transition: width 1s cubic-bezier(0.4, 0, 0.2, 1); }
.threat-bar-fill.critical { background: linear-gradient(90deg, #ef4444, #dc2626); box-shadow: 0 0 8px rgba(239, 68, 68, 0.3); }
.threat-bar-fill.high { background: linear-gradient(90deg, #f97316, #ea580c); }
.threat-bar-fill.medium { background: linear-gradient(90deg, #f59e0b, #d97706); }
.threat-bar-fill.low { background: linear-gradient(90deg, #10b981, #059669); }
.threat-score {
    font-size: 12px; font-weight: 700; min-width: 36px; text-align: right;
    font-family: 'JetBrains Mono', monospace;
}

/* ===== CHARTS ===== */
.chart-container { width: 100%; position: relative; }
.chart-container canvas { max-height: 280px; }

/* ===== BREAKING TICKER ===== */
.breaking-ticker {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.06), rgba(220, 38, 38, 0.03));
    border: 1px solid rgba(239, 68, 68, 0.15);
    border-radius: var(--radius-lg); padding: 8px 16px;
    margin-bottom: 16px; display: flex;
    align-items: center; gap: 12px; overflow: hidden;
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.05);
    position: relative;
}
.breaking-ticker::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px;
    background: linear-gradient(90deg, transparent, rgba(239, 68, 68, 0.3), transparent);
}
.breaking-ticker .ticker-label {
    font-size: 10px; font-weight: 800; color: #ef4444;
    text-transform: uppercase; letter-spacing: 2px; flex-shrink: 0;
    animation: flash 1.5s infinite;
    font-family: 'JetBrains Mono', monospace;
}
.breaking-ticker .ticker-content { flex: 1; overflow: hidden; white-space: nowrap; }
.breaking-ticker .ticker-scroll {
    display: inline-block; animation: scroll 35s linear infinite; white-space: nowrap;
}
.breaking-ticker .ticker-scroll span {
    font-size: 12px; color: var(--text-primary); margin-right: 60px;
}
@keyframes scroll { from { transform: translateX(100%); } to { transform: translateX(-100%); } }

/* ===== NOTIFICATION TOAST ===== */
.toast-container {
    position: fixed; bottom: 20px; right: 20px;
    display: flex; flex-direction: column; gap: 10px;
    z-index: 5000; max-width: 400px;
}
.toast {
    padding: 14px 18px;
    background: linear-gradient(145deg, rgba(12, 18, 35, 0.97), rgba(8, 14, 28, 0.95));
    backdrop-filter: blur(20px) saturate(150%);
    border: 1px solid rgba(30, 41, 59, 0.5);
    border-radius: var(--radius-lg);
    box-shadow: 0 10px 40px rgba(0,0,0,0.5), 0 0 30px rgba(0, 0, 0, 0.2);
    animation: toastIn 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex; align-items: flex-start; gap: 12px;
    cursor: pointer; transition: var(--transition);
    position: relative; overflow: hidden;
}
.toast::after {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.06), transparent);
}
.toast:hover { transform: translateX(-6px) scale(1.01); box-shadow: 0 12px 48px rgba(0,0,0,0.6); }
.toast.leaving { animation: toastOut 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards; }
.toast .toast-icon { font-size: 20px; flex-shrink: 0; margin-top: 1px; }
.toast .toast-body { flex: 1; }
.toast .toast-title { font-size: 12px; font-weight: 700; color: var(--text-primary); margin-bottom: 3px; }
.toast .toast-msg { font-size: 11px; color: var(--text-muted); line-height: 1.5; }
.toast .toast-time { font-size: 9px; color: var(--text-muted); margin-top: 5px; font-family: 'JetBrains Mono', monospace; opacity: 0.7; }

.toast.critical { border-left: 3px solid #ef4444; box-shadow: 0 10px 40px rgba(0,0,0,0.5), 0 0 20px rgba(239, 68, 68, 0.08); }
.toast.high { border-left: 3px solid #f97316; box-shadow: 0 10px 40px rgba(0,0,0,0.5), 0 0 20px rgba(249, 115, 22, 0.06); }
.toast.medium { border-left: 3px solid #f59e0b; }
.toast.info { border-left: 3px solid #3b82f6; box-shadow: 0 10px 40px rgba(0,0,0,0.5), 0 0 20px rgba(59, 130, 246, 0.06); }
.toast.success { border-left: 3px solid #10b981; box-shadow: 0 10px 40px rgba(0,0,0,0.5), 0 0 20px rgba(16, 185, 129, 0.06); }

@keyframes toastIn { from { opacity: 0; transform: translateX(80px) scale(0.95); } to { opacity: 1; transform: translateX(0) scale(1); } }
@keyframes toastOut { from { opacity: 1; transform: translateX(0) scale(1); } to { opacity: 0; transform: translateX(80px) scale(0.95); } }

/* ===== MODAL ===== */
.modal-overlay {
    display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px) saturate(120%);
    z-index: 2000;
    align-items: center; justify-content: center; padding: 20px;
}
.modal-overlay.show { display: flex; animation: overlayIn 0.3s ease; }
@keyframes overlayIn { from { opacity: 0; } to { opacity: 1; } }
.modal {
    background: linear-gradient(160deg, rgba(12, 18, 35, 0.98), rgba(8, 13, 26, 0.99));
    border: 1px solid rgba(30, 41, 59, 0.5);
    border-radius: var(--radius-xl);
    max-width: 720px; width: 100%;
    max-height: 85vh; overflow-y: auto;
    box-shadow: 0 25px 80px rgba(0,0,0,0.6), 0 0 60px rgba(0, 0, 0, 0.3), 0 0 40px rgba(0, 212, 255, 0.03);
    animation: modalIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}
.modal::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0, 212, 255, 0.3), rgba(124, 58, 237, 0.2), transparent);
}
@keyframes modalIn { from { opacity: 0; transform: scale(0.92) translateY(30px); } to { opacity: 1; transform: scale(1) translateY(0); } }

.modal-header {
    padding: 18px 22px; border-bottom: 1px solid rgba(30, 41, 59, 0.4);
    display: flex; align-items: center; justify-content: space-between;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.6), rgba(12, 18, 32, 0.3));
}
.modal-header h3 { font-size: 15px; color: var(--text-primary); font-weight: 700; }
.modal-body { padding: 22px; }

.modal-body .detail-row { display: flex; margin-bottom: 12px; gap: 12px; }
.modal-body .detail-label {
    font-size: 10px; color: var(--text-muted); text-transform: uppercase;
    letter-spacing: 1px; min-width: 100px; padding-top: 2px;
    font-family: 'JetBrains Mono', monospace; font-weight: 600;
}
.modal-body .detail-value { font-size: 13px; color: var(--text-primary); line-height: 1.5; flex: 1; }

/* ===== FORM ELEMENTS ===== */
.form-group { margin-bottom: 16px; }
.form-label {
    display: block; font-size: 10px; color: var(--text-muted);
    text-transform: uppercase; letter-spacing: 1.5px;
    margin-bottom: 8px; font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
}
.form-input, .form-select, .form-textarea {
    width: 100%; padding: 10px 14px;
    background: linear-gradient(145deg, rgba(12, 18, 35, 0.9), rgba(15, 23, 42, 0.8));
    border: 1px solid rgba(30, 41, 59, 0.5); border-radius: var(--radius);
    color: var(--text-primary); font-size: 13px;
    outline: none; transition: var(--transition); font-family: inherit;
}
.form-input:hover, .form-select:hover, .form-textarea:hover {
    border-color: rgba(51, 65, 85, 0.6);
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-dim), 0 0 20px rgba(0, 212, 255, 0.06);
    background: rgba(12, 18, 35, 0.95);
}
.form-textarea { resize: vertical; min-height: 80px; }
.form-select { cursor: pointer; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    padding: 9px 18px; border-radius: var(--radius);
    font-size: 11px; font-weight: 700; cursor: pointer;
    border: 1px solid transparent; transition: var(--transition);
    text-transform: uppercase; letter-spacing: 1px;
    font-family: 'JetBrains Mono', monospace;
    position: relative; overflow: hidden;
}
.btn::after {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, transparent 50%);
    opacity: 0; transition: var(--transition); pointer-events: none;
}
.btn:hover::after { opacity: 1; }
.btn-primary {
    background: linear-gradient(135deg, #0050dd, #00aaff, #0066ff);
    background-size: 200% 200%;
    color: #fff; border: none;
    box-shadow: 0 3px 15px rgba(0, 102, 255, 0.3), inset 0 1px 0 rgba(255,255,255,0.1);
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(0, 102, 255, 0.4), 0 0 40px rgba(0, 170, 255, 0.1);
    background-position: 100% 0;
}
.btn-danger { background: rgba(239, 68, 68, 0.1); color: #f87171; border-color: rgba(239, 68, 68, 0.2); }
.btn-danger:hover { background: rgba(239, 68, 68, 0.18); box-shadow: 0 0 15px rgba(239, 68, 68, 0.1); }
.btn-ghost { background: rgba(15, 23, 42, 0.4); color: var(--text-secondary); border-color: rgba(30, 41, 59, 0.5); }
.btn-ghost:hover { background: rgba(30, 41, 59, 0.5); color: var(--text-primary); border-color: rgba(51, 65, 85, 0.5); }
.btn-sm { padding: 5px 12px; font-size: 10px; }

/* ===== FILTER BAR ===== */
.filter-bar {
    display: flex; align-items: center; gap: 10px;
    padding: 12px 18px; border-bottom: 1px solid rgba(30, 41, 59, 0.3);
    flex-wrap: wrap;
    background: linear-gradient(180deg, rgba(12, 18, 32, 0.4), rgba(8, 12, 24, 0.2));
}
.filter-bar select {
    padding: 6px 12px;
    background: rgba(12, 18, 35, 0.8);
    border: 1px solid rgba(30, 41, 59, 0.5); border-radius: 8px;
    color: var(--text-secondary); font-size: 11px;
    cursor: pointer; outline: none;
    font-family: 'JetBrains Mono', monospace;
    transition: var(--transition);
}
.filter-bar select:hover { border-color: rgba(51, 65, 85, 0.6); }
.filter-bar select:focus { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(0, 212, 255, 0.08); }

/* ===== WATCHLIST ===== */
.watchlist-item {
    display: flex; align-items: center; justify-content: space-between;
    padding: 10px 16px; border-bottom: 1px solid rgba(30, 41, 59, 0.4);
    transition: var(--transition);
}
.watchlist-item:hover { background: rgba(0, 212, 255, 0.02); }
.watchlist-item .wl-info { display: flex; align-items: center; gap: 10px; }
.watchlist-item .wl-name { font-size: 13px; font-weight: 600; color: var(--text-primary); }
.watchlist-item .wl-type { font-size: 10px; color: var(--text-muted); }
.watchlist-item .wl-actions { display: flex; gap: 6px; }

/* ===== ACTIVITY LOG ===== */
.log-item {
    display: flex; align-items: flex-start; gap: 10px;
    padding: 8px 16px; border-bottom: 1px solid rgba(30, 41, 59, 0.3);
    font-size: 12px; transition: var(--transition);
}
.log-item:hover { background: rgba(0, 212, 255, 0.02); }
.log-item .log-time {
    color: var(--text-muted); font-family: 'JetBrains Mono', monospace;
    font-size: 10px; flex-shrink: 0; min-width: 70px;
}
.log-item .log-action { color: var(--accent); font-weight: 700; flex-shrink: 0; min-width: 130px; font-size: 11px; }
.log-item .log-details { color: var(--text-secondary); }

/* ===== LOADING ===== */
.loading {
    display: flex; align-items: center; justify-content: center;
    padding: 40px; color: var(--text-muted); font-size: 12px; gap: 12px;
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: 0.5px;
}
.spinner {
    width: 20px; height: 20px;
    border: 2px solid rgba(30, 41, 59, 0.4);
    border-top-color: var(--accent);
    border-right-color: rgba(124, 58, 237, 0.5);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.1);
}
@keyframes spin { to { transform: rotate(360deg); } }

.empty-state { text-align: center; padding: 50px 20px; color: var(--text-muted); }
.empty-state .empty-icon { font-size: 44px; margin-bottom: 14px; opacity: 0.15; }
.error-state { text-align: center; padding: 30px 20px; display: flex; align-items: center; justify-content: center; gap: 8px; background: rgba(239,68,68,0.05); border: 1px solid rgba(239,68,68,0.2); border-radius: 8px; margin: 8px; }

/* ===== KEYBOARD SHORTCUTS HELP ===== */
.shortcuts-panel {
    position: fixed; bottom: 40px; left: 20px;
    background: linear-gradient(145deg, rgba(12, 18, 35, 0.97), rgba(8, 14, 28, 0.95));
    backdrop-filter: blur(20px) saturate(150%);
    border: 1px solid rgba(30, 41, 59, 0.5);
    border-radius: var(--radius-lg);
    padding: 18px; z-index: 3000;
    display: none; min-width: 260px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.5), 0 0 30px rgba(0, 212, 255, 0.03);
}
.shortcuts-panel::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0, 212, 255, 0.2), transparent);
}
.shortcuts-panel.show { display: block; animation: shortcutsIn 0.3s cubic-bezier(0.4, 0, 0.2, 1); }
@keyframes shortcutsIn { from { opacity: 0; transform: translateY(10px) scale(0.97); } to { opacity: 1; transform: translateY(0) scale(1); } }
.shortcuts-panel h4 {
    font-size: 10px; color: var(--text-muted);
    text-transform: uppercase; letter-spacing: 1.5px;
    margin-bottom: 12px; font-family: 'JetBrains Mono', monospace;
}
.shortcut-row {
    display: flex; justify-content: space-between;
    padding: 5px 0; font-size: 12px;
}
.shortcut-row .key {
    background: linear-gradient(145deg, rgba(51, 65, 85, 0.5), rgba(30, 41, 59, 0.5));
    padding: 3px 10px; border-radius: 5px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px; color: var(--accent);
    border: 1px solid rgba(51, 65, 85, 0.6);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* ===== STATUS BAR ===== */
.status-bar {
    position: fixed; bottom: 0; left: 0; right: 0;
    height: 30px;
    background: linear-gradient(180deg, rgba(10, 15, 28, 0.97), rgba(8, 12, 22, 0.98));
    backdrop-filter: blur(12px) saturate(150%);
    border-top: 1px solid rgba(30, 41, 59, 0.35);
    display: flex; align-items: center;
    padding: 0 18px; gap: 16px; z-index: 900;
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px; color: var(--text-muted);
}
.status-bar::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0, 212, 255, 0.15), rgba(124, 58, 237, 0.1), transparent);
}
.status-bar .status-item { display: flex; align-items: center; gap: 5px; transition: color 0.2s ease; }
.status-bar .status-item:hover { color: var(--text-secondary); }
.status-bar .status-dot { width: 6px; height: 6px; border-radius: 50%; }
.status-bar .status-dot.online { background: #10b981; box-shadow: 0 0 8px #10b981, 0 0 16px rgba(16, 185, 129, 0.2); }
.status-bar .status-spacer { flex: 1; }

/* ===== FINANCIAL TICKER STRIP ===== */
.financial-ticker-strip {
    background: linear-gradient(145deg, rgba(12, 18, 35, 0.9), rgba(8, 13, 26, 0.95));
    border: 1px solid rgba(30, 41, 59, 0.4);
    border-radius: var(--radius-lg);
    padding: 8px 0;
    margin-bottom: 16px;
    overflow: hidden;
    position: relative;
    box-shadow: var(--shadow-card);
}
.financial-ticker-strip::before,
.financial-ticker-strip::after {
    content: '';
    position: absolute;
    top: 0; bottom: 0;
    width: 40px;
    z-index: 2;
    pointer-events: none;
}
.financial-ticker-strip::before { left: 0; background: linear-gradient(90deg, var(--bg-primary), transparent); }
.financial-ticker-strip::after { right: 0; background: linear-gradient(270deg, var(--bg-primary), transparent); }
.ticker-strip-scroll {
    overflow: hidden;
    white-space: nowrap;
}
.ticker-strip-content {
    display: inline-block;
    animation: tickerScroll 60s linear infinite;
    white-space: nowrap;
    padding: 0 16px;
}
@keyframes tickerScroll {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}
.ticker-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-right: 8px;
    font-size: 12px;
    font-family: 'JetBrains Mono', monospace;
    color: var(--text-secondary);
}
.ticker-item strong {
    color: var(--text-primary);
    font-size: 11px;
}
.ticker-item.up { color: #10b981; }
.ticker-item.down { color: #ef4444; }
.ticker-change {
    font-size: 10px;
    font-weight: 700;
}
.ticker-change.up { color: #10b981; }
.ticker-change.down { color: #ef4444; }
.ticker-sep {
    color: var(--border);
    margin: 0 10px;
    font-size: 10px;
}
.loading-placeholder {
    color: var(--text-muted);
    font-size: 11px;
}

/* ===== MARKET ROWS (Indices, Commodities, Forex) ===== */
.market-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    border-bottom: 1px solid rgba(30, 41, 59, 0.4);
    transition: var(--transition);
}
.market-row:hover { background: rgba(0, 212, 255, 0.02); }
.market-row:last-child { border-bottom: none; }
.market-info {
    display: flex;
    align-items: center;
    gap: 10px;
}
.market-flag {
    font-size: 18px;
}
.commodity-icon {
    font-size: 20px;
    width: 32px;
    text-align: center;
}
.market-name {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
}
.market-symbol {
    font-size: 10px;
    color: var(--text-muted);
    font-family: 'JetBrains Mono', monospace;
}
.market-price-col {
    text-align: right;
}
.market-price {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
    font-family: 'JetBrains Mono', monospace;
}
.market-change {
    font-size: 10px;
    font-weight: 600;
    font-family: 'JetBrains Mono', monospace;
}
.market-change.up { color: #10b981; }
.market-change.down { color: #ef4444; }

/* ===== CRYPTO TABLE ===== */
.crypto-table-header {
    display: grid;
    grid-template-columns: 40px 2fr 1fr 70px 70px 70px 1fr 100px;
    padding: 8px 16px;
    background: rgba(15, 23, 42, 0.5);
    border-bottom: 1px solid var(--border);
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    position: sticky;
    top: 0;
    z-index: 5;
}
.crypto-row {
    display: grid;
    grid-template-columns: 40px 2fr 1fr 70px 70px 70px 1fr 100px;
    padding: 10px 16px;
    border-bottom: 1px solid rgba(30, 41, 59, 0.3);
    align-items: center;
    transition: var(--transition);
    font-family: 'JetBrains Mono', monospace;
}
.crypto-row:hover { background: rgba(0, 212, 255, 0.02); }
.ct-rank {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 600;
}
.ct-name {
    display: flex;
    align-items: center;
    gap: 10px;
}
.coin-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    flex-shrink: 0;
}
.coin-icon-sm {
    width: 22px;
    height: 22px;
    border-radius: 50%;
}
.coin-icon-placeholder {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(249, 115, 22, 0.12);
    border-radius: 50%;
    font-size: 14px;
    flex-shrink: 0;
}
.coin-name {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
}
.coin-symbol {
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
}
.ct-price {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-primary);
}
.ct-change {
    font-size: 11px;
    font-weight: 600;
}
.ct-change.up { color: #10b981; }
.ct-change.down { color: #ef4444; }
.ct-mcap {
    font-size: 11px;
    color: var(--text-secondary);
}
.ct-sparkline {
    display: flex;
    align-items: center;
}
.ct-sparkline canvas {
    max-width: 100px;
    height: 32px;
}

/* ===== TRENDING COINS ===== */
.trending-coin {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    border-bottom: 1px solid rgba(30, 41, 59, 0.4);
    transition: var(--transition);
}
.trending-coin:hover { background: rgba(0, 212, 255, 0.02); }
.trending-rank {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
    min-width: 20px;
    font-family: 'JetBrains Mono', monospace;
}

/* ===== NEWS SOURCES ===== */
.source-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    border-bottom: 1px solid rgba(30, 41, 59, 0.4);
    transition: var(--transition);
}
.source-item:hover { background: rgba(0, 212, 255, 0.02); }
.source-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.source-name {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
}
.source-category {
    font-size: 10px;
    color: var(--text-muted);
}
.source-reliability {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 10px;
    font-weight: 700;
    color: var(--text-secondary);
    font-family: 'JetBrains Mono', monospace;
}
.reliability-bar {
    width: 60px;
    height: 4px;
    background: rgba(15, 23, 42, 0.8);
    border-radius: 2px;
    overflow: hidden;
}
.reliability-fill {
    height: 100%;
    border-radius: 2px;
    transition: width 0.5s ease;
}

/* ===== ADDITIONAL BADGE ===== */
.nav-tab .badge.purple { background: rgba(139, 92, 246, 0.2); color: #a78bfa; }

/* Stat change colors */
.stat-change.up { color: #10b981 !important; }
.stat-change.down { color: #ef4444 !important; }

/* ===== NEWS STATS BAR ===== */
.news-stats-bar {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 10px 18px;
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.04), rgba(124, 58, 237, 0.02));
    border-bottom: 1px solid rgba(30, 41, 59, 0.3);
    font-size: 11px;
    font-family: 'JetBrains Mono', monospace;
    color: var(--text-secondary);
}
.news-stats-bar span:first-child {
    color: var(--accent);
    font-weight: 700;
}

/* ===== FEED SOURCE REFERENCE ===== */
.feed-source-ref {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 0;
    margin-top: 6px;
    border-top: 1px solid rgba(30, 41, 59, 0.3);
    font-size: 11px;
}
.source-ref-left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.source-ref-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}
.source-ref-name {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    color: var(--text-primary);
}
.source-ref-name strong {
    font-weight: 700;
}
.source-ref-reliability {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    font-size: 10px;
}
.source-ref-link {
    color: var(--accent);
    text-decoration: none;
    font-size: 10px;
    opacity: 0.8;
    transition: var(--transition);
}
.source-ref-link:hover {
    opacity: 1;
    text-decoration: underline;
}
.source-ref-author {
    color: var(--text-muted);
    font-size: 10px;
    font-style: italic;
}
.source-ref-time {
    color: var(--text-secondary);
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
}
.source-ref-read {
    color: var(--text-muted);
    font-size: 10px;
    background: rgba(30, 41, 59, 0.4);
    padding: 2px 6px;
    border-radius: 4px;
}

/* ===== FEED ANALYSIS BAR ===== */
.feed-analysis-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding-top: 6px;
    font-size: 10px;
    color: var(--text-muted);
}
.feed-analysis-bar > span {
    display: inline-flex;
    align-items: center;
    gap: 3px;
}
.feed-keywords {
    display: inline-flex;
    gap: 4px;
    flex-wrap: wrap;
}

/* ===== KEYWORD CHIP ===== */
.keyword-chip {
    display: inline-block;
    padding: 2px 8px;
    font-size: 9px;
    font-family: 'JetBrains Mono', monospace;
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.08), rgba(124, 58, 237, 0.05));
    color: var(--accent);
    border: 1px solid rgba(0, 212, 255, 0.15);
    border-radius: 5px;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    transition: var(--transition);
}
.keyword-chip:hover {
    background: rgba(0, 212, 255, 0.12);
    border-color: rgba(0, 212, 255, 0.25);
}

/* ===== VERIFIED BADGE ===== */
.verified-badge {
    background: rgba(16, 185, 129, 0.12) !important;
    color: #10b981 !important;
    border: 1px solid rgba(16, 185, 129, 0.25) !important;
    font-weight: 600;
}

/* ===== REGION TAG ===== */
.region-tag {
    background: rgba(139, 92, 246, 0.12) !important;
    color: #a78bfa !important;
    border: 1px solid rgba(139, 92, 246, 0.25) !important;
}

/* ===== LIVE DOT ===== */
.live-dot {
    color: #10b981;
    font-size: 10px;
    font-weight: 700;
    animation: livePulse 2s ease-in-out infinite;
}
@keyframes livePulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* ===== ARTICLE DETAIL BUTTON ===== */
.btn-article-detail {
    background: rgba(0, 212, 255, 0.08);
    color: var(--accent);
    border: 1px solid rgba(0, 212, 255, 0.2);
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 10px;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
    margin-left: auto;
}
.btn-article-detail:hover {
    background: rgba(0, 212, 255, 0.15);
    border-color: var(--accent);
}

/* ===== SOURCES STATUS BAR ===== */
.sources-status-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 16px;
    background: rgba(15, 23, 42, 0.4);
    border-bottom: 1px solid var(--border);
    font-size: 10px;
    font-family: 'JetBrains Mono', monospace;
}

/* ===== SOURCE STATUS DOT ===== */
.source-status-dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    margin-right: 6px;
    vertical-align: middle;
}

/* ===== ARTICLE DETAIL MODAL ===== */
.article-detail {
    padding: 4px 0;
}
.article-detail-header {
    margin-bottom: 12px;
}
.article-detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 8px;
}
.detail-section {
    margin: 16px 0;
    padding: 16px 18px;
    background: linear-gradient(145deg, rgba(12, 18, 35, 0.5), rgba(15, 23, 42, 0.3));
    border-radius: var(--radius-lg);
    border: 1px solid rgba(30, 41, 59, 0.35);
    position: relative;
}
.detail-section::before {
    content: ''; position: absolute; top: 0; left: 18px; right: 18px; height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0, 212, 255, 0.1), transparent);
}
.detail-section-title {
    font-size: 12px;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(30, 41, 59, 0.3);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-family: 'JetBrains Mono', monospace;
}
.detail-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 6px 0;
    font-size: 12px;
    border-bottom: 1px solid rgba(30, 41, 59, 0.2);
}
.detail-row:last-child {
    border-bottom: none;
}
.detail-label {
    min-width: 100px;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.detail-value {
    color: var(--text-primary);
    flex: 1;
    word-break: break-word;
}

/* ===== NEWS SEARCH INPUT ===== */
.news-search-input {
    flex: 1;
    min-width: 160px;
    max-width: 260px;
    padding: 7px 12px;
    background: linear-gradient(145deg, rgba(12, 18, 35, 0.9), rgba(15, 23, 42, 0.7));
    border: 1px solid rgba(30, 41, 59, 0.5);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 12px;
    font-family: inherit;
    outline: none;
    transition: var(--transition);
}
.news-search-input:hover { border-color: rgba(51, 65, 85, 0.6); }
.news-search-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.08), 0 0 15px rgba(0, 212, 255, 0.05);
    background: rgba(12, 18, 35, 0.95);
}
.news-search-input::placeholder {
    color: var(--text-muted);
}

/* ===== NEWS LAST REFRESH ===== */
.news-last-refresh {
    font-size: 10px;
    color: var(--text-muted);
    font-family: 'JetBrains Mono', monospace;
    white-space: nowrap;
}

/* ===== FEED TITLE CLICKABLE ===== */
.feed-title[onclick] {
    cursor: pointer;
}
.feed-title[onclick]:hover {
    color: var(--accent);
}

/* ===== BREAKING NEWS BANNER ===== */
.news-breaking-banner {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1), rgba(220, 38, 38, 0.04), rgba(239, 68, 68, 0.06));
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: var(--radius-lg);
    margin: 10px 12px;
    overflow: hidden;
    animation: breakingGlow 3s ease-in-out infinite;
    position: relative;
}
.news-breaking-banner::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px;
    background: linear-gradient(90deg, transparent, rgba(239, 68, 68, 0.4), transparent);
}
@keyframes breakingGlow {
    0%, 100% { box-shadow: 0 0 20px rgba(239, 68, 68, 0.06); }
    50% { box-shadow: 0 0 35px rgba(239, 68, 68, 0.12), 0 0 15px rgba(239, 68, 68, 0.05); }
}
.breaking-label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    font-size: 10px;
    font-weight: 800;
    color: #ef4444;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-family: 'JetBrains Mono', monospace;
    background: rgba(239, 68, 68, 0.08);
    border-bottom: 1px solid rgba(239, 68, 68, 0.15);
}
.breaking-pulse {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: #ef4444;
    border-radius: 50%;
    animation: breakPulse 1.5s ease-in-out infinite;
    box-shadow: 0 0 6px #ef4444;
}
@keyframes breakPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.8); }
}
.breaking-items {
    max-height: 200px;
    overflow-y: auto;
}
.breaking-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px;
    border-bottom: 1px solid rgba(239, 68, 68, 0.08);
    cursor: pointer;
    transition: var(--transition);
}
.breaking-item:hover {
    background: rgba(239, 68, 68, 0.08);
}
.breaking-item:last-child {
    border-bottom: none;
}
.breaking-source {
    font-size: 9px;
    font-weight: 700;
    color: #ef4444;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-family: 'JetBrains Mono', monospace;
    flex-shrink: 0;
    min-width: 80px;
}
.breaking-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.breaking-time {
    font-size: 10px;
    color: var(--text-muted);
    font-family: 'JetBrains Mono', monospace;
    flex-shrink: 0;
    white-space: nowrap;
}

/* ===== FEATURED STORIES GRID ===== */
.news-featured-section {
    padding: 0 12px 8px;
}
.section-label {
    font-size: 10px;
    font-weight: 800;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 2px;
    padding: 12px 4px 8px;
    font-family: 'JetBrains Mono', monospace;
}
.news-featured-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
}
.featured-card {
    background: linear-gradient(160deg, rgba(12, 18, 35, 0.9), rgba(8, 13, 26, 0.95));
    border: 1px solid rgba(30, 41, 59, 0.4);
    border-radius: var(--radius-lg);
    overflow: hidden;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
}
.featured-card::after {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.02) 0%, transparent 50%);
    opacity: 0; transition: var(--transition); pointer-events: none;
}
.featured-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.4), 0 0 20px rgba(0, 212, 255, 0.04);
    border-color: rgba(0, 212, 255, 0.3);
}
.featured-card:hover::after { opacity: 1; }
.featured-image {
    position: relative;
    height: 140px;
    overflow: hidden;
    background: rgba(15, 23, 42, 0.5);
}
.featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}
.featured-card:hover .featured-image img {
    transform: scale(1.08);
}
.featured-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 8px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
    display: flex;
    align-items: flex-end;
}
.featured-cat {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 9px;
    font-weight: 700;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-family: 'JetBrains Mono', monospace;
}
.featured-body {
    padding: 10px 12px;
}
.featured-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.4;
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.featured-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 10px;
    color: var(--text-muted);
    font-family: 'JetBrains Mono', monospace;
}

/* ===== FRESHNESS BADGE ===== */
.freshness-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 10px;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: 0.3px;
}

/* ===== RELIABILITY BAR LARGE (Detail Modal) ===== */
.reliability-bar-lg {
    display: inline-block;
    width: 120px;
    height: 6px;
    background: rgba(15, 23, 42, 0.8);
    border-radius: 3px;
    overflow: hidden;
    vertical-align: middle;
    margin-right: 8px;
}
.reliability-bar-lg .reliability-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.6s ease;
}

/* ===== FEED ITEM CLICKABLE CARD ===== */
.feed-item[onclick] {
    cursor: pointer;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1400px) {
    .dashboard-grid { grid-template-columns: 1fr 1fr; }
    .dashboard-grid > *:last-child { grid-column: span 2; }
    .dashboard-grid-4 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
    .dashboard-grid, .dashboard-grid-2, .dashboard-grid-3, .dashboard-grid-4 { grid-template-columns: 1fr; }
    .dashboard-grid > *:last-child { grid-column: span 1; }
    .topbar-center { display: none; }
    .search-box input { width: 160px; }
    .stats-row { grid-template-columns: repeat(2, 1fr); }
    .main-content { padding: 12px; margin-top: 100px; }
    .crypto-table-header, .crypto-row { grid-template-columns: 30px 1.5fr 1fr 60px 60px; }
    .crypto-table-header .ct-change:nth-child(6),
    .crypto-row .ct-change:nth-child(6),
    .ct-mcap, .ct-sparkline { display: none; }
    .financial-ticker-strip { display: none; }
    .nav-tabs { height: 42px; }
    .news-featured-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
}
@media (max-width: 600px) {
    .stats-row { grid-template-columns: 1fr; }
    .topbar-brand h1 { font-size: 12px; letter-spacing: 1.5px; }
    .search-box { display: none; }
    .status-bar { display: none; }
    .main-content { margin-top: 96px; }
    .modal { max-width: 100%; margin: 10px; border-radius: var(--radius-lg); }
    .toast-container { max-width: calc(100vw - 30px); left: 15px; right: 15px; }
    .news-featured-grid { grid-template-columns: 1fr; }
    .featured-image { height: 120px; }
}

/* ===== SUBTLE GLOW ANIMATIONS ===== */
@keyframes subtleGlow {
    0%, 100% { box-shadow: 0 0 10px rgba(0, 212, 255, 0.05); }
    50% { box-shadow: 0 0 20px rgba(0, 212, 255, 0.1); }
}

/* Focus-visible for keyboard navigation */
*:focus-visible {
    outline: 2px solid rgba(0, 212, 255, 0.4);
    outline-offset: 2px;
}

/* Smooth hover transitions for all interactive elements */
a, button, [role="button"], [onclick], .clickable {
    transition: var(--transition);
}

/* Selection colors in panels */
.panel ::selection { background: rgba(0, 212, 255, 0.2); }
.modal ::selection { background: rgba(0, 212, 255, 0.2); }

/* ===== Map Cluster Overrides ===== */
.marker-cluster {
    background-clip: padding-box;
}
.marker-cluster div {
    width: 30px; height: 30px;
    margin-left: 3px; margin-top: 3px;
    text-align: center;
    border-radius: 50%;
    font: 12px 'JetBrains Mono', monospace;
    font-weight: 700;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}
.marker-cluster-small { background: rgba(59, 130, 246, 0.4); }
.marker-cluster-small div { background: rgba(59, 130, 246, 0.8); }
.marker-cluster-medium { background: rgba(249, 115, 22, 0.4); }
.marker-cluster-medium div { background: rgba(249, 115, 22, 0.8); }
.marker-cluster-large { background: rgba(239, 68, 68, 0.4); }
.marker-cluster-large div { background: rgba(239, 68, 68, 0.8); }

/* ===== Phase 3: List Counter ===== */
.list-counter {
    padding: 6px 16px;
    font-size: 11px;
    color: var(--text-muted);
    font-family: 'JetBrains Mono', monospace;
    border-bottom: 1px solid var(--border);
    background: rgba(15, 22, 41, 0.5);
}

/* ===== Phase 3: Load More Button ===== */
.load-more-container {
    padding: 16px;
    text-align: center;
    border-top: 1px solid var(--border);
}
.load-more-btn {
    padding: 8px 24px !important;
    font-size: 12px;
    letter-spacing: 0.5px;
    border: 1px solid var(--border-light) !important;
    transition: var(--transition);
}
.load-more-btn:hover {
    border-color: var(--accent) !important;
    color: var(--accent) !important;
}

/* ===== Phase 3: Panel Actions ===== */
.panel-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* ===== Phase 3: Log Module Tag ===== */
.log-module {
    font-size: 9px !important;
    padding: 2px 6px !important;
    min-width: 50px;
    text-align: center;
}

/* ===== Notification Panel ===== */
.notif-panel {
    position: fixed;
    top: 56px;
    right: 16px;
    width: 340px;
    max-height: 500px;
    background: var(--bg-card-solid);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    z-index: 1100;
    display: none;
    overflow: hidden;
}
.notif-panel.show { display: block; }
.notif-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
}
.notif-panel-header h4 { font-size: 13px; color: var(--text-primary); }
.notif-list {
    max-height: 440px;
    overflow-y: auto;
}
.notif-item {
    padding: 10px 16px;
    border-bottom: 1px solid var(--border);
    cursor: default;
    transition: background 0.2s;
}
.notif-item:hover { background: var(--bg-hover); }
.notif-title { font-size: 12px; font-weight: 600; color: var(--text-primary); margin-bottom: 2px; }
.notif-body { font-size: 11px; color: var(--text-secondary); line-height: 1.4; }
.notif-time { font-size: 10px; color: var(--text-muted); margin-top: 4px; font-family: 'JetBrains Mono', monospace; }

/* ===== Print Styles ===== */
@media print {
    body { background: #fff !important; color: #000 !important; font-size: 11pt; }
    .topbar, .nav-tabs, .status-bar, .toast-container, .shortcuts-panel,
    .notif-panel, .modal-overlay, .filter-bar, .btn-icon, .btn-refresh,
    .panel-actions, .map-scanline, .hud-corner, .map-hud-stats,
    .map-threat-indicator, .map-coords, .map-legend-modern { display: none !important; }
    .main-content { padding: 0 !important; }
    .tab-content { display: block !important; }
    .tab-content:not(.active) { display: none !important; }
    .panel { background: #fff !important; border: 1px solid #ddd !important; box-shadow: none !important; margin-bottom: 12px; page-break-inside: avoid; }
    .panel-header { background: #f5f5f5 !important; border-bottom: 1px solid #ddd !important; }
    .stat-card { background: #fff !important; border: 1px solid #ddd !important; box-shadow: none !important; }
    .tag { border: 1px solid #999 !important; }
    .dashboard-grid, .dashboard-grid-3 { display: block !important; }
    .dashboard-grid > *, .dashboard-grid-3 > * { margin-bottom: 12px; }
    a { color: #000 !important; text-decoration: underline; }
    .feed-item, .event-card, .alert-item, .market-row, .log-item, .watchlist-item {
        border-bottom: 1px solid #eee !important;
        page-break-inside: avoid;
    }
}
