.bm-card {
  width: 100%;
  background: #ffffff;
  border: 1px solid rgba(229, 231, 235, 0.95);
  border-radius: 22px;
  box-shadow: 0 18px 45px rgba(17, 24, 39, 0.08);
  padding: 24px;
  overflow: hidden;
}

.bm-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.bm-title {
  font-family: "Noto Sans KR", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 22px;
  font-weight: 800;
  color: #111827;
  letter-spacing: -0.03em;
  margin: 0 0 6px 0;
}

.bm-desc {
  font-family: "Noto Sans KR", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  color: #6b7280;
  font-size: 14px;
  margin: 0;
}

.bm-summary {
  min-width: 210px;
  border-radius: 18px;
  padding: 16px 18px;
  background: linear-gradient(135deg, #a50034 0%, #d81b60 48%, #ef4444 100%);
  color: #ffffff;
  box-shadow: 0 16px 28px rgba(165, 0, 52, 0.22);
}

.bm-summary-label {
  font-size: 12px;
  opacity: 0.82;
  margin-bottom: 4px;
}

.bm-summary-date {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 8px;
}

.bm-summary-value {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.bm-summary-rate {
  font-size: 13px;
  margin-top: 4px;
  opacity: 0.92;
}

.bm-legend {
  display: flex;
  gap: 18px;
  align-items: center;
  color: #374151;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 14px;
}

.bm-legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.bm-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  display: inline-block;
}

.bm-dot-asset {
  background: #a50034;
}

.bm-dot-invest {
  background: #2563eb;
}

.bm-chart-area {
  position: relative;
  width: 100%;
  height: 430px;
  border-radius: 18px;
  background:
    radial-gradient(circle at 20% 0%, rgba(165, 0, 52, 0.08), transparent 28%),
    linear-gradient(180deg, #ffffff 0%, #f9fafb 100%);
  border: 1px solid rgba(243, 244, 246, 1);
  overflow: hidden;
}

.bm-svg {
  width: 100%;
  height: 100%;
  display: block;
}

.bm-grid line {
  stroke: #e5e7eb;
  stroke-width: 1;
}

.bm-axis text {
  fill: #9ca3af;
  font-size: 12px;
  font-family: "Noto Sans KR", system-ui, sans-serif;
}

.bm-axis-line {
  stroke: #d1d5db;
  stroke-width: 1.2;
}

.bm-area {
  opacity: 0.16;
}

.bm-area-asset {
  fill: #a50034;
}

.bm-line {
  fill: none;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.bm-line-asset {
  stroke: #a50034;
  filter: drop-shadow(0 6px 8px rgba(165, 0, 52, 0.18));
}

.bm-line-invest {
  stroke: #2563eb;
  stroke-dasharray: 8 7;
  filter: drop-shadow(0 6px 8px rgba(37, 99, 235, 0.15));
}

.bm-x-label {
  fill: #6b7280;
  font-size: 12px;
  font-family: "Noto Sans KR", system-ui, sans-serif;
}

.bm-hover-line {
  stroke: #111827;
  stroke-width: 1;
  stroke-dasharray: 4 4;
  opacity: 0.35;
}

.bm-hit {
  fill: transparent;
  cursor: pointer;
}

.bm-tooltip {
  position: absolute;
  z-index: 5;
  width: 220px;
  border-radius: 14px;
  background: rgba(17, 24, 39, 0.94);
  color: #ffffff;
  padding: 12px 14px;
  box-shadow: 0 18px 36px rgba(17, 24, 39, 0.24);
  pointer-events: none;
  backdrop-filter: blur(8px);
}

.bm-tooltip-date {
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 8px;
  color: #ffffff;
}

.bm-tooltip-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  margin-top: 5px;
}

.bm-tooltip-row span {
  color: #d1d5db;
}

.bm-tooltip-row strong {
  color: #ffffff;
  font-weight: 800;
}

.bm-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #9ca3af;
  font-size: 12px;
  margin-top: 12px;
}

.bm-error {
  border-radius: 16px;
  background: #fff1f2;
  border: 1px solid #fecdd3;
  color: #9f1239;
  padding: 18px;
  font-size: 14px;
  font-weight: 600;
}

.bm-loading {
  border-radius: 16px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  color: #6b7280;
  padding: 18px;
  font-size: 14px;
}

@media (max-width: 768px) {
  .bm-card {
    padding: 18px;
    border-radius: 18px;
  }

  .bm-card-head {
    flex-direction: column;
  }

  .bm-summary {
    width: 100%;
    min-width: 0;
  }

  .bm-chart-area {
    height: 360px;
  }

  .bm-foot {
    flex-direction: column;
    align-items: flex-start;
  }
}

.budget-chart-menu {
  margin-bottom: 12px;
  text-align: right;
}

.budget-chart-menu-label {
  font-size: 14px;
  color: #333;
}

.budget-chart-select {
  margin-left: 6px;
  padding: 6px 10px;
  font-size: 14px;
  border: 1px solid #ccc;
  border-radius: 6px;
  background: #fff;
}
