@charset "UTF-8";
/* ================= Font Family =========== */
/* ================= Colors =========== */
/* ============== Define Color ============== */
/* ================= Font Size =========== */
/* ================= Padding =========== */
.definePages .define-section #climateMap {
  height: auto;
  position: fixed !important;
  overflow: hidden;
  left: 0;
  right: 0;
  bottom: 0;
  top: 0;
}

body.definePages {
  background: linear-gradient(135deg, #ede9fe 0%, #f5f3ff 50%, #e9e5ff 100%);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

body.definePages h1, body.definePages h2, body.definePages h3 {
  font-family: "Barlow Condensed", sans-serif;
}

.definePages .glass {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.6) 0%, rgba(221, 214, 254, 0.25) 50%, rgba(255, 255, 255, 0.5) 100%);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: 0 8px 32px rgba(124, 58, 237, 0.12), inset 0 1px 2px rgba(255, 255, 255, 0.9);
}

.definePages .glass-panel {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.78) 0%, rgba(237, 233, 254, 0.5) 30%, rgba(221, 214, 254, 0.4) 70%, rgba(255, 255, 255, 0.65) 100%);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  border: 1px solid rgba(255, 255, 255, 0.85);
  box-shadow: 0 20px 50px rgba(124, 58, 237, 0.18), 0 0 80px rgba(139, 92, 246, 0.08), inset 0 2px 4px rgb(255, 255, 255), inset 0 -1px 2px rgba(124, 58, 237, 0.03);
  border-top: none;
}

.definePages .bg-purple-gradient {
  background: linear-gradient(135deg, #a25cf6, #7c3aed, #4c1d95);
}

.definePages .bg-accent-pink-gradient {
  background: linear-gradient(135deg, #00f0ff, #a25cf6, #ff00ea);
}

.definePages .border-accent-pink-gradient {
  border: 2px solid;
  border-image: linear-gradient(135deg, #00f0ff, #a25cf6, #ff00ea) 1;
  background: transparent;
}

.definePages .orb {
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  filter: blur(60px);
}

.definePages .orb-1 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.25) 0%, transparent 70%);
  top: -100px;
  left: -100px;
  animation: defineBreathe 8s ease-in-out infinite;
}

.definePages .orb-2 {
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, rgba(124, 58, 237, 0.2) 0%, transparent 70%);
  bottom: -80px;
  right: -80px;
  animation: defineBreathe 10s ease-in-out infinite 2s;
}

.definePages .orb-3 {
  width: 250px;
  height: 250px;
  background: radial-gradient(circle, rgba(167, 139, 250, 0.3) 0%, transparent 70%);
  top: 40%;
  left: 30%;
  animation: defineBreathe 7s ease-in-out infinite 1s;
}

.definePages .scanline {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, transparent, #bf00ff, transparent);
  opacity: 0.1;
  z-index: 1000;
  pointer-events: none;
  animation: defineScanline 8s linear infinite;
}

.definePages header {
  padding: 14px 16px;
  position: relative;
  z-index: 100;
}

.definePages .header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 22px;
  border-radius: 18px;
  animation: defineFadeIn 0.5s ease-out;
}

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

.definePages .logo-icon {
  width: 52px;
  height: 52px;
  background: linear-gradient(135deg, #a25cf6 0%, #7c3aed 50%, #4c1d95 100%);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 30px rgba(139, 92, 246, 0.5), inset 0 2px 4px rgba(255, 255, 255, 0.3);
  animation: defineFloat 4s ease-in-out infinite, defineGlow 3s ease-in-out infinite;
  position: relative;
}

.definePages .logo-icon svg {
  width: 28px;
  height: 28px;
  color: #fff;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.definePages .logo-text {
  font-size: 24px;
  font-weight: 800;
  color: #4c1d95;
  width: 140px;
  text-shadow: 0 2px 4px rgba(124, 58, 237, 0.1);
}

.definePages .logo-text span {
  color: #a25cf6;
}

.definePages nav {
  display: flex;
  gap: 4px;
  background: rgba(255, 255, 255, 0.6);
  padding: 5px;
  border-radius: 14px;
  border: 1px solid rgba(139, 92, 246, 0.15);
  backdrop-filter: blur(10px);
}

.definePages nav a {
  color: #6b7280;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  padding: 6px 22px;
  border-radius: 10px;
  transition: all 0.3s;
}

.definePages nav a:hover {
  color: #7c3aed;
  background: rgba(139, 92, 246, 0.1);
}

.definePages nav a.active {
  background: linear-gradient(135deg, #a25cf6, #7c3aed);
  color: #fff;
  box-shadow: 0 6px 20px rgba(139, 92, 246, 0.5);
  font-weight: 700;
}

.definePages .header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.definePages .btn-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(139, 92, 246, 0.15);
  color: #7c3aed;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
  position: relative;
  backdrop-filter: blur(10px);
}

.definePages .btn-icon:hover {
  background: linear-gradient(135deg, #a25cf6, #7c3aed);
  color: #fff;
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(139, 92, 246, 0.4);
}

.definePages .btn-icon .badge {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 22px;
  height: 22px;
  background: linear-gradient(135deg, #f472b6, #ec4899);
  border-radius: 11px;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #fff;
  box-shadow: 0 4px 12px rgba(236, 72, 153, 0.4);
  animation: definePulse 2s infinite;
}

.definePages .avatar {
  border-radius: 12px;
  background: linear-gradient(135deg, #00f0ff, #a25cf6, #ff00ea);
  padding: 3px;
  cursor: pointer;
  transition: all 0.3s;
}

.definePages .avatar-inner {
  width: 100%;
  height: 100%;
  background: #3f187a;
  border-radius: 10px;
  display: flex;
  color: #fff;
  font-size: 16px;
  letter-spacing: 1px;
  align-items: center;
  justify-content: center;
  padding: 10px;
}

.definePages .avatar:hover {
  transform: scale(1.1);
  box-shadow: 0 0 30px rgba(0, 240, 255, 0.4);
}

.definePages .map-container {
  flex: 1;
  border-radius: 24px;
  overflow: hidden;
  animation: defineFadeIn 0.6s ease-out;
  position: relative;
  height: 100px;
}

.definePages .map-container::before {
  content: "AI ANALYSIS ACTIVE";
  position: absolute;
  top: 20px;
  left: 20px;
  z-index: 50;
  background: rgba(0, 240, 255, 0.1);
  border: 1px solid rgba(0, 240, 255, 0.3);
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 10px;
  font-weight: 700;
  color: #bf00ff;
  letter-spacing: 2px;
  animation: defineGlow 2s infinite;
  display: flex;
  align-items: center;
  gap: 8px;
}

.definePages .map-container::after {
  content: "";
  position: absolute;
  top: 20px;
  left: 20px;
  width: 8px;
  height: 8px;
  background: #00f0ff;
  border-radius: 50%;
  animation: definePulse 1s infinite;
  box-shadow: 0 0 10px #00f0ff;
}

.definePages #map {
  width: 100%;
  height: 100%;
}

.definePages .metric-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.7);
  border-radius: 12px;
  transition: all 0.3s;
  border: 1px solid transparent;
}

.definePages .metric-row:hover {
  background: rgba(139, 92, 246, 0.08);
  border-color: rgba(139, 92, 246, 0.2);
  transform: translateX(6px);
  box-shadow: 0 4px 15px rgba(139, 92, 246, 0.1);
}

.definePages .metric-label {
  font-size: 13px;
  color: #6b7280;
  font-weight: 500;
}

.definePages .filter-panel {
  position: absolute;
  top: 130px;
  right: 28px;
  bottom: 90px;
  width: 460px;
  border-radius: 28px;
  overflow: hidden;
  animation: defineSlideIn 0.6s ease-out;
  display: none;
}

.definePages .filter-panel::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, #00f0ff, #a25cf6, transparent);
}

.definePages .filter-header {
  padding: 10px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(139, 92, 246, 0.12);
  position: relative;
}

.definePages .filter-title {
  font-size: 20px;
  font-weight: 800;
  color: #4c1d95;
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 10px;
}

.definePages .filter-title-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: linear-gradient(135deg, #a25cf6, #7c3aed);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 25px rgba(139, 92, 246, 0.45);
}

.definePages .filter-title-icon svg {
  width: 24px;
  height: 24px;
  color: #fff;
}

.definePages .filter-actions {
  display: flex;
  gap: 10px;
}

.definePages .btn {
  padding: 9px 22px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s;
}

.definePages .btn-ghost {
  background: rgba(255, 255, 255, 0.7);
  color: #6b7280;
  border: 1px solid rgba(139, 92, 246, 0.15);
  backdrop-filter: blur(10px);
}

.definePages .btn-ghost:hover {
  background: rgba(255, 255, 255, 0.9);
  color: #7c3aed;
  transform: translateY(-2px);
}

.definePages .btn-primary {
  background: linear-gradient(135deg, #a25cf6, #7c3aed);
  color: #fff;
  box-shadow: 0 6px 20px rgba(139, 92, 246, 0.5);
  border-color: #a25cf6;
}

.definePages .btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(139, 92, 246, 0.6);
}

.definePages .filter-body {
  padding: 24px;
  height: calc(100% - 100px);
  overflow-y: auto;
  position: relative;
}

.definePages .filter-body::-webkit-scrollbar {
  width: 6px;
}

.definePages .filter-body::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #a25cf6, #7c3aed);
  border-radius: 3px;
}

.definePages .filter-body::-webkit-scrollbar-track {
  background: rgba(139, 92, 246, 0.08);
  border-radius: 3px;
}

.definePages .filter-section {
  margin-bottom: 26px;
}

.definePages .filter-section-title {
  font-size: 11px;
  font-weight: 800;
  color: #7c3aed;
  margin-bottom: 14px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.definePages .filter-section-title::after {
  content: "";
  flex: 1;
  height: 2px;
  background: linear-gradient(90deg, #a25cf6, transparent);
  border-radius: 1px;
}

.definePages .filter-group {
  margin-bottom: 14px;
}

.definePages .filter-label {
  font-size: 13px;
  font-weight: 700;
  color: #4c1d95;
  margin-bottom: 8px;
  display: block;
}

.definePages .filter-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.definePages .time-toggles {
  display: flex;
  gap: 8px;
}

.definePages .time-toggle {
  flex: 1;
  padding: 6px 12px;
  text-align: center;
  font-size: 13px;
  font-weight: 800;
  border-radius: 12px;
  cursor: pointer;
  color: #6b7280;
  transition: all 0.3s;
  border: 2px solid rgba(139, 92, 246, 0.2);
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(10px);
}

.definePages .time-toggle:hover {
  border-color: #a25cf6;
  color: #7c3aed;
  background: rgba(255, 255, 255, 0.8);
  transform: translateY(-2px);
}

.definePages .time-toggle.active {
  background: linear-gradient(135deg, #a25cf6, #7c3aed);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 6px 20px rgba(139, 92, 246, 0.5);
  transform: translateY(-2px);
}

.definePages .filter-note {
  font-size: 12px;
  color: #6b7280;
  margin-top: 14px;
  padding: 14px 16px;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(167, 139, 250, 0.12));
  border-radius: 12px;
  border-left: 4px solid #a25cf6;
  font-weight: 500;
}

.definePages .cluster-marker {
  background: linear-gradient(135deg, #a25cf6, #7c3aed);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 800;
  font-size: 13px;
  cursor: pointer;
  border: 0 solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 8px 25px rgba(139, 92, 246, 0.5);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.definePages .cluster-marker:hover {
  transform: scale(1.25) translateY(-6px);
  box-shadow: 0 15px 40px rgba(139, 92, 246, 0.6);
}

.definePages .cluster-marker.active {
  transform: scale(1.3) translateY(-8px);
  animation: defineGlow 2s infinite;
}

.definePages .map-legend {
  position: absolute;
  bottom: 90px;
  left: 24px;
  border-radius: 16px;
  z-index: 40;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.6), rgba(237, 233, 254, 0.7));
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 10px 30px rgba(124, 58, 237, 0.15);
  transition: all 0.3s ease;
  overflow: hidden;
  max-width: 320px;
}

.definePages .legend-compact {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.definePages .legend-compact:hover {
  background: rgba(139, 92, 246, 0.05);
}

.definePages .legend-compact-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, #a25cf6, #7c3aed);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 15px rgba(139, 92, 246, 0.35);
}

.definePages .legend-compact-icon i {
  color: #fff;
  font-size: 15px;
}

.definePages .legend-compact-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.definePages .legend-compact-title {
  font-size: 14px;
  font-weight: 700;
  color: #4c1d95;
}

.definePages .legend-compact-applied {
  font-size: 11px;
  color: #6b7280;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  align-items: center;
  gap: 6px;
}

.definePages .legend-compact-applied::before {
  content: "";
  width: 6px;
  height: 6px;
  background: #a25cf6;
  border-radius: 50%;
  flex-shrink: 0;
}

.definePages .legend-compact-toggle {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(139, 92, 246, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.3s ease;
}

.definePages .legend-compact-toggle i {
  font-size: 11px;
  color: #7c3aed;
  transition: transform 0.3s ease;
}

.definePages .map-legend:hover .legend-compact-toggle {
  background: rgba(139, 92, 246, 0.15);
}

.definePages .map-legend.expanded .legend-compact {
  border-bottom: 1px solid rgba(139, 92, 246, 0.12);
}

.definePages .map-legend.expanded .legend-compact-toggle i {
  transform: rotate(180deg);
}

.definePages .map-legend.expanded .legend-compact-applied {
  display: none;
}

.definePages .legend-content {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  padding: 0 18px;
  transition: all 0.3s ease;
}

.definePages .map-legend.expanded .legend-content {
  max-height: 500px;
  opacity: 1;
  padding: 16px 18px;
}

.definePages .legend-title {
  font-size: 10px;
  font-weight: 800;
  color: #7c3aed;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.definePages .legend-title::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(139, 92, 246, 0.3), transparent);
}

.definePages .map-legend .risk-options {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.definePages .map-legend .risk-item {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  padding: 10px 14px;
  border-radius: 12px;
  transition: all 0.2s ease;
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid transparent;
}

.definePages .map-legend .risk-item:hover {
  background: rgba(255, 255, 255, 0.8);
  border-color: rgba(139, 92, 246, 0.15);
}

.definePages .map-legend .risk-item.active {
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(139, 92, 246, 0.2);
  box-shadow: 0 2px 8px rgba(139, 92, 246, 0.1);
}

.definePages .map-legend .risk-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.definePages .map-legend .risk-item.active .risk-dot {
  transform: scale(1.15);
}

.definePages .map-legend .risk-label {
  flex: 1;
  font-size: 13px;
  font-weight: 500;
  color: #64748b;
  transition: all 0.2s ease;
}

.definePages .map-legend .risk-item.active .risk-label {
  font-weight: 600;
  color: #4c1d95;
}

.definePages .map-legend .checkmark {
  width: 16px;
  height: 16px;
  opacity: 0;
  transform: scale(0);
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.definePages .map-legend .risk-item.active .checkmark {
  opacity: 1;
  transform: scale(1);
}

.definePages .map-legend .filter-section {
  margin-bottom: 0;
}

.definePages .map-legend .filter-section.mt {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(139, 92, 246, 0.1);
}

.definePages .map-legend .filter-section-title {
  font-size: 10px;
  font-weight: 700;
  color: #7c3aed;
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.definePages .map-legend .filter-section-title::after {
  display: none;
}

.definePages .map-legend .filter-section-title.riskText {
  margin-top: 14px;
  font-weight: 600;
  color: #6b7280;
  text-transform: none;
  letter-spacing: 0;
}

.definePages .map-legend .time-toggles {
  display: flex;
  gap: 6px;
}

.definePages .map-legend .time-toggle {
  flex: 1;
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 700;
  border-radius: 8px;
  border: 1px solid rgba(139, 92, 246, 0.2);
  background: rgba(255, 255, 255, 0.6);
  color: #6b7280;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}

.definePages .map-legend .time-toggle:hover {
  border-color: #a25cf6;
  color: #7c3aed;
  background: rgba(255, 255, 255, 0.8);
}

.definePages .map-legend .time-toggle.active {
  background: linear-gradient(135deg, #a25cf6, #7c3aed);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.35);
}

.definePages .map-legend .filter-note {
  font-size: 10px;
  color: #6b7280;
  margin-top: 14px;
  padding: 10px 12px;
  background: rgba(139, 92, 246, 0.06);
  border-radius: 8px;
  border-left: 3px solid #a25cf6;
  line-height: 1.4;
}

/* Colors */
.definePages .low .risk-dot {
  background: #22c55e;
}

.definePages .medium .risk-dot {
  background: #f59e0b;
}

.definePages .high .risk-dot {
  background: #ef4444;
}

/* Active state styling */
@media (max-width: 1100px) {
  .definePages .map-legend {
    bottom: 90px;
    left: 16px;
    max-width: 300px;
  }
  .definePages .legend-compact {
    padding: 10px 14px;
    gap: 10px;
  }
  .definePages .legend-compact-icon {
    width: 34px;
    height: 34px;
  }
  .definePages .legend-compact-icon i {
    font-size: 14px;
  }
  .definePages .legend-compact-title {
    font-size: 13px;
  }
  .definePages .legend-compact-applied {
    font-size: 10px;
  }
  .definePages .map-legend.expanded .legend-content {
    padding: 14px 16px;
  }
  .definePages .map-legend .risk-item {
    padding: 8px 12px;
  }
  .definePages .map-legend .risk-label {
    font-size: 12px;
  }
  .definePages .map-legend .time-toggle {
    padding: 6px 8px;
    font-size: 11px;
  }
}
@media (max-width: 768px) {
  .definePages .map-legend {
    bottom: 80px;
    left: 12px;
    max-width: 280px;
  }
  .definePages .legend-compact {
    padding: 10px 12px;
    gap: 8px;
  }
  .definePages .legend-compact-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
  }
  .definePages .legend-compact-icon i {
    font-size: 13px;
  }
  .definePages .legend-compact-title {
    font-size: 12px;
  }
  .definePages .legend-compact-applied {
    font-size: 9px;
  }
  .definePages .legend-compact-toggle {
    width: 24px;
    height: 24px;
  }
  .definePages .legend-compact-toggle i {
    font-size: 10px;
  }
  .definePages .map-legend.expanded .legend-content {
    padding: 12px 14px;
  }
  .definePages .map-legend .legend-title {
    font-size: 9px;
    margin-bottom: 10px;
  }
  .definePages .map-legend .risk-item {
    padding: 7px 10px;
    border-radius: 10px;
  }
  .definePages .map-legend .risk-dot {
    width: 10px;
    height: 10px;
  }
  .definePages .map-legend .risk-label {
    font-size: 11px;
  }
  .definePages .map-legend .checkmark {
    width: 14px;
    height: 14px;
  }
  .definePages .map-legend .filter-section.mt {
    margin-top: 12px;
    padding-top: 12px;
  }
  .definePages .map-legend .filter-section-title {
    font-size: 9px;
    margin-bottom: 8px;
  }
  .definePages .map-legend .time-toggles {
    gap: 4px;
  }
  .definePages .map-legend .time-toggle {
    padding: 6px 6px;
    font-size: 10px;
    border-radius: 6px;
  }
  .definePages .map-legend .filter-note {
    font-size: 9px;
    padding: 8px 10px;
    margin-top: 10px;
  }
  .definePages .map-legend .filter-section-title.riskText {
    font-size: 9px;
    margin-top: 10px;
  }
}
@media (max-width: 480px) {
  .definePages .map-legend {
    bottom: 70px;
    left: 8px;
    max-width: calc(100vw - 80px);
  }
  .definePages .legend-compact {
    padding: 8px 10px;
  }
  .definePages .legend-compact-icon {
    width: 30px;
    height: 30px;
  }
  .definePages .legend-compact-icon i {
    font-size: 12px;
  }
  .definePages .legend-compact-title {
    font-size: 11px;
  }
  .definePages .legend-compact-applied {
    font-size: 8px;
  }
  .definePages .map-legend.expanded .legend-content {
    padding: 10px 12px;
    max-height: 400px;
  }
  .definePages .map-legend .time-toggle {
    padding: 5px 4px;
    font-size: 9px;
  }
}
.definePages .low.active .risk-dot {
  box-shadow: 0 0 12px #22c55e;
}

.definePages .medium.active .risk-dot {
  box-shadow: 0 0 12px #f59e0b;
}

.definePages .high.active .risk-dot {
  box-shadow: 0 0 12px #ef4444;
}

/* Active indicator ring */
.definePages .low.active {
  --active-color: #22c55e;
}

.definePages .medium.active {
  --active-color: #f59e0b;
}

.definePages .high.active {
  --active-color: #ef4444;
}

/* Checkmark for active */
.definePages .checkmark {
  width: 16px;
  height: 16px;
  opacity: 0;
  transform: scale(0);
  transition: all 0.3s ease;
}

.definePages .risk-item.active .checkmark {
  opacity: 1;
  transform: scale(1);
}

.definePages .low .checkmark {
  color: #22c55e;
}

.definePages .medium .checkmark {
  color: #f59e0b;
}

.definePages .high .checkmark {
  color: #ef4444;
}

.definePages .chat-toggle {
  position: relative;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: linear-gradient(135deg, #a25cf6, #7c3aed, #4c1d95);
  border: none;
  cursor: pointer;
  box-shadow: 0 10px 35px rgba(139, 92, 246, 0.55), 0 0 0 4px rgba(255, 255, 255, 0.5);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
  animation: defineGlow 3s ease-in-out infinite;
}

.definePages .chat-toggle:hover {
  transform: scale(1.12);
  box-shadow: 0 15px 45px rgba(139, 92, 246, 0.65), 0 0 0 6px rgba(255, 255, 255, 0.6);
}

.definePages .chat-toggle svg {
  width: 30px;
  height: 30px;
  color: #fff;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
  transition: all 0.3s;
}

.definePages .chat-toggle.active svg {
  transform: rotate(180deg);
}

.definePages .chat-toggle .chat-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 24px;
  height: 24px;
  background: linear-gradient(135deg, #f472b6, #ec4899);
  border-radius: 50%;
  font-size: 12px;
  font-weight: 800;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 3px solid #fff;
  box-shadow: 0 4px 12px rgba(236, 72, 153, 0.5);
  animation: definePulse 2s infinite;
}

.definePages .chatbot {
  display: none;
  position: fixed;
  bottom: 90px;
  right: 28px;
  width: 462px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.95) 0%, rgba(237, 233, 254, 0.7) 50%, rgba(255, 255, 255, 0.9) 100%);
  backdrop-filter: blur(30px);
  border-radius: 28px;
  box-shadow: 0 30px 70px rgba(124, 58, 237, 0.22), 0 0 0 1px rgba(255, 255, 255, 0.8);
  z-index: 999;
  flex-direction: column;
  overflow: hidden;
  top: 130px;
}

.definePages .chatbot.active {
  display: flex;
  animation: defineChatPop 0.4s ease-out;
}

.definePages .chat-header {
  padding: 20px 22px;
  background: linear-gradient(135deg, #a25cf6, #7c3aed, #4c1d95);
  color: #fff;
  display: flex;
  align-items: center;
  gap: 14px;
  position: relative;
  overflow: hidden;
}

.definePages .chat-header::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -30%;
  width: 150px;
  height: 150px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.15) 0%, transparent 70%);
}

.definePages .chat-avatar {
  width: 70px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(10px);
  font-size: 30px;
}

.definePages .chat-header-info {
  flex: 1;
}

.definePages .chat-header-name {
  font-size: 18px;
  font-weight: 800;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.definePages .chat-header-status {
  font-size: 13px;
  opacity: 0.95;
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
}

.definePages .status-dot {
  width: 9px;
  height: 9px;
  background: #4ade80;
  border-radius: 50%;
  box-shadow: 0 0 10px rgba(74, 222, 128, 0.6);
  animation: definePulse 2s infinite;
}

.definePages .chat-close {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  color: #fff;
  cursor: pointer;
  transition: all 0.2s;
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.definePages .chat-close:hover {
  background: rgba(255, 255, 255, 0.35);
  transform: scale(1.05);
}

.definePages .chat-messages {
  flex: 1;
  padding: 22px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
  background: rgba(255, 255, 255, 0.3);
  height: 450px;
}

.definePages .chat-messages::-webkit-scrollbar {
  width: 6px;
}

.definePages .chat-messages::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #a25cf6, #7c3aed);
  border-radius: 3px;
}

.definePages .message {
  display: flex;
  gap: 12px;
  max-width: 85%;
  animation: defineFadeIn 0.3s ease-out;
}

.definePages .message.bot {
  align-self: flex-start;
}

.definePages .message.user {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.definePages .message-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  padding: 5px;
}

.definePages .message.bot .message-avatar {
  background: linear-gradient(135deg, #a25cf6, #7c3aed);
  color: #fff;
}

.definePages .message.user .message-avatar {
  background: linear-gradient(135deg, #31e5fe, #3e9ddb);
  color: #fff;
}

.definePages .message-avatar svg {
  width: 24px;
  height: 24px;
}

.definePages .message-bubble, .definePages .message-content {
  padding: 14px 18px;
  border-radius: 20px;
  font-size: 14px;
  line-height: 1.6;
  font-weight: 500;
}

.definePages .message.bot .message-bubble, .definePages .message.bot .message-content {
  background: rgba(255, 255, 255, 0.9);
  color: #4c1d95;
  border: 1px solid rgba(139, 92, 246, 0.15);
  border-bottom-left-radius: 6px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.definePages .message.user .message-bubble, .definePages .message.user .message-content {
  background: linear-gradient(135deg, #a25cf6, #7c3aed);
  color: #fff;
  border-bottom-right-radius: 6px;
  box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

.definePages .message-time {
  font-size: 11px;
  color: #9ca3af;
  margin-top: 6px;
  font-weight: 500;
}

.definePages .message.user .message-time {
  text-align: right;
}

.definePages .typing-indicator {
  display: flex;
  gap: 5px;
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 20px;
  border: 1px solid rgba(139, 92, 246, 0.15);
  width: fit-content;
}

.definePages .typing-dot {
  width: 9px;
  height: 9px;
  background: #a25cf6;
  border-radius: 50%;
  animation: defineTyping 1.4s infinite;
}

.definePages .typing-dot:nth-child(2) {
  animation-delay: 0.2s;
}

.definePages .typing-dot:nth-child(3) {
  animation-delay: 0.4s;
}

.definePages .chat-suggestions {
  padding: 0 22px 14px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  background: transparent;
  position: absolute;
  bottom: 100px;
}

.definePages .suggestion {
  padding: 2px 16px;
  background: rgba(255, 255, 255, 0.8);
  border: 2px solid rgba(139, 92, 246, 0.2);
  border-radius: 25px;
  font-size: 12px;
  font-weight: 600;
  color: #7c3aed;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  gap: 6px;
  backdrop-filter: blur(10px);
}

.definePages .suggestion:hover {
  background: linear-gradient(135deg, #a25cf6, #7c3aed);
  color: #fff;
  border-color: transparent;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(139, 92, 246, 0.35);
}

.definePages .suggestion svg {
  width: 15px;
  height: 15px;
}

.definePages .chat-input-area {
  padding: 18px 22px;
  background: rgba(255, 255, 255, 0.7);
  border-top: 1px solid rgba(139, 92, 246, 0.1);
  display: flex;
  gap: 14px;
  align-items: center;
  backdrop-filter: blur(10px);
  width: 100%;
  bottom: 0;
  position: absolute;
}

.definePages .chat-input-wrapper {
  flex: 1;
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.9);
  border: 2px solid rgba(139, 92, 246, 0.2);
  border-radius: 16px;
  padding: 0 16px;
  transition: all 0.3s;
}

.definePages .chat-input-wrapper:focus-within {
  border-color: #a25cf6;
  box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.12), 0 6px 20px rgba(139, 92, 246, 0.08);
  background: #fff;
}

.definePages .chat-input {
  flex: 1;
  border: none;
  background: transparent;
  padding: 14px 0;
  font-size: 14px;
  font-weight: 500;
  outline: none;
  color: #4c1d95;
}

.definePages .chat-input::placeholder {
  color: #9ca3af;
}

.definePages .attach-btn {
  background: none;
  border: none;
  color: #9ca3af;
  cursor: pointer;
  padding: 6px;
  transition: all 0.2s;
  border-radius: 8px;
}

.definePages .attach-btn:hover {
  color: #a25cf6;
  background: rgba(139, 92, 246, 0.08);
}

.definePages .send-btn {
  width: 50px;
  height: 50px;
  border-radius: 16px;
  background: linear-gradient(135deg, #a25cf6, #7c3aed);
  border: none;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
  box-shadow: 0 6px 20px rgba(139, 92, 246, 0.45);
}

.definePages .send-btn:hover {
  transform: scale(1.08) translateY(-2px);
  box-shadow: 0 10px 30px rgba(139, 92, 246, 0.55);
}

.definePages .send-btn svg {
  width: 22px;
  height: 22px;
}

.definePages footer {
  padding: 10px 16px;
  z-index: 100;
  background: transparent;
  bottom: 0;
  width: 100%;
}

.definePages .footer-bottom-section {
  display: none;
}

.definePages .footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 24px;
  border-radius: 18px;
}

.definePages .footer-left {
  display: flex;
  align-items: center;
  gap: 28px;
}

.definePages .footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.definePages .footer-brand-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, #a25cf6, #7c3aed);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(139, 92, 246, 0.35);
}

.definePages .footer-brand-icon svg {
  width: 18px;
  height: 18px;
  color: #fff;
}

.definePages .footer-copy {
  font-size: 13px;
  color: #6b7280;
  font-weight: 600;
}

.definePages .footer-links {
  display: flex;
  gap: 22px;
}

.definePages .footer-links a {
  font-size: 13px;
  color: #6b7280;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.2s;
}

.definePages .footer-links a:hover {
  color: #a25cf6;
}

.definePages .footer-social {
  display: flex;
  gap: 10px;
}

.definePages .footer-social a {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(139, 92, 246, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #7c3aed;
  transition: all 0.3s;
  backdrop-filter: blur(10px);
}

.definePages .footer-social a:hover {
  background: linear-gradient(135deg, #a25cf6, #7c3aed);
  color: #fff;
  border-color: transparent;
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(139, 92, 246, 0.35);
}

@media (max-width: 1100px) {
  .definePages .filter-panel {
    position: fixed;
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 50vh;
    border-radius: 28px 28px 0 0;
  }
  .definePages nav {
    display: none;
  }
  .definePages .chatbot {
    width: calc(100% - 56px);
    height: 65vh;
  }
}
/* Animations */
@keyframes sweep {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}
@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}
@keyframes blink {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.3;
  }
}
.definePages .sweep {
  animation: sweep 3s linear infinite;
  transform-origin: center;
}

.definePages .pulse {
  animation: pulse 2s ease-in-out infinite;
}

.definePages .blink {
  animation: blink 1.5s ease-in-out infinite;
}

.definePages .blink-delay-1 {
  animation-delay: 0.3s;
}

.definePages .blink-delay-2 {
  animation-delay: 0.6s;
}

.definePages .blink-delay-3 {
  animation-delay: 0.9s;
}

.definePages .mapboxgl-marker {
  cursor: pointer;
}

.definePages .map-marker {
  position: relative;
  width: 60px;
  height: 100px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
}

.definePages .marker-ring,
.definePages .marker-content {
  animation: defineMapfloat 3s ease-in-out infinite;
}

.definePages .marker-yellow {
  --theme-color: #ffd700;
  --theme-glow: rgba(255, 215, 0, 0.4);
}

.definePages .marker-cyan {
  --theme-color: #a25cf6;
  --theme-glow: rgba(34, 197, 94, 0.4);
}

.definePages .marker-red {
  --theme-color: #ff4081;
  --theme-glow: rgba(255, 64, 129, 0.4);
}

.definePages .marker-ring {
  position: absolute;
  top: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px dashed var(--theme-color);
  box-shadow: 0 0 10px var(--theme-glow);
}

.definePages .marker-ring::after {
  content: "";
  position: absolute;
  top: -4px;
  left: -4px;
  right: -4px;
  bottom: -4px;
  border-radius: 50%;
}

.definePages .marker-content {
  z-index: 2;
  width: 30px;
  height: 30px;
  background: radial-gradient(circle, var(--theme-color) 10%, var(--theme-color) 120%);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  color: #fff; /* Dark text for contrast inside the bulb */
  font-weight: bold;
  font-size: 18px;
  box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
  margin-top: 5px; /* Align within the ring */
}

.definePages .marker-arrow {
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-top: 12px solid var(--theme-color);
  margin-top: 4px;
  opacity: 0.9;
  filter: drop-shadow(0 0 5px var(--theme-glow));
}

.definePages .marker-shadow {
  position: absolute;
  bottom: 30px;
  width: 30px;
  height: 8px;
  background: radial-gradient(ellipse at center, var(--theme-color) 0%, transparent 70%);
  border-radius: 50%;
  opacity: 0.6;
  animation: define-map-shadow-pulse 3s ease-in-out infinite;
}

.definePages .climateData-popup {
  position: absolute;
  left: 24px;
  bottom: 90px;
  z-index: 10000;
  width: auto;
  display: none;
  border-radius: 20px;
  background: #f9f9f9;
  box-shadow: 0 1px 7px rgba(0, 0, 0, 0.2);
}

.definePages .climateData-popup .popup-close-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.4);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: all 0.2s;
  backdrop-filter: blur(10px);
}

.definePages .climateData-popup .popup-close-btn:hover {
  background: rgba(255, 255, 255, 0.4);
  transform: scale(1.1);
}

.definePages .climateData-popup .popup-close-btn svg {
  width: 16px;
  height: 16px;
}

/* Popup Container */
.popup {
  width: 100%;
  max-width: 420px;
  max-height: min(85vh, 720px);
  background: rgba(255, 255, 255, 0.95);
  border-radius: 20px;
  -webkit-border-radius: 20px;
  -moz-border-radius: 20px;
  -ms-border-radius: 20px;
  -o-border-radius: 20px;
  box-shadow: 0 20px 40px -12px rgba(99, 102, 241, 0.25);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.8);
  animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
/* Sticky Header */
.popup-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a855f7 100%);
  padding: 20px;
  flex-shrink: 0;
}

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

.location-code {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.7);
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.plant-name {
  color: #fff;
}

.close-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.close-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.05);
}

.close-btn svg {
  width: 16px;
  height: 16px;
  color: #fff;
}

.date-range {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 14px;
}

.date-range svg {
  width: 14px;
  height: 14px;
}

/* Tag */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  color: #fff;
  backdrop-filter: blur(10px);
  margin-bottom: 16px;
}

.tag svg {
  width: 14px;
  height: 14px;
}

/* Anomaly Section */
.anomaly-section {
  border-radius: 10px;
  -webkit-border-radius: 10px;
  -moz-border-radius: 10px;
  -ms-border-radius: 10px;
  -o-border-radius: 10px;
  padding: 12px 14px;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

.anomaly-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 8px;
}

.anomaly-label svg {
  width: 14px;
  height: 14px;
}

.anomaly-values {
  display: flex;
  align-items: baseline;
  gap: 20px;
}

.anomaly-avg {
  font-size: 28px;
  font-weight: 700;
}

.anomaly-avg small {
  font-size: 12px;
  font-weight: 500;
  opacity: 0.8;
}

.anomaly-max {
  font-size: 16px;
  font-weight: 600;
}

.anomaly-max small {
  font-size: 11px;
  font-weight: 500;
  opacity: 0.8;
}

/* Scrollable Body */
.popup-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  scrollbar-width: thin;
  scrollbar-color: var(--accent-purple) transparent;
}

.popup-body::-webkit-scrollbar {
  width: 6px;
}

.popup-body::-webkit-scrollbar-track {
  background: transparent;
}

.popup-body::-webkit-scrollbar-thumb {
  background: #8b5cf6;
  border-radius: 3px;
}

/* Metric Card */
.metric-card {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border-radius: 16px;
  -webkit-border-radius: 16px;
  -moz-border-radius: 16px;
  -ms-border-radius: 16px;
  -o-border-radius: 16px;
  padding: 16px 18px;
  margin-bottom: 20px;
  border: 1px solid #e2e8f0;
}

.metric-icon {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a855f7 100%);
  border-radius: 10px;
  -webkit-border-radius: 10px;
  -moz-border-radius: 10px;
  -ms-border-radius: 10px;
  -o-border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
}

.metric-icon svg {
  width: 22px;
  height: 22px;
  color: #fff;
}

.metric-value {
  font-size: 32px;
  font-weight: 700;
  color: #1e1b4b;
  letter-spacing: -0.5px;
}

.metric-label {
  font-size: 14px;
  color: #64748b;
  font-weight: 500;
}

/* Tabs */
.tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 20px;
  background: #f1f5f9;
  padding: 4px;
  border-radius: 10px;
  -webkit-border-radius: 10px;
  -moz-border-radius: 10px;
  -ms-border-radius: 10px;
  -o-border-radius: 10px;
}

.tab {
  flex: 1;
  padding: 10px 8px;
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  background: transparent;
  border: none;
  border-radius: 6px;
  -webkit-border-radius: 6px;
  -moz-border-radius: 6px;
  -ms-border-radius: 6px;
  -o-border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}

.tab:hover {
  color: #1e1b4b;
}

.tab.active {
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a855f7 100%);
  color: #fff;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
}

/* Content Sections */
.content-section {
  display: none;
}

.content-section.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
/* KPI List */
.kpi-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.kpi-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  background: #fff;
  border-radius: 10px;
  -webkit-border-radius: 10px;
  -moz-border-radius: 10px;
  -ms-border-radius: 10px;
  -o-border-radius: 10px;
  border: 1px solid #e2e8f0;
  transition: all 0.2s ease;
}

.kpi-item:hover {
  border-color: #8b5cf6;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.kpi-label {
  font-size: 13px;
  color: #64748b;
  font-weight: 500;
}

.kpi-value {
  font-size: 13px;
  font-weight: 600;
  color: #1e1b4b;
  text-align: right;
}

.kpi-value.warning {
  color: #f97316;
}

.kpi-value.success {
  color: #22c55e;
}

.kpi-value.very-low {
  color: rgb(209, 41, 25);
}

.kpi-value.low {
  color: rgb(254, 138, 55);
}

.kpi-value.medium {
  color: rgb(245, 190, 24);
}

.kpi-value.high {
  color: rgb(179, 206, 34);
}

.kpi-value.very-high {
  color: #22c55e;
}

/* Emissions Grid */
.emissions-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.emission-item {
  background: #fff;
  border-radius: 10px;
  -webkit-border-radius: 10px;
  -moz-border-radius: 10px;
  -ms-border-radius: 10px;
  -o-border-radius: 10px;
  padding: 14px;
  border: 1px solid #e2e8f0;
}

.emission-value {
  font-size: 20px;
  font-weight: 700;
  color: #1e1b4b;
  margin-bottom: 4px;
}

.emission-label {
  font-size: 12px;
  color: #64748b;
}

.emission-sublabel {
  font-size: 11px;
  color: #94a3b8;
}

/* Chart Placeholder */
.chart-container {
  background: #fff;
  border-radius: 10px;
  -webkit-border-radius: 10px;
  -moz-border-radius: 10px;
  -ms-border-radius: 10px;
  -o-border-radius: 10px;
  padding: 16px;
  border: 1px solid #e2e8f0;
}

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

.chart-toggle {
  display: flex;
  gap: 4px;
  background: #f1f5f9;
  padding: 3px;
  border-radius: 6px;
  -webkit-border-radius: 6px;
  -moz-border-radius: 6px;
  -ms-border-radius: 6px;
  -o-border-radius: 6px;
}

.chart-toggle button {
  padding: 6px 10px;
  font-size: 11px;
  font-weight: 500;
  border: none;
  background: transparent;
  color: #64748b;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.chart-toggle button.active {
  background: #fff;
  color: #1e1b4b;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.chart-bars {
  display: flex;
  align-items: flex-end;
  justify-content: space-around;
  height: 120px;
  padding-top: 10px;
}

.bar-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.bar {
  width: 36px;
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a855f7 100%);
  border-radius: 4px 4px 0 0;
  transition: all 0.3s ease;
}

.bar:hover {
  opacity: 0.85;
  transform: scaleY(1.02);
  transform-origin: bottom;
}

.bar-label {
  font-size: 10px;
  color: #94a3b8;
  white-space: nowrap;
}

.chart-legend {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 16px;
  font-size: 12px;
  color: #64748b;
}

.legend-dot {
  width: 8px;
  height: 8px;
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a855f7 100%);
  border-radius: 50%;
}

/* Mobile Responsive */
@media (max-width: 480px) {
  body {
    padding: 12px;
  }
  .popup {
    max-width: 100%;
    max-height: 90vh;
    border-radius: 16px;
    -webkit-border-radius: 16px;
    -moz-border-radius: 16px;
    -ms-border-radius: 16px;
    -o-border-radius: 16px;
  }
  .popup-header {
    padding: 16px;
  }
  .plant-name {
    font-size: 18px;
  }
  .anomaly-avg {
    font-size: 24px;
  }
  .anomaly-max {
    font-size: 14px;
  }
  .popup-body {
    padding: 16px;
  }
  .metric-value {
    font-size: 28px;
  }
  .tabs {
    flex-wrap: wrap;
  }
  .tab {
    padding: 8px 6px;
    font-size: 11px;
  }
  .emissions-grid {
    grid-template-columns: 1fr;
  }
  .chart-bars {
    height: 100px;
  }
  .bar {
    width: 28px;
  }
}
@media (max-width: 360px) {
  .popup-header {
    padding: 14px;
  }
  .plant-name {
    font-size: 16px;
  }
  .popup-body {
    padding: 14px;
  }
  .tab {
    font-size: 10px;
    padding: 8px 4px;
  }
}
/* Sub-tabs for Other Emissions */
.sub-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 20px;
  border-bottom: 1px solid #e2e8f0;
}

.sub-tab {
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 500;
  color: #64748b;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-bottom: -1px;
}

.sub-tab:hover {
  color: #1e1b4b;
}

.sub-tab.active {
  color: #f97316;
  border-bottom-color: #f97316;
}

.sub-content {
  display: none;
}

.sub-content.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

.emissions-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.emissions-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.emission-item-compact {
  border-left: 3px solid #e2e8f0;
  padding-left: 12px;
}

.emission-item-compact .emission-value {
  font-size: 18px;
  font-weight: 700;
  color: #1e1b4b;
  margin-bottom: 2px;
}

.emission-item-compact .emission-label {
  font-size: 12px;
  color: #64748b;
  line-height: 1.3;
}

.emission-item-compact .emission-sublabel {
  font-size: 11px;
  color: #94a3b8;
}

@media (max-width: 480px) {
  .emissions-row {
    grid-template-columns: repeat(2, 1fr);
  }
  .sub-tab {
    padding: 8px 12px;
    font-size: 12px;
  }
}
/* ═══════════════════════════════════════════════════════════════════════
   COMPACT POPUP STYLES
   ═══════════════════════════════════════════════════════════════════════
   Import this AFTER the existing popup styles in Define_Styles.
   It overrides the header to be compact and adds the new metrics row.
   Existing tab, KPI, emissions styles remain untouched.
   ═══════════════════════════════════════════════════════════════════════ */
/* ─── Compact Header ──────────────────────────────────────────────── */
.popup-header.popup-header-compact {
  padding: 14px 16px 10px;
}

.popup-header-compact .header-top {
  margin-bottom: 6px;
}

.popup-header-compact .plant-name {
  font-size: 30px;
  line-height: 1.2;
}

/* Date + Sector tag on one horizontal line */
.header-meta-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.popup-header-compact .date-range {
  margin-bottom: 0;
  font-size: 12px;
  gap: 4px;
}

.tag.tag-compact {
  margin-bottom: 0;
  padding: 3px 8px;
  font-size: 11px;
  gap: 4px;
}

/* Remove the bottom margin on date-range inside compact header */
.popup-header-compact .date-range svg {
  width: 12px;
  height: 12px;
}

/* ─── Metrics Row (CO2e + Anomaly side by side) ───────────────────── */
.popup-metrics-row {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}

.popup-metric-card {
  flex: 1;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border-radius: 12px;
  -webkit-border-radius: 12px;
  -moz-border-radius: 12px;
  -ms-border-radius: 12px;
  -o-border-radius: 12px;
  padding: 12px 14px;
  border: 1px solid #e2e8f0;
  min-width: 0;
}

.popup-metric-value {
  font-size: 24px;
  font-weight: 700;
  color: #1e1b4b;
  letter-spacing: -0.3px;
  line-height: 1.15;
}

.popup-metric-label {
  font-size: 12px;
  color: #64748b;
  font-weight: 500;
  margin-top: 2px;
}

/* ─── Anomaly Card (clickable) ────────────────────────────────────── */
.popup-anomaly-card {
  cursor: pointer;
  border-width: 1.5px;
  border-style: solid;
  transition: all 0.25s ease;
  position: relative;
}

.popup-anomaly-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.popup-anomaly-card.trends-active {
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
}

.popup-anomaly-top {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin-bottom: 4px;
}

.popup-anomaly-value {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.1;
}

.popup-anomaly-avg-label {
  font-size: 11px;
  color: #94a3b8;
  font-weight: 500;
}

.popup-anomaly-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
}

.popup-anomaly-meta {
  display: flex;
  align-items: center;
  gap: 3px;
  font-size: 11px;
  color: #94a3b8;
  line-height: 1.2;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.popup-anomaly-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.04);
  transition: all 0.2s ease;
}

.popup-anomaly-card:hover .popup-anomaly-arrow {
  background: rgba(0, 0, 0, 0.08);
  transform: translateX(1px);
}

.popup-anomaly-card.trends-active .popup-anomaly-arrow svg {
  transform: rotate(180deg);
  transition: transform 0.3s ease;
}

/* ─── Chart View Toggle (replaces table-based Annual/Monthly) ──── */
.chart-view-toggle {
  display: flex;
  gap: 0;
  margin-bottom: 12px;
}

.chart-view-btn {
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 500;
  border: 1px solid #e2e8f0;
  background: transparent;
  color: #64748b;
  cursor: pointer;
  transition: all 0.2s ease;
}

.chart-view-btn:first-child {
  border-radius: 6px 0 0 6px;
}

.chart-view-btn:last-child {
  border-radius: 0 6px 6px 0;
  border-left: none;
}

.chart-view-btn.active {
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a855f7 100%);
  color: #fff;
  border-color: transparent;
}

.chart-view-btn:hover:not(.active) {
  background: #f8fafc;
  color: #1e1b4b;
}

.chart-view-panel {
  display: none;
}

.chart-view-panel.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

/* ═══════════════════════════════════════════════════════════════════════
   RESPONSIVE — TABLET (≤ 768px)
   ═══════════════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .popup {
    max-width: 100%;
  }
  .popup-header-compact .plant-name {
    font-size: 16px;
  }
  .popup-header-compact .date-range {
    font-size: 11px;
  }
  .tag.tag-compact {
    font-size: 10px;
  }
  .popup-metric-value {
    font-size: 20px;
  }
  .popup-anomaly-value {
    font-size: 18px;
  }
  .popup-anomaly-meta {
    font-size: 10px;
  }
  /* Tabs: allow horizontal scroll instead of wrap */
  .tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .tabs::-webkit-scrollbar {
    display: none;
  }
  .tab {
    white-space: nowrap;
    flex-shrink: 0;
  }
}
/* ═══════════════════════════════════════════════════════════════════════
   RESPONSIVE — MOBILE (≤ 480px)
   ═══════════════════════════════════════════════════════════════════════ */
@media (max-width: 480px) {
  .popup {
    max-width: 100%;
    max-height: 90vh;
    border-radius: 16px;
    -webkit-border-radius: 16px;
    -moz-border-radius: 16px;
    -ms-border-radius: 16px;
    -o-border-radius: 16px;
  }
  .popup-header.popup-header-compact {
    padding: 12px 14px 8px;
  }
  .popup-header-compact .header-top {
    margin-bottom: 4px;
  }
  .popup-header-compact .plant-name {
    font-size: 15px;
  }
  .popup-header-compact .location-code {
    font-size: 10px;
  }
  /* Stack date + tag vertically on very narrow screens */
  .header-meta-row {
    gap: 4px;
  }
  .popup-header-compact .date-range {
    font-size: 11px;
  }
  .tag.tag-compact {
    font-size: 10px;
    padding: 2px 6px;
  }
  /* Metrics row */
  .popup-metrics-row {
    gap: 6px;
    margin-bottom: 10px;
  }
  .popup-metric-card {
    padding: 10px 10px;
  }
  .popup-metric-value {
    font-size: 18px;
  }
  .popup-metric-label {
    font-size: 11px;
  }
  .popup-anomaly-value {
    font-size: 16px;
  }
  .popup-anomaly-avg-label {
    font-size: 10px;
  }
  .popup-anomaly-meta {
    font-size: 9px;
  }
  .popup-anomaly-arrow {
    width: 16px;
    height: 16px;
  }
  /* Body padding */
  .popup-body {
    padding: 12px;
  }
  /* Tabs */
  .tabs {
    gap: 3px;
    margin-bottom: 12px;
  }
  .tab {
    padding: 7px 6px;
    font-size: 11px;
  }
  /* KPI items */
  .kpi-item {
    padding: 10px 12px;
  }
  .kpi-label {
    font-size: 12px;
  }
  .kpi-value {
    font-size: 12px;
  }
  /* Emissions grid: 2 columns on mobile */
  .emissions-row {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
  .emission-item-compact .emission-value {
    font-size: 16px;
  }
  .sub-tab {
    padding: 8px 10px;
    font-size: 12px;
  }
  /* Chart container */
  .chart-container {
    padding: 12px;
  }
  .h-200 {
    height: 170px !important;
  }
}
/* ═══════════════════════════════════════════════════════════════════════
   RESPONSIVE — SMALL MOBILE (≤ 360px)
   ═══════════════════════════════════════════════════════════════════════ */
@media (max-width: 360px) {
  .popup-header.popup-header-compact {
    padding: 10px 12px 6px;
  }
  .popup-header-compact .plant-name {
    font-size: 14px;
  }
  /* Stack metrics vertically on very small screens */
  .popup-metrics-row {
    flex-direction: column;
    gap: 6px;
  }
  .popup-metric-value {
    font-size: 20px;
  }
  .popup-anomaly-value {
    font-size: 18px;
  }
  .popup-body {
    padding: 10px;
  }
  .tab {
    font-size: 10px;
    padding: 6px 4px;
  }
  .kpi-item {
    padding: 8px 10px;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
  }
  .kpi-value {
    text-align: left;
  }
  .emissions-row {
    grid-template-columns: 1fr;
  }
}
/* ═══════════════════════════════════════════════════════════════════════
   LANDSCAPE MOBILE
   ═══════════════════════════════════════════════════════════════════════ */
@media (max-width: 768px) and (orientation: landscape) {
  .popup {
    max-height: 95vh;
  }
  .popup-metrics-row {
    flex-direction: row;
  }
  .emissions-row {
    grid-template-columns: repeat(3, 1fr);
  }
}
/* ═══════════════════════════════════════════════════════════════════════
   TEMPERATURE ANOMALY TRENDS PANEL — STYLES
   ═══════════════════════════════════════════════════════════════════════
   Add this import to your Define_Styles or Overview_Styles file.
   Uses existing variables ($define-*) where possible.
   ═══════════════════════════════════════════════════════════════════════ */
/* ─── WRAPPER ─────────────────────────────────────────────────────────
   Wrap the existing .popup + the new .trends-panel together.
   The wrapper transitions its max-width to create the slide-right effect.
   ──────────────────────────────────────────────────────────────────── */
.popup-expandable-wrapper {
  display: flex;
  max-width: 420px;
  transition: max-width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
  border-radius: 20px;
  box-shadow: 0 20px 40px -12px rgba(99, 102, 241, 0.25);
  position: relative;
}

.popup-expandable-wrapper.trends-expanded {
  max-width: 880px;
}

/* Reset the .popup shadow/radius — the wrapper owns them now */
.popup-expandable-wrapper .popup {
  box-shadow: none;
  border-radius: 0;
  border-top-left-radius: 20px;
  border-bottom-left-radius: 20px;
  border-right: none;
  max-width: 420px;
  min-width: 420px;
  flex-shrink: 0;
}

/* ─── ANOMALY SECTION — CLICKABLE ENHANCEMENT ────────────────────── */
.anomaly-section {
  cursor: pointer;
  position: relative;
  transition: all 0.25s ease;
}

.anomaly-section:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.anomaly-section-hint {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  color: rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.15);
  padding: 2px 8px;
  border-radius: 4px;
  margin-left: auto;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.anomaly-section:hover .anomaly-section-hint {
  background: rgba(255, 255, 255, 0.25);
  color: rgba(255, 255, 255, 0.9);
}

.anomaly-section.trends-active {
  background: rgba(255, 255, 255, 0.1);
}

.anomaly-section.trends-active .anomaly-section-hint {
  background: rgba(255, 255, 255, 0.25);
}

.anomaly-section.trends-active .anomaly-section-hint svg {
  transform: rotate(180deg);
}

/* The hint arrow icon */
.anomaly-section-hint svg {
  transition: transform 0.3s ease;
}

/* ─── TRENDS PANEL ────────────────────────────────────────────────── */
.trends-panel {
  width: 0;
  min-width: 0;
  opacity: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: rgba(255, 255, 255, 0.95);
  border-left: 1px solid #e2e8f0;
  border-top-right-radius: 20px;
  border-bottom-right-radius: 20px;
  transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1), min-width 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease 0.1s;
}

.trends-expanded .trends-panel {
  width: 460px;
  min-width: 460px;
  opacity: 1;
}

/* ─── Panel Header ────────────────────────────────────────────────── */
.trends-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid #e2e8f0;
  flex-shrink: 0;
  gap: 10px;
}

.trends-panel-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}

.trends-panel-back-btn {
  width: 32px;
  height: 32px;
  min-width: 32px;
  border-radius: 8px;
  background: transparent;
  border: 1px solid #e2e8f0;
  color: #64748b;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.trends-panel-back-btn:hover {
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a855f7 100%);
  border-color: transparent;
  color: #fff;
}

.trends-panel-title-group {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.trends-panel-icon {
  width: 32px;
  height: 32px;
  min-width: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #b45309;
}

.trends-panel-title {
  font-size: 14px;
  font-weight: 600;
  color: #1e1b4b;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.trends-panel-subtitle {
  font-size: 11px;
  color: #94a3b8;
  margin: 0;
  white-space: nowrap;
}

/* ─── Monthly / Annual Toggle ─────────────────────────────────────── */
.trends-chart-toggle {
  display: flex;
  gap: 0;
  background: #f1f5f9;
  padding: 3px;
  border-radius: 6px;
  flex-shrink: 0;
}

.trends-toggle-btn {
  padding: 5px 12px;
  font-size: 11px;
  font-weight: 500;
  border: none;
  background: transparent;
  color: #64748b;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.trends-toggle-btn:hover {
  color: #1e1b4b;
}

.trends-toggle-btn.active {
  background: #fff;
  color: #1e1b4b;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

/* ─── Panel Body ──────────────────────────────────────────────────── */
.trends-panel-body {
  flex: 1;
  overflow-y: auto;
  padding: 14px 16px;
  scrollbar-width: thin;
  scrollbar-color: #8b5cf6 transparent;
}

.trends-panel-body::-webkit-scrollbar {
  width: 5px;
}

.trends-panel-body::-webkit-scrollbar-track {
  background: transparent;
}

.trends-panel-body::-webkit-scrollbar-thumb {
  background: #8b5cf6;
  border-radius: 3px;
}

/* ─── Summary Cards ───────────────────────────────────────────────── */
.trends-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}

.trends-summary-card {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border-radius: 10px;
  padding: 10px;
  border: 1px solid #e2e8f0;
}

.trends-summary-label {
  font-size: 11px;
  color: #94a3b8;
  display: block;
  margin-bottom: 2px;
}

.trends-summary-value {
  font-size: 16px;
  font-weight: 700;
  display: block;
  line-height: 1.2;
}

/* ─── Chart Section ───────────────────────────────────────────────── */
.trends-chart-section {
  background: #fff;
  border-radius: 10px;
  padding: 14px;
  border: 1px solid #e2e8f0;
  margin-bottom: 14px;
}

.trends-chart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  flex-wrap: wrap;
  gap: 6px;
}

.trends-chart-title {
  font-size: 13px;
  font-weight: 600;
  color: #1e1b4b;
}

.trends-chart-legend {
  display: flex;
  gap: 12px;
  font-size: 11px;
  color: #64748b;
  flex-wrap: wrap;
}

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

.trends-legend-line {
  width: 14px;
  height: 3px;
  border-radius: 2px;
}

.trends-legend-historical {
  background: #8b5cf6;
}

.trends-legend-projected {
  background: #8b5cf6;
  opacity: 0.45;
  border: 1px dashed #8b5cf6;
  height: 1px;
}

.trends-legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ef4444;
}

.trends-chart-container {
  position: relative;
}

.trends-chart-area {
  width: 100%;
  height: 240px;
}

/* ─── Extreme Weather Events ──────────────────────────────────────── */
.trends-events-section {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  overflow: hidden;
}

.trends-events-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  cursor: pointer;
  transition: background 0.2s ease;
  user-select: none;
}

.trends-events-header:hover {
  background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
}

.trends-events-header-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.trends-events-title {
  font-size: 13px;
  font-weight: 600;
  color: #1e1b4b;
}

.trends-events-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  background: #fef2f2;
  color: #ef4444;
  font-size: 11px;
  font-weight: 700;
  border-radius: 10px;
  margin-left: 6px;
}

.trends-events-collapse-btn {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: transparent;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.trends-events-collapse-btn:hover {
  background: rgba(0, 0, 0, 0.05);
}

.trends-events-collapse-btn svg {
  transition: transform 0.3s ease;
}

.trends-events-section.collapsed .trends-events-collapse-btn svg {
  transform: rotate(-90deg);
}

/* Events list with animated collapse */
.trends-events-list {
  max-height: 600px;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
  opacity: 1;
}

.trends-events-section.collapsed .trends-events-list {
  max-height: 0;
  opacity: 0;
}

/* ─── Event Item ──────────────────────────────────────────────────── */
.trends-event-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 10px 14px;
  border-bottom: 1px solid #e2e8f0;
  transition: background 0.15s ease;
}

.trends-event-item:last-child {
  border-bottom: none;
}

.trends-event-item:hover {
  background: #fafafa;
}

.trends-event-dot {
  width: 7px;
  min-width: 7px;
  height: 7px;
  border-radius: 50%;
  margin-top: 5px;
  flex-shrink: 0;
}

.trends-event-dot-critical {
  background: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
}

.trends-event-dot-moderate {
  background: #f59e0b;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.15);
}

.trends-event-body {
  flex: 1;
  min-width: 0;
}

.trends-event-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
  gap: 8px;
}

.trends-event-name {
  font-size: 13px;
  font-weight: 600;
  color: #1e1b4b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.trends-event-date {
  font-size: 11px;
  color: #94a3b8;
  white-space: nowrap;
  flex-shrink: 0;
}

.trends-event-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.trends-event-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 1px 7px;
  border-radius: 4px;
}

.trends-event-badge-critical {
  background: #fef2f2;
  color: #dc2626;
}

.trends-event-badge-moderate {
  background: #fffbeb;
  color: #d97706;
}

.trends-event-duration {
  font-size: 11px;
  color: #94a3b8;
}

.trends-event-desc {
  font-size: 12px;
  color: #64748b;
  line-height: 1.4;
  margin: 0;
}

/* ═══════════════════════════════════════════════════════════════════════
   RESPONSIVE — TABLET (≤ 900px)
   The panel stacks below the popup or adjusts widths
   ═══════════════════════════════════════════════════════════════════════ */
@media (max-width: 900px) {
  .popup-expandable-wrapper {
    max-width: 420px;
  }
  .popup-expandable-wrapper.trends-expanded {
    max-width: 420px;
  }
  /* Panel takes over the popup body area */
  .popup-expandable-wrapper .popup {
    min-width: 100%;
    max-width: 100%;
  }
  .trends-expanded .popup .popup-body {
    display: none;
  }
  .trends-panel {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 0;
    min-width: 0;
    border-radius: 20px;
    z-index: 20;
    border-left: none;
  }
  .trends-expanded .trends-panel {
    width: 100%;
    min-width: 100%;
  }
}
/* ═══════════════════════════════════════════════════════════════════════
   RESPONSIVE — MOBILE (≤ 480px)
   ═══════════════════════════════════════════════════════════════════════ */
@media (max-width: 480px) {
  .popup-expandable-wrapper {
    max-width: 100%;
    border-radius: 16px;
  }
  .popup-expandable-wrapper.trends-expanded {
    max-width: 100%;
  }
  .popup-expandable-wrapper .popup {
    min-width: 100%;
    max-width: 100%;
    border-radius: 16px;
  }
  .trends-panel {
    border-radius: 16px;
  }
  /* Summary cards: 2×2 grid */
  .trends-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }
  .trends-summary-value {
    font-size: 14px;
  }
  /* Panel header stacks */
  .trends-panel-header {
    flex-wrap: wrap;
    padding: 12px;
    gap: 8px;
  }
  .trends-chart-toggle {
    width: 100%;
    justify-content: center;
  }
  .trends-toggle-btn {
    flex: 1;
    text-align: center;
  }
  /* Smaller chart */
  .trends-chart-area {
    height: 200px;
  }
  /* Chart section collapsible on mobile */
  .trends-chart-section.mobile-collapsed .trends-chart-container {
    max-height: 0;
    overflow: hidden;
    margin: 0;
    padding: 0;
  }
  .trends-chart-section.mobile-collapsed .trends-chart-legend {
    display: none;
  }
  /* Back button more prominent on mobile */
  .trends-panel-back-btn {
    width: 36px;
    height: 36px;
    min-width: 36px;
  }
  /* Panel title adjustments */
  .trends-panel-title {
    font-size: 13px;
  }
  .trends-panel-icon {
    display: none;
  }
  /* Event items tighter */
  .trends-event-item {
    padding: 8px 12px;
  }
  .trends-event-desc {
    font-size: 11px;
  }
}
/* ═══════════════════════════════════════════════════════════════════════
   RESPONSIVE — SMALL MOBILE (≤ 360px)
   ═══════════════════════════════════════════════════════════════════════ */
@media (max-width: 360px) {
  .trends-summary-grid {
    grid-template-columns: 1fr 1fr;
    gap: 4px;
  }
  .trends-summary-card {
    padding: 8px;
  }
  .trends-summary-label {
    font-size: 10px;
  }
  .trends-summary-value {
    font-size: 13px;
  }
  .trends-chart-area {
    height: 180px;
  }
  .trends-panel-header {
    padding: 10px;
  }
  .trends-panel-body {
    padding: 10px;
  }
}
.definePages .cluster-marker.marker-active {
  z-index: 100 !important;
  transform: scale(1.3);
  transition: transform 0.3s ease;
}

.definePages .cluster-marker.marker-active::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  animation: markerRipple 1.5s ease-out infinite;
  pointer-events: none;
}

.definePages .cluster-marker.marker-active::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  animation: markerRipple 1.5s ease-out infinite 0.5s;
  pointer-events: none;
}

.definePages .cluster-marker.marker-active:not(.clustered)::before,
.definePages .cluster-marker.marker-active:not(.clustered)::after {
  border: 3px solid currentColor;
  box-shadow: 0 0 20px currentColor;
}

.definePages .cluster-marker.marker-active:not(.clustered) {
  box-shadow: 0 0 25px currentColor, 0 8px 30px rgba(0, 0, 0, 0.3);
}

.definePages .cluster-marker.marker-active[style*="background-color: rgb(92, 151, 20)"]::before,
.definePages .cluster-marker.marker-active[style*="background-color: rgb(92, 151, 20)"]::after,
.definePages .cluster-marker.marker-active[style*="background: rgb(92, 151, 20)"]::before,
.definePages .cluster-marker.marker-active[style*="background: rgb(92, 151, 20)"]::after {
  border-color: #5c9714;
}

.definePages .cluster-marker.marker-active[style*="background-color: rgb(255, 165, 0)"]::before,
.definePages .cluster-marker.marker-active[style*="background-color: rgb(255, 165, 0)"]::after,
.definePages .cluster-marker.marker-active[style*="background: rgb(255, 165, 0)"]::before,
.definePages .cluster-marker.marker-active[style*="background: rgb(255, 165, 0)"]::after {
  border-color: #FFA500;
}

.definePages .cluster-marker.marker-active[style*="background-color: rgb(255, 0, 0)"]::before,
.definePages .cluster-marker.marker-active[style*="background-color: rgb(255, 0, 0)"]::after,
.definePages .cluster-marker.marker-active[style*="background: rgb(255, 0, 0)"]::before,
.definePages .cluster-marker.marker-active[style*="background: rgb(255, 0, 0)"]::after {
  border-color: #ff0000;
}

.definePages .cluster-marker.clustered.marker-active::before,
.definePages .cluster-marker.clustered.marker-active::after {
  border: 3px solid rgba(139, 92, 246, 0.6);
}

.definePages .cluster-marker.clustered.marker-active {
  box-shadow: 0 0 30px rgba(139, 92, 246, 0.5), 0 10px 40px rgba(0, 0, 0, 0.3);
}

@keyframes markerRipple {
  0% {
    width: 100%;
    height: 100%;
    opacity: 0.8;
  }
  100% {
    width: 400%;
    height: 400%;
    opacity: 0;
  }
}
@keyframes markerPulseGlow {
  0%, 100% {
    box-shadow: 0 0 15px currentColor, 0 6px 20px rgba(0, 0, 0, 0.2);
  }
  50% {
    box-shadow: 0 0 30px currentColor, 0 0 50px currentColor, 0 10px 30px rgba(0, 0, 0, 0.3);
  }
}
.definePages .cluster-marker.marker-active:not(.clustered) {
  animation: markerPulseGlow 2s ease-in-out infinite;
}

.definePages .chat-toggle-fixed {
  position: fixed;
  bottom: 90px;
  right: 24px;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: linear-gradient(135deg, #a25cf6, #7c3aed, #4c1d95);
  border: none;
  cursor: pointer;
  box-shadow: 0 8px 30px rgba(139, 92, 246, 0.5), 0 0 0 4px rgba(255, 255, 255, 0.5);
  z-index: 99;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  animation: defineGlow 3s ease-in-out infinite;
}

.definePages .chat-toggle-fixed:hover {
  transform: scale(1.1);
  box-shadow: 0 12px 40px rgba(139, 92, 246, 0.6), 0 0 0 6px rgba(255, 255, 255, 0.6);
}

.definePages .chat-toggle-fixed svg {
  width: 26px;
  height: 26px;
  color: #fff;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
  transition: all 0.3s ease;
}

.definePages .chat-toggle-fixed.active svg {
  transform: rotate(180deg);
}

.definePages .chat-toggle-fixed .chat-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 22px;
  height: 22px;
  background: linear-gradient(135deg, #f472b6, #ec4899);
  border-radius: 50%;
  font-size: 11px;
  font-weight: 800;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 3px solid #fff;
  box-shadow: 0 4px 12px rgba(236, 72, 153, 0.5);
  animation: definePulse 2s infinite;
}

.definePages .footer-brand .chat-toggle {
  display: none;
}

@media (max-width: 1100px) {
  .definePages .chat-toggle-fixed {
    bottom: 90px;
    right: 16px;
    width: 50px;
    height: 50px;
  }
  .definePages .chat-toggle-fixed svg {
    width: 24px;
    height: 24px;
  }
  .definePages .chat-toggle-fixed .chat-badge {
    width: 20px;
    height: 20px;
    font-size: 10px;
  }
}
@media (max-width: 768px) {
  .definePages .chat-toggle-fixed {
    bottom: 80px;
    right: 12px;
    width: 48px;
    height: 48px;
  }
  .definePages .chat-toggle-fixed svg {
    width: 22px;
    height: 22px;
  }
  .definePages .chat-toggle-fixed .chat-badge {
    width: 18px;
    height: 18px;
    font-size: 9px;
    border-width: 2px;
  }
}
@media (max-width: 480px) {
  .definePages .chat-toggle-fixed {
    bottom: 70px;
    right: 8px;
    width: 44px;
    height: 44px;
  }
  .definePages .chat-toggle-fixed svg {
    width: 20px;
    height: 20px;
  }
  .definePages .chat-toggle-fixed .chat-badge {
    width: 16px;
    height: 16px;
    font-size: 8px;
    top: -2px;
    right: -2px;
  }
}
/* Login Page */
.define-login-page {
  --card-bg: rgba(255, 255, 255, 0.55);
  --input-bg: rgba(255, 255, 255, 0.7);
  --input-border: #ddd8f0;
  --shadow-card: 0 8px 40px rgba(91, 33, 182, 0.10), 0 1.5px 8px rgba(91, 33, 182, 0.07);
  --shadow-btn: 0 4px 20px rgba(124, 58, 237, 0.35);
  --radius: 20px;
  --radius-sm: 12px;
  --radius-input: 10px;
}

body.define-login-page {
  background: #e2e8f0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  position: relative;
}

/* Subtle dot-grid background */
body.define-login-page::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: radial-gradient(circle, rgba(124, 58, 237, 0.1) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
  z-index: 0;
}

/* ── STICKY HEADER & FOOTER ── */
body.define-login-page > section.define-section > .container-fluid > .row > header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  padding: 14px 16px;
}

body.define-login-page > footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 200;
}

body.define-login-page > section.define-section {
  padding-top: 60px;
  padding-bottom: 60px;
}

/* ── MAIN LAYOUT ── */
main.define-signup {
  flex: 1;
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 0;
  min-height: calc(100vh - 136px);
  padding: 0;
}

/* ── LEFT HERO ── */
.define-signup .hero {
  padding: 60px 48px 60px 60px;
  display: flex;
  flex-direction: column;
  gap: 32px;
  align-self: center;
}

.define-signup .hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #f5f3ff;
  border: 1px solid #ddd6fe;
  color: #4c1d95;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: 999px;
  width: fit-content;
}

.define-signup .hero-badge span {
  width: 7px;
  height: 7px;
  background: #4c1d95;
  border-radius: 50%;
  display: inline-block;
}

.define-signup .hero-title {
  font-size: clamp(2rem, 3.5vw, 3rem);
  line-height: 1.15;
  color: #1e1b4b;
}

.define-signup .hero-title em {
  font-style: normal;
  color: #7c3aed;
}

.define-signup .hero-sub {
  font-size: 1rem;
  color: #4b3f72;
  line-height: 1.65;
  max-width: 580px;
}

.define-signup .hero-stats {
  display: flex;
  gap: 28px;
}

.define-signup .stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.define-signup .stat-value {
  font-family: "Barlow Condensed", sans-serif;
  font-weight: 700;
  font-size: 1.6rem;
  color: #1e1b4b;
}

.define-signup .stat-label {
  font-size: 0.8rem;
  color: #94a3b8;
  font-weight: 500;
}

.define-signup .stat-divider {
  width: 1px;
  background: var(--input-border);
  align-self: stretch;
}

.define-signup .hero-features {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.define-signup .feature-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.875rem;
  color: #4b3f72;
  font-weight: 500;
}

.define-signup .feature-icon {
  /*width: 30px;
  height: 30px;
  border-radius: 8px;
  background: linear-gradient(135deg, $define-primary-lighter, #fff);
  border: 1px solid $define-primary-light;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  font-size: 0.9rem;*/
  width: 7px;
  height: 7px;
  background: #4c1d95;
  border-radius: 50%;
  display: inline-block;
}

/* ── RIGHT FORM ── */
.define-signup .form-side {
  padding: 60px 60px 60px 48px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.define-signup .card {
  background: var(--card-bg);
  border: 1.5px solid rgba(255, 255, 255, 0.95);
  border-radius: var(--radius);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow-card);
  padding: 40px;
  width: 100%;
  max-width: 500px;
  position: relative;
  overflow: hidden;
}

.define-signup .card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #4c1d95, #a25cf6, #a78bfa);
  border-radius: var(--radius) var(--radius) 0 0;
}

.define-signup .card-header {
  margin-bottom: 28px;
  background-color: transparent;
  border-bottom: none;
  padding: 0;
}

.define-signup .card-title {
  font-family: "Barlow Condensed", sans-serif;
  font-weight: 800;
  font-size: 1.55rem;
  color: #5b21b6;
  margin-bottom: 6px;
}

.define-signup .card-sub {
  font-size: 0.875rem;
  color: #94a3b8;
}

/* ── STEP PROGRESS ── */
.define-signup .step-progress {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 30px;
}

.define-signup .step-dot {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.72rem;
  font-weight: 700;
  font-family: "Barlow Condensed", sans-serif;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  border: 2px solid var(--input-border);
  background: #fff;
  color: #94a3b8;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
  cursor: default;
}

.define-signup .step-dot.active {
  background: linear-gradient(135deg, #7c3aed, #a25cf6);
  border-color: #7c3aed;
  color: #fff;
  box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.15);
}

.define-signup .step-dot.done {
  background: #ddd6fe;
  border-color: #a78bfa;
  color: #4c1d95;
}

.define-signup .step-dot.done::after {
  content: "✓";
  font-size: 0.8rem;
  font-weight: 700;
}

.define-signup .step-dot.done span {
  display: none;
}

.define-signup .step-line {
  flex: 1;
  height: 2px;
  background: var(--input-border);
  transition: background 0.4s;
  margin: 0 2px;
}

.define-signup .step-line.done {
  background: #a78bfa;
}

/* ── STEP PANELS ── */
.define-signup .step-panel {
  display: none;
  flex-direction: column;
  gap: 16px;
  animation: fadeUp 0.3s ease;
}

.define-signup .step-panel.active {
  display: flex;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.define-signup .step-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #7c3aed;
  margin-bottom: 2px;
}

.define-signup .step-heading {
  font-family: "Barlow Condensed", sans-serif;
  font-weight: 700;
  font-size: 1.05rem;
  color: #1e1b4b;
  margin-bottom: 4px;
}

/* ── INPUTS ── */
.define-signup .field {
  display: flex;
  flex-direction: column;
  gap: 0px;
}

.define-signup label {
  font-size: 0.8rem;
  font-weight: 600;
  color: #4b3f72;
}

.define-signup input[type=text], .define-signup input[type=email], .define-signup input[type=password], .define-signup input[type=tel], .define-signup select, .define-signup textarea, .define-signup input[type=url], .define-signup input[type=file] {
  background: var(--input-bg);
  border: 1.5px solid var(--input-border);
  border-radius: var(--radius-input);
  padding: 11px 14px;
  font-size: 0.9rem;
  color: #5b21b6;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  width: 100%;
}

.define-signup input:focus, .define-signup select:focus, .define-signup textarea:focus {
  border-color: #7c3aed;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.12);
}

.define-signup input::placeholder, .define-signup textarea::placeholder {
  color: #94a3b8;
}

.define-signup select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%239388b0' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 38px;
}

.define-signup textarea {
  resize: vertical;
  min-height: 80px;
}

.define-signup .input-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

/* ── PASSWORD STRENGTH ── */
.define-signup .pw-strength {
  display: flex;
  gap: 4px;
  margin-top: 4px;
}

.define-signup .pw-bar {
  flex: 1;
  height: 3px;
  border-radius: 2px;
  background: var(--input-border);
  transition: background 0.3s;
}

.define-signup .pw-bar.weak {
  background: #f87171;
}

.define-signup .pw-bar.fair {
  background: #fb923c;
}

.define-signup .pw-bar.strong {
  background: #34d399;
}

.define-signup .pw-hint {
  font-size: 0.75rem;
  color: #94a3b8;
  margin-top: 3px;
}

/* ── ROLE CARDS ── */
.define-signup .role-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.define-signup .role-card {
  border: 1.5px solid var(--input-border);
  border-radius: var(--radius-sm);
  padding: 14px 12px;
  cursor: pointer;
  transition: all 0.2s;
  background: var(--input-bg);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.define-signup .role-card:hover {
  border-color: #a78bfa;
  background: #ddd6fe;
}

.define-signup .role-card.selected {
  border-color: #4c1d95;
  background: #ddd6fe;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

.define-signup .role-icon {
  font-size: 1.4rem;
}

.define-signup .role-name {
  font-size: 0.82rem;
  font-weight: 700;
  color: #5b21b6;
}

.define-signup .role-desc {
  font-size: 0.73rem;
  color: #94a3b8;
  line-height: 1.4;
}

/* ── CHECKBOXES / TAGS ── */
.define-signup .tag-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.define-signup .tag {
  padding: 7px 14px;
  border-radius: 999px;
  border: 1.5px solid var(--input-border);
  background: var(--input-bg);
  font-size: 0.8rem;
  font-weight: 500;
  color: #4b3f72;
  cursor: pointer;
  transition: all 0.2s;
  user-select: none;
}

.define-signup .tag:hover {
  border-color: #a78bfa;
  color: #4c1d95;
}

.define-signup .tag.selected {
  border-color: #4c1d95;
  background: #ddd6fe;
  color: #4c1d95;
  font-weight: 600;
}

/* ── VERIFY CODE ── */
.define-signup .otp-row {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.define-signup .otp-input {
  width: 48px;
  height: 54px;
  text-align: center;
  font-family: "Barlow Condensed", sans-serif;
  font-size: 1.3rem;
  font-weight: 700;
  border: 1.5px solid var(--input-border);
  border-radius: 10px;
  background: var(--input-bg);
  color: #5b21b6;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.define-signup .otp-input:focus {
  border-color: #4c1d95;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.12);
}

.define-signup .otp-resend {
  text-align: center;
  font-size: 0.82rem;
  color: #94a3b8;
}

.define-signup .otp-resend a {
  color: #4c1d95;
  cursor: pointer;
  font-weight: 600;
  text-decoration: none;
}

.define-signup .otp-resend a:hover {
  text-decoration: underline;
}

/* ── SUCCESS ── */
.define-signup .success-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 16px;
  padding: 10px 0;
}

.define-signup .success-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ddd6fe, #ddd6fe);
  border: 2px solid #a78bfa;
  display: grid;
  place-items: center;
  font-size: 2rem;
  animation: popIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes popIn {
  from {
    transform: scale(0.5);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}
.define-signup .success-title {
  font-family: "Barlow Condensed", sans-serif;
  font-weight: 800;
  font-size: 1.3rem;
  color: #5b21b6;
}

.define-signup .success-text {
  font-size: 0.875rem;
  color: #94a3b8;
  line-height: 1.6;
  max-width: 290px;
}

/* ── BUTTONS ── */
.define-signup .btn-row {
  display: flex;
  gap: 10px;
  margin-top: 8px;
}

.define-signup .btn-next {
  flex: 1;
  padding: 13px;
  background: linear-gradient(135deg, #7c3aed, #a25cf6);
  color: #fff;
  border: none;
  border-radius: var(--radius-input);
  font-family: "Barlow Condensed", sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: var(--shadow-btn);
  transition: opacity 0.2s, transform 0.15s;
}

.define-signup .btn-next:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.define-signup .btn-next:active {
  transform: translateY(0);
}

.define-signup .btn-back {
  padding: 13px 18px;
  background: transparent;
  border: 1.5px solid var(--input-border);
  border-radius: var(--radius-input);
  color: #4b3f72;
  font-family: "Barlow Condensed", sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: all 0.2s;
}

.define-signup .btn-back:hover {
  border-color: #a78bfa;
  color: #4c1d95;
}

.define-signup .login-link {
  text-align: center;
  font-size: 0.82rem;
  color: #94a3b8;
  margin-top: 6px;
}

.define-signup .login-link a {
  color: #4c1d95;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.define-signup .login-link a:hover {
  text-decoration: underline;
}

.define-signup .error {
  color: #E30613;
}

/* Responsive */
@media (max-width: 820px) {
  main.define-signup {
    grid-template-columns: 1fr;
  }
  .define-signup .hero {
    display: none;
  }
  .define-signup .form-side {
    padding: 40px 24px;
  }
}
.define-signup .card-tabs {
  display: flex;
  gap: 0;
  border: 1.5px solid var(--input-border);
  border-radius: var(--radius-input);
  overflow: hidden;
  margin-bottom: 10px;
}

.define-signup .card-tab {
  flex: 1;
  padding: 10px;
  border: none;
  background: var(--input-bg);
  font-family: "Barlow Condensed", sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  color: #94a3b8;
  cursor: pointer;
  transition: all 0.2s;
}

.define-signup .card-tab.active {
  background: linear-gradient(135deg, #7c3aed, #a25cf6);
  color: #fff;
}

.define-signup .card-tab:hover:not(.active) {
  color: #4c1d95;
  background: #ddd6fe;
}

.define-signup .login-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
  animation: fadeUp 0.3s ease;
}

/* ===== Nearby Place Pin (Google-style) ===== */
.nearby-pin {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
  z-index: 1;
  animation: nearbyPinFadeIn 0.3s ease-out forwards;
}

@keyframes nearbyPinFadeIn {
  0% {
    opacity: 0.3;
  }
  100% {
    opacity: 1;
  }
}
.nearby-pin:hover {
  transform: scale(1.15);
  z-index: 10;
}

.nearby-pin-head {
  width: 32px;
  height: 32px;
  background: #ffffff;
  border: 4px solid #7c3aed;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.nearby-pin-icon {
  transform: rotate(45deg);
  font-size: 12px;
  line-height: 1;
}

.nearby-pin-tail {
  width: 2px;
  height: 6px;
  background: #7c3aed;
  margin-top: -1px;
  border-radius: 0 0 1px 1px;
}

/* ===== Info Window (Google-style popup) ===== */
.nearby-info-window .mapboxgl-popup-content {
  background: #fff;
  border-radius: 8px;
  padding: 0;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(0, 0, 0, 0.05);
  min-width: 200px;
  max-width: 280px;
  overflow: hidden;
}

.nearby-info-window .mapboxgl-popup-tip {
  border-top-color: #fff;
}

.nearby-iw {
  display: flex;
  gap: 10px;
  padding: 12px;
  align-items: flex-start;
}

.nearby-iw-icon {
  font-size: 20px;
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  background: #f0f4ff;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nearby-iw-body {
  flex: 1;
  min-width: 0;
}

.nearby-iw-name {
  font-size: 13px;
  font-weight: 600;
  color: #1a1a1a;
  line-height: 1.3;
  margin-bottom: 2px;
}

.nearby-iw-type {
  font-size: 11px;
  color: #4285F4;
  font-weight: 500;
  margin-bottom: 3px;
}

.nearby-iw-address {
  font-size: 11px;
  color: #666;
  line-height: 1.3;
  white-space: normal;
  word-wrap: break-word;
}

.nearby-info-window {
  z-index: 9999 !important;
}

.nearby-pin:hover {
  transform: scale(1.15);
  z-index: 10;
}

.nearby-pin {
  z-index: 1;
}

/* Animation for markers appearing */
.nearby-pin {
  animation: nearbyPinDrop 0.3s ease-out;
}

@keyframes nearbyPinDrop {
  0% {
    opacity: 0;
    transform: translateY(-10px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/*# sourceMappingURL=define-main.css.map */
