/* ============================================
   EDHT-B — Core Theme & Layout
   Dark military ops center theme
   ============================================ */

/* --- Font Faces --- */
@font-face {
    font-family: 'lucide';
    src: url('../fonts/lucide.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: block;
}

@font-face {
    font-family: 'ZalandoSans';
    src: url('../fonts/ZalandoSans/ZalandoSans-ExtraLight.ttf') format('truetype');
    font-weight: 200;
    font-style: normal;
}
@font-face {
    font-family: 'ZalandoSans';
    src: url('../fonts/ZalandoSans/ZalandoSans-Light.ttf') format('truetype');
    font-weight: 300;
    font-style: normal;
}
@font-face {
    font-family: 'ZalandoSans';
    src: url('../fonts/ZalandoSans/ZalandoSans-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
}
@font-face {
    font-family: 'ZalandoSans';
    src: url('../fonts/ZalandoSans/ZalandoSans-Medium.ttf') format('truetype');
    font-weight: 500;
    font-style: normal;
}
@font-face {
    font-family: 'ZalandoSans';
    src: url('../fonts/ZalandoSans/ZalandoSans-SemiBold.ttf') format('truetype');
    font-weight: 600;
    font-style: normal;
}
@font-face {
    font-family: 'ZalandoSans';
    src: url('../fonts/ZalandoSans/ZalandoSans-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
}
@font-face {
    font-family: 'ZalandoSans';
    src: url('../fonts/ZalandoSans/ZalandoSans-ExtraBold.ttf') format('truetype');
    font-weight: 800;
    font-style: normal;
}
@font-face {
    font-family: 'ZalandoSans';
    src: url('../fonts/ZalandoSans/ZalandoSans-Black.ttf') format('truetype');
    font-weight: 900;
    font-style: normal;
}
@font-face {
    font-family: 'ZalandoSans';
    src: url('../fonts/ZalandoSans/ZalandoSans-LightItalic.ttf') format('truetype');
    font-weight: 300;
    font-style: italic;
}
@font-face {
    font-family: 'ZalandoSans';
    src: url('../fonts/ZalandoSans/ZalandoSans-Italic.ttf') format('truetype');
    font-weight: 400;
    font-style: italic;
}
@font-face {
    font-family: 'ZalandoSans';
    src: url('../fonts/ZalandoSans/ZalandoSans-MediumItalic.ttf') format('truetype');
    font-weight: 500;
    font-style: italic;
}
@font-face {
    font-family: 'ZalandoSans';
    src: url('../fonts/ZalandoSans/ZalandoSans-SemiBoldItalic.ttf') format('truetype');
    font-weight: 600;
    font-style: italic;
}
@font-face {
    font-family: 'ZalandoSans';
    src: url('../fonts/ZalandoSans/ZalandoSans-BoldItalic.ttf') format('truetype');
    font-weight: 700;
    font-style: italic;
}

/* --- Custom Properties --- */
:root {
    --bg-primary: #0c0c0c;
    --bg-secondary: #151515;
    --bg-tertiary: #1c1c1c;
    --bg-hover: #232323;
    --bg-active: #2a2a2a;
    --border-color: #2a2a2a;
    --border-light: #3a3a3a;
    --text-primary: #c5c8c6;
    --text-secondary: #8a9199;
    --text-muted: #5a6370;
    --accent-primary: #5d8a68;
    --accent-amber: #d4a017;
    --accent-blue: #42a5f5;
    --accent-green: #5d8a68;
    --accent-red: #ef5350;
    --accent-yellow: #ffa726;
    --accent-purple: #ce93d8;
    --accent-cyan: #80cbc4;
    --accent-orange: #ffab91;
    --hostile-color: #ef5350;
    --friendly-color: #42a5f5;
    --neutral-color: #66bb6a;
    --unknown-color: #ffa726;
    --font-mono: 'Consolas', 'Monaco', 'Courier New', monospace;
    --font-sans: 'ZalandoSans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-icon: 'lucide';
    --header-height: 44px;
    --banner-height: 22px;
    --sidebar-width: 220px;
    --toast-z: 9999;
    --transition-fast: 150ms ease;
    --transition-normal: 250ms ease;
}

/* --- Lucide Icon --- */
.icon {
    font-family: var(--font-icon);
    font-style: normal;
    font-weight: normal;
    font-variant: normal;
    text-transform: none;
    line-height: 1;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    display: inline-block;
    vertical-align: middle;
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
    height: 100%;
    overflow: hidden;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 13px;
    font-weight: 400;
    line-height: 1.4;
    -webkit-font-smoothing: antialiased;
}

body {
    display: flex;
    flex-direction: column;
}

/* --- Scrollbars --- */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--border-light); }

/* --- Classification Banner --- */
.classification-banner {
    height: var(--banner-height);
    background: #2e7d32;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-sans);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    user-select: none;
    flex-shrink: 0;
}

/* --- Header --- */
#app-header {
    height: var(--header-height);
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    padding: 0 12px;
    gap: 16px;
    flex-shrink: 0;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 180px;
}

.app-title {
    font-size: 15px;
    font-weight: 800;
    color: var(--accent-primary);
    letter-spacing: 1px;
}

.app-subtitle {
    font-size: 10px;
    font-weight: 300;
    color: var(--text-muted);
    letter-spacing: 0.5px;
}

.header-center {
    flex: 1;
    display: flex;
    justify-content: center;
}

#main-nav {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    justify-content: center;
}

.nav-btn {
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-secondary);
    padding: 4px 14px;
    font-family: var(--font-sans);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
    border-radius: 3px;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.nav-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
    border-color: var(--border-color);
}

.nav-btn.active {
    background: var(--bg-active);
    color: var(--accent-primary);
    border-color: var(--accent-primary);
}

.nav-btn-server { border: 1px solid rgba(212,160,23,0.3) !important; margin-left: 8px; margin-right: 8px; }
.nav-btn-server:hover { border-color: var(--accent-amber) !important; color: var(--accent-amber) !important; }
.nav-btn-server.active { color: var(--accent-amber) !important; border-color: var(--accent-amber) !important; background: rgba(212,160,23,0.08) !important; }

.nav-icon {
    font-family: var(--font-icon);
    font-size: 14px;
    font-style: normal;
    font-weight: normal;
    line-height: 1;
    -webkit-font-smoothing: antialiased;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 240px;
    justify-content: flex-end;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent-green);
    box-shadow: 0 0 4px var(--accent-green);
}

#header-clock {
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 600;
    color: var(--accent-green);
    letter-spacing: 1px;
    min-width: 140px;
    text-align: right;
}

.header-speed-btn {
    background: var(--bg-tertiary);
    border: 1px solid var(--accent-cyan);
    color: var(--accent-cyan);
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    min-width: 32px;
    cursor: pointer;
    border-radius: 3px;
    letter-spacing: 0.5px;
    transition: all var(--transition-fast);
}

.header-speed-btn:hover { background: var(--bg-hover); }

.mute-btn {
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-muted);
    font-family: var(--font-icon);
    font-size: 16px;
    cursor: pointer;
    padding: 2px 4px;
    border-radius: 3px;
    transition: color var(--transition-fast);
    line-height: 1;
    -webkit-font-smoothing: antialiased;
}

.mute-btn:hover { color: var(--text-primary); }
.mute-btn.muted { color: var(--accent-red); }

.user-label {
    font-size: 10px;
    color: var(--text-muted);
    letter-spacing: 0.5px;
}

/* --- Main Content --- */
#main-content {
    flex: 1;
    overflow: hidden;
    position: relative;
}

/* --- View Switching --- */
.view {
    display: none;
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
}

.view.active {
    display: flex;
}

/* --- Buttons --- */
.mil-btn {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 6px 12px;
    font-family: var(--font-sans);
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    border-radius: 3px;
    transition: all var(--transition-fast);
}

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

.mil-btn.active {
    background: var(--accent-primary);
    color: #fff;
    border-color: var(--accent-primary);
}

.mil-btn-sm {
    padding: 3px 8px;
    font-size: 10px;
}

/* --- Form Elements --- */
.mil-input, .mil-select, .mil-textarea {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 12px;
    font-weight: 400;
    padding: 5px 8px;
    border-radius: 3px;
    outline: none;
    transition: border-color var(--transition-fast);
}

.mil-input:focus, .mil-select:focus, .mil-textarea:focus {
    border-color: var(--accent-primary);
}

/* --- Toast Notifications --- */
#toast-container {
    position: fixed;
    top: calc(var(--banner-height) + var(--header-height) + 8px);
    right: 12px;
    z-index: var(--toast-z);
    display: flex;
    flex-direction: column;
    gap: 6px;
    pointer-events: none;
}

.toast {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-left: 3px solid var(--accent-primary);
    color: var(--text-primary);
    padding: 8px 14px;
    border-radius: 4px;
    font-size: 12px;
    max-width: 360px;
    pointer-events: auto;
    animation: toastIn 200ms ease forwards;
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}

.toast.warning { border-left-color: var(--accent-yellow); }
.toast.error { border-left-color: var(--accent-red); }
.toast.success { border-left-color: var(--accent-green); }
.toast.flash { border-left-color: var(--accent-red); background: #1a0a0a; }

.toast-exit { animation: toastOut 200ms ease forwards; }

@keyframes toastIn {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes toastOut {
    from { opacity: 1; transform: translateX(0); }
    to { opacity: 0; transform: translateX(20px); }
}

/* --- Badges & Pills --- */
.badge {
    display: inline-block;
    padding: 1px 6px;
    border-radius: 3px;
    font-family: var(--font-sans);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.badge-hostile { background: rgba(239,83,80,0.2); color: var(--hostile-color); }
.badge-friendly { background: rgba(66,165,245,0.2); color: var(--friendly-color); }
.badge-neutral { background: rgba(102,187,106,0.2); color: var(--neutral-color); }
.badge-unknown { background: rgba(255,167,38,0.2); color: var(--unknown-color); }
.badge-sigint { background: rgba(206,147,216,0.2); color: var(--accent-purple); }
.badge-humint { background: rgba(255,171,145,0.2); color: var(--accent-orange); }
.badge-geoint { background: rgba(128,203,196,0.2); color: var(--accent-cyan); }

/* --- Reliability/Credibility Rating --- */
.rating {
    display: inline-block;
    padding: 1px 5px;
    border-radius: 2px;
    font-size: 10px;
    font-weight: 700;
    font-family: var(--font-mono);
}

.rating-high { background: rgba(102,187,106,0.2); color: var(--accent-green); }
.rating-mid { background: rgba(255,167,38,0.2); color: var(--accent-yellow); }
.rating-low { background: rgba(239,83,80,0.2); color: var(--accent-red); }

/* --- Context Menu --- */
.context-menu {
    position: fixed;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 4px 0;
    min-width: 180px;
    z-index: 10000;
    box-shadow: 0 4px 16px rgba(0,0,0,0.5);
}

.context-menu-item {
    padding: 6px 14px;
    font-size: 12px;
    cursor: pointer;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.context-menu-item:hover {
    background: var(--bg-hover);
}

.context-menu-sep {
    height: 1px;
    background: var(--border-color);
    margin: 4px 0;
}

/* --- Responsive --- */
@media (max-width: 900px) {
    .header-left .app-subtitle { display: none; }
    .header-right .user-label { display: none; }
}

@media (max-width: 600px) {
    .header-left { min-width: auto; }
    .header-right { min-width: auto; }
    #main-nav { gap: 2px; }
    .nav-btn { padding: 4px 8px; font-size: 10px; }
}

/* ============================================
   Server Config Pane
   ============================================ */

.server-config-layout {
    display: flex;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.server-panel {
    padding: 16px;
    overflow-y: auto;
}

.server-controls-panel {
    width: 380px;
    min-width: 320px;
    border-right: 1px solid var(--border-color);
    background: var(--bg-secondary);
}

.server-log-panel {
    flex: 1;
    background: var(--bg-primary);
}

.server-section {
    margin-bottom: 16px;
}

.server-section-title {
    font-size: 10px;
    color: var(--accent-cyan);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 600;
    margin-bottom: 10px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--border-color);
}

.server-label {
    font-size: 11px;
    color: var(--text-secondary);
}

.server-conn-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.server-input-row {
    display: flex;
    gap: 6px;
}

.server-input-row .mil-input {
    flex: 1;
}

.server-conn-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
}

.server-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.server-status-dot.connected {
    background: var(--accent-green);
    box-shadow: 0 0 6px var(--accent-green);
}

.server-status-dot.disconnected {
    background: var(--accent-red);
}

.server-status-dot.connecting {
    background: var(--accent-yellow);
    animation: pulse-dot 1s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* Stats */
.server-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.server-stat {
    text-align: center;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 3px;
    padding: 8px 4px;
}

.server-stat-value {
    font-size: 14px;
    font-weight: 700;
    color: var(--accent-primary);
    font-family: var(--font-sans);
}

.server-stat-label {
    font-size: 9px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 2px;
}

/* Generate buttons */
.server-btn-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
}

/* Auto / WOPR row */
.server-auto-row {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.server-auto-row .mil-btn.active {
    background: var(--accent-red);
    border-color: var(--accent-red);
    color: #fff;
}

/* Scenarios */
.server-scenario-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: flex-start;
}

.server-scenario-cat {
    width: 100%;
    font-size: 10px;
    color: var(--accent-yellow);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
    margin-top: 6px;
}

.server-scenario-cat:first-child {
    margin-top: 0;
}

.server-scenario-btn {
    border-left: 3px solid var(--accent-yellow) !important;
}

/* Event log */
.server-log-entries {
    flex: 1;
    overflow-y: auto;
    font-family: var(--font-mono);
    font-size: 11px;
}

.server-log-entry {
    display: flex;
    gap: 10px;
    padding: 5px 8px;
    border-bottom: 1px solid var(--border-color);
    align-items: baseline;
}

.server-log-entry:hover {
    background: var(--bg-secondary);
}

.server-log-time {
    color: var(--text-muted);
    width: 60px;
    flex-shrink: 0;
}

.server-log-type {
    width: 100px;
    flex-shrink: 0;
    font-weight: 600;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
}

.server-log-type.intel-report { color: var(--accent-primary); }
.server-log-type.mil-message { color: var(--accent-purple); }
.server-log-type.alert { color: var(--accent-red); }
.server-log-type.map-marker { color: var(--accent-green); }
.server-log-type.unit-movement { color: var(--accent-cyan); }
.server-log-type.entity-update { color: var(--accent-orange); }
.server-log-type.timeline-event { color: var(--accent-yellow); }
.server-log-type.wopr-launch { color: var(--accent-red); }
.server-log-type.wopr-detonation { color: var(--accent-red); }

.server-log-summary {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--text-primary);
}

.server-log-clients {
    color: var(--text-muted);
    font-size: 10px;
    flex-shrink: 0;
}

.server-log-empty {
    color: var(--text-muted);
    font-style: italic;
    padding: 40px;
    text-align: center;
}

@media (max-width: 700px) {
    .server-config-layout { flex-direction: column; }
    .server-controls-panel { width: 100%; min-width: 0; border-right: none; border-bottom: 1px solid var(--border-color); max-height: 50%; }
    .server-stats { grid-template-columns: repeat(2, 1fr); }
}

/* ============================================
   Messages Pane — Master/Detail Layout
   ============================================ */

.messages-layout {
    display: flex;
    width: 100%;
    height: 100%;
}

.messages-list-panel {
    width: 380px;
    min-width: 300px;
    border-right: 1px solid var(--border-color);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.messages-list-panel .isr-panel {
    height: 100%;
}

.messages-detail-panel {
    flex: 1;
    overflow-y: auto;
    background: var(--bg-primary);
}

.messages-detail-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--text-muted);
    font-size: 12px;
}

.isr-message-item.selected {
    background: var(--bg-active);
    border-left-color: var(--accent-cyan);
}

.messages-detail-actions {
    padding: 12px;
    border-top: 1px solid var(--border-color);
}

.messages-detail-actions .mil-btn {
    font-size: 10px;
}

@media (max-width: 768px) {
    .messages-layout { flex-direction: column; }
    .messages-list-panel { width: 100%; min-width: 0; height: 40%; border-right: none; border-bottom: 1px solid var(--border-color); }
}

/* ============================================
   Minimap (Messages & Intel Detail)
   ============================================ */

.minimap-container {
    width: 100%;
    height: 180px;
    border: 1px solid var(--border-color);
    border-radius: 3px;
    margin: 8px 0;
    overflow: hidden;
    background: var(--bg-primary);
}

.minimap-tooltip {
    background: rgba(12,12,12,0.85) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-primary) !important;
    font-family: var(--font-mono) !important;
    font-size: 10px !important;
    padding: 2px 6px !important;
    border-radius: 2px !important;
    box-shadow: none !important;
}

.minimap-tooltip::before { display: none !important; }

/* ============================================
   Intel View — Master/Detail Layout
   ============================================ */

.intel-view-layout {
    display: flex;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.intel-list-panel {
    width: 340px;
    min-width: 280px;
    border-right: 1px solid var(--border-color);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.intel-list-panel .isr-panel { height: 100%; }

.intel-detail-panel {
    width: 320px;
    min-width: 260px;
    border-right: 1px solid var(--border-color);
    overflow-y: auto;
    background: var(--bg-primary);
}

.isr-intel-item.selected {
    background: var(--bg-active);
    border-left: 2px solid var(--accent-cyan);
}

@media (max-width: 1000px) {
    .intel-view-layout { flex-direction: column; }
    .intel-list-panel { width: 100%; min-width: 0; height: 35%; border-right: none; border-bottom: 1px solid var(--border-color); }
    .intel-detail-panel { width: 100%; min-width: 0; height: 30%; border-right: none; border-bottom: 1px solid var(--border-color); }
}

/* ============================================
   Fusion / Entity Correlation View
   ============================================ */

.fusion-layout {
    display: flex;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.fusion-entity-list-panel {
    width: 300px;
    min-width: 240px;
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    background: var(--bg-secondary);
}

.fusion-panel-header {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
}

.fusion-panel-title {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--accent-purple);
}

.fusion-filter-bar {
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
}

.fusion-search {
    width: 100%;
    font-size: 11px !important;
    padding: 4px 6px !important;
}

.fusion-filter-select {
    width: 100%;
    font-size: 11px !important;
    padding: 3px 4px !important;
}

.fusion-entity-list {
    flex: 1;
    overflow-y: auto;
    padding: 4px 0;
}

.fusion-entity-item {
    padding: 6px 10px;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: background var(--transition-fast);
}

.fusion-entity-item:hover { background: var(--bg-hover); }
.fusion-entity-item.selected { background: var(--bg-active); border-left: 2px solid var(--accent-purple); }

.fusion-entity-row {
    display: flex;
    align-items: center;
    gap: 6px;
}

.fusion-aff-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.fusion-aff-dot-lg {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    flex-shrink: 0;
}

.fusion-entity-name {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fusion-degree-badge {
    background: var(--accent-purple);
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 8px;
    min-width: 18px;
    text-align: center;
}

.fusion-entity-meta {
    display: flex;
    gap: 8px;
    font-size: 10px;
    color: var(--text-muted);
    margin-top: 2px;
    padding-left: 14px;
}

.fusion-entity-type {
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 9px;
}

.fusion-empty {
    padding: 24px;
    text-align: center;
    color: var(--text-muted);
    font-size: 11px;
}

/* --- Fusion Detail Panel --- */

.fusion-detail-panel {
    width: 420px;
    min-width: 340px;
    border-right: 1px solid var(--border-color);
    overflow: hidden;
    background: var(--bg-primary);
}

.fusion-detail {
    padding: 0;
}

.fusion-entity-card {
    padding: 12px;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-secondary);
}

.fusion-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.fusion-card-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
}

.fusion-card-meta {
    display: flex;
    gap: 8px;
    font-size: 10px;
    margin-top: 2px;
}

.fusion-card-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    margin-bottom: 8px;
}

.fusion-stat {
    text-align: center;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 3px;
    padding: 6px 4px;
}

.fusion-stat-value {
    font-size: 13px;
    font-weight: 700;
    font-family: var(--font-sans);
    color: var(--accent-primary);
}

.fusion-stat-label {
    font-size: 9px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 2px;
}

.fusion-card-desc {
    font-size: 11px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-top: 6px;
}

.fusion-card-coord {
    font-size: 10px;
    color: var(--accent-cyan);
    margin-top: 4px;
    font-family: var(--font-mono);
}

/* --- Fusion Sections --- */

.fusion-section {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border-color);
}

.fusion-section-title {
    font-size: 10px;
    color: var(--accent-purple);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 600;
    margin-bottom: 8px;
}

.fusion-link-canvas {
    width: 100%;
    height: 300px;
    border: 1px solid var(--border-color);
    border-radius: 3px;
    display: block;
}

.fusion-link-group {
    margin-bottom: 8px;
}

.fusion-link-type {
    font-size: 10px;
    color: var(--accent-cyan);
    font-weight: 600;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.fusion-link-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 3px 4px;
    font-size: 11px;
    cursor: pointer;
    border-radius: 2px;
    transition: background var(--transition-fast);
}

.fusion-link-item:hover { background: var(--bg-hover); }

.fusion-link-target {
    color: var(--text-primary);
    flex: 1;
}

.fusion-link-conf {
    font-size: 9px;
    font-weight: 600;
}

.fusion-link-source {
    font-size: 9px;
    color: var(--text-muted);
}

.fusion-empty-sm {
    padding: 8px;
    color: var(--text-muted);
    font-size: 11px;
    font-style: italic;
}

/* --- Multi-INT Fusion --- */

.fusion-intel-group {
    margin-bottom: 8px;
}

.fusion-intel-disc {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.fusion-intel-item {
    display: flex;
    gap: 6px;
    font-size: 11px;
    padding: 2px 0;
    align-items: baseline;
}

.fusion-intel-sensor {
    color: var(--text-secondary);
    flex-shrink: 0;
    font-size: 10px;
}

.fusion-intel-desc {
    flex: 1;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fusion-intel-time {
    color: var(--text-muted);
    font-size: 10px;
    flex-shrink: 0;
}

.fusion-intel-more {
    font-size: 10px;
    color: var(--text-muted);
    padding-left: 4px;
}

/* --- Co-Located --- */

.fusion-colocated-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 3px 4px;
    font-size: 11px;
    cursor: pointer;
    border-radius: 2px;
}

.fusion-colocated-item:hover { background: var(--bg-hover); }

/* --- Fusion Map --- */

.fusion-map-panel {
    flex: 1;
    min-width: 0;
    position: relative;
}

@media (max-width: 1100px) {
    .fusion-layout { flex-wrap: wrap; }
    .fusion-entity-list-panel { width: 100%; min-width: 0; height: 30%; border-right: none; border-bottom: 1px solid var(--border-color); }
    .fusion-detail-panel { width: 50%; border-right: 1px solid var(--border-color); }
    .fusion-map-panel { width: 50%; }
}
