/* assets/css/neon-theme.css - Premium Neon Geospatial Intelligence Theme */

:root {
  --bg-deep: #050811;
  --bg-surface: #0a1122;
  --bg-card: rgba(14, 23, 42, 0.88);
  --bg-glass: rgba(15, 25, 48, 0.75);
  
  --neon-cyan: #00f3ff;
  --neon-teal: #00ffd5;
  --neon-blue: #38bdf8;
  --neon-violet: #8b5cf6;
  --neon-amber: #f59e0b;
  --neon-rose: #f43f5e;
  --neon-green: #10b981;

  --border-neon: rgba(0, 243, 255, 0.22);
  --border-subtle: rgba(255, 255, 255, 0.08);
  
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --text-highlight: #38bdf8;

  --glow-cyan: 0 0 16px rgba(0, 243, 255, 0.25);
  --glow-violet: 0 0 16px rgba(139, 92, 246, 0.25);
  --glow-amber: 0 0 16px rgba(245, 158, 11, 0.25);
}

/* Global resets & typography */
body, .container-scroller {
  background-color: var(--bg-deep) !important;
  color: var(--text-main) !important;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
  letter-spacing: 0.015em;
}

/* Glassmorphism panels & cards */
.card, .content-wrapper, .modal-content {
  background: var(--bg-card) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-neon) !important;
  border-radius: 10px !important;
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.45);
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.card:hover {
  border-color: rgba(0, 243, 255, 0.38) !important;
  box-shadow: var(--glow-cyan);
}

.card-title {
  color: var(--neon-cyan) !important;
  font-weight: 600 !important;
  letter-spacing: 0.04em !important;
  text-transform: uppercase;
  font-size: 0.95rem !important;
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-title::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 14px;
  background: var(--neon-cyan);
  border-radius: 2px;
  box-shadow: var(--glow-cyan);
}

/* Header, Navbar & Sidebar */
.navbar, .navbar-brand-wrapper {
  background: rgba(10, 17, 34, 0.95) !important;
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-neon) !important;
}

.sidebar {
  background: #070c18 !important;
  border-right: 1px solid var(--border-subtle) !important;
}

.sidebar-brand-wrapper {
  background: #060a14 !important;
  border-bottom: 1px solid var(--border-subtle) !important;
}

.sidebar .nav .nav-item .nav-link {
  color: #cbd5e1 !important;
  transition: all 0.2s ease-in-out;
  border-radius: 6px;
  margin: 2px 8px;
}

.sidebar .nav .nav-item.active > .nav-link,
.sidebar .nav .nav-item:hover > .nav-link {
  background: rgba(0, 243, 255, 0.08) !important;
  color: var(--neon-cyan) !important;
  border-left: 3px solid var(--neon-cyan);
}

.sidebar .nav .nav-item .menu-icon i {
  color: var(--neon-blue) !important;
}

.sidebar .nav .nav-item.active .menu-icon i {
  color: var(--neon-cyan) !important;
  text-shadow: var(--glow-cyan);
}

/* KPI Counter Metric Cards */
.kpi-card {
  position: relative;
  overflow: hidden;
}

.kpi-card::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 60px;
  height: 60px;
  background: radial-gradient(circle, rgba(0, 243, 255, 0.15) 0%, transparent 70%);
  pointer-events: none;
}

.kpi-number {
  font-size: 2rem;
  font-weight: 700;
  color: #ffffff;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

.kpi-number.cyan { color: var(--neon-cyan); text-shadow: var(--glow-cyan); }
.kpi-number.teal { color: var(--neon-teal); }
.kpi-number.amber { color: var(--neon-amber); text-shadow: var(--glow-amber); }
.kpi-number.rose { color: var(--neon-rose); }
.kpi-number.violet { color: var(--neon-violet); text-shadow: var(--glow-violet); }

/* Buttons & Interactive Controls */
.btn-primary, .enter-btn {
  background: linear-gradient(135deg, #00b4d8, #0077b6) !important;
  border: 1px solid var(--neon-cyan) !important;
  color: #ffffff !important;
  box-shadow: 0 0 12px rgba(0, 243, 255, 0.25);
  font-weight: 600;
  transition: all 0.2s ease;
}

.btn-primary:hover, .enter-btn:hover {
  background: linear-gradient(135deg, #00f3ff, #0096c7) !important;
  box-shadow: 0 0 20px rgba(0, 243, 255, 0.5);
  color: #050811 !important;
  transform: translateY(-1px);
}

.btn-outline-neon {
  background: transparent !important;
  border: 1px solid var(--neon-cyan) !important;
  color: var(--neon-cyan) !important;
}

.btn-outline-neon:hover {
  background: rgba(0, 243, 255, 0.15) !important;
  color: #ffffff !important;
}

/* Neon Language Switcher */
.neon-lang-switcher {
  border: 1px solid var(--border-neon);
  border-radius: 6px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.4);
}

.neon-btn-active {
  background: var(--neon-cyan) !important;
  color: #050811 !important;
  font-weight: 700 !important;
  box-shadow: var(--glow-cyan);
}

/* Tables */
.table {
  color: var(--text-main) !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
}

.table thead th {
  background: rgba(0, 243, 255, 0.08) !important;
  color: var(--neon-cyan) !important;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-bottom: 2px solid var(--border-neon) !important;
  border-top: none !important;
}

.table tbody tr {
  border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
  transition: background 0.15s ease;
}

.table tbody tr:hover {
  background: rgba(0, 243, 255, 0.04) !important;
}

/* Badges */
.badge-warning {
  background: rgba(245, 158, 11, 0.2) !important;
  color: #fbbf24 !important;
  border: 1px solid rgba(245, 158, 11, 0.5) !important;
}

.badge-success {
  background: rgba(16, 185, 129, 0.2) !important;
  color: #34d399 !important;
  border: 1px solid rgba(16, 185, 129, 0.5) !important;
}

.badge-danger {
  background: rgba(244, 63, 94, 0.2) !important;
  color: #fb7185 !important;
  border: 1px solid rgba(244, 63, 94, 0.5) !important;
}

.badge-info {
  background: rgba(0, 243, 255, 0.2) !important;
  color: var(--neon-cyan) !important;
  border: 1px solid var(--border-neon) !important;
}

/* Form Controls */
.form-control, .form-select, select.form-control {
  background: rgba(10, 17, 34, 0.8) !important;
  border: 1px solid var(--border-subtle) !important;
  color: #f8fafc !important;
  border-radius: 6px !important;
}

.form-control:focus, select.form-control:focus {
  border-color: var(--neon-cyan) !important;
  box-shadow: var(--glow-cyan) !important;
  outline: none;
}

/* Map Containers & Controls */
.gis-map-container {
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border-neon);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
  position: relative;
}

.leaflet-popup-content-wrapper {
  background: rgba(10, 17, 34, 0.95) !important;
  backdrop-filter: blur(12px);
  color: #ffffff !important;
  border: 1px solid var(--neon-cyan) !important;
  border-radius: 8px !important;
  box-shadow: var(--glow-cyan) !important;
}

.leaflet-popup-tip {
  background: rgba(10, 17, 34, 0.95) !important;
  border: 1px solid var(--neon-cyan) !important;
}

.leaflet-control-layers {
  background: rgba(10, 17, 34, 0.92) !important;
  color: #ffffff !important;
  border: 1px solid var(--border-neon) !important;
  border-radius: 6px !important;
}

/* Layer Manager Drawer */
.layer-drawer {
  background: rgba(10, 17, 34, 0.95);
  border: 1px solid var(--border-neon);
  border-radius: 8px;
  padding: 12px 16px;
  margin-top: 12px;
}

.layer-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  margin: 4px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  font-size: 0.8rem;
  color: #e2e8f0;
  cursor: pointer;
  transition: all 0.2s ease;
}

.layer-chip.active {
  background: rgba(0, 243, 255, 0.18);
  border-color: var(--neon-cyan);
  color: var(--neon-cyan);
  box-shadow: 0 0 10px rgba(0, 243, 255, 0.3);
}

/* Footer */
.footer {
  background: #060a14 !important;
  border-top: 1px solid var(--border-subtle) !important;
  color: var(--text-muted) !important;
}

/* Mobile & Touch Responsive GIS */
@media (max-width: 768px) {
  .card {
    padding: 12px !important;
  }
  .kpi-number {
    font-size: 1.5rem;
  }
  #mapid {
    height: 400px !important;
  }
  .layer-drawer {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
}

/* ==========================================================================
   PHASE 2: OSIRIS-INSPIRED INTELLIGENCE HUB & TACTICAL TOOLKIT
   ========================================================================== */

/* Fullscreen Map-First Container */
.intel-map-container {
  position: relative;
  width: 100%;
  height: calc(100vh - 70px);
  min-height: 600px;
  background: var(--bg-deep);
  overflow: hidden;
}

#intel-map {
  width: 100%;
  height: 100%;
  background: #060913;
  z-index: 1;
}

/* Top Left HUD Telemetry Overlay */
.intel-hud-topleft {
  position: absolute;
  top: 14px;
  left: 14px;
  max-width: calc(100% - 240px);
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  pointer-events: auto;
}

.hud-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 20px;
  background: rgba(10, 17, 34, 0.85);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border-neon);
  color: #e2e8f0;
  font-size: 0.75rem;
  font-family: "Courier New", Courier, monospace;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

.hud-pill.live-dot::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
  animation: pulse-dot 1.8s infinite;
}

@keyframes pulse-dot {
  0% { transform: scale(0.9); opacity: 0.8; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.8; }
}

/* Right-Side Vertical Tool Rail (48px) */
.tool-rail {
  position: absolute;
  right: 14px;
  top: 75px;
  bottom: 80px;
  width: 50px;
  background: rgba(8, 14, 28, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border-neon);
  border-radius: 25px;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 0;
  gap: 10px;
  z-index: 1020;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
  overflow-y: auto;
  scrollbar-width: none;
}
.tool-rail::-webkit-scrollbar { display: none; }

.tool-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: transparent;
  border: 1px solid transparent;
  color: #94a3b8;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.tool-btn:hover {
  color: var(--neon-cyan);
  background: rgba(0, 243, 255, 0.12);
  border-color: rgba(0, 243, 255, 0.35);
  box-shadow: 0 0 12px rgba(0, 243, 255, 0.3);
  transform: scale(1.08);
}

.tool-btn.active {
  color: #050811;
  background: var(--neon-cyan);
  border-color: var(--neon-cyan);
  box-shadow: 0 0 16px var(--neon-cyan);
}

.tool-btn .badge-counter {
  position: absolute;
  top: -2px;
  right: -2px;
  background: var(--neon-rose);
  color: #fff;
  font-size: 0.6rem;
  padding: 1px 4px;
  border-radius: 10px;
  font-weight: bold;
}

/* Floating Flyout Panels */
.flyout-panel {
  position: absolute;
  right: 74px;
  top: 75px;
  width: 390px;
  max-width: calc(100vw - 90px);
  max-height: calc(100vh - 160px);
  background: rgba(10, 17, 34, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-neon);
  border-radius: 12px;
  z-index: 1015;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.7);
  display: none;
  flex-direction: column;
  overflow: hidden;
  transition: all 0.25s ease;
  animation: slide-in-flyout 0.22s ease forwards;
}

@keyframes slide-in-flyout {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}

.flyout-panel.active {
  display: flex !important;
}

.flyout-header {
  padding: 12px 16px;
  background: rgba(14, 23, 42, 0.85);
  border-bottom: 1px solid var(--border-neon);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.flyout-header h6 {
  margin: 0;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--neon-cyan);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 8px;
}

.flyout-close {
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 1.1rem;
  cursor: pointer;
  padding: 2px 6px;
  line-height: 1;
  transition: color 0.15s ease;
}

.flyout-close:hover {
  color: var(--neon-rose);
}

.flyout-body {
  padding: 14px 16px;
  overflow-y: auto;
  flex: 1;
}

.flyout-body::-webkit-scrollbar {
  width: 4px;
}
.flyout-body::-webkit-scrollbar-thumb {
  background: rgba(0, 243, 255, 0.3);
  border-radius: 2px;
}

/* Reposition & Theme Leaflet Zoom Controls (Above Bottom Timeline) */
.leaflet-bottom.leaflet-left {
  bottom: 98px !important;
  left: 14px !important;
  margin-bottom: 0 !important;
  margin-left: 0 !important;
  z-index: 1005 !important;
}

.leaflet-control-zoom {
  border: 1px solid rgba(0, 243, 255, 0.45) !important;
  background: rgba(6, 14, 28, 0.9) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  border-radius: 8px !important;
  overflow: hidden;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.6) !important;
}

.leaflet-control-zoom-in,
.leaflet-control-zoom-out {
  background: rgba(6, 14, 28, 0.9) !important;
  color: #00f3ff !important;
  border: none !important;
  border-bottom: 1px solid rgba(0, 243, 255, 0.2) !important;
  font-weight: 700 !important;
  font-size: 15px !important;
  width: 32px !important;
  height: 32px !important;
  line-height: 32px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: all 0.2s ease !important;
}

.leaflet-control-zoom-out {
  border-bottom: none !important;
}

.leaflet-control-zoom-in:hover,
.leaflet-control-zoom-out:hover {
  background: rgba(0, 243, 255, 0.25) !important;
  color: #ffffff !important;
  box-shadow: 0 0 10px rgba(0, 243, 255, 0.5) !important;
}

/* Bottom Timeline Scrubber (Above Bottom Ticker) */
.timeline-bar {
  position: absolute;
  bottom: 46px;
  left: 14px;
  right: 74px;
  height: 44px;
  background: rgba(10, 17, 34, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border-neon);
  border-radius: 22px;
  z-index: 1010;
  display: flex;
  align-items: center;
  padding: 0 16px;
  gap: 12px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.6);
}

.timeline-btn {
  background: rgba(0, 243, 255, 0.1);
  border: 1px solid var(--border-neon);
  color: var(--neon-cyan);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.timeline-btn:hover {
  background: var(--neon-cyan);
  color: #050811;
  box-shadow: 0 0 12px var(--neon-cyan);
}

.timeline-slider {
  flex: 1;
  -webkit-appearance: none;
  height: 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.15);
  outline: none;
}

.timeline-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--neon-cyan);
  cursor: pointer;
  box-shadow: 0 0 10px var(--neon-cyan);
  transition: transform 0.15s ease;
}

.timeline-slider::-webkit-slider-thumb:hover {
  transform: scale(1.25);
}

/* Streaming Feed Item */
.feed-item {
  padding: 10px;
  margin-bottom: 8px;
  background: rgba(15, 25, 48, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-left: 3px solid var(--neon-blue);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.feed-item:hover {
  background: rgba(0, 243, 255, 0.08);
  border-color: rgba(0, 243, 255, 0.3);
  transform: translateX(4px);
}

.feed-item.severity-CRITICAL { border-left-color: var(--neon-rose); }
.feed-item.severity-HIGH { border-left-color: var(--neon-amber); }
.feed-item.severity-MEDIUM { border-left-color: var(--neon-blue); }
.feed-item.severity-LOW { border-left-color: var(--neon-green); }

/* OSINT Terminal Box */
.osint-terminal {
  background: #030712;
  border: 1px solid rgba(0, 243, 255, 0.3);
  border-radius: 6px;
  padding: 10px;
  font-family: "Courier New", Courier, monospace;
  font-size: 0.78rem;
  color: #38bdf8;
  max-height: 250px;
  overflow-y: auto;
}

/* Quick Copilot Prompt Chips */
.copilot-chip {
  display: inline-block;
  padding: 5px 10px;
  margin: 3px 2px;
  background: rgba(0, 243, 255, 0.08);
  border: 1px solid rgba(0, 243, 255, 0.25);
  border-radius: 16px;
  color: #bae6fd;
  font-size: 0.76rem;
  cursor: pointer;
  transition: all 0.18s ease;
}

.copilot-chip:hover {
  background: rgba(0, 243, 255, 0.22);
  border-color: var(--neon-cyan);
  color: #fff;
  box-shadow: 0 0 8px rgba(0, 243, 255, 0.3);
}

/* Mobile Bottom Sheet */
@media (max-width: 768px) {
  .tool-rail {
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 54px;
    flex-direction: row;
    justify-content: space-around;
    border-radius: 16px 16px 0 0;
    padding: 0 8px;
  }
  .flyout-panel {
    top: auto;
    bottom: 58px;
    right: 0;
    left: 0;
    width: 100%;
    max-width: 100%;
    max-height: 60vh;
    border-radius: 16px 16px 0 0;
  }
  .timeline-bar {
    display: none; /* Hide timeline on mobile to preserve screen estate */
  }
  .intel-hud-topleft {
    left: 14px;
    top: 10px;
  }
}

/* Material Design Icons compatibility aliases */
.mdi-robot-outline::before {
  content: "\F6A8" !important; /* mdi-robot */
}
.mdi-graph-outline::before {
  content: "\FCF3" !important; /* mdi-hubspot / entity node graph */
}

