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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
  background: #FAFBFC;
  color: #1A1A1A;
  min-height: 100vh;
}

/* Login Modal */
.login-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(20px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
}

/* AI Analysis Loading Modal */
.analysis-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(20px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10001;
}

.analysis-content {
  text-align: center;
  padding: 48px 40px;
  background: #FFFFFF;
  border: none;
  border-radius: 16px;
  max-width: 420px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
  animation: modalFadeIn 0.3s ease-out;
}

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

.analysis-spinner {
  width: 48px;
  height: 48px;
  margin: 0 auto 24px;
  border: 3px solid #F3F4F6;
  border-top: 3px solid #1B5E20;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.analysis-content h2 {
  color: #1A1A1A;
  font-size: 20px;
  margin-bottom: 12px;
  font-weight: 600;
}

.analysis-content #analysisStatus {
  color: #6B7280;
  font-size: 15px;
  margin-bottom: 20px;
  font-weight: 400;
}

.analysis-details {
  background: #FAFBFC;
  border-radius: 8px;
  padding: 16px;
  margin-top: 16px;
  border: 1px solid #E5E7EB;
}

.analysis-details p {
  color: #6B7280;
  font-size: 13px;
  margin: 6px 0;
  line-height: 1.5;
}

/* Progress Bar */
.progress-container {
  margin: 24px 0;
}

.progress-bar {
  width: 100%;
  height: 8px;
  background: #E5E7EB;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 8px;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #1B5E20 0%, #2E7D32 100%);
  border-radius: 4px;
  transition: width 0.3s ease;
}

.progress-text {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: #6B7280;
}

#progressPercent {
  font-weight: 600;
  color: #1B5E20;
}

#progressStep {
  font-size: 12px;
}

/* Analysis Steps */
.analysis-steps {
  margin: 20px 0;
  text-align: left;
}

.step-item {
  display: flex;
  align-items: center;
  padding: 10px 12px;
  margin: 6px 0;
  background: #F8FBF8;
  border-radius: 6px;
  border: 1px solid #E5E7EB;
  transition: all 0.3s ease;
}

.step-item.pending {
  opacity: 0.6;
}

.step-item.active {
  background: #E8F5E9;
  border-color: #1B5E20;
  opacity: 1;
}

.step-item.complete {
  background: #F8FBF8;
  border-color: #4CAF50;
  opacity: 1;
}

.step-icon {
  font-size: 16px;
  margin-right: 10px;
  min-width: 20px;
}

.step-item.active .step-icon {
  animation: pulse 1.5s ease-in-out infinite;
}

.step-text {
  font-size: 13px;
  color: #1A1A1A;
  font-weight: 500;
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}

.analysis-status-text {
  font-weight: 500;
  color: #1B5E20;
}

.login-box {
  background: #FFFFFF;
  border: none;
  border-radius: 12px;
  padding: 48px 40px;
  max-width: 380px;
  width: 90%;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
}

.login-box h2 {
  color: #1A1A1A;
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 8px;
  text-align: center;
}

.login-box p {
  color: #6B7280;
  font-size: 14px;
  text-align: center;
  margin-bottom: 32px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  color: #1A1A1A;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 6px;
}

.form-group input[type="text"],
.form-group input[type="password"] {
  width: 100%;
  padding: 12px 14px;
  background: #FAFBFC;
  border: 1px solid #E5E7EB;
  border-radius: 8px;
  color: #1A1A1A;
  font-size: 15px;
  transition: all 0.2s;
}

.form-group input[type="text"]:focus,
.form-group input[type="password"]:focus {
  outline: none;
  border-color: #1B5E20;
  background: #FFFFFF;
  box-shadow: 0 0 0 3px rgba(27, 94, 32, 0.08);
}

.checkbox-group label {
  display: flex;
  align-items: center;
  font-weight: normal;
  cursor: pointer;
}

.checkbox-group input[type="checkbox"] {
  margin-right: 8px;
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.login-error {
  background: #FFEBEE;
  border: 1px solid #FFCDD2;
  color: #C62828;
  padding: 12px;
  border-radius: 8px;
  margin-bottom: 16px;
  font-size: 13px;
  display: none;
}

.btn-login {
  width: 100%;
  padding: 13px;
  font-size: 15px;
  font-weight: 600;
}

.header {
  background: #FFFFFF;
  padding: 32px 20px;
  text-align: center;
  border-bottom: 1px solid #E5E7EB;
  position: relative;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.header h1 {
  color: #1B5E20;
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: -0.3px;
}

.header p {
  color: #6B7280;
  font-size: 15px;
  font-weight: 400;
}

.btn-logout {
  position: absolute;
  top: 24px;
  right: 24px;
  padding: 8px 16px;
  background: #F3F4F6;
  border: none;
  color: #6B7280;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.2s;
}

.btn-logout:hover {
  background: #E5E7EB;
  color: #1A1A1A;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px;
}

.section {
  background: #FFFFFF;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 20px;
  border: 1px solid #E5E7EB;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.section-title {
  font-size: 20px;
  color: #1A1A1A;
  margin-bottom: 20px;
  font-weight: 600;
}

.search-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 12px;
}

.results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 20px;
}

.result-card {
  background: #FFFFFF;
  border: 1px solid #E5E7EB;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.result-card.notable {
  border-color: #FF9500;
  box-shadow: 0 2px 8px rgba(255, 149, 0, 0.15);
}

.result-card:hover {
  border-color: #1B5E20;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.result-map {
  width: 100%;
  height: 160px;
  background-size: cover;
  background-position: center;
  border-bottom: 1px solid #E5E7EB;
}

.result-content {
  padding: 16px;
}

.result-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  gap: 8px;
}

.result-card h3 {
  color: #1A1A1A;
  font-size: 17px;
  font-weight: 600;
  margin: 0;
  flex: 1;
  letter-spacing: -0.2px;
}

.notable-badge {
  background: #FF9500;
  color: #FFFFFF;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  letter-spacing: 0.3px;
}

.geocoded-badge {
  background: #E8F5E9;
  color: #1B5E20;
  border: none;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  margin-left: 8px;
}

.warning-badge {
  background: #FFF4E5;
  color: #FF9500;
  border: none;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  margin-left: 8px;
}

.result-location {
  color: #6B7280;
  font-size: 14px;
  margin: 8px 0;
}

.result-description {
  color: #1A1A1A;
  font-size: 14px;
  line-height: 1.5;
  margin: 12px 0;
  min-height: 40px;
}

.result-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #E5E7EB;
}

.confidence-badge {
  padding: 4px 12px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 600;
}

.confidence-badge.high {
  background: #E8F5E9;
  color: #1B5E20;
  border: none;
}

.confidence-badge.medium {
  background: #E3F2FD;
  color: #1565C0;
  border: none;
}

.confidence-badge.low {
  background: #FFF4E5;
  color: #FF9500;
  border: none;
}

.result-card .holes-count {
  color: #1B5E20;
  font-weight: 600;
  font-size: 13px;
}

.result-reason {
  color: #6B7280;
  font-size: 12px;
  font-style: italic;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid #E5E7EB;
}

input, select {
  width: 100%;
  padding: 12px;
  background: #FFFFFF;
  border: 1px solid #E5E7EB;
  border-radius: 8px;
  color: #1A1A1A;
  font-size: 15px;
  transition: all 0.2s;
}

input:focus, select:focus {
  outline: none;
  border-color: #1B5E20;
  box-shadow: 0 0 0 3px rgba(27, 94, 32, 0.1);
}

input::placeholder {
  color: #9CA3AF;
}

.btn {
  padding: 12px 24px;
  background: #1B5E20;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
  transition: all 0.2s;
}

.btn:hover {
  background: #2E7D32;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(27, 94, 32, 0.2);
}

.btn:disabled {
  background: #E5E7EB;
  color: #9CA3AF;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-primary {
  background: #1B5E20;
}

.btn-primary:hover {
  background: #2E7D32;
}

.btn-secondary {
  background: #F3F4F6;
  color: #6B7280;
}

.btn-secondary:hover {
  background: #E5E7EB;
  color: #1A1A1A;
}

.btn-success {
  background: #2E7D32;
}

.btn-success:hover {
  background: #1B5E20;
}

.hole-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 12px;
}

.hole-button {
  padding: 16px;
  background: #FFFFFF;
  border: 1px solid #E5E7EB;
  border-radius: 8px;
  color: #1A1A1A;
  cursor: pointer;
  text-align: center;
  font-weight: 600;
  font-size: 16px;
  transition: all 0.2s;
}

.hole-button:hover {
  border-color: #1B5E20;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.hole-button.active {
  border-color: #1B5E20;
  background: #F8FBF8;
  color: #1B5E20;
}

.hole-button.completed {
  border-color: #1B5E20;
  background: #E8F5E9;
  color: #1B5E20;
}

#map {
  width: 100%;
  height: 700px;
  min-height: 700px;
  border-radius: 12px;
  margin-top: 20px;
  border: 1px solid #E5E7EB;
  cursor: crosshair;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.mapboxgl-map {
  width: 100% !important;
  height: 100% !important;
}

.mapboxgl-canvas {
  width: 100% !important;
  height: 100% !important;
  cursor: crosshair !important;
}

.mapboxgl-canvas.polygon-locked {
  cursor: default !important;
}

.map-toolbar {
  display: flex;
  gap: 20px;
  align-items: center;
  flex-wrap: wrap;
}

.view-toggle {
  display: flex;
  gap: 4px;
  background: #F3F4F6;
  padding: 4px;
  border-radius: 8px;
}

.btn-toggle {
  padding: 10px 20px;
  background: transparent;
  color: #6B7280;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.2s;
}

.btn-toggle:hover {
  color: #1A1A1A;
  background: #E5E7EB;
}

.btn-toggle.active {
  background: #FFFFFF;
  color: #1B5E20;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.edit-tools {
  display: flex;
  gap: 8px;
  flex: 1;
}

.btn-tool {
  padding: 10px 16px;
  background: #FFFFFF;
  color: #1A1A1A;
  border: 1px solid #E5E7EB;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s;
}

.btn-tool:hover {
  border-color: #1B5E20;
  background: #F8FBF8;
}

.btn-tool.active {
  border-color: #1B5E20;
  background: #E8F5E9;
  color: #1B5E20;
  font-weight: 600;
}

.confidence-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.confidence-item {
  background: #FFFFFF;
  padding: 16px;
  border-radius: 10px;
  text-align: center;
  border: 1px solid #E5E7EB;
}

.confidence-label {
  color: #6B7280;
  font-size: 12px;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

.confidence-score {
  font-size: 32px;
  font-weight: 700;
}

.confidence-high {
  color: #1B5E20;
}

.confidence-medium {
  color: #1565C0;
}

.confidence-low {
  color: #FF9500;
}

.alert {
  padding: 14px 18px;
  border-radius: 8px;
  margin-bottom: 16px;
  font-size: 14px;
  border: none;
}

.alert-success {
  background: #E8F5E9;
  color: #1B5E20;
}

.alert-error {
  background: #FFEBEE;
  color: #C62828;
}

.alert-info {
  background: #E3F2FD;
  color: #1565C0;
}

.loading {
  text-align: center;
  padding: 40px;
  color: #6B7280;
}

.spinner {
  border: 3px solid #F3F4F6;
  border-top: 3px solid #1B5E20;
  border-radius: 50%;
  width: 48px;
  height: 48px;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 20px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

#refinementNotes {
  margin-top: 16px;
  padding: 16px;
  background: #FFF4E5;
  border: none;
  border-radius: 8px;
  color: #1A1A1A;
  font-size: 14px;
  line-height: 1.6;
}


/* AI Insights Panel Styles */
.ai-insights-panel {
  position: fixed;
  top: 80px;
  right: 20px;
  width: 350px;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
  background: white;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
  padding: 20px;
  z-index: 1000;
  font-size: 14px;
  display: none;
  animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.insights-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid #4CAF50;
}

.insights-header h3 {
  margin: 0;
  color: #1a2332;
  font-size: 18px;
  font-weight: 700;
}

.close-btn {
  background: none;
  border: none;
  font-size: 28px;
  color: #666;
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s;
}

.close-btn:hover {
  background: #f0f0f0;
  color: #333;
}

.ai-insights-panel h4 {
  margin: 16px 0 8px 0;
  color: #2E7D32;
  font-size: 14px;
  font-weight: 600;
}

.hole-info {
  background: #F8FBF8;
  color: #1B5E20;
  padding: 12px;
  border-radius: 8px;
  margin-bottom: 16px;
  text-align: center;
  font-weight: 600;
  border: 1px solid #E5E7EB;
}

.tees-section, .strategy-section, .hazards-section, .green-section, .fairway-section {
  margin-bottom: 16px;
}

.tee-info {
  background: #FFF4E5;
  padding: 10px;
  border-radius: 6px;
  margin-bottom: 8px;
  border-left: 3px solid #FF9500;
  font-size: 13px;
}

.tee-color {
  font-weight: 600;
  text-transform: uppercase;
  color: #1A1A1A;
}

.strategy-section {
  background: #E3F2FD;
  padding: 12px;
  border-radius: 6px;
  border-left: 3px solid #1565C0;
}

.strategy-section p {
  margin: 0;
  color: #1A1A1A;
  line-height: 1.5;
}

.hazard-info {
  background: #FFEBEE;
  padding: 8px 10px;
  border-radius: 6px;
  margin-bottom: 6px;
  font-size: 13px;
  border-left: 3px solid #C62828;
  color: #1A1A1A;
}

.green-info {
  background: #E8F5E9;
  padding: 10px;
  border-radius: 6px;
  border-left: 3px solid #1B5E20;
  font-size: 13px;
  color: #1A1A1A;
}

.green-info div {
  margin: 4px 0;
}

.confidence {
  color: #6B7280;
  font-style: italic;
  font-size: 11px;
  display: block;
  margin-top: 4px;
}

.fairway-section {
  background: #E3F2FD;
  padding: 10px;
  border-radius: 6px;
  border-left: 3px solid #1565C0;
}

.fairway-section p {
  margin: 0;
  color: #1A1A1A;
}


/* Polygon Tools */
.polygon-tools {
  display: flex;
  gap: 12px;
  align-items: center;
}

.btn-disabled {
  opacity: 0.5;
  cursor: not-allowed !important;
}

/* Instructions Panel */
.instructions-panel {
  background: #F8FBF8;
  border: 1px solid #E5E7EB;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 16px;
}

.instructions-panel p {
  color: #1A1A1A;
  font-weight: 600;
  margin-bottom: 12px;
  font-size: 15px;
}

.instructions-panel ol {
  color: #1A1A1A;
  margin-left: 20px;
}

.instructions-panel li {
  margin-bottom: 8px;
  line-height: 1.6;
  font-size: 14px;
}

.instructions-panel li strong {
  color: #1B5E20;
  font-weight: 600;
}

/* AI Insights Panel */
.ai-insights-panel {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #FFFFFF;
  border: 1px solid #E5E7EB;
  border-radius: 12px;
  padding: 24px;
  max-width: 900px;
  max-height: 85vh;
  width: 90%;
  overflow-y: auto;
  z-index: 9999;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.insights-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid #E5E7EB;
}

.insights-header h3 {
  color: #1A1A1A;
  font-size: 20px;
  font-weight: 600;
}

.close-btn {
  background: none;
  border: none;
  color: #6B7280;
  font-size: 28px;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s;
}

.close-btn:hover {
  color: #1A1A1A;
}

.course-summary {
  background: #F8FBF8;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 20px;
  border: 1px solid #E5E7EB;
}

.course-summary h4 {
  color: #1A1A1A;
  margin-bottom: 12px;
  font-weight: 600;
}

.course-summary p {
  color: #1A1A1A;
  margin-bottom: 8px;
  line-height: 1.6;
}

.holes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin: 20px 0;
}

.hole-card {
  background: #FFFFFF;
  border: 1px solid #E5E7EB;
  border-radius: 8px;
  padding: 16px;
  cursor: pointer;
  transition: all 0.2s;
}

.hole-card:hover {
  border-color: #1B5E20;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.hole-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.hole-header h4 {
  color: #1A1A1A;
  font-size: 17px;
  font-weight: 600;
}

.par-badge {
  background: #F8FBF8;
  color: #1B5E20;
  padding: 4px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
}

.hole-stats {
  margin-bottom: 12px;
}

.stat {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
  font-size: 14px;
}

.stat .label {
  color: #6B7280;
}

.stat .value {
  color: #1A1A1A;
  font-weight: 600;
}

.terrain-note {
  color: #6B7280;
  font-size: 13px;
  line-height: 1.5;
  margin-bottom: 8px;
}

.hazards-count {
  color: #FF9500;
  font-size: 13px;
  font-weight: 600;
}

.actions {
  display: flex;
  gap: 12px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid #E5E7EB;
}

/* Hole Detail Panel */
.hole-detail-panel {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #FFFFFF;
  border: 1px solid #E5E7EB;
  border-radius: 12px;
  padding: 24px;
  max-width: 800px;
  max-height: 85vh;
  width: 90%;
  overflow-y: auto;
  z-index: 10000;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

/* Hole Editor Tabs */
.hole-editor-tabs {
  display: flex;
  gap: 4px;
  margin: 20px 0;
  border-bottom: 1px solid #E5E7EB;
  padding-bottom: 0;
}

.tab-btn {
  padding: 12px 20px;
  background: transparent;
  color: #6B7280;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  font-size: 15px;
  font-weight: 500;
  transition: all 0.2s;
}

.tab-btn:hover {
  color: #1B5E20;
  background: #F8FBF8;
}

.tab-btn.active {
  color: #1B5E20;
  border-bottom-color: #1B5E20;
  background: #F8FBF8;
  font-weight: 600;
}

.hole-tab-content {
  margin-top: 20px;
}

/* Edit Form */
.edit-form {
  background: #F8FBF8;
  padding: 20px;
  border-radius: 8px;
  border: 1px solid #E5E7EB;
}

.edit-form .form-group {
  margin-bottom: 16px;
}

.edit-form label {
  display: block;
  color: #1A1A1A;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
}

.edit-form input,
.edit-form textarea {
  width: 100%;
  padding: 10px;
  background: #FFFFFF;
  border: 1px solid #E5E7EB;
  border-radius: 6px;
  color: #1A1A1A;
  font-size: 14px;
}

.edit-form input:focus,
.edit-form textarea:focus {
  outline: none;
  border-color: #1B5E20;
  box-shadow: 0 0 0 3px rgba(27, 94, 32, 0.1);
}

.edit-form button {
  margin-right: 10px;
  margin-top: 10px;
}

.detail-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid #E5E7EB;
}

.detail-header h3 {
  color: #1A1A1A;
  font-size: 20px;
  font-weight: 600;
}

.tees-section,
.terrain-section,
.hazards-section,
.green-section,
.evidence-section {
  background: #F8FBF8;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 16px;
  border: 1px solid #E5E7EB;
}

.tees-section h4,
.terrain-section h4,
.hazards-section h4,
.green-section h4,
.evidence-section h4 {
  color: #1A1A1A;
  margin-bottom: 12px;
  font-size: 15px;
  font-weight: 600;
}

.tee-info {
  background: #FFFFFF;
  border-left: 3px solid #1B5E20;
  padding: 12px;
  margin-bottom: 10px;
  border-radius: 4px;
}

.tee-info strong {
  color: #1B5E20;
}

.tee-info small {
  color: #6B7280;
  font-size: 12px;
}

.hazard-item {
  background: #FFF4E5;
  border-left: 3px solid #FF9500;
  padding: 12px;
  margin-bottom: 10px;
  border-radius: 4px;
}

.hazard-item strong {
  color: #FF9500;
}

.terrain-section p,
.green-section p,
.evidence-section p {
  color: #1A1A1A;
  line-height: 1.6;
  margin-bottom: 8px;
}

/* Results Grid Enhancements */
.result-card {
  position: relative;
  overflow: hidden;
}

/* Responsive Design */
@media (max-width: 768px) {
  .map-toolbar {
    flex-direction: column;
    gap: 12px;
  }

  .view-toggle,
  .polygon-tools {
    width: 100%;
    justify-content: center;
  }

  .holes-grid {
    grid-template-columns: 1fr;
  }

  .ai-insights-panel,
  .hole-detail-panel {
    width: 95%;
    max-height: 90vh;
  }

  .actions {
    flex-direction: column;
  }

  .actions button {
    width: 100%;
  }
}


/* ===== EDITABLE MAP MARKERS ===== */

.editable-marker {
  cursor: pointer;
  position: relative;
}

.marker-dot {
  width: 16px;
  height: 16px;
  background: #1B5E20;
  border: 3px solid #FFFFFF;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  transition: all 0.2s;
}

.editable-marker:hover .marker-dot {
  width: 20px;
  height: 20px;
  background: #2E7D32;
  transform: scale(1.1);
}

.editable-marker.selected .marker-dot {
  width: 20px;
  height: 20px;
  background: #FF9500;
  border-color: #FFB74D;
  box-shadow: 0 0 0 4px rgba(255, 149, 0, 0.3);
}

.marker-label {
  position: absolute;
  top: -24px;
  left: 50%;
  transform: translateX(-50%);
  background: #1B5E20;
  color: white;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.editable-marker.selected .marker-label {
  background: #FF9500;
}

/* Point Editor Panel */
.point-editor-panel {
  position: fixed;
  top: 100px;
  right: 20px;
  width: 300px;
  background: #FFFFFF;
  border: 1px solid #E5E7EB;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  display: none;
}

.point-editor h4 {
  color: #1A1A1A;
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 16px;
}

.point-editor .form-group {
  margin-bottom: 12px;
}

.point-editor label {
  display: block;
  color: #6B7280;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 4px;
}

.point-editor input[type="number"],
.point-editor input[type="text"] {
  width: 100%;
  padding: 8px 10px;
  background: #F3F4F6;
  border: 1px solid #E5E7EB;
  border-radius: 6px;
  color: #1A1A1A;
  font-size: 14px;
}

.point-editor input:focus {
  outline: none;
  border-color: #1B5E20;
  background: #FFFFFF;
}

.editor-actions {
  display: flex;
  gap: 8px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.editor-actions .btn {
  flex: 1;
  min-width: 80px;
  padding: 8px 12px;
  font-size: 13px;
}

.btn-danger {
  background: #DC2626;
  color: white;
}

.btn-danger:hover {
  background: #B91C1C;
}

/* Context Menu */
.context-menu {
  position: fixed;
  background: #FFFFFF;
  border: 1px solid #E5E7EB;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 10000;
  min-width: 150px;
  overflow: hidden;
}

.context-menu-item {
  padding: 10px 16px;
  color: #1A1A1A;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s;
}

.context-menu-item:hover {
  background: #F3F4F6;
}

.context-menu-item:active {
  background: #E5E7EB;
}

/* Map Editing Tools */
.edit-tools {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.btn-tool {
  padding: 10px 16px;
  background: #FFFFFF;
  color: #1A1A1A;
  border: 1px solid #E5E7EB;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s;
}

.btn-tool:hover {
  border-color: #1B5E20;
  background: #F8FBF8;
}

.btn-tool.active {
  border-color: #1B5E20;
  background: #E8F5E9;
  color: #1B5E20;
  font-weight: 600;
}

.btn-tool:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Map Container Fixes */
#map, #holeMapContainer {
  width: 100%;
  height: 700px;
  min-height: 700px;
  border-radius: 12px;
  margin-top: 20px;
  border: 1px solid #E5E7EB;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.mapboxgl-canvas {
  outline: none;
}

.mapboxgl-canvas:focus {
  outline: none;
}

/* Editing Instructions */
.editing-instructions {
  background: #E3F2FD;
  border: 1px solid #90CAF9;
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 16px;
  font-size: 14px;
  color: #1A1A1A;
}

.editing-instructions strong {
  color: #1565C0;
  font-weight: 600;
}

.editing-instructions ul {
  margin: 8px 0 0 20px;
  padding: 0;
}

.editing-instructions li {
  margin: 4px 0;
}

/* Point Statistics */
.point-stats {
  background: #F8FBF8;
  border: 1px solid #E5E7EB;
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.point-stats-item {
  text-align: center;
}

.point-stats-label {
  color: #6B7280;
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.point-stats-value {
  color: #1B5E20;
  font-size: 24px;
  font-weight: 700;
  margin-top: 4px;
}


/* ===== GPT VISION AUTO-MAPPING STYLES ===== */

/* Validation Panel */
.validation-panel {
  position: fixed;
  top: 50%;
  right: 20px;
  transform: translateY(-50%);
  width: 400px;
  max-height: 80vh;
  background: #1a2332;
  border: 2px solid #2a3f5f;
  border-radius: 12px;
  padding: 20px;
  z-index: 1000;
  overflow-y: auto;
  display: none;
}

.validation-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.validation-header h3 {
  color: #4a9eff;
  font-size: 18px;
  margin: 0;
}

.validation-status {
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
}

.validation-status.passed {
  background: rgba(40, 167, 69, 0.2);
  color: #28a745;
  border: 1px solid #28a745;
}

.validation-status.failed {
  background: rgba(220, 53, 69, 0.2);
  color: #dc3545;
  border: 1px solid #dc3545;
}

.validation-errors,
.validation-warnings {
  list-style: none;
  padding: 0;
  margin: 12px 0;
}

.validation-errors li {
  color: #dc3545;
  padding: 8px;
  background: rgba(220, 53, 69, 0.1);
  border-left: 3px solid #dc3545;
  margin-bottom: 8px;
  border-radius: 4px;
}

.validation-warnings li {
  color: #ffc107;
  padding: 8px;
  background: rgba(255, 193, 7, 0.1);
  border-left: 3px solid #ffc107;
  margin-bottom: 8px;
  border-radius: 4px;
}

/* Correction Panel */
.correction-panel {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  max-height: 80vh;
  background: #1a2332;
  border: 2px solid #4a9eff;
  border-radius: 12px;
  padding: 24px;
  z-index: 1001;
  overflow-y: auto;
  display: none;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.correction-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid #2a3f5f;
}

.correction-header h3 {
  color: #4a9eff;
  font-size: 20px;
  margin: 0;
}

.correction-content {
  margin-bottom: 24px;
}

.correction-history {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid #2a3f5f;
}

.correction-entry {
  background: #0a0f1a;
  border: 1px solid #2a3f5f;
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 12px;
}

.correction-entry-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.correction-entry-header strong {
  color: #4a9eff;
}

.correction-timestamp {
  color: #6B7280;
  font-size: 12px;
}

.correction-entry-feedback {
  color: #e0e0e0;
  font-size: 14px;
  margin-bottom: 8px;
  padding: 8px;
  background: rgba(74, 158, 255, 0.05);
  border-radius: 4px;
}

.correction-entry-status {
  color: #28a745;
  font-size: 13px;
  font-weight: 600;
}

/* Editable Markers */
.editable-marker {
  cursor: pointer;
  position: relative;
}

.editable-marker .marker-dot {
  width: 12px;
  height: 12px;
  background: #4a9eff;
  border: 2px solid white;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.editable-marker .marker-label {
  position: absolute;
  top: -24px;
  left: 50%;
  transform: translateX(-50%);
  background: #1a2332;
  color: #4a9eff;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  border: 1px solid #4a9eff;
}

.editable-marker.selected .marker-dot {
  background: #ff9800;
  border-color: #ff9800;
  width: 16px;
  height: 16px;
}

.editable-marker.selected .marker-label {
  background: #ff9800;
  color: white;
  border-color: #ff9800;
}

/* Point Editor Panel */
.point-editor-panel {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 320px;
  background: #1a2332;
  border: 2px solid #4a9eff;
  border-radius: 12px;
  padding: 16px;
  z-index: 1000;
  display: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.point-editor h4 {
  color: #4a9eff;
  font-size: 16px;
  margin: 0 0 12px 0;
}

.editor-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.editor-actions button {
  flex: 1;
  padding: 8px;
  font-size: 13px;
}

.btn-danger {
  background: #dc3545;
  color: white;
}

.btn-danger:hover {
  background: #c82333;
}

/* Context Menu */
.context-menu {
  position: fixed;
  background: #1a2332;
  border: 1px solid #4a9eff;
  border-radius: 8px;
  padding: 4px 0;
  z-index: 10000;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  min-width: 160px;
}

.context-menu-item {
  padding: 8px 16px;
  color: #e0e0e0;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.2s;
}

.context-menu-item:hover {
  background: rgba(74, 158, 255, 0.2);
  color: #4a9eff;
}

/* Edit Tools */
.edit-tools {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.btn-tool {
  padding: 8px 16px;
  background: #2a3f5f;
  color: #e0e0e0;
  border: 1px solid #4a9eff;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  transition: all 0.2s;
}

.btn-tool:hover {
  background: #3a4f6f;
  transform: translateY(-1px);
}

.btn-tool.active {
  background: #4a9eff;
  color: white;
}

/* Point Stats */
.point-stats {
  display: flex;
  gap: 12px;
  margin-bottom: 12px;
  padding: 12px;
  background: #0a0f1a;
  border-radius: 8px;
}

.point-stats-item {
  flex: 1;
  text-align: center;
}

.point-stats-label {
  color: #6B7280;
  font-size: 12px;
  margin-bottom: 4px;
}

.point-stats-value {
  color: #4a9eff;
  font-size: 20px;
  font-weight: 700;
}

/* Editing Instructions */
.editing-instructions {
  background: rgba(74, 158, 255, 0.1);
  border: 1px solid #4a9eff;
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 12px;
  color: #e0e0e0;
  font-size: 13px;
}

.editing-instructions strong {
  color: #4a9eff;
  display: block;
  margin-bottom: 8px;
}

.editing-instructions ul {
  margin: 0;
  padding-left: 20px;
}

.editing-instructions li {
  margin-bottom: 4px;
}

/* Polygon locked cursor */
.mapboxgl-canvas.polygon-locked {
  cursor: default !important;
}

/* Batch Processing Info */
.batch-info {
  background: rgba(44, 95, 45, 0.1);
  border: 1px solid #2c5f2d;
  border-radius: 8px;
  padding: 12px;
  margin: 16px 0;
  color: #e0e0e0;
  font-size: 13px;
}

.batch-info strong {
  color: #4a9eff;
}

.batch-info details {
  margin-top: 8px;
}

.batch-info summary {
  cursor: pointer;
  color: #2c5f2d;
  font-weight: 600;
}

.batch-info ul {
  margin: 8px 0;
  padding-left: 20px;
  color: #b0b0b0;
}

.batch-info li {
  margin-bottom: 4px;
}

/* Merge Badge */
.merge-badge {
  background: rgba(74, 158, 255, 0.2);
  color: #4a9eff;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 11px;
  margin-top: 6px;
  display: inline-block;
  border: 1px solid #4a9eff;
}

.merge-badge:hover {
  background: rgba(74, 158, 255, 0.3);
}
