#mapaLotes-btn-desenho.is-active {
  border-color: #0f766e;
  background: #ecfdf5;
  color: #065f46;
  box-shadow: inset 0 0 0 1px #10b981;
}

#mapaLotes-btn-undo:disabled {
  opacity: .42;
  cursor: not-allowed;
}

.mapa-lote-hit {
  transition: box-shadow .12s ease, filter .12s ease;
}

.mapa-lote-hit:hover {
  filter: saturate(1.08);
  box-shadow: 0 0 0 2px rgba(15, 23, 42, .18);
  cursor: pointer;
}

#mapaLotes-lista tr.mapa-lotes-config-selected td {
  background: #ecfdf5;
  box-shadow: inset 0 1px 0 #10b981, inset 0 -1px 0 #10b981;
}

#mapaLotes-lista tr.mapa-lotes-config-selected td:first-child {
  box-shadow: inset 3px 0 0 #0f766e, inset 0 1px 0 #10b981, inset 0 -1px 0 #10b981;
}

.mapa-lotes-draw-overlay {
  position: absolute;
  z-index: 30;
  cursor: crosshair;
  touch-action: none;
  background: transparent;
}

.mapa-lotes-draw-overlay.is-active {
  background: rgba(37, 99, 235, .025);
  outline: 1px dashed rgba(37, 99, 235, .42);
  outline-offset: -1px;
}

.mapa-lotes-draw-preview {
  position: absolute;
  z-index: 31;
  pointer-events: none;
  box-sizing: border-box;
  border: 2px solid #0f766e;
  background: rgba(16, 185, 129, .22);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .9) inset;
}

.mapa-lotes-edit-bar {
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  padding: 7px 9px;
  border: 1px solid #5eead4;
  border-left: 3px solid #0f766e;
  background: #f0fdfa;
}

.mapa-lotes-edit-bar > div {
  min-width: 0;
  flex: 1 1 auto;
}

.mapa-lotes-edit-bar b,
.mapa-lotes-edit-bar span {
  display: block;
}

.mapa-lotes-edit-bar b {
  color: #134e4a;
  font-size: .78rem;
}

.mapa-lotes-edit-bar span {
  margin-top: 1px;
  color: #64748b;
  font-size: .67rem;
}

.mapa-lotes-resize-box {
  position: absolute;
  z-index: 40;
  box-sizing: border-box;
  border: 2px dashed #0f766e;
  background: rgba(20, 184, 166, .12);
  pointer-events: none;
}

.mapa-lotes-resize-box.is-invalid {
  border-color: #dc2626;
  background: rgba(239, 68, 68, .14);
}

.mapa-lotes-resize-move {
  position: absolute;
  z-index: 1;
  inset: 10px;
  pointer-events: auto;
  cursor: move;
  touch-action: none;
}

.mapa-lotes-resize-handle {
  position: absolute;
  z-index: 2;
  width: 12px;
  height: 12px;
  padding: 0;
  border: 2px solid #fff;
  border-radius: 2px;
  background: #0f766e;
  box-shadow: 0 0 0 1px #134e4a;
  pointer-events: auto;
  touch-action: none;
}

.mapa-lotes-resize-box.is-invalid .mapa-lotes-resize-handle {
  background: #dc2626;
  box-shadow: 0 0 0 1px #991b1b;
}

.mapa-lotes-resize-handle.handle-nw { left:-7px; top:-7px; cursor:nwse-resize; }
.mapa-lotes-resize-handle.handle-n  { left:calc(50% - 6px); top:-7px; cursor:ns-resize; }
.mapa-lotes-resize-handle.handle-ne { right:-7px; top:-7px; cursor:nesw-resize; }
.mapa-lotes-resize-handle.handle-e  { right:-7px; top:calc(50% - 6px); cursor:ew-resize; }
.mapa-lotes-resize-handle.handle-se { right:-7px; bottom:-7px; cursor:nwse-resize; }
.mapa-lotes-resize-handle.handle-s  { left:calc(50% - 6px); bottom:-7px; cursor:ns-resize; }
.mapa-lotes-resize-handle.handle-sw { left:-7px; bottom:-7px; cursor:nesw-resize; }
.mapa-lotes-resize-handle.handle-w  { left:-7px; top:calc(50% - 6px); cursor:ew-resize; }

.mapa-lotes-context-menu {
  position: fixed;
  z-index: 10050;
  width: 220px;
  padding: 5px;
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, .22);
}

.mapa-lotes-context-menu button {
  width: 100%;
  min-height: 32px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 6px 9px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #1e293b;
  font-family: inherit;
  font-size: .78rem;
  font-weight: 600;
  line-height: 1.2;
  text-align: left;
  cursor: pointer;
}

.mapa-lotes-context-menu button:hover {
  background: #f1f5f9;
}

.mapa-lotes-context-menu button span {
  width: 18px;
  color: #475569;
  font-size: 1rem;
  text-align: center;
}

.mapa-lotes-context-menu button.danger {
  color: #b91c1c;
}

.mapa-lotes-context-sep {
  height: 1px;
  margin: 4px;
  background: #e2e8f0;
}

.mapa-lotes-draw-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 88px;
  gap: 12px;
  padding: 16px;
}

.mapa-lotes-draw-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: var(--text-muted);
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
}

.mapa-lotes-draw-form input[type="text"] {
  width: 100%;
  padding: 9px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-size: .88rem;
  text-transform: none;
}

.mapa-lotes-draw-form input[type="color"] {
  width: 100%;
  height: 38px;
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
}

#mapaLotes-desenho-coords {
  grid-column: 1 / -1;
  padding: 9px 10px;
  border-left: 3px solid #0f766e;
  background: #f0fdfa;
  color: #334155;
  font-size: .78rem;
  line-height: 1.4;
}
