/* ==========================================================================
   BMB Command Center Pro - Tactical Visual Theme
   Visual Aesthetic: Dark Tactical Operations Platform
   Colors: Near-Black, Gunmetal, Charcoal, Olive, Sand, Emerald Accent
   ========================================================================== */

:root {
  --bg-darker: #080b0e;
  --bg-dark: #0f1418;
  --bg-card: #161c22;
  --bg-card-hover: #1e2630;
  --border-dark: rgba(255, 255, 255, 0.08);
  --border-accent: #10b981;
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --accent-green: #10b981;
  --accent-amber: #f59e0b;
  --accent-red: #ef4444;
  --accent-blue: #3b82f6;
  --accent-sand: #d4c5a9;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
  --font-sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

body {
  background-color: var(--bg-darker);
  color: var(--text-main);
  font-family: var(--font-sans);
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Custom Tactical Monospace Elements */
.font-mono-tactical {
  font-family: var(--font-mono);
  letter-spacing: 0.05em;
}

/* Tactical Grid Background Overlay */
.tactical-grid-bg {
  background-image: 
    linear-gradient(to right, rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 24px 24px;
}

/* Premium HUD Cards */
.hud-card {
  background: linear-gradient(180deg, rgba(22, 28, 34, 0.85) 0%, rgba(15, 20, 24, 0.95) 100%);
  border: 1px solid var(--border-dark);
  border-radius: 4px;
  position: relative;
  transition: all 0.2s ease-in-out;
  backdrop-filter: blur(8px);
}

.hud-card:hover {
  border-color: rgba(16, 185, 129, 0.3);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.hud-card-header {
  border-bottom: 1px solid var(--border-dark);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(0, 0, 0, 0.2);
}

.hud-card-title {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
}

.hud-card-body {
  padding: 16px;
}

/* Glowing Tactical Indicators */
.pulse-emerald {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #10b981;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: pulse-green 2s infinite;
}

@keyframes pulse-green {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 6px rgba(16, 185, 129, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
  }
}

.pulse-red {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #ef4444;
  box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
  animation: pulse-crimson 1.5s infinite;
}

@keyframes pulse-crimson {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 6px rgba(239, 68, 68, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
  }
}

/* Status Badges */
.badge-tactical {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 2px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid transparent;
}

.badge-operational, .badge-online, .badge-completed {
  background: rgba(16, 185, 129, 0.12);
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.3);
}

.badge-damaged, .badge-briefing, .badge-away, .badge-paused {
  background: rgba(245, 158, 11, 0.12);
  color: #fbbf24;
  border-color: rgba(245, 158, 11, 0.3);
}

.badge-attack, .badge-compromised, .badge-critical, .badge-failed, .badge-aborted {
  background: rgba(239, 68, 68, 0.12);
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.3);
}

.badge-abandoned, .badge-offline, .badge-planned {
  background: rgba(100, 116, 139, 0.12);
  color: #94a3b8;
  border-color: rgba(100, 116, 139, 0.3);
}

/* Tactical Form Controls */
.tactical-input {
  background-color: rgba(15, 20, 24, 0.9);
  border: 1px solid var(--border-dark);
  color: var(--text-main);
  border-radius: 4px;
  padding: 8px 12px;
  font-size: 0.875rem;
  width: 100%;
  transition: all 0.2s;
}

.tactical-input:focus {
  outline: none;
  border-color: var(--accent-green);
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
}

.tactical-btn {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 8px 16px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.2s;
  border: 1px solid transparent;
}

.tactical-btn-primary {
  background-color: var(--accent-green);
  color: #042f1a;
  border-color: #059669;
}

.tactical-btn-primary:hover {
  background-color: #34d399;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.4);
}

.tactical-btn-secondary {
  background-color: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
  border-color: var(--border-dark);
}

.tactical-btn-secondary:hover {
  background-color: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

.tactical-btn-danger {
  background-color: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.4);
}

.tactical-btn-danger:hover {
  background-color: var(--accent-red);
  color: #ffffff;
}

/* Tactical Data Tables */
.tactical-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.tactical-table th {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  background-color: rgba(0, 0, 0, 0.3);
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border-dark);
}

.tactical-table td {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  color: var(--text-main);
  vertical-align: middle;
}

.tactical-table tr:hover td {
  background-color: rgba(255, 255, 255, 0.02);
}

/* Custom Image Map Container */
.map-canvas-container {
  position: relative;
  width: 100%;
  height: 600px;
  background-color: #050709;
  overflow: hidden;
  border: 1px solid var(--border-dark);
  border-radius: 4px;
  user-select: none;
}

.map-canvas-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  transform-origin: 0 0;
  cursor: grab;
}

.map-canvas-wrapper:active {
  cursor: grabbing;
}

.map-marker-pin {
  position: absolute;
  transform: translate(-50%, -100%);
  cursor: pointer;
  transition: transform 0.15s ease, filter 0.15s ease;
  z-index: 10;
}

.map-marker-pin:hover {
  transform: translate(-50%, -100%) scale(1.25);
  filter: drop-shadow(0 0 8px rgba(16, 185, 129, 0.8));
  z-index: 20;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: var(--bg-darker);
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(16, 185, 129, 0.5);
}

/* Toast Notifications Container */
#toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  background: #161c22;
  border: 1px solid var(--border-accent);
  color: #ffffff;
  padding: 12px 16px;
  border-radius: 4px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 280px;
  animation: toast-in 0.3s ease-out;
}

@keyframes toast-in {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
