/* ==========================================================================
   Understory — Native Grid
   Dark tech-network overlay theme
   ========================================================================== */

/* --- Reset & Base -------------------------------------------------------- */

*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  background: #0a0e17;
  color: #e0e6f0;
}

#map {
  position: absolute;
  inset: 0;
}

/* --- Branded Header Overlay ---------------------------------------------- */

#brand-header {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(12, 16, 28, 0.85);
  backdrop-filter: blur(12px);
  padding: 8px 18px 8px 14px;
  border-radius: 40px;
  border: 1px solid rgba(224, 155, 0, 0.35);
  pointer-events: none;
  user-select: none;
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}

.brand-logo {
  height: 38px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.4));
}

.brand-title-wrap {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.brand-wordmark {
  font-family: 'Inter', sans-serif;
  font-weight: 800;
  font-size: 20px;
  letter-spacing: 5px;
  background: linear-gradient(135deg, #e5a000 0%, #88b04b 50%, #35533f 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.5));
  line-height: 1.1;
}

.brand-tagline {
  font-weight: 400;
  font-size: 9.5px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(225, 235, 220, 0.75);
  margin-top: 2px;
}

/* --- Circular Dot Cluster Markers --------------------------------------- */

.dot-cluster-marker {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transform: scale(var(--map-zoom-scale, 1));
  transition: transform 0.2s ease-out;
}

.dot-cluster-inner {
  position: relative;
  width: 0;
  height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dot-pos {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy)));
  transition: transform 0.38s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: none;
}

.cluster-dot {
  position: absolute;
  top: 0; left: 0;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  transition: opacity 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
  animation: dance 2.5s infinite ease-in-out alternate;
  animation-delay: var(--delay);
}

.cluster-dot.center-dot {
  z-index: 2;
  border: 1px solid rgba(255, 255, 255, 0.4);
}

@keyframes dance {
  0% { transform: translate(-50%, -50%) scale(1); }
  50% { transform: translate(calc(-50% + 1px), calc(-50% - 1.5px)) scale(1.05); }
  100% { transform: translate(calc(-50% - 1.5px), calc(-50% + 1px)) scale(0.95); }
}

/* Hover effect: spread out the position wrappers */
.dot-cluster-marker:hover .dot-pos {
  transform: translate(calc(-50% + var(--dx) * 1.55), calc(-50% + var(--dy) * 1.55));
}

.dot-cluster-marker:hover .cluster-dot {
  opacity: 0.98;
}

.dot-cluster-marker:hover .dot-pos.is-center .cluster-dot {
  transform: translate(-50%, -50%) scale(1.4);
  box-shadow: 0 0 12px currentColor;
}

/* --- Dandelion Seed Bridge ---------------------------------------------- */

.dandelion-seed-container {
  position: relative;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0;
  animation: seedFadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.dandelion-seed-container.fade-out {
  animation: seedFadeOut 0.3s ease-in forwards;
}

.dandelion-seed {
  position: absolute;
  top: 50%;
  left: 50%;
  border-radius: 50%;
  animation: dandelionFloat 2.8s ease-in-out infinite alternate;
}

@keyframes seedFadeIn {
  0% { transform: scale(0.2); opacity: 0; }
  100% { transform: scale(1); opacity: 0.95; }
}

@keyframes seedFadeOut {
  0% { transform: scale(1); opacity: 0.95; }
  100% { transform: scale(0.2); opacity: 0; }
}

@keyframes dandelionFloat {
  0% {
    transform: translate(-50%, -50%) scale(1);
  }
  50% {
    transform: translate(calc(-50% + var(--drift-x, 2px)), calc(-50% + var(--drift-y, -3px))) scale(1.15);
  }
  100% {
    transform: translate(var(--drift-x, 10px), var(--drift-y, -10px)) rotate(360deg);
    opacity: 0;
  }
}

@keyframes fadein {
  from { opacity: 0; transform: scale(0.5); }
  to { opacity: 0.9; transform: scale(1); }
}

/* --- Map Tile Filters ---------------------------------------------------- */
#map.theme-dark .leaflet-tile-pane {
  /* Carto Dark Matter basemap is natively dark */
  filter: none;
}

#map.theme-light .leaflet-tile-pane {
  filter: none;
}

/* --- Legend (dark glassmorphism) ----------------------------------------- */

.legend {
  width: 250px;
  padding: 14px 16px 12px;
  background: rgba(12, 16, 28, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(0, 255, 200, 0.15);
  border-radius: 10px;
  box-shadow:
    0 0 20px rgba(0, 255, 200, 0.06),
    0 4px 24px rgba(0, 0, 0, 0.5);
  font-size: 11px;
  line-height: 1.3;
  color: #b0c4d8;
}

.legend-title {
  font-weight: 600;
  font-size: 12px;
  margin-bottom: 8px;
  color: #e0f0ff;
  letter-spacing: 0.5px;
}

.legend-bar {
  height: 10px;
  border-radius: 5px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  /* gradient injected by app.js */
}

.legend-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 4px;
  font-variant-numeric: tabular-nums;
  color: rgba(160, 200, 220, 0.7);
  font-size: 10px;
}

.legend-caption {
  margin-top: 3px;
  color: rgba(160, 200, 220, 0.45);
  font-size: 10px;
}

/* --- Popup (dark glassmorphism) ------------------------------------------ */

.leaflet-popup-content-wrapper {
  background: rgba(12, 16, 28, 0.88) !important;
  backdrop-filter: blur(16px) !important;
  -webkit-backdrop-filter: blur(16px) !important;
  border: 1px solid rgba(0, 255, 200, 0.18) !important;
  border-radius: 10px !important;
  box-shadow:
    0 0 24px rgba(0, 255, 200, 0.08),
    0 8px 32px rgba(0, 0, 0, 0.6) !important;
  color: #e0f0ff !important;
}

.leaflet-popup-tip {
  background: rgba(12, 16, 28, 0.88) !important;
  border: 1px solid rgba(0, 255, 200, 0.18) !important;
  border-top: none !important;
  border-left: none !important;
  box-shadow: none !important;
}

.leaflet-popup-content {
  margin: 12px 16px;
  min-width: 150px;
}

.leaflet-container a.leaflet-popup-close-button {
  padding: 6px 6px 0 0;
  color: rgba(160, 200, 220, 0.6) !important;
  font-size: 18px;
}

.leaflet-container a.leaflet-popup-close-button:hover {
  color: #00ffc8 !important;
}

.garden-popup h3 {
  margin: 0 0 6px;
  font-size: 14px;
  font-weight: 600;
  color: #ffffff;
}

.garden-popup .score {
  margin: 0 0 6px;
  font-size: 12px;
  color: #b0c4d8;
}

.garden-popup .score b {
  font-size: 16px;
  color: #00ffc8;
}

.garden-popup .notes {
  margin: 0;
  font-size: 11px;
  color: rgba(160, 200, 220, 0.65);
  line-height: 1.4;
}

.garden-popup .swatch {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 5px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 0 6px currentColor;
}

/* --- Tooltip (dark) ------------------------------------------------------ */

.leaflet-tooltip {
  background: rgba(12, 16, 28, 0.85) !important;
  border: 1px solid rgba(0, 255, 200, 0.15) !important;
  border-radius: 6px !important;
  color: #e0f0ff !important;
  font-family: 'Inter', sans-serif !important;
  font-size: 11px !important;
  padding: 4px 10px !important;
  box-shadow: 0 0 12px rgba(0, 255, 200, 0.06), 0 2px 8px rgba(0,0,0,0.4) !important;
}

.leaflet-tooltip-top::before {
  border-top-color: rgba(12, 16, 28, 0.85) !important;
}

.leaflet-tooltip-bottom::before {
  border-bottom-color: rgba(12, 16, 28, 0.85) !important;
}

/* --- Interactive cursors ------------------------------------------------- */

.leaflet-interactive {
  cursor: pointer;
}

.leaflet-interactive:focus:not(:focus-visible) {
  outline: none;
}

.leaflet-interactive:focus-visible {
  outline: 2px solid #00ffc8;
  outline-offset: 2px;
}

/* --- Error banner -------------------------------------------------------- */

.status {
  position: absolute;
  top: 60px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  max-width: 560px;
  padding: 12px 16px;
  background: rgba(30, 10, 10, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 80, 80, 0.3);
  border-radius: 8px;
  box-shadow: 0 0 20px rgba(255, 80, 80, 0.1), 0 4px 16px rgba(0,0,0,0.4);
  font-size: 13px;
  line-height: 1.45;
  color: #ffc0c0;
}

.status code {
  background: rgba(255, 255, 255, 0.08);
  padding: 1px 4px;
  border-radius: 3px;
}

/* --- Leaflet overrides for dark theme ------------------------------------ */

.leaflet-control-attribution {
  background: rgba(12, 16, 28, 0.7) !important;
  color: rgba(160, 200, 220, 0.5) !important;
  font-size: 10px !important;
}

.leaflet-control-attribution a {
  color: rgba(0, 229, 255, 0.6) !important;
}

.leaflet-control-zoom a {
  background: rgba(12, 16, 28, 0.8) !important;
  color: #b0c4d8 !important;
  border-color: rgba(0, 255, 200, 0.12) !important;
}

.leaflet-control-zoom a:hover {
  background: rgba(20, 28, 48, 0.95) !important;
  color: #00ffc8 !important;
}

.leaflet-control-scale-line {
  background: rgba(12, 16, 28, 0.7) !important;
  border-color: rgba(160, 200, 220, 0.3) !important;
  color: rgba(160, 200, 220, 0.6) !important;
  font-size: 10px !important;
}

/* --- Admin UI ------------------------------------------------------------ */

.admin-controls {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 1000;
  display: flex;
  gap: 10px;
}

.btn {
  background: rgba(12, 16, 28, 0.85);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(160, 200, 220, 0.3);
  color: #e0f0ff;
  padding: 8px 14px;
  border-radius: 6px;
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.btn:hover {
  background: rgba(20, 30, 48, 0.95);
  border-color: #00ffc8;
  color: #00ffc8;
}

.btn.primary {
  background: rgba(0, 255, 200, 0.15);
  border-color: #00ffc8;
  color: #00ffc8;
}

.btn.primary:hover {
  background: rgba(0, 255, 200, 0.25);
  box-shadow: 0 0 12px rgba(0, 255, 200, 0.3);
}

.btn.active {
  background: rgba(78, 155, 52, 0.25);
  border-color: #55ff00;
  color: #a6f264;
  box-shadow: 0 0 14px rgba(85, 255, 0, 0.3);
}

.btn.active:hover {
  background: rgba(78, 155, 52, 0.38);
  border-color: #74c436;
  color: #c4ff80;
}

.btn-indicator {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #667585;
  margin-right: 7px;
  vertical-align: middle;
  transition: all 0.2s ease;
}

.btn.active .btn-indicator {
  background: #55ff00;
  box-shadow: 0 0 8px #55ff00;
}

/* --- SSROC Corridor Popup Styles ----------------------------------------- */
.corridor-popup {
  font-family: 'Inter', sans-serif;
  color: #e0e6f0;
  font-size: 12px;
  line-height: 1.4;
}

.corridor-popup h3 {
  margin: 0 0 6px 0;
  font-size: 14px;
  font-weight: 600;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 6px;
}

.corridor-tag {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.corridor-tag.priority {
  background: rgba(78, 155, 52, 0.3);
  border: 1px solid #4E9B34;
  color: #8be660;
}

.corridor-tag.supporting-habitat {
  background: rgba(116, 196, 54, 0.25);
  border: 1px solid #74C436;
  color: #aaff66;
}

.corridor-tag.supporting-area {
  background: rgba(230, 152, 0, 0.25);
  border: 1px solid #E69800;
  color: #ffc44d;
}

.corridor-detail {
  margin: 4px 0;
  font-size: 11px;
  color: #a0b8d0;
}

.corridor-opportunity {
  margin-top: 8px;
  padding: 6px 8px;
  background: rgba(0, 255, 200, 0.08);
  border-left: 3px solid #00ffc8;
  border-radius: 0 4px 4px 0;
  font-size: 11px;
  color: #c0f4ea;
}

/* --- Admin Form ---------------------------------------------------------- */

.admin-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 5px;
}

.admin-form label {
  font-size: 11px;
  color: #b0c4d8;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.admin-form input, .admin-form textarea {
  background: rgba(0,0,0,0.3);
  border: 1px solid rgba(160, 200, 220, 0.2);
  color: #fff;
  border-radius: 4px;
  padding: 6px 8px;
  font-family: 'Inter', sans-serif;
  font-size: 12px;
}

.admin-form input:focus, .admin-form textarea:focus {
  outline: none;
  border-color: #00ffc8;
  background: rgba(0, 255, 200, 0.05);
}

.admin-form .form-actions {
  display: flex;
  justify-content: space-between;
  margin-top: 4px;
}

.btn.danger {
  border-color: rgba(255, 60, 60, 0.5);
  color: #ff5555;
}

.btn.danger:hover {
  background: rgba(255, 60, 60, 0.15);
  border-color: #ff5555;
}

/* --- Modals (About & Admin) ---------------------------------------------- */

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(5, 8, 15, 0.78);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  animation: fadeIn 0.2s ease-out;
}

.modal-backdrop[hidden] {
  display: none !important;
}

.modal-window {
  background: rgba(13, 18, 32, 0.96);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(0, 255, 200, 0.22);
  border-radius: 14px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.8), 0 0 30px rgba(0, 255, 200, 0.08);
  color: #e0f0ff;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: modalEnter 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalEnter {
  from { opacity: 0; transform: scale(0.96) translateY(8px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.about-modal-window {
  width: 100%;
  max-width: 820px;
  max-height: 88vh;
}

.admin-modal-window {
  width: 100%;
  max-width: 440px;
}

.modal-header {
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(20, 28, 48, 0.45);
}

.modal-header-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.modal-logo {
  height: 34px;
  width: auto;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.4));
}

.modal-title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #ffffff;
}

.modal-subtitle {
  margin: 2px 0 0;
  font-size: 11px;
  color: rgba(160, 200, 220, 0.7);
  letter-spacing: 0.3px;
}

.modal-close-btn {
  background: transparent;
  border: none;
  color: rgba(160, 200, 220, 0.6);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: all 0.2s;
}

.modal-close-btn:hover {
  color: #00ffc8;
  background: rgba(255, 255, 255, 0.06);
}

/* Modal Tabs */
.modal-tabs {
  display: flex;
  background: rgba(10, 14, 24, 0.85);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 4px 16px 0;
  gap: 6px;
  overflow-x: auto;
}

.modal-tab {
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: rgba(160, 200, 220, 0.65);
  padding: 10px 14px;
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.modal-tab:hover {
  color: #ffffff;
}

.modal-tab.active {
  color: #00ffc8;
  border-bottom-color: #00ffc8;
  font-weight: 600;
}

/* Modal Body */
.modal-body {
  padding: 20px;
  overflow-y: auto;
  font-size: 13px;
  line-height: 1.55;
  color: #c8d8e8;
}

.modal-tab-pane {
  display: none;
}

.modal-tab-pane.active {
  display: block;
}

.about-section-lead {
  font-size: 13.5px;
  line-height: 1.6;
  padding: 12px 14px;
  background: rgba(0, 255, 200, 0.06);
  border-left: 3px solid #00ffc8;
  border-radius: 0 8px 8px 0;
  margin-bottom: 18px;
  color: #e0f4f0;
}

.section-heading {
  font-size: 14px;
  font-weight: 600;
  color: #ffffff;
  margin: 18px 0 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.section-desc {
  margin: 0 0 12px;
  font-size: 12px;
  color: #9cb2c8;
  line-height: 1.5;
}

/* Methodology Cards */
.methodology-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

.methodology-card {
  background: rgba(18, 24, 40, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 12px;
  position: relative;
  transition: border-color 0.2s, background 0.2s;
}

.methodology-card:hover {
  border-color: rgba(0, 255, 200, 0.3);
  background: rgba(22, 32, 54, 0.8);
}

.methodology-card .card-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  color: #00ffc8;
  background: rgba(0, 255, 200, 0.12);
  padding: 2px 7px;
  border-radius: 4px;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.methodology-card h4 {
  margin: 0 0 5px;
  font-size: 13px;
  font-weight: 600;
  color: #ffffff;
}

.methodology-card p {
  margin: 0;
  font-size: 11px;
  line-height: 1.45;
  color: #9cb2c8;
}

/* Bands Table */
.bands-table-wrap {
  overflow-x: auto;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 12px;
}

.bands-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11.5px;
  text-align: left;
}

.bands-table th {
  background: rgba(16, 22, 36, 0.9);
  padding: 8px 12px;
  font-weight: 600;
  color: #b0c8e0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  white-space: nowrap;
}

.bands-table td {
  padding: 8px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: #c4d4e6;
  vertical-align: middle;
}

.bands-table tr:last-child td {
  border-bottom: none;
}

.score-pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.score-pill.score-5 { background: rgba(26, 152, 80, 0.25); color: #2ecc71; border: 1px solid #1a9850; }
.score-pill.score-4 { background: rgba(166, 217, 106, 0.25); color: #a6d96a; border: 1px solid #88c050; }
.score-pill.score-3 { background: rgba(253, 219, 199, 0.22); color: #fddbc7; border: 1px solid #e0b090; }
.score-pill.score-2 { background: rgba(239, 138, 98, 0.25); color: #ef8a62; border: 1px solid #ef8a62; }
.score-pill.score-1 { background: rgba(178, 24, 43, 0.25); color: #ff6b6b; border: 1px solid #b2182b; }

/* Corridor Types in Modal */
.corridor-types {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.corridor-type-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 8px;
  background: rgba(18, 24, 40, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.corridor-color-swatch {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  margin-top: 3px;
  flex-shrink: 0;
}

.corridor-color-swatch.priority {
  background: rgba(78, 155, 52, 0.7);
  border: 1.5px solid #4E9B34;
}

.corridor-color-swatch.supporting-habitat {
  background: rgba(116, 196, 54, 0.6);
  border: 1.5px solid #74C436;
}

.corridor-color-swatch.supporting-area {
  background: rgba(230, 152, 0, 0.5);
  border: 1.5px dashed #E69800;
}

.corridor-type-card strong {
  display: block;
  font-size: 12.5px;
  color: #ffffff;
  margin-bottom: 2px;
}

.corridor-type-card p {
  margin: 0;
  font-size: 11.5px;
  color: #9cb2c8;
  line-height: 1.4;
}

/* Metadata List */
.meta-list {
  margin: 0 0 16px;
  padding-left: 20px;
}

.meta-list li {
  margin-bottom: 8px;
  font-size: 12px;
  color: #a8bfd4;
  line-height: 1.5;
}

.modal-admin-link-box {
  margin-top: 24px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11.5px;
  color: rgba(160, 200, 220, 0.65);
}

.btn.text-btn {
  background: transparent;
  box-shadow: none;
  border-color: rgba(160, 200, 220, 0.3);
  padding: 5px 10px;
  font-size: 11px;
}

.btn.text-btn:hover {
  background: rgba(0, 255, 200, 0.1);
  border-color: #00ffc8;
}

/* Admin Input & Error */
.admin-input {
  width: 100%;
  background: rgba(8, 12, 22, 0.7);
  border: 1px solid rgba(160, 200, 220, 0.3);
  color: #ffffff;
  border-radius: 6px;
  padding: 10px 12px;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  box-sizing: border-box;
  transition: all 0.2s;
}

.admin-input:focus {
  outline: none;
  border-color: #00ffc8;
  box-shadow: 0 0 12px rgba(0, 255, 200, 0.25);
  background: rgba(12, 18, 30, 0.9);
}

.admin-auth-error {
  font-size: 11.5px;
  color: #ff6b6b;
  background: rgba(255, 80, 80, 0.1);
  padding: 6px 10px;
  border-radius: 4px;
  border: 1px solid rgba(255, 80, 80, 0.25);
}

/* --- Potential Area Polygons & Geoman Tool -------------------------------- */
.potential-area-polygon {
  stroke-dasharray: 5, 6;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: stroke-width 0.2s ease, fill-opacity 0.2s ease;
}

.potential-area-polygon:hover {
  stroke-width: 4px !important;
  fill-opacity: 0.38 !important;
  filter: drop-shadow(0 0 8px rgba(0, 255, 200, 0.7));
}

.potential-badge {
  display: inline-block;
  margin-bottom: 6px;
  padding: 2px 8px;
  background: rgba(0, 255, 200, 0.15);
  border: 1px dashed #00ffc8;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  color: #00ffc8;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.custom-potential-icon {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2300ffc8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' stroke-dasharray='3 3'%3E%3Cpolygon points='12 2 22 8.5 22 15.5 12 22 2 15.5 2 8.5 12 2'/%3E%3C/svg%3E") !important;
  background-size: 18px 18px !important;
  background-repeat: no-repeat !important;
  background-position: center !important;
}

.custom-tree-icon {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%2355ff00'%3E%3Ccircle cx='12' cy='12' r='4'/%3E%3Ccircle cx='6' cy='8' r='2'/%3E%3Ccircle cx='18' cy='8' r='2'/%3E%3Ccircle cx='8' cy='16' r='2'/%3E%3Ccircle cx='16' cy='16' r='2'/%3E%3C/svg%3E") !important;
  background-size: 18px 18px !important;
  background-repeat: no-repeat !important;
  background-position: center !important;
}
