/* ═══════════════════════════════════════════════════════════════════
   GLINT CRISIS MONITOR — Tactical OSINT Dashboard
   ═══════════════════════════════════════════════════════════════════ */
@import url('https://fonts.googleapis.com/css2?family=Rajdhani:wght@400;500;600;700&family=Share+Tech+Mono&display=swap');

/* ─── Custom Properties ────────────────────────────────────────────── */
:root {
  --bg-deep: #020406;
  --bg-panel: rgba(10, 15, 22, 0.75);
  --bg-card: rgba(13, 21, 32, 0.85);
  --border: rgba(26, 38, 51, 0.6);
  --border-active: rgba(42, 58, 77, 0.8);
  --text-primary: #a0adba;
  --text-dim: #5d748c;
  --text-bright: #e1e9f0;
  --accent-red: #ff3131;
  --accent-red-dim: rgba(255, 49, 49, 0.2);
  --accent-green: #00ff88;
  --accent-green-dim: rgba(0, 255, 136, 0.15);
  --accent-blue: #00aaff;
  --accent-blue-dim: rgba(0, 170, 255, 0.15);
  --accent-amber: #ffaa00;
  --accent-amber-dim: rgba(255, 170, 0, 0.15);
  --accent-magenta: #ff00cc;
  --font-display: 'Rajdhani', sans-serif;
  --font-mono: 'Share Tech Mono', monospace;
  --glow-red: 0 0 25px rgba(255, 49, 49, 0.25);
  --glow-blue: 0 0 25px rgba(0, 170, 255, 0.2);
  --glow-green: 0 0 25px rgba(0, 255, 136, 0.2);
  --glass-bg: blur(12px) saturate(180%);
  --corner-size: 12px;
}

/* ─── Reset ────────────────────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-mono);
  background: var(--bg-deep);
  color: var(--text-primary);
  overflow-x: hidden;
  overflow-y: auto;
  min-height: 100vh;
  width: 100vw;
}

::-webkit-scrollbar {
  width: 4px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 2px;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ─── Scanlines Overlay ────────────────────────────────────────────── */
.scanlines {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: repeating-linear-gradient(0deg,
      transparent,
      transparent 2px,
      rgba(0, 0, 0, 0.08) 2px,
      rgba(0, 0, 0, 0.08) 4px);
  animation: scanline_flicker 0.15s infinite;
}

@keyframes scanline_flicker {
  0% {
    opacity: 0.95;
  }

  50% {
    opacity: 1;
  }

  100% {
    opacity: 0.9;
  }
}

/* CRT vignette */
.scanlines::after {
  content: '';
  position: fixed;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 60%, rgba(0, 0, 0, 0.5) 100%);
  pointer-events: none;
}

/* ─── Main Grid Layout ─────────────────────────────────────────────── */
.tactical-grid {
  display: grid;
  grid-template-columns: 240px 1fr 300px;
  grid-template-rows: 40px calc(100vh - 240px) 200px;
  grid-template-areas:
    "topbar topbar topbar"
    "left   center right"
    "bottom bottom bottom";
  min-height: 100vh;
  gap: 1px;
  background: var(--border);
}

/* ─── Top Bar ──────────────────────────────────────────────────────── */
.topbar {
  grid-area: topbar;
  background: var(--bg-panel);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  border-bottom: 1px solid var(--border);
  z-index: 10;
}

.topbar__brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.topbar__logo {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--accent-red);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  text-shadow: 0 0 10px rgba(255, 49, 49, 0.4);
}

.topbar__sep {
  width: 1px;
  height: 18px;
  background: var(--border);
}

.topbar__sub {
  font-size: 0.7rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.2em;
}

.topbar__status {
  display: flex;
  align-items: center;
  gap: 16px;
}

.topbar__indicator {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.7rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.topbar__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-green);
  box-shadow: 0 0 6px var(--accent-green);
  animation: pulse-dot 2s ease-in-out infinite;
}

.topbar__dot--red {
  background: var(--accent-red);
  box-shadow: 0 0 6px var(--accent-red);
}

@keyframes pulse-dot {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.4;
  }
}

.topbar__clock {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent-green);
  text-shadow: var(--glow-green);
  letter-spacing: 0.1em;
}

/* ─── Panel Common ─────────────────────────────────────────────────── */
.panel {
  background: var(--bg-panel);
  backdrop-filter: var(--glass-bg);
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--border);
  transition: box-shadow 0.4s ease;
}

.panel::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  pointer-events: none;
}

.panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.panel__title {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.2em;
}

.panel__badge {
  font-size: 0.6rem;
  padding: 2px 6px;
  border: 1px solid var(--border);
  border-radius: 2px;
  color: var(--text-dim);
  letter-spacing: 0.1em;
}

.panel__badge--live {
  border-color: var(--accent-red);
  color: var(--accent-red);
  animation: flash-border 2s ease-in-out infinite;
}

@keyframes flash-border {

  0%,
  100% {
    border-color: var(--accent-red);
  }

  50% {
    border-color: transparent;
  }
}

.panel__body {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
}

/* ─── Left Panel: INTEL CAMS ───────────────────────────────────────── */
.panel--left {
  grid-area: left;
}

.cam-list {
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cam-card {
  position: relative;
  border: 1px solid var(--border);
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.3s;
  /* Clipped corners */
  clip-path: polygon(0 var(--corner-size),
      var(--corner-size) 0,
      100% 0,
      100% calc(100% - var(--corner-size)),
      calc(100% - var(--corner-size)) 100%,
      0 100%);
}

.cam-card:hover {
  border-color: var(--accent-blue);
  box-shadow: var(--glow-blue);
}

.cam-card__img {
  width: 100%;
  height: 110px;
  object-fit: cover;
  display: block;
  filter: saturate(0.3) brightness(0.7) contrast(1.2);
  transition: filter 0.3s;
}

.cam-card:hover .cam-card__img {
  filter: saturate(0.5) brightness(0.85) contrast(1.1);
}

/* Static noise overlay */
.cam-card__static {
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.06'/%3E%3C/svg%3E");
  pointer-events: none;
  mix-blend-mode: overlay;
  opacity: 0.6;
}

/* HUD overlay info */
.cam-card__hud {
  position: absolute;
  inset: 0;
  pointer-events: none;
  padding: 6px 8px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.cam-card__coords {
  font-size: 0.55rem;
  color: var(--accent-green);
  text-shadow: var(--glow-green);
  letter-spacing: 0.08em;
  opacity: 0.7;
  align-self: flex-end;
}

.cam-card__label-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
}

.cam-card__city {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-bright);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
}

.cam-card__rec {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.5rem;
  color: var(--accent-red);
  text-transform: uppercase;
  letter-spacing: 0.15em;
}

.cam-card__rec-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent-red);
  animation: pulse-dot 1s ease-in-out infinite;
}

/* Corner brackets */
.cam-card__bracket {
  position: absolute;
  width: 14px;
  height: 14px;
  border-color: var(--accent-green);
  opacity: 0.35;
  pointer-events: none;
}

.cam-card__bracket--tl {
  top: 4px;
  left: 4px;
  border-top: 1px solid;
  border-left: 1px solid;
}

.cam-card__bracket--tr {
  top: 4px;
  right: 4px;
  border-top: 1px solid;
  border-right: 1px solid;
}

.cam-card__bracket--bl {
  bottom: 4px;
  left: 4px;
  border-bottom: 1px solid;
  border-left: 1px solid;
}

.cam-card__bracket--br {
  bottom: 4px;
  right: 4px;
  border-bottom: 1px solid;
  border-right: 1px solid;
}

/* ─── Center Panel: MAP ────────────────────────────────────────────── */
.panel--center {
  grid-area: center;
  position: relative;
}

#map {
  width: 100%;
  height: 100%;
  z-index: 1;
}

/* Map grid overlay */
.map-grid-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(0, 170, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 170, 255, 0.04) 1px, transparent 1px);
  background-size: 80px 80px;
}

/* Map header overlay */
.map-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 3;
  padding: 10px 14px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(5, 7, 10, 0.85) 0%, transparent 100%);
}

.map-header__title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-bright);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  text-shadow: 0 0 10px rgba(0, 0, 0, 0.8);
}

.map-header__subtitle {
  font-size: 0.6rem;
  color: var(--text-dim);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-top: 2px;
}

.map-stats {
  display: flex;
  gap: 16px;
  text-align: right;
}

.map-stat {
  display: flex;
  flex-direction: column;
}

.map-stat__value {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1;
}

.map-stat__value--red {
  color: var(--accent-red);
  text-shadow: 0 0 8px rgba(255, 49, 49, 0.4);
}

.map-stat__value--amber {
  color: var(--accent-amber);
}

.map-stat__value--green {
  color: var(--accent-green);
  text-shadow: var(--glow-green);
}

.map-stat__label {
  font-size: 0.55rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-top: 2px;
}

/* Pulsating alert circles on map */
.pulse-marker {
  width: 20px;
  height: 20px;
  position: relative;
}

.pulse-marker__dot {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 8px;
  height: 8px;
  margin: -4px 0 0 -4px;
  background: var(--accent-red);
  border-radius: 50%;
  box-shadow: 0 0 6px var(--accent-red);
}

.pulse-marker__ring {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid var(--accent-red);
  border-radius: 50%;
  animation: pulse-ring 2s ease-out infinite;
  opacity: 0;
}

.pulse-marker__ring--delay {
  animation-delay: 1s;
}

@keyframes pulse-ring {
  0% {
    transform: scale(0.5);
    opacity: 0.8;
  }

  100% {
    transform: scale(3);
    opacity: 0;
  }
}

/* Leaflet popup custom */
.leaflet-popup-content-wrapper {
  background: var(--bg-card) !important;
  border: 1px solid var(--border) !important;
  border-radius: 2px !important;
  color: var(--text-primary) !important;
  font-family: var(--font-mono) !important;
  font-size: 0.7rem !important;
  box-shadow: var(--glow-red) !important;
}

.leaflet-popup-tip {
  background: var(--bg-card) !important;
  border: 1px solid var(--border) !important;
}

.leaflet-popup-content {
  margin: 8px 10px !important;
}

/* ─── Right Panel: INTEL FEED ──────────────────────────────────────── */
.panel--right {
  grid-area: right;
}

.intel-feed {
  padding: 4px 0;
}

.intel-item {
  display: flex;
  gap: 8px;
  padding: 8px 12px;
  border-bottom: 1px solid rgba(26, 38, 51, 0.5);
  transition: background 0.3s;
  cursor: pointer;
  align-items: flex-start;
}

.intel-item:hover {
  background: rgba(0, 170, 255, 0.04);
}

.intel-item--flash {
  animation: intel-flash 0.6s ease;
}

@keyframes intel-flash {
  0% {
    background: var(--accent-red-dim);
    transform: translateX(10px);
  }

  100% {
    background: transparent;
    transform: translateX(0);
  }
}

.intel-item__time {
  font-size: 0.6rem;
  color: var(--text-dim);
  white-space: nowrap;
  flex-shrink: 0;
  min-width: 42px;
  padding-top: 1px;
}

.intel-item__prefix {
  font-size: 0.6rem;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
  padding-top: 1px;
}

.intel-item__prefix--alert {
  color: var(--accent-red);
}

/* ─── Leaflet Popups (Dark Theme Override) ────────────────────────── */
.leaflet-popup-content-wrapper {
  background: var(--bg-card);
  color: var(--text-main);
  border: 1px solid var(--accent-red);
  border-radius: 0;
  box-shadow: 0 0 10px rgba(255, 49, 49, 0.3);
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

.leaflet-popup-tip {
  background: var(--bg-card);
  border: 1px solid var(--accent-red);
  box-shadow: 0 0 10px rgba(255, 49, 49, 0.3);
}

.leaflet-popup-content {
  margin: 10px 14px;
  line-height: 1.4;
}

.leaflet-container a.leaflet-popup-close-button {
  color: var(--text-dim);
  padding: 4px;
}

.leaflet-container a.leaflet-popup-close-button:hover {
  color: var(--accent-red);
}

.intel-item__prefix--news {
  color: var(--accent-blue);
}

.intel-item__prefix--data {
  color: var(--accent-amber);
}

.intel-item__text {
  font-size: 0.65rem;
  color: var(--text-primary);
  line-height: 1.5;
  flex: 1;
  min-width: 0;
}

.intel-item__source {
  font-size: 0.55rem;
  color: var(--text-dim);
  margin-top: 3px;
}

.intel-item__recon-trigger {
  font-size: 0.6rem;
  color: var(--accent-red);
  background: rgba(255, 49, 49, 0.1);
  padding: 2px 6px;
  border: 1px solid rgba(255, 49, 49, 0.3);
  border-radius: 2px;
  margin-top: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.05em;
}

.intel-item__recon-trigger:hover {
  background: var(--accent-red);
  color: #fff;
  box-shadow: 0 0 10px rgba(255, 49, 49, 0.5);
}

.recon-icon {
  font-size: 0.7rem;
  margin-right: 2px;
}

/* Flash entire panel on new intel */
.panel--right.flash-panel {
  box-shadow: inset 0 0 30px var(--accent-red-dim);
}

/* ─── Bottom Bar ───────────────────────────────────────────────────── */
.bottom-bar {
  grid-area: bottom;
  background: var(--bg-panel);
  display: grid;
  grid-template-columns: 1fr 300px 300px;
  gap: 1px;
  border-top: 1px solid var(--border);
}

.bottom-widget {
  background: var(--bg-panel);
  display: flex;
  flex-direction: column;
  padding: 12px 18px;
  position: relative;
  overflow: hidden;
}

.bottom-widget__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.bottom-widget__title-group {
  display: flex;
  flex-direction: column;
}

.bottom-widget__title {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.2em;
}

.bottom-widget__subtitle {
  font-size: 0.5rem;
  color: var(--accent-blue);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  opacity: 0.6;
}

.bottom-widget__value {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--accent-green);
  text-shadow: var(--glow-green);
}

/* Signal Graph Area */
.signal-chart-container {
  flex: 1;
  position: relative;
  min-height: 90px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(0, 255, 136, 0.05);
  border-radius: 2px;
}

.signal-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0, 255, 136, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 255, 136, 0.03) 1px, transparent 1px);
  background-size: 20px 20px;
  pointer-events: none;
}

.signal-chart-container canvas {
  width: 100% !important;
  height: 100% !important;
  position: relative;
  z-index: 2;
}

/* Alert Modules (Glassmorphism) */
.alert-modules {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  justify-content: center;
}

.alert-module {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 14px;
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-left-width: 3px;
  border-radius: 2px;
  transition: all 0.3s ease;
}

/* ─── Map Premium Enhancements ────────────────────────────────────── */
#map-container {
  position: relative;
  overflow: hidden;
}

.dept-feature {
  transition: fill 0.8s ease, fill-opacity 0.8s ease;
  pointer-events: auto !important;
}

.dept-feature:hover {
  fill-opacity: 0.4 !important;
  stroke: #fff !important;
  stroke-width: 2px !important;
}

.leaflet-interactive {
  cursor: crosshair !important;
}

.map-heatmap-layer {
  filter: blur(10px);
  opacity: 0.7;
}

.alert-module__label {
  font-size: 0.6rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.15em;
}

.alert-module__value {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
}

.alert-module--red {
  border-left-color: var(--accent-red);
}

.alert-module--amber {
  border-left-color: var(--accent-amber);
}

.alert-module--green {
  border-left-color: var(--accent-green);
}

.alert-module--red .alert-module__value {
  color: var(--accent-red);
  text-shadow: 0 0 10px rgba(255, 49, 49, 0.4);
}

.alert-module--amber .alert-module__value {
  color: var(--accent-amber);
}

.alert-module--green .alert-module__value {
  color: var(--accent-green);
  text-shadow: var(--glow-green);
}

/* Tension Tactical Gauge */
.tension-gauge {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
}

.tension-gauge__segments {
  display: flex;
  gap: 3px;
  height: 24px;
}

.tension-segment {
  flex: 1;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 1px;
  transition: background 0.4s ease, box-shadow 0.4s ease;
}

.tension-gauge__labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.55rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  opacity: 0.6;
}

.tension-value {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1;
}

/* ─── Loading / Error States ───────────────────────────────────────── */
.loading-line {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent-blue), transparent);
  animation: loading-sweep 2s ease-in-out infinite;
}

@keyframes loading-sweep {
  0% {
    transform: translateX(-100%);
  }

  100% {
    transform: translateX(100%);
  }
}

.error-msg {
  padding: 12px;
  font-size: 0.65rem;
  color: var(--accent-red);
  text-align: center;
}

/* ─── Camera Modal (In-Page Expand) ────────────────────────────────── */
.cam-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: rgba(5, 7, 10, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.cam-modal.active {
  display: flex;
}

.cam-modal__content {
  position: relative;
  width: 85vw;
  max-width: 1000px;
  border: 1px solid var(--border-active);
  background: var(--bg-card);
  overflow: hidden;
  cursor: default;
  clip-path: polygon(0 16px,
      16px 0,
      100% 0,
      100% calc(100% - 16px),
      calc(100% - 16px) 100%,
      0 100%);
  box-shadow: 0 0 60px rgba(0, 170, 255, 0.08), 0 0 120px rgba(255, 49, 49, 0.04);
}

.cam-modal__image {
  width: 100%;
  display: block;
  min-height: 300px;
  max-height: 70vh;
  object-fit: cover;
  filter: saturate(0.4) brightness(0.75) contrast(1.15);
}

.cam-modal__video {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: none;
  display: block;
  background: #000;
  filter: saturate(0.8) brightness(0.9);
}

.cam-modal__open-link {
  pointer-events: all;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: rgba(0, 170, 255, 0.15);
  border: 1px solid rgba(0, 170, 255, 0.3);
  border-radius: 2px;
  color: var(--accent-blue);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: background 0.2s;
  text-decoration: none;
}

.cam-modal__open-link:hover {
  background: rgba(0, 170, 255, 0.25);
}

.cam-modal__hud {
  position: absolute;
  inset: 0;
  pointer-events: none;
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.cam-modal__top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.cam-modal__city {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text-bright);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
}

.cam-modal__sublabel {
  font-size: 0.7rem;
  color: var(--text-dim);
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.cam-modal__close {
  pointer-events: all;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 49, 49, 0.15);
  border: 1px solid rgba(255, 49, 49, 0.3);
  border-radius: 2px;
  color: var(--accent-red);
  font-size: 1.2rem;
  cursor: pointer;
  transition: background 0.2s;
}

.cam-modal__close:hover {
  background: rgba(255, 49, 49, 0.3);
}

.cam-modal__bottom {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

.cam-modal__coords {
  font-size: 0.7rem;
  color: var(--accent-green);
  text-shadow: var(--glow-green);
  letter-spacing: 0.1em;
  opacity: 0.8;
}

.cam-modal__rec {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.65rem;
  color: var(--accent-red);
  text-transform: uppercase;
  letter-spacing: 0.15em;
}

.cam-modal__rec-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-red);
  box-shadow: 0 0 6px var(--accent-red);
  animation: pulse-dot 1s ease-in-out infinite;
}

/* Corner brackets for modal */
.cam-modal__bracket {
  position: absolute;
  width: 24px;
  height: 24px;
  border-color: var(--accent-green);
  opacity: 0.4;
  pointer-events: none;
}

.cam-modal__bracket--tl {
  top: 10px;
  left: 10px;
  border-top: 1px solid;
  border-left: 1px solid;
}

.cam-modal__bracket--tr {
  top: 10px;
  right: 10px;
  border-top: 1px solid;
  border-right: 1px solid;
}

.cam-modal__bracket--bl {
  bottom: 10px;
  left: 10px;
  border-bottom: 1px solid;
  border-left: 1px solid;
}

.cam-modal__bracket--br {
  bottom: 10px;
  right: 10px;
  border-bottom: 1px solid;
  border-right: 1px solid;
}

/* ─── Responsive ───────────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .tactical-grid {
    grid-template-columns: 200px 1fr 260px;
  }
}

@media (max-width: 900px) {
  .tactical-grid {
    grid-template-columns: 1fr;
    grid-template-rows: 40px 200px 300px auto 160px;
    grid-template-areas:
      "topbar"
      "left"
      "center"
      "right"
      "bottom";
  }

  .cam-list {
    flex-direction: row;
    overflow-x: auto;
  }

  .cam-card {
    min-width: 180px;
    flex-shrink: 0;
  }

  .bottom-bar {
    grid-template-columns: 1fr;
  }
}

/* --- Recon Modal -------------------------------------------------- */
.recon-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.recon-modal__backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(8px);
}

.recon-modal__content {
  position: relative;
  width: 100%;
  max-width: 800px;
  background: #05070a;
  border: 1px solid var(--border);
  box-shadow: 0 0 50px rgba(0, 0, 0, 0.8);
  border-radius: 4px;
  overflow: hidden;
  animation: modalIn 0.3s ease;
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

.recon-modal__header {
  padding: 12px 20px;
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.recon-modal__title {
  font-family: var(--font-display);
  font-size: 0.85rem;
  color: var(--accent-red);
  letter-spacing: 0.2em;
}

.recon-modal__close {
  background: none;
  border: none;
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
  opacity: 0.5;
}

.recon-modal__close:hover {
  opacity: 1;
}

.recon-modal__body {
  padding: 0;
}

.recon-modal__video-container {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  background: #000;
}

.recon-modal__video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.recon-modal__overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  border: 20px solid transparent;
}

.recon-modal__scanline {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: rgba(0, 255, 136, 0.1);
  box-shadow: 0 0 10px var(--accent-green);
  animation: sweep 4s linear infinite;
  opacity: 0.3;
}

@keyframes sweep {
  from {
    top: 0;
  }

  to {
    top: 100%;
  }
}

.recon-modal__metadata {
  position: absolute;
  bottom: 20px;
  left: 20px;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--accent-green);
  text-shadow: 0 0 5px #000;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.recon-modal__warning {
  padding: 12px 20px;
  background: rgba(255, 170, 0, 0.05);
  font-size: 0.65rem;
  color: var(--accent-amber);
  border-top: 1px solid rgba(255, 170, 0, 0.1);
  text-align: center;
  letter-spacing: 0.05em;
}

/* ─── Grok Reconstruction Styles ────────────────────────────────────── */
.intel-item__recon-trigger {
  font-size: 0.65rem;
  color: #c084fc;
  background: rgba(168, 85, 247, 0.1);
  padding: 3px 8px;
  border: 1px solid rgba(168, 85, 247, 0.4);
  border-radius: 2px;
  margin-top: 6px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.1em;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-transform: uppercase;
  max-width: fit-content;
}

.intel-item__recon-trigger:hover {
  background: #9333ea;
  color: #fff;
  border-color: #c084fc;
  box-shadow: 0 0 15px rgba(168, 85, 247, 0.6);
  transform: translateY(-1px);
}

.recon-icon {
  font-size: 0.8rem;
  filter: drop-shadow(0 0 2px rgba(168, 85, 247, 0.5));
}

.recon-glitch-overlay {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(0deg,
      transparent,
      transparent 1px,
      rgba(168, 85, 247, 0.05) 1px,
      rgba(168, 85, 247, 0.05) 2px);
  pointer-events: none;
  z-index: 2;
  opacity: 0.3;
}

#recon-modal .cam-modal__content {
  max-width: 900px;
}

@keyframes recon-pulse {
  0% {
    box-shadow: 0 0 20px rgba(168, 85, 247, 0.4);
  }

  50% {
    box-shadow: 0 0 40px rgba(168, 85, 247, 0.6);
  }

  100% {
    box-shadow: 0 0 20px rgba(168, 85, 247, 0.4);
  }
}

#recon-modal.active .cam-modal__content {
  animation: recon-pulse 4s infinite ease-in-out;
}

/* ─── Loading Mask (Premium Preloader) ────────────────────────────── */
.loading-mask {
  position: fixed;
  inset: 0;
  z-index: 20000;
  background: #05070a;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 1s cubic-bezier(0.4, 0, 0.2, 1), visibility 1s;
}

.loading-mask.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loading-mask__content {
  text-align: center;
  width: 100%;
  max-width: 400px;
}

.loading-mask__logo {
  width: 180px;
  height: auto;
  margin-bottom: 40px;
  filter: drop-shadow(0 0 15px rgba(255, 255, 255, 0.1));
}

.loading-mask__tactical {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.loading-mask__status {
  font-family: var(--font-display);
  font-size: 0.75rem;
  color: var(--accent-green);
  letter-spacing: 0.3em;
  text-shadow: var(--glow-green);
}

.loading-mask__progress {
  height: 2px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 2px;
  overflow: hidden;
  position: relative;
}

.loading-mask__bar {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0%;
  background: var(--accent-green);
  box-shadow: 0 0 10px var(--accent-green);
  transition: width 0.4s ease;
}

.loading-mask__meta {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: #555;
  letter-spacing: 0.1em;
}