/* ---------- Loading ---------- */
.loading-overlay {
  position: fixed;
  inset: 0;
  background: var(--putih-lembut);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  z-index: 100;
  transition: opacity 250ms ease;
}

.loading-overlay.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.spinner {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 3px solid var(--sempadan);
  border-top-color: var(--indigo-teras);
  animation: spin 800ms linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.loading-overlay__text {
  font-size: 13px;
  color: var(--dakwat-lembut);
}

/* ---------- Modal carta skrin-penuh ---------- */
.chart-modal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(30,27,58,0.45);
  z-index: 80;
  align-items: center;
  justify-content: center;
  padding: var(--space-5);
}

.chart-modal-backdrop.is-open { display: flex; }

.chart-modal {
  background: var(--putih);
  border-radius: var(--radius);
  box-shadow: 0 12px 40px rgba(30,27,58,0.25);
  width: min(1100px, 100%);
  height: min(680px, 100%);
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
}

.chart-modal__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}

.chart-modal__title {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  color: var(--indigo-teras);
}

.chart-modal__caption {
  font-size: 11px;
  color: var(--dakwat-lembut);
  margin-top: 2px;
}

.chart-modal__chart {
  flex: 1 1 0;
  min-height: 0;
  width: 100%;
}

.empty-state {
  text-align: center;
  padding: var(--space-6);
  color: var(--dakwat-lembut);
  font-size: 13px;
}
