:root {
  --bg-dark: #071510;
  --bg-panel: #0d211a;
  --bg-card: #122c22;
  --bg-card-hover: #17382c;
  --border-col: rgba(16, 185, 129, 0.22);
  --text-main: #ecfdf5;
  --text-muted: #94b8a8;
  --emerald: #10b981;
  --emerald-bright: #34d399;
  --amber: #f59e0b;
  --cyan: #06b6d4;
  --orange: #f97316;
  --danger: #ef4444;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, sans-serif;
  line-height: 1.45;
  min-height: 100vh;
  padding-bottom: 84px;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}
::-webkit-scrollbar-track {
  background: var(--bg-dark);
}
::-webkit-scrollbar-thumb {
  background: #1f4738;
  border-radius: 4px;
}

/* Schematic Canvas & Tree Photo Pins */
.schematic-stage {
  position: relative;
  width: 100%;
  height: 490px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border-col);
  background:
    radial-gradient(circle at 20% 25%, rgba(16, 185, 129, 0.16), transparent 55%),
    radial-gradient(circle at 80% 75%, rgba(6, 182, 212, 0.12), transparent 55%),
    linear-gradient(160deg, #092018 0%, #06140f 100%);
  background-size: 100% 100%;
  user-select: none;
  touch-action: manipulation;
}

.schematic-grid-overlay {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 5% 5%;
  pointer-events: none;
}

.zone-box {
  position: absolute;
  border-radius: 12px;
  border: 2px solid rgba(16, 185, 129, 0.55);
  background: rgba(16, 185, 129, 0.13);
  backdrop-filter: blur(2px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 8px 10px;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.zone-box:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
  border-color: #34d399;
}

/* Tree Photo Pin Marker on Schematic & Map */
.tree-pin-marker {
  position: absolute;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  z-index: 25;
  transition: transform 0.15s ease;
}

.tree-pin-marker:hover,
.tree-pin-marker.active-pin {
  transform: translate(-50%, -50%) scale(1.1);
  z-index: 40;
}

/* Anti-duplicate visual radius ring */
.tree-pin-radius {
  position: absolute;
  width: 68px;
  height: 68px;
  border-radius: 9999px;
  border: 1px dashed rgba(245, 158, 11, 0.35);
  background: rgba(245, 158, 11, 0.04);
  pointer-events: none;
  top: 22px;
  left: 50%;
  transform: translate(-50%, -50%);
}

.tree-pin-marker.identified .tree-pin-radius {
  border-color: rgba(16, 185, 129, 0.35);
  background: rgba(16, 185, 129, 0.04);
}

.tree-pin-avatar {
  width: 46px;
  height: 46px;
  border-radius: 9999px;
  border: 3px solid var(--amber);
  background-color: #1c1917;
  background-size: cover;
  background-position: center;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.65);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
}

.tree-pin-marker.identified .tree-pin-avatar {
  border-color: var(--emerald-bright);
}

.tree-pin-badge {
  position: absolute;
  top: -6px;
  right: -8px;
  padding: 1px 6px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  background: var(--amber);
  color: #000;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
}

.tree-pin-marker.identified .tree-pin-badge {
  background: var(--emerald-bright);
  color: #022c22;
}

.tree-pin-label {
  margin-top: 4px;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  background: rgba(245, 158, 11, 0.95);
  color: #000;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.tree-pin-marker.identified .tree-pin-label {
  background: rgba(5, 150, 105, 0.95);
  color: #fff;
}

/* Satellite Leaflet Map Container */
#satellite-map-container {
  width: 100%;
  height: 490px;
  border-radius: 16px;
  border: 1px solid var(--border-col);
  z-index: 5;
}

/* Canteiro 8-slot Visual Grid */
.canteiro-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.canteiro-slot {
  min-height: 86px;
  border-radius: 12px;
  border: 1px dashed rgba(16, 185, 129, 0.35);
  background: rgba(13, 33, 26, 0.75);
  padding: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.canteiro-slot.occupied {
  border-style: solid;
  border-color: rgba(16, 185, 129, 0.65);
  background: rgba(16, 185, 129, 0.14);
}

.canteiro-slot:hover {
  border-color: #34d399;
  background: rgba(16, 185, 129, 0.22);
}

/* Floating Quick Camera Action Button for Mobile Walk */
.fab-camera {
  position: fixed;
  right: 18px;
  bottom: 22px;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  border-radius: 9999px;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #000;
  font-weight: 800;
  font-size: 14px;
  box-shadow: 0 10px 25px rgba(245, 158, 11, 0.4);
  border: 2px solid rgba(255, 255, 255, 0.35);
  cursor: pointer;
  transition: transform 0.15s ease;
}

.fab-camera:hover {
  transform: scale(1.04);
}
