.analysis-workspace {
  display: flex;
  flex-direction: row;
  height: 100vh;
  width: 100%;
  overflow: hidden;
  background-color: var(--color-paper);
}

/* Sidebar kiri sempit (240 px) */
.analysis-sidebar {
  width: 240px;
  min-width: 240px;
  height: 100%;
  flex-shrink: 0;
  background-color: #ffffff;
  border-right: 1px solid var(--color-line);
  display: flex;
  flex-direction: column;
  z-index: 1000;
  box-shadow: var(--shadow-sm);
}

.sidebar-header {
  padding: 22px 24px;
  border-bottom: 1px solid var(--color-line);
}

.btn-back-dashboard {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: none;
  color: var(--color-text-secondary);
  font-size: var(--font-size-label);
  font-weight: 500;
  cursor: pointer;
  padding: 4px 6px;
  margin-left: -6px;
  border-radius: var(--border-radius-sm);
  text-decoration: none;
  transition:
    color var(--transition-fast),
    background-color var(--transition-fast);
}

.btn-back-dashboard:hover {
  color: var(--color-ink);
  background-color: rgba(19, 32, 92, 0.04);
}

.sidebar-title {
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 700;
  color: var(--color-ink);
  margin-top: 14px;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Stepper Vertikal 5 Langkah */
.stepper-list {
  list-style: none;
  padding: 20px 0;
  margin: 0;
  flex: 1;
  position: relative;
}

/* Garis penghubung vertikal */
.stepper-list::before {
  content: "";
  position: absolute;
  top: 36px;
  bottom: 40px;
  left: 35px;
  width: 2px;
  background-color: #f0f2f6;
  z-index: 1;
}

.step-item {
  display: flex;
  align-items: center;
  padding: 14px 24px;
  font-size: var(--font-size-label);
  font-weight: 500;
  color: var(--color-text-secondary); /* Langkah belum aktif: abu */
  border-left: 4px solid transparent;
  transition: all var(--transition-fast);
  user-select: none;
  cursor: pointer;
  position: relative;
  z-index: 2;
}

.step-item:hover:not(.is-active) {
  color: var(--color-ink);
  background-color: rgba(19, 32, 92, 0.02);
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background-color: #ffffff;
  border: 2px solid #e3e5ec;
  color: var(--color-text-secondary);
  font-size: 11px;
  font-weight: 700;
  margin-right: 14px;
  flex-shrink: 0;
  transition: all var(--transition-fast);
}

/* Langkah aktif: Garis tebal amber di kiri, teks navy */
.step-item.is-active {
  border-left-color: var(--color-accent);
  color: var(--color-ink);
  background-color: rgba(245, 183, 0, 0.08);
  font-weight: 600;
}

.step-item.is-active .step-number {
  background-color: var(--color-accent);
  border-color: var(--color-accent);
  color: var(--color-ink);
  box-shadow: 0 0 0 3px rgba(245, 183, 0, 0.25);
}

/* Langkah selesai: teks navy */
.step-item.is-completed {
  color: var(--color-ink);
}

.step-item.is-completed .step-number {
  background-color: #e6f4ea;
  border-color: #a3d9b5;
  color: var(--color-verdict-layak);
}

/* Area Konten Utama Peta */
.analysis-main {
  flex: 1;
  min-width: 0;
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Peta mengisi area penuh di langkah 1 sampai 3 */
.map-container {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #e8ecef;
  z-index: 10;
}

/* Penyesuaian visual Google Maps: tenang, jalan jelas, tidak terlalu mencolok */
.map-container .leaflet-tile-pane {
  filter: saturate(0.8) contrast(0.96);
}

/* Panel kecil melayang di kiri atas */
.floating-panel {
  position: absolute;
  top: 24px;
  left: 24px;
  width: 370px;
  max-width: calc(100% - 48px);
  background-color: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--color-line);
  border-radius: var(--border-radius);
  padding: 26px 24px;
  box-shadow: var(--shadow-lg);
  z-index: 500;
  transition: box-shadow var(--transition-normal);
}

.panel-title {
  font-family: var(--font-heading);
  font-size: var(--font-size-section-title);
  font-weight: 700;
  color: var(--color-ink);
  margin-bottom: 20px;
  letter-spacing: -0.015em;
}

.input-row {
  display: flex;
  gap: 12px;
}

.input-row .form-group {
  flex: 1;
}

.radius-field-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
}

.radius-field-wrapper input {
  width: 90px;
}

.radius-unit {
  font-size: var(--font-size-label);
  color: var(--color-text-secondary);
  font-weight: 500;
}

.panel-hint {
  font-size: var(--font-size-label);
  color: var(--color-text-secondary);
  margin: -4px 0 22px 0;
  line-height: 1.45;
}

.panel-error {
  display: none;
  font-size: var(--font-size-label);
  color: var(--color-verdict-tidak-layak);
  background-color: var(--color-verdict-tidak-layak-bg);
  border: 1px solid #fecdca;
  border-left: 4px solid var(--color-verdict-tidak-layak);
  border-radius: var(--border-radius-sm);
  padding: 9px 12px;
  margin-bottom: 18px;
  line-height: 1.4;
  font-weight: 500;
}

.panel-error.is-visible {
  display: block;
}

/* Tombol "Lanjut ke sekolah" */
.btn-next-step {
  width: 100%;
  min-height: var(--min-touch-target);
  padding: 12px 18px;
  background-color: var(--color-ink);
  color: #ffffff;
  font-family: var(--font-body);
  font-size: var(--font-size-body);
  font-weight: 600;
  border: none;
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 1px 2px rgba(19, 32, 92, 0.15);
  transition:
    background-color var(--transition-fast),
    transform 0.08s ease,
    opacity var(--transition-fast);
}

.btn-next-step:hover:not(:disabled) {
  background-color: #0b133a;
  box-shadow: 0 4px 12px rgba(19, 32, 92, 0.2);
}

.btn-next-step:active:not(:disabled) {
  background-color: #060b22;
  transform: translateY(1px);
}

.btn-next-step:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

/* Custom Pin Cyan Leaflet (Elemen yang Diingat) */
.leaflet-cyan-marker {
  display: flex;
  align-items: center;
  justify-content: center;
}

.pin-pulse {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--color-radius);
  border: 3px solid #ffffff;
  box-shadow: 0 2px 10px rgba(19, 32, 92, 0.35);
  position: relative;
}

.pin-pulse::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 8px;
  height: 8px;
  transform: translate(-50%, -50%);
  background-color: var(--color-ink);
  border-radius: 50%;
}

/* Ripple animation ring */
.pin-pulse::before {
  content: "";
  position: absolute;
  top: -6px;
  left: -6px;
  right: -6px;
  bottom: -6px;
  border-radius: 50%;
  border: 2px solid var(--color-radius);
  opacity: 0.6;
  animation: markerPulse 2.4s infinite cubic-bezier(0.25, 1, 0.5, 1);
}

@keyframes markerPulse {
  0% {
    transform: scale(0.9);
    opacity: 0.8;
  }
  100% {
    transform: scale(1.6);
    opacity: 0;
  }
}

/* Responsif: Mobile Stepper Horizontal */
@media (max-width: 768px) {
  .analysis-workspace {
    flex-direction: column;
  }

  .analysis-sidebar {
    width: 100%;
    min-width: 100%;
    height: auto;
    flex-shrink: 0;
    border-right: none;
    border-bottom: 1px solid var(--color-line);
    background-color: #ffffff;
    z-index: 50;
  }

  .analysis-main {
    flex: 1;
    height: calc(100vh - 110px);
    min-height: 0;
    overflow: hidden;
    position: relative;
  }

  .sidebar-header {
    padding: 10px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .sidebar-title {
    margin-top: 0;
    font-size: 13px;
  }

  .stepper-list {
    display: flex;
    overflow-x: auto;
    padding: 6px 14px;
    gap: 6px;
    -webkit-overflow-scrolling: touch;
  }

  .stepper-list::before {
    display: none;
  }

  .step-item {
    padding: 6px 10px;
    white-space: nowrap;
    border-left: none;
    border-bottom: 3px solid transparent;
    font-size: 12px;
  }

  .step-item.is-active {
    border-left: none;
    border-bottom-color: var(--color-accent);
  }

  .floating-panel {
    top: auto;
    bottom: 12px;
    left: 12px;
    right: 12px;
    width: auto;
    max-width: none;
    max-height: 60vh;
    overflow-y: auto;
    padding: 16px 14px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    z-index: 1000;
  }
}
