:root {
  --gg-bg: #050915;
  --gg-bg-alt: #0b1020;
  --gg-accent: #f39c12;
  --gg-accent-soft: rgba(243, 156, 18, 0.2);
  --gg-text: #f8f9fa;
  --gg-muted: #9aa1b2;
}

body.gg-body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: radial-gradient(circle at top, #151c30 0, #050915 55%, #000 100%);
  color: var(--gg-text);
  height: 100vh;
  margin: 0;
}

.gg-navbar {
  background: linear-gradient(90deg, #050915, #0b1a30);
  border-bottom: 1px solid #111827;
}

.gg-layout {
  position: relative;
  display: flex;
  height: calc(100vh - 56px);
  overflow: hidden;
}

/* Sidebar */

.gg-sidebar {
  width: 320px;
  max-width: 100%;
  background: rgba(5, 9, 21, 0.96);
  border-right: 1px solid #111827;
  padding: 0.75rem 0.75rem 0.75rem 0.75rem;
  overflow-y: auto;
  transition: transform 0.25s ease, width 0.25s ease, padding 0.25s ease;
  z-index: 800;
}

.gg-sidebar.collapsed {
  transform: translateX(-100%);
  width: 0;
  padding-left: 0;
  padding-right: 0;
  border-right: 0;
  overflow: hidden;
}

/* Floating sidebar toggle button (visible when collapsed) */
.gg-sidebar-toggle-fab {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 850;
  background: rgba(5, 9, 21, 0.9);
  border-radius: 999px;
  padding: 0.25rem 0.6rem;
  border: 1px solid #111827;
  font-size: 0.8rem;
}

.gg-aircraft-list {
  max-height: calc(100vh - 56px - 130px);
  overflow-y: auto;
  padding-right: 4px;
}

.gg-aircraft-item {
  border-radius: 0.4rem;
  padding: 0.35rem 0.4rem;
  margin-bottom: 0.25rem;
  background: #050915;
  border: 1px solid #111827;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
  font-size: 0.82rem;
}

.gg-aircraft-item:hover {
  background: #0b1020;
  border-color: var(--gg-accent-soft);
}

.gg-aircraft-item .title {
  font-weight: 600;
}

.gg-aircraft-item .meta {
  color: var(--gg-muted);
}

/* Map */

.gg-map {
  flex: 1;
  position: relative;
}

.gg-map .leaflet-container {
  background: #020617;
}

/* Legend */

.gg-legend {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 900;
  background: rgba(5, 9, 21, 0.75); /* more translucent */
  border-radius: 0.5rem;
  padding: 0.5rem 0.6rem;
  border: 1px solid #111827;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  min-width: 180px;
}

.legend-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.2rem;
}

.legend-color {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  display: inline-block;
}

/* Status */

.gg-map-status {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 10px;
  z-index: 900;
  background: rgba(5, 9, 21, 0.9);
  border-radius: 999px;
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  border: 1px solid #111827;
  color: var(--gg-muted);
}

/* Plane markers */

.plane-marker {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: #00ff00;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: #050915;
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.75);
  transition: transform 0.1s linear, opacity 0.3s ease;
}

.plane-marker span {
  display: block;
  transform-origin: center center;
}

/* Node markers (admin) */

.node-marker {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  background: #00bcd4;
  border: 1px solid #e0f7fa;
  box-shadow: 0 0 6px rgba(0, 188, 212, 0.7);
}

/* Modal */

.gg-modal {
  background: #050915;
  color: var(--gg-text);
  border-radius: 0.75rem;
  border: 1px solid #111827;
}

.gg-modal .form-control {
  background-color: #020617;
  border-color: #111827;
  color: var(--gg-text);
}

.gg-modal .form-control:focus {
  border-color: var(--gg-accent);
  box-shadow: 0 0 0 0.1rem rgba(243, 156, 18, 0.35);
}

/* Mobile */

@media (max-width: 768px) {
  .gg-sidebar {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
  }
}
