/* NEXUS UA Command Center — Styles
   Dark retro-futuristic gaming HUD
   Fonts: Orbitron (display) + Share Tech Mono (data) + Inter (body)
*/

/* ── CSS Variables ──────────────────────────────────────────────── */
:root {
  --bg-void:     #060614;
  --bg-deep:     #0A0A1F;
  --bg-surface:  #0F0F28;
  --bg-card:     #141432;
  --bg-elevated: #1A1A3E;

  --orange:      #F48120;
  --orange-dim:  #F4812050;
  --orange-glow: 0 0 20px rgba(244, 129, 32, 0.4);

  --cyan:        #00D4FF;
  --cyan-dim:    #00D4FF30;
  --cyan-glow:   0 0 20px rgba(0, 212, 255, 0.3);

  --purple:      #9945FF;
  --purple-dim:  #9945FF30;

  --green:       #00FF88;
  --green-dim:   #00FF8830;

  --red:         #FF3B3B;
  --red-dim:     #FF3B3B30;

  --text-primary:   #FFFFFF;
  --text-secondary: #8888BB;
  --text-muted:     #4A4A7A;

  --border:      rgba(255, 255, 255, 0.06);
  --border-glow: rgba(244, 129, 32, 0.3);

  --font-display: 'Orbitron', monospace;
  --font-mono:    'Share Tech Mono', monospace;
  --font-body:    'Inter', sans-serif;

  --header-h:   64px;
  --sidebar-w:  220px;
  --right-w:    260px;
  --radius:     6px;
  --gap:        12px;
}

/* ── Reset & Base ───────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; overflow: hidden; }

body {
  background: var(--bg-void);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 13px;
  line-height: 1.5;
}

/* ── Background Effects ─────────────────────────────────────────── */
.bg-grid {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background-image:
    linear-gradient(rgba(244,129,32,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(244,129,32,0.03) 1px, transparent 1px);
  background-size: 40px 40px;
}

.scanlines {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0,0,0,0.08) 2px,
    rgba(0,0,0,0.08) 4px
  );
}

.particles-canvas {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  opacity: 0.4;
}

/* ── HUD Corner Decorator ──────────────────────────────────────── */
.hud-corners {
  position: relative;
}
.hud-corners::before,
.hud-corners::after {
  content: '';
  position: absolute;
  width: 12px; height: 12px;
  border-color: var(--orange);
  border-style: solid;
}
.hud-corners::before { top: 0; left: 0; border-width: 2px 0 0 2px; }
.hud-corners::after  { bottom: 0; right: 0; border-width: 0 2px 2px 0; }

/* ── Header ─────────────────────────────────────────────────────── */
.header {
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--header-h);
  background: linear-gradient(180deg, rgba(6,6,20,0.98) 0%, rgba(10,10,31,0.95) 100%);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 24px;
  padding: 0 16px;
  z-index: 100;
  backdrop-filter: blur(20px);
}

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

.logo-hex {
  filter: drop-shadow(0 0 10px rgba(244,129,32,0.5));
}

.logo-text {
  display: flex; flex-direction: column; gap: 1px;
}

.logo-name {
  font-family: var(--font-display);
  font-size: 18px; font-weight: 900;
  color: var(--orange);
  letter-spacing: 4px;
  text-shadow: 0 0 20px rgba(244,129,32,0.6);
  line-height: 1;
}

.logo-sub {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--text-secondary);
  letter-spacing: 2px;
  line-height: 1;
}

.logo-badge {
  display: flex; align-items: center; gap: 5px;
  background: var(--red-dim);
  border: 1px solid var(--red);
  border-radius: 3px;
  padding: 2px 7px;
  font-family: var(--font-display);
  font-size: 9px; font-weight: 700;
  color: var(--red);
  letter-spacing: 2px;
}

.badge-dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--red);
  animation: blink 1.2s infinite;
}

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

/* KPI Cards in Header */
.header-kpis {
  display: flex; gap: var(--gap); flex: 1;
  justify-content: center;
}

.kpi-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 6px 16px;
  text-align: center;
  min-width: 110px;
  transition: border-color 0.3s, box-shadow 0.3s;
  position: relative; overflow: hidden;
}

.kpi-card::before {
  content: ''; position: absolute;
  top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--orange), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}

.kpi-card.updating { border-color: var(--orange); box-shadow: var(--orange-glow); }
.kpi-card.updating::before { opacity: 1; }

.kpi-card.kpi-security { border-color: var(--red-dim); }
.kpi-card.kpi-security::before { background: linear-gradient(90deg, transparent, var(--red), transparent); }
.kpi-card.kpi-security.updating { border-color: var(--red); box-shadow: 0 0 20px rgba(255,59,59,0.4); }

.kpi-label {
  font-family: var(--font-display);
  font-size: 8px; font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 2px;
  margin-bottom: 2px;
}

.kpi-value {
  font-family: var(--font-display);
  font-size: 16px; font-weight: 800;
  color: var(--orange);
  letter-spacing: 1px;
}

.kpi-card.kpi-security .kpi-value { color: var(--red); }

.kpi-trend {
  font-size: 9px;
  color: var(--text-muted);
  margin-top: 1px;
}

.kpi-trend.up { color: var(--green); }

.header-meta {
  display: flex; flex-direction: column; align-items: flex-end;
  gap: 4px; flex-shrink: 0;
}

.cf-badge {
  display: flex; align-items: center; gap: 5px;
  font-size: 10px; color: var(--text-secondary);
  font-family: var(--font-body);
}

.header-time {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
}

/* ── Main Layout ─────────────────────────────────────────────────── */
.main-layout {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr var(--right-w);
  gap: var(--gap);
  padding: calc(var(--header-h) + var(--gap)) var(--gap) var(--gap);
  height: 100vh;
  position: relative; z-index: 1;
}

/* ── Sidebar (Levels) ────────────────────────────────────────────── */
.sidebar {
  display: flex; flex-direction: column; gap: var(--gap);
  overflow-y: auto;
  padding-right: 4px;
}

.sidebar::-webkit-scrollbar { width: 3px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb { background: var(--orange-dim); border-radius: 3px; }

.sidebar-title {
  display: flex; align-items: center; gap: 8px;
}

.sidebar-title-text {
  font-family: var(--font-display);
  font-size: 9px; font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 3px;
  white-space: nowrap;
}

.sidebar-line {
  flex: 1; height: 1px;
  background: linear-gradient(90deg, var(--border), transparent);
}

/* Level Items */
.level-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 12px;
  transition: all 0.4s;
  position: relative;
  overflow: hidden;
  cursor: default;
}

.level-item::before {
  content: ''; position: absolute;
  top: 0; left: 0; bottom: 0; width: 3px;
  background: var(--text-muted);
  transition: background 0.4s;
}

.level-item.locked { opacity: 0.5; }
.level-item.locked .level-name,
.level-item.locked .level-desc { color: var(--text-muted); }

.level-item.level-active {
  border-color: var(--orange);
  box-shadow: var(--orange-glow), inset 0 0 20px rgba(244,129,32,0.05);
  opacity: 1;
}

.level-item.level-active::before { background: var(--orange); }

.level-item.level-unlocked {
  border-color: rgba(244,129,32,0.3);
  opacity: 1;
}

.level-item.level-unlocked::before { background: var(--cyan); }

.level-item.level-unlocking {
  animation: unlockPulse 0.6s ease;
}

@keyframes unlockPulse {
  0%   { box-shadow: 0 0 0 rgba(244,129,32,0); border-color: var(--orange); }
  50%  { box-shadow: 0 0 40px rgba(244,129,32,0.8); border-color: var(--orange); }
  100% { box-shadow: var(--orange-glow); border-color: rgba(244,129,32,0.3); }
}

.level-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 4px;
}

.level-number {
  font-family: var(--font-display);
  font-size: 8px; font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 1px;
}

.level-number span {
  font-size: 14px;
  color: var(--text-secondary);
  margin-left: 2px;
}

.level-item.level-active .level-number span { color: var(--orange); }
.level-item.level-unlocked .level-number span { color: var(--cyan); }

.level-lock {
  color: var(--text-muted);
}

.level-item.level-active .level-lock,
.level-item.level-unlocked .level-lock { color: var(--orange); }

.level-name {
  font-family: var(--font-display);
  font-size: 10px; font-weight: 700;
  color: var(--text-secondary);
  letter-spacing: 1px;
  margin-bottom: 2px;
  transition: color 0.3s;
}

.level-item.level-active .level-name { color: var(--orange); }
.level-item.level-unlocked .level-name { color: var(--text-primary); }

.level-desc {
  font-size: 10px;
  color: var(--text-muted);
  margin-bottom: 6px;
  transition: color 0.3s;
}

.level-item.level-active .level-desc { color: var(--text-secondary); }

.level-progress {
  height: 3px;
  background: var(--bg-elevated);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 4px;
}

.level-progress-bar {
  height: 100%; width: 0;
  background: linear-gradient(90deg, var(--orange), var(--cyan));
  border-radius: 2px;
  transition: width 1s ease;
}

.level-item.level-active .level-progress-bar { width: 100%; }
.level-item.level-unlocked .level-progress-bar { width: 100%; }

.level-tech {
  font-family: var(--font-mono);
  font-size: 8px;
  color: var(--text-muted);
}

.level-item.level-active .level-tech { color: var(--orange-dim); opacity: 1; }

/* Campaign Chart */
.sidebar-chart {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 12px;
  margin-top: 4px;
}

.chart-title {
  font-family: var(--font-display);
  font-size: 8px; font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 2px;
  margin-bottom: 8px;
}

.chart-bars {
  display: flex; flex-direction: column; gap: 6px;
}

.chart-bar-item {
  display: flex; align-items: center; gap: 6px;
}

.chart-bar-label {
  font-family: var(--font-mono);
  font-size: 8px; color: var(--text-muted);
  width: 24px; flex-shrink: 0; text-align: right;
}

.chart-bar-track {
  flex: 1; height: 14px;
  background: var(--bg-elevated);
  border-radius: 2px; overflow: hidden;
  position: relative;
}

.chart-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--orange), var(--orange-dim));
  border-radius: 2px;
  transition: width 1s ease;
  display: flex; align-items: center;
  padding-right: 4px;
  justify-content: flex-end;
}

.chart-bar-val {
  font-family: var(--font-mono);
  font-size: 7px;
  color: rgba(255,255,255,0.7);
  white-space: nowrap;
}

/* ── Console (Center) ────────────────────────────────────────────── */
.console {
  display: flex; flex-direction: column;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
}

.console-header {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 16px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.console-title {
  font-family: var(--font-display);
  font-size: 11px; font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 2px;
}

.console-bracket { color: var(--orange); }

.console-status {
  display: flex; align-items: center; gap: 6px;
  margin-left: 8px;
}

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

.status-dot.idle     { background: var(--text-muted); }
.status-dot.thinking { background: var(--cyan); animation: thinking 0.8s infinite alternate; }
.status-dot.working  { background: var(--orange); animation: thinking 0.4s infinite alternate; }
.status-dot.done     { background: var(--green); }
.status-dot.error    { background: var(--red); }

@keyframes thinking {
  from { opacity: 0.3; box-shadow: none; }
  to   { opacity: 1; box-shadow: 0 0 8px currentColor; }
}

#status-text {
  font-family: var(--font-display);
  font-size: 9px; font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 2px;
}

.console-controls {
  margin-left: auto;
  display: flex; gap: 6px;
}

.ctrl-btn {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 4px 10px;
  font-family: var(--font-display);
  font-size: 8px; font-weight: 700;
  color: var(--text-secondary);
  letter-spacing: 1px;
  cursor: pointer;
  transition: all 0.2s;
}

.ctrl-btn:hover {
  border-color: var(--orange);
  color: var(--orange);
}

.ctrl-btn.cached-toggle.active {
  background: var(--orange-dim);
  border-color: var(--orange);
  color: var(--orange);
}

/* Console Output */
.console-output {
  flex: 1; overflow-y: auto;
  padding: 16px;
  scroll-behavior: smooth;
}

.console-output::-webkit-scrollbar { width: 4px; }
.console-output::-webkit-scrollbar-track { background: transparent; }
.console-output::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

/* Welcome State */
.welcome-state {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; height: 100%;
  gap: 12px; padding: 40px 20px;
  text-align: center;
}

.welcome-icon {
  filter: drop-shadow(0 0 30px rgba(244,129,32,0.3));
  animation: float 4s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-8px); }
}

.welcome-title {
  font-family: var(--font-display);
  font-size: 22px; font-weight: 900;
  color: var(--orange);
  letter-spacing: 6px;
  text-shadow: 0 0 30px rgba(244,129,32,0.5);
}

.welcome-subtitle {
  font-size: 12px;
  color: var(--text-secondary);
  letter-spacing: 1px;
}

.welcome-example {
  background: var(--bg-card);
  border: 1px solid var(--border-glow);
  border-radius: var(--radius);
  padding: 12px 16px;
  max-width: 500px;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s;
}

.welcome-example:hover {
  border-color: var(--orange);
  box-shadow: var(--orange-glow);
}

.example-label {
  font-family: var(--font-display);
  font-size: 8px; font-weight: 700;
  color: var(--orange);
  letter-spacing: 2px;
  display: block; margin-bottom: 6px;
}

.example-text {
  font-size: 12px; color: var(--text-primary);
  font-style: italic; line-height: 1.5;
}

/* Cards Container */
.cards-container {
  display: flex; flex-direction: column; gap: 12px;
}

/* Thinking Row */
.thinking-row {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 0;
  animation: fadeInUp 0.3s ease;
}

.thinking-dots {
  display: flex; gap: 4px;
}

.thinking-dots span {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--cyan);
  animation: dotBounce 1.2s infinite;
}

.thinking-dots span:nth-child(2) { animation-delay: 0.2s; }
.thinking-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes dotBounce {
  0%, 100% { transform: translateY(0); opacity: 0.3; }
  50%       { transform: translateY(-4px); opacity: 1; }
}

.thinking-text {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--cyan);
}

/* Base Card */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  position: relative; overflow: hidden;
  animation: fadeInUp 0.4s ease;
}

.card::before {
  content: ''; position: absolute;
  top: 0; left: 0; right: 0; height: 2px;
}

.card-analytics::before { background: linear-gradient(90deg, var(--orange), var(--orange-dim)); }
.card-translation::before { background: linear-gradient(90deg, var(--cyan), var(--cyan-dim)); }
.card-creative::before { background: linear-gradient(90deg, var(--purple), var(--purple-dim)); }
.card-network::before { background: linear-gradient(90deg, var(--green), var(--green-dim)); }
.card-insights::before { background: linear-gradient(90deg, var(--orange), var(--cyan)); }

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

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

.card-icon {
  width: 22px; height: 22px;
  border-radius: 4px;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; flex-shrink: 0;
}

.icon-analytics { background: var(--orange-dim); }
.icon-translation { background: var(--cyan-dim); }
.icon-creative { background: var(--purple-dim); }
.icon-network { background: var(--green-dim); }
.icon-insights { background: linear-gradient(135deg, var(--orange-dim), var(--cyan-dim)); }

.card-title {
  font-family: var(--font-display);
  font-size: 10px; font-weight: 700;
  letter-spacing: 2px;
}

.title-analytics { color: var(--orange); }
.title-translation { color: var(--cyan); }
.title-creative { color: var(--purple); }
.title-network { color: var(--green); }
.title-insights { color: var(--text-primary); }

.card-tag {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 8px;
  color: var(--text-muted);
  background: var(--bg-elevated);
  border-radius: 3px;
  padding: 2px 6px;
}

/* Analytics Card */
.analytics-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
  margin-bottom: 12px;
}

.analytics-stat {
  background: var(--bg-elevated);
  border-radius: 4px;
  padding: 8px 10px;
  text-align: center;
}

.analytics-stat-label {
  font-family: var(--font-display);
  font-size: 7px; font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 1.5px;
  margin-bottom: 3px;
}

.analytics-stat-value {
  font-family: var(--font-display);
  font-size: 15px; font-weight: 800;
  color: var(--orange);
}

.campaigns-table {
  width: 100%; border-collapse: collapse;
}

.campaigns-table th {
  font-family: var(--font-display);
  font-size: 7px; font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 1.5px;
  text-align: left;
  padding: 4px 6px;
  border-bottom: 1px solid var(--border);
}

.campaigns-table td {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-secondary);
  padding: 5px 6px;
  border-bottom: 1px solid rgba(255,255,255,0.03);
}

.campaigns-table tr:hover td { background: var(--bg-elevated); }

.td-network {
  font-size: 9px;
  color: var(--text-muted);
}

.td-cpi { color: var(--orange) !important; font-weight: 600; }
.td-cpi.low { color: var(--green) !important; }

/* Translation Card */
.translation-pair {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
}

.translation-side {
  background: var(--bg-elevated);
  border-radius: 4px;
  padding: 10px 12px;
}

.translation-lang {
  font-family: var(--font-display);
  font-size: 8px; font-weight: 700;
  letter-spacing: 2px;
  margin-bottom: 6px;
}

.lang-en { color: var(--text-muted); }
.lang-target { color: var(--cyan); }

.translation-text {
  font-size: 13px; line-height: 1.5;
  color: var(--text-primary);
}

.lang-target .translation-text {
  font-size: 14px;
  color: var(--cyan);
  text-shadow: 0 0 10px rgba(0,212,255,0.3);
}

/* Creative Card */
.creative-loader {
  display: flex; flex-direction: column; align-items: center;
  gap: 12px; padding: 20px;
}

.orbital-rings {
  position: relative; width: 60px; height: 60px;
}

.ring {
  position: absolute; border-radius: 50%;
  border: 2px solid transparent;
  animation: orbit linear infinite;
}

.ring-1 {
  inset: 0;
  border-top-color: var(--purple);
  animation-duration: 1.2s;
}

.ring-2 {
  inset: 8px;
  border-right-color: var(--cyan);
  animation-duration: 0.8s;
  animation-direction: reverse;
}

.ring-3 {
  inset: 16px;
  border-bottom-color: var(--orange);
  animation-duration: 1.6s;
}

@keyframes orbit {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

.loader-text {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--purple);
  text-align: center;
  animation: loaderTextCycle 3s infinite;
}

@keyframes loaderTextCycle {
  0%  { content: ''; }
}

.creative-result {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
}

.creative-version {
  position: relative;
  border-radius: 4px;
  overflow: hidden;
  background: var(--bg-elevated);
}

.creative-img {
  width: 100%; aspect-ratio: 16/9;
  object-fit: cover;
  display: block;
}

.creative-img.compressed {
  filter: blur(1.5px) brightness(0.9);
  image-rendering: pixelated;
}

.creative-no-image {
  width: 100%; aspect-ratio: 16/9;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 6px; background: var(--bg-elevated);
  color: var(--text-muted);
}

.creative-no-image-icon { font-size: 24px; }
.creative-no-image-text { font-size: 9px; font-family: var(--font-display); letter-spacing: 2px; }

.creative-label {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 4px 8px;
  background: linear-gradient(0deg, rgba(0,0,0,0.85), transparent);
  font-family: var(--font-display);
  font-size: 7px; font-weight: 700;
  letter-spacing: 1.5px;
}

.label-hifi { color: var(--cyan); }
.label-compressed { color: var(--orange); }

/* Network Intel Card */
.network-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
  margin-bottom: 10px;
}

.network-stat {
  background: var(--bg-elevated); border-radius: 4px; padding: 8px 10px;
}

.network-stat-label {
  font-family: var(--font-display);
  font-size: 7px; color: var(--text-muted);
  letter-spacing: 1.5px; margin-bottom: 4px;
}

.network-stat-value {
  font-family: var(--font-display);
  font-size: 13px; font-weight: 800;
}

.stat-green { color: var(--green); }
.stat-orange { color: var(--orange); }
.stat-red { color: var(--red); }
.stat-cyan { color: var(--cyan); }

.network-rec {
  font-size: 11px; line-height: 1.5;
  color: var(--text-secondary);
  padding: 8px 10px;
  background: var(--bg-elevated);
  border-radius: 4px;
  border-left: 3px solid var(--green);
}

/* Insights Card */
.insights-headline {
  font-family: var(--font-display);
  font-size: 13px; font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 10px;
  line-height: 1.4;
}

.insights-list {
  list-style: none; display: flex; flex-direction: column; gap: 5px;
  margin-bottom: 10px;
}

.insights-list li {
  font-size: 11px; color: var(--text-secondary);
  line-height: 1.4;
  padding-left: 14px;
  position: relative;
}

.insights-list li::before {
  content: '▶';
  position: absolute; left: 0;
  color: var(--orange); font-size: 8px;
  top: 2px;
}

.insights-recommendation {
  background: linear-gradient(135deg, rgba(244,129,32,0.1), rgba(0,212,255,0.05));
  border: 1px solid var(--orange-dim);
  border-radius: 4px;
  padding: 10px 12px;
  font-size: 11px; color: var(--text-primary);
  line-height: 1.5;
}

.insights-recommendation::before {
  content: 'RECOMMENDED ACTION: ';
  font-family: var(--font-display);
  font-size: 8px; font-weight: 700;
  color: var(--orange);
  letter-spacing: 1.5px;
  display: block; margin-bottom: 4px;
}

.ltv-highlight {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 20px; font-weight: 900;
  color: var(--green);
  text-shadow: 0 0 20px rgba(0,255,136,0.4);
}

.fraud-summary {
  display: flex; gap: 8px; margin-top: 10px;
}

.fraud-stat {
  flex: 1; background: rgba(255,59,59,0.08);
  border: 1px solid var(--red-dim);
  border-radius: 4px; padding: 8px;
  text-align: center;
}

.fraud-stat-val {
  font-family: var(--font-display);
  font-size: 14px; font-weight: 800;
  color: var(--red);
}

.fraud-stat-label {
  font-size: 8px; color: var(--text-muted);
  font-family: var(--font-display);
  letter-spacing: 1px;
}

/* Console Input */
.console-input-area {
  display: flex; align-items: flex-end; gap: 8px;
  padding: 12px 16px;
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

.input-prefix {
  display: flex; align-items: center; gap: 4px;
  padding-bottom: 8px;
  flex-shrink: 0;
}

.input-chevron {
  font-family: var(--font-display);
  font-size: 16px; font-weight: 900;
  color: var(--orange);
}

.input-label {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
}

.input-wrapper { flex: 1; }

.chat-input {
  width: 100%;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-primary);
  resize: none;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  max-height: 100px;
  overflow-y: auto;
  line-height: 1.5;
}

.chat-input::placeholder { color: var(--text-muted); }

.chat-input:focus {
  border-color: var(--orange);
  box-shadow: 0 0 10px rgba(244,129,32,0.2);
}

.send-btn {
  display: flex; align-items: center; gap: 6px;
  background: var(--orange);
  border: none; border-radius: var(--radius);
  padding: 10px 16px;
  font-family: var(--font-display);
  font-size: 10px; font-weight: 800;
  color: #000;
  letter-spacing: 2px;
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
  align-self: flex-end;
}

.send-btn:hover:not(:disabled) {
  background: #FFB04A;
  box-shadow: var(--orange-glow);
  transform: translateY(-1px);
}

.send-btn:disabled {
  background: var(--bg-elevated);
  color: var(--text-muted);
  cursor: not-allowed;
  transform: none;
}

.send-btn-icon { font-size: 14px; }

/* ── Right Panel ─────────────────────────────────────────────────── */
.right-panel {
  display: flex; flex-direction: column; gap: var(--gap);
  overflow-y: auto;
}

.right-panel::-webkit-scrollbar { width: 3px; }
.right-panel::-webkit-scrollbar-track { background: transparent; }
.right-panel::-webkit-scrollbar-thumb { background: var(--red-dim); border-radius: 3px; }

.panel-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 8px;
}

.panel-title {
  display: flex; align-items: center; gap: 6px;
  font-family: var(--font-display);
  font-size: 9px; font-weight: 700;
  color: var(--text-secondary);
  letter-spacing: 2px;
}

.panel-badge {
  font-family: var(--font-display);
  font-size: 8px; font-weight: 700;
  letter-spacing: 1px;
  padding: 2px 7px;
  border-radius: 3px;
}

.blocked-badge {
  background: var(--red-dim);
  color: var(--red);
  border: 1px solid var(--red);
}

/* Security Panel */
.security-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-top: 2px solid var(--red);
  border-radius: var(--radius);
  padding: 12px;
  flex: 2;
  display: flex; flex-direction: column;
  min-height: 200px;
}

.threat-pulse {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--red);
  animation: threatPulse 1.5s infinite;
  flex-shrink: 0;
}

@keyframes threatPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255,59,59,0.4); }
  50%       { box-shadow: 0 0 0 6px rgba(255,59,59,0); }
}

.shield-meter { margin-bottom: 8px; }

.shield-label {
  display: flex; justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 9px; color: var(--text-muted);
  margin-bottom: 4px;
}

#shield-pct { color: var(--green); font-weight: 600; }

.shield-bar {
  height: 4px;
  background: var(--bg-elevated);
  border-radius: 2px; overflow: hidden;
}

.shield-fill {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--green), #00FF88AA);
  border-radius: 2px;
  transition: width 1.5s ease;
}

.security-feed {
  flex: 1; overflow-y: auto;
  display: flex; flex-direction: column; gap: 3px;
}

.security-feed::-webkit-scrollbar { width: 2px; }
.security-feed::-webkit-scrollbar-thumb { background: var(--red-dim); }

.feed-empty {
  font-family: var(--font-mono);
  font-size: 9px; color: var(--text-muted);
  text-align: center; margin-top: 16px;
}

.feed-item {
  display: flex; align-items: center; gap: 6px;
  padding: 4px 6px;
  border-radius: 3px;
  font-family: var(--font-mono); font-size: 9px;
  animation: feedIn 0.3s ease;
  flex-shrink: 0;
}

.feed-item.blocked {
  background: rgba(255,59,59,0.06);
  border-left: 2px solid var(--red);
}

.feed-item.allowed {
  background: rgba(0,255,136,0.04);
  border-left: 2px solid var(--green);
}

@keyframes feedIn {
  from { opacity: 0; transform: translateX(-6px); }
  to   { opacity: 1; transform: translateX(0); }
}

.feed-icon { font-size: 10px; flex-shrink: 0; }
.feed-ip { color: var(--text-muted); }
.feed-action { font-weight: 700; }
.blocked .feed-action { color: var(--red); }
.allowed .feed-action { color: var(--green); }
.feed-threat { color: var(--text-muted); flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.feed-campaign { color: var(--orange); font-size: 8px; }

/* Telemetry Panel */
.telemetry-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
}

.telemetry-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 6px;
}

.tel-item {
  background: var(--bg-elevated);
  border-radius: 4px;
  padding: 7px 9px;
}

.tel-label {
  font-family: var(--font-display);
  font-size: 7px; color: var(--text-muted);
  letter-spacing: 1.5px; margin-bottom: 3px;
}

.tel-value {
  font-family: var(--font-display);
  font-size: 13px; font-weight: 800;
  color: var(--text-primary);
}

.tel-value.highlight-green { color: var(--green); }

/* Country Panel */
.country-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
}

.country-list {
  display: flex; flex-direction: column; gap: 5px;
}

.country-item {
  display: flex; align-items: center; gap: 8px;
}

.country-flag {
  font-size: 14px; flex-shrink: 0;
}

.country-name {
  font-family: var(--font-mono);
  font-size: 9px; color: var(--text-secondary);
  flex: 1;
}

.country-bar-track {
  width: 60px; height: 4px;
  background: var(--bg-elevated);
  border-radius: 2px; overflow: hidden;
}

.country-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--orange), var(--orange-dim));
  border-radius: 2px;
  transition: width 1s ease;
}

.country-cpi {
  font-family: var(--font-mono);
  font-size: 9px; color: var(--orange);
  width: 36px; text-align: right;
}

/* ── Level Unlock Overlay ────────────────────────────────────────── */
.level-unlock-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  z-index: 999;
  animation: overlayIn 0.2s ease;
}

@keyframes overlayIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.unlock-content {
  text-align: center;
  animation: unlockContentIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes unlockContentIn {
  from { transform: scale(0.5) translateY(20px); opacity: 0; }
  to   { transform: scale(1) translateY(0); opacity: 1; }
}

.unlock-level-badge {
  font-family: var(--font-display);
  font-size: 11px; font-weight: 900;
  color: var(--text-muted);
  letter-spacing: 4px;
  margin-bottom: 6px;
}

.unlock-title {
  font-family: var(--font-display);
  font-size: 36px; font-weight: 900;
  color: var(--orange);
  letter-spacing: 6px;
  text-shadow: 0 0 60px rgba(244,129,32,0.8), 0 0 120px rgba(244,129,32,0.4);
  margin-bottom: 8px;
  animation: unlockTitleGlow 0.5s ease;
}

@keyframes unlockTitleGlow {
  0%   { text-shadow: none; }
  100% { text-shadow: 0 0 60px rgba(244,129,32,0.8), 0 0 120px rgba(244,129,32,0.4); }
}

.unlock-subtitle {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--cyan);
  letter-spacing: 2px;
  margin-bottom: 20px;
}

.unlock-bars {
  display: flex; gap: 8px; justify-content: center;
}

.unlock-bar {
  height: 4px; width: 60px;
  background: var(--orange);
  border-radius: 2px;
  animation: barGrow 0.4s ease forwards;
  transform-origin: left;
}

.unlock-bar:nth-child(1) { animation-delay: 0s; }
.unlock-bar:nth-child(2) { animation-delay: 0.1s; }
.unlock-bar:nth-child(3) { animation-delay: 0.2s; }

@keyframes barGrow {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}

/* ── Utility ─────────────────────────────────────────────────────── */
.hidden { display: none !important; }

/* Responsive tweaks for presentation mode */
@media (max-width: 1100px) {
  :root {
    --sidebar-w: 180px;
    --right-w: 220px;
  }
}
