/* Zero out root margins and adjust for dark map background */
html, body {
  margin: 0 !important;
  padding: 0 !important;
  background-color: #0b0f19 !important;
  color: #e2e8f0;
  overflow-x: hidden;
  touch-action: manipulation;
}

.site-main,
.tech-layout-override {
  margin: 0 !important;
  padding: 0 !important;
  max-width: 100% !important;
  width: 100% !important;
}

.content-box {
  background: transparent !important;
  padding: 0 !important;
  box-shadow: none !important;
  border: none !important;
}

/* Command Header Navigation Bar */
.tech-navbar {
  width: 100%;
  background: rgba(11, 15, 25, 0.98);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0, 240, 255, 0.3);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.8);
  position: sticky;
  top: 0;
  z-index: 9999;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, monospace;
}

.tech-nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px;
  max-width: 100%;
}

.tech-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.hud-pulse {
  width: 10px;
  height: 10px;
  background-color: #00ff87;
  border-radius: 50%;
  box-shadow: 0 0 10px #00ff87;
  animation: hudGlow 1.8s infinite ease-in-out;
}

@keyframes hudGlow {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.3; transform: scale(0.8); }
}

.brand-link {
  color: #ffffff;
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: 1px;
  text-decoration: none;
}

.brand-sub {
  color: #00f0ff;
  font-size: 0.75rem;
  font-weight: 400;
}

/* Header Links */
.tech-menu {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 6px;
  color: #a0aec0;
  text-decoration: none;
  font-size: 0.75rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  transition: all 0.2s ease;
  touch-action: manipulation;
}

.nav-icon {
  width: 16px;
  height: 16px;
}

.nav-item:hover, .nav-item.active {
  color: #ffffff;
  background: rgba(0, 240, 255, 0.2);
  border-color: #00f0ff;
}

.nav-driver:hover { border-color: #27ae60; background: rgba(39, 174, 96, 0.25); }
.nav-dispatch:hover { border-color: #d35400; background: rgba(211, 84, 0, 0.25); }
.nav-admin:hover { border-color: #9b59b6; background: rgba(155, 89, 182, 0.25); }

.tech-menu-toggle {
  display: none;
  background: rgba(0, 240, 255, 0.1);
  border: 1px solid rgba(0, 240, 255, 0.4);
  color: #00f0ff;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
}

/* Open Screen Mobile Portal Action Cards */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 15px;
  padding: 15px;
  max-width: 1200px;
  margin: 0 auto;
}

@media (min-width: 768px) {
  .dashboard-grid {
    grid-template-columns: 1fr 1fr;
    padding: 25px;
  }
}

.dash-card {
  display: block;
  padding: 20px;
  border-radius: 10px;
  color: #ffffff;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.15);
  touch-action: manipulation;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.dash-card-driver {
  background: linear-gradient(135deg, rgba(39, 174, 96, 0.3) 0%, rgba(22, 110, 60, 0.6) 100%);
  border-color: rgba(39, 174, 96, 0.5);
}

.dash-card-dispatcher {
  background: linear-gradient(135deg, rgba(211, 84, 0, 0.3) 0%, rgba(140, 55, 0, 0.6) 100%);
  border-color: rgba(211, 84, 0, 0.5);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.dash-card h2 {
  font-size: 1.25rem;
  margin: 0;
}

.card-badge {
  font-size: 0.65rem;
  padding: 3px 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.2);
  letter-spacing: 0.5px;
}

.dash-card p {
  font-size: 0.9rem;
  margin: 0;
  opacity: 0.85;
}

/* Mobile Map Fixes - Prevent touch target interception and z-index blocking */
.leaflet-container, 
#map, 
iframe, 
.esri-view-root {
  z-index: 1 !important;
  touch-action: pan-x pan-y !important;
  pointer-events: auto !important;
}

.leaflet-control-container,
.map-overlay-buttons,
.leaflet-top, 
.leaflet-bottom {
  z-index: 500 !important;
  pointer-events: auto !important;
}

/* Responsive Mobile Rules */
@media (max-width: 768px) {
  .tech-menu-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
  }

  .tech-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: #0f172a;
    flex-direction: column;
    padding: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.8);
    border-bottom: 1px solid rgba(0, 240, 255, 0.3);
  }

  .tech-menu.is-open {
    display: flex;
  }

  .nav-item {
    width: 100%;
    padding: 12px 15px;
    font-size: 0.85rem;
  }
  /* Sign In / Sign Out Glowing HUD Button */
.nav-auth {
  border-color: rgba(0, 240, 255, 0.4) !important;
  color: #00f0ff !important;
  background: rgba(0, 240, 255, 0.1) !important;
}

.nav-auth:hover {
  background: rgba(0, 240, 255, 0.25) !important;
  border-color: #00f0ff !important;
  box-shadow: 0 0 12px rgba(0, 240, 255, 0.4) !important;
}
/* Header Action Group (Sign In + Menu Button) */
.tech-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 10001;
}

/* Permanently Visible HUD Sign In / Sign Out Button */
.hdr-auth-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 6px;
  color: #00f0ff;
  background: rgba(0, 240, 255, 0.12);
  border: 1px solid rgba(0, 240, 255, 0.4);
  font-size: 0.75rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition: all 0.2s ease;
  touch-action: manipulation;
}

.hdr-auth-btn:hover,
.hdr-auth-btn:active {
  background: rgba(0, 240, 255, 0.25);
  box-shadow: 0 0 12px rgba(0, 240, 255, 0.4);
  border-color: #00f0ff;
}

/* Responsive Fixes */
@media (max-width: 768px) {
  .tech-menu-toggle {
    display: flex;
    align-items: center;
    padding: 6px 10px;
  }
  
  .hdr-auth-btn {
    font-size: 0.7rem;
    padding: 6px 8px;
  }
  
  .hdr-auth-btn .nav-icon {
    width: 14px;
    height: 14px;
  }
}
/* Hide default page title headers on Field Ops page (ID: 69) */
.page-id-69 .page-title,
.page-id-69 .entry-title,
.page-id-69 h1 {
  display: none !important;
}
/* Driver Page (ID 69) Logout Button */
.driver-logout-wrapper {
  margin: 10px 0 20px 0;
  width: 100%;
  display: flex;
  justify-content: center;
}

.driver-logout-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  max-width: 400px;
  padding: 12px 20px;
  background: rgba(231, 76, 60, 0.15);
  color: #ff6b6b;
  border: 1px solid rgba(231, 76, 60, 0.5);
  border-radius: 8px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, monospace;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  transition: all 0.2s ease;
  touch-action: manipulation;
}

.driver-logout-btn:hover,
.driver-logout-btn:active {
  background: rgba(231, 76, 60, 0.3);
  border-color: #ff6b6b;
  color: #ffffff;
  box-shadow: 0 0 15px rgba(231, 76, 60, 0.5);
}
/* Hide top header bars and page headers */
header.tech-navbar,
.entry-header,
.page-header,
.page-title-wrap,
.page-title-section,
.wp-block-post-title,
.entry-title {
    display: none !important;
}

/* Zero out top margins and padding on parent containers */
body, 
main.site-main, 
.tech-layout-override, 
#snow-dispatcher-fullwidth-wrapper {
    margin-top: 0 !important;
    padding-top: 0 !important;
}
}