/* Base Styles */
html, body { 
  height: 100%; 
  margin: 0; 
  font-family: system-ui, -apple-system, sans-serif;
  cursor: default; /* Ensure default cursor */
  background: #0A2540 !important; /* Dark navy background to match new theme */
}

/* Flash animation for requirement highlighting */
@keyframes flash-red {
  0%, 100% { background-color: transparent; }
  25%, 75% { background-color: #ff6b6b; }
  50% { background-color: transparent; }
}

/* Authentication UI Styles */
.auth-container {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-right: 8px;
}

#auth-logged-in {
  display: flex;
  align-items: center;
  gap: 8px;
}

.user-info {
  color: #6D9FC2;
  font-size: 14px;
  padding: 6px 12px;
  background: rgba(109, 159, 194, 0.1);
  border-radius: 4px;
  border: 1px solid rgba(80, 227, 194, 0.3);
}

.btn-primary {
  background: #6D9FC2;
  color: #0A2540;
  border: none;
  font-weight: 600;
}

.btn-primary:hover {
  background: #45d1b8;
}

.btn-secondary {
  background: rgba(109, 159, 194, 0.1);
  color: #6D9FC2;
  border: 1px solid rgba(80, 227, 194, 0.3);
}

.btn-secondary:hover {
  background: rgba(109, 159, 194, 0.2);
}

.btn-outline {
  background: transparent;
  color: #999;
  border: 1px solid #666;
  font-size: 12px;
  padding: 4px 8px;
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ccc;
}

/* Layout Structure */
#map { 
  height: 100%; 
  background: #05192D;
  cursor: grab;
  margin-left: 300px; /* Space for left sidebar */
  margin-top: 60px; /* Space for top toolbar */
}

#map:active {
  cursor: grabbing;
}

/* Left Sidebar */
.left-sidebar {
  position: fixed;
  top: 60px; /* Below toolbar */
  left: 0;
  width: 300px; /* Slightly wider for better spacing */
  height: calc(100vh - 90px); /* Extended down 30px - account for toolbar and partial status bar */
  background: linear-gradient(135deg, rgba(10,37,64,0.95), rgba(5,25,45,0.95));
  backdrop-filter: blur(10px);
  border-right: 1px solid rgba(255,255,255,0.15);
  box-shadow: 2px 0 10px rgba(0,0,0,0.2);
  color: #fff;
  overflow-x: hidden;
  overflow-y: hidden; /* Let sections handle their own scrolling */
  z-index: 1000;
  display: flex;
  flex-direction: column;
}

.sidebar-section {
  padding: 16px 20px;
  overflow-x: hidden;
  word-wrap: break-word;
  transition: all 0.3s ease;
}

.sidebar-section.layers-section {
  border-bottom: 1px solid rgba(255,255,255,0.08);
  flex: 1 1 auto;
  min-height: 240px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.3) transparent;
}

/* Integrated results panel styling */
#resultsPanel {
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.3) transparent;
  background: transparent !important;
}

/* Draggable Divider */
.sidebar-divider {
  height: 10px;
  background: rgba(255,255,255,0.08);
  cursor: row-resize;
  border-top: 1px solid rgba(255,255,255,0.15);
  border-bottom: 1px solid rgba(255,255,255,0.15);
  position: relative;
  flex: 0 0 10px;
  transition: all 0.2s ease;
}

.sidebar-divider:hover {
  background: rgba(80,227,194,0.2);
  border-color: rgba(80,227,194,0.3);
}

.sidebar-divider::after {
  content: '⋯';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: rgba(255,255,255,0.6);
  font-size: 14px;
  transition: color 0.2s ease;
}

.sidebar-divider:hover::after {
  color: rgba(80,227,194,0.8);
}

/* Top Toolbar - Full Width */
.toolbar { 
  position: fixed; 
  z-index: 1001; 
  top: 0; 
  left: 0; 
  right: 0; 
  height: 60px;
  background: linear-gradient(135deg, rgba(10,37,64,0.95), rgba(5,25,45,0.95)); 
  backdrop-filter: blur(10px);
  padding: 0 16px; 
  box-shadow: 0 2px 20px rgba(0,0,0,0.3);
  border-bottom: 1px solid rgba(255,255,255,0.1);
  color: #fff;
  display: flex;
  align-items: center;
}

/* Logo Container */
.logo-container {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-right: 20px;
}

.toolbar-logo {
  height: 60px; /* Full toolbar height - logo has internal padding */
  width: auto;
  max-width: 220px; /* Increased to accommodate larger height */
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
  cursor: pointer;
  transition: transform 0.2s ease;
  /* If your logo is dark, uncomment the line below */
  /* filter: brightness(0) invert(1) drop-shadow(0 2px 4px rgba(0,0,0,0.2)); */
}

.toolbar-logo:hover {
  transform: scale(1.05);
}

/* Hide logo text on smaller screens if needed */
@media (max-width: 768px) {
  .logo-text {
    display: none;
  }
}

.logo-text {
  font-size: 16px;
  font-weight: 600;
  color: #A9C0DE;
  white-space: nowrap;
  letter-spacing: 0.5px;
}

.row { 
  display: flex; 
  gap: 12px; 
  flex-wrap: wrap; 
  align-items: center; 
}

.btn { 
  cursor: pointer; 
  border: 1px solid rgba(255,255,255,0.2); 
  background: linear-gradient(135deg, rgba(0,104,158,0.85), rgba(109,159,194,0.85));
  color: white;
  padding: 8px 14px; 
  border-radius: 10px; 
  transition: all 0.3s ease;
  font-weight: 500;
  user-select: none;
}

.btn:hover { 
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,104,158,0.4);
  background: linear-gradient(135deg, rgba(0,104,158,1), rgba(109,159,194,1));
}

.btn:active {
  transform: translateY(0);
}

.btn-danger { 
  background: linear-gradient(135deg, rgba(255,82,82,0.85), rgba(255,107,107,0.85)); 
}

.btn-success { 
  background: linear-gradient(135deg, rgba(76,217,100,0.85), rgba(52,199,89,0.85)); 
}

.small { 
  font-size: 12px; 
  color: #b0b0b0; 
}

.panel { 
  background: rgba(255,255,255,0.05); 
  border: 1px solid rgba(255,255,255,0.1); 
  border-radius: 8px; 
  padding: 12px;
  backdrop-filter: blur(5px);
  color: #fff;
  margin-bottom: 12px;
}

/* Toolbar Dropdown Styles */
.toolbar-dropdown {
  position: relative;
  margin: 0 8px;
}

.dropdown-toggle {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  color: white;
  padding: 8px 16px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 14px;
  font-weight: 500;
}

.dropdown-toggle:hover {
  background: rgba(255,255,255,0.2);
  border-color: rgba(255,255,255,0.3);
}

/* Special styling for premium/featured buttons */
.dropdown-toggle.featured {
  background: linear-gradient(135deg, #00689E 0%, #005387 100%);
  border: none;
  font-weight: 600;
}

.dropdown-toggle.featured:hover {
  background: linear-gradient(135deg, #007bb5 0%, #00689E 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0,104,158,0.3);
}

.dropdown-content {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: linear-gradient(135deg, rgba(10,37,64,0.98), rgba(5,25,45,0.98));
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 8px;
  padding: 0;
  margin-top: 4px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  backdrop-filter: blur(10px);
  display: none;
  z-index: 1002;
  min-width: 280px;
  max-height: 80vh;
  overflow-y: auto;
}

.dropdown-content.active {
  display: block;
}

/* Unified dropdown header */
.dropdown-header {
  padding: 15px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  background: rgba(80,227,194,0.05);
}

.dropdown-header-title {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: #50e3c2;
  display: flex;
  align-items: center;
  gap: 8px;
}

.dropdown-header-subtitle {
  margin: 4px 0 0 0;
  font-size: 12px;
  color: #999;
}

/* Dropdown body - content padding */
.dropdown-body {
  padding: 15px;
}

/* Unified section styling */
.dropdown-section {
  margin-bottom: 16px;
  padding: 12px;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 6px;
}

.dropdown-section:last-child {
  margin-bottom: 0;
}

.dropdown-section-title {
  font-size: 13px;
  font-weight: 600;
  color: #50e3c2;
  margin: 0 0 10px 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Button group standardization */
.dropdown-button-group {
  display: flex;
  gap: 6px;
  margin: 8px 0;
  justify-content: center;
  flex-wrap: wrap;
}

.dropdown-button-group .btn {
  flex: 1;
  min-width: 80px;
  font-size: 11px;
}

/* Collapsible details styling with indicators */
.dropdown-section > summary,
.dropdown-body details > summary {
  list-style: none;
  position: relative;
  padding-left: 24px;
  user-select: none;
}

.dropdown-section > summary::-webkit-details-marker,
.dropdown-body details > summary::-webkit-details-marker {
  display: none;
}

.dropdown-section > summary::before,
.dropdown-body details > summary::before {
  content: '▶';
  position: absolute;
  left: 4px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 10px;
  transition: transform 0.2s ease;
  color: #50e3c2;
}

.dropdown-section[open] > summary::before,
.dropdown-body details[open] > summary::before {
  transform: translateY(-50%) rotate(90deg);
}

/* Enhanced sidebar input styling */
.left-sidebar input[type="text"], 
.left-sidebar input[type="date"],
.left-sidebar input[type="range"],
.left-sidebar select {
  max-width: 100%;
  box-sizing: border-box;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 6px;
  padding: 6px 10px;
  color: #fff;
  transition: all 0.2s ease;
  margin-top: 4px;
}

.left-sidebar input[type="text"]:focus,
.left-sidebar input[type="date"]:focus,
.left-sidebar select:focus {
  background: rgba(255,255,255,0.15);
  border-color: rgba(80,227,194,0.5);
  outline: none;
  box-shadow: 0 0 0 2px rgba(80,227,194,0.2);
}

.left-sidebar input[type="checkbox"] {
  margin-right: 8px;
  accent-color: #6D9FC2;
}

.left-sidebar label {
  word-wrap: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
  display: flex;
  align-items: center;
  margin-bottom: 0;
  line-height: 1.1;
  cursor: pointer;
  transition: color 0.2s ease;
}

.left-sidebar label:hover {
  color: rgba(255,255,255,0.9);
}

/* Section headers */
.sidebar-section .small[style*="font-weight:600"] {
  color: rgba(80,227,194,0.9);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 12px !important;
  margin-bottom: 8px !important;
}

/* Enhanced scrollbar styling */
.sidebar-section::-webkit-scrollbar,
#expiringList::-webkit-scrollbar {
  width: 6px;
}

.sidebar-section::-webkit-scrollbar-track,
#expiringList::-webkit-scrollbar-track {
  background: rgba(255,255,255,0.05);
  border-radius: 3px;
}

.sidebar-section::-webkit-scrollbar-thumb,
#expiringList::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.2);
  border-radius: 3px;
  transition: background 0.2s ease;
}

.sidebar-section::-webkit-scrollbar-thumb:hover,
#expiringList::-webkit-scrollbar-thumb:hover {
  background: rgba(80,227,194,0.4);
}

/* Style the main analytics dashboard scrollbar to be subtle */
.analytics-dashboard::-webkit-scrollbar {
  width: 4px;
}
.analytics-dashboard::-webkit-scrollbar-track {
  background: transparent;
}
.analytics-dashboard::-webkit-scrollbar-thumb {
  background: rgba(109, 159, 194, 0.2);
  border-radius: 2px;
}
.analytics-dashboard::-webkit-scrollbar-thumb:hover {
  background: rgba(109, 159, 194, 0.4);
}
.analytics-dashboard {
  scrollbar-width: thin;
  scrollbar-color: rgba(109, 159, 194, 0.2) transparent;
}

/* Apply slim scrollbar styling to nested analytics elements */
.analytics-dashboard *::-webkit-scrollbar,
.chart-container::-webkit-scrollbar,
.holder-bar-chart::-webkit-scrollbar,
.trends-chart::-webkit-scrollbar,
.insights-list::-webkit-scrollbar,
#map::-webkit-scrollbar,
.leaflet-container::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

.analytics-dashboard::-webkit-scrollbar-track,
.analytics-dashboard *::-webkit-scrollbar-track,
.chart-container::-webkit-scrollbar-track,
.holder-bar-chart::-webkit-scrollbar-track,
.trends-chart::-webkit-scrollbar-track,
.insights-list::-webkit-scrollbar-track,
#map::-webkit-scrollbar-track,
.leaflet-container::-webkit-scrollbar-track {
  background: rgba(255,255,255,0.05);
  border-radius: 3px;
}

.analytics-dashboard::-webkit-scrollbar-thumb,
.analytics-dashboard *::-webkit-scrollbar-thumb,
.chart-container::-webkit-scrollbar-thumb,
.holder-bar-chart::-webkit-scrollbar-thumb,
.trends-chart::-webkit-scrollbar-thumb,
.insights-list::-webkit-scrollbar-thumb,
#map::-webkit-scrollbar-thumb,
.leaflet-container::-webkit-scrollbar-thumb {
  background: rgba(109, 159, 194, 0.3);
  border-radius: 3px;
  transition: background 0.2s ease;
}

.analytics-dashboard::-webkit-scrollbar-thumb:hover,
.analytics-dashboard *::-webkit-scrollbar-thumb:hover,
.chart-container::-webkit-scrollbar-thumb:hover,
.holder-bar-chart::-webkit-scrollbar-thumb:hover,
.trends-chart::-webkit-scrollbar-thumb:hover,
.insights-list::-webkit-scrollbar-thumb:hover,
#map::-webkit-scrollbar-thumb:hover,
.leaflet-container::-webkit-scrollbar-thumb:hover {
  background: rgba(109, 159, 194, 0.5);
}

/* Spacing improvements */
.sidebar-section .small {
  margin-bottom: 0;
}

.sidebar-section .small:last-child {
  margin-bottom: 0;
}

/* Progress bar styling */
#deadClipProgress {
  display: none;
  margin-left: 16px;
  margin-top: 8px;
  align-items: center;
  gap: 8px;
}

#deadClipProgress > div {
  flex: 1;
  height: 8px;
  background: rgba(255,255,255,0.1);
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.1);
}

#deadClipProgressBar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #6D9FC2, #00689E);
  transition: width 0.3s ease;
}

/* Result items styling for better integration */
#resultList, #featureInfo, #expiringList {
  padding: 0;
  margin: 0;
}

#resultList {
  display: block !important;
  visibility: visible !important;
}

#resultList .result-item {
  margin-bottom: 2px;
  padding: 6px 8px;
  border-radius: 4px;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.05);
  transition: all 0.2s ease;
  cursor: pointer;
}

#resultList .result-item:hover {
  background: rgba(80,227,194,0.1);
  border-color: rgba(80,227,194,0.3);
}

#resultList .result-item.selected {
  background: rgba(80,227,194,0.25) !important;
  border-color: rgba(80,227,194,0.8) !important;
  border-left: 4px solid rgba(80,227,194,1) !important;
  font-weight: 600 !important;
  color: rgba(255,255,255,1) !important;
  box-shadow: 0 2px 8px rgba(80,227,194,0.3) !important;
  transform: translateX(2px);
}

#featureInfo {
  background: rgba(80,227,194,0.03);
  border-radius: 4px;
  padding: 8px;
  margin-top: 8px;
  border: 1px solid rgba(80,227,194,0.15);
  border-left: 3px solid rgba(80,227,194,0.5);
}

#featureInfo:empty {
  display: none;
}

#expiringList .small {
  margin-bottom: 2px;
  padding: 4px 6px;
  border-radius: 3px;
  background: rgba(255,193,7,0.05);
  border: 1px solid rgba(255,193,7,0.1);
  transition: all 0.2s ease;
}

#expiringList .small:hover {
  background: rgba(255,193,7,0.1);
  border-color: rgba(255,193,7,0.3);
}

/* Diagnostic Messages */
#diag { 
  position: absolute; 
  left: 50%; 
  transform: translateX(-50%); 
  top: 70px; 
  z-index: 1001; 
  background: linear-gradient(135deg, rgba(255,193,7,0.95), rgba(255,152,0,0.95)); 
  color: #663c00; 
  border: 1px solid rgba(255,235,59,0.5); 
  padding: 8px 12px; 
  border-radius: 10px; 
  box-shadow: 0 4px 15px rgba(0,0,0,.2); 
  display: none; 
  max-width: 80%;
  backdrop-filter: blur(10px);
}

/* List Layouts */
.list { 
  display: grid; 
  grid-template-columns: repeat(3, minmax(160px, 1fr)); 
  gap: 4px 10px; 
  max-height: 220px; 
  overflow: auto; 
}

#groupList { 
  display: grid; 
  grid-template-columns: repeat(2, minmax(160px, 1fr)); 
  gap: 4px 10px; 
  max-height: 220px; 
  overflow: auto; 
}

/* Legend */
.legend { 
  position: fixed; 
  right: 16px; 
  bottom: 35px; /* Closer to status bar */
  z-index: 1000; 
  background: linear-gradient(135deg, rgba(10,37,64,0.95), rgba(5,25,45,0.95));
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.1);
  color: #fff;
  padding: 10px 12px; 
  border-radius: 8px 8px 0 0; /* Rounded top, flat bottom to sit on status bar */
  box-shadow: 0 6px 25px rgba(0,0,0,.3); 
  font: 12px/1.4 system-ui; 
}

.legend div { 
  margin: 3px 0; 
}

.legend .swatch { 
  display: inline-block; 
  width: 14px; 
  height: 14px; 
  margin-right: 8px; 
  border-radius: 3px; 
  border: 1px solid rgba(255,255,255,0.3); 
  vertical-align: middle; 
}

/* Results Panel - Now integrated into sidebar flow */

#resultsPanel div.result-item.small {
  padding: 4px 6px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  cursor: pointer;
  transition: background-color 0.2s ease;
}

#resultsPanel div.result-item.small:hover {
  background: rgba(80,227,194,0.1);
}

#resultsPanel div.result-item.selected {
  background: rgba(80,227,194,0.25) !important;
  border-left: 4px solid rgba(80,227,194,1) !important;
  font-weight: 600 !important;
  box-shadow: 0 2px 8px rgba(80,227,194,0.3) !important;
}

/* Enhanced visibility for result list when feature is selected */
#resultList {
  border: 1px solid rgba(80,227,194,0.2);
  border-radius: 4px;
  background: rgba(0,0,0,0.1);
}

#resultList:not(:empty) {
  box-shadow: 0 2px 12px rgba(80,227,194,0.1);
}

/* Statistics Panel */
#statsPanel {
  display: none;
  position: fixed;
  right: 10px;
  top: 70px;
  z-index: 2000;
  width: 200px;
  max-height: 240px;
  overflow-y: auto;
  background: linear-gradient(135deg, rgba(10,37,64,0.95), rgba(5,25,45,0.95));
  backdrop-filter: blur(10px);
  border: 1px solid rgba(80, 227, 194, 0.4);
  border-radius: 10px;
  padding: 10px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
  color: #fff;
}

/* Form Controls */
input, select { 
  background: rgba(255,255,255,0.1); 
  border: 1px solid rgba(255,255,255,0.2); 
  color: #fff; 
  border-radius: 6px; 
  padding: 4px 8px; 
}

input:focus, select:focus { 
  outline: none; 
  border-color: rgba(80,227,194,0.8); 
  box-shadow: 0 0 10px rgba(80,227,194,0.3); 
}

/* Range Slider Styles */
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  cursor: pointer;
  padding: 0;
  height: 20px;
}

/* Track */
input[type="range"]::-webkit-slider-track {
  background: rgba(255,255,255,0.2);
  height: 6px;
  border-radius: 3px;
  border: none;
}

input[type="range"]::-moz-range-track {
  background: rgba(255,255,255,0.2);
  height: 6px;
  border-radius: 3px;
  border: none;
}

/* Thumb */
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  height: 18px;
  width: 18px;
  border-radius: 50%;
  background: #6D9FC2;
  border: 2px solid rgba(255,255,255,0.3);
  cursor: pointer;
  transition: all 0.2s ease;
}

input[type="range"]::-moz-range-thumb {
  height: 18px;
  width: 18px;
  border-radius: 50%;
  background: #6D9FC2;
  border: 2px solid rgba(255,255,255,0.3);
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
}

/* Hover and focus states */
input[type="range"]::-webkit-slider-thumb:hover {
  background: #40d3b2;
  transform: scale(1.1);
  box-shadow: 0 0 10px rgba(80,227,194,0.5);
}

input[type="range"]::-moz-range-thumb:hover {
  background: #40d3b2;
  transform: scale(1.1);
  box-shadow: 0 0 10px rgba(80,227,194,0.5);
}

input[type="range"]:focus {
  outline: none;
}

input[type="range"]:focus::-webkit-slider-thumb {
  box-shadow: 0 0 15px rgba(80,227,194,0.7);
}

/* Cluster Styles */
.marker-cluster.zero { 
  display: none; 
}

/* MINDEX cluster styling - more specific selectors to override defaults */
.marker-cluster-mindex div,
.marker-cluster-mindex.marker-cluster-small div,
.marker-cluster-mindex.marker-cluster-medium div,
.marker-cluster-mindex.marker-cluster-large div { 
  background: linear-gradient(135deg, rgba(255,215,0,0.85), rgba(255,193,7,0.85)) !important; 
  color: #333 !important; 
  border: 2px solid rgba(255,255,255,.95) !important;
  box-shadow: 0 4px 15px rgba(255,215,0,0.5) !important;
  text-align: center !important;
  font-weight: 700 !important;
  border-radius: 50% !important;
  width: 40px !important;
  height: 40px !important;
  line-height: 36px !important;
  margin-left: -20px !important;
  margin-top: -20px !important;
}

.marker-cluster-mindex,
.marker-cluster-mindex.marker-cluster-small,
.marker-cluster-mindex.marker-cluster-medium,
.marker-cluster-mindex.marker-cluster-large {
  background: linear-gradient(135deg, rgba(255,215,0,0.3), rgba(255,193,7,0.3)) !important;
}

/* MINDEX custom shape markers */
.mindex-shape-marker {
  background: transparent !important;
  border: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

.mindex-shape-marker div {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mindex-shape-marker svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.mindex-shape-marker svg polygon,
.mindex-shape-marker svg rect,
.mindex-shape-marker svg circle {
  stroke-width: 0.5;
  cursor: pointer;
}

.mindex-shape-marker:hover svg polygon,
.mindex-shape-marker:hover svg rect,
.mindex-shape-marker:hover svg circle {
  stroke-width: 1.5;
  filter: brightness(1.2);
}

/* Drillhole cluster styling - more specific selectors to override defaults */
.marker-cluster-drill div,
.marker-cluster-drill.marker-cluster-small div,
.marker-cluster-drill.marker-cluster-medium div,
.marker-cluster-drill.marker-cluster-large div { 
  background: linear-gradient(135deg, rgba(64,64,64,0.9), rgba(32,32,32,0.9)) !important; 
  color: #fff !important; 
  border: 2px solid rgba(255,255,255,.95) !important;
  box-shadow: 0 4px 15px rgba(0,0,0,0.6) !important;
  text-align: center !important;
  font-weight: 700 !important;
  border-radius: 50% !important;
  width: 40px !important;
  height: 40px !important;
  line-height: 36px !important;
  margin-left: -20px !important;
  margin-top: -20px !important;
}

.marker-cluster-drill,
.marker-cluster-drill.marker-cluster-small,
.marker-cluster-drill.marker-cluster-medium,
.marker-cluster-drill.marker-cluster-large { 
  background: linear-gradient(135deg, rgba(64,64,64,0.3), rgba(32,32,32,0.3)) !important; 
}

/* Geochemistry cluster styling - blue theme to match geochem points (#2196F3) */
.marker-cluster-geochem div,
.marker-cluster-geochem.marker-cluster-small div,
.marker-cluster-geochem.marker-cluster-medium div,
.marker-cluster-geochem.marker-cluster-large div { 
  background: linear-gradient(135deg, rgba(33,150,243,0.85), rgba(100,181,246,0.85)) !important; 
  color: #fff !important; 
  border: 2px solid rgba(255,255,255,.95) !important;
  box-shadow: 0 4px 15px rgba(33,150,243,0.5) !important;
  text-align: center !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 36px !important;
  height: 36px !important;
  border-radius: 50% !important;
  position: relative !important;
  left: -18px !important;
  top: -18px !important;
}

.marker-cluster-geochem,
.marker-cluster-geochem.marker-cluster-small,
.marker-cluster-geochem.marker-cluster-medium,
.marker-cluster-geochem.marker-cluster-large { 
  background: linear-gradient(135deg, rgba(33,150,243,0.3), rgba(100,181,246,0.3)) !important; 
}

/* Ensure cluster text is properly centered and sized */
.marker-cluster-mindex span,
.marker-cluster-drill span,
.marker-cluster-geochem span {
  font-size: 12px !important;
  font-weight: 600 !important;
  line-height: 36px !important;
  display: block !important;
  width: 100% !important;
  text-align: center !important;
  margin: 0 !important;
  padding: 0 !important;
}

.marker-cluster.singleton { 
  display: none !important; 
}

/* Drillhole Icons */
.drill-sq { 
  width: 10px; 
  height: 10px; 
  background: linear-gradient(135deg, #000, #333); 
  border: 2px solid #fff; 
  box-sizing: border-box; 
  border-radius: 2px; 
  box-shadow: 0 2px 8px rgba(0,0,0,0.3); 
}

/* Popup Styles */
.leaflet-popup-content-wrapper { 
  max-width: 800px; 
  background: linear-gradient(135deg, rgba(10,37,64,0.95), rgba(5,25,45,0.95));
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.1);
  color: #fff;
}

.leaflet-popup-content { 
  width: 780px !important; 
  margin: 12px; 
}

.popup td {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 4px 8px;
  color: #eee;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.popup td.key {
  font-weight: 600;
  color: #6D9FC2;
  white-space: normal;
  width: 40%;
  vertical-align: top;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.popup table {
  border-collapse: collapse;
  font-size: 12px;
  width: 100%;
  table-layout: fixed;
}

/* Layer Section Collapsible Styles */
.layer-section {
  margin-bottom: 4px;
}

.layer-section-header {
  font-weight: 600;
  cursor: pointer;
  position: relative;
  padding-left: 18px;
  user-select: none;
  list-style: none;
}

.layer-section-header::-webkit-details-marker {
  display: none;
}

.layer-section-header::before {
  content: '▶';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  font-size: 9px;
  transition: transform 0.2s ease;
  color: #50e3c2;
}

.layer-section[open] > .layer-section-header::before {
  transform: translateY(-50%) rotate(90deg);
}

.layer-section-content {
  padding-left: 4px;
  margin-top: 4px;
}

/* Hover Tooltips */
.hoverTip { 
  background: #fff; 
  border: 1px solid #ddd; 
  border-radius: 6px; 
  box-shadow: 0 2px 8px rgba(0,0,0,.15); 
  padding: 2px 6px; 
  font-size: 12px; 
}

/* Spinner Animation */
@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(80,227,194,0.2);
  border-left-color: #6D9FC2;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-left: 4px;
  vertical-align: middle;
  box-sizing: content-box;
  flex-shrink: 0;
}

/* Tiny buttons for group management */
.btn-tiny {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  color: #fff;
  cursor: pointer;
  border-radius: 2px;
  font-size: 10px;
  padding: 2px 4px;
  margin: 0 1px;
}

.btn-tiny:hover {
  background: rgba(255,255,255,0.2);
  border-color: rgba(255,255,255,0.3);
}

/* Keyboard Help Overlay */
#keyboardHelp {
  display: none;
  position: fixed;
  top: 20%;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,0.85);
  color: #fff;
  padding: 16px;
  border-radius: 10px;
  z-index: 3000;
  max-width: 300px;
  text-align: left;
  line-height: 1.4;
}

#keyboardHelp.show {
  display: block;
}

/* Basemap Picker */
.toolbar select#basemapPicker {
  background: #0A2540 !important;
  color: #fff !important;
  border: 1px solid rgba(255,255,255,0.25) !important;
}

.toolbar select#basemapPicker option {
  background: #0A2540 !important;
  color: #fff !important;
}

label.small { 
  color: #e0e0e0; 
}

/* Enhanced Status Bar */
.status-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(135deg, rgba(10,37,64,0.95), rgba(5,25,45,0.95));
  backdrop-filter: blur(10px);
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 8px 16px;
  color: #fff;
  font-size: 12px;
  z-index: 1500;
  display: flex;
  align-items: center;
  gap: 16px;
}

.status-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4CAF50;
  animation: pulse 2s infinite;
}

.status-dot.loading {
  background: #FFC107;
  animation: spin 1s linear infinite;
}

.status-dot.error {
  background: #F44336;
  animation: flash 1s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

@keyframes flash {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* Connection Status */
.connection-status {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: #b0b0b0;
}

.connection-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #4CAF50;
}

.connection-dot.offline {
  background: #F44336;
}

/* Progress Bar Component */
.progress-container {
  flex: 1;
  max-width: 200px;
  height: 8px;
  background: rgba(255,255,255,0.2);
  border-radius: 4px;
  overflow: hidden;
  display: none;
  border: 1px solid rgba(255,255,255,0.3);
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #6D9FC2, #005387);
  width: 0%;
  transition: width 0.3s ease;
  border-radius: 3px;
  box-shadow: 0 0 4px rgba(80,227,194,0.5);
}

/* Scrollable Layers Panel - removed duplicate rule, styling handled by .sidebar-section.layers-section */

/* Cursor Fix - Allow natural hover behavior */
.leaflet-container {
  cursor: grab;
}

.leaflet-container:active {
  cursor: grabbing;
}

.leaflet-interactive {
  cursor: pointer !important;
}

.leaflet-marker-icon {
  cursor: pointer !important;
}

.leaflet-clickable {
  cursor: pointer !important;
}

.leaflet-control {
  cursor: default;
}

.leaflet-control-zoom-in,
.leaflet-control-zoom-out {
  cursor: pointer;
}

/* Position zoom controls below toolbar */
.leaflet-top.leaflet-left {
  top: 70px !important; /* Position below toolbar */
}

/* Hide any right-side map controls that might interfere with analytics */
.leaflet-top.leaflet-right,
.leaflet-bottom.leaflet-right {
  display: none !important;
}
/* Style map scrollbars to match LHS containers */
.leaflet-container {
  scrollbar-width: thin;
  scrollbar-color: rgba(109, 159, 194, 0.3) rgba(255,255,255,0.05);
}

/* Firefox scrollbar support for analytics panel */
.analytics-dashboard,
.analytics-dashboard *,
.chart-container,
.holder-bar-chart,
.trends-chart,
.insights-list {
  scrollbar-width: thin;
  scrollbar-color: rgba(109, 159, 194, 0.3) rgba(255,255,255,0.05);
}

/* Date preset buttons */
.date-preset-btn {
  background: rgba(45, 55, 75, 0.8);
  border: 1px solid rgba(109, 159, 194, 0.3);
  color: #bbb;
  border-radius: 3px;
  padding: 2px 6px;
  font-size: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.date-preset-btn:hover {
  background: rgba(109, 159, 194, 0.2);
  border-color: rgba(109, 159, 194, 0.5);
  color: #ddd;
}

.date-preset-btn:active,
.date-preset-btn.active {
  background: rgba(109, 159, 194, 0.4);
  border-color: #6D9FC2;
  color: #fff;
}

/* Allow natural cursor inheritance */
#map {
  cursor: grab;
}

/* Ensure polygon outlines are preserved */
.leaflet-overlay-pane svg path {
  pointer-events: auto;
  cursor: pointer;
}

/* Enhanced styling for better visibility */
.tenure-highlight {
  stroke: #00BCD4 !important;
  stroke-width: 3 !important;
  fill-opacity: 0.3 !important;
  stroke-opacity: 1 !important;
}

/* Ensure tenure overlay checkbox always appears enabled and visible */
#chkTenureOverlay {
  opacity: 1 !important;
  pointer-events: auto !important;
}

#chkTenureOverlay:disabled {
  opacity: 1 !important;
  pointer-events: auto !important;
}

label:has(#chkTenureOverlay) {
  opacity: 1 !important;
  color: #fff !important;
}

/* Scale control styling - anchored to RHS of sidebar */
.leaflet-control-scale {
  background: rgba(10,37,64,0.95) !important;
  border: 1px solid rgba(255,255,255,0.2) !important;
  border-radius: 4px !important;
  padding: 6px 10px !important;
  color: #ffffff !important;
  font-family: system-ui, -apple-system, sans-serif !important;
  font-size: 11px !important;
  font-weight: 500 !important;
  text-rendering: geometricPrecision !important;
  -webkit-font-smoothing: subpixel-antialiased !important;
  text-shadow: none !important;
  box-shadow: 0 2px 6px rgba(0,0,0,0.25) !important;
  z-index: 1000 !important;
  position: fixed !important;
  bottom: 40px !important; /* Just above 60px status bar with 10px gap */
  left: 345px !important; /* 5px to right of 340px sidebar to avoid overlap */
  transform: none !important;
  margin: 0 !important;
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

.leaflet-control-scale-line {
  border: 2px solid #4CAF50 !important;
  border-top: none !important;
  color: #ffffff !important;
  background: transparent !important;
  line-height: 1.3 !important;
  padding: 2px 5px 1px 5px !important;
  font-family: system-ui, -apple-system, sans-serif !important;
  font-weight: 500 !important;
  font-size: 10px !important;
  text-rendering: geometricPrecision !important;
  -webkit-font-smoothing: subpixel-antialiased !important;
  text-shadow: none !important;
  letter-spacing: 0.2px !important;
}

/* Mapbox Scale Control - Dark Navy Theme */
.mapboxgl-ctrl-scale {
  background: rgba(10, 37, 64, 0.95) !important;
  border: 1px solid rgba(109, 159, 194, 0.5) !important;
  color: #A9C0DE !important;
  font-size: 11px !important;
  padding: 2px 5px !important;
  border-radius: 4px !important;
  backdrop-filter: blur(10px) !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
}

/* Measuring tool popup styling */
.measure-popup .leaflet-popup-content {
  background: rgba(10,37,64,0.95) !important;
  color: #e0e0e0 !important;
  font-weight: 500 !important;
  border-radius: 4px !important;
  padding: 6px 10px !important;
  margin: 0 !important;
  min-width: 0 !important;
  max-width: 140px !important;
  width: fit-content !important;
  white-space: nowrap !important;
  font-size: 11px !important;
  line-height: 1.3 !important;
  text-align: center !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.measure-popup .leaflet-popup-content-wrapper {
  background: rgba(10,37,64,0.95) !important;
  border: 1px solid rgba(255,255,255,0.2) !important;
  border-radius: 4px !important;
  backdrop-filter: blur(8px) !important;
  padding: 0 !important;
  margin: 0 !important;
  min-width: 0 !important;
  max-width: 140px !important;
  width: fit-content !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.measure-popup .leaflet-popup-tip {
  background: rgba(10,37,64,0.95) !important;
  border: 1px solid rgba(255,255,255,0.2) !important;
}

/* Analytics Dashboard - Essential Styles Only */
.analytics-dashboard {
  position: fixed;
  top: 60px;
  right: 0;
  width: 450px;
  height: calc(100vh - 60px);
  background: rgba(10, 37, 64, 0.95);
  border-left: 1px solid rgba(109, 159, 194, 0.3);
  backdrop-filter: blur(10px);
  transform: translateX(100%);
  transition: transform 0.3s ease-in-out;
  z-index: 10000 !important;
  box-shadow: -5px 0 20px rgba(0, 0, 0, 0.3);
  color: #fff;
  font-size: 12px;
}

.analytics-dashboard.dashboard-open {
  transform: translateX(0);
}

.dashboard-toggle {
  position: fixed;
  right: 0px;
  top: 50%;
  transform: translateY(-50%);
  background: linear-gradient(135deg, rgba(0,104,158,0.9), rgba(66,184,164,0.85));
  color: #ffffff;
  border: 2px solid rgba(80,227,194,0.5);
  border-radius: 12px 0 0 12px;
  border-right: none;
  padding: 16px 8px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  box-shadow: -6px 0 25px rgba(0,104,158,0.4);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(12px);
  width: 42px;
}

.dashboard-toggle:hover {
  background: linear-gradient(135deg, rgba(0,123,187,0.95), rgba(80,227,194,0.9));
  color: #ffffff;
  border-color: rgba(80,227,194,0.8);
  transform: translateY(-50%) translateX(-4px);
  box-shadow: -8px 0 30px rgba(80,227,194,0.5);
}

.dashboard-toggle:active {
  transform: translateY(-50%) translateX(-1px);
  transition-duration: 0.1s;
}

.dashboard-toggle .toggle-label {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  line-height: 1;
  color: inherit;
  font-weight: 700;
}

.dashboard-toggle .analytics-arrow {
  display: inline-block;
  transition: transform 0.3s ease;
  font-size: 20px;
  line-height: 1;
}

.dashboard-toggle.dashboard-open .analytics-arrow {
  transform: scaleX(-1);
}

.dashboard-content {
  padding: 16px;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(109, 159, 194, 0.2);
  padding-bottom: 12px;
  margin-bottom: 16px;
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.dashboard-title {
  font-size: 18px;
  font-weight: 700;
  color: #6D9FC2;
  letter-spacing: 0.5px;
}

.analytics-section {
  margin-bottom: 20px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 8px;
  border: 1px solid rgba(109, 159, 194, 0.1);
}

.section-title {
  font-size: 14px;
  font-weight: 600;
  color: #6D9FC2;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.chart-container {
  background: rgba(255, 255, 255, 0.02);
  border-radius: 4px;
  padding: 12px;
  margin-bottom: 16px;
  max-height: 300px;
  overflow-y: auto;
}

.holder-bar {
  display: flex;
  align-items: center;
  padding: 10px 12px;
  margin-bottom: 6px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 6px;
  border: 1px solid rgba(109, 159, 194, 0.15);
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.holder-bar:hover {
  background: rgba(109, 159, 194, 0.08);
  border-color: rgba(109, 159, 194, 0.25);
  transform: translateX(2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.holder-info {
  flex: 1;
  min-width: 0;
}

.holder-name {
  font-weight: 500;
  color: #fff;
  font-size: 11px;
  margin-bottom: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.holder-stats {
  font-size: 10px;
  color: #999;
}

.holder-bar-chart {
  flex: 1;
  margin-left: 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.bar-fill {
  height: 10px;
  border-radius: 5px;
  transition: width 0.8s ease;
  position: relative;
}

.bar-fill::after {
  content: '';
  position: absolute;
  top: 1px;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.3) 0%, transparent 100%);
  border-radius: 5px 5px 0 0;
}

.bar-fill.area-bar {
  background: linear-gradient(90deg, #6D9FC2 0%, #87CEEB 100%) !important;
  box-shadow: 0 2px 4px rgba(109, 159, 194, 0.3);
}

.bar-fill.count-bar {
  background: linear-gradient(90deg, #FFA726 0%, #FF8F00 100%) !important;
  box-shadow: 0 2px 4px rgba(255, 167, 38, 0.3);
}

/* Additional Analytics CSS */
.dashboard-body {
  flex: 1;
  overflow-y: auto;
  padding-right: 10px; /* Add padding to avoid content touching edge */
  padding-bottom: 50px; /* Add bottom padding to clear status bar */
}

.section-subtitle {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 12px;
  font-style: italic;
}

.date-controls {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.date-range-select {
  background: rgba(10, 37, 64, 0.9);
  border: 1px solid rgba(109, 159, 194, 0.3);
  color: #ffffff;
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 11px;
  font-weight: 500;
  transition: all 0.2s ease;
}

.date-range-select:focus {
  outline: none;
  border-color: rgba(109, 159, 194, 0.6);
  background: rgba(10, 37, 64, 0.95);
  box-shadow: 0 0 0 2px rgba(109, 159, 194, 0.2);
}

.date-range-select option {
  background: rgba(10, 37, 64, 0.95);
  color: #ffffff;
  padding: 4px 8px;
}

.discrete-dates {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}

.date-input-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.date-input-label {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.8);
  font-weight: 500;
}

.date-input {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(109, 159, 194, 0.3);
  color: #fff;
  border-radius: 6px;
  padding: 6px 8px;
  font-size: 11px;
  transition: all 0.2s ease;
}

.date-input:focus {
  outline: none;
  border-color: rgba(109, 159, 194, 0.6);
  background: rgba(109, 159, 194, 0.08);
  box-shadow: 0 0 0 2px rgba(109, 159, 194, 0.2);
}

.refresh-btn {
  background: rgba(109, 159, 194, 0.1);
  border: 1px solid rgba(109, 159, 194, 0.3);
  color: #6D9FC2;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 11px;
  cursor: pointer;
  height: 36px;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s ease;
  font-weight: 500;
}

.refresh-btn:hover {
  background: rgba(109, 159, 194, 0.2);
  border-color: rgba(109, 159, 194, 0.5);
  transform: scale(1.02);
}

.close-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 16px;
  cursor: pointer;
  padding: 8px 10px;
  border-radius: 6px;
  transition: all 0.2s ease;
  font-weight: 600;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.close-btn:hover {
  background: rgba(255, 107, 107, 0.2);
  border-color: rgba(255, 107, 107, 0.4);
  color: #ff6b6b;
  transform: scale(1.05);
}

.loading-message {
  text-align: center;
  padding: 20px;
  color: rgba(255, 255, 255, 0.6);
  font-size: 11px;
}

.toggle-label {
  font-size: 8px;
  color: #0A2540;
  font-weight: 500;
  margin-top: 2px;
}

.subsection-title {
  font-size: 12px;
  font-weight: 600;
  color: rgba(109, 159, 194, 0.9);
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(109, 159, 194, 0.2);
}

.chart-legend {
  display: flex;
  gap: 12px;
  margin-bottom: 8px;
  font-size: 9px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

.legend-color {
  width: 10px;
  height: 6px;
  border-radius: 2px;
}

.legend-color.tenements {
  background: rgba(80, 227, 194, 0.6);
}

.legend-color.area {
  background: #6D9FC2;
}

.legend-color.acquisitions {
  background: #6D9FC2;
}

.trends-chart {
  height: 120px;
  overflow-y: auto;
}

/* Trends Chart Styling */
.trends-chart-container {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.chart-legend {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-bottom: 8px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
}

.legend-color {
  width: 12px;
  height: 8px;
  border-radius: 2px;
}

.legend-color.acquisitions {
  background: linear-gradient(90deg, #FFA726 0%, #FF8F00 100%);
}

.legend-color.area {
  background: linear-gradient(90deg, #6D9FC2 0%, #87CEEB 100%);
}

.chart-area {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  height: 80px;
  padding: 0 4px;
  gap: 2px;
}

.month-bar {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.bar-container {
  display: flex;
  align-items: flex-end;
  gap: 1px;
  height: 60px;
  width: 100%;
  justify-content: center;
}

.acquisition-bar, .area-bar {
  width: 8px;
  min-height: 3px;
  border-radius: 2px 2px 0 0;
  transition: all 0.3s ease;
}

.acquisition-bar {
  background: linear-gradient(180deg, #FFA726 0%, #FF8F00 100%);
  box-shadow: 0 2px 4px rgba(255, 167, 38, 0.3);
}

.area-bar {
  background: linear-gradient(180deg, #6D9FC2 0%, #87CEEB 100%);
  box-shadow: 0 2px 4px rgba(109, 159, 194, 0.3);
}

.acquisition-bar:hover, .area-bar:hover {
  transform: scaleY(1.05);
  filter: brightness(1.1);
}

.month-label {
  font-size: 9px;
  color: #bbb;
  text-align: center;
  writing-mode: horizontal-tb;
  font-weight: 500;
}

.month-stats {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 8px;
  color: #6D9FC2;
  line-height: 1.2;
  gap: 1px;
  font-weight: 600;
}

.trend-insights {
  margin-top: 12px;
}

.insights-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.insight-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  margin-bottom: 4px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 3px;
  font-size: 10px;
}

.insight-icon {
  flex-shrink: 0;
}

.insight-text {
  line-height: 1.3;
}

/* Premium gating styles for analytics dashboard */
.analytics-section.premium-blurred {
  filter: blur(3px);
  pointer-events: none;
  opacity: 0.6;
  transition: all 0.3s ease;
  position: relative;
}

.analytics-section.premium-blurred::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg,
    rgba(102, 126, 234, 0.05) 0%,
    rgba(102, 126, 234, 0.1) 50%,
    rgba(102, 126, 234, 0.05) 100%);
  border-radius: 8px;
  pointer-events: none;
  z-index: 1;
}

#analytics-premium-notice {
  animation: subtle-pulse 2s ease-in-out infinite;
}

@keyframes subtle-pulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(102, 126, 234, 0.3);
  }
  50% {
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
  }
}

