.finance-profit-analysis-v5 {
  padding: 0 20px 18px;
}

.finance-template-mini-grid.finance-profit-analysis-v5-hidden {
  display: none !important;
}

.finance-profit-analysis-v5-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.finance-profit-analysis-v5-card {
  min-width: 0;
  border: 1px solid #e1e4ff;
  border-radius: 18px;
  background: linear-gradient(180deg, #fff, #fbfbff);
  padding: 16px;
  box-shadow: 0 10px 24px rgba(57, 67, 122, 0.08);
}

.finance-profit-analysis-v5-card h4 {
  margin: 0;
  color: #252b4e;
  font-size: 15px;
  font-weight: 900;
}

.finance-profit-analysis-v5-card > p {
  margin: 4px 0 14px;
  color: #7a83a5;
  font-size: 12px;
  font-weight: 800;
}

.finance-profit-analysis-v5-chart {
  min-width: 0;
  position: relative;
  border: 1px solid #ececff;
  border-radius: 14px;
  background: linear-gradient(180deg, #fff, #fbfbff);
  overflow: hidden;
}

.finance-profit-analysis-v5-svg {
  display: block;
  width: 100%;
  height: 190px;
}

.finance-profit-analysis-v5-svg-grid {
  stroke: #e8ebff;
  stroke-width: 1;
  stroke-dasharray: 4 5;
}

.finance-profit-analysis-v5-svg-axis {
  stroke: #d4daf8;
  stroke-width: 2;
}

.finance-profit-analysis-v5-svg-bar rect {
  fill: url("#finance-profit-analysis-v5-current");
}

.finance-profit-analysis-v5-svg-bar.previous rect {
  fill: #b8c2ff;
}

.finance-profit-analysis-v5-svg-bar.current rect {
  fill: #5a5bea;
}

.finance-profit-analysis-v5-svg-value {
  fill: #34366a;
  font-size: 10px;
  font-weight: 900;
  text-anchor: middle;
}

.finance-profit-analysis-v5-svg-year {
  fill: #6d7698;
  font-size: 10px;
  font-weight: 900;
  text-anchor: middle;
}

.finance-profit-analysis-v5-svg-label {
  fill: #2c3158;
  font-size: 13px;
  font-weight: 900;
  text-anchor: middle;
}

.finance-profit-analysis-v5-legend {
  position: absolute;
  right: 12px;
  top: 10px;
  display: flex;
  gap: 10px;
  align-items: center;
}

.finance-profit-analysis-v5-legend span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #6d7698;
  font-size: 11px;
  font-weight: 900;
}

.finance-profit-analysis-v5-legend i {
  width: 9px;
  height: 9px;
  border-radius: 3px;
  background: #5a5bea;
}

.finance-profit-analysis-v5-legend i.previous {
  background: #b8c2ff;
}

.finance-profit-analysis-v5-deltas {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.finance-profit-analysis-v5-deltas span {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 8px 9px;
  border-radius: 10px;
  background: #f7f8ff;
}

.finance-profit-analysis-v5-deltas b {
  color: #30365f;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.finance-profit-analysis-v5-deltas em {
  color: #13a06f;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
  text-align: left;
  white-space: nowrap;
}

.finance-profit-analysis-v5-deltas em.negative {
  color: #d94d4d;
}

.finance-profit-analysis-v5-deltas small {
  color: #7a83a5;
  font-size: 11px;
  font-weight: 900;
  line-height: 1.25;
  white-space: nowrap;
}

@media (max-width: 1180px) {
  .finance-profit-analysis-v5-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .finance-profit-analysis-v5 {
    padding: 0 12px 12px;
  }

  .finance-profit-analysis-v5-grid {
    grid-template-columns: 1fr;
  }

  .finance-profit-analysis-v5-svg {
    height: 190px;
  }
}

@media (max-width: 520px) {
  .finance-profit-analysis-v5-deltas {
    grid-template-columns: 1fr;
  }
}
