/* ========================================================
   CITRINE V2 • ANALISIS KETERPAPARAN ASET INDONESIA
   Pemetaan Objek Vital, Simulasi Vektor Serangan, Ketahanan Energi & Auto Analyze
   Font diseragamkan ke sistem sans-serif Inter (seperti subtitle "atur entitas...")
   ======================================================== */

.exposure-view-container {
  display: flex; flex-direction: column; gap: 14px; width: 100%;
  flex: 1; min-width: 0;
  height: calc(100vh - 56px); max-height: calc(100vh - 56px);
  overflow-y: auto; overflow-x: hidden; scroll-behavior: smooth;
  padding: 16px 20px 48px; background: transparent; color: var(--text-main); box-sizing: border-box;
  font-family: var(--font-sans, 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif);
}

.exposure-view-container button,
.exposure-view-container select,
.exposure-view-container input,
.exposure-view-container textarea {
  font-family: inherit;
}

.exposure-view-container::-webkit-scrollbar { width: 6px; }
.exposure-view-container::-webkit-scrollbar-track { background: rgba(0, 0, 0, 0.2); }
.exposure-view-container::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.18); border-radius: 3px; }
.exposure-view-container::-webkit-scrollbar-thumb:hover { background: var(--accent-blue); }

/* 2. KPI SEVERITY COUNTERS */
.exposure-kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; flex-shrink: 0; }
.exposure-kpi-card {
  background: var(--card-bg); border: 1px solid var(--card-border); border-radius: 8px;
  padding: 12px 14px; display: flex; align-items: center; justify-content: space-between;
}
.exposure-kpi-meta { display: flex; flex-direction: column; gap: 2px; }
.exposure-kpi-label { font-size: 11px; color: var(--text-sec); letter-spacing: 0.2px; font-weight: 600; }
.exposure-kpi-sub { font-size: 11px; color: var(--text-muted); }
.exposure-kpi-val { font-size: 24px; font-weight: 700; }
.kpi-crit .exposure-kpi-val { color: #ef4444; }
.kpi-high .exposure-kpi-val { color: #f97316; }
.kpi-ele .exposure-kpi-val  { color: #eab308; }
.kpi-safe .exposure-kpi-val { color: #10b981; }

/* 3. MAIN WORKSPACE: MAP & INTEL PANEL */
/* Tinggi mengikuti isi: peta menempel (sticky) saat kolom kanan dibaca, tanpa gulir bertingkat */
.exposure-workspace-grid { display: grid; grid-template-columns: 1fr 410px; gap: 14px; align-items: start; flex-shrink: 0; }
.exposure-workspace-grid > .exposure-map-card { position: sticky; top: 0; height: 560px; }
#exposureMapCanvas { width: 100%; height: 100%; min-height: 380px; background: #0d0d0e; }

/* LEAFLET POPUP CONTRAST & DARK THEME */
#exposureMapCanvas .leaflet-popup-content-wrapper {
  background: rgba(15, 23, 42, 0.96) !important;
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
  border-radius: 8px !important;
  color: #f8fafc !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6) !important;
}
#exposureMapCanvas .leaflet-popup-tip {
  background: rgba(15, 23, 42, 0.96) !important;
}
#exposureMapCanvas .leaflet-popup-close-button {
  color: #94a3b8 !important;
}
#exposureMapCanvas .leaflet-popup-close-button:hover {
  color: #ffffff !important;
}

/* SOLID ASSET PIN HOVER INTERACTION */
.exp-solid-asset-pin { transition: transform 0.15s ease; }
.exp-solid-asset-pin:hover { transform: scale(1.25); z-index: 1000 !important; }

/* 4. INTEL & RESILIENCE SIDEBAR (410px) */
.exposure-sidebar-col { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.exposure-sidebar-col::-webkit-scrollbar { width: 4px; }
.exposure-sidebar-col::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.15); border-radius: 4px; }

/* ENERGY RESILIENCE METRICS */
.energy-gauge-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.energy-gauge-item {
  background: var(--c-panel); border: 1px solid var(--c-line-2); border-radius: var(--c-r);
  padding: 9px 10px; display: flex; flex-direction: column; gap: 4px;
}
.energy-gauge-title { font-size: 11.5px; color: var(--c-muted); }
.energy-gauge-val { font-size: 16px; font-weight: 600; color: var(--c-text-strong); }
.energy-bar-wrap { width: 100%; height: 5px; background: rgba(255, 255, 255, 0.08); border-radius: 3px; overflow: hidden; }
.energy-bar-fill { height: 100%; border-radius: 3px; transition: width 0.4s ease, background-color 0.4s ease; }

/* MSFS TRANSIT ROUTING & TELEMETRY */
.exp-msfs-waypoint-icon { transition: transform 0.2s ease; cursor: pointer; }
.exp-msfs-waypoint-icon:hover { transform: scale(1.25); z-index: 1000 !important; }

.exp-prov-crit-pulse {
  animation: expCritStroke 2s infinite ease-in-out;
}
@keyframes expCritStroke {
  0%, 100% { stroke-opacity: 1; stroke-width: 2.2px; }
  50% { stroke-opacity: 0.4; stroke-width: 1.2px; }
}

.exp-prov-tooltip {
  background: rgba(15, 23, 42, 0.95) !important;
  border: 1px solid rgba(56, 189, 248, 0.3) !important;
  border-radius: 6px !important;
  color: #fff !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6) !important;
  padding: 8px 12px !important;
  font-family: var(--font-sans, sans-serif) !important;
}
.exp-prov-tooltip::before {
  border-top-color: rgba(15, 23, 42, 0.95) !important;
}
.exp-city-badge {
  display: inline-block;
  padding: 1px 5px;
  border-radius: 3px;
  font-size: 11px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-sec);
  margin-right: 4px;
  margin-bottom: 2px;
}

@media (max-width: 1200px) {
  .exposure-workspace-grid { grid-template-columns: 1fr; height: auto; }
  .exposure-workspace-grid > .exposure-map-card { position: relative; height: 460px; }
  .exposure-sidebar-col { max-height: none; height: auto; }
  .exposure-kpi-grid { grid-template-columns: repeat(2, 1fr); }
}

/* Keterbacaan: teks sekunder di halaman simulasi dibuat lebih terang (token lama #67676f hanya ~3,2:1) */
.exposure-view-container { --c-muted: #a8a8b0; --c-faint: #8f8f97; --text-muted: #a1a1aa; --text-sec: #c4c4cc; }
.energy-gauge-sub { font-size: 11.5px; color: var(--c-text-3); }
