/**
 * Dashboard map — KC-style layout with CIX theme tokens
 */
.olam-dash-map-wrap {
  margin: 0 0 16px;
  border-radius: var(--olam-radius-md, 8px);
  overflow: hidden;
  border: 1px solid var(--olam-border);
  position: relative;
  z-index: 1;
  background: var(--olam-surface);
  box-shadow: var(--olam-shadow-sm);
}

.olam-dash-map-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap !important;
  gap: 8px;
  padding: 6px 12px;
  background: var(--olam-surface);
  border-bottom: 1px solid var(--olam-border);
  overflow-x: auto;
  overflow-y: hidden;
  white-space: nowrap;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

.olam-dash-map-toolbar::-webkit-scrollbar {
  height: 3px;
}
.olam-dash-map-toolbar::-webkit-scrollbar-track {
  background: transparent;
}
.olam-dash-map-toolbar::-webkit-scrollbar-thumb {
  background: var(--olam-border, #cbd5e1);
  border-radius: 3px;
}

.olam-dash-map-toolbar-left,
.olam-dash-map-toolbar-center,
.olam-dash-map-toolbar-right {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap !important;
  flex-shrink: 0;
  white-space: nowrap;
}

.olam-dash-map-view-select label {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--olam-text-muted);
  white-space: nowrap;
  margin: 0;
}

/* Select styling is owned by css/olam-jp-enterprise.css so every control
   in this toolbar shares one shape. */

.olam-dash-map-legend {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap !important;
  flex-shrink: 0;
}

.olam-dash-map-legend-item {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.66rem;
  color: var(--olam-text-secondary);
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
}

.olam-dash-map-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.15);
}

.olam-dash-map-legend-dot.approved { background: #43a047; }
.olam-dash-map-legend-dot.pending { background: #fdd835; }
.olam-dash-map-legend-dot.rejected { background: #e53935; }
.olam-dash-map-legend-dot.incomplete { background: #bdbdbd; }

.olam-dash-map-count {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  color: var(--olam-text, #1e293b);
  background: var(--gc-ink-50, #f8fafc);
  border: 1px solid var(--gc-ink-300, #cbd5e1);
  border-radius: var(--gc-radius-pill, 999px);
  padding: 2px 9px;
  height: 28px;
  white-space: nowrap;
  flex-shrink: 0;
  font-weight: 600;
}

.olam-dash-map-count strong#olam-dash-map-poly-count,
.olam-dash-map-count strong {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--olam-primary, #059138);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 1px 7px;
  border-radius: 999px;
  min-width: 20px;
  line-height: 1.3;
}

[data-theme="dark"] .olam-dash-map-count {
  background: #1e293b;
  border-color: #334155;
  color: #f1f5f9;
}

.olam-dash-map-stage {
  position: relative;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 620px;
  width: 100%;
}

#olam-dashboard-map {
  width: 100%;
  flex: 1 1 auto;
  height: clamp(620px, calc(100vh - 220px), 880px);
  min-height: 620px !important;
}

/* Floating On-Map Controls */
.olam-dash-map-ctrl-overlay {
  position: absolute;
  z-index: 1001;
  pointer-events: auto;
}

.olam-dash-map-ctrl-left {
  top: 14px;
  left: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.olam-dash-map-ctrl-right {
  top: 14px;
  right: 14px;
}

/* Standalone Card Stacks (Google Maps Style) */
.olam-map-card-stack {
  display: flex;
  flex-direction: column;
  background: var(--olam-surface, #ffffff);
  border: 1px solid var(--olam-border, rgba(0, 0, 0, 0.12));
  border-radius: 8px;
  padding: 3px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.05);
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.olam-map-card-stack:hover {
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .olam-map-card-stack {
  background: #1e293b;
  border-color: #334155;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
}

.olam-map-tool-divider {
  height: 1px;
  background: var(--olam-border, #e2e8f0);
  margin: 2px 4px;
}

[data-theme="dark"] .olam-map-tool-divider {
  background: #334155;
}

.olam-map-tool-btn {
  width: 34px;
  height: 34px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: var(--olam-text, #334155);
  cursor: pointer;
  transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 0;
  outline: none;
}

.olam-map-tool-btn:hover {
  background: var(--olam-bg-elevated, #f1f5f9);
  color: var(--olam-primary, #059138);
}

.olam-map-tool-btn:active {
  transform: scale(0.95);
}

.olam-layer-svg-icon {
  display: block;
  transition: transform 0.2s ease;
}

.olam-map-tool-btn:hover .olam-layer-svg-icon {
  transform: scale(1.08);
}

/* Layer icon button accent */
.olam-map-layer-icon-btn {
  color: var(--olam-primary, #059138);
}

.olam-map-layer-icon-btn.is-active,
.olam-map-layer-icon-btn[aria-expanded="true"] {
  background: rgba(5, 145, 56, 0.12);
  color: var(--olam-primary, #059138);
}

[data-theme="dark"] .olam-map-layer-icon-btn {
  color: #34d399;
}

[data-theme="dark"] .olam-map-layer-icon-btn[aria-expanded="true"] {
  background: rgba(52, 211, 153, 0.15);
}

/* Wrapper for positioning the flyout */
.olam-map-layer-dd {
  position: relative;
}

/* Simple list flyout panel */
.olam-map-layer-list {
  position: absolute;
  top: 0;
  left: 42px;
  z-index: 1002;
  list-style: none;
  margin: 0;
  padding: 6px 0;
  background: var(--olam-surface, #ffffff);
  border: 1px solid var(--olam-border, #cbd5e1);
  border-radius: 8px;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.15);
  min-width: 190px;
  white-space: nowrap;
}

.olam-map-layer-list[hidden] {
  display: none !important;
}

[data-theme="dark"] .olam-map-layer-list {
  background: #1e293b;
  border-color: #334155;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
}

/* Each list item row */
.olam-map-layer-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--olam-text, #1e293b);
  cursor: pointer;
  transition: background 0.12s;
}

.olam-map-layer-item i {
  font-size: 12px;
  width: 14px;
  text-align: center;
  color: var(--olam-text-muted, #64748b);
}

.olam-map-layer-item:hover {
  background: var(--olam-bg-elevated, #f1f5f9);
}

.olam-map-layer-item.is-active {
  color: var(--olam-primary, #059138);
  font-weight: 700;
  background: rgba(5, 145, 56, 0.07);
}

.olam-map-layer-item.is-active i {
  color: var(--olam-primary, #059138);
}

[data-theme="dark"] .olam-map-layer-item {
  color: #e2e8f0;
}

[data-theme="dark"] .olam-map-layer-item i {
  color: #94a3b8;
}

[data-theme="dark"] .olam-map-layer-item:hover {
  background: #243547;
}

[data-theme="dark"] .olam-map-layer-item.is-active {
  color: #34d399;
  background: rgba(52, 211, 153, 0.1);
}

[data-theme="dark"] .olam-map-layer-item.is-active i {
  color: #34d399;
}

/* Toolbar Search Box */
.olam-map-search-container {
  position: relative;
  width: 175px;
  min-width: 140px;
  max-width: 220px;
  flex: 0 0 auto;
  margin-right: 4px;
}

.olam-map-search-box {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--olam-surface, #ffffff);
  border: 1px solid var(--gc-ink-300, var(--olam-border, #cbd5e1));
  border-radius: var(--gc-radius-md, 6px);
  padding: 0 8px;
  height: 28px;
  min-height: 28px;
  width: 100%;
  box-sizing: border-box;
  box-shadow: none;
  overflow: hidden;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.olam-map-search-box:hover {
  border-color: var(--gc-ink-400, #94a3b8);
  background-color: var(--gc-ink-50, #f8fafc);
}

.olam-map-search-box:focus-within {
  border-color: var(--olam-primary, #059138);
  background-color: var(--olam-surface, #ffffff);
  box-shadow: 0 0 0 2px rgba(5, 145, 56, 0.15);
}

.olam-map-search-box .search-icon {
  color: var(--olam-text-muted, #64748b);
  flex-shrink: 0;
  width: 14px;
  height: 14px;
}

.olam-map-search-box input#olamMapSearchInput,
.olam-map-search-box input {
  flex: 1 1 0%;
  min-width: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  height: 26px !important;
  line-height: 26px !important;
  border: none !important;
  outline: none !important;
  background: transparent !important;
  font-size: 0.72rem !important;
  font-family: inherit !important;
  color: var(--olam-text, #1e293b) !important;
  padding: 0 !important;
  margin: 0 !important;
  box-sizing: border-box !important;
  box-shadow: none !important;
}

.olam-map-search-box input::placeholder {
  color: var(--olam-text-muted, #94a3b8);
  font-size: 0.70rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.olam-map-search-box .search-clear-btn {
  background: transparent;
  border: none;
  font-size: 14px;
  line-height: 1;
  color: var(--olam-text-muted, #94a3b8);
  cursor: pointer;
  padding: 0 2px;
  border-radius: 4px;
  flex-shrink: 0;
}

.olam-map-search-box .search-clear-btn:hover {
  color: #ef4444;
}

[data-theme="dark"] .olam-map-search-box {
  background: #1e293b;
  border-color: #334155;
}

[data-theme="dark"] .olam-map-search-box input {
  color: #f1f5f9 !important;
}

/* Autocomplete Search Results Dropdown */
.olam-map-search-results {
  position: absolute;
  top: 32px;
  left: 0;
  width: 280px;
  max-width: 85vw;
  list-style: none;
  margin: 0;
  padding: 4px 0;
  background: var(--olam-surface, #ffffff);
  border: 1px solid var(--olam-border, #cbd5e1);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.18);
  max-height: 280px;
  overflow-y: auto;
  z-index: 1050;
}

.olam-map-search-results[hidden] {
  display: none !important;
}

[data-theme="dark"] .olam-map-search-results {
  background: #1e293b;
  border-color: #334155;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.55);
}

.olam-map-search-results .search-item {
  padding: 8px 12px;
  cursor: pointer;
  border-bottom: 1px solid var(--olam-border, #f1f5f9);
  transition: background 0.12s ease;
}

.olam-map-search-results .search-item:last-child {
  border-bottom: none;
}

.olam-map-search-results .search-item:hover {
  background: var(--olam-bg-elevated, #f8fafc);
}

[data-theme="dark"] .olam-map-search-results .search-item {
  border-bottom-color: #334155;
}

[data-theme="dark"] .olam-map-search-results .search-item:hover {
  background: #243547;
}

.olam-map-search-results .s-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 3px;
}

.olam-map-search-results .s-id {
  font-size: 0.8rem;
  color: var(--olam-primary, #059138);
  font-weight: 700;
}

[data-theme="dark"] .olam-map-search-results .s-id {
  color: #34d399;
}

.olam-map-search-results .s-status {
  font-size: 0.6rem;
  font-weight: 700;
  color: #fff;
  padding: 1px 6px;
  border-radius: 3px;
  text-transform: uppercase;
}

.olam-map-search-results .s-sub {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.7rem;
  color: var(--olam-text-muted, #64748b);
  flex-wrap: wrap;
}

[data-theme="dark"] .olam-map-search-results .s-sub {
  color: #94a3b8;
}

/* Category header */
.olam-map-search-results .search-category-hdr {
  font-size: 0.62rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #0369a1;
  background: #f0f9ff;
  padding: 5px 12px;
  border-top: 1px solid #e0f2fe;
  border-bottom: 1px solid #e0f2fe;
}

.olam-map-search-results .search-category-hdr:first-child {
  border-top: none;
}

[data-theme="dark"] .olam-map-search-results .search-category-hdr {
  color: #38bdf8;
  background: #0f2744;
  border-color: #1e3a5f;
}

/* Farmer plot count badge */
.badge-farmer-plots {
  font-size: 0.62rem;
  font-weight: 700;
  background: linear-gradient(135deg, #0284c7, #0369a1);
  color: #ffffff;
  padding: 1px 7px;
  border-radius: 9999px;
  box-shadow: 0 1px 3px rgba(2, 132, 199, 0.3);
}

/* Plot preview pills */
.s-plots-preview {
  font-size: 0.65rem;
  color: #0284c7;
  background: rgba(2, 132, 199, 0.07);
  border-radius: 4px;
  padding: 2px 6px;
  margin-top: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

[data-theme="dark"] .s-plots-preview {
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.12);
}


.olam-map-search-results mark {
  background: rgba(5, 145, 56, 0.2);
  color: inherit;
  font-weight: 700;
  padding: 0 1px;
  border-radius: 2px;
}

.olam-map-search-results .no-result {
  padding: 12px;
  font-size: 0.74rem;
  color: var(--olam-text-muted, #64748b);
  text-align: center;
}

/* Measurement Cursor state */
#olam-dashboard-map.map-measuring {
  cursor: crosshair !important;
}

/* Measurement Floating Info Panel */
.olam-map-measure-panel {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1002;
  background: rgba(6, 20, 15, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  padding: 10px 14px;
  color: #ffffff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  min-width: 250px;
  animation: fadeInDown 0.2s ease;
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translate(-50%, -8px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

.olam-map-measure-panel[hidden] {
  display: none !important;
}

.olam-map-measure-panel .measure-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.76rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  padding-bottom: 6px;
  margin-bottom: 6px;
  color: #34d399;
}

.olam-map-measure-panel .btn-measure-close {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 16px;
  cursor: pointer;
}

.olam-map-measure-panel .btn-measure-close:hover {
  color: #ffffff;
}

.olam-map-measure-panel .measure-stat-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.74rem;
  margin-bottom: 4px;
}

.olam-map-measure-panel .measure-stat-row .val {
  color: #ffffff;
}

.olam-map-measure-panel .measure-stat-row .val.text-success {
  color: #34d399 !important;
}

.olam-map-measure-panel .measure-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.olam-map-measure-panel .btn-measure-clear {
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #fca5a5;
  border-radius: 4px;
  padding: 2px 8px;
  font-size: 0.68rem;
  font-weight: 600;
  cursor: pointer;
}

.olam-map-measure-panel .btn-measure-clear:hover {
  background: #ef4444;
  color: #fff;
}

.olam-map-measure-panel .measure-hint {
  font-size: 0.65rem;
  color: #94a3b8;
}

.measure-cursor-tooltip {
  background: rgba(6, 20, 15, 0.9) !important;
  border: 1px solid #34d399 !important;
  color: #ffffff !important;
  font-size: 0.7rem !important;
  font-weight: 600 !important;
  border-radius: 4px !important;
  padding: 3px 8px !important;
}

/* Floating Dynamic Live Summary Metrics (Bottom-Left) */
.olam-map-live-metrics {
  position: absolute;
  bottom: 14px;
  left: 14px;
  z-index: 1001;
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(6, 20, 15, 0.86);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  padding: 6px 16px;
  color: #ffffff;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
  font-size: 0.74rem;
  pointer-events: auto;
  transition: all 0.2s ease;
}

.olam-map-live-metrics:hover {
  background: rgba(6, 20, 15, 0.94);
  border-color: rgba(52, 211, 153, 0.4);
}

.olam-map-live-metrics .metric-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.olam-map-live-metrics .metric-item i.icon-plot { color: #38bdf8; }
.olam-map-live-metrics .metric-item i.icon-area { color: #fbbf24; }
.olam-map-live-metrics .metric-item i.icon-leaf { color: #34d399; }

.olam-map-live-metrics .metric-sep {
  width: 1px;
  height: 14px;
  background: rgba(255, 255, 255, 0.22);
}

.olam-map-live-metrics .metric-sub {
  color: #94a3b8;
  font-size: 0.68rem;
}

.olam-map-live-metrics .metric-carbon {
  color: #a7f3d0;
}

.olam-map-live-metrics strong {
  color: #ffffff;
  font-weight: 800;
}

/* Pill Buttons (Color Dimensions & Export) */
.olam-btn-dash-map-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 12px;
  font-size: 0.72rem;
  font-weight: 700;
  border: none;
  background: transparent;
  color: var(--olam-text, #1e293b);
  cursor: pointer;
  outline: none;
  border-radius: 6px;
  transition: background 0.15s ease;
}

.olam-btn-dash-map-pill:hover {
  background: var(--olam-bg-elevated, #f1f5f9);
  color: var(--olam-primary, #059138);
}

[data-theme="dark"] .olam-btn-dash-map-pill {
  color: #f1f5f9;
}

[data-theme="dark"] .olam-btn-dash-map-pill:hover {
  background: #334155;
  color: #34d399;
}

.olam-btn-dash-map-pill .caret-icon {
  font-size: 9px;
  color: var(--olam-text-muted, #94a3b8);
}

/* Color Dimension & Export Dropdowns */
.olam-map-dim-dd,
.olam-map-export-dd {
  position: relative;
}

.olam-map-dim-list,
.olam-map-export-list {
  position: absolute;
  top: 38px;
  right: 0;
  z-index: 1002;
  list-style: none;
  margin: 0;
  padding: 6px 0;
  background: var(--olam-surface, #ffffff);
  border: 1px solid var(--olam-border, #cbd5e1);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.16);
  min-width: 190px;
  white-space: nowrap;
}

.olam-map-dim-list[hidden],
.olam-map-export-list[hidden] {
  display: none !important;
}

[data-theme="dark"] .olam-map-dim-list,
[data-theme="dark"] .olam-map-export-list {
  background: #1e293b;
  border-color: #334155;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

.olam-map-dim-item,
.olam-map-export-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  font-size: 0.74rem;
  font-weight: 500;
  color: var(--olam-text, #1e293b);
  cursor: pointer;
  transition: background 0.12s;
}

.olam-map-dim-item:hover,
.olam-map-export-item:hover {
  background: var(--olam-bg-elevated, #f1f5f9);
}

.olam-map-dim-item.is-active {
  color: var(--olam-primary, #059138);
  font-weight: 700;
  background: rgba(5, 145, 56, 0.08);
}

.dim-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

[data-theme="dark"] .olam-map-dim-item,
[data-theme="dark"] .olam-map-export-item {
  color: #e2e8f0;
}

[data-theme="dark"] .olam-map-dim-item:hover,
[data-theme="dark"] .olam-map-export-item:hover {
  background: #243547;
}

[data-theme="dark"] .olam-map-dim-item.is-active {
  color: #34d399;
  background: rgba(52, 211, 153, 0.12);
}

/* On-Map Fullscreen Button (Top-Right) */
.olam-btn-dash-map-fs {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 12px;
  font-size: 0.72rem;
  font-weight: 700;
  border: 1px solid var(--olam-border, #cbd5e1);
  border-radius: 8px;
  background: var(--olam-surface, #ffffff);
  color: var(--olam-primary, #059138);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.14);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.olam-btn-dash-map-fs:hover {
  background: var(--olam-primary, #059138);
  color: #ffffff;
  border-color: var(--olam-primary, #059138);
  box-shadow: 0 4px 14px rgba(5, 145, 56, 0.25);
  transform: translateY(-1px);
}

.olam-btn-dash-map-fs:hover i {
  color: #ffffff;
}

/* Dark mode — fullscreen wrap */
[data-theme="dark"] .olam-btn-dash-map-fs {
  background: #1e293b;
  border-color: #334155;
  color: #34d399;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] .olam-btn-dash-map-fs:hover {
  background: #059138;
  color: #ffffff;
  border-color: #059138;
}

.olam-dash-map-wrap.map-fullscreen {
  position: fixed;
  inset: 0;
  z-index: 10060;
  margin: 0;
  border-radius: 0;
  border: none;
}



/* Marker clusters */
.marker-cluster-small,
.marker-cluster-medium,
.marker-cluster-large {
  background-color: rgba(15, 107, 79, 0.35);
}

.marker-cluster-small div,
.marker-cluster-medium div,
.marker-cluster-large div {
  background-color: rgba(15, 107, 79, 0.88);
  color: #fff;
  font-weight: 700;
  font-size: 0.72rem;
}

/* Pin markers (low zoom) */
.olam-dash-map-pin {
  width: 22px;
  height: 22px;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  background: var(--pin-fill, #43a047);
  border: 2px solid #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
  margin-left: -11px;
  margin-top: -22px;
}

.olam-dash-poly-label {
  background: rgba(255, 255, 255, 0.92) !important;
  border: 1px solid rgba(15, 107, 79, 0.35) !important;
  color: #0c5740 !important;
  font-size: 0.62rem !important;
  font-weight: 700 !important;
  padding: 2px 6px !important;
  border-radius: 3px !important;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2) !important;
}

.leaflet-popup-content-wrapper {
  background: #ffffff !important;
  color: #1e293b !important;
  border-radius: 12px !important;
  padding: 4px !important;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25) !important;
}
[data-theme="dark"] .leaflet-popup-content-wrapper {
  background: #111d17 !important;
  color: #e2e8f0 !important;
  border: 1px solid #233a2e !important;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6) !important;
}
.leaflet-popup-tip {
  background: #ffffff !important;
}
[data-theme="dark"] .leaflet-popup-tip {
  background: #111d17 !important;
}
.leaflet-container a.leaflet-popup-close-button {
  color: #64748b !important;
  padding: 8px 10px 0 0 !important;
}
[data-theme="dark"] .leaflet-container a.leaflet-popup-close-button {
  color: #94a3b8 !important;
}

.olam-dash-poly-popup {
  padding: 6px 8px;
  min-width: 200px;
}

.olam-dash-poly-popup h6,
.olam-dash-poly-popup .pp-title {
  font-size: 0.85rem !important;
  font-weight: 800 !important;
  color: #059138 !important;
  margin: 0 0 8px 0 !important;
  padding-bottom: 6px !important;
  border-bottom: 1px solid #e2e8f0 !important;
}

[data-theme="dark"] .olam-dash-poly-popup h6,
[data-theme="dark"] .olam-dash-poly-popup .pp-title {
  color: #3dd66d !important;
  border-bottom-color: #233a2e !important;
}

.olam-dash-poly-popup .pp-row {
  font-size: 0.76rem !important;
  color: #334155 !important;
  margin-bottom: 5px !important;
  line-height: 1.4 !important;
}

[data-theme="dark"] .olam-dash-poly-popup .pp-row {
  color: #cbd5e1 !important;
}

.olam-dash-poly-popup .pp-row strong {
  color: #0f172a !important;
}

[data-theme="dark"] .olam-dash-poly-popup .pp-row strong {
  color: #f8fafc !important;
}

.olam-dash-poly-popup .btn-goto {
  display: inline-block;
  margin-top: 8px;
  padding: 6px 12px;
  font-size: 0.72rem;
  font-weight: 700;
  background: var(--olam-primary, #059138);
  color: #ffffff !important;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  text-decoration: none;
}

.olam-dash-poly-popup .btn-goto,
.olam-dash-poly-popup .btn-goto *,
.olam-dash-poly-popup .btn-goto:visited,
.olam-dash-poly-popup .btn-goto:hover,
.olam-dash-poly-popup .btn-goto:active {
  color: #ffffff !important;
}

.olam-dash-map-empty {
  position: absolute;
  inset: 44px 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 8px;
  color: var(--olam-text-muted);
  font-size: 0.85rem;
  pointer-events: none;
  z-index: 400;
}

.olam-dash-map-empty i {
  font-size: 2rem;
  opacity: 0.5;
}

@media (max-width: 768px) {

  .olam-dash-map-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .olam-dash-map-toolbar-left,
  .olam-dash-map-toolbar-center,
  .olam-dash-map-toolbar-right {
    justify-content: center;
  }
}

/* --------------------------------------------------------------------------
   One-level UI test: Dashboard only
   Applies the approved Green Carbon FieldOps identity to the dashboard without
   changing global tokens or any module workflows.
   -------------------------------------------------------------------------- */
.olam-page-header {
  background: linear-gradient(135deg, #ffffff 0%, #f4faf7 100%);
  border: 1px solid #e3e8e6;
  border-radius: 12px;
  padding: 16px 20px;
  box-shadow: 0 1px 2px rgba(16, 36, 31, 0.06);
}

[data-theme="dark"] .olam-page-header {
  background: linear-gradient(135deg, #15201b 0%, #182521 100%);
  border-color: #243530;
}

.olam-page-header h1 {
  color: #16241f;
  letter-spacing: -0.02em;
}

[data-theme="dark"] .olam-page-header h1 {
  color: #e8efeb;
}

.olam-page-subtitle {
  color: #4a5a54 !important;
}

[data-theme="dark"] .olam-page-subtitle {
  color: #aebbb5 !important;
}









/* KPI card styling intentionally removed — owned by
   css/olam-jp-enterprise.css, which loads before this file.
   Keeping gradient overrides here defeated the design system. */


.olam-dash-map-wrap {
  border-color: #e3e8e6;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(16, 36, 31, 0.08);
}

[data-theme="dark"] .olam-dash-map-wrap {
  border-color: #243530;
}

.olam-dash-map-toolbar {
  background: #ffffff;
  border-bottom-color: #e3e8e6;
}

[data-theme="dark"] .olam-dash-map-toolbar {
  background: #15201b;
  border-bottom-color: #243530;
}

.olam-btn-dash-map-fs {
  color: #0f6b4f;
  border-color: #b9ddcd;
  border-radius: 6px;
}

.olam-btn-dash-map-fs:hover {
  background: #e4f3ed;
  border-color: #0f6b4f;
}

.olam-dash-poly-popup h6 {
  color: #0f6b4f;
}

.olam-dash-poly-popup .btn-goto {
  background: #0f6b4f;
}

.olam-dash-poly-popup .btn-goto:hover {
  background: #0c5740;
}

/* Validation queue (Overview & Queue — L2 Validator Only) */
.olam-dash-queue {
  margin: 0 0 16px;
  padding: 12px 16px;
  background: var(--olam-surface, #ffffff);
  border: 1px solid var(--olam-border, #e2e8f0);
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

[data-theme="dark"] .olam-dash-queue {
  background: var(--olam-surface, #1e293b);
  border-color: var(--olam-border, #334155);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.olam-dash-queue-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.olam-dash-queue-badge-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(5, 145, 56, 0.12);
  color: var(--olam-primary, #059138);
  font-size: 13px;
  margin-right: 10px;
  flex-shrink: 0;
}

[data-theme="dark"] .olam-dash-queue-badge-icon {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
}

.olam-dash-queue-tag {
  display: inline-block;
  font-size: 9px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 999px;
  background: rgba(5, 145, 56, 0.1);
  color: var(--olam-primary, #059138);
  border: 1px solid rgba(5, 145, 56, 0.25);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  line-height: 1.4;
}

[data-theme="dark"] .olam-dash-queue-tag {
  background: rgba(52, 211, 153, 0.15);
  color: #34d399;
  border-color: rgba(52, 211, 153, 0.3);
}

.olam-dash-queue-title {
  margin: 0;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--olam-text, #0f172a);
  letter-spacing: -0.01em;
  line-height: 1.2;
}

[data-theme="dark"] .olam-dash-queue-title {
  color: var(--olam-text, #f1f5f9);
}

.olam-dash-queue-sub {
  margin: 2px 0 0;
  font-size: 0.68rem;
  color: var(--olam-text-muted, #64748b);
  line-height: 1.2;
}

[data-theme="dark"] .olam-dash-queue-sub {
  color: var(--olam-text-muted, #94a3b8);
}

.olam-dash-queue-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.olam-dash-queue-total {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #fff8eb;
  border: 1px solid #fde68a;
  font-size: 0.68rem;
  font-weight: 600;
  color: #92400e;
}

.olam-dash-queue-total strong {
  font-size: 0.8rem;
  font-weight: 800;
  color: #b45309;
}

[data-theme="dark"] .olam-dash-queue-total {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.25);
  color: #fcd34d;
}

[data-theme="dark"] .olam-dash-queue-total strong {
  color: #fbbf24;
}

/* Single-line Queue Container without horizontal scroll */
.olam-dash-queue-grid {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: stretch !important;
  gap: 8px !important;
  width: 100% !important;
  overflow: hidden !important;
  margin: 0 !important;
  padding: 0 !important;
}

.olam-dash-queue-card {
  flex: 1 1 0px !important;
  min-width: 0 !important;
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  padding: 7px 8px !important;
  border: 1px solid var(--olam-border, #e2e8f0) !important;
  border-radius: 8px !important;
  background: var(--olam-bg-elevated, #f8fafc) !important;
  text-decoration: none !important;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
  position: relative !important;
  overflow: hidden !important;
}

.olam-dash-queue-card:hover {
  border-color: var(--olam-primary, #059138) !important;
  background: #ffffff !important;
  box-shadow: 0 4px 12px rgba(5, 145, 56, 0.12) !important;
  transform: translateY(-2px) !important;
}

.olam-dash-queue-card.has-pending {
  border-color: #fde68a !important;
  background: linear-gradient(135deg, #fffdf8 0%, #fef8eb 100%) !important;
}

.olam-dash-queue-card.has-pending:hover {
  border-color: #f59e0b !important;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.15) !important;
}

[data-theme="dark"] .olam-dash-queue-card {
  background: #1e293b !important;
  border-color: #334155 !important;
}

[data-theme="dark"] .olam-dash-queue-card:hover {
  background: #243547 !important;
  border-color: #34d399 !important;
}

[data-theme="dark"] .olam-dash-queue-card.has-pending {
  background: linear-gradient(135deg, #241d13 0%, #2f2515 100%) !important;
  border-color: #5c4516 !important;
}

[data-theme="dark"] .olam-dash-queue-card.has-pending:hover {
  border-color: #f59e0b !important;
}

.olam-dash-queue-card-icon {
  width: 26px !important;
  height: 26px !important;
  border-radius: 6px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: #e8f5ed !important;
  color: var(--olam-primary, #059138) !important;
  font-size: 11px !important;
  flex-shrink: 0 !important;
  transition: transform 0.2s ease !important;
}

.olam-dash-queue-card:hover .olam-dash-queue-card-icon {
  transform: scale(1.05) !important;
}

.olam-dash-queue-card.has-pending .olam-dash-queue-card-icon {
  background: #fef3c7 !important;
  color: #d97706 !important;
}

[data-theme="dark"] .olam-dash-queue-card-icon {
  background: rgba(52, 211, 153, 0.15) !important;
  color: #34d399 !important;
}

[data-theme="dark"] .olam-dash-queue-card.has-pending .olam-dash-queue-card-icon {
  background: rgba(245, 158, 11, 0.2) !important;
  color: #fcd34d !important;
}

.olam-dash-queue-card-body {
  flex: 1 1 auto !important;
  min-width: 0 !important;
  overflow: hidden !important;
}

.olam-dash-queue-card-label {
  display: block !important;
  font-size: 0.65rem !important;
  font-weight: 600 !important;
  color: var(--olam-text-muted, #64748b) !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  line-height: 1.2 !important;
}

[data-theme="dark"] .olam-dash-queue-card-label {
  color: #94a3b8 !important;
}

.olam-dash-queue-card-count {
  display: block !important;
  font-size: 0.95rem !important;
  font-weight: 800 !important;
  font-family: 'JetBrains Mono', 'SF Mono', Consolas, monospace !important;
  color: var(--olam-text, #0f172a) !important;
  line-height: 1.2 !important;
}

.olam-dash-queue-card.has-pending .olam-dash-queue-card-count {
  color: #d97706 !important;
}

[data-theme="dark"] .olam-dash-queue-card-count {
  color: #f1f5f9 !important;
}

[data-theme="dark"] .olam-dash-queue-card.has-pending .olam-dash-queue-card-count {
  color: #fbbf24 !important;
}

.olam-dash-queue-card-arrow {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: #cbd5e1 !important;
  font-size: 9px !important;
  flex-shrink: 0 !important;
  transition: transform 0.2s ease, color 0.2s ease !important;
}

.olam-dash-queue-card:hover .olam-dash-queue-card-arrow {
  color: var(--olam-primary, #059138) !important;
  transform: translateX(2px) !important;
}

.olam-dash-queue-card.has-pending:hover .olam-dash-queue-card-arrow {
  color: #d97706 !important;
}

[data-theme="dark"] .olam-dash-queue-card-arrow {
  color: #475569 !important;
}

[data-theme="dark"] .olam-dash-queue-card:hover .olam-dash-queue-card-arrow {
  color: #34d399 !important;
}

[data-theme="dark"] .olam-dash-queue-card.has-pending:hover .olam-dash-queue-card-arrow {
  color: #fbbf24 !important;
}

/* --------------------------------------------------------------------------
   Stable & Smooth Stat Cards & Count FX (No text scale / dancing layout)
   -------------------------------------------------------------------------- */
.stat-cards-row .stat-card {
  cursor: pointer;
  user-select: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
  position: relative;
}

.stat-cards-row .stat-card:hover {
  border-color: var(--olam-primary-muted, #b9ddcd);
  box-shadow: 0 4px 16px rgba(15, 107, 79, 0.12);
}

.stat-cards-row .stat-card .sc-count {
  cursor: pointer;
  display: inline-block;
  font-variant-numeric: tabular-nums;
  transition: color 0.15s ease;
}

.stat-cards-row .stat-card .sc-count:hover {
  color: var(--olam-primary, #0f6b4f) !important;
}

.stat-cards-row .stat-card .sc-sub-item {
  cursor: pointer;
  padding: 2px 6px;
  margin: -2px 0;
  border-radius: 4px;
  font-variant-numeric: tabular-nums;
  transition: background-color 0.15s ease;
}

.stat-cards-row .stat-card .sc-sub-item:hover {
  background: rgba(15, 107, 79, 0.1);
}

[data-theme="dark"] .stat-cards-row .stat-card .sc-sub-item:hover {
  background: rgba(61, 214, 109, 0.15);
}

/* Cluster Marker Clean Hover */
.marker-cluster div {
  transition: background-color 0.2s ease, box-shadow 0.2s ease !important;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.25);
}

.marker-cluster:hover div {
  background-color: rgba(5, 145, 56, 0.96) !important;
  box-shadow: 0 4px 14px rgba(5, 145, 56, 0.4);
}

