* {
  box-sizing: border-box;
}

/* ── Telescope HUD Overlay ── */
.telescope-hud {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  overflow: hidden;
}

.hud-crosshair-h, .hud-crosshair-v {
  position: absolute;
  background: rgba(76, 175, 80, 0.08);
}

.hud-crosshair-h {
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
}

.hud-crosshair-v {
  left: 50%;
  top: 0;
  bottom: 0;
  width: 1px;
}

.hud-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  border-radius: 50%;
  border: 1px solid rgba(76, 175, 80, 0.06);
  transform: translate(-50%, -50%);
}

.hud-ring-1 {
  width: 200px;
  height: 200px;
}

.hud-ring-2 {
  width: 400px;
  height: 400px;
}

.hud-corner {
  position: absolute;
  width: 30px;
  height: 30px;
  border-color: rgba(76, 175, 80, 0.15);
  border-style: solid;
  border-width: 0;
}

.hud-corner-tl { top: 12px; left: 12px; border-top-width: 1px; border-left-width: 1px; }
.hud-corner-tr { top: 12px; right: 12px; border-top-width: 1px; border-right-width: 1px; }
.hud-corner-bl { bottom: 12px; left: 12px; border-bottom-width: 1px; border-left-width: 1px; }
.hud-corner-br { bottom: 12px; right: 12px; border-bottom-width: 1px; border-right-width: 1px; }

.hud-scanline {
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(76, 175, 80, 0.04), transparent);
  animation: scanline 8s linear infinite;
}

@keyframes scanline {
  0% { top: 0; }
  100% { top: 100%; }
}

.hud-coords {
  position: absolute;
  bottom: 60px;
  left: 50%;
  transform: translateX(-50%);
  font-family: "Inter", monospace;
  font-size: 11px;
  color: rgba(76, 175, 80, 0.5);
  letter-spacing: 1px;
  text-align: center;
  white-space: nowrap;
}

/* Hide all Cesium chrome — clean globe only */
.cesium-viewer-toolbar,
.cesium-viewer-bottom,
.cesium-viewer-fullscreenContainer,
.cesium-credit-logoContainer,
.cesium-credit-textContainer,
.cesium-widget-credits,
.cesium-viewer .cesium-widget-credits {
  display: none !important;
}

html,
body,
#app,
#cesiumContainer {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #070b10;
  color: #e6eef8;
}

#app {
  position: relative;
}

.brand {
  position: absolute;
  top: 14px;
  left: 16px;
  z-index: 20;
  background: rgba(10, 18, 10, 0.72);
  border: 1px solid rgba(76, 175, 80, 0.25);
  border-radius: 10px;
  padding: 10px 14px;
  backdrop-filter: blur(8px);
}

.quick-toolbar {
  position: absolute;
  top: 14px;
  left: 200px;
  z-index: 20;
  display: flex;
  gap: 6px;
  align-items: center;
}

.quick-toolbar button {
  margin: 0;
  padding: 7px 12px;
  font-size: 11px;
  font-weight: 400;
  font-family: "Inter", -apple-system, sans-serif;
  background: rgba(10, 18, 10, 0.8);
  color: #c8d8c8;
  border: 1px solid rgba(76, 175, 80, 0.15);
  border-radius: 6px;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: all 0.3s ease;
  letter-spacing: 0.3px;
}

.quick-toolbar button:hover {
  background: rgba(20, 35, 20, 0.9);
  border-color: rgba(76, 175, 80, 0.3);
  color: #e8ede8;
}

.brand h1 {
  font-size: 20px;
  margin: 0;
  letter-spacing: 0.5px;
}

.brand p {
  margin: 2px 0 0;
  font-size: 12px;
  opacity: 0.8;
}

.location-search {
  position: absolute;
  top: 58px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  display: flex;
  gap: 8px;
  align-items: center;
  max-width: min(420px, calc(100% - 400px));
  /* for dropdown positioning */
  flex-wrap: wrap;
}

.location-search input {
  flex: 1;
  min-width: 0;
  background: rgba(255, 255, 255, 0.05);
  color: #e8ede8;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 13px;
}

.location-search button {
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  border: 0;
  border-radius: 8px;
  padding: 8px 14px;
  cursor: pointer;
  font-weight: 600;
  font-size: 13px;
}

.location-search button:hover {
  background: rgba(255, 255, 255, 0.1);
}

.search-suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 4px;
  list-style: none;
  padding: 4px 0;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  max-height: 260px;
  overflow-y: auto;
  z-index: 30;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
}
.search-suggestions.hidden { display: none; }
.search-suggestions li {
  padding: 9px 14px;
  font-size: 13px;
  color: #c8dce8;
  cursor: pointer;
  line-height: 1.35;
}
.search-suggestions li:hover,
.search-suggestions li.active {
  background: #1a2a42;
  color: #fff;
}
.search-suggestions li .suggestion-secondary {
  display: block;
  font-size: 11px;
  color: #6a8399;
  margin-top: 1px;
}

.controls {
  position: absolute;
  top: 100px;
  left: 16px;
  z-index: 20;
  width: 300px;
  max-height: calc(100vh - 200px);
  display: flex;
  flex-direction: column;
  gap: 0;
  background: rgba(10, 18, 10, 0.88);
  border: 1px solid rgba(76, 175, 80, 0.15);
  border-radius: 12px;
  padding: 0;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: width 0.2s ease, min-width 0.2s ease;
  overflow: hidden;
  font-family: "Inter", -apple-system, sans-serif;
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}

.controls-inner {
  padding: 12px 14px 14px;
  overflow-y: auto;
  max-height: calc(100vh - 220px);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.controls--collapsed {
  width: 44px;
  min-width: 44px;
}

.controls--collapsed .controls-inner {
  display: none;
}

.controls--collapsed .sidebar-toggle {
  border-radius: 10px;
  justify-content: center;
  padding: 10px 6px;
}

.controls--collapsed .sidebar-toggle-text {
  display: none;
}

.controls--collapsed .sidebar-toggle-icon {
  transform: rotate(180deg);
}

.controls .sidebar-toggle {
  margin-top: 0;
}

.sidebar-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  margin: 0;
  padding: 10px 12px;
  font-size: 11px;
  font-weight: 500;
  color: #9aaa9a;
  background: rgba(12, 22, 12, 0.9);
  border: 0;
  border-bottom: 1px solid rgba(76, 175, 80, 0.1);
  border-radius: 12px 12px 0 0;
  cursor: pointer;
  flex-shrink: 0;
  letter-spacing: 0.3px;
}

.sidebar-toggle:hover {
  background: rgba(20, 35, 20, 0.95);
  color: #c8d8c8;
}

.sidebar-toggle-icon {
  font-size: 10px;
  transition: transform 0.2s ease;
}

.controls h2 {
  margin: 0 0 4px;
  font-size: 14px;
  font-weight: 500;
  color: #e8ede8;
  letter-spacing: 0.3px;
}

.panel-subhead {
  margin: 10px 0 2px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: #4caf50;
  font-weight: 500;
}

.small-hint {
  margin-top: 0 !important;
  margin-bottom: 6px !important;
}

.layer-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 4px;
}

.layer-row {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px 10px 8px 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-left-width: 3px;
  transition: all 0.3s ease;
}

.layer-row--loading::after {
  content: "";
  width: 14px;
  height: 14px;
  border: 2px solid rgba(76, 175, 80, 0.3);
  border-top-color: #4caf50;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
}

@keyframes spin {
  to { transform: translateY(-50%) rotate(360deg); }
}

.layer-row--loaded {
  background: rgba(76, 175, 80, 0.15) !important;
  transition: background 0.6s;
}

.layer-row:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(76, 175, 80, 0.15);
}

.layer-row-ndvi {
  border-left-color: #45bf60;
}

.layer-row-smap {
  border-left-color: #5eb8ff;
}

.layer-row-soc {
  border-left-color: #c4965e;
}

.layer-row-ph {
  border-left-color: #b565c7;
}

.layer-row-clay {
  border-left-color: #a8986b;
}

.layer-row-nitrogen {
  border-left-color: #7acb7a;
}

.layer-row-wss {
  border-left-color: #e8a838;
}

.layer-row-cdl {
  border-left-color: #e06060;
}

.layer-check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 400;
  color: #c8d8c8;
  cursor: pointer;
  user-select: none;
}

.layer-check input {
  width: auto;
  margin: 0;
}

.opacity-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-left: 24px;
}

.opacity-hint {
  font-size: 10px;
  opacity: 0.75;
  flex-shrink: 0;
  min-width: 52px;
}

.opacity-wrap input[type="range"] {
  flex: 1;
  min-width: 0;
}

.controls label {
  font-size: 11px;
  color: #9aaa9a;
  font-weight: 400;
  letter-spacing: 0.3px;
}

.controls input {
  background: rgba(255, 255, 255, 0.05);
  color: #e8ede8;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 13px;
  transition: border-color 0.3s;
}

.controls input:focus {
  border-color: rgba(76, 175, 80, 0.4);
  outline: none;
}

.controls select {
  background: rgba(255, 255, 255, 0.05);
  color: #e8ede8;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 13px;
}

.controls input[type="range"] {
  padding: 0;
}

.controls button {
  margin-top: 4px;
  background: #4caf50;
  color: #0a0f0a;
  border: 0;
  border-radius: 8px;
  padding: 10px 12px;
  cursor: pointer;
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0.3px;
  transition: all 0.3s ease;
}

.controls button:hover {
  background: #81c784;
  transform: translateY(-1px);
}

.soil-actions {
  display: flex;
  gap: 8px;
  margin-top: 2px;
}

.soil-actions button {
  flex: 1;
  margin-top: 0;
  padding: 8px 10px;
  font-size: 12px;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.06) !important;
  color: #c8d8c8 !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1) !important;
  border-color: rgba(76, 175, 80, 0.2) !important;
}

.date-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

#dateLabel {
  font-size: 13px;
  color: #9aaa9a;
}

.btn-latest {
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 600;
  background: #1b5e20;
  color: #a5d6a7;
  border: 1px solid rgba(102, 187, 106, 0.35);
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
}
.btn-latest:hover {
  background: #2e7d32;
}

#playPauseBtn {
  margin: 0;
  padding: 7px 12px;
  background: rgba(255, 255, 255, 0.06);
}

#playPauseBtn:hover {
  background: rgba(255, 255, 255, 0.1);
}

.hint {
  margin: 4px 0 0;
  font-size: 11px;
  color: #7a8a7a;
  font-weight: 300;
}

.legend {
  margin-top: 6px;
  border: 1px solid rgba(76, 175, 80, 0.15);
  border-radius: 8px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.03);
}

.legend-title {
  font-size: 11px;
  opacity: 0.85;
  margin-bottom: 6px;
}

.legend-bar {
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, #dc3f3f 0%, #efc349 50%, #45bf60 100%);
}

.legend-labels {
  margin-top: 5px;
  font-size: 10px;
  opacity: 0.8;
  display: flex;
  justify-content: space-between;
}

.separator {
  border: 0;
  border-top: 1px solid rgba(76, 175, 80, 0.1);
  margin: 10px 0;
}

.details-panel {
  position: absolute;
  right: 16px;
  top: 90px;
  z-index: 20;
  width: 360px;
  max-height: calc(100% - 110px);
  overflow: auto;
  background: rgba(10, 18, 10, 0.88);
  border: 1px solid rgba(76, 175, 80, 0.15);
  border-radius: 12px;
  padding: 14px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
  font-family: "Inter", -apple-system, sans-serif;
}

.details-panel.hidden {
  display: none;
}

.details-panel h3 {
  margin: 0 0 10px;
}

#pinMeta {
  font-size: 13px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 12px;
  margin-bottom: 12px;
}

.meta-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.meta-item span {
  opacity: 0.72;
  font-size: 11px;
}

.meta-item strong {
  font-weight: 500;
  color: #e8ede8;
}

#historySparkline {
  width: 100%;
  border: 1px solid rgba(76, 175, 80, 0.15);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
}

.stats-bar {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 12px;
  z-index: 25;
  display: flex;
  flex-wrap: wrap;
  gap: 16px 24px;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  background: rgba(10, 18, 10, 0.88);
  border: 1px solid rgba(76, 175, 80, 0.15);
  border-radius: 10px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  font-size: 12px;
  font-family: "Inter", -apple-system, sans-serif;
}

.stats-bar .stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 90px;
  text-align: center;
}

.stats-bar .stat-label {
  opacity: 0.72;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.stats-bar .stat-value {
  font-size: 15px;
  font-weight: 500;
  color: #e8ede8;
}

/* ── AI Chat ─────────────────────────────── */
.ai-chat-toggle {
  position: absolute;
  bottom: 80px;
  right: 20px;
  z-index: 25;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, #1b5e20, #2e7d32);
  color: #a5d6a7;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
  transition: transform 0.15s, box-shadow 0.15s;
}
.ai-chat-toggle:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 22px rgba(27,94,32,0.5);
}

.ai-chat-panel {
  position: absolute;
  bottom: 60px;
  right: 16px;
  z-index: 30;
  width: 380px;
  max-height: calc(100vh - 140px);
  display: flex;
  flex-direction: column;
  background: rgba(10, 18, 10, 0.92);
  border: 1px solid rgba(76, 175, 80, 0.2);
  border-radius: 14px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 8px 40px rgba(0,0,0,0.5);
  overflow: hidden;
  font-family: "Inter", -apple-system, sans-serif;
}
.ai-chat-panel.hidden { display: none; }

.ai-chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(76, 175, 80, 0.1);
}
.ai-chat-header h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: #81c784;
}
.ai-chat-close {
  background: none;
  border: none;
  color: #6a8399;
  font-size: 20px;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}
.ai-chat-close:hover { color: #fff; }

.ai-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 200px;
  max-height: 420px;
}

.ai-msg {
  max-width: 92%;
  font-size: 13px;
  line-height: 1.5;
  padding: 10px 14px;
  border-radius: 12px;
  word-wrap: break-word;
}
.ai-msg p { margin: 0 0 6px; }
.ai-msg p:last-child { margin-bottom: 0; }

.ai-msg-bot {
  align-self: flex-start;
  background: rgba(27, 94, 32, 0.2);
  border: 1px solid rgba(102, 187, 106, 0.2);
  color: #c8dce8;
}
.ai-msg-user {
  align-self: flex-end;
  background: rgba(30, 60, 100, 0.35);
  border: 1px solid rgba(76, 175, 80, 0.2);
  color: #e8ede8;
}
.ai-msg-typing {
  align-self: flex-start;
  color: #6a8399;
  font-style: italic;
  background: none;
  border: none;
  padding: 4px 0;
}

.ai-chat-input-row {
  display: flex;
  gap: 8px;
  padding: 10px 14px;
  border-top: 1px solid rgba(76, 175, 80, 0.1);
}
.ai-chat-input-row input {
  flex: 1;
  min-width: 0;
  background: rgba(255, 255, 255, 0.05);
  color: #e8ede8;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 9px 12px;
  font-size: 13px;
  font-family: "Inter", -apple-system, sans-serif;
  transition: border-color 0.3s;
}
.ai-chat-input-row input:focus {
  border-color: rgba(76, 175, 80, 0.4);
  outline: none;
}
.ai-chat-input-row button {
  flex-shrink: 0;
  background: #4caf50;
  color: #0a0f0a;
  border: none;
  border-radius: 8px;
  padding: 9px 14px;
  font-weight: 500;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.3s ease;
}
.ai-chat-input-row button:hover {
  background: #81c784;
}

@media (max-width: 500px) {
  .ai-chat-panel {
    width: calc(100vw - 24px);
    right: 12px;
    bottom: 50px;
  }
}

.context-panel {
  position: absolute;
  right: 16px;
  top: auto;
  bottom: 118px;
  z-index: 19;
  width: 300px;
  max-height: min(220px, 28vh);
  overflow: auto;
  background: rgba(10, 18, 10, 0.88);
  border: 1px solid rgba(76, 175, 80, 0.15);
  border-radius: 12px;
  padding: 12px 14px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  font-size: 12px;
  font-family: "Inter", -apple-system, sans-serif;
}

.context-panel h3 {
  margin: 0 0 6px;
  font-size: 14px;
}

.context-hint {
  margin: 0 0 10px;
  opacity: 0.75;
  font-size: 11px;
}

.context-layer-block {
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(76, 175, 80, 0.1);
}

.context-layer-block:last-child {
  border-bottom: 0;
  margin-bottom: 0;
  padding-bottom: 0;
}

.context-layer-title {
  font-weight: 500;
  color: #e8ede8;
  margin-bottom: 4px;
}

.context-layer-text {
  opacity: 0.88;
  line-height: 1.4;
}

.context-legend-note {
  margin-top: 6px;
  padding: 6px 8px;
  border-radius: 6px;
  background: rgba(69, 191, 96, 0.12);
  border: 1px solid rgba(69, 191, 96, 0.25);
  font-size: 11px;
}

.map-tooltip {
  position: fixed;
  z-index: 50;
  max-width: 340px;
  padding: 10px 12px;
  font-size: 12px;
  line-height: 1.45;
  color: #e8ede8;
  background: rgba(10, 18, 10, 0.92);
  border: 1px solid rgba(76, 175, 80, 0.2);
  border-radius: 8px;
  pointer-events: none;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
  font-family: "Inter", -apple-system, sans-serif;
}

.map-tooltip.hidden {
  display: none;
}

.map-tooltip .tooltip-coord {
  font-size: 10px;
  opacity: 0.72;
  margin-bottom: 8px;
}

.map-tooltip .tooltip-block {
  margin-bottom: 8px;
}

.map-tooltip .tooltip-block:last-child {
  margin-bottom: 0;
}

.welcome-overlay {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(6, 13, 6, 0.65);
  backdrop-filter: blur(4px);
  padding: 24px;
  cursor: pointer;
  pointer-events: auto;
}

.welcome-overlay.hidden {
  display: none;
}

.welcome-card {
  max-width: 520px;
  background: rgba(10, 18, 10, 0.96);
  border: 1px solid rgba(76, 175, 80, 0.3);
  border-radius: 14px;
  padding: 22px 26px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
  pointer-events: auto;
  cursor: default;
}

.welcome-card h2 {
  margin: 0 0 12px;
  font-size: 22px;
}

.welcome-card p {
  margin: 0 0 12px;
  line-height: 1.55;
  opacity: 0.92;
}

.welcome-card ul {
  margin: 0 0 18px;
  padding-left: 1.2em;
  line-height: 1.55;
  opacity: 0.9;
}

.btn-welcome {
  margin: 0;
  padding: 10px 20px;
  width: 100%;
  font-weight: 600;
}

@media (max-width: 900px) {
  .quick-toolbar {
    left: 16px;
    top: 100px;
  }

  .context-panel {
    width: 260px;
    font-size: 11px;
  }
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.btn-draw-prop {
  margin-top: 0 !important;
  background: #1a5c3a !important;
  border: 1px solid rgba(0, 230, 118, 0.45) !important;
}

.btn-draw-prop:hover {
  background: #227848 !important;
}

.btn-draw-prop.active {
  box-shadow: 0 0 0 2px rgba(0, 230, 118, 0.55);
}

.property-io {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.property-io button {
  flex: 1;
  margin-top: 0 !important;
  min-width: 0;
  font-size: 11px;
  padding: 7px 8px;
}

.property-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 220px;
  overflow-y: auto;
}

.property-list-item {
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(12, 22, 12, 0.55);
  border: 1px solid rgba(76, 175, 80, 0.15);
  cursor: pointer;
}

.property-list-item:hover {
  border-color: rgba(76, 175, 80, 0.35);
}

.property-list-item.selected {
  border-color: rgba(0, 230, 118, 0.5);
  box-shadow: 0 0 0 1px rgba(0, 230, 118, 0.25);
}

.pli-title {
  font-weight: 700;
  font-size: 13px;
}

.pli-meta {
  font-size: 11px;
  opacity: 0.78;
  margin-top: 2px;
}

.pli-actions {
  display: flex;
  gap: 6px;
  margin-top: 6px;
  flex-wrap: wrap;
}

.pli-actions button {
  margin: 0 !important;
  padding: 4px 8px !important;
  font-size: 10px !important;
}

.draw-hud { display: none !important; }

.modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(6, 13, 6, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 16px;
}

.modal.hidden {
  display: none;
}

.modal-card {
  width: 100%;
  max-width: 400px;
  background: rgba(10, 18, 10, 0.95);
  border: 1px solid rgba(76, 175, 80, 0.2);
  border-radius: 14px;
  padding: 22px 24px;
  box-shadow: 0 16px 48px rgba(0,0,0,0.4);
  font-family: "Inter", -apple-system, sans-serif;
}

.modal-card h3 {
  margin: 0 0 8px;
}

.modal-acres {
  margin: 0 0 12px;
  font-weight: 600;
  color: #8ff0b4;
}

.modal-card label {
  display: block;
  margin-top: 10px;
  font-size: 11px;
}

.modal-card input[type="text"] {
  width: 100%;
  margin-top: 4px;
}

.modal-card input[type="color"] {
  width: 100%;
  margin-top: 4px;
  height: 36px;
  padding: 2px;
}

.modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

.modal-actions button {
  flex: 1;
  margin: 0 !important;
}

.property-stats-panel {
  top: 320px;
  max-height: calc(100vh - 360px);
}

.property-stats-panel .stat-block {
  margin-bottom: 12px;
  font-size: 12px;
  line-height: 1.45;
}

.property-stats-panel .stat-block h4 {
  margin: 0 0 6px;
  font-size: 12px;
  opacity: 0.8;
}

.full-width {
  width: 100%;
  margin-top: 12px !important;
}

/* ── Toast notifications ── */
.toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 13px;
  font-family: Inter, sans-serif;
  animation: toastIn 0.3s ease, toastOut 0.3s ease 3.5s forwards;
}

.toast--error {
  background: rgba(220, 63, 63, 0.9);
  color: #fff;
}

.toast--success {
  background: rgba(76, 175, 80, 0.9);
  color: #fff;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateX(-50%) translateY(20px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

@keyframes toastOut {
  to { opacity: 0; transform: translateX(-50%) translateY(20px); }
}
