/*
 * Intelligence Operations Visual Language
 * VPN Threat Assessment Platform - Command Center Aesthetic
 */

/* ========================================
   OPERATIONAL COLOR SYSTEM
   ======================================== */

:root {
  /* Primary Operational Palette */
  --ops-black: #0a0e1a;
  --command-navy: #1a2332;
  --tactical-gray: #2d3748;
  --alert-amber: #f59e0b;
  --execute-green: #10b981;
  --threat-red: #ef4444;

  /* Operational Overlays */
  --ghost-white: rgba(255, 255, 255, 0.05);
  --ghost-white-10: rgba(255, 255, 255, 0.1);
  --ghost-white-15: rgba(255, 255, 255, 0.15);
  --ghost-white-20: rgba(255, 255, 255, 0.2);
  --scan-blue: #3b82f6;
  --data-cyan: #06b6d4;

  /* Threat Level Colors */
  --threat-critical: #dc2626;
  --threat-high: #ef4444;
  --threat-elevated: #f59e0b;
  --threat-moderate: #10b981;
  --threat-low: #059669;
  --threat-minimal: #22c55e;

  /* System Status Colors */
  --status-active: #10b981;
  --status-warning: #f59e0b;
  --status-error: #ef4444;
  --status-offline: #6b7280;

  /* Typography Scale - Operational Hierarchy */
  --font-command: 32px; /* Command Level */
  --font-sector: 24px; /* Sector Level */
  --font-unit: 18px; /* Unit Level */
  --font-field: 16px; /* Field Level */
  --font-intel: 14px; /* Intel Level */
  --font-data: 12px; /* Data Level */

  /* Font Families */
  --font-mono: "JetBrains Mono", "Fira Code", "Consolas", monospace;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: "Bebas Neue", "Impact", sans-serif;

  /* Spacing - Tactical Grid System */
  --grid-unit: 8px;
  --space-xs: calc(var(--grid-unit) * 1); /* 8px */
  --space-sm: calc(var(--grid-unit) * 2); /* 16px */
  --space-md: calc(var(--grid-unit) * 3); /* 24px */
  --space-lg: calc(var(--grid-unit) * 4); /* 32px */
  --space-xl: calc(var(--grid-unit) * 6); /* 48px */
  --space-2xl: calc(var(--grid-unit) * 8); /* 64px */

  /* Tactical Border Radius */
  --radius-sharp: 0px;
  --radius-tactical: 2px;
  --radius-soft: 4px;
  --radius-panel: 8px;
  --radius-command: 12px;

  /* Shadow System - Depth Layers */
  --shadow-scan: 0 0 20px rgba(59, 130, 246, 0.3);
  --shadow-alert: 0 0 20px rgba(239, 68, 68, 0.4);
  --shadow-depth-1: 0 2px 8px rgba(0, 0, 0, 0.4);
  --shadow-depth-2: 0 4px 16px rgba(0, 0, 0, 0.5);
  --shadow-depth-3: 0 8px 32px rgba(0, 0, 0, 0.6);
  --shadow-command: 0 12px 48px rgba(0, 0, 0, 0.7);

  /* Animation Timings */
  --timing-quick: 0.15s;
  --timing-smooth: 0.3s;
  --timing-command: 0.5s;
  --timing-scan: 2s;

  /* Tactical Gradients */
  --gradient-command: linear-gradient(
    135deg,
    var(--command-navy) 0%,
    var(--tactical-gray) 100%
  );
  --gradient-threat: linear-gradient(
    135deg,
    var(--threat-red) 0%,
    var(--threat-critical) 100%
  );
  --gradient-active: linear-gradient(
    135deg,
    var(--alert-amber) 0%,
    #fbb042 100%
  );
  --gradient-scan: linear-gradient(
    90deg,
    transparent 0%,
    var(--scan-blue) 50%,
    transparent 100%
  );
}

/* ========================================
   WORLD MAP CONTAINER
   ======================================== */

.world-map-container {
  width: 100%;
  height: 400px; /* Fixed height to prevent layout jumping */
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ========================================
   BASE RESET & FOUNDATION
   ======================================== */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  background: var(--ops-black);
  color: var(--ghost-white-20);
  font-family: var(--font-sans);
  font-size: var(--font-field);
  line-height: 1.5;
  font-weight: 400;
  overflow-x: hidden;
  position: relative;
}

/* Tactical Scan Line Background Effect */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    linear-gradient(
      90deg,
      transparent 0%,
      rgba(59, 130, 246, 0.02) 50%,
      transparent 100%
    ),
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 2px,
      rgba(255, 255, 255, 0.005) 2px,
      rgba(255, 255, 255, 0.005) 4px
    );
  pointer-events: none;
  z-index: -1;
}

/* Typography Base Classes */
.font-command {
  font-size: var(--font-command);
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.font-sector {
  font-size: var(--font-sector);
  font-family: var(--font-display);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.font-unit {
  font-size: var(--font-unit);
  font-family: var(--font-sans);
  font-weight: 600;
}
.font-field {
  font-size: var(--font-field);
  font-family: var(--font-sans);
  font-weight: 500;
}
.font-intel {
  font-size: var(--font-intel);
  font-family: var(--font-sans);
  font-weight: 400;
}
.font-data {
  font-size: var(--font-data);
  font-family: var(--font-mono);
  font-weight: 500;
}

/* ========================================
   COMMAND CENTER LAYOUT
   ======================================== */

.command-center {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--ops-black);
}

/* Command Header */
.command-header {
  background: var(--gradient-command);
  border-bottom: 2px solid var(--alert-amber);
  box-shadow: var(--shadow-depth-2);
  position: sticky;
  top: 0;
  z-index: 1000;
  padding: var(--space-md) 0;
}

.command-header-content {
  --header-edge-width: 120px;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.command-title {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  width: var(--header-edge-width);
}

.command-title h1 {
  color: rgba(255, 255, 255, 0.95);
  font-size: var(--font-sector);
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.command-title h1 a {
  color: inherit;
  text-decoration: none;
}

/* Header components flex layout */

.sign-out-button {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  padding: 0.5rem 0.75rem;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.98);
  transition:
    opacity 0.2s,
    border-color 0.2s;
  font-size: 0.9rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.sign-out-button:hover {
  opacity: 1;
  border-color: rgba(255, 255, 255, 0.4);
}

.stats-display {
  background: rgba(0, 0, 0, 0.3);
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-tactical);
  border: 1px solid var(--ghost-white-10);
  font-weight: 600;
  letter-spacing: 0.05em;
  color: rgba(255, 255, 255, 0.9);
  font-family: var(--font-mono);
  font-size: var(--font-data);
}

.stats-display span {
  margin-right: var(--space-md);
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
}

.stats-display span:last-child {
  margin-right: 0;
}

.stats-display i {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9em;
}

.status-indicator {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--status-active);
  box-shadow: 0 0 8px var(--status-active);
  animation: pulse-status 2s infinite;
}

@keyframes pulse-status {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.7;
    transform: scale(1.2);
  }
}

/* Header Search Component */
.header-search-container {
  width: 140px;
  position: relative;
}

.header-search-form {
  display: flex;
  align-items: center;
  position: relative;
  width: 100%;
}

.header-search-input {
  flex: 1;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px 0 0 4px;
  padding: 0.5rem 0.75rem;
  color: rgba(255, 255, 255, 0.95);
  font-family: var(--font-mono);
  font-size: var(--font-intel);
  outline: none;
  width: 100%;
}

.header-search-input:focus {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.4);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.1);
}

.header-search-input::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

.header-search-button {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-left: none;
  border-radius: 0 4px 4px 0;
  padding: 0.5rem 0.75rem;
  color: rgba(255, 255, 255, 0.9);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.header-search-button:hover {
  background: rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 1);
}

/* Header Perspective Selector */
.header-perspective-selector {
  display: flex;
  align-items: center;
  gap: 0;
}

.header-perspective-dropdown {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px 0 0 4px;
  padding: 0.5rem 0.75rem;
  color: rgba(255, 255, 255, 0.6);
  font-family: var(--font-mono);
  font-size: var(--font-intel);
  cursor: pointer;
  width: 160px;
}

.header-perspective-dropdown:hover,
.header-perspective-dropdown:focus {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.4);
  outline: none;
}

.header-perspective-manage-link {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-left: none;
  border-radius: 0 4px 4px 0;
  padding: 0.5rem 0.75rem;
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
}

.header-perspective-manage-link:hover {
  background: rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 1);
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Settings Menu Container */
.settings-menu-container {
  flex: 0 0 auto;
  position: relative;
  width: var(--header-edge-width);
  display: flex;
  justify-content: flex-end;
}

/* Search Expansion State */
.command-header-content.search-focused .stats-display,
.command-header-content.search-focused .header-perspective-selector {
  display: none;
}

.command-header-content.search-focused .header-search-container {
  flex: 1;
  max-width: 600px;
}

.command-header-content.search-focused .header-search-input {
  width: 100%;
}

/* Responsive adjustments */
@media (max-width: 1200px) {
  .header-perspective-dropdown {
    width: 140px;
  }

  .header-search-container {
    width: 120px;
  }

  .command-header-content.search-focused .header-search-container {
    max-width: 500px;
  }
}

@media (max-width: 768px) {
  .command-header-content {
    flex-wrap: wrap;
    gap: var(--space-md);
  }

  .header-search-container {
    order: 3;
    flex-basis: 100%;
    max-width: none;
  }

  .stats-display,
  .header-perspective-selector {
    font-size: var(--font-data);
  }
}

/* Main Operational Area */
.ops-main {
  flex: 1;
  max-width: 1400px;
  margin: 0 auto;
  padding: var(--space-lg) var(--space-lg);
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

/* Classification Badges */
.classification-badge {
  display: inline-flex;
  align-items: center;
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-tactical);
  font-family: var(--font-mono);
  font-size: var(--font-data);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border: 1px solid currentColor;
  position: relative;
  overflow: hidden;
}

.classification-badge::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: left var(--timing-smooth);
}

.classification-badge:hover::before {
  left: 100%;
}

.classification-sensitive {
  background: var(--gradient-active);
  color: var(--ops-black);
  border-color: #fbb042;
  text-shadow: none;
}

.classification-restricted {
  background: var(--gradient-threat);
  color: white;
  border-color: var(--threat-critical);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.classification-general {
  background: linear-gradient(
    135deg,
    var(--execute-green) 0%,
    var(--threat-moderate) 100%
  );
  color: white;
  border-color: var(--execute-green);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* ========================================
   TACTICAL PANELS & COMPONENTS
   ======================================== */

.tactical-panel {
  background: var(--command-navy);
  border: 1px solid var(--ghost-white-10);
  border-radius: var(--radius-panel);
  box-shadow: var(--shadow-depth-1);
  position: relative;
  overflow: hidden;
}

.tactical-panel::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--ghost-white-15);
}

.panel-header {
  background: var(--gradient-command);
  padding: var(--space-md) var(--space-lg);
  border-bottom: 1px solid var(--ghost-white-10);
}

.panel-title {
  color: rgba(255, 255, 255, 0.95);
  font-size: var(--font-sector);
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin: 0;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.panel-subtitle {
  color: rgba(255, 255, 255, 0.98);
  font-size: var(--font-intel);
  font-weight: 400;
  margin-top: var(--space-xs);
  font-style: italic;
}

.panel-body {
  padding: var(--space-lg);
}

.sign-in-panel {
  max-width: 480px;
  width: 90%;
  margin: 4rem auto;
}

.sign-in-form .form-field {
  margin-bottom: var(--space-lg);
}

.sign-in-form .form-field:last-of-type {
  margin-bottom: var(--space-xl);
}

.sign-in-form .form-label {
  display: block;
  color: var(--ghost-white);
  font-family: var(--font-intel);
  font-weight: 500;
  margin-bottom: var(--space-sm);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.sign-in-form .tactical-input {
  width: 100%;
}

.sign-in-button {
  width: 100%;
  justify-content: center;
}

/* Grid System */
.tactical-grid {
  display: grid;
  gap: var(--space-lg);
}

.tactical-grid-2 {
  grid-template-columns: repeat(2, 1fr);
}
.tactical-grid-3 {
  grid-template-columns: repeat(3, 1fr);
}
.tactical-grid-4 {
  grid-template-columns: repeat(4, 1fr);
}
.tactical-grid-6 {
  grid-template-columns: repeat(6, 1fr);
}

/* Responsive Grid */
@media (max-width: 1200px) {
  .tactical-grid-6 {
    grid-template-columns: repeat(3, 1fr);
  }
  .tactical-grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .tactical-grid-6,
  .tactical-grid-4,
  .tactical-grid-3,
  .tactical-grid-2 {
    grid-template-columns: 1fr;
  }
}

/* ========================================
   LOADING & SCANNING STATES
   ======================================== */

.scanning-state {
  position: relative;
  overflow: hidden;
}

.scanning-state::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: var(--gradient-scan);
  animation: scan-sweep var(--timing-scan) infinite;
  pointer-events: none;
}

@keyframes scan-sweep {
  0% {
    left: -100%;
  }
  100% {
    left: 100%;
  }
}

.ops-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-2xl);
  color: rgba(255, 255, 255, 0.98);
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.loading-scanner {
  width: 64px;
  height: 64px;
  position: relative;
  margin-bottom: var(--space-md);
}

.loading-scanner::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 3px solid var(--ghost-white-10);
  border-top: 3px solid var(--scan-blue);
  border-radius: 50%;
  animation: tactical-scan 1.5s linear infinite;
}

.loading-scanner::after {
  content: "";
  position: absolute;
  top: 8px;
  left: 8px;
  width: calc(100% - 16px);
  height: calc(100% - 16px);
  border: 2px solid transparent;
  border-top: 2px solid var(--alert-amber);
  border-radius: 50%;
  animation: tactical-scan 1s linear infinite reverse;
}

@keyframes tactical-scan {
  0% {
    transform: rotate(0deg);
    box-shadow: 0 0 0 rgba(59, 130, 246, 0);
  }
  50% {
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.4);
  }
  100% {
    transform: rotate(360deg);
    box-shadow: 0 0 0 rgba(59, 130, 246, 0);
  }
}

/* ========================================
   FLASH MESSAGES
   ======================================== */

.flash-container {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  max-width: 500px;
  width: 90%;
}

.flash-message {
  border-radius: var(--radius-soft);
  padding: var(--space-lg);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(8px);
  transition:
    opacity 0.5s ease-out,
    transform 0.5s ease-out;
  text-align: center;
}

.flash-message--notice {
  background: rgba(5, 150, 105, 0.1);
  border: 1px solid #059669;
}

.flash-message--notice span {
  color: #059669;
  font-family: var(--font-intel);
  font-weight: 500;
}

.flash-message--alert {
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid #f59e0b;
}

.flash-message--alert span {
  color: #f59e0b;
  font-family: var(--font-intel);
  font-weight: 500;
}

/* ========================================
   ERROR & ALERT STATES
   ======================================== */

.ops-error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid var(--threat-red);
  border-radius: var(--radius-panel);
  padding: var(--space-lg);
  text-align: center;
  box-shadow: var(--shadow-alert);
}

.error-icon {
  font-size: 48px;
  color: var(--threat-red);
  margin-bottom: var(--space-md);
  animation: pulse-error 1.5s infinite;
}

@keyframes pulse-error {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.8;
    transform: scale(1.05);
  }
}

.error-title {
  color: var(--threat-red);
  font-size: var(--font-unit);
  font-weight: 600;
  margin-bottom: var(--space-sm);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.error-message {
  color: rgba(255, 255, 255, 0.98);
  font-size: var(--font-intel);
  margin-bottom: var(--space-lg);
}

/* ========================================
   TACTICAL BUTTONS & CONTROLS
   ======================================== */

.tactical-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  padding: var(--space-sm) var(--space-lg);
  background: var(--ghost-white-10);
  color: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--ghost-white-15);
  border-radius: var(--radius-tactical);
  font-family: var(--font-sans);
  font-size: var(--font-intel);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  cursor: crosshair;
  transition: all var(--timing-smooth);
  text-decoration: none;
  overflow: hidden;
  user-select: none;
}

.tactical-button::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: var(--gradient-scan);
  transition: left var(--timing-command);
  z-index: 0;
}

.tactical-button:hover::before {
  left: 100%;
}

.tactical-button:hover {
  background: var(--ghost-white-15);
  border-color: var(--alert-amber);
  color: white;
  transform: translateY(-1px);
  box-shadow: var(--shadow-depth-1);
}

.tactical-button:active {
  transform: translateY(0);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

.tactical-button.active {
  background: var(--gradient-active);
  border-color: #fbb042;
  color: var(--ops-black);
  box-shadow: var(--shadow-depth-2);
}

.tactical-button.active:hover {
  background: linear-gradient(135deg, #fbb042 0%, var(--alert-amber) 100%);
  color: var(--ops-black);
}

.tactical-button > * {
  position: relative;
  z-index: 1;
}

/* Tactical Button Variants */
.tactical-button--primary {
  background: var(--gradient-active);
  border-color: var(--alert-amber);
  color: var(--ops-black);
}

.tactical-button--danger {
  background: var(--gradient-threat);
  border-color: var(--threat-red);
  color: white;
}

.tactical-button--scan {
  background: linear-gradient(
    135deg,
    var(--scan-blue) 0%,
    var(--data-cyan) 100%
  );
  border-color: var(--scan-blue);
  color: white;
  font-weight: 700;
  box-shadow: 0 0 16px rgba(59, 130, 246, 0.3);
  position: relative;
}

.tactical-button--scan::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    135deg,
    transparent 0%,
    rgba(255, 255, 255, 0.1) 50%,
    transparent 100%
  );
  border-radius: var(--radius-tactical);
  pointer-events: none;
}

.tactical-button--scan:hover {
  box-shadow: 0 0 24px rgba(59, 130, 246, 0.5);
  transform: translateY(-1px);
}

/* Tactical Input Controls */
.tactical-input {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--ghost-white-15);
  border-radius: var(--radius-tactical);
  color: rgba(255, 255, 255, 0.9);
  padding: var(--space-sm) var(--space-md);
  font-family: var(--font-mono);
  font-size: var(--font-intel);
  font-weight: 500;
  letter-spacing: 0.025em;
  transition: all var(--timing-smooth);
  outline: none;
}

.tactical-input::placeholder {
  color: rgba(255, 255, 255, 0.98);
  font-style: italic;
}

.tactical-input:focus {
  background: rgba(0, 0, 0, 0.5);
  border-color: var(--alert-amber);
  box-shadow:
    0 0 0 2px rgba(245, 158, 11, 0.3),
    0 0 16px rgba(245, 158, 11, 0.2);
  color: white;
  transform: translateY(-1px);
}

.tactical-input:focus::placeholder {
  color: rgba(255, 255, 255, 0.98);
}

/* ========================================
   THREAT VECTOR COMPONENTS
   ======================================== */

.threat-vector-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: var(--space-sm);
  padding: var(--space-md);
  background: var(--gradient-command);
  border-radius: var(--radius-command);
  box-shadow: var(--shadow-depth-2);
  position: relative;
  overflow: hidden;
}

/* Factor section spacing */
.threat-vectors-section {
  display: none;
  min-height: 80px; /* Reserve space for factor chips when active */
}

.threat-vectors-section.active {
  display: block;
}

.factor-strip {
}

.factor-strip:last-child {
}

@keyframes pulse-glow {
  0%,
  100% {
    box-shadow: 0 0 8px var(--alert-amber);
    opacity: 1;
  }
  50% {
    box-shadow: 0 0 16px var(--alert-amber);
    opacity: 0.8;
  }
}

.vector-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-md) var(--space-sm);
  background: var(--ghost-white-10);
  border: 1px solid var(--ghost-white-15);
  border-radius: var(--radius-panel);
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  cursor: crosshair;
  transition: all var(--timing-smooth);
  overflow: hidden;
  min-height: 100px;
  justify-content: center;
}

.vector-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--gradient-scan);
  opacity: 0;
  transition: opacity var(--timing-smooth);
  z-index: 0;
}

.vector-card:hover::before,
.vector-card.hover-animation::before {
  opacity: 0.1;
}

.vector-card:hover,
.vector-card.hover-animation {
  background: var(--ghost-white-15);
  border-color: var(--alert-amber);
  transform: translateY(-2px);
  box-shadow: var(--shadow-depth-1);
  color: white;
}

.vector-card.active {
  background: var(--gradient-active);
  border-color: #fbb042;
  color: var(--ops-black);
  box-shadow:
    var(--shadow-depth-2),
    0 0 20px rgba(245, 158, 11, 0.4);
  transform: translateY(-2px);
}

.vector-card.active::before {
  opacity: 0;
}

.vector-card > * {
  position: relative;
  z-index: 1;
}

.vector-icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--ghost-white-10);
  border-radius: var(--radius-soft);
  font-size: 18px;
  transition: all var(--timing-smooth);
}

.vector-card:hover .vector-icon,
.vector-card.hover-animation .vector-icon {
  background: var(--ghost-white-20);
  transform: scale(1.1);
}

.vector-card.active .vector-icon {
  background: rgba(0, 0, 0, 0.2);
}

.vector-label {
  font-family: var(--font-sans);
  font-size: var(--font-data);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  text-align: center;
  line-height: 1.2;
}

.vector-card.active .vector-label {
  font-weight: 700;
}

/* Factor Selection Strip */
.factor-strip {
  display: none;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-sm);
  padding: var(--space-md);
  background: rgba(45, 55, 72, 0.5);
  border: 1px solid var(--ghost-white-10);
  border-radius: var(--radius-panel);
  backdrop-filter: blur(10px);
  position: relative;
}

.factor-strip::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--scan-blue),
    transparent
  );
  opacity: 0.6;
}

.factor-strip.active {
  display: grid;
}

.factor-chip {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-xs) var(--space-sm);
  background: var(--ghost-white-10);
  color: rgba(255, 255, 255, 0.98);
  border: 1px solid var(--ghost-white-15);
  border-radius: var(--radius-tactical);
  font-family: var(--font-mono);
  font-size: var(--font-data);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  cursor: crosshair;
  transition: all var(--timing-smooth);
  text-decoration: none;
  text-align: center;
  position: relative;
  overflow: hidden;
  min-height: 36px;
}

.factor-chip::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: var(--gradient-scan);
  transition: left var(--timing-command);
  z-index: 0;
}

.factor-chip:hover::before {
  left: 100%;
}

.factor-chip:hover {
  background: var(--ghost-white-15);
  border-color: var(--alert-amber);
  color: white;
  transform: translateY(-2px);
  box-shadow: var(--shadow-depth-1);
}

.factor-chip.active {
  background: var(--gradient-active);
  border-color: #fbb042;
  color: var(--ops-black);
  font-weight: 600;
  box-shadow:
    var(--shadow-depth-2),
    0 0 12px rgba(245, 158, 11, 0.4);
  transform: translateY(-2px);
}

.factor-chip.active::before {
  display: none;
}

.factor-chip.disabled {
  opacity: 0.3;
  cursor: not-allowed;
  pointer-events: none;
  background: var(--ghost-white-5);
  border-color: var(--ghost-white-10);
}

.factor-chip.disabled::before {
  display: none;
}

.factor-chip.disabled:hover {
  background: var(--ghost-white-5);
  border-color: var(--ghost-white-10);
  transform: none;
  box-shadow: none;
}

.factor-chip > * {
  position: relative;
  z-index: 1;
}

/* ========================================
   DATA VISUALIZATION COMPONENTS
   ======================================== */

.threat-meter {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.meter-bar {
  width: 60px;
  height: 4px;
  background: var(--ghost-white-10);
  border-radius: 2px;
  overflow: hidden;
  position: relative;
}

.meter-fill {
  height: 100%;
  background: var(--gradient-active);
  border-radius: 2px;
  transition: width var(--timing-smooth);
  position: relative;
}

.meter-fill::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
  animation: meter-sweep 2s infinite;
}

@keyframes meter-sweep {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

.meter-critical .meter-fill {
  background: var(--gradient-threat);
}
.meter-elevated .meter-fill {
  background: var(--gradient-active);
}
.meter-moderate .meter-fill {
  background: linear-gradient(
    135deg,
    var(--execute-green) 0%,
    var(--threat-moderate) 100%
  );
}

.meter-value {
  font-family: var(--font-mono);
  font-size: var(--font-data);
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  min-width: 32px;
}

/* Status Indicators */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-xs) var(--space-sm);
  background: var(--ghost-white-10);
  border: 1px solid var(--ghost-white-15);
  border-radius: var(--radius-tactical);
  font-family: var(--font-mono);
  font-size: var(--font-data);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.status-badge--active {
  background: linear-gradient(
    135deg,
    var(--status-active) 0%,
    var(--execute-green) 100%
  );
  border-color: var(--status-active);
  color: white;
}

.status-badge--warning {
  background: var(--gradient-active);
  border-color: var(--status-warning);
  color: var(--ops-black);
}

.status-badge--error {
  background: var(--gradient-threat);
  border-color: var(--status-error);
  color: white;
}

.status-badge--offline {
  background: linear-gradient(
    135deg,
    var(--status-offline) 0%,
    var(--tactical-gray) 100%
  );
  border-color: var(--status-offline);
  color: rgba(255, 255, 255, 0.98);
}

/* ========================================
   TACTICAL DATA GRID & RANKINGS
   ======================================== */

.tactical-data-grid {
  background: var(--command-navy);
  border: 1px solid var(--ghost-white-10);
  border-radius: var(--radius-panel);
  overflow: hidden;
  box-shadow: var(--shadow-depth-2);
}

.data-grid-header {
  background: var(--gradient-command);
  padding: var(--space-lg);
  border-bottom: 1px solid var(--ghost-white-10);
  position: relative;
}

.data-grid-header::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--gradient-active);
  box-shadow: 0 0 8px var(--alert-amber);
}

.grid-title {
  color: rgba(255, 255, 255, 0.98);
  font-family: var(--font-display);
  font-size: var(--font-sector);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin: 0;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.grid-subtitle {
  color: rgba(255, 255, 255, 0.98);
  font-family: var(--font-mono);
  font-size: var(--font-intel);
  font-weight: 500;
  margin-top: var(--space-xs);
  font-style: italic;
}

.data-grid-body {
  background: var(--ops-black);
}

.data-row {
  display: grid;
  grid-template-columns: 80px 1fr 200px 240px;
  align-items: center;
  padding: var(--space-sm) var(--space-md);
  border-bottom: 1px solid var(--ghost-white-10);
  cursor: crosshair;
  transition: all var(--timing-smooth);
  position: relative;
  overflow: hidden;
}

.data-row::before {
  content: "";
  position: absolute;
  left: -100%;
  top: 0;
  width: 100%;
  height: 100%;
  background: var(--gradient-scan);
  transition: left var(--timing-command);
  z-index: 0;
}

.data-row:hover::before {
  left: 100%;
}

.data-row:hover {
  background: var(--ghost-white-10);
  border-color: var(--alert-amber);
  transform: translateX(4px);
  box-shadow:
    inset 4px 0 0 var(--alert-amber),
    var(--shadow-depth-1);
}

.data-row:last-child {
  border-bottom: none;
}

.data-row > * {
  position: relative;
  z-index: 1;
}

.rank-position {
  font-family: var(--font-mono);
  font-size: calc(var(--font-unit) * 1.5);
  font-weight: 700;
  color: rgba(255, 255, 255, 0.98);
  text-align: center;
}

.rank-position.critical {
  color: var(--threat-critical);
}
.rank-position.high {
  color: var(--threat-high);
}
.rank-position.elevated {
  color: var(--alert-amber);
}
.rank-position.moderate {
  color: var(--execute-green);
}
.rank-position.low {
  color: var(--threat-moderate);
}

.country-data {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.country-name {
  color: rgba(255, 255, 255, 0.95);
  font-family: var(--font-sans);
  font-size: var(--font-sector);
  font-weight: 600;
  letter-spacing: 0.025em;
}

.country-name-link {
  color: rgba(255, 255, 255, 0.95);
  text-decoration: none;
  transition: color 0.2s ease;
}

.country-name-link:hover {
  color: var(--alert-amber);
  text-decoration: underline;
}

.country-code {
  color: rgba(255, 255, 255, 0.98);
  font-family: var(--font-mono);
  font-size: var(--font-data);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.threat-metrics {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: var(--space-xs);
}

.threat-score {
  color: rgba(255, 255, 255, 0.95);
  font-family: var(--font-mono);
  font-size: var(--font-unit);
  font-weight: 700;
  letter-spacing: 0.05em;
}

.score-trend {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  font-family: var(--font-mono);
  font-size: var(--font-data);
  font-weight: 500;
}

.trend-arrow {
  font-size: 10px;
  font-weight: 700;
}

.trend-up {
  color: var(--threat-red);
}
.trend-down {
  color: var(--execute-green);
}
.trend-stable {
  color: rgba(255, 255, 255, 0.98);
}

.classification-level {
  display: flex;
  justify-content: center;
}

.level-badge {
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-tactical);
  font-family: var(--font-mono);
  font-size: var(--font-data);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border: 1px solid currentColor;
  text-align: center;
  min-width: 80px;
}

.level-critical {
  background: var(--gradient-threat);
  color: white;
  border-color: var(--threat-critical);
}

.level-high {
  background: var(--gradient-threat);
  color: white;
  border-color: var(--threat-high);
}

.level-elevated {
  background: var(--gradient-active);
  color: var(--ops-black);
  border-color: var(--alert-amber);
}

.level-moderate {
  background: linear-gradient(
    135deg,
    var(--execute-green) 0%,
    var(--threat-moderate) 100%
  );
  color: white;
  border-color: var(--execute-green);
}

.level-low {
  background: linear-gradient(
    135deg,
    var(--threat-moderate) 0%,
    var(--threat-low) 100%
  );
  color: white;
  border-color: var(--threat-moderate);
}

/* Tactical Sparkline Mini-Chart */
.threat-sparkline {
  width: 50px;
  height: 18px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--ghost-white-10);
  border-radius: 3px;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.3);
}

.sparkline-fill {
  height: 100%;
  background: var(--gradient-active);
  border-radius: 2px;
  position: relative;
  transition: width var(--timing-smooth);
  box-shadow: 0 0 4px rgba(245, 158, 11, 0.3);
}

.sparkline-fill::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 50%;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.2) 0%,
    transparent 100%
  );
  border-radius: 2px 2px 0 0;
}

.sparkline-fill::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.4),
    transparent
  );
  animation: sparkline-sweep 4s infinite;
  border-radius: 2px;
}

@keyframes sparkline-sweep {
  0% {
    transform: translateX(-100%);
    opacity: 0;
  }
  20% {
    opacity: 1;
  }
  80% {
    opacity: 1;
  }
  100% {
    transform: translateX(100%);
    opacity: 0;
  }
}

/* Score-based Sparkline Colors */
.sparkline-fill--score-high {
  background: linear-gradient(135deg, #dc2626 0%, #ef4444 100%);
  box-shadow: 0 0 4px rgba(220, 38, 38, 0.4);
}

.sparkline-fill--score-medium {
  background: linear-gradient(135deg, #f59e0b 0%, #f59e0b 100%);
  box-shadow: 0 0 4px rgba(245, 158, 11, 0.4);
}

.sparkline-fill--score-low {
  background: linear-gradient(135deg, #059669 0%, #10b981 100%);
  box-shadow: 0 0 4px rgba(5, 150, 105, 0.4);
}

.sparkline-fill--score-none {
  background: linear-gradient(135deg, #6b7280 0%, #9ca3af 100%);
  box-shadow: 0 0 4px rgba(107, 114, 128, 0.3);
}

.sparkline-fill--score-na {
  background: linear-gradient(135deg, #d1d5db 0%, #e5e7eb 100%);
  box-shadow: 0 0 4px rgba(209, 213, 219, 0.3);
}

/* Data Grid States */
.data-grid-loading {
  padding: var(--space-2xl);
  text-align: center;
  background: var(--ops-black);
}

.data-grid-empty {
  padding: var(--space-2xl);
  text-align: center;
  background: var(--ops-black);
  color: rgba(255, 255, 255, 0.98);
  font-family: var(--font-mono);
  font-size: var(--font-intel);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.data-row--empty {
  padding: var(--space-xl);
  text-align: center;
  opacity: 0.6;
}

/* ========================================
   DASHBOARD SPECIFIC STYLES
   ======================================== */

.search-form-container {
  position: absolute;
  top: var(--space-lg);
  right: var(--space-lg);
  z-index: 100;
}

.search-form {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.search-input {
  width: 240px;
}

.map-body {
  position: relative;
  min-height: 400px;
}

.map-legend {
  background: var(--tactical-gray);
  padding: var(--space-lg);
  border-top: 2px solid var(--alert-amber);
  position: relative;
}

.map-legend::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--alert-amber),
    transparent
  );
}

.map-legend-title {
  letter-spacing: 0.1em;
  font-weight: 600;
}

.map-legend-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-lg);
}

.legend-indicator {
  width: 16px;
  height: 16px;
  border-radius: var(--radius-soft);
}

.legend-indicator--low-risk {
  background: #059669;
  border: 1px solid rgba(5, 150, 105, 0.5);
}

.legend-indicator--medium-risk {
  background: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.5);
}

.legend-indicator--high-risk {
  background: #dc2626;
  border: 1px solid rgba(220, 38, 38, 0.5);
}

.legend-indicator--na {
  background: #e5e7eb;
  border: 1px solid rgba(229, 231, 235, 0.8);
}

.legend-indicator--no-data {
  background: linear-gradient(
    135deg,
    var(--tactical-gray) 0%,
    var(--ghost-white-10) 100%
  );
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.legend-label {
  font-weight: 500;
}

.legend-label--no-data {
  font-weight: 500;
  color: rgba(255, 255, 255, 0.98);
}

/* ========================================
   COUNTRY SHOW PAGE STYLES
   ======================================== */

.country-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
}

.country-header-right {
  text-align: right;
}

.country-risk-badge {
  background: var(--alert-amber);
  color: var(--ops-black);
  font-weight: 600;
}

.country-last-updated {
  margin-top: var(--space-xs);
  font-size: var(--font-data);
  opacity: 0.6;
}

.country-report-links {
  display: flex;
  gap: var(--space-lg);
  margin-top: var(--space-md);
}

.report-link {
  color: var(--alert-amber);
  text-decoration: none;
  font-size: var(--font-field);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  transition: all 0.2s;
}

.report-link:hover {
  opacity: 1;
  text-decoration: underline;
}

.report-link-icon {
  width: 18px;
  height: 18px;
  display: inline-block;
  vertical-align: middle;
  margin-right: 8px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

.stat-value-container {
  margin-top: var(--space-sm);
}

.stat-value-large {
  font-size: 3rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.98);
}


/* Multi-Panel Country Layout */
.country-header-simple {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: var(--space-lg);
}

.country-title-large {
  font-size: 3.5rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.98);
  line-height: 1.1;
  margin: 0;
}

.country-stats-simple {
  display: flex;
  gap: var(--space-lg);
  flex-wrap: wrap;
  align-items: center;
}

.inline-stat {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.stat-label {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 500;
}

.stat-value-inline {
  font-size: 1.5rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.98);
}

/* Panel Body Styling */
.panel-body {
  margin-top: var(--space-sm);
}

/* Reports Panel */
.country-report-links {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

/* Complement Panel */
.complement-panel-content {
  text-align: left;
}

.complement-country-name {
  margin-bottom: var(--space-md);
}

.complementary-link {
  color: #3B82F6;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.25rem;
  transition: color 0.2s ease;
}

.complementary-link:hover {
  color: #1E40AF;
}

.complement-metrics {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
}

.complement-metric {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: var(--space-xs) 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.complement-metric:last-child {
  border-bottom: none;
}

.metric-value {
  font-size: 1.125rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.98);
}

.metric-label {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.6);
  font-weight: 400;
  text-transform: capitalize;
}

.complement-description {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.6);
  font-style: italic;
}

.no-complement-message {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.7);
  text-align: center;
  padding: var(--space-md) 0;
}

.threat-score-badge {
  position: absolute;
  top: var(--space-xs);
  right: var(--space-xs);
  color: white;
  padding: var(--space-xs) var(--space-sm);
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, 0.2);
  font-weight: 700;
  font-size: var(--font-intel);
}

.category-factor-count {
  font-size: var(--font-data);
  color: rgba(255, 255, 255, 0.98);
  margin-top: var(--space-xs);
}

.category-evaluation {
  font-size: var(--font-data);
  color: rgba(255, 255, 255, 0.98);
  margin-top: var(--space-xs);
}

.category-panel {
  margin-top: var(--space-lg);
  padding: var(--space-lg);
  background: var(--ghost-white-10);
  border-left: 4px solid var(--alert-amber);
  border-radius: var(--radius-panel);
}

.category-panel-header {
  font-size: var(--font-unit);
  margin-bottom: var(--space-sm);
}

.category-panel-description {
  color: rgba(255, 255, 255, 0.98);
  margin-bottom: var(--space-md);
}

.factors-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--space-md);
}

.factor-item {
  position: relative;
  padding: var(--space-md);
  background: var(--ghost-white-10);
  border: 1px solid var(--ghost-white-15);
  border-radius: var(--radius-panel);
  cursor: pointer;
  transition: all 0.2s;
}

.factor-item-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  margin-bottom: var(--space-sm);
}

.factor-item-title {
  font-weight: 600;
  font-size: var(--font-unit);
  flex: 1;
  color: rgba(255, 255, 255, 0.98);
}

.factor-score-badge {
  color: white;
  padding: var(--space-xs) var(--space-sm);
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, 0.2);
  font-weight: 700;
  font-size: var(--font-intel);
  margin-left: var(--space-sm);
}

.factor-one-sentence {
  font-size: var(--font-field);
  color: rgba(255, 255, 255, 0.98);
  margin-bottom: var(--space-sm);
  line-height: 1.6;
}

.factor-evaluation {
  font-size: var(--font-intel);
  color: rgba(255, 255, 255, 0.98);
  margin-top: var(--space-xs);
}

.factor-report-container {
  margin-top: var(--space-sm);
}

.factor-no-report {
  font-size: var(--font-field);
  opacity: 0.5;
  margin-top: var(--space-sm);
}

.factor-modal-overlay {
  z-index: 9999;
  background: rgba(10, 14, 26, 0.6);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px;
  width: 100%;
}

/* Modal max-width fix - 2024 */
.factor-modal-container {
  background: var(--command-navy);
  border: 2px solid var(--alert-amber);
  border-radius: var(--radius-panel);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 120px);
  max-width: 1200px;
  width: 100%;
}

.factor-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-lg);
  border-bottom: 1px solid var(--ghost-white-15);
  flex-shrink: 0;
}

.factor-modal-title {
  margin: 0;
}

.factor-modal-close {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  padding: var(--space-xs);
  transition: color 0.2s;
}

.factor-modal-close-icon {
  width: 24px;
  height: 24px;
}

.factor-modal-body {
  padding: var(--space-xl);
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}

.factor-modal-content {
  color: rgba(255, 255, 255, 0.95);
  font-size: 1.125rem;
  line-height: 2;
  font-family: var(--font-sans);
}

.source-archive-indicator {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 4px;
  padding: 0;
  background: transparent;
  border: none;
  font-size: 0.875rem;
  color: var(--alert-amber);
  cursor: pointer;
  transition: all 0.2s;
  vertical-align: middle;
}

.source-archive-indicator:hover {
  opacity: 1;
  transform: scale(1.15);
}

/* Markdown content styling for better readability */
#modal-content h1 {
  font-size: 2.25rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.98);
  margin-top: var(--space-lg);
  margin-bottom: var(--space-md);
  border-bottom: 1px solid var(--ghost-white-15);
  padding-bottom: var(--space-sm);
}

#modal-content h2 {
  font-size: 1.875rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.96);
  margin-top: var(--space-lg);
  margin-bottom: var(--space-sm);
}

#modal-content h3 {
  font-size: 1.5rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.94);
  margin-top: var(--space-md);
  margin-bottom: var(--space-sm);
}

#modal-content p {
  margin-bottom: var(--space-md);
  color: rgba(255, 255, 255, 0.98);
}

#modal-content a {
  color: var(--alert-amber);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}

#modal-content a:hover {
  border-bottom-color: var(--alert-amber);
}

#modal-content ul,
#modal-content ol {
  margin-bottom: var(--space-md);
  padding-left: var(--space-lg);
  color: rgba(255, 255, 255, 0.98);
}

#modal-content li {
  margin-bottom: var(--space-xs);
}

#modal-content strong {
  color: rgba(255, 255, 255, 0.98);
  font-weight: 600;
}

#modal-content code {
  background: var(--ghost-white-10);
  padding: 2px 6px;
  border-radius: 3px;
  font-family: var(--font-mono);
  font-size: 1rem;
  color: var(--execute-green);
}

#modal-content pre {
  background: var(--ghost-white-10);
  padding: var(--space-md);
  border-radius: var(--radius-panel);
  overflow-x: auto;
  margin-bottom: var(--space-md);
}

#modal-content pre code {
  background: transparent;
  padding: 0;
}

#modal-content hr {
  border: none;
  border-top: 1px solid var(--ghost-white-15);
  margin: var(--space-lg) 0;
}

#modal-content blockquote {
  border-left: 3px solid var(--alert-amber);
  padding-left: var(--space-md);
  margin-left: 0;
  margin-bottom: var(--space-md);
  color: rgba(255, 255, 255, 0.98);
  font-style: italic;
}

/* ========================================
   SEARCH PAGE STYLES
   ======================================== */

.search-result-link:hover {
  color: rgba(59, 130, 246, 0.8) !important;
  text-decoration: underline;
}

.tactical-panel-nested {
  transition: background-color 0.2s;
}

.tactical-panel-nested:hover {
  background: rgba(255, 255, 255, 0.03);
}

.search-result-type-summary {
  display: flex;
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
  flex-wrap: wrap;
}

.search-result-type-badge {
  background: var(--ghost-white-15);
  color: rgba(255, 255, 255, 0.98);
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-soft);
  font-size: var(--font-data);
  font-weight: 600;
}

.search-results-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.search-result-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-md);
}

.search-result-icon {
  font-size: 24px;
  flex-shrink: 0;
}

.search-result-content {
  flex: 1;
  min-width: 0;
}

.search-result-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-md);
}

.search-result-title-container {
  flex: 1;
  min-width: 0;
}

.search-result-link {
  color: var(--scan-blue);
  font-weight: 600;
  font-size: var(--font-field);
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-decoration: none;
  transition: color 0.2s;
}

.search-result-metadata {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-top: var(--space-xs);
  font-size: var(--font-data);
  flex-wrap: wrap;
}

.search-result-type-label {
  background: var(--ghost-white-10);
  color: rgba(255, 255, 255, 0.98);
  padding: 2px var(--space-xs);
  border-radius: var(--radius-tactical);
  font-weight: 500;
}

.search-result-metadata-item {
  color: rgba(255, 255, 255, 0.98);
}

.search-result-badge-container {
  flex-shrink: 0;
}

.search-result-summary {
  font-size: var(--font-intel);
  color: rgba(255, 255, 255, 0.98);
  margin-top: var(--space-sm);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.search-empty-state {
  text-align: center;
  padding: var(--space-2xl);
}

.search-empty-icon {
  font-size: 4rem;
}

.search-empty-title {
  color: rgba(255, 255, 255, 0.98);
  font-size: var(--font-unit);
  font-weight: 600;
  margin-top: var(--space-md);
}

.search-empty-message {
  color: rgba(255, 255, 255, 0.98);
  font-size: var(--font-intel);
  margin-top: var(--space-sm);
}

.search-form-container {
  display: flex;
  gap: 0;
  max-width: 600px;
  margin: 0 auto;
}

.search-form-input {
  flex: 1;
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
  border-right: none;
}

.search-form-button {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
  padding-left: var(--space-lg);
  padding-right: var(--space-lg);
}

.search-form-hint {
  text-align: center;
  margin-top: var(--space-sm);
  font-size: var(--font-data);
  color: rgba(255, 255, 255, 0.98);
}

/* ========================================
   FOOTER
   ======================================== */

.app-footer {
  margin-top: var(--space-2xl);
  border-radius: 0;
}

.footer-text {
  color: rgba(255, 255, 255, 0.98);
}

/* ========================================
   UTILITY CLASSES
   ======================================== */

/* Visibility */
.hidden {
  display: none !important;
}
.invisible {
  visibility: hidden !important;
}

/* Text Colors */
.text-white {
  color: rgba(255, 255, 255, 0.95) !important;
}
.text-muted {
  color: rgba(255, 255, 255, 0.98) !important;
}
.text-dim {
  color: rgba(255, 255, 255, 0.98) !important;
}
.text-amber {
  color: var(--alert-amber) !important;
}
.text-green {
  color: var(--execute-green) !important;
}
.text-red {
  color: var(--threat-red) !important;
}
.text-blue {
  color: var(--scan-blue) !important;
}

/* Background Colors */
.bg-command {
  background: var(--command-navy) !important;
}
.bg-tactical {
  background: var(--tactical-gray) !important;
}
.bg-ghost {
  background: var(--ghost-white) !important;
}

/* Spacing */
.m-0 {
  margin: 0 !important;
}
.p-0 {
  padding: 0 !important;
}
.mb-sm {
  margin-bottom: var(--space-sm) !important;
}
.mb-md {
  margin-bottom: var(--space-md) !important;
}
.mb-lg {
  margin-bottom: var(--space-lg) !important;
}
.mb-xl {
  margin-bottom: var(--space-xl) !important;
}

/* Flexbox */
.flex {
  display: flex !important;
}
.flex-col {
  flex-direction: column !important;
}
.items-center {
  align-items: center !important;
}
.justify-center {
  justify-content: center !important;
}
.justify-between {
  justify-content: space-between !important;
}
.gap-sm {
  gap: var(--space-sm) !important;
}
.gap-md {
  gap: var(--space-md) !important;
}
.gap-lg {
  gap: var(--space-lg) !important;
}

/* Position */
.relative {
  position: relative !important;
}
.absolute {
  position: absolute !important;
}
.fixed {
  position: fixed !important;
}

/* Z-index */
.z-10 {
  z-index: 10 !important;
}
.z-20 {
  z-index: 20 !important;
}
.z-50 {
  z-index: 50 !important;
}
.z-100 {
  z-index: 100 !important;
}

/* Width & Height */
.w-full {
  width: 100% !important;
}
.h-full {
  height: 100% !important;
}
.min-h-screen {
  min-height: 100vh !important;
}

/* Text Alignment */
.text-left {
  text-align: left !important;
}
.text-center {
  text-align: center !important;
}
.text-right {
  text-align: right !important;
}

/* Font Weights */
.font-normal {
  font-weight: 400 !important;
}
.font-medium {
  font-weight: 500 !important;
}
.font-semibold {
  font-weight: 600 !important;
}
.font-bold {
  font-weight: 700 !important;
}

/* Text Transform */
.uppercase {
  text-transform: uppercase !important;
}
.lowercase {
  text-transform: lowercase !important;
}
.capitalize {
  text-transform: capitalize !important;
}

/* Cursor */
.cursor-pointer {
  cursor: pointer !important;
}
.cursor-crosshair {
  cursor: crosshair !important;
}

/* Border Radius */
.rounded-none {
  border-radius: 0 !important;
}
.rounded-sm {
  border-radius: var(--radius-tactical) !important;
}
.rounded {
  border-radius: var(--radius-soft) !important;
}
.rounded-lg {
  border-radius: var(--radius-panel) !important;
}
.rounded-xl {
  border-radius: var(--radius-command) !important;
}

/* Transitions */
.transition-all {
  transition: all var(--timing-smooth) ease !important;
}
.transition-quick {
  transition: all var(--timing-quick) ease !important;
}

/* ========================================
   RESPONSIVE TACTICAL DESIGN
   ======================================== */

/* Tablet Landscape - Command Console Mode */
@media (max-width: 1200px) {
  .threat-vector-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-md);
  }

  .vector-card {
    min-height: 100px;
    padding: var(--space-md);
  }

  .data-row {
    grid-template-columns: 50px 1fr 100px 90px;
    padding: var(--space-sm) var(--space-md);
  }

  .ops-main {
    padding: var(--space-lg) var(--space-md);
  }
}

/* Tablet Portrait - Field Operations Mode */
@media (max-width: 768px) {
  .command-header-content {
    flex-direction: column;
    gap: var(--space-md);
    text-align: center;
  }

  .status-panel {
    justify-content: center;
    gap: var(--space-md);
  }

  .threat-vector-grid {
    grid-template-columns: repeat(2, 1fr);
    padding: var(--space-md);
    gap: var(--space-sm);
  }

  .vector-card {
    min-height: 80px;
    padding: var(--space-sm);
  }

  .vector-icon {
    width: 24px;
    height: 24px;
    font-size: 14px;
  }

  .vector-label {
    font-size: 10px;
    line-height: 1.1;
  }

  .factor-strip {
    padding: var(--space-sm);
    gap: var(--space-xs);
  }

  .factor-chip {
    font-size: 10px;
    padding: 4px var(--space-xs);
  }

  .tactical-panel {
    margin-bottom: var(--space-lg);
  }

  /* Mobile Search - Top Positioned */
  .tactical-panel .absolute {
    position: relative !important;
    top: auto !important;
    right: auto !important;
    margin-bottom: var(--space-md);
  }

  .tactical-input {
    width: 100% !important;
    font-size: var(--font-data);
  }

  .tactical-button {
    padding: var(--space-xs) var(--space-sm);
    font-size: var(--font-data);
  }

  /* Mobile Data Grid */
  .data-grid-body {
    max-height: 400px;
  }

  .data-row {
    grid-template-columns: 1fr;
    gap: var(--space-sm);
    padding: var(--space-md);
    text-align: left;
  }

  .rank-position {
    position: absolute;
    top: var(--space-sm);
    right: var(--space-md);
    font-size: var(--font-intel);
  }

  .country-data {
    margin-top: var(--space-sm);
  }

  .threat-metrics {
    align-items: flex-start;
    flex-direction: row;
    justify-content: space-between;
  }

  .classification-level {
    justify-content: flex-start;
  }

  .level-badge {
    min-width: 60px;
    font-size: 10px;
    padding: 2px var(--space-xs);
  }

  /* Mobile Map Legend */
  .tactical-grid-5 {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: var(--space-sm) !important;
  }

  .ops-main {
    padding: var(--space-md) var(--space-sm);
  }
}

/* Mobile Portrait - Tactical Mobile Mode */
@media (max-width: 480px) {
  .command-title h1 {
    font-size: var(--font-unit);
  }

  .threat-vector-grid {
    grid-template-columns: 1fr;
    padding: var(--space-sm);
  }

  .vector-card {
    min-height: 60px;
    flex-direction: row;
    justify-content: flex-start;
    gap: var(--space-sm);
    padding: var(--space-sm);
  }

  .vector-icon {
    width: 20px;
    height: 20px;
    font-size: 12px;
    flex-shrink: 0;
  }

  .vector-label {
    font-size: 11px;
    text-align: left;
  }

  .factor-strip {
    flex-direction: column;
  }

  .factor-chip {
    justify-content: center;
    text-align: center;
  }

  .panel-header {
    padding: var(--space-md);
  }

  .panel-title {
    font-size: var(--font-field);
  }

  .panel-subtitle {
    font-size: var(--font-data);
  }

  .panel-body {
    padding: var(--space-md);
  }

  .tactical-grid-5 {
    grid-template-columns: 1fr !important;
    gap: var(--space-xs) !important;
  }

  .data-grid-body {
    max-height: 300px;
  }

  .data-row {
    padding: var(--space-sm);
  }
}

/* Touch Device Enhancements */
@media (hover: none) and (pointer: coarse) {
  .tactical-button,
  .vector-card,
  .factor-chip,
  .data-row {
    cursor: pointer;
  }

  .tactical-button:hover,
  .vector-card:hover,
  .factor-chip:hover,
  .data-row:hover {
    transform: none;
  }

  .tactical-button:active {
    transform: scale(0.98);
  }

  .vector-card:active,
  .factor-chip:active {
    transform: scale(0.97);
  }

  .data-row:active {
    transform: translateX(2px);
  }
}

/* High DPI / Retina Display Optimizations */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .vector-icon,
  .classification-badge,
  .level-badge {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }

  .tactical-panel::before,
  .vector-card::before,
  .data-row::before {
    will-change: transform;
  }
}

/* Landscape Mobile - Horizontal Operations */
@media (max-width: 768px) and (orientation: landscape) {
  .command-header-content {
    flex-direction: row;
  }

  .threat-vector-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .data-grid-body {
    max-height: 250px;
  }

  .ops-main {
    padding: var(--space-sm);
  }
}

/* Reduced Motion - Tactical Accessibility */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .scanning-state::after,
  .pulse-status,
  .meter-sweep,
  .sparkline-sweep {
    animation: none !important;
  }

  .tactical-button::before,
  .vector-card::before,
  .data-row::before {
    display: none !important;
  }
}

/* Dark Mode Enhancements */
@media (prefers-color-scheme: dark) {
  /* Already optimized for dark mode */
  body {
    color-scheme: dark;
  }
}

/* ========================================
   PRINT STYLES (OPERATIONAL REPORTS)
   ======================================== */

@media print {
  body {
    background: white !important;
    color: black !important;
  }

  .command-header,
  .classification-badge {
    background: white !important;
    color: black !important;
    border: 1px solid black !important;
  }

  .tactical-panel {
    border: 1px solid black !important;
    background: white !important;
    break-inside: avoid;
  }

  .ops-loading,
  .scanning-state::after {
    display: none !important;
  }
}

/* ========================================
   SETTINGS MENU
   ======================================== */

.settings-menu-container {
  position: relative;
}

.settings-menu {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  background: var(--command-navy);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  min-width: 200px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
  z-index: 1000;
}

.settings-menu.hidden {
  display: none;
}

.settings-menu-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  transition: background 0.2s;
  border: none;
  width: 100%;
  text-align: left;
  background: transparent;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.875rem;
}

.settings-menu-item:hover {
  background: rgba(255, 255, 255, 0.1);
}

.settings-menu-item i {
  width: 16px;
  text-align: center;
}

.settings-menu-logout {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* ========================================
   PERSPECTIVE SELECTOR (DASHBOARD)
   ======================================== */

.panel-header--with-perspective {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-md);
  flex-wrap: wrap;
}

.panel-header-content {
  flex: 1;
  min-width: 300px;
}

.perspective-selector-inline {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  min-width: 300px;
}

.perspective-label-inline {
  color: rgba(255, 255, 255, 0.7);
  font-size: var(--font-data);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
  white-space: nowrap;
}

.perspective-dropdown-inline {
  flex: 1;
  padding: 0.5rem 0.75rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  color: white;
  font-size: var(--font-intel);
  font-family: var(--font-mono);
  outline: none;
  transition: all var(--timing-quick);
  cursor: pointer;
}

.perspective-dropdown-inline:hover {
  background: rgba(255, 255, 255, 0.08);
}

.perspective-dropdown-inline:focus {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.4);
}

.perspective-dropdown-inline option {
  background: var(--command-navy);
  color: white;
  padding: 0.5rem;
}

.perspective-manage-link {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem;
  background: rgba(16, 185, 129, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  color: #34d399;
  text-decoration: none;
  font-size: var(--font-intel);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: all var(--timing-quick);
  white-space: nowrap;
  cursor: pointer;
}

.perspective-manage-link:hover {
  background: rgba(16, 185, 129, 0.3);
  border-color: rgba(52, 211, 153, 0.5);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.perspective-manage-link:active {
  transform: translateY(0);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .panel-header--with-perspective {
    flex-direction: column;
  }

  .perspective-selector-compact {
    width: 100%;
  }
}
