/**
 * JORO LOCATION - MULTI-HAZARD INTELLIGENCE STYLES
 * 
 * Modern, professional styling for environmental risk visualization
 * 
 * @version 1.0.0
 * @cache v=20260130v1
 */

/* ═══════════════════════════════════════════════════════════════
   HEADER
   ═══════════════════════════════════════════════════════════════ */

.joro-location-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
  padding-bottom: 20px;
  border-bottom: 2px solid #e5e7eb;
}

.header-title h2 {
  font-size: 28px;
  font-weight: 700;
  color: #111827;
  margin: 0 0 8px 0;
}

.header-title .subtitle {
  font-size: 14px;
  color: #6b7280;
  margin: 0;
}

.header-badge {
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.header-badge.fragility-critical {
  background: #fee2e2;
  color: #dc2626;
}

.header-badge.fragility-high {
  background: #fed7aa;
  color: #ea580c;
}

.header-badge.fragility-moderate {
  background: #fef3c7;
  color: #f59e0b;
}

.header-badge.fragility-low {
  background: #dcfce7;
  color: #16a34a;
}

.header-badge.fragility-minimal {
  background: #d1fae5;
  color: #059669;
}

/* ═══════════════════════════════════════════════════════════════
   FRAGILITY OVERVIEW
   ═══════════════════════════════════════════════════════════════ */

.fragility-overview {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 32px;
}

@media (max-width: 768px) {
  .fragility-overview {
    grid-template-columns: 1fr;
  }
}

/* Fragility Gauge */
.fragility-gauge {
  background: white;
  padding: 24px;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  gap: 24px;
}

.gauge-container {
  position: relative;
  width: 200px;
  height: 200px;
}

.gauge-svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.gauge-background {
  fill: none;
  stroke: #e5e7eb;
  stroke-width: 12;
}

.gauge-progress {
  fill: none;
  stroke-width: 12;
  stroke-linecap: round;
  transition: stroke-dasharray 1s ease;
}

.gauge-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}

.gauge-score {
  font-size: 48px;
  font-weight: 700;
  color: #111827;
}

.gauge-label {
  font-size: 14px;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.gauge-info {
  flex: 1;
}

.fragility-level {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 16px;
}

.intervention-urgency {
  margin-bottom: 8px;
}

.urgency-label {
  font-size: 14px;
  color: #6b7280;
}

.urgency-value {
  font-size: 16px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 4px;
  margin-left: 8px;
}

.urgency-value.immediate {
  background: #fee2e2;
  color: #dc2626;
}

.urgency-value.urgent {
  background: #fed7aa;
  color: #ea580c;
}

.urgency-value.recommended {
  background: #fef3c7;
  color: #f59e0b;
}

.urgency-value.advisory {
  background: #dbeafe;
  color: #2563eb;
}

.urgency-value.routine {
  background: #dcfce7;
  color: #16a34a;
}

.timeline {
  font-size: 14px;
  color: #6b7280;
}

/* State Vector */
.state-vector {
  background: white;
  padding: 24px;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.state-vector h3 {
  font-size: 18px;
  font-weight: 600;
  color: #111827;
  margin: 0 0 20px 0;
}

.vector-metrics {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.vector-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.vector-label {
  font-size: 14px;
  color: #6b7280;
  font-weight: 500;
}

.vector-value {
  font-size: 18px;
  font-weight: 700;
  color: #111827;
}

.vector-bar {
  position: relative;
  flex: 1;
  height: 24px;
  background: #f3f4f6;
  border-radius: 12px;
  overflow: hidden;
  margin: 0 16px;
}

.vector-bar-fill {
  height: 100%;
  border-radius: 12px;
  transition: width 1s ease;
}

.vector-bar-value {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 12px;
  font-weight: 600;
  color: #374151;
}

/* ═══════════════════════════════════════════════════════════════
   HAZARD GRID
   ═══════════════════════════════════════════════════════════════ */

.hazard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}

.hazard-card {
  background: white;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  border-left: 4px solid;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.hazard-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.hazard-card.minimal,
.hazard-card.low {
  border-left-color: #22c55e;
}

.hazard-card.moderate {
  border-left-color: #f59e0b;
}

.hazard-card.high,
.hazard-card.severe {
  border-left-color: #ea580c;
}

.hazard-card.extreme,
.hazard-card.very-high {
  border-left-color: #dc2626;
}

.hazard-icon {
  font-size: 32px;
}

.hazard-content {
  flex: 1;
}

.hazard-name {
  font-size: 12px;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.hazard-level {
  font-size: 16px;
  font-weight: 700;
  color: #111827;
  margin-bottom: 4px;
}

.hazard-score {
  font-size: 14px;
  color: #6b7280;
}

/* ═══════════════════════════════════════════════════════════════
   INTERACTIONS
   ═══════════════════════════════════════════════════════════════ */

.interactions-section,
.pathways-section,
.recommendations-section {
  background: white;
  padding: 24px;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  margin-bottom: 24px;
}

.interactions-section h3,
.pathways-section h3,
.recommendations-section h3 {
  font-size: 20px;
  font-weight: 600;
  color: #111827;
  margin: 0 0 20px 0;
}

.interactions-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}

.interaction-stat {
  text-align: center;
  padding: 16px;
  background: #f9fafb;
  border-radius: 8px;
}

.interaction-stat.critical {
  background: #fee2e2;
}

.stat-value {
  font-size: 32px;
  font-weight: 700;
  color: #111827;
}

.stat-label {
  font-size: 12px;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.interaction-narrative {
  padding: 16px;
  background: #eff6ff;
  border-left: 4px solid #2563eb;
  border-radius: 8px;
  margin-bottom: 20px;
  font-size: 14px;
  line-height: 1.6;
  color: #1e40af;
}

.interaction-details {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.interaction-item {
  padding: 16px;
  border-radius: 8px;
  border-left: 4px solid;
}

.interaction-item.very_high,
.interaction-item.high {
  background: #fef3c7;
  border-left-color: #f59e0b;
}

.interaction-item.moderate {
  background: #dbeafe;
  border-left-color: #3b82f6;
}

.interaction-item.low {
  background: #f3f4f6;
  border-left-color: #9ca3af;
}

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

.interaction-hazards {
  font-size: 14px;
  font-weight: 700;
  color: #111827;
}

.interaction-severity {
  font-size: 12px;
  font-weight: 600;
  padding: 4px 8px;
  background: white;
  border-radius: 4px;
  color: #6b7280;
}

.interaction-type {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 8px;
}

.interaction-type.amplification {
  color: #dc2626;
}

.interaction-type.cancellation {
  color: #059669;
}

.interaction-mechanism {
  font-size: 13px;
  color: #4b5563;
  line-height: 1.5;
}

.no-interactions {
  padding: 24px;
  text-align: center;
  background: #f0fdf4;
  border-radius: 8px;
  color: #16a34a;
  font-size: 14px;
  font-weight: 500;
}

/* ═══════════════════════════════════════════════════════════════
   FAILURE PATHWAYS
   ═══════════════════════════════════════════════════════════════ */

.pathways-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 16px;
}

.pathway-item {
  display: flex;
  gap: 16px;
  padding: 16px;
  border-radius: 8px;
  border-left: 4px solid;
}

.pathway-item.high,
.pathway-item.very_high {
  background: #fef3c7;
  border-left-color: #f59e0b;
}

.pathway-item.moderate {
  background: #dbeafe;
  border-left-color: #3b82f6;
}

.pathway-item.low {
  background: #f3f4f6;
  border-left-color: #9ca3af;
}

.pathway-number {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #111827;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  flex-shrink: 0;
}

.pathway-content {
  flex: 1;
}

.pathway-type {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  color: #6b7280;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.pathway-hazards {
  font-size: 14px;
  font-weight: 700;
  color: #111827;
  margin-bottom: 8px;
}

.pathway-mechanism {
  font-size: 13px;
  color: #4b5563;
  line-height: 1.5;
  margin-bottom: 8px;
}

.pathway-probability {
  font-size: 12px;
  color: #6b7280;
  font-weight: 500;
}

.no-pathways {
  padding: 24px;
  text-align: center;
  background: #f0fdf4;
  border-radius: 8px;
  color: #16a34a;
  font-size: 14px;
  font-weight: 500;
}

/* ═══════════════════════════════════════════════════════════════
   RECOMMENDATIONS
   ═══════════════════════════════════════════════════════════════ */

.recommendations-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 16px;
}

.recommendation-item {
  padding: 16px;
  border-radius: 8px;
  border-left: 4px solid;
}

.recommendation-item.immediate {
  background: #fee2e2;
  border-left-color: #dc2626;
}

.recommendation-item.urgent {
  background: #fed7aa;
  border-left-color: #ea580c;
}

.recommendation-item.recommended {
  background: #fef3c7;
  border-left-color: #f59e0b;
}

.recommendation-item.advisory {
  background: #dbeafe;
  border-left-color: #3b82f6;
}

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

.rec-priority {
  font-size: 11px;
  font-weight: 700;
  padding: 4px 8px;
  background: white;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.rec-category {
  font-size: 11px;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.rec-action {
  font-size: 14px;
  font-weight: 600;
  color: #111827;
  margin-bottom: 8px;
  line-height: 1.5;
}

.rec-rationale {
  font-size: 13px;
  color: #4b5563;
  line-height: 1.5;
}

/* ═══════════════════════════════════════════════════════════════
   TECHNICAL DETAILS
   ═══════════════════════════════════════════════════════════════ */

.technical-details {
  margin-top: 24px;
}

.details-toggle {
  width: 100%;
  padding: 16px;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  color: #6b7280;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.2s;
}

.details-toggle:hover {
  background: #f9fafb;
  border-color: #d1d5db;
}

.details-content {
  margin-top: 16px;
  padding: 16px;
  background: #1f2937;
  border-radius: 8px;
  overflow-x: auto;
}

.details-content pre {
  color: #e5e7eb;
  font-size: 12px;
  line-height: 1.6;
  margin: 0;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
}

/* ═══════════════════════════════════════════════════════════════
   ERROR STATE
   ═══════════════════════════════════════════════════════════════ */

.joro-location-error {
  padding: 32px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 12px;
  text-align: center;
}

.joro-location-error h3 {
  color: #dc2626;
  font-size: 20px;
  margin: 0 0 8px 0;
}

.joro-location-error p {
  color: #991b1b;
  font-size: 14px;
  margin: 0;
}

/* ============================================
   AI FLOOD PREDICTION STYLES (V2.0)
   ============================================ */

.ai-flood-prediction {
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
  border-radius: 16px;
  padding: 32px;
  margin-bottom: 32px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

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

.ai-header h3 {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  color: #1e293b;
}

.ai-badge {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: white;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* AI Prediction Gauge (Large, Visual) */
.ai-prediction-gauge {
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 32px;
  padding: 24px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  margin-bottom: 24px;
}

.gauge-container-large {
  position: relative;
  width: 200px;
  height: 200px;
}

.gauge-svg-large {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.gauge-bg {
  fill: none;
  stroke: #e2e8f0;
  stroke-width: 12;
}

.gauge-progress-large {
  fill: none;
  stroke-width: 12;
  stroke-linecap: round;
  transition: stroke-dasharray 1s ease;
}

.gauge-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}

.gauge-percentage {
  font-size: 48px;
  font-weight: 800;
  color: #1e293b;
  line-height: 1;
}

.gauge-label {
  font-size: 14px;
  color: #64748b;
  margin-top: 4px;
}

.gauge-horizon {
  font-size: 12px;
  color: #94a3b8;
  margin-top: 2px;
}

.gauge-details {
  display: flex;
  flex-direction: column;
  gap: 16px;
  justify-content: center;
}

.risk-badge {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 8px;
  color: white;
  font-size: 18px;
  font-weight: 700;
  text-align: center;
  letter-spacing: 1px;
}

.confidence-bar {
  background: #f1f5f9;
  border-radius: 8px;
  padding: 12px;
}

.confidence-label {
  font-size: 14px;
  color: #64748b;
  margin-bottom: 8px;
  font-weight: 600;
}

.confidence-progress {
  height: 8px;
  background: #e2e8f0;
  border-radius: 4px;
  overflow: hidden;
}

.confidence-fill {
  height: 100%;
  transition: width 0.8s ease;
  border-radius: 4px;
}

.trigger-status {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
}

.trigger-status.imminent {
  background: #fee2e2;
  color: #dc2626;
}

.trigger-status.likely {
  background: #fed7aa;
  color: #ea580c;
}

.trigger-status.unlikely {
  background: #d1fae5;
  color: #059669;
}

/* Cross-Examination Section */
.cross-examination-section {
  background: white;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
}

.cross-examination-section h4 {
  font-size: 20px;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 20px;
}

.cross-ex-card {
  display: flex;
  gap: 16px;
  padding: 16px;
  background: #f8fafc;
  border-radius: 8px;
  margin-bottom: 12px;
  border-left: 4px solid #3b82f6;
}

.cross-ex-icon {
  font-size: 32px;
  flex-shrink: 0;
}

.cross-ex-content {
  flex: 1;
}

.cross-ex-title {
  font-size: 14px;
  font-weight: 600;
  color: #64748b;
  margin-bottom: 4px;
}

.cross-ex-value {
  font-size: 24px;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 4px;
}

.cross-ex-meta {
  font-size: 13px;
  color: #94a3b8;
  margin-bottom: 8px;
}

.cross-ex-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  color: white;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Compound Factors */
.compound-factors {
  margin-top: 24px;
}

.compound-factors h5 {
  font-size: 16px;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 12px;
}

.factor-card {
  padding: 12px 16px;
  background: #fef3c7;
  border-radius: 8px;
  margin-bottom: 8px;
}

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

.factor-name {
  font-weight: 600;
  color: #78350f;
  text-transform: capitalize;
}

.factor-amplification {
  font-weight: 700;
  color: #dc2626;
  font-size: 14px;
}

.factor-message {
  font-size: 13px;
  color: #92400e;
}

/* Contradictions */
.contradictions {
  margin-top: 24px;
  padding: 16px;
  background: #fef2f2;
  border-radius: 8px;
  border: 2px solid #fecaca;
}

.contradictions h5 {
  font-size: 16px;
  font-weight: 700;
  color: #dc2626;
  margin-bottom: 12px;
}

.contradiction-card {
  padding: 12px;
  background: white;
  border-radius: 6px;
  margin-bottom: 12px;
}

.contradiction-type {
  font-weight: 600;
  color: #dc2626;
  margin-bottom: 4px;
  text-transform: capitalize;
}

.contradiction-desc {
  font-size: 14px;
  color: #64748b;
  margin-bottom: 8px;
}

.contradiction-resolution {
  font-size: 13px;
  color: #059669;
  margin-bottom: 4px;
}

.contradiction-recommendation {
  font-size: 13px;
  color: #ea580c;
  font-style: italic;
}

/* Trigger Conditions Section */
.trigger-conditions-section {
  background: white;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
}

.trigger-conditions-section h4 {
  font-size: 20px;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 12px;
}

.trigger-intro {
  font-size: 14px;
  color: #64748b;
  margin-bottom: 20px;
}

.triggers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.trigger-card {
  display: flex;
  gap: 12px;
  padding: 16px;
  background: #f8fafc;
  border-radius: 8px;
  border: 2px solid #e2e8f0;
}

.trigger-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: #3b82f6;
  color: white;
  border-radius: 50%;
  font-weight: 700;
  flex-shrink: 0;
}

.trigger-content {
  flex: 1;
}

.trigger-condition {
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 4px;
  text-transform: capitalize;
}

.trigger-threshold {
  font-size: 14px;
  color: #64748b;
  margin-bottom: 8px;
}

.trigger-status {
  font-weight: 700;
  margin-bottom: 4px;
}

.trigger-confidence {
  font-size: 12px;
  color: #94a3b8;
}

/* Early Warnings */
.early-warnings {
  margin-top: 16px;
}

.warning-card {
  display: flex;
  gap: 16px;
  padding: 16px;
  background: white;
  border-radius: 8px;
  border: 3px solid #fbbf24;
  margin-bottom: 12px;
}

.warning-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  font-size: 24px;
  flex-shrink: 0;
}

.warning-content {
  flex: 1;
}

.warning-title {
  font-weight: 700;
  color: #78350f;
  margin-bottom: 8px;
  text-transform: capitalize;
}

.warning-message {
  font-size: 14px;
  color: #92400e;
  margin-bottom: 8px;
}

.warning-action {
  font-size: 13px;
  color: #dc2626;
}

/* Future Scenarios Section */
.future-scenarios-section {
  background: white;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
}

.future-scenarios-section h4 {
  font-size: 20px;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 20px;
}

.scenarios-timeline {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.scenario-item {
  display: grid;
  grid-template-columns: 100px 1fr 60px 100px;
  gap: 12px;
  align-items: center;
  padding: 12px;
  background: #f8fafc;
  border-radius: 8px;
}

.scenario-label {
  display: flex;
  align-items: center;
  gap: 8px;
}

.scenario-icon {
  font-size: 20px;
}

.scenario-time {
  font-weight: 600;
  color: #1e293b;
}

.scenario-bar-container {
  background: #e2e8f0;
  height: 24px;
  border-radius: 12px;
  overflow: hidden;
}

.scenario-bar {
  height: 100%;
  transition: width 0.8s ease;
  border-radius: 12px;
}

.scenario-value {
  font-weight: 700;
  color: #1e293b;
  text-align: right;
}

.scenario-risk {
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  text-align: center;
}

/* Data Sources Section */
.data-sources-section {
  margin-top: 24px;
}

.data-sources-section h5 {
  font-size: 16px;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 12px;
}

.sources-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}

.source-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: white;
  border-radius: 8px;
  border: 2px solid;
  font-size: 13px;
}

.source-icon {
  font-size: 18px;
}

.source-label {
  flex: 1;
  font-weight: 600;
  color: #1e293b;
}

.source-status {
  font-weight: 700;
}

/* Responsive Design */
@media (max-width: 768px) {
  .ai-prediction-gauge {
    grid-template-columns: 1fr;
    text-align: center;
  }
  
  .triggers-grid {
    grid-template-columns: 1fr;
  }
  
  .scenario-item {
    grid-template-columns: 80px 1fr;
    grid-template-rows: auto auto;
  }
  
  .scenario-value,
  .scenario-risk {
    grid-column: 2;
  }
}

/* ============================================
   INTERACTIVE MAP & ADVANCED VISUALIZATIONS (V2.1)
   ============================================ */

/* Chart Grid Layout */
.joro-charts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
  gap: 24px;
  margin: 24px 0;
}

.chart-card {
  background: white;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.chart-title {
  margin: 0 0 20px 0;
  font-size: 16px;
  font-weight: 700;
  color: #1e293b;
}

.chart-empty-state {
  text-align: center;
  padding: 40px 20px;
  color: #64748b;
  font-size: 14px;
}

.chart-summary {
  margin-top: 16px;
  padding: 12px;
  background: #f8fafc;
  border-radius: 8px;
  font-size: 13px;
  color: #475569;
  text-align: center;
}

.chart-summary.climate-warning {
  background: #fef2f2;
  color: #dc2626;
  border: 2px solid #fecaca;
}

/* Bar Chart */
.bar-chart {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  height: 200px;
  padding: 0 10px;
}

.bar-chart-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0 4px;
}

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

.bar-chart-bar {
  width: 100%;
  max-width: 40px;
  background: #3b82f6;
  border-radius: 4px 4px 0 0;
  transition: height 0.6s ease;
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 6px;
}

.bar-chart-value {
  color: white;
  font-weight: 700;
  font-size: 12px;
}

.bar-chart-label {
  margin-top: 8px;
  font-size: 11px;
  color: #64748b;
  transform: rotate(-45deg);
  white-space: nowrap;
}

/* Line Chart */
.line-chart {
  width: 100%;
  height: 300px;
}

.line-chart-svg {
  width: 100%;
  height: 100%;
}

/* Trigger Gauges */
.trigger-gauges-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}

.trigger-gauge {
  background: #f8fafc;
  border-radius: 12px;
  padding: 16px;
  text-align: center;
}

.trigger-gauge-header {
  margin-bottom: 16px;
}

.trigger-gauge-title {
  font-size: 13px;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 8px;
  text-transform: capitalize;
}

.trigger-gauge-status {
  font-size: 12px;
  font-weight: 700;
}

.trigger-gauge-visual {
  margin: 16px 0;
}

.trigger-gauge-svg {
  width: 120px;
  height: 120px;
}

.trigger-gauge-threshold,
.trigger-gauge-confidence {
  font-size: 12px;
  color: #64748b;
  margin-top: 6px;
}

/* Climate Trajectory */
.climate-trajectory {
  margin: 16px 0;
}

.trajectory-bar {
  display: flex;
  height: 120px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.trajectory-segment {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px;
  color: white;
  position: relative;
}

.trajectory-segment.baseline {
  background: #64748b;
}

.trajectory-label {
  font-size: 12px;
  font-weight: 600;
  opacity: 0.9;
  margin-bottom: 8px;
}

.trajectory-value {
  font-size: 28px;
  font-weight: 800;
  line-height: 1;
}

.trajectory-change {
  font-size: 14px;
  margin-top: 4px;
  opacity: 0.95;
}

.trajectory-summary {
  margin-top: 16px;
  text-align: center;
}

/* Donut Chart */
.donut-chart-container {
  display: flex;
  gap: 24px;
  align-items: center;
}

.donut-chart {
  width: 200px;
  height: 200px;
  flex-shrink: 0;
}

.donut-legend {
  flex: 1;
}

.donut-legend-item {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
  font-size: 13px;
}

.donut-legend-color {
  width: 16px;
  height: 16px;
  border-radius: 3px;
  margin-right: 10px;
  flex-shrink: 0;
}

.donut-legend-label {
  flex: 1;
  color: #475569;
}

.donut-legend-status {
  font-size: 16px;
}

/* Compound Factors Chart */
.compound-factors-chart {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.compound-factor-bar {
  display: flex;
  align-items: center;
  gap: 12px;
}

.compound-factor-label {
  width: 180px;
  font-size: 13px;
  font-weight: 600;
  color: #475569;
  text-transform: capitalize;
  flex-shrink: 0;
}

.compound-factor-bar-container {
  flex: 1;
  height: 32px;
  background: #e2e8f0;
  border-radius: 6px;
  position: relative;
  overflow: hidden;
}

.compound-factor-bar-fill {
  height: 100%;
  border-radius: 6px;
  transition: width 0.8s ease;
}

.compound-factor-value {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 13px;
  font-weight: 700;
  color: white;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Time Controls Panel */
.time-controls-panel {
  background: white;
  border-radius: 16px;
  padding: 32px;
  margin: 24px 0;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.time-control-section {
  margin-bottom: 32px;
  padding-bottom: 32px;
  border-bottom: 1px solid #e2e8f0;
}

.time-control-section:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.time-control-title {
  margin: 0 0 16px 0;
  font-size: 16px;
  font-weight: 700;
  color: #1e293b;
}

/* Time Slider */
.time-slider-container {
  padding: 0 10px;
}

.time-slider {
  width: 100%;
  height: 8px;
  border-radius: 4px;
  background: linear-gradient(to right, #e2e8f0 0%, #3b82f6 100%);
  outline: none;
  -webkit-appearance: none;
}

.time-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #3b82f6;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  border: 3px solid white;
}

.time-slider::-moz-range-thumb {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #3b82f6;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  border: 3px solid white;
}

.time-slider-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  font-size: 11px;
  color: #94a3b8;
}

.time-slider-value {
  margin-top: 16px;
  padding: 12px;
  background: #f8fafc;
  border-radius: 8px;
  font-size: 14px;
  color: #475569;
  text-align: center;
}

/* Scenario Selector */
.scenario-selector {
  display: flex;
  gap: 12px;
}

.scenario-btn {
  flex: 1;
  padding: 16px 20px;
  background: #f1f5f9;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  transition: all 0.2s ease;
}

.scenario-btn:hover {
  background: #e0f2fe;
  border-color: #3b82f6;
}

.scenario-btn.active {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  border-color: #2563eb;
  color: white;
  box-shadow: 0 4px 6px rgba(37, 99, 235, 0.3);
}

/* Comparison Toggle */
.comparison-toggle {
  display: flex;
  align-items: center;
  gap: 12px;
}

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 26px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #cbd5e1;
  transition: 0.3s;
  border-radius: 26px;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.3s;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.toggle-switch input:checked + .toggle-slider {
  background-color: #3b82f6;
}

.toggle-switch input:checked + .toggle-slider:before {
  transform: translateX(24px);
}

.toggle-label {
  font-size: 14px;
  color: #475569;
  font-weight: 500;
}

/* Current Selection Display */
.current-selection-display {
  margin-top: 24px;
}

.selection-display-card {
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
  border-radius: 12px;
  padding: 20px;
  border: 2px solid #bae6fd;
}

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

.selection-display-label {
  font-size: 13px;
  color: #0369a1;
  font-weight: 600;
}

.selection-display-timepoint {
  font-size: 18px;
  font-weight: 800;
  color: #0c4a6e;
}

.selection-display-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

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

.selection-metric-value {
  font-size: 32px;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 6px;
}

.selection-metric-label {
  font-size: 12px;
  color: #475569;
}

.comparison-mode-indicator {
  margin-top: 16px;
  padding: 10px;
  background: #fef3c7;
  border-radius: 6px;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: #78350f;
}

/* Comparison View */
.comparison-view {
  margin-top: 32px;
}

.comparison-container {
  background: white;
  border-radius: 16px;
  padding: 32px;
  border: 2px solid #e0f2fe;
}

.comparison-title {
  margin: 0 0 24px 0;
  font-size: 20px;
  font-weight: 700;
  color: #1e293b;
  text-align: center;
}

.comparison-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 24px;
  align-items: center;
  margin-bottom: 32px;
}

.comparison-column {
  background: #f8fafc;
  border-radius: 12px;
  overflow: hidden;
}

.comparison-column-header {
  padding: 16px;
  text-align: center;
  color: white;
}

.comparison-column-header.today {
  background: linear-gradient(135deg, #64748b, #475569);
}

.comparison-column-header.future {
  background: linear-gradient(135deg, #dc2626, #b91c1c);
}

.comparison-column-header h4 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
}

.comparison-metrics {
  padding: 24px;
}

.comparison-metric {
  text-align: center;
  margin-bottom: 16px;
}

.comparison-metric-value {
  font-size: 40px;
  font-weight: 800;
  color: #1e293b;
  line-height: 1;
}

.comparison-metric-label {
  font-size: 13px;
  color: #64748b;
  margin-top: 6px;
}

.comparison-metric-badge {
  display: inline-block;
  padding: 8px 16px;
  border-radius: 20px;
  color: white;
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.comparison-factors {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #e2e8f0;
}

.comparison-factor-label {
  font-size: 12px;
  color: #94a3b8;
  margin-bottom: 8px;
  font-weight: 600;
  text-transform: uppercase;
}

.comparison-factor-list {
  margin: 0;
  padding-left: 20px;
  font-size: 13px;
  color: #64748b;
}

.comparison-factor-list li {
  margin-bottom: 4px;
}

.comparison-arrow {
  text-align: center;
  padding: 20px;
}

.comparison-arrow-icon {
  font-size: 48px;
  margin-bottom: 12px;
}

.comparison-arrow-text {
  font-size: 20px;
  font-weight: 700;
  color: #1e293b;
}

.comparison-summary {
  display: flex;
  gap: 16px;
  padding: 20px;
  background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
  border-radius: 12px;
  border: 2px solid #86efac;
  margin-bottom: 24px;
}

.comparison-summary-icon {
  font-size: 32px;
  flex-shrink: 0;
}

.comparison-summary-text {
  flex: 1;
  font-size: 14px;
  color: #065f46;
}

/* Before/After Slider */
.before-after-slider {
  padding: 24px;
  background: #f8fafc;
  border-radius: 12px;
}

.before-after-container {
  display: flex;
  align-items: center;
  gap: 16px;
}

.before-after-label {
  font-size: 14px;
  font-weight: 600;
  color: #475569;
  flex-shrink: 0;
}

.before-after-range {
  flex: 1;
  height: 8px;
  border-radius: 4px;
  background: linear-gradient(to right, #64748b 0%, #dc2626 100%);
  outline: none;
  -webkit-appearance: none;
}

.before-after-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: white;
  cursor: pointer;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
  border: 4px solid #3b82f6;
}

.before-after-range::-moz-range-thumb {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: white;
  cursor: pointer;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
  border: 4px solid #3b82f6;
}

.before-after-display {
  margin-top: 16px;
  text-align: center;
}

.before-after-value {
  font-size: 16px;
  font-weight: 700;
  color: #1e293b;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .joro-charts-grid {
    grid-template-columns: 1fr;
  }
  
  .comparison-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .comparison-arrow {
    transform: rotate(90deg);
  }
}

@media (max-width: 768px) {
  .donut-chart-container {
    flex-direction: column;
  }
  
  .scenario-selector {
    flex-direction: column;
  }
  
  .time-controls-panel {
    padding: 20px;
  }
}
