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

body {
  display: flex;
  height: 100vh;
  font-family: 'Segoe UI', system-ui, sans-serif;
  background: #111827;
  color: #e5e7eb;
  overflow: hidden;
}

/* ── SIDEBAR GAUCHE ── */
#sidebar {
  width: 260px;
  min-width: 260px;
  background: #1f2937;
  border-right: 1px solid #374151;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
#sidebar-scroll {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
}
#sidebar-scroll::-webkit-scrollbar { width: 5px; }
#sidebar-scroll::-webkit-scrollbar-track { background: transparent; }
#sidebar-scroll::-webkit-scrollbar-thumb { background: #374151; border-radius: 3px; }
#sidebar-scroll::-webkit-scrollbar-thumb:hover { background: #4b5563; }

/* ── SIDEBAR DROITE ── */
#sidebar-right {
  width: 300px;
  min-width: 300px;
  background: #1f2937;
  border-left: 1px solid #374151;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

#sidebar-right-header {
  padding: 14px 16px;
  background: #111827;
  border-bottom: 1px solid #374151;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
#sidebar-right-header span {
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #6b7280;
}

#sidebar-header {
  padding: 14px 16px;
  background: #111827;
  border-bottom: 1px solid #374151;
  flex-shrink: 0;
}
#sidebar-header h1 { font-size: 0.95rem; font-weight: 700; color: #f9fafb; }
#sidebar-header p  { font-size: 0.72rem; color: #6b7280; margin-top: 2px; }

.section {
  padding: 12px 14px;
  border-bottom: 1px solid #374151;
  display: flex;
  flex-direction: column;
  gap: 7px;
  flex-shrink: 0;
}
.section-title {
  font-size: 0.68rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.08em; color: #6b7280;
}

.btn {
  display: flex; align-items: center; gap: 7px;
  width: 100%; padding: 7px 11px;
  border: 1px solid #374151; border-radius: 6px;
  cursor: pointer; font-size: 0.84rem;
  background: #374151; color: #e5e7eb;
  transition: background 0.13s, border-color 0.13s;
  text-align: left; user-select: none; white-space: nowrap; overflow: hidden;
}
.btn:hover  { background: #4b5563; border-color: #6b7280; }
.btn:active { transform: scale(0.98); }
.btn.active { background: #1d4ed8; border-color: #3b82f6; color: #fff; }
.btn.danger { color: #f87171; }
.btn.danger:hover { background: #450a0a; border-color: #ef4444; color: #fca5a5; }
.btn-icon { width: 15px; height: 15px; flex-shrink: 0; opacity: 0.8; }

.tool-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; }

/* Scale badge */
#scale-badge {
  display: none; background: #052e16; border: 1px solid #14532d;
  border-radius: 6px; padding: 7px 10px; font-size: 0.8rem; color: #86efac; line-height: 1.5;
}
#scale-badge.visible { display: block; }

/* Calibration form */
#calib-form {
  display: none; flex-direction: column; gap: 7px;
  padding: 10px; background: #0f172a; border: 1px solid #1d4ed8; border-radius: 7px;
}
#calib-form.visible { display: flex; }
#calib-form label { font-size: 0.76rem; color: #93c5fd; font-weight: 500; }

.input-row { display: flex; gap: 5px; }
.input-row input, .input-row select {
  padding: 6px 8px; background: #111827; border: 1px solid #374151;
  border-radius: 5px; color: #e5e7eb; font-size: 0.84rem;
}
.input-row input { flex: 1; }
.input-row input:focus, .input-row select:focus { outline: none; border-color: #3b82f6; }
.input-row select { cursor: pointer; }

.btn-row { display: flex; gap: 5px; }
.btn-sm {
  flex: 1; padding: 5px 8px; border: none; border-radius: 5px;
  cursor: pointer; font-size: 0.8rem; font-weight: 600; transition: background 0.13s;
}
.btn-confirm { background: #1d4ed8; color: #fff; }
.btn-confirm:hover { background: #2563eb; }
.btn-cancel { background: #374151; color: #9ca3af; }
.btn-cancel:hover { background: #4b5563; }

/* ── MEASUREMENTS ── */
#measure-wrap { flex: 1; overflow-y: auto; overflow-x: hidden; }
#measurements { padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; }
#measurements-empty {
  color: #4b5563; font-size: 0.8rem; text-align: center;
  padding: 16px 0; line-height: 1.6;
}

/* Shape card */
.shape-card {
  background: #111827; border: 1px solid #2d3748;
  border-left: 3px solid #6b7280; border-radius: 7px;
  padding: 9px; font-size: 0.8rem; cursor: pointer;
  animation: fadeIn 0.18s ease; transition: border-color 0.13s, box-shadow 0.13s;
}
@keyframes fadeIn { from { opacity: 0; transform: translateY(3px); } }
.shape-card:hover  { border-color: #4b5563; }
.shape-card.selected {
  border-color: #3b82f6 !important;
  box-shadow: 0 0 0 1px #1d4ed8;
}

.card-top { display: flex; align-items: center; gap: 6px; margin-bottom: 7px; }

.color-pick {
  -webkit-appearance: none; appearance: none;
  width: 22px; height: 22px; border: 2px solid #374151; border-radius: 50%;
  padding: 0; cursor: pointer; flex-shrink: 0; background: transparent; overflow: hidden;
}
.color-pick::-webkit-color-swatch-wrapper { padding: 0; }
.color-pick::-webkit-color-swatch { border: none; border-radius: 50%; }
.color-pick:hover { border-color: #6b7280; }

.name-input {
  flex: 1; background: transparent; border: none;
  border-bottom: 1px solid transparent; color: #f3f4f6;
  font-size: 0.84rem; font-weight: 600; padding: 2px 3px; min-width: 0;
}
.name-input:hover { border-bottom-color: #374151; }
.name-input:focus { outline: none; border-bottom-color: #3b82f6; }
.name-input::placeholder { color: #4b5563; font-weight: 400; }

.shape-del {
  background: transparent; border: none; color: #4b5563;
  cursor: pointer; font-size: 1.1rem; padding: 0 2px; line-height: 1; flex-shrink: 0;
  transition: color 0.13s;
}
.shape-del:hover { color: #ef4444; }

.card-order { display: flex; flex-direction: column; gap: 2px; flex-shrink: 0; }
.order-btn {
  background: transparent; border: 1px solid #374151; border-radius: 3px;
  color: #6b7280; cursor: pointer; font-size: 0.7rem; padding: 1px 4px; line-height: 1.2;
  transition: all 0.12s; user-select: none;
}
.order-btn:hover:not(:disabled) { background: #374151; color: #e5e7eb; }
.order-btn:disabled { opacity: 0.18; cursor: default; }

/* ── GROUPS ── */
#measure-header {
  display: none; /* now replaced by #sidebar-right-header */
}
.btn-new-group {
  background: #1e3a5f; border: 1px solid #1d4ed8; border-radius: 5px;
  color: #93c5fd; font-size: 0.75rem; padding: 3px 9px;
  cursor: pointer; transition: all 0.13s; white-space: nowrap;
}
.btn-new-group:hover { background: #1d4ed8; color: #fff; }

.btn-export {
  background: #14532d; border: 1px solid #166534; border-radius: 5px;
  color: #86efac; cursor: pointer; padding: 3px 7px;
  display: flex; align-items: center; gap: 4px;
  font-size: 0.75rem; transition: all 0.13s; white-space: nowrap;
}
.btn-export:hover { background: #166534; color: #bbf7d0; }
.btn-export svg { width: 13px; height: 13px; flex-shrink: 0; }

.group-block {
  background: #0d1526; border: 1px solid #1e3a5f;
  border-radius: 8px; overflow: hidden;
}
.group-header {
  display: flex; align-items: center; gap: 5px;
  padding: 6px 8px; background: #111f36; cursor: pointer; user-select: none;
}
.group-header:hover { background: #162640; }

.collapse-btn {
  background: transparent; border: none; color: #6b7280;
  cursor: pointer; font-size: 0.65rem; padding: 0 2px;
  flex-shrink: 0; line-height: 1; transition: color 0.13s;
}
.collapse-btn:hover { color: #e5e7eb; }

.group-name-input {
  flex: 1; background: transparent; border: none;
  border-bottom: 1px solid transparent; color: #93c5fd;
  font-size: 0.83rem; font-weight: 600; padding: 1px 3px; min-width: 0;
}
.group-name-input:hover { border-bottom-color: #1e3a5f; }
.group-name-input:focus { outline: none; border-bottom-color: #3b82f6; color: #bfdbfe; }
.group-name-input::placeholder { color: #2d4a6b; font-weight: 400; font-style: italic; }

.group-count {
  font-size: 0.68rem; color: #6b7280; background: #1f2937;
  border-radius: 10px; padding: 1px 6px; flex-shrink: 0;
}
.group-del-btn {
  background: transparent; border: none; color: #374151;
  cursor: pointer; font-size: 1rem; padding: 0 2px; line-height: 1;
  flex-shrink: 0; transition: color 0.13s;
}
.group-del-btn:hover { color: #ef4444; }

/* Eye / visibility button */
.eye-btn {
  background: transparent; border: none; color: #4b5563;
  cursor: pointer; padding: 0 2px; line-height: 1; flex-shrink: 0;
  transition: color 0.13s; display: flex; align-items: center;
}
.eye-btn:hover { color: #e5e7eb; }
.eye-btn svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2; }
.eye-btn.hidden-eye { color: #374151; }

/* Opacity row */
.opacity-row {
  display: flex; align-items: center; gap: 6px;
  padding: 2px 7px 6px; font-size: 0.72rem; color: #4b5563;
}
.opacity-row input[type=range] {
  flex: 1; height: 3px; accent-color: #4b5563; cursor: pointer;
  transition: accent-color 0.13s;
}
.opacity-row input[type=range]:hover { accent-color: #9ca3af; }
.opacity-row .opacity-pct { min-width: 30px; text-align: right; color: #6b7280; }

/* Group opacity row */
.group-opacity-row {
  display: flex; align-items: center; gap: 6px;
  padding: 4px 10px; font-size: 0.72rem; color: #4b5563;
  border-bottom: 1px solid #1e3a5f;
}
.group-opacity-row input[type=range] {
  flex: 1; height: 3px; accent-color: #1e3a5f; cursor: pointer;
  transition: accent-color 0.13s;
}
.group-opacity-row input[type=range]:hover { accent-color: #3b82f6; }
.group-opacity-row .opacity-pct { min-width: 30px; text-align: right; color: #6b7280; }

/* Hidden shape card feedback */
.shape-card.shape-hidden { opacity: 0.42; }
.group-block.group-hidden > .group-header { opacity: 0.42; }

.group-body {
  padding: 5px 5px 5px 14px;
  display: flex; flex-direction: column; gap: 6px;
  border-top: 1px solid #1e3a5f;
}

.group-sel {
  -webkit-appearance: none; appearance: none;
  background: #111827; border: 1px solid #1e3a5f; border-radius: 4px;
  color: #6b7280; font-size: 0.72rem; padding: 2px 5px;
  cursor: pointer; max-width: 75px; flex-shrink: 0;
}
.group-sel:focus { outline: none; border-color: #3b82f6; }
.group-sel option { background: #1f2937; }

.ungrouped-label {
  font-size: 0.68rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.08em; color: #374151; padding: 10px 4px 4px;
}

.shape-metrics {
  display: flex; flex-direction: column; gap: 2px;
  margin-bottom: 7px; padding: 5px 7px;
  background: #0d1117; border-radius: 5px;
}
.metric-row { display: flex; justify-content: space-between; gap: 8px; }
.metric-label { color: #6b7280; white-space: nowrap; }
.metric-value { color: #7dd3fc; font-family: 'Courier New', monospace; font-size: 0.78rem; text-align: right; }

.desc-input {
  width: 100%; background: #0d1117; border: 1px solid #1f2937;
  border-radius: 5px; color: #9ca3af; font-size: 0.78rem;
  padding: 5px 7px; resize: vertical; min-height: 40px; max-height: 120px;
  font-family: inherit; line-height: 1.4; transition: border-color 0.13s;
}
.desc-input:hover { border-color: #374151; }
.desc-input:focus { outline: none; border-color: #374151; color: #d1d5db; }
.desc-input::placeholder { color: #374151; }

/* ── MAIN ── */
#main {
  flex: 1; position: relative; overflow: hidden;
  background: #0d1117;
  background-image: radial-gradient(circle, #1f2937 1px, transparent 1px);
  background-size: 20px 20px;
}
#canvas { position: absolute; top: 0; left: 0; cursor: crosshair; display: none; }

/* Drop zone */
#drop-zone {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 48px 40px; border: 2px dashed #374151; border-radius: 14px;
  color: #4b5563; cursor: pointer; transition: all 0.18s; text-align: center; z-index: 10;
}
#drop-zone:hover, #drop-zone.drag-over {
  border-color: #2563eb; color: #93c5fd; background: rgba(37,99,235,0.05);
}
#drop-zone p { font-size: 0.88rem; line-height: 1.6; }
#drop-zone .sub { font-size: 0.75rem; color: #374151; }

/* Status bar */
#status {
  position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%);
  background: rgba(0,0,0,0.78); backdrop-filter: blur(4px);
  color: #e5e7eb; padding: 5px 16px; border-radius: 20px;
  font-size: 0.8rem; pointer-events: none; white-space: nowrap;
  transition: opacity 0.2s; z-index: 100;
}
#status.hidden { opacity: 0; }

/* Zoom bar */
#zoom-bar {
  position: absolute; bottom: 14px; right: 14px;
  display: none; align-items: center; gap: 6px;
  background: rgba(0,0,0,0.6); backdrop-filter: blur(4px);
  border-radius: 20px; padding: 4px 10px; z-index: 100;
}
#zoom-bar.visible { display: flex; }
#zoom-level { font-size: 0.78rem; color: #9ca3af; min-width: 38px; text-align: center; }
.zoom-btn {
  background: transparent; border: none; color: #9ca3af;
  cursor: pointer; font-size: 1rem; padding: 0 3px; line-height: 1; transition: color 0.13s;
}
.zoom-btn:hover { color: #f3f4f6; }

/* ── MODAL ── */
#modal-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(3px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}
#modal-overlay.visible { display: flex; }

#modal {
  background: #1f2937;
  border: 1px solid #374151;
  border-radius: 12px;
  padding: 24px 28px;
  width: 340px;
  max-width: calc(100vw - 40px);
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  animation: modalIn 0.15s ease;
}
@keyframes modalIn {
  from { opacity: 0; transform: scale(0.95) translateY(-8px); }
}

#modal-icon {
  width: 40px; height: 40px;
  background: #450a0a; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 14px;
}
#modal-icon svg { width: 20px; height: 20px; stroke: #f87171; }

#modal h2 {
  font-size: 0.95rem; font-weight: 700;
  color: #f9fafb; margin-bottom: 6px;
}
#modal p {
  font-size: 0.83rem; color: #9ca3af; line-height: 1.5; margin-bottom: 20px;
}
#modal p strong { color: #e5e7eb; }

#modal-actions { display: flex; gap: 8px; justify-content: flex-end; }
#modal-cancel {
  padding: 7px 16px; border: 1px solid #374151; border-radius: 6px;
  background: #374151; color: #e5e7eb; cursor: pointer; font-size: 0.84rem;
  transition: background 0.13s;
}
#modal-cancel:hover { background: #4b5563; }
#modal-confirm {
  padding: 7px 16px; border: none; border-radius: 6px;
  background: #dc2626; color: #fff; cursor: pointer; font-size: 0.84rem;
  font-weight: 600; transition: background 0.13s;
}
#modal-confirm:hover { background: #ef4444; }

/* ── GEO MODAL ── */
#geo-modal-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,0.72); backdrop-filter: blur(4px);
  z-index: 2000; align-items: center; justify-content: center;
}
#geo-modal-overlay.visible { display: flex; }

#geo-modal {
  background: #1f2937; border: 1px solid #374151; border-radius: 12px;
  width: 90vw; max-width: 920px; height: 82vh; max-height: 700px;
  display: flex; flex-direction: column;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
  animation: modalIn 0.15s ease; overflow: hidden;
}

#geo-modal-header {
  padding: 13px 18px; border-bottom: 1px solid #374151;
  display: flex; align-items: center; justify-content: space-between; flex-shrink: 0;
}
#geo-modal-header div h2 { font-size: 0.92rem; font-weight: 700; color: #f9fafb; margin-bottom: 2px; }
#geo-modal-header div p  { font-size: 0.76rem; color: #9ca3af; }
#geo-modal-close {
  background: transparent; border: none; color: #6b7280;
  cursor: pointer; font-size: 1.4rem; line-height: 1; padding: 0 4px;
  transition: color 0.13s; flex-shrink: 0;
}
#geo-modal-close:hover { color: #e5e7eb; }

#geo-point-indicators {
  display: flex; gap: 7px; padding: 9px 18px; align-items: center;
  border-bottom: 1px solid #374151; flex-shrink: 0;
}
.geo-pt-ind {
  display: flex; align-items: center; gap: 6px;
  background: #111827; border: 1px solid #374151;
  border-radius: 20px; padding: 3px 10px;
  font-size: 0.75rem; color: #6b7280; transition: all 0.2s;
}
.geo-pt-ind.placed { border-color: #22c55e; color: #86efac; }
.geo-pt-ind .pt-num {
  width: 17px; height: 17px; border-radius: 50%;
  background: #374151; color: #9ca3af;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.65rem; font-weight: 700; flex-shrink: 0;
}
.geo-pt-ind.placed .pt-num { background: #166534; color: #86efac; }
#geo-reset-map-pts {
  margin-left: auto; background: transparent; border: 1px solid #374151;
  border-radius: 5px; color: #6b7280; cursor: pointer; font-size: 0.72rem;
  padding: 3px 9px; transition: all 0.13s; white-space: nowrap;
}
#geo-reset-map-pts:hover { background: #374151; color: #e5e7eb; }

/* Search bar */
#geo-search-wrap {
  padding: 8px 18px 6px; border-bottom: 1px solid #374151;
  flex-shrink: 0; position: relative;
}
#geo-search-input {
  width: 100%; padding: 7px 32px 7px 11px; background: #111827;
  border: 1px solid #374151; border-radius: 6px;
  color: #e5e7eb; font-size: 0.84rem; font-family: inherit;
}
#geo-search-input:focus { outline: none; border-color: #3b82f6; }
#geo-search-input::placeholder { color: #4b5563; }
#geo-search-clear {
  position: absolute; right: 26px; top: 50%; transform: translateY(-50%);
  background: transparent; border: none; color: #6b7280; cursor: pointer;
  font-size: 1rem; line-height: 1; padding: 2px 4px; display: none;
}
#geo-search-clear.visible { display: block; }
#geo-search-results {
  position: absolute; left: 18px; right: 18px; top: calc(100% - 6px);
  background: #1f2937; border: 1px solid #374151; border-top: none;
  border-radius: 0 0 7px 7px; z-index: 10000; overflow: hidden;
  box-shadow: 0 6px 20px rgba(0,0,0,0.5);
}
#geo-search-results:empty { display: none; }
.geo-search-item {
  padding: 8px 12px; cursor: pointer; font-size: 0.82rem;
  color: #d1d5db; border-bottom: 1px solid #374151; transition: background 0.1s;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.geo-search-item:last-child { border-bottom: none; }
.geo-search-item:hover, .geo-search-item.active { background: #374151; color: #f3f4f6; }

#leaflet-map { flex: 1; min-height: 0; }
/* Crosshair cursor on map — inline styles from Leaflet are overridden via MutationObserver in JS */

#geo-modal-footer {
  padding: 11px 18px; border-top: 1px solid #374151;
  display: flex; gap: 8px; justify-content: flex-end; flex-shrink: 0;
}
#geo-modal-cancel {
  padding: 7px 16px; border: 1px solid #374151; border-radius: 6px;
  background: #374151; color: #e5e7eb; cursor: pointer; font-size: 0.84rem;
  transition: background 0.13s;
}
#geo-modal-cancel:hover { background: #4b5563; }
#geo-modal-confirm {
  padding: 7px 16px; border: none; border-radius: 6px;
  background: #1d4ed8; color: #fff; cursor: pointer; font-size: 0.84rem;
  font-weight: 600; transition: background 0.13s;
}
#geo-modal-confirm:hover:not(:disabled) { background: #2563eb; }
#geo-modal-confirm:disabled { opacity: 0.35; cursor: not-allowed; }

/* Geo calib form (step 1, left sidebar) */
#geo-calib-form {
  display: none; flex-direction: column; gap: 7px;
  padding: 10px; background: #071a0f; border: 1px solid #166534; border-radius: 7px;
}
#geo-calib-form.visible { display: flex; }
#geo-calib-form > label { font-size: 0.76rem; color: #86efac; font-weight: 500; }

#geo-pts-progress { display: flex; gap: 7px; align-items: center; }
.geo-pt-step {
  display: flex; align-items: center; gap: 4px;
  font-size: 0.74rem; color: #374151; transition: color 0.18s;
}
.geo-pt-step.active { color: #facc15; }
.geo-pt-step.done   { color: #22c55e; }
.geo-pt-dot {
  width: 15px; height: 15px; border-radius: 50%;
  border: 2px solid currentColor;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.6rem; font-weight: 700;
}
.geo-pt-step.done .geo-pt-dot { background: #22c55e; color: #fff; border-color: #22c55e; }

/* Geo badge */
#geo-badge {
  display: none; align-items: center; gap: 6px;
  background: #042714; border: 1px solid #14532d;
  border-radius: 6px; padding: 6px 10px; font-size: 0.8rem; color: #86efac;
}
#geo-badge.visible { display: flex; }

/* Grid config panel */
#grid-config {
  display: none; flex-direction: column; gap: 8px;
  padding: 10px; background: #0f172a; border: 1px solid #374151; border-radius: 7px;
}
#grid-config.visible { display: flex; }
#grid-config .cfg-label {
  font-size: 0.72rem; color: #6b7280; font-weight: 500; margin-bottom: 2px; display: block;
}
.grid-row { display: flex; gap: 5px; align-items: center; }
.slider-row { display: flex; align-items: center; gap: 6px; margin-top: 6px; }
.slider-row input[type=range] { flex: 1; height: 3px; accent-color: #6b7280; cursor: pointer; }
.slider-row input[type=range]:hover { accent-color: #9ca3af; }
.slider-label { display: flex; align-items: center; gap: 3px; font-size: 0.75rem; color: #6b7280; white-space: nowrap; }
.slider-val { min-width: 30px; text-align: right; font-size: 0.75rem; color: #6b7280; }
.text-input {
  width: 100%; box-sizing: border-box;
  padding: 6px 9px; background: #111827; border: 1px solid #374151;
  border-radius: 6px; color: #e5e7eb; font-size: 0.83rem; outline: none;
}
.text-input:focus { border-color: #3b82f6; }
.text-input::placeholder { color: #4b5563; }
.grid-row input[type=number] {
  flex: 1; padding: 5px 7px; background: #111827; border: 1px solid #374151;
  border-radius: 5px; color: #e5e7eb; font-size: 0.83rem;
}
.grid-row input[type=number]:focus { outline: none; border-color: #3b82f6; }
.grid-row select {
  padding: 5px 6px; background: #111827; border: 1px solid #374151;
  border-radius: 5px; color: #e5e7eb; font-size: 0.83rem; cursor: pointer;
}
.grid-row select:focus { outline: none; border-color: #3b82f6; }
.grid-row .unit-lbl {
  font-size: 0.8rem; color: #6b7280; flex-shrink: 0;
}
.grid-row input[type=range] {
  flex: 1; accent-color: #3b82f6; cursor: pointer;
}

/* Snap indicator dot (drawn on canvas, no extra CSS needed beyond .btn.active) */

/* GeoJSON export button */
.btn-export-geo {
  background: #1a3a5c; border: 1px solid #1d4ed8; border-radius: 5px;
  color: #93c5fd; cursor: pointer; padding: 3px 7px;
  display: flex; align-items: center; gap: 4px;
  font-size: 0.75rem; transition: all 0.13s; white-space: nowrap;
}
.btn-export-geo:hover:not(:disabled) { background: #1d4ed8; color: #fff; }
.btn-export-geo:disabled { opacity: 0.35; cursor: not-allowed; }
.btn-export-geo svg { width: 13px; height: 13px; flex-shrink: 0; }
