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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: linear-gradient(135deg, #f0fdf4 0%, #eff6ff 100%);
  min-height: 100vh;
  line-height: 1.6;
}

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

/* Header */
header {
  background: white;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
  border-bottom: 4px solid #10b981;
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 0;
}

.logo {
  display: flex;
  align-items: center;
  gap: 15px;
}

.logo-icon {
  width: 48px;
  height: 48px;
  background: #10b981;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 20px;
}

.logo-text h1 {
  font-size: 28px;
  color: #1f2937;
  font-weight: bold;
}

.logo-text p {
  font-size: 14px;
  color: #6b7280;
}

.connect-btn {
  background: #10b981;
  color: white;
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s;
}

.connect-btn:hover {
  background: #059669;
  transform: translateY(-1px);
}

.connect-btn.connected {
  background: #059669;
}

/* Navigation Tabs */
.nav-tabs {
  display: flex;
  background: white;
  border-radius: 12px;
  padding: 6px;
  margin: 30px 0;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  gap: 4px;
}

.tab-btn {
  padding: 15px 25px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s;
  background: transparent;
  color: #6b7280;
}

.tab-btn:hover {
  background: #f3f4f6;
}

.tab-btn.active {
  background: #10b981;
  color: white;
}

/* Cards */
.card {
  background: white;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
  padding: 30px;
  margin-bottom: 30px;
}

.card-title {
  font-size: 24px;
  font-weight: bold;
  color: #1f2937;
  margin-bottom: 25px;
  text-align: center;
}

/* Map Styles */
.map-container {
  height: 400px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  margin-bottom: 25px;
  position: relative;
}

.map-mini {
  height: 250px;
  margin-top: 15px;
}

.map-legend {
  position: absolute;
  bottom: 20px;
  right: 20px;
  background: white;
  padding: 12px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  z-index: 1000;
  font-size: 12px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 5px;
}

.legend-item:last-child {
  margin-bottom: 0;
}

.legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

/* Journey Map Styles */
.journey-map-card {
  background: linear-gradient(135deg, #ecfdf5 0%, #dbeafe 100%);
  border-radius: 12px;
  padding: 25px;
  margin-bottom: 30px;
}

/* Journey Steps */
.journey-steps {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 40px;
  padding: 20px 0;
}

.step-item {
  text-align: center;
  position: relative;
}

.step-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 24px;
  margin: 0 auto 10px;
}

.step-icon.farm { background: #10b981; }
.step-icon.transport { background: #3b82f6; }
.step-icon.consumer { background: #f97316; }

.step-line {
  height: 4px;
  background: #d1d5db;
  flex: 1;
  margin: 0 20px;
  border-radius: 2px;
}

.step-line.active {
  background: #10b981;
}

.step-title {
  font-weight: 600;
  color: #1f2937;
  font-size: 14px;
}

.step-subtitle {
  color: #6b7280;
  font-size: 12px;
}

/* Product Info */
.product-info {
  background: linear-gradient(135deg, #ecfdf5 0%, #dbeafe 100%);
  border-radius: 12px;
  padding: 25px;
  margin-bottom: 30px;
}

.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}

.info-section h3 {
  font-size: 18px;
  font-weight: bold;
  color: #1f2937;
  margin-bottom: 15px;
}

.info-item {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
}

.info-item i {
  margin-right: 12px;
  width: 20px;
}

/* Environmental Seals */
.seals-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 25px;
}

.seal-card {
  background: white;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  padding: 25px;
  text-align: center;
  transition: all 0.3s;
}

.seal-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.seal-card.carbon { border-color: #10b981; }
.seal-card.deforestation { border-color: #3b82f6; }

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

.seal-header h3 {
  font-size: 16px;
  font-weight: bold;
  color: #1f2937;
}

.seal-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}

.seal-icon.carbon { background: #10b981; }
.seal-icon.deforestation { background: #3b82f6; }

.seal-value {
  font-size: 28px;
  font-weight: bold;
  margin-bottom: 8px;
}

.seal-value.carbon { color: #10b981; }
.seal-value.deforestation { color: #3b82f6; }

.seal-label {
  color: #6b7280;
  font-size: 14px;
  margin-bottom: 8px;
}

.seal-details {
  color: #9ca3af;
  font-size: 12px;
  margin-bottom: 15px;
}

.seal-badge {
  display: inline-block;
  background: #ecfdf5;
  color: #065f46;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.seal-badge.deforestation {
  background: #dbeafe;
  color: #1e40af;
}

/* Farm Cards with Maps */
.farm-card-with-map {
  background: white;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s;
  cursor: pointer;
}

.farm-card-with-map:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.farm-card-with-map.defo-free {
  border-color: #10b981;
}

.farm-card-content {
  padding: 20px;
  text-align: center;
}

/* Forms */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}

.form-card {
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  padding: 25px;
}

.form-title {
  font-size: 18px;
  font-weight: bold;
  color: #1f2937;
  margin-bottom: 20px;
}

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

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

.form-input {
  width: 100%;
  padding: 12px;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  font-size: 14px;
  transition: all 0.3s;
}

.form-input:focus {
  outline: none;
  border-color: #10b981;
  box-shadow: 0 0 0 3px rgba(16,185,129,0.1);
}

select.form-input {
  background: white;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
  background-position: right 12px center;
  background-repeat: no-repeat;
  background-size: 16px;
  padding-right: 40px;
}

select.form-input option {
  padding: 8px 12px;
}

.form-checkbox {
  display: flex;
  align-items: center;
  margin-bottom: 15px;
}

.form-checkbox input { 
  margin-right: 8px; 
}

.form-btn {
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
}

.form-btn.primary { 
  background: #10b981; 
  color: white; 
}

.form-btn.primary:hover { 
  background: #059669; 
}

.form-btn.secondary { 
  background: #3b82f6; 
  color: white; 
}

.form-btn.secondary:hover { 
  background: #2563eb; 
}

/* Map Pick Button */
.map-pick-btn {
  background: #6366f1;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
  margin-top: 8px;
  transition: all 0.3s;
}

.map-pick-btn:hover {
  background: #4f46e5;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  padding: 15px 20px;
  border-radius: 8px;
  color: white;
  font-weight: 600;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
  transform: translateY(100px);
  transition: transform 0.3s;
  z-index: 2000;
}

.toast.show { 
  transform: translateY(0); 
}

.toast.success { 
  background: #10b981; 
}

.toast.error { 
  background: #ef4444; 
}

/* Verification */
.verify-container { 
  max-width: 500px; 
  margin: 0 auto; 
}

.verify-input { 
  display: flex; 
  gap: 10px; 
  margin-bottom: 25px; 
}

.verify-result {
  background: #ecfdf5;
  border: 2px solid #10b981;
  border-radius: 12px;
  padding: 20px;
}

.verify-header { 
  display: flex; 
  align-items: center; 
  margin-bottom: 15px; 
}

.verify-header i { 
  color: #10b981; 
  font-size: 20px; 
  margin-right: 10px; 
}

.verify-title { 
  font-weight: bold; 
  color: #065f46; 
}

.verify-details { 
  color: #374151; 
  font-size: 14px; 
}

.verify-details p { 
  margin-bottom: 8px; 
}

.verify-details strong { 
  color: #1f2937; 
}

.verify-details .facts {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 12px;
}
.verify-details .facts .label { color: #6b7280; }
#tokenImage { width: 100%; height: auto; object-fit: cover; display: block; }

/* Modal for Map Selection */
.modal {
  display: none;
  position: fixed;
  z-index: 3000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.5);
  animation: fadeIn 0.3s;
}

.modal.show {
  display: block;
  align-items: center;
  justify-content: center;
}

.modal-content {
  background: white;
  border-radius: 16px;
  width: 90%;
  max-width: 800px;
  max-height: 90vh;
  overflow: auto;
  animation: slideIn 0.3s;
}

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

.modal-body {
  padding: 20px;
}

.modal-close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #6b7280;
  transition: color 0.3s;
}

.modal-close:hover {
  color: #374151;
}

.modal-map {
  height: 400px;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 15px;
}

/* Leaflet Custom Marker Icon Container */
.custom-div-icon {
  background: transparent;
  border: none;
}

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

@keyframes slideIn {
  from { transform: translateY(-50px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* Utility Classes */
.hidden { 
  display: none !important; 
}

.text-center { 
  text-align: center; 
}

.mb-4 { 
  margin-bottom: 16px; 
}

.mt-4 { 
  margin-top: 16px; 
}

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

.flex { 
  display: flex; 
}

.flex-center { 
  display: flex; 
  align-items: center; 
  justify-content: center; 
}

.gap-2 { 
  gap: 8px; 
}

.gap-4 { 
  gap: 16px; 
}

/* About Card Styles */
.about-card {
  position: relative;
  padding-top: 18px;
  background:
    linear-gradient(#ffffff, #ffffff) padding-box,
    linear-gradient(135deg, rgba(16,185,129,.18), rgba(59,130,246,.18)) border-box;
  border: 1px solid transparent;
  border-radius: 16px;
}

.about-header {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  align-items: center;
  margin-bottom: 12px;
}

.about-icon {
  width: 42px; 
  height: 42px;
  border-radius: 999px;
  display: grid; 
  place-items: center;
  background: radial-gradient(100% 100% at 50% 0%, #eafff6 0%, #e6f0ff 100%);
  color: #10b981;
  box-shadow: 0 6px 18px rgba(16,185,129,.12);
  font-size: 18px;
}

.about-sub {
  margin: 2px 0 0;
  color: #6b7280;
  font-size: 14px;
}

.about-tags { 
  display: flex; 
  gap: 8px; 
  flex-wrap: wrap; 
}

.tag {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #0f172a;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid #e5e7eb;
}

.about-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 22px;
  margin-top: 6px;
}

.about-col p { 
  margin: 0 0 10px; 
  line-height: 1.7; 
}

.about-ic-head {
  margin: 10px 0 6px;
  font-weight: 600;
  color: #0f172a;
}

.about-ic-head i {
  color: #10b981;
  margin-right: 6px;
}

.feature-list {
  list-style: none;
  padding: 0; 
  margin: 0;
  display: grid; 
  gap: 10px;
}

.feature-list li {
  display: grid;
  grid-template-columns: 18px 1fr;
  align-items: start;
  gap: 10px;
  color: #0f172a;
}

.feature-list i {
  color: #10b981;
  margin-top: 3px;
}

.about-footer {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed #e5e7eb;
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

.about-meta { 
  color: #374151; 
}

.btn-github {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  font-weight: 600;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  background: #fff;
  color: #111827;
  text-decoration: none;
  box-shadow: 0 6px 20px rgba(0,0,0,.04);
  transition: transform .06s ease, box-shadow .2s ease, border-color .2s ease;
}

.btn-github:hover {
  transform: translateY(-1px);
  border-color: #cbd5e1;
  box-shadow: 0 10px 24px rgba(0,0,0,.06);
}

/* Responsive Design */
@media (max-width: 900px) {
  .about-grid { 
    grid-template-columns: 1fr; 
  }
  
  .about-header { 
    grid-template-columns: auto 1fr; 
  }
  
  .about-tags { 
    justify-self: start; 
    margin-top: 6px; 
  }
}

@media (max-width: 768px) {
  .info-grid,
  .seals-grid,
  .form-grid {
    grid-template-columns: 1fr;
  }
  
  .journey-steps {
    flex-direction: column;
    gap: 20px;
  }
  
  .step-line { 
    display: none; 
  }
  
  .header-content { 
    flex-direction: column; 
    gap: 15px; 
  }
  
  .nav-tabs {
    flex-direction: column;
    gap: 8px;
  }
  
  .tab-btn {
    text-align: center;
  }
  
  .map-container {
    height: 300px;
  }
  
  .modal-content {
    width: 95%;
    margin: 20px;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 15px;
  }
  
  .card {
    padding: 20px;
  }
  
  .form-card {
    padding: 20px;
  }
  
  .logo-text h1 {
    font-size: 20px;
  }
  
  .card-title {
    font-size: 20px;
  }
  
  .map-container {
    height: 250px;
  }
  
  .map-legend {
    bottom: 10px;
    right: 10px;
    padding: 8px;
    font-size: 11px;
  }
}