/* C:\Users\c6182\Desktop\folders\safe\Skillet_Comms\TheOperation_Work\pwa\app.css */

/* Core Theme Design System - High-Visibility Public Safety Palette (ICS-Command) */
:root {
  --bg-dark: #0f172a;
  --bg-darker: #090d16;
  --bg-panel: rgba(15, 23, 42, 0.94);
  --border-color: rgba(241, 180, 52, 0.35);
  --border-glow: rgba(241, 180, 52, 0.65);
  
  /* Public Safety Tokens */
  --primary-accent: #1b365d;
  --command-accent: #f1b434;
  --alert-accent: #e65100;
  
  /* Neons & Interactive Highlights */
  --neon-green: #f1b434;
  --neon-volt: #f59e0b;
  --neon-cyan: #38bdf8;
  --neon-pink: #e65100;
  --neon-gold: #f1b434;
  --neon-amber: #f59e0b;
  --neon-crimson: #ef4444;
  
  /* Text */
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  
  /* Typography */
  --font-tactical: 'Chakra Petch', sans-serif;
  --font-mono: 'Space Mono', monospace;
  --font-body: 'Inter', sans-serif;
  
  /* Transitions */
  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  user-select: none;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: var(--font-body);
  overflow-x: hidden;
  overflow-y: auto;
  min-height: 100vh;
  width: 100%;
  background-image: radial-gradient(circle at 50% 15%, #0e1726 0%, var(--bg-dark) 75%);
}

/* Glassmorphism Panel base */
.glass-panel {
  background: var(--bg-panel);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  transition: var(--transition);
}

.glass-panel:hover {
  border-color: rgba(0, 240, 255, 0.3);
}

/* Main Frame Layout */
#game-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  height: auto;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0;
  padding-bottom: 74px; /* clearance for bottom dock */
  gap: 8px;
  overflow-x: hidden;
}

/* HEADER STYLE - PINNED 48PX TOP APP BAR */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 12px;
  height: 48px;
  min-height: 48px;
  max-height: 48px;
  overflow: visible;
  position: sticky;
  top: 0;
  z-index: 999;
  background: rgba(10, 16, 32, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  border-radius: 0 0 8px 8px;
}

.header-dual-ic-telemetry {
  pointer-events: none !important;
  user-select: none;
}

.logo-box {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.neon-title {
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 0.92rem;
  letter-spacing: 0.5px;
  color: #fff;
  text-shadow: 0 0 5px rgba(0, 240, 255, 0.5), 0 0 15px var(--neon-cyan);
  white-space: nowrap;
}

.sub-logo {
  display: none;
}

.header-status {
  display: flex;
  gap: 8px;
  align-items: center;
}

/* System Dropdown Drawer */
.system-dropdown {
  position: fixed;
  top: 52px;
  right: 12px;
  width: 280px;
  max-width: calc(100vw - 24px);
  background: rgba(10, 16, 32, 0.98);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--neon-cyan);
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.8), 0 0 15px rgba(0, 240, 255, 0.25);
  padding: 12px;
  z-index: 10001;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.system-dropdown.hidden {
  display: none !important;
}

.system-menu-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: 'Outfit', sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--neon-cyan);
  letter-spacing: 1px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  padding-bottom: 6px;
}

.system-telemetry-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
}

.system-actions-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.clock-hud {
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  background: rgba(0, 240, 255, 0.1);
  border: 1px solid var(--border-color);
  padding: 4px 10px;
  border-radius: 20px;
  color: var(--neon-cyan);
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.1) inset;
  font-size: 0.75rem;
  white-space: nowrap;
}

.tick-hud {
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 4px 10px;
  border-radius: 20px;
  color: var(--text-main);
  font-size: 0.75rem;
  white-space: nowrap;
}

/* 4-Tab Navigation Containers */
.game-main {
  display: block;
  width: 100%;
  padding: 6px 10px;
  margin: 0;
  flex: 1;
}

.tab-content {
  display: none;
  width: 100%;
  animation: tabFadeIn 0.2s ease-in-out;
}

.tab-content.active {
  display: block;
}

@keyframes tabFadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Pinned Bottom Dock Navigation Bar */
.bottom-dock {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  z-index: 1000;
  display: flex;
  justify-content: space-around;
  align-items: center;
  background: rgba(10, 15, 28, 0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--border-color);
  padding: 0 4px;
  padding-bottom: env(safe-area-inset-bottom, 0);
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.5);
}

.dock-tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px 0;
  transition: all 0.2s ease;
  font-family: 'Outfit', sans-serif;
  gap: 2px;
}

.dock-tab:hover {
  color: #fff;
}

.dock-tab.active {
  color: var(--neon-cyan);
  text-shadow: 0 0 10px rgba(0, 240, 255, 0.4);
}

.dock-tab.active .dock-icon {
  transform: translateY(-2px) scale(1.1);
}

.dock-icon {
  font-size: 1.25rem;
  transition: transform 0.2s ease;
}

.dock-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

/* ============================================================================
   Phase 12.3: Asymmetric Platform Roles & Desktop Command Center Layout
   ============================================================================ */

/* Desktop Command Mainframe (screens >= 1024px and non-touch) */
body.role-command-desktop #game-container {
  max-width: 1920px;
  padding-bottom: 20px; /* No bottom dock clearance needed on desktop */
}

body.role-command-desktop .bottom-dock {
  display: none !important;
}

body.role-command-desktop .game-main,
body.role-command-desktop #main-content {
  display: grid !important;
  grid-template-columns: 340px 1fr 380px !important;
  grid-template-areas: "left center right" !important;
  gap: 16px;
  padding: 12px 16px;
  max-width: 1920px;
  margin: 0 auto;
  align-items: start;
}

body.role-command-desktop #pane-left {
  grid-area: left;
  display: flex !important;
  flex-direction: column;
  gap: 12px;
}

body.role-command-desktop #pane-center {
  grid-area: center;
  display: flex !important;
  flex-direction: column;
  gap: 12px;
}

body.role-command-desktop #pane-right {
  grid-area: right;
  display: flex !important;
  flex-direction: column;
  gap: 12px;
}

body.role-command-desktop #map-viewport {
  height: clamp(380px, 60vh, 540px) !important;
  min-height: 380px;
}

/* Mobile Field Operative Mode (< 1024px) */
@media (max-width: 1023px) {
  body.role-field-operative .game-main,
  body.role-field-operative #main-content {
    display: block !important;
    padding: 8px 10px;
  }

  body.role-field-operative .bottom-dock {
    display: flex !important;
  }
}

/* High-Density Status Cards & Bloomberg-Style Micro Tables */
.command-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.72rem;
  font-family: 'Inter', sans-serif;
  margin-top: 6px;
}

.command-table th {
  text-align: left;
  color: var(--text-muted);
  font-weight: 600;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: 4px 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.command-table td {
  padding: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: #fff;
}

.command-table tr:hover td {
  background: rgba(0, 240, 255, 0.04);
}

.command-status-pill {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.pill-active {
  background: rgba(16, 185, 129, 0.2);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.pill-pending {
  background: rgba(245, 158, 11, 0.2);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.pill-locked {
  background: rgba(255, 71, 87, 0.2);
  color: #ff4757;
  border: 1px solid rgba(255, 71, 87, 0.4);
}

.dispatch-route-visual {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(0, 20, 35, 0.6);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 8px 12px;
  margin: 8px 0;
  font-family: monospace;
  font-size: 0.72rem;
}

.dispatch-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.dispatch-node-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(0, 240, 255, 0.15);
  border: 1px solid var(--neon-cyan);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--neon-cyan);
  font-weight: bold;
}

.dispatch-connector {
  flex: 1;
  height: 2px;
  background: linear-gradient(90deg, var(--neon-cyan), var(--neon-green));
  margin: 0 6px;
  position: relative;
  overflow: hidden;
}

@media (max-width: 600px) {
  header {
    padding: 0 8px;
  }
  .neon-title {
    font-size: 1rem !important;
  }
  #dual-asset-banner {
    font-size: 0.7rem !important;
    padding: 3px 6px !important;
  }
  .game-main {
    padding: 4px 6px;
  }
}

/* BUTTONS */
.btn {
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: var(--transition);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-main);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.3);
}

.btn-primary {
  background: var(--neon-cyan);
  color: #000;
  box-shadow: 0 0 15px rgba(0, 240, 255, 0.3);
}

.btn-primary:hover {
  background: #fff;
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
  transform: translateY(-1px);
}

.btn-action {
  background: rgba(13, 20, 38, 0.8);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 10px;
  text-align: center;
  border-radius: 8px;
}

.btn-action:hover {
  border-color: var(--neon-cyan);
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.2);
}

.btn-block {
  display: block;
  width: 100%;
}

.btn-sm {
  padding: 4px 10px;
  font-size: 0.8rem;
}

/* MAIN TABBED LAYOUT */
.game-main {
  display: block;
  width: 100%;
  padding: 8px 12px;
  flex: 1;
  min-height: calc(100vh - 124px);
  height: auto;
}

/* HEADERS */
.panel-header {
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-main);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 8px;
  margin-bottom: 12px;
}

.panel-sub-header {
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--neon-cyan);
  margin-top: 16px;
  margin-bottom: 8px;
}

/* LEFT COLUMN: CHARACTER SHEET */
.left-col {
  padding: 16px;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.character-identity {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.char-avatar {
  background: linear-gradient(135deg, var(--neon-cyan), #0055ff);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  color: #000;
  font-size: 1.3rem;
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.4);
}

.char-name {
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 1rem;
}

.char-lvl {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* METERS */
.meters-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}

.meter-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.meter-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.meter-track {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  height: 12px;
  border-radius: 6px;
  overflow: hidden;
}

.meter-fill {
  height: 100%;
  transition: width 0.4s ease;
}

.hp-track .meter-fill {
  background: linear-gradient(90deg, #ff0055, var(--neon-pink));
  box-shadow: 0 0 10px var(--neon-pink);
}

.xp-track .meter-fill {
  background: linear-gradient(90deg, #00bbff, var(--neon-cyan));
  box-shadow: 0 0 10px var(--neon-cyan);
}

/* STATS */
.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.stat-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 8px;
  text-align: center;
}

.stat-score {
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--neon-cyan);
}

.stat-name {
  font-size: 0.65rem;
  color: var(--text-muted);
  text-transform: uppercase;
}

/* LEVELUP */
.levelup-prompt {
  background: rgba(57, 255, 20, 0.08);
  border: 1px solid var(--neon-green);
  border-radius: 8px;
  padding: 10px;
  margin-top: 12px;
  text-align: center;
  animation: pulse-border 1.5s infinite alternate;
}

@keyframes pulse-border {
  from { border-color: rgba(57, 255, 20, 0.4); }
  to { border-color: var(--neon-green); }
}

.levelup-title {
  font-size: 0.8rem;
  color: var(--neon-green);
  font-weight: 600;
  margin-bottom: 8px;
}

.levelup-btns {
  display: flex;
  gap: 6px;
  justify-content: center;
}

/* NEEDS BARS */
.needs-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.need-row {
  display: flex;
  align-items: center;
  font-size: 0.8rem;
}

.need-name {
  width: 55px;
  color: var(--text-muted);
}

.need-bar-track {
  flex: 1;
  background: rgba(255, 255, 255, 0.05);
  height: 8px;
  border-radius: 4px;
  margin: 0 10px;
  overflow: hidden;
}

.need-bar-fill {
  height: 100%;
  transition: width 0.3s ease;
}

.hunger-fill { background: #ff5e00; }
.energy-fill { background: #ffdd00; }
.social-fill { background: #00e1ff; }

.need-val {
  width: 35px;
  text-align: right;
  font-weight: 600;
}

/* GEAR & BAG */
.gear-sheet {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.gear-item {
  display: flex;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 0.8rem;
}

.gear-slot {
  color: var(--text-muted);
}

.gear-name {
  color: var(--neon-cyan);
  font-weight: 600;
}

.economy-strip {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  margin-bottom: 6px;
}

.gold-wallet {
  color: var(--neon-orange);
  font-weight: 600;
}

.backpack-box {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  flex: 1;
  min-height: 100px;
  overflow-y: auto;
}

.bag-slot {
  background: rgba(255, 255, 255, 0.03);
  border: 1px dashed rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  aspect-ratio: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.2rem;
  cursor: pointer;
  position: relative;
  transition: var(--transition);
}

.bag-slot:hover {
  border-color: var(--neon-cyan);
  background: rgba(0, 240, 255, 0.05);
  transform: scale(1.05);
}

.bag-slot.occupied {
  border-style: solid;
  border-color: rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.05);
}

.slot-tooltip {
  visibility: hidden;
  position: absolute;
  bottom: 110%;
  left: 50%;
  transform: translateX(-50%);
  background: #0d1226;
  border: 1px solid var(--neon-cyan);
  border-radius: 4px;
  padding: 4px 8px;
  font-size: 0.65rem;
  white-space: nowrap;
  z-index: 100;
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.3);
}

.bag-slot:hover .slot-tooltip {
  visibility: visible;
}

/* CENTER COLUMN: MAP */
.center-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
}

.map-view-card {
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.world-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  width: 100%;
  max-width: 440px;
  aspect-ratio: 1;
  margin: 12px 0;
}

.map-cell {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
  transition: var(--transition);
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
}

.map-cell.current-pos {
  border-color: var(--neon-cyan);
  box-shadow: 0 0 15px rgba(0, 240, 255, 0.4);
  animation: pulse-glow 1.5s infinite alternate;
}

.cell-bg-lbl {
  font-size: 1.5rem;
  opacity: 0.15;
}

.cell-marker {
  position: absolute;
  font-size: 1.1rem;
  z-index: 10;
  filter: drop-shadow(0 0 4px #000);
}

@keyframes pulse-glow {
  from { box-shadow: 0 0 5px rgba(0, 240, 255, 0.2); }
  to { box-shadow: 0 0 20px rgba(0, 240, 255, 0.6); }
}

.zone-c { color: var(--neon-cyan); }
.zone-s { color: var(--neon-green); }
.zone-i { color: var(--neon-orange); }
.zone-p { color: #f0f; }
.zone-w { color: var(--neon-pink); }

.grid-legend {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.legend-dot {
  font-weight: 800;
}

/* NPC CARD */
.npc-action-card {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-color: var(--neon-green);
  box-shadow: 0 0 15px rgba(57, 255, 20, 0.1) inset;
}

.npc-meta {
  display: flex;
  gap: 12px;
  align-items: center;
}

.npc-avatar {
  font-size: 1.8rem;
  background: rgba(57, 255, 20, 0.1);
  padding: 6px;
  border-radius: 8px;
  border: 1px solid rgba(57, 255, 20, 0.2);
}

.npc-name {
  font-weight: 600;
  font-family: 'Outfit', sans-serif;
}

.npc-type {
  font-size: 0.75rem;
  color: var(--neon-green);
}

.npc-bubble {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-style: italic;
  line-height: 1.3;
}

/* CONTROLS CARD */
.controls-card {
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: 20px;
  flex-wrap: wrap;
}

.compass-pad {
  position: relative;
  width: 140px;
  height: 140px;
}

.compass-btn {
  position: absolute;
  background: rgba(13, 20, 38, 0.8);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 1.1rem;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  transition: var(--transition);
}

.compass-btn:hover {
  background: var(--neon-cyan);
  color: #000;
  border-color: #fff;
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.4);
}

.compass-n { top: 0; left: 48px; }
.compass-s { bottom: 0; left: 48px; }
.compass-w { left: 0; top: 48px; }
.compass-e { right: 0; top: 48px; }

.compass-center {
  position: absolute;
  top: 48px;
  left: 48px;
  width: 44px;
  height: 44px;
  background: rgba(0, 240, 255, 0.05);
  border: 1px dashed rgba(0, 240, 255, 0.2);
  border-radius: 50%;
}

.action-buttons-box {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 180px;
  flex: 1;
}

/* RIGHT COLUMN: TERMINAL LOG */
.right-col {
  padding: 16px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.narrative-screen {
  flex: 1;
  background: #03050b;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  padding: 10px;
  font-family: monospace;
  font-size: 0.75rem;
  line-height: 1.4;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.log-line {
  border-left: 2px solid rgba(255, 255, 255, 0.1);
  padding-left: 6px;
}

.travel-line { border-color: var(--neon-cyan); color: #c4f3ff; }
.combat-line { border-color: var(--neon-pink); color: #ffd6e8; }
.quest-line { border-color: var(--neon-orange); color: #ffe8d6; }
.save-line { border-color: var(--neon-green); color: #d6ffd6; }
.system-line { border-color: var(--text-muted); color: var(--text-muted); }

/* MODALS */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 20px 12px;
  z-index: 1000;
  backdrop-filter: blur(4px);
  overflow-y: auto;
}

.modal-content {
  width: 90%;
  max-width: 500px;
  max-height: 90vh;
  padding: 20px;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 10px;
  margin-bottom: 15px;
}

.close-btn {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-muted);
  cursor: pointer;
}

.close-btn:hover {
  color: #fff;
}

.modal-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

/* SHOP LIST */
.shop-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.shop-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  padding: 10px 14px;
}

.shop-details {
  display: flex;
  flex-direction: column;
}

.shop-name {
  font-weight: 600;
  font-size: 0.9rem;
}

.shop-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.shop-buy-action {
  display: flex;
  align-items: center;
  gap: 12px;
}

.shop-price {
  color: var(--neon-orange);
  font-weight: 600;
  font-size: 0.9rem;
}

/* JOBS LIST */
.jobs-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.job-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  padding: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.job-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.job-title {
  font-weight: 600;
  font-size: 0.95rem;
}

.job-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.job-rewards {
  font-size: 0.75rem;
  color: var(--neon-cyan);
}

.job-status-lbl {
  font-size: 0.7rem;
  padding: 3px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  font-weight: 600;
}

.job-status-avail { background: rgba(0, 240, 255, 0.1); color: var(--neon-cyan); }
.job-status-active { background: rgba(255, 159, 0, 0.1); color: var(--neon-orange); }
.job-status-comp { background: rgba(57, 255, 20, 0.1); color: var(--neon-green); }

/* COMBAT MODAL SPECIALS */
.combat-modal-content {
  width: 90%;
  max-width: 550px;
  border-color: var(--neon-pink);
  box-shadow: 0 0 30px rgba(255, 0, 127, 0.15);
  padding: 24px;
}

.combat-header h2 {
  font-family: 'Outfit', sans-serif;
  color: var(--neon-pink);
  text-shadow: 0 0 10px rgba(255, 0, 127, 0.4);
  text-align: center;
  letter-spacing: 2px;
}

.combat-vs-box {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 20px 0;
  gap: 15px;
}

.combat-side {
  flex: 1;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  padding: 12px;
  text-align: center;
}

.combat-side-name {
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 1.1rem;
  margin-bottom: 8px;
}

.combat-stat-bar {
  background: rgba(255, 255, 255, 0.05);
  height: 8px;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 6px;
}

.combat-hp-fill {
  background: var(--neon-pink);
  height: 100%;
  transition: width 0.3s ease;
}

.combat-vs-divider {
  font-family: 'Outfit', sans-serif;
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--neon-pink);
  text-shadow: 0 0 5px var(--neon-pink);
}

.combat-text-screen {
  background: #03050a;
  border: 1px solid rgba(255, 0, 127, 0.15);
  border-radius: 8px;
  height: 150px;
  padding: 10px;
  font-family: monospace;
  font-size: 0.75rem;
  line-height: 1.4;
  overflow-y: auto;
  margin-bottom: 15px;
}

.combat-log-line {
  margin-bottom: 6px;
  border-left: 2px solid var(--neon-pink);
  padding-left: 6px;
  color: #ffe6f0;
}

.combat-buttons {
  display: flex;
  gap: 10px;
}

.combat-buttons .btn {
  flex: 1;
}

/* HELP BODY */
.help-body h3 {
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  margin-top: 12px;
  margin-bottom: 4px;
  color: var(--neon-cyan);
}

.help-body p {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin-bottom: 8px;
}

.help-body ul {
  font-size: 0.8rem;
  color: var(--text-muted);
  padding-left: 16px;
  margin-bottom: 8px;
}

/* UTILS */
.hidden {
  display: none !important;
}

/* RESPONSIVE LAYOUT CARDS */
@media (max-width: 1000px) {
  .game-main {
    grid-template-columns: 1fr;
    height: auto;
    min-height: auto;
  }
  
  .left-col, .right-col {
    max-height: none;
  }
}

/* GPS HUD STYLINGS */
.gps-info-hud {
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 0.75rem;
  color: var(--neon-cyan);
  background: rgba(0, 240, 255, 0.05);
  border: 1px solid var(--border-color);
  padding: 6px 12px;
  border-radius: 6px;
  width: 100%;
  text-align: center;
  margin-bottom: 10px;
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.05) inset;
  letter-spacing: 0.5px;
}

/* MULTIPLAYER LOBBY STYLINGS */
.lobby-player-entry {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  padding: 4px 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.lobby-player-entry:last-child {
  border-bottom: none;
}

.lobby-coord {
  font-family: monospace;
  color: var(--neon-cyan);
  font-weight: 600;
}

/* ================= AR HUD & RADAR SCANNER STYLINGS ================= */

/* Radar sweep rotation */
.ar-radar-container {
  box-shadow: 0 0 15px rgba(0, 255, 100, 0.3);
}

.ar-radar-sweep {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: conic-gradient(from 0deg, rgba(0, 255, 100, 0.15) 0deg, rgba(0, 255, 100, 0) 90deg);
  border-radius: 50%;
  animation: radar-sweep-spin 3s linear infinite;
  pointer-events: none;
}

@keyframes radar-sweep-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Sonar radar blip */
.ar-blip {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 8px currentColor;
}

/* Floating HUD cards */
.ar-hologram-card {
  position: absolute;
  transform: translate(-50%, -50%);
  background: rgba(13, 19, 38, 0.85);
  border: 1px solid var(--neon-cyan);
  border-radius: 8px;
  padding: 10px;
  min-width: 130px;
  color: #fff;
  font-family: inherit;
  font-size: 0.75rem;
  box-shadow: 0 0 15px rgba(0, 240, 255, 0.25);
  pointer-events: auto;
  transition: opacity 0.1s ease-out, transform 0.1s ease-out;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ar-hologram-card.targeted {
  border-color: var(--neon-green);
  box-shadow: 0 0 20px rgba(0, 255, 100, 0.5);
  transform: translate(-50%, -50%) scale(1.08);
}

/* LEAFLET DARK MAP CUSTOM STYLES */
#leaflet-canvas {
  width: 100%;
  height: 100%;
  background: #0b0f19 !important;
}

.leaflet-container {
  background: #0b0f19 !important;
  font-family: 'Inter', sans-serif !important;
}

.leaflet-tile {
  filter: none !important;
}

.leaflet-popup-content-wrapper {
  background: rgba(13, 20, 38, 0.9) !important;
  color: var(--text-main) !important;
  border: 1px solid var(--neon-cyan) !important;
  box-shadow: 0 0 15px rgba(0, 240, 255, 0.3) !important;
  border-radius: 8px !important;
}

.leaflet-popup-tip {
  background: rgba(13, 20, 38, 0.9) !important;
  border: 1px solid var(--neon-cyan) !important;
}

.landmark-marker {
  cursor: pointer;
  transition: transform 0.2s ease;
}

.landmark-marker:hover {
  transform: scale(1.1);
}

/* ==========================================================================
   PHASE 8: CRT SCANLINES, SETTINGS DRAWER, SYNDICATE TURF & SKILL TREES
   ========================================================================== */

/* GPU-Accelerated Pure CSS CRT Scanline & Vignette Overlay */
#crt-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 99999;
  mix-blend-mode: overlay;
  background: 
    linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.4) 50%),
    radial-gradient(ellipse at center, rgba(0, 0, 0, 0) 55%, rgba(0, 0, 0, 0.75) 100%);
  background-size: 100% 4px, 100% 100%;
  opacity: 0.85;
  transition: opacity 0.25s ease;
}

#crt-overlay.crt-off {
  display: none !important;
  opacity: 0 !important;
}

body.crt-active h1, 
body.crt-active h2, 
body.crt-active h3,
body.crt-active .stat-val {
  text-shadow: 0 0 4px rgba(0, 240, 255, 0.6);
}

/* Settings Slide-Over Drawer */
.settings-drawer-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 10000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.settings-drawer-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.settings-drawer {
  position: fixed;
  top: 0;
  right: -340px;
  width: 320px;
  max-width: 85vw;
  height: 100%;
  background: #0d1326;
  border-left: 2px solid var(--neon-cyan);
  box-shadow: -10px 0 30px rgba(0, 240, 255, 0.2);
  z-index: 10001;
  transition: right 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 24px 20px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 18px;
  overflow-y: auto;
}

.settings-drawer.open {
  right: 0;
}

.settings-drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(0, 240, 255, 0.2);
  padding-bottom: 12px;
}

.settings-drawer-header h3 {
  margin: 0;
  font-size: 1.15rem;
  color: var(--neon-cyan);
  letter-spacing: 1px;
}

.btn-drawer-close {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  border-radius: 4px;
  width: 32px;
  height: 32px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.settings-group {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.03);
  padding: 12px 14px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.setting-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.setting-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: #fff;
}

.setting-desc {
  font-size: 0.72rem;
  color: #8fa0b5;
}

/* Cyberpunk Toggle Switch */
.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #1e293b;
  transition: .25s;
  border-radius: 24px;
  border: 1px solid rgba(0, 240, 255, 0.3);
}

.slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 3px;
  background-color: #94a3b8;
  transition: .25s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: rgba(0, 240, 255, 0.3);
  border-color: var(--neon-cyan);
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.4);
}

input:checked + .slider:before {
  transform: translateX(20px);
  background-color: var(--neon-cyan);
}

/* Syndicate & Skill Buttons in Header */
.header-action-btn {
  background: rgba(13, 20, 38, 0.8);
  border: 1px solid var(--neon-cyan);
  color: var(--neon-cyan);
  padding: 6px 12px;
  border-radius: 4px;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}

.header-action-btn:hover {
  background: var(--neon-cyan);
  color: #0b0f19;
  box-shadow: 0 0 12px rgba(0, 240, 255, 0.4);
}

/* Syndicate Turf Modal Styling */
.syndicate-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 10px;
}

.syndicate-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: all 0.2s ease;
}

.syndicate-card.omlf {
  border-left: 4px solid #00ffcc;
}

.syndicate-card.apex {
  border-left: 4px solid #ffd700;
}

.syndicate-card.gigx {
  border-left: 4px solid #ff007f;
}

.syndicate-card.pledged {
  background: rgba(0, 240, 255, 0.08);
  border-color: var(--neon-cyan);
  box-shadow: 0 0 15px rgba(0, 240, 255, 0.2);
}

.syndicate-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.syndicate-name {
  font-size: 0.95rem;
  font-weight: 700;
}

.omlf-color { color: #00ffcc; }
.apex-color { color: #ffd700; }
.gigx-color { color: #ff007f; }

.syndicate-tagline {
  font-size: 0.75rem;
  color: #94a3b8;
  font-style: italic;
}

.syndicate-perk-badge {
  font-size: 0.72rem;
  background: rgba(0, 0, 0, 0.4);
  padding: 4px 8px;
  border-radius: 4px;
  color: #cbd5e1;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

/* Influence Bar */
.influence-bar-wrap {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 8px;
}

.influence-bar-track {
  height: 8px;
  width: 100%;
  background: #1e293b;
  border-radius: 4px;
  overflow: hidden;
  display: flex;
}

.influence-segment {
  height: 100%;
  transition: width 0.3s ease;
}

.influence-segment.omlf { background: #00ffcc; }
.influence-segment.apex { background: #ffd700; }
.influence-segment.gigx { background: #ff007f; }

/* Skill Tree Modal Styling */
.skills-trees-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-height: 60vh;
  overflow-y: auto;
  padding-right: 6px;
}

.skill-branch {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.skill-branch-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--neon-cyan);
  border-bottom: 1px solid rgba(0, 240, 255, 0.2);
  padding-bottom: 6px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.skills-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.skill-card {
  background: rgba(13, 20, 38, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: all 0.2s ease;
}

.skill-card.unlocked {
  border-color: #00ffcc;
  background: rgba(0, 255, 204, 0.08);
}

.skill-card.available {
  border-color: #ffd700;
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.15);
}

.skill-card.locked {
  opacity: 0.55;
}

.skill-top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.skill-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: #fff;
}

.skill-tier-badge {
  font-size: 0.68rem;
  padding: 2px 6px;
  border-radius: 3px;
  background: #1e293b;
  color: #94a3b8;
}

.skill-desc {
  font-size: 0.72rem;
  color: #94a3b8;
  line-height: 1.3;
}

.btn-unlock-skill {
  align-self: flex-start;
  margin-top: 4px;
  background: transparent;
  border: 1px solid #ffd700;
  color: #ffd700;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-unlock-skill:hover {
  background: #ffd700;
  color: #0b0f19;
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.4);
}

/* Phase 12.5: Map Viewport Floating Overlays & Proximity Action Pills */
.map-pill-ar {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 500;
  font-size: 0.72rem;
  padding: 5px 12px;
  background: rgba(14, 18, 28, 0.85);
  backdrop-filter: blur(8px);
  border: 1px solid var(--neon-cyan);
  color: var(--neon-cyan);
  border-radius: 20px;
  font-weight: 600;
  box-shadow: 0 2px 10px rgba(0, 240, 255, 0.25);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s ease;
}

.map-pill-ar:hover {
  background: rgba(0, 240, 255, 0.2);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(0, 240, 255, 0.4);
}

#btn-chad-proximity {
  position: absolute;
  bottom: 12px;
  left: 12px;
  z-index: 1000;
  font-size: 0.75rem;
  padding: 7px 15px;
  background: rgba(14, 18, 28, 0.92);
  backdrop-filter: blur(8px);
  border: 1px solid var(--neon-cyan);
  color: #fff;
  border-radius: 20px;
  font-weight: 600;
  box-shadow: 0 0 16px rgba(0, 240, 255, 0.45);
  cursor: pointer;
  display: none;
  align-items: center;
  gap: 6px;
  animation: chadPillPulse 2.5s infinite;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

#btn-chad-proximity:hover {
  background: rgba(0, 240, 255, 0.25);
  box-shadow: 0 0 22px rgba(0, 240, 255, 0.65);
  transform: scale(1.03);
}

@keyframes chadPillPulse {
  0% {
    box-shadow: 0 0 8px rgba(0, 240, 255, 0.3);
    border-color: rgba(0, 240, 255, 0.6);
  }
  50% {
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.65);
    border-color: var(--neon-cyan);
  }
  100% {
    box-shadow: 0 0 8px rgba(0, 240, 255, 0.3);
    border-color: rgba(0, 240, 255, 0.6);
  }
}

/* Phase 12.6: Full-Bleed Map Viewport & Tactical Map Controls */
body.role-field-operative #game-container {
  padding-bottom: 60px !important;
  gap: 0 !important;
}

body.role-field-operative:has(#tab-content-map.active) #game-container {
  height: 100dvh !important;
  min-height: 100dvh !important;
  max-height: 100dvh !important;
  overflow: hidden !important;
}

body.role-field-operative:has(#tab-content-map.active) #main-content {
  padding: 0 !important;
  margin: 0 !important;
  height: calc(100dvh - 48px - 60px) !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
}

body.role-field-operative #pane-center {
  padding: 0 !important;
  margin: 0 !important;
  height: 100% !important;
}

body.role-field-operative #tab-content-map {
  height: 100% !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
  position: relative !important;
  margin: 0 !important;
  padding: 0 !important;
}

body.role-field-operative .full-bleed-map {
  padding: 0 !important;
  margin: 0 !important;
  border-radius: 0 !important;
  border: none !important;
}

body.role-field-operative .map-viewport-fullbleed {
  flex: 1 1 auto !important;
  height: 100% !important;
  min-height: 0 !important;
  max-height: none !important;
  border-radius: 0 !important;
  border: none !important;
}

/* Streamlined Minimal Single-Row Tactical Telemetry Ticker */
.map-telemetry-ticker {
  height: 26px;
  line-height: 26px;
  width: 100%;
  max-width: 100%;
  padding: 0 10px;
  background: rgba(6, 10, 20, 0.94);
  border-bottom: 1px solid rgba(0, 240, 255, 0.25);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.68rem;
  font-family: var(--font-mono);
  white-space: nowrap;
  z-index: 100;
  position: relative;
  box-sizing: border-box;
  flex-shrink: 0;
  overflow: hidden;
}

.telemetry-ticker-left {
  color: var(--neon-green);
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
  margin-right: 8px;
}

.telemetry-ticker-right {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.telemetry-hex-pill {
  font-size: 0.64rem;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(0, 240, 255, 0.1);
  color: var(--neon-cyan);
  border: 1px solid var(--border-color);
  font-weight: bold;
}

/* Floating Edge Controls */
.map-floating-top-right {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 500;
  display: flex;
  gap: 6px;
  align-items: center;
}

.map-pill-btn {
  font-size: 0.7rem;
  padding: 5px 11px;
  background: rgba(14, 18, 28, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--neon-cyan);
  color: var(--neon-cyan);
  border-radius: 20px;
  font-weight: 600;
  box-shadow: 0 2px 10px rgba(0, 240, 255, 0.25);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s ease;
}

.map-pill-btn:hover, .map-pill-btn:active {
  background: rgba(0, 240, 255, 0.22);
  color: #fff;
  transform: translateY(-1px);
}

/* Collapsible Bottom Navigation Drawer / District Sheet */
.district-bottom-sheet {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 950;
  background: rgba(10, 15, 26, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1.5px solid var(--neon-cyan);
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.7), 0 0 15px rgba(0, 240, 255, 0.2);
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

.district-bottom-sheet.collapsed .district-drawer-content {
  display: none;
}

.district-drawer-peek {
  height: 36px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  user-select: none;
  background: rgba(14, 22, 38, 0.92);
}

.district-drawer-peek:hover {
  background: rgba(20, 32, 54, 0.95);
}

.drawer-peek-left {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  color: #fff;
  min-width: 0;
  overflow: hidden;
}

.drawer-peek-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #fff;
}

.drawer-peek-right {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.7rem;
  font-family: var(--font-mono);
  color: var(--neon-cyan);
  font-weight: bold;
  flex-shrink: 0;
}

.drawer-chevron {
  font-size: 0.65rem;
  color: var(--neon-cyan);
  transition: transform 0.25s ease;
  margin-left: 4px;
}

.district-bottom-sheet:not(.collapsed) .drawer-chevron {
  transform: rotate(180deg);
}

.district-drawer-content {
  padding: 12px 14px 16px;
  border-top: 1px solid rgba(0, 240, 255, 0.15);
  animation: fadeIn 0.2s ease;
}

.drawer-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.drawer-title {
  font-family: var(--font-tactical);
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--neon-green);
  letter-spacing: 1px;
}

.drawer-hex {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: #94a3b8;
}

.drawer-corridor-box {
  height: 52px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(0, 255, 157, 0.25);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.corridor-icon-badge {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(0, 255, 157, 0.2);
  border: 1.5px solid var(--neon-green);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
}

.corridor-status-tag {
  position: absolute;
  bottom: 4px;
  right: 8px;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--neon-green);
  font-weight: bold;
}

.map-pill-mode .btn-mode {
  transition: all 0.2s ease;
}

.map-pill-mode .btn-mode.active {
  background: var(--neon-cyan) !important;
  color: #000 !important;
}

.map-pill-comms:hover {
  background: rgba(0, 240, 255, 0.25) !important;
  transform: translateY(-1px);
  box-shadow: 0 0 18px rgba(0, 240, 255, 0.6) !important;
}

@keyframes pulseGlow {
  0% { transform: scale(1); filter: drop-shadow(0 0 2px var(--neon-cyan)); }
  50% { transform: scale(1.2); filter: drop-shadow(0 0 8px var(--neon-cyan)); }
  100% { transform: scale(1); filter: drop-shadow(0 0 2px var(--neon-cyan)); }
}

/* AudioHandler Comms Transcript Toast */
#comms-transcript-toast {
  position: fixed;
  top: 60px;
  left: 50%;
  transform: translateX(-50%) translateY(-30px);
  max-width: 90vw;
  width: 380px;
  background: rgba(10, 15, 28, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--neon-cyan);
  border-radius: 8px;
  padding: 10px 14px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.6), 0 0 15px rgba(0, 240, 255, 0.3);
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: 'Inter', sans-serif;
}

#comms-transcript-toast.active {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  pointer-events: auto;
}

#comms-transcript-toast .comms-header {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  color: var(--neon-cyan);
  margin-bottom: 4px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

#comms-transcript-toast .comms-pulse {
  color: var(--neon-cyan);
  animation: pulseGlow 1.2s infinite;
}

#comms-transcript-toast .comms-body {
  font-size: 0.84rem;
  color: #fff;
  line-height: 1.35;
}

/* 3-Tier Storage Engine */
.inventory-tier-selector .btn {
  border-radius: 4px;
  transition: all 0.15s ease;
}

.inventory-tier-selector .btn.active {
  background: var(--neon-cyan) !important;
  color: #000 !important;
  font-weight: bold;
}

/* Avatar Portrait Tap & Auto-Crop Badge */
.avatar-edit-badge {
  pointer-events: none;
  transition: opacity 0.2s;
}

.char-avatar:hover .avatar-edit-badge {
  background: rgba(0, 240, 255, 0.8) !important;
  color: #000 !important;
  font-weight: bold;
}

/* City Shop Slide-Up Sheet Animation */
@keyframes slideUpSheet {
  from {
    transform: translateY(100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Portrait 9:16 Responsiveness for Setup & Chronicle Modals */
@media (max-aspect-ratio: 9/16), (max-width: 480px) {
  .new-chronicle-inputs {
    flex-direction: column !important;
  }
  .new-chronicle-inputs input,
  .new-chronicle-inputs select {
    width: 100% !important;
  }
}

/* Accordion Panel Polish */
.accordion-panel summary::-webkit-details-marker {
  display: none;
}

.accordion-panel summary {
  list-style: none;
  user-select: none;
}

/* Delivery Vector Acceptance Touch & Click States */
.btn-accept-vector {
  touch-action: manipulation;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-accept-vector:active {
  transform: scale(0.96);
}

/* Gatekeeping: Strip Desktop Drafting Controls on Mobile */
body.role-field-operative .desktop-only-pane,
body.role-field-operative .desktop-only-controls {
  display: none !important;
}

body.role-command-desktop .mobile-only-controls {
  display: none !important;
}

/* Floating Map Odometer & Live Session Telemetry */
.map-pill-odometer {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 500;
  font-size: 0.65rem;
  padding: 4px 8px;
  background: rgba(14, 18, 28, 0.92);
  backdrop-filter: blur(8px);
  border: 1px solid var(--neon-cyan);
  color: #fff;
  border-radius: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 5px;
  box-shadow: 0 2px 8px rgba(0, 240, 255, 0.2);
  pointer-events: none;
  white-space: nowrap;
}

/* Field Diagnostics Block (Tab 2) */
.field-diagnostics-card {
  background: rgba(0, 240, 255, 0.04);
  border: 1px solid rgba(0, 240, 255, 0.22);
  border-radius: 6px;
  padding: 8px 10px;
  margin-bottom: 12px;
}

/* ==========================================================================
   PHASE 12.9 MASTER FIELD DIRECTIVE: PROGRESS BARS, SETTINGS HUB, OVERFLOW
   ========================================================================== */

/* Visual Fill Bars for Survival Needs */
.need-bar-track {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
  overflow: hidden;
  margin-top: 2px;
}

.need-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.4s ease;
}

.hunger-fill {
  background: linear-gradient(90deg, #f59e0b, #fbbf24) !important;
}

.energy-fill {
  background: linear-gradient(90deg, #38bdf8, #7dd3fc) !important;
}

.rep-fill {
  background: linear-gradient(90deg, #10b981, #059669) !important;
}

/* Safe-Area Settings Button (Integrated Header Controls) */
.btn-settings-widget {
  position: static;
  top: auto;
  right: auto;
  z-index: 100;
  width: 36px;
  height: 36px;
  min-width: 36px;
  min-height: 36px;
  border-radius: 4px;
  background: rgba(14, 18, 28, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1.5px solid var(--neon-cyan);
  color: var(--neon-cyan);
  font-size: 1.05rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 0 12px rgba(0, 240, 255, 0.35);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  touch-action: manipulation;
  flex-shrink: 0;
}

.btn-settings-widget:hover {
  background: rgba(0, 240, 255, 0.2);
  transform: scale(1.08);
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.6);
}

.btn-settings-widget:active {
  transform: scale(0.95);
}

/* Operative Settings Hub Modal */
#modal-settings .modal-content {
  background: rgba(10, 15, 28, 0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--neon-cyan);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.7), 0 0 25px rgba(0, 240, 255, 0.25);
  border-radius: 12px;
  padding: 16px 20px;
}

.settings-actions-grid .btn {
  border-radius: 6px;
  transition: all 0.2s ease;
  touch-action: manipulation;
}

.settings-actions-grid .btn:hover {
  transform: translateY(-1px);
}

.settings-actions-grid .btn:active {
  transform: translateY(1px);
}

/* Reactive Balance Sync Animated Green Highlight */
@keyframes highlightGreen {
  0% {
    color: #fff;
    text-shadow: none;
    transform: scale(1);
  }
  30% {
    color: #10b981;
    text-shadow: 0 0 12px #10b981, 0 0 20px rgba(16, 185, 129, 0.7);
    transform: scale(1.15);
  }
  70% {
    color: #34d399;
    text-shadow: 0 0 8px #10b981;
    transform: scale(1.05);
  }
  100% {
    color: inherit;
    text-shadow: none;
    transform: scale(1);
  }
}

.highlight-updated {
  animation: highlightGreen 0.9s cubic-bezier(0.16, 1, 0.3, 1) !important;
  display: inline-block;
}

/* Mobile Dynamic Type & Viewport Vertical Overflow Tuning */
#pane-left,
#pane-right,
#tab-content-agent,
.tab-content.active {
  max-height: calc(100vh - env(safe-area-inset-bottom, 0px) - 64px);
  max-height: calc(100dvh - env(safe-area-inset-bottom, 0px) - 64px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.modal-header {
  padding-bottom: 6px;
  margin-bottom: 10px;
}

/* Phase 12.9.1: In-Range Lit-Up Node Visuals & Pulsing Radar Halo */
@keyframes nodeBeaconPulse {
  0% {
    box-shadow: 0 0 10px #00f0ff, 0 0 20px rgba(0, 240, 255, 0.6);
    transform: scale(1);
    filter: brightness(1);
  }
  50% {
    box-shadow: 0 0 25px #00f0ff, 0 0 45px rgba(57, 255, 20, 0.8), 0 0 65px rgba(0, 240, 255, 0.95);
    transform: scale(1.35);
    filter: brightness(1.5);
  }
  100% {
    box-shadow: 0 0 10px #00f0ff, 0 0 20px rgba(0, 240, 255, 0.6);
    transform: scale(1);
    filter: brightness(1);
  }
}

.poi-lit-up,
.poi-marker-in-range > div {
  animation: nodeBeaconPulse 1.2s infinite ease-in-out !important;
  border-color: #00f0ff !important;
  background: rgba(0, 240, 255, 0.45) !important;
  z-index: 1000 !important;
}

@keyframes radarCirclePulse {
  0% {
    stroke-opacity: 0.95;
    fill-opacity: 0.28;
    stroke-width: 3.5px;
  }
  50% {
    stroke-opacity: 0.4;
    fill-opacity: 0.08;
    stroke-width: 1.5px;
  }
  100% {
    stroke-opacity: 0.95;
    fill-opacity: 0.28;
    stroke-width: 3.5px;
  }
}

.leaflet-pulsing-proximity-circle {
  animation: radarCirclePulse 1.6s infinite ease-in-out;
}

/* ================= CORE FREEZE: CRT INTERCEPTOR & DIEGETIC CUT-INS ================= */
.crt-interceptor-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(5, 8, 15, 0.94);
  backdrop-filter: blur(8px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
}

.crt-interceptor-frame {
  width: 100%;
  max-width: 620px;
  background: #02070e;
  border: 2px solid #00f0ff;
  border-radius: 8px;
  box-shadow: 0 0 35px rgba(0, 240, 255, 0.35), inset 0 0 20px rgba(0, 240, 255, 0.15);
  position: relative;
  overflow: hidden;
  font-family: 'Courier New', monospace;
  color: #00f0ff;
}

/* Scanlines and phosphor flicker */
.crt-scanlines {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    rgba(0, 0, 0, 0.3) 0px,
    rgba(0, 0, 0, 0.3) 1px,
    transparent 1px,
    transparent 2px
  );
  z-index: 10;
  opacity: 0.75;
}

.crt-screen-content {
  padding: 24px;
  position: relative;
  z-index: 5;
}

.crt-glitch-header {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(0, 240, 255, 0.3);
  padding-bottom: 10px;
  margin-bottom: 16px;
  color: #38bdf8;
}

.crt-transcript-body {
  font-size: 0.95rem;
  line-height: 1.6;
  color: #e2e8f0;
  background: rgba(0, 240, 255, 0.04);
  border-left: 3px solid #00f0ff;
  padding: 14px 16px;
  margin-bottom: 20px;
  min-height: 70px;
}

/* ================= CORE FREEZE: WEATHER & ENCUMBRANCE HUD ================= */
.core-freeze-hud-strip {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 6px;
  margin-bottom: 8px;
}

.hud-pill {
  font-family: monospace;
  font-size: 0.72rem;
  padding: 3px 8px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.12);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.hud-pill-weather {
  border-color: rgba(56, 189, 248, 0.35);
  color: #38bdf8;
}

.hud-pill-encumbrance {
  border-color: rgba(245, 158, 11, 0.35);
  color: #f59e0b;
}

.hud-pill-archetype {
  border-color: rgba(168, 85, 247, 0.35);
  color: #c084fc;
}

/* ==========================================================================
   THE OPERATION: SCREENSHOT-AUTHENTIC FLOW UI SKIN
   Matches the 5 Master Mobile Screenshots:
   1. Onboarding / Role Selection (Industrial Bulkhead & 3 Bevelled Role Cards)
   2. Map View (Tactical Night Grid, Compass Rose, World Inset, POIs)
   3. Modal View (Wireframe Clinic, Segmented Danger Bars, INITIATE GIG)
   4. Dossier View (Human Silhouette, Equipment Loadout Grid, Circular Dials)
   5. Ops View (District Overview, Quick Sync, Contracts, Squad Code)
   ========================================================================== */

.flow-app-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: #000;
  color: #fff;
  font-family: 'Chakra Petch', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  z-index: 10000;
  overflow: hidden;
  user-select: none;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Mobile Frame Wrapper */
.flow-mobile-viewport {
  position: relative;
  width: 100%;
  max-width: 440px;
  height: 100%;
  max-height: 920px;
  background: #02070c;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 0 50px rgba(0, 245, 255, 0.15);
  border-left: 1px solid rgba(0, 245, 255, 0.15);
  border-right: 1px solid rgba(0, 245, 255, 0.15);
}

.flow-mobile-viewport * {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.flow-mobile-viewport *::-webkit-scrollbar {
  display: none;
}

@media (max-width: 480px) {
  .flow-mobile-viewport {
    max-width: 100vw;
    max-height: 100vh;
    border: none;
  }
}

/* 1. Header Bar */
.flow-header-hud {
  height: 58px;
  background: rgba(3, 10, 18, 0.95);
  border-bottom: 1px solid rgba(0, 245, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  z-index: 100;
  backdrop-filter: blur(8px);
  flex-shrink: 0;
}

.flow-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.flow-header-avatar-ring {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1.5px solid #00F5FF;
  overflow: hidden;
  box-shadow: 0 0 10px rgba(0, 245, 255, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  background: #05141e;
  cursor: pointer;
}

.flow-header-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.flow-header-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.5px;
  text-shadow: 0 0 12px rgba(0, 245, 255, 0.45);
}

.flow-header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.flow-header-credits {
  font-size: 0.88rem;
  font-weight: 700;
  color: #FFD700;
  display: flex;
  align-items: center;
  gap: 4px;
}

.flow-header-level {
  font-size: 0.88rem;
  color: #38bdf8;
  font-weight: 600;
  border-left: 1px solid rgba(255, 255, 255, 0.15);
  padding-left: 10px;
}

.flow-header-gear-btn {
  background: none;
  border: none;
  font-size: 1.1rem;
  color: #64748b;
  cursor: pointer;
  padding: 2px;
  transition: color 0.2s;
}

.flow-header-gear-btn:hover {
  color: #00F5FF;
}

/* 2. Bottom Navigation Bar */
.flow-bottom-tabbar {
  height: 64px;
  background: rgba(3, 8, 14, 0.98);
  border-top: 1px solid rgba(0, 245, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: space-around;
  z-index: 100;
  flex-shrink: 0;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

.flow-tab-btn {
  flex: 1;
  height: 100%;
  background: none;
  border: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: #64748b;
  cursor: pointer;
  position: relative;
  transition: all 0.2s;
  padding: 0;
}

.flow-tab-btn.active {
  color: #00FF41;
}

.flow-tab-glow-bar {
  position: absolute;
  top: 0;
  width: 44px;
  height: 3px;
  background: #00FF41;
  border-radius: 0 0 3px 3px;
  box-shadow: 0 0 12px #00FF41, 0 0 20px #00FF41;
  display: none;
}

.flow-tab-btn.active .flow-tab-glow-bar {
  display: block;
}

.flow-tab-icon {
  width: 22px;
  height: 22px;
  transition: transform 0.2s;
}

.flow-tab-btn.active .flow-tab-icon {
  filter: drop-shadow(0 0 8px #00FF41);
  transform: scale(1.08);
}

.flow-tab-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 1.5px;
}

/* 3. Screen Viewport */
.flow-screen-content {
  flex: 1;
  position: relative;
  overflow: hidden;
  background: #02070c;
}

/* ==========================================================================
   SCREEN 1: ONBOARDING / ROLE SELECTION GATE
   ========================================================================== */
.flow-onboarding-screen {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 24px 16px 20px 16px;
  box-sizing: border-box;
  z-index: 50;
  overflow-y: auto;
}

.flow-onboarding-top {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.flow-onboarding-logo {
  width: 76px;
  height: auto;
  filter: drop-shadow(0 0 15px rgba(255, 176, 0, 0.6));
  margin-bottom: 2px;
}

.flow-onboarding-sub {
  font-size: 0.65rem;
  letter-spacing: 2.5px;
  color: #FFB000;
  font-family: 'Space Mono', monospace;
  margin-bottom: 14px;
}

.flow-onboarding-heading {
  font-size: 1.22rem;
  font-weight: 800;
  color: #00FF41;
  letter-spacing: 1.2px;
  line-height: 1.35;
  text-shadow: 0 0 15px rgba(0, 255, 65, 0.6);
  margin-bottom: 14px;
  font-family: 'Space Mono', monospace;
}

.flow-onboarding-cards {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 14px;
}

.flow-role-card-item {
  width: 100%;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  border: 1.5px solid transparent;
  background: rgba(0, 0, 0, 0.65);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  position: relative;
}

.flow-role-card-item img {
  width: 100%;
  height: auto;
  display: block;
}

.flow-role-card-item:hover {
  transform: translateY(-2px);
}

.flow-role-card-item.selected {
  border-color: #00FF41;
  box-shadow: 0 0 25px rgba(0, 255, 65, 0.55);
}

.flow-role-card-item.selected::after {
  content: "ACTIVE SELECTION";
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(0, 255, 65, 0.9);
  color: #000;
  font-size: 0.55rem;
  font-weight: 800;
  font-family: 'Space Mono', monospace;
  padding: 2px 6px;
  border-radius: 2px;
  letter-spacing: 1px;
}

/* SMS Toggle Row */
.flow-sms-row {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 176, 0, 0.3);
  border-radius: 6px;
  padding: 8px 12px;
  box-sizing: border-box;
  margin-bottom: 14px;
}

.flow-sms-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.flow-switch {
  position: relative;
  display: inline-block;
  width: 36px;
  height: 20px;
}

.flow-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.flow-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #1e293b;
  transition: 0.3s;
  border-radius: 20px;
  border: 1px solid #FFB000;
}

.flow-slider:before {
  position: absolute;
  content: "";
  height: 14px;
  width: 14px;
  left: 2px;
  bottom: 2px;
  background-color: #FFB000;
  box-shadow: 0 0 6px #FFB000;
  transition: 0.3s;
  border-radius: 50%;
}

input:checked + .flow-slider {
  background-color: rgba(255, 176, 0, 0.25);
}

input:checked + .flow-slider:before {
  transform: translateX(16px);
}

.flow-sms-text {
  display: flex;
  flex-direction: column;
}

.flow-sms-title {
  font-size: 0.72rem;
  font-weight: 700;
  color: #fff;
}

.flow-sms-subtext {
  font-size: 0.62rem;
  color: rgba(255, 255, 255, 0.6);
}

.flow-sms-meta {
  font-size: 0.58rem;
  font-family: 'Space Mono', monospace;
  color: rgba(0, 255, 65, 0.55);
  line-height: 1.3;
  text-align: right;
}

.flow-btn-continue {
  width: 100%;
  height: 46px;
  background: rgba(0, 255, 65, 0.15);
  border: 1.5px solid #00FF41;
  color: #00FF41;
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 3px;
  font-family: 'Space Mono', monospace;
  border-radius: 24px;
  cursor: pointer;
  box-shadow: 0 0 20px rgba(0, 255, 65, 0.35);
  transition: all 0.2s;
}

.flow-btn-continue:hover {
  background: #00FF41;
  color: #000;
  box-shadow: 0 0 30px #00FF41;
}

/* ==========================================================================
   SCREEN 2: TACTICAL MAP VIEW
   ========================================================================== */
.flow-map-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.flow-map-backdrop-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Interactive Hotspots positioned over the map */
.flow-hotspot-poi {
  position: absolute;
  cursor: pointer;
  border-radius: 6px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.flow-hotspot-poi:hover {
  transform: scale(1.05);
  box-shadow: 0 0 15px rgba(0, 245, 255, 0.8);
}

/* Zoom controls */
.flow-zoom-controls {
  position: absolute;
  bottom: 24px;
  right: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 30;
}

.flow-zoom-btn {
  width: 36px;
  height: 36px;
  background: rgba(4, 14, 22, 0.9);
  border: 1px solid rgba(0, 245, 255, 0.35);
  color: #00F5FF;
  font-size: 1.2rem;
  font-weight: bold;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ==========================================================================
   SCREEN 3: OPS VIEW
   ========================================================================== */
.flow-ops-screen {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow-y: auto;
  padding: 14px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.flow-ops-card {
  background: rgba(4, 12, 20, 0.88);
  border: 1px solid rgba(0, 245, 255, 0.3);
  border-radius: 8px;
  padding: 12px 14px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.flow-card-heading-gold {
  font-size: 0.82rem;
  font-weight: 700;
  color: #FFD700;
  letter-spacing: 1px;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.flow-quick-sync-body {
  display: flex;
  gap: 12px;
}

.flow-quick-sync-avatar-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.flow-btn-edit-pill {
  background: rgba(0, 245, 255, 0.12);
  border: 1px solid rgba(0, 245, 255, 0.4);
  color: #00F5FF;
  font-size: 0.62rem;
  padding: 2px 8px;
  border-radius: 10px;
  cursor: pointer;
}

.flow-vitals-right {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.flow-bar-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.flow-bar-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.65rem;
  font-weight: 600;
}

.flow-track {
  height: 6px;
  background: #000;
  border-radius: 3px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.flow-fill-health {
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, #22c55e 75%, #eab308 100%);
  box-shadow: 0 0 6px #22c55e;
}

.flow-substats-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.68rem;
  color: rgba(255, 255, 255, 0.85);
  margin-top: 2px;
}

.flow-rep-bars {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}

.flow-rep-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 0.6rem;
}

/* Contract Item */
.flow-contract-item {
  background: rgba(2, 6, 12, 0.7);
  border: 1px solid rgba(0, 245, 255, 0.25);
  border-left: 3px solid #FFB000;
  border-radius: 6px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.flow-contract-title {
  font-size: 0.75rem;
  font-weight: 700;
  color: #fff;
}

.flow-contract-sub {
  font-size: 0.65rem;
  color: rgba(255, 255, 255, 0.6);
  margin-top: 1px;
}

.flow-contract-reward {
  font-size: 0.68rem;
  color: #00F5FF;
  font-weight: 600;
  margin-top: 2px;
}

.flow-btn-accept {
  background: rgba(0, 245, 255, 0.15);
  border: 1px solid #00F5FF;
  color: #00F5FF;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 4px;
  cursor: pointer;
  letter-spacing: 1px;
}

.flow-btn-accept:hover {
  background: #00F5FF;
  color: #000;
}

/* ==========================================================================
   SCREEN 4: AGENT / DOSSIER VIEW
   ========================================================================== */
.flow-dossier-screen {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow-y: auto;
  padding: 14px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.flow-dossier-top-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.flow-silhouette-card {
  background: rgba(4, 12, 20, 0.88);
  border: 1px solid rgba(0, 245, 255, 0.3);
  border-radius: 8px;
  padding: 10px;
  display: flex;
  flex-direction: column;
}

.flow-silhouette-img {
  width: 100%;
  height: auto;
  display: block;
  filter: drop-shadow(0 0 10px rgba(0, 245, 255, 0.3));
}

.flow-equip-grid-amber {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.flow-equip-slot-amber {
  background: rgba(2, 6, 12, 0.85);
  border: 1px solid #FFB000;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  min-height: 52px;
  box-shadow: 0 0 8px rgba(255, 176, 0, 0.2);
}

.flow-equip-slot-amber.wide {
  grid-column: span 2;
}

.flow-equip-slot-amber img {
  max-width: 100%;
  max-height: 50px;
  object-fit: contain;
}

.flow-no-item {
  color: #FFB000;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.flow-dossier-vitals-card {
  background: rgba(4, 12, 20, 0.88);
  border: 1px solid rgba(0, 245, 255, 0.3);
  border-radius: 8px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.flow-dial-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.flow-dial-circle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 2.5px solid #00F5FF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.68rem;
  font-weight: 700;
  color: #00F5FF;
  box-shadow: 0 0 8px rgba(0, 245, 255, 0.5);
  flex-shrink: 0;
}

.flow-dial-info {
  flex: 1;
}

.flow-dial-title {
  font-size: 0.72rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 1px;
}

.flow-dial-val {
  font-size: 0.65rem;
  color: #38bdf8;
  margin-top: 1px;
}

.flow-history-card {
  background: rgba(2, 6, 12, 0.85);
  border: 1px solid rgba(0, 245, 255, 0.25);
  border-radius: 6px;
  padding: 10px;
  font-family: 'Space Mono', monospace;
  font-size: 0.6rem;
  color: rgba(0, 245, 255, 0.7);
  line-height: 1.4;
}

/* ==========================================================================
   SCREEN 5: POI DATA MODAL (AUTHENTIC TO SCREENSHOT)
   ========================================================================== */
.flow-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(6px);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
}

.flow-poi-modal-box {
  width: 100%;
  max-width: 400px;
  background: rgba(4, 14, 22, 0.94);
  border: 1.5px solid #00F5FF;
  border-radius: 12px;
  padding: 16px;
  box-sizing: border-box;
  box-shadow: 0 0 35px rgba(0, 245, 255, 0.35);
  position: relative;
}

.flow-poi-modal-box::before {
  content: "";
  position: absolute;
  top: -4px;
  left: -4px;
  width: 14px;
  height: 14px;
  border-top: 3px solid #00F5FF;
  border-left: 3px solid #00F5FF;
}

.flow-poi-modal-box::after {
  content: "";
  position: absolute;
  bottom: -4px;
  right: -4px;
  width: 14px;
  height: 14px;
  border-bottom: 3px solid #00F5FF;
  border-right: 3px solid #00F5FF;
}

.flow-poi-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(0, 245, 255, 0.25);
  padding-bottom: 8px;
  margin-bottom: 12px;
}

.flow-poi-modal-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: #00F5FF;
  letter-spacing: 1.5px;
  text-shadow: 0 0 10px rgba(0, 245, 255, 0.6);
}

.flow-poi-close-btn {
  background: none;
  border: none;
  color: #64748b;
  font-size: 1.2rem;
  cursor: pointer;
}

.flow-poi-close-btn:hover {
  color: #00F5FF;
}

.flow-poi-content-split {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 12px;
  margin-bottom: 14px;
}

.flow-wireframe-container {
  border: 1px solid rgba(0, 245, 255, 0.3);
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.6);
  padding: 6px;
  display: flex;
  flex-direction: column;
}

.flow-target-tag {
  font-size: 0.58rem;
  color: #FFB000;
  font-family: 'Space Mono', monospace;
  margin-bottom: 4px;
}

.flow-wireframe-img {
  width: 100%;
  height: auto;
  display: block;
}

.flow-poi-specs {
  display: flex;
  flex-direction: column;
  gap: 10px;
  justify-content: center;
}

.flow-spec-tile {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.flow-spec-label {
  font-size: 0.65rem;
  color: rgba(255, 255, 255, 0.7);
  display: flex;
  align-items: center;
  gap: 4px;
}

.flow-spec-val-high {
  font-size: 0.88rem;
  font-weight: 800;
  color: #ef4444;
  letter-spacing: 1px;
}

.flow-danger-segmented-bars {
  display: flex;
  gap: 2px;
  height: 7px;
  margin-top: 2px;
}

.flow-danger-bar-segment {
  flex: 1;
  background: #ef4444;
  border-radius: 1px;
  box-shadow: 0 0 4px #ef4444;
}

.flow-spec-val-cyan {
  font-size: 0.85rem;
  font-weight: 700;
  color: #00F5FF;
}

.flow-btn-initiate-gig {
  width: 100%;
  height: 44px;
  background: rgba(0, 245, 255, 0.15);
  border: 1.5px solid #00F5FF;
  color: #00F5FF;
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: 2px;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 0 20px rgba(0, 245, 255, 0.4);
  transition: all 0.2s;
}

.flow-btn-initiate-gig:hover {
  background: #00F5FF;
  color: #000;
  box-shadow: 0 0 30px #00F5FF;
}

/* =========================================================================
   MASTER SCREENSHOT AUTHENTIC DESIGN OVERLAYS (VANILLA ENGINE)
   ========================================================================= */

/* 1. TOP APP BAR */
header#top-app-bar {
  background: rgba(8, 12, 18, 0.95) !important;
  border-bottom: 1px solid rgba(0, 255, 157, 0.25) !important;
  backdrop-filter: blur(16px) !important;
  padding: 0 14px !important;
  height: 52px !important;
  min-height: 52px !important;
}

.neon-title {
  font-family: var(--font-tactical) !important;
  font-size: 1.15rem !important;
  font-weight: 800 !important;
  letter-spacing: 1px !important;
  color: #ffffff !important;
  text-shadow: 0 0 8px rgba(0, 240, 255, 0.7), 0 0 20px rgba(0, 240, 255, 0.3) !important;
}

.gold-credit-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(255, 176, 0, 0.12);
  border: 1px solid rgba(255, 176, 0, 0.4);
  color: #ffb000;
  padding: 3px 9px;
  border-radius: 14px;
  font-family: var(--font-tactical);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.5px;
  box-shadow: 0 0 10px rgba(255, 176, 0, 0.2);
}

.level-badge {
  color: var(--neon-green);
  font-family: var(--font-tactical);
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 1px;
}

/* 2. PINNED 3-TAB BOTTOM DOCK */
#bottom-dock.bottom-dock {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 64px;
  background: rgba(6, 10, 15, 0.96) !important;
  backdrop-filter: blur(20px) !important;
  border-top: 1px solid rgba(0, 255, 157, 0.2) !important;
  display: flex !important;
  justify-content: space-around;
  align-items: stretch;
  z-index: 10000;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.7);
  padding: 0;
  margin: 0;
}

.dock-tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  border-top: 3px solid transparent;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px 0;
  transition: all 0.2s ease;
  font-family: var(--font-tactical);
}

.dock-tab .dock-icon {
  font-size: 1.25rem;
  line-height: 1;
  margin-bottom: 3px;
  transition: transform 0.2s ease;
}

.dock-tab .dock-label {
  font-size: 0.60rem;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  white-space: nowrap;
}

.dock-tab.active {
  color: var(--neon-green) !important;
  border-top: 3px solid var(--neon-green) !important;
  background: linear-gradient(180deg, rgba(0, 255, 157, 0.12) 0%, transparent 65%);
  text-shadow: 0 0 10px rgba(0, 255, 157, 0.6);
}

.dock-tab.active .dock-icon {
  transform: scale(1.15);
  filter: drop-shadow(0 0 8px var(--neon-green));
}

/* 3. LEAFLET TACTICAL NIGHT GRID FILTER (100% INTERACTIVE) */
#leaflet-canvas {
  background: #080c10 !important;
}

#leaflet-canvas .leaflet-tile-pane {
  /* Tactical high-contrast night grid for OpenStreetMap — crystal clear streets, sidewalks, and buildings without API keys */
  filter: brightness(0.72) invert(1) contrast(2.0) hue-rotate(195deg) saturate(0.45) !important;
}

/* Map HUD Overlays (Non-blocking: pointer-events none) */
.map-hud-overlay-compass {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 58px;
  height: 58px;
  pointer-events: none;
  z-index: 450;
  opacity: 0.85;
  filter: drop-shadow(0 0 8px rgba(0, 255, 157, 0.4));
}

.map-hud-overlay-radar {
  position: absolute;
  top: 14px;
  left: 14px;
  width: 90px;
  height: 48px;
  border: 1px solid rgba(0, 255, 157, 0.35);
  background: rgba(8, 14, 20, 0.7);
  border-radius: 4px;
  pointer-events: none;
  z-index: 450;
  opacity: 0.75;
  padding: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.map-hud-overlay-district {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(8, 14, 20, 0.85);
  border: 1px solid rgba(0, 255, 157, 0.45);
  border-radius: 6px;
  padding: 4px 14px;
  pointer-events: none;
  z-index: 450;
  text-align: center;
  box-shadow: 0 0 15px rgba(0, 255, 157, 0.2);
}

.map-hud-district-title {
  font-family: var(--font-tactical);
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--neon-green);
  letter-spacing: 1px;
}

.map-hud-district-hex {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: #94a3b8;
}

/* High-Contrast Neon Markers */
.poi-badge-amber {
  background: rgba(255, 176, 0, 0.15) !important;
  border: 1.5px solid #ffb000 !important;
  color: #ffb000 !important;
  font-weight: 800;
  text-shadow: 0 0 8px #ffb000;
}

.poi-badge-green {
  background: rgba(0, 255, 157, 0.15) !important;
  border: 1.5px solid var(--neon-green) !important;
  color: var(--neon-green) !important;
  font-weight: 800;
  text-shadow: 0 0 8px var(--neon-green);
}

/* Tactical Map Controls (Zoom In, Zoom Out, Recenter) */
.map-ctrl-pill {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(8, 14, 24, 0.92);
  border: 1.5px solid var(--neon-cyan);
  color: var(--neon-cyan);
  font-size: 0.95rem;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.7), 0 0 10px rgba(0, 240, 255, 0.3);
  transition: all 0.2s ease;
  user-select: none;
}

.map-ctrl-pill:hover {
  background: var(--neon-cyan);
  color: #000;
  box-shadow: 0 0 16px var(--neon-cyan);
  transform: scale(1.08);
}

.map-ctrl-pill:active {
  transform: scale(0.94);
}

/* 4. AGENT DOSSIER (SILHOUETTE & LOADOUT) */
.dossier-layout-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

.dossier-silhouette-card {
  background: rgba(4, 8, 14, 0.85);
  border: 1px solid rgba(0, 255, 157, 0.3);
  border-radius: 8px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.dossier-silhouette-card img {
  max-width: 100%;
  height: auto;
  opacity: 0.85;
}

.dossier-loadout-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
}

.dossier-slot-item {
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(0, 255, 157, 0.25);
  border-radius: 6px;
  padding: 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60px;
  cursor: pointer;
  transition: all 0.2s;
}

.dossier-slot-item:hover {
  border-color: var(--neon-green);
  box-shadow: 0 0 10px rgba(0, 255, 157, 0.3);
}

/* 5. OPS TAB DISPATCHES */
.vector-contract-card {
  background: rgba(8, 14, 22, 0.88);
  border: 1px solid rgba(0, 255, 157, 0.25);
  border-left: 4px solid var(--neon-gold);
  border-radius: 6px;
  padding: 12px 14px;
  margin-bottom: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

.vector-contract-title {
  font-family: var(--font-tactical);
  font-size: 0.85rem;
  font-weight: 700;
  color: #ffffff;
}

.vector-contract-reward {
  font-family: var(--font-tactical);
  font-size: 0.72rem;
  color: var(--neon-green);
  margin-top: 2px;
}

.btn-accept-vector {
  background: rgba(0, 255, 157, 0.15) !important;
  border: 1.5px solid var(--neon-green) !important;
  color: var(--neon-green) !important;
  font-family: var(--font-tactical) !important;
  font-weight: 700 !important;
  padding: 6px 14px !important;
  border-radius: 6px !important;
  cursor: pointer !important;
  letter-spacing: 1px !important;
}

.btn-accept-vector:hover {
  background: var(--neon-green) !important;
  color: #000000 !important;
  box-shadow: 0 0 15px var(--neon-green) !important;
}

/* ==========================================================================
   Tactical GPS Navigation Route Corridor & Target Beacons (Phase 13)
   ========================================================================== */

/* Animated Dash Flow for Dynamic Nav Guideline */
@keyframes navGuidelineFlow {
  0% {
    stroke-dashoffset: 24;
  }
  100% {
    stroke-dashoffset: 0;
  }
}

.nav-guideline-animated path {
  animation: navGuidelineFlow 1.2s linear infinite;
}

/* Destination Target Tactical Beacon */
@keyframes targetBeaconRingPulse {
  0% {
    transform: scale(0.6);
    opacity: 1;
  }
  70% {
    transform: scale(2.2);
    opacity: 0.15;
  }
  100% {
    transform: scale(2.6);
    opacity: 0;
  }
}

.nav-target-beacon-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-target-beacon-ring {
  position: absolute;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid var(--neon-green);
  box-shadow: 0 0 12px var(--neon-green);
  animation: targetBeaconRingPulse 1.8s ease-out infinite;
  pointer-events: none;
}

.nav-target-beacon-core {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(8, 14, 24, 0.95);
  border: 2px solid var(--neon-green);
  box-shadow: 0 0 15px rgba(0, 255, 157, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  cursor: pointer;
  z-index: 2;
  transition: transform 0.2s ease;
}

.nav-target-beacon-core:hover {
  transform: scale(1.18);
  box-shadow: 0 0 22px var(--neon-green);
}

/* Origin Departure Pin */
.nav-origin-pin-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-origin-pin-core {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(20, 16, 8, 0.92);
  border: 2px solid var(--neon-gold);
  box-shadow: 0 0 10px rgba(255, 176, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  cursor: pointer;
  z-index: 2;
}

/* Tactical Nav HUD Interactive States */
#nav-routing-hud {
  transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  user-select: none;
}

#nav-routing-hud:hover {
  background: rgba(0, 240, 255, 0.16) !important;
  box-shadow: 0 0 16px rgba(0, 240, 255, 0.3) !important;
}

#nav-routing-hud.nav-hud-in-range {
  background: rgba(0, 255, 157, 0.18) !important;
  border-color: var(--neon-green) !important;
  box-shadow: 0 0 20px rgba(0, 255, 157, 0.45) !important;
  animation: navHudPulse 1.4s infinite alternate;
}

@keyframes navHudPulse {
  0% {
    box-shadow: 0 0 12px rgba(0, 255, 157, 0.3);
  }
  100% {
    box-shadow: 0 0 24px rgba(0, 255, 157, 0.7);
  }
}

/* ==========================================================================
   Safehouse // Apartment 219 & Courier Loadout (Directive Phase 14)
   ========================================================================== */

.safehouse-header {
  border-bottom: 1px solid rgba(255, 176, 0, 0.25);
  padding-bottom: 8px;
  margin-bottom: 12px;
}

.safehouse-title {
  font-family: var(--font-tactical);
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--neon-gold);
  letter-spacing: 1.2px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Courier 6-Slot Loadout Grid */
.courier-loadout-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}

.courier-slot-card {
  background: rgba(8, 14, 24, 0.85);
  border: 1px solid rgba(0, 240, 255, 0.22);
  border-radius: 8px;
  padding: 8px 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.courier-slot-card:hover {
  border-color: var(--neon-cyan);
  background: rgba(0, 240, 255, 0.08);
  box-shadow: 0 0 12px rgba(0, 240, 255, 0.2);
  transform: translateY(-1px);
}

.courier-slot-icon {
  font-size: 1.4rem;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.courier-slot-meta {
  flex: 1;
  min-width: 0;
}

.courier-slot-label {
  font-size: 0.6rem;
  font-family: var(--font-mono);
  color: var(--neon-gold);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  display: block;
}

.courier-slot-item-name {
  font-size: 0.75rem;
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}

.courier-slot-effect {
  font-size: 0.6rem;
  color: #94a3b8;
  display: block;
}

/* Closet Disguise Silhouette Card */
.closet-card {
  background: linear-gradient(135deg, rgba(8, 14, 24, 0.95), rgba(16, 24, 40, 0.85));
  border: 1.5px solid rgba(0, 255, 157, 0.3);
  border-radius: 8px;
  padding: 10px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.closet-card:hover {
  border-color: var(--neon-green);
  box-shadow: 0 0 18px rgba(0, 255, 157, 0.25);
}

.closet-silhouette-wrap {
  width: 50px;
  height: 65px;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(0, 255, 157, 0.25);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.closet-silhouette-wrap img {
  max-height: 58px;
  max-width: 42px;
  object-fit: contain;
}

/* ==========================================================================
   Dispatch Board & Pinned Active Contract (Directive Phase 14)
   ========================================================================== */

.pinned-active-contract,
.active-contract-banner {
  background: linear-gradient(135deg, rgba(20, 16, 8, 0.95), rgba(30, 22, 10, 0.85));
  border: 1.5px solid var(--neon-gold);
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 14px;
  box-shadow: 0 0 25px rgba(255, 176, 0, 0.22);
  position: relative;
}

.pinned-contract-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  background: rgba(255, 176, 0, 0.15);
  border: 1px solid var(--neon-gold);
  color: var(--neon-gold);
  text-transform: uppercase;
}

.tamper-seal-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  background: rgba(0, 255, 157, 0.15);
  border: 1px solid var(--neon-green);
  color: var(--neon-green);
}

.tamper-seal-compromised {
  background: rgba(239, 68, 68, 0.15);
  border-color: #ef4444;
  color: #ef4444;
}

.pinned-actions-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-top: 10px;
}

@media (max-width: 420px) {
  .pinned-actions-row {
    grid-template-columns: repeat(2, 1fr);
  }
}

.btn-pinned-action {
  font-family: var(--font-tactical);
  font-size: 0.68rem;
  font-weight: 700;
  padding: 6px 4px;
  border-radius: 5px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  text-align: center;
  transition: all 0.15s ease;
  border: 1px solid transparent;
}

.btn-pinned-inspect {
  background: rgba(0, 240, 255, 0.15);
  border-color: var(--neon-cyan);
  color: var(--neon-cyan);
}

.btn-pinned-inspect:hover {
  background: var(--neon-cyan);
  color: #000;
}

.btn-pinned-handler {
  background: rgba(0, 255, 157, 0.15);
  border-color: var(--neon-green);
  color: var(--neon-green);
}

.btn-pinned-handler:hover {
  background: var(--neon-green);
  color: #000;
}

.btn-pinned-route {
  background: rgba(255, 176, 0, 0.15);
  border-color: var(--neon-gold);
  color: var(--neon-gold);
}

.btn-pinned-route:hover {
  background: var(--neon-gold);
  color: #000;
}

.btn-pinned-abort {
  background: rgba(239, 68, 68, 0.15);
  border-color: #ef4444;
  color: #ef4444;
}

.btn-pinned-abort:hover {
  background: #ef4444;
  color: #fff;
}

/* ==========================================================================
   DETERMINISTIC NPC INTERACTION & CRT COMMS STAGE (DIRECTIVE CHAPTER 1)
   ========================================================================== */

.npc-crt-terminal-frame {
  max-width: 480px;
  width: 100%;
  max-height: 94vh;
  display: flex;
  flex-direction: column;
  background: #040811;
  border: 1.5px solid var(--neon-cyan);
  box-shadow: 0 0 35px rgba(0, 240, 255, 0.4), inset 0 0 25px rgba(0, 240, 255, 0.12);
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  font-family: var(--font-tactical, -apple-system, BlinkMacSystemFont, sans-serif);
}

.npc-crt-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  background: rgba(0, 240, 255, 0.08);
  border-bottom: 1px solid rgba(0, 240, 255, 0.25);
}

.npc-crt-header-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.npc-crt-rec-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ef4444;
  box-shadow: 0 0 8px #ef4444;
  animation: crtBlink 1.2s infinite ease-in-out;
}

#npc-crt-channel {
  font-family: var(--font-mono, monospace);
  font-size: 0.72rem;
  color: var(--neon-cyan);
  letter-spacing: 1.5px;
  font-weight: bold;
}

.npc-crt-header-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

#npc-crt-signal {
  font-family: var(--font-mono, monospace);
  font-size: 0.65rem;
  color: var(--neon-green, #00ff9d);
  letter-spacing: 1px;
}

#btn-npc-close {
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
  transition: color 0.15s ease;
}

#btn-npc-close:hover {
  color: #ef4444;
}

/* CRT Comms Viewport */
.npc-crt-viewport {
  position: relative;
  width: 100%;
  height: 210px;
  background: #010408;
  overflow: hidden;
  border-bottom: 1px solid rgba(0, 240, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
}

#npc-crt-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

#npc-crt-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.npc-crt-scanlines {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    rgba(0, 0, 0, 0.35) 0px,
    rgba(0, 0, 0, 0.35) 1px,
    transparent 1px,
    transparent 3px
  );
  z-index: 10;
  opacity: 0.85;
}

.npc-crt-vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at center, transparent 60%, rgba(2, 6, 12, 0.85) 100%);
  z-index: 11;
  box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.8);
}

.npc-vector-hud {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(4, 10, 18, 0.82);
  border: 1px solid rgba(0, 240, 255, 0.3);
  border-radius: 4px;
  padding: 4px 8px;
  font-family: var(--font-mono, monospace);
  font-size: 0.62rem;
  color: #94a3b8;
  display: flex;
  gap: 8px;
  z-index: 15;
  pointer-events: none;
  box-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.npc-vector-hud span {
  font-weight: bold;
}

#vec-hud-op {
  color: var(--neon-cyan);
}

#vec-hud-inv {
  color: var(--neon-gold, #ffb000);
}

#vec-hud-reb {
  color: #ff3366;
}

/* Terminal Dialogue Feed */
.npc-dialogue-terminal {
  padding: 14px 16px;
  min-height: 95px;
  background: rgba(2, 6, 12, 0.95);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-family: var(--font-mono, 'Courier New', monospace);
}

#npc-speaker-title {
  font-size: 0.72rem;
  color: var(--neon-cyan);
  letter-spacing: 1.5px;
  font-weight: bold;
  margin-bottom: 6px;
  text-transform: uppercase;
  text-shadow: 0 0 8px rgba(0, 240, 255, 0.4);
}

#npc-terminal-body {
  font-size: 0.88rem;
  line-height: 1.45;
  color: #e2e8f0;
  letter-spacing: 0.4px;
  word-break: break-word;
}

.terminal-caret {
  display: inline-block;
  width: 8px;
  height: 14px;
  background: var(--neon-cyan);
  margin-left: 3px;
  vertical-align: middle;
  animation: crtBlink 0.9s infinite step-start;
}

/* Choice Deck */
.npc-choice-deck {
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: #060b13;
  max-height: 220px;
  overflow-y: auto;
}

.npc-choice-btn {
  width: 100%;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(0, 240, 255, 0.3);
  border-radius: 6px;
  padding: 10px 12px;
  color: #ffffff;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  text-align: left;
  transition: all 0.15s ease;
  position: relative;
  box-sizing: border-box;
}

.npc-choice-btn:hover:not(.locked) {
  background: rgba(0, 240, 255, 0.15);
  border-color: var(--neon-cyan);
  box-shadow: 0 0 15px rgba(0, 240, 255, 0.3);
  transform: translateY(-1px);
}

.npc-choice-btn:active:not(.locked) {
  transform: translateY(0px);
}

.npc-choice-btn-top {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.npc-choice-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.3;
}

.npc-choice-badge {
  font-family: var(--font-mono, monospace);
  font-size: 0.6rem;
  font-weight: bold;
  padding: 2px 6px;
  border-radius: 3px;
  letter-spacing: 0.8px;
  flex-shrink: 0;
}

.badge-op {
  background: rgba(0, 240, 255, 0.2);
  border: 1px solid var(--neon-cyan);
  color: var(--neon-cyan);
}

.badge-inv {
  background: rgba(255, 176, 0, 0.2);
  border: 1px solid var(--neon-gold, #ffb000);
  color: var(--neon-gold, #ffb000);
}

.badge-reb {
  background: rgba(255, 51, 102, 0.2);
  border: 1px solid #ff3366;
  color: #ff3366;
}

.npc-choice-subtext {
  font-family: var(--font-mono, monospace);
  font-size: 0.65rem;
  color: #94a3b8;
}

.npc-choice-btn.locked {
  opacity: 0.5;
  border-color: rgba(255, 255, 255, 0.1);
  cursor: not-allowed;
  background: rgba(10, 14, 22, 0.6);
}

.npc-choice-btn.locked .npc-choice-label {
  color: #64748b;
}

.npc-choice-req-warning {
  font-family: var(--font-mono, monospace);
  font-size: 0.62rem;
  color: #ef4444;
  display: flex;
  align-items: center;
  gap: 4px;
}

@keyframes crtBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* ==========================================================================
   COURIER ADVANCEMENT & SPECIALIZATION MODAL STYLES (DIRECTIVE POST-WALK)
   ========================================================================== */

.btn-level-up-pulse, .btn-advancement-pulse {
  background: linear-gradient(135deg, rgba(255, 176, 0, 0.25), rgba(255, 51, 102, 0.25));
  border: 1.5px solid var(--neon-gold, #ffb000);
  color: #fff;
  font-family: var(--font-mono, monospace);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 1px;
  padding: 3px 10px;
  border-radius: 4px;
  cursor: pointer;
  animation: levelUpPulse 1.4s infinite ease-in-out;
  box-shadow: 0 0 12px rgba(255, 176, 0, 0.4);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  text-shadow: 0 0 8px rgba(255, 176, 0, 0.7);
  transition: all 0.15s ease;
}

.btn-level-up-pulse:hover, .btn-advancement-pulse:hover {
  transform: scale(1.08);
  background: linear-gradient(135deg, rgba(255, 176, 0, 0.4), rgba(255, 51, 102, 0.4));
  box-shadow: 0 0 20px rgba(255, 176, 0, 0.7);
}

@keyframes levelUpPulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 10px rgba(255, 176, 0, 0.4);
    border-color: #ffb000;
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(255, 51, 102, 0.7), 0 0 30px rgba(255, 176, 0, 0.5);
    border-color: #ff3366;
  }
}

.level-up-terminal-frame, .advancement-terminal-frame {
  max-width: 480px;
  width: 100%;
  max-height: 94vh;
  display: flex;
  flex-direction: column;
  background: #040811;
  border: 1.5px solid var(--neon-gold, #ffb000);
  box-shadow: 0 0 35px rgba(255, 176, 0, 0.4), inset 0 0 25px rgba(255, 176, 0, 0.12);
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  font-family: var(--font-tactical, -apple-system, BlinkMacSystemFont, sans-serif);
}

.level-up-header, .advancement-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: rgba(255, 176, 0, 0.08);
  border-bottom: 1px solid rgba(255, 176, 0, 0.25);
}

.spec-card {
  background: rgba(10, 18, 30, 0.85);
  border: 1.5px solid rgba(0, 240, 255, 0.25);
  border-radius: 8px;
  padding: 12px 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
}

.spec-card:hover {
  border-color: var(--neon-cyan);
  background: rgba(0, 240, 255, 0.12);
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(0, 240, 255, 0.3);
}

.spec-card:active {
  transform: translateY(0);
}

.spec-card-icon {
  font-size: 1.8rem;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 6px;
  border: 1px solid rgba(0, 240, 255, 0.3);
  flex-shrink: 0;
}

.spec-rank-badge {
  font-family: var(--font-mono, monospace);
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #cbd5e1;
}

/* ============================================================================
   ONE-TAP TACTICAL DISPATCH BOTTOM DRAWER
   ============================================================================ */
.tactical-dispatch-drawer {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1050;
  background: rgba(6, 11, 19, 0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1.5px solid var(--neon-cyan);
  border-top-left-radius: 14px;
  border-top-right-radius: 14px;
  box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.8), 0 0 20px rgba(0, 240, 255, 0.25);
  transform: translateY(0);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease;
  padding: 12px 14px 16px;
  box-sizing: border-box;
}

.tactical-dispatch-drawer.hidden {
  transform: translateY(105%);
  opacity: 0;
  pointer-events: none;
}

.dispatch-drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(0, 240, 255, 0.2);
}

.dispatch-drawer-title {
  font-family: var(--font-tactical);
  font-size: 0.88rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dispatch-drawer-subtitle {
  font-size: 0.65rem;
  color: var(--neon-cyan);
  font-family: var(--font-mono);
  letter-spacing: 0.5px;
}

.dispatch-drawer-close {
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 1.4rem;
  cursor: pointer;
  line-height: 1;
  padding: 0 4px;
  transition: color 0.15s ease;
}

.dispatch-drawer-close:hover {
  color: #fff;
}

.dispatch-telemetry-card {
  background: rgba(14, 22, 38, 0.85);
  border: 1px solid rgba(0, 240, 255, 0.25);
  border-radius: 8px;
  padding: 8px 10px;
  margin-bottom: 10px;
}

.dispatch-telemetry-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
  font-size: 0.72rem;
}

.dispatch-telemetry-label {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: #94a3b8;
  letter-spacing: 0.5px;
}

.dispatch-telemetry-value {
  font-weight: 600;
  color: #f1f5f9;
  font-size: 0.74rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 65%;
  text-align: right;
}

.dispatch-telemetry-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 6px;
}

.dispatch-telemetry-box {
  background: rgba(6, 11, 20, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  padding: 5px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.telemetry-box-label {
  font-size: 0.56rem;
  color: #94a3b8;
  font-family: var(--font-mono);
  letter-spacing: 0.5px;
}

.telemetry-box-val {
  font-size: 0.76rem;
  font-weight: 700;
  font-family: var(--font-mono);
  margin-top: 2px;
}

.telemetry-box-val.val-gold {
  color: var(--neon-gold, #ffb000);
  text-shadow: 0 0 6px rgba(255, 176, 0, 0.4);
}

.telemetry-box-val.val-cyan {
  color: var(--neon-cyan, #00f0ff);
  text-shadow: 0 0 6px rgba(0, 240, 255, 0.4);
}

.telemetry-box-val.val-green {
  color: var(--neon-green, #39ff14);
  text-shadow: 0 0 6px rgba(57, 255, 20, 0.4);
}

.btn-drawer-engage {
  width: 100%;
  padding: 10px 12px;
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.25), rgba(0, 160, 255, 0.35));
  border: 1.5px solid var(--neon-cyan);
  border-radius: 8px;
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 1px;
  cursor: pointer;
  box-shadow: 0 0 16px rgba(0, 240, 255, 0.35);
  transition: all 0.2s ease;
}

.btn-drawer-engage:hover {
  background: var(--neon-cyan);
  color: #000;
  box-shadow: 0 0 24px rgba(0, 240, 255, 0.6);
}

.btn-drawer-abort {
  width: 100%;
  padding: 10px 12px;
  background: linear-gradient(135deg, rgba(255, 51, 102, 0.25), rgba(200, 30, 80, 0.35));
  border: 1.5px solid var(--neon-crimson, #ff3366);
  border-radius: 8px;
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 1px;
  cursor: pointer;
  box-shadow: 0 0 16px rgba(255, 51, 102, 0.35);
  transition: all 0.2s ease;
}

.btn-drawer-abort:hover {
  background: var(--neon-crimson, #ff3366);
  color: #fff;
  box-shadow: 0 0 24px rgba(255, 51, 102, 0.6);
}

/* ============================================================================
   STREET HAZARDS (Pharma-Espionage Obstacles)
   ============================================================================ */
.hazard-frame {
  max-width: 480px;
  width: 100%;
  background: #060b13;
  border: 1.5px solid var(--neon-crimson, #ff3366);
  box-shadow: 0 0 35px rgba(255, 51, 102, 0.4), inset 0 0 20px rgba(255, 51, 102, 0.1);
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  animation: hazardEntry 0.25s ease-out;
}

@keyframes hazardEntry {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.hazard-header {
  background: rgba(255, 51, 102, 0.12);
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 51, 102, 0.3);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.hazard-alert-banner {
  font-family: var(--font-tactical);
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--neon-crimson, #ff3366);
  letter-spacing: 0.8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.hazard-badge {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: #94a3b8;
  border: 1px solid rgba(255, 51, 102, 0.35);
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(255, 51, 102, 0.08);
}

.hazard-content {
  padding: 16px;
}

.hazard-prompt-text {
  font-size: 0.82rem;
  color: #e2e8f0;
  line-height: 1.5;
  margin-bottom: 16px;
  font-family: var(--font-mono);
  background: rgba(10, 16, 26, 0.7);
  border-left: 3px solid var(--neon-crimson, #ff3366);
  padding: 10px 12px;
  border-radius: 0 6px 6px 0;
}

.hazard-choices-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.hazard-choice-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  padding: 10px 14px;
  background: rgba(14, 22, 36, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  color: #f1f5f9;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  text-align: left;
  cursor: pointer;
  transition: all 0.18s ease;
  box-sizing: border-box;
}

.hazard-choice-btn:hover {
  background: rgba(255, 51, 102, 0.18);
  border-color: var(--neon-crimson, #ff3366);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 0 12px rgba(255, 51, 102, 0.3);
}

.hazard-choice-btn:active {
  transform: translateY(0);
}

.hazard-choice-tag {
  font-size: 0.65rem;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 700;
  flex-shrink: 0;
}

/* ==========================================================================
   BLACK MARKET SUPPLY KIOSK & INVENTORY USABILITY
   ========================================================================== */
.blackmarket-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(12, 18, 30, 0.85);
  border: 1px solid rgba(255, 176, 0, 0.2);
  border-radius: 8px;
  padding: 10px 14px;
  gap: 12px;
  transition: all 0.2s ease;
}

.blackmarket-card:hover {
  border-color: rgba(255, 176, 0, 0.45);
  background: rgba(18, 26, 42, 0.9);
}

.blackmarket-card-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1;
}

.blackmarket-card-icon {
  font-size: 1.6rem;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 6px;
  border: 1px solid rgba(255, 176, 0, 0.25);
  flex-shrink: 0;
}

.blackmarket-card-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.blackmarket-card-title-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.blackmarket-card-name {
  font-weight: 700;
  font-size: 0.86rem;
  color: #fff;
  font-family: var(--font-tactical, sans-serif);
}

.blackmarket-tag {
  font-size: 0.6rem;
  padding: 1px 5px;
  border-radius: 3px;
  font-weight: 700;
  font-family: var(--font-mono, monospace);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.tag-consumable {
  background: rgba(57, 255, 20, 0.12);
  border: 1px solid rgba(57, 255, 20, 0.4);
  color: var(--neon-green, #39ff14);
}

.tag-countermeasure {
  background: rgba(0, 240, 255, 0.12);
  border: 1px solid rgba(0, 240, 255, 0.4);
  color: var(--neon-cyan, #00f0ff);
}

.tag-utility {
  background: rgba(255, 176, 0, 0.12);
  border: 1px solid rgba(255, 176, 0, 0.4);
  color: var(--neon-gold, #ffb000);
}

.tag-rig_tool {
  background: rgba(168, 85, 247, 0.12);
  border: 1px solid rgba(168, 85, 247, 0.4);
  color: #c084fc;
}

.blackmarket-card-desc {
  font-size: 0.7rem;
  color: #94a3b8;
  line-height: 1.3;
}

.blackmarket-buy-btn {
  background: var(--neon-gold, #ffb000);
  color: #000;
  font-weight: 800;
  font-family: var(--font-mono, monospace);
  font-size: 0.75rem;
  padding: 8px 14px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.18s ease;
  flex-shrink: 0;
}

.blackmarket-buy-btn:hover:not(:disabled) {
  background: #ffc233;
  box-shadow: 0 0 12px rgba(255, 176, 0, 0.45);
  transform: translateY(-1px);
}

.blackmarket-buy-btn:active:not(:disabled) {
  transform: translateY(0);
}

.blackmarket-buy-btn:disabled {
  background: #2a3342;
  color: #64748b;
  cursor: not-allowed;
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: none;
}

/* Backpack Grid Item with [ USE ] action button */
.backpack-item-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 8px 12px;
  margin-bottom: 6px;
  transition: border-color 0.2s ease;
}

.backpack-item-row:hover {
  border-color: rgba(0, 240, 255, 0.3);
}

.backpack-item-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}

.backpack-item-icon {
  font-size: 1.4rem;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.3);
  border-radius: 4px;
  flex-shrink: 0;
}

.backpack-item-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.backpack-item-name {
  font-weight: 700;
  font-size: 0.8rem;
  color: #fff;
}

.backpack-item-sub {
  font-size: 0.65rem;
  color: #94a3b8;
}

.backpack-use-btn {
  background: rgba(57, 255, 20, 0.15);
  border: 1px solid var(--neon-green, #39ff14);
  color: var(--neon-green, #39ff14);
  font-weight: 800;
  font-size: 0.72rem;
  font-family: var(--font-mono, monospace);
  padding: 4px 10px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.backpack-use-btn:hover {
  background: var(--neon-green, #39ff14);
  color: #000;
  box-shadow: 0 0 10px rgba(57, 255, 20, 0.4);
}

.backpack-stash-btn {
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid #38bdf8;
  color: #38bdf8;
  font-weight: 700;
  font-size: 0.7rem;
  font-family: var(--font-mono, monospace);
  padding: 4px 8px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.backpack-stash-btn:hover {
  background: #38bdf8;
  color: #000;
}

/* POI Filter Ribbon & ORM Gate Styles */
.poi-filter-ribbon {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  padding: 6px 10px;
  background: rgba(15, 23, 42, 0.94);
  border-bottom: 1px solid rgba(241, 180, 52, 0.25);
  backdrop-filter: blur(8px);
  z-index: 500;
}

.poi-filter-btn {
  background: rgba(27, 54, 93, 0.4);
  border: 1px solid rgba(56, 189, 248, 0.3);
  color: #94a3b8;
  font-family: var(--font-tactical);
  font-size: 0.68rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 4px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.poi-filter-btn:hover {
  background: rgba(27, 54, 93, 0.7);
  color: #fff;
  border-color: var(--command-accent, #f1b434);
}

.poi-filter-btn.active {
  background: var(--command-accent, #f1b434);
  color: #0f172a;
  border-color: var(--command-accent, #f1b434);
  font-weight: 700;
  box-shadow: 0 0 10px rgba(241, 180, 52, 0.4);
}

.orm-weather-btn {
  flex: 1;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #94a3b8;
  font-size: 0.65rem;
  padding: 4px 6px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.orm-weather-btn.active {
  background: rgba(241, 180, 52, 0.25);
  border-color: var(--command-accent, #f1b434);
  color: var(--command-accent, #f1b434);
  font-weight: bold;
}

/* ================= PHASE 14: ZERO-HOUR & DUAL-IC ENGINE STYLES ================= */

/* Dual-IC Command Ribbon */
#hud-dual-ic {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 12px;
  background: rgba(15, 23, 42, 0.95);
  border-bottom: 2px solid var(--alert-accent, #e65100);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
  font-family: var(--font-tactical, monospace);
  font-size: 0.72rem;
  z-index: 550;
  white-space: nowrap;
  overflow-x: auto;
}

.dual-ic-node {
  display: flex;
  align-items: center;
  gap: 6px;
}

.dual-ic-badge {
  padding: 3px 8px;
  border-radius: 4px;
  font-weight: bold;
  letter-spacing: 0.5px;
}

.dual-ic-onscene {
  background: rgba(230, 81, 0, 0.2);
  border: 1px solid #e65100;
  color: #ff9800;
}

.dual-ic-remote {
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid #38bdf8;
  color: #38bdf8;
}

.dual-ic-umbilical {
  display: flex;
  align-items: center;
  gap: 4px;
  color: #22c55e;
  font-weight: 600;
  font-size: 0.68rem;
}

.umbilical-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 8px #22c55e;
  animation: pulseDot 1.4s infinite ease-in-out;
}

@keyframes pulseDot {
  0% { transform: scale(0.9); opacity: 0.7; }
  50% { transform: scale(1.3); opacity: 1; box-shadow: 0 0 12px #22c55e; }
  100% { transform: scale(0.9); opacity: 0.7; }
}

/* Adrenaline Gross-Motor Intake Modal */
#modal-adrenaline-intake {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: #0f172a;
  z-index: 100000;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 20px;
  box-sizing: border-box;
  overflow-y: auto;
  border: 4px solid #e65100;
  box-shadow: inset 0 0 40px rgba(230, 81, 0, 0.35);
  font-family: var(--font-tactical, sans-serif);
}

.adrenaline-header {
  text-align: center;
  border-bottom: 2px solid #e65100;
  padding-bottom: 12px;
}

.adrenaline-title {
  color: #e65100;
  font-size: 1.4rem;
  font-weight: 900;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  text-shadow: 0 0 12px rgba(230, 81, 0, 0.6);
}

.adrenaline-subtitle {
  color: #f1b434;
  font-size: 0.85rem;
  font-weight: bold;
  letter-spacing: 1px;
  margin-top: 4px;
}

.gross-motor-group {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.gross-motor-label {
  font-size: 0.82rem;
  font-weight: 800;
  color: #f8fafc;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

.gross-motor-btn {
  min-height: 64px;
  font-size: 1.1rem;
  font-weight: 800;
  border-radius: 8px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  background: rgba(30, 41, 59, 0.9);
  color: #f8fafc;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all 0.15s ease;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.gross-motor-btn:active,
.gross-motor-btn.selected {
  border-color: #f1b434;
  background: rgba(241, 180, 52, 0.25);
  color: #fff;
  box-shadow: 0 0 16px rgba(241, 180, 52, 0.5);
  transform: scale(0.99);
}

.gross-motor-btn.btn-injury-no.selected {
  border-color: #22c55e;
  background: rgba(34, 197, 94, 0.25);
  color: #4ade80;
  box-shadow: 0 0 16px rgba(34, 197, 94, 0.5);
}

.gross-motor-btn.btn-injury-yes.selected {
  border-color: #ef4444;
  background: rgba(239, 68, 68, 0.35);
  color: #fca5a5;
  box-shadow: 0 0 20px rgba(239, 68, 68, 0.7);
}

.gross-motor-counter {
  display: flex;
  gap: 12px;
  align-items: center;
}

.gross-motor-counter button {
  flex: 1;
  min-height: 64px;
  font-size: 1.6rem;
  font-weight: 900;
  border-radius: 8px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  background: rgba(30, 41, 59, 0.9);
  color: #f8fafc;
  cursor: pointer;
}

.gross-motor-counter-val {
  min-width: 70px;
  text-align: center;
  font-size: 1.8rem;
  font-weight: 900;
  color: #f1b434;
}

.gross-motor-submit {
  min-height: 72px;
  font-size: 1.25rem;
  font-weight: 900;
  background: #e65100;
  color: #ffffff;
  border: 2px solid #ff9800;
  border-radius: 10px;
  cursor: pointer;
  letter-spacing: 1px;
  box-shadow: 0 0 25px rgba(230, 81, 0, 0.6);
  margin-top: 18px;
  transition: all 0.2s ease;
}

.gross-motor-submit:active {
  transform: scale(0.98);
  box-shadow: 0 0 35px rgba(230, 81, 0, 0.9);
}

/* Personal Safety Panel & Family Cascade */
.family-cascade-card {
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 8px;
  padding: 12px;
  margin-top: 10px;
}

.family-contact-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.family-status-chip {
  font-size: 0.7rem;
  font-weight: bold;
  padding: 4px 8px;
  border-radius: 4px;
}

.family-status-ok {
  background: rgba(34, 197, 94, 0.2);
  color: #4ade80;
  border: 1px solid #22c55e;
}

.family-status-pinging {
  background: rgba(230, 81, 0, 0.25);
  color: #fb923c;
  border: 1px solid #ea580c;
  animation: pulseDot 1.6s infinite ease-in-out;
}

.btn-rescue-anchor {
  background: rgba(220, 38, 38, 0.25);
  border: 1px solid #ef4444;
  color: #fca5a5;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
  margin-top: 8px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.btn-rescue-anchor:hover {
  background: rgba(220, 38, 38, 0.45);
  color: #fff;
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.5);
}

/* ================= PHASE 15: 4-RS RECOVERY PROTOCOL & DESKTOP COMMAND DECK ================= */

/* Left Pane (340px Fixed) // Logistics & Staging Hub */
.desktop-pane-card {
  background: rgba(15, 23, 42, 0.88);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 8px;
  padding: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(8px);
}

.desktop-pane-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 6px;
  margin-bottom: 10px;
}

.desktop-pane-title {
  font-family: var(--font-tactical, monospace);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--command-accent, #f1b434);
}

/* Ground Team Roster Items */
.roster-unit-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 10px;
  background: rgba(27, 54, 93, 0.3);
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: 6px;
  margin-bottom: 6px;
  font-size: 0.72rem;
}

.roster-callsign {
  font-weight: 800;
  color: #fff;
}

.roster-meta {
  font-size: 0.65rem;
  color: #94a3b8;
}

/* 4-Rs Recovery Queue */
.recovery-unit-card {
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid rgba(241, 180, 52, 0.3);
  border-radius: 6px;
  padding: 10px;
  margin-bottom: 8px;
}

.recovery-stages-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  margin-top: 8px;
}

.recovery-stage-chip {
  padding: 6px 8px;
  border-radius: 4px;
  font-size: 0.65rem;
  font-weight: 700;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(0, 0, 0, 0.35);
  color: #94a3b8;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all 0.15s ease;
}

.recovery-stage-chip.done {
  border-color: #22c55e;
  background: rgba(34, 197, 94, 0.2);
  color: #4ade80;
}

.recovery-stage-chip.active {
  border-color: #e65100;
  background: rgba(230, 81, 0, 0.25);
  color: #fb923c;
  animation: pulseDot 1.5s infinite ease-in-out;
}

/* Right Pane (380px Fixed) // Operations & Automated Ledger */
.priority-incident-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px;
  background: rgba(220, 38, 38, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 6px;
  margin-bottom: 6px;
  font-size: 0.7rem;
}

.custody-stream-box {
  background: rgba(6, 11, 20, 0.85);
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: 6px;
  padding: 8px;
  font-family: var(--font-mono, monospace);
  font-size: 0.65rem;
  max-height: 140px;
  overflow-y: auto;
  color: #38bdf8;
}

.fema-force-drawer {
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid var(--command-accent, #f1b434);
  border-radius: 6px;
  padding: 10px;
  margin-top: 10px;
}

.fema-metric-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.68rem;
  padding: 4px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.fema-metric-val {
  font-weight: bold;
  color: #f1b434;
}

/* 4-Rs Recovery Modal */
#modal-four-rs-hygiene {
  position: fixed;
  inset: 0;
  background: rgba(10, 15, 30, 0.92);
  backdrop-filter: blur(8px);
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.four-rs-modal-frame {
  width: 90%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  background: #0f172a;
  border: 2px solid var(--command-accent, #f1b434);
  border-radius: 10px;
  padding: 20px;
  color: #fff;
  box-shadow: 0 0 40px rgba(241, 180, 52, 0.35);
}

/* ==========================================================================
   DESKTOP SUPPRESSION & VIEWPORT ALIGNMENT
   ========================================================================== */
@media (min-width: 1024px) {
  #bottom-dock,
  .bottom-dock,
  body.role-field-operative #bottom-dock,
  body.role-field-operative .bottom-dock {
    display: none !important;
  }

  .command-pane .tab-content {
    display: block !important;
  }

  /* Ensure #main-content enforces the 3-column layout on desktop */
  #main-content {
    display: grid !important;
    grid-template-columns: 320px 1fr 380px !important;
    height: calc(100vh - 110px) !important;
    overflow: hidden !important;
  }
  #pane-left, #pane-right {
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
    overflow-y: auto !important;
    padding-bottom: 30px !important;
    box-sizing: border-box !important;
  }
  #pane-center {
    display: flex !important;
    flex-direction: column !important;
    position: relative !important;
    height: 100% !important;
    min-height: 500px !important;
    min-width: 0 !important;
    overflow: hidden !important;
  }
}

/* Explicit rigid sizing for Leaflet Canvas & Center Stage */
#pane-center {
  display: flex !important;
  flex-direction: column !important;
  position: relative !important;
  height: 100% !important;
  min-height: 500px !important;
  min-width: 0 !important;
  overflow: hidden !important;
}

#tab-content-map {
  display: flex !important;
  flex-direction: column !important;
  flex: 1 1 auto !important;
  height: 100% !important;
  position: relative !important;
  overflow: hidden !important;
}

#map-viewport {
  position: relative !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 450px !important;
  background: #111827 !important; /* Slate base instead of pitch black */
  overflow: hidden !important;
}

#leaflet-canvas {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  z-index: 1 !important;
  background: transparent !important;
}

/* Ensure Leaflet internal tile pane is visible and tiles don't get clipped */
.leaflet-pane {
  z-index: 2 !important;
}
.leaflet-tile-pane {
  z-index: 1 !important;
}
.leaflet-tile {
  visibility: visible !important;
  opacity: 1 !important;
}

/* Force 3D canvas behind or hide when in 2D mode */
#diorama-canvas {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  z-index: 0 !important;
  pointer-events: none !important;
}
#diorama-canvas.hidden {
  display: none !important;
}

/* ==========================================================================
   PHASE 19: VISUAL GLASS DASHBOARD & INCIDENT COMMAND T-CARD BOARD STYLES
   ========================================================================== */

/* 1. Incident Command Glass Board (T-Card Matrix) */
#incident-command-board {
  background: radial-gradient(circle at 50% 20%, #0d1527 0%, #050811 100%) !important;
  color: #f8fafc;
}

.tcard-tile {
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  cursor: pointer;
  user-select: none;
}
.tcard-tile:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.tcard-command:hover {
  border-color: #e2e8f0 !important;
}
.tcard-ops:hover {
  border-color: #38bdf8 !important;
}
.tcard-ground:hover {
  border-color: #4ade80 !important;
}
.tcard-log:hover {
  border-color: #fbbf24 !important;
}

/* 2. Visual Apparatus Status Cards & Dual Liquid Gauges */
.tactical-apparatus-card {
  transition: border-color 0.2s ease;
}
.tactical-apparatus-card:hover {
  border-color: rgba(56, 189, 248, 0.4) !important;
}

/* 3. NFPA 1584 Work-Cycle Ring & Telemetry Strip */
@keyframes amberRingFlash {
  0%, 100% { border-color: #f59e0b; box-shadow: 0 0 5px rgba(245, 158, 11, 0.4); }
  50% { border-color: #ef4444; box-shadow: 0 0 12px rgba(239, 68, 68, 0.8); }
}
.cycle-ring-warning {
  animation: amberRingFlash 1.2s infinite ease-in-out !important;
}

/* 4. Chain-of-Custody Timeline Ribbon */
.custody-timeline-ribbon details[open] summary {
  color: #fbbf24 !important;
}
.timeline-event-pip:hover {
  background: rgba(255, 255, 255, 0.02);
  border-radius: 4px;
}

/* 5. Force Account Burn Meter */
.fema-burn-meter-track {
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.6);
}

/* ==========================================================================
   PHASE 20: TACTICAL PLAYBOOK BINDER & DYNAMIC TASK ESCALATION
   ========================================================================== */

.playbook-drawer {
  transition: right 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease;
}

.playbook-drawer.open {
  right: 0 !important;
  display: flex !important;
}

.sop-step-card {
  transition: border-color 0.15s ease, background 0.15s ease;
}
.sop-step-card:hover {
  background: rgba(255, 255, 255, 0.03) !important;
}

.iap-escalated-task-card {
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(241, 180, 52, 0.4);
  border-left: 4px solid var(--command-accent, #f1b434);
  border-radius: 6px;
  padding: 10px 12px;
  margin-bottom: 8px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.iap-escalated-task-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

/* ================= PHASE 22: FIELD OPTICAL SURVEY SUITE ================= */
#modal-optical-survey {
  transition: opacity 0.2s ease;
}

.survey-reticle-overlay {
  animation: reticle-pulse 2s infinite alternate ease-in-out;
}

@keyframes reticle-pulse {
  0% {
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.2);
    border-color: rgba(56, 189, 248, 0.6);
  }
  100% {
    box-shadow: 0 0 35px rgba(0, 240, 255, 0.45);
    border-color: rgba(0, 240, 255, 0.95);
  }
}

.survey-mode-pill {
  transition: all 0.15s ease;
}
.survey-mode-pill:hover {
  filter: brightness(1.15);
}

.survey-watermarked-card {
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(16, 185, 129, 0.5);
  border-left: 4px solid #10b981;
  border-radius: 6px;
  padding: 10px;
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: #fff;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

/* ================= PHASE 23: SCENARIO INJECTOR ENGINE ================= */
#modal-scenario-injector {
  transition: opacity 0.2s ease;
}

.scenario-tactical-div-icon {
  background: transparent;
  border: none;
}



