/* AI War Room — thème sombre, layout type world-monitor */
* { margin: 0; padding: 0; box-sizing: border-box; }
body, .war-room-app {
  background: #060a10;
  color: #fff;
  font-family: 'DM Sans', sans-serif;
  height: 100vh;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}
.war-room-scanlines {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  background-image: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 3px,
    rgba(0,0,0,.022) 3px,
    rgba(0,0,0,.022) 4px
  );
}
.war-room-glow {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 60% 40% at 20% 15%, rgba(214,0,42,.05) 0%, transparent 55%),
    radial-gradient(ellipse 50% 50% at 80% 80%, rgba(59,130,246,.04) 0%, transparent 55%),
    radial-gradient(ellipse 40% 35% at 50% 50%, rgba(245,158,11,.025) 0%, transparent 55%);
}
.war-room-app { position: relative; z-index: 1; display: flex; flex-direction: column; min-height: 0; }

/* Header */
.war-room-header {
  flex-shrink: 0;
  border-bottom: 1px solid rgba(255,255,255,.07);
  background: rgba(6,10,16,.95);
  backdrop-filter: blur(20px);
}
.war-room-header-inner {
  padding: 0 20px;
  height: 50px;
  display: flex;
  align-items: center;
  gap: 20px;
}
.war-room-brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.war-room-logo-link { display: flex; align-items: center; }
.war-room-logo-img { height: 20px; width: auto; max-width: 160px; display: block; object-fit: contain; }
.war-room-brand-sub { font-family: 'JetBrains Mono', monospace; font-size: 14px; font-weight: 700; color: #d6002a; letter-spacing: 2px; animation: war-glow 2.5s ease infinite; }
@keyframes war-glow { 0%, 100% { text-shadow: 0 0 10px rgba(214,0,42,.4); } 50% { text-shadow: 0 0 22px rgba(214,0,42,.67); } }

.war-room-tabs { display: flex; gap: 2px; margin-left: 14px; }
.war-room-tab {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.5px;
  padding: 5px 14px;
  border-radius: 5px;
  border: none;
  cursor: pointer;
  transition: all .15s;
  background: transparent;
  color: rgba(255,255,255,.58);
  border-bottom: 1px solid transparent;
}
.war-room-tab:hover { color: rgba(255,255,255,.78); }
.war-room-tab.active {
  background: rgba(214,0,42,.15);
  color: #d6002a;
  border-bottom-color: #d6002a;
}

.war-room-exit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(16, 185, 129, 0.7);
  background: rgba(16, 185, 129, 0.18);
  color: #6ee7b7;
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s, box-shadow 0.15s;
  margin-right: 10px;
}

.war-room-exit-btn:hover {
  background: rgba(16, 185, 129, 0.32);
  border-color: rgba(16, 185, 129, 0.9);
  color: #a7f3d0;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.45);
}

.war-room-stats { margin-left: auto; display: flex; align-items: center; gap: 16px; }
.war-room-stat { text-align: center; }
.war-room-stat-val { font-family: 'JetBrains Mono', monospace; font-size: 13px; font-weight: 700; display: block; }
.war-room-stat-val.signals { color: #d6002a; }
.war-room-stat-val.models { color: #3b82f6; }
.war-room-stat-val.deals { color: #10b981; }
.war-room-stat-val.pays { color: #f59e0b; }
.war-room-stat-label { font-family: 'JetBrains Mono', monospace; font-size: 7px; color: rgba(255,255,255,.52); letter-spacing: 1px; }
.war-room-sep { width: 1px; height: 28px; background: rgba(255,255,255,.08); }
.war-room-time { text-align: right; }
.war-room-time-val { font-family: 'JetBrains Mono', monospace; font-size: 13px; font-weight: 700; }
.war-room-live { display: flex; align-items: center; gap: 4px; justify-content: flex-end; font-family: 'JetBrains Mono', monospace; font-size: 7px; color: #10b981; letter-spacing: 1px; }
.war-room-live-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 6px #10b981;
  animation: war-pulse 1.4s ease-in-out infinite;
}
.war-room-live-dot.small { width: 5px; height: 5px; background: #d6002a; box-shadow: 0 0 6px #d6002a; }
@keyframes war-pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .45; transform: scale(.85); } }

/* Main */
.war-room-main { flex: 1; overflow: hidden; min-height: 0; position: relative; }
.war-room-overview {
  display: flex;
  height: 100%;
  overflow: hidden;
  min-height: 0;
}
.war-room-tab-panel {
  height: 100%;
  overflow: auto;
  padding: 20px 24px;
}
.war-room-tab-panel[hidden] { display: none !important; }
.war-room-tab-inner {
  max-width: 900px;
  margin: 0 auto;
  background: rgba(255,255,255,.025);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 10px;
  padding: 20px;
  min-height: calc(100vh - 120px);
}

/* Left column — Signal Feed */
.war-room-left {
  width: 288px;
  flex-shrink: 0;
  border-right: 1px solid rgba(255,255,255,.07);
  background: rgba(255,255,255,.015);
  padding: 14px 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.war-room-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}
.war-room-label-line { width: 14px; height: 1px; background: currentColor; flex-shrink: 0; }
.war-room-label-fill { flex: 1; height: 1px; background: rgba(255,255,255,.05); }
.war-room-label-red { color: #d6002a; }
.war-room-label-green { color: #10b981; }
.war-room-label-blue { color: #3b82f6; }
.war-room-label-amber { color: #f59e0b; }
.war-room-label-purple { color: #a855f7; }
.war-room-feed {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.war-room-feed-item {
  padding: 9px 11px;
  border-radius: 6px;
  cursor: pointer;
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.06);
  transition: background .15s;
}
.war-room-feed-item:hover { background: rgba(255,255,255,.06); }
.war-room-feed-item.hot { background: rgba(214,0,42,.06); border-color: rgba(214,0,42,.2); }
.war-room-feed-item .meta { display: flex; align-items: center; gap: 5px; margin-bottom: 4px; }
.war-room-feed-item .time { font-family: 'JetBrains Mono', monospace; font-size: 8px; color: rgba(255,255,255,.55); letter-spacing: 1px; }
.war-room-feed-item .tag { font-size: 8px; font-weight: 700; padding: 2px 5px; border-radius: 3px; letter-spacing: 1px; font-family: 'JetBrains Mono', monospace; }
.war-room-feed-item .actor { font-size: 9px; font-weight: 700; color: rgba(255,255,255,.72); margin-left: auto; font-family: 'JetBrains Mono', monospace; }
.war-room-feed-item .text { font-size: 11px; color: rgba(255,255,255,.88); line-height: 1.5; }
.war-room-feed-item .text a.war-room-feed-link {
  color: inherit;
  text-decoration: none;
  display: block;
}
.war-room-feed-item .text a.war-room-feed-link:hover {
  text-decoration: underline;
}

/* Center */
.war-room-center {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
}
.war-room-filter-bar {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 14px;
  border-bottom: 1px solid rgba(255,255,255,.07);
  background: rgba(10,15,22,.8);
  backdrop-filter: blur(12px);
}
.war-room-filter-label { font-family: 'JetBrains Mono', monospace; font-size: 7px; color: rgba(255,255,255,.52); letter-spacing: 2px; margin-right: 4px; flex-shrink: 0; }
.war-room-filter-btn {
  font-family: 'JetBrains Mono', monospace;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 1px;
  padding: 3px 10px;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  transition: all .15s;
  background: transparent;
  color: rgba(255,255,255,.58);
  border-bottom: 1px solid transparent;
}
.war-room-filter-btn:hover { color: rgba(255,255,255,.78); }
.war-room-filter-btn.active {
  background: rgba(255,255,255,.14);
  color: #fff;
  border-bottom-color: rgba(255,255,255,.55);
}
.war-room-filter-stats { margin-left: auto; display: flex; gap: 14px; align-items: center; font-family: 'JetBrains Mono', monospace; font-size: 7px; color: rgba(255,255,255,.52); }
.war-room-filter-stats strong { font-size: 12px; color: rgba(255,255,255,.85); margin-right: 4px; }

.war-room-map-wrap {
  flex: 1;
  position: relative;
  display: flex;
  overflow: hidden;
  min-height: 0;
}
.war-room-map-inner { flex: 1; position: relative; overflow: hidden; }
.war-room-map-loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 10px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  color: rgba(255,255,255,.58);
}
.war-room-map-loading.hidden { display: none; }
.war-room-map-svg { width: 100%; height: 100%; display: block; cursor: grab; }
.war-room-map-svg:active { cursor: grabbing; }
.war-room-legend {
  position: absolute;
  bottom: 12px;
  left: 12px;
  z-index: 10;
  background: rgba(6,10,16,.88);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 8px;
  padding: 9px 13px;
  backdrop-filter: blur(16px);
  font-family: 'JetBrains Mono', monospace;
  font-size: 7px;
  color: rgba(255,255,255,.58);
  letter-spacing: 2px;
}
.war-room-legend-row { display: flex; align-items: center; gap: 7px; margin-bottom: 4px; }
.war-room-legend-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.war-room-map-hint {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: rgba(6,10,16,.82);
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 5px;
  padding: 5px 11px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 8px;
  color: rgba(255,255,255,.58);
}
.war-room-map-hint.hidden { display: none; }
.war-room-side-panel {
  width: 300px;
  flex-shrink: 0;
  border-left: 1px solid rgba(255,255,255,.08);
  background: rgba(6,10,16,.97);
  display: none;
  flex-direction: column;
  overflow: hidden;
}
.war-room-side-panel.visible { display: flex; }
.war-room-side-panel .panel-header { padding: 12px 14px; border-bottom: 1px solid rgba(255,255,255,.07); display: flex; align-items: center; }
.war-room-panel-country { display: inline-block; }
.war-room-side-panel .panel-close { margin-left: auto; background: none; border: none; color: rgba(255,255,255,.65); cursor: pointer; font-size: 15px; }
.war-room-side-panel .panel-body { flex: 1; overflow-y: auto; padding: 8px 12px; display: flex; flex-direction: column; gap: 7px; }

.war-room-bottom-row {
  flex-shrink: 0;
  height: 230px;
  border-top: 1px solid rgba(255,255,255,.07);
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.war-room-bottom-col {
  padding: 12px 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.war-room-bottom-col:first-child { border-right: 1px solid rgba(255,255,255,.07); }
.war-room-model-tracker-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-shrink: 0;
  margin-bottom: 6px;
}
.war-room-model-tracker-header .war-room-label { margin-bottom: 0; }
.war-room-model-tracker-btn {
  display: inline-block;
  font-size: 9px;
  font-weight: 600;
  color: #3b82f6;
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.4);
  border-radius: 4px;
  padding: 3px 8px;
  margin-right: 8px;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}
.war-room-model-tracker-btn:hover {
  background: rgba(59, 130, 246, 0.25);
  color: #60a5fa;
}
.war-room-module-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-shrink: 0;
  margin-bottom: 6px;
}
.war-room-module-header .war-room-label { margin-bottom: 0; }
.war-room-explorer-btn {
  display: inline-block;
  font-size: 9px;
  font-weight: 600;
  border-radius: 4px;
  padding: 3px 8px;
  margin-right: 8px;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}
.war-room-explorer-btn--power {
  color: #f59e0b;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.4);
}
.war-room-explorer-btn--power:hover {
  background: rgba(245, 158, 11, 0.25);
  color: #fbbf24;
}
.war-room-explorer-btn--funding {
  color: #10b981;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.4);
}
.war-room-explorer-btn--funding:hover {
  background: rgba(16, 185, 129, 0.25);
  color: #34d399;
}
.war-room-explorer-btn--eu {
  color: #a855f7;
  background: rgba(168, 85, 247, 0.15);
  border: 1px solid rgba(168, 85, 247, 0.4);
}
.war-room-explorer-btn--eu:hover {
  background: rgba(168, 85, 247, 0.25);
  color: #c084fc;
}
.war-room-funding-list, .war-room-models-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.war-room-funding-card, .war-room-model-card, .war-room-power-card {
  padding: 8px 10px;
  border-radius: 6px;
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.06);
}
.war-room-funding-card .name, .war-room-model-card .name { font-size: 11px; font-weight: 700; color: #fff; flex: 1; }
.war-room-funding-card .amount { font-family: 'JetBrains Mono', monospace; font-size: 11px; font-weight: 700; }
.war-room-funding-bar { height: 3px; background: rgba(255,255,255,.07); border-radius: 2px; margin: 5px 0; overflow: hidden; }
.war-room-funding-bar-fill { height: 100%; border-radius: 2px; }
.war-room-funding-meta { display: flex; gap: 10px; font-size: 10px; color: rgba(255,255,255,.72); font-family: 'JetBrains Mono', monospace; }
.war-room-model-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  margin-top: 6px;
}
.war-room-model-meta-lbl {
  color: rgba(255,255,255,.72);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  display: block;
  margin-bottom: 1px;
}
.war-room-model-meta-val {
  color: rgba(255,255,255,.9);
  font-weight: 600;
}
.war-room-power-card { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.war-room-power-card .rank { font-family: 'JetBrains Mono', monospace; font-size: 9px; color: rgba(255,255,255,.55); min-width: 16px; }
.war-room-power-card .bar-wrap { flex: 1; }
.war-room-power-card .score { font-family: 'JetBrains Mono', monospace; font-size: 12px; font-weight: 700; color: rgba(255,255,255,.88); min-width: 24px; text-align: right; }
.war-room-power-card .delta { font-family: 'JetBrains Mono', monospace; font-size: 9px; font-weight: 700; min-width: 24px; text-align: right; }
.war-room-power-card .region { font-size: 8px; padding: 2px 5px; border-radius: 3px; font-weight: 700; font-family: 'JetBrains Mono', monospace; }

/* Right column */
.war-room-right {
  width: 272px;
  flex-shrink: 0;
  border-left: 1px solid rgba(255,255,255,.07);
  background: rgba(255,255,255,.015);
  padding: 14px 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.war-room-power-list { overflow-y: auto; min-height: 0; }
.war-room-power-index-link {
  margin: 8px 0 0;
  padding: 0;
  font-size: 0;
  display: flex;
  justify-content: flex-end;
}
.war-room-power-index-link a {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  color: #f59e0b;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 6px;
  padding: 6px 12px;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.war-room-power-index-link a:hover {
  background: rgba(245, 158, 11, 0.22);
  color: #fbbf24;
  text-decoration: none;
}
.war-room-model-tracker-link {
  margin: 8px 0 0;
  padding: 0;
  font-size: 0;
  display: flex;
  justify-content: flex-end;
}
.war-room-model-tracker-link a {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  color: #3b82f6;
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.35);
  border-radius: 6px;
  padding: 6px 12px;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.war-room-model-tracker-link a:hover {
  background: rgba(59, 130, 246, 0.22);
  color: #60a5fa;
  text-decoration: none;
}
.war-room-eu-section { flex: 1; border-top: 1px solid rgba(255,255,255,.07); padding-top: 14px; margin-top: 10px; min-height: 0; }
.war-room-eu-list { display: flex; flex-direction: column; gap: 4px; }
.war-room-eu-card {
  padding: 8px 10px;
  border-radius: 6px;
  background: rgba(59,130,246,.05);
  border: 1px solid rgba(59,130,246,.12);
  display: flex;
  align-items: center;
  gap: 8px;
}
.war-room-eu-card .name { font-size: 11px; font-weight: 700; color: #fff; }
.war-room-eu-card .note { font-size: 10px; color: rgba(255,255,255,.65); }
.war-room-eu-card .risk { font-size: 8px; padding: 2px 5px; border-radius: 3px; font-weight: 700; font-family: 'JetBrains Mono', monospace; }

/* Ticker */
.war-room-ticker {
  flex-shrink: 0;
  height: 32px;
  border-top: 1px solid rgba(255,255,255,.06);
  background: rgba(6,10,16,.95);
  display: flex;
  align-items: center;
  overflow: hidden;
}
.war-room-ticker-live {
  flex-shrink: 0;
  padding: 0 12px;
  border-right: 1px solid rgba(255,255,255,.08);
  display: flex;
  align-items: center;
  gap: 5px;
}
.war-room-ticker-live span:last-child { font-family: 'JetBrains Mono', monospace; font-size: 8px; font-weight: 700; color: #d6002a; letter-spacing: 1px; }
.war-room-ticker-track { flex: 1; overflow: hidden; }
.war-room-ticker-content {
  display: flex;
  gap: 36px;
  animation: war-ticker 42s linear infinite;
  white-space: nowrap;
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  color: rgba(255,255,255,.72);
}

/* Scrollbar — plus visible */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: rgba(255,255,255,.04); border-radius: 3px; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,.22); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,.38); }

@keyframes war-ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }
