/**
 * 文件职责：经营报表预览抽屉样式。
 */
.page-finance-report {
  .ant-drawer {
    .ant-drawer-header {
      padding: 14px 18px;
      border-bottom: 1px solid #f0f0f0;
    }

    .ant-drawer-body {
      padding: 16px 20px;
    }

    .ant-drawer-footer {
      padding: 12px 20px;
      border-top: 1px solid #f0f0f0;
    }
  }
}

.frp-section {
  margin-bottom: 22px;
}

.frp-section-hd {
  padding-left: 10px;
  margin-bottom: 14px;
  font-size: 15px;
  font-weight: 600;
  color: rgb(0 0 0 / 88%);
  border-left: 3px solid #1677ff;
}

.frp-kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.frp-kpi-item {
  padding: 14px 16px;
  background: #f8f9fb;
  border: 1px solid #f0f0f0;
  border-radius: 8px;
}

.frp-kpi-label {
  margin-bottom: 6px;
  font-size: 12px;
  color: rgb(0 0 0 / 45%);
}

.frp-kpi-val {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.3;
  color: rgb(0 0 0 / 88%);

  &.is-profit {
    color: #52c41a;
  }
}

.frp-kpi-change {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 4px;
  font-size: 12px;
}

.frp-kpi-change-positive {
  color: #52c41a;
}

.frp-kpi-change-negative {
  color: #ff4d4f;
}

.frp-kpi-change-neutral {
  color: rgb(0 0 0 / 45%);
}

.frp-divider {
  height: 1px;
  margin: 20px 0;
  background: linear-gradient(90deg, #f0f0f0, transparent);
}

.frp-detail-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  font-size: 13px;
  border-bottom: 1px solid #f5f5f5;

  &:last-child {
    border-bottom: none;
  }
}

.frp-detail-name {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  color: rgb(0 0 0 / 88%);
}

.frp-breakdown-icon {
  width: 14px;
  height: 14px;

  &.is-primary {
    color: #1677ff;
  }

  &.is-success {
    color: #52c41a;
  }

  &.is-warning {
    color: #faad14;
  }

  &.is-muted {
    color: rgb(0 0 0 / 45%);
  }
}

.frp-detail-right {
  display: flex;
  gap: 16px;
  align-items: center;
}

.frp-detail-amount {
  min-width: 80px;
  font-weight: 600;
  color: rgb(0 0 0 / 88%);
  text-align: right;
}

.frp-detail-pct {
  min-width: 50px;
  font-size: 12px;
  color: rgb(0 0 0 / 45%);
  text-align: right;
}

.frp-drawer-footer {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.frp-drawer-btn {
  display: inline-flex;
  gap: 4px;
  align-items: center;
}
