/* ================== Pie & Map Styles ================== */
#pieChart {
  width: 100%;
  height: 100% !important;
}

#mapLegend {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 4px 8px;
  font-size: 12px;
}

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

#mapLegend .legend-color {
  width: 14px;
  height: 14px;
  border-radius: 2px;
  border: 1px solid #aaa;
}

/* ================== KPI Card Styles ================== */
.kpi-card {
  overflow: hidden;
  position: relative;
  box-shadow: 1px 1px 4px rgba(0, 0, 0, 0.4);
  border-radius: 0.5em;
  padding: 1.2em;
  font-family: sans-serif;
  color: #fff;
  height: 100%;
}

.kpi-card .card-value {
  display: block;
  font-size: 180%;
  font-weight: bolder;
}

.kpi-card .card-text {
  display: block;
  font-size: 80%;
  margin-top: 0.3rem;
}

.kpi-card .icon {
  position: absolute;
  top: 0.4rem;
  right: 0.6rem;
  font-size: 300%;
  opacity: 0.2;
}

/* Warna KPI Cards */
.orange { background: #ffc241; color: #fff; }
.purple { background: #886ab5; color: #fff; }
.grey-dark { background: #495057; color: #efefef; }
.red { background: #a83b3b; color: #fff; }
.red-gradient {
  background: linear-gradient(180deg, rgba(207,82,82,1) 0%, rgba(121,9,9,1) 80%);
  color: #fff;
}
