:root {
  /* Color Palette - High Contrast & Modern */
  --bg-dark: #0a0a0c;
  --bg-card: #16161a;
  --accent-primary: #00f2ff; /* Electric Cyan */
  --accent-secondary: #7000ff; /* Deep Purple */
  --text-main: #ffffff;
  --text-muted: #a0a0ab;
  --status-success: #00ff9d;
  --status-warning: #ffb800;
  --status-danger: #ff3b3b;
  
  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 48px;
  --space-2xl: 80px;
  
  /* Borders & Radius */
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --border-color: rgba(255, 255, 255, 0.1);
}

* {
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
}

body {
  margin: 0;
  padding: 0;
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-main);
  line-height: 1.5;
  overflow-x: hidden;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 clamp(1rem, 5vw, 2rem);
}

/* Typography */
h1, h2, h3 {
  margin: 0;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.text-gradient {
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Navigation */
nav {
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-color);
  background: rgba(10, 10, 12, 0.8);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 100;
}

.logo {
  font-size: 1.5rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-links {
  display: flex;
  gap: var(--space-lg);
}

.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

.nav-link:hover, .nav-link.active {
  color: var(--accent-primary);
}

/* Buttons */
.btn {
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  color: white;
}

.btn-danger {
  background: var(--status-danger);
  color: white;
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-main);
}

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

.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid-map-sidebar { grid-template-columns: 2.5fr 1fr; }

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  overflow: hidden;
  position: relative;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent-primary), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.card:hover::before {
  opacity: 1;
}

/* Dashboard Specific */
.stat-value {
  font-size: 2.5rem;
  font-weight: 800;
  margin: var(--space-sm) 0;
}

.status-indicator {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
}

.status-online { background: var(--status-success); box-shadow: 0 0 10px var(--status-success); }
.status-offline { background: var(--status-muted); }

/* Components */
.flex-between {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.flex-center {
  display: flex;
  align-items: center;
  gap: 12px;
}

.table-container {
  overflow-x: auto;
}

.wf-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.wf-table th {
  padding: 16px;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 0.85rem;
  text-transform: uppercase;
}

.wf-table td {
  padding: 16px;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.9rem;
}

.map-info-panel {
  position: absolute;
  bottom: 20px;
  left: 20px;
  right: 20px;
  background: rgba(0,0,0,0.85);
  padding: 20px;
  border-radius: var(--radius-md);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.map-grid-overlay {
  position: absolute;
  inset: 0;
  opacity: 0.1;
  pointer-events: none;
  background-image: radial-gradient(var(--accent-primary) 1px, transparent 1px);
  background-size: 40px 40px;
}

.placeholder-image {
  background: #252529;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  position: relative;
  aspect-ratio: 16/9;
}

.placeholder-image::after {
  content: attr(data-label);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.placeholder-avatar {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, #333, #555);
  border-radius: 50%;
}

/* Animations */
@keyframes pulse {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.05); opacity: 0.8; }
  100% { transform: scale(1); opacity: 1; }
}

.pulse-animation {
  animation: pulse 2s infinite ease-in-out;
}

/* SOS Button Style */
.sos-trigger {
  background: rgba(255, 59, 59, 0.1);
  border: 2px solid var(--status-danger);
  padding: var(--space-xl);
  border-radius: var(--radius-lg);
  text-align: center;
  margin-top: var(--space-xl);
}

.sos-btn-large {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: var(--status-danger);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--space-md);
  box-shadow: 0 0 30px rgba(255, 59, 59, 0.5);
  cursor: pointer;
  border: none;
  font-weight: 900;
  font-size: 1.2rem;
}

/* Map Placeholder */
.map-view {
  height: 400px;
  background: #1a1a20;
  border-radius: var(--radius-md);
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border-color);
}

.map-marker {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 24px;
  height: 24px;
  background: var(--accent-primary);
  border: 4px solid white;
  border-radius: 50%;
  box-shadow: 0 0 20px var(--accent-primary);
}

.map-marker::after {
  content: '';
  position: absolute;
  top: -10px;
  left: -10px;
  right: -10px;
  bottom: -10px;
  border: 2px solid var(--accent-primary);
  border-radius: 50%;
  animation: pulse 1.5s infinite;
}

@media (max-width: 768px) {
  :root {
    --space-xl: 32px;
    --space-2xl: 48px;
  }
  
  nav {
    height: 70px;
    padding: 0 var(--space-md);
  }
  
  .nav-links {
    display: none; /* In a real app we'd have a menu, but for this wireframe we focus on the core dashboard */
  }
  
  .grid-cols-2, .grid-cols-3, .grid-map-sidebar {
    grid-template-columns: 1fr;
  }
  
  .stat-value {
    font-size: 2rem;
  }
  
  .sos-btn-large {
    width: 100px;
    height: 100px;
  }
  
  .header-actions {
    flex-direction: column;
    gap: var(--space-md);
    align-items: flex-start;
  }
  
  .mobile-hide {
    display: none;
  }
  
  .mobile-full {
    width: 100%;
    justify-content: center;
  }
}

/* New Mobile Bottom Nav */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(10, 10, 12, 0.95);
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--border-color);
  display: none;
  justify-content: space-around;
  padding: 12px 0;
  z-index: 1000;
}

@media (max-width: 768px) {
  .bottom-nav {
    display: flex;
  }
  body {
    padding-bottom: 80px;
  }
}

.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.7rem;
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.05em;
}

.bottom-nav-item.active {
  color: var(--accent-primary);
}

/* Feed Specifics */
.feed-label {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(0,0,0,0.6);
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-main);
  z-index: 2;
}

.feed-status {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.65rem;
  font-weight: 700;
  z-index: 2;
}
